| (no flag) | Detect state → present menu (init / new BRD / new PRD / add stories / validate / update / visualize / approve / summary). |
--product | Init/refresh PRODUCT.md (thin product-context labels). |
--brd | Create/refine the single BRD. |
--prd [feature] | Create/refine a PRD (feature-area). Multi-PRD supported. |
--epic [prd] | Create/refine an epic under the given PRD. |
--story [epic] | Create/refine a story under the given epic. |
--auto | Brain-dump → decompose into BRD goals / PRDs / epics / stories; confirm-batch on ambiguous splits. |
--discover <path(s)> | Discovery seed: ingest raw upstream text (transcripts/notes — files+dirs, .md/.txt, read-fenced, size-capped) → candidate personas/problems/JTBD to seed the Vision/BRD interview. Never auto-commits — the interview confirms each. · When: cold-start from raw inputs. · see references/workflow-discover.md. |
--validate | Run structural scripts → layer LLM judgment → human report. |
--strict | With --validate: errors block; warns do not. |
--summary [--audience exec|release-notes] | 1-page audience brief FROM the spec: exec one-pager (default) or release-notes delta (from the audit trail). Same source-of-truth + render path — no new top-level flag. · When: hand a brief to a stakeholder. · see references/workflow-summary.md. |
--approve | Validate → warn-not-block → open-questions gate (warn on unresolved cần PO xác định/TBD/Vẫn còn mở markers) → record owner+date → flip status: approved. After a successful sign-off, nudge the PO that --export can now produce one shareable, read-once copy of the just-approved spec (its acceptance criteria become a portable surface), and that --viz can re-render the visuals so the approved state has a fresh, drift-free diagram — both suggestions, never automatic. · see references/workflow-export.md, references/visualization-spec.md. |
--update | Delta-update: ask what changed → compute affected downstream set → flag for PO review (never auto-rewrite prose) → append change-log. |
--decision [list|ID] | Decision Register: view or record an explicit PO ruling (DEC-<n>) in decisions.md; authoritative home for ruled drift (po_ruling_ref). · When: log a call you've made. · GATE:NO-SILENT-REVERSAL · see references/workflow-decision.md. |
--learn | Learn from reality (post-launch): outcomes (target vs actual → OUT-<n> via record_outcome.py) or feedback (raw files → candidate problems → --update). A miss on an approved goal is surfaced, never auto-edited. · When: capture what shipped vs planned. · GATE:NO-SILENT-REVERSAL · see references/workflow-learn.md. |
--apply-critique <report> | Walk a product-spec-critique report finding-by-finding (Keep / Change+re-approve / Defer), one DEC-<n> per resolved finding; report read-fenced, prose never auto-rewritten, resumable + injection-safe. · When: act on a critique. · GATE:NO-SILENT-REVERSAL · see references/workflow-apply-critique.md. |
--status | Spec-health nudge: report last-validated errors/warns + a soft drift reminder when the spec drifted since + open-questions (hanging cần PO xác định/TBD markers). Read-only. · When: "is my spec still ok / has it drifted?" · see references/workflow-status.md. |
--viz <view> | Render a visualization. Graph views (tree/heatmap/scope/roadmap/persona/gap/moscow/time/delta → ascii; risk/competition/dashboard → html-native), body viewers (board/explorer), governance (audit), learning views (scorecard/insight-gap/outcome-trend/learning-map/learning). · When: "show me / a picture of" the spec. · see references/visualization-spec.md (learning views: workflow-learn.md). |
--format <fmt> | Visualization format: ascii · mermaid · html. Default is per-view (see the matrix); ASCII is downgraded, never removed. · When: pick a view's render format. · see references/visualization-spec.md. |
--group-by <field> | --viz board column grouping: status (default) · horizon · moscow. |
--filter-wont | Hide deferred items (moscow: wont / scope: out) from tree/roadmap/time/persona/board/explorer. Default keeps them visible (marker) — nothing silently dropped. · When: declutter a view. · see references/visualization-spec.md. |
--export <all|ID|list> | read-once Export: assemble a spec slice into ONE self-contained doc under exports/. Pairs with --layers/--depth/--compact-mode/--format. · When: one shareable offline doc. · see references/workflow-export.md. |
--layers <types> | Filter artifact types: --export buckets vision,brd,prd,epic,story; --viz board/explorer by type goal,prd,epic,story. Unknown token → rejected (non-zero), never silently dropped. · When: scope an export/board. · see references/workflow-export.md + visualization-spec.md. |
--depth <preset> | --export verbosity: context (default) · full · brief. |
--compact-mode <m> | --export compaction: struct (default, deterministic) · llm (emits <!-- COMPACT --> markers; requires --format md, rejected with html). · When: summarize export sections. · see references/workflow-export.md. |
--lang <code> | Interview/output language: en (default) · vi. IDs + frontmatter keys stay English; labels/headings/facets localize. · When: switch working language. · see references/workflow-lang.md. |
--voice | Record the PO's voice into .memory/po-style.yaml deterministically (--register/--vocabulary/--recurring-asks/--do/--dont, lang-keyed) — one writer home (record_po_style). · When: persist a wording preference. · see references/behavioral-memory.md. |
preferences.py --set KEY=VALUE | Write a PO preference deterministically (repeatable; load→merge→save, bad enum exits non-zero writing nothing). Persists the engagement knobs interview_rigor + action_prompting (default standard). · When: change a standing engagement setting. · see references/workflow-interview.md → Engagement profile. |
--reflect | Retroactive memory harvest: scan git + .memory/ (degrade-safe), spawn the read-only opus harvester, propose unrecorded DEC-<n>/self-corrections/voice for PO confirm-then-persist. · When: recover skipped forcing-functions. · see references/workflow-reflect.md. |