Skip to content

kiro-notion and kiro-local have no reviewer agent: task-reviewer refuses there; port kiro-gh's reviewer.json: ship both, self-destruct on every kiro reviewer, drift-check the reviewer contract - #321

Merged
martin-conur merged 1 commit into
mainfrom
task/kiro-reviewer-agents
Oct 25, 2026

Conversation

@martin-conur

Copy link
Copy Markdown
Owner

Summary

kiro-notion and kiro-local now ship a kiro reviewer agent, so task-reviewer works there instead of refusing. The kiro reviewer, kiro-gh's included, now cleans up after itself the way the claude one does. That shared reviewer prose is now drift-checked across all eight reviewer prompts, so the two assistants can't diverge on it again.

Closes #320

What changed

  • New agents. kiro-notion/agents/reviewer.json has the @notion tool and the same notion MCP server as its worker, and reads the spec page passed as the second arg. kiro-local/agents/reviewer.json reads the tasks/ file named by a slug or path from disk, with no tracker MCP. Neither auto-detects a spec from Closes #N, which only works on GitHub. Both are ported from kiro-gh's and keep its radio-polling block. Sonnet 5.5 still comes from task-reviewer's launch line.
  • Install. task-init already copies every agents/*.json and merges the radio hooks into it, so both new agents get installed with their register hook. task-config add assistant kiro on a notion or local repo brings them along. I only changed the help text.
  • kiro-gh behaviour change (flagged to PM over radio). The spec says to keep the contract "unchanged … then self-destruct", but kiro-gh's reviewer still said "Idle — the tab stays open … Do NOT auto-cleanup" (Port reviewer self-destruct + tight-PR norm to claude-gh / claude-jira / claude-local / .claude (post-#160) #162 left kiro out). All three kiro reviewers now post on stdin, radio the verdict, check radio send's outcome and run task-done --remove-worktree. They hold the tab open only when the verdict never reached PM, and they pick up the tight-PR norm.
  • No third copy. Steps 7–9 and the "Auto-destruct" job line are one region each, shared by the 4 claude commands/reviewer.md, the dogfood .claude/commands/reviewer.md and the 3 kiro reviewer.json files: the new reviewer-contract group. For that, tools/check-drift.sh now checks a *.json file on its decoded .prompt and accepts <!-- region:NAME --> sentinels, so the markers don't render as headings in a markdown prompt.
  • bin/task-reviewer. The refusal no longer lists loadouts. It still keys on the file, and now names the missing <impl>/agents/reviewer.json and the --agent claude workaround.
  • Docs. README reviewer section, the kiro-gh workflow doc (its tab no longer "stays open"), a new reviewer paragraph in the kiro-notion and kiro-local workflow docs (they had none), and a CHANGELOG entry with Upgrading: re-run task-init kiro-notion / task-init kiro-local (and kiro-gh). For claude the re-run is optional, since only invisible comments changed.

Tests

  • task_reviewer.bats: kiro-notion and kiro-local launch kiro-cli chat --agent reviewer --model claude-sonnet-5.5 with the spec passed through, Closes #N gives a diff-only review there, dispatch works from the steering doc alone, and the refusal fires on a tree copy with the agent removed. All with stubbed zellij and kiro-cli.
  • kiro_{notion,local}_task_init.bats: reviewer.json is installed as a copy of the source plus a radio register hook carrying the loadout. A shape check covers name, tools, allowedTools ⊆ tools, no shipped hooks, and the tracker MCP: notion's matches its worker, local has none.
  • dual_assistant.bats: add assistant kiro on claude-notion and claude-local brings a hooked reviewer.
  • drift_check.bats: JSON prompts, comment sentinels, a missing region in JSON, and the real reviewer-contract group going red when one kiro copy is altered.
  • The prompt sweeps (prose_body_file, worker_checklist, kiro_radio_pull) now cover all 8 reviewers (32 prompts, 12 JSON).
  • Mutation checks: removing either new reviewer.json turns its launch, dispatch, install and shape tests red. Disabling the checker's JSON extraction or its comment sentinels turns the new drift tests red.
  • Real kiro-cli (kiro-cli-chat agent upgrade --dry-run under a scratch HOME on a scratch task-init install, per PM's guardrail): both new reviewers parse exactly as the worker does (V2, 0 errors). Not covered: a live kiro reviewer session, a real Notion MCP fetch, or a real self-destruct from a kiro tab.

./run_tests.sh passes (1665 tests), tools/check-drift.sh checks 18 groups, and shellcheck -x is clean on the changed shell files.

🤖 Generated with Claude Code

…ses there; port kiro-gh's reviewer.json: ship both, self-destruct on every kiro reviewer, drift-check the reviewer contract

Add `kiro-notion/agents/reviewer.json` (the `@notion` tool and notion MCP,
spec page passed as the second arg) and `kiro-local/agents/reviewer.json`
(spec read from `tasks/` on disk). task-init installs them with radio hooks
merged, as it does every agent, so `task-config add assistant kiro` brings
them along.

kiro-gh's reviewer still idled with its tab open (#162 left kiro out). The
post-on-stdin / radio-verdict / self-destruct / hold-open-on-failed-delivery
prose is now one region shared by all eight reviewer prompts, the new
`reviewer-contract` group. `tools/check-drift.sh` learns to check a kiro
agent's decoded `prompt` and an HTML-comment sentinel form for markdown.

`task-reviewer`'s refusal drops its loadout list and names the missing
file instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@martin-conur

Copy link
Copy Markdown
Owner Author

Spec compliance

All deliverables from #320 are present:

  • kiro-notion/agents/reviewer.json (@notion tool, same notion MCP server as its worker, spec fetched from the Notion page, no Closes #N auto-detect) and kiro-local/agents/reviewer.json (spec read from tasks/, no MCP), both ported from kiro-gh's.
  • The shared prose sits behind sentinels with a reviewer-contract manifest entry in tools/check-drift.sh, so there is no third copy. The checker now decodes .prompt for *.json and accepts <!-- region --> sentinels.
  • bin/task-reviewer refusal text no longer lists loadouts and names the missing file plus the --agent claude workaround.
  • task-init already installs every agents/*.json, and the PR's tests assert the register hook is merged in. add assistant kiro is covered in dual_assistant.bats.
  • Docs and CHANGELOG are updated, with the "Upgrading: re-run task-init" note.
  • The PR body opens with ## Summary.
  • Scope note: the PR also changes kiro-gh's reviewer to self-destruct. This is flagged in the body and is consistent with the issue's "self-destruct on every reviewer", so I count it as in scope.

Code-review findings

No blockers.

  • CI ran for head e1f8047 and passed (a run exists for the SHA).
  • I ran tools/check-drift.sh (18 groups, OK) and the task_reviewer, drift_check, kiro_notion_task_init and kiro_local_task_init bats files locally. There were no failures.
  • The three kiro reviewer.json files agree on shape: allowedTools ⊆ tools, and the tool list matches the worker's per tracker.
  • The has_region here-string avoids the pipefail/SIGPIPE trap, and the comment says why.
  • Not covered, as the PR itself says: a live kiro reviewer session, a real Notion MCP fetch, and a real self-destruct from a kiro tab. The agent upgrade --dry-run parse check is a reasonable proxy.

Verdict

clean. PM decides the merge.

@martin-conur
martin-conur merged commit ad8824b into main Oct 25, 2026
8 checks passed
@martin-conur
martin-conur deleted the task/kiro-reviewer-agents branch October 25, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kiro-notion and kiro-local have no reviewer agent: task-reviewer refuses there; port kiro-gh's reviewer.json

1 participant