| name | detroit |
|---|---|
| version | 2 |
Autonomous code factory. Reads task files from tasks/ and ships them as PRs.
Rules prefixed with ! are strict: the framework must verify them deterministically or the pipeline fails. Plain bullets may be trusted to the agent if the framework does not recognize them.
- triage: prompt
- plan: prompt
- build: style, build, environment
- test: testing, quality, documentation, security
- ship: security, documentation
- monitor: observability
Classify the task, then respond with exactly one line — route: build or route: plan — plus a one-sentence reason.
- route: build — simple, unambiguous, single-file, no new dependency.
- route: plan — new surface, more than one subsystem, schema/behavior change, or any new dependency.
- When in doubt, route: plan.
Fill this template into plan.md; it is the plan the build stage implements.
- Intent: what changes for the user, and the invariant that must hold after.
- Out of scope: what this explicitly does not do.
- Targets: files/functions to touch, with paths; any new dependency.
- Acceptance: checks that prove it works — each a command or an observable behavior.
- camelCase functions, PascalCase components, UPPER_SNAKE_CASE constants
- Booleans prefixed with
is,has, orshould - Functions max 50 lines, single responsibility, early returns, no magic numbers
- Imports ordered: external then internal then relative
- ! No secrets, .env, .pem, .key, credentials, or tokens in committed files
- ! CHANGELOG.md updated per PR
- node 22
- gh CLI authenticated
- CI workflow at
.github/workflows/ci.yml(auto-generate if missing) - !
package.jsonversion bumped per PR (minor bump by default)
- Vitest, colocated
.test.jsfiles - ! All tests must pass before a PR is opened
- New code requires new tests
- JSDoc on exported/public functions (
#for Shell,///for Swift) - README updated for user-facing changes
- AGENTS.md or CLAUDE.md updated for agent-facing changes
- Doc comments must match the implementation
- bash + python3 + gh CLI
- Worktrees for parallel-safe feature branches
- Never commit directly to the default branch
- Detect default branch automatically (main or master)
- ! No files over 500 lines
- No functions over 50 lines
- ! No new TODO or FIXME introduced in the diff
- Single responsibility per function
- Log errors with context at system boundaries
- Error reporting on new error paths
- Log timing and result for new external API calls
- Never swallow errors silently
- ! No hardcoded credentials, API keys, or access tokens
- ! No
eval()or equivalent - ! No
child_process.execwith interpolated user input - No shell injection or SQL concatenation patterns