sdtk-spec-kit 0.4.4 → 0.4.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 (128) hide show
  1. package/README.md +369 -376
  2. package/assets/atlas/build_atlas.py +880 -880
  3. package/assets/atlas/doc_atlas_viewer_template.html +3796 -3782
  4. package/assets/atlas/vendor/mermaid.min.js +2029 -2029
  5. package/assets/keys/spec-entitlement-public.pem +11 -11
  6. package/assets/manifest/toolkit-bundle.manifest.json +178 -178
  7. package/assets/manifest/toolkit-bundle.sha256.txt +83 -83
  8. package/assets/toolkit/toolkit/AGENTS.md +247 -245
  9. package/assets/toolkit/toolkit/README.md +50 -50
  10. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +207 -208
  11. package/assets/toolkit/toolkit/install.ps1 +21 -21
  12. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +92 -92
  13. package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -70
  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 +86 -86
  17. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
  18. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +209 -209
  19. package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +139 -139
  20. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +143 -143
  21. package/assets/toolkit/toolkit/sdtk-spec.config.json +27 -27
  22. package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +49 -49
  23. package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +47 -47
  24. package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +49 -49
  25. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -111
  26. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +732 -732
  27. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +79 -79
  28. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
  29. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +46 -46
  30. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +91 -91
  31. package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +246 -246
  32. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +34 -34
  33. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +60 -60
  34. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +41 -41
  35. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +80 -80
  36. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +80 -80
  37. package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +2 -2
  38. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +17 -17
  39. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +106 -106
  40. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +50 -50
  41. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +53 -53
  42. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +28 -28
  43. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -136
  44. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +414 -414
  45. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +110 -110
  46. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -97
  47. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +330 -330
  48. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -116
  49. package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +87 -87
  50. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +59 -59
  51. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +67 -67
  52. package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +91 -91
  53. package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +73 -73
  54. package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +73 -73
  55. package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +2 -2
  56. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +40 -40
  57. package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +88 -88
  58. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +58 -58
  59. package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +112 -112
  60. package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
  61. package/assets/toolkit/toolkit/templates/README.md +68 -68
  62. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +21 -21
  63. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +67 -67
  64. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  65. package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +228 -228
  66. package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -20
  67. package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +20 -20
  68. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
  69. package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -12
  70. package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +107 -107
  71. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
  72. package/assets/toolkit/toolkit/templates/docs/dev/OPS_HANDOFF_CREATION_RULES.md +369 -369
  73. package/assets/toolkit/toolkit/templates/docs/discovery/REQUIREMENT_TEMPLATE.md +155 -155
  74. package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -50
  75. package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +276 -276
  76. package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -66
  77. package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -98
  78. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -129
  79. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -104
  80. package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -139
  81. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +197 -197
  82. package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -31
  83. package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -28
  84. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -26
  85. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -20
  86. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +33 -33
  87. package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +29 -29
  88. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
  89. package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +76 -76
  90. package/bin/sdtk.js +15 -15
  91. package/package.json +48 -48
  92. package/src/commands/activate.js +90 -90
  93. package/src/commands/analyze.js +11 -0
  94. package/src/commands/atlas.js +341 -352
  95. package/src/commands/auth.js +85 -85
  96. package/src/commands/entitlement.js +163 -163
  97. package/src/commands/generate.js +209 -147
  98. package/src/commands/help.js +41 -33
  99. package/src/commands/init.js +15 -15
  100. package/src/commands/project.js +51 -51
  101. package/src/commands/runtime.js +239 -239
  102. package/src/index.js +9 -6
  103. package/src/lib/activation-state.js +68 -68
  104. package/src/lib/args.js +116 -116
  105. package/src/lib/atlas-config.js +200 -200
  106. package/src/lib/atlas-runner.js +435 -355
  107. package/src/lib/browser-open.js +39 -39
  108. package/src/lib/capabilities.js +92 -92
  109. package/src/lib/design-handoff-provenance.js +189 -0
  110. package/src/lib/entitlements.js +238 -238
  111. package/src/lib/errors.js +41 -41
  112. package/src/lib/github-access.js +143 -143
  113. package/src/lib/legacy-auth-migration.js +55 -55
  114. package/src/lib/license-activation.js +375 -375
  115. package/src/lib/powershell.js +85 -85
  116. package/src/lib/premium-loader.js +126 -126
  117. package/src/lib/premium-packs.js +331 -331
  118. package/src/lib/premium-sync.js +235 -235
  119. package/src/lib/project-audit.js +332 -332
  120. package/src/lib/project-config.js +108 -108
  121. package/src/lib/project-ingest.js +450 -450
  122. package/src/lib/project-refresh.js +666 -666
  123. package/src/lib/requirement-analysis.js +472 -0
  124. package/src/lib/scope.js +83 -83
  125. package/src/lib/state.js +73 -73
  126. package/src/lib/suite-state.js +70 -70
  127. package/src/lib/toolkit-payload.js +99 -99
  128. package/src/lib/atlas-ask.js +0 -170
