@ulysses-ai/create-workspace 0.13.0-beta.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/LICENSE +21 -0
- package/README.md +108 -0
- package/bin/create.mjs +79 -0
- package/lib/git.mjs +26 -0
- package/lib/init.mjs +129 -0
- package/lib/payload.mjs +44 -0
- package/lib/prompts.mjs +113 -0
- package/lib/scaffold.mjs +84 -0
- package/lib/upgrade.mjs +42 -0
- package/package.json +43 -0
- package/template/.claude/agents/aside-researcher.md +48 -0
- package/template/.claude/agents/implementer.md +39 -0
- package/template/.claude/agents/researcher.md +40 -0
- package/template/.claude/agents/reviewer.md +47 -0
- package/template/.claude/hooks/_utils.mjs +196 -0
- package/template/.claude/hooks/_utils.test.mjs +99 -0
- package/template/.claude/hooks/post-compact.mjs +7 -0
- package/template/.claude/hooks/pre-compact.mjs +34 -0
- package/template/.claude/hooks/repo-write-detection.mjs +107 -0
- package/template/.claude/hooks/session-end.mjs +91 -0
- package/template/.claude/hooks/session-start.mjs +150 -0
- package/template/.claude/hooks/subagent-start.mjs +44 -0
- package/template/.claude/hooks/workspace-update-check.mjs +42 -0
- package/template/.claude/hooks/worktree-create.mjs +53 -0
- package/template/.claude/lib/session-frontmatter.mjs +265 -0
- package/template/.claude/lib/session-frontmatter.test.mjs +242 -0
- package/template/.claude/recipes/migrate-from-notion.md +120 -0
- package/template/.claude/rules/agent-rules.md.skip +32 -0
- package/template/.claude/rules/cloud-infrastructure.md.skip +15 -0
- package/template/.claude/rules/coherent-revisions.md +24 -0
- package/template/.claude/rules/documentation.md.skip +13 -0
- package/template/.claude/rules/git-conventions.md +34 -0
- package/template/.claude/rules/honest-pushback.md +56 -0
- package/template/.claude/rules/local-dev-environment.md.skip +60 -0
- package/template/.claude/rules/memory-guidance.md +26 -0
- package/template/.claude/rules/product-integrity.md.skip +24 -0
- package/template/.claude/rules/scope-guard.md.skip +22 -0
- package/template/.claude/rules/superpowers-workflow.md.skip +22 -0
- package/template/.claude/rules/token-economics.md.skip +31 -0
- package/template/.claude/rules/work-item-tracking.md +90 -0
- package/template/.claude/rules/workspace-structure.md +69 -0
- package/template/.claude/scripts/add-repo-to-session.mjs +78 -0
- package/template/.claude/scripts/cleanup-work-session.mjs +108 -0
- package/template/.claude/scripts/create-work-session.mjs +124 -0
- package/template/.claude/scripts/migrate-open-work.mjs +91 -0
- package/template/.claude/scripts/migrate-session-layout.mjs +236 -0
- package/template/.claude/scripts/migrate-session-layout.test.mjs +144 -0
- package/template/.claude/scripts/trackers/github-issues.mjs +170 -0
- package/template/.claude/scripts/trackers/github-issues.test.mjs +190 -0
- package/template/.claude/scripts/trackers/interface.mjs +25 -0
- package/template/.claude/scripts/trackers/interface.test.mjs +40 -0
- package/template/.claude/settings.json +107 -0
- package/template/.claude/skills/aside/SKILL.md +125 -0
- package/template/.claude/skills/braindump/SKILL.md +96 -0
- package/template/.claude/skills/build-docs-site/SKILL.md +323 -0
- package/template/.claude/skills/build-docs-site/checklists/framing.md +221 -0
- package/template/.claude/skills/build-docs-site/checklists/pitfalls.md +228 -0
- package/template/.claude/skills/build-docs-site/checklists/review.md +130 -0
- package/template/.claude/skills/build-docs-site/scripts/bulk-fill-migration.py +393 -0
- package/template/.claude/skills/build-docs-site/scripts/forbidden-word-grep.mjs +159 -0
- package/template/.claude/skills/build-docs-site/scripts/leak-grep.mjs +328 -0
- package/template/.claude/skills/build-docs-site/templates/custom.css.tmpl +212 -0
- package/template/.claude/skills/build-docs-site/templates/docusaurus.config.ts.tmpl +95 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/Arrow.tsx +87 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/Box.tsx +90 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/DiagramContainer.tsx +46 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/Region.tsx +68 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/SectionTitle.tsx +42 -0
- package/template/.claude/skills/build-docs-site/templates/primitives/tokens.ts +67 -0
- package/template/.claude/skills/build-docs-site/templates/sidebars.ts.tmpl +89 -0
- package/template/.claude/skills/build-docs-site/templates/spec.md.tmpl +119 -0
- package/template/.claude/skills/complete-work/SKILL.md +369 -0
- package/template/.claude/skills/handoff/SKILL.md +98 -0
- package/template/.claude/skills/maintenance/SKILL.md +116 -0
- package/template/.claude/skills/pause-work/SKILL.md +98 -0
- package/template/.claude/skills/promote/SKILL.md +77 -0
- package/template/.claude/skills/release/SKILL.md +126 -0
- package/template/.claude/skills/setup-tracker/SKILL.md +117 -0
- package/template/.claude/skills/start-work/SKILL.md +234 -0
- package/template/.claude/skills/sync-work/SKILL.md +73 -0
- package/template/.claude/skills/workspace-init/SKILL.md +420 -0
- package/template/.claude/skills/workspace-update/SKILL.md +108 -0
- package/template/.mcp.json +12 -0
- package/template/CLAUDE.md.tmpl +32 -0
- package/template/_gitignore +28 -0
- package/template/workspace.json.tmpl +15 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-docs-site
|
|
3
|
+
description: Build a comprehensive Docusaurus documentation site for a project. Consolidates scattered knowledge sources (README, docs/, existing sites, code, shared context, chat dumps, exports) into a coherent branded reference with theme-aware diagrams. Replaces existing documentation while using it as raw material. Multi-hour skill — requires an active work session.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build Docs Site
|
|
7
|
+
|
|
8
|
+
Orchestrates the creation of a comprehensive, project-specific documentation site. Takes the user through framing, source gathering, scaffolding, writing, review, and diagrams — producing a Docusaurus site that consolidates scattered knowledge into a coherent branded reference.
|
|
9
|
+
|
|
10
|
+
The intent is to **replace** existing documentation while treating it as raw material. Bad docs become exponentially better because the skill applies structure, narrative, diagrams, branding, and editorial discipline. Good docs become better because the skill fills gaps from the codebase and surfaces prior art.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
- `/build-docs-site` — start a new site or resume an in-progress one in the active work session
|
|
15
|
+
- `/build-docs-site --diagrams` — explicitly resume at Phase 7 (diagrams) on an existing site
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
This skill requires an active work session. It does multi-hour work and loses state on context compaction without one.
|
|
20
|
+
|
|
21
|
+
- Run `/start-work` first if no session is active
|
|
22
|
+
- Confirm the target project repo (the skill uses the session marker's `repos[0]` if there's only one)
|
|
23
|
+
- Default output location: `apps/docs-site/` for monorepos, `docs-site/` otherwise
|
|
24
|
+
- Docusaurus 3.10+ is the target — Node 20+ required on the user's machine
|
|
25
|
+
|
|
26
|
+
If any prerequisite fails, stop with a clear instruction. Do not proceed.
|
|
27
|
+
|
|
28
|
+
## Sub-resources
|
|
29
|
+
|
|
30
|
+
This skill bundles templates, scripts, and checklists in subdirectories:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
build-docs-site/
|
|
34
|
+
├── SKILL.md (this file)
|
|
35
|
+
├── templates/
|
|
36
|
+
│ ├── docusaurus.config.ts.tmpl
|
|
37
|
+
│ ├── custom.css.tmpl
|
|
38
|
+
│ ├── sidebars.ts.tmpl
|
|
39
|
+
│ ├── spec.md.tmpl
|
|
40
|
+
│ └── primitives/
|
|
41
|
+
│ ├── Box.tsx
|
|
42
|
+
│ ├── Arrow.tsx
|
|
43
|
+
│ ├── SectionTitle.tsx
|
|
44
|
+
│ ├── Region.tsx
|
|
45
|
+
│ ├── DiagramContainer.tsx
|
|
46
|
+
│ └── tokens.ts
|
|
47
|
+
├── scripts/
|
|
48
|
+
│ ├── leak-grep.mjs
|
|
49
|
+
│ ├── forbidden-word-grep.mjs
|
|
50
|
+
│ └── bulk-fill-migration.py
|
|
51
|
+
└── checklists/
|
|
52
|
+
├── framing.md
|
|
53
|
+
├── review.md
|
|
54
|
+
└── pitfalls.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
References below use paths relative to the skill directory.
|
|
58
|
+
|
|
59
|
+
## Flow
|
|
60
|
+
|
|
61
|
+
### Phase 0 — Prerequisites and project confirmation
|
|
62
|
+
|
|
63
|
+
1. Verify an active work session exists. If not: stop and instruct the user to run `/start-work`.
|
|
64
|
+
2. Read the session marker. Identify the target project repo. If multiple repos, ask which one.
|
|
65
|
+
3. Determine the output path. Default rules:
|
|
66
|
+
- Monorepo (workspace files at root): `apps/docs-site/`
|
|
67
|
+
- Single-package repo: `docs-site/`
|
|
68
|
+
4. Check for an existing site at the output path. If present, ask whether to:
|
|
69
|
+
- Replace it entirely
|
|
70
|
+
- Augment it (add chapters, keep existing ones)
|
|
71
|
+
- Cancel
|
|
72
|
+
5. Create the task list for the rest of the phases (use TaskCreate for each phase). The user can see progress.
|
|
73
|
+
|
|
74
|
+
### Phase 1 — Framing
|
|
75
|
+
|
|
76
|
+
Walk through `checklists/framing.md`. Eight questions, sequential, reflect each answer back. Do not advance until all eight are answered.
|
|
77
|
+
|
|
78
|
+
The eight questions:
|
|
79
|
+
1. Audience
|
|
80
|
+
2. Existing documentation
|
|
81
|
+
3. External knowledge sources
|
|
82
|
+
4. Research treatment (timing + designed-vs-built)
|
|
83
|
+
5. Language constraints
|
|
84
|
+
6. Brand identity
|
|
85
|
+
7. Reading pattern and chapter sizing
|
|
86
|
+
8. Structure
|
|
87
|
+
|
|
88
|
+
After all answers, summarize and confirm before moving on.
|
|
89
|
+
|
|
90
|
+
### Phase 2 — Source gathering
|
|
91
|
+
|
|
92
|
+
Pull material from every source identified in Phase 1.
|
|
93
|
+
|
|
94
|
+
For the codebase:
|
|
95
|
+
- Use Glob and Grep to find architectural patterns, public APIs, data models, configuration schemas
|
|
96
|
+
- Read actual implementations, not just existing docs about them
|
|
97
|
+
|
|
98
|
+
For shared context:
|
|
99
|
+
- Walk `shared-context/` for handoffs, braindumps, locked team knowledge, release notes
|
|
100
|
+
|
|
101
|
+
For work-session history:
|
|
102
|
+
- Walk `work-sessions/*/workspace/session.md` for any currently-active session trackers — their bodies may contain decisions not yet consumed into release notes
|
|
103
|
+
- Check git history for previously-completed session trackers that were synthesized into release notes by `/complete-work`
|
|
104
|
+
|
|
105
|
+
For existing project documentation (from Phase 1 Q2):
|
|
106
|
+
- Read every file the user pointed at
|
|
107
|
+
- Catalog: topic covered, length, freshness, whether it's being replaced or just referenced
|
|
108
|
+
|
|
109
|
+
For Notion exports (from Phase 1 Q3):
|
|
110
|
+
- Notion exports are nested zips with emoji filenames. Use Python's `zipfile` module — see `checklists/pitfalls.md` section 5.
|
|
111
|
+
|
|
112
|
+
For chat history:
|
|
113
|
+
- If the user pointed at chat dumps or the Claude projects directory, scan recent sessions for design discussions
|
|
114
|
+
|
|
115
|
+
Output: write `sources.md` to the project worktree root. One section per source category. Each entry: file path, topic, quality (sparse / adequate / comprehensive / outdated), whether it's being replaced or referenced.
|
|
116
|
+
|
|
117
|
+
### Phase 3 — Spec writing
|
|
118
|
+
|
|
119
|
+
Read `templates/spec.md.tmpl`. Fill it in based on Phase 1 answers and the Phase 2 source inventory. Write the result to `design-docs-site.md` in the project worktree root.
|
|
120
|
+
|
|
121
|
+
The spec includes:
|
|
122
|
+
- Purpose and audience
|
|
123
|
+
- Reading pattern (engagement, cohesion, chapter split threshold)
|
|
124
|
+
- Structure (parts, chapters, appendices)
|
|
125
|
+
- Existing documentation mapping (table: old file → new chapter)
|
|
126
|
+
- Source inventory
|
|
127
|
+
- Brand and style
|
|
128
|
+
- Language constraints
|
|
129
|
+
- Research treatment
|
|
130
|
+
- Diagrams plan (stubs, fleshed out before Phase 7)
|
|
131
|
+
- Implementation-detail rule with project-specific terms
|
|
132
|
+
- Brainstorm-acronym translations
|
|
133
|
+
|
|
134
|
+
#### Implementation-detail rule
|
|
135
|
+
|
|
136
|
+
The documentation describes concepts and roles, not library choices. A library, framework, or model name appears only in the Tech Stack appendix unless the choice itself is architecturally meaningful.
|
|
137
|
+
|
|
138
|
+
Before writing the spec, ask: "Any project-specific terms I should add to the leak detection list?" These get added to the spec's `Project-specific leak terms` section.
|
|
139
|
+
|
|
140
|
+
#### Brainstorm-acronym rule
|
|
141
|
+
|
|
142
|
+
Ask: "Any terms from brainstorming that should be translated to descriptive names? Acronyms can survive only as parenthetical labels after the descriptive name is established."
|
|
143
|
+
|
|
144
|
+
For each acronym, propose a descriptive name and record both in the spec's `Brainstorm-acronym translations` section.
|
|
145
|
+
|
|
146
|
+
#### Spec review
|
|
147
|
+
|
|
148
|
+
Show the spec to the user. If approved, skip the plan phase by default — comprehensive docs-site specs ARE implementation plans. Generate a separate plan only if the user requests one for sections that need breakdown.
|
|
149
|
+
|
|
150
|
+
### Phase 4 — Scaffold
|
|
151
|
+
|
|
152
|
+
Get the infrastructure clean before writing any content.
|
|
153
|
+
|
|
154
|
+
#### Install Docusaurus
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
cd {project-root}
|
|
158
|
+
npx create-docusaurus@latest {output-path} classic --typescript
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### Cleanup defaults
|
|
162
|
+
|
|
163
|
+
Remove:
|
|
164
|
+
- `blog/` directory
|
|
165
|
+
- `src/pages/index.tsx`
|
|
166
|
+
- `docs/tutorial-basics/` and `docs/tutorial-extras/`
|
|
167
|
+
- Default tutorial sidebar entries
|
|
168
|
+
|
|
169
|
+
#### Configure for docs-at-root
|
|
170
|
+
|
|
171
|
+
Replace `docusaurus.config.ts` with the rendered `templates/docusaurus.config.ts.tmpl`, substituting placeholders from the spec's brand and project info.
|
|
172
|
+
|
|
173
|
+
Key settings:
|
|
174
|
+
- `routeBasePath: '/'` in the docs preset options
|
|
175
|
+
- `blog: false` in the preset options
|
|
176
|
+
- Root doc gets `slug: /` frontmatter
|
|
177
|
+
|
|
178
|
+
#### Apply brand
|
|
179
|
+
|
|
180
|
+
Replace `src/css/custom.css` with the rendered `templates/custom.css.tmpl`, substituting brand placeholders from the spec. The template includes:
|
|
181
|
+
|
|
182
|
+
- Infima theme overrides (light + dark)
|
|
183
|
+
- `--dx-*` diagram color variables
|
|
184
|
+
- `.dx-fill-*` and `.dx-stroke-*` rule-layer classes (REQUIRED for diagrams — see `checklists/pitfalls.md` section 1)
|
|
185
|
+
- Typography polish: justified text, heading spacing, content column width
|
|
186
|
+
- Diagram container styling
|
|
187
|
+
|
|
188
|
+
#### Build sidebar placeholders
|
|
189
|
+
|
|
190
|
+
Replace `sidebars.ts` with the rendered `templates/sidebars.ts.tmpl`, populated with the chapter list from the spec. Each chapter gets a placeholder doc stub.
|
|
191
|
+
|
|
192
|
+
#### Copy diagram primitives
|
|
193
|
+
|
|
194
|
+
Copy `templates/primitives/` (Box, Arrow, SectionTitle, Region, DiagramContainer, tokens) into `{output-path}/src/diagrams/primitives/`. These are fixed copy-through files.
|
|
195
|
+
|
|
196
|
+
#### MDXComponents global (optional)
|
|
197
|
+
|
|
198
|
+
If the project will have many diagrams, create `src/theme/MDXComponents.tsx` so chapter components can be referenced globally without per-file imports.
|
|
199
|
+
|
|
200
|
+
#### Build verification
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cd {output-path}
|
|
204
|
+
npm run build # must complete with no errors
|
|
205
|
+
npm start # dev server
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Have the user visually verify the landing page. Commit the scaffold as a clean starting point.
|
|
209
|
+
|
|
210
|
+
### Phase 5 — Content writing
|
|
211
|
+
|
|
212
|
+
Write chapters one at a time. Main thread only — no subagents.
|
|
213
|
+
|
|
214
|
+
#### Execution rules
|
|
215
|
+
|
|
216
|
+
- **No subagents for writing.** The main thread preserves coherence.
|
|
217
|
+
- **Inflight tracker updates every 2-3 chapters.** Write a one-paragraph summary of what was written, decisions made, constraints surfaced. Survives compaction.
|
|
218
|
+
- **No pausing at every chapter boundary.** Push through unless the user explicitly stops.
|
|
219
|
+
|
|
220
|
+
#### Chapter order
|
|
221
|
+
|
|
222
|
+
Write in spec order with **one inversion: Chapter 1 is written last.** Write a placeholder Chapter 1 first, then replace it at the end of Phase 5 with full authority over what the rest of the book actually says.
|
|
223
|
+
|
|
224
|
+
#### After each chapter
|
|
225
|
+
|
|
226
|
+
- Re-read the spec section for that chapter to confirm nothing was missed
|
|
227
|
+
- Note any gaps and add to a "gaps surfaced during writing" list for review
|
|
228
|
+
- If the chapter exceeds the spec's `chapterSplitThreshold`, flag it for potential splitting (deferred to Phase 6 feedback)
|
|
229
|
+
|
|
230
|
+
#### Source integration
|
|
231
|
+
|
|
232
|
+
While writing, draw from the Phase 2 sources. Each chapter may consolidate content from multiple sources. Track which sources fed which chapter so Phase 6 coverage check can verify nothing was dropped.
|
|
233
|
+
|
|
234
|
+
### Phase 6 — Review sweeps
|
|
235
|
+
|
|
236
|
+
Walk through `checklists/review.md`. Four passes:
|
|
237
|
+
|
|
238
|
+
1. **Leak grep** — `node .claude/skills/build-docs-site/scripts/leak-grep.mjs {project-root} {docs-path}`. For each hit, propose a replacement. User approves, rewrites, or marks acceptable.
|
|
239
|
+
|
|
240
|
+
2. **Forbidden-word sweep** — `node .claude/skills/build-docs-site/scripts/forbidden-word-grep.mjs {docs-path} {wordlist.json}`. For each hit, user decides.
|
|
241
|
+
|
|
242
|
+
3. **Coverage check** — verify every item in the existing-docs mapping is covered in the new site. Update mapping rows: `replaced`, `partial`, or `superseded`.
|
|
243
|
+
|
|
244
|
+
4. **Visual check** — `npm run build`, `npm start`, user inspects in browser.
|
|
245
|
+
|
|
246
|
+
Each pass fully complete before the next.
|
|
247
|
+
|
|
248
|
+
#### Phase 6.5 — Feedback iteration
|
|
249
|
+
|
|
250
|
+
After "done" is declared, expect feedback in four categories. Address each in order.
|
|
251
|
+
|
|
252
|
+
**CSS polish** — text alignment, heading spacing, paragraph spacing, content column width. Adjust `custom.css`.
|
|
253
|
+
|
|
254
|
+
**Terminology corrections** — drop any unintended "book" framing (replace with "reference" or "documentation"). Watch for tone-reference language that crept into UI strings.
|
|
255
|
+
|
|
256
|
+
**Long-page splits** — chapters over the spec's `chapterSplitThreshold` become Docusaurus categories with overview + sub-pages. Use the category `link` property with `type: 'doc'` so the category label is clickable. Update `sidebars.ts`. Verify breadcrumbs.
|
|
257
|
+
|
|
258
|
+
**Run config** — offer to add IntelliJ run configurations (`.idea/runConfigurations/`) for dev and build. Caveat: post-worktree-merge paths may need adjustment after `/complete-work`.
|
|
259
|
+
|
|
260
|
+
### Phase 7 — Diagrams
|
|
261
|
+
|
|
262
|
+
After Phase 6 is clean, ask:
|
|
263
|
+
|
|
264
|
+
> Ready to do diagrams? This can add significant content and may benefit from a fresh work session. Options:
|
|
265
|
+
> A. Continue now (recommended if context space is plentiful)
|
|
266
|
+
> B. `/complete-work` on content and start a fresh session for diagrams
|
|
267
|
+
> C. Defer diagrams entirely
|
|
268
|
+
|
|
269
|
+
If A: continue inline.
|
|
270
|
+
If B: exit cleanly and hand off. The user re-invokes `/build-docs-site --diagrams` in the new session.
|
|
271
|
+
If C: skip to Phase 8.
|
|
272
|
+
|
|
273
|
+
#### Approach decisions
|
|
274
|
+
|
|
275
|
+
Before implementing, ask:
|
|
276
|
+
|
|
277
|
+
1. **Tooling mix.** Plain SVG with selective D3 (recommended) / D3 for everything / HTML+CSS where possible
|
|
278
|
+
2. **Reusable primitives.** Use the bundled primitives (recommended) / hand-craft each
|
|
279
|
+
3. **Interactivity.** Mostly static (recommended) / selectively interactive
|
|
280
|
+
4. **Production order.** Reading order (default) / impact order
|
|
281
|
+
|
|
282
|
+
#### Chapter-by-chapter production
|
|
283
|
+
|
|
284
|
+
The primitives are already in `src/diagrams/primitives/` from Phase 4 scaffold. For each chapter:
|
|
285
|
+
|
|
286
|
+
1. Review the chapter content
|
|
287
|
+
2. Propose 1-N diagrams with brief descriptions
|
|
288
|
+
3. Implement each as a React component in `src/diagrams/chapters/{chapter-name}/`
|
|
289
|
+
4. Convert the chapter `.md` to `.mdx` if it's not already
|
|
290
|
+
5. Embed the diagrams in the chapter
|
|
291
|
+
6. Visually verify
|
|
292
|
+
|
|
293
|
+
Reuse aggressively — if the same concept appears in multiple chapters, import the existing component rather than duplicating.
|
|
294
|
+
|
|
295
|
+
#### Pitfalls
|
|
296
|
+
|
|
297
|
+
`checklists/pitfalls.md` has the full reference. The most important ones:
|
|
298
|
+
|
|
299
|
+
- **CSS variables in SVG fill don't paint reliably** — always use `className={cls.fill.X}`, never `fill={...}`. The primitives already do this.
|
|
300
|
+
- **Bulk migration regressions** — if you wrote chapter components with `fill={colors.X}` and need to migrate, run `python3 .claude/skills/build-docs-site/scripts/bulk-fill-migration.py {chapters-dir}`. The script handles duplicate `className=`, missing imports, and reports variable-bound fills for manual review.
|
|
301
|
+
- **Playwright viewport screenshots lie** — if a screenshot is blank, use DOM inspection via `browser_evaluate` before assuming the diagram is broken.
|
|
302
|
+
- **Arrowhead markers don't theme-switch** — acceptable cosmetic mismatch, or render two markers with media query switching.
|
|
303
|
+
- **SSR for browser-only diagrams** — wrap any diagram that uses browser APIs in `<BrowserOnly>` with a function child. The primitives don't need this; it only matters if a chapter component uses `window` or `document`.
|
|
304
|
+
|
|
305
|
+
### Phase 8 — Completion
|
|
306
|
+
|
|
307
|
+
The site is ready to replace the existing documentation.
|
|
308
|
+
|
|
309
|
+
Produce a final report:
|
|
310
|
+
|
|
311
|
+
- **Files now replaced and safe to delete.** Every old doc that was used as a source and is now fully covered in the new site.
|
|
312
|
+
- **Files needing user decision.** Any old docs with content that didn't migrate cleanly — coverage check found gaps the user needs to resolve.
|
|
313
|
+
- **URLs that may need redirects.** If the old docs had live URLs, list them. The skill flags but does not set up redirects.
|
|
314
|
+
|
|
315
|
+
Update the session tracker with the final state. The skill's work ends here. `/complete-work` handles the merge, release notes, and cleanup.
|
|
316
|
+
|
|
317
|
+
## Notes
|
|
318
|
+
|
|
319
|
+
- Specs and plans live at the project worktree root, not inflight (per workspace-structure rule). They are consumed by `/complete-work` into release notes.
|
|
320
|
+
- Diagrams primitives are deliberately fixed (no project customization) because the class-based fill pattern is load-bearing for theme support.
|
|
321
|
+
- The leak grep is project-accurate because it derives the list from the project's own dependency manifests. Do not maintain a hardcoded master list — it would over-trigger for projects whose docs legitimately discuss their own dependencies.
|
|
322
|
+
- The forbidden-word grep is per-project — each project supplies its own list from Phase 1 Q5. There is no default.
|
|
323
|
+
- This skill takes hours, not minutes. Always run inside an active work session. Update the session tracker periodically so context compaction doesn't lose state.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Framing Checklist
|
|
2
|
+
|
|
3
|
+
The eight framing questions for `/build-docs-site` Phase 1. Ask sequentially. Reflect each answer back before moving on. Capture all answers in the spec.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Audience
|
|
8
|
+
|
|
9
|
+
> Who is this documentation primarily for? Pick one or describe your own.
|
|
10
|
+
>
|
|
11
|
+
> A. External stakeholders (investors, partners, collaborators)
|
|
12
|
+
> B. Future contributors (people joining the project)
|
|
13
|
+
> C. Community (product users, open-source consumers)
|
|
14
|
+
> D. Personal authoritative reference (study, revisit, present from)
|
|
15
|
+
> E. Other — describe
|
|
16
|
+
|
|
17
|
+
**Multiple answers are acceptable** with weighting (e.g., "D primary, A secondary").
|
|
18
|
+
|
|
19
|
+
**Records as:** `audience.primary`, `audience.secondary` in the spec.
|
|
20
|
+
|
|
21
|
+
**Affects:**
|
|
22
|
+
- Tone (formal/conversational/technical)
|
|
23
|
+
- Implementation-detail strictness in Phase 6 (external is strict; personal allows selective naming)
|
|
24
|
+
- Structure recommendation in Q8
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Existing documentation
|
|
29
|
+
|
|
30
|
+
> What existing documentation does your project have? I'll use it as a source and help you replace it with something better.
|
|
31
|
+
>
|
|
32
|
+
> - Repo README and other root markdown files
|
|
33
|
+
> - `docs/` directory in the repo
|
|
34
|
+
> - An existing docs site (Docusaurus, MkDocs, GitBook, Starlight, other)
|
|
35
|
+
> - Generated API docs
|
|
36
|
+
> - Code comments / JSDoc / TSDoc
|
|
37
|
+
> - Nothing — this is greenfield
|
|
38
|
+
|
|
39
|
+
For each selected option, **ask for specific paths**.
|
|
40
|
+
|
|
41
|
+
**Records as:** `existingDocs[]` in the spec, populating the migration mapping table.
|
|
42
|
+
|
|
43
|
+
**Affects:**
|
|
44
|
+
- Phase 2 source gathering (these become first-class sources)
|
|
45
|
+
- Phase 3 migration mapping
|
|
46
|
+
- Phase 6 coverage check
|
|
47
|
+
- Final completion report (which files are now safe to delete)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 3. External knowledge sources
|
|
52
|
+
|
|
53
|
+
> What other sources should I pull from?
|
|
54
|
+
>
|
|
55
|
+
> - Shared context files in the workspace
|
|
56
|
+
> - Claude chat history from prior sessions on this project
|
|
57
|
+
> - Notion export (zip)
|
|
58
|
+
> - Confluence / wiki export
|
|
59
|
+
> - Google Docs
|
|
60
|
+
> - Other — describe
|
|
61
|
+
|
|
62
|
+
For each selected source, ask for paths or access methods.
|
|
63
|
+
|
|
64
|
+
**Notion gotcha:** Notion exports are nested zips with emoji filenames in the inner zip. Use Python's `zipfile` module, not the standard `unzip` command.
|
|
65
|
+
|
|
66
|
+
**Records as:** `externalSources[]` in the spec.
|
|
67
|
+
|
|
68
|
+
**Affects:** Phase 2 source gathering.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 4. Research treatment
|
|
73
|
+
|
|
74
|
+
Two sub-questions.
|
|
75
|
+
|
|
76
|
+
### 4a. Research timing
|
|
77
|
+
|
|
78
|
+
> Was deeper research part of the original thought process, or added later?
|
|
79
|
+
>
|
|
80
|
+
> - Integrate throughout (research shaped the design from the start)
|
|
81
|
+
> - Dedicated section only (research is valuable context but not foundational)
|
|
82
|
+
> - Omit (research is tangential)
|
|
83
|
+
|
|
84
|
+
### 4b. Designed vs built
|
|
85
|
+
|
|
86
|
+
> Should the documentation reflect the full design or just what ships?
|
|
87
|
+
>
|
|
88
|
+
> - Unified design (implementation state is a separate concern)
|
|
89
|
+
> - Flag what ships vs what's designed (explicit markers on unbuilt features)
|
|
90
|
+
|
|
91
|
+
**Records as:** `researchTreatment.timing`, `researchTreatment.designedVsBuilt` in the spec.
|
|
92
|
+
|
|
93
|
+
**Affects:**
|
|
94
|
+
- Where research lives in the structure
|
|
95
|
+
- Whether unbuilt features get explicit "designed, not built" markers
|
|
96
|
+
- The narrative voice (factual vs aspirational)
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 5. Language constraints
|
|
101
|
+
|
|
102
|
+
> Any words, phrases, or framings you want me to avoid?
|
|
103
|
+
|
|
104
|
+
This is intentionally open-ended. Collect verbatim. If the user has none, move on — don't push.
|
|
105
|
+
|
|
106
|
+
**Records as:** `languageConstraints[]` in the spec, plus a separate `wordlist.json` file used by the forbidden-word grep in Phase 6.
|
|
107
|
+
|
|
108
|
+
**Format for wordlist.json:**
|
|
109
|
+
```json
|
|
110
|
+
[
|
|
111
|
+
{"word": "term", "reason": "why to avoid it"}
|
|
112
|
+
]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Affects:** Phase 6 review pass 2 (forbidden-word sweep).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 6. Brand identity
|
|
120
|
+
|
|
121
|
+
> Should the site use your project's brand (fonts, colors, voice) or stay neutral?
|
|
122
|
+
>
|
|
123
|
+
> - Use project brand — point to the brand spec, identity doc, or existing site CSS
|
|
124
|
+
> - Neutral — Docusaurus defaults with tasteful minimal overrides
|
|
125
|
+
|
|
126
|
+
If the user has a brand but no spec, ask for:
|
|
127
|
+
- Primary color (hex)
|
|
128
|
+
- Accent color (hex)
|
|
129
|
+
- Background color (light mode)
|
|
130
|
+
- Background color (dark mode)
|
|
131
|
+
- Heading font
|
|
132
|
+
- Body font
|
|
133
|
+
- Monospace font
|
|
134
|
+
- Tone/voice guidelines (1-3 sentences)
|
|
135
|
+
|
|
136
|
+
**Records as:** `brand.*` in the spec.
|
|
137
|
+
|
|
138
|
+
**Affects:** Phase 4 scaffold (custom.css.tmpl substitution).
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 7. Reading pattern and chapter sizing
|
|
143
|
+
|
|
144
|
+
Three sub-questions in sequence.
|
|
145
|
+
|
|
146
|
+
### 7a. Engagement style
|
|
147
|
+
|
|
148
|
+
> How will readers engage with this site?
|
|
149
|
+
>
|
|
150
|
+
> A. Linear — read top-to-bottom or major-section-by-major-section
|
|
151
|
+
> B. Lookup — search or navigate to specific topics as needed
|
|
152
|
+
> C. Both — deep dive on first read, lookup on return visits
|
|
153
|
+
|
|
154
|
+
### 7b. Content cohesion preference
|
|
155
|
+
|
|
156
|
+
> When a chapter covers multiple related concepts, should they stay together or split apart?
|
|
157
|
+
>
|
|
158
|
+
> A. Together — context is more valuable than navigation. Longer pages are fine.
|
|
159
|
+
> B. Apart — each concept gets its own page, short and focused.
|
|
160
|
+
> C. Depends on length — split only when a chapter becomes unwieldy.
|
|
161
|
+
|
|
162
|
+
### 7c. Chapter length target
|
|
163
|
+
|
|
164
|
+
Based on the answers above, **propose a default split threshold**:
|
|
165
|
+
|
|
166
|
+
| Engagement | Cohesion | Recommended threshold |
|
|
167
|
+
|------------|----------|------------------------|
|
|
168
|
+
| Linear | Together | 300+ lines |
|
|
169
|
+
| Linear | Apart | 150 lines |
|
|
170
|
+
| Linear | Depends | 200 lines |
|
|
171
|
+
| Lookup | Together | 200 lines |
|
|
172
|
+
| Lookup | Apart | 80–120 lines |
|
|
173
|
+
| Lookup | Depends | 150 lines |
|
|
174
|
+
| Both | Together | 250 lines |
|
|
175
|
+
| Both | Apart | 120 lines |
|
|
176
|
+
| Both | Depends | 180 lines |
|
|
177
|
+
|
|
178
|
+
> Based on your answers, I'd suggest splitting chapters longer than {N} lines. Sound right, or adjust?
|
|
179
|
+
|
|
180
|
+
**Records as:** `readingPattern.engagement`, `readingPattern.cohesion`, `readingPattern.chapterSplitThreshold` in the spec.
|
|
181
|
+
|
|
182
|
+
**Affects:**
|
|
183
|
+
- Phase 6 long-chapter splits
|
|
184
|
+
- How chapters are written in Phase 5 (more concise vs more comprehensive)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 8. Structure
|
|
189
|
+
|
|
190
|
+
Based on Q1 (audience) and Q7 (reading pattern), propose two or three structural options:
|
|
191
|
+
|
|
192
|
+
> Here are some structural options for your documentation:
|
|
193
|
+
>
|
|
194
|
+
> A. **Three-part** (Foundations → Systems → Integration). DDIA-style, deeply structured. Works for technical products with layered architecture.
|
|
195
|
+
> B. **Narrative spine** — follow a user journey through the product. Works for user-facing products or tutorials.
|
|
196
|
+
> C. **Hybrid** — narrative within a structured frame. Works when the product has both architectural depth and a journey story.
|
|
197
|
+
>
|
|
198
|
+
> Based on your answers, I'd suggest {recommendation}. Which fits your project, or describe your own?
|
|
199
|
+
|
|
200
|
+
**Records as:** `structure.type`, `structure.parts[]`, `structure.chapters[]` in the spec.
|
|
201
|
+
|
|
202
|
+
**Affects:** Everything downstream — sidebar, chapter list, source-to-chapter mapping.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## After all eight questions
|
|
207
|
+
|
|
208
|
+
Reflect the full set back as a summary:
|
|
209
|
+
|
|
210
|
+
> Here's what I have:
|
|
211
|
+
>
|
|
212
|
+
> - Audience: {primary} ({secondary if any})
|
|
213
|
+
> - Existing docs: {count} files / sites identified
|
|
214
|
+
> - External sources: {list}
|
|
215
|
+
> - Research treatment: {timing}, {designedVsBuilt}
|
|
216
|
+
> - Language constraints: {count} terms
|
|
217
|
+
> - Brand: {project / neutral}
|
|
218
|
+
> - Reading pattern: {engagement}, {cohesion}, {threshold} line threshold
|
|
219
|
+
> - Structure: {type}
|
|
220
|
+
>
|
|
221
|
+
> Ready to move to Phase 2 (source gathering)?
|