continuous-improvement 3.8.0 → 3.9.2
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/marketplace.json +2 -14
- package/CHANGELOG.md +25 -0
- package/LICENSE +21 -21
- package/QUICKSTART.md +148 -101
- package/README.md +50 -18
- package/action.yml +33 -33
- package/bin/analyze.sh +161 -161
- package/bin/backfill.mjs +19 -19
- package/bin/check-doc-runtime-claims.mjs +120 -0
- package/bin/generate-plugin-manifests.mjs +2 -0
- package/bin/hook-stats.mjs +21 -21
- package/bin/install.mjs +51 -44
- package/bin/mcp-server.mjs +43 -40
- package/bin/refresh-third-party.mjs +416 -416
- package/commands/continuous-improvement.md +115 -115
- package/commands/dashboard.md +56 -56
- package/commands/discipline.md +51 -51
- package/commands/proceed-with-the-recommendation.md +62 -62
- package/commands/seven-laws.md +16 -16
- package/commands/superpowers.md +119 -92
- package/commands/workspace-surface-audit.md +77 -77
- package/hooks/gateguard.mjs +172 -0
- package/hooks/observe.sh +172 -172
- package/hooks/session.sh +106 -106
- package/hooks/three-section-close.mjs +181 -181
- package/instinct-packs/go.json +58 -58
- package/instinct-packs/meta.json +16 -16
- package/instinct-packs/python.json +58 -58
- package/instinct-packs/react.json +58 -58
- package/lib/gateguard-state.mjs +85 -0
- package/lib/plugin-metadata.mjs +25 -18
- package/llms.txt +68 -68
- package/package.json +3 -2
- package/plugins/beginner.json +1 -1
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +1 -1
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +1 -1
- package/plugins/continuous-improvement/LICENSE +21 -21
- package/plugins/continuous-improvement/README.md +1 -0
- package/plugins/continuous-improvement/agents/README.md +120 -0
- package/plugins/continuous-improvement/agents/code-reviewer.md +97 -0
- package/plugins/continuous-improvement/agents/security-auditor.md +101 -0
- package/plugins/continuous-improvement/agents/test-engineer.md +95 -0
- package/plugins/continuous-improvement/bin/backfill.mjs +19 -19
- package/plugins/continuous-improvement/bin/mcp-server.mjs +43 -40
- package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -115
- package/plugins/continuous-improvement/commands/dashboard.md +56 -56
- package/plugins/continuous-improvement/commands/discipline.md +51 -51
- package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -62
- package/plugins/continuous-improvement/commands/seven-laws.md +16 -16
- package/plugins/continuous-improvement/commands/superpowers.md +119 -92
- package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -77
- package/plugins/continuous-improvement/hooks/gateguard.mjs +172 -0
- package/plugins/continuous-improvement/hooks/hooks.json +6 -1
- package/plugins/continuous-improvement/hooks/observe.sh +172 -172
- package/plugins/continuous-improvement/hooks/session.sh +106 -106
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -181
- package/plugins/continuous-improvement/instinct-packs/go.json +58 -58
- package/plugins/continuous-improvement/instinct-packs/meta.json +16 -16
- package/plugins/continuous-improvement/instinct-packs/python.json +58 -58
- package/plugins/continuous-improvement/instinct-packs/react.json +58 -58
- package/plugins/continuous-improvement/lib/plugin-metadata.mjs +25 -18
- package/plugins/continuous-improvement/skills/README.md +4 -1
- package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +47 -0
- package/plugins/continuous-improvement/skills/gateguard/SKILL.md +17 -9
- package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -108
- package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +1 -8
- package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -221
- package/plugins/continuous-improvement/skills/recovery-classification/SKILL.md +73 -0
- package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -76
- package/plugins/continuous-improvement/skills/state-reconciliation/SKILL.md +63 -0
- package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -104
- package/plugins/continuous-improvement/skills/superpowers/SKILL.md +22 -15
- package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -411
- package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -136
- package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +32 -0
- package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -191
- package/plugins/continuous-improvement/skills/worktree-safety/SKILL.md +66 -0
- package/plugins/expert.json +1 -1
- package/skills/README.md +79 -79
- package/skills/deploy-receipt.md +47 -0
- package/skills/gateguard.md +17 -9
- package/skills/para-memory-files.md +108 -108
- package/skills/proceed-with-the-recommendation.md +1 -8
- package/skills/ralph.md +221 -221
- package/skills/recovery-classification.md +73 -0
- package/skills/safety-guard.md +76 -76
- package/skills/state-reconciliation.md +63 -0
- package/skills/strategic-compact.md +104 -104
- package/skills/superpowers.md +22 -15
- package/skills/tdd-workflow.md +411 -411
- package/skills/token-budget-advisor.md +136 -136
- package/skills/verification-loop.md +32 -0
- package/skills/wild-risa-balance.md +191 -191
- package/skills/worktree-safety.md +66 -0
- package/templates/insights-claude-md.md +91 -0
- package/templates/verify-ladder.example.json +37 -24
|
@@ -1,115 +1,115 @@
|
|
|
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.
|
|
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.
|
package/commands/dashboard.md
CHANGED
|
@@ -1,56 +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
|
|
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
|
package/commands/discipline.md
CHANGED
|
@@ -1,51 +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.
|
|
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.
|
|
@@ -1,62 +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.
|
|
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.
|
package/commands/seven-laws.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: seven-laws
|
|
3
|
-
description: "Brand-aligned alias for /continuous-improvement. Reflect on the current session, analyze observations for patterns, and show instinct status under the 7 Laws of AI Agent Discipline."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /seven-laws
|
|
7
|
-
|
|
8
|
-
Brand-aligned alias for [`/continuous-improvement`](continuous-improvement.md). Both commands run the exact same three-step workflow under the 7 Laws of AI Agent Discipline:
|
|
9
|
-
|
|
10
|
-
1. **Reflect** (Law 5) — generate a reflection block for this session.
|
|
11
|
-
2. **Analyze** (Law 7) — process pending observations into instincts.
|
|
12
|
-
3. **Status** — show all instincts for the project + global with confidence and current level.
|
|
13
|
-
|
|
14
|
-
Run the workflow defined in [`continuous-improvement.md`](continuous-improvement.md). Subcommands `weekly` and `always-on` work identically.
|
|
15
|
-
|
|
16
|
-
`/continuous-improvement` remains supported indefinitely for backward compatibility. Prefer `/seven-laws` going forward — it matches the brand and the SKILL.md spec.
|
|
1
|
+
---
|
|
2
|
+
name: seven-laws
|
|
3
|
+
description: "Brand-aligned alias for /continuous-improvement. Reflect on the current session, analyze observations for patterns, and show instinct status under the 7 Laws of AI Agent Discipline."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /seven-laws
|
|
7
|
+
|
|
8
|
+
Brand-aligned alias for [`/continuous-improvement`](continuous-improvement.md). Both commands run the exact same three-step workflow under the 7 Laws of AI Agent Discipline:
|
|
9
|
+
|
|
10
|
+
1. **Reflect** (Law 5) — generate a reflection block for this session.
|
|
11
|
+
2. **Analyze** (Law 7) — process pending observations into instincts.
|
|
12
|
+
3. **Status** — show all instincts for the project + global with confidence and current level.
|
|
13
|
+
|
|
14
|
+
Run the workflow defined in [`continuous-improvement.md`](continuous-improvement.md). Subcommands `weekly` and `always-on` work identically.
|
|
15
|
+
|
|
16
|
+
`/continuous-improvement` remains supported indefinitely for backward compatibility. Prefer `/seven-laws` going forward — it matches the brand and the SKILL.md spec.
|