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
@@ -0,0 +1,159 @@
1
+ # Solution Schema Reference
2
+
3
+ Canonical contract for `.planning/solutions/` frontmatter written by the `/compound` workflow.
4
+
5
+ Use this file as the quick reference for:
6
+ - Required fields
7
+ - Enum values
8
+ - Validation expectations
9
+ - Category mapping
10
+ - Track classification (bug vs knowledge)
11
+
12
+ ## Tracks
13
+
14
+ The `problem_type` determines which **track** applies. Each track has different required and optional fields.
15
+
16
+ | Track | problem_types | Description |
17
+ |-------|--------------|-------------|
18
+ | **Bug** | `build_error`, `test_failure`, `runtime_error`, `performance_issue`, `database_issue`, `security_issue`, `ui_bug`, `integration_issue`, `logic_error` | Defects and failures that were diagnosed and fixed |
19
+ | **Knowledge** | `best_practice`, `documentation_gap`, `workflow_issue`, `developer_experience` | Practices, patterns, workflow improvements, and documentation |
20
+
21
+ ## Required Fields (both tracks)
22
+
23
+ - **title**: Clear problem/learning title
24
+ - **date**: ISO date in `YYYY-MM-DD`
25
+ - **category**: Category directory from mapping below
26
+ - **module**: Module or area affected
27
+ - **problem_type**: One of the values listed in the Tracks table above
28
+ - **severity**: One of `critical`, `high`, `medium`, `low`
29
+
30
+ ## Optional Fields (both tracks)
31
+
32
+ - **tags**: Search keywords, lowercase and hyphen-separated
33
+ - **last_updated**: ISO date `YYYY-MM-DD` — added when updating an existing doc
34
+
35
+ ## Bug Track Additional Fields
36
+
37
+ Optional but recommended:
38
+ - **symptoms**: YAML array with 1-5 observable symptoms (errors, broken behavior)
39
+ - **root_cause**: Brief description of the underlying cause
40
+ - **resolution_type**: One of `code_fix`, `migration`, `config_change`, `test_fix`, `dependency_update`, `environment_setup`, `workflow_improvement`, `documentation_update`, `tooling_addition`
41
+
42
+ ## Knowledge Track Additional Fields
43
+
44
+ Optional:
45
+ - **applies_when**: Conditions or situations where this guidance applies
46
+
47
+ ## Category Mapping
48
+
49
+ Map from `problem_type` to `.planning/solutions/` subdirectory:
50
+
51
+ - `build_error` → `.planning/solutions/build-errors/`
52
+ - `test_failure` → `.planning/solutions/test-failures/`
53
+ - `runtime_error` → `.planning/solutions/runtime-errors/`
54
+ - `performance_issue` → `.planning/solutions/performance-issues/`
55
+ - `database_issue` → `.planning/solutions/database-issues/`
56
+ - `security_issue` → `.planning/solutions/security-issues/`
57
+ - `ui_bug` → `.planning/solutions/ui-bugs/`
58
+ - `integration_issue` → `.planning/solutions/integration-issues/`
59
+ - `logic_error` → `.planning/solutions/logic-errors/`
60
+ - `best_practice` → `.planning/solutions/best-practices/`
61
+ - `workflow_issue` → `.planning/solutions/workflow-issues/`
62
+ - `developer_experience` → `.planning/solutions/developer-experience/`
63
+ - `documentation_gap` → `.planning/solutions/documentation-gaps/`
64
+
65
+ ## Bug Track Template
66
+
67
+ ```markdown
68
+ ---
69
+ title: [Clear problem title]
70
+ date: [YYYY-MM-DD]
71
+ category: [category directory]
72
+ module: [module or area]
73
+ problem_type: [enum value]
74
+ severity: [critical|high|medium|low]
75
+ tags: [keyword-one, keyword-two]
76
+ ---
77
+
78
+ # [Clear problem title]
79
+
80
+ ## Problem
81
+ [1-2 sentence description of the issue and impact]
82
+
83
+ ## Symptoms
84
+ - [Observable symptom or error]
85
+
86
+ ## What Didn't Work
87
+ - [Attempted fix and why it failed]
88
+
89
+ ## Solution
90
+ [The fix that worked, including code snippets]
91
+
92
+ ## Why This Works
93
+ [Root cause explanation and why the fix addresses it]
94
+
95
+ ## Prevention
96
+ - [Concrete practice, test, or guardrail]
97
+
98
+ ## Related
99
+ - [Related docs or issues, if any]
100
+ ```
101
+
102
+ ## Knowledge Track Template
103
+
104
+ ```markdown
105
+ ---
106
+ title: [Clear, descriptive title]
107
+ date: [YYYY-MM-DD]
108
+ category: [category directory]
109
+ module: [module or area]
110
+ problem_type: [enum value]
111
+ severity: [critical|high|medium|low]
112
+ tags: [keyword-one, keyword-two]
113
+ ---
114
+
115
+ # [Clear, descriptive title]
116
+
117
+ ## Context
118
+ [What situation, gap, or friction prompted this guidance]
119
+
120
+ ## Guidance
121
+ [The practice, pattern, or recommendation with code examples]
122
+
123
+ ## Why This Matters
124
+ [Rationale and impact of following or not following this guidance]
125
+
126
+ ## When to Apply
127
+ - [Conditions or situations where this applies]
128
+
129
+ ## Examples
130
+ [Concrete before/after or usage examples]
131
+
132
+ ## Related
133
+ - [Related docs or issues, if any]
134
+ ```
135
+
136
+ ## Validation Rules
137
+
138
+ 1. Determine the track from `problem_type` using the Tracks table
139
+ 2. All required fields must be present
140
+ 3. Enum fields must match allowed values exactly
141
+ 4. `date` must match `YYYY-MM-DD`
142
+ 5. `tags` should be lowercase and hyphen-separated
143
+ 6. Filename pattern: `[sanitized-problem-slug]-[YYYY-MM-DD].md`
144
+
145
+ ## Overlap Assessment
146
+
147
+ When existing solutions exist, assess overlap across five dimensions:
148
+
149
+ 1. Problem statement
150
+ 2. Root cause
151
+ 3. Solution approach
152
+ 4. Referenced files
153
+ 5. Prevention rules
154
+
155
+ | Score | Dimensions | Action |
156
+ |-------|-----------|--------|
157
+ | **High** | 4-5 match | Update existing doc, add `last_updated` |
158
+ | **Moderate** | 2-3 match | Create new doc, note overlap |
159
+ | **Low** | 0-1 match | Create new doc normally |
@@ -0,0 +1,61 @@
1
+ <thinking_models>
2
+
3
+ Structured reasoning models for the **planner** and **plan-checker** agents. Apply these at decision points during plan creation, not continuously. Each model counters a specific failure mode.
4
+
5
+ ## Conflict Resolution
6
+
7
+ Pre-Mortem and Constraint Analysis both analyze risk at different granularities. Run Constraint Analysis FIRST (identify the hardest constraint), then Pre-Mortem (enumerate failure modes around that constraint and the rest of the plan).
8
+
9
+ ## 1. Pre-Mortem Analysis
10
+
11
+ **Counters:** Optimistic plan decomposition that ignores failure modes.
12
+
13
+ Before finalizing this plan, assume it has already failed. List the 3 most likely reasons for failure — missing dependency, wrong decomposition, underestimated complexity — and add mitigation steps or acceptance criteria that would catch each failure early.
14
+
15
+ ## 2. MECE Decomposition
16
+
17
+ **Counters:** Overlapping tasks (merge conflicts) or gapped tasks (missing requirements).
18
+
19
+ Verify this task breakdown is MECE at the REQUIREMENT level: (1) list every requirement from the phase goal, (2) confirm each maps to exactly one task's `<done>`, (3) if two tasks modify the same file, confirm they modify DIFFERENT sections or serve DIFFERENT requirements, (4) flag any requirement not covered by any task.
20
+
21
+ ## 3. Constraint Analysis
22
+
23
+ **Counters:** Deferring the hardest constraint to the last task, causing late-stage failures.
24
+
25
+ Identify the single hardest constraint in this phase — the one thing that, if it doesn't work, makes everything else irrelevant. Schedule that constraint as Task 1 or 2, not last. If the constraint involves an external API or unfamiliar library, add a spike/proof-of-concept task before the main implementation.
26
+
27
+ ## 4. Reversibility Test
28
+
29
+ **Counters:** Over-analyzing cheap decisions, under-analyzing costly ones.
30
+
31
+ For each significant decision in this plan, classify as REVERSIBLE (can change later with low cost) or IRREVERSIBLE (changing later requires migration, breaking changes, or significant rework). Spend analysis time proportional to irreversibility. For irreversible decisions, document the rationale in the plan.
32
+
33
+ ## 5. Curse of Knowledge Counter
34
+
35
+ **Counters:** Plan-to-executor ambiguity from compressed instructions.
36
+
37
+ For each `<action>` step, re-read it as if you have NEVER seen this codebase. Is every noun unambiguous (which file? which function? which endpoint?)? Is every verb specific (add WHERE? modify HOW?)? If a step could be interpreted two ways, rewrite it. Include file paths, function names, and expected behavior in every action step.
38
+
39
+ ## 6. Base Rate Neglect Counter
40
+
41
+ **Counters:** Planners ignoring low-confidence research caveats.
42
+
43
+ Before finalizing the plan, read ALL `[NEEDS DECISION]` items and LOW-confidence recommendations from RESEARCH.md. For each: either (a) create a checkpoint task to resolve it, or (b) document why the risk is acceptable in the plan's deviation notes. Low-confidence items that are silently accepted become undocumented technical debt.
44
+
45
+ ## Gap Closure Mode: Root-Cause Check
46
+
47
+ **Applies only when:** Planner enters gap closure mode (triggered by `gaps_found` in VERIFICATION.md).
48
+
49
+ Before writing the fix plan, apply a single "why" round: Why did this gap occur? Was it a plan deficiency (wrong task), an execution miss (correct task, wrong implementation), or a changed assumption (environment/dependency shift)? The fix plan must target the root cause category, not just the symptom.
50
+
51
+ ---
52
+
53
+ ## When NOT to Think
54
+
55
+ Skip structured reasoning models when the situation does not benefit from them:
56
+
57
+ - **Single-task plans** — If the phase has one clear requirement and one obvious task, do not run Pre-Mortem or MECE analysis. Write the task directly.
58
+ - **Well-researched phases** — If RESEARCH.md has HIGH-confidence recommendations for every decision and no `[NEEDS DECISION]` items, skip Base Rate Neglect Counter.
59
+ - **Gap closure plans** — Focus on the Root-Cause Check model only. Skip all others — the original plan already went through them.
60
+
61
+ </thinking_models>
@@ -0,0 +1,51 @@
1
+ <universal_anti_patterns>
2
+
3
+ Rules that apply to ALL workflows and agents. Individual workflows may have additional specific anti-patterns.
4
+
5
+ ---
6
+
7
+ ## Context Budget Rules
8
+
9
+ 1. **Never** read agent definition files (`agents/*.md`) when spawning subagents — `subagent_type` auto-loads them. Reading agent definitions into the orchestrator wastes context for content automatically injected into subagent sessions.
10
+ 2. **Never** inline large files into subagent prompts — tell agents to read files from disk instead. Agents have their own context windows.
11
+ 3. **Read depth scales with context window** — check `context_window` in `.planning/config.json`. At < 500000: read only frontmatter, status fields, or summaries. At >= 500000: full body reads permitted when content is needed for inline decisions. See `references/context-budget.md` for the complete table.
12
+ 4. **Delegate** heavy work to subagents — the orchestrator routes, it does not build, analyze, research, investigate, or verify.
13
+ 5. **Proactive pause warning**: If you have already consumed significant context (large file reads, multiple subagent results), warn the user: "Context budget is getting heavy. Consider checkpointing progress."
14
+
15
+ ## File Reading Rules
16
+
17
+ 6. **SUMMARY.md read depth scales with context window** — at context_window < 500000: read frontmatter only from prior phase SUMMARYs. At >= 500000: full body reads permitted for direct-dependency phases. Transitive dependencies (2+ phases back) remain frontmatter-only regardless.
18
+ 7. **Never** read full PLAN.md files from other phases — only current phase plans.
19
+ 8. **Do not** re-read full file contents when frontmatter is sufficient — frontmatter contains status, key_files, commits, and provides fields.
20
+
21
+ ## Subagent Rules
22
+
23
+ 9. **Always use learnship agent types** (`learnship-executor`, `learnship-planner`, `learnship-phase-researcher`, etc.) — never fall back to generic or built-in agent types. Learnship agents have project-aware prompts and workflow context.
24
+ 10. **Do not** re-litigate decisions that are already locked in CONTEXT.md — respect locked decisions unconditionally.
25
+
26
+ ## Questioning Anti-Patterns
27
+
28
+ 11. **Do not** walk through checklists — checklist walking (asking items one by one from a list) is the #1 anti-pattern. Instead, use progressive depth: start broad, dig where interesting.
29
+ 12. **Do not** use corporate speak — avoid jargon like "stakeholder alignment", "synergize", "deliverables". Use plain language.
30
+ 13. **Do not** apply premature constraints — don't narrow the solution space before understanding the problem. Ask about the problem first, then constrain.
31
+
32
+ ## State Management Anti-Patterns
33
+
34
+ 14. **Always use atomic file writes for STATE.md and ROADMAP.md.** Read the current content, modify, write the whole file. Do not use append-only operations that could corrupt the file on interruption.
35
+ 15. **Never** skip STATE.md updates after completing work — downstream workflows depend on accurate state.
36
+
37
+ ## Behavioral Rules
38
+
39
+ 16. **Do not** create artifacts the user did not approve — always confirm before writing new planning documents.
40
+ 17. **Do not** modify files outside the workflow's stated scope — check the plan's files_modified list.
41
+ 18. **Do not** suggest multiple next actions without clear priority — one primary suggestion, alternatives listed secondary.
42
+ 19. **Do not** use `git add .` or `git add -A` — stage specific files only.
43
+ 20. **Do not** include sensitive information (API keys, passwords, tokens) in planning documents or commits.
44
+
45
+ ## Error Recovery Rules
46
+
47
+ 21. **Git lock detection**: Before any git operation, if it fails with "Unable to create lock file", check for stale `.git/index.lock` and advise the user to remove it (do not remove automatically).
48
+ 22. **Config fallback awareness**: Config loading returns `null` silently on invalid JSON. If your workflow depends on config values, check for null and warn the user: "config.json is invalid or missing — running with defaults."
49
+ 23. **Partial state recovery**: If STATE.md references a phase directory that doesn't exist, do not proceed silently. Warn the user and suggest diagnosing the mismatch.
50
+
51
+ </universal_anti_patterns>
@@ -21,6 +21,9 @@ collaborators with different strengths.
21
21
  The "why" matters more than the "what."
