Skip to content

S07 part 1: plan grounding check (observe-only, flag off) - #53

Merged
im-tyler merged 2 commits into
mainfrom
claude/w4-s07-grounded-planning
Oct 4, 2026
Merged

im-tyler merged 2 commits into
mainfrom
claude/w4-s07-grounded-planning

Conversation

@im-tyler

@im-tyler im-tyler commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Changes

  • src/plan-grounding.ts: pure extractor and judge plus a git-backed adapter. It checks whether the files, symbols, package.json scripts and make targets a plan names exist in the committed tree at a stated revision (git ls-tree, git show, git grep against the commit, so the working tree is never consulted).
  • Each reference is grounded, ungrounded, unchecked (could not look) or proposed (the plan says it creates it). unchecked is never counted as a pass.
  • A mismatch between the expected revision and the tree asserts nothing: every reference is unchecked.
  • Flag: SHIP_PLAN_GROUNDING=on|1|true (default off). Nothing is wired into any run, route or durable step, and storage is unchanged. No model is called.
  • src/plan-grounding.test.ts: 15 tests over real temp git repos read through a real LocalExecutor.

Checks

  • pnpm run lint is clean. Root suite is 1998 pass, 0 fail (1983 before plus 15 new), run via node --test --experimental-test-isolation=none "dist/**/*.test.js". After merging main I re-ran lint, build and the new test file only.
  • The grader-sensitivity script was skipped (fixed port 8901 clashes between parallel agents). CI runs it.
  • Negative controls, each mutated, shown failing, then restored:
    • search the working tree instead of the revision: 2 tests fail
    • report a truncated listing as ungrounded: 1 fails
    • ignore a revision mismatch: 1 fails
    • ignore the "creates" marker: 1 fails
    • list files from the working tree instead of the commit: 2 fail
    • report an unverified command as grounded: 1 fails
    • remove the symbol-grammar guard in the adapter: 0 failed at first, because the extractor grammar already blocks it. I added a direct adapter test, and it then fails (1).

Not verified / still open

  • "Grounded" means the name exists, not that the plan is correct. Symbols are matched by identifier text, not by semantics.
  • Commands other than root package scripts and root make targets are unchecked (nothing is run).
  • The advisory is not shown on the plan review view yet (see the S07 parts that remain, below).
  • The rest of S07 is not done:
    • the web advisory display
    • revision-provenance citations
    • inference-versus-reproduction labels
    • plan coverage of acceptance criteria
    • the coding-loop diagnostics
    • budgeted alternative candidates
    • answer-correctness and attribution grading

🤖 Generated with Claude Code

https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX


Generated by Claude Code

claude added 2 commits October 4, 2026 03:27
Pure module plus git-backed adapter that checks whether the files, symbols,
package scripts and make targets a plan names exist in the committed tree at a
stated revision. Three-valued (grounded / ungrounded / unchecked, plus proposed
for things the plan says it creates). Advisory only; gated by
SHIP_PLAN_GROUNDING (default off); not wired into any run or route.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqsBNqvaWezf1DwQrAnVgX
@im-tyler
im-tyler merged commit 3ef0228 into main Oct 4, 2026
4 checks passed
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.

2 participants