stego-cli 0.1.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 (36) hide show
  1. package/.cspell.json +14 -0
  2. package/.gitignore +8 -0
  3. package/.markdownlint.json +5 -0
  4. package/.vscode/tasks.json +72 -0
  5. package/README.md +179 -0
  6. package/dist/exporters/exporter-types.js +1 -0
  7. package/dist/exporters/markdown-exporter.js +14 -0
  8. package/dist/exporters/pandoc-exporter.js +65 -0
  9. package/dist/stego-cli.js +1803 -0
  10. package/docs/conventions.md +182 -0
  11. package/docs/workflow.md +78 -0
  12. package/package.json +50 -0
  13. package/projects/docs-demo/README.md +20 -0
  14. package/projects/docs-demo/dist/.gitkeep +0 -0
  15. package/projects/docs-demo/manuscript/100-what-stego-is.md +37 -0
  16. package/projects/docs-demo/manuscript/200-writing-workflow.md +69 -0
  17. package/projects/docs-demo/manuscript/300-quality-gates.md +36 -0
  18. package/projects/docs-demo/manuscript/400-build-and-export.md +42 -0
  19. package/projects/docs-demo/notes/implementation-notes.md +17 -0
  20. package/projects/docs-demo/notes/style-guide.md +7 -0
  21. package/projects/docs-demo/package.json +10 -0
  22. package/projects/docs-demo/stego-project.json +9 -0
  23. package/projects/plague-demo/.markdownlint.json +4 -0
  24. package/projects/plague-demo/README.md +19 -0
  25. package/projects/plague-demo/dist/.gitkeep +0 -0
  26. package/projects/plague-demo/manuscript/100-the-commission.md +24 -0
  27. package/projects/plague-demo/manuscript/200-at-the-wards.md +38 -0
  28. package/projects/plague-demo/manuscript/300-the-hearing.md +38 -0
  29. package/projects/plague-demo/manuscript/400-the-final-account.md +30 -0
  30. package/projects/plague-demo/notes/style-guide.md +7 -0
  31. package/projects/plague-demo/package.json +10 -0
  32. package/projects/plague-demo/spine/characters.md +31 -0
  33. package/projects/plague-demo/spine/locations.md +33 -0
  34. package/projects/plague-demo/spine/sources.md +28 -0
  35. package/projects/plague-demo/stego-project.json +41 -0
  36. package/stego.config.json +56 -0
