agent-skillboard 0.2.18 → 0.3.1

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 (82) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +161 -255
  3. package/bin/postinstall.mjs +2 -1
  4. package/docs/adapters.md +37 -113
  5. package/docs/ai-skill-routing-goal.md +41 -108
  6. package/docs/capabilities.md +17 -104
  7. package/docs/install.md +70 -473
  8. package/docs/policy-model.md +50 -280
  9. package/docs/positioning.md +19 -86
  10. package/docs/profiles.md +21 -153
  11. package/docs/reference.md +133 -362
  12. package/docs/rollout-runbook.md +23 -25
  13. package/docs/routing.md +23 -90
  14. package/docs/user-flow.md +68 -279
  15. package/docs/value-proof.md +23 -181
  16. package/docs/variant-lifecycle.md +47 -67
  17. package/docs/versioning.md +49 -269
  18. package/examples/v2-multi-source.config.yaml +35 -0
  19. package/examples/v2-policy-error.config.yaml +6 -0
  20. package/package.json +1 -1
  21. package/src/advisor/actions.mjs +102 -6
  22. package/src/advisor/application-commands.mjs +10 -9
  23. package/src/advisor/apply-action.mjs +74 -1
  24. package/src/advisor/guidance.mjs +24 -16
  25. package/src/advisor/schema.mjs +17 -6
  26. package/src/advisor/skills.mjs +18 -5
  27. package/src/advisor.mjs +27 -9
  28. package/src/agent-integration-cli.mjs +96 -13
  29. package/src/agent-integration-content.mjs +21 -11
  30. package/src/agent-integration-files.mjs +1 -1
  31. package/src/agent-integration-home.mjs +14 -1
  32. package/src/agent-inventory-platforms.mjs +21 -8
  33. package/src/agent-inventory.mjs +44 -16
  34. package/src/agent-root-registry.mjs +127 -0
  35. package/src/agent-skill-import.mjs +2 -2
  36. package/src/agent-skill-roots.mjs +70 -13
  37. package/src/audit-paths.mjs +42 -0
  38. package/src/brief-cli.mjs +3 -2
  39. package/src/brief-renderer.mjs +1 -0
  40. package/src/cli.mjs +521 -235
  41. package/src/compatibility.mjs +24 -0
  42. package/src/control/can-use-guard.mjs +21 -1
  43. package/src/control/config-write.mjs +32 -2
  44. package/src/control/skill-crud.mjs +5 -0
  45. package/src/control/v2-guard.mjs +175 -0
  46. package/src/control/v2-skill-crud.mjs +32 -0
  47. package/src/control/v2-skill-forget.mjs +38 -0
  48. package/src/control/variant-status.mjs +47 -1
  49. package/src/control.mjs +55 -0
  50. package/src/doctor.mjs +71 -5
  51. package/src/domain/v2-policy.mjs +111 -0
  52. package/src/hook-plan.mjs +33 -3
  53. package/src/impact.mjs +52 -29
  54. package/src/index.mjs +25 -1
  55. package/src/init.mjs +50 -34
  56. package/src/install-health.mjs +177 -0
  57. package/src/inventory-install-units.mjs +63 -0
  58. package/src/inventory-json.mjs +279 -0
  59. package/src/inventory-refresh.mjs +168 -19
  60. package/src/lifecycle-cli.mjs +40 -12
  61. package/src/lifecycle-content.mjs +52 -67
  62. package/src/migration/v1-to-v2.mjs +212 -0
  63. package/src/migration/v2-files.mjs +211 -0
  64. package/src/migration/v2-journal.mjs +169 -0
  65. package/src/migration/v2-projection.mjs +108 -0
  66. package/src/migration/v2-transaction.mjs +205 -0
  67. package/src/policy.mjs +3 -0
  68. package/src/reconcile.mjs +139 -111
  69. package/src/report.mjs +168 -148
  70. package/src/review.mjs +2 -0
  71. package/src/route-advisory.mjs +47 -2
  72. package/src/route-selection.mjs +38 -2
  73. package/src/route.mjs +62 -2
  74. package/src/shared-skill-reconcile.mjs +97 -0
  75. package/src/shared-skill.mjs +325 -0
  76. package/src/source-digest.mjs +42 -0
  77. package/src/source-profiles.mjs +171 -144
  78. package/src/source-verification.mjs +32 -48
  79. package/src/uninstall.mjs +22 -0
  80. package/src/user-state-paths.mjs +19 -0
  81. package/src/user-uninstall.mjs +161 -0
  82. package/src/workspace.mjs +119 -79
