@skill-map/cli 0.67.0 → 0.68.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 (102) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +16 -8
  2. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/agents-hub/providers/agent-skills/en/agents-hub.md +2 -0
  3. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/agents-hub/providers/agent-skills/es/agents-hub.md +2 -0
  4. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/content-editor-style/providers/agent-skills/en/content-editor-style.md +1 -0
  5. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/content-editor-style/providers/agent-skills/es/content-editor-style.md +1 -0
  6. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-guideline.md +1 -0
  7. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-guideline2.md +1 -0
  8. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-skill.md +1 -0
  9. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-guideline.md +1 -0
  10. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-guideline2.md +1 -0
  11. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-skill.md +1 -0
  12. package/dist/cli/tutorial/sm-tutorial/fixtures-data/manifest.json +9 -1
  13. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/agent-skills/en/__PROVIDER__/skills/publish/SKILL.md +15 -0
  14. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/agent-skills/es/__PROVIDER__/skills/publish/SKILL.md +16 -0
  15. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/codex/en/__PROVIDER__/skills/publish/SKILL.md +15 -0
  16. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/codex/es/__PROVIDER__/skills/publish/SKILL.md +16 -0
  17. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/agent-skills/en/__PROVIDER__/skills/master-agent/SKILL.md +13 -0
  18. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/agent-skills/es/__PROVIDER__/skills/master-agent/SKILL.md +14 -0
  19. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/codex/en/.codex/agents/master-agent.toml +10 -0
  20. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/codex/es/.codex/agents/master-agent.toml +10 -0
  21. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/en/AGENTS.md +7 -0
  22. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/en/__PROVIDER__/skills/content-editor/SKILL.md +20 -0
  23. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/es/AGENTS.md +7 -0
  24. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/es/__PROVIDER__/skills/content-editor/SKILL.md +20 -0
  25. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/shared/CLAUDE.md +1 -0
  26. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/codex/en/.codex/agents/content-editor.toml +19 -0
  27. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/codex/es/.codex/agents/content-editor.toml +19 -0
  28. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/en/.codex/agents/demo-agent.toml +13 -0
  29. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/en/__PROVIDER__/skills/demo-command/SKILL.md +11 -0
  30. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/es/.codex/agents/demo-agent.toml +13 -0
  31. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/es/__PROVIDER__/skills/demo-command/SKILL.md +12 -0
  32. package/dist/cli/tutorial/sm-tutorial/references/_core.md +101 -48
  33. package/dist/cli/tutorial/sm-tutorial/references/_manifest.json +174 -0
  34. package/dist/cli/tutorial/sm-tutorial/references/_manifest.yml +90 -0
  35. package/dist/cli/tutorial/sm-tutorial/references/part-basic-connect.md +166 -0
  36. package/dist/cli/tutorial/sm-tutorial/references/part-basic-daily.md +267 -0
  37. package/dist/cli/tutorial/sm-tutorial/references/part-basic-fundamentals.md +350 -0
  38. package/dist/cli/tutorial/sm-tutorial/references/part-basic-kickoff.md +140 -0
  39. package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +6 -4
  40. package/dist/cli/tutorial/sm-tutorial/references/part-daily-loop.md +21 -26
  41. package/dist/cli/tutorial/sm-tutorial/references/part-fundamentals.md +10 -5
  42. package/dist/cli/tutorial/sm-tutorial/references/part-mcp.md +3 -6
  43. package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +29 -14
  44. package/dist/cli/tutorial/sm-tutorial/references/part-settings.md +17 -13
  45. package/dist/cli/tutorial/sm-tutorial/scripts/fixtures.js +85 -22
  46. package/dist/cli/tutorial/sm-tutorial/scripts/lib/paths.js +74 -4
  47. package/dist/cli/tutorial/sm-tutorial/scripts/state.js +22 -6
  48. package/dist/cli.js +400 -160
  49. package/dist/conformance/index.js +42 -2
  50. package/dist/index.js +43 -30
  51. package/dist/kernel/index.d.ts +28 -5
  52. package/dist/kernel/index.js +43 -30
  53. package/dist/ui/chunk-3ANNEMV4.js +499 -0
  54. package/dist/ui/chunk-3GDWM5VM.js +2 -0
  55. package/dist/ui/{chunk-5BJGO7GH.js → chunk-3U4QZKU2.js} +4 -4
  56. package/dist/ui/chunk-3ZAHOYQ7.js +1 -0
  57. package/dist/ui/chunk-4F53HBGG.js +1845 -0
  58. package/dist/ui/{chunk-56CBK7LB.js → chunk-6FGV5O5J.js} +1 -1
  59. package/dist/ui/chunk-7WMT2LX4.js +1 -0
  60. package/dist/ui/chunk-BJUBDHJR.js +3 -0
  61. package/dist/ui/{chunk-276RLZR4.js → chunk-BSIR3ADF.js} +14 -14
  62. package/dist/ui/{chunk-FC22ZJQZ.js → chunk-CG25RHMO.js} +1 -1
  63. package/dist/ui/chunk-EFSC6SOL.js +3 -0
  64. package/dist/ui/chunk-EJVWTBMV.js +4 -0
  65. package/dist/ui/chunk-EZI3BXQN.js +1 -0
  66. package/dist/ui/{chunk-JZ2YF7EL.js → chunk-GUPPOK7U.js} +8 -8
  67. package/dist/ui/{chunk-CJURGJTN.js → chunk-HLALESGR.js} +1 -1
  68. package/dist/ui/chunk-I3I4KHR5.js +2 -0
  69. package/dist/ui/{chunk-BOVJVOLH.js → chunk-I6ED2OW7.js} +1 -1
  70. package/dist/ui/chunk-JKPG5PO7.js +375 -0
  71. package/dist/ui/chunk-KHDWXSGR.js +1 -0
  72. package/dist/ui/{chunk-HEK4PH5A.js → chunk-KMHXNOFZ.js} +1 -1
  73. package/dist/ui/chunk-KWT7E2RJ.js +16 -0
  74. package/dist/ui/{chunk-WHZVGOS3.js → chunk-MQSU6EFZ.js} +1 -1
  75. package/dist/ui/{chunk-43S72FTV.js → chunk-OGEE252A.js} +1 -1
  76. package/dist/ui/{chunk-J4J42HJ4.js → chunk-PU5OP5RN.js} +1 -1
  77. package/dist/ui/{chunk-UTRZTB6V.js → chunk-QVG7J2MP.js} +1 -1
  78. package/dist/ui/chunk-TQBXK5JN.js +1 -0
  79. package/dist/ui/chunk-Z7SOKILO.js +2 -0
  80. package/dist/ui/{chunk-WCABR6TI.js → chunk-ZRJ5ZCFR.js} +1 -1
  81. package/dist/ui/index.html +2 -2
  82. package/dist/ui/main-ZYRIR6DB.js +4 -0
  83. package/dist/ui/styles-VEGETYWD.css +1 -0
  84. package/package.json +17 -18
  85. package/dist/ui/chunk-34ZZDYNQ.js +0 -1
  86. package/dist/ui/chunk-444BFYGR.js +0 -3
  87. package/dist/ui/chunk-44VNNUSQ.js +0 -2
  88. package/dist/ui/chunk-4SG4352Z.js +0 -7
  89. package/dist/ui/chunk-5ITZXW3A.js +0 -1
  90. package/dist/ui/chunk-7ANZW2OI.js +0 -499
  91. package/dist/ui/chunk-BJ6X6WBO.js +0 -4
  92. package/dist/ui/chunk-CZSLV6YD.js +0 -1
  93. package/dist/ui/chunk-DLYJHLJX.js +0 -2
  94. package/dist/ui/chunk-LGFABCIA.js +0 -16
  95. package/dist/ui/chunk-LPDD2DHE.js +0 -369
  96. package/dist/ui/chunk-P3SNMV4X.js +0 -2
  97. package/dist/ui/chunk-S4S5ZMXJ.js +0 -3
  98. package/dist/ui/chunk-VHEFRMK3.js +0 -1
  99. package/dist/ui/chunk-X6TRIDBI.js +0 -1845
  100. package/dist/ui/main-V77F2KZX.js +0 -4
  101. package/dist/ui/styles-I4ULXD3V.css +0 -1
  102. /package/dist/ui/{chunk-Y2Z26SRI.js → chunk-5RNLC6V4.js} +0 -0
