learnship 2.0.11 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.cursor-plugin/plugin.json +2 -2
  3. package/README.md +59 -14
  4. package/SKILL.md +24 -2
  5. package/agents/learnship-doc-writer.md +63 -0
  6. package/agents/learnship-security-auditor.md +67 -0
  7. package/bin/install.js +2 -0
  8. package/commands/learnship/discuss-phase.md +1 -1
  9. package/commands/learnship/docs-update.md +22 -0
  10. package/commands/learnship/execute-phase.md +2 -6
  11. package/commands/learnship/extract-learnings.md +22 -0
  12. package/commands/learnship/forensics.md +21 -0
  13. package/commands/learnship/help.md +2 -1
  14. package/commands/learnship/ideate.md +1 -1
  15. package/commands/learnship/milestone-summary.md +22 -0
  16. package/commands/learnship/note.md +22 -0
  17. package/commands/learnship/plan-phase.md +0 -1
  18. package/commands/learnship/quick.md +1 -5
  19. package/commands/learnship/secure-phase.md +23 -0
  20. package/commands/learnship/session-report.md +21 -0
  21. package/commands/learnship/undo.md +22 -0
  22. package/commands/learnship/verify-work.md +1 -1
  23. package/cursor-rules/learnship.mdc +12 -2
  24. package/gemini-extension.json +2 -2
  25. package/hooks/session-start +12 -1
  26. package/learnship/agents/doc-writer.md +63 -0
  27. package/learnship/agents/security-auditor.md +67 -0
  28. package/learnship/references/common-bug-patterns.md +92 -0
  29. package/learnship/references/context-budget.md +49 -0
  30. package/learnship/references/domain-probes.md +133 -0
  31. package/learnship/references/gates.md +72 -0
  32. package/learnship/references/planning-config.md +99 -9
  33. package/learnship/references/thinking-models.md +61 -0
  34. package/learnship/references/universal-anti-patterns.md +51 -0
  35. package/learnship/templates/agents.md +3 -0
  36. package/learnship/templates/context.md +207 -32
  37. package/learnship/templates/discussion-log.md +49 -0
  38. package/learnship/templates/security.md +61 -0
  39. package/learnship/templates/ui-spec.md +107 -0
  40. package/learnship/workflows/complete-milestone.md +4 -5
  41. package/learnship/workflows/compound.md +2 -0
  42. package/learnship/workflows/debug.md +2 -0
  43. package/learnship/workflows/discuss-phase.md +73 -15
  44. package/learnship/workflows/docs-update.md +144 -0
  45. package/learnship/workflows/execute-phase.md +35 -6
  46. package/learnship/workflows/extract-learnings.md +161 -0
  47. package/learnship/workflows/forensics.md +118 -0
  48. package/learnship/workflows/help.md +20 -2
  49. package/learnship/workflows/ideate.md +63 -4
  50. package/learnship/workflows/ls.md +1 -1
  51. package/learnship/workflows/milestone-summary.md +150 -0
  52. package/learnship/workflows/new-project.md +78 -8
  53. package/learnship/workflows/next.md +1 -1
  54. package/learnship/workflows/note.md +110 -0
  55. package/learnship/workflows/pause-work.md +2 -0
  56. package/learnship/workflows/plan-phase.md +17 -2
  57. package/learnship/workflows/quick.md +28 -8
  58. package/learnship/workflows/review.md +1 -0
  59. package/learnship/workflows/secure-phase.md +147 -0
  60. package/learnship/workflows/session-report.md +133 -0
  61. package/learnship/workflows/settings.md +40 -46
  62. package/learnship/workflows/ship.md +2 -0
  63. package/learnship/workflows/undo.md +151 -0
  64. package/learnship/workflows/verify-work.md +36 -4
  65. package/package.json +1 -1
  66. package/references/common-bug-patterns.md +92 -0
  67. package/references/context-budget.md +49 -0
  68. package/references/domain-probes.md +133 -0
  69. package/references/gates.md +72 -0
  70. package/references/planning-config.md +139 -0
  71. package/references/solution-schema.md +159 -0
  72. package/references/thinking-models.md +61 -0
  73. package/references/universal-anti-patterns.md +51 -0
  74. package/templates/agents.md +80 -7
  75. package/templates/config.json +28 -3
  76. package/templates/context.md +207 -32
  77. package/templates/discussion-log.md +49 -0
  78. package/templates/security.md +61 -0
  79. package/templates/ui-spec.md +107 -0
