learnship 2.0.10 → 2.1.0
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.
- package/.claude-plugin/plugin.json +2 -2
- package/.cursor-plugin/plugin.json +2 -2
- package/README.md +59 -14
- package/SKILL.md +24 -2
- package/agents/learnship-doc-writer.md +63 -0
- package/agents/learnship-security-auditor.md +67 -0
- package/bin/install.js +9 -4
- package/commands/learnship/discuss-phase.md +1 -1
- package/commands/learnship/docs-update.md +22 -0
- package/commands/learnship/execute-phase.md +2 -6
- package/commands/learnship/extract-learnings.md +22 -0
- package/commands/learnship/forensics.md +21 -0
- package/commands/learnship/help.md +2 -1
- package/commands/learnship/ideate.md +1 -1
- package/commands/learnship/milestone-summary.md +22 -0
- package/commands/learnship/note.md +22 -0
- package/commands/learnship/plan-phase.md +0 -1
- package/commands/learnship/quick.md +1 -5
- package/commands/learnship/secure-phase.md +23 -0
- package/commands/learnship/session-report.md +21 -0
- package/commands/learnship/undo.md +22 -0
- package/commands/learnship/verify-work.md +1 -1
- package/cursor-rules/learnship.mdc +12 -2
- package/gemini-extension.json +2 -2
- package/hooks/session-start +12 -1
- package/learnship/agents/doc-writer.md +63 -0
- package/learnship/agents/security-auditor.md +67 -0
- package/learnship/references/common-bug-patterns.md +92 -0
- package/learnship/references/context-budget.md +49 -0
- package/learnship/references/domain-probes.md +133 -0
- package/learnship/references/gates.md +72 -0
- package/learnship/references/planning-config.md +99 -9
- package/learnship/references/thinking-models.md +61 -0
- package/learnship/references/universal-anti-patterns.md +51 -0
- package/learnship/templates/agents.md +20 -6
- package/learnship/templates/context.md +207 -32
- package/learnship/templates/discussion-log.md +49 -0
- package/learnship/templates/security.md +61 -0
- package/learnship/templates/ui-spec.md +107 -0
- package/learnship/workflows/complete-milestone.md +4 -5
- package/learnship/workflows/compound.md +2 -0
- package/learnship/workflows/debug.md +2 -0
- package/learnship/workflows/discuss-phase.md +73 -15
- package/learnship/workflows/docs-update.md +144 -0
- package/learnship/workflows/execute-phase.md +42 -7
- package/learnship/workflows/extract-learnings.md +161 -0
- package/learnship/workflows/forensics.md +118 -0
- package/learnship/workflows/help.md +20 -2
- package/learnship/workflows/ideate.md +63 -4
- package/learnship/workflows/ls.md +1 -1
- package/learnship/workflows/milestone-summary.md +150 -0
- package/learnship/workflows/new-project.md +68 -4
- package/learnship/workflows/next.md +1 -1
- package/learnship/workflows/note.md +110 -0
- package/learnship/workflows/pause-work.md +2 -0
- package/learnship/workflows/plan-phase.md +17 -2
- package/learnship/workflows/quick.md +28 -8
- package/learnship/workflows/review.md +1 -0
- package/learnship/workflows/secure-phase.md +147 -0
- package/learnship/workflows/session-report.md +133 -0
- package/learnship/workflows/settings.md +40 -46
- package/learnship/workflows/ship.md +2 -0
- package/learnship/workflows/undo.md +151 -0
- package/learnship/workflows/verify-work.md +36 -4
- package/package.json +1 -1
- package/references/common-bug-patterns.md +92 -0
- package/references/context-budget.md +49 -0
- package/references/domain-probes.md +133 -0
- package/references/gates.md +72 -0
- package/references/planning-config.md +139 -0
- package/references/solution-schema.md +159 -0
- package/references/thinking-models.md +61 -0
- package/references/universal-anti-patterns.md +51 -0
- package/templates/agents.md +80 -7
- package/templates/config.json +28 -3
- package/templates/context.md +207 -32
- package/templates/discussion-log.md +49 -0
- package/templates/security.md +61 -0
- package/templates/ui-spec.md +107 -0
|
@@ -197,21 +197,107 @@ These options were added in v2.0.0 to support the new compounding, review, ship,
|
|
|
197
197
|
| `ship.conventional_commits` | `true` | Use conventional commit format in `/ship` |
|
|
198
198
|
| `ship.pr_template` | `true` | Auto-generate PR description in `/ship` |
|
|
199
199
|
|
|
200
|
-
|
|
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
|
|
201
258
|
|
|
202
259
|
```json
|
|
203
260
|
{
|
|
204
261
|
"mode": "interactive",
|
|
262
|
+
"granularity": "standard",
|
|
205
263
|
"model_profile": "balanced",
|
|
206
264
|
"learning_mode": "auto",
|
|
207
|
-
"parallelization": false,
|
|
208
265
|
"test_first": false,
|
|
266
|
+
"planning": {
|
|
267
|
+
"commit_docs": true,
|
|
268
|
+
"commit_mode": "auto",
|
|
269
|
+
"search_gitignored": false
|
|
270
|
+
},
|
|
209
271
|
"workflow": {
|
|
210
|
-
"review": true,
|
|
211
|
-
"solutions_search": true,
|
|
212
272
|
"research": true,
|
|
213
273
|
"plan_check": true,
|
|
214
|
-
"verifier": 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
|
|
215
301
|
},
|
|
216
302
|
"review": {
|
|
217
303
|
"auto_after_verify": false
|
|
@@ -221,13 +307,17 @@ These options were added in v2.0.0 to support the new compounding, review, ship,
|
|
|
221
307
|
"conventional_commits": true,
|
|
222
308
|
"pr_template": true
|
|
223
309
|
},
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
|
|
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}"
|
|
227
317
|
}
|
|
228
318
|
}
|
|
229
319
|
```
|
|
230
320
|
|
|
231
|
-
</
|
|
321
|
+
</v21_config_options>
|
|
232
322
|
|
|
233
323
|
</planning_config>
|
|
@@ -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
|
|
52
|
+
### 2. Minimal Fix, Surgical Change
|
|
50
53
|
|
|
51
|
-
Fix the root cause
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -141,9 +152,12 @@ This project uses **learnship**. Key facts:
|
|
|
141
152
|
|
|
142
153
|
- All planning artifacts live in `.planning/` — read STATE.md and ROADMAP.md first when unsure where we are
|
|
143
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)
|
|
144
157
|
- Current status is always in `.planning/STATE.md`
|
|
145
158
|
- Decisions are tracked in `.planning/DECISIONS.md` — read it before proposing approaches that may conflict
|
|
146
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
|
|
147
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
|
|
148
162
|
|
|
149
163
|
---
|
|
@@ -6,67 +6,242 @@ workflow: discuss-phase
|
|
|
6
6
|
|
|
7
7
|
# Phase [N] Context: [Phase Name]
|
|
8
8
|
|
|
9
|
-
Implementation decisions captured during `discuss-phase [N]`. This file is
|
|
9
|
+
Implementation decisions captured during `discuss-phase [N]`. This file is the primary input for downstream agents — the researcher uses it to know WHAT to investigate, the planner uses it to know WHAT choices are locked.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
<domain>
|
|
12
|
+
## Phase Boundary
|
|
13
|
+
|
|
14
|
+
[Clear statement of what this phase delivers — the scope anchor. This comes from ROADMAP.md and is fixed. Discussion clarifies implementation within this boundary.]
|
|
15
|
+
|
|
16
|
+
</domain>
|
|
12
17
|
|
|
18
|
+
<decisions>
|
|
13
19
|
## Implementation Decisions
|
|
14
20
|
|
|
15
|
-
###
|
|
21
|
+
### [Area 1 that was discussed]
|
|
22
|
+
- **D-01:** [Specific decision made]
|
|
23
|
+
- **D-02:** [Another decision if applicable]
|
|
24
|
+
|
|
25
|
+
### [Area 2 that was discussed]
|
|
26
|
+
- **D-03:** [Specific decision made]
|
|
27
|
+
|
|
28
|
+
### [Area 3 that was discussed]
|
|
29
|
+
- **D-04:** [Specific decision made]
|
|
30
|
+
|
|
31
|
+
### Claude's Discretion
|
|
32
|
+
[Areas where user explicitly said "you decide" — the agent has flexibility here during planning/implementation]
|
|
33
|
+
|
|
34
|
+
</decisions>
|
|
35
|
+
|
|
36
|
+
<specifics>
|
|
37
|
+
## Specific Ideas
|
|
38
|
+
|
|
39
|
+
[Any particular references, examples, or "I want it like X" moments from discussion. Product references, specific behaviors, interaction patterns.]
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
[If none: "No specific requirements — open to standard approaches"]
|
|
18
42
|
|
|
19
|
-
|
|
20
|
-
- [Decision]: [Choice] — [rationale]
|
|
43
|
+
</specifics>
|
|
21
44
|
|
|
22
|
-
|
|
45
|
+
<canonical_refs>
|
|
46
|
+
## Canonical References
|
|
23
47
|
|
|
24
|
-
|
|
48
|
+
**Downstream agents MUST read these before planning or implementing.**
|
|
25
49
|
|
|
26
|
-
|
|
50
|
+
[List every spec, ADR, feature doc, or design doc that defines requirements or constraints for this phase. Use full relative paths so agents can read them directly.]
|
|
27
51
|
|
|
28
|
-
###
|
|
52
|
+
### [Topic area 1]
|
|
53
|
+
- `path/to/spec-or-adr.md` — [What this doc decides/defines that's relevant]
|
|
29
54
|
|
|
30
|
-
|
|
55
|
+
### [Topic area 2]
|
|
56
|
+
- `path/to/feature-doc.md` — [What capability this defines]
|
|
31
57
|
|
|
32
|
-
|
|
33
|
-
- [item]
|
|
34
|
-
- [item]
|
|
58
|
+
[If the project has no external specs: "No external specs — requirements are fully captured in decisions above"]
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
- [item]
|
|
38
|
-
- [item]
|
|
60
|
+
</canonical_refs>
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
<code_context>
|
|
63
|
+
## Existing Code Insights
|
|
41
64
|
|
|
42
|
-
|
|
65
|
+
### Reusable Assets
|
|
66
|
+
- [Component/hook/utility]: [How it could be used in this phase]
|
|
43
67
|
|
|
44
|
-
|
|
68
|
+
### Established Patterns
|
|
69
|
+
- [Pattern]: [How it constrains/enables this phase]
|
|
45
70
|
|
|
46
71
|
### Integration Points
|
|
72
|
+
- [Where new code connects to existing system]
|
|
47
73
|
|
|
48
|
-
|
|
74
|
+
</code_context>
|
|
49
75
|
|
|
50
|
-
|
|
76
|
+
<deferred>
|
|
77
|
+
## Deferred Ideas
|
|
51
78
|
|
|
52
|
-
|
|
79
|
+
[Ideas that came up during discussion but belong in other phases. Captured here so they're not lost, but explicitly out of scope for this phase.]
|
|
53
80
|
|
|
54
|
-
|
|
81
|
+
[If none: "None — discussion stayed within phase scope"]
|
|
55
82
|
|
|
56
|
-
|
|
83
|
+
</deferred>
|
|
57
84
|
|
|
58
85
|
---
|
|
59
86
|
|
|
60
|
-
|
|
87
|
+
*Phase: [padded]-[slug]*
|
|
88
|
+
*Context gathered: [date]*
|
|
61
89
|
|
|
62
|
-
|
|
90
|
+
---
|
|
63
91
|
|
|
64
|
-
|
|
92
|
+
<good_examples>
|
|
65
93
|
|
|
66
|
-
|
|
94
|
+
**Example 1: Visual feature (Post Feed)**
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# Phase 3: Post Feed - Context
|
|
98
|
+
|
|
99
|
+
**Gathered:** 2025-01-20
|
|
100
|
+
**Status:** Ready for planning
|
|
101
|
+
|
|
102
|
+
<domain>
|
|
103
|
+
## Phase Boundary
|
|
104
|
+
|
|
105
|
+
Display posts from followed users in a scrollable feed. Users can view posts and see engagement counts. Creating posts and interactions are separate phases.
|
|
106
|
+
</domain>
|
|
107
|
+
|
|
108
|
+
<decisions>
|
|
109
|
+
## Implementation Decisions
|
|
67
110
|
|
|
68
|
-
|
|
111
|
+
### Layout style
|
|
112
|
+
- Card-based layout, not timeline or list
|
|
113
|
+
- Each card shows: author avatar, name, timestamp, full post content, reaction counts
|
|
114
|
+
- Cards have subtle shadows, rounded corners — modern feel
|
|
69
115
|
|
|
70
|
-
|
|
116
|
+
### Loading behavior
|
|
117
|
+
- Infinite scroll, not pagination
|
|
118
|
+
- Pull-to-refresh on mobile
|
|
119
|
+
- New posts indicator at top ("3 new posts") rather than auto-inserting
|
|
120
|
+
|
|
121
|
+
### Empty state
|
|
122
|
+
- Friendly illustration + "Follow people to see posts here"
|
|
123
|
+
- Suggest 3-5 accounts to follow based on interests
|
|
124
|
+
|
|
125
|
+
### Claude's Discretion
|
|
126
|
+
- Loading skeleton design
|
|
127
|
+
- Exact spacing and typography
|
|
128
|
+
- Error state handling
|
|
129
|
+
</decisions>
|
|
130
|
+
|
|
131
|
+
<specifics>
|
|
132
|
+
## Specific Ideas
|
|
133
|
+
|
|
134
|
+
- "I like how Twitter shows the new posts indicator without disrupting your scroll position"
|
|
135
|
+
- Cards should feel like Linear's issue cards — clean, not cluttered
|
|
136
|
+
</specifics>
|
|
137
|
+
|
|
138
|
+
<canonical_refs>
|
|
139
|
+
## Canonical References
|
|
140
|
+
|
|
141
|
+
### Feed display
|
|
142
|
+
- `docs/features/social-feed.md` — Feed requirements, post card fields, engagement display rules
|
|
143
|
+
|
|
144
|
+
### Empty states
|
|
145
|
+
- `docs/design/empty-states.md` — Empty state patterns, illustration guidelines
|
|
146
|
+
</canonical_refs>
|
|
147
|
+
|
|
148
|
+
<deferred>
|
|
149
|
+
## Deferred Ideas
|
|
150
|
+
|
|
151
|
+
- Commenting on posts — Phase 5
|
|
152
|
+
- Bookmarking posts — add to backlog
|
|
153
|
+
</deferred>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Example 2: CLI tool (Database backup)**
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Phase 2: Backup Command - Context
|
|
160
|
+
|
|
161
|
+
**Gathered:** 2025-01-20
|
|
162
|
+
**Status:** Ready for planning
|
|
163
|
+
|
|
164
|
+
<domain>
|
|
165
|
+
## Phase Boundary
|
|
166
|
+
|
|
167
|
+
CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate phase.
|
|
168
|
+
</domain>
|
|
169
|
+
|
|
170
|
+
<decisions>
|
|
171
|
+
## Implementation Decisions
|
|
71
172
|
|
|
72
|
-
|
|
173
|
+
### Output format
|
|
174
|
+
- JSON for programmatic use, table format for humans
|
|
175
|
+
- Default to table, --json flag for JSON
|
|
176
|
+
- Verbose mode (-v) shows progress, silent by default
|
|
177
|
+
|
|
178
|
+
### Flag design
|
|
179
|
+
- Short flags for common options: -o (output), -v (verbose), -f (force)
|
|
180
|
+
- Long flags for clarity: --incremental, --compress, --encrypt
|
|
181
|
+
- Required: database connection string (positional or --db)
|
|
182
|
+
|
|
183
|
+
### Error recovery
|
|
184
|
+
- Retry 3 times on network failure, then fail with clear message
|
|
185
|
+
- --no-retry flag to fail fast
|
|
186
|
+
- Partial backups are deleted on failure (no corrupt files)
|
|
187
|
+
|
|
188
|
+
### Claude's Discretion
|
|
189
|
+
- Exact progress bar implementation
|
|
190
|
+
- Compression algorithm choice
|
|
191
|
+
- Temp file handling
|
|
192
|
+
</decisions>
|
|
193
|
+
|
|
194
|
+
<specifics>
|
|
195
|
+
## Specific Ideas
|
|
196
|
+
|
|
197
|
+
- "I want it to feel like pg_dump — familiar to database people"
|
|
198
|
+
- Should work in CI pipelines (exit codes, no interactive prompts)
|
|
199
|
+
</specifics>
|
|
200
|
+
|
|
201
|
+
<canonical_refs>
|
|
202
|
+
## Canonical References
|
|
203
|
+
|
|
204
|
+
### Backup CLI
|
|
205
|
+
- `docs/features/backup-restore.md` — Backup requirements, supported backends, encryption spec
|
|
206
|
+
- `docs/decisions/adr-007-cli-conventions.md` — Flag naming, exit codes, output format standards
|
|
207
|
+
</canonical_refs>
|
|
208
|
+
|
|
209
|
+
<deferred>
|
|
210
|
+
## Deferred Ideas
|
|
211
|
+
|
|
212
|
+
- Scheduled backups — separate phase
|
|
213
|
+
- Backup rotation/retention — add to backlog
|
|
214
|
+
</deferred>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
</good_examples>
|
|
218
|
+
|
|
219
|
+
<guidelines>
|
|
220
|
+
**This template captures DECISIONS for downstream agents.**
|
|
221
|
+
|
|
222
|
+
The output should answer: "What does the researcher need to investigate? What choices are locked for the planner?"
|
|
223
|
+
|
|
224
|
+
**Good content (concrete decisions):**
|
|
225
|
+
- "Card-based layout, not timeline"
|
|
226
|
+
- "Retry 3 times on network failure, then fail"
|
|
227
|
+
- "Group by year, then by month"
|
|
228
|
+
- "JSON for programmatic use, table for humans"
|
|
229
|
+
|
|
230
|
+
**Bad content (too vague):**
|
|
231
|
+
- "Should feel modern and clean"
|
|
232
|
+
- "Good user experience"
|
|
233
|
+
- "Fast and responsive"
|
|
234
|
+
- "Easy to use"
|
|
235
|
+
|
|
236
|
+
**After creation:**
|
|
237
|
+
- File lives in phase directory: `.planning/phases/XX-name/{phase_num}-CONTEXT.md`
|
|
238
|
+
- The researcher uses decisions to focus investigation AND reads canonical_refs to know WHAT docs to study
|
|
239
|
+
- The planner uses decisions + research to create executable tasks AND reads canonical_refs to verify alignment
|
|
240
|
+
- Downstream agents should NOT need to ask the user again about captured decisions
|
|
241
|
+
|
|
242
|
+
**Canonical references:**
|
|
243
|
+
- The `<canonical_refs>` section is MANDATORY. Every CONTEXT.md must have one.
|
|
244
|
+
- If your project has external specs, ADRs, or design docs, list them with full relative paths grouped by topic
|
|
245
|
+
- If ROADMAP.md lists `Canonical refs:` per phase, extract and expand those
|
|
246
|
+
- If no external specs exist, say so explicitly — don't silently omit the section
|
|
247
|
+
</guidelines>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
phase: [N]
|
|
3
|
+
slug: [phase-slug]
|
|
4
|
+
areas_discussed: []
|
|
5
|
+
created: [date]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Phase [N]: [Name] - Discussion Log
|
|
9
|
+
|
|
10
|
+
> **Audit trail only.** Do not use as input to planning, research, or execution agents.
|
|
11
|
+
> Decisions are captured in CONTEXT.md — this log preserves the alternatives considered.
|
|
12
|
+
|
|
13
|
+
**Date:** [ISO date]
|
|
14
|
+
**Phase:** [phase number]-[phase name]
|
|
15
|
+
**Areas discussed:** [comma-separated list]
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [Area 1 Name]
|
|
20
|
+
|
|
21
|
+
| Option | Description | Selected |
|
|
22
|
+
|--------|-------------|----------|
|
|
23
|
+
| [Option 1] | [Brief description] | |
|
|
24
|
+
| [Option 2] | [Brief description] | ✓ |
|
|
25
|
+
| [Option 3] | [Brief description] | |
|
|
26
|
+
|
|
27
|
+
**User's choice:** [Selected option or verbatim free-text response]
|
|
28
|
+
**Notes:** [Any clarifications or rationale provided during discussion]
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [Area 2 Name]
|
|
33
|
+
|
|
34
|
+
...
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Claude's Discretion
|
|
39
|
+
|
|
40
|
+
[Areas delegated to Claude's judgment — list what was deferred and why]
|
|
41
|
+
|
|
42
|
+
## Deferred Ideas
|
|
43
|
+
|
|
44
|
+
[Ideas mentioned but not in scope for this phase]
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
*Phase: [padded]-[slug]*
|
|
49
|
+
*Discussion log generated: [date]*
|