agentleFS
sakurablushsakurablush/zeroagent-studio/AGENTS.md

zeroagent-studio

AGENTS.md4 starsChanged 4 months agoMITView on GitHub

This file is the single landing page for coding assistants (Cursor, Kilo Code, Claude Code, Aider, …) working on ZeroAgent Studio — a $0-hosting, browser-native AI workflow editor on GitHub Pages. The authoritative source for humans is docs/CONTRIBUTING.md. When anything below conflicts with CONTRIBUTING.md, the docs win. Sections: TL;DR · Architecture · Project boundaries · Before you change code · Portable skills · Personas · Commands · Adding things · Ignore & secret scanning · Do not commit · Security

  • Reads credentials

We split this AGENTS.md into the rules it gives an agent

4 rules. About 1 is common, 0 are distinctive, and 3 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    No backend: No Express, no DB server, no API routes, no env secrets in the repo.

    line 21
  2. Very specific:

    Ask the user: before: adding a dependency, bumping package.json / lockfile, deploying, tagging a release, or pushing.

    line 27
  3. Very specific:

    Run the gate: before any commit: npm ci && npm run ci (audit → lint → typecheck → test:coverage 100 % → build).

    line 55
  4. Very specific:

    Update user-facing docs in the same PR: when behavior changes: README, in-app Guide (src/components/guide/GuidePage.tsx), docs/SECURITY.md, …

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent instructions

This file is the single landing page for coding assistants (Cursor, Kilo Code, Claude Code, Aider, …) working on ZeroAgent Studio — a $0-hosting, browser-native AI workflow editor on GitHub Pages.

The authoritative source for humans is docs/CONTRIBUTING.md. When anything below conflicts with CONTRIBUTING.md, the docs win.

Sections: TL;DR · Architecture · Project boundaries · Before you change code · Portable skills · Personas · Commands · Adding things · Ignore & secret scanning · Do not commit · Security

TL;DR

  1. Read first — docs/CONTRIBUTING.md and docs/ARCHITECTURE.md.
  2. No backend. No Express, no DB server, no API routes, no env secrets in the repo.
  3. Registry-driven. Tools in src/tools/registry.ts + manifests — never hardcode in dag.ts or palette.
  4. Honest brain guidance. OpenRouter recommended when users can paste a free key; Transformers.js is the no-key local path (brainResolver.ts, brainChoiceGuidance.ts).
  5. 100 % test coverage on included src/ (vite.config.ts excludes UI shells). Catalog count 203 is test-enforced.
  6. Quality gate: npm ci + npm run ci — must be green before any commit or PR.
  7. Never commit plans, secrets, build artifacts, or hardcoded catalog numbers.
  8. Ask the user before: adding a dependency, bumping package.json / lockfile, deploying, tagging a release, or pushing.

Non-negotiable architecture

RuleDetail
No backendNo Express, Fastify, Koa, Hapi, Django, Flask, Rails, Prisma, Drizzle, Mongo/Postgres/SQL drivers, Firebase/Supabase SDKs, auth servers, telemetry SDKs, or analytics
Static SPAvite.config.ts base: './'; hash routes #/ / #/guide via src/lib/appRoute.ts; Pages deploy via .github/workflows/deploy.yml
BYOKAPI keys in Dexie / IndexedDB / sessionStorage only; browser calls providers directly — never our servers
Forkablenpm ci + npm run build produces dist/ — anyone can fork, build, and self-host on Pages
Trusted educatorNo analytics, no backend that sees user data, honest cloud caveats in copy

Project boundaries

LayerLocationRule
Tools (palette, ports, run)src/tools/registry.ts + manifestsDo not hardcode in dag.ts or palette
AI providers (BYOK)src/engines/ + src/lib/brainResolver.tsOpenRouter-first when key saved; else Transformers.js fallback
Canvas / UI shellssrc/components/Excluded from coverage; test logic in src/lib
Workflows (state + I/O)src/stores/workflowStore.ts, src/lib/workflowIo.tsAPI keys never in exports or URLs; canvas lock in nodeCanvasLock.ts
Orchestratorsrc/orchestrator/dag.tsRegistry-driven, no per-tool switch
Catalog countssrc/lib/siteStats.tsTest-enforced — never hardcode "203" or any tool total in copy
Privacy copysrc/lib/cloudPrivacy.ts, src/lib/brainChoiceGuidance.tsSingle source of truth for cloud + brain onboarding copy

