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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "learnship",
3
- "description": "Agentic engineering done right — 49 structured workflows, persistent memory across sessions, integrated learning partner, and impeccable UI design system. Works with Claude Code, Windsurf, Cursor, Gemini CLI, OpenCode, and Codex.",
4
- "version": "2.0.11",
3
+ "description": "Agentic engineering done right — 57 structured workflows, persistent memory across sessions, integrated learning partner, and impeccable UI design system. Works with Claude Code, Windsurf, Cursor, Gemini CLI, OpenCode, and Codex.",
4
+ "version": "2.1.1",
5
5
  "author": {
6
6
  "name": "Favio Vazquez",
7
7
  "email": "favio.vazquezp@gmail.com"
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "learnship",
3
3
  "displayName": "learnship",
4
- "description": "Agentic engineering done right — 49 structured workflows, persistent memory across sessions, integrated learning partner, and impeccable UI design system.",
5
- "version": "2.0.11",
4
+ "description": "Agentic engineering done right — 57 structured workflows, persistent memory across sessions, integrated learning partner, and impeccable UI design system.",
5
+ "version": "2.1.1",
6
6
  "logo": "assets/logo.png",
7
7
  "author": {
8
8
  "name": "Favio Vazquez",
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  <a href="https://github.com/FavioVazquez/learnship/stargazers"><img src="https://img.shields.io/github/stars/FavioVazquez/learnship?style=flat&color=f59e0b" alt="Stars"></a>
11
11
  <a href="https://www.npmjs.com/package/learnship"><img src="https://img.shields.io/npm/v/learnship?color=cb3837&label=npm" alt="npm"></a>
12
12
  <img src="https://img.shields.io/badge/platforms-6-0ea5e9" alt="6 platforms">
13
- <img src="https://img.shields.io/badge/workflows-49-3b82f6" alt="49 workflows">
13
+ <img src="https://img.shields.io/badge/workflows-57-3b82f6" alt="57 workflows">
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -38,6 +38,7 @@ learnship gives you that harness as a portable, open-source layer that runs insi
38
38
  - **Persistent memory.** `/new-project` generates an `AGENTS.md` at your project root. Windsurf, Claude Code, and Cursor load it automatically every session; on other platforms the workflows reference it explicitly. No more repeating yourself.
39
39
  - **Structured process.** A repeatable phase loop (Discuss → Plan → Execute → Verify → Review → Ship → Compound) with spec-driven plans, wave-ordered execution, and UAT-driven verification. The harness controls what context reaches the agent at each step.
40
40
  - **Knowledge compounding (v2.0).** `/compound` captures solved problems as searchable documentation. `/review` runs multi-persona code review. `/challenge` stress-tests scope. `/ship` runs the full delivery pipeline. `/ideate` generates codebase-grounded ideas. `/guard` adds safety mode. `/sync-docs` detects stale documentation.
41
+ - **Security, recovery, and session intelligence (v2.1).** `/secure-phase` runs per-phase STRIDE threat verification. `/forensics` investigates failed workflows. `/undo` safely reverts commits. `/note` captures ideas with zero friction. `/session-report` generates stakeholder summaries. `/docs-update` generates and verifies project documentation. `/extract-learnings` captures meta-knowledge from completed phases.
41
42
  - **Built-in learning.** Neuroscience-backed checkpoints at every phase transition so you understand what you shipped, not just that you shipped it.
42
43
 
43
44
  ---
@@ -140,7 +141,7 @@ What's covered:
140
141
  - **[Platform Guide](https://faviovazquez.github.io/learnship/platform-guide/windsurf/)**: dedicated pages for Windsurf, Claude Code, Cursor, OpenCode, Gemini CLI, and Codex CLI
141
142
  - **[Core Concepts](https://faviovazquez.github.io/learnship/core-concepts/phase-loop/)**: phase loop, context engineering, planning artifacts, agentic vs vibe coding
142
143
  - **[Skills](https://faviovazquez.github.io/learnship/skills/agentic-learning/)**: all 11 `@agentic-learning` actions and all 21 `impeccable` design commands
143
- - **[Workflow Reference](https://faviovazquez.github.io/learnship/workflow-reference/core/)**: all 49 workflows documented with when and why to use each
144
+ - **[Workflow Reference](https://faviovazquez.github.io/learnship/workflow-reference/core/)**: all 57 workflows documented with when and why to use each
144
145
  - **[Configuration](https://faviovazquez.github.io/learnship/configuration/)**: full `.planning/config.json` schema, speed presets, parallelization
145
146
 
146
147
  ---
@@ -176,7 +177,7 @@ Each platform gets the best experience it supports:
176
177
  | Skills (native `@invoke`) | ✓ | — | — | — | — |
177
178
  | Skills (context files) | ✓ | ✓ | ✓ | ✓ | ✓ |
178
179
 
179
- **What "parallel subagents" means:** On Claude Code, OpenCode, and Codex, `execute-phase` can spawn a dedicated executor agent per plan within a wave, each with its own full 200k context budget. Plans in the same wave run in parallel. Enable with `"parallelization": true` in `.planning/config.json`. All platforms default to sequential (always safe).
180
+ **What "parallel subagents" means:** On Claude Code, OpenCode, and Codex, `execute-phase` can spawn a dedicated executor agent per plan within a wave, each with its own full 200k context budget. Plans in the same wave run in parallel. Enable with `"parallelization": { "enabled": true }` in `.planning/config.json` (legacy flat `"parallelization": true` also honored). Up to 5 concurrent agents per wave by default — configurable via `max_concurrent_agents`. All platforms default to sequential (always safe).
180
181
 
181
182
  ---
182
183
 
@@ -184,7 +185,7 @@ Each platform gets the best experience it supports:
184
185
 
185
186
  ![5 commands diagram](assets/quick-start-flow.png)
186
187
 
187
- learnship has 49 workflows. You don't need to know them all. Start with these five and everything else surfaces naturally from `/ls`.
188
+ learnship has 57 workflows. You don't need to know them all. Start with these five and everything else surfaces naturally from `/ls`.
188
189
 
189
190
  | Command | What it does | When to use |
190
191
  |---------|-------------|-------------|
@@ -192,7 +193,7 @@ learnship has 49 workflows. You don't need to know them all. Start with these fi
192
193
  | `/next` | Read state and immediately run the right next workflow | When you just want to keep moving |
193
194
  | `/new-project` | Full init: questions → research → requirements → roadmap | Starting a new project |
194
195
  | `/quick "..."` | One-off task with atomic commits, no planning ceremony | Small fixes, experiments |
195
- | `/help` | All 49 workflows organized by category | Discovering capabilities |
196
+ | `/help` | All 57 workflows organized by category | Discovering capabilities |
196
197
 
197
198
  > **Tip:** `/ls` works for both new and returning users. New user with no project? It explains learnship and offers to run `/new-project`. Returning user? It shows your progress and suggests exactly what to do next.
198
199
 
@@ -232,6 +233,25 @@ flowchart LR
232
233
 
233
234
  **Just starting?** `/ls` or `/next` will route you into the right step automatically.
234
235
 
236
+ **Optional per-phase:** `/secure-phase N` (STRIDE security verification), `/extract-learnings N` (capture meta-knowledge).
237
+ **Recovery:** `/forensics` (post-mortem), `/undo` (safe revert).
238
+
239
+ ### What's new in v2.1
240
+
241
+ ![v2.1 overview](assets/v21-overview.png)
242
+
243
+ v2.1 adds 8 new workflows, 5 new references, 3 new templates, and 2 new agents — all with learning checkpoints and full 6-platform support:
244
+
245
+ | Category | New workflows |
246
+ |----------|--------------|
247
+ | **Security** | `/secure-phase` — per-phase STRIDE threat verification |
248
+ | **Documentation** | `/docs-update` — generate and verify project docs against codebase |
249
+ | **Recovery** | `/forensics` — post-mortem investigation · `/undo` — safe git revert |
250
+ | **Session** | `/note` — zero-friction capture · `/session-report` — stakeholder summaries |
251
+ | **Learning** | `/extract-learnings` — decisions, lessons, patterns, surprises · `/milestone-summary` — team onboarding |
252
+
253
+ Enhanced: `/discuss-phase` (scope guardrails + domain probes), `/execute-phase` (`--wave` flag + context scaling), `/quick` (`--research --validate --full` composable flags), `/ideate` (`--explore` Socratic mode).
254
+
235
255
  ---
236
256
 
237
257
  ## 🏗️ How It Works
@@ -310,7 +330,7 @@ AGENTS.md ← your AI agent reads this every conversation
310
330
 
311
331
  ## 📖 Workflow Reference: Advanced
312
332
 
313
- > These are all 49 workflows. Most users discover them naturally from `/ls`. Scan this when you want to know if a specific capability exists.
333
+ > These are all 57 workflows. Most users discover them naturally from `/ls`. Scan this when you want to know if a specific capability exists.
314
334
 
315
335
  ### Core Workflow
316
336
 
@@ -411,11 +431,10 @@ Project settings live in `.planning/config.json`. Set during `/new-project` or e
411
431
 
412
432
  ```json
413
433
  {
414
- "mode": "yolo",
434
+ "mode": "interactive",
415
435
  "granularity": "standard",
416
436
  "model_profile": "balanced",
417
437
  "learning_mode": "auto",
418
- "parallelization": false,
419
438
  "test_first": false,
420
439
  "planning": {
421
440
  "commit_docs": true,
@@ -428,7 +447,30 @@ Project settings live in `.planning/config.json`. Set during `/new-project` or e
428
447
  "verifier": true,
429
448
  "validation": true,
430
449
  "review": true,
431
- "solutions_search": true
450
+ "solutions_search": true,
451
+ "security_enforcement": true,
452
+ "discuss_mode": "discuss",
453
+ "tdd_mode": false
454
+ },
455
+ "parallelization": {
456
+ "enabled": false,
457
+ "plan_level": true,
458
+ "task_level": false,
459
+ "max_concurrent_agents": 5,
460
+ "min_plans_for_parallel": 2
461
+ },
462
+ "gates": {
463
+ "confirm_project": true,
464
+ "confirm_phases": true,
465
+ "confirm_roadmap": true,
466
+ "confirm_plan": true,
467
+ "execute_next_plan": true,
468
+ "issues_review": true,
469
+ "confirm_transition": true
470
+ },
471
+ "safety": {
472
+ "always_confirm_destructive": true,
473
+ "always_confirm_external_services": true
432
474
  },
433
475
  "review": {
434
476
  "auto_after_verify": false
@@ -438,6 +480,9 @@ Project settings live in `.planning/config.json`. Set during `/new-project` or e
438
480
  "conventional_commits": true,
439
481
  "pr_template": true
440
482
  },
483
+ "hooks": {
484
+ "context_warnings": true
485
+ },
441
486
  "git": {
442
487
  "branching_strategy": "none",
443
488
  "phase_branch_template": "phase-{phase}-{slug}",
@@ -454,7 +499,7 @@ Project settings live in `.planning/config.json`. Set during `/new-project` or e
454
499
  | `granularity` | `coarse`, `standard`, `fine` | `standard` | Phase size: 3-5 / 5-8 / 8-12 phases |
455
500
  | `model_profile` | `quality`, `balanced`, `budget` | `balanced` | Agent model tier (see table below) |
456
501
  | `learning_mode` | `auto`, `manual` | `auto` | `auto` offers learning at checkpoints; `manual` requires explicit invocation |
457
- | `parallelization` | `true`, `false` | `false` | Parallel subagents per plan on supported platforms |
502
+ | `parallelization.enabled` | `true`, `false` | `false` | Parallel subagents per plan on supported platforms |
458
503
  | `test_first` | `true`, `false` | `false` | TDD mode: write failing test first, verify red, implement, verify green |
459
504
  | `planning.commit_mode` | `auto`, `manual` | `auto` | `auto` commits after each workflow step; `manual` skips all git commits |
460
505
 
@@ -802,7 +847,7 @@ Run `/audit-milestone` to surface all gaps, then `/plan-milestone-gaps` to creat
802
847
  ```
803
848
  learnship/
804
849
  ├── .windsurf/
805
- │ ├── workflows/ # 49 workflows as slash commands
850
+ │ ├── workflows/ # 57 workflows as slash commands
806
851
  │ └── skills/
807
852
  │ ├── agentic-learning/ # Learning partner (SKILL.md + references), native on Windsurf + Claude Code
808
853
  │ └── impeccable/ # Design suite: 21 skills, native on Windsurf + Claude Code
@@ -812,13 +857,13 @@ learnship/
812
857
  │ ├── polish/ # /polish
813
858
  │ └── …14 more/ # /colorize /animate /bolder /quieter /distill /clarify…
814
859
  │ # → on OpenCode/Gemini/Codex: both skills copied to learnship/skills/ as context files
815
- ├── commands/ # 49 Claude Code-style slash command wrappers
860
+ ├── commands/ # 57 Claude Code-style slash command wrappers
816
861
  │ └── learnship/ # /learnship:ls, /learnship:new-project, etc.
817
862
  ├── learnship/ # Payload installed into the target platform config dir
818
- │ ├── workflows/ # 49 workflow markdown files (the actual instructions)
863
+ │ ├── workflows/ # 57 workflow markdown files (the actual instructions)
819
864
  │ ├── references/ # Reference docs (questioning, verification, git, design, learning)
820
865
  │ └── templates/ # Document templates for .planning/ + AGENTS.md template
821
- ├── agents/ # 10 agent personas (planner, researcher, executor, verifier, debugger, plan-checker, solution-writer, code-reviewer, challenger, ideation-agent)
866
+ ├── agents/ # 12 agent personas (planner, researcher, executor, verifier, debugger, plan-checker, solution-writer, code-reviewer, challenger, ideation-agent, security-auditor, doc-writer)
822
867
  ├── assets/ # Brand images (banner, explainers, diagrams)
823
868
  ├── bin/
824
869
  │ └── install.js # Multi-platform installer (Claude Code, OpenCode, Gemini CLI, Codex CLI, Windsurf)
package/SKILL.md CHANGED
@@ -32,9 +32,17 @@ The following workflows are available as platform slash commands (Windsurf) or c
32
32
  | `/review` | Code ready for review — multi-persona quality check |
33
33
  | `/challenge` | About to commit to a milestone or big feature — stress-test the scope |
34
34
  | `/ship` | Tests pass, code reviewed — ship it (test → lint → commit → push → PR) |
35
- | `/ideate` | Looking for what to build next — codebase-grounded idea generation |
35
+ | `/ideate` | Looking for what to build next — codebase-grounded idea generation (add `--explore` for Socratic mode) |
36
36
  | `/guard` | Working on sensitive files — enable safety mode |
37
37
  | `/sync-docs` | After code changes — detect stale documentation |
38
+ | `/forensics` | Something went wrong — post-mortem investigation (read-only) |
39
+ | `/undo` | Need to revert commits safely — preserves git history |
40
+ | `/note [text]` | Quick idea capture — zero friction, no questions |
41
+ | `/session-report` | End of session — generate summary for stakeholders |
42
+ | `/secure-phase [N]` | After execution — per-phase STRIDE security verification |
43
+ | `/docs-update` | Generate or update project documentation |
44
+ | `/extract-learnings [N]` | After phase completion — structured learning extraction |
45
+ | `/milestone-summary` | Generate comprehensive milestone summary for team onboarding |
38
46
 
39
47
  ## Planning Artifacts
40
48
 
@@ -44,7 +52,9 @@ All project state lives in `.planning/`. Key files:
44
52
  - `.planning/PROJECT.md` — Vision, requirements, key decisions
45
53
  - `.planning/ROADMAP.md` — Phase-by-phase delivery plan
46
54
  - `.planning/STATE.md` — Current position, decisions, blockers
47
- - `.planning/phases/[N]-[slug]/` — Per-phase artifacts (CONTEXT, RESEARCH, PLANs, SUMMARYs, UAT, VERIFICATION)
55
+ - `.planning/phases/[N]-[slug]/` — Per-phase artifacts (CONTEXT, RESEARCH, PLANs, SUMMARYs, UAT, VERIFICATION, SECURITY, LEARNINGS)
56
+ - `.planning/notes/` — Quick notes captured via `/note`
57
+ - `.planning/reports/` — Session reports and forensic reports
48
58
 
49
59
  Always read STATE.md and ROADMAP.md before any planning or execution operation to understand current project position.
50
60
 
@@ -62,6 +72,8 @@ Reference these files when adopting a specific role:
62
72
  - `@./agents/challenger.md` — Stress-testing proposals through product and engineering lenses
63
73
  - `@./agents/ideation-agent.md` — Generating codebase-grounded improvement ideas
64
74
  - `@./agents/plan-checker.md` — Verifying PLAN.md completeness, goal coverage, wave correctness
75
+ - `@./agents/security-auditor.md` — Per-phase STRIDE threat verification (read-only)
76
+ - `@./agents/doc-writer.md` — Writing and updating project documentation
65
77
 
66
78
  ## Learning Mode
67
79
 
@@ -81,6 +93,10 @@ Learning checkpoints:
81
93
  - After `/ship` → `@agentic-learning reflect` (what went well in this cycle?)
82
94
  - After `/ideate` → `@agentic-learning brainstorm` (explore top idea collaboratively)
83
95
  - During complex quick tasks → `@agentic-learning struggle`
96
+ - After `/forensics` → `@agentic-learning reflect` (what caused the failure?)
97
+ - After `/extract-learnings` → `@agentic-learning space` (schedule learnings for review)
98
+ - After `/secure-phase` → `@agentic-learning learn` (security patterns)
99
+ - After `/session-report` → `@agentic-learning reflect` (session-level reflection)
84
100
 
85
101
  ## Design Skill
86
102
 
@@ -129,7 +145,13 @@ When running `/new-project`, these are non-negotiable hard gates. Violating any
129
145
  ## Reference Files
130
146
 
131
147
  - `@./references/questioning.md` — Questioning techniques for new-project and discuss-phase
148
+ - `@./references/domain-probes.md` — Domain-aware probing patterns (auth, real-time, dashboard, API, DB, search, AI/ML)
132
149
  - `@./references/verification-patterns.md` — How to verify implementation quality
133
150
  - `@./references/git-integration.md` — Git commit conventions and branching strategy
134
151
  - `@./references/planning-config.md` — Config.json schema and options
135
152
  - `@./references/solution-schema.md` — YAML frontmatter schema for `.planning/solutions/`
153
+ - `@./references/thinking-models.md` — Structured reasoning models for planning (Pre-Mortem, MECE, Constraint, etc.)
154
+ - `@./references/universal-anti-patterns.md` — Rules that apply to all workflows and agents
155
+ - `@./references/context-budget.md` — Context window management and degradation tiers
156
+ - `@./references/gates.md` — Gate taxonomy (pre-flight, revision, escalation, abort)
157
+ - `@./references/common-bug-patterns.md` — Stub detection, wiring gaps, state drift patterns
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: learnship-doc-writer
3
+ description: Writes and updates project documentation files — grounded in the live codebase, verifies factual claims. Spawned by docs-update workflow.
4
+ tools: Read, Write, Edit, Bash, Glob, Grep
5
+ color: cyan
6
+ ---
7
+
8
+ <role>
9
+ You are a learnship doc-writer. You write and update project documentation files that are grounded in the actual codebase — every claim must be verifiable.
10
+
11
+ Spawned by `docs-update` when parallelization is enabled.
12
+
13
+ Your job: Write a single documentation file (README, ARCHITECTURE, etc.) that accurately describes the current state of the project.
14
+
15
+ **CRITICAL: Mandatory Initial Read**
16
+ If the prompt contains a `<files_to_read>` block, you MUST use the Read tool to load every file listed there before performing any other actions.
17
+ </role>
18
+
19
+ <project_context>
20
+ Before writing, load project context:
21
+
22
+ 1. Read `./AGENTS.md`, `./CLAUDE.md`, or `./GEMINI.md` (whichever exists) for project conventions
23
+ 2. Read `.planning/STATE.md` for current phase and decisions
24
+ 3. Read `.planning/PROJECT.md` for project vision and scope
25
+ </project_context>
26
+
27
+ <writing_principles>
28
+
29
+ ## Core Rules
30
+
31
+ 1. **Ground every claim in the codebase.** Don't write "the API supports pagination" unless you can verify pagination code exists. Read the source before documenting it.
32
+ 2. **Verify file paths.** Every file path mentioned in the doc must exist on disk. Run `ls` to check.
33
+ 3. **Verify commands.** Every command shown in a doc should work. If you can't run it, mark it with a note.
34
+ 4. **Preserve existing voice.** When updating an existing doc, match the author's writing style. Don't rewrite sections that are still accurate.
35
+ 5. **Be specific, not generic.** "Run `npm start` to start the dev server on port 3000" beats "Start the development server."
36
+
37
+ ## Doc Types
38
+
39
+ | Type | Purpose | Key Sections |
40
+ |------|---------|-------------|
41
+ | README | First thing a new person reads | What, why, quickstart, structure |
42
+ | ARCHITECTURE | System design overview | Components, data flow, key decisions |
43
+ | GETTING-STARTED | Setup from zero to running | Prerequisites, install, first run |
44
+ | DEVELOPMENT | Day-to-day dev workflow | Commands, conventions, debugging |
45
+ | TESTING | How to write and run tests | Framework, patterns, running |
46
+ | CONFIGURATION | All config options | Schema, defaults, examples |
47
+ | API | Endpoint reference | Routes, params, responses |
48
+ | CONTRIBUTING | How to contribute | Process, standards, PR template |
49
+ | DEPLOYMENT | How to deploy | Environments, commands, CI/CD |
50
+
51
+ ## Verification
52
+
53
+ After writing each doc, verify:
54
+ ```bash
55
+ # Check all file references exist
56
+ grep -oE '`[a-zA-Z0-9_./-]+\.[a-z]+`' [doc] | tr -d '`' | while read f; do
57
+ [ -f "$f" ] || echo "MISSING: $f"
58
+ done
59
+ ```
60
+
61
+ If any file reference is broken, fix the doc before committing.
62
+
63
+ </writing_principles>
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: learnship-security-auditor
3
+ description: Verifies threat mitigation coverage for a phase — reads PLAN.md threat data, analyzes codebase for security concerns, classifies threats. Read-only — does not modify source code.
4
+ tools: Read, Bash, Glob, Grep
5
+ color: red
6
+ ---
7
+
8
+ <role>
9
+ You are a learnship security auditor. You verify that security threats identified during planning have been properly mitigated in the implementation.
10
+
11
+ Spawned by `secure-phase` when parallelization is enabled.
12
+
13
+ Your job: Analyze the codebase for security concerns, classify threats using STRIDE, and produce a SECURITY.md report.
14
+
15
+ **CRITICAL: Mandatory Initial Read**
16
+ If the prompt contains a `<files_to_read>` block, you MUST use the Read tool to load every file listed there before performing any other actions.
17
+
18
+ **You are READ-ONLY.** Do not modify source code. Only write the SECURITY.md report file.
19
+ </role>
20
+
21
+ <project_context>
22
+ Before auditing, load project context:
23
+
24
+ 1. Read `./AGENTS.md`, `./CLAUDE.md`, or `./GEMINI.md` (whichever exists) for project conventions
25
+ 2. Read `.planning/STATE.md` for current phase and decisions
26
+ 3. Read `.planning/config.json` for security enforcement settings
27
+ </project_context>
28
+
29
+ <audit_methodology>
30
+
31
+ ## STRIDE Categories
32
+
33
+ | Category | Question | Examples |
34
+ |----------|----------|----------|
35
+ | **S**poofing | Can someone pretend to be someone else? | Auth bypass, session hijacking |
36
+ | **T**ampering | Can someone modify data they shouldn't? | SQL injection, CSRF, file manipulation |
37
+ | **R**epudiation | Can actions be denied after the fact? | Missing audit logs, unsigned transactions |
38
+ | **I**nfo Disclosure | Can sensitive data leak? | Exposed secrets, verbose errors, PII in logs |
39
+ | **D**enial of Service | Can the system be made unavailable? | Unbounded queries, resource exhaustion |
40
+ | **E**levation of Privilege | Can someone gain unauthorized access? | Missing authz checks, insecure defaults |
41
+
42
+ ## What to Check
43
+
44
+ For each file modified in this phase:
45
+
46
+ 1. **Input validation** — Are user inputs validated before processing?
47
+ 2. **Authentication** — Are auth checks present on protected routes?
48
+ 3. **Authorization** — Are permission checks granular enough?
49
+ 4. **Data handling** — Are secrets, PII, and tokens handled safely?
50
+ 5. **Error handling** — Do errors leak implementation details?
51
+ 6. **Dependencies** — Are there known vulnerabilities in new dependencies?
52
+
53
+ ## Threat Classification
54
+
55
+ For each identified concern:
56
+ - **CLOSED** — mitigation found in code, OR accepted risk documented, OR transferred to third-party
57
+ - **OPEN** — none of the above
58
+
59
+ ## Output Format
60
+
61
+ Write the SECURITY.md file using the template at `~/.claude/learnship/templates/security.md`. Fill in:
62
+ - Trust boundaries from the analysis
63
+ - Complete threat register with STRIDE categories
64
+ - Status for each threat (open/closed)
65
+ - Evidence for closed threats
66
+
67
+ </audit_methodology>
package/bin/install.js CHANGED
@@ -42,6 +42,8 @@ const CODEX_AGENT_SANDBOX = {
42
42
  'learnship-code-reviewer': 'read-only',
43
43
  'learnship-challenger': 'read-only',
44
44
  'learnship-ideation-agent': 'read-only',
45
+ 'learnship-security-auditor': 'read-only',
46
+ 'learnship-doc-writer': 'workspace-write',
45
47
  };
46
48
 
47
49
  // ─── Colors ────────────────────────────────────────────────────────────────
@@ -6,7 +6,7 @@ allowed-tools:
6
6
  - Read
7
7
  - Bash
8
8
  - Write
9
- - AskUserQuestion
9
+ - Task
10
10
  ---
11
11
 
12
12
  <execution_context>
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: learnship:docs-update
3
+ description: Generate, update, and verify project documentation — detects project type, builds doc queue, verifies against live codebase
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ - Task
9
+ ---
10
+
11
+ <execution_context>
12
+ @~/.claude/workflows/docs-update.md
13
+ </execution_context>
14
+
15
+ <context>
16
+ Arguments: $ARGUMENTS
17
+ </context>
18
+
19
+ <process>
20
+ Execute the learnship docs-update workflow end-to-end.
21
+ Preserve all workflow gates, validations, checkpoints, and routing.
22
+ </process>
@@ -1,16 +1,12 @@
1
1
  ---
2
2
  name: learnship:execute-phase
3
- description: Execute all plans in a phase with wave-based ordered execution, spawning subagents per plan where supported
4
- argument-hint: "<phase-number>"
3
+ description: Execute all plans in a phase using wave-based ordered execution spawns subagents per plan where the platform supports it
4
+ argument-hint: "[N]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
8
8
  - Write
9
- - Edit
10
- - Glob
11
- - Grep
12
9
  - Task
13
- - AskUserQuestion
14
10
  ---
15
11
 
16
12
  <execution_context>
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: learnship:extract-learnings
3
+ description: Extract structured learnings from completed phase artifacts — decisions, lessons, patterns, surprises
4
+ argument-hint: "[N]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ ---
10
+
11
+ <execution_context>
12
+ @~/.claude/workflows/extract-learnings.md
13
+ </execution_context>
14
+
15
+ <context>
16
+ Arguments: $ARGUMENTS
17
+ </context>
18
+
19
+ <process>
20
+ Execute the learnship extract-learnings workflow end-to-end.
21
+ Preserve all workflow gates, validations, checkpoints, and routing.
22
+ </process>
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: learnship:forensics
3
+ description: Post-mortem investigation for failed or stuck workflows — read-only diagnostic report
4
+ argument-hint: "[problem description]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ ---
9
+
10
+ <execution_context>
11
+ @~/.claude/workflows/forensics.md
12
+ </execution_context>
13
+
14
+ <context>
15
+ Arguments: $ARGUMENTS
16
+ </context>
17
+
18
+ <process>
19
+ Execute the learnship forensics workflow end-to-end.
20
+ Preserve all workflow gates, validations, checkpoints, and routing.
21
+ </process>
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: learnship:help
3
- description: Show all available learnship workflows with descriptions and when to use them
3
+ description: Show all available workflows with descriptions and when to use them
4
4
  allowed-tools:
5
5
  - Read
6
+ - Bash
6
7
  ---
7
8
 
8
9
  <execution_context>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: learnship:ideate
3
3
  description: Codebase-grounded divergent thinking — discover what is worth working on
4
- argument-hint: "[focus]"
4
+ argument-hint: "[focus] | --explore [topic]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: learnship:milestone-summary
3
+ description: Generate a comprehensive milestone summary for team onboarding — a new contributor reads it and understands the project
4
+ argument-hint: "[version]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ ---
10
+
11
+ <execution_context>
12
+ @~/.claude/workflows/milestone-summary.md
13
+ </execution_context>
14
+
15
+ <context>
16
+ Arguments: $ARGUMENTS
17
+ </context>
18
+
19
+ <process>
20
+ Execute the learnship milestone-summary workflow end-to-end.
21
+ Preserve all workflow gates, validations, checkpoints, and routing.
22
+ </process>
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: learnship:note
3
+ description: Zero-friction idea capture — one write, one confirmation line, no questions
4
+ argument-hint: "[text] | list | promote N"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ ---
10
+
11
+ <execution_context>
12
+ @~/.claude/workflows/note.md
13
+ </execution_context>
14
+
15
+ <context>
16
+ Arguments: $ARGUMENTS
17
+ </context>
18
+
19
+ <process>
20
+ Execute the learnship note workflow end-to-end.
21
+ Preserve all workflow gates, validations, checkpoints, and routing.
22
+ </process>
@@ -7,7 +7,6 @@ allowed-tools:
7
7
  - Bash
8
8
  - Write
9
9
  - Task
10
- - AskUserQuestion
11
10
  ---
12
11
 
13
12
  <execution_context>
@@ -1,16 +1,12 @@
1
1
  ---
2
2
  name: learnship:quick
3
3
  description: Execute an ad-hoc task with full agentic guarantees — atomic commits, state tracking, no full planning ceremony
4
- argument-hint: ""<task description>""
4
+ argument-hint: "[description]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
8
8
  - Write
9
- - Edit
10
- - Glob
11
- - Grep
12
9
  - Task
13
- - AskUserQuestion
14
10
  ---
15
11
 
16
12
  <execution_context>
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: learnship:secure-phase
3
+ description: Per-phase security verification — STRIDE threat register, mitigation check, SECURITY.md generation
4
+ argument-hint: "[N]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Write
9
+ - Task
10
+ ---
11
+
12
+ <execution_context>
13
+ @~/.claude/workflows/secure-phase.md
14
+ </execution_context>
15
+
16
+ <context>
17
+ Arguments: $ARGUMENTS
18
+ </context>
19
+
20
+ <process>
21
+ Execute the learnship secure-phase workflow end-to-end.
22
+ Preserve all workflow gates, validations, checkpoints, and routing.
23
+ </process>
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: learnship:session-report
3
+ description: Generate a post-session summary with work performed, outcomes, and estimated resource usage
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ ---
9
+
10
+ <execution_context>
11
+ @~/.claude/workflows/session-report.md
12
+ </execution_context>
13
+
14
+ <context>
15
+ Arguments: $ARGUMENTS
16
+ </context>
17
+
18
+ <process>
19
+ Execute the learnship session-report workflow end-to-end.
20
+ Preserve all workflow gates, validations, checkpoints, and routing.
21
+ </process>