@@ -7,14 +7,22 @@
7
7
  export const PROVIDER_TOKEN = '__PROVIDER__';
8
8
 
9
9
  export function providerDir(provider) {
10
- // agent-skills and Antigravity share the open `.agents/skills/` layout.
11
- return provider === 'agent-skills' || provider === 'antigravity'
10
+ // agent-skills, Antigravity and Codex all keep their SKILLS under the
11
+ // open `.agents/skills/` layout. (Codex additionally has TOML agents under
12
+ // `.codex/agents/`, supplied by the codex overlay's literal paths, not this
13
+ // single base dir.)
14
+ return provider === 'agent-skills' || provider === 'antigravity' || provider === 'codex'
12
15
  ? '.agents/skills'
13
16
  : '.claude';
14
17
  }
15
18
 
16
19
  export const PROVIDER_KINDS = {
17
20
  claude: new Set(['agent', 'command', 'skill', 'markdown']),
21
+ // Codex authors its agents as TOML under `.codex/agents/` (a different shape
22
+ // than the base `__PROVIDER__/agents/*.md`), so the base tier lays only its
23
+ // shared skill + markdown nodes; the codex overlay supplies the TOML agents
24
+ // and the command-as-skill nodes (Codex has no `command` kind).
25
+ codex: new Set(['skill', 'markdown']),
18
26
  'agent-skills': new Set(['skill', 'markdown']),
19
27
  antigravity: new Set(['skill', 'markdown']),
20
28
  };
