feat: restructure workflow with unified questions and document-level approval#26
Merged
feat: restructure workflow with unified questions and document-level approval#26
Conversation
… documents Change the CLI workflow from interleaved question-then-document per agent to two distinct phases: collect all three agents' questions first, then generate all documents together. This aligns the CLI with the web UI's parallel generation model.
Rework the engineer questioning prompt to target business owners instead of developers, asking about performance, cost, scale, and reliability in plain language. Wire agents to use prior agents' Q&A context instead of generated documents. Update question depth labels to reflect new per-agent counts.
Add a reusable useNavigationGuard hook that blocks browser refresh, back/forward, and React Router navigation when a form has unsaved changes. Apply it to the question form and document review editor.
Add an ActiveGenerationsProvider context that polls for running AI generations and a fixed-position indicator pill that shows when any agent is working. Clicking the indicator navigates to the relevant project. Persists across route changes.
Cancel support: - Add process registry to headless-agent-service for tracking running CLI processes - Add cancel API endpoint that kills processes and clears generation state - Add cancel button in the UI working state with WebSocket event handling - Fix stale ai-working state that persisted across server restarts Per-agent streaming UI: - Split single streaming log into per-agent logs routed by WebSocket event phase - Each agent card shows file-level progress (2 files per agent with checkmarks) - Cards are expandable to show that agent's live streaming output - Smart trigger: only spawn agents for incomplete documents on re-entry - Add markDocPhaseGenerating to preserve already-complete agents on partial re-trigger
Add a Documents section to the sidebar during the review phase showing PRD, Design Brief, and Tech Spec with approval status indicators (checkmark, review badge, or empty circle). Fix the Edit with AI feature by adding a full-width inline mode to RefinePanel and auto-scrolling to it when activated.
Remove sessionId guard so Edit with AI is always available during review. Server now tries resume first, falls back to a fresh Claude session with document content when no session exists or resume fails. Also fixes clipboard headless fallback behavior.
The Edit with AI panel is now fixed-positioned on the right side so users can scroll through the document while composing their feedback. Also adds sidebar document navigation and initialTab support.
The Edit/Approve footer was centered across the full viewport, ignoring the sidebar offset. Now it starts at the sidebar edge and uses matching padding so buttons align with the document's right edge.
…eview Each document can now be approved independently via a new /api/specification/approve-document endpoint. The phase only advances when both docs in that phase are approved. The tab UI in DocumentReview is replaced with direct content rendering since the sidebar handles document switching.
ProjectDetail was using phase-level booleans (phases.pm.complete) to determine document status, while Specification used approvedDocuments and currentPhase. Now both views use the same approvedDocuments + currentPhase data source with identical backward-compat logic.
…hout selections Past-phase documents that weren't individually approved now show as reviewable instead of stuck as pending. Also restore the validation that prevents approving technology choices before all selections are made.
When approvedDocuments is non-empty, all docs have been generated (parallel generation). Non-approved docs are always reviewable regardless of what currentPhase says. Also fix approveDocument backend to scan phase pairs in order instead of relying on currentPhase, which can become stale after doc regeneration.
The reconciliation rule for acceptance criteria only checked for the 'acceptance_criteria' JSON key, but the file uses 'job_stories'. This caused a loop: reconciliation resets prd-generate to not-started, the API retroactive check sees files exist and re-completes it, triggering reconciliation again — causing UI flickering. Also simplify doc review status: when approvedDocuments has entries, all docs are generated (parallel gen), so non-approved docs are always reviewable. Backend approveDocument now scans phase pairs in order instead of relying on potentially stale currentPhase.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 23, 2026
## [3.5.0](v3.4.1...v3.5.0) (2026-02-23) ### Features * restructure workflow with unified questions and document-level approval ([#26](#26)) ([044e524](044e524))
|
🎉 This PR is included in version 3.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
Restructured the workflow to collect all questions upfront before document generation, improving the user experience for non-technical stakeholders. Added per-document approval system replacing the tab-based navigation, comprehensive generation indicators, and multiple UX/UI enhancements.
Key Changes
Files Modified
Major changes in specification workflows (
Specification.tsx,DocumentReview.tsx), status management (status-service.ts), and API routes (web-server.ts). New hooks for navigation guards and generation context management.