@tobisk/codesafari 1.0.0 → 1.0.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 (89) hide show
  1. package/README.md +173 -0
  2. package/dist/cli.js +22 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/export.d.ts +2 -0
  5. package/dist/commands/export.js +6 -0
  6. package/dist/commands/export.js.map +1 -1
  7. package/dist/commands/gitignore.d.ts +8 -0
  8. package/dist/commands/gitignore.js +31 -0
  9. package/dist/commands/gitignore.js.map +1 -0
  10. package/dist/commands/insert.d.ts +49 -0
  11. package/dist/commands/insert.js +279 -0
  12. package/dist/commands/insert.js.map +1 -0
  13. package/dist/commands/validate.js +1 -1
  14. package/dist/commands/validate.js.map +1 -1
  15. package/dist/content/loadContent.d.ts +9 -1
  16. package/dist/content/loadContent.js +87 -1
  17. package/dist/content/loadContent.js.map +1 -1
  18. package/dist/ignore/ignore.d.ts +1 -0
  19. package/dist/ignore/ignore.js +54 -2
  20. package/dist/ignore/ignore.js.map +1 -1
  21. package/dist/manifest/build.js +21 -12
  22. package/dist/manifest/build.js.map +1 -1
  23. package/dist/model/types.d.ts +26 -0
  24. package/package.json +2 -2
  25. package/skills/README.md +53 -0
  26. package/skills/authoring-code-safaris/SKILL.md +411 -0
  27. package/viewer-dist/assets/{abnfDiagram-VRR7QNED-D3fx4JHm.js → abnfDiagram-VRR7QNED-CUtCPUcK.js} +1 -1
  28. package/viewer-dist/assets/{arc-CDTQlIOl.js → arc-DT1qPdzO.js} +1 -1
  29. package/viewer-dist/assets/{architectureDiagram-ZJ3FMSHR-Bc-C9AOz.js → architectureDiagram-ZJ3FMSHR-Clz4_k6c.js} +1 -1
  30. package/viewer-dist/assets/{blockDiagram-677ZJIJ3-ZChUq7oC.js → blockDiagram-677ZJIJ3-BprAT8ww.js} +1 -1
  31. package/viewer-dist/assets/{c4Diagram-LMCZKHZV-Bh84Wvzw.js → c4Diagram-LMCZKHZV-K4EFS-bi.js} +1 -1
  32. package/viewer-dist/assets/channel-B6VWJVDA.js +1 -0
  33. package/viewer-dist/assets/{chunk-2Q5K7J3B-BL2GPise.js → chunk-2Q5K7J3B-wt4j9iAJ.js} +1 -1
  34. package/viewer-dist/assets/{chunk-32BRIVSS-C8J4_0PY.js → chunk-32BRIVSS-DZndHhpA.js} +1 -1
  35. package/viewer-dist/assets/{chunk-5VM5RSS4-BEPuob2j.js → chunk-5VM5RSS4-Zc4pbF2-.js} +1 -1
  36. package/viewer-dist/assets/{chunk-EX3LRPZG-C8dshNGY.js → chunk-EX3LRPZG-D150rsiB.js} +1 -1
  37. package/viewer-dist/assets/{chunk-JWPE2WC7-DB3UPcb9.js → chunk-JWPE2WC7-CnWGcCgD.js} +1 -1
  38. package/viewer-dist/assets/{chunk-MOJQB5TN-CoW82BtI.js → chunk-MOJQB5TN-CNNkBqHI.js} +1 -1
  39. package/viewer-dist/assets/{chunk-RYQCIY6F-BSkOviuC.js → chunk-RYQCIY6F-BohP8cpF.js} +1 -1
  40. package/viewer-dist/assets/{chunk-V7JOEXUC-C3uhoOMH.js → chunk-V7JOEXUC-O8PMb1tP.js} +1 -1
  41. package/viewer-dist/assets/{chunk-VR4S4FIN-IAlLBWOE.js → chunk-VR4S4FIN-AjltP-MY.js} +1 -1
  42. package/viewer-dist/assets/{chunk-XXDRQBXY-BZ2dkDjb.js → chunk-XXDRQBXY-BOvzmjQv.js} +1 -1
  43. package/viewer-dist/assets/classDiagram-OUVF2IWQ-7lFY7hbW.js +1 -0
  44. package/viewer-dist/assets/classDiagram-v2-EOCWNBFH-7lFY7hbW.js +1 -0
  45. package/viewer-dist/assets/{cose-bilkent-JH36ORCC-qThT2S0A.js → cose-bilkent-JH36ORCC-BI5sbJIe.js} +1 -1
  46. package/viewer-dist/assets/{cynefin-VYW2F7L2-DMuuSzID.js → cynefin-VYW2F7L2-DsqQ6c-8.js} +1 -1
  47. package/viewer-dist/assets/{cynefinDiagram-TSTJHNR4-58B-tzsV.js → cynefinDiagram-TSTJHNR4-aSrdlJhs.js} +1 -1
  48. package/viewer-dist/assets/{dagre-VKFMJZFB-DD2dvjEA.js → dagre-VKFMJZFB-C1JJb4il.js} +1 -1
  49. package/viewer-dist/assets/{diagram-FQU43EPY-BwhXWJOe.js → diagram-FQU43EPY-bqnjeq9L.js} +1 -1
  50. package/viewer-dist/assets/{diagram-G47NLZAW-Bvw3coaF.js → diagram-G47NLZAW-CI_3tBI7.js} +1 -1
  51. package/viewer-dist/assets/{diagram-NH7WQ7WH-Cug3_TDj.js → diagram-NH7WQ7WH--Cuuj_l0.js} +1 -1
  52. package/viewer-dist/assets/{diagram-OA4YK3LP-COuB13FS.js → diagram-OA4YK3LP-Ber9CxgW.js} +1 -1
  53. package/viewer-dist/assets/{diagram-WEI45ONY-Cs9bIVJ-.js → diagram-WEI45ONY-DA4LRa2G.js} +1 -1
  54. package/viewer-dist/assets/{ebnfDiagram-CCIWWBDH-DNxW5fFn.js → ebnfDiagram-CCIWWBDH-BWw30PPO.js} +1 -1
  55. package/viewer-dist/assets/{erDiagram-Q63AITRT-CoxCZQYq.js → erDiagram-Q63AITRT-CvTYXHZZ.js} +1 -1
  56. package/viewer-dist/assets/{flowDiagram-23GEKE2U-DDOkOM11.js → flowDiagram-23GEKE2U-Jzg6zox9.js} +1 -1
  57. package/viewer-dist/assets/{ganttDiagram-NO4QXBWP-BMIv-Vup.js → ganttDiagram-NO4QXBWP-DXxub_Mn.js} +1 -1
  58. package/viewer-dist/assets/{gitGraphDiagram-IHSO6WYX-CaYRI7Ti.js → gitGraphDiagram-IHSO6WYX-DplAVHS7.js} +1 -1
  59. package/viewer-dist/assets/index-DVLkX2-Z.css +1 -0
  60. package/viewer-dist/assets/{index-DPa56qLF.js → index-MwqpmjOm.js} +96 -96
  61. package/viewer-dist/assets/{infoDiagram-FWYZ7A6U-CG1-XeBO.js → infoDiagram-FWYZ7A6U-Df_ey2Yt.js} +1 -1
  62. package/viewer-dist/assets/{ishikawaDiagram-FXEZZL3T-BAaIgDfG.js → ishikawaDiagram-FXEZZL3T-C68vhFVb.js} +1 -1
  63. package/viewer-dist/assets/{journeyDiagram-5HDEW3XC-oPpLTcMj.js → journeyDiagram-5HDEW3XC-CoDmHoV3.js} +1 -1
  64. package/viewer-dist/assets/{kanban-definition-HUTT4EX6-wplcQi9I.js → kanban-definition-HUTT4EX6-B6r0jwQw.js} +1 -1
  65. package/viewer-dist/assets/{linear-3o0ZqjSV.js → linear-DIoMe8rR.js} +1 -1
  66. package/viewer-dist/assets/{mindmap-definition-LN4V7U3C-FkdX9xoS.js → mindmap-definition-LN4V7U3C-Bnswylok.js} +1 -1
  67. package/viewer-dist/assets/{pegDiagram-2B236MQR-UcxUgXaX.js → pegDiagram-2B236MQR-DIN1FTnX.js} +1 -1
  68. package/viewer-dist/assets/{pieDiagram-ENE6RG2P-BEujiO1u.js → pieDiagram-ENE6RG2P-CprqMtkw.js} +1 -1
  69. package/viewer-dist/assets/{quadrantDiagram-ABIIQ3AL-BsWx4RNa.js → quadrantDiagram-ABIIQ3AL-BDDULhdJ.js} +1 -1
  70. package/viewer-dist/assets/{railroadDiagram-RFXS5EU6-CaiR8155.js → railroadDiagram-RFXS5EU6-DYchCzqc.js} +1 -1
  71. package/viewer-dist/assets/{requirementDiagram-TGXJPOKE-B7WepZjB.js → requirementDiagram-TGXJPOKE-C5wnr9uO.js} +1 -1
  72. package/viewer-dist/assets/{sankeyDiagram-HTMAVEWB-D2ys-GcR.js → sankeyDiagram-HTMAVEWB-DkwntNXb.js} +1 -1
  73. package/viewer-dist/assets/{sequenceDiagram-DBY2YBRQ-BCx5Lqm4.js → sequenceDiagram-DBY2YBRQ-CjDmNFC_.js} +1 -1
  74. package/viewer-dist/assets/{sizeCapture-X5ZJPWSS-CdyWDUKU.js → sizeCapture-X5ZJPWSS-DPuxDmrs.js} +1 -1
  75. package/viewer-dist/assets/{stateDiagram-2N3HPSRC-CKjHd02p.js → stateDiagram-2N3HPSRC-BYVZZo-M.js} +1 -1
  76. package/viewer-dist/assets/stateDiagram-v2-6OUMAXLB-BRXNY8_F.js +1 -0
  77. package/viewer-dist/assets/{swimlanes-5IMT3BWC-wE7K0Eo8.js → swimlanes-5IMT3BWC-GXmz8FzP.js} +2 -2
  78. package/viewer-dist/assets/swimlanesDiagram-G3AALYLV-Gfb32vBV.js +8 -0
  79. package/viewer-dist/assets/{timeline-definition-FHXFAJF6-B9iZKy9Y.js → timeline-definition-FHXFAJF6-CQLwZsEX.js} +1 -1
  80. package/viewer-dist/assets/{vennDiagram-L72KCM5P-CIMukQYN.js → vennDiagram-L72KCM5P-DZt4sGqU.js} +1 -1
  81. package/viewer-dist/assets/{wardleyDiagram-EHGQE667-JZnnBRHP.js → wardleyDiagram-EHGQE667-7OXN_C-l.js} +1 -1
  82. package/viewer-dist/assets/{xychartDiagram-FW5EYKEG-BphHZiLL.js → xychartDiagram-FW5EYKEG-rI5CAM0A.js} +1 -1
  83. package/viewer-dist/index.html +2 -2
  84. package/viewer-dist/assets/channel-c5yLhzg_.js +0 -1
  85. package/viewer-dist/assets/classDiagram-OUVF2IWQ-t57CRPeZ.js +0 -1
  86. package/viewer-dist/assets/classDiagram-v2-EOCWNBFH-t57CRPeZ.js +0 -1
  87. package/viewer-dist/assets/index-sJB3TFqL.css +0 -1
  88. package/viewer-dist/assets/stateDiagram-v2-6OUMAXLB-oQDdTlVJ.js +0 -1
  89. package/viewer-dist/assets/swimlanesDiagram-G3AALYLV-Axc7yQiy.js +0 -8