Before you change code

  1. Read docs/CONTRIBUTING.md and docs/ARCHITECTURE.md — first time or after a long break.
  2. Match existing patterns in the file you edit. Smallest correct diff. No unrelated refactors.
  3. Run the gate before any commit: npm ci && npm run ci (audit → lint → typecheck → test:coverage 100 % → build). Never commit on red.
  4. Cover new behavior in tests/ — real scenarios, not trivial expect(true). See .kilo/rules/06-test-engineer.md (Kilo) or .cursor/rules/zeroagent-test-engineer.mdc (Cursor).
  5. Update user-facing docs in the same PR when behavior changes: README, in-app Guide (src/components/guide/GuidePage.tsx), docs/SECURITY.md, docs/TOOL-SAFETY.md, and CHANGELOG.md for user-visible changes.
  6. Use the PR template at .github/pull_request_template.md. CODEOWNERS routes review at .github/CODEOWNERS.
  7. Never commit, push, deploy, or tag a release without explicit user confirmation. See .kilo/kilo.jsonc permission.edit for the supply-chain-guarded paths.

Portable skills

Two parallel sets of agent playbooks stay in sync. If you change a Cursor rule / skill, mirror the edit in .kilo/ (or vice versa) so a developer switching tools does not lose context.

FolderToolFormat
.cursor/rules/Cursor.mdc with globs + alwaysApply
.cursor/skills/CursorSKILL.md with name + description
.kilo/kilo.jsoncKiloJSONC schema with permission.*, instructions, watcher.ignore
.kilo/rules/Kilo.md loaded via instructions glob (numbered 01-… to 10-…)
.kilo/skills/KiloSKILL.md with name + description
.kilo/agents/Kilomode: primary personas with scoped permission blocks
.kilo/command/KiloSlash commands (/pre-commit-ci, /ship-patch, …)

Specialized personas (Kilo)

Switch via /agents or Cmd+. in Kilo. Each persona has scoped permissions and an optimal model override.

PersonaModeUse forModel
zeroagent-engineerprimaryImplement features, fix bugs (default engineering)Sonnet
zeroagent-plannerprimaryDesign + trade-offs, no codeSonnet
zeroagent-reviewerprimaryPR review, quality, blockers (read-only)Sonnet
zeroagent-debuggerprimaryRoot-cause analysis + smallest fixSonnet
zeroagent-test-engineerprimaryVitest + 100 % coverage gateSonnet
zeroagent-security-auditorprimaryThreat model + secret/key reviewSonnet
zeroagent-advisorprimaryRead-only Q&A (no subagents)Haiku (fast)

The built-in Kilo agents (code, plan, ask, debug) are still available — the ZeroAgent personas add project-specific knowledge on top.

Quick commands (Kilo)

Type the slash command in chat to invoke a multi-step workflow.

CommandWhat it does
/pre-commit-ciRun npm run ci and report results token-efficiently
/ship-patchEnd-to-end patch: implement → test → review → version → commit (user must ask)
/release-versioningSemVer bump, CHANGELOG, deploy gate
/review-before-mergePre-merge structured review (CI, architecture, security)
/add-browser-toolWalk through adding a manifest preset or curated tool
/add-brain-providerWalk through adding a BYOK or local brain

Adding things

GoalStart here
New transform tool (manifest preset).kilo/skills/add-browser-tool/SKILL.md
New file / network / cloud / sandbox tool (curated).kilo/skills/add-browser-tool/SKILL.md
New AI provider (BYOK or local).kilo/skills/add-brain-provider/SKILL.md
New guided questsrc/lib/quests/ + tutorialValidators.ts + GuidePage.tsx + README.md (sync all)
New shared ruleCopy .kilo/rules/02-engineer.md and the matching .cursor/rules/zeroagent-engineer.mdc
New agent personaCopy .kilo/agents/zeroagent-engineer.md and adjust the permission block
New slash commandCopy .kilo/command/pre-commit-ci.md and set the agent: frontmatter
Connection rulessrc/lib/ports.ts + src/lib/nodePorts.ts + src/lib/connectionValidation.ts (with tests)

