@skill-map/cli 0.25.0 → 0.26.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-master.md +60 -19
- package/dist/cli/tutorial/sm-tutorial.md +152 -97
- package/dist/cli.js +194 -46
- package/dist/cli.js.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.js +22 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/{chunk-BK4M46IZ.js → chunk-4GTCV7V4.js} +1 -1
- package/dist/ui/{chunk-533YMAY3.js → chunk-PY2R7LHN.js} +2 -2
- package/dist/ui/{chunk-N5FAET6D.js → chunk-Q64EKSUB.js} +1 -1
- package/dist/ui/chunk-VH5GRUT7.js +255 -0
- package/dist/ui/{chunk-RR36XBDS.js → chunk-WOLLYGGL.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/dist/ui/main-CYRAD3L6.js +2 -0
- package/dist/ui/{styles-DLFC3F2G.css → styles-EGXMA46P.css} +1 -1
- package/package.json +2 -2
- package/dist/ui/chunk-O546Z3K4.js +0 -251
- package/dist/ui/main-QPX4WBVF.js +0 -2
|
@@ -51,7 +51,11 @@ must internalise before talking to the tester:
|
|
|
51
51
|
- **Language mirroring**: if the tester's first message is in
|
|
52
52
|
Spanish, run the conversation in **neutral Spanish (tú-form, not
|
|
53
53
|
rioplatense)**, e.g. `puedes`, `prueba`, `mira`, NOT `podés`,
|
|
54
|
-
`probá`, `mirá`. If in English, plain English.
|
|
54
|
+
`probá`, `mirá`. If in English, plain English. Also avoid
|
|
55
|
+
overly colloquial imperatives even when they're grammatical:
|
|
56
|
+
prefer `espera` / `aguarda` over `aguanta`, `revisa` over
|
|
57
|
+
`chequea`, `observa` / `fíjate en` over `fijate`. Casual is
|
|
58
|
+
OK; slangy is not.
|
|
55
59
|
- **Vocabulary translation (Spanish)**: same equivalences as
|
|
56
60
|
`sm-tutorial` (`kind → tipo`, `watcher → observador`, `scan` verb
|
|
57
61
|
→ `escanear`, `scan` noun → `escaneo`, `node → nodo`, `link →
|
|
@@ -118,6 +122,33 @@ must internalise before talking to the tester:
|
|
|
118
122
|
All command blocks assume the second terminal is anchored to the
|
|
119
123
|
fixture folder.
|
|
120
124
|
|
|
125
|
+
## Provider detection
|
|
126
|
+
|
|
127
|
+
Same logic as `sm-tutorial`'s §Provider detection. Recap:
|
|
128
|
+
|
|
129
|
+
| Provider | Base dir | Kinds claimed | Env-var signal |
|
|
130
|
+
|----------------|-----------------------|------------------------------|-------------------------------------------------|
|
|
131
|
+
| `claude` | `.claude/` | `agent`, `command`, `skill` | `CLAUDECODE=1` OR `AI_AGENT` starts with `claude-code` |
|
|
132
|
+
| `gemini` | `.gemini/` | `agent`, `skill` | `GEMINI_CLI=1` OR `AI_AGENT` starts with `gemini` |
|
|
133
|
+
| `agent-skills` | `.agents/skills/` | `skill` only | no formal env yet, opt-in if the tester asks |
|
|
134
|
+
|
|
135
|
+
**During pre-flight**, inspect the env, pick the provider, and
|
|
136
|
+
persist it into `master-state.yml.master.provider`. Fallback to
|
|
137
|
+
`claude` with a one-line heads-up if nothing matched (verbatim
|
|
138
|
+
fallback blockquote in `sm-tutorial`, copy it here).
|
|
139
|
+
|
|
140
|
+
**Global substitution rule**: wherever this file (or any module
|
|
141
|
+
file) says `.claude/<…>`, swap it for the detected
|
|
142
|
+
`<provider_dir>`. Skip any fixture file or step whose kind is
|
|
143
|
+
not in the provider's supported set (`gemini`: skip the
|
|
144
|
+
`master-command`-style stub if a module references one;
|
|
145
|
+
`agent-skills`: only the skill + the markdown note are valid).
|
|
146
|
+
|
|
147
|
+
**Reality check (don't mention)**: this skill ships at
|
|
148
|
+
`.claude/skills/sm-master/`, so in practice Claude Code is the
|
|
149
|
+
only host today. The detection wiring is here so mirrored skills
|
|
150
|
+
in `.gemini/skills/` / `.agents/skills/` reuse it as-is.
|
|
151
|
+
|
|
121
152
|
## Pre-flight
|
|
122
153
|
|
|
123
154
|
### 1. Verify the working directory (empty dir)
|
|
@@ -224,23 +255,26 @@ without further commentary:
|
|
|
224
255
|
|
|
225
256
|
> Quick heads-up before we start: I'm about to set up the
|
|
226
257
|
> scenario for this tutorial in your directory, that means
|
|
227
|
-
> creating a handful of files.
|
|
258
|
+
> creating a handful of files. Please wait a moment while I finish.
|
|
228
259
|
|
|
229
260
|
The fixture is **smaller than `sm-tutorial`'s** because the lessons
|
|
230
261
|
focus on plugins, settings, and slots, not on graph topology. Three
|
|
231
262
|
nodes are enough. Read `references/fixture-templates.md` for the
|
|
232
|
-
verbatim layout and file contents, then write each
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
263
|
+
verbatim layout and file contents, then write each file to the cwd
|
|
264
|
+
under the detected `<provider_dir>` (per §Provider detection).
|
|
265
|
+
**Skip files whose kind is not in the provider's supported set**:
|
|
266
|
+
on `gemini` keep agent + skill + note; on `agent-skills` keep only
|
|
267
|
+
skill + note (no agent kind there). Translate the natural-language
|
|
268
|
+
prose to the tester's language; keep paths, frontmatter keys,
|
|
269
|
+
identifiers, and link targets in English.
|
|
237
270
|
|
|
238
271
|
### 4. Generate `master-state.yml`
|
|
239
272
|
|
|
240
273
|
Read the `## State YAML` block at the bottom of
|
|
241
274
|
`references/fixture-templates.md` and write it to
|
|
242
|
-
`<cwd>/master-state.yml`. Substitute the
|
|
243
|
-
`<ISO-8601 now>`, `<output of pwd>`,
|
|
275
|
+
`<cwd>/master-state.yml`. Substitute the four placeholders:
|
|
276
|
+
`<ISO-8601 now>`, `<output of pwd>`, `<output of sm version>`,
|
|
277
|
+
and the resolved `provider` (`claude` / `gemini` / `agent-skills`).
|
|
244
278
|
|
|
245
279
|
## Menu
|
|
246
280
|
|
|
@@ -409,8 +443,11 @@ anything**:
|
|
|
409
443
|
> and re-invoke me from there, or delete `master-state.yml` by
|
|
410
444
|
> hand if you really want to start fresh here.
|
|
411
445
|
|
|
412
|
-
2. If the cwd matches,
|
|
413
|
-
|
|
446
|
+
2. If the cwd matches, read `master.provider` from the yaml and
|
|
447
|
+
use it to compute `<provider_dir>` plus the subset of files
|
|
448
|
+
actually created (gemini and agent-skills drop some). Show the
|
|
449
|
+
resolved list to the tester and ask for the literal
|
|
450
|
+
`yes, wipe` confirmation:
|
|
414
451
|
|
|
415
452
|
> Start over will delete these paths from `<cwd>`:
|
|
416
453
|
>
|
|
@@ -419,21 +456,25 @@ anything**:
|
|
|
419
456
|
> findings.md
|
|
420
457
|
> .skillmapignore
|
|
421
458
|
> .skill-map/
|
|
422
|
-
>
|
|
423
|
-
>
|
|
424
|
-
> .
|
|
459
|
+
> <provider_dir>/agents/master-agent.md (claude, gemini)
|
|
460
|
+
> <provider_dir>/skills/master-skill/ (all three)
|
|
461
|
+
> .skill-map/plugins/ (if any module created some)
|
|
425
462
|
> notes/ideas.md
|
|
426
|
-
> sm-master-report.md
|
|
463
|
+
> sm-master-report.md (if present)
|
|
427
464
|
> ```
|
|
428
465
|
>
|
|
429
466
|
> Type **`yes, wipe`** (exact text) to confirm. Anything else
|
|
430
467
|
> cancels.
|
|
431
468
|
|
|
469
|
+
Render the ACTUAL list (substitute `<provider_dir>` and drop
|
|
470
|
+
rows the saved provider did not create) so the tester sees real
|
|
471
|
+
paths.
|
|
472
|
+
|
|
432
473
|
3. Only on the literal `yes, wipe` reply, delete those exact
|
|
433
|
-
paths. Do NOT recursively `rm -rf`
|
|
434
|
-
directories, only the specific tutorial-owned files
|
|
435
|
-
After deletion, `rmdir` empty parents silently. Then
|
|
436
|
-
from pre-flight.
|
|
474
|
+
paths. Do NOT recursively `rm -rf` `<provider_dir>/` or
|
|
475
|
+
`notes/` as directories, only the specific tutorial-owned files
|
|
476
|
+
inside. After deletion, `rmdir` empty parents silently. Then
|
|
477
|
+
start from pre-flight.
|
|
437
478
|
|
|
438
479
|
## Edge cases
|
|
439
480
|
|
|
@@ -41,7 +41,11 @@ optional second phase (~20-30 min) covering the rest of the CLI.
|
|
|
41
41
|
NOT rioplatense. Short sentences. No unnecessary jargon. Use
|
|
42
42
|
`tú` form, not `vos` — `puedes`, `mira`, `prueba`, `crea`, NOT
|
|
43
43
|
`podés`, `mirá`, `probá`, `creá`. Avoid Argentine fillers
|
|
44
|
-
(`dale`, `bueno`, `che`, `re-`, `genial`).
|
|
44
|
+
(`dale`, `bueno`, `che`, `re-`, `genial`). Also avoid overly
|
|
45
|
+
colloquial imperatives even when they're grammatical: prefer
|
|
46
|
+
`espera` / `aguarda` over `aguanta`, `revisa` over `chequea`,
|
|
47
|
+
`observa` / `fíjate en` over `fijate`. Casual is OK; slangy is
|
|
48
|
+
not.
|
|
45
49
|
- Address the tester by name if they introduced themselves; if not,
|
|
46
50
|
the implicit second person from the verb is enough. No need to
|
|
47
51
|
invent a stand-in pronoun.
|
|
@@ -67,9 +71,9 @@ optional second phase (~20-30 min) covering the rest of the CLI.
|
|
|
67
71
|
- File paths, frontmatter keys (`name`, `description`, `event`,
|
|
68
72
|
etc.), CLI verbs (`sm init`, `sm watch`), and code identifiers
|
|
69
73
|
stay English — that's the public surface, not jargon.
|
|
70
|
-
Anti-pattern (do NOT emit): "aparecen los otros
|
|
74
|
+
Anti-pattern (do NOT emit): "aparecen los otros tres kinds",
|
|
71
75
|
"el watcher detectó el cambio", "vamos a hacer un scan ahora".
|
|
72
|
-
Correct: "aparecen los otros
|
|
76
|
+
Correct: "aparecen los otros tres tipos", "skill-map detectó
|
|
73
77
|
el cambio", "vamos a escanear ahora".
|
|
74
78
|
### Silence during backstage work
|
|
75
79
|
|
|
@@ -186,6 +190,57 @@ optional second phase (~20-30 min) covering the rest of the CLI.
|
|
|
186
190
|
11. **Never skip the level question when entering the deep-dive.**
|
|
187
191
|
The level drives modulation of every Step 8+ instruction.
|
|
188
192
|
|
|
193
|
+
## Provider detection
|
|
194
|
+
|
|
195
|
+
Skill-map ships with three built-in providers, each one walks its
|
|
196
|
+
own on-disk convention:
|
|
197
|
+
|
|
198
|
+
| Provider | Base dir | Kinds it claims | Detect via env var(s) |
|
|
199
|
+
|----------------|-----------------------|--------------------------------|------------------------------------------------|
|
|
200
|
+
| `claude` | `.claude/` | `agent`, `command`, `skill` | `CLAUDECODE=1` OR `AI_AGENT` starts with `claude-code` |
|
|
201
|
+
| `gemini` | `.gemini/` | `agent`, `skill` | `GEMINI_CLI=1` OR `AI_AGENT` starts with `gemini` (any equivalent vendor var) |
|
|
202
|
+
| `agent-skills` | `.agents/skills/` | `skill` only (vendor-neutral) | no formal env yet; treat as opt-in if the tester says so |
|
|
203
|
+
|
|
204
|
+
**Decision logic, applied silently during pre-flight**:
|
|
205
|
+
|
|
206
|
+
1. Inspect the agent's environment (`process.env` in your runtime).
|
|
207
|
+
2. If a Claude-flavoured var is present → `provider = claude`,
|
|
208
|
+
`<provider_dir> = .claude`, supported kinds = `{agent, command,
|
|
209
|
+
skill}`.
|
|
210
|
+
3. Else if a Gemini-flavoured var is present → `provider = gemini`,
|
|
211
|
+
`<provider_dir> = .gemini`, supported kinds = `{agent, skill}`.
|
|
212
|
+
4. Else → **fallback to claude** AND surface one short blockquote
|
|
213
|
+
to the tester so they can correct course:
|
|
214
|
+
|
|
215
|
+
> Heads up: I couldn't detect which agent runtime is hosting
|
|
216
|
+
> me, so I'll demo skill-map's Claude provider (`.claude/`).
|
|
217
|
+
> If you actually use Gemini or agent-skills, tell me and I
|
|
218
|
+
> swap the fixture to `.gemini/` or `.agents/skills/`.
|
|
219
|
+
|
|
220
|
+
**Reality check (do not mention to the tester unless asked)**:
|
|
221
|
+
this SKILL.md lives at `.claude/skills/sm-tutorial/SKILL.md`, so
|
|
222
|
+
in practice only Claude Code loads it today. The detection logic
|
|
223
|
+
is wired so that the day mirrored skills land at
|
|
224
|
+
`.gemini/skills/sm-tutorial/` and `.agents/skills/sm-tutorial/`,
|
|
225
|
+
they reuse this same body and the fixture follows automatically.
|
|
226
|
+
|
|
227
|
+
### Global substitution rule
|
|
228
|
+
|
|
229
|
+
The rest of this file says `.claude/<…>` as the canonical example
|
|
230
|
+
because that is the 100% case today. **Wherever you see
|
|
231
|
+
`.claude/`, swap it for the detected `<provider_dir>` when writing
|
|
232
|
+
the fixture, when showing the tester commands, when computing the
|
|
233
|
+
expected node count, and when listing files for the start-over
|
|
234
|
+
wipe.** Also: **skip any sub-step whose kind is not in the
|
|
235
|
+
provider's supported set** (e.g. on `gemini`, skip the
|
|
236
|
+
`demo-command` file in Step 3 and the `demo-command → demo-skill`
|
|
237
|
+
connector in Step 5; on `agent-skills`, skip both `demo-agent`
|
|
238
|
+
and `demo-command` and demo only the skill + the markdown note).
|
|
239
|
+
|
|
240
|
+
Persist `provider` into `tutorial-state.yml` (top-level
|
|
241
|
+
`provider: <id>` field) so a resumed session does not have to
|
|
242
|
+
re-detect.
|
|
243
|
+
|
|
189
244
|
## Pre-flight
|
|
190
245
|
|
|
191
246
|
### 1. Verify the working directory (empty dir)
|
|
@@ -318,7 +373,7 @@ later when they're relevant. Keep it to a single short sentence:
|
|
|
318
373
|
|
|
319
374
|
> Quick heads-up before we start: I'm about to set up the
|
|
320
375
|
> tutorial scenario in this directory — that means creating a
|
|
321
|
-
> handful of files.
|
|
376
|
+
> handful of files. Please wait a moment while I finish.
|
|
322
377
|
|
|
323
378
|
Then proceed straight to the writes below — no pause, no "ready?"
|
|
324
379
|
prompt.
|
|
@@ -326,9 +381,9 @@ prompt.
|
|
|
326
381
|
The tutorial builds the graph **progressively** across Steps 2-6
|
|
327
382
|
(the live UI block). Right now, in pre-flight, you only create
|
|
328
383
|
**one file** — a single agent — so the tester's first look at the
|
|
329
|
-
UI shows exactly one node. The other
|
|
330
|
-
|
|
331
|
-
|
|
384
|
+
UI shows exactly one node. The other three nodes (skill, command,
|
|
385
|
+
note) and the connectors between all four are added later, one
|
|
386
|
+
step at a time.
|
|
332
387
|
|
|
333
388
|
```
|
|
334
389
|
<cwd>/
|
|
@@ -384,6 +439,7 @@ tutorial:
|
|
|
384
439
|
started_at: "<ISO-8601 now>"
|
|
385
440
|
cwd: "<output of pwd>"
|
|
386
441
|
sm_version: "<output of sm version>"
|
|
442
|
+
provider: "<claude | gemini | agent-skills>" # filled from §Provider detection
|
|
387
443
|
tester:
|
|
388
444
|
level: 2 # default; only asked if they advance into the deep-dive
|
|
389
445
|
route:
|
|
@@ -403,7 +459,7 @@ short_steps:
|
|
|
403
459
|
title: "⭐ Live UI: the lone agent"
|
|
404
460
|
status: "pending"
|
|
405
461
|
- id: "3-live-kinds"
|
|
406
|
-
title: "⭐ Live UI: the other
|
|
462
|
+
title: "⭐ Live UI: the other three kinds appear"
|
|
407
463
|
status: "pending"
|
|
408
464
|
- id: "4-live-edit"
|
|
409
465
|
title: "⭐ Live UI: your first edit"
|
|
@@ -567,14 +623,20 @@ Wait for confirmation that the page loaded. Then tell the tester:
|
|
|
567
623
|
|
|
568
624
|
Wait for confirmation. Mark `2-live-boot: done`.
|
|
569
625
|
|
|
570
|
-
### Step 3 — Live UI: the other
|
|
626
|
+
### Step 3 — Live UI: the other three kinds appear (~1 min)
|
|
571
627
|
|
|
572
628
|
Leave the browser open and the terminal with `sm` running. You
|
|
573
|
-
create
|
|
574
|
-
yet — pure standalone nodes — so the tester sees
|
|
629
|
+
create three more nodes **without any cross-fixture links**
|
|
630
|
+
yet — pure standalone nodes — so the tester sees three new dots pop
|
|
575
631
|
in.
|
|
576
632
|
|
|
577
|
-
Create these
|
|
633
|
+
Create these three files (with `Write`), exactly in this order.
|
|
634
|
+
Per §Provider detection, **substitute `.claude/` with the
|
|
635
|
+
detected `<provider_dir>` and skip files whose kind is not in the
|
|
636
|
+
provider's supported set** (`gemini`: skip `demo-command`;
|
|
637
|
+
`agent-skills`: skip both `demo-agent` and `demo-command`, only
|
|
638
|
+
the skill + the markdown note remain). Adjust the node count and
|
|
639
|
+
the "three new nodes" message in the blockquote below accordingly:
|
|
578
640
|
|
|
579
641
|
1. `.claude/skills/demo-skill/SKILL.md` (kind: skill):
|
|
580
642
|
```markdown
|
|
@@ -626,39 +688,15 @@ Create these four files (with `Write`), exactly in this order:
|
|
|
626
688
|
target file. Connectors land in the next sub-step.
|
|
627
689
|
```
|
|
628
690
|
|
|
629
|
-
3.
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
(the catch-all kind for `.md` files outside the
|
|
633
|
-
skill / agent / command folders); a dedicated `hook` kind
|
|
634
|
-
is on the roadmap:
|
|
635
|
-
```markdown
|
|
636
|
-
---
|
|
637
|
-
name: demo-hook
|
|
638
|
-
description: |
|
|
639
|
-
Example hook that fires when a subagent stops. Showcases the
|
|
640
|
-
`hook` kind in the demo graph.
|
|
641
|
-
event: SubagentStop
|
|
642
|
-
blocking: false
|
|
643
|
-
idempotent: true
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
# demo-hook
|
|
647
|
-
|
|
648
|
-
Fires when a subagent terminates. Records the closure. Will get
|
|
649
|
-
wired into the rest of the fixture next.
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
4. `notes/todo.md` — also classified as `kind: markdown` today
|
|
653
|
-
(same catch-all as the hook above; a dedicated `note` kind
|
|
654
|
-
is on the roadmap):
|
|
691
|
+
3. `notes/todo.md` — classified as `kind: markdown` today
|
|
692
|
+
(the catch-all for `.md` files outside the
|
|
693
|
+
skill / agent / command folders):
|
|
655
694
|
```markdown
|
|
656
695
|
---
|
|
657
696
|
name: Demo TODO list
|
|
658
697
|
description: |
|
|
659
698
|
Live list of things to review in the demo. Will become the
|
|
660
|
-
hub between skill / agent / command
|
|
661
|
-
sub-step.
|
|
699
|
+
hub between skill / agent / command in the next sub-step.
|
|
662
700
|
tags: [notes, demo]
|
|
663
701
|
---
|
|
664
702
|
|
|
@@ -667,13 +705,13 @@ Create these four files (with `Write`), exactly in this order:
|
|
|
667
705
|
|
|
668
706
|
Tell the tester:
|
|
669
707
|
|
|
670
|
-
> Look at the browser.
|
|
671
|
-
> `demo-skill`, `demo-command`, `
|
|
672
|
-
>
|
|
673
|
-
>
|
|
674
|
-
>
|
|
708
|
+
> Look at the browser. Three new nodes should have popped in:
|
|
709
|
+
> `demo-skill`, `demo-command`, and `notes/todo`. Four total now,
|
|
710
|
+
> **still unconnected** — they're floating dots. The viewport
|
|
711
|
+
> auto-fits whenever a node is added or removed, so all four
|
|
712
|
+
> should be visible without panning.
|
|
675
713
|
>
|
|
676
|
-
> Did the
|
|
714
|
+
> Did the three appear? Confirm so we can wire them up.
|
|
677
715
|
|
|
678
716
|
Wait for confirmation. Mark `3-live-kinds: done`.
|
|
679
717
|
|
|
@@ -702,10 +740,10 @@ Tell the tester:
|
|
|
702
740
|
>
|
|
703
741
|
> Watch the browser. The `demo-agent` card should refresh its
|
|
704
742
|
> description in real time, no reload, no Ctrl+C — same watcher
|
|
705
|
-
> that picked up the
|
|
743
|
+
> that picked up the three new nodes a moment ago, this time
|
|
706
744
|
> reacting to YOUR edit.
|
|
707
745
|
>
|
|
708
|
-
> Confirm so we wire the
|
|
746
|
+
> Confirm so we wire the four up.
|
|
709
747
|
|
|
710
748
|
Wait for confirmation. You MAY use `Read` on the file afterwards
|
|
711
749
|
to verify the change landed (read-only, allowed under Inviolable
|
|
@@ -715,52 +753,42 @@ rule #1) before moving on. Mark `4-live-edit: done`.
|
|
|
715
753
|
|
|
716
754
|
Now you edit the existing files to add the cross-fixture links —
|
|
717
755
|
each one becomes a connector in the graph. Apply with `Edit` (do
|
|
718
|
-
not rewrite the files)
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
2. **Edit `.claude/skills/demo-skill/SKILL.md`** — append at the
|
|
756
|
+
not rewrite the files). Per §Provider detection, **swap `.claude/`
|
|
757
|
+
for the detected `<provider_dir>` and skip any sub-step whose
|
|
758
|
+
target node was not created in Step 3** (no `demo-command` on
|
|
759
|
+
gemini → skip sub-step #2 and the `demo-command → demo-skill`
|
|
760
|
+
connector; on agent-skills there is no agent and no command →
|
|
761
|
+
keep only `notes/todo → demo-skill`):
|
|
762
|
+
|
|
763
|
+
1. **Edit `.claude/skills/demo-skill/SKILL.md`** — append at the
|
|
727
764
|
very end:
|
|
728
765
|
```markdown
|
|
729
766
|
When it needs to delegate heavier work it leans on the
|
|
730
767
|
[demo-agent](../../agents/demo-agent.md).
|
|
731
768
|
```
|
|
732
|
-
|
|
769
|
+
2. **Edit `.claude/commands/demo-command.md`** — append at the
|
|
733
770
|
very end:
|
|
734
771
|
```markdown
|
|
735
772
|
Triggers the [demo-skill](../skills/demo-skill/SKILL.md) on the
|
|
736
773
|
given target.
|
|
737
774
|
```
|
|
738
|
-
|
|
739
|
-
```markdown
|
|
740
|
-
See [pending items](../../notes/todo.md) for operational
|
|
741
|
-
context.
|
|
742
|
-
```
|
|
743
|
-
5. **Edit `notes/todo.md`** — append these two bullets after the
|
|
775
|
+
3. **Edit `notes/todo.md`** — append this bullet after the
|
|
744
776
|
`# Pending` heading:
|
|
745
777
|
```markdown
|
|
746
778
|
- [ ] Polish the
|
|
747
779
|
[demo-skill](../.claude/skills/demo-skill/SKILL.md)
|
|
748
780
|
prompt.
|
|
749
|
-
- [ ] Confirm the `event` of the
|
|
750
|
-
[demo-hook](../.claude/hooks/demo-hook.md).
|
|
751
781
|
```
|
|
752
782
|
|
|
753
783
|
Tell the tester:
|
|
754
784
|
|
|
755
|
-
> Look at the magic again. The
|
|
785
|
+
> Look at the magic again. The four floating nodes should now be
|
|
756
786
|
> wired together — connectors light
|
|
757
787
|
> up between them as the watcher picks up each edit:
|
|
758
788
|
>
|
|
759
789
|
> - `demo-skill → demo-agent`
|
|
760
|
-
> - `demo-agent → demo-hook`
|
|
761
790
|
> - `demo-command → demo-skill`
|
|
762
|
-
> - `
|
|
763
|
-
> - `notes/todo → demo-skill`, `notes/todo → demo-hook`
|
|
791
|
+
> - `notes/todo → demo-skill`
|
|
764
792
|
>
|
|
765
793
|
> Confirm. If a connector is missing, refresh the browser and tell
|
|
766
794
|
> me.
|
|
@@ -817,7 +845,6 @@ the tester sees what their cwd holds:
|
|
|
817
845
|
> ├── .claude/
|
|
818
846
|
> │ ├── agents/demo-agent.md
|
|
819
847
|
> │ ├── commands/demo-command.md
|
|
820
|
-
> │ ├── hooks/demo-hook.md
|
|
821
848
|
> │ └── skills/demo-skill/SKILL.md
|
|
822
849
|
> ├── .skill-map/ ← project DB + settings (managed)
|
|
823
850
|
> ├── .skillmapignore ← the file we're about to edit
|
|
@@ -856,8 +883,8 @@ your `Edit` tool. Tell the tester to do it from their editor:
|
|
|
856
883
|
>
|
|
857
884
|
> Watch the browser when you save. The
|
|
858
885
|
> `notes/private-credentials` node should disappear from the
|
|
859
|
-
> graph in real time, without restarting anything.
|
|
860
|
-
> back to
|
|
886
|
+
> graph in real time, without restarting anything. Five nodes
|
|
887
|
+
> back to four.
|
|
861
888
|
>
|
|
862
889
|
> Did the node vanish?
|
|
863
890
|
|
|
@@ -875,12 +902,24 @@ Mark `6-live-ignore: done`.
|
|
|
875
902
|
> UI sees it instantly. In **~10 minutes** you've already seen the
|
|
876
903
|
> full flow.
|
|
877
904
|
>
|
|
878
|
-
> ⚠️ **`.sm` files (heads-up for later)** —
|
|
879
|
-
>
|
|
880
|
-
>
|
|
881
|
-
>
|
|
882
|
-
>
|
|
883
|
-
>
|
|
905
|
+
> ⚠️ **`.sm` files (heads-up for later)** — every `.md` skill-map
|
|
906
|
+
> tracks has a sibling `.sm` file (e.g. `demo-agent.sm` next to
|
|
907
|
+
> `demo-agent.md`) that carries **all of the tool's metadata
|
|
908
|
+
> about that markdown, so your `.md` stays clean and uncluttered**.
|
|
909
|
+
> Version, history, tags, annotations, anything that does not
|
|
910
|
+
> belong in the human-authored body lives in the `.sm`. You write
|
|
911
|
+
> the `.md` for Claude or for humans, the tool writes the `.sm`.
|
|
912
|
+
> Each `sm bump` and each `sm sidecar annotate` creates or
|
|
913
|
+
> refreshes one, so you'll see them often as you use skill-map
|
|
914
|
+
> day to day. Commit them to git like any other source file.
|
|
915
|
+
>
|
|
916
|
+
> 🔀 **Multi-provider** — this demo ran with the
|
|
917
|
+
> `<provider>` provider (base dir `<provider_dir>`). Skill-map
|
|
918
|
+
> walks two other built-in conventions with identical mechanics:
|
|
919
|
+
> Gemini lives under `.gemini/` (kinds: agent + skill), and the
|
|
920
|
+
> open agent-skills standard lives under `.agents/skills/` (kind:
|
|
921
|
+
> skill). Drop a `.md` in any of those and the same watcher
|
|
922
|
+
> picks it up, the same connectors light up, the same rules run.
|
|
884
923
|
>
|
|
885
924
|
> If you want, **we can keep going deeper**: I'll walk you through
|
|
886
925
|
> the CLI verbs and flags (`list`, `graph`, `export`, `orphans`,
|
|
@@ -962,10 +1001,10 @@ sm show .claude/skills/demo-skill/SKILL.md
|
|
|
962
1001
|
sm check
|
|
963
1002
|
```
|
|
964
1003
|
|
|
965
|
-
Expected: you see the
|
|
1004
|
+
Expected: you see the 4 fixture nodes listed with their kind:
|
|
966
1005
|
`demo-skill` (skill), `demo-agent` (agent), `demo-command`
|
|
967
|
-
(command), and `
|
|
968
|
-
|
|
1006
|
+
(command), and `notes/todo` (`markdown`, the catch-all per
|
|
1007
|
+
Step 3). `check` reads the persisted
|
|
969
1008
|
`scan_issues` table — it does NOT re-walk the filesystem. The
|
|
970
1009
|
fixture is clean (Steps 2-6 captured the latest state before
|
|
971
1010
|
Ctrl+C), so the verb prints `✓ No issues`. We will plant one in
|
|
@@ -1071,10 +1110,19 @@ the tester no plugins are installed yet and offer to skip.
|
|
|
1071
1110
|
|
|
1072
1111
|
### Step 13 — Annotations and the `.sm` consent prompt (~3 min)
|
|
1073
1112
|
|
|
1074
|
-
**Context**: skill-map
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1113
|
+
**Context**: every `.md` skill-map tracks gets a sibling
|
|
1114
|
+
**companion file** with extension `.sm` that carries **all of
|
|
1115
|
+
the tool's metadata about that markdown, so your `.md` stays
|
|
1116
|
+
clean and uncluttered**. Version, history, tags, annotations,
|
|
1117
|
+
anything that does not belong in the human-authored body lives
|
|
1118
|
+
in the `.sm`. The `.md` is content you write for Claude or
|
|
1119
|
+
humans; the `.sm` is bookkeeping the tool writes. They are
|
|
1120
|
+
ordinary source files, committed to git like everything else,
|
|
1121
|
+
and you'll encounter them often once you start working with
|
|
1122
|
+
the project.
|
|
1123
|
+
|
|
1124
|
+
The first time skill-map wants to write one in a new project it
|
|
1125
|
+
asks for your consent — it never touches your filesystem without
|
|
1078
1126
|
permission. After you say yes, the choice persists per-checkout
|
|
1079
1127
|
(gitignored) and the prompt never appears again.
|
|
1080
1128
|
|
|
@@ -1274,8 +1322,11 @@ anything**:
|
|
|
1274
1322
|
> re-invoke me from there, or delete `tutorial-state.yml` by
|
|
1275
1323
|
> hand if you really want to start fresh here.
|
|
1276
1324
|
|
|
1277
|
-
2. If the cwd matches,
|
|
1278
|
-
|
|
1325
|
+
2. If the cwd matches, read `tutorial.provider` from the yaml and
|
|
1326
|
+
use it to compute `<provider_dir>` (and the subset of files
|
|
1327
|
+
actually present, since gemini and agent-skills skip some). Then
|
|
1328
|
+
show the tester the exact list of paths you'll delete and ask
|
|
1329
|
+
for an explicit typed confirmation:
|
|
1279
1330
|
|
|
1280
1331
|
> Start over will delete these paths from `<cwd>`:
|
|
1281
1332
|
>
|
|
@@ -1284,10 +1335,9 @@ anything**:
|
|
|
1284
1335
|
> findings.md
|
|
1285
1336
|
> .skillmapignore
|
|
1286
1337
|
> .skill-map/
|
|
1287
|
-
>
|
|
1288
|
-
>
|
|
1289
|
-
>
|
|
1290
|
-
> .claude/skills/demo-skill/
|
|
1338
|
+
> <provider_dir>/agents/demo-agent.md (claude, gemini)
|
|
1339
|
+
> <provider_dir>/commands/demo-command.md (claude only)
|
|
1340
|
+
> <provider_dir>/skills/demo-skill/ (all three)
|
|
1291
1341
|
> notes/todo.md
|
|
1292
1342
|
> notes/private-credentials.md
|
|
1293
1343
|
> sm-tutorial-report.md (if present)
|
|
@@ -1298,14 +1348,19 @@ anything**:
|
|
|
1298
1348
|
> Type **`yes, wipe`** (exact text) to confirm. Anything else
|
|
1299
1349
|
> cancels.
|
|
1300
1350
|
|
|
1351
|
+
Render the ACTUAL list (substituting `<provider_dir>` and
|
|
1352
|
+
dropping the rows the saved provider didn't create) so the
|
|
1353
|
+
tester sees the real paths, not the abstract placeholders.
|
|
1354
|
+
|
|
1301
1355
|
3. Only on the literal `yes, wipe` reply, delete those exact paths.
|
|
1302
|
-
Do NOT recursively `rm -rf`
|
|
1356
|
+
Do NOT recursively `rm -rf` `<provider_dir>/` or `notes/` as
|
|
1303
1357
|
directories — only the specific tutorial-owned files inside, in
|
|
1304
1358
|
case the tester has unrelated files there. After deletion, also
|
|
1305
|
-
`rmdir`
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1359
|
+
`rmdir` the per-provider subdirs that actually exist
|
|
1360
|
+
(`<provider_dir>/agents`, `<provider_dir>/commands`,
|
|
1361
|
+
`<provider_dir>/skills`), then `notes/` and `<provider_dir>/`,
|
|
1362
|
+
each one only if empty (silent failure if not). Then start
|
|
1363
|
+
everything from pre-flight.
|
|
1309
1364
|
|
|
1310
1365
|
## Edge cases
|
|
1311
1366
|
|