@cleocode/skills 2026.9.21 → 2026.9.23

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 (151) hide show
  1. package/README.md +46 -63
  2. package/frontmatter.d.mts +60 -0
  3. package/frontmatter.mjs +277 -0
  4. package/index.d.ts +3 -3
  5. package/index.js +34 -9
  6. package/package.json +4 -2
  7. package/profiles/core.json +10 -3
  8. package/profiles/full.json +10 -6
  9. package/profiles/recommended.json +29 -3
  10. package/skills/_shared/manifest-operations.md +19 -40
  11. package/skills/_shared/skill-chaining-patterns.md +5 -9
  12. package/skills/_shared/subagent-protocol-base.md +6 -6
  13. package/skills/_shared/task-system-integration.md +5 -5
  14. package/skills/ct-adr-recorder/SKILL.md +18 -17
  15. package/skills/ct-artifact-publisher/SKILL.md +10 -7
  16. package/skills/ct-cleo/SKILL.md +26 -9
  17. package/skills/ct-cleo/references/loom-lifecycle.md +1 -1
  18. package/skills/{ct-memory/SKILL.md → ct-cleo/references/memory.md} +10 -23
  19. package/skills/ct-cleo/references/orchestrator-constraints.md +5 -5
  20. package/skills/ct-cleo/references/session-protocol.md +11 -8
  21. package/skills/{ct-stickynote/SKILL.md → ct-cleo/references/sticky-notes.md} +7 -29
  22. package/skills/ct-codebase-mapper/SKILL.md +62 -38
  23. package/skills/ct-consensus-voter/SKILL.md +10 -7
  24. package/skills/ct-contribution/SKILL.md +7 -5
  25. package/skills/ct-dev-workflow/SKILL.md +7 -7
  26. package/skills/ct-documentor/SKILL.md +29 -29
  27. package/skills/{ct-docs-review/__tests__/skill-docs-review.test.ts → ct-documentor/__tests__/reviewing-reference.test.ts} +4 -3
  28. package/skills/{ct-docs-write/__tests__/skill-docs-write.test.ts → ct-documentor/__tests__/writing-reference.test.ts} +4 -3
  29. package/skills/ct-documentor/references/anti-patterns.md +8 -8
  30. package/skills/{ct-docs-write → ct-documentor}/references/audience-targeting.md +5 -5
  31. package/skills/ct-documentor/references/chain-orchestration.md +19 -19
  32. package/skills/{ct-docs-write → ct-documentor}/references/cleo-style-guide.md +1 -1
  33. package/skills/ct-documentor/references/doc-types-and-templates.md +1 -1
  34. package/skills/{ct-docs-review → ct-documentor}/references/pr-review-mode.md +1 -1
  35. package/skills/{ct-docs-review/SKILL.md → ct-documentor/references/reviewing.md} +6 -26
  36. package/skills/ct-documentor/references/style-coordination.md +5 -5
  37. package/skills/{ct-docs-review → ct-documentor}/references/style-violations.md +1 -1
  38. package/skills/{ct-docs-write/SKILL.md → ct-documentor/references/writing.md} +5 -25
  39. package/skills/ct-epic-architect/SKILL.md +12 -9
  40. package/skills/ct-epic-architect/references/commands.md +5 -5
  41. package/skills/ct-epic-architect/references/output-format.md +2 -2
  42. package/skills/ct-epic-architect/references/patterns.md +2 -2
  43. package/skills/ct-epic-architect/references/skill-aware-execution.md +3 -3
  44. package/skills/ct-grade/SKILL.md +3 -4
  45. package/skills/ct-grade/agents/scenario-runner.md +1 -1
  46. package/skills/ct-ivt-looper/SKILL.md +23 -22
  47. package/skills/ct-lead/SKILL.md +52 -13
  48. package/skills/ct-lead/references/aggregation-protocol.md +44 -21
  49. package/skills/ct-lead/references/spawn-pattern.md +12 -11
  50. package/skills/ct-orchestrator/README.md +2 -2
  51. package/skills/ct-orchestrator/SKILL.md +14 -10
  52. package/skills/ct-orchestrator/references/SUBAGENT-PROTOCOL-BLOCK.md +4 -4
  53. package/skills/ct-orchestrator/references/autonomous-operation.md +4 -4
  54. package/skills/ct-orchestrator/references/orchestrator-compliance.md +3 -3
  55. package/skills/ct-orchestrator/references/orchestrator-patterns.md +20 -19
  56. package/skills/ct-orchestrator/references/orchestrator-recovery.md +13 -23
  57. package/skills/ct-orchestrator/references/orchestrator-spawning.md +9 -10
  58. package/skills/ct-orchestrator/references/orchestrator-tokens.md +9 -9
  59. package/skills/ct-provenance-keeper/SKILL.md +10 -7
  60. package/skills/ct-release-orchestrator/SKILL.md +21 -13
  61. package/skills/ct-release-orchestrator/references/composition.md +1 -1
  62. package/skills/ct-release-orchestrator/references/release-types.md +33 -15
  63. package/skills/ct-research-agent/SKILL.md +14 -12
  64. package/skills/ct-research-agent/references/triggers-and-routing.md +4 -4
  65. package/skills/{ct-skill-creator → ct-skill-author}/SKILL.md +9 -6
  66. package/skills/{ct-skill-validator → ct-skill-author}/agents/ecosystem-checker.md +1 -1
  67. package/skills/{ct-skill-validator → ct-skill-author}/evals/quality_evals.json +10 -10
  68. package/skills/{ct-skill-validator → ct-skill-author}/evals/trigger_queries.json +1 -1
  69. package/skills/{ct-skill-validator → ct-skill-author}/references/cleo-ecosystem-rules.md +8 -4
  70. package/skills/{ct-skill-creator → ct-skill-author}/references/provider-deployment.md +10 -6
  71. package/skills/{ct-skill-validator/SKILL.md → ct-skill-author/references/validating.md} +14 -21
  72. package/skills/{ct-skill-validator → ct-skill-author}/references/validation-rules.md +2 -2
  73. package/skills/{ct-skill-validator → ct-skill-author}/scripts/_skill_finder.py +2 -2
  74. package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_depth.py +2 -5
  75. package/skills/{ct-skill-validator → ct-skill-author}/scripts/generate_validation_report.py +1 -1
  76. package/skills/{ct-skill-validator → ct-skill-author}/scripts/run_quality_eval.py +2 -2
  77. package/skills/ct-spec-writer/SKILL.md +9 -7
  78. package/skills/ct-task-executor/SKILL.md +19 -16
  79. package/skills/ct-task-executor/references/common-failures.md +1 -1
  80. package/skills/ct-validator/SKILL.md +11 -9
  81. package/skills/ct-validator/references/compliance-reports.md +1 -1
  82. package/skills/ct-validator/references/validation-modes.md +3 -3
  83. package/skills/manifest.json +381 -365
  84. package/dispatch-config.json +0 -983
  85. package/provider-skills-map.json +0 -97
  86. package/skills/ct-docs-lookup/SKILL.md +0 -185
  87. package/skills/ct-docs-lookup/references/ctx7-workflow.md +0 -198
  88. package/skills/ct-docs-lookup/references/library-id-resolution.md +0 -217
  89. package/skills/ct-docs-lookup/references/version-specific-docs.md +0 -220
  90. package/skills/ct-master-tac/SKILL.md +0 -120
  91. package/skills/ct-master-tac/__tests__/install.test.ts +0 -304
  92. package/skills/ct-master-tac/bundled/README.md +0 -40
  93. package/skills/ct-master-tac/bundled/protocols/architecture-decision.cant +0 -90
  94. package/skills/ct-master-tac/bundled/protocols/artifact-publish.cant +0 -105
  95. package/skills/ct-master-tac/bundled/protocols/consensus.cant +0 -85
  96. package/skills/ct-master-tac/bundled/protocols/contribution.cant +0 -92
  97. package/skills/ct-master-tac/bundled/protocols/decomposition.cant +0 -102
  98. package/skills/ct-master-tac/bundled/protocols/implementation.cant +0 -77
  99. package/skills/ct-master-tac/bundled/protocols/provenance.cant +0 -100
  100. package/skills/ct-master-tac/bundled/protocols/release.cant +0 -107
  101. package/skills/ct-master-tac/bundled/protocols/research.cant +0 -77
  102. package/skills/ct-master-tac/bundled/protocols/specification.cant +0 -77
  103. package/skills/ct-master-tac/bundled/protocols/testing.cant +0 -99
  104. package/skills/ct-master-tac/bundled/protocols/validation.cant +0 -75
  105. package/skills/ct-master-tac/bundled/teams/platform.cant +0 -115
  106. package/skills/ct-master-tac/manifest.json +0 -55
  107. package/skills/ct-skill-creator/eval-viewer/__pycache__/generate_review.cpython-314.pyc +0 -0
  108. package/skills/ct-skill-creator/manifest-entry.json +0 -17
  109. package/skills/ct-skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  110. package/skills/ct-skill-creator/scripts/__pycache__/aggregate_benchmark.cpython-314.pyc +0 -0
  111. package/skills/ct-skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
  112. package/skills/ct-skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
  113. package/skills/ct-skill-creator/scripts/__pycache__/init_skill.cpython-314.pyc +0 -0
  114. package/skills/ct-skill-creator/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  115. package/skills/ct-skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
  116. package/skills/ct-skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
  117. package/skills/ct-skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
  118. package/skills/ct-skill-validator/manifest-entry.json +0 -20
  119. package/skills/ct-stickynote/README.md +0 -14
  120. package/skills/signaldock-connect/SKILL.md +0 -137
  121. package/skills/signaldock-connect/assets/agent-card.json +0 -48
  122. package/skills/signaldock-connect/references/api-endpoints.md +0 -131
  123. package/skills.json +0 -495
  124. /package/skills/{ct-docs-review → ct-documentor}/references/inline-comment-patterns.md +0 -0
  125. /package/skills/{ct-docs-write → ct-documentor}/references/markdown-patterns.md +0 -0
  126. /package/skills/{ct-skill-creator → ct-skill-author}/agents/analyzer.md +0 -0
  127. /package/skills/{ct-skill-creator → ct-skill-author}/agents/comparator.md +0 -0
  128. /package/skills/{ct-skill-creator → ct-skill-author}/agents/grader.md +0 -0
  129. /package/skills/{ct-skill-creator → ct-skill-author}/assets/eval_review.html +0 -0
  130. /package/skills/{ct-skill-validator → ct-skill-author}/assets/valid-skill-example.md +0 -0
  131. /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/generate_review.py +0 -0
  132. /package/skills/{ct-skill-creator → ct-skill-author}/eval-viewer/viewer.html +0 -0
  133. /package/skills/{ct-skill-creator → ct-skill-author}/references/dynamic-context.md +0 -0
  134. /package/skills/{ct-skill-creator → ct-skill-author}/references/frontmatter.md +0 -0
  135. /package/skills/{ct-skill-creator → ct-skill-author}/references/invocation-control.md +0 -0
  136. /package/skills/{ct-skill-creator → ct-skill-author}/references/output-patterns.md +0 -0
  137. /package/skills/{ct-skill-creator → ct-skill-author}/references/schemas.md +0 -0
  138. /package/skills/{ct-skill-creator → ct-skill-author}/references/workflows.md +0 -0
  139. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/__init__.py +0 -0
  140. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/aggregate_benchmark.py +0 -0
  141. /package/skills/{ct-skill-validator → ct-skill-author}/scripts/audit_body.py +0 -0
  142. /package/skills/{ct-skill-validator → ct-skill-author}/scripts/check_ecosystem.py +0 -0
  143. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/generate_report.py +0 -0
  144. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/improve_description.py +0 -0
  145. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/init_skill.py +0 -0
  146. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/package_skill.py +0 -0
  147. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/quick_validate.py +0 -0
  148. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_eval.py +0 -0
  149. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/run_loop.py +0 -0
  150. /package/skills/{ct-skill-creator → ct-skill-author}/scripts/utils.py +0 -0
  151. /package/skills/{ct-skill-validator → ct-skill-author}/scripts/validate.py +0 -0
