codymaster 4.8.0 → 5.2.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 (72) hide show
  1. package/CHANGELOG.md +55 -7
  2. package/README.md +142 -95
  3. package/dist/advisory-handoff.js +89 -0
  4. package/dist/advisory-report.js +105 -0
  5. package/dist/cli/command-registry.js +8 -0
  6. package/dist/cli/commands/bench.js +69 -0
  7. package/dist/cli/commands/brain.js +108 -0
  8. package/dist/cli/commands/engineering.js +108 -0
  9. package/dist/cli/commands/evolve.js +123 -0
  10. package/dist/cli/commands/mcp-serve.js +104 -0
  11. package/dist/cm-config.js +0 -18
  12. package/dist/codybench/judges/automated.js +31 -0
  13. package/dist/codybench/runners/claude-code.js +32 -0
  14. package/dist/codybench/suites/memory-retention.js +85 -0
  15. package/dist/codybench/suites/tdd-regression.js +35 -0
  16. package/dist/codybench/suites/token-efficiency.js +55 -0
  17. package/dist/codybench/types.js +2 -0
  18. package/dist/context-db.js +157 -0
  19. package/dist/continuity.js +2 -6
  20. package/dist/execution-analyzer.js +138 -0
  21. package/dist/indexer/skills-lib.js +533 -0
  22. package/dist/indexer/skills-map.js +1374 -0
  23. package/dist/indexer/skills.js +16 -0
  24. package/dist/learning-promoter.js +246 -0
  25. package/dist/mcp-context-server.js +230 -1
  26. package/dist/skill-chain.js +63 -1
  27. package/dist/skill-evolver.js +456 -0
  28. package/dist/skill-execution-cache.js +254 -0
  29. package/dist/smart-brain-router.js +184 -0
  30. package/dist/storage-backend.js +10 -8
  31. package/dist/token-budget.js +88 -0
  32. package/package.json +2 -3
  33. package/scripts/postinstall.js +10 -59
  34. package/skills/CLAUDE.md +0 -5
  35. package/skills/_shared/helpers.md +2 -8
  36. package/skills/cm-browse/SKILL.md +6 -0
  37. package/skills/cm-conductor-worktrees/SKILL.md +4 -0
  38. package/skills/cm-content-factory/landing/docs/content/changelog.md +4 -4
  39. package/skills/cm-content-factory/landing/docs/content/deployment.md +3 -3
  40. package/skills/cm-content-factory/landing/docs/content/execution-flow.md +8 -8
  41. package/skills/cm-content-factory/landing/docs/content/memory-system.md +38 -0
  42. package/skills/cm-content-factory/landing/docs/content/openspace.md +1 -1
  43. package/skills/cm-content-factory/landing/docs/content/use-cases.md +2 -2
  44. package/skills/cm-content-factory/landing/docs/content/v5-intro.md +3 -3
  45. package/skills/cm-content-factory/landing/docs/index.html +1 -1
  46. package/skills/cm-content-factory/landing/index.html +3 -3
  47. package/skills/cm-content-factory/landing/translations.js +37 -37
  48. package/skills/cm-continuity/SKILL.md +32 -33
  49. package/skills/cm-design-studio/SKILL.md +4 -0
  50. package/skills/cm-ecosystem-roadmap/SKILL.md +4 -0
  51. package/skills/cm-engineering-meta/SKILL.md +4 -0
  52. package/skills/cm-guardian-runtime/SKILL.md +5 -1
  53. package/skills/cm-mcp-engineering/SKILL.md +4 -0
  54. package/skills/cm-post-deploy-canary/SKILL.md +4 -0
  55. package/skills/cm-project-bootstrap/SKILL.md +11 -0
  56. package/skills/cm-qa-visual-cli/SKILL.md +4 -0
  57. package/skills/cm-retro-cli/SKILL.md +4 -0
  58. package/skills/cm-second-opinion-cli/SKILL.md +4 -0
  59. package/skills/cm-security-gate/SKILL.md +1 -0
  60. package/skills/cm-skill-chain/SKILL.md +25 -4
  61. package/skills/cm-skill-evolution/SKILL.md +83 -0
  62. package/skills/cm-skill-health/SKILL.md +83 -0
  63. package/skills/cm-skill-index/SKILL.md +11 -3
  64. package/skills/cm-skill-search/SKILL.md +49 -0
  65. package/skills/cm-skill-share/SKILL.md +58 -0
  66. package/skills/cm-sprint-bus/SKILL.md +4 -0
  67. package/skills/cm-start/SKILL.md +0 -10
  68. package/skills/cm-tdd/SKILL.md +2 -2
  69. package/skills/profiles/full.txt +4 -0
  70. package/install.sh +0 -1125
  71. package/scripts/viking-demo.ts +0 -105
  72. package/skills/cm-content-factory/landing/docs/content/openviking.md +0 -33
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: cm-skill-evolution
3
+ description: "Repair or extend CodyMaster skills with a three-mode loop: FIX, DERIVED, and CAPTURED, grounded in current repo tooling."
4
+ ---
5
+
6
+ # cm-skill-evolution
7
+
8
+ Use this skill after `cm-skill-health` identifies a degraded or broken skill, or when `cm advisory handoff --for cm-skill-evolution` produces a structured recovery note.
9
+
10
+ ## Modes
11
+
12
+ ### FIX
13
+ Use when the skill should exist already but is inaccurate, broken, or partially missing.
14
+
15
+ Checklist:
16
+ - repair broken references
17
+ - restore missing support files
18
+ - align docs and profiles
19
+ - re-run skill validation and test gate
20
+
21
+ ### DERIVED
22
+ Use when the original promise was too ambitious, but the repo has enough primitives to ship a truthful MVP.
23
+
24
+ Checklist:
25
+ - keep the same user problem
26
+ - reduce claims to what the code can support today
27
+ - reuse existing repo building blocks instead of inventing a new subsystem
28
+
29
+ ### CAPTURED
30
+ Use when the main value is operational learning rather than a new code path.
31
+
32
+ Checklist:
33
+ - append the lesson with `cm retro --project . --tool skill --note "..."`
34
+ - record durable context in `.cm/CONTINUITY.md`
35
+ - update the relevant skill so future sessions do not repeat the same failure
36
+
37
+ ## Evolution Loop
38
+
39
+ 1. Start from the health note.
40
+ - Preferred source: `cm advisory handoff --for cm-skill-evolution`
41
+ 2. Pick one mode only.
42
+ 3. Define the smallest truthful recovery.
43
+ 4. Patch the skill and its discovery surfaces.
44
+ 5. Verify:
45
+ - `npm run validate:skills`
46
+ - `npm run check:skills`
47
+ - repo test gate if code or docs wiring changed materially
48
+ 6. Capture the lesson in retro and continuity.
49
+
50
+ ## Decision guide
51
+
52
+ - The feature existed and drifted: `FIX`
53
+ - The changelog promised more than the repo ever shipped: `DERIVED`
54
+ - The issue is mainly process and should inform future work: `CAPTURED`
55
+
56
+ ## Output
57
+
58
+ ```md
59
+ ## Skill Evolution
60
+ - Skill: cm-...
61
+ - Mode: FIX | DERIVED | CAPTURED
62
+ - Change: ...
63
+ - Verification: ...
64
+ - Learning captured: yes | no
65
+ ```
66
+
67
+ Preferred advisory input:
68
+
69
+ ```md
70
+ ## Advisory Handoff
71
+ - Consumer: cm-skill-evolution
72
+ - Skill: cm-...
73
+ - Recovery path: FIX | DERIVED | CAPTURED | NONE
74
+ - Confidence: 0.xx
75
+ - Source analysis: EA-...
76
+ - Task: ...
77
+ - Status: completed | partial | failed
78
+ - Evidence: ...
79
+ - Selected skills: ...
80
+ - Target skills: ...
81
+ - Quality weight: 0.xx
82
+ - Next step: ...
83
+ ```
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: cm-skill-health
3
+ description: "Operational health review for CodyMaster skills using current repo signals: validate-skills, suggest, retro logs, memory, and test gates."
4
+ ---
5
+
6
+ # cm-skill-health
7
+
8
+ Use this skill when a CodyMaster skill feels stale, misleading, unreliable, or under-documented.
9
+
10
+ ## What it checks
11
+
12
+ 1. Discovery drift
13
+ - Is the skill present in `skills/`, docs indexes, profiles, and README surfaces?
14
+ 2. Invocation friction
15
+ - Does `cm suggest` point users to the skill when the task matches?
16
+ 3. Operational evidence
17
+ - Are there recurring failures or learnings in `.cm/operational-learnings.jsonl`?
18
+ 4. Contract health
19
+ - Does the skill reference commands, files, or paths that still exist?
20
+ 5. Release safety
21
+ - Does the repo still pass `npm run validate:skills`, `npm run check:skills`, and the test gate?
22
+
23
+ ## Workflow
24
+
25
+ 1. Confirm the symptom.
26
+ - Missing from docs
27
+ - Missing from profiles
28
+ - Broken references inside `SKILL.md`
29
+ - Repeated runtime pain in retro notes
30
+ 2. Compare the live skill against:
31
+ - `docs/skills/index.md`
32
+ - `skills/profiles/full.txt`
33
+ - `README.md`
34
+ - related changelog promises
35
+ 3. Scan evidence sources.
36
+ - `cm advisory handoff --for cm-skill-health`
37
+ - `cm suggest --project .`
38
+ - `cm retro summary --project .`
39
+ - `.cm/CONTINUITY.md`
40
+ - `rg` over `skills/`, `docs/`, and `src/`
41
+ 4. Score the issue.
42
+ - `healthy`: discoverable, accurate, references valid
43
+ - `degraded`: present but misleading or inconsistent
44
+ - `broken`: missing, invalid, or unusable
45
+ 5. Hand off to:
46
+ - `cm-skill-evolution` to repair or derive the next version
47
+
48
+ ## Output
49
+
50
+ Produce a short health note:
51
+
52
+ ```md
53
+ ## Skill Health
54
+ - Skill: cm-...
55
+ - Status: healthy | degraded | broken
56
+ - Symptoms: ...
57
+ - Evidence: ...
58
+ - Recovery path: FIX | DERIVED | CAPTURED
59
+ ```
60
+
61
+ Preferred input contract:
62
+
63
+ ```md
64
+ ## Advisory Handoff
65
+ - Consumer: cm-skill-health
66
+ - Skill: cm-...
67
+ - Recovery path: FIX | DERIVED | CAPTURED | NONE
68
+ - Confidence: 0.xx
69
+ - Source analysis: EA-...
70
+ - Task: ...
71
+ - Status: completed | partial | failed
72
+ - Evidence: ...
73
+ - Selected skills: ...
74
+ - Target skills: ...
75
+ - Quality weight: 0.xx
76
+ - Next step: ...
77
+ ```
78
+
79
+ ## Red flags
80
+
81
+ - Do not claim metric dashboards or automatic scoring unless the repo actually implements them.
82
+ - Do not treat README marketing copy as proof that a skill exists.
83
+ - Do not evolve the skill before identifying whether the problem is docs drift, packaging drift, or missing implementation.
@@ -98,6 +98,10 @@ Traditional approach: Load every SKILL.md to decide which skill to use.
98
98
  | `cm-execution` | execute, implement, plan, RARV, batch | Execute plans: batch mode, subagent-driven, parallel, or RARV |
