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
package/docs/adapters.md CHANGED
@@ -1,127 +1,51 @@
1
1
  # Adapter Model
2
2
 
3
- SkillBoard should not hardcode one adapter per popular repository.
4
-
5
- The core should stay generic, and repository-specific behavior should live in
6
- data-driven source profiles wherever possible.
3
+ Adapters discover skills and runtime components. They do not decide whether a
4
+ skill is available.
7
5
 
8
6
  ## Layers
9
7
 
10
- 1. Core scanners
11
-
12
- Generic code that understands common primitives:
13
-
14
- - `SKILL.md` folders with YAML frontmatter;
15
- - plugin or marketplace manifests;
16
- - package manager metadata;
17
- - known user/project install scopes;
18
- - command, hook, MCP, agent, and LSP component lists.
19
-
20
- 2. Source profiles
21
-
22
- Declarative profiles that describe how to interpret a source:
23
-
24
- ```yaml
25
- id: github.mattpocock.skills
26
- source: mattpocock/skills
27
- kind: marketplace
28
- namespace: matt
29
- target_path_prefix: matt
30
- default_status: vendor
31
- default_invocation: manual-only
32
- default_exposure: exported
33
- skill_paths:
34
- - "skills/**/SKILL.md"
35
- - "*/SKILL.md"
36
- category_path_segment: 1
37
- path_rules:
38
- - pattern: "skills/deprecated/**/SKILL.md"
39
- status: deprecated
40
- invocation: deprecated
41
- category: deprecated
42
- ```
43
-
44
- A profile can set namespace, default policy, component mapping, known manifest
45
- paths, category extraction, lifecycle overrides, and risk hints without
46
- requiring code changes.
47
-
48
- `category_path_segment` reads a slash-separated path segment from the matched
49
- `SKILL.md` path. For example, `skills/engineering/tdd/SKILL.md` with segment
50
- `1` becomes category `engineering`. `path_rules` apply first-match overrides
51
- for repository conventions such as `deprecated` or `in-progress` folders.
52
-
53
- 3. Detector plugins
54
-
55
- Code adapters are only for sources whose layout cannot be described
56
- declaratively, such as installers that mutate multiple config files or require
57
- command output parsing. These should be small detector modules that produce the
58
- same install-unit data model as profiles.
59
-
60
- ## Built-In Profiles Are Not Hardcoding
61
-
62
- SkillBoard can ship built-in profiles for popular ecosystems, but they should be
63
- treated as bundled data, not product logic. Users and communities should be able
64
- to add or override profiles without forking the CLI.
65
-
66
- Good built-ins:
67
-
68
- - `mattpocock/skills`: skill pack profile.
69
- - `code-yeongyu/oh-my-openagent`: harness/plugin bundle profile.
70
- - `anthropics/skills`: standard Agent Skills profile.
71
- - `wshobson/agents`: marketplace/plugin profile.
72
- - `VoltAgent/awesome-agent-skills`: catalog profile.
73
-
74
- Bad design:
75
-
76
- - `if repo === "mattpocock/skills"` branches in the import logic;
77
- - repo-specific policy decisions embedded in TypeScript;
78
- - automatic global activation because a known repository was installed.
79
-
80
- ## Import Output Contract
81
-
82
- Every profile or detector should output the same normalized shape:
83
-
84
- - install units;
85
- - declared skills;
86
- - owner links via `owner_install_unit`;
87
- - component lists;
88
- - guessed capabilities;
89
- - default invocation and exposure;
90
- - warnings and decisions requiring user approval.
91
-
92
- Current CLI surface:
93
-
94
- ```bash
95
- skillboard import \
96
- --profile github.mattpocock.skills \
97
- --source-root /path/to/source \
98
- --out .skillboard/reports/import-fragment.yaml
8
+ 1. Core scanners read common `SKILL.md`, manifest, package, and component shapes.
9
+ 2. Source profiles describe repository paths and stable id mapping as data.
10
+ 3. Detector plugins handle installers whose layout cannot be expressed by a
11
+ profile.
12
+
13
+ Every layer produces deterministic generated inventory. Source, provenance,
14
+ path, digest, aliases, install-unit, and runtime-component observations are
15
+ optional audit metadata and never determine availability.
16
+
17
+ ## Profile example
18
+
19
+ ```yaml
20
+ id: example-pack
21
+ source: example/skills
22
+ namespace: example
23
+ skill_paths:
24
+ - "skills/**/SKILL.md"
25
+ path_rules:
26
+ - pattern: "skills/deprecated/**/SKILL.md"
27
+ category: deprecated
99
28
  ```
100
29
 
101
- The command emits a config fragment rather than mutating policy automatically.
102
- This keeps the control plane reviewable while still avoiding hardcoded adapter
103
- branches.
30
+ Profiles may classify paths and describe components. They cannot enable,
31
+ disable, share, or unshare skills.
104
32
 
105
- When the fragment is acceptable, the same importer can merge it:
33
+ ## Import contract
106
34
 
107
35
  ```bash