22
22
  - **Domain-aware, not domain-faking.** Know the domain of this project. When uncertain about
23
23
  domain concepts, say so rather than hallucinate. Getting it wrong here has real consequences.
24
+ - **Stop when confused, not after.** If something is ambiguous, surface it immediately. Present
25
+ the interpretations. Ask which one. Don't pick silently and run with it — that's how wrong
26
+ assumptions become wrong code.
24
27
  - **Learnings are first-class.** Every significant fix gets a "why it broke" and "what we
25
28
  learned." This is non-negotiable.
26
29
  - **Swearing is allowed when it lands.** Don't force it. Don't avoid it.
@@ -46,9 +49,13 @@ Decision-making heuristics for navigating ambiguity.
46
49
  When something is hard to implement, that's information about the design — not just an
47
50
  obstacle to power through. Investigate the resistance before routing around it.
48
51
 
49
- ### 2. Minimal Upstream Fix Over Downstream Workaround
52
+ ### 2. Minimal Fix, Surgical Change
50
53
 
51
- Fix the root cause. Don't patch symptoms. One fix, one place.
54
+ Fix the root cause, not the symptoms. One fix, one place. Touch only what you must — don't
55
+ "improve" adjacent code, comments, or formatting. Don't refactor things that aren't broken.
56
+ Match existing style, even if you'd do it differently. Every changed line should trace directly
57
+ to the request. When your changes create orphans (unused imports, dead variables), clean those
58
+ up — but don't remove pre-existing dead code unless asked.
52
59
 
