Two paths, do not mix them. Do not automatically enter this skill just because the user mentions "implement / develop". Do not modify the spec (the only exception: at the end of the phase path, entries may be appended to the spec's "affected files", see section 4 of "Implementation"), and do not split new phases. Do not modify ARCHITECTURE.md / DEV-STANDARDS.md / PROJECT.md / SMELLS.md, let the user run sync-docs。
Pre-checks
Follow the "Pre-checks" section of common.md . For when to modify CODE-MAP see code-map-update.md. For aligning with existing docs see persistent-docs.md。
Choose a path
For identifiers and match rules see common.md. In the arguments, P<n> refers to the phase id.
- Phase path: an identifier is matched; or the argument (after removing the identifier) is a standalone
P<n>。 - Direct-write path: the argument is non-empty, and is neither an identifier nor a standalone
P<n>. The whole thing is the implementation content. - Argument is empty: do not default to either path. Use
交互式提问to ask the user: which cooking phase to do (list existing identifiers as options), or direct-write (please provide the implementation content). When there are 0 cookings, only ask for the implementation content.
Do not write direct-write content into cooking, and do not treat the phase list as a direct-write task.
Coding rules (common to both paths)
- For code, read
DEV-STANDARDS.md、SMELLS.md; when a module needs to be located, search forCODE-MAP.mdrelated lines by module name/path, do not load the whole file. When the languages / frameworks / roles involved in the change have a correspondinglangs//frameworks//roles/type skill among the available skills, read itsSKILL.mdas needed and comply. For non-code, compare againstPROJECT.md, do not fabricate DEV-STANDARDS, do not open ARCHITECTURE / DEV-STANDARDS / CODE-MAP / SMELLS. - Small diff, only do what is required. Compare against
SMELLS.mdand clean up on the spot the bad smells introduced this time; do not expand into refactoring unrelated to this change. - If the change amounts to an architecture-level change (see the "Architecture-level change" section of code-map-update.md ): stop coding, do not just modify CODE-MAP. Tell the user to first run
sync-docsto updateARCHITECTURE.md。 - For code, if code-map-update.md is touched, the items to change: only change the relevant lines. Do not modify CODE-MAP for non-code. If this round gets skills, packages/modules
AGENTS.md、ACCEPTANCE.mdor other existing convention documents wrong: fix that one on the spot; if not wrong, leave it alone. Do not modifyARCHITECTURE.md、DEV-STANDARDS.md、PROJECT.md、SMELLS.md。 - When the repository's existing lint / typecheck / test commands (those specified in the "Code style" and "Testing" sections of
DEV-STANDARDS.md, package.json scripts, Makefile, etc.) cover the changed files: run them once before wrapping up; not passing does not count as done. The must-run items of.agents/docs/ACCEPTANCE.md(except those marked "skip") must likewise be run before wrapping up: the phase path runs only the items appended to thatPn.md"Completion criteria", and the direct-write path runs all of them. Do not install new tools or create new configs for this. - Prohibited:
git stash、git checkout --、git cleanand other operations that clear or roll back the workspace. Bypass non-this-round dirty files already present in the workspace, do not include them in the report or commit path, and list them in the report if necessary.
Phase path
Run node .agents/scripts/cooking.mjs status <feature>, only look at its output, do not read goal.md, do not read the body of each Pn.md to judge the state:
goal.md:未确认 → stop, currently exploring, do not write code based on old requirements.
tasks/:无 → stop, tell the user to first execute to-tasks. If the user actually wants direct writing, have them provide the implementation content and then follow the direct-write path.
"Prerequisites / Status" is only read and written via node .agents/scripts/cooking.mjs ; do not modify it by hand, and do not compute dependencies yourself. If the script does not exist: stop, and have the user run setup in update mode to recopy the script. If the script reports an error (illegal transition, prerequisites not met, cycle): stop, report it verbatim, and do not work around it.
Select phase
- The doable phases are based on the "doable" behavior output by
statusin the previous step (including the phase where it stopped at进行中during an interruption; continue from there). - The user specified Pn: if it is not in "doable", tell the user the prerequisites it is missing (see the "Prerequisites" column for that phase in the output) and stop. If only
P<n>is given without an identifier: check thestatusoverview without identifiers to see which units list that phase; if 0, stop; if 1, use it; if multiple, ask. - The user did not specify Pn: if only one is doable, do it; if multiple, use
交互式提问to let the user choose (only rush runs in parallel). If no phase is doable: stop and explain.
Implement
- Read the relevant acceptance criteria in that
Pn.md、spec.md. Rework ("Review" is "Not passed"): also readreviews/Pn.md's "Blockers", and fix only the blockers; the reported changed paths include only the changes from this rework, for review's incremental review. node .agents/scripts/cooking.mjs set <feature> <Pn> 实现 进行中。- Do the checklist items per the coding rules, and check off completed items.
- At the end, align with the spec's "Affected Files": when a file actually added / deleted / modified in this phase is not covered by any entry of the same category in the spec, append that path on the spot to the corresponding category in spec.md's "Affected Files", and rerun
node .agents/scripts/spec-files.mjs parse .agents/cooking/<feature>/spec.mduntil it passes; only touch the "Affected Files" section, not other sections of the spec. If the change falls into a new directory and constitutes an architectural-level change, do not backfill it; stop and report per coding rule 3. node .agents/scripts/cooking.mjs set <feature> <Pn> 实现 完成(the script also sets "Review" back to未开始)。
Direct-write path
Do not read spec/tasks, do not create or modify any cooking files, and do not check off tasks. Not blocked by a unit's goal.md being unconfirmed. Per the coding rules, do only this implementation content from the user.
End
The report must always include: which paths were changed; entries appended to the spec's "Affected Files" (backfilled for phase paths; write none if there are none); which lint / typecheck / test commands were run and their results (write "no runnable commands" if there are none); whether CODE-MAP and other existing docs were updated; whether sync-docs。
- Phase path: when dispatched by rush, only report; review is dispatched by rush. When the user calls it directly: read
review/SKILL.md, treat this conversation as the dispatcher, and dispatch a review subagent per the phase review template (with changed paths and prerequisite check categories); after it returns, handle the conclusion per the dispatcher steps; this conversation does not review, does not readreviews/body, does not modifyreviews/Pn.md, and does not touch the "Review" status. Do not commit before dispatching review. Until review passes, do not start subsequent phases that depend on this phase. - Direct-write path: after reporting, if the changes are ≤ 3 files and no dependencies were added, use
交互式提问to ask the user whether to do a git review or skip this time; if skipped, do not commit (the user decides whether to commit), and end there. Otherwise, or if the user chooses review: readreview/SKILL.md, treat this conversation as the dispatcher, and dispatch a review subagent per the git review template (do not use phase review, do not writereviews/); after it returns, handle the conclusion per the dispatcher steps. Do not commit before dispatching review; this conversation does not review.