@@ -1,197 +1,39 @@
1
1
  # SkillBoard Value Proof
2
2
 
3
- This is the README-facing proof that SkillBoard gives a user more useful control
4
- than manually inspecting `/skills` or a raw workflow skill list.
5
-
6
- The proof is executable:
7
-
8
- ```bash
9
- node --test test/readme-value-proof.test.mjs
10
- ```
11
-
12
- The test uses repository fixtures, not a mocked string. It drives the same CLI
13
- surfaces a user or agent would use.
14
-
15
- ## GitHub-reader takeaway
16
-
17
- The raw list answers inventory questions: which skill declarations are connected
18
- to this workflow?
19
-
20
- SkillBoard answers routing questions: which skills can actually run now, why
21
- are others blocked, which skill should steer the user's current request when
22
- several skills overlap, and what approved action changes the next state?
23
-
24
- In the tested fixture, the raw list can make the workflow look ready because it
25
- shows `matt.tdd active workflow-auto`. SkillBoard refuses that unsafe claim and
26
- reports 0 usable skills, 8 blocked skills, 2 policy errors, and 1 policy warning
27
- before invocation.
28
-
29
- ## Case 1: Raw skill list vs SkillBoard brief
30
-
31
- Fixture:
32
-
33
- ```bash
34
- examples/skillboard.config.yaml
35
- examples/skills
36
- ```
37
-
38
- `examples/skillboard.config.yaml` is an intentional policy-failure fixture. It
39
- is not the passing starter example; it exists to prove that SkillBoard refuses a
40
- raw-list availability claim when policy health fails.
41
-
42
- Workflow:
43
-
44
- ```bash
45
- codex-night-workflow
46
- ```
47
-
48
- Raw skill list command:
49
-
50
- ```bash
51
- node bin/skillboard.mjs list skills \
52
- --config examples/skillboard.config.yaml \
53
- --skills examples/skills \
54
- --workflow codex-night-workflow
55
- ```
56
-
57
- Observed raw-list result:
58
-
59
- - Raw skill list: 4 workflow-linked rows.
60
- - It includes `matt.tdd active workflow-auto`.
61
- - It does not include policy health.
62
-
63
- SkillBoard brief command:
3
+ The executable proof is the v2 contract and integration suite:
64
4
 
65
5
  ```bash
66
- node bin/skillboard.mjs brief \
67
- --config examples/skillboard.config.yaml \
68
- --skills examples/skills \
69
- --workflow codex-night-workflow
6
+ node --test test/v2-agent-sharing.test.mjs test/v2-onboarding-behavior.test.mjs test/v2-guard-route.test.mjs test/v2-surface-integration.test.mjs
70
7
  ```
71
8
 
72
- Observed brief result:
9
+ ## What it proves
73
10
 
74
- - SkillBoard brief: 0 usable skills.
75
- - 8 blocked skills.
76
- - Policy errors: 2.
77
- - Policy warnings: 1.
78
- - The policy diagnostics identify `matt.grill-with-docs` as a non-callable
79
- fallback in `requirement-review`.
11
+ - Setup creates user-level state without project init.
12
+ - Valid discovered skills default to enabled and agent-local.
13
+ - Disabled skills and skills absent from the selected agent are denied.
14
+ - Share and unshare preserve agent-owned originals.
15
+ - Optional preference changes ranking without changing availability.
16
+ - Source and provenance audits do not change guard results.
17
+ - Commands produce the same result from different working directories.
18
+ - Version 1 is read-only until explicit migration.
80
19
 