53
60
  ### 3. Preserve Real-World Signal
54
61
 
@@ -70,15 +77,19 @@ future guardrails.
70
77
 
71
78
  When we disagree, the motivation is wanting the project to succeed — not being right.
72
79
 
73
- ### 7. One Moving Part at a Time
80
+ ### 7. One Thing at a Time, Nothing Extra
74
81
 
75
82
  When debugging or adding features, change one thing, verify, then move to the next.
76
- Multi-variable changes obscure what actually fixed the problem.
83
+ Multi-variable changes obscure what actually fixed the problem. Write the minimum code
84
+ that solves the stated problem — no speculative features, no abstractions for single-use
85
+ cases, no "flexibility" that wasn't requested. If 200 lines could be 50, rewrite.
77
86
 
78
- ### 8. Code Reads > Code Writes
87
+ ### 8. Understand First, Then Change
79
88
 
80
89
  Read existing code thoroughly before editing. Understand the current design before proposing
81
- changes. Most bugs come from not understanding what's already there. Read first, always.
90
+ changes. Most bugs come from not understanding what's already there. When something is
91
+ ambiguous and multiple interpretations exist, present them and ask — don't silently pick one.
92
+ If you're confused, stop. Name what's unclear. Ask.
82
93
 
83
94
  ### 9. Keep Copies in Sync