@@ -23,6 +31,44 @@ export function kindsFor(provider) {
23
31
  return PROVIDER_KINDS[provider] ?? PROVIDER_KINDS.claude;
24
32
  }
25
33
 
34
+ /**
35
+ * Tutorial track for a provider, by the "does this lens have an `agent`
36
+ * kind?" axis (see `_core.md` §Provider detection):
37
+ * - `rich` (agent + skill + slash + `@`): `claude`, `codex`.
38
+ * - `basic` (skill + markdown, connected by markdown references): the
39
+ * open-standard family `agent-skills`, `antigravity`.
40
+ * The book renders the track's parts; the same lens always resolves to
41
+ * the same track, so a resumed session never re-derives it.
42
+ */
43
+ export function trackFor(provider) {
44
+ return provider === 'claude' || provider === 'codex' ? 'rich' : 'basic';
45
+ }
46
+
47
+ /**
48
+ * The provider whose fixture overlays a given provider reuses. The
49
+ * open-standard family (`agent-skills`, `antigravity`) shares one on-disk
50
+ * shape (`.agents/skills/`, skill + markdown, connected by markdown
51
+ * references), so `antigravity` reuses the canonical `agent-skills`
52
+ * overlays rather than duplicating them. Every other provider keys its own.
53
+ */
54
+ export function overlayKey(provider) {
55
+ return provider === 'antigravity' ? 'agent-skills' : provider;
56
+ }
57
+
58
+ /**
59
+ * Kinds whose edit fragments (the todo-connectors hub bullets, etc.) apply for
60
+ * a provider, keyed by TRACK, not by the base-tier kinds. A rich provider links
61
+ * to every node role even when it renders some differently, Codex's agent is a
62
+ * TOML overlay and its command-node is a skill, but an `@agent` mention and a
63
+ * `/command` invocation still resolve, so every bullet applies. A basic
64
+ * provider only has skill + markdown, so the agent / command bullets fold away.
65
+ */
66
+ export function fragmentKindsFor(provider) {
67
+ return trackFor(provider) === 'rich'
68
+ ? new Set(['agent', 'command', 'skill', 'markdown'])
69
+ : new Set(['skill', 'markdown']);
70
+ }
71
+
26
72
  /**
27
73
  * Per-provider kind directories. The token path is always written in
28
74
  * the claude shape (`__PROVIDER__/skills/<name>/...`); resolving it is
@@ -31,6 +77,7 @@ export function kindsFor(provider) {
31
77
  */
32
78
  const KIND_DIRS = {
33
79
  claude: { agents: '.claude/agents', commands: '.claude/commands', skills: '.claude/skills' },
80
+ codex: { skills: '.agents/skills' },
34
81
  'agent-skills': { skills: '.agents/skills' },
35
82
  antigravity: { skills: '.agents/skills' },
36
83
  };
@@ -64,5 +111,28 @@ export function kindForPath(tokenRelPath) {
64
111
  if (tokenRelPath.startsWith(`${PROVIDER_TOKEN}/skills/`)) return 'skill';
65
112
  return 'markdown';
66
113
  }
