Backend Document Workflow
Purpose
- •Execute document-centered backend commands directly in Claude.
- •Cover
/design,/plan,/update-doc, and/reverse-engineerequivalent flows.
Modes
- •
design: Requirement -> Design Doc/ADR -> review -> consistency -> approval. - •
plan: Design Doc -> test planning -> Work Plan -> approval. - •
update: Target doc selection -> change clarification -> update -> review -> approval. - •
reverse: Codebase discovery -> PRD -> Design Docs -> verification/review loop.
Design Mode
- •Clarify problem, expected outcomes, constraints.
- •Determine scale and ADR requirement.
- •Produce Design Doc (and ADR when needed).
- •Run document quality review.
- •Run consistency review against related docs.
- •Stop for approval.
Plan Mode
- •Select approved Design Doc.
- •Define integration/E2E test strategy.
- •Produce Work Plan and atomic task strategy.
- •Stop for approval.
Update Mode
- •Identify target document and type (PRD/ADR/Design Doc).
- •Clarify requested changes and reason.
- •Apply update with minimal coherent edits.
- •Run review and consistency check (for Design Docs).
- •Stop for approval.
Reverse Mode
- •Confirm target path, depth, architecture style, review policy.
- •Discover PRD units from existing code.
- •Generate PRD per unit.
- •Verify PRD against code and revise up to two iterations.
- •Discover design components from approved PRD scope.
- •Generate Design Doc per component.
- •Verify and review with up to two revisions.
- •Summarize generated docs, discrepancies, and follow-up items.
Hard Rules
- •Do not skip review before approval.
- •Do not auto-approve docs with critical inconsistencies.
- •Limit revision loops to prevent unbounded churn, then escalate.