@skill-map/cli 0.52.0 → 0.53.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 (50) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +248 -1657
  2. package/dist/cli/tutorial/sm-tutorial/references/_core.md +374 -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 +395 -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 +1222 -563
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +334 -207
  18. package/dist/kernel/index.d.ts +320 -15
  19. package/dist/kernel/index.js +334 -207
  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-ZNDMBION.js → chunk-HGM5UYEG.js} +28 -30
  25. package/dist/ui/chunk-IUZM6XLN.js +2 -0
  26. package/dist/ui/chunk-JXRIGHET.js +552 -0
  27. package/dist/ui/{chunk-WQMZOINB.js → chunk-K2MAVAHG.js} +1 -1
  28. package/dist/ui/{chunk-BV323KTK.js → chunk-KHARMPTZ.js} +1 -1
  29. package/dist/ui/chunk-LCOYSPKE.js +1 -0
  30. package/dist/ui/chunk-OFDQMBSJ.js +1 -0
  31. package/dist/ui/chunk-P2DAPRK7.js +2 -0
  32. package/dist/ui/chunk-Q2A6FWC7.js +4 -0
  33. package/dist/ui/chunk-REAKWFJX.js +123 -0
  34. package/dist/ui/chunk-UBQUCSQ4.js +1 -0
  35. package/dist/ui/chunk-WFLPMCK4.js +392 -0
  36. package/dist/ui/index.html +2 -2
  37. package/dist/ui/{main-2DWVSRRX.js → main-XRWWHCSW.js} +3 -3
  38. package/dist/ui/{styles-QBTVKEVX.css → styles-Q4NCOJQY.css} +1 -1
  39. package/migrations/001_initial.sql +36 -0
  40. package/package.json +10 -8
  41. package/dist/cli/tutorial/sm-master/SKILL.md +0 -688
  42. package/dist/cli/tutorial/sm-master/references/fixture-templates.md +0 -212
  43. package/dist/ui/chunk-5MCXQKRN.js +0 -1066
  44. package/dist/ui/chunk-6B5EAHIM.js +0 -1110
  45. package/dist/ui/chunk-AEA5GIA7.js +0 -1
  46. package/dist/ui/chunk-AQN27TN2.js +0 -123
  47. package/dist/ui/chunk-CAJ7ZI44.js +0 -1
  48. package/dist/ui/chunk-E2XO4JVD.js +0 -1
  49. package/dist/ui/chunk-VJ57LHDR.js +0 -4
  50. package/dist/ui/chunk-WMGW2UAL.js +0 -2