99
99
  | `cm-continuity` | memory, context, CONTINUITY, learnings | Working memory protocol: read at start, update at end |
100
100
  | `cm-skill-mastery` | which skill, skill list, discover, help | Meta-skill: when to invoke skills, how to create new ones |
101
+ | `cm-skill-health` | skill broken, skill drift, missing skill, stale skill, health | Audit a skill using docs drift, retro notes, validation, and gates |
102
+ | `cm-skill-evolution` | repair skill, evolve skill, fix skill, derive skill | Recover a degraded skill with FIX, DERIVED, or CAPTURED mode |
103
+ | `cm-skill-search` | find skill, lookup skill, which skill, search skill | Find the right skill through indexes, suggestions, and repo search |
104
+ | `cm-skill-share` | export skill, import skill, share skill, move skill | Package and transfer skill folders safely across repos and machines |
101
105
  | `cm-safe-i18n` | translate, i18n, language, localize | Safe translation with multi-pass batching and audit gates |
102
106
  | `cm-skill-chain` | chain, pipeline, workflow, multi-step, full process | Compose skills into automated multi-step pipelines |
103
107
  | `cm-deep-search` | semantic search, find docs, large codebase, qmd | Optional power-up for semantic search across large projects |
@@ -127,8 +131,12 @@ Traditional approach: Load every SKILL.md to decide which skill to use.
127
131
 
