<!-- GENERATED by scripts/generate_command_flows.py — do not edit by hand. -->
<!-- Source: src/flows/surface-map.yaml + src/flows/<flow>.yaml. Re-run: task generate-command-flows. -->

# Command flows — the primary view

> road-to-6.1.0 Step 9. Commands are **flow members**, not a flat list. The layered model is `Profile → Pack → Flow → Command → Skill → Rule`; this view answers *"what am I trying to do?"* before *"which command do I type?"*.

> Every command is classified in `src/flows/surface-map.yaml` (coverage enforced by `scripts/lint_command_flow_coverage.py`). The four user-work flows carry rich definitions in `src/flows/<flow>.yaml`.

**150 commands** across **10 surfaces** (4 user-work flows + 6 platform/domain surfaces).

## User-work flows

The developer story: **discovery → implementation → review → delivery**.

### Discovery

_Explore, plan, estimate, refine, and investigate before building. The "what should we build and how" front of the developer journey._

**Entry points:** `feature/plan` · `bug-investigate` · `research`

**Default path:** `feature/explore` → `feature/plan` → `estimate-ticket` → `refine-ticket`

- `analyze-reference-repo` — Analyze an external reference repository (competitor, inspiration, peer) and produce a structured compariso…
- `bug-investigate` — Investigate a bug — auto-detect ticket from branch, gather Jira/Sentry/description context, trace root cause
- `estimate-ticket` — Estimate a Jira/Linear ticket before sprint planning — size + risk + split recommendation + uncertainty, si…
- `feature` — Feature orchestrator — routes to explore, plan, refactor, roadmap, dev
- `feature:explore` — Brainstorm and explore a feature idea before committing to a full plan
- `feature:plan` — Interactively plan a feature — research, discuss, and create a structured feature document
- `feature:refactor` — Refine and update an existing feature plan through interactive discussion
- `feature:roadmap` — Generate implementation roadmap(s) from a feature plan and link them
- `project-analyze` — Full project analysis — detect stack, inventory modules, audit docs, create missing contexts
- `project-health` — Quick project health check — show status of docs, modules, contexts, and roadmaps without creating anything
- `refine-ticket` — Refine a Jira/Linear ticket before planning — rewritten ticket + Top-5 risks + persona voices, orchestrates…

### Implementation

_Build it. The core "make the change" front — drive a prompt, ticket, or feature end-to-end through plan → implement → verify._

**Entry points:** `work` · `implement-ticket` · `feature/dev` · `bug-fix`

**Default path:** `work` → `review-changes` → `quality-fix` → `commit`

- `bug-fix` — Plan and implement a bug fix — based on investigation, with quality checks and test verification
- `e2e-heal` — Find, debug, and fix failing Playwright E2E tests
- `e2e-plan` — Explore the application and create a structured E2E test plan in Markdown
- `feature:dev` — Full 7-phase feature development workflow for complex features.
- `implement-ticket` — Drive a ticket end-to-end through refine → memory → analyze → plan → implement → test → verify → report — O…
- `jira-ticket` — Read Jira ticket from branch name, analyze linked Sentry issues, implement feature or fix bug
- `module:create` — Create a new module from .module-template with interactive setup
- `tests` — Tests orchestrator — routes to create, execute
- `tests:create` — Write meaningful tests for the current branch — stack-adaptive (pest / phpunit / vitest / jest / pytest / …)
- `tests:execute` — Run the project's test suite — stack-adaptive (pest / phpunit / vitest / jest / pytest / …)
- `update-form-request-messages` — Sync the messages() method of a FormRequest class — add missing entries, link them to language keys, and cl…
- `work` — Drive a free-form prompt end-to-end through refine → score → plan → implement → test → verify → report — Op…

### Review

_Check it. Self-review, judge, quality-fix, and threat-model a change before it ships._

**Entry points:** `review-changes` · `judge`

**Default path:** `review-changes` → `judge` → `quality-fix` → `threat-model`