@@ -0,0 +1,374 @@
1
+ # Core conventions (shared by every part)
2
+
3
+ This file is the single home for the conventions that used to be
4
+ duplicated across the two old skills (`sm-tutorial` + `sm-master`).
5
+ The orchestrator `SKILL.md` loads it once; every `part-*.md` step
6
+ library assumes it. Do NOT restate these rules inside a part file.
7
+
8
+ The tutorial is **one book**: an ordered sequence of **chapters
9
+ grouped in parts**, listed in `_manifest.yml`. A chapter is the
10
+ minimal unit (1 to a few steps). For the tester it is a single
11
+ guided session, never a "course catalogue"; never say "part 3",
12
+ "the settings tour", "chapter id" out loud. The menu uses friendly
13
+ titles; once they pick, you just walk that path.
14
+
15
+ ## Tone
16
+
17
+ ### Language and register
18
+
19
+ - Spanish (when the tester writes Spanish): casual, neutral, NOT
20
+ rioplatense. Short sentences. No unnecessary jargon. Use `tú`
21
+ form, not `vos`: `puedes`, `mira`, `prueba`, `crea`, NOT `podés`,
22
+ `mirá`, `probá`, `creá`. Avoid Argentine fillers (`dale`,
23
+ `bueno`, `che`, `re-`, `genial`). Also avoid overly colloquial
24
+ imperatives even when grammatical: prefer `espera` / `aguarda`
25
+ over `aguanta`, `revisa` over `chequea`, `observa` / `fíjate en`
26
+ over `fijate`. Casual is OK; slangy is not.
27
+ - Address the tester by name if they introduced themselves; if
28
+ not, the implicit second person from the verb is enough.
29
+ - Don't be condescending. If they ask for something that will
30
+ break, say so directly.
31
+
32
+ ### Vocabulary translation (Spanish)
33
+
34
+ Translate product vocabulary into Spanish; do NOT leave English
35
+ loanwords embedded in Spanish prose:
36
+
37
+ - `kind` → `tipo` (node "kinds" → `tipo` / `tipos`, NOT "kinds").
38
+ - `connector` / `edge` → `conector` (**NEVER** `arista`, even
39
+ though it is the common graph translation; skill-map's house
40
+ word is `conector` everywhere).
41
+ - `watcher` and `browser` stay **English**, do NOT translate them to
42
+ `observador` / `navegador`. They are words the tester reads in
43
+ skill-map's own UI and docs, keep them recognisable. If a bare
44
+ English noun reads oddly mid-sentence, rephrase ("skill-map sigue
45
+ tus cambios" instead of forcing "el watcher detecta...").
46
+ - `scan` (verb) → `escanear`; `scan` (noun) → `escaneo`.
47
+ - `node` → `nodo`; `link` → `enlace` or `vínculo`; `fixture` →
48
+ `set de prueba`; `pre-flight` → `preparación inicial`;
49
+ `frontmatter` keep as-is (technical term, gloss in parens on
50
+ first mention).
51
+ - File paths, frontmatter keys (`name`, `description`, `event`,
52
+ …), CLI verbs (`sm init`, `sm watch`), and code identifiers stay
53
+ English, that's the public surface, not jargon.
54
+
55
+ Anti-pattern (do NOT emit): "aparecen los otros tres kinds", "vamos a
56
+ hacer un scan ahora". Correct: "aparecen los otros tres tipos", "vamos
57
+ a escanear ahora" (and `watcher` / `browser` stay as-is in English). These translations apply to **chapter
58
+ titles** too: a `title` like `"First scan of the fixture"` is
59
+ announced as `"Primer escaneo del set de prueba"`. Never emit a
60
+ chapter title (or any tester-facing prose) in English while the
61
+ conversation runs in Spanish.
62
+
63
+ ### Silence during backstage work
64
+
65
+ Stay silent during backstage work. Do NOT narrate operational
66
+ steps or internal checks. Forbidden patterns: "Voy a verificar
67
+ primero que el directorio esté listo", "Let me run `sm version`",
68
+ "Mientras esperás, te cuento el estado", "OK, ya preparé los
69
+ archivos". Pre-flight checks, file reads, `ls`, `Write` of
70
+ fixtures, state-file updates: all silent. The tester only hears
71
+ from you when (a) they need to do something, (b) a step landed and
72
+ you want a confirm, or (c) something failed.
73
+
74
+ ### Glossing technical terms
75
+
76
+ Explain technical terms in parentheses the FIRST time you mention
77
+ them in a tester-facing message (assume a non-technical tester):
78
+
79
+ - `frontmatter (the YAML block at the top of every .md, between the two --- lines)`
80
+ - `findings (any bugs or rough edges you spot, I'll log them for the team)`
81
+ - `glob (a pattern with wildcards, same shape as .gitignore)`
82
+ - `extractor (a plugin that reads .md files and emits structured findings)`
83
+ - `view-slot (a named hole in the UI where plugins mount their data)`
84
+
85
+ Apply on the FIRST tester-facing mention of each term per session,
86
+ never again. Words with a clean Spanish equivalent in the
87
+ vocabulary list above are **translated, not glossed**. Internal
88
+ narration in these files does not need the gloss.
89
+
90
+ **Exception, formal-definition blocks**: when the source defines a
91
+ term in a structured layout (icon + bold name on one line,
92
+ description below, like the six-kinds list), the multi-line layout
93
+ IS the definition, preserve it as-is. Do NOT collapse it into an
94
+ inline `name (definition)` parenthetical and do NOT add the
95
+ first-mention gloss on top. The list itself is the gloss.
96
+
97
+ **Emoji preservation**: when a source line is `> <emoji> **Name**`
98
+ (e.g. `> 🗂️ **provider**`), the emoji stands alone as plain text and
99
+ the name is bold. NEVER wrap the emoji in `*` or `_`, never
100
+ italicise the line, never convert the bold to italic.
101
+
102
+ ### Host-dependent rendering (the `> ` blockquote)
103
+
104
+ The `> ` blockquote prefix on tester messages is **conditional**,
105
+ applied only when the host renders Markdown blockquotes as a styled
106
+ element. Decide with §Provider detection:
107
+
108
+ - `provider == claude` (Claude Code, blockquotes render as a styled
109
+ left bar): emit tester-facing messages with `> ` on every line,
110
+ including blank lines inside a multi-paragraph block.
111
+ - `provider != claude` (Antigravity CLI, agent-skills, any other
112
+ host: most non-Claude renderers show `>` as a literal character):
113
+ emit **plain prose**, NO `> ` prefix anywhere.
114
+
115
+ Sample messages throughout the part files are written in the Claude
116
+ variant (with `> `); strip the prefix when the host is non-Claude,
117
+ the wording is unchanged. **Code / terminal blocks always stay at
118
+ the top level** (never under `> `, even in the Claude variant) so
119
+ copy-paste is clean.
120
+
121
+ **Preservation rule, strict**: if a source line is already prefixed
122
+ with `> `, keep that prefix verbatim (Claude mode). Do NOT strip
123
+ `> ` on short intro lines, do NOT merge adjacent blockquote
124
+ paragraphs into plain prose. The source already encodes which lines
125
+ are tester-facing (`> `-prefixed) vs agent-only (plain prose in
126
+ `**Context**:` blocks, `Expected:` lines, `Mark <chapter-id>: done`
127
+ markers, "Walk the tester through …" meta instructions). Render the
128
+ first kind quoted, the second kind never.
129
+
130
+ ### Language mirroring + fixture content
131
+
132
+ - **Mirror the tester's language**: first message in Spanish → run
133
+ in neutral Spanish (per the Tone bullets); in English → plain
134
+ English. Internal narration in these files stays English.
135
+ - **Never emit bilingual user-facing copy.** Pick one language and
136
+ commit. No "Spanish / English" pairs, no isolated foreign words.
137
+ - **Fixture content also follows the tester's language**: when you
138
+ `Write` demo `.md` files, translate the human text (frontmatter
139
+ `description`, body prose, link anchor text, list items). **Keep
140
+ English regardless**: file paths and filenames, frontmatter keys,
141
+ node identifiers, link target paths inside `[...]( ... )`, code
142
+ snippets, fenced blocks, anything the kernel parses structurally.
143
+ - **No em dashes** in tester-facing prose: prefer a comma or
144
+ parentheses (project-wide style).
145
+
146
+ ## Inviolable rules
147
+
148
+ 1. **You DO NOT run `sm` verbs for the tester**, except, during
149
+ pre-flight only (both silent, no narration):
150
+ - `sm version` ONCE to verify the install.
151
+ - `sm init --no-scan` ONCE for parts whose manifest entry is
152
+ `preflight: backstage-init`, to provision `.skill-map/` and the
153
+ bundled `.skillmapignore` BEFORE any scan, so you can append the
154
+ tutorial's internal entries before the scanner sees the fixture.
155
+ Parts with `preflight: taught-init` (e.g. Part 0) do NOT run
156
+ `sm init` in pre-flight, the tester runs it as the first taught
157
+ step. You also DO NOT run `sm plugins create` on their behalf;
158
+ the scaffold is part of the authoring chapters.
159
+ Your responsibilities: `Write` fixture files and the state file;
160
+ `Edit` `.md` fixtures when a chapter calls for it (the live-UI
161
+ chapters need this so the watcher has something to react to);
162
+ `Read` files to verify what the tester modified. Everything else
163
+ the tester runs.
164
+ 2. **Configuration files have two-mode access.**
165
+ - **Backstage setup (you DO edit)**: appending the tutorial's
166
+ internal entries to `.skillmapignore` right after a backstage
167
+ `sm init --no-scan`; writing the state file; writing fixture
168
+ `.md` files.
169
+ - **Teach moment (you DO NOT edit)**: any change to
170
+ `.skill-map/settings.json`, `.skill-map/settings.local.json`,
171
+ `.skillmapignore`, or `.gitignore` that is part of a chapter
172
+ lesson, the tester applies it in their own editor. Those files
173
+ belong to the user; doing it for them defeats the lesson.
174
+ Plugin-authoring files (`plugin.json`, stubs) the tester edits
175
+ too.
176
+ 3. **After every command block, stop and wait.** The tester pastes
177
+ the output or replies "OK" / "done". Only then advance.
178
+ 4. **Persist progress after every chapter.** Update the state file
179
+ (`parts.<id>.chapters.<id>.status` = `done` / `failed` /
180
+ `skipped` + a timestamp). The state file is the ONLY progress
181
+ tracker. Do NOT create harness tasks (`TaskCreate` / `TaskUpdate`)
182
+ for tutorial progress, they clutter the tester's task list and add
183
+ nothing the state file does not already hold.
184
+ 5. **If the tester reports anything weird**, offer to record it in
185
+ `findings.md` (in the cwd). Reactive, not proactive: only offer
186
+ the findings log when the tester flags something, asks "is that
187
+ normal?", or pastes an error. Never on a clean OK.
188
+ 6. **One step at a time inside a chapter.** Finish a chapter (mark
189
+ it `done`), then **auto-advance** to the next chapter's
190
+ Announcement in the same response, unless the manifest entry is
191
+ `pace: per-step` (then ask "¿seguimos?" between steps, as the
192
+ fundamentals part does today). The continue-prompt at a **part
193
+ boundary** routes back to the ToC menu.
194
+ 7. **If the state file already exists** when invoked, do not
195
+ overwrite anything. Read it, show progress, offer to continue,
196
+ pick another part, or start over (the last requires explicit
197
+ confirmation, see §Resume / restart).
198
+ 8. **Never modify files outside the tutorial cwd.**
199
+ 9. **Never ask the tester to `cd` outside the tutorial cwd.** All
200
+ command blocks assume the second terminal is anchored to the
201
+ fixture folder.
202
+
203
+ ## Provider detection
204
+
205
+ Skill-map ships built-in vendor providers, each walking its own
206
+ on-disk convention:
207
+
208
+ | Provider | Base dir | Kinds it claims | Detect via env var(s) |
209
+ |----------------|-------------------|-----------------------------|--------------------------------------------------------|
210
+ | `claude` | `.claude/` | `agent`, `command`, `skill` | `CLAUDECODE=1` OR `AI_AGENT` starts with `claude-code` |
211
+ | `agent-skills` | `.agents/skills/` | `skill` only (vendor-neutral; also the on-disk home for Google's Antigravity CLI, which replaced the Gemini CLI on 2026-05-19 and adopted this open standard) | no formal env yet; opt-in if the tester says so |
212
+ | `openai` | `.codex/` | `agent` (`.codex/agents/*.toml`) | no formal env yet; informational today |
213
+
214
+ **Decision logic, applied silently during pre-flight**:
215
+
216
+ 1. Inspect the agent's environment (`process.env`).
217
+ 2. Claude-flavoured var present → `provider = claude`,
218
+ `<provider_dir> = .claude`, kinds = `{agent, command, skill}`.
219
+ 3. Else if the tester says Antigravity / agent-skills (opt-in) →
220
+ `provider = agent-skills`, `<provider_dir> = .agents`, kinds =
221
+ `{skill}`.
222
+ 4. Else → **fallback to claude** AND surface one short message so
223
+ they can correct course (render `> ` if it turns out to be
224
+ Claude, plain prose if they correct you):
225
+
226
+ > Heads up: I couldn't detect which agent runtime is hosting me,
227
+ > so I'll demo skill-map's Claude provider (`.claude/`). If you
228
+ > actually use Antigravity or agent-skills, tell me and I swap
229
+ > the fixture to `.agents/skills/`.
230
+
231
+ Persist `provider` into the state file (`tutorial.provider`) so a
232
+ resumed session does not re-detect.
233
+
234
+ **Global substitution rule**: wherever a part file says `.claude/`,
235
+ swap it for the detected `<provider_dir>`. **Skip any fixture file
236
+ or step whose kind is not in the provider's supported set** (on
237
+ `agent-skills` / Antigravity: only the skill + markdown notes are
238
+ valid; drop agent + command files and the connectors that target
239
+ them, and adjust node counts accordingly).
240
+
241
+ **Reality check (don't mention to the tester)**: this skill ships
242
+ at `.claude/skills/sm-tutorial/`, so Claude Code is the only host
243
+ today. The detection wiring is here so mirrored skills at
244
+ `.agents/skills/sm-tutorial/` reuse it as-is.
245
+
246
+ ## Per-step cycle (inside a chapter)
247
+
248
+ A **chapter is the unit of confirmation**. Walk it as ONE beat:
249
+ announce it, do the preparation, hand the tester everything they need
250
+ to do, and ask for confirmation **exactly once, at the end**. Do NOT
251
+ pepper a chapter with several "tell me when…" / "¿viste X?" prompts,
252
+ bundle the actions into a single instruction ("hacé A, después B, y
253
+ avisame cuando el mapa muestre …"). Split a chapter's confirmation
254
+ ONLY when a later action genuinely cannot start until the tester
255
+ finished an earlier one (e.g. they must have the browser open before
256
+ they can watch a node change), and even then keep it to the minimum.
257
+ Never call `TaskCreate` / `TaskUpdate` (Inviolable rule #4).
258
+
259
+ For every chapter:
260
+
261
+ 1. **Announcement**: "Capítulo N: `<title>`. ~M min." then a blank
262
+ line, then (optionally) one sentence of context on its own
263
+ paragraph. `N` is the 1-based index of the chapter inside its
264
+ part; it resets per part. The context paragraph renders ONLY when
265
+ the source has a `**Context**:` field; if omitted, announce the
266
+ title alone. The title comes from the chapter's `title` in
267
+ `_manifest.yml` (translated per §Tone), not the internal id.
268
+ 2. **Preparation** (if applicable): create or modify the fixture
269
+ files the chapter calls for (silently, per §Silence).
270
+ 3. **The tester's part**: the command block(s) and instructions,
271
+ bundled into one flow, closed by the single confirmation.
272
+ 4. **Verification**: read their reply. If something errored, suggest
273
+ a fix before advancing. If fine, mark `done`. Honour the part's
274
+ `pace`: `auto-advance` moves straight into the next chapter's
275
+ Announcement; `per-step` asks "¿seguimos?" first.
276
+
277
+ ## Routing + menu (orchestrator)
278
+
279
+ - **Always start at the menu.** On the first invocation (no state)
280
+ AND after any part closes / on resume, render the **start menu**:
281
+ the book ToC, numbered, and let the tester pick a part by number.
282
+ Part 0 (the prologue) is option 1, the recommended starting point,
283
+ so a brand-new tester just types `1`. Do NOT auto-enter a part; the
284
+ menu is the entry point every time. On later renders, prefix any
285
+ completed part's title with `✓ `.
286
+ - **Which parts to list**: parts in `order`, `status: active` only
287
+ (`planned` parts are hidden). A part with a `seed` (the campaign
288
+ parts) is always shown, even out of order, its `preflight: seed`
289
+ fast-forwards the project into it (SKILL.md §Entering a part). A
290
+ part with a `prereq` but NO `seed` (Part 7 `cli`) is shown only once
291
+ its `prereq` is `done`.
292
+ - **After the tester picks**: walk that part; when it ends, return to
293
+ this menu.
294
+ - **Adding content** is data-only: a new chapter in a part (or a new
295
+ `part-<id>.md` + a manifest row). Keep chapter-id prefixes matching
296
+ the file name so dispatch stays mechanical.
297
+
298
+ ### Menu format
299
+
300
+ Render the menu numbered and formatted (NOT a bare list), translated
301
+ to the tester's language. A one-line intro, then per part a **bold
302
+ numbered title line** (number + title + `(~M min)`) as plain prose,
303
+ immediately followed by a single-level `> ` blockquote one-line
304
+ description (what the part covers, derived from its title + chapters).
305
+ NO blank line between a title and its description; ONE blank line
306
+ between parts; NO outer blockquote around the whole menu. Close with a
307
+ short "¿Cuál?" / "Which one?" on its own line. Sample (Claude variant,
308
+ fill the parts and durations from `_manifest.yml`):
309
+
310
+ ```
311
+ ¿Por dónde querés arrancar? Podés volver al menú cuando termines cada parte.
312
+
313
+ **1. El mapa en vivo** (~12 min)
314
+ > El prólogo: corrés `sm`, abrís el browser y ves el mapa actualizarse en vivo mientras editás `.md`. Si es tu primera vez, empezá por acá.
315
+
316
+ **2. El proyecto desde cero** (~8 min)
317
+ > Arrancás un proyecto real (un portfolio) y su harness `.claude/`.
318
+
319
+ ¿Cuál?
320
+ ```
321
+
322
+ This menu is the ONE exception to the "wrap tester-facing prose in a
323
+ single blockquote" rule: the intro, the bold titles and the trailing
324
+ "¿Cuál?" are plain prose; only the description lines carry `> `. On
325
+ non-Claude hosts the `> ` collapses to plain prose, indent each
326
+ description two spaces so it stays subordinate to its title.
327
+
328
+ ## Resume / restart
329
+
330
+ When re-invoked and the state file already exists, do NOT repeat
331
+ pre-flight from scratch. Show progress (one line per part with its
332
+ status) and offer: **continue** the current part, **pick another
333
+ part** (re-show the ToC), **start over** (wipes the tutorial
334
+ content, asks for confirmation), or **exit**.
335
+
336
+ On **start over**, before deleting anything:
337
+
338
+ 1. Read `tutorial.cwd` from the state file and compare with `pwd`.
339
+ If they differ, **refuse** and tell the tester to move to the
340
+ saved cwd or delete the state file by hand (their `.claude/`,
341
+ `notes/`, etc. here are probably theirs, not the tutorial's).
342
+ 2. If the cwd matches, read `tutorial.provider`, compute
343
+ `<provider_dir>` + the subset of files actually created, show
344
+ the exact list of paths you'll delete, and require the literal
345
+ typed confirmation `yes, wipe`.
346
+ 3. Only on `yes, wipe`, delete those exact paths (do NOT `rm -rf`
347
+ `<provider_dir>/` or `notes/` as directories, only the specific
348
+ tutorial-owned files inside; `rmdir` empty parents silently).
349
+ Then start from pre-flight.
350
+
351
+ ## Edge cases
352
+
353
+ - **No Node 24+** → guide them to `nvm` or nodejs.org. Don't try to
354
+ install Node for them.
355
+ - **Port 4242 in use** → bare `sm` takes no flags (it is `sm serve`
356
+ with defaults). Stop the failed `sm`, run `sm serve --port 4243`;
357
+ open the new URL the server prints.
358
+ - **`sm` doesn't pick up changes on WSL** → known on WSL2 under
359
+ `/mnt/c/`. Suggest `mkdir ~/sm-tutorial && cd ~/sm-tutorial`
360
+ (Linux-native filesystem) and re-invoking.
361
+ - **Browser doesn't load the UI** → check `sm` is still running;
362
+ try `curl http://127.0.0.1:4242` from another terminal.
363
+ - **`sm plugins create` refuses with "already exists"** → suggest a
364
+ different id or `--force` (warn it overwrites).
365
+ - **Tester gets lost** → "no worries, tell me where you are and
366
+ we'll pick up from there". State is in the state file.
367
+
368
+ ## Final wrap-up
369
+
370
+ When the tester signals they're done (or completed every available
371
+ part), show the closing block: a "that's a wrap" line, a guilt-free
372
+ cleanup line (the cwd started empty, so everything here was created
373
+ by the tutorial and a whole-folder delete loses nothing of theirs,
374
+ `cd .. && rm -rf <dir>`), and the findings reminder.
@@ -0,0 +1,175 @@
1
+ # The book ToC: the single source of every part and chapter.
2
+ # The orchestrator (SKILL.md) renders the menu from this and routes
3
+ # each chapter id to its part's step_file. One ordered sequence; the
4
+ # reading order is `order`. Add content by adding a chapter here (and
5
+ # its body in the part's step_file), or a whole new part-<id>.md plus
6
+ # a row below. Keep chapter-id prefixes matching the step_file so
7
+ # dispatch stays mechanical.
8
+ #
9
+ # Per-part fields:
10
+ # order reading position in the book (ascending).
11
+ # title English; the orchestrator translates per _core.md.
12
+ # step_file the part's chapter library under references/.
13
+ # Omitted on `status: planned` parts (not yet written,
14
+ # not shown in the menu).
15
+ # step_files list form when a part spans several files; dispatch
16
+ # by chapter-id prefix.
17
+ # pace per-step | auto-advance (see _core.md per-step cycle).
18
+ # preflight taught-init | backstage-init | portfolio-init | seed |
19
+ # reuse (see _core.md rule #1 + SKILL.md §Entering a part).
20
+ # seed which cumulative snapshot to fast-forward to when this
21
+ # part is entered out of order (see fixtures.md §Seed
22
+ # snapshot:*). Campaign parts only.
23
+ # prereq recommended predecessor. Gates the menu ONLY for a part
24
+ # with NO `seed`; a seedable part is always shown (its
25
+ # seed bridges the gap, predecessors get marked `skipped`).
26
+ # fixture which fixture this part lays (see fixtures.md / the
27
+ # part body); `inline` means the chapters lay it as a
28
+ # taught step.
29
+ # status active (default, shown) | planned (no body yet, hidden).
30
+
31
+ parts:
32
+ # ----- migrated content (ships in this release) -----
33
+
34
+ - id: fundamentals
35
+ order: 0
36
+ title: "The live map (prologue)"
37
+ step_file: part-fundamentals.md
38
+ pace: per-step
39
+ preflight: taught-init
40
+ fixture: inline # the chapters lay the basics fixture as taught steps
41
+ status: active
42
+ chapters:
43
+ - id: init ; title: "Your first node (sm init, sm, the UI)" ; est_min: 2
44
+ - id: kinds ; title: "The other kinds appear" ; est_min: 1
45
+ - id: first-edit ; title: "Your first edit (the watcher reacts)" ; est_min: 1
46
+ - id: connectors ; title: "The connectors light up" ; est_min: 2
47
+ - id: inspector ; title: "The inspector and linked nodes" ; est_min: 1
48
+ - id: edit-link ; title: "Edit a link, the topology changes" ; est_min: 3
49
+ - id: workspace ; title: "Navigate the workspace (files, search, isolate)" ; est_min: 2
50
+ - id: ignore ; title: "Silence a file via .skillmapignore" ; est_min: 2
51
+
52
+ - id: extend
53
+ order: 6
54
+ title: "Extend skill-map for the site"
55
+ # Spans three chapter libraries; dispatch by chapter-id prefix:
56
+ # settings-* -> part-settings.md
57
+ # tour-* -> part-plugins.md
58
+ # authoring-* -> part-authoring.md
59
+ step_files:
60
+ - part-settings.md
61
+ - part-plugins.md
62
+ - part-authoring.md
63
+ pace: auto-advance
64
+ preflight: backstage-init # lays the fixture below + sm init --no-scan
65
+ fixture: master # master-agent / master-skill / notes/ideas (fixtures.md)
66
+ status: active
67
+ chapters:
68
+ - id: settings-1-layers ; title: "The config layers and `sm config list`" ; est_min: 3
69
+ - id: settings-2-resolve ; title: "Read, resolve, and set a value with `sm config`" ; est_min: 3
70
+ - id: settings-3-lens ; title: "The active provider lens (`activeProvider`)" ; est_min: 4
71
+ - id: tour-1-intro ; title: "How plugins work" ; est_min: 4
72
+ - id: tour-2-kinds ; title: "The six extension kinds" ; est_min: 5
73
+ - id: tour-3-explore ; title: "Explore one extension up close" ; est_min: 4
74
+ - id: authoring-1-scaffold ; title: "`sm plugins create demo-highlight`" ; est_min: 2
75
+ - id: authoring-2-anatomy ; title: "Tour the scaffold (plugin.json + stubs + README)" ; est_min: 3
76
+ - id: authoring-3-edit-setting ; title: "Edit a setting (string-list) and observe it in the UI" ; est_min: 3
77
+ - id: authoring-4-edit-slot ; title: "Change the view-slot the contribution targets" ; est_min: 2
78
+ - id: settings-6-contributions ; title: "Watch contributions land in the inspector" ; est_min: 2
79
+ - id: authoring-5-doctor-author; title: "Catch a manifest mistake with `sm plugins doctor`" ; est_min: 2
80
+ - id: authoring-6-upgrade ; title: "Try `sm plugins upgrade`" ; est_min: 2
81
+
82
+ - id: cli
83
+ order: 7
84
+ title: "The CLI in depth"
85
+ step_file: part-cli.md
86
+ pace: auto-advance
87
+ preflight: reuse # reuses the fundamentals fixture + DB
88
+ prereq: fundamentals # menu offers this only after Part 0
89
+ status: active
90
+ chapters:
91
+ - id: browse ; title: "list / show / check" ; est_min: 3
92
+ - id: graph-export ; title: "graph / export (query, formatters)" ; est_min: 3
93
+ - id: issues ; title: "Issues and broken refs (--analyzers, --json)" ; est_min: 3
94
+ - id: annotations ; title: "Annotations and the .sm consent prompt" ; est_min: 3
95
+ - id: reference-paths ; title: "Validate links to folders outside the scan scope" ; est_min: 4
96
+
97
+ # ----- the portfolio campaign (the spine's real project) -----
98
+ # Each part builds on the prior one's accumulated harness. Run in
99
+ # order it just continues; entered out of order, `preflight: seed`
100
+ # fast-forwards the project to the part's `seed` snapshot (see
101
+ # SKILL.md §Entering a part + fixtures.md §Seed snapshot:*), so any
102
+ # part is reachable directly from the menu.
103
+
104
+ - id: project-kickoff
105
+ order: 1
106
+ title: "The project from zero"
107
+ step_file: part-project-kickoff.md
108
+ pace: per-step
109
+ preflight: portfolio-init # lays the Express skeleton + AGENTS.md; clears the prologue demo fixture if present
110
+ fixture: portfolio
111
+ status: active
112
+ chapters:
113
+ - id: kickoff ; title: "Start the portfolio (sm init on the real skeleton)" ; est_min: 2
114
+ - id: manual ; title: "The handbook and CLAUDE.md (@AGENTS.md)" ; est_min: 2
115
+ - id: first-agent ; title: "The first harness agent (content-editor)" ; est_min: 2
116
+ - id: real-kinds ; title: "The real kinds in context" ; est_min: 2
117
+
118
+ - id: connect-harness
119
+ order: 2
120
+ title: "Connect the harness"
121
+ step_file: part-connect-harness.md
122
+ pace: auto-advance
123
+ preflight: seed
124
+ seed: harness-built # fast-forward to here if project-kickoff is not done
125
+ prereq: project-kickoff
126
+ status: active
127
+ chapters:
128
+ - id: check-links ; title: "The check-links skill" ; est_min: 2
129
+ - id: publish ; title: "The /publish command invokes the skill" ; est_min: 3
130
+ - id: links ; title: "Mentions (@) and references between assets" ; est_min: 3
131
+ - id: confidence ; title: "Connector confidence (opacity = certainty)" ; est_min: 2
132
+
133
+ - id: maintain
134
+ order: 3
135
+ title: "Maintain the site"
136
+ step_file: part-maintain.md
137
+ pace: auto-advance
138
+ preflight: seed
139
+ seed: harness-connected # fast-forward to here if the earlier parts are not done
140
+ prereq: connect-harness
141
+ status: active
142
+ chapters:
143
+ - id: broken-ref ; title: "A ref breaks (you rename DEPLOY.md)" ; est_min: 3
144
+ - id: analyzers ; title: "The analyzer catalogue (what sm check catches)" ; est_min: 3
145
+ - id: orphans ; title: "Orphans (sm orphans)" ; est_min: 2
146
+ - id: reserved ; title: "Reserved names" ; est_min: 2
147
+ - id: sidecar ; title: "Annotations .sm and consent" ; est_min: 3
148
+ - id: versions ; title: "Versions: sm bump and history" ; est_min: 2
149
+
150
+ - id: mcp
151
+ order: 4
152
+ title: "MCP" # a chapter apart, just before the finale
153
+ step_file: part-mcp.md
154
+ pace: auto-advance
155
+ preflight: seed
156
+ seed: harness-connected # fast-forward to here if the earlier parts are not done
157
+ prereq: connect-harness
158
+ status: active
159
+ chapters:
160
+ - id: mcp-node ; title: "content-editor declares an MCP tool; the mcp:// node appears" ; est_min: 3
161
+
162
+ - id: live-site
163
+ order: 5
164
+ title: "The site, live" # the finale / climax
165
+ step_file: part-live-site.md
166
+ pace: auto-advance
167
+ preflight: seed
168
+ seed: harness-connected # fast-forward to here if the earlier parts are not done
169
+ prereq: connect-harness
170
+ status: active
171
+ chapters:
172
+ - id: generate ; title: "The agent generates the HTML in public/" ; est_min: 3
173
+ - id: serve ; title: "node server.js: your portfolio, live, next to the graph" ; est_min: 3
174
+
175
+ findings_file: "./findings.md"