Skip to content

Commit f00d74a

Browse files
committed
refactor(tour): rename walkthrough → tour (brand) + add docs pipeline
Brand: rename the user-facing system name from "walkthrough" to "tour" for pithiness. Renamed: - scripts/walkthrough.mts → scripts/tour.mts - walkthrough.json → tour.json - pnpm walkthrough:* → pnpm tour:* - Prose / error messages / CLI help: "walkthrough" → "tour" - .github/workflows/pages.yml + valtown.yml: paths trigger + step names reflect new script/config paths - tour.json "title": "Socket PackageURL.js Tour" Not renamed (intentional — meander hardcodes them or external identifiers we don't want to churn): - walkthrough/ output directory (meander writes here) - walkthrough.css, walkthrough-part-N.html (meander emits these) - walkthrough-drag.js, walkthrough-sw.js, walkthrough-comments.js, walkthrough-overrides.css (our shims — keep "walkthrough" prefix so they sit alongside the meander CSS they extend, consistent in devtools) - wt-* CSS class prefix (backronym: "walking tour") - Val Town credentials + val-name identifiers (rotating them orphans existing creds) A note-on-naming table in docs/tour.md spells this out for future readers so the hybrid makes sense at first glance. Docs pipeline (new): scripts/tour.mts renders docs/*.md markdown entries listed in tour.json's new "docs" array into <filename>.html pages alongside the generated part files. Each doc gets the same chrome as a part page (favicons, preloads, SW, SRI, CSP) and a topic-nav pill row. index.html picks up a new Topics section linking every doc. - Validator: validateDocFilenames enforces shape [a-z]+, uniqueness against every other doc, and non-collision with part filenames — all errors follow the ERROR MESSAGES doctrine. - marked 18.0.0 pinned as devDep (no caret). - First shipping doc: docs/tour.md — the pipeline walkthrough itself. Remaining 7 docs (architecture, builders, converters, safety, vers, contributing, release) land in follow-up commits.
1 parent f2b3fb9 commit f00d74a

13 files changed

Lines changed: 869 additions & 134 deletions

File tree

.claude/skills/content-filename-from-title/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
name: content-filename-from-title
3-
description: Turns a prose title into a short, single-word, URL-friendly filename for published content (docs, walkthrough parts, blog slugs, guide pages). Use when adding a new entry to a manifest that exposes public filenames (e.g. walkthrough.json parts, docs/*.md for GH Pages), when renaming an existing one, or when a user asks "what should I name this file?"
3+
description: Turns a prose title into a short, single-word, URL-friendly filename for published content (docs, tour parts, blog slugs, guide pages). Use when adding a new entry to a manifest that exposes public filenames (e.g. tour.json parts, docs/*.md for GH Pages), when renaming an existing one, or when a user asks "what should I name this file?"
44
---
55

66
# content-filename-from-title
77

88
<task>
99
Produce a single-word, lowercase, ASCII-only filename (no extension,
1010
no hyphens, no digits) that best represents the content of a titled
11-
page. The filename goes into a config manifest — `walkthrough.json`
11+
page. The filename goes into a config manifest — `tour.json`
1212
part entries, `docs/` frontmatter, or similar — where it becomes the
1313
public URL segment for that page.
1414
</task>
@@ -30,14 +30,14 @@ procedure so the output is reproducible.
3030

3131
## Where it fits in the repo
3232

33-
- `walkthrough.json` — the `parts[].filename` field is the URL segment
33+
- `tour.json` — the `parts[].filename` field is the URL segment
3434
the page is published under at `socketdev.github.io/socket-packageurl-js/<filename>.html`.
3535
- `docs/*.md` — the file stem becomes the URL segment when docs are
3636
stitched into the GH Pages flow (see `docs/pages-design-system.md`
3737
for the surrounding design system).
3838
- Any future blog or guide manifest added to this repo.
3939

40-
A build-time validator in `scripts/walkthrough.mts` enforces the
40+
A build-time validator in `scripts/tour.mts` enforces the
4141
**shape** (`[a-z]+`) and **uniqueness**; this skill decides the
4242
**choice** (which word).
4343
</context>
@@ -134,9 +134,9 @@ cute), adjust. Internal consistency matters — don't mix
134134
</instructions>
135135

136136
<examples>
137-
## Worked examples — the 8 walkthrough parts
137+
## Worked examples — the 8 tour parts
138138

139-
These are the filenames currently in `walkthrough.json` at the time
139+
These are the filenames currently in `tour.json` at the time
140140
this skill was written. Each shows the rule that produced the choice.
141141

142142
<example id="1">
@@ -302,7 +302,7 @@ again.
302302
validator uses when it rejects a bad filename.
303303
- `docs/pages-design-system.md` — the surrounding design system for
304304
pages that use these filenames.
305-
- `scripts/walkthrough.mts``validatePartFilenames()` — the
305+
- `scripts/tour.mts``validatePartFilenames()` — the
306306
validator implementation that enforces the hard constraints.
307-
- `walkthrough.json` — the current live manifest applying this skill.
307+
- `tour.json` — the current live manifest applying this skill.
308308
</further-reading>

.github/workflows/pages.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: 📘 Walkthrough (GH Pages)
1+
name: 📘 Tour (GH Pages)
22

3-
# Deploys the walkthrough pilot to https://socketdev.github.io/socket-packageurl-js/
4-
# Trigger: push to main that touches walkthrough sources (plus manual).
3+
# Deploys the tour pilot to https://socketdev.github.io/socket-packageurl-js/
4+
# Trigger: push to main that touches tour sources (plus manual).
55
#
66
# Uses the SocketDev/socket-registry shared composite action for
77
# checkout + Node/pnpm setup + install, so toolchain versions stay in
@@ -11,25 +11,27 @@ name: 📘 Walkthrough (GH Pages)
1111
#
1212
# Build model:
1313
# 1. Shared setup-and-install → checkout w/ submodules, pnpm install.
14-
# 2. `pnpm walkthrough:build` — the `CI` env var (set by all GitHub
14+
# 2. `pnpm tour:build` — the `CI` env var (set by all GitHub
1515
# Actions runners) makes this auto-select the `prod` preset, which
1616
# applies --minify + --base-path=/socket-packageurl-js. Locally the
1717
# same script defaults to `dev`. No flag drift between CI and the
1818
# npm script.
19-
# 3. Upload `walkthrough/` as the Pages artifact.
19+
# 3. Upload `walkthrough/` as the Pages artifact. (Meander hardcodes
20+
# the output directory name; we keep it to avoid forking meander.)
2021
# 4. Deploy via actions/deploy-pages.
2122

2223
on:
2324
push:
2425
branches: [main]
2526
paths:
26-
- 'walkthrough.json'
27+
- 'tour.json'
2728
- 'walkthrough-comments.js'
2829
- 'walkthrough-drag.js'
2930
- 'walkthrough-overrides.css'
3031
- 'walkthrough-sw.js'
31-
- 'scripts/walkthrough.mts'
32+
- 'scripts/tour.mts'
3233
- 'src/**'
34+
- 'docs/**'
3335
- 'assets/favicon/**'
3436
- '.github/workflows/pages.yml'
3537
- 'package.json'
@@ -51,7 +53,7 @@ concurrency:
5153

5254
jobs:
5355
build:
54-
name: Build walkthrough
56+
name: Build tour
5557
runs-on: ubuntu-latest
5658
permissions:
5759
contents: read
@@ -68,8 +70,8 @@ jobs:
6870
- name: Init meander submodule
6971
run: git submodule update --init --depth=1 upstream/meander
7072

71-
- name: Generate walkthrough (auto-prod via CI env)
72-
run: pnpm walkthrough:build
73+
- name: Generate tour (auto-prod via CI env)
74+
run: pnpm tour:build
7375

7476
- name: Upload Pages artifact
7577
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0

.github/workflows/valtown.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🌐 Deploy (Val Town)
22

3-
# Deploys the walkthrough comment backend to Val Town when the val
3+
# Deploys the tour comment backend to Val Town when the val
44
# source changes on main. Also runnable manually via workflow_dispatch.
55
#
66
# One-time setup required in the repo settings:
@@ -24,7 +24,7 @@ name: 🌐 Deploy (Val Town)
2424
# What ships
2525
# ──────────
2626
# Every `val/*.ts` file that isn't a `*.test.ts`. The deploy step auto-
27-
# discovers them via `readdirSync(val/)`; `scripts/walkthrough.mts`
27+
# discovers them via `readdirSync(val/)`; `scripts/tour.mts`
2828
# uploads each via Val Town's files API. A deploy receipt with content
2929
# sha256 per file is printed to the run summary.
3030

@@ -33,7 +33,7 @@ on:
3333
branches: [main]
3434
paths:
3535
- 'val/**'
36-
- 'scripts/walkthrough.mts'
36+
- 'scripts/tour.mts'
3737
- 'scripts/audit-deps.mts'
3838
- '.github/workflows/valtown.yml'
3939
- 'package.json'
@@ -79,8 +79,8 @@ jobs:
7979
checkout-fetch-depth: '1'
8080

8181
- name: Deploy val
82-
# `pnpm walkthrough valtown` runs the Socket.dev malware
83-
# audit on the val's transitive closure first — a finding
84-
# fails fast before any upload. Deploy receipt (file + sha256)
85-
# prints to GITHUB_STEP_SUMMARY at the end.
86-
run: pnpm walkthrough valtown
82+
# `pnpm tour valtown` runs the Socket.dev malware audit on
83+
# the val's transitive closure first — a finding fails fast
84+
# before any upload. Deploy receipt (file + sha256) prints to
85+
# GITHUB_STEP_SUMMARY at the end.
86+
run: pnpm tour valtown

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ Errors are a UX surface. When validating config or enforcing invariants, every e
102102
- If two records collide, name both — not just the second one found
103103
- Suggest, don't auto-correct. An error that silently repairs state hides the bug in the next run
104104

105-
Example — validator on `walkthrough.json`:
105+
Example — validator on `tour.json`:
106106

107-
-`Error: invalid walkthrough config`
108-
-`walkthrough.json: part 3 ("Parsing & Normalization") is missing "filename". Add a single-word lowercase filename (e.g. "parsing") to this part — one per part is required to route /<slug>/part/3 at publish time.`
107+
-`Error: invalid tour config`
108+
-`tour.json: part 3 ("Parsing & Normalization") is missing "filename". Add a single-word lowercase filename (e.g. "parsing") to this part — one per part is required to route /<slug>/part/3 at publish time.`
109109

110110
## ABSOLUTE RULES
111111

docs/pages-design-system.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Pages Design System
22

3-
A practical guide to styling the walkthrough site we publish at
3+
A practical guide to styling the tour site we publish at
44
`https://socketdev.github.io/socket-packageurl-js/`. Read this before
55
touching `walkthrough-overrides.css`, any generated HTML in
6-
`scripts/walkthrough.mts`, or when building a new UI that lives on that
7-
site.
6+
`scripts/tour.mts`, or when building a new UI that lives on that site.
87

98
## Who this is for
109

@@ -253,7 +252,7 @@ Use when the user is reading, comparing, or reviewing.
253252
5. No card-on-card nesting. A row lives on the page surface, not inside
254253
a box inside another box.
255254

256-
### Worked example: walkthrough TOC
255+
### Worked example: tour TOC
257256

258257
Today the TOC renders like this:
259258

@@ -515,7 +514,7 @@ overlay has four slots in strict order:
515514
4. **Fix**: one concrete step to resolve it
516515

517516
The primary button is `Fix` (or the concrete action, e.g. `Open
518-
walkthrough.json`). The secondary is `Dismiss`.
517+
tour.json`). The secondary is `Dismiss`.
519518

520519
## Anti-patterns
521520

@@ -587,17 +586,18 @@ A quick map so you know which file to open:
587586

588587
```
589588
socket-packageurl-js/
590-
├── walkthrough.json ← content: parts, titles, files, filenames
589+
├── tour.json ← content: parts, titles, files, filenames
591590
├── walkthrough-overrides.css ← tokens + component styles (THIS is the style code)
592591
├── walkthrough-drag.js ← runtime behavior (column splitter)
593592
├── walkthrough-comments.js ← runtime behavior (comments panel)
594593
├── scripts/
595-
│ └── walkthrough.mts ← generator + post-processor (generates HTML)
594+
│ └── tour.mts ← generator + post-processor (generates HTML)
596595
├── .github/workflows/
597596
│ └── pages.yml ← CI: build + deploy to GitHub Pages
598597
└── docs/
599598
├── api.md ← library API reference
600599
├── types.md ← TypeScript types reference
600+
├── tour.md ← how the build pipeline works
601601
└── pages-design-system.md ← you are here
602602
```
603603

@@ -624,6 +624,6 @@ keeping it honest:
624624
- [walkthrough-overrides.css](../walkthrough-overrides.css) — the CSS
625625
tokens this doc references, with inline comments explaining why each
626626
value was picked.
627-
- [scripts/walkthrough.mts](../scripts/walkthrough.mts) — the generator
627+
- [scripts/tour.mts](../scripts/tour.mts) — the generator
628628
- post-processor; read this if you need to change the generated HTML
629629
shape (e.g. to add a new class a component needs).

0 commit comments

Comments
 (0)