@@ -1,33 +1,33 @@
1
- # DEV to QA Handoff (Legacy / Transition Only)
2
-
3
- ## Status
4
- This template is not the default SDTK-SPEC path in this wave.
5
- Default bridge:
6
- - `/dev` -> `CODE_HANDOFF`
7
- - SDTK-CODE downstream implementation
8
- - `/qa` after downstream implementation evidence exists
9
-
10
- ## Required Inputs
11
- - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
12
- - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
13
- - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
14
- - downstream implementation evidence, normally from SDTK-CODE
15
- - downstream operational evidence
16
- - fresh proving checks used for QA handoff
17
-
18
- ## Required Outputs
19
- - QA test scope
20
- - explicit release-risk notes
21
- - updated `SHARED_PLANNING.md`
22
- - updated `QUALITY_CHECKLIST.md`
23
-
24
- ## Mandatory Checks
25
- - downstream implementation evidence exists and is current
26
- - `OPS_HANDOFF` and downstream operational evidence exist and are current
27
- - `OPS_HANDOFF` alone is not treated as sufficient release evidence
28
- - verification evidence is fresh
29
- - known limitations or assumptions are recorded, not hidden
30
-
31
- ## Forbidden Shortcuts
32
- - Do not use this template as the default replacement for the SDTK-CODE bridge.
33
- - Do not describe expected behavior as if it were verified runtime evidence.
1
+ # DEV to QA Handoff (Legacy / Transition Only)
2
+
3
+ ## Status
4
+ This template is not the default SDTK-SPEC path in this wave.
5
+ Default bridge:
6
+ - `/dev` -> `CODE_HANDOFF`
7
+ - SDTK-CODE downstream implementation
8
+ - `/qa` after downstream implementation evidence exists
9
+
10
+ ## Required Inputs
11
+ - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
12
+ - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
13
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
14
+ - downstream implementation evidence, normally from SDTK-CODE
15
+ - downstream operational evidence
16
+ - fresh proving checks used for QA handoff
17
+
18
+ ## Required Outputs
19
+ - QA test scope
20
+ - explicit release-risk notes
21
+ - updated `SHARED_PLANNING.md`
22
+ - updated `QUALITY_CHECKLIST.md`
23
+
24
+ ## Mandatory Checks
25
+ - downstream implementation evidence exists and is current
26
+ - `OPS_HANDOFF` and downstream operational evidence exist and are current
27
+ - `OPS_HANDOFF` alone is not treated as sufficient release evidence
28
+ - verification evidence is fresh
29
+ - known limitations or assumptions are recorded, not hidden
30
+
31
+ ## Forbidden Shortcuts
32
+ - Do not use this template as the default replacement for the SDTK-CODE bridge.
33
+ - Do not describe expected behavior as if it were verified runtime evidence.
@@ -1,30 +1,30 @@
1
- # PM to BA Handoff
2
-
3
- ## Required Inputs
4
- - `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`
5
- - source requirement notes or attachments
6
- - current `SHARED_PLANNING.md`
7
- - (Optional) `docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md` if a
8
- condensation step was run before PM initiation. If present, BA must
9
- read it alongside the Project Initiation doc. All condensed content is DRAFT
10
- and requires human review before adoption.
11
-
12
- ## Required Outputs
13
- - `docs/specs/BA_SPEC_[FEATURE_KEY].md`
14
- - updated `SHARED_PLANNING.md`
15
- - updated `QUALITY_CHECKLIST.md`
16
-
17
- ## Mandatory Checks
18
- - `REQ-xx` scope is explicit and testable.
19
- - in-scope and out-of-scope are visible.
20
- - unresolved ambiguities are logged as `OQ-xx`, not hidden.
21
-
22
- ## Forbidden Shortcuts
23
- - Do not skip glossary, BR, UC, AC, or traceability expectations.
24
- - Do not invent missing stakeholder decisions without logging them.
25
-
26
- ## Handoff Message Shape
27
- - Feature: `[FEATURE_KEY]`
28
- - PM scope summary: 3 to 7 bullets
29
- - Known open questions: `OQ-xx` list or `None`
1
+ # PM to BA Handoff
2
+
3
+ ## Required Inputs
4
+ - `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`
5
+ - source requirement notes or attachments
6
+ - current `SHARED_PLANNING.md`
7
+ - (Optional) `docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md` if a
8
+ condensation step was run before PM initiation. If present, BA must
9
+ read it alongside the Project Initiation doc. All condensed content is DRAFT
10
+ and requires human review before adoption.
11
+
12
+ ## Required Outputs
13
+ - `docs/specs/BA_SPEC_[FEATURE_KEY].md`
14
+ - updated `SHARED_PLANNING.md`
15
+ - updated `QUALITY_CHECKLIST.md`
16
+
17
+ ## Mandatory Checks
18
+ - `REQ-xx` scope is explicit and testable.
19
+ - in-scope and out-of-scope are visible.
20
+ - unresolved ambiguities are logged as `OQ-xx`, not hidden.
21
+
22
+ ## Forbidden Shortcuts
23
+ - Do not skip glossary, BR, UC, AC, or traceability expectations.
24
+ - Do not invent missing stakeholder decisions without logging them.
25
+
26
+ ## Handoff Message Shape
27
+ - Feature: `[FEATURE_KEY]`
28
+ - PM scope summary: 3 to 7 bullets
29
+ - Known open questions: `OQ-xx` list or `None`
30
30
  - Expected BA focus: rules, use cases, acceptance criteria, NFRs
