Coding Agent Development SOP
Prerequisites
Confirm task scope, allowed files, protected files, test commands, completion criteria, permission mode, and approval owner. Ask when the project cannot answer these questions; the model must not expand scope on its own.
Procedure
- Record the current branch,
git status --short, pre-existing dirty files, and protected-file fingerprints. - Run
inspectCodingRepositoryand present language, package-manager, and test-command results as suggestions. When there are multiple candidates or no command, ask the user to choose TypeScript, JavaScript, or Python and provide the command. - Build a bounded repository map and freeze acceptance criteria in a six-phase engineering plan.
- Reproduce the defect with the smallest target test. Stop editing and report the evidence gap if reproduction fails.
- Read only the implementation and tests directly related to the failure, then state one verifiable root-cause hypothesis.
- Capture a checkpoint before every
editorwrite, then change the fewest files and lines required. Never overwrite pre-existing user changes. - Run the target test first and the complete regression suite second. Record the actual command, exit code, duration, and artifact reference. Prose is not a substitute for evidence.
- Enter bounded repair only from failure evidence. Stop at repeated-action, no-progress, repair-count, or budget limits.
- Actually call
git_statusandgit_diffduring verification. Runtime must emitengineering_evidenceproving target test, full regression, pre-write checkpoint, and diff review. - Validate with schemaVersion 2 outcome, trajectory, command, file, diff, state, and response graders.
- For both TypeScript and Python, exercise single-file, cross-file, wrong-command, approval-denial, abort/resume, diff/restore, and dirty-worktree cases.
- Record model, provider, version, platform, repetitions, success rate, tool count, latency, tokens, cost, approvals, failure class, safety events, and reviewer conclusion.
- Request commit or publication authorization only after
ReleaseReadiness.ready, security gates, and owner acceptance all pass.
Stop conditions
- The defect cannot be reproduced or the test contract is unclear.
- The task requires writing outside the workspace, unauthorized network access, or disclosure of a real secret.
- The task would overwrite user changes, touch protected files, or expand scope.
- A non-reversible effect lacks explicit authorization or an external receipt.
- A security finding, evaluation, target test, or regression test fails.
Preserve the workspace and trace, then report verified facts, open decisions, and safe next choices to the owner.