@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,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,395 @@
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, then launch the server and open the link it prints. Don't hardcode the URL here, the verb itself is the source of truth (it logs the bound `http://host:port` after listen). Tell the tester:
17
+
18
+ > First, 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
+ > Then run `sm`. After a couple of seconds it will print a line
26
+ > with the URL where the UI is listening, copy that link and open
27
+ > it in the browser you just arranged.
28
+ >
29
+ > Tell me when the page is open showing one node, `demo-agent`.
30
+
31
+ Wait for confirmation. Mark `init`: done.
32
+
33
+ ## Chapter `kinds` - The other kinds appear (~1 min)
34
+
35
+ 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.
36
+
37
+ 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:
38
+
39
+ 1. `.claude/skills/demo-skill/SKILL.md` (kind: skill):
40
+ ```markdown
41
+ ---
42
+ name: demo-skill
43
+ description: |
44
+ Example skill that walks a file and returns a Markdown report.
45
+ Showcases the `skill` kind in the demo map.
46
+ inputs:
47
+ - name: target
48
+ type: path
49
+ description: File to process.
50
+ required: true
51
+ outputs:
52
+ - name: report
53
+ type: string
54
+ description: Markdown summary.
55
+ ---
56
+
57
+ # demo-skill
58
+
59
+ This skill walks a file and returns a report. Will be wired up
60
+ to the rest of the demo fixture in the next sub-step.
61
+
62
+ ## Steps
63
+ 1. Read the `target`.
64
+ 2. Validate the frontmatter against the schemas.
65
+ 3. Generate the report.
66
+ ```
67
+
68
+ 2. `.claude/commands/demo-command.md` (kind: command):
69
+ ```markdown
70
+ ---
71
+ name: demo-command
72
+ description: |
73
+ Example slash-style command that wraps the demo-skill behind
74
+ a keyboard shortcut. Showcases the `command` kind.
75
+ shortcut: "ctrl+alt+d"
76
+ args:
77
+ - name: target
78
+ type: path
79
+ description: File the command will hand off to the skill.
80
+ required: true
81
+ ---
82
+
83
+ # demo-command
84
+
85
+ Quick keyboard entry point for running the demo flow on a
86
+ target file. Connectors land in the next sub-step.
87
+ ```
88
+
89
+ 3. `notes/todo.md`, classified as `kind: markdown` today
90
+ (the catch-all for `.md` files outside the
91
+ skill / agent / command folders):
92
+ ```markdown
93
+ ---
94
+ name: Demo TODO list
95
+ description: |
96
+ Live list of things to review in the demo. Will become the
97
+ hub that points to the rest of the fixture in the next
98
+ sub-step.
99
+ tags: [notes, demo]
100
+ ---
101
+
102
+ # Pending
103
+ ```
104
+
105
+ 4. `notes/demo-guideline.md`, second `kind: markdown` node, the
106
+ one the hub will reach via a real markdown link in the
107
+ `connectors` chapter:
108
+ ```markdown
109
+ ---
110
+ name: demo-guideline
111
+ description: |
112
+ Static reference notes that the rest of the demo points at.
113
+ Showcases a second markdown node so the demo can exercise
114
+ the `references` link kind without ambiguity.
115
+ tags: [notes, demo]
116
+ ---
117
+
118
+ # Demo Guideline
119
+
120
+ Conventions the demo fixture follows:
121
+
122
+ - Names match the file basename.
123
+ - Frontmatter `description` is short and human-readable.
124
+ - Body stays minimal, only what's needed to teach the kind.
125
+ ```
126
+
127
+ Tell the tester:
128
+
129
+ > Look at the browser. Four new nodes should have popped in:
130
+ > `demo-skill`, `demo-command`, `notes/todo`, and `demo-guideline`.
131
+ > Five total now, **still unconnected**: they're floating dots.
132
+ > The viewport auto-fits whenever a node is added or removed, so
133
+ > all five should be visible without panning.
134
+ >
135
+ > What I just did behind the scenes: I created four new files in
136
+ > your project, and the watcher picked them up on its own, that's
137
+ > why four new dots appeared without you running anything:
138
+ >
139
+ > - `.claude/skills/demo-skill/SKILL.md` (kind: skill)
140
+ > - `.claude/commands/demo-command.md` (kind: command)
141
+ > - `notes/todo.md` (kind: markdown)
142
+ > - `notes/demo-guideline.md` (kind: markdown)
143
+ >
144
+ > Same loop you'll use yourself in the next step, only this time
145
+ > the writes came from me.
146
+ >
147
+ > Did the four appear? Confirm so we can wire them up.
148
+
149
+ Wait for confirmation. Mark `kinds`: done.
150
+
151
+ ## Chapter `first-edit` - Your first edit (the watcher reacts) (~1 min)
152
+
153
+ 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.
154
+
155
+ Tell the tester:
156
+
157
+ > Your turn. First, in the browser, **expand the `demo-agent`
158
+ > card** (click the chevron / arrow on the card to open it). That
159
+ > reveals the description currently showing for the node, that's
160
+ > the field you'll edit next, so leave the card open and the
161
+ > change will be obvious.
162
+ >
163
+ > Now open `.claude/agents/demo-agent.md` in your editor of
164
+ > choice. In the **frontmatter** at the top of the file, change
165
+ > the `description:` field to any text you want, the actual
166
+ > content does not matter, just make it different from what's
167
+ > there now. Save the file.
168
+ >
169
+ > Watch the browser. The `demo-agent` card should refresh its
170
+ > description in real time, no reload, no Ctrl+C, same watcher
171
+ > that picked up the four new nodes a moment ago, this time
172
+ > reacting to YOUR edit.
173
+ >
174
+ > Confirm so we wire the five up.
175
+
176
+ 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.
177
+
178
+ ## Chapter `connectors` - The connectors light up (~2 min)
179
+
180
+ 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**:
181
+
182
+ - an `@handle` token → kind `mentions`
183
+ - a `/slash` token → kind `invokes`
184
+ - a markdown link `[text](path)` → kind `references`
185
+
186
+ Four bullets, three kinds (the `invokes` kind shows up twice because both the command and the skill are addressed by slash).
187
+
188
+ 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).
189
+
190
+ **Edit `notes/todo.md`**: append these bullets after the `# Pending` heading:
191
+
192
+ ```markdown
193
+ - [ ] Brief @demo-agent on the rough edges.
194
+ - [ ] Run /demo-command before publishing.
195
+ - [ ] Trigger /demo-skill when the input lands.
196
+ - [ ] Re-read the
197
+ [demo-guideline](./demo-guideline.md) before shipping.
198
+ ```
199
+
200
+ Tell the tester:
201
+
202
+ > Look at the magic again. `notes/todo` is now the hub: four
203
+ > arrows light up between it and the other nodes, and the UI
204
+ > palette colours each arrow by the link kind it carries:
205
+ >
206
+ > - `notes/todo → demo-agent` (kind: `mentions`)
207
+ > - `notes/todo → demo-command` (kind: `invokes`)
208
+ > - `notes/todo → demo-skill` (kind: `invokes`)
209
+ > - `notes/todo → demo-guideline` (kind: `references`)
210
+ >
211
+ > The kind comes from the syntax in the bullet: an `@handle` is
212
+ > always a mention, a `/skill` or `/command` is always an invoke, a
213
+ > markdown link is always a reference. Four arrows, three kinds,
214
+ > three colours on the canvas (the two `invokes` share a colour, as
215
+ > you would expect).
216
+ >
217
+ > Notice too that the connectors have different transparency.
218
+ > Skill-map estimates how sure it is of each connection: a
219
+ > `[text](file.md)` that points at a real file (confidence 1.00,
220
+ > now that the target exists) looks solid. The opacity tells that
221
+ > story at a glance: the more solid the arrow, the more reliable
222
+ > the inference.
223
+ >
224
+ > Confirm when you see it. If a connector is missing, refresh the
225
+ > browser and let me know.
226
+
227
+ If a connector is missing, do not advance, the next chapter inspects the same hub edit. Mark `connectors`: done.
228
+
229
+ ## Chapter `inspector` - The inspector and linked nodes (~1 min)
230
+
231
+ 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.
232
+
233
+ > 🆕 Open the Inspector for **Demo TODO list** (click the node on
234
+ > the map). **Expand** the **Connections** section (it's collapsed
235
+ > by default): it has two sections, **Outgoing** and **Incoming**.
236
+ > Demo TODO list lists 4 links under Outgoing (it's the hub pointing
237
+ > at four nodes) and 0 under Incoming; if you open the Inspector for
238
+ > any of the four targeted nodes, you'll see 1 under Incoming. Each
239
+ > row shows the link kind (`mentions`, `invokes`, `references`) and
240
+ > a badge with its confidence: the numeric value (`1.00`, `0.50`,
241
+ > …).
242
+ >
243
+ > 💡 Tip: if all these changes left the nodes crowded together, the
244
+ > map toolbar has a **Re-arrange layout** button (tooltip "Re-arrange
245
+ > the visible nodes (re-run auto layout)"): it re-runs the
246
+ > auto-layout so everything reads better. If you've moved nodes by
247
+ > hand it asks for confirmation first, otherwise it just re-arranges.
248
+ >
249
+ > Let me know when you see it.
250
+
251
+ Mark `inspector`: done.
252
+
253
+ ## Chapter `edit-link` - Edit a link, the topology changes (~3 min)
254
+
255
+ **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.
256
+
257
+ 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.
258
+
259
+ > Your turn. Edit `notes/todo.md` with your editor of choice and
260
+ > delete the bullet that contains `@demo-agent`. Save. Watch the
261
+ > UI.
262
+ >
263
+ > Expected: the `notes/todo → demo-agent` connector (kind:
264
+ > `mentions`) disappears in real time. The two nodes stay in the
265
+ > **Map**; only the edge goes.
266
+
267
+ 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.
268
+
269
+ ## Chapter `workspace` - Navigate the workspace (files, search, isolate) (~2 min)
270
+
271
+ **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 and filter it with the search box. No file edits here, pure navigation, and the same `sm` session you booted back in the `init` chapter is still running.
272
+
273
+ 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.
274
+
275
+ **Beat 1, open the Files panel (tester does this).**
276
+
277
+ > Make sure the **Files** panel is open, the one you expanded back
278
+ > in the first chapter on the left edge. If you collapsed it since,
279
+ > click the expand handle (the `>` arrow, tooltip "Expand files
280
+ > panel") to reopen it. The sidebar shows a **folder tree** (a
281
+ > nested view of your folders and the nodes inside them): your five
282
+ > nodes grouped under `.claude/` and `notes/`, each row showing its
283
+ > kind and how many links go in and out.
284
+ >
285
+ > Tell me when the tree is open.
286
+
287
+ **Beat 2, search (tester does this).**
288
+
289
+ > At the top of that sidebar there's a search box (placeholder
290
+ > `Search…`). Type `guideline`. Watch both halves at once: the tree
291
+ > narrows down to `demo-guideline` and the **Map** drops every node
292
+ > except `demo-guideline`. The search matches a node's name, path,
293
+ > or description, and filters live as you type, no Enter needed.
294
+ >
295
+ > Now clear the box. All five nodes come back, in both the tree and
296
+ > the Map. Confirm you saw it filter and then restore.
297
+
298
+ **Beat 3, isolate (tester does this).**
299
+
300
+ > Last one. In the tree, find the `notes/todo` row: at its right
301
+ > edge there's a small **sitemap** icon (its tooltip reads "Isolate
302
+ > this node and its direct links on the map"). Click it.
303
+ >
304
+ > The Map collapses to `notes/todo` plus only the nodes it links to
305
+ > (`demo-command`, `demo-skill`, `demo-guideline`). `demo-agent`,
306
+ > which lost its only connector back in the last step, drops out of
307
+ > view, and the Inspector opens on `notes/todo`. That's how you
308
+ > focus on one node's neighborhood when a map gets busy.
309
+ >
310
+ > To bring the rest back, look at the toolbar along the bottom of
311
+ > the Map: there's a **Show all** button (an eye icon, tooltip
312
+ > "Clear the map selection and show every node again"). Click it and
313
+ > all five nodes return.
314
+ >
315
+ > Did the map isolate and then restore?
316
+
317
+ Leave the server running, the next chapter (`.skillmapignore`) is the last one that uses it. Mark `workspace`: done.
318
+
319
+ ## Chapter `ignore` - Silence a file via .skillmapignore (~2 min)
320
+
321
+ 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.
322
+
323
+ `sm init` already wrote a starter `.skillmapignore` at the scope root. The flow has three beats:
324
+
325
+ **Beat 1, you create one new fixture file (the agent does this).**
326
+
327
+ `Write` `notes/private-credentials.md`, kind `markdown`, simulates a file the tester would never want surfacing publicly:
328
+
329
+ ```markdown
330
+ ---
331
+ name: private-credentials
332
+ description: |
333
+ Personal API tokens, exists in the repo but should not show
334
+ up in skill-map's map. Demonstrates the .skillmapignore
335
+ flow.
336
+ ---
337
+
338
+ # Private
339
+
340
+ API_TOKEN: example-not-real
341
+ ```
342
+
343
+ 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. (If the tester doesn't see it, they may need to click **Show all** in the map toolbar to clear any leftover selection.)
344
+
345
+ **Beat 2, you show the project structure (the agent does this).**
346
+
347
+ 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:
348
+
349
+ > One last step. Here's what your directory looks like right now:
350
+
351
+ ```
352
+ . ← your cwd
353
+ ├── .claude/
354
+ │ ├── agents/demo-agent.md
355
+ │ ├── commands/demo-command.md
356
+ │ └── skills/
357
+ │ ├── demo-skill/SKILL.md
358
+ │ └── sm-tutorial/SKILL.md ← the tutorial you loaded
359
+ ├── .skill-map/ ← project DB + settings (managed)
360
+ ├── .skillmapignore ← the file we're about to edit
361
+ └── notes/
362
+ ├── todo.md
363
+ ├── demo-guideline.md
364
+ └── private-credentials.md ← what we want to hide
365
+ ```
366
+
367
+ > The `.skillmapignore` at the root is the file we'll touch
368
+ > next. Same syntax as `.gitignore`. Anything matching a pattern
369
+ > there is invisible to skill-map's scan.
370
+
371
+ 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.
372
+
373
+ **Beat 3, the tester edits `.skillmapignore` (NOT the agent).**
374
+
375
+ Per Inviolable rule #2, the agent does NOT touch `.skillmapignore` with your `Edit` tool. Tell the tester to do it from their editor:
376
+
377
+ > Last step. Open `.skillmapignore` (it's at the cwd root) in
378
+ > your editor of choice. At the end of the file, on a new line,
379
+ > append the literal pattern `notes/private-*.md`. Save the
380
+ > file. The pattern uses a glob (same as `.gitignore`):
381
+ > `notes/private-*.md` matches `private-credentials.md` and any
382
+ > future sibling `private-*.md`. A literal path
383
+ > (`notes/private-credentials.md`) would also work, the glob
384
+ > teaches the broader habit.
385
+ >
386
+ > Watch the browser when you save. The
387
+ > `notes/private-credentials` node should disappear from the
388
+ > **Map** in real time, without restarting anything. Six nodes
389
+ > back to five.
390
+ >
391
+ > Did the node vanish?
392
+
393
+ 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.
394
+
395
+ Mark `ignore`: done.