128
132
  ### Community Skills Registry 🌐
129
133
 
130
- > **59 pre-indexed community skills** from skills.sh. Install on-demand: `npx skills add {source} --skill {name} -a antigravity`
131
- > If tech not listed here fall back to `npx skills find "{keyword}"`
134
+ > **STOP! Zero-Token Discovery Priority:**
135
+ > BEFORE using this registry, check if `.cm/project-skills.md` exists in the local project.
136
+ > It contains the pre-compiled, exact community skills needed for the project's tech stack.
137
+ > If it doesn't exist, run `npx cm index skills` first to build it.
138
+ >
139
+ > **Only use the registry below if tech is not listed** or if you need to search manually: `npx skills find "{keyword}"`
132
140
 
133
141
  #### 🖥️ Frontend Frameworks (10)
134
142
 
@@ -311,7 +319,7 @@ operations: [cm-safe-deploy, cm-identity-guard, cm-git-worktrees, cm-terminal, c
311
319
  security: [cm-secret-shield]
312
320
  product: [cm-brainstorm-idea, cm-planning, cm-ux-master, cm-ui-preview, cm-dockit, cm-project-bootstrap, cm-jtbd]
313
321
  growth: [cm-content-factory, cm-ads-tracker, cm-cro-methodology]
314
- orchestration: [cm-execution, cm-continuity, cm-skill-mastery, cm-skill-chain, cm-deep-search, cm-readit, cm-how-it-work]
322
+ orchestration: [cm-execution, cm-continuity, cm-skill-mastery, cm-skill-health, cm-skill-evolution, cm-skill-search, cm-skill-share, cm-skill-chain, cm-deep-search, cm-readit, cm-how-it-work]
315
323
  commands: [cm-start, cm-dashboard, cm-status]
316
324
  # planned (no SKILL.md yet): mom-test, release-it, medical-research, tailwind-mastery, pandasai-analytics, cm-google-form
317
325
  ```
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: cm-skill-search
3
+ description: "Find the best CodyMaster skill using the shipped indexes, profiles, docs, and contextual suggestions."
4
+ ---
5
+
6
+ # cm-skill-search
7
+
8
+ Use this skill when you need to find the right CodyMaster skill quickly and avoid loading the wrong `SKILL.md`.
9
+
10
+ ## Search order
11
+
12
+ 1. Fast path
13
+ - `cm suggest --project .`
14
+ 2. Library index
15
+ - `docs/skills/index.md`
16
+ - `docs/skills/*.md` category pages
17
+ 3. Progressive disclosure
18
+ - `skills/cm-skill-index/SKILL.md`
19
+ 4. Raw filesystem search
20
+ - `rg -n "<keyword>" skills docs README.md`
21
+ 5. Fallback
22
+ - if nothing matches, use `cm-skill-health` to check whether the missing skill is docs drift or a real gap
23
+
24
+ ## Query workflow
25
+
26
+ 1. Normalize the intent into 2-5 keywords.
27
+ 2. Search category pages before opening full skills.
28
+ 3. Open only the top 1-3 candidate `SKILL.md` files.
29
+ 4. Prefer the skill whose triggers, outputs, and lifecycle placement best match the task.
30
+ 5. If two skills overlap:
31
+ - choose the earlier lifecycle gate first
32
+ - example: `cm-brainstorm-idea` before `cm-planning`
33
+
34
+ ## Tie-breakers
35
+
36
+ - Need diagnosis before repair: choose `cm-skill-health`
37
+ - Need to repair a skill: choose `cm-skill-evolution`
38
+ - Need to distribute a skill pack: choose `cm-skill-share`
39
+ - Need the general index first: choose `cm-skill-index`
40
+
41
+ ## Output
42
+
43
+ ```md
44
+ ## Skill Search Result
45
+ - Task: ...
46
+ - Best match: cm-...
47
+ - Runner-up: cm-...
48
+ - Why: ...
49
+ ```
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: cm-skill-share
3
+ description: "Package, review, export, and import CodyMaster skill folders safely across machines or teams."
4
+ ---
5
+
6
+ # cm-skill-share
7
+
8
+ Use this skill when moving a CodyMaster skill between repos, machines, or teammates.
9
+
10
+ ## What to share
11
+
12
+ Always treat a skill as a folder, not just `SKILL.md`.
13
+
14
+ Check for:
15
+ - `SKILL.md`
16
+ - templates
17
+ - scripts
18
+ - references
19
+ - assets
20
+ - profile/index entries that must move with it
21
+
22
+ ## Export checklist
23
+
24
+ 1. Validate the source skill.
25
+ - `npm run validate:skills`
26
+ 2. Inspect companion files inside the skill folder.
27
+ 3. Note external dependencies the target repo must already have.
28
+ 4. Copy the entire folder.
29
+ 5. Update destination discovery surfaces if the skill becomes user-facing.
30
+
31
+ ## Import checklist
32
+
33
+ 1. Place the folder under `skills/cm-.../`
34
+ 2. Run:
35
+ - `npm run validate:skills`
36
+ - `npm run check:skills`
37
+ 3. Add it to:
38
+ - `skills/profiles/full.txt`
39
+ - docs skill index pages
40
+ - README only if the skill is part of the public catalog
41
+ 4. Verify referenced commands and files exist in the target repo.
42
+
43
+ ## Red flags
44
+
45
+ - Do not import only the markdown file if the skill depends on scripts or templates.
46
+ - Do not advertise the skill publicly before it is indexed and validated.
47
+ - Do not overwrite an existing skill without comparing behavior and references first.
48
+
49
+ ## Output
50
+
51
+ ```md
52
+ ## Skill Share
53
+ - Skill: cm-...
54
+ - Direction: export | import
55
+ - Companion files checked: yes | no
56
+ - Discovery surfaces updated: yes | no
57
+ - Validation: pass | fail
58
+ ```
@@ -1,3 +1,7 @@
1
+ ---
2
+ name: cm-sprint-bus
3
+ description: "Use to run the full sprint pipeline: brainstorm → plan → design → tdd → build → review → qa → security → ship → monitor → retro."
4
+ ---
1
5
  # cm-sprint-bus — opinionated pipeline + artifacts
2
6
 
3
7
  ## Pipeline
@@ -13,16 +13,12 @@ When this workflow is called, the AI Assistant should execute the following acti
13
13
  Per `_shared/helpers.md#Load-Working-Memory` — **use Smart Spine order:**
14
14
  1. Check `.cm/context-bus.json` → any active pipeline? any prior skill output to reuse?
15
15
  2. Load L0 indexes: `learnings-index.md` (~100 tok) + `skeleton-index.md` (~500 tok)
16
- > **If OpenViking backend active:** Skip step 2 — engine auto-serves L0/L1 via `cm_resolve`.
17
16
  3. Scope-filter learnings via `cm_query` — only load what matches current objective
18
- > **If OpenViking:** `cm_query` uses vector semantic search — broader recall, fewer missed learnings.
19
17
  4. Read `CONTINUITY.md` → set Active Goal to the new objective
20
18
  5. Run token budget check: `cm continuity budget` → confirm no category is over soft limit
21
19
 
22
20
  > ⚡ Total context load: ~700 tokens. Full load used to be ~3,200.
23
21
  > Only escalate to L2 (full files) if L0 index explicitly flags a match.
24
- > With OpenViking: L0 is auto-maintained — no stale index risk.
25
-
26
22
  0.5. **Skill Coverage Check (Adaptive Discovery):**
27
23
  - Scan the objective for technologies, frameworks, or patterns mentioned
28
24
  - Cross-reference with `cm-skill-index` Layer 1 triggers
@@ -85,11 +81,5 @@ When this workflow is called, the AI Assistant should execute the following acti
85
81
  - Record any new learnings or decisions made during this workflow
86
82
  - If inside a skill chain: `cm continuity bus` → verify context bus reflects completed step
87
83
  - Refresh L0 indexes: `cm continuity index` (auto-runs on `addLearning`, manual refresh here)
88
- > **If OpenViking:** Skip manual index refresh — engine maintains L0/L1 automatically.
89
-
90
84
  > **Note for AI:** If this is a brand new project, suggest running `cm-project-bootstrap` first.
91
85
  > If the working environment has a risk of accidentally switching accounts/projects, remind about `cm-identity-guard` (Per `_shared/helpers.md#Identity-Check`).
92
- >
93
- > **OpenViking tip:** If the project uses many learnings/decisions (>100 entries) or needs semantic
94
- > search beyond keyword matching, suggest switching to the Viking backend:
95
- > `storage.backend: viking` in `.cm/config.yaml` + `pip install openviking && openviking start`
@@ -1,7 +1,7 @@
1
1
  ---
2
-
3
- ## name: cm-tdd
2
+ name: cm-tdd
4
3
  description: Use when implementing any feature or bugfix, before writing implementation code
4
+ ---
5
5
 
6
6
  # Test-Driven Development (TDD)
7
7
 
@@ -46,8 +46,12 @@ cm-second-opinion-cli
46
46
  cm-secret-shield
47
47
  cm-security-gate
48
48
  cm-skill-chain
49
+ cm-skill-evolution
50
+ cm-skill-health
49
51
  cm-skill-index
50
52
  cm-skill-mastery
53
+ cm-skill-search
54
+ cm-skill-share
51
55
  cm-sprint-bus
52
56
  cm-start
53
57
  cm-status