Skip to content

Compounding & Quality

These 7 workflows close the loop between building and learning. They turn solved problems into searchable knowledge, enforce multi-persona review, stress-test scope before committing, and ship code through a structured pipeline.

Compounding harness

New in v2.0.0.


/compound

Captures a recently solved problem or learned pattern while context is fresh.

/compound                   # full mode: research, overlap detection, dedup
/compound --lightweight     # single-pass, fewer tokens

What it does:

  1. Asks you to choose Full or Lightweight mode
  2. Classifies the solution by track (bug or knowledge) and category
  3. Researches .planning/solutions/ for overlapping prior art
  4. Writes a structured document with YAML frontmatter to .planning/solutions/[category]/
  5. Commits and offers @agentic-learning space to schedule review

Output: .planning/solutions/[category]/[filename].md — searchable by /plan-phase (Step 2b) and /knowledge-base.

When to use:

  • After /debug resolves a bug — capture the problem, root cause, and fix
  • After /verify-work passes — capture notable patterns from the phase
  • After any "aha moment" in a session — compound it before context fades

Agent: solution-writer (inline persona or learnship-solution-writer subagent).

Learning checkpoint: either-or · reflect


/review

Multi-persona code review through six lenses.

/review                     # interactive mode (default)
/review --report            # report-only, no conversation
/review --autofix           # apply fixes automatically

The 6 review lenses:

Lens What it checks
Correctness Logic errors, edge cases, off-by-one, null handling
Testing Coverage gaps, missing assertions, test quality
Security Input validation, auth, secrets, injection vectors
Performance N+1 queries, unnecessary re-renders, memory leaks
Maintainability Naming, coupling, dead code, abstraction quality
Adversarial What would a hostile user or a 3am oncall do with this?

Output: Severity-ranked findings (P0–P3) with confidence scores (0.0–1.0). Only lenses relevant to the diff are activated (e.g., no security lens for a CSS-only change).

Agent: code-reviewer (inline persona or learnship-code-reviewer subagent).

Config: review.auto_after_verify — when true, automatically runs after /verify-work passes.

Learning checkpoint: learn · either-or


/challenge

Product and engineering challenge gate — is this worth building?

/challenge "[proposal description]"
/challenge                  # reads from MILESTONE-CONTEXT.md or ROADMAP.md

What it does:

  1. Gathers context from PROJECT.md, ROADMAP.md, DECISIONS.md
  2. Applies two lenses in parallel (or sequentially):
  3. Product lens: Does this solve a real user problem? Is the scope right?
  4. Engineering lens: Is this the simplest architecture? What are we coupling to?
  5. Asks 3–5 forcing questions per lens
  6. Synthesizes a verdict: proceed, rethink, or reduce scope
  7. Records the decision to DECISIONS.md

When to use: Before committing to a milestone, large feature, or major refactor. 15 minutes of challenge prevents weeks of rework.

Agent: challenger (inline persona or learnship-challenger subagent).

Learning checkpoint: either-or · brainstorm


/ship

End-to-end ship pipeline: test → lint → commit → push → PR.

/ship                       # full pipeline
/ship --skip-tests          # skip test step
/ship --dry-run             # show what would happen without executing

What it does:

  1. Pre-flight: Detects test runner, linter, git status
  2. Test: Runs detected test suite (skip with --skip-tests or ship.auto_test: false)
  3. Lint: Runs detected linter if present
  4. Stage: git add changed files
  5. Commit: Conventional commit format (feat:, fix:, chore:, etc.) when ship.conventional_commits: true
  6. Push: git push to current branch
  7. PR: Creates pull request with auto-generated description when ship.pr_template: true
  8. Confirm: Shows summary and suggests /compound for notable patterns

Config options:

Key Default What it controls
ship.auto_test true Run tests before shipping
ship.conventional_commits true Use conventional commit format
ship.pr_template true Auto-generate PR description

Learning checkpoint: reflect


/ideate

Codebase-grounded divergent ideation — discover what's worth building next.

/ideate                     # scan codebase and generate ideas
/ideate "[focus area]"      # scope to a specific area

What it does:

  1. Scans codebase for TODOs, test gaps, hotspots, and friction points
  2. Generates 15–25 ideas across four thinking frames:
  3. User pain: What frustrates users right now?
  4. Inversion: What if we did the opposite of the current approach?
  5. Assumption-breaking: What are we assuming that might be wrong?
  6. Leverage: Where would a small change have outsized impact?
  7. Deduplicates and adversarial-filters weak ideas
  8. Presents top 5–7 ranked survivors with effort estimates