@@ -1,26 +1,26 @@
1
- # QA Release Decision
2
-
3
- ## Required Inputs
4
- - `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
5
- - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
6
- - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
7
- - downstream implementation evidence, normally from SDTK-CODE
8
- - downstream operational evidence
9
- - fresh proving checks or benchmark-mode evidence
10
- - open defect list with severity
11
-
12
- ## Required Outputs
13
- - `APPROVED` or `REJECTED`
14
- - explicit evidence summary
15
- - unresolved risks and assumptions list
16
-
17
- ## Mandatory Checks
18
- - verdict is backed by fresh command evidence or benchmark policy
19
- - specification quotes are used for requirement-based validation
20
- - verdict is backed by CODE evidence and OPS evidence
21
- - `OPS_HANDOFF` is not treated as sufficient release evidence without downstream operational evidence
22
- - defects and known gaps are visible in the decision
23
-
24
- ## Forbidden Shortcuts
25
- - Do not issue `APPROVED` based on planned checks.
26
- - Do not hide environment limitations; state when runtime verification was not possible.
1
+ # QA Release Decision
2
+
3
+ ## Required Inputs
4
+ - `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
5
+ - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
6
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
7
+ - downstream implementation evidence, normally from SDTK-CODE
8
+ - downstream operational evidence
9
+ - fresh proving checks or benchmark-mode evidence
10
+ - open defect list with severity
11
+
12
+ ## Required Outputs
13
+ - `APPROVED` or `REJECTED`
14
+ - explicit evidence summary
15
+ - unresolved risks and assumptions list
16
+
17
+ ## Mandatory Checks
18
+ - verdict is backed by fresh command evidence or benchmark policy
19
+ - specification quotes are used for requirement-based validation
20
+ - verdict is backed by CODE evidence and OPS evidence
21
+ - `OPS_HANDOFF` is not treated as sufficient release evidence without downstream operational evidence
22
+ - defects and known gaps are visible in the decision
23
+
24
+ ## Forbidden Shortcuts
25
+ - Do not issue `APPROVED` based on planned checks.
26
+ - Do not hide environment limitations; state when runtime verification was not possible.
@@ -1,76 +1,76 @@
1
- # AGENT TASK TEMPLATE
2
- Issue:
3
- - <ISSUE_KEY> | <TITLE>
4
- Runtime:
5
- - <claude|codex>
6
- Phase:
7
- - <plan|controller-spec|implementation|controller-dev-review|qa-review|controller-acceptance|post-issue-retrospective|ops|other>
8
- Worktree / Repo:
9
- - <ABSOLUTE_PATH>
10
- - Branch: <BRANCH>
11
- Objective:
12
- - <one clear sentence>
13
- Decision Requested:
14
- - <exact decision or ready-state question>
15
- Issue Closeout Mode:
16
- - <full-issue|phase-only>
17
- Execution Permission:
18
- - <read-only|workspace-write-approved>
19
- Permission Approval Status:
20
- - <not-required|human-approved>
21
- Approved By:
22
- - <name/role|n/a>
23
- Approval Reason:
24
- - <short reason|n/a>
25
- Approved Writable Scope:
26
- - <exact writable scope|n/a>
27
- Approval Reference:
28
- - <ticket/comment/reference|n/a>
29
- Formal Outputs To Produce:
30
- 1. <tracked artifact path>
31
- 2. <tracked artifact path>
32
- Include Boundary:
33
- 1. <path or surface>
34
- 2. <path or surface>
35
- Exclude Boundary:
36
- 1. <excluded path or surface>
37
- 2. <excluded path or surface>
38
- Inputs:
39
- - <file 1; authoritative source input, read before any broader search>
40
- - <file 2>
41
- - <file 3>
42
- Boundary Mode:
43
- - <canonical-only|canonical+distribution|other>
44
- Primary Formal Artifact:
45
- - <tracked artifact path that controller will trust first>
46
- Canonical Review-Phase Artifact Rules:
47
- - controller-dev-review => `SDTK_BK###_CONTROLLER_DEV_REVIEW_R#_YYYYMMDD.md` + `APPROVED FOR QA HANDOFF` or `CHANGES REQUIRED BEFORE QA`
48
- - qa-review => `SDTK_BK###_QA_CHECKPOINT_REPORT_R#_YYYYMMDD.md` + `APPROVED FOR CONTROLLER ACCEPTANCE` or `CHANGES REQUIRED BEFORE CONTROLLER ACCEPTANCE`
49
- - controller-acceptance => `SDTK_BK###_CONTROLLER_ACCEPTANCE_R#_YYYYMMDD.md` + `APPROVED FOR COMMIT-READY STATE` or `NOT APPROVED FOR COMMIT-READY STATE`
50
- Carryover Findings / Fixed Truth To Preserve:
51
- - <prior blocker ID or prior approved truth>
52
- - <prior blocker ID or prior approved truth>
53
- Formal Artifact Write Expectation:
54
- - <agent-authored formal artifact|controller-authored fallback allowed if runtime is blocked>
55
- Timebox / Search Budget:
56
- - <deliver-first / max search budget / when to stop and escalate>
57
- Runtime Stall Budget / Fallback Trigger:
58
- - <e.g. 35 minutes / exact trigger that allows controller-local or native fallback>
59
- Execution Rules:
60
- 1. Read every listed input first and treat `Inputs:` as the authoritative starting source set unless blocked by a missing exact dependency.
61
- 2. Do not run broad repo-wide or directory-wide discovery before you have read the listed inputs; any extra inspection must stay inside `Include Boundary`.
62
- 3. <additional critical rule or commit/push restriction if relevant>
63
- Required Verification:
64
- - <command 1>
65
- - <command 2>
66
- - <command 3>
67
- Return Format:
68
- 1. metadata
69
- 2. short summary
70
- 3. exact files changed
71
- 4. formal artifact truth
72
- 5. execution permission audit
73
- 6. exact verification results
74
- 7. boundary truth
75
- 8. blockers or open questions
76
- 9. explicit readiness statement
1
+ # AGENT TASK TEMPLATE
2
+ Issue:
3
+ - <ISSUE_KEY> | <TITLE>
4
+ Runtime:
5
+ - <claude|codex>
6
+ Phase:
7
+ - <plan|controller-spec|implementation|controller-dev-review|qa-review|controller-acceptance|post-issue-retrospective|ops|other>
8
+ Worktree / Repo:
9
+ - <ABSOLUTE_PATH>
10
+ - Branch: <BRANCH>
11
+ Objective:
12
+ - <one clear sentence>
13
+ Decision Requested:
14
+ - <exact decision or ready-state question>
15
+ Issue Closeout Mode:
16
+ - <full-issue|phase-only>
17
+ Execution Permission:
18
+ - <read-only|workspace-write-approved>
19
+ Permission Approval Status:
20
+ - <not-required|human-approved>
21
+ Approved By:
22
+ - <name/role|n/a>
23
+ Approval Reason:
24
+ - <short reason|n/a>
25
+ Approved Writable Scope:
26
+ - <exact writable scope|n/a>
27
+ Approval Reference:
28
+ - <ticket/comment/reference|n/a>
29
+ Formal Outputs To Produce:
30
+ 1. <tracked artifact path>
31
+ 2. <tracked artifact path>
32
+ Include Boundary:
33
+ 1. <path or surface>
34
+ 2. <path or surface>
35
+ Exclude Boundary:
36
+ 1. <excluded path or surface>
37
+ 2. <excluded path or surface>
38
+ Inputs:
39
+ - <file 1; authoritative source input, read before any broader search>
40
+ - <file 2>
41
+ - <file 3>
42
+ Boundary Mode:
43
+ - <canonical-only|canonical+distribution|other>
44
+ Primary Formal Artifact:
45
+ - <tracked artifact path that controller will trust first>
46
+ Canonical Review-Phase Artifact Rules:
47
+ - controller-dev-review => `SDTK_BK###_CONTROLLER_DEV_REVIEW_R#_YYYYMMDD.md` + `APPROVED FOR QA HANDOFF` or `CHANGES REQUIRED BEFORE QA`
48
+ - qa-review => `SDTK_BK###_QA_CHECKPOINT_REPORT_R#_YYYYMMDD.md` + `APPROVED FOR CONTROLLER ACCEPTANCE` or `CHANGES REQUIRED BEFORE CONTROLLER ACCEPTANCE`
49
+ - controller-acceptance => `SDTK_BK###_CONTROLLER_ACCEPTANCE_R#_YYYYMMDD.md` + `APPROVED FOR COMMIT-READY STATE` or `NOT APPROVED FOR COMMIT-READY STATE`
50
+ Carryover Findings / Fixed Truth To Preserve:
51
+ - <prior blocker ID or prior approved truth>
52
+ - <prior blocker ID or prior approved truth>
53
+ Formal Artifact Write Expectation:
54
+ - <agent-authored formal artifact|controller-authored fallback allowed if runtime is blocked>
55
+ Timebox / Search Budget:
56
+ - <deliver-first / max search budget / when to stop and escalate>
57
+ Runtime Stall Budget / Fallback Trigger:
58
+ - <e.g. 35 minutes / exact trigger that allows controller-local or native fallback>
59
+ Execution Rules:
60
+ 1. Read every listed input first and treat `Inputs:` as the authoritative starting source set unless blocked by a missing exact dependency.
61
+ 2. Do not run broad repo-wide or directory-wide discovery before you have read the listed inputs; any extra inspection must stay inside `Include Boundary`.
62
+ 3. <additional critical rule or commit/push restriction if relevant>
63
+ Required Verification:
64
+ - <command 1>
65
+ - <command 2>
66
+ - <command 3>
67
+ Return Format:
68
+ 1. metadata
69
+ 2. short summary
70
+ 3. exact files changed
71
+ 4. formal artifact truth
72
+ 5. execution permission audit
73
+ 6. exact verification results
74
+ 7. boundary truth
75
+ 8. blockers or open questions
76
+ 9. explicit readiness statement
package/bin/sdtk.js CHANGED
@@ -1,15 +1,15 @@
1
- #!/usr/bin/env node
2
-
3
- "use strict";
4
-
5
- const { run } = require("../src/index");
6
-
7
- run(process.argv.slice(2))
8
- .then((exitCode) => {
9
- process.exitCode = Number.isInteger(exitCode) ? exitCode : 0;
10
- })
11
- .catch((error) => {
12
- console.error(`sdtk: ${error.message}`);
13
- process.exitCode =
14
- typeof error.exitCode === "number" ? error.exitCode : 4;
15
- });
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { run } = require("../src/index");
6
+
7
+ run(process.argv.slice(2))
8
+ .then((exitCode) => {
9
+ process.exitCode = Number.isInteger(exitCode) ? exitCode : 0;
10
+ })
11
+ .catch((error) => {
12
+ console.error(`sdtk: ${error.message}`);
13
+ process.exitCode =
14
+ typeof error.exitCode === "number" ? error.exitCode : 4;
15
+ });
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "sdtk-spec-kit",
3
- "version": "0.4.4",
4
- "description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
5
- "bin": {
6
- "sdtk-spec": "bin/sdtk.js"
7
- },
8
- "main": "src/index.js",
9
- "type": "commonjs",
10
- "files": [
11
- "bin/",
12
- "src/",
13
- "assets/"
14
- ],
15
- "scripts": {
16
- "test": "npm run verify:payload && npm run pack:smoke",
17
- "build:payload": "powershell -ExecutionPolicy Bypass -File scripts/sync-toolkit-assets.ps1 && powershell -ExecutionPolicy Bypass -File scripts/build-toolkit-manifest.ps1",
18
- "verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
19
- "pack:smoke": "npm pack --dry-run",
20
- "pack:release": "npm pack",
21
- "prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
22
- },
23
- "engines": {
24
- "node": ">=18.13.0"
25
- },
26
- "keywords": [
27
- "sdtk",
28
- "sdtk-spec",
29
- "sdtk-spec-kit",
30
- "cli",
31
- "documentation",
32
- "toolkit",
33
- "dockkit"
34
- ],
35
- "license": "MIT",
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
39
- "directory": "products/sdtk-spec/distribution/sdtk-spec-kit"
40
- },
41
- "homepage": "https://sdtk.dev",
42
- "bugs": {
43
- "url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
44
- },
45
- "publishConfig": {
46
- "access": "public"
47
- }
48
- }
1
+ {
2
+ "name": "sdtk-spec-kit",
3
+ "version": "0.4.6",
4
+ "description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
5
+ "bin": {
6
+ "sdtk-spec": "bin/sdtk.js"
7
+ },
8
+ "main": "src/index.js",
9
+ "type": "commonjs",
10
+ "files": [
11
+ "bin/",
12
+ "src/",
13
+ "assets/"
14
+ ],
15
+ "scripts": {
16
+ "test": "npm run verify:payload && npm run pack:smoke",
17
+ "build:payload": "powershell -ExecutionPolicy Bypass -File scripts/sync-toolkit-assets.ps1 && powershell -ExecutionPolicy Bypass -File scripts/build-toolkit-manifest.ps1",
18
+ "verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
19
+ "pack:smoke": "npm pack --dry-run",
20
+ "pack:release": "npm pack",
21
+ "prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
22
+ },
23
+ "engines": {
24
+ "node": ">=18.13.0"
25
+ },
26
+ "keywords": [
27
+ "sdtk",
28
+ "sdtk-spec",
29
+ "sdtk-spec-kit",
30
+ "cli",
31
+ "documentation",
32
+ "toolkit",
33
+ "dockkit"
34
+ ],
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
39
+ "directory": "products/sdtk-spec/distribution/sdtk-spec-kit"
40
+ },
41
+ "homepage": "https://sdtk.dev",
42
+ "bugs": {
43
+ "url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ }
48
+ }
@@ -1,90 +1,90 @@
1
- "use strict";
2
-
3
- const { activateWithLicense } = require("../lib/license-activation");
4
- const { ValidationError, CliError } = require("../lib/errors");
5
-
6
- /**
7
- * Parse activate command arguments.
8
- *
9
- * @param {string[]} args - Command arguments (e.g., ["--license", "SDTK-XXXX-YYYY"])
10
- * @returns {{ licenseKey: string, json: boolean, activationUrl?: string }}
11
- */
12
- function parseActivateArgs(args) {
13
- let licenseKey = null;
14
- let json = false;
15
- let activationUrl = null;
16
-
17
- for (let i = 0; i < args.length; i++) {
18
- const arg = args[i];
19
-
20
- if (arg === "--license") {
21
- if (i + 1 >= args.length) {
22
- throw new ValidationError("--license requires a value");
23
- }
24
- licenseKey = args[++i];
25
- } else if (arg === "--json") {
26
- json = true;
27
- } else if (arg === "--activation-url") {
28
- if (i + 1 >= args.length) {
29
- throw new ValidationError("--activation-url requires a value");
30
- }
31
- activationUrl = args[++i];
32
- } else {
33
- throw new ValidationError(`Unknown option: ${arg}`);
34
- }
35
- }
36
-
37
- return { licenseKey, json, activationUrl };
38
- }
39
-
40
- /**
41
- * Execute the activate command.
42
- *
43
- * @param {string[]} args - Command arguments
44
- * @returns {Promise<number>} - Exit code
45
- */
46
- async function cmdActivate(args) {
47
- let options;
48
- try {
49
- options = parseActivateArgs(args);
50
- } catch (err) {
51
- if (err instanceof ValidationError) {
52
- console.error(`Error: ${err.message}`);
53
- console.error("Usage: sdtk-spec activate --license <KEY> [--json]");
54
- return 1;
55
- }
56
- throw err;
57
- }
58
-
59
- if (!options.licenseKey) {
60
- console.error("Error: --license is required");
61
- console.error("Usage: sdtk-spec activate --license <KEY> [--json]");
62
- return 1;
63
- }
64
-
65
- // Execute activation
66
- const result = await activateWithLicense({
67
- licenseKey: options.licenseKey,
68
- activationUrl: options.activationUrl,
69
- });
70
-
71
- if (options.json) {
72
- console.log(JSON.stringify({
73
- success: result.success,
74
- decision: result.decision,
75
- message: result.message,
76
- }, null, 2));
77
- } else {
78
- if (result.success) {
79
- console.log(result.message);
80
- } else {
81
- console.error(result.message);
82
- }
83
- }
84
-
85
- return result.exitCode;
86
- }
87
-
88
- module.exports = {
89
- cmdActivate,
90
- };
1
+ "use strict";
2
+
3
+ const { activateWithLicense } = require("../lib/license-activation");
4
+ const { ValidationError, CliError } = require("../lib/errors");
5
+
6
+ /**
7
+ * Parse activate command arguments.
8
+ *
9
+ * @param {string[]} args - Command arguments (e.g., ["--license", "SDTK-XXXX-YYYY"])
10
+ * @returns {{ licenseKey: string, json: boolean, activationUrl?: string }}
11
+ */
12
+ function parseActivateArgs(args) {
13
+ let licenseKey = null;
14
+ let json = false;
15
+ let activationUrl = null;
16
+
17
+ for (let i = 0; i < args.length; i++) {
18
+ const arg = args[i];
19
+
20
+ if (arg === "--license") {
21
+ if (i + 1 >= args.length) {
22
+ throw new ValidationError("--license requires a value");
23
+ }
24
+ licenseKey = args[++i];
25
+ } else if (arg === "--json") {
26
+ json = true;
27
+ } else if (arg === "--activation-url") {
28
+ if (i + 1 >= args.length) {
29
+ throw new ValidationError("--activation-url requires a value");
30
+ }
31
+ activationUrl = args[++i];
32
+ } else {
33
+ throw new ValidationError(`Unknown option: ${arg}`);
34
+ }
35
+ }
36
+
37
+ return { licenseKey, json, activationUrl };
38
+ }
39
+
40
+ /**
41
+ * Execute the activate command.
42
+ *
43
+ * @param {string[]} args - Command arguments
44
+ * @returns {Promise<number>} - Exit code
45
+ */
46
+ async function cmdActivate(args) {
47
+ let options;
48
+ try {
49
+ options = parseActivateArgs(args);
50
+ } catch (err) {
51
+ if (err instanceof ValidationError) {
52
+ console.error(`Error: ${err.message}`);
53
+ console.error("Usage: sdtk-spec activate --license <KEY> [--json]");
54
+ return 1;
55
+ }
56
+ throw err;
57
+ }
58
+
59
+ if (!options.licenseKey) {
60
+ console.error("Error: --license is required");
61
+ console.error("Usage: sdtk-spec activate --license <KEY> [--json]");
62
+ return 1;
63
+ }
64
+
65
+ // Execute activation
66
+ const result = await activateWithLicense({
67
+ licenseKey: options.licenseKey,
68
+ activationUrl: options.activationUrl,
69
+ });
70
+
71
+ if (options.json) {
72
+ console.log(JSON.stringify({
73
+ success: result.success,
74
+ decision: result.decision,
75
+ message: result.message,
76
+ }, null, 2));
77
+ } else {
78
+ if (result.success) {
79
+ console.log(result.message);
80
+ } else {
81
+ console.error(result.message);
82
+ }
83
+ }
84
+
85
+ return result.exitCode;
86
+ }
87
+
88
+ module.exports = {
89
+ cmdActivate,
90
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ const { runRequirementAnalyze } = require("../lib/requirement-analysis");
4
+
5
+ async function cmdAnalyze(args) {
6
+ return runRequirementAnalyze(args);
7
+ }
8
+
9
+ module.exports = {
10
+ cmdAnalyze,
11
+ };