84
95
 
@@ -92,14 +103,61 @@ follow. The map should become territory.
92
103
 
93
104
  ---
94
105
 
106
+ ## Request Routing Protocol
107
+
108
+ **This section is mandatory. Apply it before responding to ANY user message.**
109
+
110
+ When a user sends a message — whether it's a vague idea, a specific bug report, a feature request, or a detailed technical prompt — you MUST route it through the correct learnship workflow. **Do not make code changes, fix bugs, or implement anything in direct response to a user message.** Every task goes through a workflow.
111
+
112
+ ### Decision tree — apply in order:
113
+
114
+ **0. Is `/new-project` currently in progress?**
115
+
116
+ If `.planning/PROJECT.md` does NOT exist but you are currently running `/new-project` (i.e., you have asked "What do you want to build?" and are waiting for answers, or you are in any step of the new-project ceremony): **the user's message is an answer to your workflow question, not a task to route.** Do NOT apply the routing protocol. Continue the `/new-project` ceremony from where you left off.
117
+
118
+ **1. Is there a `.planning/PROJECT.md`?**
119
+ - **No** → Stop. Tell the user: "No project found. Run `/new-project` to initialize." Do nothing else.
120
+ - **Yes** → Continue to step 2.
121
+
122
+ **2. Does the user message look like a task, problem, bug, or feature request?**
123
+ (Anything that would result in a code change, file edit, config change, or new capability)
124
+ - **Yes** → Route to step 3. Do NOT start implementing.
125
+ - **No** (pure question, status check, discussion) → Answer normally.
126
+
127
+ **3. How large/complex is the task?**
128
+ - **Small, self-contained** (estimated < 1 hour, touches ≤ 3 files, no design decisions needed):
129
+ → Tell the user: "This looks like a quick task. I'll run `/quick` for this — it gives us atomic commits and state tracking without full planning ceremony. Proceed?"
130
+ → Wait for confirmation, then invoke `/quick "[description]"`.
131
+ - **Medium or uncertain** (design decisions needed, multiple files, touches active phase work):
132
+ → Tell the user: "This touches phase [N] work. I'll run `/discuss-phase [N]` to capture your intent before planning. Proceed?"
133
+ → Wait for confirmation, then invoke `discuss-phase`.
134
+ - **Large or cross-cutting** (new capability, affects multiple phases, architectural):
135
+ → Tell the user: "This is significant scope. Let me check where we are first."
136
+ → Run `/ls` to show current status, then recommend the right workflow (plan-phase, new-milestone, etc).
137
+
138
+ **4. Never self-route silently.**
139
+ Always tell the user which workflow you're about to invoke and why, then wait for a "yes" before proceeding. Do not assume consent from a detailed prompt.
140
+
141
+ ### Examples of what NOT to do:
142
+ - User says "the login button is broken" → ❌ Don't fix it directly → ✅ Route to `/quick`
143
+ - User says "I want to add dark mode" → ❌ Don't start implementing → ✅ Route to `discuss-phase`
144
+ - User pastes a detailed spec → ❌ Don't treat it as a command to execute → ✅ Classify size, propose workflow, wait for yes
145
+ - `/new-project` asked "What do you want to build?" and user replies with a detailed description → ❌ Don't treat as a task to route → ✅ It is ANSWER_1. Record it and ask Exchange 2.
146
+
147
+ ---
148
+
95
149
  ## Platform Context