@@ -10,6 +10,20 @@ Validate built features through conversational testing. Walk through each delive
10
10
 
11
11
  **Philosophy:** Show expected, ask if reality matches. No pass/fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
12
12
 
13
+ <core_principle>
14
+ **Task completion ≠ Goal achievement**
15
+
16
+ A task "create chat component" can be marked complete when the component is a placeholder. The task was done — but the goal "working chat interface" was not achieved.
17
+
18
+ Goal-backward verification:
19
+ 1. What must be TRUE for the goal to be achieved?
20
+ 2. What must EXIST for those truths to hold?
21
+ 3. What must be WIRED for those artifacts to function?
22
+ 4. What must TESTS PROVE for those truths to be evidenced?
23
+
24
+ Then verify each level against the actual codebase.
25
+ </core_principle>
26
+
13
27
  ## Step 1: Initialize
14
28
 
15
29
  Check for existing UAT sessions:
@@ -41,7 +55,21 @@ No active UAT sessions.
41
55
  Provide a phase number to start testing (e.g., verify-work 4)
42
56
  ```
43
57
 
44
- ## Step 2: Find Deliverables
58
+ ## Step 2: Extract Must-Haves
59
+
60
+ First, extract must-haves from plan frontmatter:
61
+ ```bash
62
+ for plan in .planning/phases/[padded_phase]-[phase_slug]/*-PLAN.md; do
63
+ echo "=== $plan ==="
64
+ head -30 "$plan"
65
+ done
66
+ ```
67
+
68
+ Look for `must_haves` in each plan's frontmatter — these are the primary verification targets. If plans have must_haves, use them as the backbone of the test list.
69
+
70
+ Also check ROADMAP.md for Success Criteria for this phase — these override plan-level must_haves when both exist.
71
+
72
+ ## Step 2b: Find Deliverables
45
73
 
46
74
  Read all SUMMARY.md files for the phase:
47
75
  ```bash
@@ -55,6 +83,8 @@ Extract testable deliverables from each SUMMARY.md — focus on **user-observabl
55
83
 
56
84
  Skip internal changes (refactors, type changes, test additions).
57
85
 
86
+ **Stub detection:** Before presenting tests, do a quick scan for placeholder code using patterns from `@./references/verification-patterns.md` (if it exists). Flag any files that look like stubs — these should be tested more carefully.
87
+
58
88
  **Cold-start smoke test:** If any SUMMARY.md mentions server entry points, database files, migrations, or docker files — prepend a "Cold Start Smoke Test" as the first test:
59
89
  ```
60
90
  Expected: Kill any running server. Clear ephemeral state. Start from scratch.
@@ -198,9 +228,11 @@ Immediately run the `review` workflow for this phase's changes.
198
228
  All tests passed. ✓
199
229
 
200
230
  ▶ Recommended next steps:
201
- `/review` — multi-persona code review (6 lenses: correctness, testing, security, performance, maintainability, adversarial)
202
- `/ship` test lint commit → push → PR
203
- `/compound` capture notable solutions or patterns while context is fresh
231
+ `/review` — multi-persona code review (6 lenses)
232
+ `/secure-phase [X]` STRIDE security verification for this phase
233
+ `/ship` test lint commit push PR
234
+ `/compound` — capture notable solutions or patterns while context is fresh
235
+ `/extract-learnings [X]` — capture decisions, lessons, patterns, surprises
204
236
 
205
237
  ▶ Or continue: discuss-phase [X+1]
206
238
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learnship",
3
- "version": "2.0.11",
3
+ "version": "2.1.1",
4
4
  "description": "Learn as you build. Build with intent. — A multi-platform agentic engineering system for Windsurf, Claude Code, Cursor, OpenCode, Gemini CLI, and Codex: spec-driven workflows, integrated learning, and production-grade design.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -0,0 +1,92 @@
1
+ <common_bug_patterns>
2
+
3
+ Patterns for detecting common bugs in AI-generated code. Used by the verifier agent and verify-work workflow to catch issues that pass basic existence checks but fail in practice.
4
+
5
+ ---
6
+
7
+ ## Stub Detection
8
+
9
+ These patterns indicate placeholder code regardless of file type:
10
+
11
+ ### Comment-based stubs
12
+ ```bash
13
+ grep -E "(TODO|FIXME|XXX|HACK|PLACEHOLDER)" "$file"
14
+ grep -E "implement|add later|coming soon|will be" "$file" -i
15
+ grep -E "// \.\.\.|/\* \.\.\. \*/|# \.\.\." "$file"
16
+ ```
17
+
18
+ ### Placeholder text in output
19
+ ```bash
20
+ grep -E "placeholder|lorem ipsum|coming soon|under construction" "$file" -i
21
+ grep -E "sample|example|test data|dummy" "$file" -i
22
+ ```
23
+
24
+ ### Empty or trivial implementations
25
+ ```bash
26
+ grep -E "return null|return undefined|return \{\}|return \[\]" "$file"
27
+ grep -E "pass$|\.\.\.|\bnothing\b" "$file"
28
+ grep -E "console\.(log|warn|error).*only" "$file"
29
+ ```
30
+
31
+ ### Hardcoded values where dynamic expected
32
+ ```bash
33
+ grep -E "id.*=.*['\"].*['\"]" "$file"
34
+ grep -E "count.*=.*\d+|length.*=.*\d+" "$file"
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Wiring Gaps
40
+
41
+ Code exists but isn't connected to the rest of the system:
42
+
43
+ ### Unregistered routes
44
+ - Route handler file exists but not imported in the router/app entry
45
+ - API endpoint defined but not added to the route table
46
+
47
+ ### Unused exports
48
+ - Component exported but never imported anywhere
49
+ - Utility function exported but no consumers
50
+
51
+ ### Missing environment variables
52
+ - Code references `process.env.X` but `.env.example` doesn't list it
53
+ - Config reads a key that's not in the defaults
54
+
55
+ ### Broken imports
56
+ - Import path doesn't match actual file location (case sensitivity on Linux)
57
+ - Circular dependency that works in dev but fails in production build
58
+
59
+ ---
60
+
61
+ ## State Drift
62
+
63
+ State management issues that cause subtle bugs:
64
+
65
+ ### Stale state references
66
+ - React component reads state that was updated in a different render cycle
67
+ - Cache not invalidated after mutation
68
+
69
+ ### Race conditions
70
+ - Multiple async operations writing to the same resource
71
+ - Optimistic UI update without rollback on failure
72
+
73
+ ### Schema mismatch
74
+ - Database migration changes column type but API response type not updated
75
+ - Frontend expects field that backend stopped sending
76
+
77
+ ---
78
+
79
+ ## Verification Levels
80
+
81
+ For each artifact, verify at the appropriate level:
82
+
83
+ | Level | Check | Method |
84
+ |-------|-------|--------|
85
+ | 1. Exists | File is present at expected path | `ls [file]` |
86
+ | 2. Substantive | Content is real implementation, not placeholder | Stub detection patterns above |
87
+ | 3. Wired | Connected to the rest of the system | Import/route check |
88
+ | 4. Functional | Actually works when invoked | Run command or manual test |
89
+
90
+ Levels 1-3 can be checked programmatically. Level 4 often requires human verification (verify-work UAT).
91
+
92
+ </common_bug_patterns>
@@ -0,0 +1,49 @@
1
+ <context_budget>
2
+
3
+ Standard rules for keeping orchestrator context lean. Reference this in workflows that spawn subagents or read significant content.
4
+
5
+ ---
6
+
7
+ ## Universal Rules
8
+
9
+ Every workflow that spawns agents or reads significant content must follow these rules:
10
+
11
+ 1. **Never** read agent definition files (`agents/*.md`) — `subagent_type` auto-loads them
12
+ 2. **Never** inline large files into subagent prompts — tell agents to read files from disk instead
13
+ 3. **Read depth scales with context window** — check `context_window` in `.planning/config.json`:
14
+ - At < 500000 tokens (default 200k): read only frontmatter, status fields, or summaries
15
+ - At >= 500000 tokens (1M model): MAY read full subagent output bodies when needed for inline decisions
16
+ 4. **Delegate** heavy work to subagents — the orchestrator routes, it doesn't execute
17
+ 5. **Proactive warning**: If you've already consumed significant context (large file reads, multiple subagent results), warn the user: "Context budget is getting heavy. Consider checkpointing progress."
18
+
19
+ ## Read Depth by Context Window
20
+
21
+ | Context Window | Subagent Output Reading | SUMMARY.md | VERIFICATION.md | PLAN.md (other phases) |
22
+ |---------------|------------------------|------------|-----------------|------------------------|
23
+ | < 500k (200k model) | Frontmatter only | Frontmatter only | Frontmatter only | Current phase only |
24
+ | >= 500k (1M model) | Full body permitted | Full body permitted | Full body permitted | Current phase only |
25
+
26
+ **How to check:** Read `.planning/config.json` and inspect `context_window`. If the field is absent, treat as 200000 (conservative default).
27
+
28
+ ## Context Degradation Tiers
29
+
30
+ Monitor context usage and adjust behavior accordingly:
31
+
32
+ | Tier | Usage | Behavior |
33
+ |------|-------|----------|
34
+ | PEAK | 0-30% | Full operations. Read bodies, spawn multiple agents, inline results. |
35
+ | GOOD | 30-50% | Normal operations. Prefer frontmatter reads, delegate aggressively. |
36
+ | DEGRADING | 50-70% | Economize. Frontmatter-only reads, minimal inlining, warn user about budget. |
37
+ | POOR | 70%+ | Emergency mode. Checkpoint progress immediately. No new reads unless critical. |
38
+
39
+ ## Context Degradation Warning Signs
40
+
41
+ Quality degrades gradually before panic thresholds fire. Watch for these early signals:
42
+
43
+ - **Silent partial completion** — agent claims task is done but implementation is incomplete. Always verify agent output meets the plan's must_haves, not just that files exist.
44
+ - **Increasing vagueness** — agent starts using phrases like "appropriate handling" or "standard patterns" instead of specific code. This indicates context pressure.
45
+ - **Skipped steps** — agent omits protocol steps it would normally follow. If an agent's success criteria has 8 items but it only reports 5, suspect context pressure.
46
+
47
+ When delegating to agents, the orchestrator cannot verify semantic correctness of agent output — only structural completeness. Mitigate with must_haves and spot-check verification.
48
+
49
+ </context_budget>
@@ -0,0 +1,133 @@
1
+ <domain_probes>
2
+
3
+ Domain-aware probing patterns for `/new-project` deep questioning and `/discuss-phase` gray area identification.
4
+
5
+ When the user mentions a technology area, use these probes to ask insightful follow-up questions. Don't run through them as a checklist — pick the 2-3 most relevant based on context. The goal is to surface hidden assumptions and trade-offs the user may not have considered yet.
6
+
7
+ ---
8
+
9
+ ## Authentication
10
+
11
+ | User mentions | Probe with domain knowledge |
12
+ |---|---|
13
+ | "login" or "auth" | OAuth (which providers?), JWT, or session-based? Social login or just email/password? |
14
+ | "users" or "accounts" | MFA required? Password reset flow? Email verification? |
15
+ | "sessions" | Session duration and refresh strategy? Server-side sessions or stateless tokens? |
16
+ | "roles" or "permissions" | RBAC, ABAC, or simple role checks? How many distinct roles? |
17
+ | "API keys" | Key rotation strategy? Scoped permissions per key? Rate limiting per key? |
18
+
19
+ ---
20
+
21
+ ## Real-Time Updates
22
+
23
+ | User mentions | Probe with domain knowledge |
24
+ |---|---|
25
+ | "real-time" or "live updates" | WebSockets, SSE, or polling? What specifically needs to be real-time vs. eventual? |
26
+ | "notifications" | Push notifications (browser/mobile), in-app only, or both? Persistence and read receipts? |
27
+ | "collaboration" or "multiplayer" | Conflict resolution strategy? Operational transforms or CRDTs? Expected concurrent users? |
28
+ | "chat" or "messaging" | Message history and search? Typing indicators? Read receipts? |
29
+ | "streaming" | Reconnection strategy? What happens when the connection drops — queue or discard? |
30
+
31
+ ---
32
+
33
+ ## Dashboard
34
+
35
+ | User mentions | Probe with domain knowledge |
36
+ |---|---|
37
+ | "dashboard" | What data sources feed it? How many distinct views? |
38
+ | "charts" or "graphs" | Interactive or static? Drill-down capability? Export to CSV/PDF? |
39
+ | "metrics" or "KPIs" | Refresh strategy — real-time, periodic polling, or on-demand? Acceptable staleness? |
40
+ | "admin panel" | Role-based visibility? Which actions beyond viewing (edit, delete, approve)? |
41
+ | "mobile" or "responsive" | Simplified mobile view or full parity? Touch interactions for charts? |
42
+
43
+ ---
44
+
45
+ ## API Design
46
+
47
+ | User mentions | Probe with domain knowledge |
48
+ |---|---|
49
+ | "API" | REST, GraphQL, or RPC-style? Internal only or public-facing? |
50
+ | "endpoints" or "routes" | Versioning strategy (URL path, header, query param)? Breaking change policy? |
51
+ | "pagination" | Cursor-based or offset? Expected result set sizes? Stable ordering guarantee? |
52
+ | "rate limiting" | Per-user, per-IP, or per-API-key? Burst allowance? How to communicate limits to clients? |
53
+ | "errors" | Structured error format? Error codes vs. messages? How much detail in production errors? |
54
+
55
+ ---
56
+
57
+ ## Database
58
+
59
+ | User mentions | Probe with domain knowledge |
60
+ |---|---|
61
+ | "database" or "storage" | SQL or NoSQL? What drives the choice — relational integrity, flexibility, scale? |
62
+ | "ORM" or "queries" | ORM (which one?) or raw queries? Query builder as middle ground? |
63
+ | "migrations" | Migration tool? Rollback strategy? How to handle data migrations vs. schema migrations? |
64
+ | "seeding" or "test data" | Seed data for development? Realistic fake data or minimal fixtures? |
65
+ | "scale" or "performance" | Read/write ratio? Read replicas? Connection pooling strategy? |
66
+
67
+ ---
68
+
69
+ ## Search
70
+
71
+ | User mentions | Probe with domain knowledge |
72
+ |---|---|
73
+ | "search" | Full-text or exact match? Dedicated search engine (Elasticsearch, Meilisearch) or database-level? |
74
+ | "filtering" or "facets" | Faceted filtering? How many filter dimensions? Combined filters (AND/OR)? |
75
+ | "autocomplete" or "typeahead" | Debounce strategy? Minimum character threshold? Result ranking? |
76
+ | "indexing" | Index size and update frequency? Real-time indexing or batch? Acceptable index lag? |
77
+
78
+ ---
79
+
80
+ ## File Upload/Storage
81
+
82
+ | User mentions | Probe with domain knowledge |
83
+ |---|---|
84
+ | "upload" or "file upload" | Local filesystem or cloud (S3, GCS, Azure Blob)? Direct upload or through server? |
85
+ | "images" or "media" | Processing pipeline — resize, compress, thumbnail generation? Format conversion? |
86
+ | "size limits" | Max file size? Max total storage per user? What happens when limits are hit? |
87
+ | "documents" or "attachments" | Virus scanning? Preview generation? Versioning of uploaded files? |
88
+
89
+ ---
90
+
91
+ ## Caching
92
+
93
+ | User mentions | Probe with domain knowledge |
94
+ |---|---|
95
+ | "caching" or "performance" | Where to cache — browser, CDN, application layer, database query cache? |
96
+ | "invalidation" | Invalidation strategy — TTL, event-driven, or manual? Cache-aside vs. write-through? |
97
+ | "stale data" | Acceptable staleness window? Stale-while-revalidate pattern? |
98
+
99
+ ---
100
+
101
+ ## Testing
102
+
103
+ | User mentions | Probe with domain knowledge |
104
+ |---|---|
105
+ | "testing" or "tests" | Unit, integration, and E2E balance? Where to invest most testing effort? |
106
+ | "CI" or "pipeline" | Tests in CI? Parallel test execution? Test-on-PR or test-on-push? |
107
+ | "E2E" or "browser testing" | Playwright, Cypress, or other? Headed vs. headless? Visual regression testing? |
108
+
109
+ ---
110
+
111
+ ## Deployment
112
+
113
+ | User mentions | Probe with domain knowledge |
114
+ |---|---|
115
+ | "deploy" or "hosting" | Container, serverless, or traditional VM/VPS? Managed platform (Vercel, Railway) or self-hosted? |
116
+ | "CI/CD" or "pipeline" | GitHub Actions, GitLab CI, or other? Deploy on merge to main or manual trigger? |
117
+ | "environments" | How many environments (dev, staging, prod)? Environment parity strategy? |
118
+ | "rollback" | Rollback strategy? Blue-green, canary, or instant rollback? |
119
+ | "secrets" or "config" | Secret management — env vars, vault, or platform-native? Per-environment config strategy? |
120
+
121
+ ---
122
+
123
+ ## AI/ML Integration
124
+
125
+ | User mentions | Probe with domain knowledge |
126
+ |---|---|
127
+ | "AI" or "LLM" or "model" | Which provider/model? Streaming responses or batch? Fallback strategy? |
128
+ | "embeddings" or "RAG" | Vector store choice? Chunking strategy? Retrieval pipeline? |
129
+ | "fine-tuning" or "training" | Training data pipeline? Evaluation metrics? A/B testing new models? |
130
+ | "prompts" | Prompt versioning? Temperature/parameter management? Cost tracking? |
131
+ | "agents" or "tools" | Tool calling strategy? Human-in-the-loop? Safety guardrails? |
132
+
133
+ </domain_probes>
@@ -0,0 +1,72 @@
1
+ <gates>
2
+
3
+ Canonical gate types used across learnship workflows. Every validation checkpoint maps to one of these four types.
4
+
5
+ ---
6
+
7
+ ## Gate Types
8
+
9
+ ### Pre-flight Gate
10
+ **Purpose:** Validates preconditions before starting an operation.
11
+ **Behavior:** Blocks entry if conditions unmet. No partial work created.
12
+ **Recovery:** Fix the missing precondition, then retry.
13
+ **Examples:**
14
+ - plan-phase checks for REQUIREMENTS.md before planning
15
+ - execute-phase validates PLAN.md exists before execution
16
+ - discuss-phase confirms phase exists in ROADMAP.md
17
+
18
+ ### Revision Gate
19
+ **Purpose:** Evaluates output quality and routes to revision if insufficient.
20
+ **Behavior:** Loops back to producer with specific feedback. Bounded by iteration cap.
21
+ **Recovery:** Producer addresses feedback; checker re-evaluates. The loop also escalates early if issue count does not decrease between consecutive iterations (stall detection). After max iterations, escalates unconditionally.
22
+ **Examples:**
23
+ - Plan-checker reviewing PLAN.md (max 3 iterations)
24
+ - Verifier checking phase deliverables against success criteria
25
+
26
+ ### Escalation Gate
27
+ **Purpose:** Surfaces unresolvable issues to the developer for a decision.
28
+ **Behavior:** Pauses workflow, presents options, waits for human input.
29
+ **Recovery:** Developer chooses action; workflow resumes on selected path.
30
+ **Examples:**
31
+ - Revision loop exhausted after 3 iterations
32
+ - Ambiguous requirement needing clarification
33
+ - Security threat requiring human risk acceptance
34
+
35
+ ### Abort Gate
36
+ **Purpose:** Terminates the operation to prevent damage or waste.
37
+ **Behavior:** Stops immediately, preserves state, reports reason.
38
+ **Recovery:** Developer investigates root cause, fixes, restarts from checkpoint.
39
+ **Examples:**
40
+ - Context window critically low during execution
41
+ - STATE.md in error state
42
+ - Verification finds critical missing deliverables
43
+
44
+ ---
45
+
46
+ ## Gate Matrix
47
+
48
+ | Workflow | Phase | Gate Type | Artifacts Checked | Failure Behavior |
49
+ |----------|-------|-----------|-------------------|------------------|
50
+ | plan-phase | Entry | Pre-flight | REQUIREMENTS.md, ROADMAP.md | Block with missing-file message |
51
+ | plan-phase | Step 6 | Revision | PLAN.md quality | Loop to planner (max 3) |
52
+ | plan-phase | Post-revision | Escalation | Unresolved issues | Surface to developer |
53
+ | execute-phase | Entry | Pre-flight | PLAN.md | Block with missing-plan message |
54
+ | execute-phase | Completion | Revision | SUMMARY.md completeness | Re-run incomplete tasks |
55
+ | verify-work | Entry | Pre-flight | SUMMARY.md | Block with missing-summary |
56
+ | verify-work | Evaluation | Escalation | Failed criteria | Surface gaps to developer |
57
+ | secure-phase | Entry | Pre-flight | SUMMARY.md | Block until phase executed |
58
+ | secure-phase | Threats | Escalation | Open threats | Present to developer for decision |
59
+ | quick | Plan check | Revision | PLAN.md quality | Loop (max 2) |
60
+
61
+ ---
62
+
63
+ ## Applying Gates in Custom Workflows
64
+
65
+ When creating new workflows:
66
+
67
+ 1. **Every workflow needs at least one pre-flight gate** — check that required inputs exist before starting work
68
+ 2. **Any AI-generated output needs a revision gate** — bounded loops prevent infinite regeneration
69
+ 3. **Decisions the AI cannot make need escalation gates** — risk acceptance, ambiguous requirements, conflicting constraints
70
+ 4. **Resource exhaustion needs abort gates** — context budget, time limits, repeated failures
71
+
72
+ </gates>
@@ -181,4 +181,143 @@ Squash merge is recommended — keeps main branch history clean while preserving
181
181
 
