@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.
Files changed (50) 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 +1213 -550
  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-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-ZNDMBION.js → chunk-TXTY24G4.js} +28 -30
  33. package/dist/ui/chunk-UBQUCSQ4.js +1 -0
  34. package/dist/ui/chunk-WFLPMCK4.js +392 -0
  35. package/dist/ui/chunk-YQFIXHKM.js +123 -0
  36. package/dist/ui/index.html +2 -2
  37. package/dist/ui/{main-2DWVSRRX.js → main-OYITFJ7B.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,180 @@
1
+ # Part 2: Connect the harness (step library, `connect-harness`)
2
+
3
+ This is the wiring part. Part 1 grew a small set of standalone nodes around the handbook (the portfolio harness); here the tester turns that scatter of dots into a connected graph: a link checker, a publish command that pulls three pieces together, the handbook becoming a real hub, and a close-up on how sure skill-map is of each connection. `pace: auto-advance` (walk straight into the next chapter once one is marked done), `preflight: reuse` (it builds on the portfolio harness from Part 1, 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 `check-links` - The link checker (~3 min)
6
+
7
+ **Context**: the harness needs a guard that runs before publishing: a skill that walks every page and checks the internal links resolve. We only create it here (its first standalone `skill` node); the `publish` command in the next chapter is what invokes it.
8
+
9
+ `Write` `.claude/skills/check-links/SKILL.md` (substitute `<provider_dir>` per `_core.md`; this kind exists on every provider, so no skip):
10
+
11
+ ```markdown
12
+ ---
13
+ name: check-links
14
+ description: |
15
+ Validates the portfolio's internal links before publishing. Walks
16
+ every generated page and reports any link whose target is missing.
17
+ inputs:
18
+ - name: root
19
+ type: path
20
+ description: Folder of generated pages to check.
21
+ required: true
22
+ outputs:
23
+ - name: report
24
+ type: string
25
+ description: List of broken links, empty when all resolve.
26
+ ---
27
+
28
+ # check-links
29
+
30
+ Runs as the last gate before the site goes out. Reads each page under
31
+ the given root, follows every internal link, and reports the ones that
32
+ point at a file that does not exist.
33
+
34
+ ## Steps
35
+ 1. Read every page under `root`.
36
+ 2. Collect the internal links from each page.
37
+ 3. Report any link whose target is missing.
38
+ ```
39
+
40
+ Tell the tester:
41
+
42
+ > I added a new helper to your harness: a skill called `check-links`
43
+ > (its job is to make sure every internal link on the site actually
44
+ > works before you publish). A new `skill` node appeared on the
45
+ > **Map**. It stands alone for now, in the next step we give it a
46
+ > caller.
47
+ >
48
+ > See the new skill node?
49
+
50
+ Wait for confirmation. Mark `check-links`: done.
51
+
52
+ ## Chapter `publish` - The publish command (~4 min)
53
+
54
+ **Context**: this is the chapter where the graph comes alive. The `/publish` command ties three pieces together in one body: it invokes the link checker, mentions the content editor, and references the deploy runbook. Three connectors light up from a single new node, one per link syntax.
55
+
56
+ `Write` `.claude/commands/publish.md` (substitute `<provider_dir>` per `_core.md`; on `agent-skills` / Antigravity there is no `command` kind, so skip this whole chapter and fold its purpose into the prose of the next one):
57
+
58
+ ```markdown
59
+ ---
60
+ name: publish
61
+ description: |
62
+ Publishes the portfolio: runs the link check, hands off to the
63
+ content editor for any last fixes, then follows the deploy runbook.
64
+ shortcut: "ctrl+alt+p"
65
+ args:
66
+ - name: root
67
+ type: path
68
+ description: Folder of generated pages to publish.
69
+ required: true
70
+ ---
71
+
72
+ # /publish
73
+
74
+ The one command you run when the site is ready to go out.
75
+
76
+ ## Steps
77
+ 1. Run /check-links on the generated pages first.
78
+ 2. If anything needs a fix, brief @content-editor on it.
79
+ 3. Follow the [deploy runbook](../../docs/DEPLOY.md) to ship.
80
+ ```
81
+
82
+ Tell the tester:
83
+
84
+ > I added the `/publish` command, the single entry point you run when
85
+ > the site is ready to go live. Watch the **Map**: **three** new
86
+ > arrows light up at once from the new `publish` node, and each one is
87
+ > a different colour because each one is a different kind of link:
88
+ >
89
+ > - `publish -> check-links` (kind: `invokes`), from the `/check-links`
90
+ > token in the body.
91
+ > - `publish -> content-editor` (kind: `mentions`), from the
92
+ > `@content-editor` token.
93
+ > - `publish -> docs/DEPLOY.md` (kind: `references`), from the
94
+ > `[deploy runbook](../../docs/DEPLOY.md)` markdown link.
95
+ >
96
+ > One node, three connectors, three link kinds. The harness is
97
+ > starting to look like a real graph.
98
+ >
99
+ > Did the three arrows appear?
100
+
101
+ Wait for confirmation. Mark `publish`: done.
102
+
103
+ ## Chapter `links` - The handbook becomes the hub (~4 min)
104
+
105
+ **Context**: the handbook (`AGENTS.md`) has been a lonely node since Part 1. Here it becomes the hub: we add two bullets so it mentions the content editor and invokes the publish command. We also give the content editor a reference to the style guide it follows. Several connectors land, and we recap the three link kinds and which syntax produced each.
106
+
107
+ Apply both edits with `Edit` (do not rewrite the files).
108
+
109
+ **Edit `AGENTS.md`**: append these two bullets at the end of the body (substitute `<provider_dir>` only in prose, the link tokens below stay as written):
110
+
111
+ ```markdown
112
+ - When a page needs writing or fixing, brief @content-editor.
113
+ - When the site is ready to go out, run /publish.
114
+ ```
115
+
116
+ **Edit `.claude/agents/content-editor.md`**: add this line to the body, right after the "Turns a short brief..." paragraph (substitute `<provider_dir>` per `_core.md`):
117
+
118
+ ```markdown
119
+ Every page follows the [style guide](../../docs/STYLE.md).
120
+ ```
121
+
122
+ Tell the tester:
123
+
124
+ > Two edits, and the **Map** fills in. Your handbook (`AGENTS.md`) is
125
+ > now the hub: it points at the content editor and at the publish
126
+ > command. And the content editor now reaches the style guide it
127
+ > follows. New arrows:
128
+ >
129
+ > - `AGENTS.md -> content-editor` (kind: `mentions`), from `@content-editor`.
130
+ > - `AGENTS.md -> /publish` (kind: `invokes`), from `/publish`.
131
+ > - `content-editor -> docs/STYLE.md` (kind: `references`), from the
132
+ > `[style guide](../../docs/STYLE.md)` markdown link.
133
+ >
134
+ > Here is the whole recap of the three link kinds, one per syntax:
135
+ >
136
+ > - an `@handle` token is always a **mention**.
137
+ > - a `/slash` token is always an **invoke**.
138
+ > - a `[text](path.md)` markdown link is always a **reference**.
139
+ >
140
+ > The kind comes purely from how you wrote it. Your harness is wired
141
+ > end to end now: the handbook reaches the work, the work reaches the
142
+ > docs, and `/publish` pulls the whole publish flow together.
143
+ >
144
+ > Did the new arrows light up?
145
+
146
+ Wait for confirmation. You MAY use `Read` on the two files afterwards to verify the edits landed before moving on. Mark `links`: done.
147
+
148
+ ## Chapter `confidence` - How sure is each link (~3 min)
149
+
150
+ **Context**: the connectors do not all look equally solid, and that is on purpose. Skill-map estimates how sure it is of every connection and shows that as opacity. Here we open the Inspector on a real harness node and read the per-link confidence numbers, mirroring the prologue's connectors beat but on the portfolio.
151
+
152
+ No file edits in this chapter, pure observation on the graph the tester just built.
153
+
154
+ Tell the tester:
155
+
156
+ > Last beat of this part: how sure is skill-map about each connection?
157
+ > Look closely at the **Map** and you'll notice the arrows are not all
158
+ > equally solid. The more confident skill-map is that a link is real,
159
+ > the more solid the arrow; the less sure, the more translucent.
160
+ >
161
+ > Open the Inspector for the `publish` node (click it on the **Map**).
162
+ > Scroll down to the **Linked nodes** panel and read the **Outgoing**
163
+ > rows. Each row shows the link kind and a confidence badge:
164
+ >
165
+ > - `publish -> docs/DEPLOY.md` (`references`) reads **1.00** and looks
166
+ > solid: it is a markdown link to a file that really exists on disk,
167
+ > so skill-map is certain.
168
+ > - `publish -> content-editor` (`mentions`) and `publish ->
169
+ > check-links` (`invokes`) read high too, because each `@handle` and
170
+ > `/slash` token resolves cleanly to a node that exists in your
171
+ > harness.
172
+ >
173
+ > The number is the certainty, and the opacity on the canvas is just
174
+ > that number drawn as transparency: a glance at the **Map** tells you
175
+ > which connections are rock solid and which are skill-map's best
176
+ > guess.
177
+ >
178
+ > Do you see the confidence badges in the Inspector?
179
+
180
+ Wait for confirmation. Mark `confidence`: done. This closes Part 2; the orchestrator returns to the ToC menu (Part 3, "Maintain the site", is next on the spine).
@@ -0,0 +1,424 @@
1
+ # Part 0: The live map (prologue) - step library
2
+
3
+ The live-UI prologue: the tester runs `sm init`, opens the browser, and watches the map update in real time as files are written and edited. `pace: per-step` (ask "¿seguimos?" between steps), `preflight: taught-init` (the tester runs `sm init` as the first taught step, not pre-flight), and the chapters lay the basics fixture progressively, one node at a time. 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 `init` - Your first node (~2 min)
6
+
7
+ **Context**: `sm init` creates a hidden `.skill-map/` folder in the cwd holding the database where skill-map stores what it learns about the project. It also runs an initial scan. Mandatory first step. Then typing `sm` alone (no arguments) in an initialised dir starts the UI server with the watcher built in (it is just an alias of `sm serve` with all defaults; the moment you need any flag you write `sm serve --flag ...` explicitly). One process, one terminal: it boots the server, scans the `.md` files, detects changes, and pushes events over WebSocket to the live UI. The next chapters all run against the same `sm` session, you boot it here and keep it alive through the `ignore` chapter.
8
+
9
+ ```bash
10
+ sm init
11
+ ls -la .skill-map/
12
+ ```
13
+
14
+ Expected: `.skill-map/skill-map.db` appears (plus config files). The initial scan reports a small node / link / issue count from the demo-agent fixture, NOT 14+ phantom issues from the tutorial's own prose: pre-flight already wrote `.skillmapignore` with the right exclusions in place, so `sm init` leaves that file alone (it only writes when absent) and the scan never sees `sm-tutorial.md` / `findings.md` / `tutorial-state.yml`.
15
+
16
+ Before launching the server, ask the tester to set up a **side-by-side view** so they can watch the magic happen without alt-tabbing every step. Tell the tester:
17
+
18
+ > Now arrange your screen so the **browser** (where the **Map**
19
+ > updates in real time) and **this chat** are both visible at once
20
+ >, typical layout is browser on the left half, chat on the right
21
+ > (or any split that lets you see both). The terminal running
22
+ > `sm` can stay off to the side; it just prints scan progress
23
+ > lines and you don't need to read them.
24
+ >
25
+ > Tell me when you're set up and we start.
26
+
27
+ Wait for confirmation before moving on. Once they're ready, prompt them to launch the server and open the link it prints, without hardcoding the URL here, since the verb itself is the source of truth (it logs the bound `http://host:port` after listen):
28
+
29
+ > Run `sm`. After a couple of seconds it will print a line with the
30
+ > URL where the UI is listening, copy that link and open it in the
31
+ > browser you just arranged. Tell me when you see the page load.
32
+
33
+ Wait for confirmation that the page loaded. Then tell the tester:
34
+
35
+ > You'll see exactly **one node** in the **Map**: `demo-agent`
36
+ > (kind `agent`). That's our starting point.
37
+ >
38
+ > The workspace opens **map-first**: the canvas fills the screen and
39
+ > the **Files** panel sits collapsed against the left edge. Click the
40
+ > expand handle on the far left (the `>` arrow, its tooltip reads
41
+ > "Expand files panel") to open it.
42
+ >
43
+ > Now walk the two views before we go on:
44
+ > 1. **Map**: the single agent node on the canvas.
45
+ > 2. **Files**: one row, with path / kind / metadata.
46
+ >
47
+ > Then, back in **Map**, click the node: the **Inspector** panel
48
+ > slides out with its frontmatter (the YAML block at the top of
49
+ > every `.md`, between the two `---` lines) and its links.
50
+ >
51
+ > Did the node show up?
52
+
53
+ Wait for confirmation. Mark `init`: done.
54
+
55
+ ## Chapter `kinds` - The other kinds appear (~1 min)
56
+
57
+ Leave the browser open and the terminal with `sm` running. You create four more nodes **without any cross-fixture links** yet, pure standalone nodes, so the tester sees four new dots pop in. Three new **kinds** show up in this step (skill, command, markdown), the fourth file is a second `markdown` node that the hub in the `connectors` chapter will point at via a real `references` link.
58
+
59
+ Create these four files (with `Write`), exactly in this order. Per §Provider detection, **substitute `.claude/` with the detected `<provider_dir>` and skip files whose kind is not in the provider's supported set** (`agent-skills` / Antigravity: skip both `demo-agent` and `demo-command`, only the skill + the two markdown notes remain). Adjust the node count, the "four new nodes" message, and the file list shown to the tester in the sample below accordingly:
60
+
61
+ 1. `.claude/skills/demo-skill/SKILL.md` (kind: skill):
62
+ ```markdown
63
+ ---
64
+ name: demo-skill
65
+ description: |
66
+ Example skill that walks a file and returns a Markdown report.
67
+ Showcases the `skill` kind in the demo map.
68
+ inputs:
69
+ - name: target
70
+ type: path
71
+ description: File to process.
72
+ required: true
73
+ outputs:
74
+ - name: report
75
+ type: string
76
+ description: Markdown summary.
77
+ ---
78
+
79
+ # demo-skill
80
+
81
+ This skill walks a file and returns a report. Will be wired up
82
+ to the rest of the demo fixture in the next sub-step.
83
+
84
+ ## Steps
85
+ 1. Read the `target`.
86
+ 2. Validate the frontmatter against the schemas.
87
+ 3. Generate the report.
88
+ ```
89
+
90
+ 2. `.claude/commands/demo-command.md` (kind: command):
91
+ ```markdown
92
+ ---
93
+ name: demo-command
94
+ description: |
95
+ Example slash-style command that wraps the demo-skill behind
96
+ a keyboard shortcut. Showcases the `command` kind.
97
+ shortcut: "ctrl+alt+d"
98
+ args:
99
+ - name: target
100
+ type: path
101
+ description: File the command will hand off to the skill.
102
+ required: true
103
+ ---
104
+
105
+ # demo-command
106
+
107
+ Quick keyboard entry point for running the demo flow on a
108
+ target file. Connectors land in the next sub-step.
109
+ ```
110
+
111
+ 3. `notes/todo.md`, classified as `kind: markdown` today
112
+ (the catch-all for `.md` files outside the
113
+ skill / agent / command folders):
114
+ ```markdown
115
+ ---
116
+ name: Demo TODO list
117
+ description: |
118
+ Live list of things to review in the demo. Will become the
119
+ hub that points to the rest of the fixture in the next
120
+ sub-step.
121
+ tags: [notes, demo]
122
+ ---
123
+
124
+ # Pending
125
+ ```
126
+
127
+ 4. `notes/demo-guideline.md`, second `kind: markdown` node, the
128
+ one the hub will reach via a real markdown link in the
129
+ `connectors` chapter:
130
+ ```markdown
131
+ ---
132
+ name: demo-guideline
133
+ description: |
134
+ Static reference notes that the rest of the demo points at.
135
+ Showcases a second markdown node so the demo can exercise
136
+ the `references` link kind without ambiguity.
137
+ tags: [notes, demo]
138
+ ---
139
+
140
+ # Demo Guideline
141
+
142
+ Conventions the demo fixture follows:
143
+
144
+ - Names match the file basename.
145
+ - Frontmatter `description` is short and human-readable.
146
+ - Body stays minimal, only what's needed to teach the kind.
147
+ ```
148
+
149
+ Tell the tester:
150
+
151
+ > Look at the browser. Four new nodes should have popped in:
152
+ > `demo-skill`, `demo-command`, `notes/todo`, and `demo-guideline`.
153
+ > Five total now, **still unconnected**: they're floating dots.
154
+ > The viewport auto-fits whenever a node is added or removed, so
155
+ > all five should be visible without panning.
156
+ >
157
+ > What I just did behind the scenes: I created four new files in
158
+ > your project, and the watcher picked them up on its own, that's
159
+ > why four new dots appeared without you running anything:
160
+ >
161
+ > - `.claude/skills/demo-skill/SKILL.md` (kind: skill)
162
+ > - `.claude/commands/demo-command.md` (kind: command)
163
+ > - `notes/todo.md` (kind: markdown)
164
+ > - `notes/demo-guideline.md` (kind: markdown)
165
+ >
166
+ > Same loop you'll use yourself in the next step, only this time
167
+ > the writes came from me.
168
+ >
169
+ > Did the four appear? Confirm so we can wire them up.
170
+
171
+ Wait for confirmation. Mark `kinds`: done.
172
+
173
+ ## Chapter `first-edit` - Your first edit (the watcher reacts) (~1 min)
174
+
175
+ Up to here you've been watching the agent write files. Now hand the keyboard over: the lesson is that the watcher reacts to **any** `.md` edit under the cwd, not just to files the agent authors. After this beat, the tester has the muscle memory for "save → map updates", which the `ignore` chapter reuses verbatim.
176
+
177
+ Tell the tester:
178
+
179
+ > Your turn. First, in the browser, **expand the `demo-agent`
180
+ > card** (click the chevron / arrow on the card to open it). That
181
+ > reveals the description currently showing for the node, that's
182
+ > the field you'll edit next, so leave the card open and the
183
+ > change will be obvious.
184
+ >
185
+ > ⚠ Heads-up: the inspector header shows a couple of action
186
+ > buttons (**Bump version**, **Refresh body**). **Don't click
187
+ > them yet**, they write files to your project and we cover that
188
+ > flow deliberately in the annotations chapter. For now, just look.
189
+ >
190
+ > Now open `.claude/agents/demo-agent.md` in your editor of
191
+ > choice. In the **frontmatter** at the top of the file, change
192
+ > the `description:` field to any text you want, the actual
193
+ > content does not matter, just make it different from what's
194
+ > there now. Save the file.
195
+ >
196
+ > Watch the browser. The `demo-agent` card should refresh its
197
+ > description in real time, no reload, no Ctrl+C, same watcher
198
+ > that picked up the four new nodes a moment ago, this time
199
+ > reacting to YOUR edit.
200
+ >
201
+ > Confirm so we wire the five up.
202
+
203
+ Wait for confirmation. You MAY use `Read` on the file afterwards to verify the change landed (read-only, allowed under Inviolable rule #1) before moving on. Mark `first-edit`: done.
204
+
205
+ ## Chapter `connectors` - The connectors light up (~2 min)
206
+
207
+ You edit `notes/todo.md` so it becomes the **hub** that points to each of the other four nodes. Each bullet uses a syntax that maps to a specific **link kind**:
208
+
209
+ - an `@handle` token → kind `mentions`
210
+ - a `/slash` token → kind `invokes`
211
+ - a markdown link `[text](path)` → kind `references`
212
+
213
+ Four bullets, three kinds (the `invokes` kind shows up twice because both the command and the skill are addressed by slash).
214
+
215
+ Apply with `Edit` on `notes/todo.md` (do not rewrite the file). Per §Provider detection, **substitute `.claude/` with the detected `<provider_dir>` and drop any bullet whose target node was not created in the `kinds` chapter** (on `agent-skills` / Antigravity there is no agent and no command → skip the `@demo-agent` and `/demo-command` bullets, two connectors land).
216
+
217
+ **Edit `notes/todo.md`**: append these bullets after the `# Pending` heading:
218
+
219
+ ```markdown
220
+ - [ ] Brief @demo-agent on the rough edges.
221
+ - [ ] Run /demo-command before publishing.
222
+ - [ ] Trigger /demo-skill when the input lands.
223
+ - [ ] Re-read the
224
+ [demo-guideline](./demo-guideline.md) before shipping.
225
+ ```
226
+
227
+ Tell the tester:
228
+
229
+ > Look at the magic again. `notes/todo` is now the hub: four
230
+ > arrows light up between it and the other nodes, and the UI
231
+ > palette colours each arrow by the link kind it carries:
232
+ >
233
+ > - `notes/todo → demo-agent` (kind: `mentions`)
234
+ > - `notes/todo → demo-command` (kind: `invokes`)
235
+ > - `notes/todo → demo-skill` (kind: `invokes`)
236
+ > - `notes/todo → demo-guideline` (kind: `references`)
237
+ >
238
+ > The kind comes from the syntax in the bullet: an `@handle` is
239
+ > always a mention, a `/command` is always an invoke, a markdown
240
+ > link is always a reference. Four arrows, three kinds, three
241
+ > colours on the canvas (the two `invokes` share a colour, as you
242
+ > would expect).
243
+ >
244
+ > Notice too that the connectors have different transparency.
245
+ > Skill-map estimates how sure it is of each connection: a
246
+ > `[text](file.md)` that points at a real file (confidence 1.00,
247
+ > now that the target exists) looks solid, while an `@handle` that
248
+ > resolves to no node sits at 0.5 (ambiguous) and looks
249
+ > translucent. The opacity tells that story at a glance: the more
250
+ > solid the arrow, the more reliable the inference.
251
+ >
252
+ > Confirm when you see it. If a connector is missing, refresh the
253
+ > browser and let me know.
254
+
255
+ If a connector is missing, do not advance, the next chapter inspects the same hub edit. Mark `connectors`: done.
256
+
257
+ ## Chapter `inspector` - The inspector and linked nodes (~1 min)
258
+
259
+ The connector opacity tells the confidence story at a glance; the exact per-link breakdown lives in the Inspector. Open it on the hub so the tester registers the surface before the `edit-link` chapter changes topology.
260
+
261
+ > 🆕 Open the Inspector for `notes/todo` (click the node on the
262
+ > map). Scroll down to the **Linked nodes** panel: it has two
263
+ > sections, **Outgoing** and **Incoming**. `notes/todo` lists 4
264
+ > links under Outgoing (it's the hub pointing at four nodes) and 0
265
+ > under Incoming; if you open the Inspector for any of the four
266
+ > targeted nodes, you'll see 1 under Incoming. Each row shows the
267
+ > link kind (`mentions`, `invokes`, `references`) and a badge with
268
+ > its confidence: the numeric value (`1.00`, `0.50`, …).
269
+ >
270
+ > Let me know when you see it.
271
+
272
+ After the tester confirms, drop this tip:
273
+
274
+ > 💡 Tip: if all these changes left the nodes crowded together,
275
+ > the map toolbar has a **Reset layout** button: it re-runs the
276
+ > auto-layout so everything reads better. It asks for confirmation
277
+ > because it discards any positions you moved by hand.
278
+
279
+ Wait for confirmation. Mark `inspector`: done.
280
+
281
+ ## Chapter `edit-link` - Edit a link, the topology changes (~3 min)
282
+
283
+ **Context**: the `first-edit` chapter had the tester edit a scalar (`description`) and watch the inspector card refresh. This chapter raises the bar: edit a Markdown link and watch the MAP TOPOLOGY change (a connector disappears). Same watcher, different surface.
284
+
285
+ The server has been live since the `init` chapter, leave it running; this chapter and the next two (the workspace tour, then `.skillmapignore`) reuse it.
286
+
287
+ > Your turn. Edit `notes/todo.md` with your editor of choice and
288
+ > delete the bullet that contains `@demo-agent`. Save. Watch the
289
+ > UI.
290
+ >
291
+ > Expected: the `notes/todo → demo-agent` connector (kind:
292
+ > `mentions`) disappears in real time. The two nodes stay in the
293
+ > **Map**; only the edge goes.
294
+
295
+ You verify by reading `notes/todo.md` to confirm the change was applied. (On `agent-skills`, where the `@demo-agent` bullet was never created in the `connectors` chapter, ask the tester to remove the only bullet they did add and watch THAT connector vanish, the lesson is the same.) Once they confirm, leave the server running, the next chapter reuses it. Mark `edit-link`: done.
296
+
297
+ ## Chapter `workspace` - Navigate the workspace (files, search, isolate) (~2 min)
298
+
299
+ **Context**: you've built the graph and understood it; this beat is about *moving around* it. The workspace has two halves: the **Map** you've been working in, and a **Files** panel, a folder tree of every node. You'll open that tree, filter it with the search box, and use **isolate** to collapse the map down to a single node and the things it touches. No file edits here, pure navigation, and the same `sm` session you booted back in the `init` chapter is still running.
300
+
301
+ Per §Provider detection, on `agent-skills` / Antigravity the fixture has fewer nodes (`demo-skill` plus the two `notes/` files), so swap the node names below for ones that exist in that set; the gestures are identical.
302
+
303
+ **Beat 1, open the Files panel (tester does this).**
304
+
305
+ > Make sure the **Files** panel is open, the one you expanded back
306
+ > in the first chapter on the left edge. If you collapsed it since,
307
+ > click the expand handle (the `>` arrow, tooltip "Expand files
308
+ > panel") to reopen it. The sidebar shows a **folder tree** (a
309
+ > nested view of your folders and the nodes inside them): your five
310
+ > nodes grouped under `.claude/` and `notes/`, each row showing its
311
+ > kind and how many links go in and out.
312
+ >
313
+ > Tell me when the tree is open.
314
+
315
+ **Beat 2, search (tester does this).**
316
+
317
+ > At the top of that sidebar there's a search box (placeholder
318
+ > `Search…`). Type `guideline`. Watch both halves at once: the tree
319
+ > narrows down to `demo-guideline` and the **Map** drops every node
320
+ > except `demo-guideline`. The search matches a node's name, path,
321
+ > tags or description, and filters live as you type, no Enter
322
+ > needed.
323
+ >
324
+ > Now clear the box. All five nodes come back, in both the tree and
325
+ > the Map. Confirm you saw it filter and then restore.
326
+
327
+ **Beat 3, isolate (tester does this).**
328
+
329
+ > Last one. In the tree, find the `notes/todo` row: at its right
330
+ > edge there's a small **sitemap** icon (its tooltip reads "Isolate
331
+ > this node and its direct links on the map"). Click it.
332
+ >
333
+ > The Map collapses to `notes/todo` plus only the nodes it links to
334
+ > (`demo-command`, `demo-skill`, `demo-guideline`). `demo-agent`,
335
+ > which lost its only connector back in the last step, drops out of
336
+ > view, and the Inspector opens on `notes/todo`. That's how you
337
+ > focus on one node's neighborhood when a map gets busy.
338
+ >
339
+ > To bring the rest back, look at the toolbar along the bottom of
340
+ > the Map: there's a **Show all** button (an eye icon, tooltip
341
+ > "Clear the map selection and show every node again"). Click it and
342
+ > all five nodes return.
343
+ >
344
+ > Did the map isolate and then restore?
345
+
346
+ Leave the server running, the next chapter (`.skillmapignore`) is the last one that uses it. Mark `workspace`: done.
347
+
348
+ ## Chapter `ignore` - Silence a file via .skillmapignore (~2 min)
349
+
350
+ Earlier chapters showed the watcher picking up new files and edits (yours and theirs). This chapter flips the direction: a file the tester DOES NOT want in the map (a draft, a scratch file, a secret) gets hidden by a single line in `.skillmapignore`. Same live mechanism, no restart.
351
+
352
+ `sm init` already wrote a starter `.skillmapignore` at the scope root. The flow has three beats:
353
+
354
+ **Beat 1, you create one new fixture file (the agent does this).**
355
+
356
+ `Write` `notes/private-credentials.md`, kind `markdown`, simulates a file the tester would never want surfacing publicly:
357
+
358
+ ```markdown
359
+ ---
360
+ name: private-credentials
361
+ description: |
362
+ Personal API tokens, exists in the repo but should not show
363
+ up in skill-map's map. Demonstrates the .skillmapignore
364
+ flow.
365
+ ---
366
+
367
+ # Private
368
+
369
+ API_TOKEN: example-not-real
370
+ ```
371
+
372
+ Confirm the file appears in the map as a sixth node (`notes/private-credentials`). The watcher sees it like any other `.md`, that's the point of the demo.
373
+
374
+ **Beat 2, you show the project structure (the agent does this).**
375
+
376
+ Before asking the tester to touch `.skillmapignore`, give them a mental map of the folder so they know where the file lives and what's around it. Use `Bash` (`ls -la` and `ls -la notes/` if a deeper view helps) and present the listing as a tester-facing message (apply the host-dependent rendering rule) so the tester sees what their cwd holds:
377
+
378
+ > One last step. Here's what your directory looks like right now:
379
+
380
+ ```
381
+ . ← your cwd
382
+ ├── .claude/
383
+ │ ├── agents/demo-agent.md
384
+ │ ├── commands/demo-command.md
385
+ │ └── skills/
386
+ │ ├── demo-skill/SKILL.md
387
+ │ └── sm-tutorial/SKILL.md ← the tutorial you loaded
388
+ ├── .skill-map/ ← project DB + settings (managed)
389
+ ├── .skillmapignore ← the file we're about to edit
390
+ └── notes/
391
+ ├── todo.md
392
+ ├── demo-guideline.md
393
+ └── private-credentials.md ← what we want to hide
394
+ ```
395
+
396
+ > The `.skillmapignore` at the root is the file we'll touch
397
+ > next. Same syntax as `.gitignore`. Anything matching a pattern
398
+ > there is invisible to skill-map's scan.
399
+
400
+ Adjust the actual tree shown to whatever `ls -la` returns, the goal is "tester recognises their own filesystem", not a copy of the snippet above.
401
+
402
+ **Beat 3, the tester edits `.skillmapignore` (NOT the agent).**
403
+
404
+ Per Inviolable rule #2, the agent does NOT touch `.skillmapignore` with your `Edit` tool. Tell the tester to do it from their editor:
405
+
406
+ > Last step. Open `.skillmapignore` (it's at the cwd root) in
407
+ > your editor of choice. At the end of the file, on a new line,
408
+ > append the literal pattern `notes/private-*.md`. Save the
409
+ > file. The pattern uses a glob (same as `.gitignore`):
410
+ > `notes/private-*.md` matches `private-credentials.md` and any
411
+ > future sibling `private-*.md`. A literal path
412
+ > (`notes/private-credentials.md`) would also work, the glob
413
+ > teaches the broader habit.
414
+ >
415
+ > Watch the browser when you save. The
416
+ > `notes/private-credentials` node should disappear from the
417
+ > **Map** in real time, without restarting anything. Six nodes
418
+ > back to five.
419
+ >
420
+ > Did the node vanish?
421
+
422
+ After they confirm, you MAY use `Read` on `.skillmapignore` to verify the appended pattern landed correctly (in case `sm check` later reports something odd), that is read-only and allowed. Once confirmed, ask them to stop the server with **Ctrl+C** in the terminal before continuing.
423
+
424
+ Mark `ignore`: done.