96
150
 
97
151
  This project uses **learnship**. Key facts:
98
152
 
99
153
  - All planning artifacts live in `.planning/` — read STATE.md and ROADMAP.md first when unsure where we are
100
- - The phase loop: `discuss-phase` → `plan-phase` → `execute-phase` → `verify-work` → `review` → `ship` → `compound`
154
+ - The phase loop: `discuss-phase` → `plan-phase` → `execute-phase` → `verify-work` → `/review` → `/ship` → `/compound`
155
+ - Optional per-phase: `/secure-phase` (security verification), `/extract-learnings` (capture meta-knowledge)
156
+ - Recovery: `/forensics` (post-mortem), `/undo` (safe revert)
101
157
  - Current status is always in `.planning/STATE.md`
102
158
  - Decisions are tracked in `.planning/DECISIONS.md` — read it before proposing approaches that may conflict
159
+ - Compounded solutions live in `.planning/solutions/` — organized by category with YAML frontmatter (module, problem_type, severity, tags). Search these before planning to avoid reinventing known solutions
160
+ - Quick ideas: `/note [text]` for zero-friction capture, `/session-report` for end-of-session summaries
103
161
  - Run `/ls` if context is unclear about what phase we're on or what to do next — it shows status and offers to run the next step
104
162
 
