superspecs 0.1.0 → 0.2.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/.skills/cross-linker/SKILL.md +119 -0
- package/.skills/design-import/SKILL.md +289 -0
- package/.skills/execute-subagent/SKILL.md +31 -11
- package/.skills/execute-tdd/SKILL.md +5 -3
- package/.skills/plan-discuss/SKILL.md +14 -5
- package/.skills/plan-grill/SKILL.md +209 -0
- package/.skills/plan-spec/SKILL.md +34 -6
- package/.skills/tag-taxonomy/SKILL.md +141 -0
- package/.skills/techstack/SKILL.md +7 -5
- package/.skills/verify-wiki/SKILL.md +174 -35
- package/.skills/wiki-capture/SKILL.md +136 -0
- package/.skills/wiki-lint/SKILL.md +245 -0
- package/.skills/wiki-query/SKILL.md +157 -0
- package/.skills/wiki-rebuild/SKILL.md +163 -0
- package/.skills/wiki-status/SKILL.md +156 -0
- package/AGENTS.md +42 -13
- package/HOWITWORKS.md +151 -49
- package/README.md +375 -62
- package/package.json +1 -1
- package/setup.sh +481 -37
|
@@ -11,6 +11,8 @@ You are distilling the completed feature into the living project wiki.
|
|
|
11
11
|
|
|
12
12
|
The feature works. The tests pass. Now you extract the knowledge that should survive beyond this session — so future planning, future features, and future sessions start informed.
|
|
13
13
|
|
|
14
|
+
The wiki lives at `superspec/wiki/` and doubles as an **Obsidian vault**. Write every page to be navigable in Obsidian: use `[[wikilinks]]` for internal links, YAML frontmatter with `tags:`, and keep each page focused on a single knowledge unit.
|
|
15
|
+
|
|
14
16
|
## What to distill (and what not to)
|
|
15
17
|
|
|
16
18
|
**Distill:**
|
|
@@ -26,6 +28,23 @@ The feature works. The tests pass. Now you extract the knowledge that should sur
|
|
|
26
28
|
- Task checklists or execution logs
|
|
27
29
|
- The full spec (it lives in `superspec/specs/`)
|
|
28
30
|
|
|
31
|
+
## Provenance
|
|
32
|
+
|
|
33
|
+
Mark the origin of every claim so future readers know what is fact vs. synthesis:
|
|
34
|
+
|
|
35
|
+
- Default (no marker): directly extracted from source material
|
|
36
|
+
- `^[inferred]` — synthesized by the agent; not stated verbatim in sources
|
|
37
|
+
- `^[ambiguous]` — sources disagree or the claim is uncertain
|
|
38
|
+
|
|
39
|
+
Example:
|
|
40
|
+
```
|
|
41
|
+
The team chose Redis over Postgres for session storage because of latency requirements.
|
|
42
|
+
A TTL of 15 minutes was selected as the balance point. ^[inferred]
|
|
43
|
+
Note: the DISCUSS.md mentions 10 minutes but the spec says 15 — see review-log. ^[ambiguous]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
29
48
|
## Steps
|
|
30
49
|
|
|
31
50
|
### 1. Gather the source material
|
|
@@ -36,26 +55,87 @@ Read:
|
|
|
36
55
|
- `superspec/phases/<slug>-execute/review-log.md`
|
|
37
56
|
- The implementation itself (key files touched)
|
|
38
57
|
|
|
39
|
-
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 2. Scan existing wiki pages first
|
|
61
|
+
|
|
62
|
+
**Before writing anything new**, scan the existing wiki for related content.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
superspec/wiki/
|
|
66
|
+
├── Home.md ← read first: domain index
|
|
67
|
+
├── log.md ← read: recent activity
|
|
68
|
+
└── <domain>/
|
|
69
|
+
├── Home.md ← domain index
|
|
70
|
+
└── *.md ← existing knowledge pages
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For each existing page that overlaps with this feature:
|
|
74
|
+
- **Update it** — don't create a duplicate. Add a new `## <New Section>` or extend existing sections.
|
|
75
|
+
- Mark it with `updated: <today>` in the YAML frontmatter.
|
|
76
|
+
- Note it in the "pages_updated" list for the manifest and log.
|
|
77
|
+
|
|
78
|
+
**Rule:** One knowledge unit = one page. Merge, don't proliferate.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### 3. Determine wiki structure
|
|
83
|
+
|
|
84
|
+
Read `superspec/wiki/_meta/taxonomy.md` → build the canonical domain set from the `## Domains` table.
|
|
85
|
+
|
|
86
|
+
**Domain routing — use this decision tree for every knowledge unit:**
|
|
87
|
+
|
|
88
|
+
1. **Reusable cross-cutting pattern** (error handling, caching, retry, logging, testing patterns)?
|
|
89
|
+
→ `patterns/`
|
|
90
|
+
|
|
91
|
+
2. **Architecture decision** — why X was chosen over Y, with trade-offs documented?
|
|
92
|
+
→ `decisions/`
|
|
93
|
+
|
|
94
|
+
3. **Authentication, authorization, sessions, or tokens**?
|
|
95
|
+
→ `auth/`
|
|
96
|
+
|
|
97
|
+
4. **API contract, endpoint design, versioning, or request/response shape**?
|
|
98
|
+
→ `api/`
|
|
99
|
+
|
|
100
|
+
5. **Data model, schema, or storage decision**?
|
|
101
|
+
→ `data/`
|
|
102
|
+
|
|
103
|
+
6. **Infrastructure, deployment, CI/CD, or environment config**?
|
|
104
|
+
→ `infra/`
|
|
105
|
+
|
|
106
|
+
7. **Frontend, UI component, routing, or styling pattern**?
|
|
107
|
+
→ `ui/`
|
|
40
108
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
109
|
+
8. **Feature-specific knowledge that fits none of the above**?
|
|
110
|
+
→ Create a domain named after the feature slug (e.g. `payment-flow/`)
|
|
111
|
+
→ Add the new domain to `_meta/taxonomy.md` under "Project Domains" before creating the folder
|
|
44
112
|
|
|
45
|
-
|
|
113
|
+
**Rules:**
|
|
114
|
+
- **One domain per page.** If a page spans multiple concerns, split it into separate pages.
|
|
115
|
+
- **Prefer existing domains.** Only create a new domain if nothing in the taxonomy fits.
|
|
116
|
+
- **Feature traceability lives in `spec:` frontmatter**, not in the folder name. A `payment-flow` feature can have pages in `api/`, `data/`, and `patterns/` — all tagged `spec: "[[payment-flow]]"`.
|
|
46
117
|
|
|
47
|
-
|
|
118
|
+
After routing: does the chosen domain folder have a `Home.md`? If not, create a domain index listing its pages.
|
|
48
119
|
|
|
49
|
-
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### 4. Write wiki pages
|
|
123
|
+
|
|
124
|
+
For each new knowledge unit, create `superspec/wiki/<domain>/<topic>.md`:
|
|
50
125
|
|
|
51
126
|
```markdown
|
|
52
127
|
---
|
|
53
128
|
title: <Page Title>
|
|
129
|
+
summary: <1–2 sentence summary used for fast query previews — what this is and why it matters>
|
|
54
130
|
tags: [<domain>, <feature-slug>, <topic-tags>]
|
|
55
|
-
spec:
|
|
56
|
-
created: <
|
|
57
|
-
updated: <
|
|
58
|
-
|
|
131
|
+
spec: "[[<slug>]]"
|
|
132
|
+
created: <YYYY-MM-DD>
|
|
133
|
+
updated: <YYYY-MM-DD>
|
|
134
|
+
provenance:
|
|
135
|
+
sources: [specs/<slug>/spec.md, phases/<slug>-execute/review-log.md]
|
|
136
|
+
extracted: ~70%
|
|
137
|
+
inferred: ~25%
|
|
138
|
+
ambiguous: ~5%
|
|
59
139
|
---
|
|
60
140
|
|
|
61
141
|
# <Page Title>
|
|
@@ -74,9 +154,6 @@ When and why this was built. What problem it solves.
|
|
|
74
154
|
**Because:** <reason>
|
|
75
155
|
**Trade-off:** <what was given up>
|
|
76
156
|
|
|
77
|
-
### <Decision Topic>
|
|
78
|
-
...
|
|
79
|
-
|
|
80
157
|
## Patterns
|
|
81
158
|
|
|
82
159
|
### <Pattern Name>
|
|
@@ -100,26 +177,82 @@ When and why this was built. What problem it solves.
|
|
|
100
177
|
- [ ] <Unresolved question deferred to future work>
|
|
101
178
|
|
|
102
179
|
## Related
|
|
103
|
-
- [[<
|
|
180
|
+
- [[<domain>/<page>]] — <what it covers>
|
|
104
181
|
- `<path/to/key/file>` — <what it does>
|
|
105
182
|
```
|
|
106
183
|
|
|
107
|
-
|
|
184
|
+
**Provenance markers in body text:**
|
|
185
|
+
- No marker = extracted directly from source material
|
|
186
|
+
- `^[inferred]` = agent synthesis, not stated verbatim
|
|
187
|
+
- `^[ambiguous]` = sources disagree or claim is uncertain
|
|
188
|
+
|
|
189
|
+
**Obsidian linking rules:**
|
|
190
|
+
- Internal links: always use `[[page-title]]` or `[[folder/page]]`, never markdown `[text](path.md)`
|
|
191
|
+
- File references: use backtick code spans for source file paths (`src/auth/jwt.ts`)
|
|
192
|
+
- Tags: lowercase, hyphenated (`auth`, `jwt-tokens`, `session-management`)
|
|
193
|
+
- Tags must come from `_meta/taxonomy.md` if it exists; add new tags there if needed
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 5. Update the vault home page
|
|
108
198
|
|
|
109
|
-
Update `superspec/wiki/
|
|
199
|
+
Update `superspec/wiki/Home.md`:
|
|
110
200
|
|
|
111
201
|
```markdown
|
|
202
|
+
---
|
|
203
|
+
title: Wiki Home
|
|
204
|
+
tags: [index, home]
|
|
205
|
+
updated: <YYYY-MM-DD>
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
# Project Wiki
|
|
209
|
+
|
|
210
|
+
...
|
|
211
|
+
|
|
112
212
|
## Domains
|
|
113
213
|
|
|
114
|
-
|
|
115
|
-
|
|
214
|
+
| Domain | Pages | Last updated |
|
|
215
|
+
|--------|-------|-------------|
|
|
216
|
+
| [[auth/Home\|auth]] | N | YYYY-MM-DD |
|
|
116
217
|
|
|
117
218
|
## Recent Updates
|
|
118
219
|
|
|
119
|
-
|
|
220
|
+
_(last 10 — full history in [[log]])_
|
|
221
|
+
|
|
222
|
+
- <YYYY-MM-DD>: [[<domain>/<page>]] — <brief description>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Each domain folder should also have its own `Home.md` listing its pages.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### 6. Cross-link
|
|
230
|
+
|
|
231
|
+
After writing all pages:
|
|
232
|
+
- Scan existing wiki pages for unlinked mentions of new page topics
|
|
233
|
+
- Add `[[wikilinks]]` where relevant
|
|
234
|
+
- Ensure the new pages link back to related existing pages
|
|
235
|
+
|
|
236
|
+
Or invoke `/superspecs:cross-linker` to automate this step.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### 7. Append to log.md
|
|
241
|
+
|
|
242
|
+
Append to `superspec/wiki/log.md` (create if missing):
|
|
243
|
+
|
|
244
|
+
```markdown
|
|
245
|
+
## [<YYYY-MM-DD>] ingest | <slug>: <feature title>
|
|
246
|
+
|
|
247
|
+
- **Created:** <domain>/<page>.md, <domain>/<page2>.md
|
|
248
|
+
- **Updated:** <domain>/<existing>.md
|
|
249
|
+
- **Domains touched:** <domain1>, <domain2>
|
|
250
|
+
- **Spec:** [[../specs/<slug>/spec.md]]
|
|
120
251
|
```
|
|
121
252
|
|
|
122
|
-
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### 8. Update the manifest
|
|
123
256
|
|
|
124
257
|
Update `superspec/wiki/_manifest.json`:
|
|
125
258
|
|
|
@@ -136,26 +269,23 @@ Update `superspec/wiki/_manifest.json`:
|
|
|
136
269
|
}
|
|
137
270
|
```
|
|
138
271
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
After writing all pages:
|
|
142
|
-
- Scan existing wiki pages for unlinked mentions of new page topics
|
|
143
|
-
- Add `[[wikilinks]]` where relevant
|
|
144
|
-
- Ensure the new pages link back to related existing pages
|
|
272
|
+
---
|
|
145
273
|
|
|
146
|
-
###
|
|
274
|
+
### 9. Update spec status
|
|
147
275
|
|
|
148
276
|
Update `superspec/specs/<slug>/status.md`:
|
|
149
277
|
|
|
150
278
|
```markdown
|
|
151
279
|
## Wiki Pages
|
|
152
|
-
- [[
|
|
280
|
+
- [[<domain>/<page>]] — <what it covers>
|
|
153
281
|
|
|
154
282
|
## Phase
|
|
155
283
|
3.2 — Verify › Wiki Import ✅
|
|
156
284
|
```
|
|
157
285
|
|
|
158
|
-
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
### 10. Handoff
|
|
159
289
|
|
|
160
290
|
```
|
|
161
291
|
Wiki import complete: <slug>
|
|
@@ -165,16 +295,25 @@ Pages updated: Y
|
|
|
165
295
|
|
|
166
296
|
superspec/wiki/
|
|
167
297
|
├── <domain>/
|
|
168
|
-
│ ├──
|
|
169
|
-
│
|
|
170
|
-
└──
|
|
298
|
+
│ ├── Home.md (domain index)
|
|
299
|
+
│ ├── <page1>.md (new)
|
|
300
|
+
│ └── <page2>.md (updated)
|
|
301
|
+
├── Home.md (updated)
|
|
302
|
+
└── log.md (appended)
|
|
303
|
+
|
|
304
|
+
Run /cross-linker to auto-weave [[wikilinks]] across the vault.
|
|
305
|
+
Open superspec/wiki/ in Obsidian to browse the vault.
|
|
171
306
|
|
|
172
|
-
Next: /ship <slug>
|
|
307
|
+
Next: /superspecs:ship <slug>
|
|
173
308
|
```
|
|
174
309
|
|
|
310
|
+
---
|
|
311
|
+
|
|
175
312
|
## Output
|
|
176
313
|
|
|
177
314
|
- New/updated pages in `superspec/wiki/<domain>/`
|
|
178
|
-
-
|
|
315
|
+
- Domain `Home.md` index (create if domain is new)
|
|
316
|
+
- Updated `superspec/wiki/Home.md`
|
|
317
|
+
- Appended `superspec/wiki/log.md`
|
|
179
318
|
- Updated `superspec/wiki/_manifest.json`
|
|
180
319
|
- Updated `superspec/specs/<slug>/status.md`
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-capture
|
|
3
|
+
description: Save findings from the current session directly to the wiki. Bugs fixed, decisions made, patterns discovered, gotchas hit. Quick mode stages a draft to raw/ for later ingest. Full mode distills directly to wiki pages. Triggers on /wiki-capture, "save to wiki", "capture this session", "note this for the wiki".
|
|
4
|
+
slash_command: wiki-capture
|
|
5
|
+
phase: "3.2 — Verify › Wiki Capture"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill: wiki-capture
|
|
9
|
+
|
|
10
|
+
You are capturing knowledge from the current session before it disappears.
|
|
11
|
+
|
|
12
|
+
The context window is ephemeral. This skill saves what's worth keeping — decisions made, bugs fixed, patterns discovered, gotchas hit — directly to the wiki or to `raw/` for later ingest.
|
|
13
|
+
|
|
14
|
+
Use this mid-session when something important happened that shouldn't be lost.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Modes
|
|
19
|
+
|
|
20
|
+
### `--quick` (default)
|
|
21
|
+
Stage a structured draft to `superspec/wiki/raw/capture-<YYYY-MM-DD-HH-MM>.md`.
|
|
22
|
+
Fast: no subagent, no manifest update, no cross-linking.
|
|
23
|
+
The next `/wiki` or `/wiki-ingest` run will promote the raw file to proper pages.
|
|
24
|
+
|
|
25
|
+
### `--full`
|
|
26
|
+
Distill directly to proper wiki pages. Follows the full ingest process from `verify-wiki`.
|
|
27
|
+
Use when the session produced significant, self-contained knowledge worth filing immediately.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
|
|
33
|
+
### 1. Scan the current session
|
|
34
|
+
|
|
35
|
+
Review what happened in this session. Extract the following (drop noise):
|
|
36
|
+
|
|
37
|
+
**Worth capturing:**
|
|
38
|
+
- Decisions made (what was chosen, why, what was traded away)
|
|
39
|
+
- Bugs found and fixed (what the bug was, root cause, fix)
|
|
40
|
+
- Patterns established or discovered
|
|
41
|
+
- Gotchas — things that took longer than expected
|
|
42
|
+
- Interface or contract changes
|
|
43
|
+
- Open questions that arose but weren't resolved
|
|
44
|
+
|
|
45
|
+
**Drop:**
|
|
46
|
+
- Step-by-step implementation details already in code
|
|
47
|
+
- Routine task execution
|
|
48
|
+
- Anything that's obvious from reading the code
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### 2. Quick mode — stage to raw/
|
|
53
|
+
|
|
54
|
+
Create `superspec/wiki/raw/capture-<YYYY-MM-DD-HH-MM>.md`:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
---
|
|
58
|
+
capture_date: <YYYY-MM-DD HH:MM>
|
|
59
|
+
session_context: <brief description of what this session was about>
|
|
60
|
+
promote: true
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# Session Capture: <YYYY-MM-DD>
|
|
64
|
+
|
|
65
|
+
## Decisions
|
|
66
|
+
|
|
67
|
+
### <Decision>
|
|
68
|
+
**Chose:** <X>
|
|
69
|
+
**Over:** <Y>
|
|
70
|
+
**Because:** <reason>
|
|
71
|
+
|
|
72
|
+
## Bugs Fixed
|
|
73
|
+
|
|
74
|
+
### <Bug title>
|
|
75
|
+
**Symptom:** <what it looked like>
|
|
76
|
+
**Root cause:** <why it happened>
|
|
77
|
+
**Fix:** <what resolved it>
|
|
78
|
+
**Gotcha:** <anything surprising>
|
|
79
|
+
|
|
80
|
+
## Patterns
|
|
81
|
+
|
|
82
|
+
### <Pattern name>
|
|
83
|
+
<What the pattern is and when to use it>
|
|
84
|
+
|
|
85
|
+
## Open Questions
|
|
86
|
+
|
|
87
|
+
- [ ] <Question that came up but wasn't resolved>
|
|
88
|
+
|
|
89
|
+
## Files touched
|
|
90
|
+
- `<path/to/file>` — <what changed and why>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Print:
|
|
94
|
+
```
|
|
95
|
+
Captured to superspec/wiki/raw/capture-<timestamp>.md
|
|
96
|
+
|
|
97
|
+
Run /wiki to promote to proper wiki pages.
|
|
98
|
+
Or the next /wiki <slug> run will pick it up automatically.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 3. Full mode — distill to wiki pages
|
|
104
|
+
|
|
105
|
+
Follow the full ingest process from `verify-wiki`:
|
|
106
|
+
|
|
107
|
+
1. Determine which domain(s) the captured knowledge belongs to
|
|
108
|
+
2. Check existing pages — update rather than duplicate
|
|
109
|
+
3. Write/update pages with full frontmatter including `summary:`, `provenance:`
|
|
110
|
+
4. Mark inferred content `^[inferred]`
|
|
111
|
+
5. Update domain `Home.md` and vault `Home.md`
|
|
112
|
+
6. Append to `log.md`: `## [YYYY-MM-DD] capture | <topic>`
|
|
113
|
+
7. Suggest running `/cross-linker` to weave new pages in
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### 4. Always suggest
|
|
118
|
+
|
|
119
|
+
After either mode:
|
|
120
|
+
```
|
|
121
|
+
Consider also running:
|
|
122
|
+
/cross-linker Auto-weave [[wikilinks]] across the vault
|
|
123
|
+
/wiki-status See what's now in the wiki
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Output
|
|
129
|
+
|
|
130
|
+
**Quick mode:**
|
|
131
|
+
- `superspec/wiki/raw/capture-<timestamp>.md`
|
|
132
|
+
|
|
133
|
+
**Full mode:**
|
|
134
|
+
- New/updated wiki pages
|
|
135
|
+
- Updated `Home.md` files
|
|
136
|
+
- Appended `log.md`
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-lint
|
|
3
|
+
description: Health check the compiled wiki vault. Finds orphaned pages, missing cross-links, contradictions between pages, and stale file references. Triggers on /wiki-lint, "lint the wiki", "check wiki health". Run periodically or before starting a new cycle.
|
|
4
|
+
slash_command: wiki-lint
|
|
5
|
+
phase: "3.2 — Verify › Wiki Health"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill: wiki-lint
|
|
9
|
+
|
|
10
|
+
You are the wiki custodian. You run a structural and semantic health check on the compiled wiki at `superspec/wiki/`.
|
|
11
|
+
|
|
12
|
+
The wiki is a compiled knowledge base. Like code, it accrues entropy: orphaned pages, broken links, contradictory claims, and stale file references. This skill finds those problems and produces an actionable report.
|
|
13
|
+
|
|
14
|
+
**Read-only by default.** Only write if the user confirms fixes.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## The 3-Layer Context
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
superspec/wiki/raw/ ← source material (agent reads, never modifies)
|
|
22
|
+
superspec/wiki/ ← compiled wiki (agent writes on ingest/query/lint-fix)
|
|
23
|
+
.skills/wiki-lint/ ← schema: these instructions
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Lint operates on the `wiki/` layer only. Never touch `raw/`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
### 1. Index all wiki pages
|
|
33
|
+
|
|
34
|
+
Build a complete map of the vault:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
for each .md file in superspec/wiki/ (excluding raw/, .obsidian/):
|
|
38
|
+
- record: path, title, tags, created, updated dates
|
|
39
|
+
- extract: all [[wikilinks]] referenced outward
|
|
40
|
+
- extract: all `file path` references (backtick spans)
|
|
41
|
+
- note: whether it appears in any other page as a [[wikilink]]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Run lint checks
|
|
45
|
+
|
|
46
|
+
#### 2a. Orphaned pages
|
|
47
|
+
A page is an orphan if no other wiki page links to it via `[[wikilink]]`.
|
|
48
|
+
|
|
49
|
+
Exception: `Home.md`, domain `Home.md` indexes, and `log.md` are not orphans by design.
|
|
50
|
+
|
|
51
|
+
#### 2b. Broken wikilinks
|
|
52
|
+
A `[[wikilink]]` that does not resolve to any `.md` file in the vault.
|
|
53
|
+
|
|
54
|
+
#### 2c. Missing cross-links
|
|
55
|
+
Page A mentions a topic that has its own wiki page B, but doesn't link to B.
|
|
56
|
+
|
|
57
|
+
Detection: for each page, check if its prose contains the exact title or common aliases of other wiki pages without a `[[wikilink]]`.
|
|
58
|
+
|
|
59
|
+
#### 2d. Contradictions
|
|
60
|
+
Two pages make conflicting factual claims about the same topic.
|
|
61
|
+
|
|
62
|
+
Detection: look for pages with overlapping tags or domains that assert opposite things about the same decision, pattern, or interface. Flag for human review — don't auto-resolve.
|
|
63
|
+
|
|
64
|
+
#### 2e. Stale file references
|
|
65
|
+
Backtick file paths (`` `src/auth/jwt.ts` ``) that no longer exist in the project filesystem.
|
|
66
|
+
|
|
67
|
+
Walk the actual project root and check each referenced path.
|
|
68
|
+
|
|
69
|
+
#### 2f. Outdated pages
|
|
70
|
+
Pages whose `updated:` date in frontmatter predates a related spec that was re-opened or re-shipped.
|
|
71
|
+
|
|
72
|
+
Cross-reference `superspec/wiki/_manifest.json` ingestion timestamps.
|
|
73
|
+
|
|
74
|
+
#### 2g. Missing frontmatter
|
|
75
|
+
Pages missing required YAML fields: `title`, `tags`, `created`, `updated`.
|
|
76
|
+
|
|
77
|
+
#### 2h. Undocumented domains
|
|
78
|
+
A domain folder exists in `wiki/` but has no `Home.md` index.
|
|
79
|
+
|
|
80
|
+
#### 2i. Domain drift
|
|
81
|
+
A domain folder exists in `wiki/` but is not listed in `_meta/taxonomy.md`.
|
|
82
|
+
|
|
83
|
+
1. Read `_meta/taxonomy.md` → build canonical domain set from `## Domains` table and "Project Domains" section
|
|
84
|
+
2. Compare against actual subdirectory names in `superspec/wiki/` (excluding `raw/`, `_meta/`, `_archives/`, `.obsidian/`)
|
|
85
|
+
3. Flag any folder that is not in the taxonomy as drift
|
|
86
|
+
|
|
87
|
+
Drift is usually one of: a typo (`authenication/`), a duplicate (`auth-flow/` when `auth/` exists), or a new domain that was created but never registered. Each case needs a different fix — flag separately.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### 3. Write the lint report
|
|
92
|
+
|
|
93
|
+
Write `superspec/wiki/_lint-report.md` (overwrite on each run):
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
---
|
|
97
|
+
title: Wiki Lint Report
|
|
98
|
+
generated: <YYYY-MM-DD HH:MM>
|
|
99
|
+
tags: [lint, health]
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
# Wiki Lint Report
|
|
103
|
+
|
|
104
|
+
Generated: <YYYY-MM-DD HH:MM>
|
|
105
|
+
Pages scanned: <N>
|
|
106
|
+
|
|
107
|
+
## Summary
|
|
108
|
+
|
|
109
|
+
| Check | Issues |
|
|
110
|
+
|-------|--------|
|
|
111
|
+
| Orphaned pages | N |
|
|
112
|
+
| Broken wikilinks | N |
|
|
113
|
+
| Missing cross-links | N |
|
|
114
|
+
| Contradictions | N |
|
|
115
|
+
| Stale file refs | N |
|
|
116
|
+
| Outdated pages | N |
|
|
117
|
+
| Missing frontmatter | N |
|
|
118
|
+
| Undocumented domains | N |
|
|
119
|
+
| Domain drift | N |
|
|
120
|
+
|
|
121
|
+
**Total issues: N** (<critical> critical, <warning> warnings)
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Orphaned Pages
|
|
126
|
+
|
|
127
|
+
> Pages with no inbound [[wikilinks]] from other wiki pages.
|
|
128
|
+
|
|
129
|
+
- [ ] `<domain>/<page>.md` — no inbound links _(fix: link from `<domain>/Home.md` or a related page)_
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Broken Wikilinks
|
|
134
|
+
|
|
135
|
+
> [[wikilinks]] that point to non-existent pages.
|
|
136
|
+
|
|
137
|
+
- [ ] `<page>.md` line 42: `[[<missing-page>]]` — target not found _(fix: create the page or correct the link)_
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Missing Cross-Links
|
|
142
|
+
|
|
143
|
+
> Page mentions a topic that has a wiki page but doesn't link to it.
|
|
144
|
+
|
|
145
|
+
- [ ] `<page-a>.md` mentions "<topic>" — should link to [[<domain>/<page-b>]]
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Contradictions
|
|
150
|
+
|
|
151
|
+
> Pages with conflicting claims. Requires human review.
|
|
152
|
+
|
|
153
|
+
- [ ] `<page-a>.md` says: "<claim A>"
|
|
154
|
+
`<page-b>.md` says: "<claim B>"
|
|
155
|
+
_(topic: <shared tag or topic>)_
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Stale File References
|
|
160
|
+
|
|
161
|
+
> Backtick file paths that no longer exist in the project.
|
|
162
|
+
|
|
163
|
+
- [ ] `<wiki-page>.md`: `` `<missing/file.ts>` `` — file not found
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Outdated Pages
|
|
168
|
+
|
|
169
|
+
> Pages whose `updated:` date predates a related re-ingested spec.
|
|
170
|
+
|
|
171
|
+
- [ ] `<domain>/<page>.md` — last updated <date>, but spec `<slug>` was re-ingested <later-date>
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Missing Frontmatter
|
|
176
|
+
|
|
177
|
+
> Pages missing required YAML fields.
|
|
178
|
+
|
|
179
|
+
- [ ] `<domain>/<page>.md` — missing: `title`, `updated`
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Undocumented Domains
|
|
184
|
+
|
|
185
|
+
> Domain folders without a Home.md index.
|
|
186
|
+
|
|
187
|
+
- [ ] `<domain>/` — no Home.md _(fix: create domain index)_
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Domain Drift
|
|
192
|
+
|
|
193
|
+
> Domain folders not listed in `_meta/taxonomy.md`. Possible typo, duplicate, or unregistered new domain.
|
|
194
|
+
|
|
195
|
+
- [ ] `<domain>/` — not in taxonomy _(likely: typo / duplicate of `<canonical-domain>/` / new domain needing taxonomy entry)_
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Passed Checks
|
|
200
|
+
|
|
201
|
+
- ✓ <N> pages with complete frontmatter
|
|
202
|
+
- ✓ <N> wikilinks resolved correctly
|
|
203
|
+
- ✓ <N> file references verified
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### 4. Append to log.md
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
## [<YYYY-MM-DD>] lint | <N> issues found
|
|
212
|
+
|
|
213
|
+
- Pages scanned: <N>
|
|
214
|
+
- Critical: <N> | Warnings: <N>
|
|
215
|
+
- Report: [[_lint-report]]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### 5. Offer to fix
|
|
221
|
+
|
|
222
|
+
After producing the report, ask the user:
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Wiki lint complete: N issues found (X critical, Y warnings).
|
|
226
|
+
|
|
227
|
+
Report: superspec/wiki/_lint-report.md
|
|
228
|
+
|
|
229
|
+
Would you like me to fix:
|
|
230
|
+
[A] All auto-fixable issues (missing frontmatter, broken links with clear targets)
|
|
231
|
+
[B] Specific issues (list which)
|
|
232
|
+
[N] No — review manually in Obsidian
|
|
233
|
+
|
|
234
|
+
Contradictions always require your decision before I change anything.
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
If the user confirms fixes, apply them and append a `## [date] lint-fix` entry to `log.md`.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Output
|
|
242
|
+
|
|
243
|
+
- `superspec/wiki/_lint-report.md` (overwritten)
|
|
244
|
+
- Appended `superspec/wiki/log.md`
|
|
245
|
+
- Optionally: fixed pages (with user confirmation)
|