Skip to content

feat: gate planning agent — no activities/cards until project plan approved#6

Open
rwliebs wants to merge 3 commits intomainfrom
feature/planning-agent-gate-until-project-approved
Open

feat: gate planning agent — no activities/cards until project plan approved#6
rwliebs wants to merge 3 commits intomainfrom
feature/planning-agent-gate-until-project-approved

Conversation

@rwliebs
Copy link
Copy Markdown
Owner

@rwliebs rwliebs commented Mar 6, 2026

Summary

  • Prevents the planning LLM from generating createActivity, createCard, or upsertCardPlannedFile actions until the project plan is approved (finalized_at is set)
  • Applies the gate in three layers: non-streaming chat route, streaming chat route, and the LLM system prompt itself
  • Exposes finalized_at in the map snapshot and project schema so the gate check has data to work with
  • Adds test covering the populate-before-approval error path

Test plan

  • New test: populate returns error when project plan is not approved
  • Verify existing populate test still passes (sets finalized_at before populating)
  • Manual: attempt to populate a workflow before approving project — should get clarification message
  • Manual: approve project, then populate — should work as before

Made with Cursor

rwliebs added 3 commits March 6, 2026 14:55
…ean up ephemeral files

Delete all 9 strategy documents — built functionality captured as ADRs
(0010–0015), unbuilt plans moved to docs/Feature Plans/. Delete 18
ephemeral files (work plans, fix plans, verification reports, superseded
and expired investigations). Update SYSTEM_ARCHITECTURE.md as master
doc, fix docs-index.yaml, README, and all source code @see references
to point to current domain docs instead of deleted files.

Made-with: Cursor
…rack active investigation

Add electron/*.js and electron/bin/ to .gitignore (compiled output from
tracked .ts sources). Delete counter-app-demo/ test artifact. Commit
active investigation report for build-card-stuck-building.

Made-with: Cursor
- Add project.finalized_at to schema and map snapshot so planning context
  includes approval state
- Planning prompt: require project.finalized_at set before generating
  createActivity, createCard, or upsertCardPlannedFile; otherwise respond
  with clarification to use Approve Project first
- Chat route: return 400 for mode=populate when project not finalized;
  return clarification for auto-populate intent when not finalized
- Chat route: server-side filter drops createActivity/createCard/
  upsertCardPlannedFile when project not finalized (even if LLM returns them)
- Chat stream route: emit error and skip populate when project not finalized
- Tests: add populate-rejects-when-not-approved; update populate mock test
  to set finalized_at so flow still passes

Made-with: Cursor
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-ai-orchestration-interface Ready Ready Preview, Comment, Open in v0 Mar 6, 2026 11:10pm

Request Review

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.

1 participant