continuous-improvement 3.11.0 → 3.12.3

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 (110) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +34 -0
  3. package/LICENSE +21 -21
  4. package/QUICKSTART.md +1 -1
  5. package/README.md +16 -15
  6. package/SKILL.md +1 -1
  7. package/bin/analyze.sh +161 -161
  8. package/bin/backfill.mjs +19 -19
  9. package/bin/check-doc-runtime-claims.mjs +0 -0
  10. package/bin/check-docs-substrings.mjs +0 -0
  11. package/bin/check-everything-mirror.mjs +0 -0
  12. package/bin/check-routing-targets.mjs +0 -0
  13. package/bin/check-scripts-citation-drift.mjs +0 -0
  14. package/bin/check-skill-count.mjs +0 -0
  15. package/bin/check-skill-law-tag.mjs +0 -0
  16. package/bin/check-skill-mirror.mjs +0 -0
  17. package/bin/check-skill-tiers.mjs +0 -0
  18. package/bin/check-test-imports-only.mjs +0 -0
  19. package/bin/check-third-party-shape.mjs +0 -0
  20. package/bin/check-tool-count.mjs +129 -0
  21. package/bin/companion-preference-status.mjs +0 -0
  22. package/bin/gateguard-clear.mjs +0 -0
  23. package/bin/generate-plugin-manifests.mjs +1 -0
  24. package/bin/harvest-friction.mjs +1 -1
  25. package/bin/hook-stats.mjs +21 -21
  26. package/bin/install.mjs +3 -2
  27. package/bin/lint-transcript.mjs +0 -0
  28. package/bin/mcp-server.mjs +1 -1
  29. package/bin/observe.mjs +0 -0
  30. package/bin/pre-commit-block-strays.sh +0 -0
  31. package/bin/refresh-third-party.mjs +0 -0
  32. package/bin/unified-cli.mjs +0 -0
  33. package/commands/continuous-improvement.md +115 -115
  34. package/commands/dashboard.md +56 -56
  35. package/commands/harvest.md +1 -1
  36. package/commands/seven-laws.md +16 -16
  37. package/commands/superpowers.md +1 -1
  38. package/commands/workspace-surface-audit.md +77 -77
  39. package/hooks/companion-preference.mjs +0 -0
  40. package/hooks/gateguard.mjs +22 -10
  41. package/hooks/goal-drift-stop.mjs +0 -0
  42. package/hooks/observe.sh +0 -0
  43. package/hooks/recall-briefing.mjs +167 -0
  44. package/hooks/route-prompt.mjs +0 -0
  45. package/hooks/session.sh +106 -106
  46. package/hooks/three-section-close.mjs +0 -0
  47. package/instinct-packs/go.json +58 -58
  48. package/instinct-packs/meta.json +16 -16
  49. package/instinct-packs/python.json +58 -58
  50. package/instinct-packs/react.json +58 -58
  51. package/lib/cli-anything.mjs +0 -0
  52. package/lib/compound-engineering.mjs +0 -0
  53. package/lib/gateguard-state.mjs +0 -0
  54. package/lib/goal-drift-gate.mjs +0 -0
  55. package/lib/goal-state.mjs +8 -8
  56. package/lib/observe-event.mjs +0 -0
  57. package/lib/plugin-metadata.mjs +12 -7
  58. package/lib/pm-marketplace.mjs +0 -0
  59. package/lib/pm-skills.mjs +0 -0
  60. package/lib/recall-briefing.mjs +57 -0
  61. package/lib/recall-index.mjs +2 -2
  62. package/lib/resolve-home-dir.mjs +0 -0
  63. package/lib/skill-distill.mjs +0 -0
  64. package/lib/skill-tiers.mjs +0 -0
  65. package/lib/unified-plugin.mjs +0 -0
  66. package/llms.txt +2 -2
  67. package/package.json +4 -3
  68. package/plugins/beginner.json +3 -3
  69. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +2 -2
  70. package/plugins/continuous-improvement/.claude-plugin/plugin.json +2 -2
  71. package/plugins/continuous-improvement/LICENSE +21 -21
  72. package/plugins/continuous-improvement/agents/README.md +3 -3
  73. package/plugins/continuous-improvement/bin/backfill.mjs +19 -19
  74. package/plugins/continuous-improvement/bin/gateguard-clear.mjs +0 -0
  75. package/plugins/continuous-improvement/bin/mcp-server.mjs +1 -1
  76. package/plugins/continuous-improvement/bin/observe.mjs +0 -0
  77. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -115
  78. package/plugins/continuous-improvement/commands/dashboard.md +56 -56
  79. package/plugins/continuous-improvement/commands/harvest.md +1 -1
  80. package/plugins/continuous-improvement/commands/seven-laws.md +16 -16
  81. package/plugins/continuous-improvement/commands/superpowers.md +1 -1
  82. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -77
  83. package/plugins/continuous-improvement/hooks/companion-preference.mjs +0 -0
  84. package/plugins/continuous-improvement/hooks/gateguard.mjs +22 -10
  85. package/plugins/continuous-improvement/hooks/goal-drift-stop.mjs +0 -0
  86. package/plugins/continuous-improvement/hooks/hooks.json +6 -1
  87. package/plugins/continuous-improvement/hooks/observe.sh +0 -0
  88. package/plugins/continuous-improvement/hooks/recall-briefing.mjs +167 -0
  89. package/plugins/continuous-improvement/hooks/route-prompt.mjs +0 -0
  90. package/plugins/continuous-improvement/hooks/session.sh +106 -106
  91. package/plugins/continuous-improvement/hooks/three-section-close.mjs +0 -0
  92. package/plugins/continuous-improvement/instinct-packs/go.json +58 -58
  93. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -16
  94. package/plugins/continuous-improvement/instinct-packs/python.json +58 -58
  95. package/plugins/continuous-improvement/instinct-packs/react.json +58 -58
  96. package/plugins/continuous-improvement/lib/gateguard-state.mjs +0 -0
  97. package/plugins/continuous-improvement/lib/goal-drift-gate.mjs +0 -0
  98. package/plugins/continuous-improvement/lib/goal-state.mjs +8 -8
  99. package/plugins/continuous-improvement/lib/observe-event.mjs +0 -0
  100. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +12 -7
  101. package/plugins/continuous-improvement/lib/recall-briefing.mjs +57 -0
  102. package/plugins/continuous-improvement/lib/recall-index.mjs +2 -2
  103. package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +0 -0
  104. package/plugins/continuous-improvement/lib/skill-distill.mjs +0 -0
  105. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +1 -1
  106. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +1 -1
  107. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -411
  108. package/plugins/expert.json +2 -2
  109. package/skills/superpowers.md +1 -1
  110. package/skills/tdd-workflow.md +411 -411
