@skill-map/cli 0.51.0 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +239 -1659
  2. package/dist/cli/tutorial/sm-tutorial/references/_core.md +332 -0
  3. package/dist/cli/tutorial/sm-tutorial/references/_manifest.yml +175 -0
  4. package/dist/cli/tutorial/sm-tutorial/references/fixtures.md +251 -0
  5. package/dist/cli/tutorial/{sm-master/references/tour-authoring.md → sm-tutorial/references/part-authoring.md} +14 -15
  6. package/dist/cli/tutorial/sm-tutorial/references/part-cli.md +267 -0
  7. package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +180 -0
  8. package/dist/cli/tutorial/sm-tutorial/references/part-fundamentals.md +424 -0
  9. package/dist/cli/tutorial/sm-tutorial/references/part-live-site.md +156 -0
  10. package/dist/cli/tutorial/sm-tutorial/references/part-maintain.md +286 -0
  11. package/dist/cli/tutorial/sm-tutorial/references/part-mcp.md +78 -0
  12. package/dist/cli/tutorial/{sm-master/references/tour-plugins.md → sm-tutorial/references/part-plugins.md} +11 -11
  13. package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +186 -0
  14. package/dist/cli/tutorial/{sm-master/references/tour-settings.md → sm-tutorial/references/part-settings.md} +22 -24
  15. package/dist/cli.js +1253 -564
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +335 -208
  18. package/dist/kernel/index.d.ts +320 -15
  19. package/dist/kernel/index.js +335 -208
  20. package/dist/migrations/001_initial.sql +36 -0
  21. package/dist/ui/chunk-EQ72PEHT.js +1 -0
  22. package/dist/ui/chunk-GBKHMJ4B.js +1110 -0
  23. package/dist/ui/chunk-GEI6INVH.js +515 -0
  24. package/dist/ui/chunk-JXRIGHET.js +552 -0
  25. package/dist/ui/{chunk-WQMZOINB.js → chunk-K2MAVAHG.js} +1 -1
  26. package/dist/ui/{chunk-BV323KTK.js → chunk-KHARMPTZ.js} +1 -1
  27. package/dist/ui/chunk-L4NIF75A.js +2 -0
  28. package/dist/ui/chunk-LCOYSPKE.js +1 -0
  29. package/dist/ui/chunk-OFDQMBSJ.js +1 -0
  30. package/dist/ui/chunk-P2DAPRK7.js +2 -0
  31. package/dist/ui/chunk-Q2A6FWC7.js +4 -0
  32. package/dist/ui/chunk-TXTY24G4.js +2204 -0
  33. package/dist/ui/chunk-UBQUCSQ4.js +1 -0
  34. package/dist/ui/chunk-WFLPMCK4.js +392 -0
  35. package/dist/ui/chunk-WHZVGOS3.js +5 -0
  36. package/dist/ui/chunk-YQFIXHKM.js +123 -0
  37. package/dist/ui/index.html +2 -2
  38. package/dist/ui/main-OYITFJ7B.js +4 -0
  39. package/dist/ui/{styles-RG7Y33BT.css → styles-Q4NCOJQY.css} +1 -1
  40. package/migrations/001_initial.sql +36 -0
  41. package/package.json +10 -8
  42. package/dist/cli/tutorial/sm-master/SKILL.md +0 -688
  43. package/dist/cli/tutorial/sm-master/references/fixture-templates.md +0 -212
  44. package/dist/ui/chunk-2GXE52AJ.js +0 -123
  45. package/dist/ui/chunk-AEA5GIA7.js +0 -1
  46. package/dist/ui/chunk-KHRNVLJW.js +0 -1
  47. package/dist/ui/chunk-OZTRR4M7.js +0 -2312
  48. package/dist/ui/chunk-Q5YJKCTP.js +0 -1066
  49. package/dist/ui/chunk-RCT3JSFL.js +0 -1
  50. package/dist/ui/chunk-VBTLX7GH.js +0 -1110
  51. package/dist/ui/chunk-VJ57LHDR.js +0 -4
  52. package/dist/ui/chunk-WMGW2UAL.js +0 -2
  53. package/dist/ui/main-N7D2YBEX.js +0 -4
