stego-cli 0.1.4 → 0.1.6

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 (45) hide show
  1. package/.gitignore +1 -0
  2. package/LICENSE +55 -0
  3. package/README.md +39 -189
  4. package/dist/stego-cli.js +13 -15
  5. package/package.json +11 -2
  6. package/projects/{plague-demo → fiction-example}/README.md +5 -5
  7. package/projects/{plague-demo → fiction-example}/manuscript/300-the-hearing.md +1 -13
  8. package/projects/{plague-demo → fiction-example}/package.json +1 -1
  9. package/projects/{plague-demo → fiction-example}/stego-project.json +1 -1
  10. package/projects/stego-docs/README.md +27 -0
  11. package/projects/stego-docs/manuscript/100-what-stego-is.md +56 -0
  12. package/projects/stego-docs/manuscript/200-install-and-initialize.md +68 -0
  13. package/projects/stego-docs/manuscript/300-workspace-layout-and-vscode.md +56 -0
  14. package/projects/stego-docs/manuscript/400-everyday-workflow-and-commands.md +70 -0
  15. package/projects/stego-docs/manuscript/500-project-configuration.md +58 -0
  16. package/projects/stego-docs/manuscript/600-spine-and-browser-workflows.md +55 -0
  17. package/projects/stego-docs/manuscript/700-validation-and-stage-gates.md +53 -0
  18. package/projects/stego-docs/manuscript/800-build-export-and-release-outputs.md +53 -0
  19. package/projects/{docs-demo → stego-docs}/package.json +1 -1
  20. package/projects/stego-docs/spine/commands.md +55 -0
  21. package/projects/stego-docs/spine/concepts.md +62 -0
  22. package/projects/stego-docs/spine/configuration.md +49 -0
  23. package/projects/stego-docs/spine/integrations.md +37 -0
  24. package/projects/stego-docs/spine/workflows.md +42 -0
  25. package/projects/stego-docs/stego-project.json +50 -0
  26. package/docs/conventions.md +0 -182
  27. package/docs/workflow.md +0 -78
  28. package/projects/docs-demo/README.md +0 -20
  29. package/projects/docs-demo/manuscript/100-what-stego-is.md +0 -37
  30. package/projects/docs-demo/manuscript/200-writing-workflow.md +0 -69
  31. package/projects/docs-demo/manuscript/300-quality-gates.md +0 -36
  32. package/projects/docs-demo/manuscript/400-build-and-export.md +0 -42
  33. package/projects/docs-demo/stego-project.json +0 -9
  34. /package/projects/{plague-demo → fiction-example}/.markdownlint.json +0 -0
  35. /package/projects/{docs-demo → fiction-example}/dist/.gitkeep +0 -0
  36. /package/projects/{plague-demo → fiction-example}/manuscript/100-the-commission.md +0 -0
  37. /package/projects/{plague-demo → fiction-example}/manuscript/200-at-the-wards.md +0 -0
  38. /package/projects/{plague-demo → fiction-example}/manuscript/400-the-final-account.md +0 -0
  39. /package/projects/{plague-demo → fiction-example}/notes/style-guide.md +0 -0
  40. /package/projects/{plague-demo → fiction-example}/spine/characters.md +0 -0
  41. /package/projects/{plague-demo → fiction-example}/spine/locations.md +0 -0
  42. /package/projects/{plague-demo → fiction-example}/spine/sources.md +0 -0
  43. /package/projects/{plague-demo → stego-docs}/dist/.gitkeep +0 -0
  44. /package/projects/{docs-demo → stego-docs}/notes/implementation-notes.md +0 -0
  45. /package/projects/{docs-demo → stego-docs}/notes/style-guide.md +0 -0
package/.gitignore CHANGED
@@ -6,3 +6,4 @@ projects/*/dist/*
6
6
  !projects/*/dist/.gitkeep
