showdar-skills 0.3.0 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,37 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.4.0]
10
+
11
+ ### Added
12
+
13
+ - First-class workflow skill model: 15 primitives (`kind: primitive`) plus 4
14
+ workflows (`kind: workflow`) for 19 total installable skills.
15
+ - `showdar-feature`: adaptive end-to-end feature implementation over
16
+ understand, requirements, plan, design, build, test, and review stages.
17
+ - `showdar-bugfix`: adaptive defect resolution over understand, debug, build,
18
+ test, and review stages, including investigation-only mode.
19
+ - `showdar-release`: release readiness versus execution separation over
20
+ quality, security, ship, and authority-gated ops stages.
21
+ - `showdar-incident`: operational incident investigation and recovery over
22
+ understand, debug, recover, verification, and authority-gated ops stages.
23
+ - `showdar add feature|bugfix|release|incident` installs workflows through the
24
+ existing installer; short names normalize like primitives.
25
+ - Workflow composition and safety validation: stage references resolve to
26
+ known primitives, workflows never stage another workflow or themselves,
27
+ and workflow SKILL.md files stay lean by referencing primitives.
28
+
29
+ ### Changed
30
+
31
+ - Catalog distinguishes primitive and workflow skills; `getSkill` and
32
+ `normalizeSkillName` resolve all 19 installable skills.
33
+ - `showdar validate` reports primitive/workflow/total counts
34
+ (`15 primitives, 4 workflows, 19 total`).
35
+ - `showdar add` normalization supports workflow IDs and short names.
36
+ - OpenCode `skill.md` command lists all 19 skills with a whole-task versus
37
+ single-primitive selection guard.
38
+ - AGENTS.md managed routing block includes workflow routes when installed.
39
+
9
40
  ## [0.3.0]
10
41
 
11
42
  ### Added
package/MIGRATION.md CHANGED
@@ -1,3 +1,26 @@
1
+ # Migrating to 0.4.0
2
+
3
+ 0.4.0 adds four optional workflow skills over the unchanged 15 primitives:
4
+
5
+ ```bash
6
+ showdar add feature
7
+ showdar add bugfix
8
+ showdar add release
9
+ showdar add incident
10
+ ```
11
+
12
+ - 0.3.0 `.showdar.json` v2 configs remain valid; no config-version migration
13
+ is required.
14
+ - All 15 primitive IDs remain unchanged.
15
+ - Profile behavior and composition are unchanged: `minimal` (8), `developer`
16
+ (12), `backend` (14), `qa` (9), `product` (6), `full` (15 primitives).
17
+ - Workflows are additive and optional; they complement rather than replace
18
+ primitives. Nothing is removed.
19
+ - No Phase 6G routing migration is required; the authority engine and the
20
+ 15-capability primitive taxonomy are unchanged.
21
+ - Single primitive requests keep resolving to primitives; whole-task or
22
+ lifecycle requests may select a workflow.
23
+
1
24
  # Migrating to 0.3.0
2
25
 
