continuous-improvement 3.0.0 → 3.8.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.
Files changed (126) hide show
  1. package/.claude-plugin/marketplace.json +78 -0
  2. package/CHANGELOG.md +210 -0
  3. package/LICENSE +21 -21
  4. package/QUICKSTART.md +101 -81
  5. package/README.md +224 -198
  6. package/SKILL.md +87 -9
  7. package/action.yml +33 -0
  8. package/bin/analyze.sh +161 -153
  9. package/bin/backfill.mjs +172 -0
  10. package/bin/check-docs-substrings.mjs +333 -0
  11. package/bin/check-everything-mirror.mjs +145 -0
  12. package/bin/check-routing-targets.mjs +151 -0
  13. package/bin/check-skill-law-tag.mjs +128 -0
  14. package/bin/check-skill-mirror.mjs +119 -0
  15. package/bin/check-skill-tiers.mjs +116 -0
  16. package/bin/check-third-party-shape.mjs +202 -0
  17. package/bin/generate-plugin-manifests.mjs +169 -0
  18. package/bin/harvest-friction.mjs +279 -0
  19. package/bin/hook-stats.mjs +258 -0
  20. package/bin/install.mjs +418 -456
  21. package/bin/lint-transcript.mjs +239 -0
  22. package/bin/mcp-server.mjs +842 -499
  23. package/bin/observe.mjs +148 -0
  24. package/bin/pre-commit-block-strays.sh +49 -0
  25. package/bin/refresh-third-party.mjs +416 -0
  26. package/bin/unified-cli.mjs +533 -0
  27. package/commands/continuous-improvement.md +115 -74
  28. package/commands/dashboard.md +56 -0
  29. package/commands/discipline.md +51 -0
  30. package/commands/harvest.md +76 -0
  31. package/commands/learn-eval.md +117 -0
  32. package/commands/planning-with-files.md +66 -0
  33. package/commands/proceed-with-the-recommendation.md +62 -0
  34. package/commands/ralph.md +103 -0
  35. package/commands/release-train.md +81 -0
  36. package/commands/seven-laws.md +16 -0
  37. package/commands/superpowers.md +153 -0
  38. package/commands/swarm.md +101 -0
  39. package/commands/workspace-surface-audit.md +77 -0
  40. package/hooks/observe.sh +172 -134
  41. package/hooks/session.sh +106 -106
  42. package/hooks/three-section-close.mjs +181 -0
  43. package/instinct-packs/go.json +58 -0
  44. package/instinct-packs/meta.json +16 -0
  45. package/instinct-packs/python.json +58 -0
  46. package/instinct-packs/react.json +58 -0
  47. package/lib/cli-anything.mjs +401 -0
  48. package/lib/compound-engineering.mjs +831 -0
  49. package/lib/observe-event.mjs +128 -0
  50. package/lib/plugin-metadata.mjs +432 -0
  51. package/lib/pm-marketplace.mjs +61 -0
  52. package/lib/pm-skills.mjs +1274 -0
  53. package/lib/resolve-home-dir.mjs +43 -0
  54. package/lib/skill-tiers.mjs +137 -0
  55. package/lib/unified-plugin.mjs +924 -0
  56. package/llms.txt +68 -0
  57. package/package.json +38 -15
  58. package/plugins/beginner.json +17 -6
  59. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
  60. package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
  61. package/plugins/continuous-improvement/LICENSE +21 -0
  62. package/plugins/continuous-improvement/README.md +56 -0
  63. package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
  64. package/plugins/continuous-improvement/bin/mcp-server.mjs +886 -0
  65. package/plugins/continuous-improvement/bin/observe.mjs +148 -0
  66. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
  67. package/plugins/continuous-improvement/commands/dashboard.md +56 -0
  68. package/plugins/continuous-improvement/commands/discipline.md +51 -0
  69. package/plugins/continuous-improvement/commands/harvest.md +76 -0
  70. package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
  71. package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
  72. package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
  73. package/plugins/continuous-improvement/commands/ralph.md +103 -0
  74. package/plugins/continuous-improvement/commands/release-train.md +81 -0
  75. package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
  76. package/plugins/continuous-improvement/commands/superpowers.md +153 -0
  77. package/plugins/continuous-improvement/commands/swarm.md +101 -0
  78. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
  79. package/plugins/continuous-improvement/hooks/hooks.json +60 -0
  80. package/plugins/continuous-improvement/hooks/observe.sh +172 -0
  81. package/plugins/continuous-improvement/hooks/session.sh +106 -0
  82. package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
  83. package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
  84. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
  85. package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
  86. package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
  87. package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
  88. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +432 -0
  89. package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
  90. package/plugins/continuous-improvement/skills/README.md +34 -0
  91. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
  92. package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +131 -0
  93. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +155 -0
  94. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
  95. package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +454 -0
  96. package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
  97. package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
  98. package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
  99. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +212 -0
  100. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
  101. package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
  102. package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +192 -0
  103. package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
  104. package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
  105. package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
  106. package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
  107. package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
  108. package/plugins/expert.json +34 -5
  109. package/skills/README.md +79 -0
  110. package/skills/deploy-receipt.md +131 -0
  111. package/skills/gateguard.md +155 -0
  112. package/skills/para-memory-files.md +108 -0
  113. package/skills/proceed-with-the-recommendation.md +454 -0
  114. package/skills/ralph.md +221 -0
  115. package/skills/safety-guard.md +76 -0
  116. package/skills/strategic-compact.md +104 -0
  117. package/skills/superpowers.md +212 -0
  118. package/skills/tdd-workflow.md +411 -0
  119. package/skills/token-budget-advisor.md +136 -0
  120. package/skills/verification-loop.md +192 -0
  121. package/skills/wild-risa-balance.md +191 -0
  122. package/skills/workspace-surface-audit.md +147 -0
  123. package/templates/planning-with-files/findings.md +8 -0
  124. package/templates/planning-with-files/progress.md +7 -0
  125. package/templates/planning-with-files/task_plan.md +23 -0
  126. package/templates/verify-ladder.example.json +47 -0
