@thedecipherist/mdd 1.5.2 → 1.5.3
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/commands/mdd-import-spec.md +34 -8
- package/package.json +1 -1
|
@@ -47,20 +47,21 @@ If multiple files are provided, merge all content into a single working document
|
|
|
47
47
|
|
|
48
48
|
This phase runs in four steps. Build-order classification (IS2c) always precedes structure determination (IS2d) because the correct numbering depends on understanding what you build vs. what you reference.
|
|
49
49
|
|
|
50
|
-
#### Step IS2a — Extract features
|
|
50
|
+
#### Step IS2a — Extract features + record source line ranges
|
|
51
51
|
|
|
52
52
|
Read the entire merged working document. Identify every distinct feature, system, subsystem, or bounded capability described. A "feature" is any topic that could become a standalone MDD doc — something with a purpose, decisions, constraints, and a clear scope.
|
|
53
53
|
|
|
54
|
-
For each identified feature,
|
|
54
|
+
For each identified feature, record:
|
|
55
55
|
- Name / title
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- AST types, data structures, config schemas, error formats, and TypeScript interfaces if described
|
|
56
|
+
- **The exact line ranges in the source file(s) that cover this feature.** Record every range, including secondary ranges where the feature is discussed again (e.g. a directive mentioned in the syntax section AND in the security section AND in the changelog). Format: `lines 254–340, 2401–2450, 4725–4741`
|
|
57
|
+
- A brief extraction note: what types of content are in those ranges (e.g. "syntax section: options table, processing pipeline, scope model; security section: filesystem confinement rules; changelog: file resolution model decisions")
|
|
59
58
|
- Dependencies on other features identified in the same spec
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
This line-range map is used in IS4 to re-read the source before writing each doc. It is the most important output of IS2a. Do not skip or estimate ranges — check your chunk boundaries if unsure.
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
Track which spec sections contribute to each feature. When multiple spec sections cover the same concept (same feature re-discussed with refinements), **merge them** — do not create duplicate docs. Record all contributing ranges. When versions of the same decision conflict, keep the most specific or most recent version and note the discarded variant.
|
|
63
|
+
|
|
64
|
+
**Changelog and review-pass sections** (sections titled "v1.0 Review", "Changelog", "Decision Log", or similar retrospective formats) are not standalone features — they are design decision records. For each decision in such a section, identify which feature it belongs to and add its line range to that feature's source ranges. Do not create a standalone "Changelog" feature doc.
|
|
64
65
|
|
|
65
66
|
#### Step IS2b — Assign paths
|
|
66
67
|
|
|
@@ -321,7 +322,32 @@ Compute and write the `hash:` field after writing.
|
|
|
321
322
|
For each feature in the approved plan, in wave order:
|
|
322
323
|
|
|
323
324
|
1. Auto-number continuing from the highest existing doc number in `.mdd/docs/`
|
|
324
|
-
|
|
325
|
+
|
|
326
|
+
2. **Re-read the source before writing.** Look up the line ranges recorded for this feature in IS2a. Re-read each range from the original spec file now — do not write from the IS2a extraction summary alone. The summary identified what exists; the re-read provides the actual content. Use the same chunked read strategy as IS1 if a range is large.
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
Re-reading source for <slug>...
|
|
330
|
+
lines <X>–<Y> (<section name>) ✓
|
|
331
|
+
lines <X>–<Y> (<section name>) ✓
|
|
332
|
+
Writing doc...
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
3. **Run the completeness checklist against the freshly-read source before writing the doc.** For each item present in the source, it must appear in the doc:
|
|
336
|
+
|
|
337
|
+
- [ ] Every options / parameters table — every row, every column, every default value
|
|
338
|
+
- [ ] Every CLI subcommand and its flags (including rare/advanced flags)
|
|
339
|
+
- [ ] Every config JSON structure — exact keys, types, nesting, defaults
|
|
340
|
+
- [ ] Every TypeScript interface and type alias defined in the spec
|
|
341
|
+
- [ ] Every AST node type and its fields
|
|
342
|
+
- [ ] Every error message format and the exact condition that triggers it
|
|
343
|
+
- [ ] Every behavioral table (evaluation tables, state tables, format tables, platform tables)
|
|
344
|
+
- [ ] Every "always" / "never" / "must not" / "only valid when" rule
|
|
345
|
+
- [ ] Every example that illustrates an edge case or non-obvious behaviour
|
|
346
|
+
- [ ] Every named distinction where two similar things behave differently (e.g. `column` singular vs `columns` plural)
|
|
347
|
+
|
|
348
|
+
If any item is present in the source but not yet captured in your notes, add it now before writing the doc. Do not skip this step.
|
|
349
|
+
|
|
350
|
+
4. Write `.mdd/docs/<NN>-<slug>.md`:
|
|
325
351
|
|
|
326
352
|
```markdown
|
|
327
353
|
---
|