FE-809: Project-graph review-set proposal and atomic acceptance#175
Conversation
597841f to
221be7e
Compare
b1f964a to
2147778
Compare
PR SummaryLow Risk Overview The captured run documents a successful project-graph tracer: seed Reviewed by Cursor Bugbot for commit d0b6617. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR advances the D52-L topology shift by introducing explicit projections/ and renderers/ seams, migrating structured-exchange and transcript formatting to those seams, and hardening graph storage invariants by making the graph clock/change-log spec-scoped. It also updates the Vite web build to include Tailwind and refreshes the Pi harness extension layout and resource manifests.
Changes:
- Introduces
src/projections/(DTO projection) andsrc/renderers/(lossy text/markdown) and migrates prior*/projectand*/formatresponsibilities into them. - Makes
graph_clockandchange_logspec-scoped (spec_idkeyed) with a migration + snapshot/test updates to ensure LSN correctness per spec. - Refactors Pi structured-exchange tooling to use Zod-authored schemas + projector/renderers, adds
present_review_set/request_review, and updates the web shell (Tailwind + layout tweaks).
Reviewed changes
Copilot reviewed 214 out of 250 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Enable Tailwind Vite plugin |
| src/workspace/README.md | Add workspace topology README |
| src/workspace/package-identity.test.ts | Fix repo-root resolution |
| src/web/vite-env.d.ts | Add Vite client types |
| src/web/styles.css | Add Tailwind v4 theme/base |
| src/web/routes/spec.tsx | Tailwind layout/styling updates |
| src/web/queries/workspace.ts | Import projection snapshot type |
| src/web/queries/session.ts | Import projection runtime type |
| src/web/main.tsx | Load global styles |
| src/web/app.test.tsx | Update snapshot type import |
| src/structured-exchange/project/request-review.ts | Remove retired stub module |
| src/structured-exchange/project/request-choices.ts | Remove retired stub module |
| src/structured-exchange/project/request-choice.ts | Remove retired stub module |
| src/structured-exchange/project/request-answer.ts | Remove retired stub module |
| src/structured-exchange/project/present-review-set.ts | Remove retired stub module |
| src/structured-exchange/project/present-question.ts | Remove legacy projector (moved) |
| src/structured-exchange/project/present-options.ts | Remove retired stub module |
| src/structured-exchange/format/request-review.ts | Remove retired stub module |
| src/structured-exchange/format/request-choices.ts | Remove retired stub module |
| src/structured-exchange/format/request-choice.ts | Remove retired stub module |
| src/structured-exchange/format/request-answer.ts | Remove retired stub module |
| src/structured-exchange/format/present-review-set.ts | Remove retired stub module |
| src/structured-exchange/format/present-options.ts | Remove retired stub module |
| src/session/workspace-session-coordinator/boot-session-store.ts | Rename default spec option |
| src/session/structured-exchange.ts | Remove legacy details model |
| src/session/session-transcript.ts | Point at projections/renderers |
| src/session/session-transcript.test.ts | Update details shape assertions |
| src/session/runtime-state.test.ts | Import projected runtime state |
| src/session/README.md | Update ownership/topology notes |
| src/session/exchange-projection.ts | Use new exchange details schema |
| src/scripts/README.md | Add scripts topology README |
| src/rpc/README.md | Document review submission semantics |
| src/rpc/methods/workspace.ts | Use workspace snapshot projector |
| src/renderers/workspace/workspace-snapshot.ts | New workspace snapshot renderer |
| src/renderers/workspace/workspace-snapshot.test.ts | Move print snapshot tests |
| src/renderers/toon.ts | Update future-caller comment |
| src/renderers/structured-exchange/request-review.ts | New request_review renderer |
| src/renderers/structured-exchange/request-choices.ts | New request_choices renderer |
| src/renderers/structured-exchange/request-choice.ts | New request_choice renderer |
| src/renderers/structured-exchange/request-answer.ts | New request_answer renderer |
| src/renderers/structured-exchange/present-review-set.ts | New review-set renderer |
| src/renderers/structured-exchange/present-question.ts | Repoint to projections/renderers |
| src/renderers/structured-exchange/present-options.ts | New present_options renderer |
| src/renderers/structured-exchange/present-candidates.ts | Update projector path comment |
| src/renderers/structured-exchange/capture-review.ts | Update projector path comment |
| src/renderers/structured-exchange/capture-choices.ts | Update projector path comment |
| src/renderers/structured-exchange/capture-choice.ts | Update projector path comment |
| src/renderers/structured-exchange/capture-candidate.ts | Update projector path comment |
| src/renderers/structured-exchange/capture-answer.ts | Update projector path comment |
| src/renderers/session/transcript.ts | Repoint to projections |
| src/renderers/README.md | Add renderer topology README |
| src/renderers/markdown.ts | Update future-caller comment |
| src/renderers/graph/reconciliation-needs.ts | Update projector path comment |
| src/renderers/graph/overview.ts | Update projector path comment |
| src/renderers/graph/neighborhood.ts | Repoint imports to projections |
| src/renderers/graph/commit-result.ts | Update projector path comment |
| src/README.md | Update src/ topology contract |
| src/projections/workspace/workspace-snapshot.ts | Move renderer out to renderers/ |
| src/projections/topology-boundaries.test.ts | Add topology boundary tests |
| src/projections/structured-exchange/review-set-payload.ts | Translate review-set details |
| src/projections/structured-exchange/request-review.ts | New request_review projector |
| src/projections/structured-exchange/request-choices.ts | New request_choices projector |
| src/projections/structured-exchange/request-choice.ts | New request_choice projector |
| src/projections/structured-exchange/request-answer.ts | New request_answer projector |
| src/projections/structured-exchange/present-review-set.ts | New present_review_set projector |
| src/projections/structured-exchange/present-question.ts | New present_question projector |
| src/projections/structured-exchange/present-options.ts | New present_options projector |
| src/projections/structured-exchange/present-candidates.ts | Update future-caller comment |
| src/projections/structured-exchange/capture-review.ts | Update future-caller comment |
| src/projections/structured-exchange/capture-choices.ts | Update future-caller comment |
| src/projections/structured-exchange/capture-choice.ts | Update future-caller comment |
| src/projections/structured-exchange/capture-candidate.ts | Update future-caller comment |
| src/projections/structured-exchange/capture-answer.ts | Update future-caller comment |
| src/projections/session/transcript-context.ts | Update renderer path comment |
| src/projections/session/runtime-policy.ts | New runtime policy definitions |
| src/projections/README.md | Add projections topology README |
| src/projections/graph/reconciliation-needs.ts | Update renderer path comment |
| src/projections/graph/overview.ts | Update renderer path comment |
| src/projections/graph/neighborhood.ts | Update import paths to graph/ |
| src/projections/graph/commit-result.ts | Update renderer path comment |
| src/probes/structured-exchange-rpc-proof.ts | Update exchange type import |
| src/probes/structured-exchange-rpc-proof.test.ts | Update expected request details |
| src/probes/structured-exchange-ordering-proof.ts | Update exchange adapter import |
| src/probes/structured-exchange-ordering-proof.test.ts | Update expected details fields |
| src/probes/scripts/verify-startup-no-resume.sh | Update dist entry path |
| src/probes/public-rpc-parity-proof.ts | Update details field names |
| src/probes/propose-graph-commit-proof.ts | Update TUI entry imports |
| src/probes/fixture-curation-loop.ts | Update TUI entry imports |
| src/graph/snapshot.ts | Scope graph clock by spec |
| src/graph/snapshot.test.ts | Seed per-spec graph clock rows |
| src/graph/seed-fixtures.test.ts | Assert spec-scoped clock/log |
| src/graph/README.md | Document spec-local clock/audit |
| src/graph/index.ts | Export review-set translation APIs |
| src/graph/export-fixtures.test.ts | New fixture export tests |
| src/graph/command-executor/commit-graph-batch.test.ts | Spec-scoped clock assertions |
| src/db/schema.ts | Spec-scoped graph_clock/change_log |
| src/db/README.md | Update DB migration expectations |
| src/app/README.md | Add app topology README |
| src/app/brunch.ts | Move CLI entry to app/ |
| src/app/brunch.test.ts | Fix imports after app move |
| src/app/brunch.smoke.test.ts | Add pi-coding-agent smoke |
| src/app/brunch-tui.ts | Repoint to new .pi shells |
| src/.pi/skills/strategies/step-wise-disambiguate.md | Add strategy resource |
| src/.pi/skills/strategies/step-wise-decision-tree.md | Add strategy resource |
| src/.pi/skills/strategies/README.md | Add strategies README |
| src/.pi/skills/strategies/propose-graph.md | Add strategy resource |
| src/.pi/skills/strategies/project-graph.md | Add strategy resource |
| src/.pi/skills/README.md | Add skills topology README |
| src/.pi/skills/methods/run-structured-exchange.md | Add method resource |
| src/.pi/skills/methods/review-for-gaps.md | Add method resource |
| src/.pi/skills/methods/read-snapshot.md | Add method resource |
| src/.pi/skills/methods/infer-and-capture.md | Add method resource |
| src/.pi/skills/methods/generate-proposal.md | Add method resource |
| src/.pi/skills/methods/commit-graph.md | Add method resource |
| src/.pi/skills/lenses/README.md | Add lenses README |
| src/.pi/skills/lenses/oracle.md | Add lens resource |
| src/.pi/skills/lenses/intent.md | Add lens resource |
| src/.pi/skills/lenses/design.md | Add lens resource |
| src/.pi/skills/goals/grounding-advance.md | Add goal resource |
| src/.pi/skills/goals/elicit-expand.md | Add goal resource |
| src/.pi/skills/goals/commit-converge.md | Add goal resource |
| src/.pi/skills/goals/capture-posture.md | Add goal resource |
| src/.pi/settings.json | Update extension entrypoints |
| src/.pi/README.md | Rewrite .pi topology README |
| src/.pi/extensions/workspace/index.ts | Fix imports after moves |
| src/.pi/extensions/system-prompts/index.ts | Use runtime policy projection |
| src/.pi/extensions/structured-exchange/shared/recovery.ts | Remove legacy recovery code |
| src/.pi/extensions/structured-exchange/shared/model.ts | Remove legacy model types |
| src/.pi/extensions/structured-exchange/request-review.ts | Remove stubbed tool |
| src/.pi/extensions/structured-exchange/request-answer.ts | Remove legacy request tool |
| src/.pi/extensions/structured-exchange/present-review-set.ts | Remove stubbed tool |
| src/.pi/extensions/structured-exchange/present-options.ts | Remove legacy present tool |
| src/.pi/extensions/session/lifecycle.ts | New session boundary hook |
| src/.pi/extensions/runtime/index.ts | Runtime policy via projections |
| src/.pi/extensions/README.md | Add extensions topology README |
| src/.pi/extensions/mentions/index.ts | New mention autocomplete provider |
| src/.pi/extensions/graph/index.ts | Use projections/renderers |
| src/.pi/extensions/exchanges/shared/recovery.ts | New Zod-based recovery |
| src/.pi/extensions/exchanges/shared/markdown.ts | Shared markdown helpers |
| src/.pi/extensions/exchanges/schemas/README.md | Expand schema boundary docs |
| src/.pi/extensions/exchanges/schemas/index.ts | Export params schema module |
| src/.pi/extensions/exchanges/schemas/capture.ts | Centralize tool_meta atoms |
| src/.pi/extensions/exchanges/request-review.ts | Implement request_review tool |
| src/.pi/extensions/exchanges/request-choice.ts | Implement request_choice tool |
| src/.pi/extensions/exchanges/request-answer.ts | Implement request_answer tool |
| src/.pi/extensions/exchanges/present-review-set.ts | Implement present_review_set tool |
| src/.pi/extensions/exchanges/present-question.ts | Switch to Zod param schema |
| src/.pi/extensions/exchanges/present-options.ts | Implement present_options tool |
| src/.pi/extensions/exchanges/present-candidates.ts | Keep present_candidates stub |
| src/.pi/extensions/exchanges/pi-schema.ts | Zod→Pi schema adapter |
| src/.pi/extensions/exchanges/index.ts | Register exchange tools w/ deps |
| src/.pi/extensions/context/get-cwd.ts | Add concept note stub |
| src/.pi/extensions/compaction/index.ts | Add compaction anchor contract |
| src/.pi/extensions/commands/policy.ts | Block Pi branch/tree flows |
| src/.pi/extensions/commands/index.ts | Repoint workspace command import |
| src/.pi/extensions/auto-compaction-anchors.json | Remove JSON anchor contract |
| src/.pi/extensions/AUDIT.md | Add extension audit index |
| src/.pi/components/workspace-dialog/component.ts | Fix package.json URL path |
| src/.pi/components/alternatives.ts | Fix relative import |
| src/.pi/brunch-pi-settings.ts | Rename profile→settings types |
| src/.pi/agents/state.ts | Drive policy via runtime-policy |
| src/.pi/agents/state.test.ts | Assert tool policy gating |
| src/.pi/agents/README.md | Add agents topology README |
| src/.pi/agents/index.ts | Add agents barrel exports |
| src/.pi/agents/definitions/reviewer.md | Add reviewer definition stub |
| src/.pi/agents/definitions/elicitor.md | Add elicitor definition |
| src/.pi/agents/contexts/node.ts | Use projections/renderers |
| src/.pi/agents/contexts/node.test.ts | Fix import paths |
| src/.pi/agents/contexts/index.ts | Add contexts barrel export |
| src/.pi/agents/contexts/graph.ts | Clarify selected-spec LSN text |
| src/.pi/agents/contexts/graph.test.ts | Assert selected-spec LSN text |
| src/.pi/agents/contexts/cwd.ts | Add workspace context renderer |
| src/.pi/agents/contexts/cwd.test.ts | Add cwd context tests |
| src/.pi/agents/compose.ts | Use projected runtime state type |
| src/.pi/agents/compose.test.ts | Update resource location checks |
| src/.pi/agents/architecture.test.ts | Update resource paths |
| src/.pi/tests/workspace-dialog.test.ts | Update version assertions |
| src/.pi/tests/structured-exchange.test.ts | Update exchange module import |
| src/.pi/tests/structured-exchange-extension.test.ts | Update exchange module import |
| src/.pi/tests/structured-exchange-boundaries.test.ts | Add boundary enforcement tests |
| src/.pi/tests/prompting.test.ts | Update to new shell/registrars |
| src/.pi/tests/operational-mode.test.ts | Update tool policy output |
| src/.pi/tests/mention-autocomplete.test.ts | Update mention extension import |
| src/.pi/tests/graph-tools.test.ts | Seed spec via CommandExecutor |
| src/.pi/tests/extension-registry.test.ts | Update explicit extension registry |
| package.json | Move entrypoint; add Tailwind deps |
| memory/cards/poc-live-ship-gate--live-mention-autocomplete.md | Add live-mention slice card |
| drizzle/meta/_journal.json | Add migration journal entry |
| drizzle/0002_spec_scoped_graph_clock.sql | Migrate clock/log to spec scope |
| docs/design/GRAPH_MODEL.md | Update prompt resource links |
| docs/archive/PLAN_HISTORY.md | Archive topology sync summary |
| docs/architecture/pi-ui-extension-patterns.md | Update path references |
| bin/brunch-cli.js | Update dist entry import |
| .fixtures/README.md | Add review-cycle tracer entry |
Comments suppressed due to low confidence (1)
src/.pi/extensions/exchanges/index.ts:35
StructuredExchangeToolResultDetailsis currently re-exported asRequestChoiceDetails, which is too narrow (e.g. the RPC editor fallback can returnrequest_choicesdetails). This makes the exported type misleading for consumers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const base = { | ||
| schema: STRUCTURED_EXCHANGE_REQUEST_DETAILS_SCHEMA, | ||
| v: 1, | ||
| exchange_id: input.exchangeId, | ||
| tool_meta: { | ||
| prev: input.respondsToPresentTool, | ||
| curr: 'request_choice' as const, | ||
| }, | ||
| }; |
Signed-off-by: Lu Nelson <ln@hash.ai>
e422e5d to
d0b6617
Compare
Merge activity
|

Stack Context
This stack prepares the Brunch POC live-ship path: FE-807 makes structured-exchange answers graph-native for the selected spec, FE-809 layers user-reviewed
project-graphbatch commits, and FE-811 closes the live-ship gate/runbook blockers above it.What?
project-graphstrategy through dry-run-gatedpresent_review_set/request_reviewstructured exchange payloads.session.submitExchangeResponseinstead of a bypass path.CommandExecutor.acceptReviewSetas one explicit-basis graph batch, one LSN, and one change-log entry.{ specId, lsn }and includes the real probe fixture evidence.Why?
The POC needs a reviewable batch-commit story without inventing a standalone review-set entity or allowing partial/manual acceptance. This PR keeps D27-L structured-exchange ownership and D4-L/D20-L single mutation authority intact while making approval observable by web/TUI paths.
Verification
src/.pi/agents/state.test.tssrc/.pi/__tests__/prompting.test.tssrc/probes/project-graph-review-cycle-proof.test.ts.fixtures/runs/project-graph-review-cycle/2026-06-06-project-graph-review-cycle/