105
163
  ---
@@ -143,6 +201,8 @@ This project uses **learnship**. Key facts:
143
201
 
144
202
  ## Skills — Operational Knowledge
145
203
 
204
+ <!-- LEARNSHIP_SKILLS_BLOCK -->
205
+
146
206
  ### CHANGELOG Discipline
147
207
 
148
208
  Every significant change gets a dated entry in `CHANGELOG.md` with:
@@ -156,6 +216,19 @@ Architectural and scope decisions are tracked in `.planning/DECISIONS.md`.
156
216
  Read it before proposing an approach that has been previously considered.
157
217
  When a new decision is made during a session, capture it with `/decision-log`.
158
218
 
219
+ ### Solutions Store
220
+
221
+ Compounded solutions live in `.planning/solutions/` — organized by category (build-errors, runtime-errors, best-practices, etc.) with YAML frontmatter for searchability. The `/plan-phase` workflow automatically searches these before planning.
222
+
223
+ **Run `/compound` after any of these events — do not skip:**
224
+ - Fixing a bug (especially root-cause discoveries)
225
+ - Completing a phase (`execute-phase` → `verify-work` → `/compound`)
226
+ - Shipping a feature (`/ship` → `/compound`)
227
+ - Any aha moment or pattern discovery during development
228
+ - Resolving a debugging session (`/debug` → `/compound`)
229
+
230
+ Context fades fast. If a solution was worth finding, it's worth capturing.
231
+
159
232
  ---
160
233
 
161
234
  ## Regressions — What Broke and What We Learned
@@ -1,9 +1,8 @@
1
1
  {
2
- "mode": "yolo",
2
+ "mode": "interactive",
3
3
  "granularity": "standard",
4
4
  "model_profile": "balanced",
5
5
  "learning_mode": "auto",
6
- "parallelization": false,
7
6
  "test_first": false,
8
7
  "planning": {
9
8
  "commit_docs": true,
@@ -16,7 +15,30 @@
16
15
  "verifier": true,
17
16
  "validation": true,
18
17
  "review": true,
19
- "solutions_search": true
18
+ "solutions_search": true,
19
+ "security_enforcement": true,
20
+ "discuss_mode": "discuss",
21
+ "tdd_mode": false
22
+ },
23
+ "parallelization": {
24
+ "enabled": false,
25
+ "plan_level": true,
26
+ "task_level": false,
27
+ "max_concurrent_agents": 5,
28
+ "min_plans_for_parallel": 2
29
+ },
30
+ "gates": {
31
+ "confirm_project": true,
32
+ "confirm_phases": true,
33
+ "confirm_roadmap": true,
34
+ "confirm_plan": true,
35
+ "execute_next_plan": true,
36
+ "issues_review": true,
37
+ "confirm_transition": true
38
+ },
39
+ "safety": {
40
+ "always_confirm_destructive": true,
41
+ "always_confirm_external_services": true
20
42
  },
21
43
  "review": {
22
44
  "auto_after_verify": false
@@ -26,6 +48,9 @@
26
48
  "conventional_commits": true,
27
49
  "pr_template": true
28
50
  },
51
+ "hooks": {
52
+ "context_warnings": true
53
+ },
29
54
  "git": {
30
55
  "branching_strategy": "none",
31
56
  "phase_branch_template": "phase-{phase}-{slug}",