81
- What this proves:
82
-
83
- - The raw list can make a workflow look usable because it reports declared
84
- state such as `active` and `workflow-auto`.
85
- - The SkillBoard brief checks policy health before use and refuses the unsafe
86
- availability claim.
87
-
88
- ## Case 2: Approved action-card flow
89
-
90
- Fixture:
91
-
92
- ```bash
93
- examples/multi-source.config.yaml
94
- examples/multi-source-skills
95
- ```
96
-
97
- The test copies this fixture to a temporary project, including `AGENTS.md` and
98
- `CLAUDE.md`, then runs:
99
-
100
- ```bash
101
- node bin/skillboard.mjs brief ... --include-actions --json
102
- node bin/skillboard.mjs apply-action activate-skill:anthropic.docx ... --yes --json
103
- node bin/skillboard.mjs brief ... --json
104
- ```
105
-
106
- Observed action-card flow result:
107
-
108
- - Before apply, usable skills: 2.
109
- - The current action list includes `activate-skill:anthropic.docx`.
110
- - Applying that one approved action returns `changed: true`.
111
- - After apply, usable skills: 2 -> 3.
112
- - `anthropic.docx` appears in `manual_allowed`.
113
- - The final brief has 0 policy errors.
114
-
115
- What this proves:
116
-
117
- - SkillBoard is not just a catalog. It gives a current action id, applies one
118
- approved change, then re-resolves the next availability state.
119
- - The user does not need to hand-edit YAML or infer enable/disable impact from
120
- raw `SKILL.md` files.
121
-
122
- ## Case 3: AI-mediated approved action proof
123
-
124
- The test also simulates the product path without calling an external LLM:
20
+ ## Reproduce the user surface
125
21
 
126
22
  ```bash
127
- node bin/skillboard.mjs brief ... --include-actions --json
128
- node bin/skillboard.mjs apply-action <current-action-id> ... --yes --json
129
- node bin/skillboard.mjs guard use anthropic.docx ... --json
130
- node bin/skillboard.mjs guard use matt.grill-me ... --json
23
+ node bin/skillboard.mjs setup --yes --agent codex
24
+ node bin/skillboard.mjs brief --agent codex --json
25
+ node bin/skillboard.mjs check --config examples/v2-multi-source.config.yaml --skills examples/multi-source-skills
131
26
  ```
132
27
 
133
- Observed AI-mediated result:
134
-
135
- - The simulated user asks for `anthropic.docx` to be made available.
136
- - The AI reads `assistant_guidance.choices` from the current brief.
137
- - The chosen confirmation maps to the current
138
- `activate-skill:anthropic.docx` action id.
139
- - `apply-action --yes --json` returns a post-apply brief.
140
- - The returned brief no longer offers the stale activate action and now offers
141
- the matching disable action.
142
- - `guard use anthropic.docx --workflow codex-night-workflow` fails before the
143
- approved action and succeeds after it.
144
- - `guard use matt.grill-me --workflow codex-night-workflow` stays denied
145
- because the workflow blocks that skill.
146
-
147
- What this proves:
148
-
149
- - The proof uses the current `assistant_guidance` action id instead of cached
150
- output.
151
- - SkillBoard keeps the guard as the final boundary before invocation.
152
- - Blocked skills still produce a non-zero, machine-readable denial.
153
-
154
- ## Case 4: AI route picks the right allowed skill
28
+ The policy contains only `enabled`, `shared`, and optional preference. Generated
29
+ inventory records `installed_on`. Source and provenance remain optional audit
30
+ metadata and never determine availability. Runtime and action authorization
31
+ remain outside SkillBoard's scope.
155
32
 
156
- The same fixture also proves that SkillBoard can help the AI choose the right
157
- skill before invocation:
33
+ ## Version 1 compatibility proof
158
34
 
159
35
  ```bash
160
- node bin/skillboard.mjs route "write tests before implementation" \
161
- --config examples/multi-source.config.yaml \
162
- --skills examples/multi-source-skills \
163
- --workflow codex-night-workflow \
164
- --json
36
+ skillboard migrate v2 --config <path> --json
37
+ skillboard migrate v2 --config <path> --yes --json
38
+ skillboard migrate v2 --config <path> --rollback <backup> --json
165
39
  ```
166
-
167
- Observed route result:
168
-
169
- - Matched capability: `test-first-implementation`.
170
- - Match source: `capability`.
171
- - Confidence: `high`.
172
- - Recommended skill: `matt.tdd`.
173
- - Fallback skill: `private.tdd-work-continuity`.
174
- - Overlap resolution is exposed in route payloads when several allowed skills
175
- match, so agents can explain the deterministic route without hiding the other
176
- available skills.
177
- - Guard command: `skillboard guard use matt.tdd ...`.
178
- - Guard result for `matt.tdd`: allowed.
179
- - Start disclosure: `I will use matt.tdd for this request.`
180
- - Finish disclosure: `I used matt.tdd for this request.`
181
-
182
- The proof also checks `brief --intent "write tests before implementation"` so
183
- the recommendation appears inside `assistant_guidance.route`, not only through
184
- the standalone `route` command.
185
-
186
- For a request outside the workflow's declared capability, such as "ship a
187
- powerpoint deck", SkillBoard returns no recommended skill and tells the AI to:
188
- Ask a clarifying question before choosing a skill.
189
-
190
- What this proves:
191
-
192
- - The AI can ask SkillBoard which skill fits a normal user request instead of
193
- guessing from raw `SKILL.md` text.
194
- - Allowed skill use stays low-friction: the AI discloses use at start and
195
- finish instead of asking for redundant approval.
196
- - No-match results are explicit, so the AI can ask a clarifying question rather
197
- than forcing a poor skill choice.
@@ -1,86 +1,66 @@
1
1
  # Skill Variant Lifecycle
