stego-cli 0.1.6 → 0.1.7
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/.markdownlint.manuscript.json +8 -0
- package/dist/stego-cli.js +150 -9
- package/package.json +6 -4
- package/projects/fiction-example/.markdownlint.json +2 -1
- package/projects/fiction-example/.markdownlint.manuscript.json +8 -0
- package/projects/fiction-example/spine/characters.md +4 -0
- package/projects/fiction-example/spine/locations.md +4 -0
- package/projects/fiction-example/spine/sources.md +3 -0
- package/projects/stego-docs/spine/commands.md +7 -0
- package/projects/stego-docs/spine/concepts.md +10 -0
- package/projects/stego-docs/spine/configuration.md +8 -0
- package/projects/stego-docs/spine/integrations.md +6 -0
- package/projects/stego-docs/spine/workflows.md +6 -0
package/dist/stego-cli.js
CHANGED
|
@@ -157,6 +157,18 @@ async function main() {
|
|
|
157
157
|
}
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
+
case "lint": {
|
|
161
|
+
activateWorkspace(options);
|
|
162
|
+
const project = resolveProject(readStringOption(options, "project"));
|
|
163
|
+
const selection = resolveLintSelection(options);
|
|
164
|
+
const result = runProjectLint(project, selection);
|
|
165
|
+
printReport(result.issues);
|
|
166
|
+
exitIfErrors(result.issues);
|
|
167
|
+
const scopeLabel = formatLintSelection(selection);
|
|
168
|
+
const fileLabel = result.fileCount === 1 ? "file" : "files";
|
|
169
|
+
logLine(`Lint passed for '${project.id}' (${scopeLabel}, ${result.fileCount} ${fileLabel}).`);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
160
172
|
case "export": {
|
|
161
173
|
activateWorkspace(options);
|
|
162
174
|
const project = resolveProject(readStringOption(options, "project"));
|
|
@@ -464,6 +476,7 @@ async function initWorkspace(options) {
|
|
|
464
476
|
writeScaffoldGitignore(targetRoot, copiedPaths);
|
|
465
477
|
writeScaffoldReadme(targetRoot, copiedPaths);
|
|
466
478
|
copyTemplateAsset(".markdownlint.json", targetRoot, copiedPaths);
|
|
479
|
+
copyTemplateAsset(".markdownlint.manuscript.json", targetRoot, copiedPaths);
|
|
467
480
|
copyTemplateAsset(".cspell.json", targetRoot, copiedPaths);
|
|
468
481
|
copyTemplateAsset(ROOT_CONFIG_FILENAME, targetRoot, copiedPaths);
|
|
469
482
|
copyTemplateAsset("projects", targetRoot, copiedPaths);
|
|
@@ -684,6 +697,7 @@ function writeInitRootPackageJson(targetRoot) {
|
|
|
684
697
|
scripts: {
|
|
685
698
|
"list-projects": "stego list-projects",
|
|
686
699
|
"new-project": "stego new-project",
|
|
700
|
+
lint: "stego lint",
|
|
687
701
|
validate: "stego validate",
|
|
688
702
|
build: "stego build",
|
|
689
703
|
"check-stage": "stego check-stage",
|
|
@@ -698,7 +712,7 @@ function writeInitRootPackageJson(targetRoot) {
|
|
|
698
712
|
fs.writeFileSync(path.join(targetRoot, "package.json"), `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
|
|
699
713
|
}
|
|
700
714
|
function printUsage() {
|
|
701
|
-
console.log(`Stego CLI\n\nCommands:\n init [--force]\n list-projects [--root <path>]\n new-project --project <project-id> [--title <title>] [--root <path>]\n validate --project <project-id> [--file <project-relative-manuscript-path>] [--root <path>]\n build --project <project-id> [--root <path>]\n check-stage --project <project-id> --stage <draft|revise|line-edit|proof|final> [--file <project-relative-manuscript-path>] [--root <path>]\n export --project <project-id> --format <md|docx|pdf|epub> [--output <path>] [--root <path>]\n`);
|
|
715
|
+
console.log(`Stego CLI\n\nCommands:\n init [--force]\n list-projects [--root <path>]\n new-project --project <project-id> [--title <title>] [--root <path>]\n validate --project <project-id> [--file <project-relative-manuscript-path>] [--root <path>]\n build --project <project-id> [--root <path>]\n check-stage --project <project-id> --stage <draft|revise|line-edit|proof|final> [--file <project-relative-manuscript-path>] [--root <path>]\n lint --project <project-id> [--manuscript|--spine] [--root <path>]\n export --project <project-id> --format <md|docx|pdf|epub> [--output <path>] [--root <path>]\n`);
|
|
702
716
|
}
|
|
703
717
|
function listProjects() {
|
|
704
718
|
const ids = getProjectIds();
|
|
@@ -729,6 +743,7 @@ async function createProject(projectIdOption, titleOption) {
|
|
|
729
743
|
const notesDir = path.join(projectRoot, config.notesDir);
|
|
730
744
|
fs.mkdirSync(notesDir, { recursive: true });
|
|
731
745
|
fs.mkdirSync(path.join(projectRoot, config.distDir), { recursive: true });
|
|
746
|
+
const manuscriptDir = path.join(projectRoot, config.chapterDir);
|
|
732
747
|
const projectJson = {
|
|
733
748
|
id: projectId,
|
|
734
749
|
title: titleOption?.trim() || toDisplayTitle(projectId),
|
|
@@ -759,6 +774,7 @@ async function createProject(projectIdOption, titleOption) {
|
|
|
759
774
|
name: `stego-project-${projectId}`,
|
|
760
775
|
private: true,
|
|
761
776
|
scripts: {
|
|
777
|
+
lint: "npx --no-install stego lint",
|
|
762
778
|
validate: "npx --no-install stego validate",
|
|
763
779
|
build: "npx --no-install stego build",
|
|
764
780
|
"check-stage": "npx --no-install stego check-stage",
|
|
@@ -767,6 +783,17 @@ async function createProject(projectIdOption, titleOption) {
|
|
|
767
783
|
};
|
|
768
784
|
const projectPackagePath = path.join(projectRoot, "package.json");
|
|
769
785
|
fs.writeFileSync(projectPackagePath, `${JSON.stringify(projectPackage, null, 2)}\n`, "utf8");
|
|
786
|
+
const starterManuscriptPath = path.join(manuscriptDir, "100-hello-world.md");
|
|
787
|
+
fs.writeFileSync(starterManuscriptPath, `---
|
|
788
|
+
status: draft
|
|
789
|
+
chapter: 1
|
|
790
|
+
chapter_title: Hello World
|
|
791
|
+
---
|
|
792
|
+
|
|
793
|
+
# Hello World
|
|
794
|
+
|
|
795
|
+
Start writing here.
|
|
796
|
+
`, "utf8");
|
|
770
797
|
const charactersNotesPath = path.join(spineDir, "characters.md");
|
|
771
798
|
fs.writeFileSync(charactersNotesPath, "# Characters\n\n", "utf8");
|
|
772
799
|
const projectExtensionsPath = path.join(projectRoot, ".vscode", "extensions.json");
|
|
@@ -779,6 +806,7 @@ async function createProject(projectIdOption, titleOption) {
|
|
|
779
806
|
logLine(`Created project: ${path.relative(repoRoot, projectRoot)}`);
|
|
780
807
|
logLine(`- ${path.relative(repoRoot, projectJsonPath)}`);
|
|
781
808
|
logLine(`- ${path.relative(repoRoot, projectPackagePath)}`);
|
|
809
|
+
logLine(`- ${path.relative(repoRoot, starterManuscriptPath)}`);
|
|
782
810
|
logLine(`- ${path.relative(repoRoot, charactersNotesPath)}`);
|
|
783
811
|
logLine(`- ${path.relative(repoRoot, projectExtensionsPath)}`);
|
|
784
812
|
if (projectSettingsPath) {
|
|
@@ -1602,10 +1630,10 @@ function runStageCheck(project, runtimeConfig, stage, onlyFile) {
|
|
|
1602
1630
|
const chapterPaths = report.chapters.map((chapter) => chapter.path);
|
|
1603
1631
|
const spineWords = collectSpineWordsForSpellcheck(report.spineState.ids);
|
|
1604
1632
|
if (policy.enforceMarkdownlint) {
|
|
1605
|
-
issues.push(...runMarkdownlint(project, chapterPaths, true));
|
|
1633
|
+
issues.push(...runMarkdownlint(project, chapterPaths, true, "manuscript"));
|
|
1606
1634
|
}
|
|
1607
1635
|
else {
|
|
1608
|
-
issues.push(...runMarkdownlint(project, chapterPaths, false));
|
|
1636
|
+
issues.push(...runMarkdownlint(project, chapterPaths, false, "manuscript"));
|
|
1609
1637
|
}
|
|
1610
1638
|
if (policy.enforceCSpell) {
|
|
1611
1639
|
issues.push(...runCSpell(chapterPaths, true, spineWords));
|
|
@@ -1615,20 +1643,133 @@ function runStageCheck(project, runtimeConfig, stage, onlyFile) {
|
|
|
1615
1643
|
}
|
|
1616
1644
|
return { chapters: report.chapters, issues };
|
|
1617
1645
|
}
|
|
1618
|
-
function
|
|
1646
|
+
function resolveLintSelection(options) {
|
|
1647
|
+
const manuscript = readBooleanOption(options, "manuscript");
|
|
1648
|
+
const spine = readBooleanOption(options, "spine");
|
|
1649
|
+
if (!manuscript && !spine) {
|
|
1650
|
+
return { manuscript: true, spine: true };
|
|
1651
|
+
}
|
|
1652
|
+
return { manuscript, spine };
|
|
1653
|
+
}
|
|
1654
|
+
function formatLintSelection(selection) {
|
|
1655
|
+
if (selection.manuscript && selection.spine) {
|
|
1656
|
+
return "manuscript + spine";
|
|
1657
|
+
}
|
|
1658
|
+
if (selection.manuscript) {
|
|
1659
|
+
return "manuscript";
|
|
1660
|
+
}
|
|
1661
|
+
if (selection.spine) {
|
|
1662
|
+
return "spine";
|
|
1663
|
+
}
|
|
1664
|
+
return "none";
|
|
1665
|
+
}
|
|
1666
|
+
function runProjectLint(project, selection) {
|
|
1667
|
+
const issues = [];
|
|
1668
|
+
let fileCount = 0;
|
|
1669
|
+
if (selection.manuscript) {
|
|
1670
|
+
const manuscriptFiles = collectTopLevelMarkdownFiles(project.manuscriptDir);
|
|
1671
|
+
if (manuscriptFiles.length === 0) {
|
|
1672
|
+
issues.push(makeIssue("error", "lint", `No manuscript markdown files found in ${project.manuscriptDir}`));
|
|
1673
|
+
}
|
|
1674
|
+
else {
|
|
1675
|
+
fileCount += manuscriptFiles.length;
|
|
1676
|
+
issues.push(...runMarkdownlint(project, manuscriptFiles, true, "manuscript"));
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
if (selection.spine) {
|
|
1680
|
+
const spineLintState = collectSpineLintMarkdownFiles(project);
|
|
1681
|
+
issues.push(...spineLintState.issues);
|
|
1682
|
+
if (spineLintState.files.length > 0) {
|
|
1683
|
+
fileCount += spineLintState.files.length;
|
|
1684
|
+
issues.push(...runMarkdownlint(project, spineLintState.files, true, "default"));
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
if (fileCount === 0 && issues.length === 0) {
|
|
1688
|
+
issues.push(makeIssue("error", "lint", `No markdown files found for lint scope '${formatLintSelection(selection)}' in project '${project.id}'.`));
|
|
1689
|
+
}
|
|
1690
|
+
return { issues, fileCount };
|
|
1691
|
+
}
|
|
1692
|
+
function collectSpineLintMarkdownFiles(project) {
|
|
1693
|
+
const issues = [];
|
|
1694
|
+
const files = new Set();
|
|
1695
|
+
addMarkdownFilesFromDirectory(files, project.spineDir, true);
|
|
1696
|
+
if (!fs.existsSync(project.spineDir)) {
|
|
1697
|
+
issues.push(makeIssue("warning", "lint", `Missing spine directory: ${project.spineDir}`));
|
|
1698
|
+
}
|
|
1699
|
+
addMarkdownFilesFromDirectory(files, project.notesDir, true);
|
|
1700
|
+
if (!fs.existsSync(project.notesDir)) {
|
|
1701
|
+
issues.push(makeIssue("warning", "lint", `Missing notes directory: ${project.notesDir}`));
|
|
1702
|
+
}
|
|
1703
|
+
for (const file of collectTopLevelMarkdownFiles(project.root)) {
|
|
1704
|
+
files.add(file);
|
|
1705
|
+
}
|
|
1706
|
+
const sortedFiles = Array.from(files).sort();
|
|
1707
|
+
if (sortedFiles.length === 0) {
|
|
1708
|
+
issues.push(makeIssue("error", "lint", `No spine/notes markdown files found in ${project.spineDir}, ${project.notesDir}, or project root.`));
|
|
1709
|
+
}
|
|
1710
|
+
return { files: sortedFiles, issues };
|
|
1711
|
+
}
|
|
1712
|
+
function collectTopLevelMarkdownFiles(directory) {
|
|
1713
|
+
if (!fs.existsSync(directory) || !fs.statSync(directory).isDirectory()) {
|
|
1714
|
+
return [];
|
|
1715
|
+
}
|
|
1716
|
+
return fs
|
|
1717
|
+
.readdirSync(directory, { withFileTypes: true })
|
|
1718
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
|
|
1719
|
+
.map((entry) => path.join(directory, entry.name))
|
|
1720
|
+
.sort();
|
|
1721
|
+
}
|
|
1722
|
+
function addMarkdownFilesFromDirectory(target, directory, recursive) {
|
|
1723
|
+
if (!fs.existsSync(directory) || !fs.statSync(directory).isDirectory()) {
|
|
1724
|
+
return;
|
|
1725
|
+
}
|
|
1726
|
+
const stack = [directory];
|
|
1727
|
+
while (stack.length > 0) {
|
|
1728
|
+
const current = stack.pop();
|
|
1729
|
+
if (!current) {
|
|
1730
|
+
continue;
|
|
1731
|
+
}
|
|
1732
|
+
const entries = fs.readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
1733
|
+
for (const entry of entries) {
|
|
1734
|
+
const fullPath = path.join(current, entry.name);
|
|
1735
|
+
if (entry.isFile() && entry.name.endsWith(".md")) {
|
|
1736
|
+
target.add(fullPath);
|
|
1737
|
+
continue;
|
|
1738
|
+
}
|
|
1739
|
+
if (recursive && entry.isDirectory()) {
|
|
1740
|
+
stack.push(fullPath);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
function runMarkdownlint(project, files, required, profile = "default") {
|
|
1746
|
+
if (files.length === 0) {
|
|
1747
|
+
return [];
|
|
1748
|
+
}
|
|
1619
1749
|
const markdownlintCommand = resolveCommand("markdownlint");
|
|
1620
1750
|
if (!markdownlintCommand) {
|
|
1621
1751
|
if (required) {
|
|
1622
1752
|
return [
|
|
1623
|
-
makeIssue("error", "tooling", "markdownlint is required for this
|
|
1753
|
+
makeIssue("error", "tooling", "markdownlint is required for this command but not installed. Run 'npm i' in the repo root.")
|
|
1624
1754
|
];
|
|
1625
1755
|
}
|
|
1626
1756
|
return [];
|
|
1627
1757
|
}
|
|
1628
|
-
const
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1631
|
-
|
|
1758
|
+
const manuscriptProjectConfigPath = path.join(project.root, ".markdownlint.manuscript.json");
|
|
1759
|
+
const manuscriptRepoConfigPath = path.join(repoRoot, ".markdownlint.manuscript.json");
|
|
1760
|
+
const defaultProjectConfigPath = path.join(project.root, ".markdownlint.json");
|
|
1761
|
+
const defaultRepoConfigPath = path.join(repoRoot, ".markdownlint.json");
|
|
1762
|
+
const markdownlintConfigPath = profile === "manuscript"
|
|
1763
|
+
? (fs.existsSync(manuscriptProjectConfigPath)
|
|
1764
|
+
? manuscriptProjectConfigPath
|
|
1765
|
+
: fs.existsSync(manuscriptRepoConfigPath)
|
|
1766
|
+
? manuscriptRepoConfigPath
|
|
1767
|
+
: fs.existsSync(defaultProjectConfigPath)
|
|
1768
|
+
? defaultProjectConfigPath
|
|
1769
|
+
: defaultRepoConfigPath)
|
|
1770
|
+
: (fs.existsSync(defaultProjectConfigPath)
|
|
1771
|
+
? defaultProjectConfigPath
|
|
1772
|
+
: defaultRepoConfigPath);
|
|
1632
1773
|
const prepared = prepareFilesWithoutComments(files);
|
|
1633
1774
|
try {
|
|
1634
1775
|
const result = spawnSync(markdownlintCommand, ["--config", markdownlintConfigPath, ...prepared.files], {
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stego-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Installable CLI for the Stego writing monorepo workflow.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/matt-gold/stego.git"
|
|
9
|
+
"url": "https://github.com/matt-gold/stego-cli.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/matt-gold/stego/issues"
|
|
12
|
+
"url": "https://github.com/matt-gold/stego-cli/issues"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://github.com/matt-gold/stego#readme",
|
|
14
|
+
"homepage": "https://github.com/matt-gold/stego-cli#readme",
|
|
15
15
|
"bin": {
|
|
16
16
|
"stego": "dist/stego-cli.js"
|
|
17
17
|
},
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
".vscode/extensions.json",
|
|
29
29
|
".gitignore",
|
|
30
30
|
".markdownlint.json",
|
|
31
|
+
".markdownlint.manuscript.json",
|
|
31
32
|
".cspell.json",
|
|
32
33
|
"stego.config.json",
|
|
33
34
|
"README.md"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"release:version": "changeset version",
|
|
42
43
|
"list-projects": "node --experimental-strip-types tools/stego-cli.ts list-projects",
|
|
43
44
|
"new-project": "node --experimental-strip-types tools/stego-cli.ts new-project",
|
|
45
|
+
"lint": "node --experimental-strip-types tools/stego-cli.ts lint",
|
|
44
46
|
"validate": "node --experimental-strip-types tools/stego-cli.ts validate",
|
|
45
47
|
"build": "node --experimental-strip-types tools/stego-cli.ts build",
|
|
46
48
|
"check-stage": "node --experimental-strip-types tools/stego-cli.ts check-stage",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Characters
|
|
2
2
|
|
|
3
3
|
## CHAR-MATTHAEUS
|
|
4
|
+
label: Magister Matthaeus de Rota
|
|
4
5
|
|
|
5
6
|
- Magister Matthaeus de Rota
|
|
6
7
|
- Role: Scholar of medicine and astrology at the University of Paris
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
- Arc: Builds a total explanation of the {{pestilence}} and dies at peace inside it; the question is whether his peace is understanding or its most sophisticated substitute
|
|
10
11
|
|
|
11
12
|
## CHAR-ETIENNE
|
|
13
|
+
label: Etienne of Saint-Marcel
|
|
12
14
|
|
|
13
15
|
- Etienne of Saint-Marcel
|
|
14
16
|
- Role: Young cleric-scribe attached to Matthaeus (CHAR-MATTHAEUS)
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
- Function: The story's witness; records the system without fully believing it, but also without offering an alternative
|
|
17
19
|
|
|
18
20
|
## CHAR-AGNES
|
|
21
|
+
label: Agnes the apothecary
|
|
19
22
|
|
|
20
23
|
- Agnes the apothecary
|
|
21
24
|
- Role: Compounder and practical healer near the Petit Pont; supplies Hôtel-Dieu (LOC-HOTELDIEU)
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
- Function: The counterweight; asks whether a system that can absorb any evidence without changing is a system or a habit
|
|
25
28
|
|
|
26
29
|
## CHAR-RAOUL
|
|
30
|
+
label: Canon Raoul de Villiers
|
|
27
31
|
|
|
28
32
|
- Canon Raoul de Villiers
|
|
29
33
|
- Role: Cathedral canon and royal intermediary overseeing the inquiry
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Locations
|
|
2
2
|
|
|
3
3
|
## LOC-COLLEGE
|
|
4
|
+
label: College chamber near the Rue Saint-Jacques
|
|
4
5
|
|
|
5
6
|
- College chamber near the Rue Saint-Jacques
|
|
6
7
|
- Study and disputation room
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
- Significance: The space where the system is built; physically separated from the wards and streets where the plague actually operates
|
|
10
11
|
|
|
11
12
|
## LOC-HOTELDIEU
|
|
13
|
+
label: "Hôtel-Dieu"
|
|
12
14
|
|
|
13
15
|
- Hôtel-Dieu
|
|
14
16
|
- Hospital ward near Notre-Dame
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
- Significance: Where data is collected; the distance between this room and the college chamber is the distance between observation and explanation
|
|
18
20
|
|
|
19
21
|
## LOC-QUAY
|
|
22
|
+
label: Grain quay on the Seine
|
|
20
23
|
|
|
21
24
|
- Grain quay on the Seine
|
|
22
25
|
- River unloading zone
|
|
@@ -25,6 +28,7 @@
|
|
|
25
28
|
- Significance: Agnes's observations (SRC-WARD-DATA) trace infection along this route; it is the strongest evidence for material transmission and the hardest for the celestial framework (SRC-CONJUNCTION) to accommodate
|
|
26
29
|
|
|
27
30
|
## LOC-CHARNEL
|
|
31
|
+
label: Charnel precinct at the cemetery edge
|
|
28
32
|
|
|
29
33
|
- Charnel precinct at the cemetery edge
|
|
30
34
|
- Overflow burial ground
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Sources
|
|
2
2
|
|
|
3
3
|
## SRC-CONJUNCTION
|
|
4
|
+
label: The Great Conjunction theory
|
|
4
5
|
|
|
5
6
|
- The Great Conjunction theory
|
|
6
7
|
- Tradition: University astrology ([Paris faculty opinion of 1348](https://en.wikipedia.org/wiki/Black_Death#Medical_knowledge))
|
|
@@ -10,6 +11,7 @@
|
|
|
10
11
|
- Limitation: Explains everything at once, which means it predicts nothing in particular
|
|
11
12
|
|
|
12
13
|
## SRC-GALEN
|
|
14
|
+
label: Galenic humoral medicine
|
|
13
15
|
|
|
14
16
|
- Galenic humoral medicine
|
|
15
17
|
- Tradition: Greco-Arabic medical inheritance
|
|
@@ -19,6 +21,7 @@
|
|
|
19
21
|
- Limitation: Cannot explain why entire neighborhoods fall at once regardless of individual constitution
|
|
20
22
|
|
|
21
23
|
## SRC-WARD-DATA
|
|
24
|
+
label: "Agnes's ward observations"
|
|
22
25
|
|
|
23
26
|
- Agnes's ward observations
|
|
24
27
|
- Tradition: None; empirical record-keeping without institutional backing
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Commands
|
|
2
2
|
|
|
3
3
|
## CMD-INIT
|
|
4
|
+
label: stego init [--force]
|
|
4
5
|
|
|
5
6
|
- `stego init [--force]`
|
|
6
7
|
- Initialize a Stego workspace in the current directory.
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
- Related integrations: INT-VSCODE.
|
|
10
11
|
|
|
11
12
|
## CMD-LIST-PROJECTS
|
|
13
|
+
label: stego list-projects [--root <path>]
|
|
12
14
|
|
|
13
15
|
- `stego list-projects [--root <path>]`
|
|
14
16
|
- List projects found in the current workspace.
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
- Related concepts: CON-WORKSPACE, CON-PROJECT.
|
|
17
19
|
|
|
18
20
|
## CMD-NEW-PROJECT
|
|
21
|
+
label: stego new-project --project <project-id> [--title <title>] [--root <path>]
|
|
19
22
|
|
|
20
23
|
- `stego new-project --project <project-id> [--title <title>] [--root <path>]`
|
|
21
24
|
- Scaffold a new project under `projects/`.
|
|
@@ -23,6 +26,7 @@
|
|
|
23
26
|
- Related concepts: CON-PROJECT, CON-MANUSCRIPT, CON-NOTES, CON-DIST.
|
|
24
27
|
|
|
25
28
|
## CMD-VALIDATE
|
|
29
|
+
label: stego validate --project <project-id> [--file <project-relative-manuscript-path>] [--root <path>]
|
|
26
30
|
|
|
27
31
|
- `stego validate --project <project-id> [--file <project-relative-manuscript-path>] [--root <path>]`
|
|
28
32
|
- Validate project configuration, manuscript structure, metadata, and references.
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
- Related configuration: CFG-REQUIRED-METADATA, CFG-SPINE-CATEGORIES.
|
|
32
36
|
|
|
33
37
|
## CMD-BUILD
|
|
38
|
+
label: stego build --project <project-id> [--root <path>]
|
|
34
39
|
|
|
35
40
|
- `stego build --project <project-id> [--root <path>]`
|
|
36
41
|
- Compile manuscript files into one generated markdown output.
|
|
@@ -39,6 +44,7 @@
|
|
|
39
44
|
- Related configuration: CFG-COMPILE-STRUCTURE, CFG-COMPILE-LEVELS.
|
|
40
45
|
|
|
41
46
|
## CMD-CHECK-STAGE
|
|
47
|
+
label: stego check-stage --project <project-id> --stage <draft|revise|line-edit|proof|final> [--file <project-relative-manuscript-path>] [--root <path>]
|
|
42
48
|
|
|
43
49
|
- `stego check-stage --project <project-id> --stage <draft|revise|line-edit|proof|final> [--file <project-relative-manuscript-path>] [--root <path>]`
|
|
44
50
|
- Run stage-aware checks for a requested editorial stage.
|
|
@@ -47,6 +53,7 @@
|
|
|
47
53
|
- Related configuration: CFG-STAGE-POLICIES, CFG-ALLOWED-STATUSES.
|
|
48
54
|
|
|
49
55
|
## CMD-EXPORT
|
|
56
|
+
label: stego export --project <project-id> --format <md|docx|pdf|epub> [--output <path>] [--root <path>]
|
|
50
57
|
|
|
51
58
|
- `stego export --project <project-id> --format <md|docx|pdf|epub> [--output <path>] [--root <path>]`
|
|
52
59
|
- Export compiled output to target formats.
|
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
# Concepts
|
|
2
2
|
|
|
3
3
|
## CON-WORKSPACE
|
|
4
|
+
label: A Stego workspace is the root directory containing `stego.config.json` and `projects/`.
|
|
4
5
|
|
|
5
6
|
- A Stego workspace is the root directory containing `stego.config.json` and `projects/`.
|
|
6
7
|
- Related commands: CMD-INIT, CMD-LIST-PROJECTS.
|
|
7
8
|
- Related workflows: FLOW-INIT-WORKSPACE.
|
|
8
9
|
|
|
9
10
|
## CON-PROJECT
|
|
11
|
+
label: A project is one writing unit inside `projects/<project-id>/` with its own `stego-project.json` and manuscript files in `/projects/<project-id>/manuscripts`.
|
|
10
12
|
|
|
11
13
|
- A project is one writing unit inside `projects/<project-id>/` with its own `stego-project.json` and manuscript files in `/projects/<project-id>/manuscripts`.
|
|
12
14
|
- Related commands: CMD-NEW-PROJECT, CMD-VALIDATE, CMD-BUILD.
|
|
13
15
|
- Related workflows: FLOW-NEW-PROJECT, FLOW-DAILY-WRITING.
|
|
14
16
|
|
|
15
17
|
## CON-MANUSCRIPT
|
|
18
|
+
label: `manuscript/` contains canonical source writing files ordered by filename prefix.
|
|
16
19
|
|
|
17
20
|
- `manuscript/` contains canonical source writing files ordered by filename prefix.
|
|
18
21
|
- Related commands: CMD-VALIDATE, CMD-BUILD.
|
|
19
22
|
- Related configuration: CFG-REQUIRED-METADATA, CFG-COMPILE-STRUCTURE.
|
|
20
23
|
|
|
21
24
|
## CON-SPINE
|
|
25
|
+
label: `spine/` stores canonical entities used for continuity and navigation.
|
|
22
26
|
|
|
23
27
|
- `spine/` stores canonical entities used for continuity and navigation.
|
|
24
28
|
- Related configuration: CFG-SPINE-CATEGORIES.
|
|
25
29
|
- Related integrations: INT-STEGO-EXTENSION.
|
|
26
30
|
|
|
27
31
|
## CON-NOTES
|
|
32
|
+
label: `notes/` contains supporting material that is not part of compiled manuscript output.
|
|
28
33
|
|
|
29
34
|
- `notes/` contains supporting material that is not part of compiled manuscript output.
|
|
30
35
|
- Related commands: CMD-NEW-PROJECT.
|
|
31
36
|
- Related workflows: FLOW-DAILY-WRITING.
|
|
32
37
|
|
|
33
38
|
## CON-DIST
|
|
39
|
+
label: `dist/` is generated output only and can be rebuilt from sources.
|
|
34
40
|
|
|
35
41
|
- `dist/` is generated output only and can be rebuilt from sources.
|
|
36
42
|
- Related commands: CMD-BUILD, CMD-EXPORT.
|
|
37
43
|
- Related workflows: FLOW-BUILD-EXPORT, FLOW-PROOF-RELEASE.
|
|
38
44
|
|
|
39
45
|
## CON-METADATA
|
|
46
|
+
label: "Frontmatter metadata drives validation, stage checks, grouping, and continuity references."
|
|
40
47
|
|
|
41
48
|
- Frontmatter metadata drives validation, stage checks, grouping, and continuity references.
|
|
42
49
|
- Related commands: CMD-VALIDATE, CMD-CHECK-STAGE.
|
|
43
50
|
- Related configuration: CFG-REQUIRED-METADATA, CFG-ALLOWED-STATUSES.
|
|
44
51
|
|
|
45
52
|
## CON-STAGE-GATE
|
|
53
|
+
label: Stage gates apply stricter checks as work moves from drafting to release.
|
|
46
54
|
|
|
47
55
|
- Stage gates apply stricter checks as work moves from drafting to release.
|
|
48
56
|
- Related commands: CMD-CHECK-STAGE.
|
|
@@ -50,12 +58,14 @@
|
|
|
50
58
|
- Related configuration: CFG-STAGE-POLICIES.
|
|
51
59
|
|
|
52
60
|
## CON-COMPILE-STRUCTURE
|
|
61
|
+
label: Compile structure groups ordered files into larger sections during build.
|
|
53
62
|
|
|
54
63
|
- Compile structure groups ordered files into larger sections during build.
|
|
55
64
|
- Related commands: CMD-BUILD.
|
|
56
65
|
- Related configuration: CFG-COMPILE-STRUCTURE, CFG-COMPILE-LEVELS.
|
|
57
66
|
|
|
58
67
|
## CON-SPINE-CATEGORY
|
|
68
|
+
label: "A spine category defines a metadata key, ID prefix, and canonical notes file."
|
|
59
69
|
|
|
60
70
|
- A spine category defines a metadata key, ID prefix, and canonical notes file.
|
|
61
71
|
- Related concepts: CON-SPINE, CON-METADATA.
|
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
3
|
## CFG-STEGO-CONFIG
|
|
4
|
+
label: Workspace-level configuration in `stego.config.json` defines shared directories and stage policies.
|
|
4
5
|
|
|
5
6
|
- Workspace-level configuration in `stego.config.json` defines shared directories and stage policies.
|
|
6
7
|
- Related concepts: CON-WORKSPACE.
|
|
7
8
|
- Related commands: CMD-LIST-PROJECTS, CMD-CHECK-STAGE.
|
|
8
9
|
|
|
9
10
|
## CFG-STEGO-PROJECT
|
|
11
|
+
label: "Project-level configuration in `stego-project.json` defines metadata rules, grouping, and spine categories."
|
|
10
12
|
|
|
11
13
|
- Project-level configuration in `stego-project.json` defines metadata rules, grouping, and spine categories.
|
|
12
14
|
- Related concepts: CON-PROJECT, CON-METADATA, CON-SPINE.
|
|
13
15
|
- Related commands: CMD-VALIDATE, CMD-BUILD.
|
|
14
16
|
|
|
15
17
|
## CFG-REQUIRED-METADATA
|
|
18
|
+
label: Advisory list of frontmatter keys expected in manuscript files.
|
|
16
19
|
|
|
17
20
|
- Advisory list of frontmatter keys expected in manuscript files.
|
|
18
21
|
- Related concepts: CON-METADATA.
|
|
19
22
|
- Related commands: CMD-VALIDATE.
|
|
20
23
|
|
|
21
24
|
## CFG-COMPILE-STRUCTURE
|
|
25
|
+
label: Build grouping configuration that defines structural levels and heading behavior.
|
|
22
26
|
|
|
23
27
|
- Build grouping configuration that defines structural levels and heading behavior.
|
|
24
28
|
- Related concepts: CON-COMPILE-STRUCTURE.
|
|
25
29
|
- Related commands: CMD-BUILD.
|
|
26
30
|
|
|
27
31
|
## CFG-COMPILE-LEVELS
|
|
32
|
+
label: "The ordered `levels` array inside compile structure, with keys, labels, title keys, and page break options."
|
|
28
33
|
|
|
29
34
|
- The ordered `levels` array inside compile structure, with keys, labels, title keys, and page break options.
|
|
30
35
|
- Related configuration: CFG-COMPILE-STRUCTURE.
|
|
31
36
|
- Related concepts: CON-COMPILE-STRUCTURE.
|
|
32
37
|
|
|
33
38
|
## CFG-SPINE-CATEGORIES
|
|
39
|
+
label: Per-project category definitions mapping metadata keys to ID prefixes and spine files.
|
|
34
40
|
|
|
35
41
|
- Per-project category definitions mapping metadata keys to ID prefixes and spine files.
|
|
36
42
|
- Related concepts: CON-SPINE, CON-SPINE-CATEGORY.
|
|
37
43
|
- Related commands: CMD-VALIDATE.
|
|
38
44
|
|
|
39
45
|
## CFG-STAGE-POLICIES
|
|
46
|
+
label: Stage policy settings determine which checks are enforced at each stage.
|
|
40
47
|
|
|
41
48
|
- Stage policy settings determine which checks are enforced at each stage.
|
|
42
49
|
- Related concepts: CON-STAGE-GATE.
|
|
43
50
|
- Related commands: CMD-CHECK-STAGE.
|
|
44
51
|
|
|
45
52
|
## CFG-ALLOWED-STATUSES
|
|
53
|
+
label: Workspace-level list of allowed manuscript statuses.
|
|
46
54
|
|
|
47
55
|
- Workspace-level list of allowed manuscript statuses.
|
|
48
56
|
- Related concepts: CON-METADATA, CON-STAGE-GATE.
|
|
@@ -1,36 +1,42 @@
|
|
|
1
1
|
# Integrations
|
|
2
2
|
|
|
3
3
|
## INT-VSCODE
|
|
4
|
+
label: VS Code is the primary editor environment for Stego projects.
|
|
4
5
|
|
|
5
6
|
- VS Code is the primary editor environment for Stego projects.
|
|
6
7
|
- Related workflows: FLOW-INIT-WORKSPACE, FLOW-DAILY-WRITING.
|
|
7
8
|
- Related commands: CMD-INIT.
|
|
8
9
|
|
|
9
10
|
## INT-STEGO-EXTENSION
|
|
11
|
+
label: "The Stego VS Code extension is the official UI for Stego projects, including status controls, checks, and Spine Browser navigation."
|
|
10
12
|
|
|
11
13
|
- The Stego VS Code extension is the official UI for Stego projects, including status controls, checks, and Spine Browser navigation.
|
|
12
14
|
- Related concepts: CON-SPINE, CON-STAGE-GATE.
|
|
13
15
|
- Related workflows: FLOW-DAILY-WRITING, FLOW-STAGE-PROMOTION.
|
|
14
16
|
|
|
15
17
|
## INT-SAURUS-EXTENSION
|
|
18
|
+
label: The Saurus extension complements prose editing and research workflows in project folders.
|
|
16
19
|
|
|
17
20
|
- The Saurus extension complements prose editing and research workflows in project folders.
|
|
18
21
|
- Related integrations: INT-VSCODE.
|
|
19
22
|
- Related workflows: FLOW-DAILY-WRITING.
|
|
20
23
|
|
|
21
24
|
## INT-PANDOC
|
|
25
|
+
label: "Pandoc is used for optional export formats such as docx, pdf, and epub."
|
|
22
26
|
|
|
23
27
|
- Pandoc is used for optional export formats such as docx, pdf, and epub.
|
|
24
28
|
- Related commands: CMD-EXPORT.
|
|
25
29
|
- Related workflows: FLOW-BUILD-EXPORT.
|
|
26
30
|
|
|
27
31
|
## INT-MARKDOWNLINT
|
|
32
|
+
label: Markdownlint is used in stricter proofreading and release stages.
|
|
28
33
|
|
|
29
34
|
- Markdownlint is used in stricter proofreading and release stages.
|
|
30
35
|
- Related concepts: CON-STAGE-GATE.
|
|
31
36
|
- Related workflows: FLOW-PROOF-RELEASE.
|
|
32
37
|
|
|
33
38
|
## INT-CSPELL
|
|
39
|
+
label: CSpell supports spelling and terminology checks during later-stage quality passes.
|
|
34
40
|
|
|
35
41
|
- CSpell supports spelling and terminology checks during later-stage quality passes.
|
|
36
42
|
- Related concepts: CON-STAGE-GATE.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Workflows
|
|
2
2
|
|
|
3
3
|
## FLOW-INIT-WORKSPACE
|
|
4
|
+
label: "Install the CLI, initialize a workspace, install local dev tools, and inspect scaffolded projects."
|
|
4
5
|
|
|
5
6
|
- Install the CLI, initialize a workspace, install local dev tools, and inspect scaffolded projects.
|
|
6
7
|
- Related commands: CMD-INIT, CMD-LIST-PROJECTS.
|
|
7
8
|
- Related concepts: CON-WORKSPACE, CON-PROJECT.
|
|
8
9
|
|
|
9
10
|
## FLOW-DAILY-WRITING
|
|
11
|
+
label: "Open one project, write in manuscript files, validate, build, and commit progress."
|
|
10
12
|
|
|
11
13
|
- Open one project, write in manuscript files, validate, build, and commit progress.
|
|
12
14
|
- Related commands: CMD-VALIDATE, CMD-BUILD.
|
|
@@ -14,6 +16,7 @@
|
|
|
14
16
|
- Related integrations: INT-VSCODE.
|
|
15
17
|
|
|
16
18
|
## FLOW-NEW-PROJECT
|
|
19
|
+
label: "Create a new project, review generated folders, and configure project metadata rules."
|
|
17
20
|
|
|
18
21
|
- Create a new project, review generated folders, and configure project metadata rules.
|
|
19
22
|
- Related commands: CMD-NEW-PROJECT, CMD-VALIDATE.
|
|
@@ -21,6 +24,7 @@
|
|
|
21
24
|
- Related configuration: CFG-STEGO-PROJECT.
|
|
22
25
|
|
|
23
26
|
## FLOW-STAGE-PROMOTION
|
|
27
|
+
label: Move files through statuses and verify readiness with stage checks.
|
|
24
28
|
|
|
25
29
|
- Move files through statuses and verify readiness with stage checks.
|
|
26
30
|
- Related commands: CMD-CHECK-STAGE, CMD-VALIDATE.
|
|
@@ -28,6 +32,7 @@
|
|
|
28
32
|
- Related configuration: CFG-STAGE-POLICIES, CFG-ALLOWED-STATUSES.
|
|
29
33
|
|
|
30
34
|
## FLOW-BUILD-EXPORT
|
|
35
|
+
label: Build a compiled markdown manuscript and export distribution formats.
|
|
31
36
|
|
|
32
37
|
- Build a compiled markdown manuscript and export distribution formats.
|
|
33
38
|
- Related commands: CMD-BUILD, CMD-EXPORT.
|
|
@@ -35,6 +40,7 @@
|
|
|
35
40
|
- Related integrations: INT-PANDOC.
|
|
36
41
|
|
|
37
42
|
## FLOW-PROOF-RELEASE
|
|
43
|
+
label: "Run strict checks, build outputs, export artifacts, and archive release files."
|
|
38
44
|
|
|
39
45
|
- Run strict checks, build outputs, export artifacts, and archive release files.
|
|
40
46
|
- Related commands: CMD-CHECK-STAGE, CMD-BUILD, CMD-EXPORT.
|