@@ -64,6 +64,7 @@ export async function buildManifest(root, options = {}) {
64
64
  components: content.components,
65
65
  tours,
66
66
  glossary: content.glossary,
67
+ docs: content.docs,
67
68
  callouts: scan.callouts,
68
69
  examples: [],
69
70
  files,
@@ -256,12 +257,13 @@ function assignDetails(pending, tours, diagnostics) {
256
257
  }
257
258
  // @tour pipeline:4 Checking cross-references
258
259
  // With steps attached, the builder verifies the graph holds together: tours
259
- // reference real components, and every `glossary:<slug>` link across all
260
- // Markdown bodies resolves to a defined concept. Broken links become warnings,
261
- // which is exactly what `validate` surfaces.
260
+ // reference real components, and every `glossary:<slug>` and `doc:<slug>` link
261
+ // across all Markdown bodies resolves to something defined. Broken links become
262
+ // warnings, which is exactly what `validate` surfaces.
262
263
  function validateReferences(content, tours, diagnostics) {
263
264
  const componentSlugs = new Set(content.components.map((c) => c.slug));
264
265
  const glossarySlugs = new Set(content.glossary.map((g) => g.slug));
266
+ const docSlugs = new Set(content.docs.map((d) => d.slug));
265
267
  for (const tour of tours) {
266
268
  for (const comp of tour.components) {
267
269
  if (!componentSlugs.has(comp)) {
@@ -273,25 +275,32 @@ function validateReferences(content, tours, diagnostics) {
273
275
  }
274
276
  }
275
277
  }
276
- // Check `glossary:<slug>` links across all Markdown bodies.
278
+ // Check `glossary:<slug>` and `doc:<slug>` links across all Markdown bodies.
277
279
  const bodies = [
278
280
  { text: content.project.body, file: '.tour/index.md' },
279
281
  ...content.components.map((c) => ({ text: c.body, file: c.sourcePath })),
280
282
  ...content.glossary.map((g) => ({ text: g.body, file: g.sourcePath })),
283
+ ...content.docs.map((d) => ({ text: d.body, file: d.sourcePath })),
281
284
  ...tours.flatMap((t) => [
282
285
  { text: t.body, file: t.sourcePath },
283
286
  ...t.steps.map((s) => ({ text: s.body, file: s.file })),
284
287
  ]),
285
288
  ];
286
- const linkRe = /\]\(glossary:([A-Za-z0-9._-]+)\)/g;
289
+ // Doc slugs are paths, so their character class allows `/`.
290
+ const schemes = [
291
+ { name: 'glossary', re: /\]\(glossary:([A-Za-z0-9._-]+)\)/g, known: glossarySlugs },
292
+ { name: 'doc', re: /\]\(doc:([A-Za-z0-9._/-]+)\)/g, known: docSlugs },
293
+ ];
287
294
  for (const { text, file } of bodies) {
288
- for (const match of text.matchAll(linkRe)) {
289
- if (!glossarySlugs.has(match[1])) {
290
- diagnostics.push({
291
- severity: 'warning',
292
- file,
293
- message: `Broken glossary link "glossary:${match[1]}".`,
294
- });
295
+ for (const { name, re, known } of schemes) {
296
+ for (const match of text.matchAll(re)) {
297
+ if (!known.has(match[1])) {
298
+ diagnostics.push({
299
+ severity: 'warning',
300
+ file,
301
+ message: `Broken ${name} link "${name}:${match[1]}".`,
302
+ });
303
+ }
295
304
  }
296
305
  }
297
306
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/manifest/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAU7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,iEAAiE;AACjE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;CACN,CAAC,CAAC;AAYH,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,EAAE,CACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAErD,2CAA2C;AAC3C,0EAA0E;AAC1E,+EAA+E;AAC/E,gFAAgF;AAChF,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,UAAwB,E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S;gBACnB,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,8BAA+B,GAAa,CAAC,OAAO,EAAE;aAChE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -104,6 +104,31 @@ export interface Tour {
104
104
  /** Steps sorted by dot-aware order. */
105
105
  steps: TourStep[];
106
106
  }
107
+ /**
108
+ * A standalone documentation page, from `.tour/docs/**\/*.md`.
109
+ *
110
+ * Docs are free-form long-form prose — in-depth concept write-ups that don't
111
+ * belong to a tour, a component, or a one-paragraph glossary entry. They are
112
+ * addressable via `doc:<slug>` links from any other Markdown body.
113
+ */
114
+ export interface Doc {
115
+ /**
116
+ * Path-derived slug, relative to `.tour/docs` and without the extension —
117
+ * e.g. `architecture/event-loop`. An `index.md` takes its directory's slug,
118
+ * so `architecture/index.md` is the `architecture` section's own page.
119
+ */
120
+ slug: string;
121
+ /** Frontmatter `title`, else the leading `# Heading`, else the file name. */
122
+ title: string;
123
+ /** Frontmatter `navTitle`: a shorter label for the navigation tree. */
124
+ navTitle?: string;
125
+ /** Sort key among siblings in the navigation tree. */
126
+ order?: number;
127
+ /** Markdown body, with the leading `# Heading` removed if it became `title`. */
128
+ body: string;
129
+ /** Source path of the authoring file, relative to project root. */
130
+ sourcePath: string;
131
+ }
107
132
  /** A glossary concept, addressable via `glossary:<slug>` links. */
108
133
  export interface GlossaryConcept {
109
134
  slug: string;
@@ -170,6 +195,7 @@ export interface Manifest {
170
195
  components: Component[];
171
196
  tours: Tour[];
172
197
  glossary: GlossaryConcept[];
198
+ docs: Doc[];
173
199
  callouts: SourceCallout[];
174
200
  examples: Example[];
175
201
  /** Included source files, present in exported manifests. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tobisk/codesafari",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Turn a .tour/ folder plus inline @tour source comments into a local, offline code-tour website.",
5
5
  "keywords": [
6
6
  "code-tour",
@@ -42,6 +42,7 @@
42
42
  "files": [
43
43
  "dist",
44
44
  "viewer-dist",
45
+ "skills",
45
46
  "README.md",
46
47
  "LICENSE"
47
48
  ],
@@ -75,7 +76,6 @@
75
76
  "@semantic-release/changelog": "^6.0.3",
76
77
  "@semantic-release/commit-analyzer": "^13.0.1",
77
78
  "@semantic-release/git": "^10.0.1",
78
- "@semantic-release/github": "^10.3.5",
79
79
  "@semantic-release/npm": "^12.0.2",
80
80
  "@semantic-release/release-notes-generator": "^14.1.1",
81
81
  "@types/node": "^22.0.0",
@@ -0,0 +1,53 @@
1
+ # CodeSafari agent skills
2
+
3
+ Skills shipped with `@tobisk/codesafari` for coding agents that generate
4
+ CodeSafari content **in other repositories**.
5
+
6
+ | Skill | Purpose |
7
+ | --- | --- |
8
+ | [`authoring-code-safaris`](authoring-code-safaris/SKILL.md) | Plan and author a full `.tour/` folder plus inline `@tour` comments for a codebase. |
9
+
10
+ The skill file is plain Markdown with YAML frontmatter, so it works with any
11
+ agent that can read a file. Below are the two setups we test.
12
+
13
+ ## Claude Code
14
+
15
+ Copy the skill into the target repository (or into `~/.claude/skills/` to make
16
+ it available everywhere):
17
+
18
+ ```bash
19
+ mkdir -p .claude/skills
20
+ cp -R node_modules/@tobisk/codesafari/skills/authoring-code-safaris .claude/skills/
21
+ ```
22
+
23
+ Claude discovers it from the `name`/`description` frontmatter and loads it when
24
+ the request matches — or invoke it directly with `/authoring-code-safaris`.
25
+
26
+ ## Codex
27
+
28
+ Codex reads `AGENTS.md` from the repository root. Copy the skill in the same
29
+ way, then point at it:
30
+
31
+ ```bash
32
+ mkdir -p .agents/skills
33
+ cp -R node_modules/@tobisk/codesafari/skills/authoring-code-safaris .agents/skills/
34
+ ```
35
+
36
+ and add to `AGENTS.md`:
37
+
38
+ ```markdown
39
+ ## Code tours
40
+
41
+ When asked to create, extend, or fix CodeSafari content — `.tour/` Markdown,
42
+ `@tour` source comments, code tours, onboarding walkthroughs — read
43
+ `.agents/skills/authoring-code-safaris/SKILL.md` first and follow it.
44
+ ```
45
+
46
+ Inlining the whole skill into `AGENTS.md` also works if you prefer one file.
47
+
48
+ ## Anything else
49
+
50
+ Give the agent the file and one instruction: *"follow
51
+ `authoring-code-safaris/SKILL.md` when writing code tours."* The skill is
52
+ self-contained and assumes no tool beyond a shell that can run
53
+ `npx @tobisk/codesafari validate`.
@@ -0,0 +1,411 @@
1
+ ---
2
+ name: authoring-code-safaris
3
+ description: Author a CodeSafari (`.tour/` Markdown plus inline `@tour` source comments) for a codebase so newcomers can be guided through it. Use when asked to create, extend, or fix code tours, a code safari, onboarding walkthroughs anchored to real code, `.tour/index.md`, components, glossary concepts, or `@tour` comments — including "tour this repo", "add a safari for auth", or "document the data layer as a walkthrough".
4
+ ---
5
+
6
+ # Authoring Code Safaris
7
+
8
+ You are adding **CodeSafari** content to a codebase. CodeSafari
9
+ (`@tobisk/codesafari`) reads a `.tour/` folder plus `@tour` comments in the
10
+ source and serves them as an offline, IDE-like guided tour site.
11
+
12
+ Your job is to produce **content**, not to modify the tool. Never change
13
+ application logic to make a tour nicer; the tour bends to the code.
14
+
15
+ ---
16
+
17
+ ## 0. Ask first — before writing anything
18
+
19
+ Read enough of the repo to form an opinion, then ask the user a **single
20
+ batched round** of questions. Propose your own answers so the user can just
21
+ confirm. Do not start authoring until this round is answered.
22
+
23
+ Ask about:
24
+
25
+ 1. **Audience** — new hires joining the team? external contributors? both?
26
+ (Changes how much domain context the glossary must carry.)
27
+ 2. **The tour list you propose** — show the concrete list you derived in §4
28
+ ("I plan: Authentication, Data layer, HTTP API, Billing. Add/remove?").
29
+ 3. **The component list you propose** — the §3 breakdown.
30
+ 4. **Scope of code** — any packages, generated dirs, or vendored trees to leave
31
+ out of the safari entirely (these become `.codesafariignore` entries).
32
+ 5. **Unknowns you could not answer from the code** — why a surprising design
33
+ exists, which of two similar paths is the blessed one, what is deprecated.
34
+ These are the parts of a tour you cannot invent, so collect them here.
35
+
36
+ If the user is unavailable (non-interactive run), write your assumptions into
37
+ the top of `.tour/index.md` as a short "Assumptions" note and continue.
38
+
39
+ ---
40
+
41
+ ## 1. The four content kinds — keep them distinct
42
+
43
+ CodeSafari has four kinds of authored content. Newcomers to the format blur
44
+ them; don't.
45
+
46
+ | Kind | Answers | Shape | Lives in |
47
+ | --- | --- | --- | --- |
48
+ | **Glossary concept** | "What does this *word* mean?" | A paragraph or two. No navigation. | `.tour/glossary/**/*.md` |
49
+ | **Component** | "What is this *part of the system* and where does it live?" | A static page with links into the code. | `.tour/components/*.md` |
50
+ | **Tour (CodeSafari)** | "How does this *flow* actually work, step by step?" | An intro page + ordered `@tour` steps in the source. | `.tour/tours/**/*.md` + `@tour` comments |
51
+ | **Doc page** | "Explain this *idea* properly, at length." | Long-form prose, nested in folders. Not anchored to code. | `.tour/docs/**/*.md` |
52
+
53
+ Decision rule when you are unsure which one a piece of writing is:
54
+
55
+ - If it defines vocabulary the reader needs *while reading something else* →
56
+ **glossary**. Signal: you keep wanting to explain the same word in three
57
+ places. Write it once and link it: `[dot-aware ordering](glossary:dot-aware-ordering)`.
58
+ - If it describes a *place* — a directory, module, service, package — that the
59
+ reader will return to → **component**.
60
+ - If it describes a *journey through time* — a request, a login, a job being
61
+ processed → **tour**.
62
+ - If it needs *more than a couple of paragraphs* and isn't tied to specific
63
+ lines of code — a design rationale, a protocol, a threat model, a migration
64
+ history → **doc page**. Signal: a glossary entry that keeps growing headings.
65
+
66
+ A concept is never a tour. "JWT" is a glossary entry; "How a login request
67
+ becomes a session" is a tour. A component is never a tour either: "Auth
68
+ service" is a component; the login flow *through* it is the tour. And a doc page
69
+ is never a tour: "Why we chose opaque tokens over JWTs" is a doc; the code path
70
+ that mints one is a tour.
71
+
72
+ ---
73
+
74
+ ## 2. `.tour/index.md` — the project summary
75
+
76
+ `index.md` is the landing page and the only global config. Write it **first**,
77
+ after the question round. It sets the frame everything else hangs off.
78
+
79
+ ~~~markdown
80
+ ---
81
+ title: Acme Platform
82
+ description: One sentence a stranger could repeat back correctly.
83
+ defaultSnippetLines: 20
84
+ repositoryUrl: https://github.com/acme/platform # optional
85
+ ---
86
+
87
+ Two to four short paragraphs: what the product does, the runtime shape
88
+ (monolith? services? worker + web?), and the one or two design decisions that
89
+ explain the rest of the codebase.
90
+
91
+ ```mermaid
92
+ flowchart LR
93
+ A[Browser] --> B[HTTP API]
94
+ B --> C[Domain services]
95
+ C --> D[(Postgres)]
96
+ C --> E[Job queue]
97
+ ```
98
+
99
+ ### Where to start
100
+
101
+ - **Authentication** — how a request proves who it is.
102
+ - **Data layer** — how domain objects reach and leave the database.
103
+ ~~~
104
+
105
+ Rules:
106
+
107
+ - `description` is one sentence, no marketing.
108
+ - Include exactly one high-level `mermaid` diagram of the runtime topology.
109
+ Diagrams render locally and offline; never link an external image service.
110
+ - End with a **"Where to start"** list naming the tours in reading order. This
111
+ is the single most useful thing on the page.
112
+ - `defaultSnippetLines` (typically 15–25) is the fallback highlight size when a
113
+ step does not sit in front of a class/function/block.
114
+
115
+ ---
116
+
117
+ ## 3. Choosing which components to show
118
+
119
+ Components are the map. Aim for **5–12**. Fewer and the map is useless; more
120
+ and it is a directory listing.
121
+
122
+ Include a component when **all** of these hold:
123
+
124
+ - It has a **name the team actually says out loud** ("the ingest worker", not
125
+ "utils").
126
+ - A reader could be **assigned a ticket** scoped to it.
127
+ - It owns a **coherent responsibility**, not just a folder that exists.
128
+
129
+ Exclude:
130
+
131
+ - Leaf utility/helper/type-only directories.
132
+ - Generated code, migrations, vendored dependencies, build output.
133
+ - Anything you would describe as "and various other files".
134
+
135
+ Derive candidates from, in order of reliability: top-level source directories,
136
+ package/workspace boundaries, deployable units (services, workers, CLIs), and
137
+ finally the module clusters you observe from import graphs. Prefer the
138
+ project's own vocabulary over an invented taxonomy.
139
+
140
+ Each component page:
141
+
142
+ ```markdown
143
+ ---
144
+ slug: auth-service # kebab-case, stable, referenced by tours
145
+ title: Auth Service
146
+ summary: Issues and verifies sessions. # one line, shown in listings
147
+ order: 20 # 10, 20, 30… leaves room to insert
148
+ ---
149
+
150
+ What it is responsible for, and — just as usefully — what it is *not*.
151
+
152
+ - [`src/auth/session.ts`](src/auth/session.ts) — issuing and refreshing sessions.
153
+ - [`src/auth/middleware.ts`](src/auth/middleware.ts) — the guard applied per route.
154
+
155
+ Sessions are opaque [session tokens](glossary:session-token), not JWTs; see the
156
+ [Authentication](#) tour for the full flow.
157
+ ```
158
+
159
+ Link to real files with project-relative Markdown links. Verify every path
160
+ exists before you write it.
161
+
162
+ ---
163
+
164
+ ## 4. Choosing which CodeSafaris to generate
165
+
166
+ Tours are for **major features and concepts** — the flows a newcomer must
167
+ understand before they can safely change anything.
168
+
169
+ ### Baseline for any codebase with a server
170
+
171
+ Unless the repo genuinely lacks the concern, always produce:
172
+
173
+ 1. **Authentication & authorization** — how an incoming request acquires an
174
+ identity, where that identity is checked, and what happens when it fails.
175
+ Start at the entry point (middleware/guard), not at the user model.
176
+ 2. **The data layer** — how a domain object is read and written: schema or
177
+ model definition → repository/query layer → transaction boundaries →
178
+ migrations. Show one complete round trip, not a catalogue of tables.
179
+ 3. **The API surface** — almost always worth it: route registration →
180
+ validation → handler → domain call → serialized response. Trace *one*
181
+ representative endpoint end to end rather than surveying many.
182
+
183
+ ### Then the feature tours
184
+
185
+ Add one tour per **major feature or core concept** the product is actually
186
+ about — the things named on a roadmap: billing, ingestion pipeline, search
187
+ indexing, permissions model, real-time updates, the rendering pipeline.
188
+
189
+ Test a candidate tour against these:
190
+
191
+ - Can it be told as an **ordered sequence** with a beginning and an end?
192
+ - Does it cross **more than one component**? (Single-file flows are usually a
193
+ component page plus callouts, not a tour.)
194
+ - Would a new hire's **first week be worse** without it?
195
+
196
+ Do not generate tours for: build tooling, test setup, formatting config,
197
+ CI, or "misc utilities". Mention those in `index.md` if at all.
198
+
199
+ **Sizing.** 8–20 steps per tour. Under 5 steps, fold it into a component page.
200
+ Over ~25, split it (e.g. "Login" and "Session refresh" instead of one "Auth").
201
+ Total: aim for 3–7 tours in a normal repo. Every tour you write must be one
202
+ someone will finish.
203
+
204
+ ### Tour entry page
205
+
206
+ ```markdown
207
+ ---
208
+ slug: authentication
209
+ title: How a request proves who it is
210
+ components: [auth-service, http-api] # slugs from .tour/components
211
+ order: 1 # reading order on the landing page
212
+ defaultSnippetLines: 25 # optional override
213
+ ---
214
+
215
+ Follow one authenticated request from the edge middleware down to the loaded
216
+ user, then look at the two ways it can fail.
217
+ ```
218
+
219
+ Give tours **action titles** ("How a manifest is built"), not noun labels
220
+ ("Manifest"). The noun label belongs to the component.
221
+
222
+ ---
223
+
224
+ ## 5. Writing the steps (`@tour` comments)
225
+
226
+ Steps live in the source, next to the code they describe, so they move with it.
227
+
228
+ ```ts
229
+ // @tour authentication:10 The edge guard
230
+ // Every request passes through here first. The guard reads the
231
+ // [session token](glossary:session-token) cookie and, on success, attaches the
232
+ // resolved user to the request before any handler runs.
233
+ export function requireSession(req, res, next) { /* ... */ }
234
+ ```
235
+
236
+ - Header line: `@tour <tour-slug>:<order> <Step title>`.
237
+ - Everything after it in the **same continuous comment block** is the step
238
+ body — full Markdown, including `glossary:` links and ```` ```mermaid ````
239
+ blocks.
240
+ - **Ordering is dot-aware**, not decimal: `12.2` sorts before `12.10`. Number
241
+ steps `10, 20, 30…` so later insertions land as `15` or `12.5` with no
242
+ renumbering.
243
+ - The **highlight range** is chosen by what directly follows the comment: a
244
+ class highlights the whole class; a function/method highlights that
245
+ function; another block highlights the block; otherwise the comment plus
246
+ `defaultSnippetLines` lines. So **place the comment directly above the
247
+ construct you want shown** — a blank line or a stray import in between
248
+ changes what the reader sees.
249
+
250
+ Non-navigable annotations use `@tour comment`:
251
+
252
+ ```ts
253
+ // @tour comment Not thread-safe
254
+ // This cache is intentionally per-process; see the data layer tour.
255
+ ```
256
+
257
+ A callout is scoped to the nearest step **above** it in the same file. A
258
+ callout placed before every step in a file applies file-wide.
259
+
260
+ ### Inserting the comments — use `codesafari insert`
261
+
262
+ Do **not** write a helper script to place these comments, and do not compute
263
+ line numbers and edit by offset. Placement is subtle enough that the CLI does
264
+ it for you:
265
+
266
+ ```bash
267
+ npx @tobisk/codesafari insert steps.json --dry-run # resolve and report
268
+ npx @tobisk/codesafari insert steps.json # apply
269
+ ```
270
+
271
+ `steps.json` is an array; `match` is the real anchor and `line` is only a hint:
272
+
273
+ ```json
274
+ [
275
+ {
276
+ "file": "src/auth/middleware.ts",
277
+ "line": 42,
278
+ "match": "export function requireSession",
279
+ "tour": "authentication",
280
+ "order": "10",
281
+ "title": "The edge guard",
282
+ "body": [
283
+ "Every request passes through here first.",
284
+ "On success it attaches the resolved user before any handler runs."
285
+ ]
286
+ },
287
+ {
288
+ "file": "src/auth/cache.ts",
289
+ "match": "const cache = new Map",
290
+ "tour": "comment",
291
+ "title": "Not thread-safe"
292
+ }
293
+ ]
294
+ ```
295
+
296
+ Each body array element is a separate Markdown paragraph. Use `"tour":
297
+ "comment"` for a callout (omit `order`).
298
+
299
+ The command handles what hand-editing gets wrong:
300
+
301
+ - Picks `//` or `#` from the file type, and refuses file types it doesn't know
302
+ rather than guessing.
303
+ - Verifies `match` is on the anchor line; if the line hint has drifted it
304
+ searches nearby and requires a **unique** hit. Ambiguous or missing anchors
305
+ are reported, never guessed.
306
+ - Places the block **above preceding doc comments and attributes**, with a
307
+ blank line after. This matters: consecutive `//`/`#` lines merge into one
308
+ comment block and only the first line is read as the `@tour` header — and a
309
+ Rust `#[derive(...)]` counts as a `#` comment to the scanner. It stays
310
+ *below* decorators (`@app.route`), which are code, so the `def`/`class`
311
+ underneath stays the resolved anchor.
312
+ - Applies bottom-up per file, so earlier anchors don't drift.
313
+ - Is **all-or-nothing**: if any entry fails to resolve, no file is written.
314
+ - Is **idempotent**: an entry whose header is already in the file is skipped,
315
+ so fixing a spec and re-running cannot duplicate comments.
316
+
317
+ Write the whole tour as one spec and apply it in one run. If it reports
318
+ problems, fix the spec and re-run — that is safe by design.
319
+
320
+ ### Step prose style
321
+
322
+ - Write what the reader **cannot** see in the code: why, trade-offs, what
323
+ breaks, which alternative was rejected. Never narrate the syntax.
324
+ - 2–5 sentences. If a step needs more, it is two steps.
325
+ - First step of a tour sets the scene; last step says where the flow ends and
326
+ what to read next.
327
+ - Link vocabulary to the glossary instead of re-explaining it.
328
+
329
+ ---
330
+
331
+ ## 6. Glossary
332
+
333
+ One file may hold many concepts, one per `##` heading; the slug is derived
334
+ from the heading. Link with `[Label](glossary:the-slug)`.
335
+
336
+ ```markdown
337
+ ## Session token
338
+
339
+ An opaque, random 32-byte value stored in Redis and mapped to a user id.
340
+ Deliberately not a JWT: revocation must be immediate, so the check hits the
341
+ store on every request. See [`src/auth/session.ts`](src/auth/session.ts).
342
+ ```
343
+
344
+ Write an entry for any term that is **domain-specific, internally invented, or
345
+ used in a non-standard way**. Skip industry-standard terms unless this codebase
346
+ means something unusual by them.
347
+
348
+ When an entry outgrows two paragraphs, move the body to a doc page and leave the
349
+ glossary entry as a one-line definition plus a `doc:` link.
350
+
351
+ ---
352
+
353
+ ## 6b. Doc pages
354
+
355
+ For prose that needs room: design rationale, protocols, threat models, "how our
356
+ caching actually works". Drop a Markdown file under `.tour/docs/` — no
357
+ frontmatter required. **Folders are the navigation structure**, recursively, and
358
+ a folder's `index.md` is that folder's own page.
359
+
360
+ ```
361
+ .tour/docs/
362
+ index.md # Docs landing page
363
+ caching/
364
+ index.md # the "Caching" section page
365
+ invalidation.md # nested beneath it
366
+ ```
367
+
368
+ Optional frontmatter: `title` (defaults to the leading `# Heading`, then the
369
+ file name), `navTitle` (shorter tree label), `order` (sort among siblings).
370
+
371
+ Link from anywhere — a step body, a component, a glossary entry, another doc —
372
+ with the `doc:` scheme, using the path under `.tour/docs/` without the extension:
373
+
374
+ ```markdown
375
+ See [cache invalidation](doc:caching/invalidation).
376
+ ```
377
+
378
+ Keep doc pages out of step bodies' critical path: a step should stand alone and
379
+ *offer* the doc as a deeper read, not require it.
380
+
381
+ ---
382
+
383
+ ## 7. Verify before you report done
384
+
385
+ ```bash
386
+ npx @tobisk/codesafari validate # frontmatter, dangling links, unresolved steps, diagrams
387
+ npx @tobisk/codesafari dev # optional: view it at http://localhost:4317
388
+ ```
389
+
390
+ `validate` must pass with zero errors. Then check by hand:
391
+
392
+ - Every `slug` referenced in a tour's `components:` exists.
393
+ - Every `glossary:` and `doc:` link resolves.
394
+ - Every file path linked from Markdown exists.
395
+ - Every tour has a step `1`-equivalent and reads in order.
396
+ - No tour references a file excluded by `.gitignore` / `.codesafariignore`.
397
+
398
+ Report to the user: the tours and components you created, the questions you had
399
+ to assume answers to, and anything you deliberately left untoured.
400
+
401
+ ---
402
+
403
+ ## Working agreements
404
+
405
+ - Read the code before writing about it. A confidently wrong tour is worse than
406
+ no tour.
407
+ - Prefer fewer, finished tours over broad coverage.
408
+ - Reuse the repo's own naming. If the team says "workspace", never write
409
+ "tenant".
410
+ - Keep `.tour/` Markdown and `@tour` comments consistent in voice: direct,
411
+ second person, present tense.
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-CoW82BtI.js";import{p as f}from"./chunk-JWPE2WC7-DB3UPcb9.js";import{_ as n,l as o}from"./index-DPa56qLF.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-DMuuSzID.js";var v=d().RailroadAbnf.parser.LangiumParser,l=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),i=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:i,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return l(e.element);case"AbnfOptionalGroup":return{type:"optional",element:l(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},w={parser:R,db:a,renderer:u,styles:p};export{w as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-CNNkBqHI.js";import{p as f}from"./chunk-JWPE2WC7-CnWGcCgD.js";import{_ as n,l as o}from"./index-MwqpmjOm.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-DsqQ6c-8.js";var v=d().RailroadAbnf.parser.LangiumParser,l=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),i=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:i,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return l(e.element);case"AbnfOptionalGroup":return{type:"optional",element:l(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},w={parser:R,db:a,renderer:u,styles:p};export{w as diagram};