182
182
  </branching_strategy_behavior>
183
183
 
184
+ <v2_config_options>
185
+
186
+ ## v2.0.0 Configuration Options
187
+
188
+ These options were added in v2.0.0 to support the new compounding, review, ship, and safety workflows.
189
+
190
+ | Option | Default | Description |
191
+ |--------|---------|-------------|
192
+ | `test_first` | `false` | Enable TDD mode — red-green-refactor cycle in executor |
193
+ | `workflow.review` | `true` | Enable the `/review` code review workflow |
194
+ | `workflow.solutions_search` | `true` | Search `.planning/solutions/` for prior art during plan-phase |
195
+ | `review.auto_after_verify` | `false` | Automatically run `/review` after verify-work passes |
196
+ | `ship.auto_test` | `true` | Run tests before shipping |
197
+ | `ship.conventional_commits` | `true` | Use conventional commit format in `/ship` |
198
+ | `ship.pr_template` | `true` | Auto-generate PR description in `/ship` |
199
+
200
+ </v2_config_options>
201
+
202
+ <v21_config_options>
203
+
204
+ ## v2.1.0 Configuration Options
205
+
206
+ New sections and fields added in v2.1.0 for security, parallelization control, gates, and safety.
207
+
208
+ ### Workflow Section (new fields)
209
+
210
+ | Option | Default | Description |
211
+ |--------|---------|-------------|
212
+ | `workflow.security_enforcement` | `true` | Enable per-phase security verification via `/secure-phase` |
213
+ | `workflow.discuss_mode` | `"discuss"` | Discussion mode for discuss-phase |
214
+ | `workflow.tdd_mode` | `false` | Instruct planner to apply `type: tdd` to eligible tasks |
215
+
216
+ ### Parallelization Section (replaces flat boolean)
217
+
218
+ The `parallelization` field is now an object. Legacy flat `"parallelization": true` is still honored for backward compatibility.
219
+
220
+ | Option | Default | Description |
221
+ |--------|---------|-------------|
222
+ | `parallelization.enabled` | `false` | Enable parallel subagent execution on supported platforms |
223
+ | `parallelization.plan_level` | `true` | Parallelize at plan level (each plan gets its own agent) |
224
+ | `parallelization.task_level` | `false` | Parallelize at task level within a plan (experimental) |
225
+ | `parallelization.max_concurrent_agents` | `5` | Maximum number of concurrent subagents per wave |
226
+ | `parallelization.min_plans_for_parallel` | `2` | Minimum plans in a wave before parallelization activates |
227
+
228
+ **Why default 5?** Each subagent gets its own context window (~200k tokens). 5 agents is the sweet spot for cost vs. speed — most phases have 2-5 plans per wave. Going higher risks git lock contention and significant cost spikes without proportional speed gains. Configurable for power users.
229
+
230
+ ### Gates Section
231
+
232
+ Controls which confirmation prompts are shown during workflows. Set to `false` to skip specific confirmations (useful for experienced users in yolo mode).
233
+
234
+ | Option | Default | Description |
235
+ |--------|---------|-------------|
236
+ | `gates.confirm_project` | `true` | Confirm PROJECT.md before proceeding |
237
+ | `gates.confirm_phases` | `true` | Confirm phase breakdown |
238
+ | `gates.confirm_roadmap` | `true` | Confirm roadmap before proceeding |
239
+ | `gates.confirm_plan` | `true` | Confirm plans before execution |
240
+ | `gates.execute_next_plan` | `true` | Confirm before executing each plan |
241
+ | `gates.issues_review` | `true` | Confirm issue resolution approach |
242
+ | `gates.confirm_transition` | `true` | Confirm before phase transitions |
243
+
244
+ ### Safety Section
245
+
246
+ | Option | Default | Description |
247
+ |--------|---------|-------------|
248
+ | `safety.always_confirm_destructive` | `true` | Always confirm before destructive operations (file deletion, git reset) |
249
+ | `safety.always_confirm_external_services` | `true` | Always confirm before calling external APIs or services |
250
+
251
+ ### Hooks Section
252
+
253
+ | Option | Default | Description |
254
+ |--------|---------|-------------|
255
+ | `hooks.context_warnings` | `true` | Show context budget warnings when usage is high |
256
+
257
+ ### Example config.json with all v2.1 options
258
+
259
+ ```json
260
+ {
261
+ "mode": "interactive",
262
+ "granularity": "standard",
263
+ "model_profile": "balanced",
264
+ "learning_mode": "auto",
265
+ "test_first": false,
266
+ "planning": {
267
+ "commit_docs": true,
268
+ "commit_mode": "auto",
269
+ "search_gitignored": false
270
+ },
271
+ "workflow": {
272
+ "research": true,
273
+ "plan_check": true,
274
+ "verifier": true,
275
+ "validation": true,
276
+ "review": true,
277
+ "solutions_search": true,
278
+ "security_enforcement": true,
279
+ "discuss_mode": "discuss",
280
+ "tdd_mode": false
281
+ },
282
+ "parallelization": {
283
+ "enabled": false,
284
+ "plan_level": true,
285
+ "task_level": false,
286
+ "max_concurrent_agents": 5,
287
+ "min_plans_for_parallel": 2
288
+ },
289
+ "gates": {
290
+ "confirm_project": true,
291
+ "confirm_phases": true,
292
+ "confirm_roadmap": true,
293
+ "confirm_plan": true,
294
+ "execute_next_plan": true,
295
+ "issues_review": true,
296
+ "confirm_transition": true
297
+ },
298
+ "safety": {
299
+ "always_confirm_destructive": true,
300
+ "always_confirm_external_services": true
301
+ },
302
+ "review": {
303
+ "auto_after_verify": false
304
+ },
305
+ "ship": {
306
+ "auto_test": true,
307
+ "conventional_commits": true,
308
+ "pr_template": true
309
+ },
310
+ "hooks": {
311
+ "context_warnings": true
312
+ },
313
+ "git": {
314
+ "branching_strategy": "none",
315
+ "phase_branch_template": "phase-{phase}-{slug}",
316
+ "milestone_branch_template": "{milestone}-{slug}"
317
+ }
318
+ }
319
+ ```
320
+
321
+ </v21_config_options>
322
+
184
323
  </planning_config>