@@ -0,0 +1,182 @@
1
+ # Creative Writing Conventions
2
+
3
+ ## 1) Canonical ordering and metadata
4
+
5
+ Each manuscript file lives in:
6
+
7
+ `/Users/mattgold/Code/writing/projects/<project-id>/manuscript/`
8
+
9
+ Naming convention (order-oriented, not chapter-oriented):
10
+
11
+ - `100-opening-image.md`
12
+ - `200-market-interruption.md`
13
+
14
+ Default metadata preference (global):
15
+
16
+ ```yaml
17
+ ---
18
+ status: draft
19
+ ---
20
+ ```
21
+
22
+ Per-project metadata preferences can be set in `stego-project.json`:
23
+
24
+ ```json
25
+ {
26
+ "requiredMetadata": ["status", "chapter", "pov", "timeline"]
27
+ }
28
+ ```
29
+
30
+ These keys are advisory and reported as warnings when missing; they do not block validate/build/export.
31
+ Manuscript files can omit metadata blocks.
32
+
33
+ Optional metadata:
34
+
35
+ - `title`: optional override for display heading; default is derived from filename
36
+ - grouping keys/titles defined by your project's `compileStructure.levels` (for example `part`, `part_title`, `chapter`, `chapter_title`)
37
+ - category arrays defined by your project's `spineCategories` config (example: `cast`, `places`, `incidents`, `ordinances`)
38
+
39
+ Rules:
40
+
41
+ - Filename must start with a numeric prefix followed by `-` or `_` (example: `100-scene.md`).
42
+ - Use three-digit prefixes and leave gaps (`100`, `200`, `300`) to make reordering easy.
43
+ - `status` must be one of: `draft`, `revise`, `line-edit`, `proof`, `final`.
44
+ - Build sorts by filename prefix order.
45
+ - Group headings/page breaks are driven by `compileStructure.levels` key changes across ordered files.
46
+ - Canon references belong in metadata arrays defined by project configuration.
47
+ - Do not place canon IDs directly in prose.
48
+
49
+ Compile structure rules:
50
+
51
+ - `compileStructure.levels` is optional; when omitted, build emits entry sections only (no structural group headings).
52
+ - Each level defines: `key`, `label`, optional `titleKey`, optional `injectHeading`, optional `headingTemplate`, optional `pageBreak` (`none` or `between-groups`).
53
+ - Missing group key/title values inherit from the previous manuscript file, so only boundary files need explicit group metadata.
54
+
55
+ ## 2) Project-defined spine categories
56
+
57
+ Spine categories are configured per project in `stego-project.json`.
58
+
59
+ Example:
60
+
61
+ ```json
62
+ {
63
+ "id": "my-project",
64
+ "title": "My Project",
65
+ "spineCategories": [
66
+ { "key": "cast", "prefix": "CHAR", "notesFile": "characters.md" },
67
+ { "key": "places", "prefix": "LOC", "notesFile": "locations.md" },
68
+ { "key": "incidents", "prefix": "EVENT", "notesFile": "timeline.md" },
69
+ { "key": "ordinances", "prefix": "STATUTE", "notesFile": "ordinances.md" }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ Category rules:
75
+
76
+ - `key`: lowercase metadata field name used in manuscript files
77
+ - `prefix`: uppercase ID prefix used in references (example: `STATUTE`)
78
+ - `notesFile`: markdown filename resolved in `spine/` containing canonical entries
79
+ - `spineCategories` may be omitted or empty for projects that do not need continuity entity tracking
80
+
81
+ ## 3) Spine governance
82
+
83
+ Every project keeps canonical story facts in:
84
+
85
+ `/Users/mattgold/Code/writing/projects/<project-id>/spine/`
86
+
87
+ Required spine files are determined by `spineCategories[*].notesFile`.
88
+
89
+ Governance rule:
90
+
91
+ - If manuscript facts change, update the relevant spine file in the same branch before merge.
92
+ - Canon IDs are referenced from manuscript metadata, not inline prose.
93
+
94
+ ## 4) Editorial states
95
+
96
+ - `draft`: drafting only, minimal enforcement.
97
+ - `revise`: structural edits and continuity corrections.
98
+ - `line-edit`: sentence-level edits, grammar and spelling focus.
99
+ - `proof`: publication polish with strict link/lint/spell checks.
100
+ - `final`: release candidate; all manuscript files should be `final`.
101
+
102
+ ## 5) Quality gates
103
+
104
+ Blocking checks:
105
+
106
+ - malformed or missing metadata
107
+ - invalid `compileStructure` schema in `stego-project.json`
108
+ - invalid required metadata
109
+ - duplicate filename numeric prefixes
110
+ - invalid category reference metadata (bad format or wrong field type)
111
+ - inline canon IDs in prose (metadata-only policy)
112
+ - broken local links/images (strict in `proof` and `final`)
113
+ - stage mismatch (file status below requested stage)
114
+
115
+ Advisory checks:
116
+
117
+ - heading-level jumps
118
+ - long paragraphs/sentences
119
+ - unknown spine IDs referenced in metadata
120
+ - optional external lint/spell tool feedback
121
+
122
+ ## 6) Build contract
123
+
124
+ Build command compiles all manuscript files for one project into exactly one manuscript Markdown file.
125
+
126
+ Contract:
127
+
128
+ - Input: `manuscript/*.md`
129
+ - Pre-step: metadata and structure validation
130
+ - Ordering: filename numeric prefix
131
+ - Structural headers/page breaks: inserted when configured `compileStructure.levels` keys change
132
+ - Output: `dist/<project-id>.md`
133
+ - Output includes generated title header, table of contents, structural sections (if configured), and per-file subsections
134
+ - Generated files in `dist/` are never hand-edited
135
+
136
+ ## 7) Release outputs
137
+
138
+ Current targets:
139
+
140
+ - required: compiled `.md`
141
+ - optional: `.docx` and `.pdf` via `pandoc`
142
+
143
+ Design principle:
144
+
145
+ - export uses a pluggable abstraction so future formats can be added without changing manuscript structure.
146
+
147
+ ## 8) Git conventions
148
+
149
+ Branching:
150
+
151
+ - Work on short-lived branches from `main`.
152
+
153
+ Commit message format:
154
+
155
+ - `manuscript: revise file 07 pacing`
156
+ - `notes: update CHAR-MIRA arc`
157
+ - `build: tighten metadata validation`
158
+
159
+ Tag milestones:
160
+
161
+ - `<project-id>/v0.1-draft`
162
+ - `<project-id>/v0.2-revise`
163
+ - `<project-id>/v1.0-final`
164
+
165
+ Policy:
166
+
167
+ - no force-push to `main`
168
+ - merge only when stage checks pass for the intended stage
169
+ - manuscript fact changes require matching spine updates
170
+
171
+ ## 9) Backup and resilience
172
+
173
+ Use three layers:
174
+
175
+ - local git history
176
+ - remote private origin (GitHub/GitLab)
177
+ - machine backup (Time Machine or equivalent)
178
+
179
+ Recovery principle:
180
+
181
+ - source of truth is `manuscript/` and `notes/`
182
+ - `dist/` is reproducible output and may be regenerated any time
@@ -0,0 +1,78 @@
1
+ # Workflow Plan
2
+
3
+ ## Daily writing loop
4
+
5
+ 1. Pick project and target manuscript file.
6
+ 2. Open the project folder (`projects/<project-id>`).
7
+ 3. Write in VS Code in `manuscript/*.md`.
8
+ 4. Set file metadata preferred by that project's `stego-project.json` (`requiredMetadata`).
9
+ 5. Run validate/build locally.
10
+ 6. Run stage check for current milestone.
11
+ 7. Commit and push.
12
+
13
+ ## Commands
14
+
15
+ From `/Users/mattgold/Code/writing`:
16
+
17
+ ```bash
18
+ npm run list-projects
19
+ npm run new-project -- --project <project-id> --title "<title>"
20
+ npm run validate -- --project <project-id>
21
+ npm run build -- --project <project-id>
22
+ npm run check-stage -- --project <project-id> --stage <draft|revise|line-edit|proof|final>
23
+ npm run export -- --project <project-id> --format <md|docx|pdf>
24
+ ```
25
+
26
+ From a project directory (`/Users/mattgold/Code/writing/projects/<project-id>`):
27
+
28
+ ```bash
29
+ npm run validate
30
+ npm run build
31
+ npm run check-stage -- --stage revise
32
+ npm run export -- --format md
33
+ ```
34
+
35
+ ## Structural grouping model (file-first)
36
+
37
+ - Keep one file per writing unit (scene, beat, section, or chapter fragment).
38
+ - Use filename prefixes (`100-...`, `200-...`, `300-...`) for sequencing.
39
+ - Configure `compileStructure.levels` in `stego-project.json` for grouping (for example `part` + `chapter`).
40
+ - Build inserts headings and optional page breaks when configured grouping keys change.
41
+ - Missing group key/title values inherit from the previous manuscript file, so boundary files carry the metadata.
42
+
43
+ ## Spine category model (project-defined)
44
+
45
+ - Configure `spineCategories` in each project's `stego-project.json`.
46
+ - Choose category names and ID prefixes that match your domain.
47
+ - Keep IDs out of prose; use metadata arrays for references.
48
+ - Keep each category's canonical entries in `spine/<notesFile>`.
49
+ - Omit `spineCategories` if a project does not need continuity entity tracking.
50
+
51
+ ## Stage progression model
52
+
53
+ - Start with `draft` while creating new text.
54
+ - Move to `revise` when story structure is stable.
55
+ - Move to `line-edit` once structure is settled.
56
+ - Move to `proof` before sharing with readers/editors.
57
+ - Move to `final` when preparing release snapshots.
58
+
59
+ ## Suggested milestones
60
+
61
+ 1. `v0.1-draft`: complete rough draft.
62
+ 2. `v0.2-revise`: major structural edits complete.
63
+ 3. `v0.3-line-edit`: language tightening complete.
64
+ 4. `v0.4-proof`: strict checks pass.
65
+ 5. `v1.0-final`: release candidate.
66
+
67
+ ## AI integration guardrails
68
+
69
+ - AI suggestions should be review-first (diff/patch/report), not silent overwrite.
70
+ - Keep human approval as required step before manuscript changes.
71
+ - Treat AI outputs as advisory during `draft` and `revise`.
72
+ - Allow stricter AI-assisted checks in `line-edit` and `proof` if useful.
73
+
74
+ ## Backup routine
75
+
76
+ - Push to remote at end of each writing session.
77
+ - Maintain machine-level backup daily.
78
+ - Create milestone tags before major rewrites.
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "stego-cli",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "Installable CLI for the Stego writing monorepo workflow.",
6
+ "bin": {
7
+ "stego": "dist/stego-cli.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=20"
11
+ },
12
+ "files": [
13
+ "dist/**",
14
+ "docs/**",
15
+ "projects/**",
16
+ "!projects/*/dist/*.md",
17
+ "!projects/*/dist/exports/**",
18
+ ".vscode/tasks.json",
19
+ ".vscode/extensions.json",
20
+ ".gitignore",
21
+ ".markdownlint.json",
22
+ ".cspell.json",
23
+ "stego.config.json",
24
+ "README.md"
25
+ ],
26
+ "scripts": {
27
+ "build:cli": "tsc -p tsconfig.build.json",
28
+ "compile": "npm run build:cli",
29
+ "prepack": "npm run build:cli",
30
+ "pack:dry-run": "npm pack --dry-run",
31
+ "changeset": "changeset",
32
+ "release:version": "changeset version",
33
+ "list-projects": "node --experimental-strip-types tools/stego-cli.ts list-projects",
34
+ "new-project": "node --experimental-strip-types tools/stego-cli.ts new-project",
35
+ "validate": "node --experimental-strip-types tools/stego-cli.ts validate",
36
+ "build": "node --experimental-strip-types tools/stego-cli.ts build",
37
+ "check-stage": "node --experimental-strip-types tools/stego-cli.ts check-stage",
38
+ "export": "node --experimental-strip-types tools/stego-cli.ts export",
39
+ "test:compile-structure": "node --test tools/test/compile-structure.test.mjs",
40
+ "test": "npm run test:compile-structure"
41
+ },
42
+ "devDependencies": {
43
+ "@changesets/cli": "^2.29.8",
44
+ "@types/node": "^25.2.3",
45
+ "cspell": "^9.6.4",
46
+ "markdownlint-cli": "^0.47.0",
47
+ "pandoc": "^0.2.0",
48
+ "typescript": "^5.9.3"
49
+ }
50
+ }
@@ -0,0 +1,20 @@
1
+ # Stego Documentation Demo
2
+
3
+ A nonfiction and business-style demo project.
4
+
5
+ This project intentionally keeps config minimal while documenting the full Stego feature set.
6
+
7
+ - no `spineCategories` in this project's `stego-project.json`
8
+ - no Spine continuity enforcement in this demo project
9
+ - manuscripts include documentation of fiction and Spine capabilities
10
+ - metadata remains lightweight (`status` plus optional chapter grouping)
11
+
12
+ Use this demo when you want to show Stego as documentation workflow infrastructure while still explaining fiction workflows.
13
+
14
+ Run from `/Users/mattgold/Code/stego`:
15
+
16
+ ```bash
17
+ npm run validate -- --project docs-demo
18
+ npm run build -- --project docs-demo
19
+ npm run export -- --project docs-demo --format md
20
+ ```
File without changes
@@ -0,0 +1,37 @@
1
+ ---
2
+ status: draft
3
+ chapter: 1
4
+ chapter_title: Overview
5
+ ---
6
+
7
+ # What Stego Is
8
+
9
+ Stego is a Markdown-first writing system for long-form projects.
10
+
11
+ It combines source files, validation, stage gates, and export in one project structure so teams can move from draft to release without switching tools.
12
+
13
+ ## Core model
14
+
15
+ A Stego project has four working areas:
16
+
17
+ - `manuscript/`: canonical source text
18
+ - `notes/`: planning, references, and process docs
19
+ - `spine/`: canonical entity definitions for fiction projects
20
+ - `dist/`: generated outputs only
21
+
22
+ ## What Stego standardizes
23
+
24
+ - metadata in frontmatter (`status` required by default)
25
+ - quality checks by stage (`draft` through `final`)
26
+ - deterministic build into a single manuscript file
27
+ - export to `md`, `docx`, `pdf`, and `epub`
28
+
29
+ ## Who this is for
30
+
31
+ Stego is useful for both narrative and operational writing:
32
+
33
+ - fiction writers and story teams
34
+ - technical and product documentation teams
35
+ - internal policy/process authors
36
+
37
+ This demo project is documentation-first, but the next chapter also documents fiction and Spine usage.
@@ -0,0 +1,69 @@
1
+ ---
2
+ status: revise
3
+ chapter: 1
4
+ chapter_title: Overview
5
+ ---
6
+
7
+ # Fiction Workflow and Spine Features
8
+
9
+ This project does not enable Spine categories, but Stego fully supports them.
10
+
11
+ ## How Spine works in Stego
12
+
13
+ In fiction projects, `stego-project.json` can define spine categories like:
14
+
15
+ - `characters` with prefix `CHAR`
16
+ - `locations` with prefix `LOC`
17
+ - `sources` with prefix `SRC`
18
+
19
+ Each category maps to a markdown file under `spine/`.
20
+
21
+ ## Identifier model
22
+
23
+ Spine entries use stable identifiers such as:
24
+
25
+ - `CHAR-MATTHAEUS`
26
+ - `LOC-HOTEL-DIEU`
27
+ - `SRC-GALEN`
28
+
29
+ Writers can reference these identifiers directly in manuscript metadata and prose.
30
+
31
+ ## Sidebar and Spine Browser behavior
32
+
33
+ In the Stego VS Code extension, identifiers become interactive:
34
+
35
+ - click from manuscript metadata to open Spine Browser context
36
+ - browse categories and entries from Browser home
37
+ - inspect entry markdown, links, and backlinks
38
+ - track references across manuscript and notes
39
+
40
+ ## Why this matters for fiction
41
+
42
+ Spine structure gives fiction teams a canonical layer for consistency:
43
+
44
+ - one source of truth for entities
45
+ - traceability from manuscript usage to canonical entry
46
+ - faster continuity review during revise/proof stages
47
+
48
+
49
+ <!-- stego-comments:start -->
50
+
51
+ ### CMT-0001
52
+ <!-- meta64: eyJzdGF0dXMiOiJvcGVuIiwiYW5jaG9yIjoicGFyYWdyYXBoIiwicGFyYWdyYXBoX2luZGV4IjoxMywic2lnbmF0dXJlIjoiZm52MWE6MWE2YmJhOWEiLCJleGNlcnB0IjoiIyMgV2h5IHRoaXMgbWF0dGVycyBmb3IgZmljdGlvbiJ9 -->
53
+ > _2026-02-20T03:46:52.817Z | mattgold_
54
+ >
55
+ > test
56
+
57
+ ### CMT-0002
58
+ <!-- meta64: eyJzdGF0dXMiOiJvcGVuIiwiYW5jaG9yIjoicGFyYWdyYXBoIiwicGFyYWdyYXBoX2luZGV4IjoxMywic2lnbmF0dXJlIjoiZm52MWE6MWE2YmJhOWEiLCJleGNlcnB0IjoiIyMgV2h5IHRoaXMgbWF0dGVycyBmb3IgZmljdGlvbiJ9 -->
59
+ > _2026-02-20T03:47:21.646Z | mattgold_
60
+ >
61
+ > yes yes we knoow
62
+
63
+ ### CMT-0003
64
+ <!-- meta64: eyJzdGF0dXMiOiJvcGVuIiwiYW5jaG9yIjoicGFyYWdyYXBoIiwicGFyYWdyYXBoX2luZGV4IjoxMywic2lnbmF0dXJlIjoiZm52MWE6MWE2YmJhOWEiLCJleGNlcnB0IjoiIyMgV2h5IHRoaXMgbWF0dGVycyBmb3IgZmljdGlvbiJ9 -->
65
+ > _2026-02-20T03:50:27.114Z | mattgold_
66
+ >
67
+ > test
68
+
69
+ <!-- stego-comments:end -->
@@ -0,0 +1,36 @@
1
+ ---
2
+ status: line-edit
3
+ chapter: 2
4
+ chapter_title: Quality Pipeline
5
+ ---
6
+
7
+ # Validation and Stage Gates
8
+
9
+ Stego separates baseline validation from stage-specific enforcement.
10
+
11
+ ## Baseline validate
12
+
13
+ `validate` checks project and manuscript integrity, including:
14
+
15
+ - frontmatter parse and metadata structure
16
+ - markdown structure and local link integrity
17
+ - project and manuscript layout assumptions
18
+
19
+ ## Stage gate model
20
+
21
+ `check-stage` applies stricter checks as status increases:
22
+
23
+ - `draft`: structure-first, low friction
24
+ - `revise`: continuity expectations for Spine projects
25
+ - `line-edit`: spell-check enabled
26
+ - `proof`: markdown lint, spell-check, strict local links
27
+ - `final`: same strictness as proof with final-status expectations
28
+
29
+ ## File-scoped and project-scoped checks
30
+
31
+ Stego supports both:
32
+
33
+ - local file checks during active editing
34
+ - project-wide stage checks before release
35
+
36
+ In the extension UI, local checks run from manuscript status controls, while project checks run from the sidebar header.
@@ -0,0 +1,42 @@
1
+ ---
2
+ status: line-edit
3
+ chapter: 2
4
+ chapter_title: Quality Pipeline
5
+ ---
6
+
7
+ # Build and Export Operations
8
+
9
+ Stego keeps authoring and distribution predictable.
10
+
11
+ ## Build behavior
12
+
13
+ `build` compiles manuscript sources into one output markdown file in `dist/`.
14
+
15
+ Use build output for:
16
+
17
+ - full-read review passes
18
+ - stakeholder circulation
19
+ - archival snapshots of a known state
20
+
21
+ ## Export formats
22
+
23
+ `export` supports:
24
+
25
+ - `md`
26
+ - `docx`
27
+ - `pdf`
28
+ - `epub`
29
+
30
+ `docx`, `pdf`, and `epub` require `pandoc`. `pdf` also requires a PDF engine (for example `tectonic`, `xelatex`, or `pdflatex`).
31
+
32
+ ## Recommended release sequence
33
+
34
+ 1. Run file checks while drafting.
35
+ 2. Run project stage checks before release.
36
+ 3. Run build.
37
+ 4. Export the target format.
38
+ 5. Archive output from `dist/exports` as release artifacts.
39
+
40
+ ## Practical note for documentation teams
41
+
42
+ You can document Spine features and fiction workflows in a project like this one without enabling Spine categories. That keeps docs simple while still covering the full Stego feature set.
@@ -0,0 +1,17 @@
1
+ # Implementation Notes
2
+
3
+ ## Goal
4
+
5
+ Show that Stego works for product docs, procedures, and internal writing systems, not only fiction.
6
+
7
+ ## Demo constraints
8
+
9
+ - Do not use Spine identifiers in manuscript metadata.
10
+ - Keep metadata minimal so onboarding stays simple.
11
+ - Keep chapters independently readable.
12
+
13
+ ## Audience
14
+
15
+ - Product and operations teams
16
+ - Technical writers
17
+ - Solo builders documenting process
@@ -0,0 +1,7 @@
1
+ # Style Guide
2
+
3
+ - Write in clear operational language, not narrative prose.
4
+ - Prefer short sections with explicit headings.
5
+ - Keep recommendations actionable and testable.
6
+ - Use examples that map directly to Stego commands and files.
7
+ - Avoid tool-internal jargon when a plain term is enough.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "writing-project-docs-demo",
3
+ "private": true,
4
+ "scripts": {
5
+ "validate": "node --experimental-strip-types ../../tools/stego-cli.ts validate",
6
+ "build": "node --experimental-strip-types ../../tools/stego-cli.ts build",
7
+ "check-stage": "node --experimental-strip-types ../../tools/stego-cli.ts check-stage",
8
+ "export": "node --experimental-strip-types ../../tools/stego-cli.ts export"
9
+ }
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "id": "docs-demo",
3
+ "title": "Stego Documentation Demo",
4
+ "subtitle": "A business and nonfiction style project without Spine categories",
5
+ "author": "Matt Gold",
6
+ "requiredMetadata": [
7
+ "status"
8
+ ]
9
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "default": true,
3
+ "MD041": false
4
+ }
@@ -0,0 +1,19 @@
1
+ # Under Saturn's Breath (Demo)
2
+
3
+ A full-configuration demo with rich metadata, three spine categories, cross-linked spine entries, and external reference links.
4
+
5
+ - four manuscript files with full metadata (`status`, `chapter`, `pov`, `timeline`, plus category arrays)
6
+ - three spine categories: `characters`, `locations`, `sources`
7
+ - spine category files now live in `spine/` (regular notes stay in `notes/`)
8
+ - spine entries cross-link between files (characters reference sources they use, locations reference the characters and sources tied to them)
9
+ - `sources` category tracks intellectual traditions rather than physical objects, with Wikipedia links to historical references
10
+ - demonstrates the full range of stego's continuity tracking and metadata validation
11
+
12
+ Run from `/Users/mattgold/Code/stego`:
13
+
14
+ ```bash
15
+ npm run validate -- --project plague-demo
16
+ npm run build -- --project plague-demo
17
+ npm run check-stage -- --project plague-demo --stage draft
18
+ npm run export -- --project plague-demo --format md
19
+ ```
File without changes
@@ -0,0 +1,24 @@
1
+ ---
2
+ status: revise
3
+ chapter: 1
4
+ chapter_title: The Framework
5
+ pov: Matthaeus
6
+ timeline: '1348-09-18'
7
+ characters:
8
+ - CHAR-MATTHAEUS
9
+ - CHAR-ETIENNE
10
+ - CHAR-RAOUL
11
+ locations:
12
+ - LOC-COLLEGE
13
+ sources:
14
+ - SRC-CONJUNCTION
15
+ - SRC-GALEN
16
+ ---
17
+
18
+ Canon Raoul arrived before vespers with sealed instructions from men who did not sign their names. The commission was simple in expression and impossible in execution: produce an account of the pestilence that would sustain public discipline, satisfy the faculty, and be true. Raoul did not rank these requirements. Matthaeus understood that the ranking was the actual task.
19
+
20
+ He accepted because refusal was not among the options and because explanation, as such, was a duty he believed in. He told Etienne to prepare two ledgers: one for accepted causes, one for observations not yet reconciled. He expected the second ledger to empty into the first as the work progressed. That was what reconciliation meant — not that everything would be easy, but that everything would eventually belong somewhere.
21
+
22
+ His framework was a hierarchy. At the top, celestial disposition: the conjunction of Saturn, Jupiter, and Mars corrupting the air universally. Below that, the Galenic layer: individual complexion determining who sickened and who did not. Below that, local conditions — climate, trade, proximity. Every level consistent with the one above it. Every observation assigned a position.
23
+
24
+ When Raoul left, Matthaeus unlocked a coffer beneath the desk and withdrew a loose quire copied from a prohibited tradition of astral image-magic. He consulted it only in private, not for its conclusions but for its method: how to reason from correspondences when causes were hidden. Etienne saw the motion and looked away. Between them, this silence had long been a professional courtesy.
@@ -0,0 +1,38 @@
1
+ ---
2
+ status: revise
3
+ pov: Matthaeus
4
+ timeline: '1348-09-21'
5
+ characters:
6
+ - CHAR-MATTHAEUS
7
+ - CHAR-ETIENNE
8
+ - CHAR-AGNES
9
+ locations:
10
+ - LOC-HOTELDIEU
11
+ - LOC-QUAY
12
+ sources:
13
+ - SRC-WARD-DATA
14
+ - SRC-CONJUNCTION
15
+ - SRC-GALEN
16
+ ---
17
+
18
+ At Hôtel-Dieu, prayer and treatment proceeded in one rhythm. Priests read offices while surgeons opened buboes. Women washed linen in vinegar while clerks recited names for the burial lists. Nobody in that room believed they were choosing between faith and medicine. The distinction did not apply.
19
+
20
+ Matthaeus and Etienne recorded onset dates, households, trades, parish boundaries. They worked quickly because the data changed every hour. Agnes met them at the supply entrance and walked them through her own records — a set of tallies she had kept since August, organized not by humoral type or celestial sign but by street and supplier.
21
+
22
+ Her map was simple. Neighborhoods tied to the grain quay sickened first. Adjacent streets followed within days. The rest of the city came after. The pattern was consistent across three months of data.
23
+
24
+ At the quay she showed them torn sackcloth from a riverside storehouse and asked what his conjunction tables would have predicted for this street, this month. Matthaeus answered in the terms his system provided: commerce might distribute the material substrate, but the disposition of bodies to receive corruption remained celestial. Agnes said that might be true and still leave the wrong people dead first.
25
+
26
+ He wrote her observation in the second ledger. He expected to reconcile it later. The framework had room. It had been designed to have room.
27
+
28
+ <!-- stego-comments:start -->
29
+
30
+ <!-- comment: CMT-0001 -->
31
+ <!-- meta64: eyJzdGF0dXMiOiJvcGVuIiwiY3JlYXRlZF9hdCI6IjIwMjYtMDItMjFUMDM6MTk6MDUuNDg5WiIsInRpbWV6b25lIjoiQW1lcmljYS9OZXdfWW9yayIsInRpbWV6b25lX29mZnNldF9taW51dGVzIjotMzAwLCJwYXJhZ3JhcGhfaW5kZXgiOjAsImV4Y2VycHRfc3RhcnRfbGluZSI6MTgsImV4Y2VycHRfc3RhcnRfY29sIjoyMzAsImV4Y2VycHRfZW5kX2xpbmUiOjE4LCJleGNlcnB0X2VuZF9jb2wiOjIzOH0 -->
32
+ > _Feb 21, 2026, 3:19 AM — mattgold_
33
+ >
34
+ > > “choosing”
35
+ >
36
+ > dfsf
37
+
38
+ <!-- stego-comments:end -->