@alavida/agentpack 0.1.1 → 0.1.3
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.
- package/README.md +16 -2
- package/bin/intent.js +20 -0
- package/package.json +11 -5
- package/skills/agentpack-cli/SKILL.md +16 -1
- package/skills/agentpack-cli/references/skill-lifecycle.md +21 -1
- package/skills/authoring-skillgraphs-from-knowledge/SKILL.md +148 -0
- package/skills/authoring-skillgraphs-from-knowledge/references/authored-metadata.md +6 -0
- package/skills/developing-and-testing-skills/SKILL.md +109 -0
- package/skills/developing-and-testing-skills/references/local-workbench.md +7 -0
- package/skills/getting-started-skillgraphs/SKILL.md +115 -0
- package/skills/getting-started-skillgraphs/references/command-routing.md +7 -0
- package/skills/identifying-skill-opportunities/SKILL.md +119 -0
- package/skills/identifying-skill-opportunities/references/capability-boundaries.md +6 -0
- package/skills/maintaining-skillgraph-freshness/SKILL.md +110 -0
- package/skills/repairing-broken-skill-or-plugin-state/SKILL.md +112 -0
- package/skills/repairing-broken-skill-or-plugin-state/references/diagnostic-flows.md +6 -0
- package/skills/shipping-production-plugins-and-packages/SKILL.md +123 -0
- package/skills/shipping-production-plugins-and-packages/references/plugin-delivery.md +6 -0
- package/src/application/plugins/build-plugin.js +5 -0
- package/src/application/plugins/inspect-plugin-bundle.js +5 -0
- package/src/application/plugins/validate-plugin-bundle.js +5 -0
- package/src/application/skills/build-skill-workbench-model.js +194 -0
- package/src/application/skills/inspect-skill.js +5 -0
- package/src/application/skills/list-stale-skills.js +9 -0
- package/src/application/skills/run-skill-workbench-action.js +23 -0
- package/src/application/skills/start-skill-dev-workbench.js +192 -0
- package/src/application/skills/validate-skills.js +5 -0
- package/src/cli.js +1 -1
- package/src/commands/plugin.js +7 -4
- package/src/commands/skills.js +14 -9
- package/src/dashboard/App.jsx +343 -0
- package/src/dashboard/components/Breadcrumbs.jsx +45 -0
- package/src/dashboard/components/ControlStrip.jsx +153 -0
- package/src/dashboard/components/InspectorPanel.jsx +203 -0
- package/src/dashboard/components/SkillGraph.jsx +567 -0
- package/src/dashboard/components/Tooltip.jsx +111 -0
- package/src/dashboard/dist/dashboard.js +26692 -0
- package/src/dashboard/index.html +81 -0
- package/src/dashboard/lib/api.js +19 -0
- package/src/dashboard/lib/router.js +15 -0
- package/src/dashboard/main.jsx +4 -0
- package/src/domain/plugins/load-plugin-definition.js +163 -0
- package/src/domain/plugins/plugin-diagnostic-error.js +18 -0
- package/src/domain/plugins/plugin-requirements.js +15 -0
- package/src/domain/skills/skill-graph.js +137 -0
- package/src/domain/skills/skill-model.js +187 -0
- package/src/domain/skills/skill-provenance.js +69 -0
- package/src/infrastructure/fs/build-state-repository.js +16 -0
- package/src/infrastructure/fs/install-state-repository.js +16 -0
- package/src/infrastructure/runtime/materialize-skills.js +117 -0
- package/src/infrastructure/runtime/open-browser.js +20 -0
- package/src/infrastructure/runtime/skill-dev-workbench-server.js +96 -0
- package/src/infrastructure/runtime/watch-skill-workbench.js +68 -0
- package/src/infrastructure/runtime/watch-tree.js +44 -0
- package/src/lib/plugins.js +46 -117
- package/src/lib/skills.js +141 -459
- package/src/utils/errors.js +33 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: identifying-skill-opportunities
|
|
3
|
+
description: Use when deciding what raw knowledge should become a packaged skill, a reusable capability boundary, a requires edge, or a plugin-local wrapper in an agentpack skillgraph.
|
|
4
|
+
type: core
|
|
5
|
+
library: agentpack
|
|
6
|
+
library_version: "0.1.2"
|
|
7
|
+
sources:
|
|
8
|
+
- "alavida-ai/agentpack:docs/architecture.mdx"
|
|
9
|
+
- "alavida-ai/agentpack:docs/overview.mdx"
|
|
10
|
+
- "alavida-ai/agentpack:skills/agentpack-cli/SKILL.md"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Agentpack - Identifying Skill Opportunities
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
```md
|
|
18
|
+
Source knowledge:
|
|
19
|
+
- domains/design/knowledge/brand-guidelines.md
|
|
20
|
+
- domains/frontend/knowledge/component-heuristics.md
|
|
21
|
+
|
|
22
|
+
Reusable skills:
|
|
23
|
+
- domains/design/skills/brand-guidelines
|
|
24
|
+
- domains/frontend/skills/frontend-skill
|
|
25
|
+
|
|
26
|
+
Composed task skill:
|
|
27
|
+
- domains/design/skills/agonda-brand-frontend
|
|
28
|
+
requires:
|
|
29
|
+
- @scope/brand-guidelines
|
|
30
|
+
- @scope/frontend-skill
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Core Patterns
|
|
34
|
+
|
|
35
|
+
### Split by reusable capability
|
|
36
|
+
|
|
37
|
+
If a knowledge area should be reused compositionally in work, give it its own packaged skill.
|
|
38
|
+
|
|
39
|
+
### Compose task-specific skills with `requires`
|
|
40
|
+
|
|
41
|
+
Use a task skill when the work needs several reusable capabilities together.
|
|
42
|
+
|
|
43
|
+
### Keep plugin-local skills as delivery wrappers
|
|
44
|
+
|
|
45
|
+
Use plugin-local skills to expose packaged capabilities inside a runtime shell, not to hide the capability graph.
|
|
46
|
+
|
|
47
|
+
## Common Mistakes
|
|
48
|
+
|
|
49
|
+
### HIGH Copying knowledge into one giant skill
|
|
50
|
+
|
|
51
|
+
Wrong:
|
|
52
|
+
|
|
53
|
+
```md
|
|
54
|
+
One SKILL.md contains branding, frontend heuristics, research notes, and delivery instructions.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Correct:
|
|
58
|
+
|
|
59
|
+
```md
|
|
60
|
+
Create packaged skills for reusable capabilities, then compose them with requires.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Flattening multiple capabilities into one skill destroys explicit dependency edges and makes maintenance coarse.
|
|
64
|
+
|
|
65
|
+
Source: maintainer interview
|
|
66
|
+
|
|
67
|
+
### CRITICAL Using plugin boundaries as the dependency model
|
|
68
|
+
|
|
69
|
+
Wrong:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
plugins/website-dev/skills/copywriting/SKILL.md
|
|
73
|
+
plugins/website-dev/skills/research/SKILL.md
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Correct:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
domains/brand/skills/copywriting/SKILL.md
|
|
80
|
+
domains/research/skills/interview-research/SKILL.md
|
|
81
|
+
plugins/website-dev/skills/copywriting/SKILL.md # requires packaged skills
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Plugins are a delivery surface, not the architectural place to hide reusable capability boundaries.
|
|
85
|
+
|
|
86
|
+
Source: docs/architecture.mdx
|
|
87
|
+
|
|
88
|
+
### CRITICAL Omitting provenance sources for knowledge-backed skills
|
|
89
|
+
|
|
90
|
+
Wrong:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
---
|
|
94
|
+
name: value-copywriting
|
|
95
|
+
description: Copy.
|
|
96
|
+
requires: []
|
|
97
|
+
---
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Correct:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
---
|
|
104
|
+
name: value-copywriting
|
|
105
|
+
description: Copy.
|
|
106
|
+
metadata:
|
|
107
|
+
sources:
|
|
108
|
+
- domains/value/knowledge/tone-of-voice.md
|
|
109
|
+
requires: []
|
|
110
|
+
---
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Without `metadata.sources`, the skillgraph cannot explain stale state against source truth.
|
|
114
|
+
|
|
115
|
+
Source: docs/architecture.mdx
|
|
116
|
+
|
|
117
|
+
## References
|
|
118
|
+
|
|
119
|
+
- [Capability boundaries](references/capability-boundaries.md)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Capability Boundaries
|
|
2
|
+
|
|
3
|
+
- Split when the knowledge should be reused as an independent capability in real work
|
|
4
|
+
- Compose task-specific skills with `requires` instead of flattening them
|
|
5
|
+
- Keep plugins for delivery concerns such as hooks, MCP tools, and grouped shipment of several skills
|
|
6
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maintaining-skillgraph-freshness
|
|
3
|
+
description: Use when validating authored skills, checking stale state, and keeping build-state and catalog metadata aligned with changing knowledge in an agentpack skillgraph.
|
|
4
|
+
type: lifecycle
|
|
5
|
+
library: agentpack
|
|
6
|
+
library_version: "0.1.2"
|
|
7
|
+
sources:
|
|
8
|
+
- "alavida-ai/agentpack:docs/commands.mdx"
|
|
9
|
+
- "alavida-ai/agentpack:docs/current-state.mdx"
|
|
10
|
+
- "alavida-ai/agentpack:README.md"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Agentpack - Maintaining Skillgraph Freshness
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd knowledge-base
|
|
19
|
+
agentpack skills validate domains/value/skills/copywriting
|
|
20
|
+
agentpack skills stale
|
|
21
|
+
git add .agentpack/build-state.json .agentpack/catalog.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Core Patterns
|
|
25
|
+
|
|
26
|
+
### Use stale before and after source changes
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
agentpack skills stale
|
|
30
|
+
edit domains/value/knowledge/tone-of-voice.md
|
|
31
|
+
agentpack skills stale
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Revalidate to refresh the baseline
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
agentpack skills validate domains/value/skills/copywriting
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Commit authored metadata
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git add .agentpack/build-state.json .agentpack/catalog.json
|
|
44
|
+
git commit -m "chore: refresh skill metadata"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Common Mistakes
|
|
48
|
+
|
|
49
|
+
### CRITICAL Treating stale detection as automatic without validate
|
|
50
|
+
|
|
51
|
+
Wrong:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
edit domains/value/knowledge/tone-of-voice.md
|
|
55
|
+
agentpack skills stale
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Correct:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
edit domains/value/knowledge/tone-of-voice.md
|
|
62
|
+
agentpack skills stale
|
|
63
|
+
agentpack skills validate domains/value/skills/copywriting
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The stale baseline only updates on successful validation.
|
|
67
|
+
|
|
68
|
+
Source: docs/commands.mdx
|
|
69
|
+
|
|
70
|
+
### HIGH Not committing build-state and catalog in authoring repos
|
|
71
|
+
|
|
72
|
+
Wrong:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git add domains/value/skills/copywriting
|
|
76
|
+
git commit -m "feat: update copywriting"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Correct:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git add domains/value/skills/copywriting .agentpack/build-state.json .agentpack/catalog.json
|
|
83
|
+
git commit -m "feat: update copywriting"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Uncommitted authored metadata breaks stale visibility across clones, CI, and teammates.
|
|
87
|
+
|
|
88
|
+
Source: README.md
|
|
89
|
+
|
|
90
|
+
### MEDIUM Using install-state as authored provenance
|
|
91
|
+
|
|
92
|
+
Wrong:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
.agentpack/install.json is treated as the authored source of truth
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Correct:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
.agentpack/build-state.json and .agentpack/catalog.json are the authored metadata files
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Install-state describes runtime materialization, not authored source freshness.
|
|
105
|
+
|
|
106
|
+
Source: docs/current-state.mdx
|
|
107
|
+
|
|
108
|
+
## References
|
|
109
|
+
|
|
110
|
+
- [Authored metadata](references/authored-metadata.md)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repairing-broken-skill-or-plugin-state
|
|
3
|
+
description: Use when auditing or repairing stale skills, unresolved requires, missing runtime dependencies, affected dependents, or malformed plugin definition files in agentpack.
|
|
4
|
+
type: lifecycle
|
|
5
|
+
library: agentpack
|
|
6
|
+
library_version: "0.1.2"
|
|
7
|
+
sources:
|
|
8
|
+
- "alavida-ai/agentpack:docs/current-state.mdx"
|
|
9
|
+
- "alavida-ai/agentpack:docs/commands.mdx"
|
|
10
|
+
- "alavida-ai/agentpack:src/domain/plugins/load-plugin-definition.js"
|
|
11
|
+
requires:
|
|
12
|
+
- maintaining-skillgraph-freshness
|
|
13
|
+
- developing-and-testing-skills
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Agentpack - Repairing Broken Skill Or Plugin State
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
agentpack skills status
|
|
22
|
+
agentpack skills missing
|
|
23
|
+
agentpack skills dependencies @alavida-ai/value-copywriting
|
|
24
|
+
agentpack plugin inspect plugins/website-dev
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Core Patterns
|
|
28
|
+
|
|
29
|
+
### Start with visibility commands
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
agentpack skills status
|
|
33
|
+
agentpack skills missing
|
|
34
|
+
agentpack skills env
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Inspect plugin definition failures before build
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
agentpack plugin inspect plugins/website-dev
|
|
41
|
+
agentpack plugin validate plugins/website-dev
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Trace stale or affected dependents explicitly
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
agentpack skills stale
|
|
48
|
+
agentpack skills dependencies @alavida-ai/value-copywriting
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Common Mistakes
|
|
52
|
+
|
|
53
|
+
### HIGH Debugging plugin bundle failures without inspect
|
|
54
|
+
|
|
55
|
+
Wrong:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
agentpack plugin build plugins/website-dev
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Correct:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
agentpack plugin inspect plugins/website-dev
|
|
65
|
+
agentpack plugin validate plugins/website-dev
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`plugin inspect` and `plugin validate` now surface actionable diagnostics for missing plugin files and metadata.
|
|
69
|
+
|
|
70
|
+
Source: docs/commands.mdx
|
|
71
|
+
|
|
72
|
+
### HIGH Treating affected dependents as healthy because they still resolve
|
|
73
|
+
|
|
74
|
+
Wrong:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
agentpack skills env
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Correct:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
agentpack skills stale
|
|
84
|
+
agentpack skills dependencies @alavida-ai/value-copywriting
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
A dependent can still resolve while being affected by an upstream stale dependency.
|
|
88
|
+
|
|
89
|
+
Source: docs/current-state.mdx
|
|
90
|
+
|
|
91
|
+
### MEDIUM Repairing runtime state by hand-editing local materializations
|
|
92
|
+
|
|
93
|
+
Wrong:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
rm -rf .claude/skills/value-copywriting
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Correct:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
agentpack skills unlink value-copywriting
|
|
103
|
+
agentpack skills install @alavida-ai/value-copywriting
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Runtime state should be repaired through agentpack lifecycle commands, not direct edits under `.claude/skills` or `.agents/skills`.
|
|
107
|
+
|
|
108
|
+
Source: docs/architecture.mdx
|
|
109
|
+
|
|
110
|
+
## References
|
|
111
|
+
|
|
112
|
+
- [Diagnostic flows](references/diagnostic-flows.md)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Diagnostic Flows
|
|
2
|
+
|
|
3
|
+
- Stale authored skill: `skills stale` -> `skills dependencies <package>` -> `skills validate <path>`
|
|
4
|
+
- Missing runtime dependency: `skills missing` -> `skills install <package>` -> `skills env`
|
|
5
|
+
- Malformed plugin shell: `plugin inspect <dir>` -> follow `path` and `nextSteps` -> `plugin validate <dir>`
|
|
6
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shipping-production-plugins-and-packages
|
|
3
|
+
description: Use when turning maintained skills into deployable bundled plugins or publishable standalone packages with explicit dependency closure, hooks, MCP tools, and production checks in agentpack.
|
|
4
|
+
type: core
|
|
5
|
+
library: agentpack
|
|
6
|
+
library_version: "0.1.2"
|
|
7
|
+
sources:
|
|
8
|
+
- "alavida-ai/agentpack:docs/commands.mdx"
|
|
9
|
+
- "alavida-ai/agentpack:docs/architecture.mdx"
|
|
10
|
+
- "alavida-ai/agentpack:README.md"
|
|
11
|
+
requires:
|
|
12
|
+
- identifying-skill-opportunities
|
|
13
|
+
- authoring-skillgraphs-from-knowledge
|
|
14
|
+
- repairing-broken-skill-or-plugin-state
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Agentpack - Shipping Production Plugins And Packages
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
agentpack plugin inspect plugins/website-dev
|
|
23
|
+
agentpack plugin validate plugins/website-dev
|
|
24
|
+
agentpack plugin build plugins/website-dev
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Core Patterns
|
|
28
|
+
|
|
29
|
+
### Ship a standalone package for one reusable capability
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
agentpack skills validate domains/value/skills/copywriting
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use this when the capability stands on its own and does not need to ship bundled with hooks, MCP tools, or other skills.
|
|
36
|
+
|
|
37
|
+
### Bundle a production plugin when shipping several skills together
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
agentpack plugin inspect plugins/website-dev
|
|
41
|
+
agentpack plugin validate plugins/website-dev
|
|
42
|
+
agentpack plugin build plugins/website-dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Use plugin dev during iteration on the delivery shell
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
agentpack plugin dev plugins/website-dev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Common Mistakes
|
|
52
|
+
|
|
53
|
+
### CRITICAL Declaring plugin-local skill requires without matching devDependencies
|
|
54
|
+
|
|
55
|
+
Wrong:
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
requires:
|
|
59
|
+
- @alavida-ai/value-copywriting
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"devDependencies": {}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Correct:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@alavida-ai/value-copywriting": "^1.0.0"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Plugin bundle closure depends on direct required skill packages being present in `package.json.devDependencies`.
|
|
79
|
+
|
|
80
|
+
Source: docs/commands.mdx
|
|
81
|
+
|
|
82
|
+
### HIGH Forgetting the plugin manifest and expecting validate to infer it
|
|
83
|
+
|
|
84
|
+
Wrong:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
plugins/website-dev/package.json
|
|
88
|
+
# no .claude-plugin/plugin.json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Correct:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
plugins/website-dev/package.json
|
|
95
|
+
plugins/website-dev/.claude-plugin/plugin.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Plugin commands require an explicit runtime manifest and now return structured diagnostics when it is missing.
|
|
99
|
+
|
|
100
|
+
Source: docs/commands.mdx
|
|
101
|
+
|
|
102
|
+
### HIGH Assuming a packaged skill and a bundled plugin are the same release unit
|
|
103
|
+
|
|
104
|
+
Wrong:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
Publish one packaged skill and assume hooks, MCP tools, and related skills ship with it automatically
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Correct:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
Use a standalone package for one reusable capability
|
|
114
|
+
Use a bundled plugin when several skills, hooks, or MCP tools must ship together
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Packaged skills are reusable units; plugins are deployable runtime shells.
|
|
118
|
+
|
|
119
|
+
Source: README.md
|
|
120
|
+
|
|
121
|
+
## References
|
|
122
|
+
|
|
123
|
+
- [Plugin delivery](references/plugin-delivery.md)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Plugin Delivery
|
|
2
|
+
|
|
3
|
+
- Favor standalone packages for one reusable capability
|
|
4
|
+
- Favor bundled plugins when several skills need to ship together
|
|
5
|
+
- Use bundled plugins when delivery also needs hooks or MCP tools
|
|
6
|
+
- Run `plugin inspect` and `plugin validate` before `plugin build`
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
function explainNodeStatus(status) {
|
|
2
|
+
if (status === 'affected') return 'Affected by upstream authored state changes';
|
|
3
|
+
if (status === 'changed') return 'Changed since recorded build-state';
|
|
4
|
+
if (status === 'stale') return 'Stale against recorded build-state';
|
|
5
|
+
return 'No current lifecycle issue detected';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function buildSkillWorkbenchModel({
|
|
9
|
+
repoRoot,
|
|
10
|
+
selectedSkill,
|
|
11
|
+
dependencyRecords = [],
|
|
12
|
+
sourceStatuses = new Map(),
|
|
13
|
+
selectedStatus = 'unknown',
|
|
14
|
+
}) {
|
|
15
|
+
const selectedNode = {
|
|
16
|
+
id: selectedSkill.packageName,
|
|
17
|
+
type: 'skill',
|
|
18
|
+
repoRoot,
|
|
19
|
+
packageName: selectedSkill.packageName,
|
|
20
|
+
name: selectedSkill.name,
|
|
21
|
+
skillFile: selectedSkill.skillFile,
|
|
22
|
+
status: selectedStatus,
|
|
23
|
+
explanation: selectedStatus === 'stale'
|
|
24
|
+
? `Stale because one or more recorded sources changed: ${selectedSkill.sources.join(', ')}`
|
|
25
|
+
: 'Current against recorded build-state',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const sourceNodes = selectedSkill.sources.map((source) => ({
|
|
29
|
+
id: `source:${source}`,
|
|
30
|
+
type: 'source',
|
|
31
|
+
path: source,
|
|
32
|
+
status: sourceStatuses.get(source) || 'unknown',
|
|
33
|
+
explanation: explainNodeStatus(sourceStatuses.get(source) || 'unknown'),
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
const dependencyNodes = dependencyRecords.map((dependency) => ({
|
|
37
|
+
id: dependency.packageName,
|
|
38
|
+
type: 'dependency',
|
|
39
|
+
packageName: dependency.packageName,
|
|
40
|
+
status: dependency.status || 'unknown',
|
|
41
|
+
explanation: explainNodeStatus(dependency.status || 'unknown'),
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
selected: selectedNode,
|
|
46
|
+
nodes: [selectedNode, ...sourceNodes, ...dependencyNodes],
|
|
47
|
+
edges: [
|
|
48
|
+
...sourceNodes.map((node) => ({
|
|
49
|
+
source: node.id,
|
|
50
|
+
target: selectedNode.id,
|
|
51
|
+
kind: 'provenance',
|
|
52
|
+
})),
|
|
53
|
+
...dependencyNodes.map((node) => ({
|
|
54
|
+
source: selectedNode.id,
|
|
55
|
+
target: node.id,
|
|
56
|
+
kind: 'requires',
|
|
57
|
+
})),
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function buildTransitiveSkillWorkbenchModel({
|
|
63
|
+
repoRoot,
|
|
64
|
+
targetPackageName,
|
|
65
|
+
skillGraph,
|
|
66
|
+
statusMap,
|
|
67
|
+
changedSources = new Set(),
|
|
68
|
+
resolveSkillSources,
|
|
69
|
+
resolveSkillRequires,
|
|
70
|
+
}) {
|
|
71
|
+
const targetGraphNode = skillGraph.get(targetPackageName);
|
|
72
|
+
if (!targetGraphNode) return null;
|
|
73
|
+
|
|
74
|
+
const depthMap = new Map();
|
|
75
|
+
const parentMap = new Map();
|
|
76
|
+
const bfsOrder = [];
|
|
77
|
+
const queue = [{ name: targetPackageName, depth: 0, parent: null }];
|
|
78
|
+
|
|
79
|
+
while (queue.length > 0) {
|
|
80
|
+
const { name, depth, parent } = queue.shift();
|
|
81
|
+
if (depthMap.has(name)) continue;
|
|
82
|
+
|
|
83
|
+
depthMap.set(name, depth);
|
|
84
|
+
if (parent !== null) parentMap.set(name, parent);
|
|
85
|
+
bfsOrder.push(name);
|
|
86
|
+
|
|
87
|
+
const graphNode = skillGraph.get(name);
|
|
88
|
+
|
|
89
|
+
// Use graph dependencies if available, fall back to declared requires
|
|
90
|
+
const deps = graphNode
|
|
91
|
+
? graphNode.dependencies
|
|
92
|
+
: [];
|
|
93
|
+
|
|
94
|
+
// Also include declared requires that aren't in graph dependencies
|
|
95
|
+
const declared = resolveSkillRequires ? resolveSkillRequires(name) : [];
|
|
96
|
+
const allDeps = [...new Set([...deps, ...declared])];
|
|
97
|
+
|
|
98
|
+
for (const dep of allDeps) {
|
|
99
|
+
if (!depthMap.has(dep)) {
|
|
100
|
+
queue.push({ name: dep, depth: depth + 1, parent: name });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const nodes = [];
|
|
106
|
+
const edges = [];
|
|
107
|
+
const sourceTracker = new Map();
|
|
108
|
+
|
|
109
|
+
for (const packageName of bfsOrder) {
|
|
110
|
+
const graphNode = skillGraph.get(packageName);
|
|
111
|
+
if (!graphNode) {
|
|
112
|
+
nodes.push({
|
|
113
|
+
id: packageName,
|
|
114
|
+
type: 'dependency',
|
|
115
|
+
packageName,
|
|
116
|
+
name: packageName.split('/').pop(),
|
|
117
|
+
description: null,
|
|
118
|
+
version: null,
|
|
119
|
+
status: 'unknown',
|
|
120
|
+
explanation: 'Package not found in skill graph',
|
|
121
|
+
depth: depthMap.get(packageName),
|
|
122
|
+
});
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const isTarget = packageName === targetPackageName;
|
|
127
|
+
const status = statusMap?.get(packageName) || 'unknown';
|
|
128
|
+
|
|
129
|
+
nodes.push({
|
|
130
|
+
id: packageName,
|
|
131
|
+
type: isTarget ? 'skill' : 'dependency',
|
|
132
|
+
packageName,
|
|
133
|
+
name: graphNode.name,
|
|
134
|
+
description: graphNode.description || null,
|
|
135
|
+
version: graphNode.packageVersion || null,
|
|
136
|
+
status,
|
|
137
|
+
explanation: explainNodeStatus(status),
|
|
138
|
+
depth: depthMap.get(packageName),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const sources = resolveSkillSources(packageName);
|
|
142
|
+
for (const sourcePath of sources) {
|
|
143
|
+
const sourceId = `source:${sourcePath}`;
|
|
144
|
+
if (!sourceTracker.has(sourceId)) {
|
|
145
|
+
sourceTracker.set(sourceId, { path: sourcePath, usedBy: [] });
|
|
146
|
+
}
|
|
147
|
+
sourceTracker.get(sourceId).usedBy.push(packageName);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const deps = graphNode ? graphNode.dependencies : [];
|
|
151
|
+
const declared = resolveSkillRequires ? resolveSkillRequires(packageName) : [];
|
|
152
|
+
const allDeps = [...new Set([...deps, ...declared])];
|
|
153
|
+
|
|
154
|
+
for (const dep of allDeps) {
|
|
155
|
+
if (depthMap.has(dep)) {
|
|
156
|
+
edges.push({
|
|
157
|
+
source: packageName,
|
|
158
|
+
target: dep,
|
|
159
|
+
kind: 'requires',
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const sourceNodes = [];
|
|
166
|
+
for (const [sourceId, sourceData] of sourceTracker) {
|
|
167
|
+
const isChanged = changedSources.has(sourceData.path);
|
|
168
|
+
sourceNodes.push({
|
|
169
|
+
id: sourceId,
|
|
170
|
+
type: 'source',
|
|
171
|
+
path: sourceData.path,
|
|
172
|
+
status: isChanged ? 'changed' : 'current',
|
|
173
|
+
explanation: isChanged ? 'Changed since recorded build-state' : 'No current lifecycle issue detected',
|
|
174
|
+
depth: 0,
|
|
175
|
+
usedBy: sourceData.usedBy,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
for (const skillPackageName of sourceData.usedBy) {
|
|
179
|
+
edges.push({
|
|
180
|
+
source: sourceId,
|
|
181
|
+
target: skillPackageName,
|
|
182
|
+
kind: 'provenance',
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const selectedNode = nodes.find((n) => n.id === targetPackageName);
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
selected: selectedNode,
|
|
191
|
+
nodes: [...sourceNodes, ...nodes],
|
|
192
|
+
edges,
|
|
193
|
+
};
|
|
194
|
+
}
|