@skill-map/cli 0.29.0 → 0.31.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.
- package/dist/cli/tutorial/sm-master/references/fixture-templates.md +206 -0
- package/dist/cli/tutorial/sm-master/references/tour-authoring.md +296 -0
- package/dist/cli/tutorial/sm-master/references/tour-plugins.md +209 -0
- package/dist/cli/tutorial/sm-master/references/tour-settings.md +170 -0
- package/dist/cli.js +220 -86
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/{chunk-DMSZOXER.js → chunk-LNRQ7VKE.js} +1 -1
- package/dist/ui/{chunk-EFKSD7PT.js → chunk-PVKIT7DW.js} +4 -4
- package/dist/ui/chunk-YQIWQVJ6.js +317 -0
- package/dist/ui/favicon-matrix.svg +15 -0
- package/dist/ui/index.html +12 -2
- package/dist/ui/main-N23S66NJ.js +2 -0
- package/dist/ui/{styles-CDN434T2.css → styles-2WO3KNOY.css} +1 -1
- package/package.json +2 -2
- package/dist/ui/chunk-BL7KARTN.js +0 -317
- package/dist/ui/main-LGW7AYEA.js +0 -2
- /package/dist/cli/tutorial/{sm-master.md → sm-master/SKILL.md} +0 -0
- /package/dist/cli/tutorial/{sm-tutorial.md → sm-tutorial/SKILL.md} +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Tour: plugins-tour
|
|
2
|
+
|
|
3
|
+
Guided tour of the **built-in plugins** that ship with `sm`. Three
|
|
4
|
+
steps: a quick mental model of what bundles are plus a peek at
|
|
5
|
+
the catalogue, then the six extension kinds rounded off by opening
|
|
6
|
+
one bundle to see them in the wild, and finally a deeper drill
|
|
7
|
+
into a single extension (detail view, diagnostic, disable/enable
|
|
8
|
+
toggle). By the end the tester has the mental model and knows
|
|
9
|
+
which verbs reach which surface.
|
|
10
|
+
|
|
11
|
+
## Precondition check
|
|
12
|
+
|
|
13
|
+
Before announcing the first step, verify the fixture is initialised
|
|
14
|
+
(the cwd has `.claude/agents/master-agent.md`,
|
|
15
|
+
`.claude/skills/master-skill/SKILL.md`, AND `.skill-map/` with
|
|
16
|
+
`settings.json` and `skill-map.db`). Pre-flight already ran
|
|
17
|
+
`sm init --no-scan` and appended the master entries to
|
|
18
|
+
`.skillmapignore`. If any of that is missing, surface the
|
|
19
|
+
bootstrap mismatch ("master-state.yml says we are running, but
|
|
20
|
+
the bootstrap is missing. Run `sm-master` from an empty dir or
|
|
21
|
+
restore the files.") and stop.
|
|
22
|
+
|
|
23
|
+
## Step `tour-1-intro` — how plugins work (~4 min)
|
|
24
|
+
|
|
25
|
+
**Context**: A short tour of what a plugin is, how they're
|
|
26
|
+
packaged into bundles, and a peek at the four bundles that ship
|
|
27
|
+
pre-installed.
|
|
28
|
+
|
|
29
|
+
> Plugins are how skill-map gets extended. A **plugin** groups one
|
|
30
|
+
> or more **extensions**, the actual code units that run inside
|
|
31
|
+
> the kernel. So when we say "skill-map has a plugin for Claude",
|
|
32
|
+
> what we really mean is "there is a plugin called `claude` that
|
|
33
|
+
> contains one extension (a provider) which knows how to walk
|
|
34
|
+
> `.claude/`".
|
|
35
|
+
>
|
|
36
|
+
> Plugins ship as **bundles**. A bundle is the deployable unit,
|
|
37
|
+
> one directory with a `plugin.json` manifest and the extension
|
|
38
|
+
> code. Two ways they reach your project:
|
|
39
|
+
>
|
|
40
|
+
> 📦 **Built-in bundles**
|
|
41
|
+
> Travel inside the CLI itself. Available the moment you
|
|
42
|
+
> `npm install -g @skill-map/cli`.
|
|
43
|
+
>
|
|
44
|
+
> 📥 **Drop-in bundles**
|
|
45
|
+
> You (your company, or someone else) drop them by hand under
|
|
46
|
+
> `<cwd>/.skill-map/plugins/`. The directory lives inside the
|
|
47
|
+
> project, so a bundle committed here travels with the repo
|
|
48
|
+
> and the rest of the team picks it up on the next pull.
|
|
49
|
+
|
|
50
|
+
> Now let's look at what's actually installed. `sm plugins list`
|
|
51
|
+
> shows every bundle the CLI shipped with. Run it in your second
|
|
52
|
+
> terminal:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
sm plugins list
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> There are the four bundles. The next step zooms into the six
|
|
59
|
+
> kinds of extension that bundles can carry, you'll see at least
|
|
60
|
+
> one of each living inside `core`.
|
|
61
|
+
|
|
62
|
+
Mark `tour-1-intro: done`.
|
|
63
|
+
|
|
64
|
+
## Step `tour-2-kinds` — the six extension kinds (~5 min)
|
|
65
|
+
|
|
66
|
+
> An extension has a **kind**. The kind tells the kernel where it
|
|
67
|
+
> plugs into the pipeline. There are exactly six kinds:
|
|
68
|
+
>
|
|
69
|
+
> 🗂️ **provider**
|
|
70
|
+
> Decides what kind each `.md` file is. The `claude` provider,
|
|
71
|
+
> for instance, walks `.claude/` and types each file it finds
|
|
72
|
+
> (agent, command, or skill).
|
|
73
|
+
> Examples: `claude`, `gemini`, `agent-skills`.
|
|
74
|
+
>
|
|
75
|
+
> 🔍 **extractor**
|
|
76
|
+
> Reads a node's body and emits structured findings (links,
|
|
77
|
+
> counts, annotations).
|
|
78
|
+
> Example: `markdown-link`, `external-url-counter`, `tools-count`.
|
|
79
|
+
>
|
|
80
|
+
> 🩺 **analyzer**
|
|
81
|
+
> Cross-checks the scan and emits issues plus various
|
|
82
|
+
> detections (errors, warnings, informational signals: broken
|
|
83
|
+
> refs, stale annotations, schema drift, and more).
|
|
84
|
+
> Example: `broken-ref`, `stability`, `unknown-field`.
|
|
85
|
+
>
|
|
86
|
+
> ⚡ **action**
|
|
87
|
+
> Performs a write operation on a node, the graph, or the
|
|
88
|
+
> filesystem. May modify your `.md` files (frontmatter, body)
|
|
89
|
+
> ONLY with your explicit permission.
|
|
90
|
+
> Examples: `bump`, `mark-superseded`.
|
|
91
|
+
>
|
|
92
|
+
> 🎨 **formatter**
|
|
93
|
+
> Renders a result in a specific shape (`sm export --format md`
|
|
94
|
+
> and `--format json`).
|
|
95
|
+
> Example: `ascii`, `json`.
|
|
96
|
+
>
|
|
97
|
+
> 🎣 **hook**
|
|
98
|
+
> Fires on one of 10 lifecycle events (`boot`, `scan.started`,
|
|
99
|
+
> `shutdown`, etc.). `update-check`, for instance, listens on
|
|
100
|
+
> `boot` (throttled to once a day) and prints a banner if a
|
|
101
|
+
> newer skill-map is available on npm.
|
|
102
|
+
> Example: `update-check`.
|
|
103
|
+
>
|
|
104
|
+
> Putting it together: a **bundle** packages one or more
|
|
105
|
+
> **extensions**, each extension has a **kind**, the kind decides
|
|
106
|
+
> where it plugs into the kernel.
|
|
107
|
+
>
|
|
108
|
+
> Heads up: every `sm plugins` verb you'll run in this tour is
|
|
109
|
+
> also available from the UI. From any `sm serve` session, open
|
|
110
|
+
> the **gear icon → Plugins** tab to browse and toggle plugins
|
|
111
|
+
> from there. CLI and UI use the same store, so a change in one
|
|
112
|
+
> is reflected in the other.
|
|
113
|
+
|
|
114
|
+
> Now let's see those six kinds inside a real bundle. Open `core`
|
|
115
|
+
> in your second terminal:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
sm plugins show core
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Expected: a table with 24 rows, each carrying `kind/id@version`.
|
|
122
|
+
You can spot at least one of each of the six kinds you just read
|
|
123
|
+
about, all packed into a single bundle.
|
|
124
|
+
|
|
125
|
+
Mark `tour-2-kinds: done`.
|
|
126
|
+
|
|
127
|
+
## Step `tour-3-explore` — explore one extension up close (~4 min)
|
|
128
|
+
|
|
129
|
+
**Context**: Drill into a single extension to see its detail,
|
|
130
|
+
run the diagnostic, then toggle one off and back on so you see
|
|
131
|
+
the change persists.
|
|
132
|
+
|
|
133
|
+
> Pick one extension and look at its details. We'll use
|
|
134
|
+
> `core/external-url-counter`, an extractor that counts how many
|
|
135
|
+
> external URLs each node body contains:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
sm plugins show core/external-url-counter
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Expected: a focused detail block for that one extension (header,
|
|
142
|
+
Kind, Version, Stability, Description, Preconditions, Entry).
|
|
143
|
+
|
|
144
|
+
> Now run the diagnostic. The `doctor` verb reports every plugin
|
|
145
|
+
> and extension status in one go: enabled, disabled, load errors,
|
|
146
|
+
> spec compatibility, manifest validity.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
sm plugins doctor
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Expected on a clean machine: `27 enabled · 0 issues · 0 warnings`.
|
|
153
|
+
If any plugin reports a load error, manifest validity issue, or
|
|
154
|
+
spec-compatibility mismatch, `doctor` is the verb that flags it.
|
|
155
|
+
|
|
156
|
+
> Last, toggle one extension off and back on so you see the state
|
|
157
|
+
> persists across CLI invocations. We'll use the same one you
|
|
158
|
+
> inspected above:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
sm plugins disable core/external-url-counter
|
|
162
|
+
sm plugins doctor
|
|
163
|
+
sm plugins enable core/external-url-counter
|
|
164
|
+
sm plugins doctor
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Expected: between the two `doctor` calls, the
|
|
168
|
+
`core/external-url-counter` row flips from `enabled` to
|
|
169
|
+
`disabled` and back. The change persists in the project DB; if
|
|
170
|
+
you restarted `sm`, the disabled state would still be there.
|
|
171
|
+
|
|
172
|
+
Mark `tour-3-explore: done`.
|
|
173
|
+
|
|
174
|
+
## Tour wrap-up
|
|
175
|
+
|
|
176
|
+
> All set. You now know:
|
|
177
|
+
>
|
|
178
|
+
> - What plugins, extensions, bundles, and the six kinds are.
|
|
179
|
+
> - Four bundles ship pre-installed (`claude`, `gemini`,
|
|
180
|
+
> `agent-skills`, `core`).
|
|
181
|
+
> - How to list, inspect, diagnose, and toggle extensions from
|
|
182
|
+
> the CLI (and the same lives in the UI).
|
|
183
|
+
>
|
|
184
|
+
> If you want to dig deeper, the next menu option takes you into
|
|
185
|
+
> authoring your own plugin and into settings + view-slots. Or
|
|
186
|
+
> if you've seen enough, "I'm done for today" closes us out.
|
|
187
|
+
>
|
|
188
|
+
> Anything weird worth logging? If not, back to the menu.
|
|
189
|
+
|
|
190
|
+
Mark tour `plugins-tour: done` in `master-state.yml`, update the
|
|
191
|
+
matching harness task, return to the menu in `SKILL.md`.
|
|
192
|
+
|
|
193
|
+
## Reference: how `sm` decides what to load
|
|
194
|
+
|
|
195
|
+
Not for the tester unless they ask. Cheat sheet for the agent:
|
|
196
|
+
|
|
197
|
+
- Built-in plugins live inside the CLI bundle and are always
|
|
198
|
+
discovered first.
|
|
199
|
+
- Project plugins live under `<cwd>/.skill-map/plugins/`; the
|
|
200
|
+
authoring tour uses this path. There is no user / global
|
|
201
|
+
scope, `-g/--global` and `~/.skill-map/plugins/` were removed
|
|
202
|
+
in v0.27.x.
|
|
203
|
+
- Load order: built-in → project (project ids that collide with
|
|
204
|
+
built-in are surfaced by `doctor`).
|
|
205
|
+
- `disable`/`enable` writes the state into the project DB; it
|
|
206
|
+
survives restarts.
|
|
207
|
+
- Escape hatch for one-off probing without committing a plugin to
|
|
208
|
+
the project: pass `--plugin-dir <path>` on the `sm plugins …`
|
|
209
|
+
verb family.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Tour: settings + slots (step library, `settings-*` ids)
|
|
2
|
+
|
|
3
|
+
Step bodies for two tours: option 2 (`settings-and-consent`,
|
|
4
|
+
runs `settings-1-project` and `settings-2-local`) and the
|
|
5
|
+
single shared step `settings-6-contributions` borrowed by
|
|
6
|
+
option 3 (`build-and-configure`). The SKILL.md orchestrator
|
|
7
|
+
dispatches each `settings-*` id here; `authoring-*` ids it
|
|
8
|
+
dispatches to `tour-authoring.md`.
|
|
9
|
+
|
|
10
|
+
## Precondition check
|
|
11
|
+
|
|
12
|
+
Same as the authoring step library: `.skill-map/` must exist in
|
|
13
|
+
the cwd (pre-flight step 4 of `SKILL.md` ran `sm init --no-scan`
|
|
14
|
+
and appended the master-tutorial's internal entries to
|
|
15
|
+
`.skillmapignore`, so this is the expected state). If
|
|
16
|
+
`.skill-map/` is missing, surface the bootstrap mismatch and
|
|
17
|
+
stop, do not try to re-init mid-tour.
|
|
18
|
+
|
|
19
|
+
## Step `settings-1-project` — project settings (~2 min)
|
|
20
|
+
|
|
21
|
+
> Every project that runs `sm init` gets a `.skill-map/`
|
|
22
|
+
> directory with two settings files. The first one is
|
|
23
|
+
> `settings.json`, this is the **public** project settings, the
|
|
24
|
+
> file you commit to git.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cat .skill-map/settings.json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Expected output on a fresh init:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"schemaVersion": 1
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
> Minimal on purpose. The CLI keeps the file lean and only adds
|
|
39
|
+
> keys when you change a setting. Schema version is there so the
|
|
40
|
+
> CLI can migrate the shape forward without surprising you.
|
|
41
|
+
>
|
|
42
|
+
> The settings UI in the browser (the `Settings` tab when `sm` is
|
|
43
|
+
> running) writes back into this file. Anything you change in
|
|
44
|
+
> there ends up here, commit it to share the choice with the
|
|
45
|
+
> team.
|
|
46
|
+
|
|
47
|
+
Mark `settings-1-project: done`.
|
|
48
|
+
|
|
49
|
+
## Step `settings-2-local` — per-user overrides (~3 min)
|
|
50
|
+
|
|
51
|
+
> The second file is `settings.local.json`, which is **gitignored
|
|
52
|
+
> by default**. It exists for choices that should NOT travel
|
|
53
|
+
> across the team:
|
|
54
|
+
>
|
|
55
|
+
> - Whether you allowed `sm` to create `.sm` companion files in
|
|
56
|
+
> this project (the consent gate from the basic tutorial).
|
|
57
|
+
> - Personal token paths or credentials you do not want to
|
|
58
|
+
> commit.
|
|
59
|
+
> - Local preferences that depend on your dev environment.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cat .skill-map/settings.local.json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Expected on a fresh init:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> Empty until something writes to it. The first thing that
|
|
72
|
+
> typically lands is `allowEditSmFiles: true` after you accept
|
|
73
|
+
> the `.sm` prompt (the consent gate is a per-user, per-project
|
|
74
|
+
> choice, that's why it goes here).
|
|
75
|
+
|
|
76
|
+
Before the demo, give the tester one sentence of context about
|
|
77
|
+
what a `.sm` file actually is (the basic tutorial introduces it
|
|
78
|
+
in passing, here we anchor the concept):
|
|
79
|
+
|
|
80
|
+
> Every `.md` skill-map tracks gets a sibling `.sm` file (e.g.
|
|
81
|
+
> `notes/ideas.sm` next to `notes/ideas.md`) that carries **all
|
|
82
|
+
> of the tool's metadata about that markdown, so your `.md`
|
|
83
|
+
> stays clean and uncluttered**. Version, history, tags,
|
|
84
|
+
> annotations, anything that does not belong in the
|
|
85
|
+
> human-authored body lives in the `.sm`. The `.md` is content
|
|
86
|
+
> you write for Claude or humans, the `.sm` is bookkeeping the
|
|
87
|
+
> tool writes. They are ordinary source files, committed to git,
|
|
88
|
+
> and you'll see them often once you start using `sm bump` /
|
|
89
|
+
> `sm sidecar annotate` day to day.
|
|
90
|
+
|
|
91
|
+
If the tester wants to see it in action: ask them to run
|
|
92
|
+
`sm sidecar annotate notes/ideas.md`, accept the `[Y/n]` prompt
|
|
93
|
+
with `y`, and re-check the file:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
sm sidecar annotate notes/ideas.md
|
|
97
|
+
cat .skill-map/settings.local.json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Expected: now contains `{"allowEditSmFiles": true}` (plus a
|
|
101
|
+
`notes/ideas.sm` file landed next to the markdown).
|
|
102
|
+
|
|
103
|
+
> The choice stuck. Next time `sm` wants to write a `.sm` in this
|
|
104
|
+
> project, it skips the prompt because your consent is on
|
|
105
|
+
> record. If you delete the file or move to a different project,
|
|
106
|
+
> the prompt comes back.
|
|
107
|
+
|
|
108
|
+
Mark `settings-2-local: done`.
|
|
109
|
+
|
|
110
|
+
## Step `settings-6-contributions` — watch contributions land (~2 min)
|
|
111
|
+
|
|
112
|
+
> Last step. Let's see a contribution land in the inspector
|
|
113
|
+
> live. The fixture's `master-agent` declares `tools: [Read,
|
|
114
|
+
> Bash, Edit]`, which the `core/tools-count` extractor picks up.
|
|
115
|
+
|
|
116
|
+
If the tester does not have `sm` running, ask them to launch it
|
|
117
|
+
in their second terminal (same drill as the basic tutorial:
|
|
118
|
+
`sm`, copy the link from the output, open the browser, arrange
|
|
119
|
+
the screen). If `sm` is still running, leave it.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
sm
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Once the UI is open, ask the tester to:
|
|
126
|
+
|
|
127
|
+
> Click the `master-agent` node. The inspector opens on the
|
|
128
|
+
> right side. Look at the **header badge cluster** (just under
|
|
129
|
+
> the title): you should see a small chip from `tools-count`
|
|
130
|
+
> showing the value `3`.
|
|
131
|
+
>
|
|
132
|
+
> That chip is a plugin contribution. It landed in the slot
|
|
133
|
+
> `inspector.header.badge.counter`, the renderer is `NodeCounter`
|
|
134
|
+
> (same one your scaffold uses), the payload was `{ value: 3 }`.
|
|
135
|
+
|
|
136
|
+
If the `demo-highlight` plugin from the earlier authoring steps
|
|
137
|
+
of this tour is still installed, point the tester at the
|
|
138
|
+
contribution it emits too:
|
|
139
|
+
|
|
140
|
+
> The `demo-highlight` you scaffolded earlier in this tour also
|
|
141
|
+
> shows up: its chip lands on every node that has a TODO / FIXME
|
|
142
|
+
> / XXX in its body. Click `notes/ideas` to find it.
|
|
143
|
+
|
|
144
|
+
Have the tester change `master-agent`'s `tools` array (add or
|
|
145
|
+
remove one tool), save, and watch the chip refresh.
|
|
146
|
+
|
|
147
|
+
> Same flow as the basic tutorial's live UI: edit the markdown,
|
|
148
|
+
> watch the UI refresh. The difference is that the value flowed
|
|
149
|
+
> through a plugin (`core/tools-count`) and landed in a specific
|
|
150
|
+
> slot (`inspector.header.badge.counter`). You now know the full
|
|
151
|
+
> path from `.md` to UI chip.
|
|
152
|
+
|
|
153
|
+
Have them Ctrl+C the server when done.
|
|
154
|
+
|
|
155
|
+
Mark `settings-6-contributions: done`.
|
|
156
|
+
|
|
157
|
+
## Reference: where each catalogue lives in the repo
|
|
158
|
+
|
|
159
|
+
Not for the tester unless they ask. Cheat sheet for the agent:
|
|
160
|
+
|
|
161
|
+
- **Slot catalogue (normative)**:
|
|
162
|
+
`spec/schemas/view-slots.schema.json` (enum + payload schemas).
|
|
163
|
+
- **Slot catalogue (UI mirror)**: `ui/src/app/slots/slot-config.ts`
|
|
164
|
+
(layout) and `ui/src/app/slots/slot-renderer-map.ts` (renderer
|
|
165
|
+
binding).
|
|
166
|
+
- **Input-types catalogue (normative)**: `spec/input-types.md`.
|
|
167
|
+
- **Plugin manifest schema**:
|
|
168
|
+
`spec/schemas/plugin-manifest.schema.json`.
|
|
169
|
+
- **Author tutorial**: `spec/plugin-author-guide.md`.
|
|
170
|
+
- **Slot annex for agents**: `context/view-slots.md`.
|