✨ feat(sarathi): slice-review reads a slice with fresh eyes before niyam propose

Merged
AT
1d ago
+186-4

Slice: #674

Before niyam propose, agents in veda now have each slice read by one read-only Explore subagent that never saw the conversation. packages/sarathi/skills/slice-review/SKILL.md (the plugin's sarathi:slice-review) holds the step and the reviewer's brief. The subagent gets the slice's title and body verbatim, the files it names, where the guard files are listed, and the contract of You will see:, Why: and Guards:. It never gets the author's reasons. The brief is adversarial: at most five findings, each quoting the words it attacks, or "Nothing found" and what it checked. The proposing agent answers each finding on the --page page. veda's CLAUDE.md gets a "Proposing a slice" section pointing to the skill. sarathi's README, plugin.json and the marketplace entry name it, and src/skills.test.ts checks it.

The design takes one idea from google/elephant-goldfish-model (a reviewer with zero conversational history) and one rule from addyosmani/agent-skills' doubt-driven-development (pass the artifact and its contract, never the claim). Both are cited in the skill at the commits read on 2026-11-27. A niyam pre-propose check would have to land in veda-hq/niyam, and a CLI could not tell that a review really ran, so the step is a skill.

Tried on this slice before it was proposed (2026-11-27):

What ranExplore, which the athya-rules agent router sent to a separate session: claude2, claude-sonnet-5-5
Time, cost25 s, $0.14
Findings5 (2 major, 3 minor)
Fixed4. The skill's claim that Explore loads no CLAUDE.md was wrong under the router (9a1f05d). The slice's Why:, You will see: and Cost: were also fixed.
Answered without a change1. packages/sarathi/README.md is not a guard file: niyam's Guard matches each entry against the whole path (scripts/guard.mjs at v0.7.22), so README.md means the root README only. The fact was added to the slice.

Findings and answers are on the proposal page, https://claude.ai/artifact/GJ4mCr8ccLYTp66jrBLxpS. Because the router runs the call as a separate session, CLAUDE.md, the memory index and the user's instructions reached the reviewer. The conversation did not. The skill now says so.

Not done here: EGM's Claude adapters get stricter isolation from an agent definition with omitClaudeMd: true and tools: [Read, Grep, Glob]. A sarathi:slice-reviewer agent built that way would keep CLAUDE.md out and the shell away, but veda sessions don't enable the plugin, so it would need a project agent too. That is left for a later slice.

No version bump. veda reads the skill from its own checkout, and a later sarathi release ships it to the plugin and the package.

🤖 Generated with Claude Code


Summary by cubic

Adds a fresh-eyes review step before niyam propose so agents don't propose slices whose gaps only the writing session can see.

The new sarathi:slice-review skill sends the slice's title, body, named files, and contract verbatim to one read-only Explore subagent that never saw the conversation. The reviewer reports at most five findings quoting the words it attacks, or "Nothing found" and what it checked. The proposing agent answers each finding on the proposal page before proposing. CLAUDE.md points veda's agents to the skill; plugin and marketplace descriptions and README.md name it; skills.test.ts checks its contract. The design cites google/elephant-goldfish-model and addyosmani/agent-skills' doubt-driven-development.