cooking is only the in-progress workspace; delete it once completed.
Pre-checks
Follow the "Pre-checks" section of common.md .
Parameters
For identifiers and matching rules, see common.md。
- Matched identifier: archive that unit.
- Parameter is empty: if there are 0 cooking units, stop; if 1, use it; if multiple, ask.
- No match and parameter is non-empty: list the existing identifiers, stop.
Archive only when completed
Judge only from the output of node .agents/scripts/cooking.mjs status <feature> ; do not read goal.md, each Pn.md、reviews/. Both must be satisfied:
spec.md:有goal.mdis not未确认可归档:是(every Pn is implemented and has passed review)评审文件:一致(every reviewed Pn hasreviews/Pn.mdand its "conclusion" is consistent with the status)
Otherwise list what is missing, stop. If the user insists on archiving: if "archiveable: no", refuse; if only other items are missing, warn and then delete.
Workflow
- Determine
<feature>。 - Check whether existing persistent documents are misstated (see persistent-docs.md; code-related ones include
CODE-MAP.md, for contracts see code-map-update.md). The scope is limited to: this unit's uncommitted changes in the workspace (left by the wrap-updefer-commit) + documentation problems reported inreviews/and not fixed; for parts already reviewed and committed in each phase, trust review and do not re-check. If misstated, stop and list which ones:CODE-MAP.md/ skills etc. let the user fix with implement; the rest.agents/docslet the usersync-docs. If a new directory amounts to a new layering, have the user firstsync-docs. Do not modify documents here. - Delete the entire
.agents/cooking/<feature>/(including goal, spec, tasks, reviews).
End
Explain which cooking directory was deleted. Then execute git-commit auto to commit this unit's uncommitted code in the workspace (left by the defer-commit in the rush wrap-up phase); if there are no changes, state that there is nothing to commit. Choose the commit type according to the intent of the code, and mention ending cooking in the body <feature>. Do not push, and do not create any new files for archiving.