@vegastack/vegafactory 0.19.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 (170) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +417 -0
  3. package/dist/dashboard-artifact.json +21240 -0
  4. package/dist/index.js +22752 -0
  5. package/dist/run-wrapper.js +377 -0
  6. package/package.json +46 -0
  7. package/skill/dev-architect/SKILL.md +106 -0
  8. package/skill/dev-architect/agents/openai.yaml +4 -0
  9. package/skill/dev-architect/references/ai-agents.md +96 -0
  10. package/skill/dev-architect/references/conventions.md +113 -0
  11. package/skill/dev-architect/references/data.md +89 -0
  12. package/skill/dev-architect/references/infra.md +99 -0
  13. package/skill/dev-architect/references/mobile.md +75 -0
  14. package/skill/dev-architect/references/pinned-facts.md +133 -0
  15. package/skill/dev-architect/references/principles.md +117 -0
  16. package/skill/dev-architect/references/security.md +90 -0
  17. package/skill/dev-architect/references/stack.md +38 -0
  18. package/skill/dev-architect/references/web.md +102 -0
  19. package/skill/dev-architect/refresh/REFRESH.md +31 -0
  20. package/skill/dev-architect/refresh/sources.json +239 -0
  21. package/skill/dev-chronicle/SKILL.md +52 -0
  22. package/skill/dev-chronicle/agents/openai.yaml +4 -0
  23. package/skill/dev-chronicle/references/conventions.md +113 -0
  24. package/skill/dev-chronicle/references/styles.md +75 -0
  25. package/skill/dev-chronicle/refresh/REFRESH.md +3 -0
  26. package/skill/dev-chronicle/refresh/sources.json +6 -0
  27. package/skill/dev-debug/SKILL.md +43 -0
  28. package/skill/dev-debug/agents/openai.yaml +4 -0
  29. package/skill/dev-debug/references/conventions.md +113 -0
  30. package/skill/dev-debug/references/loop-ladder.md +20 -0
  31. package/skill/dev-debug/refresh/REFRESH.md +3 -0
  32. package/skill/dev-debug/refresh/sources.json +6 -0
  33. package/skill/dev-implement/SKILL.md +81 -0
  34. package/skill/dev-implement/agents/openai.yaml +4 -0
  35. package/skill/dev-implement/assets/workflows/implement-children.js +12 -0
  36. package/skill/dev-implement/references/ask-route.md +80 -0
  37. package/skill/dev-implement/references/changelog-and-chronicle.md +21 -0
  38. package/skill/dev-implement/references/conventions.md +113 -0
  39. package/skill/dev-implement/references/ledger-and-resume.md +52 -0
  40. package/skill/dev-implement/references/parallel-children.md +35 -0
  41. package/skill/dev-implement/references/worktrees.md +63 -0
  42. package/skill/dev-implement/refresh/REFRESH.md +3 -0
  43. package/skill/dev-implement/refresh/sources.json +6 -0
  44. package/skill/dev-implement/scripts/children.mjs +479 -0
  45. package/skill/dev-implement/scripts/effective-policy.mjs +694 -0
  46. package/skill/dev-implement/scripts/evidence-check.mjs +107 -0
  47. package/skill/dev-implement/scripts/evidence-upload.mjs +181 -0
  48. package/skill/dev-implement/scripts/learning.mjs +41 -0
  49. package/skill/dev-implement/scripts/lib/approval.mjs +1182 -0
  50. package/skill/dev-implement/scripts/lib/gh.mjs +101 -0
  51. package/skill/dev-implement/scripts/preflight.mjs +153 -0
  52. package/skill/dev-implement/scripts/questions.mjs +381 -0
  53. package/skill/dev-implement/scripts/reclaim.mjs +116 -0
  54. package/skill/dev-implement/scripts/recovery.mjs +213 -0
  55. package/skill/dev-implement/scripts/worktree.mjs +991 -0
  56. package/skill/dev-intake/SKILL.md +80 -0
  57. package/skill/dev-intake/agents/openai.yaml +4 -0
  58. package/skill/dev-intake/references/ask-route.md +80 -0
  59. package/skill/dev-intake/references/brief-template.md +89 -0
  60. package/skill/dev-intake/references/conventions.md +113 -0
  61. package/skill/dev-intake/refresh/REFRESH.md +3 -0
  62. package/skill/dev-intake/refresh/sources.json +6 -0
  63. package/skill/dev-intake/scripts/brief-lint.mjs +87 -0
  64. package/skill/dev-intake/scripts/lib/approval.mjs +1182 -0
  65. package/skill/dev-intake/scripts/questions.mjs +381 -0
  66. package/skill/dev-plan/SKILL.md +54 -0
  67. package/skill/dev-plan/agents/openai.yaml +4 -0
  68. package/skill/dev-plan/references/ask-route.md +80 -0
  69. package/skill/dev-plan/references/conventions.md +113 -0
  70. package/skill/dev-plan/references/plan-format.md +82 -0
  71. package/skill/dev-plan/refresh/REFRESH.md +3 -0
  72. package/skill/dev-plan/refresh/sources.json +6 -0
  73. package/skill/dev-plan/scripts/lib/approval.mjs +1182 -0
  74. package/skill/dev-plan/scripts/plan-lint.mjs +319 -0
  75. package/skill/dev-plan/scripts/questions.mjs +381 -0
  76. package/skill/dev-review/SKILL.md +76 -0
  77. package/skill/dev-review/agents/openai.yaml +4 -0
  78. package/skill/dev-review/assets/review-known-patterns.md.template +32 -0
  79. package/skill/dev-review/references/conventions.md +113 -0
  80. package/skill/dev-review/references/cross-agent.md +39 -0
  81. package/skill/dev-review/references/dispatch-prompts.md +121 -0
  82. package/skill/dev-review/references/security-axis.md +45 -0
  83. package/skill/dev-review/refresh/REFRESH.md +5 -0
  84. package/skill/dev-review/refresh/sources.json +6 -0
  85. package/skill/dev-setup/SKILL.md +113 -0
  86. package/skill/dev-setup/agents/openai.yaml +4 -0
  87. package/skill/dev-setup/assets/agents-section.md.template +24 -0
  88. package/skill/dev-setup/assets/dev-profile.md.template +102 -0
  89. package/skill/dev-setup/assets/factory-board.yml.template +162 -0
  90. package/skill/dev-setup/assets/hooks/decision-nudge.mjs +30 -0
  91. package/skill/dev-setup/assets/hooks/prompt-skill-mention.mjs +29 -0
  92. package/skill/dev-setup/assets/hooks/session-end.mjs +14 -0
  93. package/skill/dev-setup/assets/hooks/session-start.mjs +178 -0
  94. package/skill/dev-setup/assets/hooks/ship-guard.mjs +738 -0
  95. package/skill/dev-setup/assets/hooks/skill-activated.mjs +47 -0
  96. package/skill/dev-setup/assets/hooks/stop-heartbeat.mjs +14 -0
  97. package/skill/dev-setup/assets/workflows/implement-children.js +12 -0
  98. package/skill/dev-setup/references/ask-route.md +80 -0
  99. package/skill/dev-setup/references/conventions.md +113 -0
  100. package/skill/dev-setup/references/github-app.md +286 -0
  101. package/skill/dev-setup/references/harness-facts.md +169 -0
  102. package/skill/dev-setup/references/stack-playbooks.md +124 -0
  103. package/skill/dev-setup/refresh/REFRESH.md +13 -0
  104. package/skill/dev-setup/refresh/sources.json +602 -0
  105. package/skill/dev-setup/scripts/effective-policy.mjs +694 -0
  106. package/skill/dev-setup/scripts/questions.mjs +381 -0
  107. package/skill/dev-setup/scripts/ship-policy.mjs +195 -0
  108. package/skill/dev-ship/SKILL.md +56 -0
  109. package/skill/dev-ship/agents/openai.yaml +4 -0
  110. package/skill/dev-ship/references/conventions.md +113 -0
  111. package/skill/dev-ship/references/runbook.md +72 -0
  112. package/skill/dev-ship/refresh/REFRESH.md +3 -0
  113. package/skill/dev-ship/refresh/sources.json +6 -0
  114. package/skill/dev-ship/scripts/lib/approval.mjs +1182 -0
  115. package/skill/dev-ship/scripts/ship-gate.mjs +485 -0
  116. package/skill/dev-status/SKILL.md +56 -0
  117. package/skill/dev-status/agents/openai.yaml +4 -0
  118. package/skill/dev-status/references/conventions.md +113 -0
  119. package/skill/dev-status/refresh/REFRESH.md +3 -0
  120. package/skill/dev-status/refresh/sources.json +6 -0
  121. package/skill/dev-status/scripts/effective-policy.mjs +694 -0
  122. package/skill/dev-status/scripts/status.mjs +311 -0
  123. package/skill/skill-maintainer/SKILL.md +82 -0
  124. package/skill/skill-maintainer/agents/openai.yaml +4 -0
  125. package/skill/skill-maintainer/references/release-ops.md +61 -0
  126. package/skill/skill-maintainer/references/standards.md +137 -0
  127. package/skill/skill-maintainer/refresh/REFRESH.md +40 -0
  128. package/skill/skill-maintainer/refresh/sources.json +103 -0
  129. package/skill/skill-scan/SKILL.md +59 -0
  130. package/skill/skill-scan/agents/openai.yaml +4 -0
  131. package/skill/skill-scan/refresh/REFRESH.md +18 -0
  132. package/skill/skill-scan/refresh/sources.json +133 -0
  133. package/skill/skill-scan/scripts/lib/skillspector.mjs +226 -0
  134. package/skill/skill-scan/scripts/skill-scan.mjs +1002 -0
  135. package/skill/skillify/SKILL.md +108 -0
  136. package/skill/skillify/agents/openai.yaml +4 -0
  137. package/skill/skillify/assets/templates/README.md.template +26 -0
  138. package/skill/skillify/assets/templates/REFRESH.md.template +16 -0
  139. package/skill/skillify/assets/templates/SKILL.md.template +27 -0
  140. package/skill/skillify/assets/templates/evals.json.template +12 -0
  141. package/skill/skillify/assets/templates/openai.yaml.template +4 -0
  142. package/skill/skillify/assets/templates/skill.test.ts.template +27 -0
  143. package/skill/skillify/assets/templates/sources.json.template +6 -0
  144. package/skill/skillify/assets/templates/trigger-queries.json.template +1 -0
  145. package/skill/skillify/references/authoring.md +103 -0
  146. package/skill/skillify/references/eval-playbook.md +112 -0
  147. package/skill/skillify/refresh/REFRESH.md +23 -0
  148. package/skill/skillify/refresh/sources.json +6 -0
  149. package/skill/skillify/scripts/scaffold-skill.mjs +334 -0
  150. package/skill/skillify/scripts/trigger-check.mjs +209 -0
  151. package/skill/vegafactory-setup/SKILL.md +77 -0
  152. package/skill/vegafactory-setup/agents/openai.yaml +4 -0
  153. package/skill/vegafactory-setup/assets/control-room/boards.md.template +17 -0
  154. package/skill/vegafactory-setup/assets/control-room/decisions.md.template +5 -0
  155. package/skill/vegafactory-setup/assets/control-room/group.md.template +44 -0
  156. package/skill/vegafactory-setup/assets/control-room/onboarding/dispatcher-box.md.template +86 -0
  157. package/skill/vegafactory-setup/assets/control-room/onboarding/new-repo.md.template +13 -0
  158. package/skill/vegafactory-setup/assets/control-room/onboarding/new-teammate.md.template +12 -0
  159. package/skill/vegafactory-setup/assets/control-room/org.md.template +60 -0
  160. package/skill/vegafactory-setup/assets/control-room/people.csv.template +2 -0
  161. package/skill/vegafactory-setup/assets/control-room/repos.md.template +7 -0
  162. package/skill/vegafactory-setup/assets/control-room/rules/CODEOWNERS.template +6 -0
  163. package/skill/vegafactory-setup/assets/control-room/rules/README.md.template +9 -0
  164. package/skill/vegafactory-setup/assets/control-room/rules/stats-privacy.md.template +44 -0
  165. package/skill/vegafactory-setup/assets/control-room/templates/README.md.template +9 -0
  166. package/skill/vegafactory-setup/references/control-room.md +149 -0
  167. package/skill/vegafactory-setup/references/conventions.md +113 -0
  168. package/skill/vegafactory-setup/refresh/REFRESH.md +5 -0
  169. package/skill/vegafactory-setup/refresh/sources.json +6 -0
  170. package/skill-integrity.json +252 -0
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: skillify
3
+ description: Repo-local skill factory and auditor for the vegafactory monorepo. Use when asked to "skillify this", "make this a skill", "turn this workflow into a skill", or scaffold a new skill under skills/; when asked to "audit this skill", "is this skill complete", "check skill completeness", or score a skill against the repo contract; when deciding whether a workflow, script, or prompt should become a skill at all; when a skill description under- or over-triggers and needs tuning; or when a skill in this repo is missing tests, a README, a refresh contract, behavioral eval evidence, or repo wiring. Only for skills inside this repository, not for authoring skills in other projects or installing third-party skills.
4
+ ---
5
+
6
+ # Skillify
7
+
8
+ Turn a raw workflow into a properly-skilled unit of this monorepo, or audit an existing skill against the repo contract in CONTRIBUTING.md. skill-maintainer is the nearest neighbour: it owns the standards and the repo and release operations (what must be true); skillify owns the procedure (how a skill gets there) and cites those standards rather than restating them.
9
+
10
+ ## The contract checklist
11
+
12
+ Score every item pass / fail / N/A; N/A without a one-line rationale is a fail, and a justified N/A counts as a pass in the `<passed>/8` score. "The evidence" below is the audit report or the issue's evidence comment. skill-maintainer lives at `skills/repo-tooling/skill-maintainer/`. Numbering is stable and additive, so other skills can cite "skillify item 6".
13
+
14
+ 1. **SKILL.md spec-compliant** — frontmatter, name grammar, description limits, and body syntax per skill-maintainer's standards (operating rules 2–6); body ≤1,200 words with detail routed to references, or a named exception in the evidence; `node packages/cli/scripts/validate-skill.mjs <skill-dir>` (the check `bun run validate:skill` runs over every skill) agrees, and it also verifies every relative link in the skill's prose resolves. Body words: the text below the frontmatter, `wc -w`.
15
+ 2. **Description triggers well** — states triggering conditions only (never the workflow), shaped per [authoring](references/authoring.md), the standard being skill-maintainer's rule 4; a query set of realistic positives and near-miss negatives at `tests/fixtures/trigger-queries.json`, `ambiguous_with` naming the competing skill. `scripts/trigger-check.mjs` (`validate:triggers` in `bun run check`) blocks when two fixtures claim one query without naming each other.
16
+ 3. **Sharp boundary** — the SKILL.md body names its nearest-neighbor skill and the one-sentence axis of difference (or states it has none). Two skills answering the same trigger get merged, not shipped.
17
+ 4. **References routed** — `references/` holds detail only some invocations need, behind a routing table; SKILL.md keeps the workflow, one excellent example, and the routes. N/A for a self-contained skill.
18
+ 5. **Scripts deterministic and tested** — bundled scripts follow the conventions in [authoring](references/authoring.md) (dependency-free Node, `--json`, documented exit codes, dry-run default, atomic writes); unit tests cover every deterministic branch. N/A when the skill ships no scripts — its quality bar is item 6.
19
+ 6. **Behavioral eval passed** — the cases in `evals/evals.json` run with-skill vs baseline per the [eval playbook](references/eval-playbook.md), at most 3 improve cycles; pass, or ship with a KNOWN_GAPS section in the skill's README.
20
+ 7. **Freshness honest** — volatile facts live in refresh-tracked files, never in SKILL.md; a skill with none states the evergreen waiver in `refresh/REFRESH.md`.
21
+ 8. **Wired and green** — README, `agents/openai.yaml`, packaging entry, root README row, and changeset in place; `bun run check` passes.
22
+
23
+ **Verdict:** all pass → `properly skilled`. At most two misses, neither item 1 nor item 6 → `close — create: <missing items>`. Otherwise → `needs skillify — run skillify on <target>`.
24
+
25
+ ## Phase 0 — Should this be a skill?
26
+
27
+ - Will it be invoked 2+ times?
28
+ - Is there more than ~20 lines of logic or judgment?
29
+ - Is there a trigger phrase a user would actually say?
30
+
31
+ Any no means a script or doc, not a skill: say why and stop.
32
+
33
+ Then search the existing skills: if one nearly covers the intent, merge into it — a neighbor splitting a trigger family makes both trigger worse.
34
+
35
+ **One skill = one capability = one coherent trigger family.** When the target spans intents users would invoke separately ("run the build", "roll back the deploy", "notify the team"), propose the split and ask which to skillify first.
36
+
37
+ ## Phase 1 — Audit
38
+
39
+ For an existing skill, score the checklist against the tree and stop with the verdict:
40
+
41
+ ```
42
+ Skill: <name> Path: skills/<name>/ | skills/<group>/<name>/
43
+ Score: <passed>/8 Verdict: <verdict>
44
+ Missing: <item>: <one-line evidence> ...
45
+ ```
46
+
47
+ A new skill is 0/8 — proceed. When the request was only an audit, deliver the verdict and the shortest path to `properly skilled`; editing waits for the ask.
48
+
49
+ ## Phase 2 — Elicit requirements
50
+
51
+ Interview, skipping questions the conversation already answers:
52
+
53
+ - **Triggers:** what exact phrases should invoke this? What near-miss requests should NOT? Which existing skill is the nearest neighbor?
54
+ - **Output:** what does done look like: files, report shape, side effects?
55
+ - **Edge cases:** empty input, missing config, offline, partial state.
56
+ - **Existing behavior:** code or prose to absorb? What did its author correct over time?
57
+
58
+ Mark every volatile fact the skill will state — version pins, model names, numeric limits, dated claims; those go to refresh-tracked files (item 7), or the skill takes the evergreen waiver.
59
+
60
+ ## Phase 3 — Scaffold and write
61
+
62
+ Scaffold (dry run by default; `--write` creates; `--json` for machines):
63
+
64
+ ```sh
65
+ node <skill-dir>/scripts/scaffold-skill.mjs <name> --dir <repo-root> [--write]
66
+ ```
67
+
68
+ The scaffolder validates the name, refuses existing directories and symlinks, stages then renames, and performs the repo wiring itself; its dry-run output lists every refusal and wiring action, so read that rather than this file. Then write, in order:
69
+
70
+ 1. *Description + trigger query set* — the description per [authoring](references/authoring.md); the query set with near-miss negatives in `tests/fixtures/trigger-queries.json`.
71
+ 2. *SKILL.md body* — workflow, one excellent example, the nearest-neighbour boundary line, routing table; limits per skill-maintainer's standards, style per [authoring](references/authoring.md).
72
+ 3. *References* — detail only some invocations need.
73
+ 4. *Scripts* — deterministic, repeated work only (criteria in [authoring](references/authoring.md)).
74
+
75
+ ## Phase 4 — Behavioral eval — the quality gate
76
+
77
+ Cases live in `evals/evals.json` (agentskills.io format: 2–3 realistic prompts, one boundary case, assertions added after the first run). Run them per the [eval playbook](references/eval-playbook.md): on Claude Code, `claude plugin eval <skill-dir> --ablation with-without --runs 3 --max-cost-usd <n> --threshold <t> --json`, results under `<skill>/evals/results/<timestamp>/` (gitignored); on every harness, the with-skill vs baseline subagent procedure on the same cases, writing the same result files. Workflow skills add the sandbox drill as their end-to-end proof.
78
+
79
+ At most 3 cycles: eval → apply the top improvements → re-eval; pass, or ship with a KNOWN_GAPS section. If the baseline matches the with-skill output, the skill is not earning its tokens — cut or narrow it.
80
+
81
+ ## Phase 5 — Lock in
82
+
83
+ 1. Unit tests and fixtures for the deterministic branches of any bundled scripts; a prose-only skill keeps just its trigger-query fixture.
84
+ 2. `refresh/sources.json` + `refresh/REFRESH.md` for the volatile facts marked in Phase 2, or the evergreen waiver.
85
+ 3. Finish `README.md`, `agents/openai.yaml`, and the scaffolder's wiring TODOs (README row, changeset per dev-implement's changelog rule).
86
+
87
+ ## Phase 6 — Verify
88
+
89
+ ```sh
90
+ node packages/cli/scripts/validate-skill.mjs <skill-dir>
91
+ bun test <skill-dir>
92
+ node packages/cli/scripts/structure.mjs check
93
+ bun run check
94
+ ```
95
+
96
+ Re-score the checklist and report `<passed>/8` with the verdict; anything below `properly skilled` ships only with named gaps.
97
+
98
+ ## Routing
99
+
100
+ | Need | Read |
101
+ |---|---|
102
+ | description engineering, writing style, token economy, scripts vs instructions, volatile facts | [authoring](references/authoring.md) |
103
+ | a walkthrough of one skillification | [authoring — worked example](references/authoring.md) |
104
+ | failure patterns to check a draft against | [authoring — anti-patterns](references/authoring.md) |
105
+ | eval method, pass criteria, trigger-query doctrine, workflow drills, cycles, KNOWN_GAPS, model guidance | [eval playbook](references/eval-playbook.md) |
106
+ | name, description, body limits; listing budgets; portability; release and rename mechanics | the `skill-maintainer` skill |
107
+ | the scaffolded starting points | `assets/templates/` |
108
+ | skillify's freshness stance | [refresh/REFRESH.md](refresh/REFRESH.md) |
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "VegaStack Skillify"
3
+ short_description: "Create and audit skills for the vegafactory repo"
4
+ default_prompt: "Use $skillify to audit or scaffold a skill in skills/ against the full repo contract."
@@ -0,0 +1,26 @@
1
+ # {{name}}
2
+
3
+ TODO: one-paragraph summary for humans and agents browsing the repo. The agent entry point is [SKILL.md](SKILL.md); everything else loads progressively from there.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npx @vegastack/vegafactory skills add {{name}} --global
9
+ ```
10
+ {{groupInstallBlock}}
11
+ `--global` installs into your home directory, where the skill is available in every project; drop it for a project-local install.
12
+
13
+ ## What's in this skill
14
+
15
+ | Path | Purpose |
16
+ |---|---|
17
+ | [SKILL.md](SKILL.md) | Agent entry point |
18
+ | [agents/openai.yaml](agents/openai.yaml) | Codex interface metadata |
19
+ | [refresh/REFRESH.md](refresh/REFRESH.md) | Freshness contract |
20
+ | [refresh/sources.json](refresh/sources.json) | Source registry for volatile claims |
21
+ | `tests/` | Bun tests and fixtures (never packaged) |
22
+ | `evals/` | Behavioral evals in the agentskills.io format (never packaged) |
23
+
24
+ ## Behavior
25
+
26
+ TODO: what the skill does when invoked, its output contract, and its guardrails.
@@ -0,0 +1,16 @@
1
+ # Refresh contract — {{name}}
2
+
3
+ Instructions for the scheduled refresh agent (and any human running a manual refresh). This file plus `sources.json` is the complete freshness contract for this skill.
4
+
5
+ ## What this skill claims
6
+
7
+ TODO: apply the volatile-facts rule (skillify references/authoring.md) before shipping:
8
+
9
+ - **Durable rules**: versionless principles in this skill's prose. The refresh agent NEVER edits these; if a source change invalidates one, open an issue quoting the evidence.
10
+ - **Volatile facts**: version pins, model names, numeric vendor limits, URLs, dated claims. Each lives in a refresh-tracked file named here, evidenced by a `sources.json` entry. A sentence leaning on one vendor mechanism may be marked `<!-- source: SOURCE-ID -->`.
11
+
12
+ TODO: name the refresh-tracked files and the sections the refresh agent may edit.
13
+
14
+ ## Evergreen waiver
15
+
16
+ TODO: if this skill states no volatile facts, replace everything above with one line — "Evergreen: this skill asserts no version pins, vendor mechanism names, numeric vendor limits, or dated facts. Revisit if a future edit introduces any." — and keep `sources: []`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: {{name}}
3
+ description: TODO - state only the conditions that should load this skill. Third person, trigger phrases in quotes first, symptoms and situations next, one clause naming what this skill is NOT for. Never summarize the workflow. Max 1024 characters, no angle brackets.
4
+ ---
5
+
6
+ # {{name}}
7
+
8
+ TODO: one-paragraph overview - what this skill guarantees and the single trigger family it serves.
9
+
10
+ ## When to use
11
+
12
+ - TODO: concrete situations and user phrasings
13
+ - TODO: when NOT to use - the nearest adjacent intent and where it goes instead
14
+ - Nearest neighbor: TODO - name the closest existing skill and the one-sentence axis of difference (or state that none exists)
15
+
16
+ ## Workflow
17
+
18
+ 1. TODO
19
+ 2. TODO
20
+
21
+ ## Example
22
+
23
+ TODO: one excellent, realistic example (input and output). One great example beats five mediocre ones.
24
+
25
+ ## Routing
26
+
27
+ TODO: if this skill has references/, add a routing table (Need | Read) here; otherwise delete this section and record item 4 as N-A in the checklist with a rationale.
@@ -0,0 +1,12 @@
1
+ {
2
+ "skill_name": "{{name}}",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "TODO: a realistic prompt a user would type — file paths, backstory, the hardest documented case",
7
+ "expected_output": "TODO: what success looks like, one human-readable sentence",
8
+ "files": [],
9
+ "assertions": []
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "{{name}}"
3
+ short_description: "TODO: imperative, under 60 characters"
4
+ default_prompt: "Use ${{name}} to TODO."
@@ -0,0 +1,27 @@
1
+ import { describe, expect, test } from 'bun:test'
2
+ import { readFileSync } from 'node:fs'
3
+ import { join, resolve } from 'node:path'
4
+ import { validateSkill } from '{{validatorPath}}'
5
+
6
+ const skillRoot = resolve(import.meta.dir, '..')
7
+
8
+ describe('{{name}} contract', () => {
9
+ test('SKILL.md passes repo validation', () => {
10
+ const result = validateSkill(skillRoot)
11
+ expect(result.message).toBe('Skill is valid!')
12
+ expect(result.ok).toBe(true)
13
+ })
14
+
15
+ test('trigger query fixture is a small hard set with near-miss negatives', () => {
16
+ const queries = JSON.parse(readFileSync(join(skillRoot, 'tests/fixtures/trigger-queries.json'), 'utf8'))
17
+ const positives = queries.filter((entry: { should_trigger: boolean }) => entry.should_trigger)
18
+ const negatives = queries.filter((entry: { should_trigger: boolean }) => !entry.should_trigger)
19
+ expect(positives.length).toBeGreaterThanOrEqual(5)
20
+ expect(negatives.length).toBeGreaterThanOrEqual(4)
21
+ for (const entry of queries) expect(typeof entry.query).toBe('string')
22
+ })
23
+
24
+ // TODO: if this skill ships scripts/, add unit tests for every deterministic
25
+ // branch. A prose-only skill needs nothing more here - its quality bar is the
26
+ // behavioral eval of skillify Phase 4, which runs BEFORE tests lock anything in.
27
+ })
@@ -0,0 +1,6 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "retrievalBaseline": "{{date}}",
4
+ "note": "TODO: add one entry per volatile external fact this skill states (see skillify references/authoring.md, volatile facts), or record the one-line evergreen waiver in REFRESH.md and keep sources empty.",
5
+ "sources": []
6
+ }
@@ -0,0 +1,103 @@
1
+ # Authoring reference
2
+
3
+ Rules for writing the parts of a skill that determine whether it triggers, how much it costs, and whether it stays true over time.
4
+
5
+ ## Description engineering
6
+
7
+ The description is the primary triggering mechanism: it is always in context, and the agent decides from it alone whether to load the body.
8
+
9
+ - **Triggering conditions only — never the workflow.** A description that summarizes the process becomes a shortcut: agents follow the summary and skip the body. State when to load the skill, not what the skill will do step by step.
10
+ - **Calm conditionals.** Write the trigger as "Use when …" with the phrasings users type and one "Not for …" clause — the standard and its reason are skill-maintainer's operating rule 4; this file only shows the shape.
11
+ - **Third person.** The text is injected into a system prompt ("Creates and audits...", "Use when..."), never "I can help you...".
12
+ - **Front-load trigger words.** Harness skill lists truncate long descriptions; the first clause must carry the strongest triggers.
13
+ - **Cover the ways users actually ask.** Exact phrases in quotes, symptoms, file types, adjacent phrasings, casual variants. Include the situations where the skill competes with a neighbor and should win.
14
+ - **Name the boundary.** One clause on what the skill is NOT for prevents over-triggering ("Only for skills inside this repository...").
15
+ - **No angle brackets** — the repo validator rejects them.
16
+ - **No `#` after a space.** The description is an unquoted YAML scalar, and real harness parsers treat ` #` as a comment start — everything after it silently vanishes from the skill listing. Write "issue 12", never "issue #12"; the repo validator rejects it.
17
+
18
+ Bad: `Helps with skills.` (no triggers, no boundary)
19
+ Bad: `Audits a skill by scoring checklist items, then scaffolds, evals, and wires it.` (workflow summary — the body will be skipped)
20
+ Good: `Use when asked to "skillify this", "make this a skill", audit a skill's completeness, or decide whether a workflow should become a skill. Only for skills inside this repository.`
21
+
22
+ ## Writing style
23
+
24
+ Rules for the prose itself — they exist because agents pay attention (and tokens) for every sentence, and because rule corpora rot in predictable ways:
25
+
26
+ - **Prompt the positive.** Steering by prohibition drags the forbidden behavior into context and invites a wall of NEVERs that only ever grows. State the rule you want followed, once, with the reason it matters. Reserve negation for genuinely dangerous acts.
27
+ - **Explain why, not ALL-CAPS what.** Modern models have good theory of mind; a rule with its reason generalizes, a bare MUST gets pattern-matched and misapplied. Reaching for caps or bold on every rule is a sign the rule needs a reason, not emphasis.
28
+ - **Hunt no-ops and sediment.** A no-op is an instruction the model already obeys by default — it pays load to say nothing. Sediment is case law: a clause added for one past failure that never gets removed. When a failure exposes a gap, rewrite the existing rule in place; do not append an exception. Prune by deleting whole sentences, not trimming words.
29
+ - **Budget the body.** Target 50–150 lines for a SKILL.md; treat 300 as the ceiling (the spec's 500 is a far bound, not a budget). One great example beats five mediocre ones. Anything only some invocations need goes behind a routed reference.
30
+ - **Name the nearest neighbor.** One sentence in the body stating which existing skill is closest and the axis of difference. It keeps trigger families sharp better than any linter, and forces the merge conversation before a near-duplicate ships.
31
+
32
+ ## Numeric limits
33
+
34
+ The numbers — name and description limits, body ceiling, and the Claude Code, Codex, and Hermes listing budgets — live in one place: skill-maintainer's Hard limits table, mirrored from the marked sentences in its references/standards.md and refreshed through its registry. Cite them per skill-maintainer's standards; a second copy here drifted once and would again.
35
+
36
+ ## Trigger query sets
37
+
38
+ Every skill ships `tests/fixtures/trigger-queries.json`: an array of `{"query": "...", "should_trigger": true|false}`, with an optional `"ambiguous_with": ["skill-name"]` on entries where a neighboring skill competes for the query.
39
+
40
+ - About 10 queries total: 5–6 should-trigger, 4–5 should-NOT-trigger. A small set of hard queries beats a long set of easy ones.
41
+ - Should-trigger: different phrasings of the same intent — formal, casual, typo-ridden; cases that never name the skill but clearly need it; at least one `ambiguous_with` case this skill should win against its nearest neighbor.
42
+ - Should-NOT-trigger: **near-misses only.** Queries sharing keywords or domain with the skill but needing something else — adjacent intents, ambiguous phrasing a naive keyword match would catch. "Write a fibonacci function" as a negative for a PDF skill tests nothing.
43
+ - Queries must be realistic: concrete detail, file paths, a little backstory — what a user would actually type, not abstract category labels.
44
+
45
+ The set is both a design artifact (it forces the description to draw a real boundary) and eval input (see the [eval playbook](eval-playbook.md)).
46
+
47
+ ## Token economy
48
+
49
+ Three loading levels; spend accordingly:
50
+
51
+ 1. **Metadata (name + description)** — in every conversation, always. ~100 tokens. Every word must earn its place.
52
+ 2. **SKILL.md body** — loaded on every trigger. Keep the workflow, one excellent example, and a routing table; push everything else down a level. One great example beats five mediocre ones.
53
+ 3. **references/ / scripts/ / assets/** — loaded or executed on demand; effectively unlimited, but give each reference a clear routing condition so agents read only what the task needs.
54
+
55
+ Cross-reference other skills by name (`skill-maintainer`) instead of restating their content. Don't document a script's flags in prose beyond what routing needs — the script's own `--help`/usage error is the source of truth.
56
+
57
+ ## Scripts vs instructions
58
+
59
+ **Deterministic and repeated → script. Judgment → instructions.**
60
+
61
+ - If two invocations with the same input must produce the same bytes, that is a script.
62
+ - Watch eval/test transcripts for agents independently rewriting the same helper — three subagents each writing their own `parse_frontmatter` is a strong signal the skill should bundle that script once.
63
+ - Repo conventions for bundled scripts: dependency-free Node (`.mjs`), runnable from the skill dir with plain relative paths, `--json` for machine-readable output, documented exit codes (0 ok / 1 finding-or-refusal / 2 usage), atomic writes (stage then rename), symlink refusal, and an explicit `--write` gate for anything mutating — dry-run is the default.
64
+ - Do NOT script judgment: descriptions, verdicts, review prose. A script that fakes judgment produces confident garbage.
65
+
66
+ ## Volatile facts and refresh
67
+
68
+ One rule: **version pins, model names, numeric limits, URLs, and anything with a date live in refresh-tracked files — never inline in SKILL.md.** Everything else is plain prose that refresh automation never touches.
69
+
70
+ A volatile fact gets a `refresh/sources.json` entry (URL, checksum, threshold) and lives in a section the REFRESH.md names as editable; marking an individual sentence `<!-- source: SOURCE-ID -->` remains available when a durable rule leans on one vendor-named mechanism. A skill with no volatile facts of its own declares an **evergreen waiver** in REFRESH.md — one line stating why nothing decays — and keeps `sources: []`. Facts whose source of truth already lives in another skill's registry are mirrored with a `<!-- mirrored -->` marker, not duplicated as a second registry entry.
71
+
72
+ ## Worked example: skillifying a "release-notes" workflow
73
+
74
+ ```
75
+ Phase 0: yes — run at every release, ~80 lines of conventions, trigger "draft the release notes";
76
+ nearest neighbor is skill-maintainer (release wiring) — different axis, proceed
77
+ Phase 1: 0/8 (new)
78
+ Phase 2: triggers "draft/write the release notes", NOT "write a changelog entry for this PR";
79
+ output = CHANGELOG section + npm summary; volatile: none owned → evergreen waiver
80
+ Phase 3: scaffold-skill.mjs release-notes --dir . --write (wiring done by the scaffolder);
81
+ description + 10 trigger queries incl. ambiguous_with skill-maintainer; body + references/format.md;
82
+ no scripts (judgment-heavy, item 5 N/A)
83
+ Phase 4: eval cycle 1 — baseline subagent invents section headings, with-skill misses breaking-change
84
+ callouts → add callout contract to SKILL.md; cycle 2 — with-skill clearly better, baseline still
85
+ wrong shape → pass
86
+ Phase 5: trigger fixture locked; evergreen waiver written; README row description filled in
87
+ Phase 6: bun run check green; 8/8 → properly skilled
88
+ ```
89
+
90
+ ## Anti-patterns
91
+
92
+ - Writing lock-in tests before the behavioral eval — locks in mediocrity.
93
+ - A description that summarizes the workflow — agents follow the description and skip the body.
94
+ - Skipping the baseline run because "the output looks fine" — that is not evidence.
95
+ - Eval without a fix cycle — vanity metrics.
96
+ - Obviously-irrelevant negatives in the trigger query set — near-misses or nothing.
97
+ - Version pins or model names in SKILL.md — volatile facts live in refresh-tracked locations.
98
+ - Multi-intent skills spanning unrelated triggers — split them.
99
+ - Two skills answering the same trigger — merge or kill one.
100
+ - Steering by prohibition — a wall of NEVERs drags the forbidden behavior into context and grows forever; state the positive rule once and explain why it matters.
101
+ - Patching every observed agent failure with a new clause — that is sediment; rewrite the existing rule in place instead of appending case law.
102
+ - Unit tests for prose — a test asserting a markdown file contains a phrase proves nothing the eval didn't.
103
+ - Building eval tooling — the runner and the subagent procedure exist; write cases, not harnesses.
@@ -0,0 +1,112 @@
1
+ # Behavioral eval playbook
2
+
3
+ How to prove a skill improves agent behavior before tests cement it. The tooling is your own subagents (Claude Code's Task tool, Codex's `.codex/agents` spawns, Hermes `delegate_task`) and, once its early-access gate lifts and it reads this case format, `claude plugin eval` (status in Model guidance); write cases, never harnesses, viewers or graders of your own — one format is what lets results compare across skills and releases.
4
+
5
+ ## Why eval before tests
6
+
7
+ Tests lock in behavior; if the behavior is mediocre, tests lock in mediocrity. The eval proves the quality bar first, then unit tests cement it. If you didn't watch an agent fail *without* the skill, you don't know the skill teaches anything.
8
+
9
+ ## The case file — evals/evals.json
10
+
11
+ Every skill carries its cases at `<skill>/evals/evals.json` in the agentskills.io format — the format this playbook's procedure reads and the one `claude plugin eval` is expected to read once verified; never packaged (like `tests/`), and `structure.mjs check` warns when it is missing or malformed.
12
+
13
+ ```json
14
+ {
15
+ "skill_name": "<the frontmatter name>",
16
+ "evals": [
17
+ {
18
+ "id": 1,
19
+ "prompt": "what the user would type — paths, backstory, the hardest documented case",
20
+ "expected_output": "one human-readable description of success",
21
+ "files": ["evals/files/input.md"],
22
+ "assertions": ["the plan comment has an Interfaces block per task"]
23
+ }
24
+ ]
25
+ }
26
+ ```
27
+
28
+ - `id` is an integer, unique in the file; `files` are paths relative to the skill root under `evals/files/`; `assertions` is an array, empty until the first run.
29
+ - 2–3 cases per skill: realistic (file paths, backstory), varied in formality, one boundary case the skill should route elsewhere or refuse.
30
+ - `expected_output` is a sentence a human reads; assertions are objective and countable ("every finding carries `path:line`"), never exact phrasing.
31
+ - Write prompts first, add assertions after the first run — the outputs show what "good" looks like. Retire an assertion that passes in both arms; it measures the model, not the skill.
32
+ - `tests/fixtures/trigger-queries.json` stays the description-level fixture (would the skill load?); `evals.json` is the body-level one (did it help once loaded?).
33
+
34
+ ## Running on Claude Code — claude plugin eval
35
+
36
+ ```sh
37
+ claude plugin eval <skill-dir> --ablation with-without --runs 3 --max-cost-usd 5 --threshold 0.7 --json --no-publish
38
+ ```
39
+
40
+ `--ablation with-without` runs the baseline arm; `--runs 3` makes a stddev meaningful; `--max-cost-usd` aborts with exit 2 rather than overrunning; `--threshold 0.7` because a with-skill arm failing a third of its assertions is not earning its tokens, while `1.0` turns every grader wobble into a red run; `--no-publish` keeps the report local. Results land at `<skill>/evals/results/<timestamp>/aggregate-result.json`, gitignored; the aggregate JSON of the gating run is pasted into the evidence comment.
41
+
42
+ ## Running anywhere — the subagent procedure
43
+
44
+ The same cases, run by hand on any harness:
45
+
46
+ 1. **Launch both arms per case in the same turn.** One subagent told to read and follow the SKILL.md at its path; one baseline given the identical prompt with no mention of the skill (when improving a skill, the baseline is a snapshot of the old version). Each dispatch carries the skill path or none, the task, the case's `files`, and an output directory.
47
+ 2. **Write to `.vegastack/.tmp/<issue>-<slug>/<skill>-workspace/iteration-<n>/eval-<id>/{with_skill,without_skill}/outputs/`**, never beside the skill directory: discovery treats every directory in a group as a skill, so a sibling workspace breaks `bun run check` even when gitignored.
48
+ 3. **Compare against the skill's claimed value**, reading transcripts, not just final outputs, into the result files below.
49
+
50
+ ## Result files
51
+
52
+ The agentskills.io vocabulary, so a hand run and a runner run read alike:
53
+
54
+ - `timing.json` per arm — `{ "total_tokens", "duration_ms" }` from the task-completion notification, saved at once (it is gone with the next message).
55
+ - `grading.json` per arm — `{ "assertion_results": [{ "text", "passed", "evidence" }], "summary": { "passed", "failed", "total", "pass_rate" } }`; a PASS needs quoted evidence from the output.
56
+ - `benchmark.json` at the iteration root — `{ "run_summary": { "with_skill": { "pass_rate": { "mean", "stddev" }, "time_seconds": {…}, "tokens": {…} }, "without_skill": {…}, "delta": {…} } }`; `aggregate-result.json` is the runner's equivalent.
57
+
58
+ ## Pass criteria
59
+
60
+ The with-skill run must be *materially* better on the dimensions the skill exists for:
61
+
62
+ - Output has the contract shape the skill defines (sections, verdicts, file layout) where the baseline's does not.
63
+ - The with-skill agent uses bundled scripts/templates instead of reinventing them; a helper both arms wrote independently should become a bundled script.
64
+ - No contract violations the checklist would catch (frontmatter keys, name grammar, missing pieces).
65
+ - The transcript shows the skill's guidance being *used*, not just loaded — sections nobody used are bloat to cut.
66
+ - **Colleague test.** Hand the SKILL.md alone, with no conversation context, to a fresh subagent and ask what it would do first and where it would look for the answer to one realistic request; any confusion is a defect in the skill, not in the reader, because the model that runs it never attended the design conversation.
67
+
68
+ **Failure that matters most:** the baseline matches the with-skill output. Then the skill is not earning its tokens — cut it, narrow it, or fold it into a reference.
69
+
70
+ ## Trigger-query eval (description level)
71
+
72
+ The body eval assumes the skill got loaded. Separately, walk `tests/fixtures/trigger-queries.json` and judge, per query, whether an agent seeing only the skill list (name + description) would load this skill. Near-miss negatives are the valuable half — a description that survives them draws a real boundary. Fix failures by editing the *description* (triggers, boundary clause), never by stuffing workflow summary into it.
73
+
74
+ **Family-level re-run:** whenever a skill is added, renamed, or removed, re-run the trigger eval across the FULL installed set: cross-skill collisions (two descriptions claiming one query) only appear at family level, and the `ambiguous_with` entries in every skill's fixtures are the cases to walk first.
75
+
76
+ ## Workflow skills — the sandbox drill
77
+
78
+ A skill whose value lives in a multi-turn, external-state workflow (gh labels, comments, branches) — dev-implement, dev-review, dev-ship — gets only partial proof from single-prompt runs: its cases cover the prose half (evidence comment, review comment, ship report). Its end-to-end proof is a **sandbox drill** — a throwaway repo walked through the real flow with the real tools — run before release-level claims, not per edit. Single-prompt evals remain the per-change gate; the drill is the workflow-level one.
79
+
80
+ ## Cycle protocol (at most 3)
81
+
82
+ ```
83
+ CYCLE 1: run evals → list concrete improvements → apply them to the skill files
84
+ CYCLE 2: re-run the SAME prompts → compare before/after → apply what remains
85
+ CYCLE 3: re-run → pass, or ship with KNOWN_GAPS
86
+ ```
87
+
88
+ Hard stop after 3 cycles: endless polishing is worse than an honest gap list. Fix the pattern that caused the failure, never one prompt's wording. When a rule is not landing, prefer removing it to rewriting it and let the eval prove the need: a rule the with-skill run never used is bloat, and rules written for earlier models are often too prescriptive for the current one.
89
+
90
+ ## KNOWN_GAPS format
91
+
92
+ Ships at the bottom of the skill's README.md when the eval did not fully pass:
93
+
94
+ ```markdown
95
+ ## KNOWN_GAPS
96
+
97
+ - gap: baseline-quality section ordering under multi-file inputs
98
+ evidence: eval cycle 3, prompt "draft release notes for the 0.4 tag"
99
+ why unresolved: would require restructuring the routing table
100
+ next: revisit when references/format.md is split by artifact type
101
+ ```
102
+
103
+ One entry per gap: `gap` / `evidence` (cycle + prompt) / `why unresolved` / `next`. The eval summary (prompts, cycles, verdict per prompt) goes in the PR body, not the repo.
104
+
105
+ ## Model guidance
106
+
107
+ <!-- volatile: everything in this section decays; keep model facts out of SKILL.md and update here only. -->
108
+
109
+ - Runner status, 03-09-2026, Claude Code 2.1.247: `claude plugin eval` prints "plugin eval is currently in early access" and exits 1 for `init --bare` and for a run; `--help` shows it reads `evals/**/case.yaml` or `prompt.md + graders/*.md`. Until the gate lifts and the invocation above is verified against a bare `skills/<group>/<name>/` directory, the subagent procedure is the Claude-side proof too; re-probe with `claude plugin eval init --bare probe` in a scratch directory and update this line's date.
110
+ - Run both arms of every comparison on the **same model** — otherwise you measure the model gap, not the skill.
111
+ - Use the model that will actually run the skill in production (typically the one powering the current session); a weaker grader cannot judge a stronger writer.
112
+ - If a separate grading pass is used, grade blind: give the grader both outputs unlabeled and ask which better satisfies the skill's stated contract.
@@ -0,0 +1,23 @@
1
+ # Refresh contract — skillify
2
+
3
+ Instructions for the scheduled refresh agent (and any human running a manual refresh). This file plus `sources.json` is the complete freshness contract for this skill.
4
+
5
+ ## What this skill claims
6
+
7
+ - **Durable rules** (SKILL.md, most of `references/`): the phase model, checklist structure, eval-before-tests ordering, description doctrine, the volatile-facts rule. Versionless; the refresh agent NEVER edits these. If external evidence invalidates one, open an issue quoting the evidence — do not edit.
8
+ - **Mirrored volatile claims**: skillify does not track its own external sources. Its one volatile spot is marked in place:
9
+ - the model guidance section in `references/eval-playbook.md` (marked `<!-- volatile -->`).
10
+
11
+ It mirrors facts whose sources of truth are the agent-skills standards sources tracked in the **skill-maintainer** registry (`skills/repo-tooling/skill-maintainer/refresh/sources.json`). `sources` here is therefore deliberately empty, and the refresh runner treats this registry as valid with nothing to fetch.
12
+
13
+ ## How to refresh
14
+
15
+ 1. There is no deterministic fetch pass for this skill — an automated run against this registry selects zero sources and exits 0. Do not add sources here that duplicate skill-maintainer's; one registry per fact.
16
+ 2. When skill-maintainer's standards sources drift (spec limits, harness listing budgets, model catalogs), that skill's refresh PR is the evidence. Update skillify's marked section to match **on a normal branch** (refresh branches are CI-restricted to `refresh/` metadata), referencing the skill-maintainer refresh PR as evidence.
17
+ 3. If a future edit gives skillify a directly-owned external claim (its own vendor URL, pin, or protocol fact), stop mirroring for that claim: add a real entry to `sources.json` and mark the sentence `<!-- source: SOURCE-ID -->`.
18
+
19
+ ## Never
20
+
21
+ - Never edit the phase model, checklist items, or verdict grammar in a refresh.
22
+ - Never hand-write checksum/version/timestamp values anywhere in this repo.
23
+ - Never duplicate a skill-maintainer source entry into this registry.
@@ -0,0 +1,6 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "retrievalBaseline": "2026-08-08T00:00:00Z",
4
+ "note": "Deliberately empty. Skillify's only time-decaying claim (the model guidance in references/eval-playbook.md) is mirrored from the standards sources tracked in the skill-maintainer registry and is refreshed through that skill's registry, not duplicated here; numeric limits are cited from skill-maintainer, never copied. See REFRESH.md.",
5
+ "sources": []
6
+ }