Repository navigation
Description
Paths updated after #56 merged (2026-10-06). Sources now live in
packages/;plugins/sage/is build output (never edit it;npm run checkfails on a hand edit). Hook:packages/sage-claude/hooks/sage-hook.mjs. State tool logic:packages/sage-core/state.mjs(the Claude wrapper ispackages/sage-claude/skills/sage/sage.mjs). Skills and agents:packages/sage-claude/skills/,packages/sage-claude/agents/. Line numbers in this issue are from before the move.
Task: T180 · small
Goal
In the sage state tool, a findings, qa-fail or checks-fail verdict recorded on a task in the state verified moves the task back to reviewing.
Why
Today the state tool accepts a findings verdict on a verified task and leaves it verified, so the board and the chief can treat a task with a new problem as ready.
Scope
packages/sage-core/state.mjs: theverdictcommand and the state moves (verifiedis near line 45 and lines 870 to 890). When a blocking verdict (findings,qa-fail,checks-fail) lands on averifiedtask, set the task toreviewingand add a line to the decision trail that says why. Do not change the merge check: it already refuses a SHA with a blocking verdict.packages/sage-claude/skills/sage/SKILL.mdand the design pagedocs/design/sage-mode.html: one sentence each where the states and verdicts are described.AGENTS.mdsays the state tool, the design page and the chief's instructions change together: checkpackages/sage-claude/agents/chief-of-staff.mdfor a sentence that needs the same change.- Tests in
scripts/sage.test.mjs.
Acceptance
- A
findingsverdict on a verified task prints the new statereviewing; a clean verdict on a verified task leaves it verified. - The new tests fail on
mainand pass on the branch. npm run build,npm run check,npm testpass.
How this hand-off works
- This issue is a task of sage, the agent kit in this repository. The sage keeps its own record of the task (its logbook) under the id in the title.
- Work on a new branch named
codex/<task id in lower case>-<short name>, for examplecodex/t199-brace-words. - Open a pull request whose title ends with the task id in parentheses, for example
(T199). Start its body withCloses #<this issue>andSage task <id>. - The sage then runs its reviews (code, security when the task has a risk flag, and QA) and merges when the review cycles are clean. Never merge, never push to main, never force-push.
- In the pull request body, give the evidence: the commands you ran and their last lines (the test counts), and say what you did not check.
Rules for every sage task
- Read
AGENTS.mdfirst. Edit only sources; never edit a generated file (a skill marked "Generated", orinstructions/core.md), and never editupstream/pstack/by hand. - Run
npm run build, thennpm run checkandnpm test. All must pass. The full test run can take over 5 minutes. - A rule that matters goes into code with a test. Show that each new test fails on
mainand passes on your branch: check outmainin a separate worktree (git worktree add --detach <tmp> origin/main), never withgit stash. - Never let any code you run read or signal the real process list. Put a fake
ps,pgrepandkillfirst onPATHfor every test run. - Never pass a test string to a real shell (bash, zsh, sh, eval,
child_processwithshell: true). Attack strings go to the hook's parser only. - A flaky test is a bug: fix it or remove it in the same task. Never re-run a test until it passes. No assertion on wall-clock or CPU time unless it has a wide margin and a reason in the test.
- The README graphics come from
scripts/graphics.mjs(npm run graphics); never edit an SVG indocs/assetsby hand. - Write text for people at about 80% of Simplified Technical English (
writing/ste-80.md), with the approved words ofwriting/dictionary.md. - Stop at a product question: write it in the pull request with your recommendation instead of guessing.
Activity