3
26
  ## Skill install roots
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/showdar-skills?logo=npm)](https://www.npmjs.com/package/showdar-skills)
4
4
  [![Node >=20](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
5
5
  [![MIT License](https://img.shields.io/badge/license-MIT-blue?logo=opensourceinitiative&logoColor=white)](./LICENSE)
6
- [![15 skills](https://img.shields.io/badge/skills-15-6f42c1)](#skill-catalog)
6
+ [![19 skills](https://img.shields.io/badge/skills-19-6f42c1)](#skill-catalog)
7
7
 
8
8
  Production-grade software engineering skills for coding agents. Showdar covers
9
9
  the full lifecycle—from requirements and planning through implementation, QA,
@@ -42,7 +42,7 @@ you want all capabilities available.
42
42
 
43
43
  ## Why Showdar?
44
44
 
45
- - **15 focused skills** instead of one oversized agent prompt.
45
+ - **15 focused primitive skills** plus 4 adaptive workflow skills (19 installable) instead of one oversized agent prompt.
46
46
  - **Lifecycle coverage** from product rules to implementation, verification,
47
47
  security, operations, release readiness, and Git completion.
48
48
  - **Intent-based discovery** that selects the workflow matching the request.
@@ -72,9 +72,12 @@ SKILL.md
72
72
  only when needed
73
73
  ```
74
74
 
75
- The 15 skills are not eagerly loaded as full prompts. Lightweight descriptions
76
- help the agent choose one skill; that skill then loads its workflow and deeper
77
- knowledge progressively.
75
+ The 15 primitive skills are not eagerly loaded as full prompts. Lightweight
76
+ descriptions help the agent choose one skill; that skill then loads its
77
+ workflow and deeper knowledge progressively. Workflow skills add a portable
78
+ orchestration layer: a workflow selects the lifecycle stages a task actually
79
+ needs and composes primitives one at a time, without duplicating their
80
+ instructions.
78
81
 
79
82
  ## Supported agents
80
83
 
@@ -130,8 +133,10 @@ paths are refreshed or removed.
130
133
 
131
134
  ## Profiles
132
135
 
133
- Role-specific profiles improve routing precision. `full` exposes every skill,
134
- but still does not eagerly load every skill body.
136
+ Role-specific profiles improve routing precision. Profiles install primitive
137
+ skill sets; workflow skills are opt-in through `showdar add <workflow>` and
138
+ are not silently included in any profile. `full` exposes every primitive
139
+ skill, but still does not eagerly load every skill body.
135
140
 
136
141
  | Profile | Skills | Best for |
137
142
  | --- | ---: | --- |
@@ -140,7 +145,7 @@ but still does not eagerly load every skill body.
140
145
  | `backend` | 14 | APIs, services, and runtime operations |
141
146
  | `qa` | 9 | Testing and quality workflows |
142
147
  | `product` | 6 | Product, requirements, and design work |
143
- | `full` | 15 | All capabilities |
148
+ | `full` | 15 | All primitive capabilities |
144
149
 
145
150
  Legacy aliases remain compatible:
146
151
 
@@ -153,7 +158,8 @@ New manifests store the canonical `developer` profile.
153
158
 
154
159
  ## Skill catalog
155
160
 
156
- All 15 entries are first-class Showdar skills.
161
+ All 15 primitive entries are first-class Showdar skills. Four workflow skills
162
+ compose them; see [Workflow skills](#workflow-skills).
157
163
 
158
164
  ### Analysis and planning
159
165
 
@@ -195,6 +201,109 @@ All 15 entries are first-class Showdar skills.
195
201
  | `showdar-recover` | Interrupted or partial engineering work must be reconstructed from repository evidence before continuing. |
196
202
  | `showdar-git` | Performing local Git inspection, staging, commits, branch integration, conflicts, cleanup, or explicitly requested remote Git actions. |
197
203
 
204
+ ## Workflow skills
205
+
206
+ Four workflow skills orchestrate primitives adaptively; they are not fixed
207
+ pipelines and they grant no extra authority:
208
+
209
+ | Skill | Use when |
210
+ | --- | --- |
211
+ | `showdar-feature` | Implementing a complete feature end-to-end. |
212
+ | `showdar-bugfix` | Resolving an observed defect end-to-end. |
213
+ | `showdar-release` | Preparing, validating, or executing a release lifecycle. |
214
+ | `showdar-incident` | Investigating or recovering from an active operational incident. |
215
+
216
+ How a workflow runs:
217
+
218
+ ```text
219
+ Workflow
220
+ -> selects needed lifecycle stages
221
+ -> invokes/composes primitive skills one at a time
222
+ -> primitives retain their own semantics
223
+ -> Phase 6G remains the authority source
224
+ ```
225
+
226
+ Properties:
227
+
228
+ - Adaptive, not fixed pipelines: stages marked `?` below are skipped when
229
+ evidence permits.
230
+ - Intended for whole-task and lifecycle requests.
231
+ - Focused primitive requests remain primitive.
232
+ - Workflow identity never grants mutation or deployment authority.
233
+ - Risk and severity never grant production authority.
234
+ - Workflows do not create a second router or authority engine.
235
+
236
+ ### showdar-feature
237
+
238
+ ```bash
239
+ showdar add feature
240
+ ```
241
+
242
+ Typical candidate flow:
243
+
244
+ ```text
245
+ understand -> requirements? -> plan? -> design? -> build -> test -> review
246
+ ```
247
+
248
+ Skip requirements when behavior is already defined, plan for genuinely
249
+ focused work, and design when no architecture or UX decision exists.
250
+ Verification is never skipped to move faster. Ops is not implied.
251
+
252
+ ### showdar-bugfix
253
+
254
+ ```bash
255
+ showdar add bugfix
256
+ ```
257
+
258
+ Typical:
259
+
260
+ ```text
261
+ understand -> debug? -> build -> test -> review
262
+ ```
263
+
264
+ If the root cause is already proven, debug may be skipped. If the request is
265
+ diagnosis only, build is not implied and the workflow stops after
266
+ `showdar-debug`.
267
+
268
+ ### showdar-release
269
+
270
+ ```bash
271
+ showdar add release --scope global --ai claude
272
+ ```
273
+
274
+ Typical:
275
+
276
+ ```text
277
+ quality -> security? -> ship -> ops only with explicit target + authorization
278
+ ```
279
+
280
+ Readiness must not imply deployment. `showdar-ship` stays delivery
281
+ verification; `showdar-ops` loads only with an explicit target plus execution
282
+ authorization.
283
+
284
+ ### showdar-incident
285
+
286
+ ```bash
287
+ showdar add incident
288
+ ```
289
+
290
+ Typical:
291
+
292
+ ```text
293
+ understand -> debug -> recover -> verification -> ops only when explicitly authorized
294
+ ```
295
+
296
+ Diagnose before mutating when the cause is unknown. Severity must not imply
297
+ production mutation. The workflow never auto-deploys or restarts production
298
+ from risk alone.
299
+
300
+ Workflows compose primitives: they select only the stages the evidence
301
+ requires, skip defined or decision-free stages, load one primitive at a time,
302
+ and stop when evidence or authority is missing. Single primitive requests stay
303
+ primitive (`showdar-review`, `showdar-debug`, `showdar-test`). Phase 6G remains
304
+ the authority source; workflows consume it and never mint it. Workflows are
305
+ opt-in through `showdar add <workflow>`; profiles install primitive sets only.
306
+
198
307
  ## A typical software workflow
199
308
 
200
309
  ```text
@@ -255,17 +364,23 @@ OpenCode exposes native commands after initialization with `--ai opencode` or
255
364
 
256
365
  ## Adding a single skill
257
366
 
258
- Install one primitive skill without re-running a whole profile:
367
+ Install one skill without re-running a whole profile:
259
368
 
260
369
  ```bash
261
370
  showdar add debug
262
371
  showdar add showdar-security
263
372
  showdar add test --ai cursor
264
373
  showdar add review --scope global --ai claude
374
+ showdar add feature
375
+ showdar add bugfix --ai cursor
376
+ showdar add release --scope global --ai claude
377
+ showdar add incident
265
378
  ```
266
379
 
267
- Accepted names are the short form (`debug`) or the canonical form
268
- (`showdar-debug`). The release ships exactly 15 primitive skills. `showdar add`
380
+ Accepted names are the short form (`debug`, `feature`) or the canonical form
381
+ (`showdar-debug`, `showdar-feature`). The release ships exactly 15 primitive
382
+ skills plus 4 workflow skills (19 installable total); profiles install
383
+ primitive sets only. There is no `showdar workflow ...` command. `showdar add`
269
384
  is idempotent, preserves the configured profile, supports `--ai`/`--scope`
270
385
  overrides, and refuses to overwrite a foreign same-name skill directory that
271
386
  Showdar does not own.
package/bin/showdar.js CHANGED
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { readFile } from 'node:fs/promises';
5
5
  import { fileURLToPath } from 'node:url';
6
- import { AI_TARGETS, PROFILE_ALIASES, PROFILES, SKILLS, canonicalProfile, isDeprecatedProfile, resolveProfile } from '../src/catalog.js';
6
+ import { AI_TARGETS, PRIMITIVE_COUNT, PROFILE_ALIASES, PROFILES, SKILLS, TOTAL_COUNT, WORKFLOW_COUNT, canonicalProfile, isDeprecatedProfile, resolveProfile } from '../src/catalog.js';
7
7
  import { addSkill, globalManifestPath, initGlobal, initProject, inspectGlobal, inspectProject, removeGlobal, removeProject } from '../src/project.js';
8
8
  import { validateRepository } from '../src/validate.js';
9
9
 
@@ -69,7 +69,7 @@ async function main() {
69
69
 
70
70
  if (command === 'validate') {
71
71
  const result = await validateRepository(packageRoot);
72
- if (result.ok) console.log(`Showdar validation OK (${SKILLS.length} skills).`);
72
+ if (result.ok) console.log(`Showdar validation OK (${PRIMITIVE_COUNT} primitives, ${WORKFLOW_COUNT} workflows, ${TOTAL_COUNT} total).`);
73
73
  else {
74
74
  console.log(`Showdar validation FAILED (${result.errors.length} errors).`);
75
75
  for (const error of result.errors) console.log(`- ${error}`);
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Invoke a specific Showdar flagship skill explicitly
3
3
  ---
4
- Select exactly one requested Showdar skill and follow it: `showdar-understand`, `showdar-plan`, `showdar-design`, `showdar-build`, `showdar-debug`, `showdar-test`, `showdar-review`, `showdar-upgrade`, `showdar-ship`, `showdar-recover`, `showdar-git`, `showdar-requirements`, `showdar-quality`, `showdar-security`, or `showdar-ops`. If the requested name is ambiguous, choose the smallest matching skill from this list and say which one was selected.
4
+ Select exactly one requested Showdar skill and follow it: `showdar-understand`, `showdar-plan`, `showdar-design`, `showdar-build`, `showdar-debug`, `showdar-test`, `showdar-review`, `showdar-upgrade`, `showdar-ship`, `showdar-recover`, `showdar-git`, `showdar-requirements`, `showdar-quality`, `showdar-security`, `showdar-ops`, `showdar-feature`, `showdar-bugfix`, `showdar-release`, or `showdar-incident`. Whole-task intent (complete feature, end-to-end fix, release lifecycle, active incident) selects a workflow; single primitive intent stays primitive. If the requested name is ambiguous, choose the smallest matching skill from this list and say which one was selected.
5
5
 
6
6
  Request: $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "showdar-skills",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Production-grade software engineering lifecycle skills for coding agents.",
5
5
  "type": "module",
6
6
  "bin": { "showdar": "./bin/showdar.js" },
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: showdar-bugfix
3
+ description: Use when resolving an observed defect end-to-end, adaptively sequencing understand, debug, build, test, and review stages based on whether root cause is already proven.
4
+ ---
5
+
6
+ # Showdar Bugfix
7
+
8
+ ## Purpose
9
+
10
+ - Resolve an observed defect safely from evidence to verified fix.
11
+ - Include diagnosis only when the root cause is actually unknown.
12
+ - Skip implementation when the user asked only for investigation.
13
+ - Hand work to one primitive at a time; load the next only when needed.
14
+
15
+ ## When to use
16
+
17
+ - The user asks to resolve a defect end-to-end.
18
+ - A failure is observed: crash, regression, wrong behavior, build failure, performance fault.
19
+ - Examples: "fix the login crash", "resolve the checkout regression".
20
+
21
+ ## When not to use
22
+
23
+ - Single primitive intent stays primitive: "why does this crash" is `showdar-debug` unless the user asks to fix it end-to-end.
24
+ - Investigation-only requests stay at `showdar-debug`; do not force `showdar-build`.
25
+ - Interrupted or broken work-state recovery is `showdar-recover`, not this workflow; use recover only for work-state semantics, not ordinary bugs.
26
+ - Once this workflow is active, do not spawn another parent workflow unless the request contains a genuinely separate workflow task.
27
+ - This workflow never recursively invokes itself.
28
+
29
+ ## Inputs and assumptions
30
+
31
+ - Observed failure and reproduction path, when available.
32
+ - Current repository conventions and change surface are discoverable.
33
+ - Authority comes from the existing Phase 6G engine; this workflow consumes authority results and never mints authority.
34
+ - Candidate stages: `showdar-understand`, `showdar-debug`, `showdar-build`, `showdar-test`, `showdar-review`.
35
+
36
+ ## Non-negotiable rules
37
+
38
+ - Symptom description alone is not mutation authority.
39
+ - Do not treat a symptom as permission to edit; require root-cause evidence or explicit fix authorization.
40
+ - Investigation-only requests do not proceed to `showdar-build`.
41
+ - End-to-end fixes always include verification; never skip it to move faster.
42
+ - Stop when required evidence is missing instead of guessing.
43
+
44
+ ## Workflow
45
+
46
+ ### Phase 1 — determine needed stages
47
+
48
+ - Root cause unknown: `showdar-understand`, then `showdar-debug`, then `showdar-build`, then `showdar-test`, then `showdar-review`.
49
+ - Root cause already proven: `showdar-understand`, then `showdar-build`, then `showdar-test`, then `showdar-review`.
50
+ - Investigation only: `showdar-debug` alone, then report findings without mutation.
51
+
52
+ ### Phase 2 — execute progressively
53
+
54
+ - Load one primitive at a time; hand off only when its stop condition is met.
55
+ - Each primitive's own SKILL.md governs its stage; do not copy primitive instructions here.
56
+ - Track ephemeral state only: candidate stages, selected stages, active stage, completed evidence, next stage or complete.
57
+ - No persistent checkpoint or resume infrastructure in this version.
58
+
59
+ ## Decision points
60
+
61
+ - Is the root cause proven with evidence? If yes, `showdar-debug` may be skipped.
62
+ - Did the user ask only for diagnosis? If yes, stop after `showdar-debug`.
63
+ - Is the failure actually interrupted work-state? If yes, hand off to `showdar-recover` instead.
64
+ - Auth, secrets, or exposure involved? Add `showdar-security` as an orthogonal specialist.
65
+
66
+ ## Stack detection
67
+
68
+ - Defer to each selected primitive's own stack detection.
69
+
70
+ ## Failure modes
71
+
72
+ - Editing from symptom description without root-cause evidence.
73
+ - Forcing implementation when only diagnosis was requested.
74
+ - Confusing ordinary bugs with work-state recovery.
75
+ - Loading all primitives eagerly instead of progressively.
76
+
77
+ ## Stop conditions
78
+
79
+ - Stop when the request is actually a single primitive task and hand off to that primitive.
80
+ - Stop before destructive, irreversible, production, credential, publishing, or deployment actions unless explicitly authorized.
81
+ - Stop when required evidence is missing.
82
+ - Stop when the fix is verified and reviewed.
83
+
84
+ ## Escalation conditions
85
+
86
+ - Ask for reproduction steps when the failure cannot be reproduced.
87
+ - Ask for explicit fix authority when evidence is thin.
88
+ - Escalate suspected security exposure with evidence, without exploit amplification.
89
+
90
+ ## Verification
91
+
92
+ - Reproduce before and after where practical.
93
+ - End-to-end fixes include `showdar-test` evidence and `showdar-review` findings addressed.
94
+ - State what was executed and what remains unverified.
95
+
96
+ ## Output contract
97
+
98
+ - Root-cause evidence and selected stages.
99
+ - Fix location and behavior change.
100
+ - Verification gaps or residual risk.
101
+
102
+ ## Anti-patterns
103
+
104
+ - Symptom-to-patch without diagnosis.
105
+ - Mandatory debug stage even when the cause is proven.
106
+ - Mandatory build stage for investigation-only requests.
107
+ - Copying primitive SKILL.md content into this file.
108
+
109
+ ## Example
110
+
111
+ **Checkout total regressed after discount change**
112
+
113
+ - Evidence: failure observed, root cause unknown.
114
+ - Selected: `showdar-understand`, then `showdar-debug` (isolated to discount ordering), then `showdar-build`, then `showdar-test`, then `showdar-review`.
115
+ - Investigation-only variant would stop after `showdar-debug` with findings and no mutation.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: showdar-feature
3
+ description: Use when implementing a complete feature end-to-end, adaptively sequencing understand, requirements, plan, design, build, test, and review stages based on existing definition.
4
+ ---
5
+
6
+ # Showdar Feature
7
+
8
+ ## Purpose
9
+
10
+ - Implement a complete feature end-to-end by sequencing primitive skills.
11
+ - Select only the stages the current evidence actually requires.
12
+ - Skip defined, trivial, or decision-free stages instead of running a fixed pipeline.
13
+ - Hand work to one primitive at a time; load the next primitive only when needed.
14
+
15
+ ## When to use
16
+
17
+ - The user asks to implement a complete feature or change spanning multiple lifecycle stages.
18
+ - Whole-task intent exists: discovery plus definition plus implementation plus verification.
19
+ - Examples: "add user search", "implement checkout flow", "build the export feature".
20
+
21
+ ## When not to use
22
+
23
+ - Single primitive intent stays primitive: "review this diff" stays `showdar-review`, "run tests" stays `showdar-test`, "why does this crash" stays `showdar-debug` unless the user asks to fix it end-to-end.
24
+ - A request that is only diagnosis, only planning, or only review is not this workflow.
25
+ - Once this workflow is active, do not spawn another parent workflow unless the request contains a genuinely separate workflow task.
26
+ - This workflow never recursively invokes itself.
27
+
28
+ ## Inputs and assumptions
29
+
30
+ - User outcome in their own words.
31
+ - Current repository conventions and change surface are discoverable.
32
+ - Authority comes from the existing Phase 6G engine; this workflow consumes authority results and never mints authority.
33
+ - Candidate stages: `showdar-understand`, `showdar-requirements`, `showdar-plan`, `showdar-design`, `showdar-build`, `showdar-test`, `showdar-review`.
34
+
35
+ ## Non-negotiable rules
36
+
37
+ - This workflow does not grant extra authority. Deployment requires explicit authority.
38
+ - Ops is NOT implied by feature work.
39
+ - Never skip verification merely to move faster.
40
+ - Security may load as an orthogonal primitive (`showdar-security`) when the change touches auth, secrets, trust boundaries, or exposure.
41
+ - Stop when required evidence is missing instead of guessing.
42
+
43
+ ## Workflow
44
+
45
+ ### Phase 1 — determine needed stages
46
+
47
+ - Start with `showdar-understand` when the repository, architecture, or impact is unfamiliar.
48
+ - Skip requirements if behavior is already sufficiently defined.
49
+ - Skip plan for genuinely focused or local work.
50
+ - Skip design when no meaningful architecture, UX, or interface decision exists.
51
+ - Small well-defined change: understand, then `showdar-build`, then `showdar-test`, then `showdar-review`.
52
+ - Undefined feature: understand, then `showdar-requirements`, then `showdar-plan`, then `showdar-build`, then `showdar-test`, then `showdar-review`.
53
+ - Architecture or UI-sensitive feature: understand, then `showdar-requirements`, then `showdar-plan`, then `showdar-design`, then `showdar-build`, then `showdar-test`, then `showdar-review`.
54
+
55
+ ### Phase 2 — execute progressively
56
+
57
+ - Load one primitive at a time; hand off only when its stop condition is met.
58
+ - Each primitive's own SKILL.md governs its stage; do not copy primitive instructions here.
59
+ - Track ephemeral state only: candidate stages, selected stages, active stage, completed evidence, next stage or complete.
60
+ - No persistent checkpoint or resume infrastructure in this version.
61
+
62
+ ## Decision points
63
+
64
+ - Behavior defined already? Skip `showdar-requirements`.
65
+ - Change surface local and low-risk? Skip `showdar-plan`.
66
+ - No architecture, UX, or interface trade-off? Skip `showdar-design`.
67
+ - Auth, secrets, or exposure touched? Add `showdar-security` as an orthogonal specialist.
68
+ - Deployment requested? Require explicit authority; this workflow alone never authorizes it.
69
+
70
+ ## Stack detection
71
+
72
+ - Defer to each selected primitive's own stack detection.
73
+
74
+ ## Failure modes
75
+
76
+ - Running every stage as a mandatory checklist.
77
+ - Duplicating primitive instructions inside this workflow.
78
+ - Treating feature intent as deployment authority.
79
+ - Loading all primitives eagerly instead of progressively.
80
+
81
+ ## Stop conditions
82
+
83
+ - Stop when the request is actually a single primitive task and hand off to that primitive.
84
+ - Stop before destructive, irreversible, production, credential, publishing, or deployment actions unless explicitly authorized.
85
+ - Stop when required evidence is missing.
86
+ - Stop when the selected stages are complete and verified.
87
+
88
+ ## Escalation conditions
89
+
90
+ - Ask for missing behavior definition when requirements cannot be skipped honestly.
91
+ - Ask for explicit authority when deployment or production mutation appears.
92
+ - Escalate suspected security exposure with evidence, without exploit amplification.
93
+
94
+ ## Verification
95
+
96
+ - Every implementation stage ends with `showdar-test` evidence and `showdar-review` findings addressed.
97
+ - State what was executed and what remains unverified.
98
+
99
+ ## Output contract
100
+
101
+ - Selected stages with one-line justification for each skipped stage.
102
+ - Completed evidence per stage.
103
+ - Verification gaps or residual risk.
104
+
105
+ ## Anti-patterns
106
+
107
+ - Fixed pipeline regardless of evidence.
108
+ - Second authority engine or second intent resolver.
109
+ - Custom autonomous agent behavior.
110
+ - Copying primitive SKILL.md content into this file.
111
+
112
+ ## Example
113
+
114
+ **Add workspace member search**
115
+
116
+ - Evidence: behavior already defined in the ticket, local API plus UI change, no architecture trade-off.
117
+ - Selected: `showdar-understand`, then `showdar-build`, then `showdar-test`, then `showdar-review`.
118
+ - Skipped: requirements (defined), plan (local), design (no UX decision).
119
+ - Verification: new search tests pass; review findings addressed.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: showdar-incident
3
+ description: Use when investigating and recovering from an active operational incident, adaptively sequencing understand, debug, recover, verification, and ops stages with strict mutation authority.
4
+ ---
5
+
6
+ # Showdar Incident
7
+
8
+ ## Purpose
9
+
10
+ - Handle an active operational failure or service-impacting incident.
11
+ - Diagnose before mutating when the cause is unknown.
12
+ - Recover work-state or service state through the right primitive.
13
+ - Keep production mutation strictly authority-gated regardless of severity.
14
+
15
+ ## When to use
16
+
17
+ - The user asks to investigate or recover from an active operational incident.
18
+ - Service impact exists: outage, degraded service, failed deploy, data-risk event.
19
+ - Examples: "production API is down", "recover the failed deploy", "checkout is erroring in prod".
20
+
21
+ ## When not to use
22
+
23
+ - Single primitive intent stays primitive: a narrow debug question without recovery intent is `showdar-debug`.
24
+ - Ordinary non-urgent bugs without operational impact belong to `showdar-bugfix`.
25
+ - Once this workflow is active, do not spawn another parent workflow unless the request contains a genuinely separate workflow task.
26
+ - This workflow never recursively invokes itself.
27
+
28
+ ## Inputs and assumptions
29
+
30
+ - Incident symptoms, impact scope, and environment, when known.
31
+ - Current repository conventions and change surface are discoverable.
32
+ - Authority comes from the existing Phase 6G engine; this workflow consumes authority results and never mints authority.
33
+ - Candidate stages: `showdar-understand`, `showdar-debug`, `showdar-recover`, `showdar-test`, `showdar-ops`.
34
+
35
+ ## Non-negotiable rules
36
+
37
+ - Diagnosis before speculative mutation when the cause is unknown.
38
+ - Emergency context does not erase authority boundaries.
39
+ - Production mutation is never inferred from severity alone.
40
+ - This workflow does NOT authorize production mutation by identity.
41
+ - `showdar-ops` loads only when explicit environment plus action authority permits it.
42
+ - This workflow never auto-deploys or restarts production from risk alone.
43
+ - A security incident may load `showdar-security` as an orthogonal specialist.
44
+ - Stop when required evidence or authority is missing instead of guessing.
45
+
46
+ ## Workflow
47
+
48
+ ### Phase 1 — determine needed stages
49
+
50
+ - Typical path: `showdar-understand`, then `showdar-debug`, then `showdar-recover`, then verification.
51
+ - Unknown cause: investigate first; no speculative mutation.
52
+ - Interrupted or broken work-state: use `showdar-recover` for work-state semantics.
53
+ - Verification uses `showdar-test` evidence or the relevant primitive's own verification.
54
+ - Add `showdar-ops` only with explicit environment plus action authority.
55
+
56
+ ### Phase 2 — execute progressively
57
+
58
+ - Load one primitive at a time; hand off only when its stop condition is met.
59
+ - Each primitive's own SKILL.md governs its stage; do not copy primitive instructions here.
60
+ - Track ephemeral state only: candidate stages, selected stages, active stage, completed evidence, next stage or complete.
61
+ - No persistent checkpoint or resume infrastructure in this version.
62
+
63
+ ## Decision points
64
+
65
+ - Is the cause known? If not, diagnose before any mutation.
66
+ - Is this work-state recovery or service recovery? Choose `showdar-recover` versus `showdar-ops` accordingly, gated by authority.
67
+ - Is explicit ops authority present? Without environment plus action permission, no ops step.
68
+ - Is this a security incident? If yes, add `showdar-security` as an orthogonal specialist.
69
+
70
+ ## Stack detection
71
+
72
+ - Defer to each selected primitive's own stack detection.
73
+
74
+ ## Failure modes
75
+
76
+ - Mutating production from severity or urgency alone.
77
+ - Auto-deploying or restarting from risk signals.
78
+ - Skipping diagnosis to "move fast" during an incident.
79
+ - Loading all primitives eagerly instead of progressively.
80
+
81
+ ## Stop conditions
82
+
83
+ - Stop when the request is actually a single primitive task and hand off to that primitive.
84
+ - Stop before production mutation, deployment, restart, or rollback without explicit authority.
85
+ - Stop when required evidence is missing.
86
+ - Stop when recovery is verified or the incident is handed off with evidence.
87
+
88
+ ## Escalation conditions
89
+
90
+ - Ask for environment plus action authority before any ops step.
91
+ - Ask for missing impact scope or logs when diagnosis is blocked.
92
+ - Escalate suspected security exposure with evidence, without exploit amplification.
93
+
94
+ ## Verification
95
+
96
+ - Verify recovery with fresh evidence, not assumptions.
97
+ - State what was executed and what remains unverified.
98
+
99
+ ## Output contract
100
+
101
+ - Diagnosis evidence and selected stages.
102
+ - Recovery actions taken, each with its authority basis.
103
+ - Verification gaps or residual risk.
104
+
105
+ ## Anti-patterns
106
+
107
+ - Severity granting mutation authority.
108
+ - Risk signals triggering auto-remediation.
109
+ - Second authority engine or second intent resolver.
110
+ - Copying primitive SKILL.md content into this file.
111
+
112
+ ## Example
113
+
114
+ **Production checkout erroring after deploy**
115
+
116
+ - Evidence: active incident, cause unknown, no ops authority stated.
117
+ - Selected: `showdar-understand`, then `showdar-debug`, then `showdar-recover` for work-state triage, then verification.
118
+ - Skipped: `showdar-ops` (no explicit environment plus action authority).
119
+ - Output: diagnosis evidence, recovery state, and the exact authority needed for any production action.
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: showdar-release
3
+ description: Use when preparing, validating, or executing a release lifecycle, adaptively sequencing quality, security, ship, and ops stages with strict authority boundaries.
4
+ ---
5
+
6
+ # Showdar Release
7
+
8
+ ## Purpose
9
+
10
+ - Prepare and execute a software release through existing primitive boundaries.
11
+ - Distinguish release readiness from release execution and deployment.
12
+ - Default to safe verification; execute only with explicit authority.
13
+ - Hand work to one primitive at a time; load the next only when needed.
14
+
15
+ ## When to use
16
+
17
+ - The user asks to prepare, validate, or execute a release lifecycle.
18
+ - Examples: "check if this is ready to release", "prepare v1.4.0", "release v1.4.0 to npm now" (execution only when authority permits).
19
+ - Lifecycle-level requests spanning quality plus readiness plus possible execution.
20
+
21
+ ## When not to use
22
+
23
+ - Single primitive intent stays primitive: a narrow "check this diff" is `showdar-review`, a test plan is `showdar-quality`, readiness alone may be `showdar-ship`.
24
+ - "Check if this is ready to release" must NOT imply deployment.
25
+ - Once this workflow is active, do not spawn another parent workflow unless the request contains a genuinely separate workflow task.
26
+ - This workflow never recursively invokes itself.
27
+
28
+ ## Inputs and assumptions
29
+
30
+ - Release scope, version, and target, when known.
31
+ - Current repository conventions and change surface are discoverable.
32
+ - Authority comes from the existing Phase 6G engine; this workflow consumes authority results and never mints authority.
33
+ - Candidate stages: `showdar-quality`, `showdar-security`, `showdar-ship`, `showdar-ops`.
34
+
35
+ ## Non-negotiable rules
36
+
37
+ - This workflow does NOT authorize deployment by identity. `showdar-release` never means deployment is automatically authorized.
38
+ - `showdar-ship` remains delivery verification and release readiness, not execution.
39
+ - `showdar-ops` loads only when an explicit target plus execution authorization exist.
40
+ - The release noun alone never produces an ops step.
41
+ - Security loads conditionally when the release touches auth, secrets, trust boundaries, exposure, or dependencies with risk.
42
+ - Stop when required evidence or authority is missing instead of proceeding.
43
+
44
+ ## Workflow
45
+
46
+ ### Phase 1 — determine needed stages
47
+
48
+ - Default safe path: `showdar-quality`, then conditional `showdar-security`, then `showdar-ship`.
49
+ - Add `showdar-ops` only when explicit target plus execution authorization exist.
50
+ - Readiness request ("check if ready"): quality, then security when applicable, then ship. No ops.
51
+ - Execution request ("release v1.4.0 to npm now"): same readiness path first, then ops only when existing authority semantics authorize it.
52
+
53
+ ### Phase 2 — execute progressively
54
+
55
+ - Load one primitive at a time; hand off only when its stop condition is met.
56
+ - Each primitive's own SKILL.md governs its stage; do not copy primitive instructions here.
57
+ - Track ephemeral state only: candidate stages, selected stages, active stage, completed evidence, next stage or complete.
58
+ - No persistent checkpoint or resume infrastructure in this version.
59
+
60
+ ## Decision points
61
+
62
+ - Is this readiness or execution? Readiness stops at `showdar-ship`.
63
+ - Does execution have an explicit target plus authorization? Without both, no `showdar-ops`.
64
+ - Does the release warrant security review? If yes, add `showdar-security`.
65
+ - Do Git, ship, or ops safety boundaries block? Respect them; do not bypass.
66
+
67
+ ## Stack detection
68
+
69
+ - Defer to each selected primitive's own stack detection.
70
+
71
+ ## Failure modes
72
+
73
+ - Treating readiness as deployment permission.
74
+ - Loading `showdar-ops` from the release noun alone.
75
+ - Bypassing Git, ship, or ops safety boundaries.
76
+ - Running security unconditionally or skipping it when risk exists.
77
+
78
+ ## Stop conditions
79
+
80
+ - Stop when the request is actually a single primitive task and hand off to that primitive.
81
+ - Stop before execution or deployment without explicit authority.
82
+ - Stop when required evidence is missing.
83
+ - Stop when readiness is verified (readiness path) or execution is verified (authorized execution path).
84
+
85
+ ## Escalation conditions
86
+
87
+ - Ask for the explicit release target and execution authorization before any ops step.
88
+ - Ask for missing release scope or version when it blocks verification.
89
+ - Escalate suspected security exposure with evidence, without exploit amplification.
90
+
91
+ ## Verification
92
+
93
+ - Readiness: `showdar-quality` scenarios plus `showdar-ship` checks with evidence.
94
+ - Execution: authorized ops outcome plus fresh verification that the release landed.
95
+ - State what was executed and what remains unverified.
96
+
97
+ ## Output contract
98
+
99
+ - Readiness verdict or execution outcome.
100
+ - Selected stages with justification for skipped or conditional stages.
101
+ - Verification gaps or residual risk.
102
+
103
+ ## Anti-patterns
104
+
105
+ - Readiness implying deployment.
106
+ - Workflow identity granting mutation authority.
107
+ - Fixed pipeline regardless of risk and authority.
108
+ - Copying primitive SKILL.md content into this file.
109
+
110
+ ## Example
111
+
112
+ **Check if v1.4.0 is ready to release**
113
+
114
+ - Evidence: lifecycle-level readiness request, no execution authorization.
115
+ - Selected: `showdar-quality`, then `showdar-security` (auth changes present), then `showdar-ship`.
116
+ - Skipped: `showdar-ops` (no execution authority).
117
+ - Output: readiness verdict with gaps; no deployment performed.
package/src/catalog.js CHANGED
@@ -1,21 +1,38 @@
1
1
  export const SKILLS = [
2
- { id: 'showdar-understand', domain: 'understand', description: 'Use when mapping an unfamiliar repository, architecture, dependencies, or impact before deciding what to change.' },
3
- { id: 'showdar-plan', domain: 'plan', description: 'Use when agreed behavior needs a bounded implementation plan, change surface, task order, risks, or verification steps.' },
4
- { id: 'showdar-design', domain: 'design', description: 'Use when product UI needs design direction, UX decisions, responsive layout, accessibility, or visual polish.' },
5
- { id: 'showdar-build', domain: 'build', description: 'Use when implementing or refactoring an agreed application change within existing architecture and contracts.' },
6
- { id: 'showdar-debug', domain: 'debug', description: 'Use when observed behavior fails through crashes, regressions, build failures, races, networking, memory, or performance issues.' },
7
- { id: 'showdar-test', domain: 'test', description: 'Use when choosing or implementing automated tests for behavior, regressions, integration, E2E, or coverage.' },
8
- { id: 'showdar-review', domain: 'review', description: 'Use when reviewing code or diffs for general correctness, architecture, performance, maintainability, or tests.' },
9
- { id: 'showdar-upgrade', domain: 'upgrade', description: 'Use when upgrading dependencies, frameworks, runtimes, or native platforms and compatibility or rollback risk matters.' },
10
- { id: 'showdar-ship', domain: 'ship', description: 'Use when checking whether a change, artifact, or release is ready for handoff or external release.' },
11
- { id: 'showdar-recover', domain: 'recover', description: 'Use when interrupted or partial engineering work must be reconstructed from repository evidence before continuing.' },
12
- { id: 'showdar-git', domain: 'git', description: 'Use when performing local Git inspection, staging, commits, branch integration, conflicts, cleanup, or explicitly requested remote Git actions.' },
13
- { id: 'showdar-requirements', domain: 'requirements', description: 'Use when product or business input needs explicit behavior, rules, acceptance criteria, assumptions, or open decisions.' },
14
- { id: 'showdar-quality', domain: 'quality', description: 'Use when planning QA/QC scenarios, risk coverage, regression scope, compatibility checks, or bug-report evidence.' },
15
- { id: 'showdar-security', domain: 'security', description: 'Use when assessing threat models, attack surfaces, trust boundaries, auth/authz, secrets, exposure, or exploitability.' },
16
- { id: 'showdar-ops', domain: 'ops', description: 'Use when inspecting or changing CI/CD, containers, environments, deployment, observability, rollback, or runtime operations.' },
2
+ { id: 'showdar-understand', kind: 'primitive', domain: 'understand', description: 'Use when mapping an unfamiliar repository, architecture, dependencies, or impact before deciding what to change.' },
3
+ { id: 'showdar-plan', kind: 'primitive', domain: 'plan', description: 'Use when agreed behavior needs a bounded implementation plan, change surface, task order, risks, or verification steps.' },
4
+ { id: 'showdar-design', kind: 'primitive', domain: 'design', description: 'Use when product UI needs design direction, UX decisions, responsive layout, accessibility, or visual polish.' },
5
+ { id: 'showdar-build', kind: 'primitive', domain: 'build', description: 'Use when implementing or refactoring an agreed application change within existing architecture and contracts.' },
6
+ { id: 'showdar-debug', kind: 'primitive', domain: 'debug', description: 'Use when observed behavior fails through crashes, regressions, build failures, races, networking, memory, or performance issues.' },
7
+ { id: 'showdar-test', kind: 'primitive', domain: 'test', description: 'Use when choosing or implementing automated tests for behavior, regressions, integration, E2E, or coverage.' },
8
+ { id: 'showdar-review', kind: 'primitive', domain: 'review', description: 'Use when reviewing code or diffs for general correctness, architecture, performance, maintainability, or tests.' },
9
+ { id: 'showdar-upgrade', kind: 'primitive', domain: 'upgrade', description: 'Use when upgrading dependencies, frameworks, runtimes, or native platforms and compatibility or rollback risk matters.' },
10
+ { id: 'showdar-ship', kind: 'primitive', domain: 'ship', description: 'Use when checking whether a change, artifact, or release is ready for handoff or external release.' },
11
+ { id: 'showdar-recover', kind: 'primitive', domain: 'recover', description: 'Use when interrupted or partial engineering work must be reconstructed from repository evidence before continuing.' },
12
+ { id: 'showdar-git', kind: 'primitive', domain: 'git', description: 'Use when performing local Git inspection, staging, commits, branch integration, conflicts, cleanup, or explicitly requested remote Git actions.' },
13
+ { id: 'showdar-requirements', kind: 'primitive', domain: 'requirements', description: 'Use when product or business input needs explicit behavior, rules, acceptance criteria, assumptions, or open decisions.' },
14
+ { id: 'showdar-quality', kind: 'primitive', domain: 'quality', description: 'Use when planning QA/QC scenarios, risk coverage, regression scope, compatibility checks, or bug-report evidence.' },
15
+ { id: 'showdar-security', kind: 'primitive', domain: 'security', description: 'Use when assessing threat models, attack surfaces, trust boundaries, auth/authz, secrets, exposure, or exploitability.' },
16
+ { id: 'showdar-ops', kind: 'primitive', domain: 'ops', description: 'Use when inspecting or changing CI/CD, containers, environments, deployment, observability, rollback, or runtime operations.' },
17
17
  ];
18
18
 
19
+ export const WORKFLOW_SKILLS = [
20
+ { id: 'showdar-feature', kind: 'workflow', domain: 'feature', stages: ['showdar-understand', 'showdar-requirements', 'showdar-plan', 'showdar-design', 'showdar-build', 'showdar-test', 'showdar-review'], description: 'Use when implementing a complete feature end-to-end, adaptively sequencing understand, requirements, plan, design, build, test, and review stages based on existing definition.' },
21
+ { id: 'showdar-bugfix', kind: 'workflow', domain: 'bugfix', stages: ['showdar-understand', 'showdar-debug', 'showdar-build', 'showdar-test', 'showdar-review'], description: 'Use when resolving an observed defect end-to-end, adaptively sequencing understand, debug, build, test, and review stages based on whether root cause is already proven.' },
22
+ { id: 'showdar-release', kind: 'workflow', domain: 'release', stages: ['showdar-quality', 'showdar-security', 'showdar-ship', 'showdar-ops'], description: 'Use when preparing, validating, or executing a release lifecycle, adaptively sequencing quality, security, ship, and ops stages with strict authority boundaries.' },
23
+ { id: 'showdar-incident', kind: 'workflow', domain: 'incident', stages: ['showdar-understand', 'showdar-debug', 'showdar-recover', 'showdar-test', 'showdar-ops'], description: 'Use when investigating and recovering from an active operational incident, adaptively sequencing understand, debug, recover, verification, and ops stages with strict mutation authority.' },
24
+ ];
25
+
26
+ export const PRIMITIVE_SKILLS = SKILLS;
27
+
28
+ export const ALL_SKILLS = [...SKILLS, ...WORKFLOW_SKILLS];
29
+
30
+ export const PRIMITIVE_COUNT = SKILLS.length;
31
+
32
+ export const WORKFLOW_COUNT = WORKFLOW_SKILLS.length;
33
+
34
+ export const TOTAL_COUNT = ALL_SKILLS.length;
35
+
19
36
  export const AI_TARGETS = ['codex', 'opencode', 'cursor', 'claude', 'universal', 'all'];
20
37
 
21
38
  const ids = (...values) => values;
@@ -53,16 +70,28 @@ export function resolveProfile(profile) {
53
70
  }
54
71
 
55
72
  export function getSkill(id) {
73
+ return ALL_SKILLS.find((skill) => skill.id === id) ?? null;
74
+ }
75
+
76
+ export function getPrimitive(id) {
56
77
  return SKILLS.find((skill) => skill.id === id) ?? null;
57
78
  }
58
79
 
80
+ export function getWorkflow(id) {
81
+ return WORKFLOW_SKILLS.find((skill) => skill.id === id) ?? null;
82
+ }
83
+
84
+ export function isWorkflowSkill(id) {
85
+ return WORKFLOW_SKILLS.some((skill) => skill.id === id);
86
+ }
87
+
59
88
  export function normalizeSkillName(name) {
60
89
  if (typeof name !== 'string' || !name.trim()) throw new Error('Skill name is required.');
61
90
  const trimmed = name.trim();
62
91
  const canonical = trimmed.startsWith('showdar-') ? trimmed : `showdar-${trimmed}`;
63
92
  const skill = getSkill(canonical);
64
93
  if (!skill) {
65
- const known = SKILLS.map((s) => s.id.replace(/^showdar-/, '')).join(', ');
94
+ const known = ALL_SKILLS.map((s) => s.id.replace(/^showdar-/, '')).join(', ');
66
95
  throw new Error(`Unknown skill "${name}". Available skills: ${known}`);
67
96
  }
68
97
  return skill.id;
package/src/project.js CHANGED
@@ -71,6 +71,10 @@ function managedBlock(skillIds) {
71
71
  ['plan QA scenarios, risk coverage, regression, compatibility, or bug evidence', 'showdar-quality'],
72
72
  ['assess threats, attack surface, trust boundaries, auth, secrets, exposure, or exploitability', 'showdar-security'],
73
73
  ['inspect or change CI/CD, containers, environments, deployment, observability, rollback, or runtime operations', 'showdar-ops'],
74
+ ['implement a complete feature end-to-end across multiple lifecycle stages', 'showdar-feature'],
75
+ ['resolve an observed defect end-to-end', 'showdar-bugfix'],
76
+ ['prepare, validate, or execute a release lifecycle', 'showdar-release'],
77
+ ['investigate or recover from an active operational incident', 'showdar-incident'],
74
78
  ].filter(([, id]) => skillIds.includes(id));
75
79
  const lines = routes.map(([intent, skill]) => `- ${intent} -> \`${skill}\``).join('\n');
76
80
  return `${START}\n## Showdar Skills routing\n\nUse the smallest Showdar skill that fully matches the current task. Do not load unrelated Showdar skills.\n\n${lines}\n\nFor debugging, gather evidence before modifying code. For shipping or destructive operations, require explicit user approval and fresh verification. Never print or commit secrets.\n${END}`;
package/src/validate.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { access, readFile, readdir } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { spawnSync } from 'node:child_process';
4
- import { SKILLS, PROFILES } from './catalog.js';
4
+ import { ALL_SKILLS, PRIMITIVE_COUNT, SKILLS, PROFILES, TOTAL_COUNT, WORKFLOW_COUNT, WORKFLOW_SKILLS } from './catalog.js';
5
5
  import { validateCapabilities } from './capabilities.js';
6
6
  import { CANONICAL_RUNTIME_FILE, VENDORED_RUNTIME_FILES } from './runtime.js';
7
7
  import { parseCsv } from '../engine/csv.mjs';
@@ -224,18 +224,36 @@ async function validateCsvFiles(skillDir, errors) {
224
224
  export async function validateRepository(packageRoot) {
225
225
  const errors = [];
226
226
  const warnings = [];
227
- const known = new Set(SKILLS.map((skill) => skill.id));
227
+ const known = new Set(ALL_SKILLS.map((skill) => skill.id));
228
+ const primitives = new Set(SKILLS.map((skill) => skill.id));
228
229
  const skillsRoot = path.join(packageRoot, 'skills');
229
230
 
231
+ if (SKILLS.length !== PRIMITIVE_COUNT || PRIMITIVE_COUNT !== 15) errors.push(`primitive skill count must remain 15 (found ${SKILLS.length})`);
232
+ if (WORKFLOW_SKILLS.length !== WORKFLOW_COUNT || WORKFLOW_COUNT !== 4) errors.push(`workflow skill count must be 4 (found ${WORKFLOW_SKILLS.length})`);
233
+ if (ALL_SKILLS.length !== TOTAL_COUNT || TOTAL_COUNT !== 19) errors.push(`total installable skill count must be 19 (found ${ALL_SKILLS.length})`);
234
+
230
235
  for (const error of validateCapabilities().errors) errors.push(`capabilities: ${error}`);
231
236
 
232
- for (const skill of SKILLS) {
237
+ for (const skill of ALL_SKILLS) {
233
238
  const dir = path.join(skillsRoot, skill.id);
234
239
  const result = await validateSkillDirectory(dir);
235
240
  for (const error of result.errors) errors.push(`${skill.id}: ${error}`);
236
241
  warnings.push(...result.warnings.map((warning) => `${skill.id}: ${warning}`));
237
242
  }
238
243
 
244
+ const primitiveIds = new Set(SKILLS.map((skill) => skill.id));
245
+ for (const workflow of WORKFLOW_SKILLS) {
246
+ if (!Array.isArray(workflow.stages) || !workflow.stages.length) {
247
+ errors.push(`${workflow.id}: workflow declares no candidate stages`);
248
+ continue;
249
+ }
250
+ for (const stage of workflow.stages) {
251
+ if (!primitiveIds.has(stage)) errors.push(`${workflow.id}: references unknown primitive stage ${stage}`);
252
+ if (stage === workflow.id) errors.push(`${workflow.id}: must not reference itself as a stage`);
253
+ }
254
+ if (new Set(workflow.stages).size !== workflow.stages.length) errors.push(`${workflow.id}: candidate stages contain duplicates`);
255
+ }
256
+
239
257
  let canonicalRuntime;
240
258
  try {
241
259
  canonicalRuntime = await readFile(path.join(packageRoot, CANONICAL_RUNTIME_FILE));
@@ -263,6 +281,7 @@ export async function validateRepository(packageRoot) {
263
281
  const seen = new Set();
264
282
  for (const id of ids) {
265
283
  if (!known.has(id)) errors.push(`profile ${profile} references unknown skill ${id}`);
284
+ if (!primitives.has(id)) errors.push(`profile ${profile} must reference only primitive skills (found ${id})`);
266
285
  if (seen.has(id)) errors.push(`profile ${profile} duplicates skill ${id}`);
267
286
  seen.add(id);
268
287
  }