@event4u/agent-config 5.4.1 → 5.6.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 (92) hide show
  1. package/.agent-src/commands/image/analyse.md +51 -0
  2. package/.agent-src/commands/image/create.md +53 -0
  3. package/.agent-src/commands/image/verify.md +48 -0
  4. package/.agent-src/commands/image.md +69 -0
  5. package/.agent-src/commands/knowledge/cross-repo.md +71 -0
  6. package/.agent-src/commands/knowledge.md +2 -0
  7. package/.agent-src/commands/skill/preview.md +67 -0
  8. package/.agent-src/commands/skill.md +48 -0
  9. package/.agent-src/commands/skills/discover.md +76 -0
  10. package/.agent-src/commands/skills.md +56 -0
  11. package/.agent-src/commands/video/from-song.md +351 -0
  12. package/.agent-src/commands/video.md +19 -9
  13. package/.agent-src/contexts/authority/commit-mechanics.md +8 -0
  14. package/.agent-src/rules/commit-policy.md +3 -8
  15. package/.agent-src/rules/linked-projects-onboarding-gate.md +1 -1
  16. package/.agent-src/rules/media-sync-ground-truth.md +58 -0
  17. package/.agent-src/skills/image-analyser/SKILL.md +121 -0
  18. package/.agent-src/skills/image-analyser/canon-spec.md +109 -0
  19. package/.agent-src/skills/image-analyser/evals/triggers.json +16 -0
  20. package/.agent-src/skills/image-creator/SKILL.md +117 -0
  21. package/.agent-src/skills/image-creator/evals/triggers.json +16 -0
  22. package/.agent-src/skills/song-to-script/SKILL.md +216 -0
  23. package/.claude-plugin/marketplace.json +15 -2
  24. package/CHANGELOG.md +84 -0
  25. package/CONTRIBUTING.md +6 -0
  26. package/README.md +3 -3
  27. package/config/agent-settings.template.yml +18 -0
  28. package/dist/cli/registry.js +1 -0
  29. package/dist/cli/registry.js.map +1 -1
  30. package/dist/discovery/deprecation-report.md +1 -1
  31. package/dist/discovery/discovery-manifest.json +327 -20
  32. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  33. package/dist/discovery/discovery-manifest.summary.md +4 -4
  34. package/dist/discovery/orphan-report.md +1 -1
  35. package/dist/discovery/packs.json +24 -10
  36. package/dist/discovery/trust-report.md +3 -3
  37. package/dist/discovery/workspaces.json +20 -6
  38. package/dist/mcp/registry-manifest.json +3 -3
  39. package/dist/router.json +1 -1
  40. package/dist/server/schemas/settings.js +4 -0
  41. package/dist/server/schemas/settings.js.map +1 -1
  42. package/docs/architecture.md +3 -3
  43. package/docs/catalog.md +20 -6
  44. package/docs/contracts/benchmark-report-schema.md +12 -10
  45. package/docs/contracts/command-clusters.md +5 -1
  46. package/docs/contracts/cross-repo-retrieval.md +64 -0
  47. package/docs/contracts/rule-router.md +39 -0
  48. package/docs/contracts/skill-discovery.md +80 -0
  49. package/docs/contracts/skill-dry-run.md +47 -0
  50. package/docs/contracts/value-dashboard-spec.md +7 -3
  51. package/docs/contracts/value-report-schema.md +6 -1
  52. package/docs/decisions/ADR-032-linked-projects-scope.md +7 -3
  53. package/docs/getting-started.md +2 -2
  54. package/docs/guides/cross-repo-linked-projects.md +7 -0
  55. package/docs/guides/cross-repo-retrieval.md +61 -0
  56. package/docs/guides/skill-discovery.md +71 -0
  57. package/docs/guides/skill-preview.md +71 -0
  58. package/docs/value.md +17 -17
  59. package/package.json +1 -1
  60. package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  61. package/scripts/_dispatch.bash +10 -0
  62. package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  63. package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  64. package/scripts/_lib/bench_report.py +13 -14
  65. package/scripts/_lib/bench_telegraph_report.py +1 -2
  66. package/scripts/_lib/token_count.py +95 -0
  67. package/scripts/_lib/value_report.py +3 -3
  68. package/scripts/ai-video/adapters/higgsfield.sh +163 -6
  69. package/scripts/ai-video/adapters/openai-images.sh +92 -6
  70. package/scripts/ai-video/lib/probe-audio.sh +181 -0
  71. package/scripts/audit_auto_rules.py +22 -6
  72. package/scripts/audit_command_surface.py +6 -1
  73. package/scripts/audit_initial_context.py +210 -0
  74. package/scripts/bench_ab_diff.py +4 -11
  75. package/scripts/bench_run.py +2 -3
  76. package/scripts/bench_runner.py +2 -2
  77. package/scripts/condense.py +44 -3
  78. package/scripts/cross_repo_retrieve.py +172 -0
  79. package/scripts/inventory_meta_layers.py +288 -0
  80. package/scripts/iron_law_sha.py +14 -5
  81. package/scripts/linked_projects_list.py +91 -0
  82. package/scripts/measure_rule_budget.py +15 -0
  83. package/scripts/memory_lookup.py +53 -2
  84. package/scripts/project_thin_rules.py +168 -0
  85. package/scripts/render_value_md.py +14 -23
  86. package/scripts/schemas/command.schema.json +1 -1
  87. package/scripts/schemas/rule.schema.json +1 -1
  88. package/scripts/schemas/skill.schema.json +2 -2
  89. package/scripts/skill_discovery.py +254 -0
  90. package/scripts/skill_linter.py +8 -4
  91. package/scripts/skill_preview.py +179 -0
  92. package/scripts/trigger_coverage.py +129 -0