@@ -1,220 +0,0 @@
1
- # Version-Specific Docs
2
-
3
- Library APIs drift across versions — sometimes silently (default value
4
- changes), sometimes loudly (renames, removals). This reference covers
5
- how to lock the docs lookup to the version the user actually runs,
6
- and how to handle migrations and deprecated APIs.
7
-
8
- ## Why Version Pinning Matters
9
-
10
- The cost of citing the wrong version is high.
11
-
12
- - Drizzle ORM v1.0.0-beta renamed `relations()` to `defineRelations()`.
13
- A 0.x user given a v1 example will copy code that doesn't import.
14
- - Next.js 15 changed default `fetch` cache from `force-cache` to
15
- `no-store`. A user on 14 reading a 15 doc will not see the behavior
16
- they expect.
17
- - React 19 introduced new hooks. A React 18 user copying a React 19
18
- example gets `useActionState is not defined`.
19
-
20
- In each case, the failure mode is "confidently wrong answer". The
21
- remedy is always: pin to the user's actual version before fetching.
22
-
23
- ## Finding the User's Version
24
-
25
- The skill SHOULD detect the user's installed version before opening
26
- Step 2.
27
-
28
- ```bash
29
- # Node.js projects
30
- jq -r '.dependencies.next, .devDependencies.next | select(.)' package.json
31
-
32
- # Cargo projects
33
- cargo tree -p drizzle 2>/dev/null # if applicable
34
- grep -A 1 '^drizzle-orm =' Cargo.toml
35
-
36
- # Python projects
37
- grep '^next' requirements.txt
38
- pip show next 2>/dev/null | grep '^Version'
39
-
40
- # Generic — search for any lockfile entry
41
- grep -A 1 'next:' pnpm-lock.yaml | head -3
42
- ```
43
-
44
- If detection fails (no lockfile, version not pinned), ask the user
45
- or default to the project's stated version.
46
-
47
- ## Version Format Matching
48
-
49
- Context7 IDs accept several version forms:
50
-
51
- ```text
52
- /vercel/next.js # all versions; unspecified
53
- /vercel/next.js/v15 # latest within v15.x
54
- /vercel/next.js/v15.0.0 # exactly v15.0.0
55
- /vercel/next.js/v15.0.0-canary.7 # specific canary
56
- ```
57
-
58
- Match the granularity of the user's question:
59
-
60
- - General "how do I do X with library" → unversioned or major-pinned.
61
- - Migration "from N to M" → both major-pinned: `/lib/vN` and `/lib/vM`.
62
- - Bug investigation "in 15.0.3 specifically X happens" → exact pin.
63
-
64
- ## Major-Version Migrations
65
-
66
- When the user is upgrading from major N to major N+1, run two fetches.
67
-
68
- ```bash
69
- # From-version: what works today
70
- npx ctx7@latest docs /drizzle-team/drizzle-orm/v0.36 "how do I define relations"
71
-
72
- # To-version: what they will move to
73
- npx ctx7@latest docs /drizzle-team/drizzle-orm/v1.0.0-beta "how do I define relations"
74
-
75
- # Compose the migration story:
76
- # 1. Show the current API
77
- # 2. Show the new API
78
- # 3. Show the mapping
79
- ```
80
-
81
- The migration story has THREE parts. Skipping any of them produces
82
- confusion:
83
-
84
- - **Current API.** What the user has now.
85
- - **New API.** What it becomes.
86
- - **Mapping.** Mechanical translation between them.
87
-
88
- Documenting only the new API leaves the user wondering "but my code
89
- uses X — what does that become?"
90
-
91
- ## Deprecated APIs
92
-
93
- When a fetched doc mentions an API as deprecated:
94
-
95
- 1. Surface the deprecation explicitly. Don't bury it.
96
- 2. Show the recommended replacement, fetched from the same docs.
97
- 3. Cite when deprecation began and when removal is planned (if stated).
98
-
99
- Example output:
100
-
101
- ```markdown
102
- The `relations()` helper in Drizzle ORM 0.x is deprecated as of v1.0.0-beta.
103
- Use `defineRelations` instead.
104
-
105
- | Drizzle 0.x | Drizzle 1.x (beta) |
106
- |-------------|--------------------|
107
- | `relations(table, (helpers) => ({ ... }))` | `defineRelations(schema, (t) => ({ ... }))` |
108
-
109
- Deprecation announced: v1.0.0-beta (2025-Q4).
110
- Planned removal: TBD (the 0.x line is still supported through 2026).
111
- ```
112
-
113
- ## Version Drift Detection
114
-
115
- Run a sanity check before answering — does the user's installed
116
- version match what they think they're using?
117
-
118
- ```bash
119
- # User says "I'm on Next.js 15".
120
- $ jq -r '.dependencies.next' package.json
121
- "14.3.0"
122
-
123
- # Drift! Surface it:
124
- # > Your package.json says Next.js 14.3.0, not 15. Are you planning
125
- # > to upgrade, or did you mean 14? I'll fetch docs for what's
126
- # > installed unless you confirm 15 is the target.
127
- ```
128
-
129
- This catches the common case where the user's mental model is ahead
130
- of (or behind) their actual install.
131
-
132
- ## Multi-Library Lookups
133
-
134
- A single question may span multiple libraries. Resolve each
135
- independently with the right version pin.
136
-
137
- ```bash
138
- # Question: "How do I integrate Better-Auth with Drizzle ORM in a
139
- # Svelte 5 SvelteKit project?"
140
-
141
- # Three libraries; resolve each with project's actual version
142
- npx ctx7@latest library "Better-Auth" "..."
143
- npx ctx7@latest library "Drizzle ORM" "..."
144
- npx ctx7@latest library "SvelteKit" "..."
145
-
146
- # Then three fetches:
147
- npx ctx7@latest docs /better-auth/better-auth "integration with drizzle"
148
- npx ctx7@latest docs /drizzle-team/drizzle-orm/v1 "integration with better-auth"
149
- npx ctx7@latest docs /sveltejs/kit/v2 "hooks for auth middleware"
150
- ```
151
-
152
- Compose the answer from the three. Cite each library's version
153
- explicitly so the user knows what works with what.
154
-
155
- ## When Versioned Docs Aren't Available
156
-
157
- Context7's catalog doesn't always have per-version slices. When a
158
- version pin returns "no matches":
159
-
160
- 1. Drop one granularity level (e.g., `/v15.0.0-canary.7` → `/v15`).
161
- 2. Drop another (`/v15` → `/vercel/next.js` unversioned).
162
- 3. Add a note that version-specific data may be missing — recommend
163
- the user verify against the official release notes.
164
-
165
- ## Reading Release Notes
166
-
167
- When the question is "what changed in version X", release notes are
168
- often a better source than API docs. Two routes:
169
-
170
- ```bash
171
- # Route 1 — Context7 may have it indexed
172
- npx ctx7@latest docs /vercel/next.js "release notes for v15"
173
-
174
- # Route 2 — WebFetch the official release notes page
175
- # (use when Context7 doesn't have release notes specifically)
176
- WebFetch: https://nextjs.org/blog/next-15 "summarize the breaking changes"
177
- ```
178
-
179
- Release notes are more concise than docs and explicitly call out
180
- deprecations and removals — exactly what migration questions need.
181
-
182
- ## Citing Versions
183
-
184
- Every code example produced from a version-pinned fetch MUST cite the
185
- version.
186
-
187
- ```markdown
188
- GOOD:
189
- Use `defineRelations` (Drizzle ORM v1.0.0-beta and later):
190
-
191
- ```typescript
192
- import { defineRelations } from "drizzle-orm";
193
- // ...
194
- ```
195
-
196
- BAD:
197
- Use `defineRelations`:
198
-
199
- ```typescript
200
- import { defineRelations } from "drizzle-orm";
201
- // ...
202
- ```
203
- (no version context — reader doesn't know if their version supports it)
204
- ```
205
-
206
- When the user copies the code and it doesn't work, the version citation
207
- is the first thing they check. Give it to them up front.
208
-
209
- ## Skill Boundary
210
-
211
- This reference covers version handling within docs-lookup. It does NOT
212
- cover:
213
-
214
- - Migration code generators (out of scope; that's task-executor work).
215
- - Upgrade plan authoring (out of scope; that's spec-writer work).
216
- - Pinning the user's project to a new version (out of scope; that's a
217
- task for the human or the executor).
218
-
219
- Docs-lookup just produces the version-accurate documentation. The
220
- downstream skills act on it.
@@ -1,120 +0,0 @@
1
- ---
2
- name: ct-master-tac
3
- description: >-
4
- Master Tactical Bundle for CleoOS autonomous execution. Installs the complete
5
- primitive library needed to run the full agentic execution layer on a fresh CleoOS
6
- install: 12 CANT protocol files (research, consensus, architecture-decision,
7
- specification, decomposition, implementation, validation, testing, contribution,
8
- release, artifact-publish, provenance), the canonical platform team definition, and
9
- the skills manifest entry. Use when bootstrapping a new CleoOS project, verifying that
10
- all protocol primitives are present, or recovering a broken protocol tree. Triggers on:
11
- "install master tac", "bootstrap protocols", "tools.skill.install ct-master-tac",
12
- "verify protocol bundle", "repair protocol files", "fresh CleoOS install".
13
- version: 1.0.0
14
- core: false
15
- category: meta
16
- protocol: null
17
- argument-hint: "[--verify] [--force]"
18
- allowed-tools: ["Read", "Write", "Bash(cp *)", "Bash(ls *)", "Bash(mkdir *)", "Bash(test *)"]
19
- dependencies:
20
- - ct-cleo
21
- sharedResources:
22
- - subagent-protocol-base
23
- compatibility:
24
- - claude-code
25
- - cursor
26
- - windsurf
27
- - gemini-cli
28
- license: MIT
29
- install-hook: "tools.skill.install ct-master-tac"
30
- metadata:
31
- version: 1.0.0
32
- tier: internal
33
- install: internal
34
- stability: deprecated
35
- ---
36
-
37
- # ct-master-tac — Master Tactical Bundle
38
-
39
- > **Provenance**: @task T430, @epic T382, @umbrella T377
40
- > **Bundle version**: 1.0.0 — ships with CleoOS v2026.4.x
41
-
42
- The Master TAC (Tactical Asset Cache) plugin bundles every protocol primitive the
43
- autonomous execution layer requires. After `tools.skill.install ct-master-tac`, a
44
- fresh CleoOS install has batteries-included support for the full RCASD-IVTR+C
45
- lifecycle.
46
-
47
- ---
48
-
49
- ## What's Inside
50
-
51
- ### 12 CANT Protocol Files (`bundled/protocols/`)
52
-
53
- | File | ID | Stage | Skill |
54
- |------|----|-------|-------|
55
- | `research.cant` | RSCH | research | ct-research-agent |
56
- | `consensus.cant` | CONS | consensus | ct-consensus-voter |
57
- | `architecture-decision.cant` | ADR | architecture-decision | ct-adr-recorder |
58
- | `specification.cant` | SPEC | specification | ct-spec-writer |
59
- | `decomposition.cant` | DCMP | decomposition | ct-epic-architect |
60
- | `implementation.cant` | IMPL | implementation | ct-task-executor |
61
- | `validation.cant` | VALID | validation | ct-validator |
62
- | `testing.cant` | TEST | testing | ct-ivt-looper |
63
- | `contribution.cant` | CONT | cross-cutting | ct-contribution |
64
- | `release.cant` | REL | release | ct-release-orchestrator |
65
- | `artifact-publish.cant` | ART | release | ct-artifact-publisher |
66
- | `provenance.cant` | PROV | release | ct-provenance-keeper |
67
-
68
- ### Platform Team (`bundled/teams/platform.cant`)
69
-
70
- Canonical 3-tier team definition with planning-lead, engineering-lead, and
71
- validation-lead. Mirrors the `.cleo/teams.cant` seed from a standard CleoOS init.
72
-
73
- ---
74
-
75
- ## Install Behaviour
76
-
77
- ```bash
78
- tools.skill.install ct-master-tac
79
- ```
80
-
81
- The install hook:
82
-
83
- 1. Copies `bundled/protocols/*.cant` to
84
- `packages/core/src/validation/protocols/cant/` (skips files that already exist
85
- unless `--force` is provided).
86
- 2. Copies `bundled/teams/platform.cant` to `.cleo/teams.cant` (skips if exists).
87
- 3. Verifies that all 12 protocol files are present and parseable.
88
- 4. Emits an install summary to stdout.
89
-
90
- Running install a second time is a no-op (idempotent).
91
-
92
- ---
93
-
94
- ## Verify Mode
95
-
96
- ```bash
97
- tools.skill.install ct-master-tac --verify
98
- ```
99
-
100
- Read-only. Checks that all bundled files are present at their target locations and
101
- reports any missing or mismatched files without writing anything.
102
-
103
- ---
104
-
105
- ## Plugin Boundary (§11 criteria)
106
-
107
- This plugin meets all three §11 criteria from `docs/specs/CLEO-OPERATION-CONSTITUTION.md`:
108
-
109
- - **(a)** Requires reading protocol CANT files managed outside the core CLI binary.
110
- - **(b)** Reads `bundled/` assets not managed by the CLEO core package.
111
- - **(c)** Removing it from core does not break any mandatory agent workflow — it is
112
- a bootstrap/recovery utility only.
113
-
114
- ---
115
-
116
- ## Upgrade Path
117
-
118
- When new protocol files are added, bump `version` in this SKILL.md and
119
- `manifest.json`, add the new `.cant` file to `bundled/protocols/`, and update the
120
- `manifest.json` `files` array. The install hook will copy the new file on next run.
@@ -1,304 +0,0 @@
1
- /**
2
- * Install verification tests for the ct-master-tac plugin (T431).
3
- *
4
- * Asserts:
5
- * - SKILL.md has valid YAML frontmatter
6
- * - manifest.json parses correctly and references the correct files
7
- * - All files referenced in manifest.json `files` array exist under bundled/
8
- * - Install is idempotent (second run produces no additional writes)
9
- * - Bundle contains exactly 12 protocol files + 1 platform team file
10
- *
11
- * @task T431
12
- * @epic T382
13
- * @umbrella T377
14
- */
15
-
16
- import { existsSync, readFileSync } from 'node:fs';
17
- import { dirname, join, resolve } from 'node:path';
18
- import { fileURLToPath } from 'node:url';
19
- import { describe, expect, it } from 'vitest';
20
-
21
- // ---------------------------------------------------------------------------
22
- // Helpers
23
- // ---------------------------------------------------------------------------
24
-
25
- const thisFile = fileURLToPath(import.meta.url);
26
- /** Absolute path to the ct-master-tac root directory */
27
- const skillRoot = resolve(dirname(thisFile), '..');
28
-
29
- /**
30
- * Parse YAML frontmatter from a Markdown file.
31
- * Returns the raw frontmatter string between the opening and closing `---`.
32
- */
33
- function extractFrontmatter(content: string): string | null {
34
- const match = /^---\r?\n([\s\S]*?)\r?\n---/m.exec(content);
35
- return match ? match[1] : null;
36
- }
37
-
38
- /**
39
- * Minimal frontmatter key extractor — no external deps, just key: value lines.
40
- */
41
- function parseFrontmatterKeys(fm: string): Record<string, string> {
42
- const result: Record<string, string> = {};
43
- for (const line of fm.split('\n')) {
44
- const m = /^(\w[\w-]*):\s*(.*)$/.exec(line.trimEnd());
45
- if (m) {
46
- result[m[1]] = m[2].replace(/^["']|["']$/g, '');
47
- }
48
- }
49
- return result;
50
- }
51
-
52
- /**
53
- * Read the nested `metadata:` map the way scripts/skills/lib/skill-frontmatter.mjs
54
- * does: the indented `key: value` lines directly under a top-level `metadata:`.
55
- */
56
- function parseFrontmatterMetadata(fm: string): Record<string, string> {
57
- const result: Record<string, string> = {};
58
- const lines = fm.split('\n');
59
- const start = lines.findIndex((l) => l.trimEnd() === 'metadata:');
60
- if (start === -1) return result;
61
- for (const line of lines.slice(start + 1)) {
62
- const m = /^\s+([A-Za-z][\w-]*):\s*(.*)$/.exec(line.trimEnd());
63
- if (!m) break;
64
- result[m[1]] = m[2].replace(/^["']|["']$/g, '');
65
- }
66
- return result;
67
- }
68
-
69
- // ---------------------------------------------------------------------------
70
- // Mock install helper for idempotency test
71
- // ---------------------------------------------------------------------------
72
-
73
- interface InstallResult {
74
- copiedFiles: string[];
75
- skippedFiles: string[];
76
- }
77
-
78
- /**
79
- * Simulated install helper — copies bundled/ files to target paths.
80
- * Returns lists of copied and skipped files so idempotency can be verified.
81
- */
82
- function mockInstall(
83
- manifestFiles: string[],
84
- alreadyInstalled: Set<string>,
85
- ): InstallResult {
86
- const copiedFiles: string[] = [];
87
- const skippedFiles: string[] = [];
88
-
89
- for (const f of manifestFiles) {
90
- if (alreadyInstalled.has(f)) {
91
- skippedFiles.push(f);
92
- } else {
93
- copiedFiles.push(f);
94
- }
95
- }
96
-
97
- return { copiedFiles, skippedFiles };
98
- }
99
-
100
- // ---------------------------------------------------------------------------
101
- // Tests
102
- // ---------------------------------------------------------------------------
103
-
104
- describe('ct-master-tac plugin (T431)', () => {
105
- describe('SKILL.md frontmatter', () => {
106
- const skillMdPath = join(skillRoot, 'SKILL.md');
107
-
108
- it('SKILL.md exists', () => {
109
- expect(existsSync(skillMdPath)).toBe(true);
110
- });
111
-
112
- it('SKILL.md contains valid frontmatter delimiters', () => {
113
- const content = readFileSync(skillMdPath, 'utf-8');
114
- const fm = extractFrontmatter(content);
115
- expect(fm).not.toBeNull();
116
- });
117
-
118
- it('frontmatter has required fields: name, description, metadata.version, metadata.tier', () => {
119
- const content = readFileSync(skillMdPath, 'utf-8');
120
- const fm = extractFrontmatter(content);
121
- expect(fm).not.toBeNull();
122
- const keys = parseFrontmatterKeys(fm!);
123
- expect(keys['name']).toBe('ct-master-tac');
124
- expect(keys['description']).toBeTruthy();
125
- // T12648: version and tier live under `metadata:` (skills SSoT, D11157).
126
- const metadata = parseFrontmatterMetadata(fm!);
127
- expect(metadata['version']).toMatch(/^\d+\.\d+\.\d+$/);
128
- expect(['core', 'on-demand', 'internal']).toContain(metadata['tier']);
129
- expect(keys['tier']).toBeUndefined();
130
- if (keys['version'] !== undefined) expect(keys['version']).toBe(metadata['version']);
131
- });
132
- });
133
-
134
- describe('manifest.json', () => {
135
- const manifestPath = join(skillRoot, 'manifest.json');
136
- let manifest: Record<string, unknown>;
137
-
138
- it('manifest.json exists', () => {
139
- expect(existsSync(manifestPath)).toBe(true);
140
- });
141
-
142
- it('manifest.json parses as valid JSON', () => {
143
- const raw = readFileSync(manifestPath, 'utf-8');
144
- expect(() => {
145
- manifest = JSON.parse(raw) as Record<string, unknown>;
146
- }).not.toThrow();
147
- });
148
-
149
- it('manifest has required top-level keys', () => {
150
- const raw = readFileSync(manifestPath, 'utf-8');
151
- manifest = JSON.parse(raw) as Record<string, unknown>;
152
- expect(manifest['name']).toBe('ct-master-tac');
153
- expect(manifest['version']).toBeTruthy();
154
- expect(Array.isArray(manifest['files'])).toBe(true);
155
- });
156
-
157
- it('files array contains exactly 13 entries (12 protocols + 1 team)', () => {
158
- const raw = readFileSync(manifestPath, 'utf-8');
159
- manifest = JSON.parse(raw) as Record<string, unknown>;
160
- const files = manifest['files'] as string[];
161
- expect(files).toHaveLength(13);
162
- });
163
-
164
- it('files array contains at least 12 protocol entries', () => {
165
- const raw = readFileSync(manifestPath, 'utf-8');
166
- manifest = JSON.parse(raw) as Record<string, unknown>;
167
- const files = manifest['files'] as string[];
168
- const protocolFiles = files.filter((f) => f.startsWith('bundled/protocols/'));
169
- expect(protocolFiles.length).toBeGreaterThanOrEqual(12);
170
- });
171
-
172
- it('files array contains platform team entry', () => {
173
- const raw = readFileSync(manifestPath, 'utf-8');
174
- manifest = JSON.parse(raw) as Record<string, unknown>;
175
- const files = manifest['files'] as string[];
176
- expect(files).toContain('bundled/teams/platform.cant');
177
- });
178
- });
179
-
180
- describe('bundled files exist', () => {
181
- it('all files referenced in manifest.json exist under bundled/', () => {
182
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
183
- const manifest = JSON.parse(raw) as { files: string[] };
184
- const missingFiles: string[] = [];
185
-
186
- for (const f of manifest.files) {
187
- const abs = join(skillRoot, f);
188
- if (!existsSync(abs)) {
189
- missingFiles.push(f);
190
- }
191
- }
192
-
193
- expect(missingFiles).toEqual([]);
194
- });
195
-
196
- it('each bundled protocol file is non-empty', () => {
197
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
198
- const manifest = JSON.parse(raw) as { files: string[] };
199
- const emptyFiles: string[] = [];
200
-
201
- for (const f of manifest.files.filter((f) =>
202
- f.startsWith('bundled/protocols/'),
203
- )) {
204
- const abs = join(skillRoot, f);
205
- const content = readFileSync(abs, 'utf-8');
206
- if (content.trim().length === 0) {
207
- emptyFiles.push(f);
208
- }
209
- }
210
-
211
- expect(emptyFiles).toEqual([]);
212
- });
213
-
214
- it('each bundled protocol file has CANT frontmatter (kind: protocol)', () => {
215
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
216
- const manifest = JSON.parse(raw) as { files: string[] };
217
- const badFiles: string[] = [];
218
-
219
- for (const f of manifest.files.filter((f) =>
220
- f.startsWith('bundled/protocols/'),
221
- )) {
222
- const abs = join(skillRoot, f);
223
- const content = readFileSync(abs, 'utf-8');
224
- if (!content.includes('kind: protocol')) {
225
- badFiles.push(f);
226
- }
227
- }
228
-
229
- expect(badFiles).toEqual([]);
230
- });
231
- });
232
-
233
- describe('idempotent install (mock)', () => {
234
- it('first install copies all 13 files', () => {
235
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
236
- const manifest = JSON.parse(raw) as { files: string[] };
237
- const already = new Set<string>();
238
-
239
- const result = mockInstall(manifest.files, already);
240
- expect(result.copiedFiles).toHaveLength(13);
241
- expect(result.skippedFiles).toHaveLength(0);
242
- });
243
-
244
- it('second install (files already present) skips all 13 files', () => {
245
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
246
- const manifest = JSON.parse(raw) as { files: string[] };
247
- // Simulate first install — all files now "present"
248
- const already = new Set<string>(manifest.files);
249
-
250
- const result = mockInstall(manifest.files, already);
251
- expect(result.copiedFiles).toHaveLength(0);
252
- expect(result.skippedFiles).toHaveLength(13);
253
- });
254
-
255
- it('partial install (3 missing) copies only missing files', () => {
256
- const raw = readFileSync(join(skillRoot, 'manifest.json'), 'utf-8');
257
- const manifest = JSON.parse(raw) as { files: string[] };
258
- // 10 of 13 already installed
259
- const already = new Set<string>(manifest.files.slice(0, 10));
260
-
261
- const result = mockInstall(manifest.files, already);
262
- expect(result.copiedFiles).toHaveLength(3);
263
- expect(result.skippedFiles).toHaveLength(10);
264
- });
265
- });
266
-
267
- describe('bundle completeness', () => {
268
- const EXPECTED_PROTOCOLS = [
269
- 'research.cant',
270
- 'consensus.cant',
271
- 'architecture-decision.cant',
272
- 'specification.cant',
273
- 'decomposition.cant',
274
- 'implementation.cant',
275
- 'validation.cant',
276
- 'testing.cant',
277
- 'contribution.cant',
278
- 'release.cant',
279
- 'artifact-publish.cant',
280
- 'provenance.cant',
281
- ] as const;
282
-
283
- for (const protocol of EXPECTED_PROTOCOLS) {
284
- it(`bundled/protocols/${protocol} exists`, () => {
285
- expect(
286
- existsSync(join(skillRoot, 'bundled', 'protocols', protocol)),
287
- ).toBe(true);
288
- });
289
- }
290
-
291
- it('bundled/teams/platform.cant exists', () => {
292
- expect(existsSync(join(skillRoot, 'bundled', 'teams', 'platform.cant'))).toBe(
293
- true,
294
- );
295
- });
296
-
297
- it('bundle contains exactly 12 CANT protocol files', () => {
298
- const protocolFiles = EXPECTED_PROTOCOLS.filter((f) =>
299
- existsSync(join(skillRoot, 'bundled', 'protocols', f)),
300
- );
301
- expect(protocolFiles).toHaveLength(12);
302
- });
303
- });
304
- });
@@ -1,40 +0,0 @@
1
- # ct-master-tac Bundle Contents
2
-
3
- > @task T430 @epic T382 @umbrella T377
4
- > Source: `packages/skills/skills/ct-master-tac/bundled/`
5
-
6
- This directory holds the canonical bundle assets shipped with the `ct-master-tac` plugin.
7
-
8
- ## protocols/
9
-
10
- Copies of the 12 CANT protocol files from
11
- `packages/core/src/validation/protocols/cant/`.
12
-
13
- Each file defines a protocol primitive in the RCASD-IVTR+C lifecycle:
14
-
15
- | File | ID | RCASD Stage |
16
- |------|----|-------------|
17
- | `research.cant` | RSCH | R — Research |
18
- | `consensus.cant` | CONS | C — Consensus |
19
- | `architecture-decision.cant` | ADR | A — Architecture Decision |
20
- | `specification.cant` | SPEC | S — Specification |
21
- | `decomposition.cant` | DCMP | D — Decomposition |
22
- | `implementation.cant` | IMPL | I — Implementation |
23
- | `validation.cant` | VALID | V — Validation |
24
- | `testing.cant` | TEST | T — Testing |
25
- | `contribution.cant` | CONT | cross-cutting |
26
- | `release.cant` | REL | R — Release |
27
- | `artifact-publish.cant` | ART | release sub-protocol |
28
- | `provenance.cant` | PROV | release sub-protocol |
29
-
30
- ## teams/
31
-
32
- | File | Description |
33
- |------|-------------|
34
- | `platform.cant` | Canonical 3-tier CleoOS platform team seed |
35
-
36
- ## Maintenance
37
-
38
- When protocol files change in `packages/core/src/validation/protocols/cant/`,
39
- re-copy them here and bump the version in `ct-master-tac/manifest.json` and
40
- `ct-master-tac/SKILL.md`.