cyber-aced 0.3.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 (77) hide show
  1. package/.claude-plugin/plugin.json +18 -0
  2. package/.plugin/pins.json +1 -0
  3. package/.plugin/plugin.json +18 -0
  4. package/agents/aced-case-judge.md +165 -0
  5. package/agents/aced-impl-judge.md +55 -0
  6. package/agents/aced-scenario-writer.md +76 -0
  7. package/agents/aced-spec-validator.md +66 -0
  8. package/governances/README.md +52 -0
  9. package/governances/agent-tool-output.md +86 -0
  10. package/governances/cli-resolution.md +102 -0
  11. package/governances/skill-design.md +258 -0
  12. package/governances/skill-repo-structure.md +173 -0
  13. package/package.json +44 -0
  14. package/readme.md +124 -0
  15. package/skills/aced-architect-impl/README.md +9 -0
  16. package/skills/aced-architect-impl/SKILL.md +73 -0
  17. package/skills/aced-builder-impl/README.md +14 -0
  18. package/skills/aced-builder-impl/SKILL.md +46 -0
  19. package/skills/aced-builder-spec/README.md +15 -0
  20. package/skills/aced-builder-spec/SKILL.md +130 -0
  21. package/skills/aced-fit/README.md +21 -0
  22. package/skills/aced-fit/SKILL.md +105 -0
  23. package/skills/aced-impl-producer/SKILL.md +75 -0
  24. package/skills/add-scenario/README.md +25 -0
  25. package/skills/add-scenario/SKILL.md +75 -0
  26. package/skills/bench/README.md +64 -0
  27. package/skills/bench/SKILL.md +199 -0
  28. package/skills/bench/scripts/bench-claude-code.mts +187 -0
  29. package/skills/bench/scripts/bench-compare.mts +369 -0
  30. package/skills/bench/scripts/bench-record.mts +133 -0
  31. package/skills/bench/scripts/bench.mts +930 -0
  32. package/skills/check-freshness/README.md +57 -0
  33. package/skills/check-freshness/SKILL.md +76 -0
  34. package/skills/check-freshness/scripts/check-freshness.mts +399 -0
  35. package/skills/compare/README.md +25 -0
  36. package/skills/compare/SKILL.md +87 -0
  37. package/skills/contribute-skill/README.md +25 -0
  38. package/skills/contribute-skill/SKILL.md +241 -0
  39. package/skills/contribute-skill/scripts/source.mts +188 -0
  40. package/skills/define-agent/README.md +40 -0
  41. package/skills/define-agent/SKILL.md +279 -0
  42. package/skills/define-command/README.md +36 -0
  43. package/skills/define-command/SKILL.md +174 -0
  44. package/skills/define-governance/SKILL.md +151 -0
  45. package/skills/define-skill/README.md +37 -0
  46. package/skills/define-skill/SKILL.md +200 -0
  47. package/skills/extract-situation/README.md +32 -0
  48. package/skills/extract-situation/SKILL.md +54 -0
  49. package/skills/extract-situation/scripts/extract-situation.mts +287 -0
  50. package/skills/improve/README.md +25 -0
  51. package/skills/improve/SKILL.md +100 -0
  52. package/skills/improve-skill/README.md +38 -0
  53. package/skills/improve-skill/SKILL.md +169 -0
  54. package/skills/improve-skill/references/check-definitions.md +215 -0
  55. package/skills/improve-skill/scripts/validate.mts +1033 -0
  56. package/skills/init-aced/README.md +5 -0
  57. package/skills/init-aced/SKILL.md +76 -0
  58. package/skills/init-aced/scripts/ensure-results-ignored.mts +117 -0
  59. package/skills/list-skills/README.md +19 -0
  60. package/skills/list-skills/SKILL.md +55 -0
  61. package/skills/list-skills/scripts/list-skills.mts +210 -0
  62. package/skills/manage/README.md +35 -0
  63. package/skills/manage/SKILL.md +65 -0
  64. package/skills/manage-model-runners/README.md +25 -0
  65. package/skills/manage-model-runners/SKILL.md +113 -0
  66. package/skills/manage-skill-dirs/README.md +17 -0
  67. package/skills/manage-skill-dirs/SKILL.md +54 -0
  68. package/skills/manage-skill-dirs/scripts/manage-skill-dirs.mts +328 -0
  69. package/skills/repair-private-skills/README.md +17 -0
  70. package/skills/repair-private-skills/SKILL.md +59 -0
  71. package/skills/repair-private-skills/scripts/repair-private-skills.mts +279 -0
  72. package/skills/report/README.md +25 -0
  73. package/skills/report/SKILL.md +74 -0
  74. package/skills/run/README.md +25 -0
  75. package/skills/run/SKILL.md +220 -0
  76. package/skills/skillify/README.md +25 -0
  77. package/skills/skillify/SKILL.md +141 -0