2
2
 
3
- SkillBoard treats a skill variant as a reviewed policy relationship plus a file snapshot trail. This is a manual adaptation lifecycle for cases such as `a -> claude.a`, where a human adapts a base skill for a specific agent or workflow and then asks SkillBoard to record, review, approve, or reset that relationship.
3
+ A variant is a manual content adaptation with snapshot and digest history. The
4
+ lifecycle does not authorize availability. A registered variant is usable only
5
+ according to its ordinary v2 `enabled` entry and generated installation
6
+ presence; optional preference ranks it and never changes availability.
4
7
 
5
- Variant lifecycle is policy registration. SkillBoard records metadata, snapshots, digests, and workflow preference changes; it does not convert skill bodies, does not rewrite skill bodies, and does not guarantee semantic equivalence of skill bodies.
8
+ ## Current v2 boundary
6
9
 
7
- ## Lifecycle commands
10
+ `variant status` remains a read-only advanced operator surface for content and
11
+ inventory lifecycle metadata. Authorization-mutating `fork`, `approve`, and
12
+ `reset` forms remain an explicit v1 compatibility boundary. Legacy capability
13
+ or mode fields are never current availability gates. Runtime/action
14
+ authorization remains with the agent or harness.
8
15
 
9
- All examples use the global `skillboard` command. From a clone, replace `skillboard ` with `node bin/skillboard.mjs `.
16
+ ## Content review flow
10
17
 
11
- ```bash
12
- skillboard variant add <variant-id> --from <base-id> --capability <name> --workflow <name> --config <path> --skills <dir> [--path <relative-skill-path>] [--mode manual-only|router-only|workflow-auto] [--category <name>] [--owner-install-unit <unit-id>] [--dry-run] [--json]
13
- skillboard variant fork <variant-id> --from <base-id> --capability <name> --workflow <name> --path <relative-skill-path> --config <path> --skills <dir> [--adapted-for <label>] [--category <name>] [--owner-install-unit <unit-id>] [--dry-run] [--json]
14
- skillboard variant status <variant-id> --config <path> --skills <dir> [--json]
15
- skillboard variant approve <variant-id> --config <path> --skills <dir> [--mode manual-only|router-only|workflow-auto] [--dry-run] [--json]
16
- skillboard variant reset <variant-id> --to-base|--to-approved --config <path> --skills <dir> [--yes] [--dry-run] [--mode manual-only|router-only|workflow-auto] [--json]
17
- ```
18
-
19
- Use `--json` in scripts. Success payloads return the command-specific lifecycle fields such as `message`, `dryRun`, `changed`, `plan`, `filePlan`, `skill`, `variant`, and `warnings`. Errors include `ok: false` with a stable `error.code` and `error.message`. Usage errors exit with code `2` in both plain and JSON modes.
20
-
21
- ## Recommended review flow
22
-
23
- 1. Register or fork the variant from a known base:
24
-
25
- ```bash
26
- skillboard variant fork claude.a --from a --capability task-review --workflow claude-workflow --path claude/a --config skillboard.config.yaml --skills skills --json
27
- ```
28
-
29
- Fork creates a draft relationship and raw snapshot records without promoting the variant for automatic workflow use.
30
-
31
- 2. Edit the variant `SKILL.md` by hand. This is where the actual adaptation happens.
18
+ 1. Fork a variant from a known base.
19
+ 2. Edit its `SKILL.md` manually.
20
+ 3. Inspect live/base/approved digest drift.
21
+ 4. Approve the reviewed snapshot.
22
+ 5. Reset to a recorded base or approved snapshot when necessary.
32
23
 