When to use: Between milestones (after /complete-milestone, before /discuss-milestone), or when you feel stuck on what to build next. Requires an existing project — for pre-project ideation, use @agentic-learning brainstorm [idea] instead.

Agent: ideation-agent (inline persona or learnship-ideation-agent subagent).

Learning checkpoint: brainstorm · either-or


/guard

Safety mode for sensitive phases — warns before destructive commands and locks file scope.

/guard auth/ payments/ config/    # protect these directories
/guard --off                       # deactivate safety mode

What it does:

  1. Determines scope from arguments or asks interactively
  2. Creates .planning/guard-state.md with protected paths and rules
  3. While active:
  4. Warns before any destructive command (rm, DROP, truncate, etc.)
  5. Warns before editing files outside the guarded scope
  6. Adds a 🛡️ GUARD prefix to the session banner
  7. Persists across sessions via guard-state.md
  8. Deactivate with /guard --off

When to use: Working on auth, payments, database migrations, or any area where accidental changes could be catastrophic.

Learning checkpoint: learn


/sync-docs

Detects stale documentation after code changes.

/sync-docs                  # scan for drift
/sync-docs --autofix        # fix simple cases automatically

What it does:

  1. Identifies documentation files (README, docs/, API docs, inline JSDoc/docstrings)
  2. Compares against recent git changes
  3. Scans for: renamed references, outdated paths, stale examples, broken links
  4. Reports findings by severity (high/medium/low)
  5. Auto-fixes simple cases with --autofix (renamed references, updated paths)

When to use: Before /complete-milestone (it's suggested automatically), after large refactors, or periodically during long milestones.

Learning checkpoint: learn


The extended phase loop

v2.0 extends the phase loop with three new steps after verification:

flowchart LR
    DP["/discuss-phase"] --> PP["/plan-phase"] --> EP["/execute-phase"] --> VW["/verify-work"]
    VW --> RV["/review"]
    RV --> SH["/ship"]
    SH --> CP["/compound"]
    CP -->|"next phase"| DP
    VW -->|"all done"| AM["/audit-milestone"]
# Full v2.0 phase lifecycle
/discuss-phase N
/plan-phase N
/execute-phase N
/verify-work N
/review              # multi-persona code review
/ship                # test → lint → commit → push → PR
/compound            # capture what you learned
/discuss-phase N+1   # next phase

The last three steps are recommended after every phase. They surface naturally through done-banner suggestions after /verify-work passes.

v2.1 extends this with optional per-phase workflows:

/verify-work N       # manual UAT
/secure-phase N      # v2.1: STRIDE security verification
/review              # multi-persona code review
/ship                # test → commit → push → PR
/compound            # capture what you learned
/extract-learnings N # v2.1: structured meta-knowledge extraction

See also: Security & Documentation · Session & Learnings · Recovery


/ideate (v2.1 enhanced)

v2.1 adds --explore mode for Socratic exploration alongside the existing scan mode:

/ideate                          # scan mode: codebase hotspots → ranked ideas
/ideate [focus]                  # focused scan on a specific area
/ideate --explore [topic]        # v2.1: Socratic exploration with mid-conversation research

In --explore mode, the agent asks one question at a time, offers mid-conversation research when factual questions arise, and crystallizes outputs to notes, todos, decisions, or phase proposals.


Agent personas

17 agent personas, each available as inline (sequential with <persona_context> blocks), @./agents/ file reference, and dispatch (parallel subagent via Task()). On Windsurf, personas are installed as model_decision rules for native conditional adoption.

Agent Role Sandbox mode (Codex)
planner Creates executable implementation plans workspace-write
executor Implements code from plans, one task at a time workspace-write
verifier Checks plans/implementation against requirements workspace-write
debugger Diagnoses root cause, not symptoms workspace-write
researcher Domain investigation, web research, pattern discovery workspace-write
project-researcher Domain ecosystem research for /new-project (v2.3) workspace-write
research-synthesizer Synthesizes 4 research files into SUMMARY.md (v2.3) workspace-write
phase-researcher Focused phase research for /plan-phase (v2.3) workspace-write
roadmapper Creates phased roadmaps from requirements (v2.3) workspace-write
solution-writer Writes structured solution documents workspace-write
code-reviewer Reviews code through persona-specific lenses read-only
challenger Stress-tests proposals through forcing questions read-only
ideation-agent Generates codebase-grounded improvement ideas read-only
plan-checker Validates plan quality, missing steps, estimates read-only
security-auditor STRIDE threat verification (v2.1) read-only
doc-writer Documentation generation and verification (v2.1) workspace-write
doc-verifier Verifies docs match live codebase (v2.3) read-only