Assistant ignore & secret scanning

Defense-in-depth: the same secret/credential patterns live in four places. Keep them in sync — when you add a pattern, update all four.

FilePurposeAudience
.gitignoreWhat Git must not trackGit
.cursorignoreWhat Cursor must not load into contextCursor
.kilocodeignoreWhat Kilo Code must not load into context (legacy + IgnoreMigrator)Kilo Code
.kilo/kilo.jsonc permission.read + permission.editPer-tool deny rules (modern)Kilo Code

Patterns covered (all four): .env*, *.pem, *.key, *.p12, *.pfx, *id_rsa*, *id_ed25519*, *id_ecdsa*, *.gpg, *.asc, .netrc, .aws/, .gcp/, .azure/, .gcloud/, .ssh/, credentials/, secrets/, node_modules/, dist/, coverage/, *.map, *.tsbuildinfo.

Automated scanning: CI runs CodeQL (github/codeql-action@v4, javascript-typescript, security-and-quality query pack, weekly Monday 06:00 UTC) + PR dependency review

  • Dependabot (weekly npm + GitHub Actions, grouped). Locally, install gitleaks or trufflehog for the same coverage before opening a PR.

Do not commit

CategoryExamplesWhere defined
Ephemeral AI state.cursor/plans/, .cursor/scratch/, .cursor/snapshots/, .kilo/plans/, .kilo/worktrees/, .kilo/agent-manager.json, .kilo/sessions/, .kilo/logs/, .kilo/scratch/, .kilo/snapshots/, .claude/plans/, .claude/settings.local.json, .aider*, any **/plan*.md.gitignore
Secrets & credentials.env*, *.pem, *.key, *id_rsa*, *.gpg, .netrc, .aws/, .gcp/, .azure/, .ssh/, credentials/, secrets/all four ignore files
Build & test artifactsdist/, coverage/, node_modules/, *.map, *.tsbuildinfo, playwright-report/, test-results/, lcov.info.gitignore
Lockfile driftpackage-lock.json without matching package.json (or vice versa)convention
Hardcoded catalog numbers"203 tools", "16 curated", "187 manifest" anywhere in copy — use getSiteStats() or siteStats.ts insteadtest-enforced
Personal editor noise.vscode/* (keep only extensions.json + settings.json), .idea/.gitignore
Debug noiseconsole.log, debugger;, // TODO: remove in committed codeconvention

Security

  • API keys: session storage default (AES-GCM vault in sessionKeyVault.ts); never in exports, URLs, screenshots, or test fixtures. src/lib/keyStorage.ts.
  • Custom Script: runs in a Web Worker with no fetch / importScripts / XHR / WebSocket; warn users not to paste secrets.
  • Web scraper: text extraction only — never inject untrusted HTML into the React DOM. SSRF blocklist in src/lib/validateUrl.ts (no loopback, private IPs, embedded credentials). CORS proxies see requested URLs — document the trust boundary.
  • Speech / mic: activate only on explicit tool run; handle permission errors gracefully.
  • Model downloads: WebLLM and Transformers.js pull from third-party CDNs (Hugging Face, …). It is a download, not us receiving your chat — but pin versions and treat as supply-chain.
  • Dependencies: npm audit --audit-level=moderate is part of npm run ci; Dependabot PRs grouped weekly; review every engine bump; dependency review on PRs when lockfile changes.
  • Export redaction: .zeroagent.json strips common API-key patterns in all string fields (config, prompts, chat messages). Prevention is still better.
  • Docs must match code — if behavior changes (privacy UI, locked tools, export redaction, safety notices), update README, Guide, docs/SECURITY.md, and docs/TOOL-SAFETY.md in the same PR.

We are a trusted educator, not a token funnel: no analytics, no backend that sees user data, honest cloud caveats in copy.

Full model: docs/SECURITY.md. Per-tool warnings: docs/TOOL-SAFETY.md. Privacy copy source: src/lib/cloudPrivacy.ts.


Quality gate: npm ci && npm run ci — green only. Live site: https://sakurablush.github.io/zeroagent-studio/ Tone: plain language, explain jargon, no shame, no "just buy a better machine" — see "Empathy in copy" in docs/CONTRIBUTING.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.