@@ -1,58 +1,58 @@
1
- [
2
- {
3
- "id": "go-error-handling",
4
- "trigger": "when calling functions that return errors",
5
- "body": "Always check returned errors immediately. Never use _ to discard errors unless you've explicitly decided it's safe and documented why.",
6
- "confidence": 0.7,
7
- "domain": "patterns"
8
- },
9
- {
10
- "id": "go-defer-cleanup",
11
- "trigger": "when opening files, connections, or acquiring locks",
12
- "body": "Use defer immediately after acquiring a resource for cleanup. Place defer right after the error check for the acquisition.",
13
- "confidence": 0.7,
14
- "domain": "patterns"
15
- },
16
- {
17
- "id": "go-interface-consumer",
18
- "trigger": "when defining Go interfaces",
19
- "body": "Define interfaces at the consumer side, not the producer side. Keep interfaces small (1-3 methods). Accept interfaces, return structs.",
20
- "confidence": 0.65,
21
- "domain": "patterns"
22
- },
23
- {
24
- "id": "go-table-driven-tests",
25
- "trigger": "when writing Go tests",
26
- "body": "Use table-driven tests with subtests (t.Run) for functions with multiple input/output cases. Name test cases descriptively.",
27
- "confidence": 0.7,
28
- "domain": "testing"
29
- },
30
- {
31
- "id": "go-context-propagation",
32
- "trigger": "when writing HTTP handlers or long-running operations",
33
- "body": "Accept context.Context as the first parameter. Propagate it to all downstream calls. Use it for cancellation and timeouts.",
34
- "confidence": 0.65,
35
- "domain": "patterns"
36
- },
37
- {
38
- "id": "go-goroutine-lifecycle",
39
- "trigger": "when spawning goroutines",
40
- "body": "Always ensure goroutines have a way to exit (context cancellation, done channel, or WaitGroup). Never fire-and-forget goroutines without cleanup.",
41
- "confidence": 0.7,
42
- "domain": "patterns"
43
- },
44
- {
45
- "id": "go-struct-zero-values",
46
- "trigger": "when designing Go structs",
47
- "body": "Design structs so their zero value is useful. Use pointer fields only when nil is a meaningful distinct state from zero value.",
48
- "confidence": 0.6,
49
- "domain": "patterns"
50
- },
51
- {
52
- "id": "go-mod-tidy",
53
- "trigger": "when adding or removing dependencies",
54
- "body": "Run 'go mod tidy' after adding or removing imports to keep go.mod and go.sum clean.",
55
- "confidence": 0.65,
56
- "domain": "workflow"
57
- }
58
- ]
1
+ [
2
+ {
3
+ "id": "go-error-handling",
4
+ "trigger": "when calling functions that return errors",
5
+ "body": "Always check returned errors immediately. Never use _ to discard errors unless you've explicitly decided it's safe and documented why.",
6
+ "confidence": 0.7,
7
+ "domain": "patterns"
8
+ },
9
+ {
10
+ "id": "go-defer-cleanup",
11
+ "trigger": "when opening files, connections, or acquiring locks",
12
+ "body": "Use defer immediately after acquiring a resource for cleanup. Place defer right after the error check for the acquisition.",
13
+ "confidence": 0.7,
14
+ "domain": "patterns"
15
+ },
16
+ {
17
+ "id": "go-interface-consumer",
18
+ "trigger": "when defining Go interfaces",
19
+ "body": "Define interfaces at the consumer side, not the producer side. Keep interfaces small (1-3 methods). Accept interfaces, return structs.",
20
+ "confidence": 0.65,
21
+ "domain": "patterns"
22
+ },
23
+ {
24
+ "id": "go-table-driven-tests",
25
+ "trigger": "when writing Go tests",
26
+ "body": "Use table-driven tests with subtests (t.Run) for functions with multiple input/output cases. Name test cases descriptively.",
27
+ "confidence": 0.7,
28
+ "domain": "testing"
29
+ },
30
+ {
31
+ "id": "go-context-propagation",
32
+ "trigger": "when writing HTTP handlers or long-running operations",
33
+ "body": "Accept context.Context as the first parameter. Propagate it to all downstream calls. Use it for cancellation and timeouts.",
34
+ "confidence": 0.65,
35
+ "domain": "patterns"
36
+ },
37
+ {
38
+ "id": "go-goroutine-lifecycle",
39
+ "trigger": "when spawning goroutines",
40
+ "body": "Always ensure goroutines have a way to exit (context cancellation, done channel, or WaitGroup). Never fire-and-forget goroutines without cleanup.",
41
+ "confidence": 0.7,
42
+ "domain": "patterns"
43
+ },
44
+ {
45
+ "id": "go-struct-zero-values",
46
+ "trigger": "when designing Go structs",
47
+ "body": "Design structs so their zero value is useful. Use pointer fields only when nil is a meaningful distinct state from zero value.",
48
+ "confidence": 0.6,
49
+ "domain": "patterns"
50
+ },
51
+ {
52
+ "id": "go-mod-tidy",
53
+ "trigger": "when adding or removing dependencies",
54
+ "body": "Run 'go mod tidy' after adding or removing imports to keep go.mod and go.sum clean.",
55
+ "confidence": 0.65,
56
+ "domain": "workflow"
57
+ }
58
+ ]
@@ -1,16 +1,16 @@
1
- [
2
- {
3
- "id": "skip-thin-observation-schema",
4
- "trigger": "when running /continuous-improvement and observations.jsonl entries contain only tool_start events with no inputs/outputs/errors",
5
- "body": "Skip instinct fabrication and report the schema gap instead. With only ts/event/session/tool/project_id/project_name fields, the stream cannot distinguish a `git status` Bash call from a `rm -rf` Bash call. Tool-name bigrams (Bash→Bash, Edit→Edit, Read→Edit) reflect parallel-call artifacts and harness-enforced read-before-edit, not learned preferences. Recommend enhancing PostToolUse/PreToolUse hooks to log tool inputs (Bash command head, Skill name) and tool_end with success flag before retrying analysis.",
6
- "confidence": 0.6,
7
- "domain": "meta"
8
- },
9
- {
10
- "id": "parallelize-independent-tool-calls",
11
- "trigger": "when issuing 2+ tool calls with no data dependency between them in the same turn",
12
- "body": "Batch independent tool calls into a single message instead of issuing them sequentially. Independent reads, independent greps, independent git inspections, independent file edits in unrelated files belong in one message with multiple tool blocks. Dependent calls (output of A determines input of B) stay sequential. Exception: when a single check would short-circuit the whole task (e.g., `git status` returning empty), one call first is fine. Sequential issuing of independent calls wastes wall-clock time and burns context per round-trip.",
13
- "confidence": 0.6,
14
- "domain": "workflow"
15
- }
16
- ]
1
+ [
2
+ {
3
+ "id": "skip-thin-observation-schema",
4
+ "trigger": "when running /continuous-improvement and observations.jsonl entries contain only tool_start events with no inputs/outputs/errors",
5
+ "body": "Skip instinct fabrication and report the schema gap instead. With only ts/event/session/tool/project_id/project_name fields, the stream cannot distinguish a `git status` Bash call from a `rm -rf` Bash call. Tool-name bigrams (Bash→Bash, Edit→Edit, Read→Edit) reflect parallel-call artifacts and harness-enforced read-before-edit, not learned preferences. Recommend enhancing PostToolUse/PreToolUse hooks to log tool inputs (Bash command head, Skill name) and tool_end with success flag before retrying analysis.",
6
+ "confidence": 0.6,
7
+ "domain": "meta"
8
+ },
9
+ {
10
+ "id": "parallelize-independent-tool-calls",
11
+ "trigger": "when issuing 2+ tool calls with no data dependency between them in the same turn",
12
+ "body": "Batch independent tool calls into a single message instead of issuing them sequentially. Independent reads, independent greps, independent git inspections, independent file edits in unrelated files belong in one message with multiple tool blocks. Dependent calls (output of A determines input of B) stay sequential. Exception: when a single check would short-circuit the whole task (e.g., `git status` returning empty), one call first is fine. Sequential issuing of independent calls wastes wall-clock time and burns context per round-trip.",
13
+ "confidence": 0.6,
14
+ "domain": "workflow"
15
+ }
16
+ ]
@@ -1,58 +1,58 @@
1
- [
2
- {
3
- "id": "python-virtual-env",
4
- "trigger": "when starting work on a Python project",
5
- "body": "Check for virtual environment (venv, .venv, conda) before installing packages. Never install to system Python.",
6
- "confidence": 0.7,
7
- "domain": "workflow"
8
- },
9
- {
10
- "id": "python-type-hints",
11
- "trigger": "when writing Python functions",
12
- "body": "Add type hints to function parameters and return values. Use Optional[], list[], dict[] (Python 3.10+) or typing module for older versions.",
13
- "confidence": 0.6,
14
- "domain": "code-style"
15
- },
16
- {
17
- "id": "python-pathlib",
18
- "trigger": "when working with file paths in Python",
19
- "body": "Use pathlib.Path instead of os.path for file operations. It's more readable and cross-platform.",
20
- "confidence": 0.65,
21
- "domain": "patterns"
22
- },
23
- {
24
- "id": "python-context-managers",
25
- "trigger": "when opening files or database connections",
26
- "body": "Always use context managers (with statement) for files, database connections, and locks. Never rely on manual .close() calls.",
27
- "confidence": 0.7,
28
- "domain": "patterns"
29
- },
30
- {
31
- "id": "python-list-comprehension",
32
- "trigger": "when writing simple for loops that build lists",
33
- "body": "Prefer list comprehensions for simple transformations. Use regular for loops when the logic is complex or has side effects.",
34
- "confidence": 0.6,
35
- "domain": "code-style"
36
- },
37
- {
38
- "id": "python-requirements-check",
39
- "trigger": "when adding a new import",
40
- "body": "Check if the package is already in requirements.txt, pyproject.toml, or Pipfile before adding. Search for existing usage in the codebase.",
41
- "confidence": 0.65,
42
- "domain": "workflow"
43
- },
44
- {
45
- "id": "python-pytest-fixtures",
46
- "trigger": "when writing Python tests",
47
- "body": "Use pytest fixtures for test setup/teardown instead of unittest setUp/tearDown. Use conftest.py for shared fixtures.",
48
- "confidence": 0.6,
49
- "domain": "testing"
50
- },
51
- {
52
- "id": "python-dataclass",
53
- "trigger": "when creating classes that primarily hold data",
54
- "body": "Use @dataclass or Pydantic BaseModel instead of plain classes for data containers. They provide __init__, __repr__, and comparison for free.",
55
- "confidence": 0.65,
56
- "domain": "patterns"
57
- }
58
- ]
1
+ [
2
+ {
3
+ "id": "python-virtual-env",
4
+ "trigger": "when starting work on a Python project",
5
+ "body": "Check for virtual environment (venv, .venv, conda) before installing packages. Never install to system Python.",
6
+ "confidence": 0.7,
7
+ "domain": "workflow"
8
+ },
9
+ {
10
+ "id": "python-type-hints",
11
+ "trigger": "when writing Python functions",
12
+ "body": "Add type hints to function parameters and return values. Use Optional[], list[], dict[] (Python 3.10+) or typing module for older versions.",
13
+ "confidence": 0.6,
14
+ "domain": "code-style"
15
+ },
16
+ {
17
+ "id": "python-pathlib",
18
+ "trigger": "when working with file paths in Python",
19
+ "body": "Use pathlib.Path instead of os.path for file operations. It's more readable and cross-platform.",
20
+ "confidence": 0.65,
21
+ "domain": "patterns"
22
+ },
23
+ {
24
+ "id": "python-context-managers",
25
+ "trigger": "when opening files or database connections",
26
+ "body": "Always use context managers (with statement) for files, database connections, and locks. Never rely on manual .close() calls.",
27
+ "confidence": 0.7,
28
+ "domain": "patterns"
29
+ },
30
+ {
31
+ "id": "python-list-comprehension",
32
+ "trigger": "when writing simple for loops that build lists",
33
+ "body": "Prefer list comprehensions for simple transformations. Use regular for loops when the logic is complex or has side effects.",
34
+ "confidence": 0.6,
35
+ "domain": "code-style"
36
+ },
37
+ {
38
+ "id": "python-requirements-check",
39
+ "trigger": "when adding a new import",
40
+ "body": "Check if the package is already in requirements.txt, pyproject.toml, or Pipfile before adding. Search for existing usage in the codebase.",
41
+ "confidence": 0.65,
42
+ "domain": "workflow"
43
+ },
44
+ {
45
+ "id": "python-pytest-fixtures",
46
+ "trigger": "when writing Python tests",
47
+ "body": "Use pytest fixtures for test setup/teardown instead of unittest setUp/tearDown. Use conftest.py for shared fixtures.",
48
+ "confidence": 0.6,
49
+ "domain": "testing"
50
+ },
51
+ {
52
+ "id": "python-dataclass",
53
+ "trigger": "when creating classes that primarily hold data",
54
+ "body": "Use @dataclass or Pydantic BaseModel instead of plain classes for data containers. They provide __init__, __repr__, and comparison for free.",
55
+ "confidence": 0.65,
56
+ "domain": "patterns"
57
+ }
58
+ ]
@@ -1,58 +1,58 @@
1
- [
2
- {
3
- "id": "react-check-existing-components",
4
- "trigger": "when creating a new React component",
5
- "body": "Search the codebase for existing components that solve the same problem before creating new ones. Check shared/, components/, and ui/ directories.",
6
- "confidence": 0.65,
7
- "domain": "workflow"
8
- },
9
- {
10
- "id": "react-prefer-server-components",
11
- "trigger": "when creating components in Next.js App Router",
12
- "body": "Default to Server Components. Only add 'use client' when the component needs useState, useEffect, event handlers, or browser APIs.",
13
- "confidence": 0.7,
14
- "domain": "patterns"
15
- },
16
- {
17
- "id": "react-key-prop-lists",
18
- "trigger": "when rendering lists with .map()",
19
- "body": "Always use a stable, unique key prop. Never use array index as key unless the list is static and never reordered.",
20
- "confidence": 0.7,
21
- "domain": "patterns"
22
- },
23
- {
24
- "id": "react-effect-cleanup",
25
- "trigger": "when writing useEffect with subscriptions or timers",
26
- "body": "Always return a cleanup function from useEffect when setting up subscriptions, event listeners, or timers to prevent memory leaks.",
27
- "confidence": 0.7,
28
- "domain": "patterns"
29
- },
30
- {
31
- "id": "react-memo-expensive",
32
- "trigger": "when a component re-renders with expensive calculations",
33
- "body": "Use useMemo for expensive computations and React.memo for components that receive the same props frequently. Don't memo everything — only what's measurably slow.",
34
- "confidence": 0.6,
35
- "domain": "patterns"
36
- },
37
- {
38
- "id": "react-form-validation",
39
- "trigger": "when building forms",
40
- "body": "Check if react-hook-form or zod is already in the project before building custom form validation. Prefer library solutions over hand-rolled validation.",
41
- "confidence": 0.65,
42
- "domain": "tooling"
43
- },
44
- {
45
- "id": "react-error-boundary",
46
- "trigger": "when adding a new page or route",
47
- "body": "Ensure error boundaries exist around new pages/routes. In Next.js App Router, add error.tsx. In other React apps, wrap with ErrorBoundary component.",
48
- "confidence": 0.6,
49
- "domain": "patterns"
50
- },
51
- {
52
- "id": "react-test-user-behavior",
53
- "trigger": "when writing React component tests",
54
- "body": "Test user behavior, not implementation details. Use @testing-library/react. Query by role, label, or text — not by class name or test ID.",
55
- "confidence": 0.65,
56
- "domain": "testing"
57
- }
58
- ]
1
+ [
2
+ {
3
+ "id": "react-check-existing-components",
4
+ "trigger": "when creating a new React component",
5
+ "body": "Search the codebase for existing components that solve the same problem before creating new ones. Check shared/, components/, and ui/ directories.",
6
+ "confidence": 0.65,
7
+ "domain": "workflow"
8
+ },
9
+ {
10
+ "id": "react-prefer-server-components",
11
+ "trigger": "when creating components in Next.js App Router",
12
+ "body": "Default to Server Components. Only add 'use client' when the component needs useState, useEffect, event handlers, or browser APIs.",
13
+ "confidence": 0.7,
14
+ "domain": "patterns"
15
+ },
16
+ {
17
+ "id": "react-key-prop-lists",
18
+ "trigger": "when rendering lists with .map()",
19
+ "body": "Always use a stable, unique key prop. Never use array index as key unless the list is static and never reordered.",
20
+ "confidence": 0.7,
21
+ "domain": "patterns"
22
+ },
23
+ {
24
+ "id": "react-effect-cleanup",
25
+ "trigger": "when writing useEffect with subscriptions or timers",
26
+ "body": "Always return a cleanup function from useEffect when setting up subscriptions, event listeners, or timers to prevent memory leaks.",
27
+ "confidence": 0.7,
28
+ "domain": "patterns"
29
+ },
30
+ {
31
+ "id": "react-memo-expensive",
32
+ "trigger": "when a component re-renders with expensive calculations",
33
+ "body": "Use useMemo for expensive computations and React.memo for components that receive the same props frequently. Don't memo everything — only what's measurably slow.",
34
+ "confidence": 0.6,
35
+ "domain": "patterns"
36
+ },
37
+ {
38
+ "id": "react-form-validation",
39
+ "trigger": "when building forms",
40
+ "body": "Check if react-hook-form or zod is already in the project before building custom form validation. Prefer library solutions over hand-rolled validation.",
41
+ "confidence": 0.65,
42
+ "domain": "tooling"
43
+ },
44
+ {
45
+ "id": "react-error-boundary",
46
+ "trigger": "when adding a new page or route",
47
+ "body": "Ensure error boundaries exist around new pages/routes. In Next.js App Router, add error.tsx. In other React apps, wrap with ErrorBoundary component.",
48
+ "confidence": 0.6,
49
+ "domain": "patterns"
50
+ },
51
+ {
52
+ "id": "react-test-user-behavior",
53
+ "trigger": "when writing React component tests",
54
+ "body": "Test user behavior, not implementation details. Use @testing-library/react. Query by role, label, or text — not by class name or test ID.",
55
+ "confidence": 0.65,
56
+ "domain": "testing"
57
+ }
58
+ ]
File without changes
File without changes
File without changes
File without changes
@@ -19,10 +19,10 @@ const STOPWORDS = new Set([
19
19
  "make", "made", "adds", "new", "get", "got", "set", "also", "only", "each",
20
20
  "task", "goal", "plan", "work", "working", "build", "building", "code",
21
21
  ]);