@@ -0,0 +1,156 @@
1
+ # Part 5: The site, live (step library, finale, `generate` + `serve`)
2
+
3
+ This is the finale, the climax of the whole campaign. Pace
4
+ `auto-advance`, preflight `reuse` (it builds straight on the
5
+ portfolio harness from the earlier parts, same cwd). Two chapters,
6
+ in order: `generate` (the agent writes the real HTML pages) then
7
+ `serve` (the tester runs the site and sees it in the browser).
8
+ Shared conventions live in `_core.md`.
9
+
10
+ ## Chapter `generate` - The agent generates the HTML in public/ (~3 min)
11
+
12
+ **Context**: this is the payoff of the whole harness. The
13
+ `content-editor` agent exists to write the site's pages, so now you
14
+ (playing that agent) generate the actual HTML into `public/`. The
15
+ honest beat the tester must hear: writing HTML does NOT move the
16
+ skill-map graph. The graph is Layer 1, the `.md` harness that builds
17
+ the site; the HTML is Layer 2, the harness's OUTPUT, and skill-map
18
+ does not map it (HTML is not `.md`). So the Map will sit still while
19
+ real files land on disk, and that is correct, not a bug. Keep the
20
+ markup plain per the style guide: no framework, no client JS, one H1
21
+ per page, every page links back home.
22
+
23
+ **Preparation**: `Write` two static pages into `public/`. The
24
+ pre-flight already left a placeholder `public/index.html`; this
25
+ overwrites it with the real home page and adds an about page. Keep
26
+ the markup plain.
27
+
28
+ `public/index.html`:
29
+ ```html
30
+ <!doctype html>
31
+ <html lang="en">
32
+ <head>
33
+ <meta charset="utf-8" />
34
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
35
+ <title>My Portfolio</title>
36
+ </head>
37
+ <body>
38
+ <h1>My Portfolio</h1>
39
+ <p>Hi, I build small, sturdy things on the web.</p>
40
+ <nav>
41
+ <a href="/">Home</a> ·
42
+ <a href="/about.html">About</a>
43
+ </nav>
44
+ </body>
45
+ </html>
46
+ ```
47
+
48
+ `public/about.html`:
49
+ ```html
50
+ <!doctype html>
51
+ <html lang="en">
52
+ <head>
53
+ <meta charset="utf-8" />
54
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
55
+ <title>About</title>
56
+ </head>
57
+ <body>
58
+ <h1>About</h1>
59
+ <p>A short page about the person behind the portfolio.</p>
60
+ <nav>
61
+ <a href="/">Home</a>
62
+ </nav>
63
+ </body>
64
+ </html>
65
+ ```
66
+
67
+ ```bash
68
+ # Nothing for you to run yet. Look at both halves of your screen.
69
+ ```
70
+
71
+ Tell the tester:
72
+
73
+ > Here it is, the moment the whole harness was built for. Your
74
+ > `content-editor` agent did its real job: it wrote the actual web
75
+ > pages. Two HTML files just landed in your project under `public/`:
76
+ > the home page (`public/index.html`) and an about page
77
+ > (`public/about.html`), plain static markup that follows the style
78
+ > guide you set up earlier.
79
+ >
80
+ > Now glance at the Map. It did not change, and that is exactly
81
+ > right. Everything you watched grow on the canvas is your harness:
82
+ > the `.md` files and how they reference each other (call that
83
+ > Layer 1). The HTML pages are Layer 2, what the harness PRODUCES.
84
+ > skill-map maps the harness, not the pages it outputs (HTML is not
85
+ > `.md`), so writing real site files leaves the graph untouched. Two
86
+ > layers, one project: the graph that builds the site, and the site
87
+ > itself.
88
+ >
89
+ > Ready to see the site running?
90
+
91
+ Wait for confirmation. Mark `generate`: done. Auto-advance to
92
+ `serve`.
93
+
94
+ ## Chapter `serve` - node server.js: your portfolio, live, next to the graph (~4 min)
95
+
96
+ **Context**: the climax. The tester installs the single dependency
97
+ (Express) and starts the tiny server that the pre-flight already left
98
+ in `server.js`, then opens the site in the browser. They end with two
99
+ things side by side: the real portfolio they can click through, and
100
+ the skill-map graph of the harness that built it. Express runs on
101
+ Node, which the tester has from pre-flight (Node 24+), so no new
102
+ install beyond `npm install`. This chapter is one of the few where
103
+ the tester runs a non-`sm` command themselves (`npm install`,
104
+ `node server.js`); guide them, do not run it for them.
105
+
106
+ **Preparation**: none. `server.js` and `package.json` already exist
107
+ from the kickoff pre-flight; the pages exist from the `generate`
108
+ chapter. The tester runs everything in this chapter.
109
+
110
+ ```bash
111
+ npm install
112
+ node server.js
113
+ ```
114
+
115
+ Tell the tester:
116
+
117
+ > Last step, and it is the fun one. You have the pages; now let's
118
+ > serve them. In your terminal, run these two commands:
119
+ >
120
+ > The first, `npm install`, downloads the one small library the
121
+ > server needs (Express, a tiny web server). It runs on Node, which
122
+ > you already installed at the very start, so there is nothing new to
123
+ > set up.
124
+ >
125
+ > The second, `node server.js`, starts the server. It prints a line
126
+ > telling you it is listening, something like `Listening on
127
+ > http://localhost:3000`.
128
+ >
129
+ > Open `http://localhost:3000` in your browser. There it is: your
130
+ > portfolio, live. Click the **About** link, then the **Home** link
131
+ > to come back. Those are the very pages your harness produced.
132
+ >
133
+ > Now take a second to look at everything at once. On one side, the
134
+ > real running site you can click through. On the other, the
135
+ > skill-map graph of the harness that built it: the handbook, the
136
+ > agent, the style guide, the publish command, the link checker, the
137
+ > MCP tool, all wired together. You started in an empty folder with
138
+ > nothing, and you have ended with a real, running thing and a living
139
+ > map of how it all fits.
140
+ >
141
+ > Does the site load, and can you click between Home and About?
142
+
143
+ Wait for confirmation. The tester runs the commands; do not run them
144
+ for them. If `npm install` fails, check they are in the project root
145
+ (the cwd they have used all along) and that Node is on PATH (`node
146
+ --version` should print 24 or higher). If the port is busy, they can
147
+ stop the server with Ctrl+C and the edge case for ports applies the
148
+ same as elsewhere.
149
+
150
+ When they confirm, this closes Part 5 and the campaign. Tell the
151
+ tester they went from an empty directory to a real portfolio site
152
+ plus a complete map of its harness, congratulate them plainly, and
153
+ remind them the server stays running until they press Ctrl+C. Mark
154
+ `serve`: done. The orchestrator returns to the ToC menu (the
155
+ campaign spine is complete; the final wrap-up in `_core.md` applies
156
+ when the tester signals they are finished).
@@ -0,0 +1,286 @@
1
+ # Part 3: Maintain the site (step library, `maintain`)
2
+
3
+ This is the upkeep part. The harness from Part 2 is wired and clean; real projects drift, links break, drafts pile up, names collide. Here the tester breaks something on purpose and fixes it, meets the analyzer catalogue that catches those problems, finds an orphan nobody links to, clears a reserved-name warning, and learns the `.sm` companion files that carry the tool's bookkeeping. `pace: auto-advance` (walk straight into the next chapter once one is marked done), `preflight: reuse` (it builds on the portfolio harness from Parts 1 and 2, no fresh fixture of its own). Shared conventions (tone, provider detection / substitution, the `> ` rendering rule, the per-step cycle) live in `_core.md`; do not restate them here.
4
+
5
+ ## Chapter `broken-ref` - A link breaks (~3 min)
6
+
7
+ **Context**: the most common kind of decay in a real project is a link that points at a file someone renamed or moved. Here the tester renames `docs/DEPLOY.md`, which breaks the `/publish -> docs/DEPLOY.md` reference from Part 2, and `sm check` surfaces it as `core/reference-broken`. Then they fix it by updating the link. Same watcher / live-UI loop they already know, plus the CLI verb that catalogues the issue.
8
+
9
+ This chapter is the tester's hands the whole way (renaming and editing their own files, Inviolable rule #2). Tell the tester to start the server again first if it is not running:
10
+
11
+ ```bash
12
+ sm
13
+ ```
14
+
15
+ > Open the URL `sm` prints, same as before. Now break something on
16
+ > purpose. Rename your deploy runbook from `docs/DEPLOY.md` to
17
+ > `docs/DEPLOYMENT.md` (just change the filename, leave the contents
18
+ > alone). On most systems that is one command in the terminal:
19
+ >
20
+ > ```bash
21
+ > mv docs/DEPLOY.md docs/DEPLOYMENT.md
22
+ > ```
23
+ >
24
+ > Watch the **Map**: the `publish -> docs/DEPLOY.md` arrow can no
25
+ > longer find its target, because nothing called `docs/DEPLOY.md`
26
+ > exists anymore. The link is now dangling.
27
+
28
+ After they confirm the rename, have them ask skill-map about it:
29
+
30
+ ```bash
31
+ sm scan
32
+ sm check
33
+ ```
34
+
35
+ > `sm scan` refreshes what skill-map knows from disk, then `sm check`
36
+ > reports the problem: an issue from the `core/reference-broken`
37
+ > analyzer (a rule that flags links pointing at files that do not
38
+ > exist), naming the link `../../docs/DEPLOY.md` inside your `/publish`
39
+ > command. That is the broken reference you just created.
40
+ >
41
+ > Now fix it. Open `.claude/commands/publish.md` in your editor and
42
+ > change the deploy-runbook link so it points at the new filename:
43
+ > `[deploy runbook](../../docs/DEPLOYMENT.md)`. Save, then re-check:
44
+ >
45
+ > ```bash
46
+ > sm scan
47
+ > sm check
48
+ > ```
49
+ >
50
+ > `sm check` should print `✓ No issues` and the arrow comes back on
51
+ > the **Map**. (If you would rather not keep the new name, renaming
52
+ > the file back to `docs/DEPLOY.md` clears it just as well, but the
53
+ > link edit is the more realistic fix.)
54
+ >
55
+ > Did the issue surface and then clear?
56
+
57
+ Wait for confirmation. You MAY use `Read` on `.claude/commands/publish.md` to verify the link edit landed. Leave the server running, the next chapters reuse it. Mark `broken-ref`: done.
58
+
59
+ ## Chapter `analyzers` - The analyzer catalogue (~3 min)
60
+
61
+ **Context**: `reference-broken` was just one rule. `sm check` runs a catalogue of around 16 deterministic analyzers, each catching a different family of problem. This chapter names a few and shows how to focus on one with `--analyzers`. No fixture changes, the tester just runs the verb against the clean harness.
62
+
63
+ No file edits in this chapter.
64
+
65
+ Tell the tester:
66
+
67
+ > The broken-ref you just saw is one rule out of a catalogue. `sm
68
+ > check` runs roughly 16 deterministic analyzers (each one a small
69
+ > rule that scans your harness for a specific kind of problem). A few
70
+ > of the families:
71
+ >
72
+ > - `core/reference-broken`: a link points at a file that does not
73
+ > exist (the one you just triggered).
74
+ > - `core/name-reserved`: a file is named after a built-in the vendor
75
+ > runtime owns, so that runtime would ignore it (you will see this
76
+ > one live in a couple of chapters).
77
+ > - `core/link-self-loop`: a node links to itself.
78
+ > - `core/reference-redundant`: the same body points at the same
79
+ > target twice.
80
+ > - `core/signal-collision`: two analyzers disagreed about the same
81
+ > slice of a file, and the warning explains who won and why.
82
+ >
83
+ > When you only care about one, focus on it:
84
+ >
85
+ > ```bash
86
+ > sm check
87
+ > sm check --analyzers reference-broken
88
+ > ```
89
+ >
90
+ > The first runs the whole catalogue; the second narrows the report to
91
+ > just the reference-broken rule. Your harness is clean right now, so
92
+ > both print `✓ No issues`, but the same `--analyzers <id>` pattern
93
+ > works for every rule in the catalogue.
94
+ >
95
+ > Paste me the output (or just an OK).
96
+
97
+ Wait for confirmation. Mark `analyzers`: done.
98
+
99
+ ## Chapter `orphans` - A page nobody links to (~3 min)
100
+
101
+ **Context**: a different kind of loose end. A node can be perfectly valid and still be an orphan: nothing in the harness links to it. We create a draft page that no one references, and `sm orphans` finds it. The point is to separate three ideas the tester now has names for: orphan (nothing points at it) vs broken-ref (a link with no target) vs issue (a rule violation).
102
+
103
+ `Write` `docs/draft.md` (markdown kind), a half-finished page nobody has wired up yet:
104
+
105
+ ```markdown
106
+ ---
107
+ name: draft
108
+ description: |
109
+ Half-finished page nobody links to yet. Here to show what an
110
+ orphan looks like: a valid node with no incoming connectors.
111
+ tags: [docs, portfolio, draft]
112
+ ---
113
+
114
+ # Draft page
115
+
116
+ Notes for a page that is not ready to link from anywhere yet.
117
+ ```
118
+
119
+ Confirm the new `docs/draft` node appears on the **Map** as a floating dot with no arrows in or out.
120
+
121
+ Tell the tester:
122
+
123
+ > I dropped a new note into your project, `docs/draft.md`, a
124
+ > half-finished page. Look at the **Map**: it shows up as a floating
125
+ > dot with no arrows touching it. Nothing in your harness links to it,
126
+ > which makes it an **orphan**.
127
+ >
128
+ > ```bash
129
+ > sm orphans
130
+ > ```
131
+ >
132
+ > `sm orphans` lists exactly that: nodes nothing points at. It is
133
+ > worth keeping three ideas apart, because they are easy to confuse:
134
+ >
135
+ > - **orphan**: a real, valid node that simply has no incoming link
136
+ > (your `docs/draft`). Not an error, just unreferenced.
137
+ > - **broken-ref**: a link whose target file does not exist (the one
138
+ > you triggered by renaming the runbook). That is a real issue.
139
+ > - **issue**: any rule violation `sm check` reports (broken-ref is
140
+ > one family; name-reserved, self-loop and the rest are others).
141
+ >
142
+ > An orphan is not automatically a problem (a draft you have not wired
143
+ > up yet is fine), it is just skill-map pointing out the page is not
144
+ > reachable from anywhere. When you link to it later, it stops being
145
+ > an orphan.
146
+ >
147
+ > Did `sm orphans` list `docs/draft`?
148
+
149
+ Wait for confirmation. Mark `orphans`: done.
150
+
151
+ ## Chapter `reserved` - A reserved name collides (~3 min)
152
+
153
+ **Context**: vendor runtimes own certain names (`/init`, `/help`, `/clear`, and friends). If the tester names a command after one of those, the runtime ignores their file and skill-map raises a `core/name-reserved` warning to say so. We create the collision, see the warning, then rename to clear it.
154
+
155
+ `Write` `.claude/commands/init.md` (substitute `<provider_dir>` per `_core.md`; on `agent-skills` / Antigravity there is no `command` kind, so skip this whole chapter), deliberately named after the built-in `/init`:
156
+
157
+ ```markdown
158
+ ---
159
+ name: init
160
+ description: |
161
+ Bootstraps a fresh portfolio scaffold. Named init on purpose, to
162
+ collide with the runtime built-in and trigger name-reserved.
163
+ args:
164
+ - name: target
165
+ type: path
166
+ description: Folder to scaffold into.
167
+ required: true
168
+ ---
169
+
170
+ # /init
171
+
172
+ Sets up the empty folders a new portfolio needs.
173
+ ```
174
+
175
+ Confirm the new `init` command node appears on the **Map**.
176
+
177
+ Tell the tester:
178
+
179
+ > I added a command called `/init` to your harness. There is a catch:
180
+ > `/init` is a name the vendor runtime already owns for its own
181
+ > built-in, so the runtime would quietly ignore your file and never
182
+ > run it. Skill-map flags exactly that:
183
+ >
184
+ > ```bash
185
+ > sm scan
186
+ > sm check
187
+ > ```
188
+ >
189
+ > You will see a `core/name-reserved` warning naming the `init`
190
+ > command. It is not skill-map being fussy, it is telling you "the
191
+ > runtime will never invoke this file, pick another name". On the
192
+ > **Map**, any link into a shadowed node is drawn faint for the same
193
+ > reason.
194
+ >
195
+ > The fix is just to rename it. Rename `.claude/commands/init.md` to
196
+ > something that is not reserved, for example
197
+ > `.claude/commands/scaffold.md` (and update the `name:` in its
198
+ > frontmatter to `scaffold`). On most systems:
199
+ >
200
+ > ```bash
201
+ > mv .claude/commands/init.md .claude/commands/scaffold.md
202
+ > ```
203
+ >
204
+ > Then re-check:
205
+ >
206
+ > ```bash
207
+ > sm scan
208
+ > sm check
209
+ > ```
210
+ >
211
+ > The warning should be gone. A reserved name is one of the rare
212
+ > mistakes skill-map can catch before the runtime ever bites you.
213
+ >
214
+ > Did the warning appear and then clear after the rename?
215
+
216
+ Wait for confirmation. You MAY use `Read` to verify the rename landed. Mark `reserved`: done.
217
+
218
+ ## Chapter `sidecar` - The .sm companion file and its consent prompt (~3 min)
219
+
220
+ **Context**: every `.md` skill-map tracks can get a sibling **companion file** with extension `.sm` that carries all of the tool's metadata about that markdown (version, history, tags, annotations), so the `.md` stays clean and only holds the content you write. The `.md` is yours; the `.sm` is bookkeeping the tool writes. The first time skill-map wants to create one in a project it asks for consent, and the choice is remembered in `settings.local.json`. We demonstrate on the handbook.
221
+
222
+ This is a CLI beat, the tester runs everything. **Reset any prior consent first** so the `[Y/n]` prompt actually appears (an earlier session may have flipped the flag, in which case the verb would skip straight past it and the lesson would not land):
223
+
224
+ ```bash
225
+ rm -f AGENTS.sm .skill-map/settings.local.json
226
+ sm sidecar annotate AGENTS.md
227
+ ```
228
+
229
+ > `sm sidecar annotate` creates a fresh `.sm` companion file next to a
230
+ > markdown file. Because this is the first time skill-map wants to
231
+ > write one here, it shows a short explanation and then a `[Y/n]`
232
+ > prompt (capital Y is the default, so you can just press Enter to
233
+ > accept). skill-map never writes a `.sm` to your project without your
234
+ > OK.
235
+ >
236
+ > After you accept, two things happen: a new `AGENTS.sm` file appears
237
+ > next to `AGENTS.md` (carrying an `identity:` block and an empty
238
+ > `annotations: {}` block), and your project remembers the choice in
239
+ > `.skill-map/settings.local.json` so it never asks again. Take a look:
240
+ >
241
+ > ```bash
242
+ > cat AGENTS.sm
243
+ > cat .skill-map/settings.local.json
244
+ > ```
245
+ >
246
+ > You will see `AGENTS.sm` holds the tool's bookkeeping for the
247
+ > handbook, and `settings.local.json` now contains
248
+ > `{ "allowEditSmFiles": true }`. That flag lives in the local config
249
+ > layer (gitignored), so each contributor consents on their own
250
+ > checkout and the choice never travels through git.
251
+ >
252
+ > Did the prompt appear, and does `AGENTS.sm` exist now?
253
+
254
+ Wait for confirmation. You MAY use `Read` on `AGENTS.sm` to verify it landed. Mark `sidecar`: done.
255
+
256
+ ## Chapter `versions` - Bump a version, read its history (~3 min)
257
+
258
+ **Context**: now that the consent is granted, the day-to-day versioning verbs go through silently. `sm bump` increments a node's frontmatter version and appends a record to its `.sm` companion; `sm history` reads that trail back. We bump the content editor and read its history. Same consent gate as the previous chapter, already satisfied.
259
+
260
+ This is a CLI beat, the tester runs everything (substitute `<provider_dir>` in the path per `_core.md`):
261
+
262
+ ```bash
263
+ sm bump content-editor
264
+ sm history content-editor
265
+ ```
266
+
267
+ > `sm bump <node>` is the everyday versioning verb: it nudges the
268
+ > `version` field in the node's frontmatter up by one and appends an
269
+ > entry to that node's `.sm` companion file, recording that the bump
270
+ > happened. Because you already granted consent in the last chapter,
271
+ > it runs without prompting (the `.sm` write is pre-authorized for
272
+ > this checkout).
273
+ >
274
+ > `sm history <node>` reads that trail back: it prints the version
275
+ > entries skill-map has recorded for the content editor, so you can
276
+ > see how it has changed over time. Right after one bump you will see
277
+ > the single entry the bump just wrote.
278
+ >
279
+ > The two verbs are a pair: `sm bump` writes a version checkpoint into
280
+ > the companion file, `sm history` reads the checkpoints back out.
281
+ > Your `.md` body never gets cluttered with this, it all lives in the
282
+ > `.sm` alongside it.
283
+ >
284
+ > Does `sm history` show the bump you just made?
285
+
286
+ Wait for confirmation. Mark `versions`: done. This closes Part 3; the orchestrator returns to the ToC menu.
@@ -0,0 +1,78 @@
1
+ # Part 4: MCP (step library, `mcp-*` ids)
2
+
3
+ This is a chapter apart, the one just before the finale. Pace
4
+ `auto-advance`, preflight `reuse` (it builds straight on the
5
+ connected portfolio harness from the earlier parts, same cwd, same
6
+ live `sm` session). One chapter only. Shared conventions live in
7
+ `_core.md`.
8
+
9
+ ## Chapter `mcp-node` - The agent reaches for an MCP tool (~3 min)
10
+
11
+ **Context**: until now every node on the map has been a file you can
12
+ open. This chapter introduces a node that is NOT a file: an MCP
13
+ server the `content-editor` agent calls. MCP (Model Context
14
+ Protocol) is the standard way an agent reaches an external tool, and
15
+ Claude names those tools `mcp__<server>__<tool>` in an agent's
16
+ frontmatter. When the agent declares it uses `mcp__images__search`
17
+ (an image-search tool, so it can find art for the pages), skill-map's
18
+ `core/mcp-tools` extractor reads that declaration and draws a
19
+ virtual `mcp://images` node plus a `references` link from
20
+ content-editor to it. The link confidence is around 0.85 (high, but
21
+ not the 1.00 of a markdown link to a real file, because the target is
22
+ an external service, not a file on disk). If several harness members
23
+ named the same server, skill-map would draw a single shared
24
+ `mcp://images` node, not one per caller.
25
+
26
+ **Preparation**: `Edit` `<provider_dir>/agents/content-editor.md`
27
+ (substitute `<provider_dir>` per `_core.md`; on `agent-skills` /
28
+ Antigravity the editor is a `skill` instead, edit that file's
29
+ frontmatter the same way). Do NOT rewrite the file. Change only the
30
+ `tools:` line in the frontmatter so the MCP tool joins the existing
31
+ two:
32
+
33
+ ```yaml
34
+ tools: [Read, Write, mcp__images__search]
35
+ ```
36
+
37
+ The rest of the file stays exactly as it was.
38
+
39
+ ```bash
40
+ # Nothing for you to run here. Watch the Map.
41
+ ```
42
+
43
+ Tell the tester:
44
+
45
+ > Your `content-editor` agent just learned a new trick. I added an
46
+ > external tool to its toolbelt: an image search it can call to find
47
+ > art for the pages. In an agent's settings, Claude writes that kind
48
+ > of tool as `mcp__images__search`. MCP (Model Context Protocol) is
49
+ > just the agreed-on way an agent reaches a tool that lives outside
50
+ > your files.
51
+ >
52
+ > Watch the Map. A brand-new node appears, but this one is not a
53
+ > file you can open: `mcp://images`, with its own icon and colour
54
+ > (kind `mcp`). A `references` connector runs from `content-editor`
55
+ > to it, the agent declaring "I use this tool".
56
+ >
57
+ > Look at that connector's transparency. Earlier you saw a link to a
58
+ > real file sit fully solid at 1.00. This one is a touch more
59
+ > translucent (around 0.85): skill-map is confident the agent uses
60
+ > the tool, but the tool is an outside service, not a file it can
61
+ > verify on disk, so it holds back a little certainty. The opacity
62
+ > tells that story, same as before.
63
+ >
64
+ > One honest note: skill-map learned about this tool from your
65
+ > agent's own settings, what your harness says it CONSUMES. It did
66
+ > not go read a server config to confirm the tool exists. Mapping the
67
+ > server side (reading an `.mcp.json`) is a separate thing that may
68
+ > come later; today the map shows MCP usage from the caller's point
69
+ > of view.
70
+ >
71
+ > See the new `mcp://images` node and the connector into it?
72
+
73
+ Wait for confirmation. If the node did not appear, have the tester
74
+ save the file again (the watcher reacts on save) or refresh the
75
+ browser, then re-check; the `tools:` line must be valid YAML on one
76
+ line. Mark `mcp-node`: done. This closes Part 4; the orchestrator
77
+ returns to the ToC menu (Part 5, "The site, live", the finale, is
78
+ next on the spine).
@@ -1,4 +1,4 @@
1
- # Tour: plugins-tour
1
+ # Part 6 (b): Extend skill-map - plugins (step library, `tour-*` ids)
2
2
 
