Repository navigation
feat: inspect role — reference study via a headless REA session (1.33.0) - #281
Merged
Merged
Conversation
…dless REA session (1.33.0) A new capability role `inspect` lets a plan study how an existing product behaves when a feature mirrors it and brings back behavior rows (behavior, tool + evidence id, unknown), never source to copy. Default path needs nothing installed or registered: scripts/reference-study.sh starts a headless `claude -p` whose only MCP server is the pinned REA (rea-agents@6.5.0; --mcp-config + --strict-mcp-config, compact profile), cwd = trail dir under acceptEdits with prompts denied, Read scoped to the trail dir and the licence page, no settings files, Bash denied; script-owned files in <trail>.run/; the reply validated against the seven-line report contract (row count vs rows.md, table-only rows, no logged fingerprint in the rows); process group killed on timeout; brief checksum + lock per slug; --out guards. Pipeline: orchestrate Phase 2 runs the study before Gate 1 (reference-study risk signal, floor R2); task-analyst gets the rows file as a pointer file; the Phase 4 reviewer greps the diff against the trail's fingerprints; wiki-plan A3 and templates/analysis.md carry the `### Reference study` block. Wiki: qa/exploratory/behavioral-spec-from-a-reference-product (what to record, what may enter the repo, licence table as an engineering checklist) and infrastructure/agent-orchestration/reference-study-in-a-plan (who runs the study, where artifacts live, risk/brief/review); supply-chain edge row for viral-repo impersonation. Verification: bats tests/ 1682/1682 ok; wiki-structure-checks findings 0; wiki-lint-prohibitions violations 0 (directives 85); real runs of the script from inside a Claude Code session (REA 207 tools connected, zero permission denials) plus a negative permission probe (Read/Write/Grep outside the trail dir denied). Two general + two adversarial review passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018FPHjM5Pd1ZPUd3SxSCf5x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new capability role,
inspect, lets a plan study how an existing product behaves (a reference study) when a feature mirrors it, and brings the result into the pipeline as behavior rows: what the original does, which tool and evidence id saw it, what stayed unknown. Source to copy is never the output.The default path needs nothing installed or registered.
scripts/reference-study.shstarts a headlessclaude -psession whose only MCP server is the pinned REA (rea-agents@6.5.0, Reverse Engineer Anything), with:--mcp-config+--strict-mcp-config, compact schema profile; REA lives and dies with the study's process group<checkout>/.claude/tmp/reference/<slug>/when.claude/tmpis git-ignored, else--out),--permission-mode acceptEdits,--permission-prompts none,--setting-sources "", Read allowed only for the trail dir and the licence page, Bash deniedrows.md, no fenced block, no logged## Fingerprintsentry inside the rows), the two path lines are the script's own, invalid replies exit 4<trail>.run/, planted memory files removed before each runPipeline hooks: orchestrate Phase 2 runs the study before Gate 1 (
reference-studyrisk signal, floor R2, licence outcome on the Gate 1 table); the task-analyst receives the rows file as a pointer file and never the tool; the Phase 4 reviewer greps the diff against the trail's fingerprints. wiki-plan A3 andtemplates/analysis.mdcarry the same### Reference studyblock. A self-registered inspection MCP keeps the fresh-contextgeneral-purposeAgent path.Wiki:
qa/exploratory/behavioral-spec-from-a-reference-product.md(what to record, what may enter the repo, licence table as an engineering checklist, not legal advice) andinfrastructure/agent-orchestration/reference-study-in-a-plan.md(who runs the study, where artifacts live, risk/brief/review). Supply-chain page: edge row for viral-repo impersonation.Why
Issue-shaped goals increasingly say "like product X does". Without a contract, the study either does not happen or its captures and pseudocode land in the planner's context and then in the repository. This makes the study a bounded, reviewable step with a clean-room wall that is stated as a convention enforced by the review grep, not as a guarantee.
Verification
PATH=/opt/homebrew/bin:$PATH bats tests/on the final tree: see the suite line in the last commit message / CInode scripts/wiki-structure-checks.js wiki→ findings 0;node scripts/wiki-lint-prohibitions.js→ violations 0 (directives 85)scripts/reference-study.shfrom inside a Claude Code session (2.1.300): REA connected (207 tools),list_browser_targetsanswered, zero permission denials; a negative probe with the same flags: Read/Write/Grep outside the trail dir denied and listed inpermission_denialshopperapp.comas a non-target host behind--install-hopper--outguards)Release
Version 1.33.0 in both manifests. After merge: confirm the tag, let
sync-dev-loop-pinmove the groundwork pin, then/plugin marketplace update groundworkand/plugin update dev-loop@groundwork.🤖 Generated with Claude Code
https://claude.ai/code/session_018FPHjM5Pd1ZPUd3SxSCf5x