22
- // 4 suits Latin/Cyrillic prose, but it silently drops most Korean/Thai words
23
- // (typically 2 chars) even though the Unicode splitter now keeps them — so the
24
- // goal-state half of the tokenizer fix is only partial for those scripts. A
25
- // script-aware floor is a logged follow-up (see CLAUDE.md Deferred).
22
+ // 4 suits Latin/Cyrillic/Thai prose (Thai combining marks are now kept; see
23
+ // extractKeywordsFromProse regex), but it silently drops most Korean words
24
+ // (typically 2 chars). A script-aware floor for Korean is a logged follow-up
25
+ // (see CLAUDE.md Deferred).
26
26
  const KEYWORD_MIN_LENGTH = 4;
27
27
  const KEYWORD_CAP = 20;
28
28
  const DEFAULT_WINDOW = 30;
@@ -52,14 +52,14 @@ export function getSection(markdown, heading) {
52
52
  }
53
53
  /**
54
54
  * Tokenize prose into goal keywords: lowercase, split on any non-letter /
55
- * non-number (Unicode-aware, so accented Latin / Cyrillic / CJK survive), drop
56
- * stopwords, pure-digit tokens, and tokens shorter than KEYWORD_MIN_LENGTH.
57
- * Deduped, capped at KEYWORD_CAP.
55
+ * non-number / non-mark (Unicode-aware, so accented Latin / Cyrillic / CJK /
56
+ * Thai survive), drop stopwords, pure-digit tokens, and tokens shorter than
57
+ * KEYWORD_MIN_LENGTH. Deduped, capped at KEYWORD_CAP.
58
58
  */