3
3
  Guided tour of the **built-in plugins** that ship with `sm`. Three
4
4
  steps: a quick mental model of what plugins are plus a peek at
@@ -16,11 +16,11 @@ Before announcing the first step, verify the fixture is initialised
16
16
  `settings.json` and `skill-map.db`). Pre-flight already ran
17
17
  `sm init --no-scan` and appended the master entries to
18
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
19
+ bootstrap mismatch ("tutorial-state.yml says we are running, but
20
+ the bootstrap is missing. Re-run the tutorial from an empty dir or
21
21
  restore the files.") and stop.
22
22
 
23
- ## Step `tour-1-intro` how plugins work (~4 min)
23
+ ## Step `tour-1-intro` - how plugins work (~4 min)
24
24
 
25
25
  **Context**: A short tour of what a plugin is, how it groups
26
26
  extensions, and a peek at the five plugins that ship
@@ -60,7 +60,7 @@ sm plugins list
60
60
 
61
61
  Mark `tour-1-intro: done`.
62
62
 
63
- ## Step `tour-2-kinds` the six extension kinds (~5 min)
63
+ ## Step `tour-2-kinds` - the six extension kinds (~5 min)
64
64
 
65
65
  > An extension has a **kind**. The kind tells the kernel where it
66
66
  > plugs into the pipeline. There are exactly six kinds:
@@ -104,7 +104,7 @@ Mark `tour-1-intro: done`.
104
104
  > **extensions**, each extension has a **kind**, the kind decides
105
105
  > where it plugs into the kernel.
106
106
  >
107
- > Heads up: every `sm plugins` verb you'll run in this tour is
107
+ > Heads up: every `sm plugins` verb you'll run in this part is
108
108
  > also available from the UI. From any `sm serve` session, open
109
109
  > the **gear icon → Plugins** tab to browse and toggle plugins
110
110
  > from there. CLI and UI use the same store, so a change in one
@@ -124,7 +124,7 @@ all packed into a single plugin.
124
124
 
125
125
  Mark `tour-2-kinds: done`.
126
126
 
127
- ## Step `tour-3-explore` explore one extension up close (~4 min)
127
+ ## Step `tour-3-explore` - explore one extension up close (~4 min)
128
128
 
129
129
  **Context**: Drill into a single extension to see its detail,
130
130
  run the diagnostic, then toggle one off and back on so you see
@@ -172,7 +172,7 @@ if you restarted `sm`, the disabled state would still be there.
172
172
 
173
173
  Mark `tour-3-explore: done`.
174
174
 
175
- ## Tour wrap-up
175
+ ## Wrap-up
176
176
 
177
177
  > All set. You now know:
178
178
  >
@@ -182,13 +182,13 @@ Mark `tour-3-explore: done`.
182
182
  > - How to list, inspect, diagnose, and toggle extensions from
183
183
  > the CLI (and the same lives in the UI).
184
184
  >
185
- > If you want to dig deeper, the next menu option takes you into
185
+ > If you want to dig deeper, the next chapters take you into
186
186
  > authoring your own plugin and into settings + view-slots. Or
187
187
  > if you've seen enough, "I'm done for today" closes us out.
188
188
  >
189
189
  > Anything weird worth logging? If not, back to the menu.
190
190
 
191
- Mark tour `plugins-tour: done` in `master-state.yml`, update the
191
+ Mark the plugins chapters done in `tutorial-state.yml`, update the
192
192
  matching harness task, return to the menu in `SKILL.md`.
193
193
 
194
194
  ## Reference: how `sm` decides what to load
@@ -198,7 +198,7 @@ Not for the tester unless they ask. Cheat sheet for the agent:
198
198
  - Built-in plugins live inside the CLI bundle and are always
199
199
  discovered first.
200
200
  - Project plugins live under `<cwd>/.skill-map/plugins/`; the
201
- authoring tour uses this path. There is no user / global
201
+ authoring chapters use this path. There is no user / global
202
202
  scope, `-g/--global` and `~/.skill-map/plugins/` were removed
203
203
  in v0.27.x.
204
204
  - Load order: built-in → project (project ids that collide with