108
- skillboard import \
109
- --profile github.mattpocock.skills \
110
- --source-root /path/to/source \
111
- --config skillboard.config.yaml \
112
- --merge \
113
- --dry-run
36
+ skillboard import --profile <id-or-path> --source-root <dir> --out <fragment>
37
+ skillboard import --profile <id-or-path> --source-root <dir> --config <path> --merge --dry-run
114
38
  ```
115
39
 
116
- Merge is append-only by default and refuses duplicate skill or install-unit ids.
117
- `--replace` is the explicit overwrite escape hatch. Drop `--dry-run` after
118
- reviewing the change plan.
119
-
120
- The reconciler then applies the same policy rules regardless of source.
40
+ Import and inventory refresh create a missing valid v2 entry as
41
+ `enabled: true`, `shared: false`, while preserving existing policy. Runtime and
42
+ action permission remains with the agent or
43
+ harness.
121
44
 
122
- ## Default Safety
45
+ This is a trust-neutral import: import does not review or approve a source and
46
+ does not authorize any runtime component. Audit observations remain
47
+ informational regardless of whether the fragment is only emitted or merged.
123
48
 
124
- New external skills should default to `vendor` or `candidate`, with
125
- `manual-only` or `router-only` invocation. Personal control skills can become
126
- `global-meta`, but external repositories should not gain `global-auto` through an
127
- adapter.
49
+ Historical profile fields that encoded status, mode, exposure, or source review
50
+ belong only to the v1 migration reader. New profiles must not emit them as
51
+ availability policy.
@@ -1,124 +1,57 @@
1
1
  # AI Skill Routing Goal
2
2
 
3
- SkillBoard's product goal is to be a **permissive AI skill routing layer**. It keeps installed skills broadly available by default, then gives the AI a deterministic route when multiple skills could steer the same task. It should help an AI decide which skills and workflow policies apply to the current task without turning normal work into a settings session.
3
+ SkillBoard is a user-level, non-blocking control plane for skill availability,
4
+ cross-agent sharing, and overlap routing. It asks only two policy questions:
4
5
 
5
- This document is the goal reference for product work, routing changes, AI-facing brief changes, bridge updates, policy UX, and workflow UX.
6
+ 1. Is the skill enabled or disabled?
7
+ 2. Should SkillBoard share this skill with other supported agents?
6
8
 
7
- ## Core principle
9
+ Installed, valid skills default to enabled and agent-local. A user may disable
10
+ a skill or opt that individual skill into sharing. An optional preference ranks
11
+ enabled candidates that are actually installed for the current agent;
12
+ preference never changes availability or copies files.
8
13
 
9
- SkillBoard should keep the user's work moving by default. Broadly available
10
- skills are normal; deterministic overlap resolution is the value.
14
+ ## Product loop
11
15
 
12
- The preferred loop is:
16
+ Preserve `observe route → work → explain briefly → ask after → remember`.
17
+ Ordinary work must not stop for source review or pre-task configuration. Read
18
+ the current brief when skills overlap, run the guard before use, and ask
19
+ once only before a persistent policy change.
13
20
 
14
- ```text
15
- observe → route → work → explain briefly → ask after → remember policy
16
- ```
21
+ ## Boundaries
17
22
 
18
- That means:
23
+ Source, provenance, digest, aliases, install-unit details, and risk are optional
24
+ audit metadata and never determine availability. They belong in generated
25
+ inventory and audit output, not user policy.
19
26
 
20
- 1. **Observe** the user's request and current workflow context.
21
- 2. **Route** to the most appropriate allowed skill or workflow policy without asking first when the risk is low, especially when several similar skills match.
22
- 3. **Work** normally so SkillBoard does not become a pre-task settings checklist.
23
- 4. **Explain briefly** which skill was used or skipped, only at the level needed for trust.
24
- 5. **Ask after** the task when the routing choice was ambiguous, recurring, or likely to become a useful preference.
25
- 6. **Remember policy** as usage guidance for future turns.
27
+ Runtime and action authorization are outside SkillBoard's scope. The active
28
+ agent or harness remains responsible for hooks, MCP servers, commands, network
29
+ access, external writes, destructive actions, and secrets.
26
30
 
27
- ## Non-goals
31
+ SkillBoard does not rewrite `SKILL.md` bodies. It records enablement, explicit
32
+ sharing, and optional routing preference. Agent presence (`installed_on`) is
33
+ generated inventory, not user-managed policy.
28
34
 
29
- SkillBoard does not rewrite `SKILL.md` bodies as the primary way to improve outcomes.
35
+ `shared: false` means SkillBoard does not propagate the skill. It does not
36
+ remove or quarantine copies that the user or another tool installed. With
37
+ `shared: true`, SkillBoard materializes a managed shared source and compatible
38
+ managed copies for supported agents, while preserving every agent-owned
39
+ original.
30
40
 
31
- SkillBoard should not:
32
-
33
- - ask users to choose from a large skill inventory before ordinary work can begin;
34
- - require users to memorize the SkillBoard command loop;
35
- - infer permission from raw installed `SKILL.md` files;
36
- - silently let overlapping skills contaminate an answer;
37
- - make the default model feel deny-first when the user's skill set is already allowed;
38
- - mutate skill body content when a usage policy would solve the problem;
39
- - turn every allowed skill invocation into a permission prompt.
40
-
41
- ## Simplification rule
42
-
43
- Do not simplify by deleting concepts blindly. Keep a concept only when it
44
- justifies itself against SkillBoard's routing identity: routing, overlap
45
- resolution, policy memory, or a less interruptive user flow. Concepts that do
46
- not pass that test should be removed, merged, or renamed into the smaller
47
- surface that does.
48
-
49
- ## What SkillBoard controls
50
-
51
- SkillBoard controls **when and how a skill may influence an AI workflow**.
52
-
53
- The control object is a usage policy, not the skill body itself:
54
-
55
- - task or intent triggers;
56
- - workflow scope;
57
- - user, project, or team scope;
58
- - preferred and fallback skills;
59
- - exclusion rules;
60
- - overlap resolution summaries;
61
- - confidence or ambiguity thresholds;
62
- - disclosure and guard behavior;
63
- - pending policy suggestions to review later.
64
-
65
- ## Skill usage modes
66
-
67
- Use these terms when designing routing, docs, brief output, or policy UX:
68
-
69
- - **Always use** — apply the skill automatically for a clearly scoped situation.
70
- - **Prefer** — choose this skill first when several skills match.
71
- - **Reference only** — read the skill as background guidance, but do not let its format or workflow dominate the final answer.
72
- - **Ask after use** — use the skill for low-risk ambiguous work, then ask whether to remember that choice.
73
- - **Ask before use** — ask first only when the action is risky, policy-changing, expensive, destructive, or externally visible.
74
- - **Avoid** — do not use the skill in a scoped situation unless the user explicitly asks.
75
- - **Block** — never use the skill while the policy remains in force.
76
-
77
- ## User-facing flow
78
-
79
- A normal user should be able to talk to their AI naturally:
80
-
81
- ```text
82
- User: "Help me refine this UX flow."
83
- AI: works using the routed skills.
84
- AI: "I used command-flow-ux-audit as the primary reference and left TDD skills out because this was not a code-editing task. Should I treat that as the default for UX-flow requests?"
85
- ```
86
-
87
- The confirmation is intentionally small and late. It records a policy preference without interrupting the work that caused the user to ask for help.
88
-
89
- ## AI-facing behavior
90
-
91
- AI integrations should:
92
-
93
- - read the current SkillBoard brief before making skill availability claims;
94
- - route from the current request and workflow instead of searching raw skill bodies;
95
- - run the guard automatically immediately before invoking an allowed skill;
96
- - disclose allowed skill use at the start and completion;
97
- - ask the user before applying policy-changing action cards;
98
- - reread the post-apply brief before making another availability claim;
99
- - propose remembered policy only when the user has seen enough context to judge the result.
41
+ `setup` is a repeatable user-level convergence operation. It observes agents
42
+ and Hermes profiles added after installation, refreshes managed guidance and
43
+ inventory, and materializes missing copies only for skills already marked
44
+ `shared: true`. Custom agent roots are remembered outside policy as operational
45
+ discovery state. They must not introduce project scope, source trust gates, or
46
+ another authorization layer.
100
47
 
101
48
  ## Development rule
102
49
 
103
- Read `docs/ai-skill-routing-goal.md` before changing routing, brief, bridge, policy, or workflow UX.
104
-
105
- Any implementation that affects AI-mediated skill selection should preserve the non-blocking loop:
106
-
107
- ```text
108
- observe → route → work → explain briefly → ask after → remember policy
109
- ```
110
-
111
- When in doubt, prefer a small usage-policy change over skill-body mutation or a larger pre-task setup flow.
112
-
113
- ## MVP acceptance criteria
114
-
115
- A change moves SkillBoard toward this goal when:
50
+ Every route, brief, guard, dashboard, generated bridge, and policy mutation must
51
+ project the same v2 meaning. Normal commands use one home control plane from any
52
+ working directory; project initialization is not part of the v2 flow. Never
53
+ reintroduce source reputation, workflow scope, or legacy state fields as hidden
54
+ authorization checks.
116
55
 
117
- - ordinary allowed-skill work proceeds without a pre-task skill-selection prompt;
118
- - ambiguous but low-risk choices can be handled with ask-after-use policy suggestions;
119
- - multiple allowed matching skills stay available while the routed skill is deterministic;
120
- - risky or policy-changing actions still require explicit confirmation before apply;
121
- - `brief --json` gives AI integrations a stable way to discover the goal document and routing guidance;
122
- - text output stays compact by default and reserves verbose detail for explicit requests;
123
- - users can understand why a skill was used, skipped, or blocked;
124
- - SkillBoard records usage policy separately from skill body content.
56
+ Version 1 is migration input only. It has a one-release read-only window in the
57
+ v0.3 release and is removed in v0.4.0.
@@ -1,113 +1,26 @@
1
- # Capabilities
1
+ # Capabilities and Preferences
2
2
 
3
- SkillBoard uses **capabilities** as a contract layer between a workflow and the skills that satisfy it. A capability is an abstract need, such as "requirement-clarification" or "test-first-implementation". Skills claim to provide it; workflows declare they require it.
3
+ Policy schema v2 does not use capabilities for authorization. Availability is
4
+ an enabled policy entry plus observed installation on the current agent.
4
5
 
5
- There are two places where capabilities appear:
6
-
7
- 1. **Global capability catalog** in `skillboard.config.yaml` (`capabilities`)
8
- 2. **Workflow-scoped requirements** under each workflow (`required_capabilities`)
9
-
10
- ## Global Capability Catalog
11
-
12
- The global catalog defines a capability once for the whole project.
13
-
14
- ```yaml
15
- capabilities:
16
- requirement-clarification:
17
- canonical: meerkat.requirement-intake
18
- alternatives:
19
- - matt.grill-me
20
- - matt.grill-with-docs
21
- default_policy: router-only
22
- ```
23
-
24
- - `canonical`: the preferred skill for this capability.
25
- - `alternatives`: other skills that may satisfy the same capability.
26
- - `default_policy`: the suggested invocation policy when a workflow requires the capability but does not override it.
27
-
28
- The catalog is used for project-wide policy checks, such as:
29
-
30
- - Is the canonical skill declared?
31
- - Does a skill that claims `canonical_for` actually match the catalog?
32
- - Are fallback or alternative skill references valid?
33
-
34
- ## Workflow-Scoped Requirements
35
-
36
- A workflow can require a capability and pin how it should be resolved.
37
-
38
- ```yaml
39
- workflows:
40
- requirement-review:
41
- required_capabilities:
42
- requirement-clarification:
43
- preferred: meerkat.requirement-intake
44
- fallback:
45
- - matt.grill-with-docs
46
- policy: router-only
47
- ```
48
-
49
- - `preferred`: the skill to use first for this workflow.
50
- - `fallback`: ordered alternatives if the preferred skill is unavailable or blocked.
51
- - `policy`: invocation mode that applies when the capability is resolved in this workflow.
52
-
53
- ## Resolution Flow
54
-
55
- When a workflow is selected, SkillBoard resolves each required capability like this:
56
-
57
- ```
58
- workflow.required_capabilities
59
-
60
-
61
- capability name
62
-
63
-
64
- lookup global catalog (capabilities.<name>)
65
-
66
-
67
- preferred in workflow? ──yes──► use workflow.preferred with workflow.policy
68
-
69
- no
70
-
71
- use catalog.canonical with workflow.policy
72
-
73
-
74
- fallback order: workflow.fallback, then catalog.alternatives
75
- ```
76
-
77
- If no preferred skill is set in the workflow, the global catalog's canonical skill is used. Fallbacks are checked in order: first the workflow's own fallback list, then the global alternatives.
78
-
79
- ## Explicit Skill Variants
80
-
81
- Use `skillboard variant add claude.a --from a --capability task-review --workflow claude-workflow --path claude/a ...` to record a user-approved `a -> claude.a` variant. SkillBoard adds the variant to the capability alternatives, makes it preferred for the named workflow, and keeps the base skill available as fallback.
82
-
83
- This is policy registration, not prompt migration. For a reviewed manual adaptation lifecycle, run `skillboard variant fork <variant-id>` to create a draft and raw snapshot, edit the variant body by hand, inspect `skillboard variant status <variant-id>` for `variant.status` and computed drift, then use `skillboard variant approve <variant-id>` or `skillboard variant reset <variant-id>`. SkillBoard records user-approved variants and consistent workflow policy across agents; it does not convert skill bodies, does not rewrite skill bodies, and does not guarantee semantic equivalence of skill bodies.
84
-
85
- ## Global vs Workflow: When to Use Each
86
-
87
- | Use case | Use global catalog | Use workflow requirement |
88
- |----------|-------------------|--------------------------|
89
- | Define a canonical skill for a capability | ✅ | |
90
- | List known alternatives project-wide | ✅ | |
91
- | Provide a default invocation policy | ✅ | |
92
- | Pin a different skill for one workflow | | ✅ |
93
- | Add workflow-specific fallbacks | | ✅ |
94
- | Override invocation policy for a workflow | | ✅ |
95
-
96
- ## Skill Declaration
97
-
98
- A skill declares that it satisfies a capability through `canonical_for`:
6
+ Use optional `preference` when one matching skill should rank ahead of another:
99
7
 
100
8
  ```yaml
101
9
  skills:
102
- meerkat.requirement-intake:
103
- canonical_for:
104
- - requirement-clarification
10
+ test-first:
11
+ enabled: true
12
+ shared: false
13
+ preference:
14
+ intents: [implementation, testing]
15
+ priority: 100
105
16
  ```
106
17
 
107
- If `canonical_for` references a capability, the global catalog must list the same skill as its `canonical`. Otherwise the policy check reports a mismatch.
18
+ Preference ranks only and never changes availability. Explicit user selection
19
+ wins among guard-allowed candidates.
108
20
 
109
- ## Safety Notes
21
+ Version 1 capability catalogs and workflow requirements are migration input
22
+ only. Migration may convert names to intent terms and priorities, reports
23
+ discarded policy fields, and never carries capability policy into the v2 guard.
110
24
 
111
- - A workflow requirement can only reference capabilities defined in the global catalog.
112
- - `policy` in a workflow requirement must be a valid invocation value.
113
- - Prefer `workflow-auto` or `router-only` for workflow requirements; reserve `global-auto` for explicitly global-meta skills.
25
+ Manual skill variants are content-management records, not authorization.
26
+ Runtime and action permission checks stay with the agent or harness.