59
59
  export function extractKeywordsFromProse(prose) {
60
60
  const seen = new Set();
61
61
  const out = [];
62
- for (const raw of prose.toLowerCase().split(/[^\p{L}\p{N}]+/u)) {
62
+ for (const raw of prose.toLowerCase().split(/[^\p{L}\p{N}\p{M}]+/u)) {
63
63
  const word = raw.trim();
64
64
  if (word.length < KEYWORD_MIN_LENGTH)
65
65
  continue;
File without changes
@@ -26,7 +26,7 @@ const KEYWORDS = [
26
26
  "transcript-linter",
27
27
  ];
28
28
  const CLAUDE_PLUGIN_CATEGORY = "productivity";
29
- const SHARED_PLUGIN_DESCRIPTION = "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline 25 bundled skills, gating hooks, the Mulahazah auto-leveling instinct engine, and a GitHub Action transcript linter.";
29
+ const SHARED_PLUGIN_DESCRIPTION = "Makes Claude Code reason harder, recall past corrections, and learn from every session so its competence compounds run over run. The Mulahazah engine turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time — no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 25 bundled skills, instinct-aware hooks, an MCP toolset for recall and reflection, and a GitHub Action transcript linter that feeds real work history back into sharper instincts.";
30
30
  // Four vendored upstream companions registered alongside the CI plugin.
31
31
  // Each entry points at a pinned-SHA snapshot under third-party/<name>/.
32
32
  // See third-party/MANIFEST.md for refresh recipes and per-snapshot
@@ -76,7 +76,7 @@ const THIRD_PARTY_COMPANIONS = [
76
76
  },
77
77
  {
78
78
  name: "oh-my-claudecode",
79
- description: "Multi-agent orchestration system for Claude Code — 39 skills + 19 agents covering audit, plan, build, verify, ship, release, retrospective, and ops. Includes ralph (autonomous PRD loop), release, ultrawork, ultraqa, team, trace, visual-verdict, debug, deep-dive, deep-interview, autopilot, autoresearch. Vendored snapshot at third-party/oh-my-claudecode/ pinned to upstream SHA aacde3e (v4.13.6). Heavy overlap with continuous-improvement /ralph and /superpowers — pick per task.",
79
+ description: "Multi-agent orchestration system for Claude Code — 38 skills + 19 agents covering audit, plan, build, verify, ship, release, retrospective, and ops. Includes ralph (autonomous PRD loop), release, ultrawork, ultraqa, team, trace, visual-verdict, debug, deep-dive, deep-interview, autopilot, autoresearch. Vendored snapshot at third-party/oh-my-claudecode/ pinned to upstream SHA aacde3e (v4.13.6). Heavy overlap with continuous-improvement /ralph and /superpowers — pick per task.",
80
80
  version: "4.13.6",
81
81
  source: "./third-party/oh-my-claudecode",
82
82
  author: {
@@ -376,12 +376,12 @@ const EXPERT_TOOL_ENTRIES = [
376
376
  ];
377
377
  const MODE_METADATA = {
378
378
  beginner: {
379
- description: "Beginner mode: see what your agent learned, list its instincts, and request a session reflection. Bundles four discipline skills (gateguard, para-memory-files, tdd-workflow, verification-loop) so research, memory, tests, and verification happen by default.",
379
+ description: "Beginner mode: see what your agent learned, list its instincts, and request a session reflection. Bundles four grounding skills (gateguard, para-memory-files, tdd-workflow, verification-loop) so research, memory, tests, and verification happen by default — every edit starts from facts, not guesses.",
380
380
  hooks: ["PreToolUse", "PostToolUse", "UserPromptSubmit"],
381
- hookDescription: "Silently captures every tool call as observations and routes prompts to the matching discipline skill via the route table. Lightweight and non-blocking.",
381
+ hookDescription: "Silently captures every tool call as observations and routes prompts to the matching skill via the route table. Lightweight and non-blocking.",
382
382
  },
383
383
  expert: {
384
- description: "Expert mode: tune confidence, manage instincts, and persist plans on disk. Adds safety, token-budget, and strategic-compact skills plus the /learn-eval command so long sessions stay disciplined and learnings survive context resets.",
384
+ description: "Expert mode: tune confidence, manage instincts, and persist plans on disk. Adds safety, token-budget, and strategic-compact skills plus the /learn-eval command so long sessions stay sharp and learnings survive context resets.",
385
385
  hooks: ["PreToolUse", "PostToolUse", "UserPromptSubmit", "SessionStart", "SessionEnd"],
386
386
  hookDescription: "Full hook suite: observation capture, lazy prompt routing, session-level instinct loading, and auto-reflection.",
387
387
  },
@@ -482,8 +482,13 @@ export function getPluginHooksConfig() {
482
482
  command: "node \"${CLAUDE_PLUGIN_ROOT}/hooks/route-prompt.mjs\"",
483
483
  timeout: 5,
484
484
  };
485
+ const recallBriefingCommand = {
486
+ type: "command",
487
+ command: "node \"${CLAUDE_PLUGIN_ROOT}/hooks/recall-briefing.mjs\"",
488
+ timeout: 5,
489
+ };
485
490
  return {
486
- description: "Gateguard fact-forcing PreToolUse, companion-preference enforcement, observation, session lifecycle, 3-section-close discipline, goal-drift Stop gate, and UserPromptSubmit lazy-routing hooks for continuous-improvement.",
491
+ description: "Gateguard fact-forcing PreToolUse, companion-preference enforcement, observation, session lifecycle, 3-section-close discipline, goal-drift Stop gate, and UserPromptSubmit lazy-routing plus opt-in proactive recall-briefing hooks for continuous-improvement.",
487
492
  hooks: {
488
493
  // gateguard runs FIRST on PreToolUse so its block decision short-circuits
489
494
  // before companion-preference sees the call. companion-preference runs
@@ -498,7 +503,7 @@ export function getPluginHooksConfig() {
498
503
  { hooks: [gateguardCommand, companionPreferenceCommand] },
499
504
  ],
500
505
  PostToolUse: [{ hooks: [observeCommand] }],
501
- UserPromptSubmit: [{ hooks: [routePromptCommand] }],
506
+ UserPromptSubmit: [{ hooks: [routePromptCommand, recallBriefingCommand] }],
502
507
  SessionStart: [{ hooks: [sessionCommand] }],
503
508
  SessionEnd: [{ hooks: [sessionCommand] }],
504
509
  Stop: [{ hooks: [threeSectionCloseCommand, goalDriftStopCommand] }],
File without changes
package/lib/pm-skills.mjs CHANGED
File without changes
@@ -0,0 +1,57 @@
1
+ // recall-briefing.mts — Pure decision core for the proactive recall-briefing hook.
2
+ //
3
+ // No I/O. Given (enabled, already-briefed, prompt, ranked recall hits), decides
4
+ // whether to inject a one-time-per-session "you've touched related work before"
5
+ // system-reminder and renders it. The hook (src/hooks/recall-briefing.mts) does
6
+ // the filesystem work — read the prompt, read observations.jsonl, build the BM25
7
+ // index (recall-index.mts), track per-session state — then calls decideBriefing.
8
+ // Keeping the decision pure lets the unit tests cover every gate and boundary
9
+ // (disabled / already-briefed / empty-or-short prompt / no hits / malformed
10
+ // input) without touching the filesystem, per the repo lesson that green gates
11
+ // do not prove boundary safety.
12
+ //
13
+ // This is an amplifier, not a gate: it never blocks a prompt. It only surfaces
14
+ // prior context so the agent reuses a past fix instead of re-deriving it. It is
15
+ // opt-in (the hook checks an env flag) and fires at most once per session.
16
+ export const DEFAULT_MAX_HITS = 3;
17
+ export const DEFAULT_MIN_PROMPT_LENGTH = 12;
18
+ /** Render ranked hits as a compact UserPromptSubmit system-reminder. Pure string. */
19
+ export function formatBriefing(hits) {
20
+ const lines = [
21
+ "<system-reminder>",
22
+ "Recall briefing: this project has prior sessions that touched related work. Before re-deriving a fix, consider the `ci_recall` MCP tool (or `/recall`) for full context. Most relevant past activity:",
23
+ ];
24
+ for (const h of hits) {
25
+ const stamp = h && h.ts ? `[${h.ts}] ` : "";
26
+ const tool = (h && h.tool) || "(tool?)";
27
+ const snippet = ((h && h.snippet) || "").replace(/\s+/g, " ").trim();
28
+ lines.push(`- ${stamp}${tool}: ${snippet || "(no summary)"}`);
29
+ }
30
+ lines.push("</system-reminder>");
31
+ return lines.join("\n");
32
+ }
33
+ /**
34
+ * Decide whether to inject a recall briefing. Fails closed: any disabling
35
+ * condition (opted out, already briefed, prompt below the noise floor, no hits,
36
+ * malformed input) returns shouldBrief=false and never throws.
37
+ */
38
+ export function decideBriefing(params) {
39
+ const none = { shouldBrief: false, reminder: null };
40
+ if (!params || params.enabled !== true)
41
+ return none;
42
+ if (params.alreadyBriefed === true)
43
+ return none;
44
+ const prompt = typeof params.prompt === "string" ? params.prompt : "";
45
+ const minLen = typeof params.minPromptLength === "number" && params.minPromptLength >= 0
46
+ ? params.minPromptLength
47
+ : DEFAULT_MIN_PROMPT_LENGTH;
48
+ if (prompt.trim().length < minLen)
49
+ return none;
50
+ const maxHits = typeof params.maxHits === "number" && params.maxHits > 0
51
+ ? Math.floor(params.maxHits)
52
+ : DEFAULT_MAX_HITS;
53
+ const hits = Array.isArray(params.hits) ? params.hits.slice(0, maxHits) : [];
54
+ if (hits.length === 0)
55
+ return none;
56
+ return { shouldBrief: true, reminder: formatBriefing(hits) };
57
+ }
@@ -19,10 +19,10 @@ const BM25_K1 = 1.5;
19
19
  const BM25_B = 0.75;
20
20
  const DEFAULT_K = 5;
21
21
  const SNIPPET_RADIUS = 60;
22
- /** Lowercase, split on any non-letter / non-number (Unicode-aware), drop stopwords and tokens shorter than TOKEN_MIN_LENGTH. */
22
+ /** Lowercase, split on any non-letter / non-number / non-mark (Unicode-aware), drop stopwords and tokens shorter than TOKEN_MIN_LENGTH. */
23
23
  export function tokenize(text) {
24
24
  const out = [];
25
- for (const raw of text.toLowerCase().split(/[^\p{L}\p{N}]+/u)) {
25
+ for (const raw of text.toLowerCase().split(/[^\p{L}\p{N}\p{M}]+/u)) {
26
26
  if (raw.length < TOKEN_MIN_LENGTH)
27
27
  continue;
28
28
  if (STOPWORDS.has(raw))
File without changes
File without changes
File without changes
File without changes
package/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # continuous-improvement
2
2
 
3
- > Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline 25 bundled skills, gating hooks, the Mulahazah auto-leveling instinct engine, and a GitHub Action transcript linter.
3
+ > Makes Claude Code reason harder, recall past corrections, and learn from every session so its competence compounds run over run. The Mulahazah engine turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time — no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 25 bundled skills, instinct-aware hooks, an MCP toolset for recall and reflection, and a GitHub Action transcript linter that feeds real work history back into sharper instincts.
4
4
 
5
5
  ## What This Is
6
6
 
7
- A discipline framework for AI coding agents. It enforces seven laws — research, plan, execute one thing at a time, verify, reflect, iterate, learn — and builds behavioral instincts over time via the Mulahazah learning system, so the same correction does not have to be given twice.
7
+ An intelligence amplifier for AI coding agents. It makes Claude reason at a higher level on every task, recall the corrections it has already received, and learn from each session so its competence compounds over time — research, plan, execute one thing at a time, verify, reflect, iterate, learn — building behavioral instincts via the Mulahazah learning system, so the same correction never has to be given twice and each run starts smarter than the last.
8
8
 
9
9
  ## Install
10
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "continuous-improvement",
3
- "version": "3.11.0",
4
- "description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline 25 bundled skills, gating hooks, the Mulahazah auto-leveling instinct engine, and a GitHub Action transcript linter. Beginner: one /plugin install command. Expert: adds MCP tools and session hooks.",
3
+ "version": "3.12.3",
4
+ "description": "Makes Claude Code reason harder, recall past corrections, and learn from every session so its competence compounds run over run. The Mulahazah engine turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time — no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 25 bundled skills, instinct-aware hooks, an MCP toolset for recall and reflection, and a GitHub Action transcript linter that feeds real work history back into sharper instincts. Beginner: one /plugin install command. Expert: adds MCP tools and session hooks.",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "claude-code-skill",
@@ -50,7 +50,8 @@
50
50
  "verify:test-imports-only": "node bin/check-test-imports-only.mjs",
51
51
  "verify:scripts-citation-drift": "node bin/check-scripts-citation-drift.mjs",
52
52
  "verify:third-party-shape": "node bin/check-third-party-shape.mjs",
53
- "verify:all": "npm run verify:skill-mirror && npm run verify:skill-tiers && npm run verify:skill-law-tag && npm run verify:skill-count && npm run verify:docs-substrings && npm run verify:everything-mirror && npm run verify:routing-targets && npm run verify:doc-runtime-claims && npm run verify:test-imports-only && npm run verify:scripts-citation-drift && npm run verify:third-party-shape && npm run typecheck"
53
+ "verify:tool-count": "node bin/check-tool-count.mjs",
54
+ "verify:all": "npm run verify:skill-mirror && npm run verify:skill-tiers && npm run verify:skill-law-tag && npm run verify:skill-count && npm run verify:docs-substrings && npm run verify:everything-mirror && npm run verify:routing-targets && npm run verify:doc-runtime-claims && npm run verify:test-imports-only && npm run verify:scripts-citation-drift && npm run verify:third-party-shape && npm run verify:tool-count && npm run typecheck"
54
55
  },
55
56
  "files": [
56
57
  ".claude-plugin/",