7
7
  projects/*/.vscode/settings.json
8
8
  .vscode/settings.json
9
+ local-only/
package/LICENSE ADDED
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,22 +1,12 @@
1
- # Stego
1
+ # Stego CLI
2
2
 
3
- Stego is a Markdown-first creative writing workflow packaged as an installable CLI: `stego-cli`.
3
+ `stego-cli` is an installable CLI for the Stego writing workflow.
4
4
 
5
- This repository is the source for the CLI and the example/template content that `stego init` scaffolds into a new workspace.
5
+ It scaffolds a Stego workspace, validates manuscript structure and metadata, runs stage-aware quality gates, builds compiled markdown outputs, and exports release formats.
6
6
 
7
- ## What this includes
7
+ This repository is the source for the CLI and the template/example projects that `stego init` scaffolds.
8
8
 
9
- - Installable CLI (`stego`) for creating and operating Stego workspaces
10
- - Project-per-folder structure inside one monorepo.
11
- - Flexible manuscript files with per-project metadata requirements.
12
- - Configurable manuscript grouping via `compileStructure.levels` (for example `part` + `chapter`).
13
- - Project-defined spine categories (configured in each `stego-project.json`).
14
- - Deterministic build into one manuscript Markdown file.
15
- - Stage-based quality gates (`draft` -> `final`).
16
- - Export abstraction (`md` always, `docx`/`pdf` via optional `pandoc`).
17
- - Example/demo projects (`docs-demo`, `plague-demo`) included in `stego init`.
18
-
19
- ## Getting started (from npm)
9
+ ## Quick start (install + init)
20
10
 
21
11
  ```bash
22
12
  npm install -g stego-cli
@@ -24,73 +14,69 @@ npm install -g stego-cli
24
14
  mkdir my-stego-workspace
25
15
  cd my-stego-workspace
26
16
  stego init
27
-
28
17
  npm install
29
- npm run list-projects
30
- npm run validate -- --project plague-demo
31
- npm run build -- --project plague-demo
32
- npm run check-stage -- --project plague-demo --stage revise
33
- npm run export -- --project plague-demo --format md
18
+
19
+ stego list-projects
20
+ stego validate --project fiction-example
21
+ stego build --project fiction-example
34
22
  ```
35
23
 
36
- `stego init` scaffolds a new workspace in the current directory (it must be empty unless you pass `--force`).
24
+ `stego init` scaffolds two example projects:
37
25
 
38
- Create another project in the workspace:
26
+ - `stego-docs` (the full documentation project)
27
+ - `fiction-example` (a fiction-oriented demo with rich Spine usage)
39
28
 
40
- ```bash
41
- stego new-project --project my-new-project --title "My New Project"
42
- ```
29
+ For day-to-day editing, open a project folder in VS Code (for example `projects/stego-docs`) and use the Stego VS Code extension, which is the official UI for Stego projects.
30
+
31
+ ## Full documentation
43
32
 
44
- `stego new-project` scaffolds `manuscript/`, `spine/`, `notes/`, and `dist/`, seeds `stego-project.json`, creates a project-local `package.json`, and writes `.vscode/extensions.json` recommendations (Stego + Saurus) for that project.
33
+ The full user documentation lives in the `stego-docs` project.
45
34
 
46
- ## Running commands for a specific project
35
+ - In a scaffolded workspace: `projects/stego-docs`
36
+ - In this source repo: `projects/stego-docs`
47
37
 
48
- From the workspace root, target a project with `--project`:
38
+ Start by reading the manuscript files in order, or build the docs project:
49
39
 
50
40
  ```bash
51
- npm run validate -- --project plague-demo
52
- npm run build -- --project plague-demo
53
- npm run check-stage -- --project plague-demo --stage proof
54
- npm run export -- --project plague-demo --format md
41
+ stego build --project stego-docs
55
42
  ```
56
43
 
57
- Each project also has local scripts, so you can work from inside the project directory:
44
+ ## Core commands
45
+
46
+ Run commands from the workspace root and target a project with `--project`.
58
47
 
59
48
  ```bash
60
- cd projects/plague-demo
61
- npm run validate
62
- npm run build
63
- npm run check-stage -- --stage proof
64
- npm run export -- --format md
49
+ stego list-projects
50
+ stego new-project --project my-book --title "My Book"
51
+ stego validate --project fiction-example
52
+ stego build --project fiction-example
53
+ stego check-stage --project fiction-example --stage revise
54
+ stego export --project fiction-example --format md
65
55
  ```
66
56
 
67
- ## VS Code workflow
57
+ Projects also include local npm scripts so you can work from inside a project directory.
68
58
 
69
- When you are actively working on one project, open that project directory directly in VS Code (for example `projects/plague-demo`) rather than the whole workspace.
59
+ ## VS Code workflow
70
60
 
71
- This keeps editor context focused and applies the project's recommended extensions via `projects/<project-id>/.vscode/extensions.json`.
61
+ When actively working on one project, open that project directory directly in VS Code (for example `projects/fiction-example`).
72
62
 
73
- ## Developing `stego-cli` (this repo)
63
+ The Stego VS Code extension is the official UI for Stego projects, and opening a single project keeps its UI context and Spine Browser focused. Project folders also include extension recommendations.
74
64
 
75
- If you are working on the CLI itself (this repository), use the local development scripts:
65
+ ## Develop `stego-cli` (this repo)
76
66
 
77
67
  ```bash
78
68
  npm install
79
69
  npm run list-projects
80
- npm run validate -- --project docs-demo
81
- npm run build -- --project plague-demo
82
- npm run test:compile-structure
70
+ npm run validate -- --project stego-docs
71
+ npm run build -- --project fiction-example
72
+ npm run test
83
73
  npm run build:cli
84
74
  npm run pack:dry-run
85
75
  ```
86
76
 
87
- These source-repo scripts run the TypeScript CLI directly with Node (`--experimental-strip-types`) for local development.
88
-
89
- ## Export requirements (DOCX/PDF)
77
+ ## Export requirements (`docx`, `pdf`, `epub`)
90
78
 
91
- `docx` and `pdf` export require `pandoc` on your system `PATH`.
92
-
93
- Install:
79
+ These formats require `pandoc` on your `PATH`.
94
80
 
95
81
  ```bash
96
82
  # macOS (Homebrew)
@@ -106,139 +92,3 @@ sudo apt-get update && sudo apt-get install -y pandoc
106
92
  # Windows (winget)
107
93
  winget install --id JohnMacFarlane.Pandoc -e
108
94
  ```
109
-
110
- Verify:
111
-
112
- ```bash
113
- pandoc --version
114
- ```
115
-
116
- Then run:
117
-
118
- ```bash
119
- npm run export -- --project plague-demo --format docx
120
- npm run export -- --project plague-demo --format pdf
121
- ```
122
-
123
- ## Scaffolded workspace layout
124
-
125
- - `projects/<project-id>/manuscript/` source manuscript files
126
- - `projects/<project-id>/spine/` canonical spine category files (`spineCategories[*].notesFile`)
127
- - `projects/<project-id>/notes/` regular notes and planning docs
128
- - `projects/<project-id>/dist/` generated outputs only
129
- - `stego.config.json` workspace configuration
130
- - `docs/` workflow and conventions
131
- - `.vscode/tasks.json` root VS Code tasks for common Stego commands
132
-
133
- ## This repo layout (`stego-cli` source)
134
-
135
- - `tools/` CLI source code and exporters
136
- - `projects/` template/demo projects bundled by `stego init`
137
- - `docs/` user-facing docs copied into scaffolded workspaces
138
- - `.github/workflows/` CI + Changesets release automation
139
-
140
- ## Project spine categories
141
-
142
- Spine categories are not fixed. Each project can declare them in `stego-project.json` under `spineCategories`.
143
-
144
- Example:
145
-
146
- ```json
147
- {
148
- "spineCategories": [
149
- { "key": "cast", "prefix": "CHAR", "notesFile": "characters.md" },
150
- { "key": "places", "prefix": "LOC", "notesFile": "locations.md" },
151
- { "key": "incidents", "prefix": "EVENT", "notesFile": "timeline.md" },
152
- { "key": "ordinances", "prefix": "STATUTE", "notesFile": "ordinances.md" }
153
- ]
154
- }
155
- ```
156
-
157
- Use those keys as metadata arrays in manuscript files (for example `cast`, `places`, `incidents`, `ordinances`).
158
- Each `notesFile` is a filename resolved in `spine/` (for example `spine/characters.md`).
159
-
160
- If `spineCategories` is omitted or empty, category-based continuity validation is disabled.
161
-
162
- ## Project metadata requirements
163
-
164
- Base config defaults to `status`.
165
-
166
- Each project can override required keys in `stego-project.json`:
167
-
168
- ```json
169
- {
170
- "requiredMetadata": ["status", "chapter", "pov", "timeline"]
171
- }
172
- ```
173
-
174
- These keys are advisory and reported as warnings when missing; they do not block validate/build/export.
175
- Files may omit metadata entirely.
176
-
177
- ## Compile structure (grouped manuscript output)
178
-
179
- Build grouping is configured per project with `compileStructure.levels`.
180
-
181
- Example:
182
-
183
- ```json
184
- {
185
- "compileStructure": {
186
- "levels": [
187
- {
188
- "key": "part",
189
- "label": "Part",
190
- "titleKey": "part_title",
191
- "injectHeading": true,
192
- "headingTemplate": "{label} {value}: {title}",
193
- "pageBreak": "between-groups"
194
- },
195
- {
196
- "key": "chapter",
197
- "label": "Chapter",
198
- "titleKey": "chapter_title",
199
- "injectHeading": true,
200
- "headingTemplate": "{label} {value}: {title}",
201
- "pageBreak": "between-groups"
202
- }
203
- ]
204
- }
205
- }
206
- ```
207
-
208
- Notes:
209
-
210
- - `pageBreak` currently supports `none` or `between-groups`.
211
- - TOC entries are nested by level depth.
212
- - Missing group key/title values inherit from the previous manuscript file, so you only need to set metadata at structural boundaries.
213
- - `validate` reports configuration errors for invalid `compileStructure` entries.
214
-
215
- ## Included examples
216
-
217
- - `plague-demo`: full configuration — rich metadata (`pov`, `timeline`), three spine categories (`characters`, `locations`, `sources`), cross-linked spine with Wikipedia reference links
218
- - `docs-demo`: nonfiction documentation configuration — no spine categories, freeform notes only, primarily `status` metadata
219
-
220
- ## Placeholder edit workflow (`{{...}}` + Cmd+I)
221
-
222
- This repo includes Copilot instruction files to keep placeholder edits scoped:
223
-
224
- - `.github/copilot-instructions.md`
225
- - `.github/instructions/placeholder-fill.instructions.md`
226
-
227
- Placeholder convention:
228
-
229
- - Write draft placeholders as `{{...}}` in manuscript prose.
230
- - Select the placeholder text and run Cmd+I.
231
- - Use short prompts like `fill placeholder` or `replace only inside {{}}`.
232
-
233
- Expected behavior:
234
-
235
- - Replace only the content inside braces.
236
- - Preserve surrounding sentence/paragraph text.
237
-
238
- ## Next Steps
239
-
240
- - Add Mermaid graphs of metadata (entity relationships, co-occurrence, chapter sequence).
241
-
242
- ## VS Code tasks
243
-
244
- Tasks are defined in `.vscode/tasks.json` for validate/build/stage-check/export.
package/dist/stego-cli.js CHANGED
@@ -34,25 +34,26 @@ This directory is a Stego writing workspace (a monorepo for one or more writing
34
34
  ## What was scaffolded
35
35
 
36
36
  - \`stego.config.json\` workspace configuration
37
- - \`projects/\` demo projects (\`docs-demo\` and \`plague-demo\`)
38
- - \`docs/\` workflow and conventions docs
37
+ - \`projects/\` demo projects (\`stego-docs\` and \`fiction-example\`)
39
38
  - root \`package.json\` scripts for Stego commands
40
39
  - root \`.vscode/tasks.json\` tasks for common workflows
41
40
 
41
+ Full documentation lives in \`projects/stego-docs\`.
42
+
42
43
  ## First run
43
44
 
44
45
  \`\`\`bash
45
46
  npm install
46
- npm run list-projects
47
+ stego list-projects
47
48
  \`\`\`
48
49
 
49
50
  ## Run commands for a specific project (from workspace root)
50
51
 
51
52
  \`\`\`bash
52
- npm run validate -- --project plague-demo
53
- npm run build -- --project plague-demo
54
- npm run check-stage -- --project plague-demo --stage revise
55
- npm run export -- --project plague-demo --format md
53
+ stego validate --project fiction-example
54
+ stego build --project fiction-example
55
+ stego check-stage --project fiction-example --stage revise
56
+ stego export --project fiction-example --format md
56
57
  \`\`\`
57
58
 
58
59
  ## Work inside one project
@@ -60,14 +61,14 @@ npm run export -- --project plague-demo --format md
60
61
  Each project also has local scripts, so you can run commands from inside a project directory:
61
62
 
62
63
  \`\`\`bash
63
- cd projects/plague-demo
64
+ cd projects/fiction-example
64
65
  npm run validate
65
66
  npm run build
66
67
  \`\`\`
67
68
 
68
69
  ## VS Code recommendation
69
70
 
70
- When you are actively working on one project, open that project directory directly in VS Code (for example \`projects/plague-demo\`).
71
+ When you are actively working on one project, open that project directory directly in VS Code (for example \`projects/fiction-example\`).
71
72
 
72
73
  This keeps your editor context focused and applies the project's recommended extensions (including Stego + Saurus) for that project.
73
74
 
@@ -465,7 +466,6 @@ async function initWorkspace(options) {
465
466
  copyTemplateAsset(".markdownlint.json", targetRoot, copiedPaths);
466
467
  copyTemplateAsset(".cspell.json", targetRoot, copiedPaths);
467
468
  copyTemplateAsset(ROOT_CONFIG_FILENAME, targetRoot, copiedPaths);
468
- copyTemplateAsset("docs", targetRoot, copiedPaths);
469
469
  copyTemplateAsset("projects", targetRoot, copiedPaths);
470
470
  copyTemplateAsset(path.join(".vscode", "tasks.json"), targetRoot, copiedPaths);
471
471
  copyTemplateAsset(path.join(".vscode", "extensions.json"), targetRoot, copiedPaths, { optional: true });
@@ -483,8 +483,9 @@ async function initWorkspace(options) {
483
483
  logLine("");
484
484
  logLine("Next steps:");
485
485
  logLine(" npm install");
486
- logLine(" npm run list-projects");
487
- logLine(" npm run validate -- --project plague-demo");
486
+ logLine(" stego list-projects");
487
+ logLine(" stego validate --project fiction-example");
488
+ logLine(" stego build --project fiction-example");
488
489
  }
489
490
  async function promptYesNo(question, defaultYes) {
490
491
  if (!process.stdin.isTTY || !process.stdout.isTTY) {
@@ -589,9 +590,6 @@ function rewriteTemplateProjectPackageScripts(targetRoot) {
589
590
  const scripts = isPlainObject(projectPackage.scripts)
590
591
  ? { ...projectPackage.scripts }
591
592
  : {};
592
- if (typeof projectPackage.name === "string" && projectPackage.name.startsWith("writing-project-")) {
593
- projectPackage.name = projectPackage.name.replace(/^writing-project-/, "stego-project-");
594
- }
595
593
  scripts.validate = "npx --no-install stego validate";
596
594
  scripts.build = "npx --no-install stego build";
597
595
  scripts["check-stage"] = "npx --no-install stego check-stage";
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "stego-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Installable CLI for the Stego writing monorepo workflow.",
6
+ "license": "Apache-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/matt-gold/stego.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/matt-gold/stego/issues"
13
+ },
14
+ "homepage": "https://github.com/matt-gold/stego#readme",
6
15
  "bin": {
7
16
  "stego": "dist/stego-cli.js"
8
17
  },
@@ -11,8 +20,8 @@
11
20
  },
12
21
  "files": [
13
22
  "dist/**",
14
- "docs/**",
15
23
  "projects/**",
24
+ "!projects/local-only/**",
16
25
  "!projects/*/dist/*.md",
17
26
  "!projects/*/dist/exports/**",
18
27
  ".vscode/tasks.json",
@@ -1,4 +1,4 @@
1
- # Under Saturn's Breath (Demo)
1
+ # Under Saturn's Breath (Fiction Example)
2
2
 
3
3
  A full-configuration demo with rich metadata, three spine categories, cross-linked spine entries, and external reference links.
4
4
 
@@ -12,8 +12,8 @@ A full-configuration demo with rich metadata, three spine categories, cross-link
12
12
  Run from `/Users/mattgold/Code/stego`:
13
13
 
14
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
15
+ npm run validate -- --project fiction-example
16
+ npm run build -- --project fiction-example
17
+ npm run check-stage -- --project fiction-example --stage draft
18
+ npm run export -- --project fiction-example --format md
19
19
  ```
@@ -23,16 +23,4 @@ No one accused him of sorcery. They accused him of carelessness: in a season of
23
23
 
24
24
  He defended himself precisely. A text could be illicit in circulation yet sound in analysis; truth did not inherit legal status from its scribes. Raoul answered that governance could not afford that distinction under plague conditions.
25
25
 
26
- The compromise was severe but survivable. Matthaeus would keep his position, surrender the quire, and circulate only conclusions framed in authorized language. Etienne copied the agreement and watched his master sign it without hesitation, as though the quire had already given him everything he needed and its confiscation changed nothing.
27
-
28
- <!-- stego-comments:start -->
29
-
30
- <!-- comment: CMT-0001 -->
31
- <!-- meta64: eyJzdGF0dXMiOiJvcGVuIiwiY3JlYXRlZF9hdCI6IjIwMjYtMDItMjFUMDQ6MjI6MzguMDE4WiIsInRpbWV6b25lIjoiQW1lcmljYS9OZXdfWW9yayIsInRpbWV6b25lX29mZnNldF9taW51dGVzIjotMzAwLCJwYXJhZ3JhcGhfaW5kZXgiOjAsImV4Y2VycHRfc3RhcnRfbGluZSI6MTgsImV4Y2VycHRfc3RhcnRfY29sIjozMDcsImV4Y2VycHRfZW5kX2xpbmUiOjE4LCJleGNlcnB0X2VuZF9jb2wiOjMxM30 -->
32
- > _Feb 21, 2026, 4:22 AM — mattgold_
33
- >
34
- > > “Arabic”
35
- >
36
- > spicy
37
-
38
- <!-- stego-comments:end -->
26
+ The compromise was severe but survivable. Matthaeus would keep his position, surrender the quire, and circulate only conclusions framed in authorized language. Etienne copied the agreement and watched his master sign it without hesitation, as though the quire had already given him everything he needed and its confiscation changed nothing.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "writing-project-plague-demo",
2
+ "name": "stego-project-fiction-example",
3
3
  "private": true,
4
4
  "scripts": {
5
5
  "validate": "node --experimental-strip-types ../../tools/stego-cli.ts validate",
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "plague-demo",
2
+ "id": "fiction-example",
3
3
  "title": "Under Saturn's Breath (Demo)",
4
4
  "subtitle": "Paris, 1348 — a scholar builds a total explanation of the pestilence",
5
5
  "author": "Matt Gold",
@@ -0,0 +1,27 @@
1
+ # Stego Docs
2
+
3
+ This is the canonical Stego documentation project.
4
+
5
+ It is a real Stego project that demonstrates:
6
+
7
+ - docs-first usage of the workspace model
8
+ - Spine-driven navigation for commands, concepts, workflows, configuration, and integrations
9
+ - build/export behavior for documentation teams
10
+
11
+ ## Read the docs
12
+
13
+ Open `manuscript/` in order, or build the compiled manual:
14
+
15
+ ```bash
16
+ stego build --project stego-docs
17
+ ```
18
+
19
+ If you are working in this source repo (not a scaffolded workspace), the equivalent is:
20
+
21
+ ```bash
22
+ npm run build -- --project stego-docs
23
+ ```
24
+
25
+ ## Recommended VS Code workflow
26
+
27
+ Open `projects/stego-docs` directly in VS Code while editing this project so project recommendations and the Spine Browser stay focused on the documentation graph.
@@ -0,0 +1,56 @@
1
+ ---
2
+ status: draft
3
+ chapter: 1
4
+ chapter_title: What Stego Is
5
+ concepts:
6
+ - CON-WORKSPACE
7
+ - CON-PROJECT
8
+ - CON-MANUSCRIPT
9
+ - CON-NOTES
10
+ - CON-DIST
11
+ workflows:
12
+ - FLOW-INIT-WORKSPACE
13
+ - FLOW-DAILY-WRITING
14
+ commands:
15
+ - CMD-INIT
16
+ - CMD-LIST-PROJECTS
17
+ integrations:
18
+ - INT-VSCODE
19
+ - INT-STEGO-EXTENSION
20
+ ---
21
+
22
+ # What Stego Is
23
+
24
+ Stego is a Markdown-first writing workflow organized around a workspace that contains one or more writing projects.
25
+
26
+ It combines local source files, validation, stage gates, build output, and export into a single CLI-driven system that works well with Git and VS Code.
27
+
28
+ The CLI is the command and automation surface, and the Stego VS Code extension is the official UI for working inside Stego projects.
29
+
30
+ ## Core model
31
+
32
+ A Stego workspace has a shared root configuration and a `projects/` directory.
33
+
34
+ Each project is self-contained and typically includes:
35
+
36
+ - `manuscript/` for canonical source text
37
+ - `notes/` for planning and reference material
38
+ - `spine/` for canonical entities and reference graphs (when enabled)
39
+ - `dist/` for generated output only
40
+
41
+ ## Why this structure works
42
+
43
+ Stego keeps source authoring close to the tools that evaluate and build it.
44
+
45
+ That makes it easier to:
46
+
47
+ - validate metadata and structure early
48
+ - run stage-aware checks before release milestones
49
+ - build deterministic compiled output for review
50
+ - keep generated artifacts separate from hand-edited source material
51
+
52
+ ## Who this is for
53
+
54
+ Stego works for fiction, nonfiction, and internal documentation teams.
55
+
56
+ This project (`stego-docs`) demonstrates the documentation use case. The parent workspace includes a `fiction-example` as well.
@@ -0,0 +1,68 @@
1
+ ---
2
+ status: draft
3
+ chapter: 2
4
+ chapter_title: Install and Initialize
5
+ concepts:
6
+ - CON-WORKSPACE
7
+ - CON-PROJECT
8
+ commands:
9
+ - CMD-INIT
10
+ - CMD-LIST-PROJECTS
11
+ workflows:
12
+ - FLOW-INIT-WORKSPACE
13
+ integrations:
14
+ - INT-VSCODE
15
+ - INT-STEGO-EXTENSION
16
+ ---
17
+
18
+ # Install and Initialize
19
+
20
+ ## Install the CLI
21
+
22
+ Install the CLI globally so the `stego` command is available in your shell.
23
+
24
+ ```bash
25
+ npm install -g stego-cli
26
+ ```
27
+
28
+ ## Create a workspace
29
+
30
+ Start in an empty directory and initialize a Stego workspace.
31
+
32
+ ```bash
33
+ mkdir my-stego-workspace
34
+ cd my-stego-workspace
35
+ stego init
36
+ ```
37
+
38
+ The command scaffolds a workspace with a root config, root scripts, VS Code tasks, and two example projects: `stego-docs` and `fiction-example`.
39
+
40
+ If you need to initialize into a non-empty directory, run `stego init --force`.
41
+
42
+ ## Install workspace tools
43
+
44
+ After scaffolding, install the workspace dependencies used by local scripts and quality checks.
45
+
46
+ ```bash
47
+ npm install
48
+ ```
49
+
50
+ ## Open a project in the official UI
51
+
52
+ After scaffolding, open one project directory in VS Code (start with `projects/stego-docs`).
53
+
54
+ The Stego VS Code extension is the official UI for Stego projects. It provides project-aware controls, checks, and Spine Browser navigation while you edit.
55
+
56
+ The scaffolded project folders include extension recommendations to help you install the Stego extension (and the Saurus companion extension) quickly.
57
+
58
+ ## Confirm the workspace is working
59
+
60
+ Run a few commands from the workspace root.
61
+
62
+ ```bash
63
+ stego list-projects
64
+ stego validate --project stego-docs
65
+ stego build --project stego-docs
66
+ ```
67
+
68
+ The full documentation for the workspace lives inside the `stego-docs` project you just scaffolded.