@skill-map/cli 0.52.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.
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +239 -1659
- package/dist/cli/tutorial/sm-tutorial/references/_core.md +332 -0
- package/dist/cli/tutorial/sm-tutorial/references/_manifest.yml +175 -0
- package/dist/cli/tutorial/sm-tutorial/references/fixtures.md +251 -0
- package/dist/cli/tutorial/{sm-master/references/tour-authoring.md → sm-tutorial/references/part-authoring.md} +14 -15
- package/dist/cli/tutorial/sm-tutorial/references/part-cli.md +267 -0
- package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +180 -0
- package/dist/cli/tutorial/sm-tutorial/references/part-fundamentals.md +424 -0
- package/dist/cli/tutorial/sm-tutorial/references/part-live-site.md +156 -0
- package/dist/cli/tutorial/sm-tutorial/references/part-maintain.md +286 -0
- package/dist/cli/tutorial/sm-tutorial/references/part-mcp.md +78 -0
- package/dist/cli/tutorial/{sm-master/references/tour-plugins.md → sm-tutorial/references/part-plugins.md} +11 -11
- package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +186 -0
- package/dist/cli/tutorial/{sm-master/references/tour-settings.md → sm-tutorial/references/part-settings.md} +22 -24
- package/dist/cli.js +1213 -550
- package/dist/index.d.ts +1 -1
- package/dist/index.js +334 -207
- package/dist/kernel/index.d.ts +320 -15
- package/dist/kernel/index.js +334 -207
- package/dist/migrations/001_initial.sql +36 -0
- package/dist/ui/chunk-EQ72PEHT.js +1 -0
- package/dist/ui/chunk-GBKHMJ4B.js +1110 -0
- package/dist/ui/chunk-GEI6INVH.js +515 -0
- package/dist/ui/chunk-JXRIGHET.js +552 -0
- package/dist/ui/{chunk-WQMZOINB.js → chunk-K2MAVAHG.js} +1 -1
- package/dist/ui/{chunk-BV323KTK.js → chunk-KHARMPTZ.js} +1 -1
- package/dist/ui/chunk-L4NIF75A.js +2 -0
- package/dist/ui/chunk-LCOYSPKE.js +1 -0
- package/dist/ui/chunk-OFDQMBSJ.js +1 -0
- package/dist/ui/chunk-P2DAPRK7.js +2 -0
- package/dist/ui/chunk-Q2A6FWC7.js +4 -0
- package/dist/ui/{chunk-ZNDMBION.js → chunk-TXTY24G4.js} +28 -30
- package/dist/ui/chunk-UBQUCSQ4.js +1 -0
- package/dist/ui/chunk-WFLPMCK4.js +392 -0
- package/dist/ui/chunk-YQFIXHKM.js +123 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/{main-2DWVSRRX.js → main-OYITFJ7B.js} +3 -3
- package/dist/ui/{styles-QBTVKEVX.css → styles-Q4NCOJQY.css} +1 -1
- package/migrations/001_initial.sql +36 -0
- package/package.json +10 -8
- package/dist/cli/tutorial/sm-master/SKILL.md +0 -688
- package/dist/cli/tutorial/sm-master/references/fixture-templates.md +0 -212
- package/dist/ui/chunk-5MCXQKRN.js +0 -1066
- package/dist/ui/chunk-6B5EAHIM.js +0 -1110
- package/dist/ui/chunk-AEA5GIA7.js +0 -1
- package/dist/ui/chunk-AQN27TN2.js +0 -123
- package/dist/ui/chunk-CAJ7ZI44.js +0 -1
- package/dist/ui/chunk-E2XO4JVD.js +0 -1
- package/dist/ui/chunk-VJ57LHDR.js +0 -4
- package/dist/ui/chunk-WMGW2UAL.js +0 -2
|
@@ -0,0 +1,332 @@
|
|
|
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` → `observador` (or rephrase: "skill-map sigue tus
|
|
42
|
+
cambios").
|
|
43
|
+
- `scan` (verb) → `escanear`; `scan` (noun) → `escaneo`.
|
|
44
|
+
- `node` → `nodo`; `link` → `enlace` or `vínculo`; `fixture` →
|
|
45
|
+
`set de prueba`; `pre-flight` → `preparación inicial`;
|
|
46
|
+
`frontmatter` keep as-is (technical term, gloss in parens on
|
|
47
|
+
first mention).
|
|
48
|
+
- File paths, frontmatter keys (`name`, `description`, `event`,
|
|
49
|
+
…), CLI verbs (`sm init`, `sm watch`), and code identifiers stay
|
|
50
|
+
English, that's the public surface, not jargon.
|
|
51
|
+
|
|
52
|
+
Anti-pattern (do NOT emit): "aparecen los otros tres kinds", "el
|
|
53
|
+
watcher detectó el cambio", "vamos a hacer un scan ahora". Correct:
|
|
54
|
+
"aparecen los otros tres tipos", "skill-map detectó el cambio",
|
|
55
|
+
"vamos a escanear ahora". These translations apply to **chapter
|
|
56
|
+
titles** too: a `title` like `"First scan of the fixture"` is
|
|
57
|
+
announced as `"Primer escaneo del set de prueba"`. Never emit a
|
|
58
|
+
chapter title (or any tester-facing prose) in English while the
|
|
59
|
+
conversation runs in Spanish.
|
|
60
|
+
|
|
61
|
+
### Silence during backstage work
|
|
62
|
+
|
|
63
|
+
Stay silent during backstage work. Do NOT narrate operational
|
|
64
|
+
steps or internal checks. Forbidden patterns: "Voy a verificar
|
|
65
|
+
primero que el directorio esté listo", "Let me run `sm version`",
|
|
66
|
+
"Mientras esperás, te cuento el estado", "OK, ya preparé los
|
|
67
|
+
archivos". Pre-flight checks, file reads, `ls`, `Write` of
|
|
68
|
+
fixtures, state-file updates: all silent. The tester only hears
|
|
69
|
+
from you when (a) they need to do something, (b) a step landed and
|
|
70
|
+
you want a confirm, or (c) something failed.
|
|
71
|
+
|
|
72
|
+
### Glossing technical terms
|
|
73
|
+
|
|
74
|
+
Explain technical terms in parentheses the FIRST time you mention
|
|
75
|
+
them in a tester-facing message (assume a non-technical tester):
|
|
76
|
+
|
|
77
|
+
- `frontmatter (the YAML block at the top of every .md, between the two --- lines)`
|
|
78
|
+
- `findings (any bugs or rough edges you spot, I'll log them for the team)`
|
|
79
|
+
- `glob (a pattern with wildcards, same shape as .gitignore)`
|
|
80
|
+
- `extractor (a plugin that reads .md files and emits structured findings)`
|
|
81
|
+
- `view-slot (a named hole in the UI where plugins mount their data)`
|
|
82
|
+
|
|
83
|
+
Apply on the FIRST tester-facing mention of each term per session,
|
|
84
|
+
never again. Words with a clean Spanish equivalent in the
|
|
85
|
+
vocabulary list above are **translated, not glossed**. Internal
|
|
86
|
+
narration in these files does not need the gloss.
|
|
87
|
+
|
|
88
|
+
**Exception, formal-definition blocks**: when the source defines a
|
|
89
|
+
term in a structured layout (icon + bold name on one line,
|
|
90
|
+
description below, like the six-kinds list), the multi-line layout
|
|
91
|
+
IS the definition, preserve it as-is. Do NOT collapse it into an
|
|
92
|
+
inline `name (definition)` parenthetical and do NOT add the
|
|
93
|
+
first-mention gloss on top. The list itself is the gloss.
|
|
94
|
+
|
|
95
|
+
**Emoji preservation**: when a source line is `> <emoji> **Name**`
|
|
96
|
+
(e.g. `> 🗂️ **provider**`), the emoji stands alone as plain text and
|
|
97
|
+
the name is bold. NEVER wrap the emoji in `*` or `_`, never
|
|
98
|
+
italicise the line, never convert the bold to italic.
|
|
99
|
+
|
|
100
|
+
### Host-dependent rendering (the `> ` blockquote)
|
|
101
|
+
|
|
102
|
+
The `> ` blockquote prefix on tester messages is **conditional**,
|
|
103
|
+
applied only when the host renders Markdown blockquotes as a styled
|
|
104
|
+
element. Decide with §Provider detection:
|
|
105
|
+
|
|
106
|
+
- `provider == claude` (Claude Code, blockquotes render as a styled
|
|
107
|
+
left bar): emit tester-facing messages with `> ` on every line,
|
|
108
|
+
including blank lines inside a multi-paragraph block.
|
|
109
|
+
- `provider != claude` (Antigravity CLI, agent-skills, any other
|
|
110
|
+
host: most non-Claude renderers show `>` as a literal character):
|
|
111
|
+
emit **plain prose**, NO `> ` prefix anywhere.
|
|
112
|
+
|
|
113
|
+
Sample messages throughout the part files are written in the Claude
|
|
114
|
+
variant (with `> `); strip the prefix when the host is non-Claude,
|
|
115
|
+
the wording is unchanged. **Code / terminal blocks always stay at
|
|
116
|
+
the top level** (never under `> `, even in the Claude variant) so
|
|
117
|
+
copy-paste is clean.
|
|
118
|
+
|
|
119
|
+
**Preservation rule, strict**: if a source line is already prefixed
|
|
120
|
+
with `> `, keep that prefix verbatim (Claude mode). Do NOT strip
|
|
121
|
+
`> ` on short intro lines, do NOT merge adjacent blockquote
|
|
122
|
+
paragraphs into plain prose. The source already encodes which lines
|
|
123
|
+
are tester-facing (`> `-prefixed) vs agent-only (plain prose in
|
|
124
|
+
`**Context**:` blocks, `Expected:` lines, `Mark <chapter-id>: done`
|
|
125
|
+
markers, "Walk the tester through …" meta instructions). Render the
|
|
126
|
+
first kind quoted, the second kind never.
|
|
127
|
+
|
|
128
|
+
### Language mirroring + fixture content
|
|
129
|
+
|
|
130
|
+
- **Mirror the tester's language**: first message in Spanish → run
|
|
131
|
+
in neutral Spanish (per the Tone bullets); in English → plain
|
|
132
|
+
English. Internal narration in these files stays English.
|
|
133
|
+
- **Never emit bilingual user-facing copy.** Pick one language and
|
|
134
|
+
commit. No "Spanish / English" pairs, no isolated foreign words.
|
|
135
|
+
- **Fixture content also follows the tester's language**: when you
|
|
136
|
+
`Write` demo `.md` files, translate the human text (frontmatter
|
|
137
|
+
`description`, body prose, link anchor text, list items). **Keep
|
|
138
|
+
English regardless**: file paths and filenames, frontmatter keys,
|
|
139
|
+
node identifiers, link target paths inside `[...]( ... )`, code
|
|
140
|
+
snippets, fenced blocks, anything the kernel parses structurally.
|
|
141
|
+
- **No em dashes** in tester-facing prose: prefer a comma or
|
|
142
|
+
parentheses (project-wide style).
|
|
143
|
+
|
|
144
|
+
## Inviolable rules
|
|
145
|
+
|
|
146
|
+
1. **You DO NOT run `sm` verbs for the tester**, except, during
|
|
147
|
+
pre-flight only (both silent, no narration):
|
|
148
|
+
- `sm version` ONCE to verify the install.
|
|
149
|
+
- `sm init --no-scan` ONCE for parts whose manifest entry is
|
|
150
|
+
`preflight: backstage-init`, to provision `.skill-map/` and the
|
|
151
|
+
bundled `.skillmapignore` BEFORE any scan, so you can append the
|
|
152
|
+
tutorial's internal entries before the scanner sees the fixture.
|
|
153
|
+
Parts with `preflight: taught-init` (e.g. Part 0) do NOT run
|
|
154
|
+
`sm init` in pre-flight, the tester runs it as the first taught
|
|
155
|
+
step. You also DO NOT run `sm plugins create` on their behalf;
|
|
156
|
+
the scaffold is part of the authoring chapters.
|
|
157
|
+
Your responsibilities: `Write` fixture files and the state file;
|
|
158
|
+
`Edit` `.md` fixtures when a chapter calls for it (the live-UI
|
|
159
|
+
chapters need this so the watcher has something to react to);
|
|
160
|
+
`Read` files to verify what the tester modified. Everything else
|
|
161
|
+
the tester runs.
|
|
162
|
+
2. **Configuration files have two-mode access.**
|
|
163
|
+
- **Backstage setup (you DO edit)**: appending the tutorial's
|
|
164
|
+
internal entries to `.skillmapignore` right after a backstage
|
|
165
|
+
`sm init --no-scan`; writing the state file; writing fixture
|
|
166
|
+
`.md` files.
|
|
167
|
+
- **Teach moment (you DO NOT edit)**: any change to
|
|
168
|
+
`.skill-map/settings.json`, `.skill-map/settings.local.json`,
|
|
169
|
+
`.skillmapignore`, or `.gitignore` that is part of a chapter
|
|
170
|
+
lesson, the tester applies it in their own editor. Those files
|
|
171
|
+
belong to the user; doing it for them defeats the lesson.
|
|
172
|
+
Plugin-authoring files (`plugin.json`, stubs) the tester edits
|
|
173
|
+
too.
|
|
174
|
+
3. **After every command block, stop and wait.** The tester pastes
|
|
175
|
+
the output or replies "OK" / "done". Only then advance.
|
|
176
|
+
4. **Persist progress after every chapter.** Update the state file
|
|
177
|
+
(`parts.<id>.chapters.<id>.status` = `done` / `failed` /
|
|
178
|
+
`skipped` + a timestamp). Mirror the same status on the harness
|
|
179
|
+
task via `TaskUpdate`; the harness list is the in-session view,
|
|
180
|
+
the state file is the cross-session source of truth.
|
|
181
|
+
5. **If the tester reports anything weird**, offer to record it in
|
|
182
|
+
`findings.md` (in the cwd). Reactive, not proactive: only offer
|
|
183
|
+
the findings log when the tester flags something, asks "is that
|
|
184
|
+
normal?", or pastes an error. Never on a clean OK.
|
|
185
|
+
6. **One step at a time inside a chapter.** Finish a chapter (mark
|
|
186
|
+
it `done`), then **auto-advance** to the next chapter's
|
|
187
|
+
Announcement in the same response, unless the manifest entry is
|
|
188
|
+
`pace: per-step` (then ask "¿seguimos?" between steps, as the
|
|
189
|
+
fundamentals part does today). The continue-prompt at a **part
|
|
190
|
+
boundary** routes back to the ToC menu.
|
|
191
|
+
7. **If the state file already exists** when invoked, do not
|
|
192
|
+
overwrite anything. Read it, show progress, offer to continue,
|
|
193
|
+
pick another part, or start over (the last requires explicit
|
|
194
|
+
confirmation, see §Resume / restart).
|
|
195
|
+
8. **Never modify files outside the tutorial cwd.**
|
|
196
|
+
9. **Never ask the tester to `cd` outside the tutorial cwd.** All
|
|
197
|
+
command blocks assume the second terminal is anchored to the
|
|
198
|
+
fixture folder.
|
|
199
|
+
|
|
200
|
+
## Provider detection
|
|
201
|
+
|
|
202
|
+
Skill-map ships built-in vendor providers, each walking its own
|
|
203
|
+
on-disk convention:
|
|
204
|
+
|
|
205
|
+
| Provider | Base dir | Kinds it claims | Detect via env var(s) |
|
|
206
|
+
|----------------|-------------------|-----------------------------|--------------------------------------------------------|
|
|
207
|
+
| `claude` | `.claude/` | `agent`, `command`, `skill` | `CLAUDECODE=1` OR `AI_AGENT` starts with `claude-code` |
|
|
208
|
+
| `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 |
|
|
209
|
+
| `openai` | `.codex/` | `agent` (`.codex/agents/*.toml`) | no formal env yet; informational today |
|
|
210
|
+
|
|
211
|
+
**Decision logic, applied silently during pre-flight**:
|
|
212
|
+
|
|
213
|
+
1. Inspect the agent's environment (`process.env`).
|
|
214
|
+
2. Claude-flavoured var present → `provider = claude`,
|
|
215
|
+
`<provider_dir> = .claude`, kinds = `{agent, command, skill}`.
|
|
216
|
+
3. Else if the tester says Antigravity / agent-skills (opt-in) →
|
|
217
|
+
`provider = agent-skills`, `<provider_dir> = .agents`, kinds =
|
|
218
|
+
`{skill}`.
|
|
219
|
+
4. Else → **fallback to claude** AND surface one short message so
|
|
220
|
+
they can correct course (render `> ` if it turns out to be
|
|
221
|
+
Claude, plain prose if they correct you):
|
|
222
|
+
|
|
223
|
+
> Heads up: I couldn't detect which agent runtime is hosting me,
|
|
224
|
+
> so I'll demo skill-map's Claude provider (`.claude/`). If you
|
|
225
|
+
> actually use Antigravity or agent-skills, tell me and I swap
|
|
226
|
+
> the fixture to `.agents/skills/`.
|
|
227
|
+
|
|
228
|
+
Persist `provider` into the state file (`tutorial.provider`) so a
|
|
229
|
+
resumed session does not re-detect.
|
|
230
|
+
|
|
231
|
+
**Global substitution rule**: wherever a part file says `.claude/`,
|
|
232
|
+
swap it for the detected `<provider_dir>`. **Skip any fixture file
|
|
233
|
+
or step whose kind is not in the provider's supported set** (on
|
|
234
|
+
`agent-skills` / Antigravity: only the skill + markdown notes are
|
|
235
|
+
valid; drop agent + command files and the connectors that target
|
|
236
|
+
them, and adjust node counts accordingly).
|
|
237
|
+
|
|
238
|
+
**Reality check (don't mention to the tester)**: this skill ships
|
|
239
|
+
at `.claude/skills/sm-tutorial/`, so Claude Code is the only host
|
|
240
|
+
today. The detection wiring is here so mirrored skills at
|
|
241
|
+
`.agents/skills/sm-tutorial/` reuse it as-is.
|
|
242
|
+
|
|
243
|
+
## Per-step cycle (inside a chapter)
|
|
244
|
+
|
|
245
|
+
When you enter a part, call `TaskCreate` once with one task per
|
|
246
|
+
chapter in that part's `chapters` list. Update each to
|
|
247
|
+
`in_progress` when its block begins and `completed` when it ends.
|
|
248
|
+
|
|
249
|
+
For every step in a chapter:
|
|
250
|
+
|
|
251
|
+
1. **Announcement**: "Capítulo N: `<title>`. ~M min." then a blank
|
|
252
|
+
line, then (optionally) one sentence of context on its own
|
|
253
|
+
paragraph. `N` is the 1-based index of the chapter inside its
|
|
254
|
+
part; it resets per part. The context paragraph renders ONLY
|
|
255
|
+
when the source has a `**Context**:` field; if omitted, announce
|
|
256
|
+
the title alone. The title comes from the chapter's `title` in
|
|
257
|
+
`_manifest.yml` (translated per §Tone), not the internal id.
|
|
258
|
+
2. **Preparation** (if applicable): create or modify files, show
|
|
259
|
+
the path and a short preview.
|
|
260
|
+
3. **Commands to run**: a ` ```bash ` block.
|
|
261
|
+
4. **Pause**: "Run that and paste me the output (or say OK)."
|
|
262
|
+
5. **Verification**: read their reply. If something errored,
|
|
263
|
+
suggest a fix before advancing. If fine, mark `done`. Honour the
|
|
264
|
+
part's `pace`: `auto-advance` moves straight into the next
|
|
265
|
+
chapter's Announcement; `per-step` asks "¿seguimos?" first.
|
|
266
|
+
|
|
267
|
+
## Routing + menu (orchestrator)
|
|
268
|
+
|
|
269
|
+
- **No state (first-timer)**: enter the first `spine` part of
|
|
270
|
+
lowest `order` (Part 0) at its chapter 1, **with no ToC** (the
|
|
271
|
+
onboarding flow is a single continuous path; never expose the
|
|
272
|
+
part split).
|
|
273
|
+
- **After a part closes, or state exists**: render the **ToC menu**
|
|
274
|
+
from `_manifest.yml`, parts in `order` with their chapters,
|
|
275
|
+
completed chapters prefixed `✓ `. A part with a `seed` (the campaign
|
|
276
|
+
parts) is **always shown**, even out of order: its `preflight: seed`
|
|
277
|
+
fast-forwards the project into it (SKILL.md §Entering a part). A part
|
|
278
|
+
with a `prereq` but NO `seed` (Part 7 `cli`) is shown only once its
|
|
279
|
+
`prereq` is `done`. Parts with `status: planned` (no `step_file`) are
|
|
280
|
+
NOT shown. Let the tester pick; walk that part; return to the menu
|
|
281
|
+
when it ends.
|
|
282
|
+
- **Adding content** is data-only: a new chapter in a part (or a
|
|
283
|
+
new `part-<id>.md` + a manifest row). Keep chapter-id prefixes
|
|
284
|
+
matching the file name so dispatch stays mechanical.
|
|
285
|
+
|
|
286
|
+
## Resume / restart
|
|
287
|
+
|
|
288
|
+
When re-invoked and the state file already exists, do NOT repeat
|
|
289
|
+
pre-flight from scratch. Show progress (one line per part with its
|
|
290
|
+
status) and offer: **continue** the current part, **pick another
|
|
291
|
+
part** (re-show the ToC), **start over** (wipes the tutorial
|
|
292
|
+
content, asks for confirmation), or **exit**.
|
|
293
|
+
|
|
294
|
+
On **start over**, before deleting anything:
|
|
295
|
+
|
|
296
|
+
1. Read `tutorial.cwd` from the state file and compare with `pwd`.
|
|
297
|
+
If they differ, **refuse** and tell the tester to move to the
|
|
298
|
+
saved cwd or delete the state file by hand (their `.claude/`,
|
|
299
|
+
`notes/`, etc. here are probably theirs, not the tutorial's).
|
|
300
|
+
2. If the cwd matches, read `tutorial.provider`, compute
|
|
301
|
+
`<provider_dir>` + the subset of files actually created, show
|
|
302
|
+
the exact list of paths you'll delete, and require the literal
|
|
303
|
+
typed confirmation `yes, wipe`.
|
|
304
|
+
3. Only on `yes, wipe`, delete those exact paths (do NOT `rm -rf`
|
|
305
|
+
`<provider_dir>/` or `notes/` as directories, only the specific
|
|
306
|
+
tutorial-owned files inside; `rmdir` empty parents silently).
|
|
307
|
+
Then start from pre-flight.
|
|
308
|
+
|
|
309
|
+
## Edge cases
|
|
310
|
+
|
|
311
|
+
- **No Node 24+** → guide them to `nvm` or nodejs.org. Don't try to
|
|
312
|
+
install Node for them.
|
|
313
|
+
- **Port 4242 in use** → bare `sm` takes no flags (it is `sm serve`
|
|
314
|
+
with defaults). Stop the failed `sm`, run `sm serve --port 4243`;
|
|
315
|
+
open the new URL the server prints.
|
|
316
|
+
- **`sm` doesn't pick up changes on WSL** → known on WSL2 under
|
|
317
|
+
`/mnt/c/`. Suggest `mkdir ~/sm-tutorial && cd ~/sm-tutorial`
|
|
318
|
+
(Linux-native filesystem) and re-invoking.
|
|
319
|
+
- **Browser doesn't load the UI** → check `sm` is still running;
|
|
320
|
+
try `curl http://127.0.0.1:4242` from another terminal.
|
|
321
|
+
- **`sm plugins create` refuses with "already exists"** → suggest a
|
|
322
|
+
different id or `--force` (warn it overwrites).
|
|
323
|
+
- **Tester gets lost** → "no worries, tell me where you are and
|
|
324
|
+
we'll pick up from there". State is in the state file.
|
|
325
|
+
|
|
326
|
+
## Final wrap-up
|
|
327
|
+
|
|
328
|
+
When the tester signals they're done (or completed every available
|
|
329
|
+
part), show the closing block: a "that's a wrap" line, a guilt-free
|
|
330
|
+
cleanup line (the cwd started empty, so everything here was created
|
|
331
|
+
by the tutorial and a whole-folder delete loses nothing of theirs,
|
|
332
|
+
`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"
|