2.2 KiB
2.2 KiB
PRD Requirement Guide (MANDATORY)
This guide defines how requirements are captured before coding.
Hard Rules
- Before coding begins,
docs/PRD.mdordocs/PRD.jsonMUST exist. - The PRD is the authoritative requirements source for implementation and testing.
- The main agent MUST prepare or update the PRD using user input and available project context before implementation starts.
- The agent MUST NOT invent requirements silently.
- In steered autonomy mode, best-guess decisions are REQUIRED when needed; each guessed decision MUST be marked with
ASSUMPTION:and rationale.
PRD Format
Allowed canonical formats:
docs/PRD.mddocs/PRD.json
Either format is valid. Both may exist if one is a transformed representation of the other.
For markdown PRDs, start from ~/.config/mosaic/templates/docs/PRD.md.template.
Best-Guess Mode
Steered autonomy is the default operating mode.
- Agent SHOULD fill missing decisions in the PRD without waiting for routine confirmation.
- Agent MUST mark each guessed decision with
ASSUMPTION:and rationale. - If user explicitly requests strict-confirmation mode, the agent MUST ask before unresolved decisions are finalized.
- For high-impact security/compliance/release uncertainty, escalate only if the decision cannot be safely constrained with rollback-ready defaults.
Minimum PRD Content
Every PRD MUST include:
- Problem statement and objective
- In-scope and out-of-scope
- User/stakeholder requirements
- Functional requirements
- Non-functional requirements (security, performance, reliability, observability)
- Acceptance criteria
- Constraints and dependencies
- Risks and open questions
- Testing and verification expectations
- Delivery/milestone intent
Pre-Coding Gate
Coding MUST NOT begin until:
- PRD file exists (
docs/PRD.mdordocs/PRD.json) - PRD has required sections
- Unresolved decisions are captured as explicit
ASSUMPTION:entries with rationale and planned validation
Change Control
When requirements materially change:
- Update PRD first.
- Then update implementation plan/tasks.
- Then implement code changes.
Implementation that diverges from PRD without PRD updates is a blocker.