67
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="af99c74c-ee9a-5bf3-8daf-f0b9320a3e61")}catch(e){}}();
68
- //# debugId=af99c74c-ee9a-5bf3-8daf-f0b9320a3e61
114
+
115
+ /**
116
+ * Logical, lens-agnostic node id for a token-form path. The SAME
117
+ * conceptual node renders in a different kind per lens (a `content-editor`
118
+ * is an `agent` on claude but a `skill` on agent-skills), so a `--only`
119
+ * filter or an edit target written in the claude shape must still match
120
+ * the agent-skills overlay. Agents / commands use the file stem; skills
121
+ * use the skill directory name; everything else (markdown, notes, docs)
122
+ * keeps its relpath verbatim. So both `__PROVIDER__/agents/content-editor.md`
123
+ * and `__PROVIDER__/skills/content-editor/SKILL.md` resolve to `content-editor`.
124
+ */
125
+ export function nodeIdForTokenPath(tokenRelPath) {
126
+ const flat = tokenRelPath.match(/^__PROVIDER__\/(?:agents|commands)\/(.+)\.md$/);
127
+ if (flat) return flat[1];
128
+ const skill = tokenRelPath.match(/^__PROVIDER__\/skills\/([^/]+)\//);
129
+ if (skill) return skill[1];
130
+ // Codex renders an agent as a literal `.codex/agents/<name>.toml`; map it
131
+ // to the same id as the claude-shaped `__PROVIDER__/agents/<name>.md` so a
132
+ // `--only` filter (or the skipped-node dedup) matches across the two shapes.
133
+ const codexAgent = tokenRelPath.match(/^\.codex\/agents\/(.+)\.toml$/);
134
+ if (codexAgent) return codexAgent[1];
135
+ return tokenRelPath;
136
+ }
137
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9a867c5a-0c61-500e-a583-7d7dd6c5ac92")}catch(e){}}();
138
+ //# debugId=9a867c5a-0c61-500e-a583-7d7dd6c5ac92
@@ -31,7 +31,7 @@ import { rmSync, rmdirSync, readdirSync } from 'node:fs';
31
31
  import { parseArgs } from './lib/args.js';
32
32
  import { exists, readJson, writeJson, succeed, die } from './lib/io.js';
33
33
  import { loadManifest, findPart } from './lib/manifest.js';
34
- import { providerDir } from './lib/paths.js';
34
+ import { providerDir, trackFor } from './lib/paths.js';
35
35
  import { loadFixturesManifest, resolveFootprint } from './lib/fixtures-manifest.js';
36
36
 
37
37
  const STATE_FILE = 'tutorial-state.json';
@@ -68,13 +68,18 @@ const VERBS = {
68
68
  if (exists(p) && !args.flags.force) {
69
69
  die('exists', `${STATE_FILE} already exists; pass --force to overwrite.`);
70
70
  }
71
+ const provider = args.flags.provider ?? 'claude';
71
72
  const state = {
72
73
  tutorial: {
73
74
  version: STATE_VERSION,
74
75
  started_at: now(),
75
76
  cwd: args.flags.cwd ?? process.cwd(),
76
77
  sm_version: args.flags['sm-version'] ?? null,
77
- provider: args.flags.provider ?? 'claude',
78
+ provider,
79
+ // Derived from the provider (`_core.md` §Provider detection): the
80
+ // book renders this track's parts. `rich` = claude/codex,
81
+ // `basic` = the open-standard family (agent-skills/antigravity).
82
+ track: trackFor(provider),
78
83
  lang: args.flags.lang ?? 'en',
79
84
  },
80
85
  tester: { level: 2 },
@@ -148,8 +153,13 @@ const VERBS = {
148
153
  status() {
149
154
  const state = loadState();
150
155
  const manifest = loadManifest();
156
+ // Show only the active track's parts (plus `both`). The rich and basic
157
+ // campaigns share titles and order, so a session sees exactly one book,
158
+ // the track resolved at pre-flight (see `_core.md` §Routing + menu).
159
+ const track = state.tutorial?.track ?? 'rich';
151
160
  const parts = manifest.parts
152
161
  .filter((p) => p.status === 'active' || state.parts[p.id])
162
+ .filter((p) => !p.track || p.track === 'both' || p.track === track)
153
163
  .map((p) => {
154
164
  const tracked = state.parts[p.id];
155
165
  return {
@@ -221,8 +231,14 @@ function computeWipePaths(state) {
221
231
  const paths = new Set(['tutorial-state.json', 'findings.md', '.skillmapignore', '.skill-map']);
222
232
  const addFootprint = (name) => resolveFootprint(manifest, name, provider).forEach((p) => paths.add(p));
223
233
 
224
- if (has('fundamentals')) addFootprint('prologue');
225
- if (has('project-kickoff') || has('connect-harness') || has('daily-loop')) addFootprint('portfolio');
234
+ // Each footprint covers both tracks: the rich and basic prologues /
235
+ // campaigns lay the same fixtures (the basic one under the open-standard
236
+ // provider), so either part's presence means that fixture is on disk.
237
+ if (has('fundamentals') || has('basic-fundamentals')) addFootprint('prologue');
238
+ if (
239
+ has('project-kickoff') || has('connect-harness') || has('daily-loop')
240
+ || has('basic-kickoff') || has('basic-connect') || has('basic-daily')
241
+ ) addFootprint('portfolio');
226
242
  if (has('extend')) addFootprint('master');
227
243
  // `cli` seeds the prologue demo fixture plus its external-ref demo.
228
244
  if (has('cli')) { addFootprint('prologue'); addFootprint('cli-external'); }
@@ -258,5 +274,5 @@ function main() {
258
274
  }
259
275
 
260
276
  main();
261
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="547a8c8d-f962-571c-ae72-8edbb1fc756c")}catch(e){}}();
262
- //# debugId=547a8c8d-f962-571c-ae72-8edbb1fc756c
277
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="803fceb9-f545-5f51-8f46-4db3cba6abcf")}catch(e){}}();
278
+ //# debugId=803fceb9-f545-5f51-8f46-4db3cba6abcf