This document is the single source of truth for any autonomous or semi-autonomous coding agent ("Agent") working in this repository.
It describes the workflow, guard-rails, and inline conventions that enable repeatable, high-quality contributions for any spec located under .kiro/specs/.
- Task-Driven Development – Every change MUST be tied to a checklist item in a spec
tasks.mdfile. No orphan code. - Plan → Implement – For complex tasks an Agent writes a plan first (see § 3). Code only after the plan is accepted/locked.
- Self-Verification Loop – Run compiler / tests locally as often as needed; update test summary (§ 5) on every push.
- Greppable Inline Memory – Use
AICODE-*:comments to leave breadcrumbs for other Agents (§ 4). - Small, Safe, Reversible Commits – Prefer many focused commits over one massive diff.
A human may trigger an Agent by saying e.g.
do task specs/whisperx-fastapi-server/10.
- Locate the task
- Path pattern:
.kiro/specs/<spec-folder>/tasks.md. - Task lines follow GitHub-style checkboxes
- [ ]/- [x].
- Path pattern:
- Analyse the unchecked item: dependencies, affected code, tests, docs.
- If task requires > 3 non-trivial edits – enter Plan Mode (§ 3). Otherwise jump to Implement Mode (§ 4 & § 5).
- After implementation
- Run full test suite.
- Update the spec’s
tasks.md– mark item[x]and append a one-line changelog bullet below the task. - Commit with message
<spec>.<id> <short description>(example:whisperx-fastapi-server.10 add health endpoint).
Plans live in plans/ and are named ###-objective-description.md (increment ###).
A plan MUST include:
- Objective – the task text verbatim.
- Proposed Steps – numbered, short, actionable.
- Risks / Open Questions – bullet list.
- Rollback Strategy – how to revert if needed.
Wait for human approval before touching code. After approval, reference the plan file at the top of the first commit message: Plan: 012-health-endpoint.
Use language-appropriate comment tokens (#, //, --, etc.).
AICODE-NOTE:– important rationale linking new to legacy code.AICODE-TODO:– known follow-ups not in current scope.AICODE-QUESTION:– uncertainty that needs human review.
Example (Python):
# AICODE-NOTE: re-uses buffer sizing from legacy reader (see reader.py:42)These anchors are mandatory when:
- Code is non-obvious.
- Logic mirrors or patches hard-to-find legacy parts.
- A bug-prone area is touched.
They are discoverable via grep "AICODE-" -R.
Each spec keeps a lightweight test ledger test-summary.md next to its tasks.md.
After every test run an Agent MUST overwrite that file with the exact format:
# Test Summary
Passed: <NUM_PASSED>; failed: <NUM_FAILED>
## Passed
- <module.TestClass.test_name>
...
## Failed
### <module.TestClass.test_name>
Error: <first line of assertion error>
Full stack traces go inside a fenced block directly after each failed test. This enables other Agents to quickly pick "first failing test", "second failing test", etc.
-
pytest -q(or framework-equivalent) passes — or failures are expected and recorded intest-summary.md. - Linter & formatter (
ruff,black,isort) pass. - No TODO left in scope unless explicitly out-of-scope.
Agents MAY update .kiro/steering/*.md files when:
- A new technology or convention is introduced.
- An existing rule is changed.
Changes MUST be stated in the commit body: Update steering: <file>.
If uncertain, the Agent should:
- Add an
AICODE-QUESTION:inline comment. - Push the work behind a feature flag or in a draft PR.
Happy coding! Remember: think deep, code sharp.