@@ -0,0 +1,279 @@
1
+ ---
2
+ name: define-agent
3
+ description: 'Use this skill when the user wants to create or improve an agent definition — a named, reusable role that can be delegated to as a subagent, loaded in-context as a persona, or both. Trigger on "create an agent", "write a conductor", "make an agent definition", "define a persona", "build a dual-mode agent", or "add an invokable agent".'
4
+ ---
5
+
6
+ # Define Agent
7
+
8
+ Create or improve an agent definition — a named role encoded in a single file.
9
+
10
+ When the conductor dispatches this skill as a generic builder (`produced-by sdd:automaton`) for the ACED **impl-producer** role (implement mode, against a frozen `.feature`), it builds the **agent definition** to pass the frozen suite. The **verification is the frozen `.feature` itself** — its inline `@rubric` scenarios and `@trigger` `Examples`, authored by `aced-scenario-writer` at explore — so no separate eval suite is authored here; `eval.md` carries only the `subject` binding and run policy. As impl-producer it self-aligns to `sdd:ownership-governance` plus the resolved **builder-impl + architect-impl** bars (the ACED builder-impl is `aced:aced-builder-impl`). (Invoked standalone — no frozen `.feature` — only the agent definition is produced.) If the impl-judge reports scenario failures, load `aced-impl-producer` to run the diagnose-and-refine loop rather than re-deriving it here.
11
+
12
+ ## First: confirm an agent definition is the right artifact
13
+
14
+ A skill can set `model`, `effort`, `allowed-tools`, `disallowed-tools`, `paths`, and can run itself in
15
+ a subagent via `context: fork` + `agent:`. Wanting a specific model or effort level is **not** a
16
+ reason to author an agent definition.
17
+
18
+ Author an agent definition when the requirement is one of these, which no skill can express:
19
+
20
+ | Requirement | Field |
21
+ | --- | --- |
22
+ | A closed tool allowlist — "only these, nothing else" | `tools` |
23
+ | A permission mode for the whole run | `permissionMode` |
24
+ | A turn ceiling | `maxTurns` |
25
+ | Memory that survives across conversations | `memory` |
26
+ | Agent-scoped MCP servers | `mcpServers` |
27
+ | An isolated git worktree | `isolation: worktree` |
28
+
29
+ Note that a skill's `allowed-tools` **pre-approves** and `disallowed-tools` **denies** — neither
30
+ closes the set, which is why a real allowlist needs the agent definition.
31
+
32
+ If none of the rows apply and the target is a stance, a voice, or a convention set rather than a
33
+ worker, route to `define-skill` and stop here.
34
+
35
+ ## Keep the content in a skill when more than one caller needs it
36
+
37
+ Content written into an agent body is reachable two ways only: spawn that agent, or read its file by
38
+ path. Path-reading is brittle and breaks under plugin distribution.
39
+
40
+ When the same content must serve both a spawned agent and an in-session load, write it as a skill and
41
+ name it in the agent's `skills:` frontmatter. That field injects the skill's full content into the
42
+ agent at startup — one body of text, two entry points, no duplication:
43
+
44
+ ```yaml
45
+ ---
46
+ name: <agent-name>
47
+ description: <when to delegate to this agent>
48
+ model: opus
49
+ tools: Read, Write, Edit, Grep, Glob
50
+ skills:
51
+ - <shared-content-skill>
52
+ ---
53
+ ```
54
+
55
+ `skills:` is a preload list, not an access list — it does not restrict what the agent may load later.
56
+ A skill named there must stay model-invocable: `disable-model-invocation: true` blocks preloading.
57
+
58
+ The inverse direction — `context: fork` on the skill — is for when the **skill** carries the task and
59
+ the agent only supplies tools and system prompt. Do not fork a skill that is pure reference: it
60
+ arrives as guidelines with no actionable prompt and returns nothing useful.
61
+
62
+ ## Agent definition modes
63
+
64
+ Present these three modes to the user and ask which fits their use case:
65
+
66
+ | Mode | What it does | When to pick it |
67
+ |------|-------------|-----------------|
68
+ | **Delegated** | Runs as a subagent in its own context; returns a result to the caller | Autonomous workers, fan-out tasks, long-running jobs where interruption isn't needed |
69
+ | **Invokable (dual-mode)** | Can be spawned as a subagent AND reached by a thin companion command, so the user can steer it interactively either way. The command takes one of **two shapes** — see below; picking the wrong one is what makes an agent bleed | Conductors, reviewers, personas — and workers that produce an artifact, which stay just as steerable through a gateway |
70
+ | **In-context only** | Loaded via command only; not intended as a subagent | One-off role activations where no other caller needs the content |
71
+
72
+ **In-context only is rarely the right answer now.** If the content is a stance the user loads into a
73
+ session — a voice, a register, a review standard — it is a skill, not an agent definition, and
74
+ `define-skill` owns it. Pick this mode only when the file genuinely must stay an agent definition.
75
+
76
+ For **Invokable**, a companion command file is scaffolded alongside the agent definition. Prefer
77
+ putting the shared body in a skill (see above) and having both the command and the agent's `skills:`
78
+ field name it. Falling back to a command that reads the agent file by path is acceptable only when no
79
+ skill placement is available to the user.
80
+
81
+ ## Determine placement
82
+
83
+ If the target scope is not clear from context, ask:
84
+
85
+ > Where should this agent definition live?
86
+ > 1. **User-global** (`~/.agents/agents/<name>.md`) — available across all projects
87
+ > 2. **Project** (`.agents/agents/<name>.md`) — scoped to this repo
88
+ > 3. **Inside a plugin** (`plugins/<plugin-name>/agents/<name>.md`) — distributed with the plugin
89
+
90
+ After the user selects, derive the canonical path.
91
+
92
+ Then ask which runtimes to target (select all that apply):
93
+
94
+ | Runtime | Symlink target |
95
+ |---------|---------------|
96
+ | Claude Code | `.claude/agents/<name>.md` |
97
+ | Cursor | `.cursor/rules/<name>.mdc` |
98
+ | Codex | `.codex/agents/<name>.md` |
99
+
100
+ The canonical file lives at the canonical path. All runtime locations are symlinks to it.
101
+
102
+ ## Gather requirements
103
+
104
+ Ask the user:
105
+
106
+ 1. **Name** — kebab-case slug (e.g. `conductor`, `code-reviewer`). If the agent's role is to **score or verify a specific gate or case**, name it by that gate/scope, not a bare action verb: `<domain>-<gate>-judge` for a gate scorer (e.g. `sdd-impl-judge`, `aced-impl-judge`), `<domain>-case-judge` for a case scorer (e.g. `aces-case-judge`). Flag any gate/case scorer whose name is not in that form — bare verdict verbs (`implementer`, `judge`, `validator`, `reviewer`, `checker`) and non-verdict action names (`eval-runner`, `grader`) alike. A producer/worker agent (e.g. `scenario-writer`, `doc-writer`) keeps its action-oriented name — this convention only applies to gate/case scorers.
107
+ 2. **Role** — one sentence: "You are a [seniority] [role] focused on [bounded concern]."
108
+ 3. **Responsibilities** — what does this agent do? (3–6 bounded concerns)
109
+ 4. **Output format** — what does it produce? (file, report, JSON, confirmation, etc.)
110
+ 5. **Human-in-the-loop rules** — which actions require user confirmation before proceeding?
111
+ 6. **Out of scope** — what should it explicitly refuse or defer?
112
+ 7. **Tools** (Claude Code / Codex) — comma-separated tool names, or `*` for all
113
+
114
+ If improving an existing file, read it first. Ask only about gaps or issues found.
115
+
116
+ ## Draft the agent definition
117
+
118
+ Write the file at the canonical path using this structure:
119
+
120
+ ```markdown
121
+ ---
122
+ name: <name>
123
+ description: >
124
+ Use this agent when <primary trigger>. Trigger on <phrase 1>, <phrase 2>, or
125
+ when the user <implicit signal> — even if they don't say "<domain word>"
126
+ explicitly.
127
+ tools: <tool list or *>
128
+ model: <optional: opus | sonnet | haiku>
129
+ ---
130
+
131
+ # <Title>
132
+
133
+ You are a <seniority> <role> focused on <bounded concern>.
134
+
135
+ ## Responsibilities
136
+
137
+ - <one bounded concern per bullet>
138
+
139
+ ## Output format
140
+
141
+ <Concrete: file path, JSON shape, Markdown section structure, etc.>
142
+
143
+ ## Human-in-the-loop rules
144
+
145
+ - <Action requiring confirmation before execution>
146
+
147
+ ## Out of scope
148
+
149
+ - <Explicit refusal or deferral>
150
+ ```
151
+
152
+ Omit `model:` unless the user specifies one. Omit `tools:` for in-context-only agents.
153
+
154
+ ## For Invokable mode: scaffold the companion command
155
+
156
+ Write a second file at `.agents/commands/<name>.md` (or the plugin-scoped equivalent). **Ask one
157
+ question first, because the two shapes are not interchangeable:**
158
+
159
+ > **Where does this agent's output go — into the session, or into something it produces?**
160
+
161
+ | Its output is… | Command shape | Why |
162
+ |---|---|---|
163
+ | **the session itself** — replies, review remarks, decisions the user reacts to | **Adoption** | The instruction governs the session's own output, so loading it into the session is the point |
164
+ | **a produced artifact** — a document, a file, a draft it hands back | **Gateway** | The instruction governs the artifact. Loading it into the session applies it to output it was never written for |
165
+
166
+ **Getting this wrong is not a style slip — it is the bleed.** An adoption command is a scope statement
167
+ made once; every reply after it accumulates as an unlabeled example, and the voice or stance drifts
168
+ into output it does not govern.
169
+
170
+ **When both fit, gateway.** A reviewer that also writes `review.md` matches both rows — its remarks
171
+ are what the user reacts to *and* it produces a file. Gateway is the fail-safe direction: a wrongly
172
+ gatewayed agent costs a round trip, while a wrongly adopted one bleeds.
173
+
174
+ **Gateway costs no steering.** The command runs in the session, so the user converses with it,
175
+ redirects it, asks for a different angle, and asks for revisions — it brokers each run. What a
176
+ gateway leaves out is the agent's *instructions*, not the user's control. Only a single dispatch is
177
+ uninterruptible once it starts, which is why the command settles what it can before dispatching and
178
+ why a revision is another dispatch rather than an in-session edit.
179
+
180
+ ### Adoption — for an agent whose output is the session
181
+
182
+ ```markdown
183
+ ---
184
+ description: Load <name> as your operating role for this session.
185
+ allowed-tools: Read
186
+ ---
187
+
188
+ Read `<canonical-path-to-agent-file>` in full and adopt it as your operating
189
+ instructions for the rest of this session.
190
+
191
+ Confirm in one line that the <name> role is active. Do not take any action until
192
+ the user gives you a task.
193
+
194
+ $ARGUMENTS
195
+ ```
196
+
197
+ ### Gateway — for an agent that produces an artifact
198
+
199
+ The command exists because a subagent is not slash-invokable. It must **not** load the agent's
200
+ instructions into the session — it collects what the subagent cannot ask for, dispatches, and relays.
201
+
202
+ Bind a **bounded** tool set, as the adoption template does. This is the one session that must not do
203
+ the work itself, so leaving tools open is leaving the failure available: name the runtime's
204
+ subagent-dispatch tool plus whatever read-only tools the command needs to settle the brief, and
205
+ nothing that writes. The dispatch tool's name is runtime-specific — use the name the target runtime
206
+ actually exposes rather than copying one from another runtime's docs.
207
+
208
+ ```markdown
209
+ ---
210
+ description: <what the user gets> — briefs the <name> subagent and returns its result.
211
+ allowed-tools: <dispatch-tool>, Read, Glob, Grep
212
+ ---
213
+
214
+ Gateway to the `<name>` subagent. Take the request, brief the subagent, return what it produces.
215
+
216
+ **Do not load <name>'s instructions into this session.** They govern what it produces, not this
217
+ conversation. The subagent holds them in its own context, which is where they belong.
218
+
219
+ ## The request
220
+
221
+ $ARGUMENTS
222
+
223
+ ## What to do
224
+
225
+ 1. **Read the request.** If it carries enough to act on, go to step 3.
226
+ 2. **Ask only what would change the result.** The subagent cannot ask anything once it starts, so
227
+ settle what is genuinely undecided here — at most two things, in one message, and only what you
228
+ cannot settle yourself.
229
+ 3. **Brief the subagent.** It starts blank and inherits nothing from this conversation: state the
230
+ task, name the **source files** (do not paste or summarize their contents), mark what the user
231
+ settled explicitly so it is not re-derived, and name what is out of scope.
232
+ 4. **Return what came back**, and relay the assumptions it declared rather than burying them. A wrong
233
+ inference is cheapest to catch before the next round.
234
+
235
+ For a revision, dispatch again with the same completeness — the new subagent has not seen the
236
+ previous result. Do not do the work in this session to save a round trip; that does it without the
237
+ agent's instructions, which is the drift the gateway exists to prevent.
238
+ ```
239
+
240
+ Symlink `.claude/commands/<name>.md` → `.agents/commands/<name>.md` (and other runtime equivalents the user selected).
241
+
242
+ ## Create symlinks
243
+
244
+ After writing the canonical file(s), create symlinks for each selected runtime. Use relative paths from the symlink location to the canonical file.
245
+
246
+ Example for a project-scoped agent targeting Claude Code:
247
+ ```bash
248
+ ln -sf ../../.agents/agents/<name>.md .claude/agents/<name>.md
249
+ ```
250
+
251
+ Verify each symlink resolves correctly.
252
+
253
+ ## Run quality checks
254
+
255
+ After writing, evaluate the agent definition against these checks:
256
+
257
+ | # | Check | Severity |
258
+ |---|-------|----------|
259
+ | F1 | `name` and `description` fields present | CRITICAL |
260
+ | F2 | `name` is kebab-case and matches file stem | HIGH |
261
+ | F3 | `description` starts with "Use this agent when…" | HIGH |
262
+ | F4 | `description` ≤ 1024 characters | HIGH |
263
+ | F9 | `description` includes implicit trigger phrasing | MEDIUM |
264
+ | B1 | Body opens with "You are a [seniority] [role]…" | HIGH |
265
+ | B5 | Irreversible actions have confirmation rules | HIGH |
266
+ | B8 | Body under 200 lines | MEDIUM |
267
+ | B9 | A gate- or case-scorer agent is named in `<domain>-<gate>-judge` or `<domain>-case-judge` form; flags any gate/case scorer whose name is not in that form (`implementer`, `judge`, `validator`, `reviewer`, `checker`, and non-verdict action names like `eval-runner`); does not fire for a non-scorer producer agent | HIGH |
268
+
269
+ Report results. Fix any CRITICAL or HIGH failures before presenting the final file to the user.
270
+
271
+ ## Report
272
+
273
+ Summarize:
274
+
275
+ - Canonical file path
276
+ - Runtime symlinks created
277
+ - Companion command path (Invokable mode only)
278
+ - Quality check outcome
279
+ - Suggested next step: run `sdd:start-mission` (the conductor resolves the ACED roles) to spec and eval for this agent definition
@@ -0,0 +1,36 @@
1
+ # define-command
2
+
3
+ Create or improve a command — a user-invoked-only slash workflow (`/name`) that never auto-triggers from the model — then hand it to the ACED eval loop to spec and score.
4
+
5
+ ## When to use
6
+
7
+ Use this skill when you want to author a new command or formalize an existing user-only workflow into one.
8
+
9
+ Good triggers include:
10
+
11
+ - "Create a command that does X" / "add a `/deploy` command"
12
+ - Suppressing a skill's auto-invocation because accidental firing would be disruptive
13
+ - Converting an existing workflow skill into a `/name`-only command
14
+ - Deciding between the `commands/` folder and `disable-model-invocation: true` mechanisms
15
+
16
+ Defer to a sibling when the request is really about a companion command that loads an agent definition into context (`define-agent`), a workflow that should keep auto-triggering (`define-skill`), a reference-only rule set (`define-governance`), or scoring / diagnosing an existing config (`run` / `add-scenario` / `improve`).
17
+
18
+ ## What it does
19
+
20
+ The skill walks you through the shape before writing anything:
21
+
22
+ 1. **Route** — confirm this is a standalone command, not an agent companion, an auto-triggered skill, or governance
23
+ 2. **Mechanism** — `commands/` folder (widest cross-harness support) or `disable-model-invocation: true` (modern, Claude Code / Windsurf only)
24
+ 3. **Placement** — user-global, project, or inside a plugin's `commands/` subfolder
25
+
26
+ It then drafts the command file for the chosen mechanism, creates runtime symlinks (`disable-model-invocation` mechanism only), audits it, and points you at the ACED eval loop (`start-mission` / `add-scenario` / `run`) to spec and score it.
27
+
28
+ ## `command` is a registered ACED artifact-type
29
+
30
+ ACED already serves `command` as one of its four agent-config artifact-types (alongside `skill`, `subagent`, `agents-section`) — see `init-aced`. Before `define-command`, authoring one fell to `define-agent` (for the agent-companion case) or ad hoc editing; this skill gives standalone commands their own dedicated producer.
31
+
32
+ ## Install
33
+
34
+ ```bash
35
+ npx skills add cyberuni/cyberplace --skill aced/define-command
36
+ ```
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: define-command
3
+ description: 'Use this skill when the user wants to create or improve a command — a user-invoked-only slash workflow (`/name`) that never auto-triggers from the model. Trigger on "create a command", "add a slash command", "make a /deploy command", "add a user-only workflow", "convert this skill to a command", or "stop this skill from auto-triggering", even if they do not say "command" explicitly. Not for a companion command scaffolded alongside an agent definition — whether it adopts that agent in-session or gateways to it as a subagent (define-agent) — an auto-triggered workflow skill (define-skill), or a reference-only rule set (define-governance).'
4
+ ---
5
+
6
+ # Define Command
7
+
8
+ Create or improve a **command** — a workflow the user invokes explicitly via `/name`, never
9
+ triggered automatically by the model.
10
+
11
+ When the conductor dispatches this skill as a generic builder (`produced-by sdd:automaton`) for the
12
+ ACED **impl-producer** role (implement mode, against a frozen `.feature`), it builds the **command
13
+ file** to pass the frozen suite. The **verification is the frozen `.feature` itself** — its inline
14
+ `@rubric` scenarios and `@trigger` `Examples`, authored by `aced-scenario-writer` at explore — so no
15
+ separate eval suite is authored here; `eval.md` carries only the `subject` binding and run policy. As
16
+ impl-producer it self-aligns to `sdd:ownership-governance` plus the resolved **builder-impl +
17
+ architect-impl** bars (the ACED builder-impl is `aced:aced-builder-impl`). If the impl-judge reports
18
+ scenario failures, load `aced-impl-producer` to run the diagnose-and-refine loop rather than
19
+ re-deriving it here.
20
+
21
+ There are two other entry points, both with **no frozen `.feature`** and **only the command file**
22
+ produced:
23
+
24
+ - **Standalone** — the user invokes this skill directly, outside any CR. Scaffold, then offer the
25
+ ACED eval loop (see "Report and hand off" below) rather than assuming it.
26
+ - **Escaped** — the gateway or `start-mission` invokes this skill directly after resolving the
27
+ request `non-durable` (the escape hatch, before any CR opens). There is no mission to hand off
28
+ within: scaffold, audit, report, and **stop** — do not mention the ACED eval loop.
29
+
30
+ ## Route the request first
31
+
32
+ `define-command` owns **standalone user-invoked workflows**. Defer when the intent belongs to a
33
+ sibling that carries the same config vocabulary:
34
+
35
+ | The request is really about… | Defer to |
36
+ |---|---|
37
+ | a thin command that loads an **agent definition** into context (the Invokable-mode companion) | `define-agent` |
38
+ | a workflow that should **auto-trigger** from the model's own judgment | `define-skill` |
39
+ | a **reference-only rule set / governance** other skills load but never execute as steps | `define-governance` |
40
+ | **scoring** an existing config, or **adding** an eval case | `run` / `add-scenario` |
41
+ | **diagnosing** why an existing command's evals fail | `improve` |
42
+
43
+ A request that turns out to want an agent loaded into context (not a self-contained workflow) is
44
+ handed to `define-agent` — do not scaffold a companion-command shape here.
45
+
46
+ ## Choose the mechanism
47
+
48
+ Two mechanisms suppress model auto-invocation; pick one based on target harnesses (ask the user which
49
+ harnesses to target if not stated):
50
+
51
+ | Mechanism | File | Portability | When to pick it |
52
+ |---|---|---|---|
53
+ | **`commands/` folder** (legacy) | A standalone markdown file, not a `SKILL.md` | Widest support — Claude Code, and GitHub Copilot CLI (reads `.claude/commands/`); the only option for cross-harness plugin commands targeting Cursor too | Default choice; use for anything shipped in a plugin or targeting more than Claude Code |
54
+ | **`disable-model-invocation: true`** (modern) | A `SKILL.md` with the frontmatter flag | Claude Code, Windsurf; **not** Copilot CLI, Codex CLI, or Gemini CLI; has a known Cursor bug hiding plugin-delivered skills from the `/` menu (Mar 2026) | Only when targeting Claude Code / Windsurf exclusively and the command benefits from full `SKILL.md` progressive disclosure (a `references/` or `scripts/` dir) |
55
+
56
+ If improving an existing file, read it first and keep its current mechanism unless the user asks to
57
+ migrate.
58
+
59
+ ## Determine placement
60
+
61
+ If the target scope is not clear from context, ask:
62
+
63
+ > Where should this command live?
64
+ > 1. **User-global** (`~/.claude/commands/<name>.md`) — available across all your projects
65
+ > 2. **Project** (`.claude/commands/<name>.md`) — scoped to this repo
66
+ > 3. **Inside a plugin** (`plugins/<plugin-name>/commands/<name>.md`) — distributed with the plugin, native in Claude Code and Cursor
67
+
68
+ For the `disable-model-invocation` mechanism, placement instead follows the skill convention — write
69
+ the canonical `SKILL.md` at `~/.agents/skills/<name>/`, `.agents/skills/<name>/`, or
70
+ `plugins/<plugin-name>/skills/<name>/`, then symlink `.claude/skills/<name>` (and other targeted
71
+ runtime locations) to it.
72
+
73
+ ## Gather requirements
74
+
75
+ Ask the user:
76
+
77
+ 1. **Name** — kebab-case slug, becomes `/name`
78
+ 2. **Purpose** — one sentence: what does invoking this command do?
79
+ 3. **Arguments** — does it accept free text after the command (`$ARGUMENTS`)? What does the caller
80
+ pass?
81
+ 4. **Pre-approved tools** — which tools should run without a permission prompt during this
82
+ command's turn? (`allowed-tools:` frontmatter). This grants; it does not fence. Every other tool
83
+ stays callable under normal permission settings. If the requirement is "this command must never
84
+ touch X", that is `disallowed-tools:`, not `allowed-tools:`.
85
+ 5. **Steps** — the actual workflow body, numbered
86
+
87
+ If improving an existing file, read it first. Ask only about gaps or issues found.
88
+
89
+ ## Draft the command file
90
+
91
+ **`commands/` folder mechanism:**
92
+
93
+ ```markdown
94
+ ---
95
+ description: <one sentence — shown in the `/` menu, keep it scannable, no token-budget pressure since it never enters trigger matching>
96
+ allowed-tools: <tools to pre-approve, comma-separated — omit if nothing needs pre-approval>
97
+ ---
98
+
99
+ <Body — the workflow itself, written as if the user just typed `/name`.>
100
+
101
+ $ARGUMENTS
102
+ ```
103
+
104
+ **`disable-model-invocation` mechanism:**
105
+
106
+ ```markdown
107
+ ---
108
+ name: <name>
109
+ description: <capability the command performs — never matched for auto-trigger, but still keep it accurate for the `/` menu>
110
+ disable-model-invocation: true
111
+ ---
112
+
113
+ # <Title>
114
+
115
+ ## Instructions
116
+ 1. <step>
117
+ 2. <step>
118
+ ```
119
+
120
+ ## Create symlinks (`disable-model-invocation` mechanism only)
121
+
122
+ After writing the canonical `SKILL.md`, create symlinks for each selected runtime, same as any skill:
123
+
124
+ ```bash
125
+ ln -sf <relative-path-to-canonical> <runtime-location> && ls <runtime-location> # verify it resolves
126
+ ```
127
+
128
+ The `commands/` folder mechanism has no canonical+symlink step — the file at its placement path is
129
+ the whole artifact, unless distributed via a plugin's `commands/` subfolder (already native, no
130
+ symlink needed).
131
+
132
+ ## Audit before handing back
133
+
134
+ For the `disable-model-invocation` mechanism, run the structural audit and fix any CRITICAL or HIGH
135
+ finding before presenting the skill:
136
+
137
+ ```bash
138
+ npx cyberplace@0.2.4 audit validate --path <placement-dir>/<name> # resolve <version> via: npm view cyberplace version — never @latest
139
+ ```
140
+
141
+ The `commands/` folder mechanism is not a `SKILL.md` — the audit tool does not apply; check by hand
142
+ that `description` is present and the body reads correctly as a `/name` invocation.
143
+
144
+ ## Run quality checks
145
+
146
+ After writing, evaluate the command against these checks:
147
+
148
+ | # | Check | Severity |
149
+ |---|-------|----------|
150
+ | C1 | `description` field present | CRITICAL |
151
+ | C2 | Body reads correctly as a standalone `/name` invocation, not dependent on prior conversational context | HIGH |
152
+ | C3 | Irreversible or destructive steps are called out explicitly, not buried mid-body | HIGH |
153
+ | C4 | `$ARGUMENTS` used only if the command actually accepts caller input | MEDIUM |
154
+ | C5 | `disable-model-invocation` mechanism: `name` matches the file's directory stem | HIGH |
155
+ | C6 | `commands/` folder mechanism: no stray `disable-model-invocation` field (meaningless outside a `SKILL.md`) | MEDIUM |
156
+
157
+ Report results. Fix any CRITICAL or HIGH failures before presenting the final file to the user.
158
+
159
+ ## Report and hand off to the ACED eval loop
160
+
161
+ Summarize:
162
+
163
+ - Canonical file path (and runtime symlinks, `disable-model-invocation` mechanism only)
164
+ - Mechanism chosen and why
165
+ - Audit outcome (or the by-hand check result for the `commands/` folder mechanism)
166
+
167
+ **Escaped** entry: stop here — the artifact resolved `non-durable`, so there is no mission to hand
168
+ off to.
169
+
170
+ **Standalone or impl-producer** entry: point the user at the **ACED eval loop** to spec and score
171
+ the command — run `sdd:start-mission` (the conductor resolves the ACED roles for the `command`
172
+ artifact-type) to author its frozen `.feature` (with inline `@trigger` Examples exercising `/name`
173
+ invocation), or `add-scenario` / `run` to grow and score it. Do **not** embed a legacy trigger-query
174
+ eval file as the test step — scoring is the ACED loop's job.
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: define-governance
3
+ description: 'Create or revise a governance file — reference-only criteria or rules that other skills and agents load on demand. Use when the target is the criteria file itself, even if the user just says "write standards for" or "improve this governance".'
4
+ ---
5
+
6
+ # Define Governance
7
+
8
+ Create or improve a governance file — a reference-only skill that encodes criteria,
9
+ standards, or workflow rules. Governance files are loaded on demand by other skills
10
+ or agents; they never auto-trigger from user input.
11
+
12
+ ## Governance vs. skill
13
+
14
+ | | Governance | Workflow skill |
15
+ |---|---|---|
16
+ | **Purpose** | Criteria, standards, rules the agent enforces | Steps the agent executes |
17
+ | **Triggered by** | Explicit load (`/<name>` or `## References`) | User situation matching `description:` |
18
+ | **Auto-trigger** | Never | Yes, when description matches |
19
+ | **Body style** | Normative rules, checklists, rubrics | Numbered steps, decision logic |
20
+
21
+ If the content describes *what to enforce* (a rubric, a quality bar, a constraint set),
22
+ it is a governance file. If it describes *how to do something* (a workflow), it is a
23
+ workflow skill.
24
+
25
+ ## Determine placement
26
+
27
+ If the target scope is not clear from context, ask:
28
+
29
+ > Where should this governance file live?
30
+ > 1. **User-global** (`~/.agents/skills/<name>/SKILL.md`) — available across all projects
31
+ > 2. **Project** (`.agents/skills/<name>/SKILL.md`) — scoped to this repo
32
+ > 3. **Inside a plugin** (`plugins/<plugin-name>/skills/<name>/SKILL.md`) — distributed with the plugin
33
+
34
+ After the user selects, derive the canonical path.
35
+
36
+ ## Gather requirements
37
+
38
+ Ask the user:
39
+
40
+ 1. **Name** — kebab-case slug (e.g. `commit-discipline`, `skill-design`, `review-rubric`)
41
+ 2. **Topic** — one sentence: what domain does this governance cover?
42
+ 3. **Consumers** — which skills or agents will load this? (informs the structure and depth)
43
+ 4. **Content type** — select the primary content shape:
44
+ - **Rubric** — scored criteria for evaluation: named dimensions, each with its own `max`, plus one `threshold`
45
+ - **Constraint set** — rules that must not be violated
46
+ - **Checklist** — ordered or unordered items to verify
47
+ - **Decision table** — conditions → outcomes
48
+ - **Mixed** — more than one of the above
49
+ 5. **Rules or criteria** — the actual content; collect from the user or from an existing document
50
+
51
+ Draft no file until the name, the content type, and the rules are gathered.
52
+
53
+ If improving an existing file, read it first. Ask only about gaps or issues found.
54
+
55
+ ## Draft the governance file
56
+
57
+ Write the file at the canonical path using this structure:
58
+
59
+ ```markdown
60
+ ---
61
+ name: <name>
62
+ description: "Partial Skill: invoke by name only — <one sentence: what domain this governs and who loads it>"
63
+ user-invocable: false
64
+ metadata:
65
+ type: governance
66
+ ---
67
+
68
+ # <Title>
69
+
70
+ Apply when: <one-line scope — the situation or artifact type this governs>
71
+
72
+ ## <Section per content type>
73
+
74
+ <Normative rules, rubric rows, checklist items, or decision rows>
75
+
76
+ ## Validate
77
+
78
+ <One assertion per binding rule above, phrased as an observable, falsifiable claim about the
79
+ resulting artifact — a diff, a file's presence/absence, a structural shape — never a claim about
80
+ the agent's intent ("I checked X"). Prefer a mechanical check (a script, grep pattern, or diff)
81
+ wherever the rule permits one. Reserve prose assertions for genuine judgment calls, and phrase even
82
+ those as something a second, cold reader re-derives from the artifact, not something read off the
83
+ first agent's own account. Skip this section only for a pure Rubric governance, where the scored
84
+ dimensions already are the verification.>
85
+
86
+ ## References
87
+
88
+ <on-demand standards, sibling files, external HTTPS URLs — no repo file paths>
89
+ ```
90
+
91
+ Rules for the body:
92
+ - Set `user-invocable: false` — the classifier for a partial skill (a governance is loaded by name, never user-triggered)
93
+ - Lead `description` with the `"Partial Skill:"` prefix (recommended form `"Partial Skill: invoke by name only — …"`) — a self-declaration for the reader; keep it minimal and non-trigger-shaped so the harness (which still sees the description) does not auto-match it
94
+ - Do not include `## Why`, `## Rationale`, or causal prose — put that in ADRs
95
+ - Encode decisions and criteria, not facts the model already knows
96
+ - For a **Constraint set**, **Checklist**, or **Decision table** governance, write a `## Validate`
97
+ section — one checkable assertion per rule, run twice: once by the agent that just followed the
98
+ rule, as its own pre-handoff self-check, and once by a cold reader re-checking the same artifact
99
+ later. A `## Validate` section that just says "confirm you followed the rules above" does not
100
+ count — it restates the instruction instead of asserting something about the result. A pure
101
+ **Rubric** governance does not need one: its scored dimensions already serve this purpose.
102
+ - Keep each rule atomic and independently falsifiable. To decide whether a multi-clause rule splits,
103
+ ask what each clause has left to check when the other clause is false:
104
+ - **Split it** when each clause states its own demand — something still checkable when the other
105
+ clause fails. *"Every skill has a README and its description names a trigger"* splits: a skill can
106
+ have a README whose description names no trigger, and a trigger-naming description with no README.
107
+ - **Keep it as one rule** when a clause *qualifies* another — it constrains how the other clause is
108
+ satisfied rather than adding a demand of its own, so it has nothing left to check once that clause
109
+ fails. *"the description names when to trigger, and does so in the user's own phrasing"* stays one
110
+ rule: if the description names no trigger, there is no naming whose phrasing could be wrong.
111
+ The joining word does not decide this — `and` appears in both examples. Test the clause, not the seam.
112
+
113
+ ## Create symlinks
114
+
115
+ Governance files follow the same symlink convention as skills. After writing the canonical
116
+ file, create symlinks for each runtime the user targets:
117
+
118
+ | Runtime | Symlink target |
119
+ |---------|---------------|
120
+ | Claude Code | `.claude/skills/<name>/SKILL.md` → canonical path |
121
+ | Cursor | `.cursor/rules/<name>.mdc` → canonical path |
122
+
123
+ Use relative paths from the symlink location.
124
+
125
+ ## Run quality checks
126
+
127
+ After writing, evaluate the governance file against these checks:
128
+
129
+ | # | Check | Severity |
130
+ |---|-------|----------|
131
+ | G1 | `description` starts with `"Partial Skill:"` | CRITICAL |
132
+ | G2 | `user-invocable: false` present | HIGH |
133
+ | G3 | `metadata.type: governance` present | HIGH |
134
+ | G4 | No `## Why` or `## Rationale` section | HIGH |
135
+ | G5 | Body opens with `Apply when:` scope line | MEDIUM |
136
+ | G6 | All rules are atomic and independently falsifiable | MEDIUM |
137
+ | G7 | No workflow steps (numbered action sequences) | MEDIUM |
138
+ | G8 | `name` is kebab-case and matches file stem | HIGH |
139
+ | G9 | Constraint set / checklist / decision table content has a paired `## Validate` section with checkable, artifact-state assertions (not restated rules) | MEDIUM |
140
+
141
+ Report results. Fix any CRITICAL or HIGH failures before presenting the final file.
142
+
143
+ ## Report
144
+
145
+ Summarize:
146
+
147
+ - Canonical file path
148
+ - Runtime symlinks created
149
+ - Content type(s) encoded
150
+ - Quality check outcome — name every check that failed, including failures below the fix bar left unfixed
151
+ - Suggested next step: run `sdd:start-mission` (the conductor resolves the ACED roles) to spec and eval for this governance file