Multi-Workflow System — Product Requirements
Defines requirements for a demo web app unifying Estimates, Contracts, and a Copilot across both workflows.
What this file does
Defines requirements for a demo web app unifying Estimates, Contracts, and a Copilot across both workflows.
When to use it
- Planning a multi-workflow demo with AI-assisted document generation
- Need a structured PRD for an estimates-to-contracts pipeline
- Building a copilot that orchestrates cross-workflow actions
- Requiring dockerized setup under 10 minutes with seed data
Assumes this stack
Multi-Workflow System — Product Requirements
Overview
- Objective: Ship a demoable web app that unifies Estimates, Contracts, and a Copilot assisting both workflows within 10 minutes of local setup.
- Success Metrics
- Complete six-stage Estimates workflow with validations and history.
- Contracts workflow covering policy setup, agreement creation, review, versioning, and estimate validation.
- Copilot supports ≥6 contextual actions plus cross-workflow orchestration (e.g., draft MSA/SOW from estimate).
- Tests exist for ≥3 key server functions; project is fully dockerized and document-complete per RULES.md.
Functional Requirements
Dashboard
- Two cards (Estimates, Contracts) showing count + last updated timestamp.
- Each card links to its workflow list page.
Estimates Workflow
- Projects List
- Filters by stage; each project shows name, current stage pill, last updated, owner.
- Project Detail
- Stage stepper across six stages with completion state.
- Current stage panel honoring entry criteria, editable content, approval controls.
- Timeline showing transitions with timestamp, actor, notes.
- Stages & Gates
- Artifacts: create project, upload ≥2 artifacts before advancing.
- Business Case: LLM-generated summary editable via agent; require approval.
- Requirements: LLM-generated requirements; validation gate.
- Solution/Architecture: manual/LLM content, approval required.
- Effort Estimate: LLM WBS with tasks, roles, hours, assumptions; approvals logged.
- Quote: rate application, payment terms, timeline, CSV export or copy; mark delivered.
- Copilot Hooks
- Examples: increase backend hours 10%, add QA line item, fetch project total.
Contracts Workflow
- Policy Management
- CRUD for policy rules and example agreements (MSA, SOW, NDA, etc.).
- Agreements List
- Shows type, counterparty, current version number, linked estimate indicator.
- Agreement Detail
- Display active text, version selector/timeline, linked estimate info.
- Agreement Creation
- Choose type + counterparty; system feeds policy + exemplars to LLM; saved as v1.
- Review Client Draft
- Upload/paste draft; run policy-based review returning proposals with before/after text plus rationale.
- Accept/reject proposals; accepted ones apply to produce new version.
- Estimate Validation
- Link SOW to estimate; validate against WBS + quote to highlight discrepancies.
- Review Screen
- Side-by-side view; optional redline enhancement considered bonus.
- Copilot Hooks
- Examples: summarize pushbacks, add notes, apply payment-term proposals, create new versions.
Copilot (Global)
- Right-side panel aware of current entity (project/agreement).
- Executes stage-specific actions, updates UI state live.
- Cross-workflow actions (e.g., create MSA & SOW using estimate artifacts).
- Error handling surfaced inline with remediation hints.
Document & Ops Deliverables
README.md: run instructions (incl. Docker + ≤10 min local), seeding steps.AI_ARTIFACTS.md: prompt logs, refinements, tool usage, fixups, IDE note.APPROACH.md: AI tools used, prompt strategy, biggest pivot, future work.TESTING.md: how to run tests, detail ≥3 server test cases..env.example: placeholder keys (OpenAI, Anthropic, etc.).- Loom demo ≤15 min covering workflows + complex AI prompt.
Non-Functional Requirements
- Persistence via Supabase (PostgreSQL + storage) with seed data for demos.
- Dockerized services with ≤10 minute local setup.
- Automated tests covering ≥3 key server functions (proposal application, copilot action execution, estimate generation logic).
Key User Flows
%% High contrast styling
flowchart LR
classDef primary fill:#0B1F3A,color:#F5F5F5,stroke:#00D1FF,stroke-width:2px;
classDef accent fill:#14A38B,color:#0B1F3A,stroke:#F5F5F5,stroke-width:2px;
A[Create Project + Artifacts] --> B[Business Case (LLM + Approve)]
B --> C[Requirements (LLM + Validate)]
C --> D[Solution/Architecture]
D --> E[Effort Estimate (LLM WBS)]
E --> F[Quote & Export]
F -->|Link| G[Contracts Workflow]
G --> H[Policy Setup]
H --> I[Generate MSA/SOW]
I --> J[Review Client Draft]
J --> K[Apply Changes + Version Timeline]
K --> L[Validate vs Estimate]
class A,B,C,D,E,F,G,H,I,J,K,L primary
class G,H,I,J,K,L accent
Optional Bonuses
- Redline/diff preview (+5 points)
- DOCX/PDF export or signature mock (+5 points)
What's inside
7 functional sections, 2 workflow breakdowns, 1 flowchart, 4 non-functional requirements, 2 optional bonuses.
Change this for your project
- Replace
TheValverde/Multi-Workflow-Systemwith your own repository name - Replace
RULES.mdwith your own project rules file if different - Replace
.env.exampleplaceholder keys with your own API keys
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Copilot hooks listed per workflow for contextual actions
- Stage-stepper with entry criteria, approval, and timeline per stage
- Policy-based review returning before/after text with rationale
Related Documents
SourceAtlas PRD v2.9.6
Defines the product requirements, architecture, and command interface for an AI-powered codebase understanding assistant integrated into Claude Code.
AGENTS.md — ShakkaShell v2.0
Guides AI coding agents through building a CLI that translates natural language into offensive security commands, with a defined tech stack, structure, and implementation order.
Fleet Management System - Product Requirements Document (PRD)
Defines functional, non-functional, and technical requirements for a fleet management system with compressed GPS tracking and predictive maintenance.
TracePerf - Advanced Console Logging & Performance Tracking
Defines a Node.js logging library with execution flow tracing, performance bottleneck detection, and conditional log modes for dev/staging/prod.