@@ -1,74 +1,115 @@
1
- ---
2
- name: continuous-improvement
3
- description: "Reflect on the current session, analyze observations for patterns, and show instinct status. Run after finishing significant work."
4
- ---
5
-
6
- # /continuous-improvement
7
-
8
- Run this after completing significant work. It does three things in order.
9
-
10
- ## Step 1: Reflect
11
-
12
- Generate a reflection for this session based on what happened:
13
-
14
- ```
15
- ## Reflection — [Date]
16
- - What worked:
17
- - What failed:
18
- - What I'd do differently:
19
- - Rule to add:
20
- ```
21
-
22
- If there's a "Rule to add", create an instinct YAML file with 0.6 starting confidence in the project's instinct directory.
23
-
24
- ## Step 2: Analyze Observations
25
-
26
- Check `~/.claude/instincts/` for the current project (detect via git root SHA-256 first 12 chars).
27
-
28
- Look at `~/.claude/instincts/<hash>/observations.jsonl`. If 20+ lines exist:
29
-
30
- 1. Read the last 500 lines
31
- 2. Read existing instinct `*.yaml` files (project + global)
32
- 3. Detect patterns:
33
- - User corrections → "don't do X" instincts
34
- - Error→fix sequences "when X fails, try Y"
35
- - Repeated workflows (3+ times) → "for X, do A→B→C"
36
- - Tool preferences "use tool Y for task X"
37
- 4. Create/update instinct YAML files
38
- 5. Be conservative: only create instincts for 3+ observations of the same pattern
39
-
40
- If fewer than 20 observations, skip analysis and note the count.
41
-
42
- ## Step 3: Show Status
43
-
44
- Display all instincts for the current project + global:
45
-
46
- ```
47
- === continuous-improvement ===
48
-
49
- ## Level: [CAPTURE | ANALYZE | SUGGEST | AUTO-APPLY]
50
-
51
- ## Session Reflection
52
- - What worked: [from this session]
53
- - What failed: [from this session]
54
- - What I'd do differently: [from this session]
55
- - Rule to add: [captured as instinct]
56
-
57
- ## Learning
58
- NEW [instinct-id] [domain] [confidence] (from reflection)
59
- ↑ [instinct-id] [domain] [old]→[new] (+N observations)
60
-
61
- ## Instincts [project-name] ([hash])
62
- ● [0.85] instinct-id domain auto-apply
63
- [0.60] instinct-id domain suggest
64
- ○ [0.35] instinct-id domain silent
65
-
66
- ## Instincts — global
67
- ● [0.90] instinct-id domain auto-apply
68
-
69
- ## Next
70
- - Keep working — hooks capture automatically
71
- - System auto-levels as instincts gain confidence
72
- ```
73
-
74
- If no instincts or observations exist yet, explain this is expected — the system is in CAPTURE level and will create instincts after 20+ observations accumulate.
1
+ ---
2
+ name: continuous-improvement
3
+ description: "Reflect on the current session, analyze observations for patterns, and show instinct status. Runs on-demand to save tokens."
4
+ ---
5
+
6
+ # /continuous-improvement
7
+
8
+ Run this when you want to reflect and learn not every session. Three steps in order.
9
+
10
+ ## Step 1: Reflect
11
+
12
+ Generate a reflection for this session based on what happened:
13
+
14
+ ```
15
+ ## Reflection — [Date]
16
+ - What worked:
17
+ - What failed:
18
+ - What I'd do differently:
19
+ - Rule to add:
20
+ - Iteration — Next best recommendations (ranked, top 3):
21
+ 1. <primary — strongest next move>
22
+ 2. <alternative different angle>
23
+ 3. <alternative — smaller/larger scope>
24
+ ```
25
+
26
+ If there's a "Rule to add", create an instinct YAML file with 0.6 starting confidence in the project's instinct directory.
27
+
28
+ The "Iteration — Next best recommendations" field is the Law 6 handoff. List the **top 3 ranked** core-development moves — what to build, fix, refactor, or investigate next so the feature/system advances. Item #1 is the strongest; #2 and #3 are alternatives the user can pivot to. NOT git steps (commit, push, PR), NOT verification re-runs, NOT deploy actions — those belong in the end-of-run summary.
29
+
30
+ Format per item: `<verb> <object at path:line> (<why, one clause grounded in current context>)`.
31
+
32
+ Rules: always exactly 3 distinct directions, not padding. If fewer real moves exist, fill remaining slots with `None — goal met from this angle.` If the goal is fully met across all angles, write `1. None — goal met, stop.` and omit #2 and #3.
33
+
34
+ ## Step 2: Analyze Observations
35
+
36
+ Check `~/.claude/instincts/` for the current project (detect via git root → SHA-256 first 12 chars).
37
+
38
+ Look at `~/.claude/instincts/<hash>/observations.jsonl`. If 20+ lines exist:
39
+
40
+ 1. Read the last 500 lines
41
+ 2. Read existing instinct `*.yaml` files (project + global)
42
+ 3. Detect patterns:
43
+ - User corrections → "don't do X" instincts
44
+ - Error→fix sequences "when X fails, try Y"
45
+ - Repeated workflows (3+ times) → "for X, do A→B→C"
46
+ - Tool preferences → "use tool Y for task X"
47
+ 4. Create/update instinct YAML files
48
+ 5. Be conservative: only create instincts for 3+ observations of the same pattern
49
+
50
+ If fewer than 20 observations, skip analysis and note the count.
51
+
52
+ ### Multi-Agent Analysis (500+ observations)
53
+
54
+ When observation backlog is large, parallelize:
55
+ - **Agent 1:** User corrections + error→fix patterns
56
+ - **Agent 2:** Repeated workflows + tool preferences
57
+ - **Agent 3:** Cross-reference existing instincts for updates
58
+
59
+ Merge results and deduplicate before writing YAML files.
60
+
61
+ ## Step 3: Show Status
62
+
63
+ Display all instincts for the current project + global:
64
+
65
+ ```
66
+ === continuous-improvement ===
67
+
68
+ ## Level: [CAPTURE | ANALYZE | SUGGEST | AUTO-APPLY]
69
+
70
+ ## Session Reflection
71
+ - What worked: [from this session]
72
+ - What failed: [from this session]
73
+ - What I'd do differently: [from this session]
74
+ - Rule to add: [captured as instinct]
75
+ - Iteration — Next best recommendations (ranked, top 3):
76
+ 1. [primary core-development move]
77
+ 2. [alternative angle]
78
+ 3. [alternative scope]
79
+
80
+ ## Learning
81
+ NEW [instinct-id] [domain] [confidence] (from reflection)
82
+ ↑ [instinct-id] [domain] [old]→[new] (+N observations)
83
+
84
+ ## Instincts — [project-name] ([hash])
85
+ ● [0.85] instinct-id domain auto-apply
86
+ ◐ [0.60] instinct-id domain suggest
87
+ ○ [0.35] instinct-id domain silent
88
+
89
+ ## Instincts — global
90
+ ● [0.90] instinct-id domain auto-apply
91
+
92
+ ## Next
93
+ - Keep working — hooks capture automatically
94
+ - System auto-levels as instincts gain confidence
95
+ ```
96
+
97
+ If no instincts or observations exist yet, explain this is expected — the system is in CAPTURE level and will create instincts after 20+ observations accumulate.
98
+
99
+ ## Subcommands
100
+
101
+ ### `/continuous-improvement weekly`
102
+
103
+ Set up a weekly analysis schedule:
104
+ 1. Create a cron/loop schedule that runs `/continuous-improvement analyze` every 7 days
105
+ 2. Confirm the schedule to the user
106
+ 3. Show next scheduled run date
107
+
108
+ ### `/continuous-improvement always-on`
109
+
110
+ Toggle always-on mode for the current project:
111
+ 1. Find project hash
112
+ 2. Create/update `~/.claude/instincts/<hash>/config.yaml` with `always_on: true|false`
113
+ 3. Confirm the change
114
+
115
+ **Default is off** — observations accumulate silently, analysis only runs when you ask.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: dashboard
3
+ description: Visual dashboard showing instinct health, observation stats, and learning progress
4
+ ---
5
+
6
+ # Instinct Dashboard
7
+
8
+ Generate a visual dashboard for this project's continuous-improvement status.
9
+
10
+ ## Instructions
11
+
12
+ 1. **Find project hash:** Run `git rev-parse --show-toplevel 2>/dev/null`, then SHA-256 first 12 chars
13
+ 2. **Read observations:** Count lines in `~/.claude/instincts/<hash>/observations.jsonl`
14
+ 3. **Read instincts:** Load all `*.yaml` files from project dir + `global/`
15
+ 4. **Read instinct packs:** Check if any packs from `instinct-packs/` have been loaded
16
+
17
+ ## Display Format
18
+
19
+ ```
20
+ ╔══════════════════════════════════════════════════════════════╗
21
+ ║ continuous-improvement Dashboard ║
22
+ ╠══════════════════════════════════════════════════════════════╣
23
+ ║ ║
24
+ ║ Project: <name> Level: <CAPTURE|ANALYZE|...> ║
25
+ ║ Sessions: ~<obs/10> Mode: <beginner|expert> ║
26
+ ║ ║
27
+ ║ ┌─ Observations ────────────────────────────────────────┐ ║
28
+ ║ │ Total: <n> Unprocessed: <n> Last: <date> │ ║
29
+ ║ └───────────────────────────────────────────────────────┘ ║
30
+ ║ ║
31
+ ║ ┌─ Instincts ───────────────────────────────────────────┐ ║
32
+ ║ │ Total: <n> │ ║
33
+ ║ │ ████████░░ Auto-apply (0.7+): <n> │ ║
34
+ ║ │ █████░░░░░ Suggest (0.5-0.69): <n> │ ║
35
+ ║ │ ██░░░░░░░░ Silent (< 0.5): <n> │ ║
36
+ ║ │ Global: <n> Project: <n> │ ║
37
+ ║ └───────────────────────────────────────────────────────┘ ║
38
+ ║ ║
39
+ ║ ┌─ Top Instincts ───────────────────────────────────────┐ ║
40
+ ║ │ <list top 5 instincts by confidence with bars> │ ║
41
+ ║ └───────────────────────────────────────────────────────┘ ║
42
+ ║ ║
43
+ ║ ┌─ Health ──────────────────────────────────────────────┐ ║
44
+ ║ │ Stale (30+ days): <n> Decaying: <n> │ ║
45
+ ║ │ Recently reinforced: <n> │ ║
46
+ ║ └───────────────────────────────────────────────────────┘ ║
47
+ ║ ║
48
+ ╚══════════════════════════════════════════════════════════════╝
49
+ ```
50
+
51
+ ## After Display
52
+
53
+ - If stale instincts > 0: suggest reviewing them
54
+ - If unprocessed observations > 20: suggest running analysis
55
+ - If no instincts exist: explain the auto-leveling timeline
56
+ - Show available instinct packs that haven't been loaded yet
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: discipline
3
+ description: Quick reference card for the 7 Laws of AI Agent Discipline
4
+ ---
5
+
6
+ # The 7 Laws — Quick Reference
7
+
8
+ Print this card and check yourself against each law.
9
+
10
+ ## The Laws
11
+
12
+ | # | Law | Check | Red Flag |
13
+ |---|-----|-------|----------|
14
+ | 1 | **Research Before Executing** | Did I search for existing solutions? | "I'll just quickly..." |
15
+ | 2 | **Plan Is Sacred** | Did I state WILL / WILL NOT / VERIFY? | "Let me also add..." |
16
+ | 3 | **One Thing at a Time** | Am I finishing before starting? | "While I'm here..." |
17
+ | 4 | **Verify Before Reporting** | Did I check the ACTUAL output? | "This should work..." |
18
+ | 5 | **Reflect After Sessions** | Did I note what worked/failed? | "I'll remember..." |
19
+ | 6 | **Iterate One Change** | Am I changing one thing at a time? | "And also..." |
20
+ | 7 | **Learn From Every Session** | Did I capture this as an instinct? | "Next time I'll..." |
21
+
22
+ ## Operator Stakes
23
+
24
+ The Laws above are the *how*. These five principles are the *why*: code ships from your account, the incident lands on your pager, the bill hits your budget. Each one pairs with the Law that prevents it from going wrong.
25
+
26
+ | # | Principle | Vibe coder | Engineer | Law |
27
+ |---|-----------|------------|----------|-----|
28
+ | 1 | **Ownership** | Ships auth, moves on | Adds rate limits, audit logs, password-reset flow, incident runbook before shipping | 4 |
29
+ | 2 | **Reliability over cleverness** | Accepts a clever regex + heavy lib that breaks on ISO 8601 with millis | Picks the boring tested API, writes tests for leap years and DST | 1 |
30
+ | 3 | **Systems thinking** | Builds in-memory CSV export, works for 100 dev users, OOMs in prod | Asks row count first, picks paginated background job + S3 link | 2 |
31
+ | 4 | **Problem framing** | Builds the websocket chat the ticket asked for | Finds out users wanted faster support replies, not chat | 1 |
32
+ | 5 | **Constraints management** | Calls the $0.02/image model on every upload | Does the math, adds client-side validation + caching + cheaper triage model | 2 |
33
+
34
+ Code is a liability, not an asset. Speed without these five turns into someone else's incident at 3am — except the someone is you.
35
+
36
+ ## The Loop
37
+
38
+ ```
39
+ Research → Plan → Execute (one thing) → Verify → Reflect → Learn → Iterate
40
+ ```
41
+
42
+ ## Self-Check
43
+
44
+ Before saying "Done", verify ALL:
45
+ - [ ] Code runs without errors
46
+ - [ ] Output matches expected result
47
+ - [ ] I checked the **actual** result (not assumed)
48
+ - [ ] Build passes
49
+ - [ ] I can explain the change in one sentence
50
+
51
+ If you're skipping a step, that's the step you need most.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: harvest
3
+ description: Harvest friction events from observation logs into typed instincts (env_issue, permission_block, wrong_approach, buggy_code) with confidence scoring.
4
+ ---
5
+
6
+ # /harvest — Friction Harvest
7
+
8
+ Run the friction-harvest classifier against this project's observation log and append new typed instincts to `instincts.jsonl`. Idempotent on re-run.
9
+
10
+ ## What it does
11
+
12
+ Reads `~/.claude/instincts/<project-hash>/observations.jsonl` produced by the Mulahazah hook, classifies failure rows into four typed friction patterns, scores confidence with a recency-weighted decay, and appends new instincts to `<project-hash>/instincts.jsonl` alongside.
13
+
14
+ | Type | What it catches |
15
+ |---|---|
16
+ | `env_issue` | jq missing, command not found, not recognized as cmdlet |
17
+ | `permission_block` | sandbox / harness blocked, Permission denied |
18
+ | `wrong_approach` | file changed since last read (parallel-actor stale) |
19
+ | `buggy_code` | file not read first, old_string ambiguous, file too large |
20
+
21
+ ## How to invoke
22
+
23
+ ```
24
+ node bin/harvest-friction.mjs
25
+ node bin/harvest-friction.mjs <project-hash>
26
+ node bin/harvest-friction.mjs --list
27
+ ```
28
+
29
+ `--list` shows new classifications without writing to `instincts.jsonl` — useful for dry-run before committing the harvest output.
30
+
31
+ ## Idempotency
32
+
33
+ Each instinct carries a `dedup_key = sha1(type + tool + summary[:120])`. Re-running on the same observations does not duplicate previously-written instincts; `loadExistingDedupKeys()` reads the destination file once at start.
34
+
35
+ ## Confidence model
36
+
37
+ ```
38
+ confidence = log10(occurrence_count + 1) * recency_factor
39
+ recency_factor = 0.5 + 0.5 * exp(-days_since_last_seen / 14)
40
+ ```
41
+
42
+ One occurrence today → 0.30. Ten occurrences today → clamped to 1.0. One occurrence 30 days ago → 0.17.
43
+
44
+ ## Output shape
45
+
46
+ ```
47
+ harvest-friction project=0af156594b39
48
+ observations rows: 9346
49
+ tool_complete rows: 2104
50
+ classified failures: 47
51
+ thin-schema rows: 0
52
+ new instincts: 12
53
+ skipped (existing): 35
54
+
55
+ New instincts:
56
+ [0.92] env_issue on Bash (×8): bash: jq: command not found
57
+ [0.74] permission_block on Bash (×4): harness blocked direct push to main
58
+ ...
59
+
60
+ Appended 12 instinct(s) to /Users/.../instincts/0af156594b39/instincts.jsonl
61
+ ```
62
+
63
+ ## When the classifier emits zero instincts
64
+
65
+ If `tool_complete rows: 0`, the bash-fallback hook is active (no jq AND the Node observer is not on PATH) and only emits `tool_start` events. Two remediation paths:
66
+
67
+ - **Install jq** — `winget install jqlang.jq` (Windows), `brew install jq` (macOS), `apt install jq` (Linux).
68
+ - **Wire the Node observer** — ensure `hooks/bin/observe.mjs` is reachable from the active hook script.
69
+
70
+ Both are documented in the WARNING the classifier prints on a thin-schema host.
71
+
72
+ ## Pairs with
73
+
74
+ - **`continuous-improvement`** (core SKILL.md, Law 7 — Learn From Every Session) — the harvest pipeline is the concrete mechanism behind Law 7's "capture patterns as instincts" contract.
75
+ - **`workspace-surface-audit`** — Phase 1 Environment Grain confirms whether jq + Node observer are available; if not, the harvest will run inert until that gap closes.
76
+ - **`gateguard`** — observation rows include the Parallel-Actor Gate's HEAD/upstream baselines when divergence-halts fire; the classifier surfaces those as `wrong_approach` instincts.
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: learn-eval
3
+ description: "Extract reusable patterns from the session, self-evaluate quality before saving, and determine the right save location (Global vs Project)."
4
+ ---
5
+
6
+ # /learn-eval - Extract, Evaluate, then Save
7
+
8
+ Extends `/learn` with a quality gate, save-location decision, and knowledge-placement awareness before writing any skill file.
9
+
10
+ ## What to Extract
11
+
12
+ Look for:
13
+
14
+ 1. **Error Resolution Patterns** — root cause + fix + reusability
15
+ 2. **Debugging Techniques** — non-obvious steps, tool combinations
16
+ 3. **Workarounds** — library quirks, API limitations, version-specific fixes
17
+ 4. **Project-Specific Patterns** — conventions, architecture decisions, integration patterns
18
+
19
+ ## Process
20
+
21
+ 1. Review the session for extractable patterns
22
+ 2. Identify the most valuable/reusable insight
23
+
24
+ 3. **Determine save location:**
25
+ - Ask: "Would this pattern be useful in a different project?"
26
+ - **Global** (`~/.claude/skills/learned/`): Generic patterns usable across 2+ projects (bash compatibility, LLM API behavior, debugging techniques, etc.)
27
+ - **Project** (`.claude/skills/learned/` in current project): Project-specific knowledge (quirks of a particular config file, project-specific architecture decisions, etc.)
28
+ - When in doubt, choose Global (moving Global → Project is easier than the reverse)
29
+
30
+ 4. Draft the skill file using this format:
31
+
32
+ ```markdown
33
+ ---
34
+ name: pattern-name
35
+ description: "Under 130 characters"
36
+ user-invocable: false
37
+ origin: auto-extracted
38
+ ---
39
+
40
+ # [Descriptive Pattern Name]
41
+
42
+ **Extracted:** [Date]
43
+ **Context:** [Brief description of when this applies]
44
+
45
+ ## Problem
46
+ [What problem this solves - be specific]
47
+
48
+ ## Solution
49
+ [The pattern/technique/workaround - with code examples]
50
+
51
+ ## When to Use
52
+ [Trigger conditions]
53
+ ```
54
+
55
+ 5. **Quality gate — Checklist + Holistic verdict**
56
+
57
+ ### 5a. Required checklist (verify by actually reading files)
58
+
59
+ Execute **all** of the following before evaluating the draft:
60
+
61
+ - [ ] Grep `~/.claude/skills/` and relevant project `.claude/skills/` files by keyword to check for content overlap
62
+ - [ ] Check MEMORY.md (both project and global) for overlap
63
+ - [ ] Consider whether appending to an existing skill would suffice
64
+ - [ ] Confirm this is a reusable pattern, not a one-off fix
65
+
66
+ ### 5b. Holistic verdict
67
+
68
+ Synthesize the checklist results and draft quality, then choose **one** of the following:
69
+
70
+ | Verdict | Meaning | Next Action |
71
+ |---------|---------|-------------|
72
+ | **Save** | Unique, specific, well-scoped | Proceed to Step 6 |
73
+ | **Improve then Save** | Valuable but needs refinement | List improvements → revise → re-evaluate (once) |
74
+ | **Absorb into [X]** | Should be appended to an existing skill | Show target skill and additions → Step 6 |
75
+ | **Drop** | Trivial, redundant, or too abstract | Explain reasoning and stop |
76
+
77
+ **Guideline dimensions** (informing the verdict, not scored):
78
+
79
+ - **Specificity & Actionability**: Contains code examples or commands that are immediately usable
80
+ - **Scope Fit**: Name, trigger conditions, and content are aligned and focused on a single pattern
81
+ - **Uniqueness**: Provides value not covered by existing skills (informed by checklist results)
82
+ - **Reusability**: Realistic trigger scenarios exist in future sessions
83
+
84
+ 6. **Verdict-specific confirmation flow**
85
+
86
+ - **Improve then Save**: Present the required improvements + revised draft + updated checklist/verdict after one re-evaluation; if the revised verdict is **Save**, save after user confirmation, otherwise follow the new verdict
87
+ - **Save**: Present save path + checklist results + 1-line verdict rationale + full draft → save after user confirmation
88
+ - **Absorb into [X]**: Present target path + additions (diff format) + checklist results + verdict rationale → append after user confirmation
89
+ - **Drop**: Show checklist results + reasoning only (no confirmation needed)
90
+
91
+ 7. Save / Absorb to the determined location
92
+
93
+ ## Output Format for Step 5
94
+
95
+ ```
96
+ ### Checklist
97
+ - [x] skills/ grep: no overlap (or: overlap found → details)
98
+ - [x] MEMORY.md: no overlap (or: overlap found → details)
99
+ - [x] Existing skill append: new file appropriate (or: should append to [X])
100
+ - [x] Reusability: confirmed (or: one-off → Drop)
101
+
102
+ ### Verdict: Save / Improve then Save / Absorb into [X] / Drop
103
+
104
+ **Rationale:** (1-2 sentences explaining the verdict)
105
+ ```
106
+
107
+ ## Design Rationale
108
+
109
+ This version replaces the previous 5-dimension numeric scoring rubric (Specificity, Actionability, Scope Fit, Non-redundancy, Coverage scored 1-5) with a checklist-based holistic verdict system. Modern frontier models (Opus 4.6+) have strong contextual judgment — forcing rich qualitative signals into numeric scores loses nuance and can produce misleading totals. The holistic approach lets the model weigh all factors naturally, producing more accurate save/drop decisions while the explicit checklist ensures no critical check is skipped.
110
+
111
+ ## Notes
112
+
113
+ - Don't extract trivial fixes (typos, simple syntax errors)
114
+ - Don't extract one-time issues (specific API outages, etc.)
115
+ - Focus on patterns that will save time in future sessions
116
+ - Keep skills focused — one pattern per skill
117
+ - When the verdict is Absorb, append to the existing skill rather than creating a new file
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: planning-with-files
3
+ description: Create and maintain task_plan.md, findings.md, and progress.md for persistent file-based planning
4
+ ---
5
+
6
+ # /planning-with-files
7
+
8
+ Use this workflow only when the user explicitly wants persistent, file-based planning. It is opt-in.
9
+
10
+ ## Project Root
11
+
12
+ 1. Run `git rev-parse --show-toplevel 2>/dev/null`
13
+ 2. If that fails, use the current working directory
14
+ 3. Create and read planning files in that root only
15
+
16
+ The planning files are:
17
+ - `task_plan.md`
18
+ - `findings.md`
19
+ - `progress.md`
20
+
21
+ ## `init`
22
+
23
+ If the files do not exist, create them in the project root.
24
+
25
+ `task_plan.md` must include:
26
+ - `## Goal`
27
+ - `## Status`
28
+ - `## Phases`
29
+ - `## Key Questions`
30
+ - `## Decisions Made`
31
+ - `## Errors Encountered`
32
+
33
+ Default phases:
34
+ - `Research`
35
+ - `Plan`
36
+ - `Execute`
37
+ - `Verify`
38
+ - `Reflect`
39
+
40
+ Never overwrite existing planning files unless the user explicitly asks you to reset or replace them.
41
+
42
+ ## `status`
43
+
44
+ Read all three files and summarize:
45
+ - Current status from `task_plan.md`
46
+ - Checked vs unchecked phases
47
+ - Whether `findings.md` has real notes yet
48
+ - Whether `progress.md` has real session or verification entries yet
49
+
50
+ If the files do not exist, say so and offer to initialize them.
51
+
52
+ ## `checkpoint`
53
+
54
+ After a meaningful work chunk:
55
+ - Update `progress.md` with what happened, commands run, and verification notes
56
+ - Add new discoveries or sources to `findings.md`
57
+ - Update `task_plan.md` progress, decisions, and errors
58
+
59
+ Do not hide failures. Log them in `## Errors Encountered`.
60
+
61
+ ## `recover`
62
+
63
+ When resuming after context loss or a new session:
64
+ - Re-read `task_plan.md`, `findings.md`, and `progress.md` before making major decisions
65
+ - Restate the current goal, phase, open questions, and latest verification state
66
+ - Continue from the recorded plan instead of rebuilding context from memory
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: proceed-with-the-recommendation
3
+ description: "Execute the agent's prior recommendation list under the 7 Laws — walk in order, route per item, verify, reflect. Standalone companion skill with inline fallbacks when other skills are not installed."
4
+ ---
5
+
6
+ # /proceed-with-the-recommendation
7
+
8
+ Walk an agent-generated recommendation list top-to-bottom under the continuous-improvement 7 Laws. Each item is routed to the best specialist skill when available, falls back to concrete inline behavior when it is not.
9
+
10
+ Invoke immediately after the agent has offered a numbered list of recommendations, next steps, or suggested actions.
11
+
12
+ ## Trigger phrases
13
+
14
+ - `/proceed-with-the-recommendation`
15
+ - "proceed with your recommendation"
16
+ - "do all of it"
17
+ - "go ahead with the plan"
18
+ - "execute the recommendations"
19
+ - "yes do it" / "all of them"
20
+
21
+ ## What happens
22
+
23
+ 1. **Pre-flight (Law 1)** — restate the recommendation list in original order, tag each `safe` / `caution` / `needs-approval`
24
+ 2. **Plan (Law 2)** — inline restatement if ≤3 items, call `superpowers:writing-plans` if larger
25
+ 3. **Execute (Law 3)** — route each item to the preferred skill; apply inline fallback if the skill is not installed
26
+ 4. **Verify (Law 4)** — smallest check per item, non-transitive (no later item retroactively verifies an earlier one)
27
+ 5. **Iterate (Law 6)** — one change → verify → next; never carry a failure forward
28
+ 6. **Reflect (Laws 5 + 7)** — end-of-run Reflection block appended to `observations.jsonl`
29
+ 7. **Close** — three-section user-facing block: **What has been done → What is next → Recommendation** (tiered tables + one decisive "My recommendation" paragraph + a binary "Want me to: A or B?" closer)
30
+
31
+ ## Hard halts (never silently proceed)
32
+
33
+ - Any `needs-approval` item: deploy, force-push, DB drop, secret change, shared-state mutation
34
+ - Verification failure with non-obvious fix
35
+ - Drive-by temptation outside the original list
36
+ - Context budget above 80%
37
+
38
+ ## Pairs best with
39
+
40
+ | Preferred skill | Used for |
41
+ |---|---|
42
+ | `workspace-surface-audit` | Law 1 pre-flight when the list touches unknown surface area |
43
+ | `superpowers:writing-plans` | Plan breakdown when the list >3 items or >150 LOC |
44
+ | `superpowers:*` | Per-item specialist routing (TDD, debugging, review, verification, parallel) |
45
+ | `ralph` | Long-running PRD-style autonomous execution |
46
+ | `simplify`, `security-review`, `documentation-lookup`, `schedule`, `loop`, `update-config`, `commit-commands:*` | continuous-improvement helpers |
47
+
48
+ If none of those are installed, the skill still works — every routing row has an inline fallback and every item still gets a verification step.
49
+
50
+ ## Skill file
51
+
52
+ Full behavior is defined in [`skills/proceed-with-the-recommendation.md`](../skills/proceed-with-the-recommendation.md).
53
+
54
+ ## Install standalone
55
+
56
+ ```bash
57
+ mkdir -p ~/.claude/skills/proceed-with-the-recommendation
58
+ curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/proceed-with-the-recommendation.md \
59
+ -o ~/.claude/skills/proceed-with-the-recommendation/SKILL.md
60
+ ```
61
+
62
+ Restart the Claude Code session so the registry picks it up.