- `fix:ci` — Fetch CI errors from GitHub Actions and fix them
- `judge` — Judge orchestrator — routes to solo, steps, on-diff
- `judge:on-diff` — Run a single change through an implementer→judge loop with a two-revision ceiling, then hand back to the user
- `judge:solo` — Run a standalone judge on an existing diff or code change — no implementer, no revision loop, verdict only
- `judge:steps` — Execute an ordered plan step by step with a judge gate between steps — stops on first failed verdict
- `quality-fix` — Run quality pipeline (PHP and/or JS/TS) and fix all errors — auto-detects language from changed files
- `review-changes` — Self-review local changes before creating a PR — dispatches to five specialized judges (bug, security, test…
- `threat-model` — Run a pre-implementation threat model on a proposed change — enumerates abuse cases, trust boundaries, and…

### Delivery

_Ship it. Commit in logical chunks, open the PR, answer review comments, and prepare the branch for review._

**Entry points:** `commit` · `pr/create` · `prepare-for-review`

**Default path:** `commit` → `pr/create` → `fix/pr-comments`

- `git-commit` — Stage and commit all uncommitted changes — splits into logical commits following Conventional Commits
- `git-commit-in-chunks` — Stage and commit all uncommitted changes in logical chunks WITHOUT confirmation — sibling of /commit for au…
- `fix` — Fix orchestrator — routes to ci, references, portability, seeder, pr-comments, pr-bot-comments, pr-develope…
- `fix:portability` — Find and fix project-specific references in shared .augment/ package files
- `fix:pr-bot-comments` — Fix and reply to bot review comments (Copilot, Augment, Greptile, etc.) on a GitHub PR
- `fix:pr-comments` — Fix and reply to all open review comments (bots + human reviewers) on a GitHub PR
- `fix:pr-developer-comments` — Fix and reply to human reviewer comments on a GitHub PR
- `fix:refs` — Find and fix broken cross-references in .augment/ and agents/ files
- `fix:seeder` — Scan seeder data files for broken foreign key references — find constants used without getReference() and f…
- `git-pr-create` — Create a GitHub PR with structured description from Jira ticket and code changes
- `git-pr-create-description-only` — Generate a PR description as a copyable markdown block — used standalone or by create-pr
- `prepare-for-review` — Prepare a PR branch for local review — updates main and merges the full branch chain so the branch is up to…

## Platform & domain surfaces

### Product-surface features

_Deliberately-started features — not daily flow members, never buried as skills._

- `challenge-me` — Challenge-me orchestrator — routes to vision, with-docs
- `challenge-me:vision` — Stress-test a plan or idea by one-question-at-a-time interview until 95% confidence — emits a copyable Mark…
- `challenge-me:with-docs` — Doc-aware /challenge-me — 95%-confidence interview with session glossary vs CONTEXT.md, load-bearing claim-…
- `council` — Council orchestrator — routes to default, pr, design, optimize, analysis, debate
- `council:analysis` — Run the council on a local analysis output (project-analyze, audit script, codebase scan) — critiques the a…
- `council:debate` — Multi-round council debate with progressive cost disclosure — each member produces a position, then rebuts…
- `council:default` — Default council lens — neutral framing, redacted context, advisory output only. Run `/council default <inpu…
- `council:design` — Run the council on a design document, ADR, or architecture proposal — surfaces hidden coupling, missing rol…
- `council:optimize` — Run the council on an optimization target — perf hot path, memory pattern, query, or an /optimize-* output…
- `council:pr` — Pull a GitHub PR via gh CLI and run the council on the diff with a PR-specific neutrality preamble — read-o…
- `grill-me` — Alias for /challenge-me — interactive grill-style interview that sharpens a fuzzy plan/idea into a copyable…
- `research` — Preliminary research scaffolder — pick objects, define fields, emit `outline.yaml` + `fields.yaml` for down…
- `research:deep` — Read `outline.yaml`, research each item in batches, write per-item JSON validated against the project-local…
- `research:report` — Summarise per-item JSON results from `/research:deep` into `report.md`. Agent renders directly + emits an o…
- `roadmap` — Roadmap orchestrator — routes to create (authoring) and process-step / process-phase / process-full (autono…
- `roadmap:ai-council` — Challenge a roadmap with the AI council (deep tier) and refactor from convergence findings. Wraps `/council…
- `roadmap:create` — Interactively create a new roadmap file in agents/roadmaps/
- `roadmap:process-full` — Autonomously process every open step across every phase of a roadmap until the file is fully closed. Larges…
- `roadmap:process-phase` — Autonomously process every open step in the next or current phase of a roadmap, then stop. Default executio…
- `roadmap:process-step` — Autonomously process the single next open step of a roadmap and stop. Smallest execution scope of the /road…

### Platform surface — `agent-admin`

_The system/admin surface (NOT a flow): memory · analytics · governance · config · introspection, reached on demand._

- `agents` — Agent-layer orchestrator — routes to init, optimize, audit. Covers AGENTS.md and its multi-tool stubs (CLAU…
- `agents:audit` — Audit agent infrastructure — token overhead, rule triggers, AGENTS.md health, Capability-over-Structure adh…
- `agents:init` — Initialize the agent layer for a consumer project — creates AGENTS.md and .github/copilot-instructions.md f…
- `agents:optimize` — Refactor AGENTS.md to the Thin-Root contract (caps, pointer ratio, capability bullets, emergency-triage) an…
- `agents:user` — User-persona file (.agent-user.md) — interview, render, and maintain who the user is and how they want to b…
- `agents:user-accept` — Apply a buffered observation to .agent-user.md after explicit user confirmation; bumps last_updated and dro…
- `agents:user-init` — Interactive interview that creates the project-root .agent-user.md from the locked v1 schema (name, languag…
- `agents:user-review` — List buffered observations from .agent-user.observations.jsonl with numbered options to inspect or accept i…
- `agents:user-show` — Read-only render of .agent-user.md — prints the persona summary the host agent loads at session start.
- `agents:user-update` — Open .agent-user.md in the user's IDE for manual edit; validates schema and 100-line cap on save.
- `analytics` — Analytics orchestrator — routes to show, prune. Local-only workspace event log under `~/.event4u/agent-conf…
- `analytics:prune` — Drop events older than the 90-day retention window from the local analytics log. Atomic and idempotent.
- `analytics:show` — Render top prompts, launcher → completion rate per role, average session length, and knowledge-source usage…
- `chat-history` — Chat-history orchestrator — routes to show, import, learn
- `chat-history:import` — Surface prior chat-history sessions as a numbered table, let the user pick one, read it silently, and emit…
- `chat-history:learn` — Pick a prior chat-history session and mine it for project-improving learnings — runs learning-to-rule-or-sk…
- `chat-history:show` — Show the status of the persistent chat-history log — file size, entry count, header fingerprint, age, and t…
- `check-current-md`
- `condense` — Condense .md files from .agent-src.uncondensed/ into telegraph format and write to dist/agent-src/
- `context` — Context orchestrator — routes to create, refactor
- `context:create` — Analyze a codebase area and create a structured context document
- `context:refactor` — Analyze, update, and extend an existing context document
- `cost-report` — Capture token cost from the active Claude Code session, append to the local sessions store, and surface the…
- `knowledge` — Knowledge orchestrator — routes to ingest, list, forget. Local-only file ingestion into the agent memory na…
- `knowledge:cross-repo` — Targeted, read-only retrieval over opted-in linked-project siblings (ADR-032 Option A). Pulls a shared type…
- `knowledge:forget` — Drop a knowledge ingest from `agents/memory/knowledge/` by id prefix. Atomic, no partial state. Pinning pro…
- `knowledge:ingest` — Walk a local path (folder, .zip, single file), redact PII + secrets, chunk to 2 KB markdown, and persist in…
- `knowledge:list` — List existing knowledge ingests in `agents/memory/knowledge/` (table or JSON); pin / unpin by id prefix to…
- `memory` — Memory orchestrator — routes to add, load, mine-session, promote, propose
- `memory:add` — Interactively add a validated entry to an engineering-memory file (domain-invariants, architecture-decision…
- `memory:learn-low-impact` — Preview validated low-impact entries that would be upstreamed to the package seed (default `--preview`); `-…
- `memory:load` — Load ALL curated entries of a given memory type into the current context — opt-in full load for deep analys…
- `memory:mine-session` — Mine the active session transcript for memory signals (corrections, preferences, decisions, recurring patte…
- `memory:promote` — Promote an intake signal (or provisional proposal) into a curated memory entry — opens a PR and runs the ad…
- `memory:propose` — Append a provisional memory signal to the intake stream — the universal fallback for any producer (human or…
- `module` — Module orchestrator — routes to create, explore
- `module:explore` — Explore a module — load its structure, docs, and context into the current conversation
- `optimize` — Optimize orchestrator — routes to skills, agents-dir, augmentignore, rtk-filters
- `optimize-prompt` — Optimize a raw prompt for ChatGPT, Claude, Gemini, or another AI via the 4-D methodology — BASIC vs DETAIL…
- `optimize:agents-dir` — Manage the agents/ directory — scaffold, folder-audit, fix. Single command with three modes (--scaffold / -…
- `optimize:augmentignore` — Creates or updates .augmentignore based on the project's actual tech stack, large files, generated artifact…
- `optimize:rtk` — Create or optimize project-local rtk filters based on the actual toolchain
- `optimize:skills` — Audits skills — measures baseline, finds duplicates/merge candidates, runs linter. Suggest only, never auto…
- `orchestrate` — Run a YAML pipeline defined under `.agent-config/orchestrations/` — chains personas / skills / commands / s…
- `override` — Override orchestrator — routes to create, manage
- `override:create` — Creates a project-level override for a shared skill, rule, or command.
- `override:manage` — Reviews, updates, and refactors existing project-level overrides.
- `package-reset` — /package-reset
- `package-test` — /package-test
- `profile` — Session-profile orchestrator — activate / deactivate / show the active packs for this session (recommendati…
- `profile:activate` — Activate a session profile — surface only the named profile/pack closure plus core artefacts, no persistence
- `profile:deactivate` — Deactivate the session profile — clear the overlay (or drop named packs) so the full surface returns
- `profile:show` — Show the active session profile — active packs and surfaced/hidden command+skill counts (observability surf…
- `review-routing` — Compute reviewer roles and matched historical bug patterns for the current diff, using project-local owners…
- `rule-compliance-audit` — Audit rule trigger quality, simulate activation, detect overlaps, and find never-activating rules
- `set-cost-profile` — Change the rule_loading_tier in .agent-settings.yml — shows each profile's meaning and applies the selection
- `skill` — Single-skill orchestrator — routes to preview. Non-destructive "what will this skill do?" before you run it.
- `skill:preview` — Non-destructive preview of a skill — its declared steps, execution type, allowed tools, and file/command ta…
- `skills` — Skill discovery orchestrator — routes to discover. Local, explained skill recommendations over the catalog…
- `skills:discover` — Recommend skills for a role — ranked by four explained classes (most-useful-for-role, related-to-current-ta…
- `sync-agent-settings` — Sync `.agent-settings.yml` against the current template + profile — adds new sections/keys, preserves user…
- `sync-gitignore` — Sync the `event4u/agent-config` block in the consumer project's .gitignore — adds missing entries, preserve…
- `sync-gitignore:fix` — Scrub legacy pre-`/agents/` patterns from the consumer's .gitignore (inside or outside the managed block) a…
- `upstream-contribute` — Contribute a learning, skill, rule, or fix from a consumer project back to the shared agent-config package

### Domain flow — media

_AI image + video pipeline._

- `image` — Character-image fidelity orchestrator — analyse, create, and verify a character image against its canon. Ro…
- `image:analyse` — Analyse a character image down to the smallest mole and diff it against a canon — per-feature spec, OCR tat…
- `image:create` — Generate a character image to spec — assemble a max-fidelity, anchors-first prompt from a Canon Spec; gover…
- `image:verify` — Verify a candidate render against its canon — run the analyser in loop mode, emit the gate verdict + remain…
- `video` — Video-creation orchestrator — Hollywood-level AI video pipeline. Routes to from-script, from-song, scene, s…
- `video:from-script` — Drive a script end-to-end through the AI video pipeline — scenes → blueprint → image → operator pick → moti…
- `video:from-song` — Music-video from a song + reference images — accept or derive a timed scene script, optional character-lock…
- `video:scene` — Render a single scene from a one-line idea — scene-expander → blueprint → image → operator pick → motion →…
- `video:stitch` — Re-stitch existing clips in `<project>/scenes/*/` after operator edits — no re-render. ffmpeg concat driven…
- `video:storyboard` — Image-only storyboard — script → scenes → blueprint → image render → contact-sheet PNG via ffmpeg montage.…

### Domain flow — marketing

_Ghostwriter + post-as voice pipeline._

- `ghostwriter` — Ghostwriter cluster — fetch, write, list, show, and delete public-figure voice profiles (the third voice pr…
- `ghostwriter:delete` — Hard-delete a ghostwriter profile at agents/reference/ghostwriter/<slug>.md after a two-step confirmation.…
- `ghostwriter:fetch` — Build or refresh a public-figure voice profile under agents/reference/ghostwriter/ from a URL or bare name;…
- `ghostwriter:list` — List captured ghostwriter profiles under agents/reference/ghostwriter/ as a numbered table with confidence,…
- `ghostwriter:show` — Render a single ghostwriter profile in full — identity, style fingerprint, voice samples, taboos, source UR…
- `ghostwriter:write` — Draft a markdown post in the voice of a captured public-figure ghostwriter profile; appends the mandatory n…
- `post-as` — Consumer-facing write entry points — :me drafts in the maintainer's own voice from .agent-user.md (no discl…
- `post-as:ghostwriter` — Thin alias for /ghostwriter:write — drafts a copyable markdown post in a captured public-figure voice with…
- `post-as:me` — Draft a copyable markdown post in the maintainer's own voice (style source = .agent-user.md.voice_sample).…

### Domain flow — fun

_Recreational packs._

- `prediction-pool` — Fill a prediction pool (kicktipp, football/basketball WM): optimize expected points under the rules, enter…

### Session surface

_Handoff / status / mode — conversation lifecycle._

- `agent-handoff` — Generate a context summary for continuing work in a fresh chat. Replaces the session system.
- `agent-status` — Show current conversation stats — message count, token costs, task progress, next freshness check.
- `mode` — Set the active role mode — prints the contract, lists default skills, and refuses work outside the contract…
