sdtk-spec-kit 0.4.11 → 0.4.14

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 (143) hide show
  1. package/README.md +353 -353
  2. package/assets/atlas/build_atlas.py +880 -880
  3. package/assets/atlas/doc_atlas_viewer_template.html +3796 -3796
  4. package/assets/atlas/vendor/mermaid.min.js +2029 -2029
  5. package/assets/keys/spec-entitlement-public.pem +9 -9
  6. package/assets/manifest/toolkit-bundle.manifest.json +496 -496
  7. package/assets/manifest/toolkit-bundle.sha256.txt +97 -97
  8. package/assets/toolkit/toolkit/AGENTS.md +157 -241
  9. package/assets/toolkit/toolkit/README.md +51 -51
  10. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +206 -206
  11. package/assets/toolkit/toolkit/install.ps1 +362 -362
  12. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +95 -91
  13. package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -69
  14. package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +332 -332
  15. package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +618 -618
  16. package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +87 -87
  17. package/assets/toolkit/toolkit/scripts/generate-code-handoff.ps1 +317 -317
  18. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
  19. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +180 -180
  20. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +209 -209
  21. package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +139 -139
  22. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +143 -143
  23. package/assets/toolkit/toolkit/sdtk-spec.config.json +28 -28
  24. package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +50 -50
  25. package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +46 -46
  26. package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +48 -48
  27. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -111
  28. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +732 -732
  29. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +79 -79
  30. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
  31. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +46 -46
  32. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +91 -91
  33. package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +246 -246
  34. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +133 -133
  35. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +34 -34
  36. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +60 -60
  37. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +41 -41
  38. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +80 -80
  39. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +80 -80
  40. package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +73 -73
  41. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +176 -108
  42. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +74 -74
  43. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -75
  44. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +108 -107
  45. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +51 -51
  46. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +54 -54
  47. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +28 -28
  48. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -136
  49. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +414 -414
  50. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +110 -110
  51. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -97
  52. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +330 -330
  53. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -116
  54. package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +87 -87
  55. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +59 -59
  56. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +67 -67
  57. package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +91 -91
  58. package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +59 -59
  59. package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +73 -73
  60. package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +73 -73
  61. package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +73 -73
  62. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +88 -42
  63. package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +88 -88
  64. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +58 -58
  65. package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +113 -112
  66. package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
  67. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -124
  68. package/assets/toolkit/toolkit/templates/README.md +68 -68
  69. package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
  70. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +21 -21
  71. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +67 -67
  72. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  73. package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +229 -229
  74. package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -20
  75. package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +20 -20
  76. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
  77. package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -12
  78. package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +109 -109
  79. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +175 -175
  80. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
  81. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +117 -117
  82. package/assets/toolkit/toolkit/templates/docs/dev/OPS_HANDOFF_CREATION_RULES.md +369 -369
  83. package/assets/toolkit/toolkit/templates/docs/discovery/REQUIREMENT_TEMPLATE.md +155 -155
  84. package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -50
  85. package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +276 -276
  86. package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -66
  87. package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -98
  88. package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -90
  89. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -162
  90. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -129
  91. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -104
  92. package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -139
  93. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  94. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +197 -197
  95. package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -31
  96. package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -28
  97. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -26
  98. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -20
  99. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +33 -33
  100. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md +60 -60
  101. package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +30 -30
  102. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
  103. package/assets/toolkit/toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md +63 -63
  104. package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +76 -76
  105. package/bin/sdtk.js +15 -15
  106. package/package.json +48 -48
  107. package/src/commands/activate.js +94 -94
  108. package/src/commands/atlas.js +339 -339
  109. package/src/commands/auth.js +85 -85
  110. package/src/commands/entitlement.js +170 -170
  111. package/src/commands/generate.js +191 -170
  112. package/src/commands/help.js +248 -246
  113. package/src/commands/init.js +117 -117
  114. package/src/commands/project.js +51 -51
  115. package/src/commands/runtime.js +239 -239
  116. package/src/commands/update.js +11 -11
  117. package/src/index.js +68 -68
  118. package/src/lib/activation-state.js +68 -68
  119. package/src/lib/args.js +116 -116
  120. package/src/lib/atlas-config.js +200 -200
  121. package/src/lib/atlas-runner.js +435 -435
  122. package/src/lib/browser-open.js +39 -39
  123. package/src/lib/capabilities.js +89 -89
  124. package/src/lib/entitlements.js +245 -245
  125. package/src/lib/errors.js +41 -41
  126. package/src/lib/github-access.js +143 -143
  127. package/src/lib/legacy-auth-migration.js +56 -56
  128. package/src/lib/license-activation.js +386 -386
  129. package/src/lib/powershell.js +85 -85
  130. package/src/lib/premium-loader.js +124 -124
  131. package/src/lib/premium-packs.js +333 -333
  132. package/src/lib/premium-sync.js +235 -235
  133. package/src/lib/project-audit.js +332 -332
  134. package/src/lib/project-config.js +108 -108
  135. package/src/lib/project-ingest.js +450 -450
  136. package/src/lib/project-refresh.js +666 -666
  137. package/src/lib/project-target-guard.js +79 -79
  138. package/src/lib/requirement-analysis.js +14 -4
  139. package/src/lib/scope.js +83 -83
  140. package/src/lib/state.js +74 -74
  141. package/src/lib/suite-state.js +70 -70
  142. package/src/lib/toolkit-payload.js +99 -99
  143. package/src/lib/update.js +333 -333