@@ -0,0 +1,51 @@
1
+ ---
2
+ model_tier: high
3
+ name: image:analyse
4
+ tier: 2
5
+ cluster: image
6
+ sub: analyse
7
+ description: Analyse a character image down to the smallest mole and diff it against a canon — per-feature spec, OCR tattoo text, severity-ranked drift report.
8
+ personas: [hollywood-director]
9
+ skills: [image-analyser]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "analyse a character image, check character accuracy, does this render match the canon, find what drifted"
13
+ trigger_context: "user supplies an image path/URL (and optionally a character id) and wants a detailed feature extraction or canon diff"
14
+ workspaces:
15
+ - agent-config-maintainer
16
+ packs:
17
+ - meta
18
+ ---
19
+
20
+ # /image:analyse
21
+
22
+ Run the [`image-analyser`](../../skills/image-analyser/SKILL.md) skill on an
23
+ image. Args: `<path-or-url>` (required) `[character-id]` (optional — the canon
24
+ to diff against, e.g. `veikko`).
25
+
26
+ ## Steps
27
+
28
+ 1. **Resolve the image** — accept a path or public URL. Apply the input gate
29
+ (refuse blurry / sub-resolution / unreadable; per the `image-ocr` contract).
30
+ 2. **Governance check** — real-person likeness → route through
31
+ [`media-governance-routing`](../rules/media-governance-routing.md) first.
32
+ 3. **Run `image-analyser`** — section-by-section extraction (the "down to the
33
+ smallest mole" pass), OCR sub-pass for lettered tattoos, hard-feature
34
+ enhancement on low-confidence regions. Emit the Layer-2 observation
35
+ (per-feature `confidence` + `unverifiable[]`).
36
+ 4. **If `[character-id]` is given** — diff against
37
+ `agents/reference/ai-video/<project>/characters/<id>.json` per the rubric in
38
+ [`canon-spec.md`](../../skills/image-analyser/canon-spec.md): per-feature
39
+ `match|partial|miss`, the canon-breaking hard gate, per-section scores.
40
+
41
+ ## Output
42
+
43
+ 1. Observation JSON (Layer 2).
44
+ 2. Diff table (if a canon was given): `feature · severity · expected · observed · verdict · confidence · fix`.
45
+ 3. Verdict line: `GATE: pass|FAIL` + per-section scores.
46
+
47
+ ## Rules
48
+
49
+ - **Do NOT commit, push, or open a PR.**
50
+ - **The image wins over the text** — never invent an unseen feature; mark it `unverifiable`.
51
+ - **Read-only** — analysis only; generation is `/image:create`.
@@ -0,0 +1,53 @@
1
+ ---
2
+ model_tier: high
3
+ name: image:create
4
+ tier: 2
5
+ cluster: image
6
+ sub: create
7
+ description: Generate a character image to spec — assemble a max-fidelity, anchors-first prompt from a Canon Spec; governance- and provider-gated, dry-run by default.
8
+ personas: [hollywood-director]
9
+ skills: [image-creator, character-consistency]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "generate this character, render to spec, create the image, make every feature match the canon"
13
+ trigger_context: "user supplies a character id (and a scene brief) and wants a maximally-accurate generation prompt or render"
14
+ workspaces:
15
+ - agent-config-maintainer
16
+ packs:
17
+ - meta
18
+ ---
19
+
20
+ # /image:create
21
+
22
+ Run the [`image-creator`](../../skills/image-creator/SKILL.md) skill. Args:
23
+ `<character-id>` (required) `"<scene>"` (setting + pose). Optional: a prior
24
+ `/image:analyse` diff to fold in (loop mode).
25
+
26
+ ## Steps
27
+
28
+ 1. **Governance gate FIRST** — real-person likeness → route through
29
+ [`media-governance-routing`](../rules/media-governance-routing.md) +
30
+ `agents/settings/policies/media/` before emitting anything.
31
+ 2. **Provider gate** — read the resolved provider's tier; non-stable
32
+ (experimental/deprecated/community) → surface the tier and **ask** before
33
+ any live call (per
34
+ [`provider-lifecycle-discipline`](../rules/provider-lifecycle-discipline.md)).
35
+ `AIV_DRYRUN=true` is the default.
36
+ 3. **Assemble the prompt, anchors first** — load the Canon Spec; front-load the
37
+ hard-to-render `identity_anchors` (heterochromia, hair-split), then physique,
38
+ face + marks, per-location tattoos (exact `text`), outfit, jewelry; add the
39
+ asymmetry block + negative block + engine settings.
40
+ 4. **Generate** through the existing adapter layer (`scripts/ai-video/adapters/`)
41
+ only on explicit confirmation. **Verify** the output with `/image:verify`.
42
+
43
+ ## Output
44
+
45
+ 1. Generation prompt — anchors · positive · asymmetry · negative · engine settings.
46
+ 2. Provider + tier line (the audit entry).
47
+ 3. The `/image:verify` call to run on the result.
48
+
49
+ ## Rules
50
+
51
+ - **Do NOT commit, push, or open a PR.**
52
+ - **No live provider call without explicit per-turn confirmation** + a stable (or confirmed non-stable) provider.
53
+ - **Never claim "canon-perfect"** without an `image-analyser` verify pass (per `verify-before-complete`).
@@ -0,0 +1,48 @@
1
+ ---
2
+ model_tier: high
3
+ name: image:verify
4
+ tier: 2
5
+ cluster: image
6
+ sub: verify
7
+ description: Verify a candidate render against its canon — run the analyser in loop mode, emit the gate verdict + remaining diff, halt-and-surface on non-pass.
8
+ personas: [hollywood-director]
9
+ skills: [image-analyser]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "verify this render, does the generated image pass the canon, re-check fidelity after regeneration, loop-verify"
13
+ trigger_context: "user has a generated candidate image + a character id and wants the canon-fidelity gate verdict"
14
+ workspaces:
15
+ - agent-config-maintainer
16
+ packs:
17
+ - meta
18
+ ---
19
+
20
+ # /image:verify
21
+
22
+ The verify step of the fidelity loop — runs
23
+ [`image-analyser`](../../skills/image-analyser/SKILL.md) on a candidate render
24
+ against its canon and reports the loop stop-state. Args: `<path-or-url>`
25
+ (required) `<character-id>` (required).
26
+
27
+ ## Steps
28
+
29
+ 1. **Analyse + diff** — run `image-analyser` on the candidate against
30
+ `agents/reference/ai-video/<project>/characters/<id>.json` (the rubric in
31
+ [`canon-spec.md`](../../skills/image-analyser/canon-spec.md)).
32
+ 2. **Apply the loop stop conditions** — PASS (canon-breaking gate clear + every
33
+ per-section score ≥ threshold) · plateau · oscillation · budget.
34
+ 3. **Non-PASS → halt and surface** the best candidate + its remaining diff +
35
+ the concrete correction directives to feed back into `/image:create`. Never
36
+ silently accept drift (per `verify-before-complete`).
37
+
38
+ ## Output
39
+
40
+ 1. `GATE: pass|FAIL` + per-section scores.
41
+ 2. Remaining diff (canon-breaking + major misses) with per-miss fixes.
42
+ 3. Loop verdict: `PASS` | `continue (feed fixes to /image:create)` | `halt (plateau/oscillation/budget)`.
43
+
44
+ ## Rules
45
+
46
+ - **Do NOT commit, push, or open a PR.**
47
+ - **Read-only** — verification only; regeneration is `/image:create`.
48
+ - **The human approves the final** — the loop proposes, never declares canon-perfect on its own.
@@ -0,0 +1,69 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: image
4
+ tier: 2
5
+ cluster: image
6
+ description: Character-image fidelity orchestrator — analyse, create, and verify a character image against its canon. Routes to analyse, create, verify.
7
+ type: orchestrator
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "analyse a character image against a canon, generate a character image to spec, verify a render's fidelity, character-image accuracy"
11
+ trigger_context: "user supplies a character image or character id and wants analysis, generation, or canon-fidelity verification"
12
+ workspaces:
13
+ - agent-config-maintainer
14
+ packs:
15
+ - meta
16
+ ---
17
+
18
+ # /image
19
+
20
+ Top-level orchestrator for the `/image:*` family — character-image
21
+ **fidelity** work: analyse an image down to the smallest mole, generate one
22
+ to spec, verify a candidate against its **Canon Spec**. Schema, rubric, and
23
+ the create→analyse→regenerate loop: [`canon-spec.md`](../../skills/image-analyser/canon-spec.md).
24
+ Generation is a paid surface: every live provider call is **dry-run /
25
+ refuse-and-surface by default** and needs explicit per-turn confirmation per
26
+ [`provider-lifecycle-discipline`](../rules/provider-lifecycle-discipline.md).
27
+
28
+ ## Sub-commands
29
+
30
+ | Sub-command | Routes to | Purpose |
31
+ |---|---|---|
32
+ | `/image:analyse <path-or-url> [character-id]` | `commands/image/analyse.md` | Extract a full per-feature spec from an image; diff against a canon, flag drift down to the smallest mole |
33
+ | `/image:create <character-id> "<scene>"` | `commands/image/create.md` | Assemble a max-fidelity, anchors-first generation prompt from a Canon Spec; governance- + provider-gated |
34
+ | `/image:verify <path-or-url> <character-id>` | `commands/image/verify.md` | Loop-verify a candidate render against its canon; emit the gate verdict + remaining diff |
35
+
36
+ ## Dispatch
37
+
38
+ 1. Parse `/image <sub-command> [args]`. Sub-command = first token; match
39
+ against the table's exact names only. A token that is a **file path or
40
+ URL** (contains `/`, `.`, or a known image extension — e.g. `img_2.png`,
41
+ `shots/veikko.jpg`) is NOT a sub-command: it is the image argument for
42
+ `analyse` / `verify`. Never treat `img_2.png` as the `analyse`
43
+ sub-command. On this ambiguity → ask rather than best-guess.
44
+ 2. Look up the sub-command and execute its file verbatim with the remaining args.
45
+ 3. Unknown / missing sub-command → print the table and ask:
46
+
47
+ > 1. analyse — extract + diff an image against a canon
48
+ > 2. create — generate a character image to spec
49
+ > 3. verify — loop-verify a render's fidelity
50
+
51
+ ## Rules
52
+
53
+ - **Do NOT commit, push, or open a PR** — subcommands never do this.
54
+ - **Do NOT chain subcommands.** One `/image <sub>` per turn.
55
+ - **Generation is a paid, gated surface.** `create` never fires a live
56
+ provider call without surfacing the provider tier and an explicit
57
+ per-turn confirmation; mirrors
58
+ [`non-destructive-by-default`](../rules/non-destructive-by-default.md)
59
+ and [`provider-lifecycle-discipline`](../rules/provider-lifecycle-discipline.md).
60
+ - **Governance first.** A real-person likeness routes through
61
+ [`media-governance-routing`](../rules/media-governance-routing.md)
62
+ before any prompt is emitted.
63
+ - **Edit `.agent-src.uncondensed/` only.** Generated mirrors regenerate.
64
+
65
+ ## See also
66
+
67
+ - [`image-analyser`](../../skills/image-analyser/SKILL.md) · [`image-creator`](../../skills/image-creator/SKILL.md) — the skills these commands invoke.
68
+ - [`canon-spec.md`](../../skills/image-analyser/canon-spec.md) — schema, fidelity rubric, fidelity loop.
69
+ - [`docs/contracts/command-clusters.md`](../../docs/contracts/command-clusters.md) — `image` cluster registration.
@@ -0,0 +1,71 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: knowledge:cross-repo
4
+ tier: 2
5
+ cluster: knowledge
6
+ sub: cross-repo
7
+ description: Targeted, read-only retrieval over opted-in linked-project siblings (ADR-032 Option A). Pulls a shared type / API contract / config without bulk-including sibling files.
8
+ skills: [file-editor]
9
+ suggestion:
10
+ eligible: true
11
+ trigger_description: "what does the frontend expect, find the shared type in the other repo, check the sibling repo's API contract, /knowledge:cross-repo <query>"
12
+ trigger_context: "user needs context that lives in an attached sibling repo without copying its files in"
13
+ workspaces:
14
+ - agent-config-maintainer
15
+ packs:
16
+ - meta
17
+ ---
18
+
19
+ # /knowledge cross-repo
20
+
21
+ Targeted, **read-only** retrieval across the IDE-attached sibling repos the user
22
+ has opted into (`linked_projects[].include: true`). Returns a bounded set of
23
+ matches — a shared type, an API contract the frontend consumes, a config the
24
+ sibling owns — **without bulk-including** any sibling file. Implements
25
+ [`cross-repo-retrieval`](../../../docs/contracts/cross-repo-retrieval.md) and
26
+ stays inside [ADR-032](../../../docs/decisions/ADR-032-linked-projects-scope.md)
27
+ Option A.
28
+
29
+ ## Prerequisites
30
+
31
+ - Python 3.10+ on the host.
32
+ - At least one sibling opted in (`agent-config linked-projects:list` shows them).
33
+ No opted-in sibling → the command is inert with a clear message.
34
+
35
+ ## Steps
36
+
37
+ ### 1. Parse the query
38
+
39
+ `/knowledge cross-repo "<query>" [--path-scope <glob>]`. The query is one
40
+ concept (≥ 1 term > 2 chars). A `--path-scope` glob narrows the search and is
41
+ **required** for `large`-flagged siblings.
42
+
43
+ ### 2. Run the retrieval
44
+
45
+ ```bash
46
+ python3 scripts/cross_repo_retrieve.py "<query>" [--path-scope <glob>] [--max-chunks 8]
47
+ ```
48
+
49
+ The script reads opted-in siblings only, runs a targeted path-glob + content
50
+ grep (never a full walk), redacts secrets/PII from every chunk, and returns the
51
+ retrieval envelope.
52
+
53
+ ### 3. Present matches
54
+
55
+ Render the table: `source_repo · path · freshness · why`. Each row names the
56
+ source sibling, the path inside it, the last-commit/mtime freshness stamp, and
57
+ why it matched. Use the chunks as *context*, never as files to copy wholesale.
58
+
59
+ ### 4. Honour the scope guards
60
+
61
+ - A `large` sibling without `--path-scope` is skipped with a note — re-run with
62
+ a scope. Do not remove the guard.
63
+ - A sibling not `include: true` is never read.
64
+
65
+ ## Rules
66
+
67
+ - **Read-only.** Never write to a sibling. Out-of-root writes still pass the
68
+ host permission gate; this surface writes nothing.
69
+ - **Opt-in only, targeted only.** No full-tree sweep; no implicit inclusion.
70
+ - **Secrets never cross repos** — the chunk redactor runs before any text is shown.
71
+ - **One concept per invocation.** Do not chain.
@@ -33,6 +33,7 @@ contract — input shapes, bounds, redaction defaults, storage layout.
33
33
  | `/knowledge ingest` | `commands/knowledge/ingest.md` | Walk a local path, redact, chunk, persist to `agents/memory/knowledge/<ingest-id>/` |
34
34
  | `/knowledge list` | `commands/knowledge/list.md` | List existing ingests (table or JSON); pin / unpin by id prefix |
35
35
  | `/knowledge forget` | `commands/knowledge/forget.md` | Drop a single ingest by id prefix (atomic, no partial state) |
36
+ | `/knowledge cross-repo` | `commands/knowledge/cross-repo.md` | Targeted read-only retrieval over opted-in linked-project siblings (ADR-032 Option A) |
36
37
 
37
38
  Sub-command names match the locked contract in
38
39
  [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
@@ -48,6 +49,7 @@ Sub-command names match the locked contract in
48
49
  > 1. ingest — point at a local folder, `.zip`, or file
49
50
  > 2. list — show what's already ingested (`--pin` / `--unpin` to flag)
50
51
  > 3. forget — drop an ingest by id prefix
52
+ > 4. cross-repo — targeted read-only retrieval over opted-in siblings
51
53
 
52
54
  ## Rules
53
55
 
@@ -0,0 +1,67 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: skill:preview
4
+ tier: 2
5
+ cluster: skill
6
+ sub: preview
7
+ description: Non-destructive preview of a skill — its declared steps, execution type, allowed tools, and file/command targets — before you run it. Read-only, no execution.
8
+ skills: [file-editor]
9
+ suggestion:
10
+ eligible: true
11
+ trigger_description: "what does this skill do, preview <skill> before running, what will it change, is it safe, /skill:preview competitive-positioning"
12
+ trigger_context: "user wants to inspect a skill's declared intent before committing to run it"
13
+ workspaces:
14
+ - agent-config-maintainer
15
+ packs:
16
+ - meta
17
+ ---
18
+
19
+ # /skill preview
20
+
21
+ Renders a skill's **declared intent** — its `## Steps`, execution type, handler,
22
+ `allowed_tools`, and any file/command targets named in its body — so you can
23
+ decide whether to run it. Read-only, no network, no execution. Implements the
24
+ [`skill-dry-run`](../../../docs/contracts/skill-dry-run.md) contract.
25
+
26
+ ## Prerequisites
27
+
28
+ - Python 3.10 + PyYAML on the host.
29
+ - A skill name that resolves to `.agent-src/skills/<name>/SKILL.md`.
30
+
31
+ ## Steps
32
+
33
+ ### 1. Parse the argument
34
+
35
+ `/skill preview <name> [--technical]`. The name is the first positional
36
+ argument. Missing name → print usage and stop.
37
+
38
+ ### 2. Run the previewer
39
+
40
+ ```bash
41
+ python3 scripts/skill_preview.py <name>
42
+ ```
43
+
44
+ Add `--technical` for the raw frontmatter + numbered step list; default is the
45
+ plain-language summary. `--format json` is machine-readable.
46
+
47
+ ### 3. Present the summary
48
+
49
+ Show the plain-language preview: the skill's execution type (a manual-execution skill
50
+ renders **"instructional only — no automatic execution"**; an assisted-execution skill
51
+ renders its proposed actions), declared steps, tools, and any file/command
52
+ targets. End on the contract reminder that preview shows *declared intent*, not
53
+ a guarantee of side-effect-freeness.
54
+
55
+ ### 4. Hand back the decision
56
+
57
+ Preview never runs the skill. After showing it, let the user decide whether to
58
+ invoke the skill — that is the safe adoption loop:
59
+ `/skills:discover` → `/skill:preview` → run.
60
+
61
+ ## Rules
62
+
63
+ - **Read-only, no execution.** Preview inspects the SKILL.md; it does not run it.
64
+ - **Not a sandbox** — it cannot prove a skill is harmless; it shows what the
65
+ skill *declares* it will touch.
66
+ - **Malformed / missing SKILL.md → a structured error**, never a crash.
67
+ - **One skill per invocation.**
@@ -0,0 +1,48 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: skill
4
+ tier: 2
5
+ description: Single-skill orchestrator — routes to preview. Non-destructive "what will this skill do?" before you run it.
6
+ cluster: skill
7
+ type: orchestrator
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "what does this skill do, preview this skill before running, is this skill safe to run, what will it change, /skill:preview <name>"
11
+ trigger_context: "user wants to see a skill's declared steps + targets before committing to running it"
12
+ workspaces:
13
+ - agent-config-maintainer
14
+ packs:
15
+ - meta
16
+ ---
17
+
18
+ # /skill
19
+
20
+ Top-level orchestrator for the `/skill` family — **single-skill** operations
21
+ (singular `skill` for one target; plural `/skills` is the catalog-wide
22
+ discovery cluster). Today it carries one verb: `preview`.
23
+
24
+ Anchors: [`skill-dry-run`](../docs/contracts/skill-dry-run.md) contract —
25
+ what "preview" means, the explicit non-goals, and the surface.
26
+
27
+ ## Sub-commands
28
+
29
+ | Sub-command | Routes to | Purpose |
30
+ |---|---|---|
31
+ | `/skill preview` | `commands/skill/preview.md` | Render a skill's declared steps, execution type, tools, and file/command targets before running it |
32
+
33
+ Sub-command names match the locked contract in
34
+ [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
35
+
36
+ ## Dispatch
37
+
38
+ 1. Parse the user's argument: `/skill <sub-command> [args]`.
39
+ 2. Look up the sub-command in the table above.
40
+ 3. Load the body of the routed file and follow its `## Steps` section verbatim.
41
+ 4. Unknown / missing sub-command → route to `preview` (the only verb today).
42
+
43
+ ## Rules
44
+
45
+ - **Read-only.** Preview reads a skill's SKILL.md; it never runs the skill.
46
+ - **Not a sandbox.** Preview surfaces *declared intent*, not a guarantee of
47
+ side-effect-freeness — a contract non-goal.
48
+ - **One skill per invocation.** Do not chain.
@@ -0,0 +1,76 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: skills:discover
4
+ tier: 2
5
+ cluster: skills
6
+ sub: discover
7
+ description: Recommend skills for a role — ranked by four explained classes (most-useful-for-role, related-to-current-task, recently-adopted, popular-in-role). Local-only; every result carries a why.
8
+ skills: [file-editor]
9
+ suggestion:
10
+ eligible: true
11
+ trigger_description: "which skills should I use, recommend skills for my role, what fits this work, help me find a skill, /skills:discover sales"
12
+ trigger_context: "user wants a short, explained skill shortlist instead of scanning the 220-skill catalog"
13
+ workspaces:
14
+ - agent-config-maintainer
15
+ packs:
16
+ - meta
17
+ ---
18
+
19
+ # /skills discover
20
+
21
+ Surfaces a short, explained skill shortlist for a role. Reuses existing local
22
+ signals only — the skill catalog frontmatter, the role's `skills.yml`
23
+ shortlist, and (when present and not opted out) the local-analytics JSONL.
24
+ Implements the [`skill-discovery`](../../../docs/contracts/skill-discovery.md)
25
+ contract. Local-only, read-only, no network.
26
+
27
+ ## Prerequisites
28
+
29
+ - Python 3.10 + PyYAML on the host (already a package dependency).
30
+ - A role id — passed as `[role]`, or the active role from
31
+ `.agent-settings.yml` → `roles.active_role`.
32
+
33
+ ## Steps
34
+
35
+ ### 1. Resolve the role
36
+
37
+ The user invokes `/skills discover [role]`. The role is the first positional
38
+ argument. If omitted, the recommender falls back to `roles.active_role`. If
39
+ neither resolves, it prints the available roles and stops — do not guess.
40
+
41
+ ### 2. Run the recommender
42
+
43
+ ```bash
44
+ python3 scripts/skill_discovery.py --role <role>
45
+ ```
46
+
47
+ Optional flags: `--format json` (machine-readable), `--limit N` (results per
48
+ class, default 5). The script is pure-local and writes nothing.
49
+
50
+ ### 3. Present the table
51
+
52
+ Render the recommender's Markdown table to the user:
53
+ `skill · class · why · first command`. Each row's `why` names the *signal*
54
+ (role match, domain adjacency, recent adoption, role popularity) — never a
55
+ bare score. The four classes are:
56
+
57
+ - `most-useful-for-role` — the role's priority shortlist.
58
+ - `related-to-current-task` — same-domain peers not already shortlisted.
59
+ - `recently-adopted` — used recently in this workspace (analytics) or the
60
+ shortlist tail when no usage signal exists yet.
61
+ - `popular-in-role` — launched most by this role locally (analytics) or the
62
+ shortlist when no usage signal exists yet.
63
+
64
+ ### 4. Offer the first command
65
+
66
+ Each row carries a `first command` — the natural way to start with that skill.
67
+ Suggest the user pick one and run it. Do **not** auto-invoke a skill.
68
+
69
+ ## Rules
70
+
71
+ - **Local-only, read-only.** No network, no writes, no prompt/response bodies.
72
+ - **Every result has a non-empty `why`** — a contract invariant.
73
+ - **Analytics opt-out honoured.** `AGENT_CONFIG_NO_LOCAL_ANALYTICS` env or
74
+ `analytics.local: off` → the analytics-backed classes fall back to the role
75
+ shortlist with an honest `why`; the surface never fabricates a usage signal.
76
+ - **One role per invocation.** Do not chain.
@@ -0,0 +1,56 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: skills
4
+ tier: 2
5
+ description: Skill discovery orchestrator — routes to discover. Local, explained skill recommendations over the catalog + role shortlists + optional local analytics.
6
+ cluster: skills
7
+ type: orchestrator
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "which skills should I use, recommend skills for my role, what skills fit this work, I can't find the right skill, /skills:discover"
11
+ trigger_context: "user is lost in the 220-skill catalog and wants a short, explained shortlist for their role"
12
+ workspaces:
13
+ - agent-config-maintainer
14
+ packs:
15
+ - meta
16
+ ---
17
+
18
+ # /skills
19
+
20
+ Top-level orchestrator for the `/skills` family — the **skill discovery**
21
+ cluster. Turns existing local signals (the skill catalog, the active role's
22
+ shortlist, and optional local analytics) into a short, *explained*
23
+ recommendation list. Local-only, no network, honours the analytics opt-out.
24
+
25
+ Anchors: [`skill-discovery`](../docs/contracts/skill-discovery.md) contract —
26
+ input signals, the four recommendation classes, and the non-negotiable
27
+ `why`-per-result requirement.
28
+
29
+ ## Sub-commands
30
+
31
+ | Sub-command | Routes to | Purpose |
32
+ |---|---|---|
33
+ | `/skills discover` | `commands/skills/discover.md` | Rank skills for a role by four explained classes (most-useful / related / recently-adopted / popular) |
34
+
35
+ Sub-command names match the locked contract in
36
+ [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
37
+
38
+ ## Dispatch
39
+
40
+ 1. Parse the user's argument: `/skills <sub-command> [args]`.
41
+ 2. Look up the sub-command in the table above.
42
+ 3. Load the body of the routed file and follow its `## Steps` section
43
+ verbatim with the remaining args.
44
+ 4. If the sub-command is unknown or missing, route to `discover` (the only
45
+ sub-command today) and print its menu.
46
+
47
+ ## Rules
48
+
49
+ - **Local-only.** The recommender reads local files only — the catalog, the
50
+ role `skills.yml`, and (if present and not opted out) the local-analytics
51
+ JSONL. No network, no writes.
52
+ - **Every recommendation carries a `why`.** Never surface an unexplained
53
+ score — this is a contract invariant.
54
+ - **Honours the analytics opt-out** (`AGENT_CONFIG_NO_LOCAL_ANALYTICS` env or
55
+ `analytics.local: off`); degrades to catalog + role shortlist gracefully.
56
+ - **Do NOT chain sub-commands.** One `/skills <sub>` per turn.