feat(bmad-prd): overhaul facilitation, discipline, and validation (#2385)
* feat(bmad-prd): voice rules, probing reference, and operational hardening
- Session Posture section (voice prohibitions, record-as-you-go, anti-caving, register-matching)
- New references/probing.md: seven probing categories, six critical assumptions, PRD/solution-design boundary
- Intent detection signals (create/update/validate) on activation step 6
- Update intent: inline conflict-detection procedure against decision-log.md
- Activation step 1 falls back to customize.toml instead of halting on resolver failure
- Restructure Discovery into five sub-sections (Posture, Brain dump, Four-dimension read, Right-skill check, Working mode)
- Regroup PRD Discipline into three clusters (Artifact shape, Substance, Honesty about scope)
- Define phase-blockers in Finalize step 4
- Em-dash strip in prose; preserve [v2 — out of MVP] callout convention
- Move bmad-party-mode / bmad-advanced-elicitation mention into the greeting step
* feat(bmad-prd): funnel discipline, UJ depth, and UX reframing
Template discipline for downstream AI extraction:
- §3 Glossary: exact-use enforcement (FRs, UJs, SMs use Glossary terms verbatim)
- §4 Features: FRs now use "#### FR-N: Name" heading with Realizes UJ-X cross-reference, testable consequences, and optional per-FR Out of Scope
- §7 Success Metrics: SM-N / SM-CN numbering with Validates FR-X cross-reference
User journeys:
- §2.4 UJ format expanded from one-liner to named-persona mini-flow (persona, 3-5 steps, edge cases, optional capability surfacing); hobby can collapse to one-liners
- Strip "job of UX" / "not this PRD" gatekeeping from template; depth is the team's call
- Strengthen UX-as-input / UX-as-output patterns for bidirectional PRD <-> UX flow
- SKILL.md Discovery Posture: push for two to three named-persona UJs in non-trivial scope
Validation checklist:
- Q-3 Traceability tightened to require Realizes UJ-X on FRs and Validates FR-X on SMs
- Q-7 (new): FR testability — every FR has at least one testable consequence
- S-1 Glossary integrity: now covers FR descriptions, consequences, UJ flows, SM definitions
- S-2: SM added to ID continuity scope
- S-5 (new): UJ persona linkage — every UJ names a persona by exact §2 label
- STK-2 (new): UJ density gate — non-hobby scope needs at least two UJs
* docs(bmad-prd): anonymize validation-findings JSON example
Replace project-specific values (Plantsona prd_name, frozen timestamp, §16 location, premium-conversion finding) with generic placeholder content. Swap the example finding to demonstrate Q-7 FR testability so it doubles as a primer on the new checklist item.
* feat(bmad-prd): reviewer pass redesign and consolidate facilitation
- finalize_reviewers TOML field replaces inline review lenses; entries
follow the skill:/file:/plain-text prefix convention, resolved on-demand
so reviewer data has zero context cost on runs that skip the pass.
- Subagent contract: reviewers write to {doc_workspace}/review-{slug}.md
and return summary-only (verdict, top findings, file path); parent
never holds full review text.
- Section-by-section walk-through UX at Finalize and Validate; user
decides per finding whether to autofix, discuss, defer, or ignore.
- Finalize entry names the sequence in one sentence so users understand
the polish-last order.
- Template philosophy moved from prd-template.md to SKILL.md PRD
Discipline; template is now pure shape menu (preamble and Notes for
facilitator stripped).
- facilitation-guide.md content folded into SKILL.md Discovery posture
(story-shape UJ walk, four MVP types, state-inference-don't-quiz);
guide file deleted.
* feat(bmad-prd): tighten SKILL.md, extract Reviewer Gate and Validate playbook
- SKILL.md: trim activation/posture/discovery bloat; sharpen Right-skill
check; extract Reviewer Gate to its own section (dedup with Finalize
step 3 and Validate intent).
- references/validate.md: rename from validation-render.md and expand to
the full Validate intent playbook (orient, run gate, structural
validator pipeline, render, close).
- references/probing.md: drop stale facilitation-guide.md reference.
- assets/prd-template.md: redesign §2.4 User Journeys with named-scene
default shape, worked example, and scope dial.
* fix(bmad-prd): make Brain dump a hard first-move rule
Discovery was being skipped: the LLM treated the user's opening
message as the full picture and jumped to multiple-choice intake.
Strengthen the ordering so Brain dump always comes first for Create
and Update, before any questions or working-mode choices.
- Add explicit Discovery ordering at the section top.
- Rewrite Brain dump as a non-negotiable first move with an anti-
pattern callout naming the exact failure mode.
- Add timing prefix to Working mode reinforcing the order.
* refactor(bmad-prd): aggressive trim and quality fixes from analysis
SKILL.md cut 49% (143 -> 84 lines); references/validate.md 35%;
references/headless.md 22%. Package-wide ~21% reduction.
Customization sweep:
- {finalize_reviewers} -> {workflow.finalize_reviewers} (was a silent
override no-op)
- Add canonical ## Conventions block
- Rename decision-log.md -> .decision-log.md across SKILL, refs, schemas
- customize.toml: validation_checklist -> validation_checklist_template,
output_dir -> prd_output_path, output_folder_name -> run_folder_pattern;
lifecycle comments on external_sources / external_handoffs
New behavior:
- Activation step 4: explicit by-name greeting using {user_name},
{communication_language} persisted for every turn (not just greeting)
- Right-skill scan on first message before brain dump
- Neutral defaults when config.yaml is missing; never block on it
- Headless: Detection section + per-intent Inputs section + 'partial'
status semantics + Update conflict-override rationale
- Brownfield Update bootstraps .decision-log.md via subagent when absent
- Reviewer Gate findings-overwhelm fix: tiered surfacing
(verdict -> critical/high -> medium/low rolled into tail)
- Discovery edge cases: conditional MVP question, persona/UJ push
contextually triggered, working modes renamed as outcomes
(Fast path / Coaching path)
- Subagent discipline: Finalize step 2 return-format contract,
step 5 structure->prose ordering, explicit no-subagent fallback
Tests:
- scripts/tests/test_render_validation_html.py (17 passing, covers
grade thresholds, category mapping, stats, score-bar rendering)
* refactor(bmad-prd): replace mechanical checklist+renderer with quality rubric and LLM-synthesized report
The structural checklist + Python renderer produced mechanical pass/warn/fail
reports that didn't speak to actual PRD quality, and additional reviewers
(adversarial) wrote separate review-*.md files that never made it into the
HTML. Replaces that pipeline with:
- A judgment rubric across seven PRD-quality dimensions (decision-readiness,
substance over theater, strategic coherence, done-ness clarity, scope
honesty, downstream usability, shape fit) that adapts to stakes and PRD
shape. Rubric walker writes review-rubric.md with per-dimension verdicts.
- HTML skeleton with TEMPLATE_* placeholders the synthesis pass fills
directly — no substitution engine, no Python.
- Synthesis pipeline in references/validate.md: parent reads every
review-*.md, fills the skeleton, writes validation-report.html plus
markdown twin, opens via webbrowser. Folds every reviewer's findings
into one report; grade derives from rubric verdicts and severity counts.
- Drops scripts/render-validation-html.py and scripts/tests/ entirely.
- finalize_reviewers defaults to empty (adversarial removed from defaults —
too brutal and frequently wrong against PRDs; teams can append in
override TOML).
- Headless mode now writes both HTML and markdown; skips browser-open.
* refactor(bmad-prd): faster working-mode entry, elicitation discipline, drop probing.md
Discovery rewrite: Brain dump -> Stakes calibration -> Working mode -> mode-scoped
work. Users in a hurry reach the Fast/Coaching choice in two or three turns instead
of ten. Brain dump explicitly invites existing inputs (briefs, research,
transcripts, prior PRD draft, design docs) alongside verbal context.
Elicitation discipline made explicit: Discovery pulls the user's vision out, never
inserts the LLM's. UJs and phasing must be user-articulated, not strawman-proposed
for rubber-stamp.
Coaching path now offers entry-point choice: Vision+Features (capability-first),
Personas+Journeys (user-first), or let-me-suggest. Capability-thinkers walk
features directly.
Template framing in PRD Discipline: Essential Spine is the expected default,
Adapt-In Menu is conditional, and the LLM is authorized to invent sections when
concerns don't match any cluster. Concern scan beat in Discovery surfaces real
domain concerns without forcing a fixed shape.
Web grounding: light targeted use at load-bearing moments authorized; deep
research is suggested to the user via dedicated research skills, accepting
gracefully if declined.
references/probing.md deleted; its load-bearing content was either LLM-default
PM instincts or already covered by SKILL.md.
Misroute list now includes bmad-workflow-builder for agent/custom-agent signals.
* fix(bmad-prd): align opener with Fast path naming, normalize misroute list
* refactor(bmad-prd, bmad-product-brief): bring skills to parity, default-on web research
Cross-skill consistency fixes:
- Brief renames {workflow.output_dir} -> {workflow.brief_output_path} and
{workflow.output_folder_name} -> {workflow.run_folder_pattern} to match PRD's
naming pattern.
- Decision-log filename unified on .decision-log.md (dotfile convention) across
both skills.
- Brief picks up PRD's fallback on customization-resolve failure (read TOML
directly instead of halt).
- Brief picks up PRD's persistent_facts default that auto-loads
project-context.md.
- Brief greeting now enforces {communication_language} for the entire run, not
just the greeting.
PRD additions, propagated from brief:
- File-roles paragraph in Conventions (boundary rules for .decision-log.md vs
addendum.md; capture during conversation, not at finalize; audit/override
never goes in addendum).
- Greeting now tells the user they can invoke bmad-party-mode or
bmad-advanced-elicitation at any point.
- Create intent now writes prd.md with status: draft and creates the
.decision-log.md skeleton at workspace init.
- Resume-check on activation: scans prd_output_path for prior in-progress runs
(status not final) and offers to resume.
- Finalize Close sets status: final + updated date so resume-check can
distinguish finalized from in-progress.
- Stakes-calibrated length guidance in PRD Discipline.
Web research, default-on for any scope:
- Reframed external_sources lines in both skills to distinguish org-configured
registry (internal tools) from generic web research; both fire on the same
triggers.
- New Research subagents (default) beat in PRD Discovery: spawn web-research
subagents to ground the picture; AI especially where training data ages by
the week. Subagent searches; parent receives a digest. Deep work routes to
bmad-market-research / bmad-domain-research / bmad-technical-research.
- Brief Discovery picks up the same posture in lighter form.
* fix(bmad-prd, bmad-product-brief): drop phantom v2 callout, add Fast/Coaching to brief
- Drop `[v2 — out of MVP]` from PRD validation rubric Dimension 5. It was
flagged for absence but never instructed for use anywhere — the template uses
`[NOTE FOR PM]` for v2/v3 deferrals, which is the de-facto convention.
- Add Fast path / Coaching path working-mode choice to brief Discovery so the
"I'm pitching tomorrow" user has an express option. Note that the opener's
pressure-calibration philosophy primarily shapes Coaching path; Fast path
swaps pushback for [ASSUMPTION] tags the user can correct in review.
* refactor(bmad-prd): tighten Research subagents beat
This commit is contained in:
parent
0f852a38ac
commit
71136bc6af
|
|
@ -15,21 +15,21 @@ At the opening greeting, let the user know they can invoke `bmad-party-mode` for
|
|||
|
||||
## On Activation
|
||||
|
||||
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, surface the diagnostic and halt.
|
||||
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
|
||||
2. Execute each entry in `{workflow.activation_steps_prepend}` in order.
|
||||
3. Treat every entry in `{workflow.persistent_facts}` as foundational context for the rest of the run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
|
||||
4. Note `{workflow.external_sources}` as a registry of external systems available for consultation when the conversation surfaces a relevant need — knowledge bases, internal MCP tools, reference systems. Do not query preemptively; consult each only when its directive matches the moment. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant.
|
||||
4. `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers in `## Discovery`, org tools preferred when their directive matches. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant.
|
||||
5. Load `{project-root}/_bmad/bmm/config.yaml` (and `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`.
|
||||
6. Greet `{user_name}` in `{communication_language}`. Detect intent (create / update / validate). If interactive and intent is unclear, ask; for headless behavior see `## Headless Mode`.
|
||||
6. Greet `{user_name}` in `{communication_language}` — and stay in `{communication_language}` for every turn for the entire run, not just the greeting. Detect intent (create / update / validate). If interactive and intent is unclear, ask; for headless behavior see `## Headless Mode`.
|
||||
7. Execute each entry in `{workflow.activation_steps_append}` in order.
|
||||
|
||||
## Intent Operating Modes
|
||||
|
||||
**Create.** A brief the user is proud of, that meets their needs, drawn out through real conversation — do not assume: instead converse and understand, and then help craft the best product brief for their needs. Begin in `## Discovery` before drafting; the brief comes after the picture is on the table. Shape follows the product and need. Treat `{workflow.brief_template}` as a starting structure, not a contract: drop sections that do not earn their place, add sections the product needs, reorder freely - create sections for specialized domains or concerns also as needed. The brief serves the product's story, not the template's shape. Bind `{doc_workspace}` to a fresh folder at `{workflow.output_dir}/{workflow.output_folder_name}/` and write `brief.md` there with YAML frontmatter (title, status, created, updated). For Update and Validate, `{doc_workspace}` is the existing folder of the brief being targeted.
|
||||
**Create.** A brief the user is proud of, that meets their needs, drawn out through real conversation — do not assume: instead converse and understand, and then help craft the best product brief for their needs. Begin in `## Discovery` before drafting; the brief comes after the picture is on the table. Shape follows the product and need. Treat `{workflow.brief_template}` as a starting structure, not a contract: drop sections that do not earn their place, add sections the product needs, reorder freely - create sections for specialized domains or concerns also as needed. The brief serves the product's story, not the template's shape. Bind `{doc_workspace}` to a fresh folder at `{workflow.brief_output_path}/{workflow.run_folder_pattern}/` and write `brief.md` there with YAML frontmatter (title, status, created, updated). For Update and Validate, `{doc_workspace}` is the existing folder of the brief being targeted.
|
||||
|
||||
**Update.** Reconcile an existing brief with a change signal. Before proposing changes, read the brief, addendum, `decision-log.md`, and original inputs — and run the `## Discovery` posture against the change signal (a patch applied without context becomes drift). Surface conflicts with prior decisions before changing. Headless override: log the reversal to `decision-log.md`, then apply; halt `blocked` if intent is ambiguous. If the change is fundamental, offer Create instead of patching.
|
||||
**Update.** Reconcile an existing brief with a change signal. Before proposing changes, read the brief, addendum, `.decision-log.md`, and original inputs — and run the `## Discovery` posture against the change signal (a patch applied without context becomes drift). Surface conflicts with prior decisions before changing. Headless override: log the reversal to `.decision-log.md`, then apply; halt `blocked` if intent is ambiguous. If the change is fundamental, offer Create instead of patching.
|
||||
|
||||
**Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Always offer to roll findings into an Update, even in headless mode — include `"offer_to_update": true` in the JSON status block.
|
||||
**Validate.** Honest critique against the brief's own purpose. Read the brief, the addendum if present, `.decision-log.md`, and any original inputs first — a validation that ignores prior decisions, rejected ideas, or context the user supplied is shallow. Cite specific lines. Caveat what cannot be evaluated. Return inline — no separate file unless asked. Always offer to roll findings into an Update, even in headless mode — include `"offer_to_update": true` in the JSON status block.
|
||||
|
||||
## Headless Mode
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ When invoked headless, do not ask. Complete the intent using what is provided, w
|
|||
"intent": "create",
|
||||
"brief": "{doc_workspace}/brief.md",
|
||||
"addendum": "{doc_workspace}/addendum.md",
|
||||
"decision_log": "{doc_workspace}/decision-log.md",
|
||||
"decision_log": "{doc_workspace}/.decision-log.md",
|
||||
"open_questions": [],
|
||||
"external_handoffs": [
|
||||
{"directive": "Confluence upload", "tool": "corp:confluence_upload", "url": "https://confluence.corp/PROD/123", "status": "ok"}
|
||||
|
|
@ -61,20 +61,27 @@ Omit keys for artifacts that were not produced.
|
|||
|
||||
## Discovery
|
||||
|
||||
Conversationally surface what the user brings, why this brief exists, and the domain — echo back how each shapes your approach. Open with space for the full picture: invite a brain dump and ask up front for any source material they already have (memo, deck, transcript, prior brief, slack thread). Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot. Drill into specifics only after the broad shape is on the table; premature granular questions interrupt the dump and miss the room. Get a read on stakes early (passion project, internal pitch, investor input, public launch), and let that calibrate how hard you push. Suggest research (web, competitive, market) only when the stakes warrant it.
|
||||
Conversationally surface what the user brings, why this brief exists, and the domain — echo back how each shapes your approach. Open with space for the full picture: invite a brain dump and ask up front for any source material they already have (memo, deck, transcript, prior brief, slack thread). Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot. Drill into specifics only after the broad shape is on the table; premature granular questions interrupt the dump and miss the room. Get a read on stakes early (passion project, internal pitch, investor input, public launch), and let that calibrate how hard you push. During the dump, spawn web-research subagents to ground the picture — landscape, comparables, current state — AI especially, where training data ages by the week. Subagent searches; parent gets a digest. Deep work (full market sizing, exhaustive teardowns) → suggest `bmad-market-research` or `bmad-domain-research`.
|
||||
|
||||
Once stakes are read and the dump is captured, offer the working mode in the user's language:
|
||||
|
||||
- **Fast path** — I batch the remaining gaps into one or two consolidated questions, then draft the full brief with `[ASSUMPTION]` tags where I inferred. You review and we iterate. Best for "I'm pitching tomorrow."
|
||||
- **Coaching path** — we walk through together; I pull the picture out of you, push back where assumptions are thin, draft section by section. Best for "I want a brief I'm proud of and time isn't the constraint."
|
||||
|
||||
The workspace persists; stop and resume freely. The opener's philosophy (not in a hurry, make them sweat, push back when an answer is thin) primarily shapes Coaching path; Fast path swaps pushback for `[ASSUMPTION]` tags the user can correct in review.
|
||||
|
||||
## Constraints
|
||||
|
||||
- **Right-size to purpose.** A passion project does not need investor-grade rigor. A VC pitch input does. Read the room.
|
||||
- **Persistence is real-time.** Once Create intent is confirmed, the workspace (run folder, `brief.md` skeleton with `status: draft`, `decision-log.md`) exists on disk and the user knows the path.
|
||||
- **File roles.** `decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (PRD, architecture, solution design) or earned a place but does not fit the brief (rejected-alternative rationale, options-considered matrices, parked-roadmap context, technical constraints, in-depth personas, sizing data). Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum.
|
||||
- **Persistence is real-time.** Once Create intent is confirmed, the workspace (run folder, `brief.md` skeleton with `status: draft`, `.decision-log.md`) exists on disk and the user knows the path.
|
||||
- **File roles.** `.decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (PRD, architecture, solution design) or earned a place but does not fit the brief (rejected-alternative rationale, options-considered matrices, parked-roadmap context, technical constraints, in-depth personas, sizing data). Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum.
|
||||
- **Continuity across sessions.** If a prior in-progress draft for this project exists, the user is offered to resume.
|
||||
- **Extract, don't ingest.** Source artifacts (provided by the user or discovered during the run — transcripts, brainstorms, research reports, code, web results, prior briefs) enter the parent conversation as relevance-filtered extracts, not loaded wholesale. Subagents do the extraction against the user's stated focus; the parent context stays lean.
|
||||
- **Length and coherence.** Aim for 1-2 pages — if it is longer, the detail belongs in the addendum. Structure in service of the product; downstream consumers (PRD workflow, etc.) read this, so coherent shape matters.
|
||||
|
||||
## Finalize
|
||||
|
||||
1. Decision log audit + addendum review: the user ends this step with an explicit, shared accounting of how the meaningful contents of `decision-log.md` were handled — captured in the brief, captured in `addendum.md` (which may already hold detail captured during the conversation — see `## Constraints` for what belongs there), or set aside as process noise.
|
||||
1. Decision log audit + addendum review: the user ends this step with an explicit, shared accounting of how the meaningful contents of `.decision-log.md` were handled — captured in the brief, captured in `addendum.md` (which may already hold detail captured during the conversation — see `## Constraints` for what belongs there), or set aside as process noise.
|
||||
2. Polish: apply each entry in `{workflow.doc_standards}` (a `skill:`, `file:`, or plain-text directive) to `brief.md` (and `addendum.md` if it exists). Run passes as parallel subagents - apply all doc standards to `brief.md` first, then `addendum.md` so we present a high-quality draft for the user to review and finalize.
|
||||
3. External handoffs: execute each entry in `{workflow.external_handoffs}` to route artifacts beyond local files (Confluence, Notion, ticket systems, etc.) — each directive names the MCP tool and the fields it needs. Invoke the tool, capture any URLs or IDs returned, and surface them in the user message. If a named tool is unavailable, skip that handoff and flag it; local files always exist regardless.
|
||||
4. Tell the user it is ready: local paths and external destinations (URLs returned from handoffs). Invoke `bmad-help` to suggest what next steps make sense in the bmad method ecosystem.
|
||||
|
|
|
|||
|
|
@ -23,11 +23,15 @@ activation_steps_append = []
|
|||
# (standards, compliance constraints, stylistic guardrails).
|
||||
# Each entry is either a literal sentence, a skill prefixed with `skill:`, or a `file:`-prefixed path/glob
|
||||
# whose contents are loaded as facts.
|
||||
# Default is empty. Common opt-ins (set in your team/user override TOML):
|
||||
# "file:{project-root}/_bmad-output/planning-artifacts/project-context.md" # bmad-generate-project-context output
|
||||
# "skill:acme-co:terms-and-conditions" # a skill that contains some relevant info to the documents that may be generated
|
||||
# "Elvis has left the building" # generic agent instructions
|
||||
persistent_facts = []
|
||||
#
|
||||
# Default loads project-context.md if bmad-generate-project-context has produced one — this gives
|
||||
# the facilitator persistent awareness of the project's tech, domain, and constraints without
|
||||
# re-asking. Common opt-ins (set in team/user override TOML):
|
||||
# "skill:acme-co:terms-and-conditions" # a skill that contains some relevant info
|
||||
# "Elvis has left the building" # generic agent instruction
|
||||
persistent_facts = [
|
||||
"file:{project-root}/**/project-context.md",
|
||||
]
|
||||
|
||||
# Executed when the workflow completes (after the user has been told the
|
||||
# brief is ready). Accepts either a string scalar (single instruction)
|
||||
|
|
@ -39,9 +43,10 @@ on_complete = ""
|
|||
# to enforce a different structure (e.g. regulated-industry, investor-deck).
|
||||
brief_template = "assets/brief-template.md"
|
||||
|
||||
# Run folder location. The brief and optional addendum land inside `{output_dir}/{output_folder_name}/`.
|
||||
output_dir = "{planning_artifacts}/briefs"
|
||||
output_folder_name = "brief-{project_name}-{date}"
|
||||
# Run folder location. The brief and optional addendum land inside `{brief_output_path}/{run_folder_pattern}/`.
|
||||
# Resume-check scans `{brief_output_path}` for prior unfinished runs.
|
||||
brief_output_path = "{planning_artifacts}/briefs"
|
||||
run_folder_pattern = "brief-{project_name}-{date}"
|
||||
|
||||
# Document standards applied to human-consumed docs at finalize. Each entry is
|
||||
# a `skill:`, `file:`, or plain-text directive; the parent LLM applies the
|
||||
|
|
|
|||
|
|
@ -1,90 +1,87 @@
|
|||
---
|
||||
name: bmad-prd
|
||||
description: Create, update, validate, or analyze a PRD. Use when the user wants help producing, editing, validating, or analyzing a PRD.
|
||||
description: Create, update, or validate a PRD. Use when the user wants help producing, editing, or validating a PRD.
|
||||
---
|
||||
# BMad PRD
|
||||
|
||||
## Overview
|
||||
You are a master facilitator and coach helping the user create, edit, or validate a high quality PRD scoped to the level and rigor appropriate to their stated needs. Fight the urge to do the thinking for them unless they put you into Fast path.
|
||||
|
||||
You are an expert PM facilitator. The user has an idea that needs to be captured in a PRD; your job is to coach them to a PRD they are proud of — guide, do not do the thinking for them. Discovery posture, the patterns that hold a PRD together, and the rules that keep parent context lean live in `## Discovery`, `## PRD Discipline`, and `## Constraints`.
|
||||
## Conventions
|
||||
|
||||
At the opening greeting, let the user know they can invoke the skills `bmad-party-mode` for multi-agent perspectives or `bmad-advanced-elicitation` for deeper exploration at any point.
|
||||
- Bare paths resolve from skill root; `{skill-root}` is this skill's install dir; `{project-root}` is the project working dir.
|
||||
- `{workflow.<name>}` resolves to fields in `customize.toml`'s `[workflow]` table (overrides win per BMad merge rules).
|
||||
- `{doc_workspace}` is the bound run folder.
|
||||
- **File roles.** `.decision-log.md` is canonical memory and audit trail — every decision, change, and override (including headless overrides) is recorded there as the conversation unfolds. `addendum.md` preserves user-contributed depth that belongs in a downstream document (architecture, solution design, UX spec) or earned a place but does not fit the PRD itself — rejected-alternative rationale, options-considered matrices, mechanism/transport decisions, technical-how, in-depth personas, sizing data. Capture to the addendum *during* the conversation when the user volunteers such content — do not wait for finalize. Audit and override information never goes in the addendum.
|
||||
|
||||
## On Activation
|
||||
|
||||
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, surface the diagnostic and halt.
|
||||
2. Execute each entry in `{workflow.activation_steps_prepend}` in order.
|
||||
3. Treat every entry in `{workflow.persistent_facts}` as foundational context. Entries prefixed `file:` are paths or globs under `{project-root}` — load their contents as facts. All others are facts verbatim.
|
||||
4. Note `{workflow.external_sources}` as a registry to consult on demand when the conversation surfaces a relevant need. Do not query preemptively. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap.
|
||||
5. Load `{project-root}/_bmad/bmm/config.yaml` (and `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`.
|
||||
6. Detect mode and intent. If headless (no interactive user), read `references/headless.md` and follow it for the whole run with matched intent. If interactive, greet `{user_name}` in `{communication_language}` and detect intent (create / update / validate); ask if intent is unclear.
|
||||
7. Execute each entry in `{workflow.activation_steps_append}` in order.
|
||||
1. Resolve customization: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
|
||||
2. Run `{workflow.activation_steps_prepend}`. Treat `{workflow.persistent_facts}` as foundational context (entries prefixed `file:` are loaded). `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers, org tools preferred when their directive matches. Research itself fires during Discovery — see **Research subagents**.
|
||||
3. Load `{project-root}/_bmad/bmm/config.yaml` (+ `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. Missing keys → neutral defaults; never block.
|
||||
4. If headless, follow `references/headless.md` for the whole run. Otherwise greet the user **by name** using `{user_name}` and **in their language** using `{communication_language}` — and stay in `{communication_language}` for every turn for the entire run, not just the greeting. In the greeting, let the user know that at any point they can invoke `bmad-party-mode` for multi-agent perspectives or `bmad-advanced-elicitation` for deeper exploration on a specific section. Then scan for misroute on the first message: if the signal points elsewhere (game → BMad GDS; express build → `bmad-quick-dev`; one-pager → `bmad-product-brief`; vet product idea → `bmad-prfaq`; agent skill or custom agent → `bmad-workflow-builder`), suggest they might want the other options before continuing.
|
||||
5. Detect intent: **Create** (no PRD), **Update** (existing PRD), **Validate** (critique only). If ambiguous, ask. For Create intent, before binding a fresh workspace, scan `{workflow.prd_output_path}` for prior in-progress runs (folders matching `{workflow.run_folder_pattern}` whose `prd.md` frontmatter `status` is not `final`); if any exist, offer to resume rather than starting over.
|
||||
6. Run `{workflow.activation_steps_append}`.
|
||||
|
||||
## Intent Operating Modes
|
||||
## Intent Modes
|
||||
|
||||
**Create.** A PRD the user is proud of, drawn out through real conversation. Discovery first, drafting second. Bind `{doc_workspace}` to a fresh folder at `{workflow.output_dir}/{workflow.output_folder_name}/` and write `prd.md` there with YAML frontmatter (title, created, updated). Version and state transitions live in `decision-log.md`. For Update and Validate, `{doc_workspace}` is the existing folder of the PRD being targeted. When drafting is complete, proceed to `## Finalize`.
|
||||
**Create.** Bind `{doc_workspace}` to `{workflow.prd_output_path}/{workflow.run_folder_pattern}/`. Write `prd.md` with YAML frontmatter (title, status, created, updated — initial `status: draft`), and create the `.decision-log.md` skeleton at the workspace root so subsequent decisions land in a known file. Tell the user the path. Run `## Discovery`, then `## Finalize`.
|
||||
|
||||
**Update.** Reconcile an existing PRD with a change signal. Orient via source extractors (see `## Constraints` → Extract, don't ingest) against the PRD, addendum, `decision-log.md`, and original inputs — then run the `## Discovery` posture against the change signal. Surface conflicts with prior decisions before changing. If the change is fundamental, offer Create instead of patching. When changes are applied, proceed to `## Finalize`.
|
||||
**Update.** Reconcile the PRD with a change signal. Source-extract against PRD, addendum, `.decision-log.md`, and original inputs (extract, don't ingest). If `.decision-log.md` is missing, spawn a one-time bootstrap subagent to reverse-engineer a thin log from the PRD before continuing. Surface conflicts with prior decisions before applying. Then `## Finalize`.
|
||||
|
||||
**Validate** (or *analyze*). Critique an existing PRD against `{workflow.validation_checklist}`. Standalone — does NOT enter `## Finalize`. Orient via source extractors against `decision-log.md` and any original inputs to give the validator context. Spawn the validator subagent against `prd.md` (and `addendum.md` if present); produce findings and a validation report per `references/validation-render.md`. Always offer to roll findings into an Update.
|
||||
**Validate** (or *analyze*). Critique without changing. Load `references/validate.md`.
|
||||
|
||||
## Discovery
|
||||
|
||||
Open with space for the full picture: invite a brain dump, inputs, ideas, WHY they are doing this. Read what exists first; ask only what is missing. After the dump, a simple "anything else?" often surfaces what they almost forgot.
|
||||
Order: **Brain dump → Stakes calibration → Working mode → mode-scoped work.** Get to working mode fast — two or three turns, not ten. Users in a hurry must not be held hostage by upstream probing.
|
||||
|
||||
Before drafting, read the situation across four dimensions — they determine the PRD's shape:
|
||||
**Brain dump.** Always the first move, even when the user opens with paragraphs of context (that is intake, not the dump). Ask for verbal context *and* any existing inputs they want you to read — product brief, research, customer transcripts, competitive analysis, prior PRD draft, design docs. Paths or paste; big docs are fine, you will subagent-extract. A simple "anything else?" surfaces what they almost forgot.
|
||||
|
||||
- **Stakes.** Calibrates rigor, section depth, and which adapt-in clusters apply.
|
||||
- **Audience.** Drives tone, evidence requirements, and approval sections.
|
||||
- **Existing inputs.** Existing artifacts mean those parts of the PRD reference, not relitigate. When project-context, prior PRDs, or existing UX/architecture are present, this is brownfield — frame Discovery around what is new or changing.
|
||||
- **Downstream depth.** Whole spec for a small build, or top of a chain through UX → architecture → epics → stories? Affects how much the PRD encodes vs. defers.
|
||||
**Research subagents (default).** During Discovery, spawn web-research subagents to ground the picture: what exists in the space, how comparables position themselves, current landscape. Subagent does the search; parent receives a digest.
|
||||
|
||||
**Right-skill check.** Once the situation is read, sanity-check that PRD is the best tool. Three cases where it isn't:
|
||||
**Elicitation, not direction.** Discovery pulls the user's vision out; it does not insert yours. Open-ended "tell me about X" beats multiple choice. When you find yourself naming wedges, picking MVP cuts, or proposing phases, stop — you have crossed from elicitation into authoring. Hand the pen back. Infer-and-confirm ("I'm assuming X works like Y — right?") is fine; quizzing the user through a tree of LLM-shaped choices is not.
|
||||
|
||||
- **Games** → suggest `bmad-gds` for the Game Design Document.
|
||||
- **Small scope + wants a captured artifact** (small tweak to an existing codebase, single doc to point at) → stay here and produce an *all-inclusive document*: lean spine plus inline Stories via the adapt-in Stories cluster.
|
||||
- **Express implementation** (wants to build now, no planning chain or captured artifact needed) → suggest `bmad-quick-dev`.
|
||||
**Stakes calibration.** One short probe before working mode: hobby / internal / launch — enough to calibrate rigor and section depth. Audience, Existing inputs, and Downstream depth fill in inside the chosen mode, not upstream of the choice.
|
||||
|
||||
Surface these honestly and let the user choose; if they prefer this skill anyway, proceed with the right-sized version.
|
||||
**Working mode.** Offer the choice in the user's language:
|
||||
|
||||
Coach, do not quiz. Push hardest on PRD Discipline risks — unexamined assumptions, capability-vs-implementation confusion, term drift, scope creep, ambiguity for downstream readers. Suggest research if needed and have subagents use web search tools as needed.
|
||||
- **Fast path** — I batch remaining gaps into one or two consolidated questions, then draft the full PRD with `[ASSUMPTION]` tags where I inferred. You review and we iterate. The initial quality depends on how much you gave me upfront.
|
||||
- **Coaching path** — we walk PM-thinking sections together. Once chosen, I ask which entry point fits: **Vision + Features** (capability-first — for enterprise, dev products, internal tools, anyone who thinks in features), **Personas + Journeys** (user-first — for consumer, UX-heavy, multi-stakeholder products), or *let me suggest* based on what I heard. The chosen entry sets the section order.
|
||||
|
||||
**Working mode.** Once the situational read is complete, offer the user a choice before proceeding — one sentence per option:
|
||||
The workspace persists; stop and resume freely.
|
||||
|
||||
- **Express:** resolve any remaining critical gaps in a short batch, then draft the full PRD at once.
|
||||
- **Facilitative:** work through the sections that require PM thinking before drafting, using the techniques in `references/facilitation-guide.md`. Capture all decisions in the log, section to section. Draft after the key sections are walked. The goal is that the user has authored the thinking — not just answered intake questions.
|
||||
**Concern scan.** As you read what the user gave you, name the concerns this product actually carries — compliance, integration density, operational SLAs, hardware constraints, public-API contracts, monetization, data governance, whatever applies. The list is open; recognize what's there, do not classify into a fixed shape. These concerns drive which template sections to pull in from the Adapt-In Menu and which to invent when no cluster names them.
|
||||
|
||||
In both modes, resolve decisions conversationally rather than silently deferring them into `[ASSUMPTION]` tags. Only use `[ASSUMPTION]` when the answer requires research or external input the PM cannot provide in the moment.
|
||||
**User Journeys are captured, not authored.** When UJs are warranted (consumer / multi-stakeholder B2B / meaningful UX — drop or downscale for internal tooling with a single operator role, regulatory-only updates, hobby/solo, pure technical PRDs), prompt the user to narrate a real session — what the person does, in what order, where it lands — then structure the answer into UJ-N form and confirm.
|
||||
|
||||
## PRD Discipline
|
||||
|
||||
- **Features grouped, FRs nested.** Features open with behavioral description; FRs nested and numbered globally for stable IDs. Cross-cutting NFRs in their own section; skip traceability matrices.
|
||||
- **Capabilities, not implementation.** FRs describe what users or systems can do, not how. Tech choices go in addendum.
|
||||
- **No innovation theater.** Don't fabricate novelty; add a differentiation section only when Discovery surfaced something genuinely novel.
|
||||
- **Personas, when used, are research-grounded or marked `[ILLUSTRATIVE]`.** Invented detail is *persona theater* — false specificity the team builds for. Personas must drive decisions; two to four max.
|
||||
- **Domain awareness.** Regulatory or compliance constraints surface in the PRD, not deferred to architecture.
|
||||
- **Right-size to purpose.** Section depth and adapt-in clusters follow project type and stakes — the template's adapt-in menu names the standard clusters.
|
||||
- **Non-Goals explicit.** Pair with inline `[NON-GOAL for MVP]` and `[v2 — out of MVP]` callouts so omissions aren't silently assumed.
|
||||
- **Never silently de-scope.** Nothing the user explicitly included drops without asking. Propose phasing; never impose it.
|
||||
- **Counter-metrics named.** When Success Metrics is present, name what NOT to optimize.
|
||||
- **Assumptions visible.** Inferences without direct user confirmation are tagged `[ASSUMPTION: ...]` inline and indexed at the end.
|
||||
- **`[NOTE FOR PM]` callouts** at decision points the user deferred or left tension on.
|
||||
**Shape.** Features grouped; FRs nested with globally numbered stable IDs. Cross-cutting NFRs in their own section; skip traceability matrices. Capabilities, not implementation — tech choices live in `addendum.md`. Treat `{workflow.prd_template}` as expert prior knowledge, not a checklist. The **Essential Spine** is the expected default — present it unless the product genuinely doesn't need a section, and when you drop one, do so for a reason a reviewer would agree with. The **Adapt-In Menu** is conditional: pull in the clusters the product's concerns need to best define the requirements. When the product carries a concern the menu doesn't name, invent the section — name it well, decide what belongs in it, place it where it serves the reader or the PRD. Reorder and combine for readability. Never include a section because it appears; never skip a concern because no template section covered it. Counter-metrics named when Success Metrics exist.
|
||||
|
||||
## Constraints
|
||||
**Extract, don't ingest.** Source documents go to subagents for extraction; the parent assembles from extracts. Only load source documents into the parent context wholesale when no subagents are available.
|
||||
|
||||
- **Persistence is near real-time.** Create the workspace (`prd.md` skeleton, `decision-log.md`) on disk the moment Create intent is confirmed; tell the user the path.
|
||||
- **File roles.** `decision-log.md` — every decision, change, and version transition, in real time. `addendum.md` — depth that doesn't fit PRD shape: rejected alternatives, technical detail, ops/cost, competitive analysis. Capture technical-how detail to addendum immediately when the user volunteers it.
|
||||
- **Continuity across sessions.** If a prior draft exists in `{workflow.output_dir}`, offer to resume; surface open items first.
|
||||
- **Extract, don't ingest.** Never load source documents into the parent context wholesale. Delegate to subagents to extract what's relevant; the parent assembles from extracts.
|
||||
- **Downstream workflows run in fresh context.** This skill's output is `prd.md` (and optional `addendum.md`). Never invoke downstream workflows or produce separate handoff artifacts.
|
||||
**Length scales with stakes.** Hobby / solo PRDs aim for about two pages. Internal tools land around five to eight. Launch and chain-top PRDs run as long as their FRs and concerns require. Whatever the length, detail that doesn't earn its place in the PRD's main narrative belongs in `addendum.md` — moving overflow there is correct; padding the PRD to look thorough is not.
|
||||
|
||||
## Reviewer Gate
|
||||
|
||||
Used by the Validate intent and at Finalize step 3.
|
||||
|
||||
Assemble the menu: rubric walker against `{workflow.validation_checklist_template}` (the PRD quality rubric) + each entry in `{workflow.finalize_reviewers}` + any ad-hoc reviewers the artifact warrants. Stakes-calibrated — hobby/solo may run quietly or skip; higher stakes get the explicit all/subset/skip menu.
|
||||
|
||||
Dispatch entries as parallel subagents against `prd.md` (and `addendum.md` if present) using the standard prefix convention (`skill:` / `file:` / plain text). Each writes its full review to `{doc_workspace}/review-{slug}.md` and returns ONLY a compact summary (verdict, top 2-5 findings, file path) — the parent never holds full review text. The rubric walker uses the prompt and output format in `references/validate.md`. If subagents are unavailable, run sequentially: write the file *before* anything else, then flush the review from working context.
|
||||
|
||||
Surface findings tiered, never dumped. Lead with a one-sentence gate verdict, then walk critical + high findings; medium/low roll into a single tail ("plus N more in {file}"). Read the full `review-{slug}.md` only when the user drills into a specific finding. Per finding: autofix, discuss, defer to open items, or ignore.
|
||||
|
||||
Under Validate intent, the parent additionally runs the synthesis pipeline in `references/validate.md` — folding every selected reviewer's output into a single HTML + markdown report and opening the HTML.
|
||||
|
||||
## Finalize
|
||||
|
||||
1. Decision log audit: walk `decision-log.md` with the user — each entry captured in PRD, in addendum, or set aside.
|
||||
2. Input reconciliation: subagent per user-supplied input against `prd.md` + `addendum.md`; surface gaps, especially qualitative ideas (tone, voice, feel) the FR structure silently drops. Must happen before polish.
|
||||
3. Discipline pass: validator subagent against `prd.md` with `{workflow.validation_checklist}`. Findings stay in-conversation — autofix obvious issues, ask on ambiguous ones. No report file is written. Resolve before polish.
|
||||
4. Open-items review: triage all Open Questions, `[ASSUMPTION]` tags, and `[NOTE FOR PM]` callouts. Surface only phase-blockers one at a time; resolve before calling the PRD ready. Log deferred items to `decision-log.md`. If phase-blocking count is high, flag it.
|
||||
5. Polish: apply `{workflow.doc_standards}` to `prd.md` and `addendum.md` via parallel subagents.
|
||||
6. External handoffs: execute `{workflow.external_handoffs}` entries; surface returned URLs/IDs. Skip and flag unavailable tools.
|
||||
7. Record finalization to `decision-log.md`. Share all artifact paths. Invoke `bmad-help` to share possible steps.
|
||||
Tell the user the sequence in one sentence, then walk it. Polish goes last so it does not redo work after reviewer fixes.
|
||||
|
||||
1. **Decision log audit.** Walk `.decision-log.md` with the user; each entry captured in PRD, in addendum, or set aside.
|
||||
2. **Input reconciliation.** Subagent per user-supplied input against `prd.md` + `addendum.md`. Each writes its extract to `{doc_workspace}/reconcile-{slug}.md` and returns ONLY a compact summary (input name, gaps 2-5, file path). Surface gaps — especially qualitative ideas (tone, voice, feel) the FR structure silently drops. Must happen before polish.
|
||||
3. **Reviewer pass.** Run `## Reviewer Gate`. Resolve before polish.
|
||||
4. **Triage open items.** All Open Questions, `[ASSUMPTION]` tags, `[NOTE FOR PM]` callouts. Phase-blockers (would make the PRD unsafe for UX/architecture/epics) surfaced one at a time and resolved; non-blockers deferred with owner + revisit condition logged to `.decision-log.md`. If phase-blocker count is high, flag it.
|
||||
5. **Polish.** Apply `{workflow.doc_standards}` to `prd.md` and `addendum.md` in declared order (structural passes before prose — prose should not polish soon-to-be-cut text). Parallelize across documents, sequential within.
|
||||
6. **External handoffs.** Execute `{workflow.external_handoffs}`; surface returned URLs/IDs. Skip and flag unavailable tools.
|
||||
7. **Close.** Set `prd.md` frontmatter `status: final` and `updated` to `{date}` so future invocations distinguish this PRD from in-progress drafts. Record finalization to `.decision-log.md`. Share artifact paths. Common next: `bmad-create-ux-design`, `bmad-create-architecture`, `bmad-create-epics-and-stories`; invoke `bmad-help` for authoritative routing.
|
||||
8. Run `{workflow.on_complete}` if non-empty.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Every headless run ends with one of these payloads. Omit keys for artifacts not
|
|||
"intent": "create",
|
||||
"prd": "{doc_workspace}/prd.md",
|
||||
"addendum": "{doc_workspace}/addendum.md",
|
||||
"decision_log": "{doc_workspace}/decision-log.md",
|
||||
"decision_log": "{doc_workspace}/.decision-log.md",
|
||||
"open_questions": [],
|
||||
"assumptions": [],
|
||||
"external_handoffs": [
|
||||
|
|
@ -34,7 +34,7 @@ Every headless run ends with one of these payloads. Omit keys for artifacts not
|
|||
"status": "complete",
|
||||
"intent": "update",
|
||||
"prd": "{doc_workspace}/prd.md",
|
||||
"decision_log": "{doc_workspace}/decision-log.md",
|
||||
"decision_log": "{doc_workspace}/.decision-log.md",
|
||||
"changes_summary": "1-3 sentences describing what changed and why",
|
||||
"conflicts_with_prior_decisions": [],
|
||||
"open_questions": [],
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
# PRD Template — A Menu, Not a Skeleton
|
||||
|
||||
This is a menu of sections the facilitator picks from based on what the product, the stakes, the audience, and the existing inputs actually need. Hobby projects use the essential spine and stop. Enterprise initiatives, regulated submissions, and consumer launches add clusters from the adapt-in menu below. **Never include a section just because it appears here.** Drop, reorder, rename, combine — whatever the PRD needs.
|
||||
|
||||
---
|
||||
# PRD Template
|
||||
|
||||
## Essential Spine *(almost always present)*
|
||||
|
||||
|
|
@ -34,15 +30,30 @@ updated: {YYYY-MM-DD}
|
|||
[Who this is explicitly not for in v1.]
|
||||
|
||||
### 2.4 Key User Journeys
|
||||
*Named flows the product enables — one line each, numbered globally as UJ-1 through UJ-N for downstream traceability. Detailed flow design (steps, screens, edge flows) is the job of the UX workflow, not this PRD. Features in §4 may reference journeys by ID inline ("realizes UJ-3").*
|
||||
*Named-persona narratives the product enables. Numbered globally as UJ-1 through UJ-N. FRs reference journeys by ID inline ("realizes UJ-3"); SMs may also cross-reference. If a UX doc already exists, mirror its UJ IDs here and point to the source.*
|
||||
|
||||
- **UJ-1** — [Named flow, one line: who does what, to what end.]
|
||||
- **UJ-2** — ...
|
||||
**Default shape:** a named scene with entry state, path, climax, and resolution. Each beat forces specificity the team would otherwise leave implicit — auth assumptions, screen order, what tells the user value landed. Read together as a short narrative; the example below shows the form.
|
||||
|
||||
[For hobby/utility projects, 1-3 journeys may be enough. For complex multi-feature products (onboarding, checkout, multi-step approvals), expand. For libraries/CLIs with minimal flow, reduce to a single line or collapse into §2.2 JTBD.]
|
||||
- **UJ-1. {One-line title — persona doing the thing.}**
|
||||
- **Persona + context:** one line, grounded enough to explain the *why*.
|
||||
- **Entry state:** authenticated? which surface? coming from where?
|
||||
- **Path:** 3-5 concrete beats — taps, screens, decisions.
|
||||
- **Climax:** the moment value is delivered and how the user knows.
|
||||
- **Resolution:** state they're left in, what's next.
|
||||
- **Edge case** *(optional)*: one real failure mode and what the user does next.
|
||||
|
||||
*Written out, that becomes:*
|
||||
> **UJ-3. Priya checks the trip damage before she's even home.**
|
||||
> Priya, budgeting on a single income with a new baby, finishes a grocery run and gets in the car. Already authenticated via biometric on a previous session. She opens the app, taps the FAB camera, and scans the receipt. The app OCRs the total and shows a single-screen overlay: this trip $84.20, weekly cap $250, $172.10 remaining, three days left in the week. She closes the app and drives home. **Edge case:** if she scanned a receipt earlier today, the app asks whether this replaces or adds to that trip before counting it against the cap.
|
||||
|
||||
- **UJ-2. ...**
|
||||
|
||||
**Scope dial:**
|
||||
- **Lighter** — hobby/solo, library/CLI, or when the UJ is essentially a JTBD restated: a single sentence works (`{Persona}, {context}, {what they do and why}.`).
|
||||
- **Heavier** — auth, multi-device handoff, complex navigation, or anything feeding downstream UX/architecture: add a numbered Flow, an Edge cases list, and a capability → FR mapping (`The system must {capability}. → FR-N`).
|
||||
|
||||
## 3. Glossary
|
||||
*Downstream workflows and readers must use these terms exactly.*
|
||||
*Downstream workflows and readers must use these terms exactly. FRs, UJs, and SMs use Glossary terms verbatim; introducing a synonym anywhere in the PRD is a discipline violation. If §4 introduces a new domain noun, add it to the Glossary in the same pass.*
|
||||
|
||||
- **Term** — Definition. Relationships to other Glossary terms. Cardinality where relevant.
|
||||
- **Term** — ...
|
||||
|
|
@ -53,11 +64,22 @@ updated: {YYYY-MM-DD}
|
|||
*Each subsection is a coherent feature: behavioral description first, FRs nested under it, optional feature-specific NFRs and notes. FRs are numbered globally (FR-1 through FR-N) so downstream artifacts have stable references even if features get reorganized. Reference user journeys by ID inline ("realizes UJ-2") where the chain matters.*
|
||||
|
||||
### 4.1 {Feature Name}
|
||||
**Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.]
|
||||
**Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Realizes UJ-X, UJ-Y. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.]
|
||||
|
||||
**Functional Requirements:**
|
||||
- **FR-1** — [Actor] can [capability] [under conditions / with measurement].
|
||||
- **FR-2** — ...
|
||||
|
||||
#### FR-1: {Short capability name}
|
||||
|
||||
[Actor] can [capability] [under conditions]. Realizes UJ-X.
|
||||
|
||||
**Consequences (testable):**
|
||||
- {Specific testable condition, e.g. "System returns HTTP 429 when request rate exceeds 100/sec per merchant."}
|
||||
- {Another testable condition.}
|
||||
|
||||
**Out of Scope:** *(optional — what this FR explicitly does NOT cover)*
|
||||
- {bound}
|
||||
|
||||
#### FR-2: ...
|
||||
|
||||
**Feature-specific NFRs:** *(only if any apply uniquely to this feature)*
|
||||
- Performance / security / accessibility / etc. specific to this feature.
|
||||
|
|
@ -80,14 +102,16 @@ updated: {YYYY-MM-DD}
|
|||
|
||||
## 7. Success Metrics
|
||||
|
||||
*Each SM cross-references the FR(s) it validates. Counter-metrics counterbalance specific primary or secondary metrics.*
|
||||
|
||||
**Primary**
|
||||
- Metric — definition, target.
|
||||
- **SM-1**: Metric — definition, target. Validates FR-X, FR-Y.
|
||||
|
||||
**Secondary**
|
||||
- Metric — definition, target.
|
||||
- **SM-2**: Metric — definition, target. Validates FR-Z.
|
||||
|
||||
**Counter-metrics (do not optimize)**
|
||||
- Metric — why this should *not* be optimized.
|
||||
- **SM-C1**: Metric — why this should *not* be optimized. Counterbalances SM-1.
|
||||
|
||||
[Length scales with stakes. Hobby/utility PRD: a single sentence may be enough ("Success: I use this weekly and don't abandon it after a month"). Public launch / enterprise: full quantitative breakdown with measurement methods. Counter-metrics are as load-bearing as primary metrics — they prevent the architect from optimizing the wrong thing and the dev from gaming the wrong target.]
|
||||
|
||||
|
|
@ -142,17 +166,3 @@ updated: {YYYY-MM-DD}
|
|||
### Small-scope all-inclusive *(use when scope is 1-2 stories' worth and the user wants a single captured artifact — chosen during the Right-skill check in Discovery)*
|
||||
- **Stories** — story-level specs listed inline at the end of the doc. Each story: *"As a [persona], I can [action] [under conditions]. Acceptance: [testable criteria]."* Numbered Story-1, Story-2, ... for reference. Pair with very lean §1 Vision, §2 Target User (often just JTBD + one UJ), §3 Glossary (handful of terms), §4 Features (often a single feature), §6 MVP Scope (in/out very tight). The whole doc fits on a page or two and captures intent + implementable stories in one place. If the user doesn't want the captured artifact at all, `bmad-quick-dev` is the better path — this cluster is only for "I want a doc *and* the stories."
|
||||
|
||||
---
|
||||
|
||||
## Notes for the facilitator
|
||||
|
||||
- **The essential spine is the floor, not the ceiling.** A hobby PRD might keep all ten sections short. An enterprise PRD layers many clusters from the adapt-in menu.
|
||||
- **§3 Glossary before §4 Features.** Mechanics never introduce a new domain noun without adding it to the Glossary in the same pass. Persona, JTBD, and Journeys may use Glossary terms before §3 formally defines them — context is inferable; the Glossary is for downstream anchoring.
|
||||
- **§2.4 Key User Journeys are brief.** One line each. Numbered globally (UJ-1 through UJ-N) so architecture, epics, stories, and tickets can reference them by stable ID. Detailed flow design happens in the UX workflow — not here.
|
||||
- **§4 Features pattern at every scale.** Description → FRs nested → optional NFRs → optional notes. Hobby PRD: one short paragraph and three FRs per feature. Enterprise feature: multi-paragraph description, fifteen FRs, several feature-specific NFRs, open questions. Same shape, different depth.
|
||||
- **`[ASSUMPTION]`, `[NON-GOAL]`, `[v2 — out of MVP]`, `[NOTE FOR PM]` callouts are first-class.** They signal to downstream readers and the next session of work. Every `[ASSUMPTION]` lands in §9 Assumptions Index.
|
||||
- **When UX is *input* to the PRD** (journeys already designed elsewhere): §2.4 names the journeys by ID and points to the existing UX doc. Reference, do not duplicate.
|
||||
- **When UX is *output* of the PRD** (no UX work yet — downstream `bmad-create-ux-design` will produce it): §2.4 captures the PM's intent on which journeys exist; UX elaborates them into detailed flows downstream.
|
||||
- **§7 Success Metrics scales with stakes** but is always present. Counter-metrics matter as much as primary metrics — they shape what NOT to optimize.
|
||||
- **Small-scope all-inclusive option.** When scope is genuinely 1-2 stories and the user wants a single artifact instead of running a separate `bmad-create-story` workflow, add the adapt-in *Stories* cluster: lean §1-§6 plus inline §Stories at the end. The whole doc fits on a page or two. This is a valid PRD shape for tiny work — don't apologize for it.
|
||||
- **Adapt the section numbering.** The spine uses 0-9; adapt-in additions slot in wherever they read best (e.g., Aesthetic & Tone before §3 if branding is foundational, Compliance after §5 Non-Goals, Constraints & Guardrails between Features and Non-Goals, Stories at the very end after Assumptions Index).
|
||||
|
|
|
|||
|
|
@ -1,30 +1,135 @@
|
|||
# PRD Validation Checklist
|
||||
# PRD Quality Rubric
|
||||
|
||||
Loaded by the PRD validator subagent. For each item, return `{id, status: pass|fail|warn|n/a, severity: low|medium|high|critical, location, note}`. Skip items not applicable to the agreed stakes. Cite specific PRD locations — never abstract criticism.
|
||||
A judgment rubric for the validator subagent. Walk the PRD with these dimensions in mind and write substantive findings — not box-ticking. The goal is a review that tells the user whether this PRD is *good*, not whether it has the right section headers.
|
||||
|
||||
## Quality
|
||||
Most PRDs do not need every dimension scrutinized equally. Calibrate to the agreed stakes, the PRD's shape (consumer product, internal tool, regulatory update, technical capability spec), and what the PRD itself is trying to do. Be specific — cite locations, quote phrases, name what's missing. Abstract criticism is failure of nerve.
|
||||
|
||||
- **Q-1. Information density.** Sentences carry weight. Flag filler, hedging, and conversational padding.
|
||||
- **Q-2. Measurability.** Where measurement matters, FRs and Success Metrics are measurable; subjective adjectives flagged. Counter-metrics named when Success Metrics exist.
|
||||
- **Q-3. Traceability.** Where the chain matters, FRs name their link to a user journey or success criterion inline.
|
||||
- **Q-4. Vision and JTBDs concrete.** Vision is specific and stands alone — not a generic feature list. JTBDs are audience-grounded, not abstract.
|
||||
- **Q-5. Non-Goals explicit.** A Non-Goals section is present where it would do real work; inline `[NON-GOAL]` and `[v2]` callouts where omissions would otherwise be silently assumed.
|
||||
- **Q-6. Dual-audience and self-contained.** Each section makes sense pulled out alone (cross-references via Glossary terms, not "see above"); the PRD is readable by humans and structured cleanly for downstream source-extraction by UX, architecture, and story-creation workflows.
|
||||
## How to use this rubric
|
||||
|
||||
## Discipline
|
||||
1. Read the full PRD (and addendum.md if present) before writing anything.
|
||||
2. For each of the seven dimensions below, form a judgment — *strong / adequate / thin / broken* — backed by specifics from the PRD.
|
||||
3. Write findings only where they add information. A `strong` dimension may need no findings; a `broken` one needs concrete, fixable ones.
|
||||
4. Severity ranks impact on the PRD's usefulness, not how easy the fix is. A vague Vision statement is *critical* even though it's a one-paragraph fix; a glossary drift might be *low* even though it appears in many places.
|
||||
5. The overall verdict is your synthesis — 2–3 sentences that name what holds up and what's at risk. Earn it with the dimension judgments.
|
||||
|
||||
- **D-1. Capabilities, not implementation.** FRs describe what users/systems can do, not how. Flag technology names, library choices, architecture decisions.
|
||||
- **D-2. Input fidelity.** Requirements from input documents (brief, research, prior PRD) are still in scope or explicitly handled via Non-Goals or `[ASSUMPTION]`.
|
||||
- **D-3. Personas grounded.** If personas exist, they are research-grounded or marked `[ILLUSTRATIVE]`. Each persona drives at least one decision.
|
||||
- **D-4. No innovation theater.** Novelty claims are real, not invented.
|
||||
## Output format
|
||||
|
||||
## Structural integrity
|
||||
Write findings to `{doc_workspace}/review-rubric.md`:
|
||||
|
||||
- **S-1. Glossary integrity.** Every domain noun is defined in the Glossary and used identically throughout. Flag drift (case, plural, synonyms) and candidate missing-term entries.
|
||||
- **S-2. ID continuity.** FR / UJ / Story IDs are contiguous, unique, and cross-references resolve.
|
||||
- **S-3. Assumptions Index.** Every inline `[ASSUMPTION: ...]` appears in the Assumptions Index and vice versa.
|
||||
- **S-4. Open-items density.** Count Open Questions + `[ASSUMPTION]` + `[NOTE FOR PM]`. Red flag if density is high relative to the agreed stakes.
|
||||
```markdown
|
||||
# PRD Quality Review — {prd_name}
|
||||
|
||||
## Stakes-gated
|
||||
## Overall verdict
|
||||
[2–3 sentences. What holds up, what's at risk. Earned by the dimension judgments below.]
|
||||
|
||||
- **STK-1. Required sections.** The PRD includes the sections the agreed stakes and product type warrant.
|
||||
## Decision-readiness — [strong | adequate | thin | broken]
|
||||
[1–3 paragraphs of judgment with specific PRD locations.]
|
||||
|
||||
### Findings
|
||||
- **[critical|high|medium|low]** [Title] (§ location) — [Note]. *Fix:* [suggested fix].
|
||||
|
||||
## Substance over theater — [verdict]
|
||||
...
|
||||
|
||||
(repeat for each dimension)
|
||||
|
||||
## Mechanical notes
|
||||
[Glossary drift, ID continuity, broken cross-refs, Assumptions Index roundtrip. Lighter weight — these matter for downstream but don't drive the overall verdict.]
|
||||
```
|
||||
|
||||
## The seven dimensions
|
||||
|
||||
### 1. Decision-readiness
|
||||
|
||||
Can a decision-maker act on this PRD? Are the trade-offs surfaced honestly, or has the PRD smoothed everything to neutral? Would someone pushing back find their objection acknowledged or dodged?
|
||||
|
||||
Look for:
|
||||
- Decisions that are stated as decisions, not buried as "considerations."
|
||||
- Trade-offs named with what was given up, not just what was chosen.
|
||||
- Open Questions that are actually open — not rhetorical questions with an answer in the next sentence.
|
||||
- `[NOTE FOR PM]` callouts at real tensions, not at safe checkpoints.
|
||||
|
||||
Red flag: a PRD where every choice "balances" everything, every NFR is "important," every persona "values" the product.
|
||||
|
||||
### 2. Substance over theater
|
||||
|
||||
Is the content earned, or is it furniture? Distinguish:
|
||||
|
||||
- **Persona theater** — Personas that don't drive a single decision in the PRD. More than four personas. Personas whose only function is to make the PRD look thorough.
|
||||
- **Innovation theater** — claimed novelty that isn't novel. Differentiation sections written because the template had one, not because Discovery surfaced something.
|
||||
- **NFR theater** — copied boilerplate ("system must be scalable / secure / reliable") without product-specific thresholds.
|
||||
- **Vision theater** — a Vision statement that could swap into any PRD in this category without change.
|
||||
|
||||
Flag what reads like furniture, even if it's well-written furniture.
|
||||
|
||||
### 3. Strategic coherence
|
||||
|
||||
Does the PRD have a thesis? Do the features serve a unified arc, or is it a list of capabilities someone wanted?
|
||||
|
||||
Look for:
|
||||
- A stated thesis the PRD bets on (problem framing, user insight, market move).
|
||||
- Feature prioritization that follows from the thesis — not from "what's easy first."
|
||||
- Success Metrics that validate the thesis, not metrics that just measure activity (DAU/MAU when the thesis is about engagement quality is a tell).
|
||||
- Counter-metrics named when SMs exist.
|
||||
- Coherent MVP scope kind — problem-solving, experience, platform, or revenue — with scope logic that matches.
|
||||
|
||||
Red flag: a PRD that reads as a backlog with section headings.
|
||||
|
||||
### 4. Done-ness clarity
|
||||
|
||||
Would an engineer reading this PRD know what "done" looks like for each FR?
|
||||
|
||||
Look for:
|
||||
- FRs with at least one testable consequence per FR — verifiable condition, measurable outcome.
|
||||
- "System handles X gracefully," "reasonable performance," "user-friendly" — flag every one.
|
||||
- Acceptance criteria implied or explicit. Sometimes the FR's consequences carry this; sometimes the PRD genuinely needs an Acceptance section.
|
||||
- For non-functional sections (UX, performance, security): bounds, not adjectives.
|
||||
|
||||
This is the dimension downstream story creation will lean on hardest. Be unforgiving here.
|
||||
|
||||
### 5. Scope honesty
|
||||
|
||||
Are omissions explicit, or is the reader meant to infer them?
|
||||
|
||||
Look for:
|
||||
- A Non-Goals section where it would do real work — and `[NON-GOAL for MVP]` callouts where omissions could be silently assumed.
|
||||
- `[ASSUMPTION: …]` tags on inferences the user didn't directly confirm, indexed at the end.
|
||||
- `[NOTE FOR PM]` callouts at deferred decisions and unresolved tensions.
|
||||
- De-scoping proposed honestly, not done silently.
|
||||
|
||||
Open-items density: count Open Questions + `[ASSUMPTION]` + `[NOTE FOR PM]` callouts relative to stakes. High counts on a low-stakes PRD is fine; high counts on a green-light-to-build PRD is a blocker.
|
||||
|
||||
### 6. Downstream usability
|
||||
|
||||
If this PRD feeds UX, architecture, or story creation, can those workflows source-extract from it cleanly?
|
||||
|
||||
Look for:
|
||||
- Glossary present; every domain noun used identically across FRs, UJs, SM definitions.
|
||||
- FR / UJ / SM IDs contiguous, unique, and cross-references that resolve.
|
||||
- Each section makes sense pulled out alone — cross-references via Glossary terms, not "see above."
|
||||
- UJs each name a persona from §2 by exact label; no floating UJs.
|
||||
|
||||
For standalone PRDs (no downstream), this dimension matters less — say so.
|
||||
|
||||
### 7. Shape fit
|
||||
|
||||
Has the PRD been forced into a shape that doesn't match the product?
|
||||
|
||||
- Consumer product / multi-stakeholder B2B / meaningful UX → UJs and personas are load-bearing.
|
||||
- Internal tool, single-operator role → capability spec shape; UJs may be overhead; SMs may be operational rather than user-facing.
|
||||
- Regulatory or compliance update → constraint traceability is non-negotiable; UJs may be irrelevant.
|
||||
- Hobby / solo → rigor light, substance bar still applies.
|
||||
- Brownfield → existing-code references must be accurate; new UJs and existing UJs must be distinguished.
|
||||
- Chain-top (feeds UX → architecture → stories) → downstream usability matters more; standalone PRDs can be lighter on traceability.
|
||||
|
||||
Flag PRDs that are over-formalized (UJ density for a single-operator tool) or under-formalized (consumer product with no personas or UJs).
|
||||
|
||||
## Mechanical notes
|
||||
|
||||
Cover these as a tail section, not a primary dimension. They matter for downstream but don't drive the verdict on whether the PRD is good.
|
||||
|
||||
- Glossary drift (case, plural, synonyms across the PRD).
|
||||
- ID continuity (gaps, duplicates, unresolved cross-references).
|
||||
- Assumptions Index roundtrip (every inline `[ASSUMPTION]` indexed; index entries all appear inline).
|
||||
- UJ persona linkage (each UJ names a defined persona by exact label).
|
||||
- Required sections present for the agreed stakes and product type.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
PRD Validation Report — skeleton template.
|
||||
|
||||
This file is a starter the synthesis pass fills in directly. There is no
|
||||
substitution engine. The LLM:
|
||||
1. Reads {doc_workspace}/review-rubric.md and every review-{slug}.md from
|
||||
additional reviewers.
|
||||
2. Copies this skeleton.
|
||||
3. Replaces the placeholder content (everything between TEMPLATE markers)
|
||||
with the consolidated review, preserving the structure and CSS.
|
||||
4. Writes the result to {doc_workspace}/validation-report.html.
|
||||
5. Writes a markdown twin to {doc_workspace}/validation-report.md.
|
||||
|
||||
Visual rules the LLM must preserve:
|
||||
- The container width, the color tokens, the typography.
|
||||
- One dimension = one collapsible <section class="dimension">.
|
||||
- Verdict pill uses the verdict-* class matching its judgment.
|
||||
- Severity badge uses the sev-* class matching its level.
|
||||
- Each extra reviewer (adversarial, etc.) gets its own collapsible section
|
||||
below the rubric dimensions.
|
||||
- The footer always shows the artifact paths and timestamp.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PRD Validation: $prd_name</title>
|
||||
<title>PRD Validation: TEMPLATE_PRD_NAME</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #fafaf9;
|
||||
|
|
@ -10,14 +32,17 @@
|
|||
--border: #e7e5e4;
|
||||
--text: #1c1917;
|
||||
--muted: #78716c;
|
||||
--pass: #22c55e;
|
||||
--warn: #eab308;
|
||||
--fail: #ef4444;
|
||||
--na: #94a3b8;
|
||||
|
||||
--verdict-strong: #16a34a;
|
||||
--verdict-adequate: #65a30d;
|
||||
--verdict-thin: #d97706;
|
||||
--verdict-broken: #dc2626;
|
||||
|
||||
--sev-low: #64748b;
|
||||
--sev-medium: #ca8a04;
|
||||
--sev-high: #ea580c;
|
||||
--sev-critical: #dc2626;
|
||||
|
||||
--grade-exc: #16a34a;
|
||||
--grade-good: #65a30d;
|
||||
--grade-fair: #d97706;
|
||||
|
|
@ -29,14 +54,14 @@
|
|||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
line-height: 1.55;
|
||||
line-height: 1.6;
|
||||
font-size: 15px;
|
||||
}
|
||||
.container { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }
|
||||
|
||||
header.report-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
padding-bottom: 16px;
|
||||
|
|
@ -63,63 +88,90 @@
|
|||
border: 1px solid var(--border);
|
||||
border-left: 3px solid var(--muted);
|
||||
border-radius: 8px;
|
||||
padding: 16px 20px;
|
||||
padding: 18px 22px;
|
||||
margin-bottom: 24px;
|
||||
color: var(--text);
|
||||
font-size: 15px;
|
||||
font-size: 15.5px;
|
||||
}
|
||||
.synthesis:empty { display: none; }
|
||||
.synthesis p { margin: 0 0 10px; }
|
||||
.synthesis p:last-child { margin-bottom: 0; }
|
||||
|
||||
.scoreboard {
|
||||
.dimension-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 10px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.dim-card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 18px 20px;
|
||||
margin-bottom: 24px;
|
||||
padding: 12px 14px;
|
||||
}
|
||||
.score-bar { margin: 0 0 14px; line-height: 0; }
|
||||
.score-stats { display: flex; gap: 22px; font-size: 14px; flex-wrap: wrap; }
|
||||
.score-stats span { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.score-stats .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
|
||||
.dot-pass { background: var(--pass); }
|
||||
.dot-warn { background: var(--warn); }
|
||||
.dot-fail { background: var(--fail); }
|
||||
.dot-na { background: var(--na); }
|
||||
.total-count { margin-left: auto; color: var(--muted); }
|
||||
.dim-card .dim-name { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
|
||||
.dim-card .dim-verdict { font-size: 14px; font-weight: 600; }
|
||||
|
||||
section.category { margin-bottom: 16px; }
|
||||
section.category details {
|
||||
section.dimension, section.reviewer-section { margin-bottom: 14px; }
|
||||
section.dimension details, section.reviewer-section details {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
section.category summary {
|
||||
section summary {
|
||||
padding: 14px 20px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
section.category summary::-webkit-details-marker { display: none; }
|
||||
section.category summary::before {
|
||||
section summary::-webkit-details-marker { display: none; }
|
||||
section summary::before {
|
||||
content: "▸";
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
color: var(--muted);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
section.category details[open] summary::before { transform: rotate(90deg); }
|
||||
section.category summary h2 { display: inline; margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
|
||||
section.category .count { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 14px; }
|
||||
section details[open] summary::before { transform: rotate(90deg); }
|
||||
section summary h2 {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.005em;
|
||||
flex: 1;
|
||||
}
|
||||
.verdict-pill {
|
||||
font-size: 11px;
|
||||
padding: 3px 10px;
|
||||
border-radius: 999px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: white;
|
||||
}
|
||||
.verdict-strong { background: var(--verdict-strong); }
|
||||
.verdict-adequate { background: var(--verdict-adequate); }
|
||||
.verdict-thin { background: var(--verdict-thin); }
|
||||
.verdict-broken { background: var(--verdict-broken); }
|
||||
|
||||
article.finding { padding: 16px 20px; border-top: 1px solid var(--border); }
|
||||
article.finding-fail { background: rgba(239, 68, 68, 0.025); }
|
||||
.dim-body { padding: 4px 20px 18px; }
|
||||
.dim-judgment { color: var(--text); font-size: 14.5px; }
|
||||
.dim-judgment p { margin: 0 0 10px; }
|
||||
|
||||
.findings-list { padding: 0 20px 4px; }
|
||||
article.finding {
|
||||
padding: 14px 0;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
article.finding:first-child { border-top: none; }
|
||||
article.finding header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.badge {
|
||||
font-size: 10.5px;
|
||||
|
|
@ -130,18 +182,32 @@
|
|||
letter-spacing: 0.04em;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.badge-pass { background: rgba(34, 197, 94, 0.12); color: #15803d; }
|
||||
.badge-warn { background: rgba(234, 179, 8, 0.14); color: #854d0e; }
|
||||
.badge-fail { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
|
||||
.badge-na { background: rgba(148, 163, 184, 0.16); color: #475569; }
|
||||
.badge-sev-low { background: rgba(100, 116, 139, 0.12); color: var(--sev-low); }
|
||||
.badge-sev-medium { background: rgba(202, 138, 4, 0.14); color: var(--sev-medium); }
|
||||
.badge-sev-high { background: rgba(234, 88, 12, 0.14); color: var(--sev-high); }
|
||||
.badge-sev-critical { background: rgba(220, 38, 38, 0.14); color: var(--sev-critical); }
|
||||
.finding-id { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--muted); }
|
||||
.finding-title { margin: 0; font-size: 15px; font-weight: 500; flex: 1; min-width: 200px; }
|
||||
.finding-location, .finding-note, .finding-fix { margin-top: 6px; font-size: 14px; color: var(--text); }
|
||||
.finding-location strong, .finding-fix strong { color: var(--muted); font-weight: 500; }
|
||||
.finding-location { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--muted); }
|
||||
.finding-note, .finding-fix { margin-top: 6px; font-size: 14px; }
|
||||
.finding-fix strong { color: var(--muted); font-weight: 500; }
|
||||
|
||||
.reviewer-source {
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
font-family: ui-monospace, "SF Mono", Menlo, monospace;
|
||||
}
|
||||
|
||||
.mechanical {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 16px 20px;
|
||||
margin-top: 24px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.mechanical h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
|
||||
.mechanical ul { margin: 0; padding-left: 20px; }
|
||||
.mechanical li { margin-bottom: 4px; color: var(--text); }
|
||||
|
||||
footer.report-footer {
|
||||
margin-top: 40px;
|
||||
|
|
@ -156,33 +222,102 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
||||
<!-- TEMPLATE: header. Fill prd name, prd path, grade text & class. -->
|
||||
<header class="report-header">
|
||||
<div class="title">
|
||||
<h1>$prd_name — Validation Report</h1>
|
||||
<div class="subtitle">$prd_path</div>
|
||||
<h1>TEMPLATE_PRD_NAME — Validation Report</h1>
|
||||
<div class="subtitle">TEMPLATE_PRD_PATH</div>
|
||||
</div>
|
||||
<div class="grade $grade_class">$grade</div>
|
||||
<div class="grade TEMPLATE_GRADE_CLASS">TEMPLATE_GRADE</div>
|
||||
</header>
|
||||
|
||||
<div class="synthesis">$overall_synthesis</div>
|
||||
|
||||
<div class="scoreboard">
|
||||
<div class="score-bar">$score_svg</div>
|
||||
<div class="score-stats">
|
||||
<span><span class="dot dot-pass"></span>$passed pass</span>
|
||||
<span><span class="dot dot-warn"></span>$warned warn</span>
|
||||
<span><span class="dot dot-fail"></span>$failed fail</span>
|
||||
<span><span class="dot dot-na"></span>$na n/a</span>
|
||||
<span class="total-count">$total items checked</span>
|
||||
</div>
|
||||
<!-- TEMPLATE: overall synthesis paragraphs. Lift directly from
|
||||
review-rubric.md "Overall verdict" section; expand if extra reviewers
|
||||
materially shift the picture. Wrap each paragraph in <p>. -->
|
||||
<div class="synthesis">
|
||||
<p>TEMPLATE_SYNTHESIS_PARAGRAPH</p>
|
||||
</div>
|
||||
|
||||
$categories_html
|
||||
<!-- TEMPLATE: dimension summary cards. One per rubric dimension. The
|
||||
dim-verdict text uses one of: strong | adequate | thin | broken. -->
|
||||
<div class="dimension-summary">
|
||||
<div class="dim-card">
|
||||
<div class="dim-name">Decision-readiness</div>
|
||||
<div class="dim-verdict" style="color: var(--verdict-TEMPLATE_VERDICT)">TEMPLATE_VERDICT_TEXT</div>
|
||||
</div>
|
||||
<!-- repeat for each of the seven dimensions -->
|
||||
</div>
|
||||
|
||||
<!-- TEMPLATE: one section per rubric dimension. Skip a dimension entirely
|
||||
if the rubric review marked it n/a for this PRD (e.g. downstream
|
||||
usability for a standalone PRD). Open the section by default if
|
||||
verdict is thin or broken. -->
|
||||
<section class="dimension">
|
||||
<details open>
|
||||
<summary>
|
||||
<h2>Decision-readiness</h2>
|
||||
<span class="verdict-pill verdict-TEMPLATE_VERDICT">TEMPLATE_VERDICT_TEXT</span>
|
||||
</summary>
|
||||
<div class="dim-body">
|
||||
<div class="dim-judgment">
|
||||
<p>TEMPLATE_DIMENSION_JUDGMENT</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="findings-list">
|
||||
<!-- TEMPLATE: zero or more findings -->
|
||||
<article class="finding">
|
||||
<header>
|
||||
<span class="badge badge-sev-TEMPLATE_SEVERITY">TEMPLATE_SEVERITY</span>
|
||||
<h3 class="finding-title">TEMPLATE_FINDING_TITLE</h3>
|
||||
<span class="finding-location">TEMPLATE_LOCATION</span>
|
||||
</header>
|
||||
<div class="finding-note">TEMPLATE_FINDING_NOTE</div>
|
||||
<div class="finding-fix"><strong>Fix:</strong> TEMPLATE_SUGGESTED_FIX</div>
|
||||
</article>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<!-- TEMPLATE: one section per extra reviewer that ran (adversarial, etc.).
|
||||
Skip this block entirely if only the rubric walker ran. -->
|
||||
<section class="reviewer-section">
|
||||
<details>
|
||||
<summary>
|
||||
<h2>Adversarial review</h2>
|
||||
<span class="reviewer-source">TEMPLATE_REVIEWER_SOURCE_FILE</span>
|
||||
</summary>
|
||||
<div class="dim-body">
|
||||
<div class="dim-judgment">
|
||||
<p>TEMPLATE_REVIEWER_PREAMBLE</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="findings-list">
|
||||
<article class="finding">
|
||||
<header>
|
||||
<span class="badge badge-sev-TEMPLATE_SEVERITY">TEMPLATE_SEVERITY</span>
|
||||
<h3 class="finding-title">TEMPLATE_FINDING_TITLE</h3>
|
||||
<span class="finding-location">TEMPLATE_LOCATION</span>
|
||||
</header>
|
||||
<div class="finding-note">TEMPLATE_FINDING_NOTE</div>
|
||||
<div class="finding-fix"><strong>Fix:</strong> TEMPLATE_SUGGESTED_FIX</div>
|
||||
</article>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<!-- TEMPLATE: mechanical notes — short, bulleted. Skip if there are none. -->
|
||||
<div class="mechanical">
|
||||
<h3>Mechanical notes</h3>
|
||||
<ul>
|
||||
<li>TEMPLATE_MECHANICAL_NOTE</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<footer class="report-footer">
|
||||
<div class="meta">
|
||||
<span>Checklist: $checklist_path</span>
|
||||
<span>Generated: $timestamp</span>
|
||||
<span>Rubric: TEMPLATE_RUBRIC_PATH</span>
|
||||
<span>Generated: TEMPLATE_TIMESTAMP</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -43,23 +43,28 @@ on_complete = ""
|
|||
# to enforce a different structure (e.g. regulated-industry, internal-tool, investor-input).
|
||||
prd_template = "assets/prd-template.md"
|
||||
|
||||
# Validation checklist used at the Validate intent and at Finalize step 3.
|
||||
# A subagent walks the checklist against prd.md and returns structured findings.
|
||||
# Override the path in team/user TOML to enforce an org-specific checklist
|
||||
# (regulated-industry compliance, investor-pitch standards, etc.).
|
||||
validation_checklist = "assets/prd-validation-checklist.md"
|
||||
# PRD quality rubric used at the Validate intent and at Finalize step 3.
|
||||
# A subagent walks the rubric against prd.md and writes a substantive review
|
||||
# organized by quality dimensions (decision-readiness, substance, strategic
|
||||
# coherence, etc.). Override the path in team/user TOML to enforce an
|
||||
# org-specific rubric (regulated-industry compliance, investor-pitch standards,
|
||||
# etc.). The filename "checklist" is retained for back-compat with override
|
||||
# files; the content is a judgment rubric, not a boolean checklist.
|
||||
validation_checklist_template = "assets/prd-validation-checklist.md"
|
||||
|
||||
# HTML template used to render validation findings into a styled, scannable
|
||||
# report. The renderer (scripts/render-validation-html.py) substitutes
|
||||
# structured findings + summary stats into this template; the template is
|
||||
# fully overridable to match org branding. The default uses inline CSS, no
|
||||
# external dependencies, and native HTML <details> for collapse — no JS.
|
||||
# HTML skeleton the synthesis pass fills directly when consolidating reviewer
|
||||
# outputs into a validation report. No substitution engine — the parent LLM
|
||||
# reads every {doc_workspace}/review-*.md, fills the skeleton's TEMPLATE_*
|
||||
# placeholders, and writes the result. Fully overridable to match org branding.
|
||||
# Uses inline CSS, no external dependencies, and native HTML <details> for
|
||||
# collapse — no JS.
|
||||
validation_report_template = "assets/validation-report-template.html"
|
||||
|
||||
# Run folder location. The PRD, optional addendum, decision log, and optional
|
||||
# validation report all land inside `{output_dir}/{output_folder_name}/`.
|
||||
output_dir = "{planning_artifacts}/prds"
|
||||
output_folder_name = "prd-{project_name}-{date}"
|
||||
# validation report all land inside `{prd_output_path}/{run_folder_pattern}/`.
|
||||
# Resume-check scans `{prd_output_path}` for prior unfinished runs.
|
||||
prd_output_path = "{planning_artifacts}/prds"
|
||||
run_folder_pattern = "prd-{project_name}-{date}"
|
||||
|
||||
# Document standards applied to human-consumed docs at finalize. Each entry is
|
||||
# a `skill:`, `file:`, or plain-text directive; the parent LLM applies the
|
||||
|
|
@ -90,6 +95,11 @@ doc_standards = [
|
|||
# tool needs. If a named MCP tool is unavailable at runtime, the LLM falls
|
||||
# back to standard behavior and notes the gap. Empty by default.
|
||||
#
|
||||
# Lifecycle note: distinct from persistent_facts. persistent_facts are loaded
|
||||
# once at activation and kept in mind for the whole run; external_sources are
|
||||
# a registry consulted on demand and only when the conversation surfaces a
|
||||
# matching need.
|
||||
#
|
||||
# Examples (set in team/user override TOML):
|
||||
# "When researching internal product context, consult corp:kb_search (database='product-docs') before web search."
|
||||
# "For competitive landscape during Discovery, query corp:competitive_db with category={project_name}."
|
||||
|
|
@ -106,8 +116,32 @@ external_sources = []
|
|||
# status; local files always exist regardless. Fires automatically — users
|
||||
# can opt out in their prompt for a specific run. Empty by default.
|
||||
#
|
||||
# Lifecycle note: distinct from persistent_facts and external_sources.
|
||||
# Fired once at Finalize step 6, never during Discovery or drafting.
|
||||
#
|
||||
# Examples (set in team/user override TOML):
|
||||
# "After finalize, upload prd.md and addendum.md to Confluence via corp:confluence_upload (space_key='PROD', parent_page='PRDs', label='prd', author={user_name})."
|
||||
# "Mirror the PRD to Notion via notion:create_page (database_id='abc123', title='PRD: '+{project_name})."
|
||||
# "When the PRD references a parent initiative, link via corp:jira_link on the epic key in frontmatter."
|
||||
external_handoffs = []
|
||||
|
||||
# --- Finalize reviewers ---
|
||||
# Reviewers spawned at Finalize step 3 (and at the Validate intent) alongside
|
||||
# the structural checklist validator. The authoring skill assembles the gate
|
||||
# menu (validator + these reviewers + any ad-hoc reviewers it judges warranted
|
||||
# by the artifact content) and lets the user pick all, a subset, or skip. Gate
|
||||
# UX is stakes-calibrated: hobby/solo scope may run defaults quietly or skip;
|
||||
# higher stakes get the explicit menu.
|
||||
#
|
||||
# Entries follow the standard prefix convention (same as persistent_facts and
|
||||
# doc_standards):
|
||||
# "skill:NAME" invoke the named review skill as a subagent against prd.md
|
||||
# "file:PATH" load the file as a review prompt; spawn an adversarial
|
||||
# subagent applying that prompt to prd.md
|
||||
# plain text use the text directly as the subagent's review prompt
|
||||
#
|
||||
# Override TOML may append additional reviewers. Arrays append per BMad rules.
|
||||
#
|
||||
# Resolved on-demand by the authoring skill (not pulled at activation): only
|
||||
# when entering the Validate intent or assembling the gate at Finalize step 3.
|
||||
finalize_reviewers = []
|
||||
|
|
|
|||
|
|
@ -1,79 +0,0 @@
|
|||
# PRD Facilitation Guide
|
||||
|
||||
Per-section conversation techniques for facilitative mode. Each entry names the coaching move that makes the section's conversation productive — not a checklist, a posture. Skip sections the PM has already resolved; spend more time where thinking is thin.
|
||||
|
||||
---
|
||||
|
||||
## Users and Personas
|
||||
|
||||
**The move:** Ground personas in real people, not archetypes.
|
||||
|
||||
Ask the PM to describe a specific person they have observed or talked to — not a type, an actual human. "Who is the clerk at your store? Tell me about them." Invented detail (name, age, backstory from nowhere) is persona theater — the team builds for a fiction. If the PM says "someone like..." push gently: "Is there a real person you're thinking of?"
|
||||
|
||||
Once grounded: what does that person want to accomplish in the time they interact with this product? What would make them say this is easier than what they do today? What would make them abandon it?
|
||||
|
||||
For the remote user or secondary persona: same grounding, different question — what question do they need answered in under ten seconds, and what do they do if they can't get it?
|
||||
|
||||
Mark anything the PM could not ground in observation as `[ILLUSTRATIVE]` — and note it's a hypothesis to validate, not a spec to build for.
|
||||
|
||||
---
|
||||
|
||||
## Core User Journeys
|
||||
|
||||
**The move:** Story structure, not use-case list.
|
||||
|
||||
For each primary journey, walk through four beats:
|
||||
|
||||
- **Opening scene** — where do we meet this person, what is their situation right now, what pain or need is present?
|
||||
- **Rising action** — what steps do they take, what do they discover or decide along the way?
|
||||
- **Climax** — the moment the product delivers real value; the thing they could not do before
|
||||
- **Resolution** — what is their new reality; how is their situation different?
|
||||
|
||||
After each journey: what could go wrong at the climax? What is the recovery path? This is where edge cases that matter surface — not invented error states, but real failure modes for this person.
|
||||
|
||||
Explicitly name what capability each journey reveals. "This journey requires the operator to log an entry with no internet — which means we need a decision on whether that's in or out of MVP." Journeys produce capability requirements; make the link visible.
|
||||
|
||||
---
|
||||
|
||||
## Key Feature Decisions
|
||||
|
||||
**The move:** Surface the assumptions that would otherwise be silent.
|
||||
|
||||
Before the draft exists, there are decisions the agent would silently make and the PM would never know were made. These are the ones worth a thirty-second conversation:
|
||||
|
||||
- Decisions that drive the core UX model (e.g., one record per day vs. many; who can edit vs. view; what happens when the expected input doesn't exist)
|
||||
- Decisions where the "obvious" choice has real consequences the PM may not have considered
|
||||
- Decisions that, if wrong, require structural changes to fix later
|
||||
|
||||
For each: state what you inferred, name the alternative, ask which is right. Do not present options as a quiz — present your inference and invite correction. "I'm assuming one sales tally per day replaces rather than adds. Is that right, or should the operator be able to log multiple?" Resolve and move on. Only tag as `[ASSUMPTION]` when the answer requires external input or research the PM cannot provide now.
|
||||
|
||||
---
|
||||
|
||||
## Scope Boundary
|
||||
|
||||
**The move:** Establish MVP philosophy before listing features.
|
||||
|
||||
Before asking what is in or out, ask what kind of MVP this is:
|
||||
|
||||
- **Problem-solving MVP** — the minimum that proves the core problem is solved; rough edges acceptable
|
||||
- **Experience MVP** — the minimum that proves the interaction model works; quality matters
|
||||
- **Platform MVP** — the minimum infrastructure other things can build on; completeness of the base matters
|
||||
- **Revenue MVP** — the minimum someone will pay for; business viability is the test
|
||||
|
||||
The answer changes what "minimum" means. A problem-solving MVP for a personal-use tool has different scope logic than an experience MVP aimed at non-tech-savvy users who will bounce at the first confusion.
|
||||
|
||||
Once the philosophy is named, non-goals do as much work as in-scope items. Probe for the things the PM is tempted to add. "What keeps almost making it onto the list?" For each: is it truly out of MVP, or does it need to be in because the MVP fails without it?
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
**The move:** Push every adjective to a measurement.
|
||||
|
||||
"Users will love it" — what does that mean in behavior? "It'll be fast" — fast at what, for whom, measured how? "Good adoption" — what percentage, by when, doing what? Every quality claim needs a measurement or it is not a success criterion, it is a wish.
|
||||
|
||||
For each metric surfaced: connect it back to the product's differentiator. If the differentiator is simplicity for non-tech users, the primary metric should measure whether non-tech users successfully complete the core action without help — not session count or feature usage breadth.
|
||||
|
||||
Name counter-metrics explicitly — what this product should *not* optimize for. These prevent the wrong thing being built: more entries per day is not better if the goal is accurate daily records; longer dashboard sessions may indicate a broken IA, not high engagement. Counter-metrics are as load-bearing as primary metrics for downstream readers.
|
||||
|
||||
For low-stakes or personal-use products: one sentence is enough. "Success: I use this daily and it replaces the notebook within a month." Do not impose metric rigor where the stakes do not warrant it.
|
||||
|
|
@ -2,23 +2,38 @@
|
|||
|
||||
Load this file when bmad-prd is invoked headless (no interactive user). Follow it for the whole run.
|
||||
|
||||
## Detection
|
||||
|
||||
Headless mode is in effect when any of the following is true:
|
||||
|
||||
- the invoking caller sets a `headless: true` flag (or equivalent argument the harness exposes),
|
||||
- the invocation is from another skill or a non-interactive runner (no TTY, no user message stream),
|
||||
- `{workflow.activation_steps_prepend}` includes an entry that explicitly declares headless,
|
||||
- the first message comes from an automation context that pre-supplies all inputs and asks for an artifact path back.
|
||||
|
||||
When ambiguous, default to interactive.
|
||||
|
||||
## Inputs the caller is expected to provide
|
||||
|
||||
The caller passes inputs in their first message (free-form structured payload; no fixed schema, but every field below should be present when applicable):
|
||||
|
||||
- `intent` — `"create"`, `"update"`, or `"validate"`. If absent, infer from the artifact set.
|
||||
- For **Create**: a brief or product spec the LLM works from (plain text, file path, or URL), plus any persona/scope notes; `doc_workspace` if a specific run folder is required (otherwise the workflow binds the default).
|
||||
- For **Update**: the existing `prd.md` path (or a workspace path that contains one), and a change signal (the request: what to change and why).
|
||||
- For **Validate**: the existing `prd.md` path (or workspace path), and optionally a checklist override path. Workspace defaults to the PRD's containing directory.
|
||||
|
||||
Anything the caller does not provide is either inferred from inputs/workspace or recorded as `assumptions[]` / `open_questions[]` in the JSON status. Do not invent persona detail, success metrics, or scope decisions to fill gaps — record them.
|
||||
|
||||
## General
|
||||
|
||||
Do not ask. Complete the intent using what is provided, what exists in `{doc_workspace}`, or what you can discover yourself. If intent remains ambiguous after inference, halt with a `blocked` JSON status and a `reason` field — do not prompt. Do not greet.
|
||||
Do not ask. Complete the intent using what is provided, what exists in `{doc_workspace}`, or what you can discover yourself. If intent remains ambiguous after inference, halt with `status: "blocked"` and a `reason` field — do not prompt. Do not greet.
|
||||
|
||||
End with a JSON response listing status, intent, and artifact paths. The `intent` field must match the detected intent: `"create"`, `"update"`, or `"validate"`. Omit keys for artifacts not produced. Full schemas with examples for each intent are in `assets/headless-schemas.md`. Minimal shape:
|
||||
Populate `assumptions[]` with every value you inferred without direct caller confirmation; populate `open_questions[]` with every gap that needs a human decision. Use `status: "partial"` when the artifact was produced but `open_questions[]` is non-empty or critical inputs were inferred (Create with no brief; Update with a vague signal acted on best-effort; Validate that could not load the checklist). `complete` = stands on its own; `partial` = caller should review before downstream use; `blocked` = no artifact produced.
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "complete",
|
||||
"intent": "validate",
|
||||
"validation_report": "{doc_workspace}/validation-report.md",
|
||||
"offer_to_update": true
|
||||
}
|
||||
```
|
||||
End with the JSON response (full schemas with examples in `assets/headless-schemas.md`). The `intent` field must match the detected intent. Omit keys for artifacts not produced.
|
||||
|
||||
## Mode-specific overrides
|
||||
|
||||
**Update.** Log the reversal to `decision-log.md`, then apply. Halt `blocked` if intent is ambiguous.
|
||||
**Update.** Apply the change, log to `.decision-log.md` with rationale, and surface any conflict-with-prior-decision in `conflicts_with_prior_decisions[]` in the JSON status. Halt `blocked` if intent is ambiguous.
|
||||
|
||||
**Validate.** Always write `validation-report.md` to `{doc_workspace}` regardless of finding count. Always include `"offer_to_update": true` in the JSON status block.
|
||||
**Validate.** Always write both `validation-report.html` and `validation-report.md` to `{doc_workspace}` regardless of finding count. Always include `"offer_to_update": true` in the JSON status. Skip the browser-open step in `references/validate.md` — write the artifacts and return.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
# Validate
|
||||
|
||||
The Validate intent playbook. Standalone — this intent critiques an existing PRD without changing it and ends after the user has seen the report; it does not run Finalize. The synthesis pipeline below is also reused for mid-session report requests during Create/Update.
|
||||
|
||||
## Orient
|
||||
|
||||
Source-extract against `.decision-log.md`, any original inputs, and the PRD/addendum themselves. Delegate to subagents per PRD Discipline → "Extract, don't ingest" (in SKILL.md); the parent assembles from extracts.
|
||||
|
||||
## Run the Reviewer Gate
|
||||
|
||||
Run the Reviewer Gate (see SKILL.md) against `prd.md` (and `addendum.md` if present). The rubric walker is the default entry in the gate menu; under Validate intent it additionally runs the synthesis pipeline below. The Finalize discipline pass during Create/Update does NOT render a report — findings stay in-conversation.
|
||||
|
||||
## Rubric-walker pipeline
|
||||
|
||||
The rubric walker is the primary review entry. Spawn it as a subagent with this prompt:
|
||||
|
||||
> You are validating a PRD against the quality rubric at `{workflow.validation_checklist_template}`. Read the full rubric first, then read `prd.md` (and `addendum.md` if present). Form a judgment per dimension — *strong / adequate / thin / broken* — and write findings only where they add information. Cite specific PRD locations and quote phrases. Severity ranks impact on the PRD's usefulness, not how easy the fix is. Write your review to `{doc_workspace}/review-rubric.md` in the format the rubric specifies. Return ONLY a compact summary (overall verdict, dimension verdicts, finding counts by severity, file path).
|
||||
|
||||
The Reviewer Gate may also dispatch additional reviewers from `{workflow.finalize_reviewers}` (adversarial-general by default) and any ad-hoc reviewers the parent judges warranted. Each writes its review to `{doc_workspace}/review-{slug}.md` and returns a compact summary. Run in parallel.
|
||||
|
||||
## Synthesis pipeline
|
||||
|
||||
Once every selected reviewer has returned, the parent synthesizes one consolidated report. **Do not skip this step under Validate intent** — it produces the persistent artifact the user opens.
|
||||
|
||||
### Inputs
|
||||
|
||||
- `{doc_workspace}/review-rubric.md` — primary, structured by the seven dimensions
|
||||
- Zero or more `{doc_workspace}/review-{slug}.md` files — extra reviewers (adversarial, etc.)
|
||||
- `{workflow.validation_report_template}` — the HTML skeleton
|
||||
|
||||
### What the synthesis pass does
|
||||
|
||||
1. Read every reviewer file in `{doc_workspace}/review-*.md`.
|
||||
2. Fill the HTML skeleton:
|
||||
- **Header.** PRD name, path. Grade derived from the rubric verdicts and severity counts: *Excellent* = all dimensions strong/adequate, no high/critical findings · *Good* = ≤1 thin dimension, no critical findings · *Fair* = multiple thin dimensions or any high finding · *Poor* = any broken dimension or any critical finding. Set the matching `grade-excellent | grade-good | grade-fair | grade-poor` class.
|
||||
- **Synthesis block.** Lift the rubric's *Overall verdict* paragraph as the lead; if adversarial or ad-hoc reviewers materially shift the picture, add a second paragraph that names what they surfaced.
|
||||
- **Dimension summary cards.** One per dimension that was assessed. Colored verdict text. Skip dimensions the rubric marked n/a for this PRD (e.g. downstream usability for a standalone PRD).
|
||||
- **Dimension sections.** One `<section class="dimension">` per assessed dimension, in rubric order. `<details open>` for *thin* and *broken*; closed for *strong* and *adequate*. Each contains the dimension judgment (the prose from review-rubric.md) and the findings list.
|
||||
- **Reviewer sections.** One `<section class="reviewer-section">` per extra reviewer that ran. The source file path goes in the `<span class="reviewer-source">`. Closed by default. Adversarial findings keep their adversarial voice — do not soften.
|
||||
- **Mechanical notes.** Bullet list from the rubric's "Mechanical notes" section. Skip the block if empty.
|
||||
- **Footer.** Rubric path, ISO timestamp.
|
||||
3. Write the filled HTML to `{doc_workspace}/validation-report.html`.
|
||||
4. Write the markdown twin to `{doc_workspace}/validation-report.md` (same content, grouped by severity rather than by dimension — see format below; this is the canonical form for downstream re-reading).
|
||||
5. Open the HTML in the default browser:
|
||||
```bash
|
||||
python3 -c "import webbrowser, pathlib; webbrowser.open(pathlib.Path('{doc_workspace}/validation-report.html').resolve().as_uri())"
|
||||
```
|
||||
Skip the open step in headless mode (see `references/headless.md`).
|
||||
|
||||
### Markdown twin format
|
||||
|
||||
```markdown
|
||||
# Validation Report — {prd_name}
|
||||
|
||||
- **PRD:** `{prd_path}`
|
||||
- **Rubric:** `{rubric_path}`
|
||||
- **Run at:** {ISO timestamp}
|
||||
- **Grade:** {Excellent | Good | Fair | Poor}
|
||||
|
||||
## Overall verdict
|
||||
{synthesis paragraphs}
|
||||
|
||||
## Dimension verdicts
|
||||
- Decision-readiness — {verdict}
|
||||
- Substance over theater — {verdict}
|
||||
- (etc. for each assessed dimension)
|
||||
|
||||
## Findings by severity
|
||||
|
||||
### Critical (n)
|
||||
**[Dimension or Reviewer]** — Title (§ location)
|
||||
{Note}
|
||||
Fix: {suggested fix}
|
||||
|
||||
### High (n)
|
||||
...
|
||||
|
||||
### Medium (n)
|
||||
...
|
||||
|
||||
### Low (n)
|
||||
...
|
||||
|
||||
## Mechanical notes
|
||||
- {bullet}
|
||||
|
||||
## Reviewer files
|
||||
- `review-rubric.md`
|
||||
- `review-adversarial-general.md` (if present)
|
||||
- (etc.)
|
||||
```
|
||||
|
||||
Re-running validation overwrites the consolidated report in place. The individual `review-*.md` files are preserved so the user can drill in.
|
||||
|
||||
## Close
|
||||
|
||||
Surface artifact paths; the rendered HTML/markdown is the persistent artifact. Always offer to roll findings into an Update.
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
# Validation Rendering
|
||||
|
||||
How the validator subagent's findings become a validation report. Loaded only when the user has explicitly asked for analysis — either Validate intent or a mid-session report request. The Finalize discipline pass during Create/Update does NOT render a report; its findings stay in-conversation.
|
||||
|
||||
## Validator subagent output contract
|
||||
|
||||
The subagent walks `{workflow.validation_checklist}` against `prd.md` (and `addendum.md` if present) and writes `{doc_workspace}/validation-findings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"prd_name": "Plantsona",
|
||||
"prd_path": "{doc_workspace}/prd.md",
|
||||
"checklist_path": "{workflow.validation_checklist}",
|
||||
"timestamp": "2026-05-11T09:14:00",
|
||||
"overall_synthesis": "2-3 sentences of judgment about the PRD's overall state — what holds up, what's at risk. Written by the subagent, not the parent.",
|
||||
"findings": [
|
||||
{
|
||||
"id": "Q-2",
|
||||
"category": "Quality",
|
||||
"title": "Measurability",
|
||||
"status": "warn",
|
||||
"severity": "medium",
|
||||
"location": "§16 Success Metrics, lines 408-422",
|
||||
"note": "Success Metrics list is measurable but counter-metrics are named only for premium conversion. Other metrics lack paired counter-metrics.",
|
||||
"suggested_fix": "Add counter-metrics for engagement (e.g., DAU/MAU) and seasonal cadence."
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Per-finding fields:
|
||||
|
||||
- `id` (required) — checklist item ID (e.g., `Q-1`, `D-2`, `STK-1`, or org-custom prefixes).
|
||||
- `category` (optional) — explicit category name; if omitted, the renderer maps from the ID prefix.
|
||||
- `title` (optional but recommended) — the checklist item's short name.
|
||||
- `status` — `pass` | `warn` | `fail` | `n/a`.
|
||||
- `severity` — `low` | `medium` | `high` | `critical`.
|
||||
- `location` (optional) — section/line/range in the PRD where the finding lives. Cite specifics, never abstract criticism.
|
||||
- `note` (optional) — the finding itself, in one or two sentences.
|
||||
- `suggested_fix` (optional) — concrete next action.
|
||||
|
||||
## Rendering invocation
|
||||
|
||||
After the subagent writes findings:
|
||||
|
||||
```bash
|
||||
python3 {skill-root}/scripts/render-validation-html.py \
|
||||
--findings {doc_workspace}/validation-findings.json \
|
||||
--template {workflow.validation_report_template} \
|
||||
--output {doc_workspace}/validation-report.html \
|
||||
--open
|
||||
```
|
||||
|
||||
Include `--open` for interactive runs (auto-opens in default browser). Omit `--open` in headless runs.
|
||||
|
||||
The script writes two artifacts side-by-side: the HTML report at `--output`, and a markdown companion at the same path with `.md` extension (e.g. `validation-report.md`). Both are always produced when the script runs — trigger gating happens upstream (the script is only invoked when the user has asked for analysis). It computes pass/warn/fail/na counts, derives a grade (Excellent / Good / Fair / Poor) from critical-fail and total-fail counts, renders an inline SVG score bar in the HTML, groups findings by category, and returns a one-line JSON summary on stdout: `{"output": "...", "markdown": "...", "grade": "...", "stats": {...}}`.
|
||||
|
||||
Re-running validation overwrites the existing report files in place. Markdown form is what Update mode reads when rolling findings into a revision.
|
||||
|
|
@ -1,290 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# /// script
|
||||
# requires-python = ">=3.10"
|
||||
# ///
|
||||
"""Render a PRD validation findings JSON into HTML + markdown reports.
|
||||
|
||||
Reads structured findings produced by the validator subagent, groups them by
|
||||
category (explicit `category` field, else derived from ID prefix), computes a
|
||||
pass/warn/fail summary and grade, substitutes into the configured HTML
|
||||
template, writes a markdown companion at the same path with `.md` extension,
|
||||
and optionally opens the HTML in the default browser.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import html
|
||||
import json
|
||||
import string
|
||||
import sys
|
||||
import webbrowser
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
CATEGORY_FROM_PREFIX = {
|
||||
"Q": "Quality",
|
||||
"D": "Discipline",
|
||||
"S": "Structural integrity",
|
||||
"STK": "Stakes-gated",
|
||||
"M": "Mechanical",
|
||||
}
|
||||
|
||||
CATEGORY_ORDER = ["Quality", "Discipline", "Structural integrity", "Stakes-gated", "Mechanical"]
|
||||
|
||||
|
||||
def category_for(finding: dict) -> str:
|
||||
explicit = finding.get("category")
|
||||
if explicit:
|
||||
return explicit
|
||||
fid = finding.get("id", "")
|
||||
prefix = fid.split("-", 1)[0] if "-" in fid else fid
|
||||
return CATEGORY_FROM_PREFIX.get(prefix, prefix or "Other")
|
||||
|
||||
|
||||
def compute_stats(findings: list[dict]) -> dict:
|
||||
total = len(findings)
|
||||
by_status = {"pass": 0, "warn": 0, "fail": 0, "n/a": 0}
|
||||
failed_critical = 0
|
||||
failed_high = 0
|
||||
for f in findings:
|
||||
status = (f.get("status") or "n/a").lower()
|
||||
if status in by_status:
|
||||
by_status[status] += 1
|
||||
if status == "fail":
|
||||
sev = (f.get("severity") or "low").lower()
|
||||
if sev == "critical":
|
||||
failed_critical += 1
|
||||
elif sev == "high":
|
||||
failed_high += 1
|
||||
return {
|
||||
"total": total,
|
||||
"passed": by_status["pass"],
|
||||
"warned": by_status["warn"],
|
||||
"failed": by_status["fail"],
|
||||
"na": by_status["n/a"],
|
||||
"failed_critical": failed_critical,
|
||||
"failed_high": failed_high,
|
||||
}
|
||||
|
||||
|
||||
def grade_from(stats: dict) -> tuple[str, str]:
|
||||
if stats["failed_critical"] > 0:
|
||||
return "Poor", "grade-poor"
|
||||
if stats["failed_high"] >= 1 or stats["failed"] >= 4:
|
||||
return "Fair", "grade-fair"
|
||||
if stats["failed"] > 0 or stats["warned"] > 2:
|
||||
return "Good", "grade-good"
|
||||
return "Excellent", "grade-excellent"
|
||||
|
||||
|
||||
def render_score_bar(stats: dict, width: int = 480, height: int = 22) -> str:
|
||||
total = max(stats["total"], 1)
|
||||
p = stats["passed"] / total * width
|
||||
w = stats["warned"] / total * width
|
||||
f = stats["failed"] / total * width
|
||||
n = stats["na"] / total * width
|
||||
return (
|
||||
f'<svg width="{width}" height="{height}" viewBox="0 0 {width} {height}" role="img" '
|
||||
f'aria-label="Pass / warn / fail / n-a breakdown">'
|
||||
f'<rect x="0" y="0" width="{p:.1f}" height="{height}" fill="#22c55e"/>'
|
||||
f'<rect x="{p:.1f}" y="0" width="{w:.1f}" height="{height}" fill="#eab308"/>'
|
||||
f'<rect x="{p + w:.1f}" y="0" width="{f:.1f}" height="{height}" fill="#ef4444"/>'
|
||||
f'<rect x="{p + w + f:.1f}" y="0" width="{n:.1f}" height="{height}" fill="#94a3b8"/>'
|
||||
f"</svg>"
|
||||
)
|
||||
|
||||
|
||||
def render_finding(f: dict) -> str:
|
||||
status = (f.get("status") or "n/a").lower()
|
||||
severity = (f.get("severity") or "low").lower()
|
||||
fid = html.escape(f.get("id") or "")
|
||||
title = html.escape(f.get("title") or fid)
|
||||
location = html.escape(f.get("location") or "")
|
||||
note = html.escape(f.get("note") or "")
|
||||
fix = html.escape(f.get("suggested_fix") or "")
|
||||
|
||||
status_class = "na" if status == "n/a" else status
|
||||
parts = [
|
||||
f'<article class="finding finding-{status_class}">',
|
||||
'<header>',
|
||||
f'<span class="badge badge-status badge-{status_class}">{status.upper()}</span>',
|
||||
f'<span class="badge badge-severity badge-sev-{severity}">{severity}</span>',
|
||||
f'<span class="finding-id">{fid}</span>',
|
||||
f'<h3 class="finding-title">{title}</h3>',
|
||||
'</header>',
|
||||
]
|
||||
if location:
|
||||
parts.append(f'<div class="finding-location"><strong>Location:</strong> {location}</div>')
|
||||
if note:
|
||||
parts.append(f'<div class="finding-note">{note}</div>')
|
||||
if fix:
|
||||
parts.append(f'<div class="finding-fix"><strong>Suggested fix:</strong> {fix}</div>')
|
||||
parts.append("</article>")
|
||||
return "\n".join(parts)
|
||||
|
||||
|
||||
def render_category(name: str, findings: list[dict]) -> str:
|
||||
items = "\n".join(render_finding(f) for f in findings)
|
||||
name_e = html.escape(name)
|
||||
return (
|
||||
f'<section class="category">'
|
||||
f"<details open>"
|
||||
f'<summary><h2>{name_e} <span class="count">({len(findings)})</span></h2></summary>'
|
||||
f"{items}"
|
||||
f"</details>"
|
||||
f"</section>"
|
||||
)
|
||||
|
||||
|
||||
SEVERITY_ORDER = ["critical", "high", "medium", "low"]
|
||||
|
||||
|
||||
def render_finding_md(f: dict) -> str:
|
||||
status = (f.get("status") or "n/a").upper()
|
||||
severity = (f.get("severity") or "low").lower()
|
||||
fid = f.get("id") or ""
|
||||
title = f.get("title") or fid
|
||||
location = f.get("location") or ""
|
||||
note = f.get("note") or ""
|
||||
fix = f.get("suggested_fix") or ""
|
||||
|
||||
lines = [f"### [{status}] {fid} — {title} _(severity: {severity})_"]
|
||||
if location:
|
||||
lines.append(f"- **Location:** {location}")
|
||||
if note:
|
||||
lines.append(f"- **Finding:** {note}")
|
||||
if fix:
|
||||
lines.append(f"- **Suggested fix:** {fix}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def render_markdown_report(data: dict, findings: list[dict], stats: dict, grade: str) -> str:
|
||||
prd_name = data.get("prd_name") or "PRD"
|
||||
prd_path = data.get("prd_path") or ""
|
||||
checklist_path = data.get("checklist_path") or ""
|
||||
timestamp = data.get("timestamp") or datetime.now().isoformat(timespec="seconds")
|
||||
synthesis = data.get("overall_synthesis") or ""
|
||||
|
||||
out = [
|
||||
f"# Validation Report — {prd_name}",
|
||||
"",
|
||||
f"- **PRD:** `{prd_path}`",
|
||||
f"- **Checklist:** `{checklist_path}`",
|
||||
f"- **Run at:** {timestamp}",
|
||||
f"- **Grade:** {grade}",
|
||||
"",
|
||||
f"**Summary:** {stats['passed']} pass · {stats['warned']} warn · {stats['failed']} fail · {stats['na']} n/a "
|
||||
f"(total {stats['total']}; critical fails: {stats['failed_critical']}, high fails: {stats['failed_high']})",
|
||||
]
|
||||
if synthesis:
|
||||
out += ["", "## Overall synthesis", "", synthesis]
|
||||
|
||||
# Group by severity then status: failed criticals first, then highs, etc.
|
||||
by_sev: dict[str, list[dict]] = {s: [] for s in SEVERITY_ORDER}
|
||||
other: list[dict] = []
|
||||
for f in findings:
|
||||
sev = (f.get("severity") or "low").lower()
|
||||
if sev in by_sev:
|
||||
by_sev[sev].append(f)
|
||||
else:
|
||||
other.append(f)
|
||||
|
||||
out += ["", "## Findings by severity"]
|
||||
any_findings = False
|
||||
for sev in SEVERITY_ORDER:
|
||||
items = by_sev[sev]
|
||||
if not items:
|
||||
continue
|
||||
any_findings = True
|
||||
out += ["", f"### {sev.capitalize()} ({len(items)})", ""]
|
||||
out += [render_finding_md(f) for f in items]
|
||||
if other:
|
||||
any_findings = True
|
||||
out += ["", f"### Other ({len(other)})", ""]
|
||||
out += [render_finding_md(f) for f in other]
|
||||
if not any_findings:
|
||||
out += ["", "_No findings._"]
|
||||
|
||||
return "\n".join(out) + "\n"
|
||||
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
parser = argparse.ArgumentParser(description="Render PRD validation findings to HTML.")
|
||||
parser.add_argument("--findings", required=True, help="Path to validation-findings.json")
|
||||
parser.add_argument("--template", required=True, help="Path to HTML template")
|
||||
parser.add_argument("--output", required=True, help="Path to write the rendered HTML")
|
||||
parser.add_argument("--open", action="store_true", help="Open the rendered HTML in the default browser")
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
findings_path = Path(args.findings)
|
||||
template_path = Path(args.template)
|
||||
output_path = Path(args.output)
|
||||
|
||||
try:
|
||||
data = json.loads(findings_path.read_text(encoding="utf-8"))
|
||||
except FileNotFoundError:
|
||||
print(f"error: findings file not found: {findings_path}", file=sys.stderr)
|
||||
return 1
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"error: findings file is not valid JSON ({findings_path}): {e}", file=sys.stderr)
|
||||
return 1
|
||||
try:
|
||||
template = template_path.read_text(encoding="utf-8")
|
||||
except FileNotFoundError:
|
||||
print(f"error: template file not found: {template_path}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
findings = data.get("findings", []) or []
|
||||
|
||||
by_cat: dict[str, list[dict]] = {}
|
||||
for f in findings:
|
||||
by_cat.setdefault(category_for(f), []).append(f)
|
||||
|
||||
sorted_cats = sorted(
|
||||
by_cat.keys(),
|
||||
key=lambda c: (CATEGORY_ORDER.index(c) if c in CATEGORY_ORDER else 99, c),
|
||||
)
|
||||
categories_html = "\n".join(render_category(c, by_cat[c]) for c in sorted_cats)
|
||||
|
||||
stats = compute_stats(findings)
|
||||
grade, grade_class = grade_from(stats)
|
||||
score_svg = render_score_bar(stats)
|
||||
|
||||
timestamp = data.get("timestamp") or datetime.now().isoformat(timespec="seconds")
|
||||
substitutions = {
|
||||
"prd_name": html.escape(str(data.get("prd_name") or "PRD")),
|
||||
"prd_path": html.escape(str(data.get("prd_path") or "")),
|
||||
"checklist_path": html.escape(str(data.get("checklist_path") or "")),
|
||||
"timestamp": html.escape(timestamp),
|
||||
"overall_synthesis": html.escape(str(data.get("overall_synthesis") or "")),
|
||||
"grade": grade,
|
||||
"grade_class": grade_class,
|
||||
"total": str(stats["total"]),
|
||||
"passed": str(stats["passed"]),
|
||||
"failed": str(stats["failed"]),
|
||||
"warned": str(stats["warned"]),
|
||||
"na": str(stats["na"]),
|
||||
"score_svg": score_svg,
|
||||
"categories_html": categories_html,
|
||||
}
|
||||
|
||||
rendered = string.Template(template).safe_substitute(substitutions)
|
||||
output_path.write_text(rendered, encoding="utf-8")
|
||||
|
||||
md_path = output_path.with_suffix(".md")
|
||||
md_path.write_text(render_markdown_report(data, findings, stats, grade), encoding="utf-8")
|
||||
|
||||
print(json.dumps({
|
||||
"output": str(output_path),
|
||||
"markdown": str(md_path),
|
||||
"grade": grade,
|
||||
"stats": stats,
|
||||
}))
|
||||
|
||||
if args.open:
|
||||
webbrowser.open(output_path.resolve().as_uri())
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
Loading…
Reference in New Issue