@@ -1,147 +1,149 @@
1
- "use strict";
2
-
3
- function cmdHelp() {
4
- const text = [
5
- "SDTK-SPEC CLI -- deterministic documentation toolkit",
6
- "",
7
- "Usage:",
8
- " sdtk-spec <command> [options]",
9
- "",
10
- "Commands:",
11
- " init Initialize SDTK-SPEC workspace (runtime adapter + config)",
1
+ "use strict";
2
+
3
+ function cmdHelp() {
4
+ const text = [
5
+ "SDTK-SPEC CLI -- deterministic documentation toolkit",
6
+ "",
7
+ "Usage:",
8
+ " sdtk-spec <command> [options]",
9
+ "",
10
+ "Commands:",
11
+ " init Initialize SDTK-SPEC workspace (runtime adapter + config)",
12
12
  " atlas Build and browse the free local Atlas compatibility graph",
13
- " runtime Manage runtime asset installation (install, uninstall, status)",
14
- " update Refresh the npm package and optionally re-apply managed project/runtime assets",
15
- " auth Manage GitHub authentication and entitlement",
16
- " activate Activate Pro features with a license key (public activation flow)",
13
+ " runtime Manage runtime asset installation (install, uninstall, status)",
14
+ " update Refresh the npm package and optionally re-apply managed project/runtime assets",
15
+ " auth Manage GitHub authentication and entitlement",
16
+ " activate Activate Pro features with a license key (public activation flow)",
17
17
  " entitlement Inspect local entitlement and capability state",
18
18
  " generate Create the standard 17-file feature scaffold from templates",
19
19
  " analyze Preserve requirement source, bootstrap scaffold, and create an agent task packet",
20
- "",
21
- "Init options:",
22
- " --runtime <codex|claude> Runtime adapter (default: codex)",
23
- " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
24
- " --project-path <path> Target project directory (default: cwd)",
25
- " --force Overwrite existing files",
26
- " --skip-runtime-assets Skip runtime asset installation",
27
- " --skip-skills (deprecated, use --skip-runtime-assets)",
28
- " --verbose Show detailed PowerShell script output",
29
- "",
30
- "Runtime subcommands:",
31
- " sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]",
32
- " sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
33
- " sdtk-spec runtime status --runtime <codex|claude>",
34
- "",
35
- "Update options:",
36
- " --version <latest|x.y.z> Target published npm package version (default: latest)",
37
- " --runtime <codex|claude> Optional runtime refresh target after npm update",
38
- " --scope <project|user> Runtime asset scope when --runtime is provided",
39
- " --project-path <path> Target project directory for managed file refresh (default: cwd)",
40
- " --check-only Print the planned npm/init refresh steps without making changes",
41
- " --skip-project-files Skip sdtk-spec init --force during update",
42
- " --skip-runtime-assets Skip runtime asset refresh during update",
43
- " --verbose Show detailed command output",
44
- " Maintainer-root guard: init/update refuse the SDTK maintainer monorepo root as a managed project target.",
45
- " Use a consumer project path, or use --skip-project-files when update should avoid project-file refresh.",
46
- "",
47
- "Runtime options:",
48
- " --runtime <codex|claude> Target runtime (required)",
49
- " --scope <project|user> Install scope (default: project for claude, user for codex)",
50
- " --project-path <path> Target project directory (default: cwd)",
51
- " --force Overwrite existing skills",
52
- " --all Uninstall all managed skills",
53
- " --verbose Show detailed script output",
54
- "",
55
- "Scope behavior:",
56
- " project Claude installs to <project>/.claude/skills and Codex installs to <project>/.codex/skills",
57
- " user Skills are installed in the runtime home (~/.claude/skills/ or $CODEX_HOME/skills / ~/.codex/skills)",
58
- " Note: Codex project scope is supported only via the explicit local CODEX_HOME=<project>/.codex contract.",
59
- " Note: This CLI does not claim native .codex/skills auto-discovery.",
60
- "",
61
- "Uninstall behavior:",
62
- " runtime uninstall removes only SDTK-managed skill folders for the selected runtime/scope.",
63
- " It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
64
- " npm uninstall -g sdtk-spec-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
65
- "",
66
- "Auth options:",
67
- " --token <value> Store GitHub PAT",
68
- " --verify Check private repo access",
69
- " --status Show authentication status",
70
- " --logout Clear stored credentials",
71
- "",
72
- "Activate options:",
73
- " --license <KEY> License key for Pro activation (required)",
74
- " --json Print result as JSON",
75
- "",
76
- "Activation notes:",
77
- " - sdtk-spec activate is the public Pro activation path for paid users.",
78
- " - You will receive a license key (SDTK-XXXX-YYYY format) by email after purchase.",
79
- " - Activation is machine-bound: each license can be activated on up to 5 machines.",
80
- " - Same-machine reactivation is idempotent (safe to retry).",
81
- " - Once activated, you can use Pro commands without additional authentication.",
82
- " - For immediate Premium access, run: sdtk-spec activate --license <KEY>",
83
- "",
84
- "Entitlement subcommands:",
85
- " sdtk-spec entitlement status Show local entitlement and capability state (local-only, no network)",
86
- " sdtk-spec entitlement sync Fetch and verify a signed entitlement manifest; install required SPEC packs",
87
- "",
20
+ "",
21
+ "Init options:",
22
+ " --runtime <codex|claude> Runtime adapter (default: codex)",
23
+ " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
24
+ " --project-path <path> Target project directory (default: cwd)",
25
+ " --force Overwrite existing files",
26
+ " --skip-runtime-assets Skip runtime asset installation",
27
+ " --skip-skills (deprecated, use --skip-runtime-assets)",
28
+ " --verbose Show detailed PowerShell script output",
29
+ "",
30
+ "Runtime subcommands:",
31
+ " sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]",
32
+ " sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
33
+ " sdtk-spec runtime status --runtime <codex|claude>",
34
+ "",
35
+ "Update options:",
36
+ " --version <latest|x.y.z> Target published npm package version (default: latest)",
37
+ " --runtime <codex|claude> Optional runtime refresh target after npm update",
38
+ " --scope <project|user> Runtime asset scope when --runtime is provided",
39
+ " --project-path <path> Target project directory for managed file refresh (default: cwd)",
40
+ " --check-only Print the planned npm/init refresh steps without making changes",
41
+ " --skip-project-files Skip sdtk-spec init --force during update",
42
+ " --skip-runtime-assets Skip runtime asset refresh during update",
43
+ " --verbose Show detailed command output",
44
+ " Maintainer-root guard: init/update refuse the SDTK maintainer monorepo root as a managed project target.",
45
+ " Use a consumer project path, or use --skip-project-files when update should avoid project-file refresh.",
46
+ "",
47
+ "Runtime options:",
48
+ " --runtime <codex|claude> Target runtime (required)",
49
+ " --scope <project|user> Install scope (default: project for claude, user for codex)",
50
+ " --project-path <path> Target project directory (default: cwd)",
51
+ " --force Overwrite existing skills",
52
+ " --all Uninstall all managed skills",
53
+ " --verbose Show detailed script output",
54
+ "",
55
+ "Scope behavior:",
56
+ " project Claude installs to <project>/.claude/skills and Codex installs to <project>/.codex/skills",
57
+ " user Skills are installed in the runtime home (~/.claude/skills/ or $CODEX_HOME/skills / ~/.codex/skills)",
58
+ " Note: Codex project scope is supported only via the explicit local CODEX_HOME=<project>/.codex contract.",
59
+ " Note: This CLI does not claim native .codex/skills auto-discovery.",
60
+ "",
61
+ "Uninstall behavior:",
62
+ " runtime uninstall removes only SDTK-managed skill folders for the selected runtime/scope.",
63
+ " It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
64
+ " npm uninstall -g sdtk-spec-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
65
+ "",
66
+ "Auth options:",
67
+ " --token <value> Store GitHub PAT",
68
+ " --verify Check private repo access",
69
+ " --status Show authentication status",
70
+ " --logout Clear stored credentials",
71
+ "",
72
+ "Activate options:",
73
+ " --license <KEY> License key for Pro activation (required)",
74
+ " --json Print result as JSON",
75
+ "",
76
+ "Activation notes:",
77
+ " - sdtk-spec activate is the public Pro activation path for paid users.",
78
+ " - You will receive a license key (SDTK-XXXX-YYYY format) by email after purchase.",
79
+ " - Activation is machine-bound: each license can be activated on up to 5 machines.",
80
+ " - Same-machine reactivation is idempotent (safe to retry).",
81
+ " - Once activated, you can use Pro commands without additional authentication.",
82
+ " - For immediate Premium access, run: sdtk-spec activate --license <KEY>",
83
+ "",
84
+ "Entitlement subcommands:",
85
+ " sdtk-spec entitlement status Show local entitlement and capability state (local-only, no network)",
86
+ " sdtk-spec entitlement sync Fetch and verify a signed entitlement manifest; install required SPEC packs",
87
+ "",
88
88
  "Generate options:",
89
- " --feature-key <KEY> Feature identifier (UPPER_SNAKE_CASE, required)",
90
- " --feature-name \"<text>\" Human-readable feature name (required)",
91
- " --project-path <path> Target project directory (default: cwd)",
92
- " --force Overwrite existing files",
93
- " --validate-only Validate templates without writing files",
89
+ " --key <KEY> Identifier for what you are scaffolding, UPPER_SNAKE_CASE (required)",
90
+ " Use a product/MVP (e.g. SHOPEASE) or a single feature (e.g. ORDER_TRACKING)",
91
+ " --name \"<text>\" Human-readable name, e.g. \"ShopEase MVP\" (required)",
92
+ " --feature-key / --feature-name Backward-compatible aliases of --key / --name",
93
+ " --project-path <path> Target project directory (default: cwd)",
94
+ " --force Overwrite existing files",
95
+ " --validate-only Validate templates without writing files",
94
96
  " --verbose Show detailed PowerShell script output",
95
97
  "",
96
98
  "Analyze options:",
97
99
  " --source <file> Customer requirement Markdown/text file (required)",
98
- " --feature-key <KEY> Feature identifier (UPPER_SNAKE_CASE, required)",
99
- " --feature-name \"<text>\" Human-readable feature name (required)",
100
+ " --key <KEY> Identifier, UPPER_SNAKE_CASE (required; alias: --feature-key)",
101
+ " --name \"<text>\" Human-readable name (required; alias: --feature-name)",
100
102
  " --project-path <path> Target project directory (default: cwd)",
101
103
  " --force Overwrite managed analysis artifacts",
102
104
  " --json Print result summary as JSON",
103
105
  "",
104
106
  "Atlas subcommands (free compatibility path):",
105
- " sdtk-spec atlas init Initialize Atlas config and run first build (opens viewer)",
106
- " sdtk-spec atlas build Rebuild the local document graph from project markdown",
107
- " sdtk-spec atlas open Open the last successful atlas build in a local browser",
108
- " sdtk-spec atlas watch Watch for markdown changes and rebuild automatically",
109
- " sdtk-spec atlas status Show initialization state and last build summary",
110
- "",
111
- "Project subcommands (Pro):",
112
- " sdtk-spec project ingest Build reusable project census and profile foundation from an existing repo (Pro)",
113
- " sdtk-spec project audit Read-only audit: readiness score, gap list, risk list, next steps (Pro)",
114
- " sdtk-spec project refresh Incremental managed refresh of .sdtk/project/ artifacts (Pro)",
115
- "",
116
- "Atlas options (init):",
117
- " --project-path <path> Target project directory (default: cwd)",
118
- " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
119
- " --scan-root <path> Scan root (repeatable; default: project root)",
120
- " --force Overwrite existing Atlas config",
121
- " --no-build Skip initial build",
122
- " --no-open Skip opening the viewer",
123
- " --verbose Show detailed build output",
124
- "",
125
- "Atlas options (build):",
126
- " --project-path <path> Target project directory (default: cwd)",
127
- " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
128
- " --scan-root <path> Scan root (repeatable; default: project root)",
129
- " --verbose Show incremental build detail",
130
- "",
131
- "Atlas options (open):",
132
- " --project-path <path> Target project directory (default: cwd)",
133
- " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
134
- " --host <host> Viewer server host (default: 127.0.0.1)",
135
- " --port <port> Viewer server port (default: 8765)",
136
- " --no-open Print viewer URL without opening browser",
137
- "",
138
- "Atlas options (watch):",
139
- " --project-path <path> Target project directory (default: cwd)",
140
- " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
141
- " --scan-root <path> Scan root (repeatable; default: project root)",
142
- " --port <port> Viewer server port (default: 8765)",
143
- " --no-open Skip opening the viewer after initial build",
144
- "",
107
+ " sdtk-spec atlas init Initialize Atlas config and run first build (opens viewer)",
108
+ " sdtk-spec atlas build Rebuild the local document graph from project markdown",
109
+ " sdtk-spec atlas open Open the last successful atlas build in a local browser",
110
+ " sdtk-spec atlas watch Watch for markdown changes and rebuild automatically",
111
+ " sdtk-spec atlas status Show initialization state and last build summary",
112
+ "",
113
+ "Project subcommands (Pro):",
114
+ " sdtk-spec project ingest Build reusable project census and profile foundation from an existing repo (Pro)",
115
+ " sdtk-spec project audit Read-only audit: readiness score, gap list, risk list, next steps (Pro)",
116
+ " sdtk-spec project refresh Incremental managed refresh of .sdtk/project/ artifacts (Pro)",
117
+ "",
118
+ "Atlas options (init):",
119
+ " --project-path <path> Target project directory (default: cwd)",
120
+ " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
121
+ " --scan-root <path> Scan root (repeatable; default: project root)",
122
+ " --force Overwrite existing Atlas config",
123
+ " --no-build Skip initial build",
124
+ " --no-open Skip opening the viewer",
125
+ " --verbose Show detailed build output",
126
+ "",
127
+ "Atlas options (build):",
128
+ " --project-path <path> Target project directory (default: cwd)",
129
+ " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
130
+ " --scan-root <path> Scan root (repeatable; default: project root)",
131
+ " --verbose Show incremental build detail",
132
+ "",
133
+ "Atlas options (open):",
134
+ " --project-path <path> Target project directory (default: cwd)",
135
+ " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
136
+ " --host <host> Viewer server host (default: 127.0.0.1)",
137
+ " --port <port> Viewer server port (default: 8765)",
138
+ " --no-open Print viewer URL without opening browser",
139
+ "",
140
+ "Atlas options (watch):",
141
+ " --project-path <path> Target project directory (default: cwd)",
142
+ " --output-dir <path> Atlas output directory (default: <project>/.sdtk/atlas)",
143
+ " --scan-root <path> Scan root (repeatable; default: project root)",
144
+ " --port <port> Viewer server port (default: 8765)",
145
+ " --no-open Skip opening the viewer after initial build",
146
+ "",
145
147
  "Atlas notes:",
146
148
  " - Free Atlas commands (init, build, open, watch, status) require no authentication or entitlement.",
147
149
  " - Atlas scans markdown files and builds a local document graph and static viewer.",
@@ -150,56 +152,56 @@ function cmdHelp() {
150
152
  " - Native SDTK-WIKI uses <project>/.sdtk/wiki/ and <project>/.sdtk/wiki/graph/.",
151
153
  " - The old SPEC ask command path is not supported; native Ask is sdtk-wiki ask with capability wiki.ask.",
152
154
  " - Viewer server binds to 127.0.0.1 by default (loopback only).",
153
- " - Requires Python 3.8+ in PATH for the build step.",
154
- "",
155
- "Project ingest options (Pro):",
156
- " --project-path <path> Target project directory to ingest (default: cwd)",
157
- " --output-dir <path> Foundation output directory (default: <project>/.sdtk/project)",
158
- " --json Print result summary as JSON",
159
- "",
160
- "Project ingest notes:",
161
- " - project ingest is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
162
- " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project ingest.",
163
- " - project ingest is not part of sdtk-spec init. It is a separate premium command.",
164
- " - Foundation artifacts are written under <project>/.sdtk/project/ (project-local, not global).",
165
- " - Artifacts include census, source inventory, profile, module graph, runtime markers, and evidence packs.",
166
- " - project ingest now stages a draft SDTK docs baseline under .sdtk/project/DOC_SYNTHESIS_BASELINE/.",
167
- " - Staged docs are draft / human-review-first outputs. Human review is required before use.",
168
- " - Live project /docs/ is not modified by project ingest.",
169
- " - Maintainer-root guard: project ingest refuses the SDTK maintainer monorepo root as an ingest target.",
170
- "",
171
- "Project audit options (Pro):",
172
- " --project-path <path> Target project directory to audit (default: cwd)",
173
- " --output-dir <path> Foundation read path (default: <project>/.sdtk/project)",
174
- " --json Print audit result as deterministic JSON",
175
- "",
176
- "Project audit notes:",
177
- " - project audit is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
178
- " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project audit.",
179
- " - project audit is read-only. It does not modify live /docs/ or write new staged docs.",
180
- " - project audit does not write new .sdtk/project/ foundation artifacts.",
181
- " - When cached ingest artifacts (.sdtk/project/) exist, project audit uses them as its source.",
182
- " - When no prior ingest has been run, project audit performs bounded ephemeral analysis in memory.",
183
- " - Output includes readiness score/band, gap list, risk list, and bounded next-step recommendations.",
184
- " - Maintainer-root guard: project audit refuses the SDTK maintainer monorepo root as an audit target.",
185
- "",
186
- "Project refresh options (Pro):",
187
- " --project-path <path> Target project directory to refresh (default: cwd)",
188
- " --output-dir <path> Foundation output directory (default: <project>/.sdtk/project)",
189
- " --json Print result summary as JSON",
190
- "",
191
- "Project refresh notes:",
192
- " - project refresh is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
193
- " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project refresh.",
194
- " - project refresh is incremental. It requires an existing managed ingest baseline.",
195
- " - If no prior ingest baseline exists, run 'sdtk-spec project ingest' first.",
196
- " - project refresh updates only .sdtk/project/ artifacts (foundation JSON, evidence packs, staged docs).",
197
- " - project refresh may remove stale managed staged-doc files from the staged baseline (.sdtk/project/DOC_SYNTHESIS_BASELINE/docs/).",
198
- " - project refresh does not modify live /docs/.",
199
- " - project refresh does not replace or extend project ingest (first-run bootstrap).",
200
- " - project refresh does not perform a read-only audit; use 'project audit' for that.",
201
- " - Maintainer-root guard: project refresh refuses the SDTK maintainer monorepo root as a refresh target.",
202
- "",
155
+ " - Requires Python 3.8+ in PATH for the build step.",
156
+ "",
157
+ "Project ingest options (Pro):",
158
+ " --project-path <path> Target project directory to ingest (default: cwd)",
159
+ " --output-dir <path> Foundation output directory (default: <project>/.sdtk/project)",
160
+ " --json Print result summary as JSON",
161
+ "",
162
+ "Project ingest notes:",
163
+ " - project ingest is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
164
+ " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project ingest.",
165
+ " - project ingest is not part of sdtk-spec init. It is a separate premium command.",
166
+ " - Foundation artifacts are written under <project>/.sdtk/project/ (project-local, not global).",
167
+ " - Artifacts include census, source inventory, profile, module graph, runtime markers, and evidence packs.",
168
+ " - project ingest now stages a draft SDTK docs baseline under .sdtk/project/DOC_SYNTHESIS_BASELINE/.",
169
+ " - Staged docs are draft / human-review-first outputs. Human review is required before use.",
170
+ " - Live project /docs/ is not modified by project ingest.",
171
+ " - Maintainer-root guard: project ingest refuses the SDTK maintainer monorepo root as an ingest target.",
172
+ "",
173
+ "Project audit options (Pro):",
174
+ " --project-path <path> Target project directory to audit (default: cwd)",
175
+ " --output-dir <path> Foundation read path (default: <project>/.sdtk/project)",
176
+ " --json Print audit result as deterministic JSON",
177
+ "",
178
+ "Project audit notes:",
179
+ " - project audit is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
180
+ " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project audit.",
181
+ " - project audit is read-only. It does not modify live /docs/ or write new staged docs.",
182
+ " - project audit does not write new .sdtk/project/ foundation artifacts.",
183
+ " - When cached ingest artifacts (.sdtk/project/) exist, project audit uses them as its source.",
184
+ " - When no prior ingest has been run, project audit performs bounded ephemeral analysis in memory.",
185
+ " - Output includes readiness score/band, gap list, risk list, and bounded next-step recommendations.",
186
+ " - Maintainer-root guard: project audit refuses the SDTK maintainer monorepo root as an audit target.",
187
+ "",
188
+ "Project refresh options (Pro):",
189
+ " --project-path <path> Target project directory to refresh (default: cwd)",
190
+ " --output-dir <path> Foundation output directory (default: <project>/.sdtk/project)",
191
+ " --json Print result summary as JSON",
192
+ "",
193
+ "Project refresh notes:",
194
+ " - project refresh is a Pro feature. It requires a valid Pro entitlement and a cached premium pack.",
195
+ " - Run 'sdtk-spec entitlement sync' to install the required premium pack for project refresh.",
196
+ " - project refresh is incremental. It requires an existing managed ingest baseline.",
197
+ " - If no prior ingest baseline exists, run 'sdtk-spec project ingest' first.",
198
+ " - project refresh updates only .sdtk/project/ artifacts (foundation JSON, evidence packs, staged docs).",
199
+ " - project refresh may remove stale managed staged-doc files from the staged baseline (.sdtk/project/DOC_SYNTHESIS_BASELINE/docs/).",
200
+ " - project refresh does not modify live /docs/.",
201
+ " - project refresh does not replace or extend project ingest (first-run bootstrap).",
202
+ " - project refresh does not perform a read-only audit; use 'project audit' for that.",
203
+ " - Maintainer-root guard: project refresh refuses the SDTK maintainer monorepo root as a refresh target.",
204
+ "",
203
205
  "Generate behavior:",
204
206
  " The generate command creates the standard 17-file scaffold with TBD placeholders.",
205
207
  " Scaffolds define document structure for each SDLC phase.",
@@ -214,69 +216,69 @@ function cmdHelp() {
214
216
  " It does not fully understand arbitrary requirements by itself.",
215
217
  " PM/BA/ARCH agents complete source-backed analysis inside the generated artifacts.",
216
218
  " It does not modify the source project and does not create .sdtk/atlas.",
217
- "",
218
- "Global options:",
219
- " -h, --help Show this help",
220
- " -v, --version Show version",
221
- "",
222
- "Exit codes:",
223
- " 0 Success",
224
- " 1 Validation or user error",
225
- " 2 Dependency error (e.g., PowerShell not found)",
226
- " 3 Integrity error (payload hash mismatch)",
227
- " 4 Unexpected internal error",
228
- "",
229
- "Environment variables:",
230
- " SDTK_ENTITLEMENT_REPO Override default entitlement repo (owner/repo format)",
231
- " SDTK_ENTITLEMENT_MANIFEST_PATH Override entitlement manifest path in repo (default: entitlements/spec/entitlements.json)",
232
- " SDTK_ENTITLEMENT_REF Override entitlement manifest ref/branch (default: main)",
233
- " SDTK_ENTITLEMENT_PUBLIC_KEY RSA public key (PEM) used to verify entitlement manifests",
234
- "",
235
- "Examples:",
236
- " sdtk-spec activate --license SDTK-XXXX-YYYY",
237
- " sdtk-spec activate --license SDTK-XXXX-YYYY --json",
238
- " sdtk-spec atlas init --project-path ./my-project",
239
- " sdtk-spec atlas init --project-path ./my-project --no-open",
240
- " sdtk-spec atlas build --project-path ./my-project --verbose",
241
- " sdtk-spec atlas open --project-path ./my-project --port 9000",
242
- " sdtk-spec atlas open --project-path ./my-project --no-open",
243
- " sdtk-spec atlas watch --project-path ./my-project",
244
- " sdtk-spec atlas status --project-path ./my-project",
245
- " sdtk-spec init --runtime codex",
246
- " sdtk-spec init --runtime codex --runtime-scope project --project-path ./my-project",
247
- " sdtk-spec init --runtime claude --project-path ./my-project",
248
- " sdtk-spec update --check-only",
249
- " sdtk-spec update --runtime claude --project-path ./my-project",
250
- " sdtk-spec update --version 1.2.3 --runtime codex --scope user",
251
- " sdtk-spec auth --token ghp_xxxxxxxxxxxx",
252
- " sdtk-spec auth --verify",
253
- ' sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"',
254
- " sdtk-spec generate --feature-key ORDER_MGMT --feature-name \"Order Management\" --validate-only",
255
- " sdtk-spec analyze --source ./requirements.md --feature-key ORDER_PORTAL --feature-name \"Order Portal\"",
256
- " sdtk-spec init --runtime claude --runtime-scope user",
257
- " sdtk-spec runtime install --runtime claude --scope project",
258
- " sdtk-spec runtime install --runtime codex --scope user",
259
- " sdtk-spec runtime install --runtime codex --scope project --project-path ./my-project",
260
- " sdtk-spec runtime status --runtime claude",
261
- " sdtk-spec runtime uninstall --runtime claude --scope project --all",
262
- " sdtk-spec entitlement status",
263
- " sdtk-spec entitlement sync",
264
- " sdtk-spec project ingest --project-path ./my-project",
265
- " sdtk-spec project ingest --project-path ./my-project --json",
266
- " sdtk-spec project audit --project-path ./my-project",
267
- " sdtk-spec project audit --project-path ./my-project --json",
268
- " sdtk-spec project refresh --project-path ./my-project",
269
- " sdtk-spec project refresh --project-path ./my-project --json",
270
- "",
271
- " # Override entitlement repo (bash/zsh):",
272
- " export SDTK_ENTITLEMENT_REPO=owner/repo",
273
- " # Override entitlement repo (PowerShell):",
274
- ' $env:SDTK_ENTITLEMENT_REPO="owner/repo"',
275
- ];
276
- console.log(text.join("\n"));
277
- return 0;
278
- }
279
-
280
- module.exports = {
281
- cmdHelp,
282
- };
219
+ "",
220
+ "Global options:",
221
+ " -h, --help Show this help",
222
+ " -v, --version Show version",
223
+ "",
224
+ "Exit codes:",
225
+ " 0 Success",
226
+ " 1 Validation or user error",
227
+ " 2 Dependency error (e.g., PowerShell not found)",
228
+ " 3 Integrity error (payload hash mismatch)",
229
+ " 4 Unexpected internal error",
230
+ "",
231
+ "Environment variables:",
232
+ " SDTK_ENTITLEMENT_REPO Override default entitlement repo (owner/repo format)",
233
+ " SDTK_ENTITLEMENT_MANIFEST_PATH Override entitlement manifest path in repo (default: entitlements/spec/entitlements.json)",
234
+ " SDTK_ENTITLEMENT_REF Override entitlement manifest ref/branch (default: main)",
235
+ " SDTK_ENTITLEMENT_PUBLIC_KEY RSA public key (PEM) used to verify entitlement manifests",
236
+ "",
237
+ "Examples:",
238
+ " sdtk-spec activate --license SDTK-XXXX-YYYY",
239
+ " sdtk-spec activate --license SDTK-XXXX-YYYY --json",
240
+ " sdtk-spec atlas init --project-path ./my-project",
241
+ " sdtk-spec atlas init --project-path ./my-project --no-open",
242
+ " sdtk-spec atlas build --project-path ./my-project --verbose",
243
+ " sdtk-spec atlas open --project-path ./my-project --port 9000",
244
+ " sdtk-spec atlas open --project-path ./my-project --no-open",
245
+ " sdtk-spec atlas watch --project-path ./my-project",
246
+ " sdtk-spec atlas status --project-path ./my-project",
247
+ " sdtk-spec init --runtime codex",
248
+ " sdtk-spec init --runtime codex --runtime-scope project --project-path ./my-project",
249
+ " sdtk-spec init --runtime claude --project-path ./my-project",
250
+ " sdtk-spec update --check-only",
251
+ " sdtk-spec update --runtime claude --project-path ./my-project",
252
+ " sdtk-spec update --version 1.2.3 --runtime codex --scope user",
253
+ " sdtk-spec auth --token ghp_xxxxxxxxxxxx",
254
+ " sdtk-spec auth --verify",
255
+ ' sdtk-spec generate --key SHOPEASE --name "ShopEase MVP"',
256
+ " sdtk-spec generate --key ORDER_TRACKING --name \"Order Tracking\" --validate-only",
257
+ " sdtk-spec analyze --source ./requirements.md --key SHOPEASE --name \"ShopEase MVP\"",
258
+ " sdtk-spec init --runtime claude --runtime-scope user",
259
+ " sdtk-spec runtime install --runtime claude --scope project",
260
+ " sdtk-spec runtime install --runtime codex --scope user",
261
+ " sdtk-spec runtime install --runtime codex --scope project --project-path ./my-project",
262
+ " sdtk-spec runtime status --runtime claude",
263
+ " sdtk-spec runtime uninstall --runtime claude --scope project --all",
264
+ " sdtk-spec entitlement status",
265
+ " sdtk-spec entitlement sync",
266
+ " sdtk-spec project ingest --project-path ./my-project",
267
+ " sdtk-spec project ingest --project-path ./my-project --json",
268
+ " sdtk-spec project audit --project-path ./my-project",
269
+ " sdtk-spec project audit --project-path ./my-project --json",
270
+ " sdtk-spec project refresh --project-path ./my-project",
271
+ " sdtk-spec project refresh --project-path ./my-project --json",
272
+ "",
273
+ " # Override entitlement repo (bash/zsh):",
274
+ " export SDTK_ENTITLEMENT_REPO=owner/repo",
275
+ " # Override entitlement repo (PowerShell):",
276
+ ' $env:SDTK_ENTITLEMENT_REPO="owner/repo"',
277
+ ];
278
+ console.log(text.join("\n"));
279
+ return 0;
280
+ }
281
+
282
+ module.exports = {
283
+ cmdHelp,
284
+ };