33
- 3. Inspect computed drift before approval:
24
+ SkillBoard does not convert or rewrite skill bodies and does not promise semantic
25
+ equivalence between base and variant.
34
26
 
35
- ```bash
36
- skillboard variant status claude.a --config skillboard.config.yaml --skills skills --json
37
- ```
27
+ ## Read-only inspection
38
28
 
39
- `variant.status` is the stored lifecycle state. `computedStatus` is derived from the live digest, the base digest, and the approved digest. A changed live file that differs from the base snapshot and has no matching approved snapshot is a draft candidate.
40
-
41
- 4. Approve the reviewed variant:
42
-
43
- ```bash
44
- skillboard variant approve claude.a --config skillboard.config.yaml --skills skills --mode router-only --json
45
- ```
46
-
47
- Approval writes an approved snapshot, records the live digest, updates the skill metadata, and promotes the workflow preference/fallback policy for the chosen capability.
29
+ ```bash
30
+ skillboard variant status <variant-id> --config <path> --skills <dir> --json
31
+ ```
48
32
 
49
- 5. Reset deliberately when needed:
33
+ The `variant status` read-only payload reports stored content and inventory
34
+ lifecycle metadata plus computed digest drift.
35
+ Snapshots live under `.skillboard/variant-snapshots/<encoded-skill-id>/` and are
36
+ created lazily. Path containment checks protect live and snapshot files.
50
37
 
51
- ```bash
52
- skillboard variant reset claude.a --to-base --config skillboard.config.yaml --skills skills --yes --json
53
- skillboard variant reset claude.a --to-approved --config skillboard.config.yaml --skills skills --yes --json
54
- ```
38
+ ## Version 1 compatibility reference
55
39
 
56
- `--to-base` restores the base draft file and demotes workflow preference back to the base skill. `--to-approved` restores the approved snapshot and policy. Without `--yes`, mutating reset is rejected; use `--dry-run --json` to inspect the plan first.
40
+ Historical v1 commands accepted capability, workflow, owner-install-unit, and
41
+ mode values such as `manual-only`, `router-only`, and `workflow-auto`. Those
42
+ arguments describe the v1 migration/compatibility surface only; they do not
43
+ authorize v2 availability.
57
44
 
58
- ## Metadata and snapshots
45
+ ```text
46
+ skillboard variant fork <variant-id> --from <base-id> --capability <name> --workflow <name> --path <path> ...
47
+ skillboard variant approve <variant-id> ...
48
+ skillboard variant reset <variant-id> --to-base|--to-approved ...
49
+ ```
59
50
 
60
- Variant metadata lives with the skill declaration in `skillboard.config.yaml`:
51
+ Before using a migrated variant, set its v2 policy explicitly:
61
52
 
62
53
  ```yaml
54
+ version: 2
63
55
  skills:
64
- claude.a:
65
- variant:
66
- of: a
67
- capability: task-review
68
- workflow: claude-workflow
69
- status: approved
70
- adapted_for: claude
71
- base:
72
- content_digest: sha256:...
73
- snapshot: .skillboard/variant-snapshots/claude.a/base.md
74
- approved:
75
- content_digest: sha256:...
76
- snapshot: .skillboard/variant-snapshots/claude.a/approved.md
56
+ claude-review:
57
+ enabled: true
58
+ shared: false
59
+ preference:
60
+ intents:
61
+ - review
62
+ priority: 100
77
63
  ```
78
64
 
79
- Snapshots are raw file records under `.skillboard/variant-snapshots/<encoded-skill-id>/`. That directory is created lazily by lifecycle commands such as `variant fork` and `variant approve`; `skillboard init` does not need to pre-create snapshot directories. A reset can restore the base or approved content safely from those records. The lifecycle helpers verify that snapshot and live paths stay inside the configured workspace before writing files.
80
-
81
- ## Safety boundaries
82
-
83
- - `variant fork` and `variant add` create policy metadata; they do not make a newly edited skill equivalent to the base.
84
- - `variant approve` should happen only after human review of the live `SKILL.md` body and the `variant status` digest output.
85
- - `variant reset` writes files only through the safe replacement helper and refuses ambiguous reset targets.
86
- - A variant is still governed by normal capability, workflow, exposure, install-unit, and invocation checks.
65
+ These authorization-mutating compatibility commands do not change v2 policy.
66
+ Use the ordinary v2 enable/disable/share/unshare commands for policy changes.