sdtk-spec-kit 0.7.0 → 0.8.0
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/README.md +1 -1
- package/assets/manifest/toolkit-bundle.manifest.json +14 -14
- package/assets/manifest/toolkit-bundle.sha256.txt +6 -6
- package/assets/toolkit/toolkit/AGENTS.md +19 -7
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +20 -70
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +25 -68
- package/assets/toolkit/toolkit/sdtk-spec.config.json +2 -1
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +21 -0
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +2 -1
- package/package.json +1 -1
- package/src/commands/config.js +175 -0
- package/src/commands/help.js +8 -0
- package/src/index.js +4 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
It exposes the `sdtk-spec` CLI as the primary upstream command surface.
|
|
6
6
|
|
|
7
|
-
Package version in this source snapshot: `0.
|
|
7
|
+
Package version in this source snapshot: `0.8.0`
|
|
8
8
|
Full usage guide: `products/sdtk-spec/governance/SDTK_SPEC_USAGE_GUIDE.md`
|
|
9
9
|
|
|
10
10
|
Wraps the `SDTK-SPEC` PowerShell toolkit for portable, reproducible feature documentation scaffolding.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"sourceCommit": "
|
|
2
|
+
"version": "0.8.0",
|
|
3
|
+
"sourceCommit": "e872c6b7d09a3b2658e26a63d3ff6366e7430f82",
|
|
4
4
|
"fileCount": 100,
|
|
5
5
|
"files": [
|
|
6
6
|
{
|
|
7
7
|
"path": "toolkit/AGENTS.md",
|
|
8
|
-
"sha256": "
|
|
9
|
-
"size":
|
|
8
|
+
"sha256": "5c76955ecabfae64759c11a3ee0fa777b1e0c0f78bdd177ae8f04340cd572e4b",
|
|
9
|
+
"size": 16469
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "toolkit/install.ps1",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"path": "toolkit/runtimes/claude/CLAUDE_TEMPLATE.md",
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "301a604b2daa39f85a7b9cbf4b634df5dafd16f84622ad188bc214b34da226d7",
|
|
24
|
+
"size": 3501
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "toolkit/runtimes/codex/CODEX_TEMPLATE.md",
|
|
28
|
-
"sha256": "
|
|
29
|
-
"size":
|
|
28
|
+
"sha256": "6f1fd656e95906a054299312d44e63a28d948c634b6534089db3eeca9936bf70",
|
|
29
|
+
"size": 2853
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"path": "toolkit/scripts/agents/run-claude-task.ps1",
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
"path": "toolkit/sdtk-spec.config.json",
|
|
83
|
-
"sha256": "
|
|
84
|
-
"size":
|
|
83
|
+
"sha256": "712382d838a18b6cc6a5285b3c536fac74138c752a3fa1fd318828b19ece6b8f",
|
|
84
|
+
"size": 1231
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"path": "toolkit/sdtk-spec.config.profiles.example.json",
|
|
88
|
-
"sha256": "
|
|
89
|
-
"size":
|
|
88
|
+
"sha256": "2a306c1609499fb4910b86d5ec6e8c796e0cdf72c5f97fe3df9c1388ac62b913",
|
|
89
|
+
"size": 2134
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"path": "toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md",
|
|
@@ -490,8 +490,8 @@
|
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
"path": "toolkit/templates/QUALITY_CHECKLIST.md",
|
|
493
|
-
"sha256": "
|
|
494
|
-
"size":
|
|
493
|
+
"sha256": "643614c6dbcc475e7c817418d2a89bafd32d867c59dcef992c3810fbe6d1dc5d",
|
|
494
|
+
"size": 7041
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
497
|
"path": "toolkit/templates/README.md",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
5c76955ecabfae64759c11a3ee0fa777b1e0c0f78bdd177ae8f04340cd572e4b toolkit/AGENTS.md
|
|
2
2
|
52bdc750984ee3c3598c1f1838cf3d72b2fc0ed06fca173ec3da79929b10f20c toolkit/install.ps1
|
|
3
3
|
0218dea84f0f9a25ddd2e68c6ae9995685ec471ff0950bd17d1eddcaa99f3e0e toolkit/README.md
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
301a604b2daa39f85a7b9cbf4b634df5dafd16f84622ad188bc214b34da226d7 toolkit/runtimes/claude/CLAUDE_TEMPLATE.md
|
|
5
|
+
6f1fd656e95906a054299312d44e63a28d948c634b6534089db3eeca9936bf70 toolkit/runtimes/codex/CODEX_TEMPLATE.md
|
|
6
6
|
8616291be4aaa4fb5cb0f1f4c738c108ab79090bf767ee2b4403d6d582c150c7 toolkit/scripts/agents/run-claude-task.ps1
|
|
7
7
|
4996e8e7aa50283dbf52c473c4e315af7ee951ebddb671ff59cc4bcde9843907 toolkit/scripts/agents/run-codex-task.ps1
|
|
8
8
|
6bcebe5fdb87451a7260101eaed32c6b61a2cf07832be754790f5432e028a503 toolkit/scripts/agents/validate-mailbox-formal-artifact.py
|
|
@@ -13,8 +13,8 @@ b9bdb2489c2881d03e965c7dd849468f797e2070d30e6730ab9ddf37b54b7879 toolkit/script
|
|
|
13
13
|
f925a58e0cc92addc542762c2bf5f60be2d538dcca88e15de0b628b3a57048b1 toolkit/scripts/uninstall-claude-skills.ps1
|
|
14
14
|
db0e580a20b43bb0af399ff3e4f7f2d826423d67bd2fa9a8121a384337a47de1 toolkit/scripts/uninstall-codex-skills.ps1
|
|
15
15
|
dec335148e1bc721eee6ddae82417f344cc74345771da1328c7af54deee0c812 toolkit/SDTK_TOOLKIT.md
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
712382d838a18b6cc6a5285b3c536fac74138c752a3fa1fd318828b19ece6b8f toolkit/sdtk-spec.config.json
|
|
17
|
+
2a306c1609499fb4910b86d5ec6e8c796e0cdf72c5f97fe3df9c1388ac62b913 toolkit/sdtk-spec.config.profiles.example.json
|
|
18
18
|
ab376df00d0fe92307ff862bac0ffe431254903cf9ccac00117d979ddc9c7f88 toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md
|
|
19
19
|
fba56394ff7cae3ab8cd510b4bfb5b299df9f4f1a3e59be9bbcd573e3df477ae toolkit/session/SDTK_AGENT_WORKING_RULES.md
|
|
20
20
|
c17bb4faff318032ee99ead56e5fa182811c7bcaa176e463d0377cefde213ac1 toolkit/skills-claude/api-design-spec/SKILL.md
|
|
@@ -95,6 +95,6 @@ e65192c4e72d86d27452c89f7be2d3bfe1118af550f71e3eee9db92e20f96cea toolkit/templa
|
|
|
95
95
|
6ee91d4307ec0fc6dbdee281f2a3f99efa552de55b535ff46cf498689572f9f7 toolkit/templates/handoffs/QA_RELEASE_DECISION.md
|
|
96
96
|
54ae1612b6e95af0f19bd0ea897ceb1df72d366dc20485c91ba3261484e88cf2 toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md
|
|
97
97
|
3fd748061615802c8cd5a4978396a782f59404662339ee18f732352cb79b4f84 toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md
|
|
98
|
-
|
|
98
|
+
643614c6dbcc475e7c817418d2a89bafd32d867c59dcef992c3810fbe6d1dc5d toolkit/templates/QUALITY_CHECKLIST.md
|
|
99
99
|
2ba15299f149dca87d182ca65d8dccc3b27335c6ac31e01cc42afd02476d5dad toolkit/templates/README.md
|
|
100
100
|
bc778c499c534c3a0c4547c35d2fed02e745cefe743c1ed8a1074e1e0a88a8b2 toolkit/templates/SHARED_PLANNING.md
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# SDTK Orchestrator Routing Contract
|
|
2
2
|
|
|
3
|
+
Version: 2.0
|
|
4
|
+
Last Updated: 2026-07-14
|
|
5
|
+
|
|
6
|
+
This file is the single source of the SDTK routing contract. `CLAUDE.md` and `CODEX.md` are thin runtime adapters that defer to it; when they appear to disagree with this file, this file wins.
|
|
7
|
+
|
|
3
8
|
Goal: use the SDTK Suite as a coordinated operating model:
|
|
4
9
|
- `SDTK-SPEC` governs upstream discovery, planning, design, traceability, and release gates.
|
|
5
10
|
- `SDTK-CODE` is the default downstream system for implementation, bug fixing, refactoring, verification, and ship-ready code changes.
|
|
@@ -19,16 +24,21 @@ Orchestrator Intake is the always-winning front door for every unprefixed reques
|
|
|
19
24
|
- Read stack and command configuration from `sdtk-spec.config.json` in the project root.
|
|
20
25
|
- For VI/JP source requirements, keep original text in an appendix and add literal English translation for traceability.
|
|
21
26
|
- `/dev` stops at `FEATURE_IMPL_PLAN + CODE_HANDOFF`; SDTK-CODE is the default downstream coding system.
|
|
22
|
-
- Verification-before-completion: no phase may declare done, pass, or handoff-ready without fresh command evidence
|
|
27
|
+
- Verification-before-completion: no phase may declare done, pass, or handoff-ready without fresh command evidence — run the relevant verification commands in this session and quote their real output in the phase artifact; assumed, remembered, or stale results do not count.
|
|
23
28
|
- `toolkit/skills/skills.catalog.yaml` is the inventory source of truth for the 14 core SDTK-SPEC skills, including the bounded `mailbox-dispatch` controller skill.
|
|
24
29
|
|
|
25
30
|
## 2) Session Bootstrap Protocol
|
|
26
31
|
When starting a new session, read context in this order when the files exist:
|
|
27
32
|
1. `AGENTS.md`
|
|
28
|
-
2.
|
|
29
|
-
3. `governance/ai/session/
|
|
30
|
-
4. `governance/ai/
|
|
31
|
-
5.
|
|
33
|
+
2. `.sdtk/evolve/LEARNED.md` — locally learned, owner-approved lessons (managed by the evolve skill + `sdtk evolve`; never edit it directly)
|
|
34
|
+
3. `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
|
|
35
|
+
4. `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
|
|
36
|
+
5. `governance/ai/core/IMPROVEMENT_BACKLOG.md`
|
|
37
|
+
6. issue-specific controller spec and implementation plan
|
|
38
|
+
|
|
39
|
+
Orientation and health:
|
|
40
|
+
- If `.sdtk/wiki/` exists, it is the project's committed memory layer: orient with `sdtk-wiki search "<topic>"` (entry points: `.sdtk/wiki/pages/_index.md`, the atlas summary) before falling back to repo-wide searching.
|
|
41
|
+
- If any `sdtk-*` CLI behaves unexpectedly (missing verbs, stale help, wrong version), run `sdtk doctor` to detect version fragmentation before debugging further.
|
|
32
42
|
|
|
33
43
|
Do not read the entire historical session archive by default. Use `SDTK_SESSION_MEMORY_*.md` only when chronology or past acceptance details are required.
|
|
34
44
|
|
|
@@ -60,9 +70,11 @@ Use this compact matrix during intake so the agent picks the smallest sufficient
|
|
|
60
70
|
| Formal feature delivery | `SDTK-SPEC` pipeline | PM -> BA -> ARCH -> DEV planning -> CODE handoff -> QA |
|
|
61
71
|
| Build, fix, or refactor implementation | `SDTK-CODE` | code-brainstorm (when slice is ambiguous) -> start -> plan -> build -> verify -> ship |
|
|
62
72
|
| Debug failure or unexpected behavior | `SDTK-CODE` debug | Root cause, bounded fix, regression verification |
|
|
73
|
+
| Screen/layout design, visual tokens, or prototype evidence before coding | `SDTK-DESIGN` | Reviewable screens/prototype plus a design handoff into SDTK-CODE |
|
|
63
74
|
| Deployment, release, infra, or CI/CD work | `SDTK-OPS` | ops-plan -> ops-deploy/ops-incident/ops-monitor -> ops-verify |
|
|
64
75
|
| Code review or spec review | Review / QA workflow | Findings, risks, blockers, acceptance signal |
|
|
65
76
|
| Atlas graph build or viewer work | `sdtk-spec atlas` compatibility workflow or `sdtk-wiki atlas` for canonical SDTK-WIKI work | Local `.sdtk/atlas` compatibility graph or `.sdtk/wiki` SDTK-WIKI result |
|
|
77
|
+
| Question about existing project knowledge or docs | `sdtk-wiki search` (free) or `sdtk-wiki ask` when available | Grounded answer citing project pages before any repo-wide scan |
|
|
66
78
|
| SDTK-WIKI Ask | `sdtk-wiki ask` | Grounded answer when `.sdtk/wiki/graph` plus `wiki.ask` entitlement/runtime preconditions are present, otherwise explicit blocker |
|
|
67
79
|
| Existing project scan: project ingest, project refresh, or project audit | Matching premium project workflow | Project-local foundation, refresh, or audit result without overclaiming entitlement |
|
|
68
80
|
| Multi-step durable workflow: 3+ dependent steps, human gates between steps, must survive a pause, or spans multiple lanes/sessions | Propose `sdtk-agent` orchestration (opt-in, token-aware, see the orchestration cost gate in section 5) | `.sdtk/agent-runtime/runs/<run_id>/` ledger plus `reports/final_report.md` |
|
|
@@ -165,7 +177,7 @@ Cross-cutting capabilities (not a linear lane; usable across every phase):
|
|
|
165
177
|
- surface: `sdtk-agent run start|continue|status|report`, `gate approve|reject`, `workflow validate`, `adapter hermes-kanban plan`
|
|
166
178
|
- use only when a workflow has 3+ dependent steps, needs human gates between steps, or must survive a pause; otherwise route straight to a lane
|
|
167
179
|
- opt-in and token-aware: always propose-then-confirm before dispatch (see the orchestration cost gate in section 5)
|
|
168
|
-
- the CLI is runtime-neutral and installs no skills; the engine is Free
|
|
180
|
+
- the CLI is runtime-neutral and installs no skills; the engine is Free; the hermes-kanban adapter defaults to dry-run and live dispatch stays fail-closed behind explicit configuration plus per-run confirmation
|
|
169
181
|
|
|
170
182
|
If the current project only has `SDTK-SPEC` runtime assets installed:
|
|
171
183
|
- keep `/dev` bounded to planning and `CODE_HANDOFF`
|
|
@@ -186,7 +198,7 @@ If the current project only has `SDTK-SPEC` runtime assets installed:
|
|
|
186
198
|
- For Codex runtimes: project-local skills require the explicit local `CODEX_HOME=<project>/.codex` contract; native `.codex/skills` auto-discovery is not claimed.
|
|
187
199
|
- Use `ops-parallel` or `code-parallel` only for truly independent slices. If parallel dispatch is unavailable in the active runtime, execute them sequentially in one controller session.
|
|
188
200
|
- `SDTK-AGENT` is runtime-neutral: it installs no skills and behaves identically on Claude and Codex. It is CLI-only, so do not invent a slash command for it.
|
|
189
|
-
- The `sdtk-agent` hermes-kanban adapter
|
|
201
|
+
- The `sdtk-agent` hermes-kanban adapter defaults to dry-run. Live dispatch exists but is fail-closed behind explicit adapter configuration (`mode: live` plus `live_ack`) and a per-run `--confirm`, and it remains an attended, validation-gated capability. Never claim, enable, or attempt live dispatch on the user's behalf.
|
|
190
202
|
|
|
191
203
|
## 11) Discovery And PM Readiness
|
|
192
204
|
- PM initiation starts only after `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` is marked `READY_FOR_PM_INITIATION`.
|
|
@@ -1,80 +1,30 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
Version:
|
|
4
|
-
Last Updated: 2026-07-
|
|
3
|
+
Version: 3.0
|
|
4
|
+
Last Updated: 2026-07-14
|
|
5
5
|
Owner: SDTK-SPEC Core Team
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Runtime adapter for Claude Code sessions in projects using the SDTK Suite. The full routing contract — lanes, intake protocol, intent-to-skill matrix, proceed-vs-ask rules, quality gates, orchestration cost gate — lives in `AGENTS.md` (single source). This file only adds what is specific to the Claude runtime.
|
|
8
8
|
|
|
9
|
+
<!-- SDTK:SHARED:BEGIN (keep byte-identical with the CODEX runtime adapter; the routing contract itself lives in AGENTS.md) -->
|
|
9
10
|
## 1) Rule Priority
|
|
10
11
|
1. Explicit user request
|
|
11
|
-
2. `AGENTS.md` (project root)
|
|
12
|
-
3. Installed skill content
|
|
13
|
-
4. This file
|
|
12
|
+
2. `AGENTS.md` (project root) — the single source of the SDTK routing contract
|
|
13
|
+
3. Installed skill content of the active runtime
|
|
14
|
+
4. This runtime adapter file
|
|
14
15
|
5. `sdtk-spec.config.json`
|
|
15
16
|
|
|
16
|
-
## 2)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- `SDTK-AGENT`: orchestration layer — a durable, file-driven DAG controller above `sdtk-code` agent-team; chains multi-step runs with human gates. CLI-only (installs no skills, no slash command). Opt-in and token-aware: a run can spawn many sub-agents, so always propose-then-confirm before dispatch; never auto-start a run. See the orchestration cost gate in `AGENTS.md`.
|
|
25
|
-
- Default unprefixed entry point: Orchestrator Intake.
|
|
26
|
-
- Orchestrator classifies the user request before selecting a role, product lane, or skill.
|
|
27
|
-
- `SDTK-SPEC` phase workflow remains: PM -> BA -> ARCH -> DEV -> QA after intake decides formal feature delivery is ready.
|
|
28
|
-
- Entry point command: `/orchestrator` (recommended). Use `/pm` only for formal product initiation.
|
|
29
|
-
- Role commands: `/pm`, `/ba`, `/arch`, `/dev`, `/qa`
|
|
30
|
-
- Sub-skill commands: `/api-doc`, `/api-design-spec`, `/screen-design-spec`, `/design-layout`, `/test-case-spec`, `/dev-backend`, `/dev-frontend`
|
|
31
|
-
- SDTK-CODE workflow commands: `start`, `plan`, `build`, `verify`, `ship`
|
|
32
|
-
- Shared state files:
|
|
33
|
-
- `SHARED_PLANNING.md`
|
|
34
|
-
- `QUALITY_CHECKLIST.md`
|
|
17
|
+
## 2) Session Contract
|
|
18
|
+
1. Read `AGENTS.md` first and follow its Session Bootstrap Protocol (section 2) — including `.sdtk/evolve/LEARNED.md`, the `.sdtk/wiki` memory-layer orientation, and the active `sdtk-agent` run check.
|
|
19
|
+
2. Default unprefixed entry point is Orchestrator Intake: classify intent, then route with the Intent-To-Skill matrix (`AGENTS.md` section 4) and the Proceed-Vs-Ask rules (section 5), always choosing the smallest sufficient workflow.
|
|
20
|
+
3. Raw ideas go through `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`; PM initiation starts only at `READY_FOR_PM_INITIATION`. Use `NEEDS_MORE_DISCOVERY` or `NOT_ACTIONABLE_YET` when the request is not ready.
|
|
21
|
+
4. `sdtk-agent` orchestration is opt-in and token-aware behind the cost gate (`AGENTS.md` section 5.1): propose-then-confirm, never auto-start a run.
|
|
22
|
+
5. Route only to products whose runtime assets are installed; do not overclaim (`AGENTS.md` sections 8 and 10).
|
|
23
|
+
6. If any `sdtk-*` CLI behaves unexpectedly (missing verbs, stale help, wrong version), run `sdtk doctor` before debugging further.
|
|
24
|
+
<!-- SDTK:SHARED:END -->
|
|
35
25
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
1. `AGENTS.md`
|
|
39
|
-
2. `.sdtk/evolve/LEARNED.md` — locally learned, owner-approved lessons (managed by `/evolve` + `sdtk evolve`; never edit it directly)
|
|
40
|
-
3. `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
|
|
41
|
-
4. `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
|
|
42
|
-
5. issue-specific controller spec and implementation plan
|
|
43
|
-
|
|
44
|
-
Routing rules:
|
|
45
|
-
- Raw idea -> brainstorm / requirement clarification, then create or update `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` before PM initiation
|
|
46
|
-
- Formal feature delivery and approved planning work -> `SDTK-SPEC`
|
|
47
|
-
- build feature, fix code, refactor, or debug failure -> `SDTK-CODE` when available; use `code-brainstorm` when the slice is ambiguous
|
|
48
|
-
- deploy/release/infra/ops -> `SDTK-OPS` when available
|
|
49
|
-
- Atlas graph/viewer, SDTK-WIKI Ask boundary, project ingest, project refresh, and project audit -> matching SDTK command or workflow
|
|
50
|
-
- "what should we do next" -> Orchestrator state review using the smallest sufficient workflow
|
|
51
|
-
|
|
52
|
-
Active orchestration check:
|
|
53
|
-
- If `.sdtk/agent-runtime/runs/` holds a run whose state is not terminal (`running` or `waiting_for_approval`), surface it in one line (run id plus the blocking gate, if any) and offer `sdtk-agent run continue` before starting unrelated work.
|
|
54
|
-
|
|
55
|
-
Proceed-vs-ask summary:
|
|
56
|
-
- Ask clarification when the outcome is ambiguous, the target path/repo is missing, there is no acceptance boundary for implementation, the next step could mutate external state, or the next step would spawn multiple sub-agents / incur significant token cost (such as dispatching an `sdtk-agent` run).
|
|
57
|
-
- Proceed when intent and target are clear, the task is read-only analysis, the plan/spec is already approved, or the change is bounded and verifiable.
|
|
58
|
-
|
|
59
|
-
If only SPEC runtime assets are installed:
|
|
60
|
-
- keep `/dev` bounded to planning and `CODE_HANDOFF`
|
|
61
|
-
- do not claim that SDTK-CODE or SDTK-OPS runtime assets are already installed
|
|
62
|
-
|
|
63
|
-
Discovery artifact rule:
|
|
64
|
-
- PM initiation starts only after `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` is marked `READY_FOR_PM_INITIATION`.
|
|
65
|
-
- Use `NEEDS_MORE_DISCOVERY` or `NOT_ACTIONABLE_YET` when the request is not ready.
|
|
66
|
-
- The discovery artifact is a pre-PM clarification bridge, not a PRD or BA replacement.
|
|
67
|
-
|
|
68
|
-
## 3) Minimal Session Flow
|
|
69
|
-
1. Start with Orchestrator Intake unless the user explicitly selects a role.
|
|
70
|
-
2. Classify intent and choose the smallest sufficient SDTK workflow.
|
|
71
|
-
3. For raw ideas, finish discovery and readiness in `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` before PM initiation.
|
|
72
|
-
4. For formal feature delivery, move PM -> BA -> ARCH -> DEV -> QA without skipping gates.
|
|
73
|
-
5. Keep traceability from requirements to design, implementation, and tests.
|
|
74
|
-
6. Require code review completion before QA release decision.
|
|
75
|
-
|
|
76
|
-
## 4) Installed Skills
|
|
77
|
-
Skills are installed at `.claude/skills/` and provide slash commands:
|
|
26
|
+
## 3) Claude Runtime Specifics
|
|
27
|
+
Skills are installed at `.claude/skills/` and surface as slash commands. Rows apply only when the owning kit's runtime assets are installed:
|
|
78
28
|
|
|
79
29
|
| Command | Purpose |
|
|
80
30
|
|---------|---------|
|
|
@@ -82,7 +32,7 @@ Skills are installed at `.claude/skills/` and provide slash commands:
|
|
|
82
32
|
| `/pm` | PM initiation + planning |
|
|
83
33
|
| `/ba` | Business analysis |
|
|
84
34
|
| `/arch` | Solution architecture |
|
|
85
|
-
| `/dev` | Development + code
|
|
35
|
+
| `/dev` | Development planning + code handoff |
|
|
86
36
|
| `/qa` | QA testing + release decision |
|
|
87
37
|
| `/api-doc` | OpenAPI YAML + flow diagrams |
|
|
88
38
|
| `/api-design-spec` | API design detail spec |
|
|
@@ -98,9 +48,9 @@ Specialist rule reference files are installed inside each skill directory when t
|
|
|
98
48
|
|
|
99
49
|
`sdtk-agent` is CLI-only: it installs no skill and has no slash command. Drive it through the `sdtk-agent` CLI (`run start|continue|status|report`, `gate approve|reject`, `workflow validate`), never a `/agent` command.
|
|
100
50
|
|
|
101
|
-
##
|
|
51
|
+
## 4) References
|
|
52
|
+
- `AGENTS.md` (routing contract — single source)
|
|
102
53
|
- `sdtk-spec.config.json`
|
|
103
54
|
- `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
|
|
104
55
|
- `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
|
|
105
|
-
- `governance/ai/core/SDTK_WORKSPACE_LAYOUT_CONTRACT.md`
|
|
106
56
|
- `.claude/skills/<skill>/references/` (skill-local rule files when required)
|
|
@@ -1,79 +1,36 @@
|
|
|
1
1
|
# CODEX.md
|
|
2
2
|
|
|
3
|
-
Version:
|
|
4
|
-
Last Updated: 2026-07-
|
|
3
|
+
Version: 2.0
|
|
4
|
+
Last Updated: 2026-07-14
|
|
5
5
|
Owner: SDTK-SPEC Core Team
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Runtime adapter for Codex sessions in projects using the SDTK Suite. The full routing contract — lanes, intake protocol, intent-to-skill matrix, proceed-vs-ask rules, quality gates, orchestration cost gate — lives in `AGENTS.md` (single source). This file only adds what is specific to the Codex runtime.
|
|
8
8
|
|
|
9
|
+
<!-- SDTK:SHARED:BEGIN (keep byte-identical with the CODEX runtime adapter; the routing contract itself lives in AGENTS.md) -->
|
|
9
10
|
## 1) Rule Priority
|
|
10
11
|
1. Explicit user request
|
|
11
|
-
2. `AGENTS.md` (project root)
|
|
12
|
-
3.
|
|
13
|
-
4. This file
|
|
14
|
-
5.
|
|
15
|
-
|
|
16
|
-
## 2)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- Shared state files:
|
|
31
|
-
- `SHARED_PLANNING.md`
|
|
32
|
-
- `QUALITY_CHECKLIST.md`
|
|
33
|
-
|
|
34
|
-
## 2.1) Codex Session Start Checklist
|
|
35
|
-
Read these in order when they exist:
|
|
36
|
-
1. `AGENTS.md`
|
|
37
|
-
2. `.sdtk/evolve/LEARNED.md` — locally learned, owner-approved lessons (managed by the `sdtk-evolve` skill + `sdtk evolve`; never edit it directly)
|
|
38
|
-
3. `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
|
|
39
|
-
4. `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
|
|
40
|
-
5. issue-specific controller spec and implementation plan
|
|
41
|
-
|
|
42
|
-
Routing rules:
|
|
43
|
-
- Raw idea -> brainstorm / requirement clarification, then create or update `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` before PM initiation
|
|
44
|
-
- Formal feature delivery and approved planning work -> `SDTK-SPEC`
|
|
45
|
-
- build feature, fix code, refactor, or debug failure -> `SDTK-CODE` when available; use `code-brainstorm` when the slice is ambiguous
|
|
46
|
-
- deploy/release/infra/ops -> `SDTK-OPS` when available
|
|
47
|
-
- Atlas graph/viewer, SDTK-WIKI Ask boundary, project ingest, project refresh, and project audit -> matching SDTK command or workflow
|
|
48
|
-
- "what should we do next" -> Orchestrator state review using the smallest sufficient workflow
|
|
49
|
-
|
|
50
|
-
Active orchestration check:
|
|
51
|
-
- If `.sdtk/agent-runtime/runs/` holds a run whose state is not terminal (`running` or `waiting_for_approval`), surface it in one line (run id plus the blocking gate, if any) and offer `sdtk-agent run continue` before starting unrelated work.
|
|
52
|
-
|
|
53
|
-
Proceed-vs-ask summary:
|
|
54
|
-
- Ask clarification when the outcome is ambiguous, the target path/repo is missing, there is no acceptance boundary for implementation, the next step could mutate external state, or the next step would spawn multiple sub-agents / incur significant token cost (such as dispatching an `sdtk-agent` run).
|
|
55
|
-
- Proceed when intent and target are clear, the task is read-only analysis, the plan/spec is already approved, or the change is bounded and verifiable.
|
|
56
|
-
|
|
57
|
-
If only SPEC runtime assets are installed:
|
|
58
|
-
- keep `/dev` bounded to planning and `CODE_HANDOFF`
|
|
59
|
-
- do not claim that SDTK-CODE or SDTK-OPS runtime assets are already installed
|
|
60
|
-
|
|
61
|
-
Discovery artifact rule:
|
|
62
|
-
- PM initiation starts only after `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` is marked `READY_FOR_PM_INITIATION`.
|
|
63
|
-
- Use `NEEDS_MORE_DISCOVERY` or `NOT_ACTIONABLE_YET` when the request is not ready.
|
|
64
|
-
- The discovery artifact is a pre-PM clarification bridge, not a PRD or BA replacement.
|
|
65
|
-
|
|
66
|
-
## 3) Minimal Session Flow
|
|
67
|
-
1. Start with Orchestrator Intake unless the user explicitly selects a role.
|
|
68
|
-
2. Classify intent and choose the smallest sufficient SDTK workflow.
|
|
69
|
-
3. For raw ideas, finish discovery and readiness in `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` before PM initiation.
|
|
70
|
-
4. For formal feature delivery, move PM -> BA -> ARCH -> DEV -> QA without skipping gates.
|
|
71
|
-
5. Keep traceability from requirements to design, implementation, and tests.
|
|
72
|
-
6. Require code review completion before QA release decision.
|
|
12
|
+
2. `AGENTS.md` (project root) — the single source of the SDTK routing contract
|
|
13
|
+
3. Installed skill content of the active runtime
|
|
14
|
+
4. This runtime adapter file
|
|
15
|
+
5. `sdtk-spec.config.json`
|
|
16
|
+
|
|
17
|
+
## 2) Session Contract
|
|
18
|
+
1. Read `AGENTS.md` first and follow its Session Bootstrap Protocol (section 2) — including `.sdtk/evolve/LEARNED.md`, the `.sdtk/wiki` memory-layer orientation, and the active `sdtk-agent` run check.
|
|
19
|
+
2. Default unprefixed entry point is Orchestrator Intake: classify intent, then route with the Intent-To-Skill matrix (`AGENTS.md` section 4) and the Proceed-Vs-Ask rules (section 5), always choosing the smallest sufficient workflow.
|
|
20
|
+
3. Raw ideas go through `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`; PM initiation starts only at `READY_FOR_PM_INITIATION`. Use `NEEDS_MORE_DISCOVERY` or `NOT_ACTIONABLE_YET` when the request is not ready.
|
|
21
|
+
4. `sdtk-agent` orchestration is opt-in and token-aware behind the cost gate (`AGENTS.md` section 5.1): propose-then-confirm, never auto-start a run.
|
|
22
|
+
5. Route only to products whose runtime assets are installed; do not overclaim (`AGENTS.md` sections 8 and 10).
|
|
23
|
+
6. If any `sdtk-*` CLI behaves unexpectedly (missing verbs, stale help, wrong version), run `sdtk doctor` before debugging further.
|
|
24
|
+
<!-- SDTK:SHARED:END -->
|
|
25
|
+
|
|
26
|
+
## 3) Codex Runtime Specifics
|
|
27
|
+
- Project-local skills require the explicit local runtime home contract: launch Codex with `CODEX_HOME=<project>/.codex`. Native `.codex/skills` auto-discovery is not claimed.
|
|
28
|
+
- Roles are addressed with message prefixes (`/pm`, `/ba`, `/arch`, `/dev`, `/qa`, `/orchestrator`) interpreted per `AGENTS.md` section 7 — they are role tags in the message, not installed slash commands.
|
|
29
|
+
- SDTK-CODE workflow phases (`start -> plan -> build -> verify -> ship`) and specialist skills apply as described in `AGENTS.md` section 8 when the owning kit's runtime assets are installed.
|
|
30
|
+
- `sdtk-agent` is CLI-only and runtime-neutral: drive it through the `sdtk-agent` CLI (`run start|continue|status|report`, `gate approve|reject`, `workflow validate`); it behaves identically on Claude and Codex.
|
|
73
31
|
|
|
74
32
|
## 4) References
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
33
|
+
- `AGENTS.md` (routing contract — single source)
|
|
34
|
+
- `sdtk-spec.config.json`
|
|
77
35
|
- `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
|
|
78
36
|
- `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
|
|
79
|
-
- `sdtk-spec.config.json`
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"profiles": {
|
|
3
|
+
"php-laravel": {
|
|
4
|
+
"orchestration": {
|
|
5
|
+
"apiDesignDetailMode": "auto",
|
|
6
|
+
"testCaseSpecMode": "auto"
|
|
7
|
+
},
|
|
8
|
+
"stack": {
|
|
9
|
+
"backend": "PHP 8.3 + Laravel 11",
|
|
10
|
+
"frontend": "Blade + Vite (or Livewire)",
|
|
11
|
+
"mobile": "N/A",
|
|
12
|
+
"database": "MySQL 8",
|
|
13
|
+
"auth": "Laravel Sanctum"
|
|
14
|
+
},
|
|
15
|
+
"commands": {
|
|
16
|
+
"backendTests": "php artisan test",
|
|
17
|
+
"backendTypecheck": "vendor/bin/phpstan analyse",
|
|
18
|
+
"backendLint": "vendor/bin/pint --test",
|
|
19
|
+
"frontendTests": "npm run test",
|
|
20
|
+
"frontendLint": "npm run lint",
|
|
21
|
+
"e2eTests": "npm run e2e"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
3
24
|
"django-react": {
|
|
4
25
|
"orchestration": {
|
|
5
26
|
"apiDesignDetailMode": "auto",
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
| 4 | Test obligations are explicit enough for downstream verification | [ ] Pending | Dev Agent | | |
|
|
75
75
|
| 5 | Readiness decision is explicit (`READY_FOR_SDTK_CODE` or `BLOCKED_FOR_SDTK_CODE`) | [ ] Pending | Dev Agent | | |
|
|
76
76
|
| 6 | `CODE_HANDOFF_[FEATURE_KEY].json` generated or validated successfully | [ ] Pending | Dev Agent | | |
|
|
77
|
-
|
|
|
77
|
+
| 7 | `sdtk-spec config check` passes (no UPDATE_ME placeholders — stack/test commands are real) | [ ] Pending | Dev Agent | Run `sdtk-spec config apply-profile <name>` if unfilled | |
|
|
78
|
+
| **8** | **DEV READY FOR SDTK-CODE** | [ ] Pending | **Dev Gate** | **If ready: suggest `sdtk-code start ...`; if blocked: keep blockers visible** | |
|
|
78
79
|
|
|
79
80
|
---
|
|
80
81
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// `sdtk-spec config` — project configuration helpers (BK-344).
|
|
4
|
+
//
|
|
5
|
+
// C-1: the profiles example shipped with zero code consumers — users had to
|
|
6
|
+
// hand-copy JSON blocks. C-3: UPDATE_ME placeholders had no enforcement, so
|
|
7
|
+
// delivery gates could run with literal "UPDATE_ME: ..." as a test command.
|
|
8
|
+
|
|
9
|
+
const fs = require("fs");
|
|
10
|
+
const path = require("path");
|
|
11
|
+
const { ValidationError } = require("../lib/errors");
|
|
12
|
+
|
|
13
|
+
const CONFIG_FILE = "sdtk-spec.config.json";
|
|
14
|
+
const PROFILES_FILE = "sdtk-spec.config.profiles.example.json";
|
|
15
|
+
|
|
16
|
+
// String values that mean "this was never filled in".
|
|
17
|
+
const PLACEHOLDER_PATTERNS = [/UPDATE_ME/, /^Set your /];
|
|
18
|
+
|
|
19
|
+
const HELP = `sdtk-spec config — project configuration helpers
|
|
20
|
+
|
|
21
|
+
Usage:
|
|
22
|
+
sdtk-spec config apply-profile <name> [--project-path <path>] [--json]
|
|
23
|
+
sdtk-spec config check [--project-path <path>] [--json]
|
|
24
|
+
|
|
25
|
+
Subcommands:
|
|
26
|
+
apply-profile <name> Merge a stack profile from ${PROFILES_FILE}
|
|
27
|
+
into ${CONFIG_FILE}. Overwrites the profile-owned
|
|
28
|
+
sections (orchestration, stack, commands) while
|
|
29
|
+
preserving docs, schemaVersion, and stack.detection.
|
|
30
|
+
check Scan ${CONFIG_FILE} for unfilled placeholders
|
|
31
|
+
(UPDATE_ME / "Set your ..."). Exits 1 when any
|
|
32
|
+
remain — wire it into delivery gates.
|
|
33
|
+
|
|
34
|
+
Flags:
|
|
35
|
+
--project-path <path> Project root containing ${CONFIG_FILE} (default: cwd)
|
|
36
|
+
--json Machine-readable output
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
function parseFlags(args) {
|
|
40
|
+
const flags = { projectPath: process.cwd(), json: false, help: false, positional: [] };
|
|
41
|
+
for (let i = 0; i < args.length; i++) {
|
|
42
|
+
const a = args[i];
|
|
43
|
+
if (a === "--help" || a === "-h") {
|
|
44
|
+
flags.help = true;
|
|
45
|
+
} else if (a === "--project-path") {
|
|
46
|
+
const value = args[++i];
|
|
47
|
+
if (!value) throw new ValidationError("--project-path requires a value");
|
|
48
|
+
flags.projectPath = path.resolve(value);
|
|
49
|
+
} else if (a === "--json") {
|
|
50
|
+
flags.json = true;
|
|
51
|
+
} else if (a.startsWith("--")) {
|
|
52
|
+
throw new ValidationError(`Unknown flag for "config": ${a}. Run "sdtk-spec config --help".`);
|
|
53
|
+
} else {
|
|
54
|
+
flags.positional.push(a);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return flags;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function readJson(filePath, label) {
|
|
61
|
+
if (!fs.existsSync(filePath)) {
|
|
62
|
+
throw new ValidationError(`${label} not found: ${filePath}`);
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
66
|
+
} catch (err) {
|
|
67
|
+
throw new ValidationError(`${label} is not valid JSON: ${filePath} (${err.message})`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function isPlaceholder(value) {
|
|
72
|
+
return typeof value === "string" && PLACEHOLDER_PATTERNS.some((re) => re.test(value));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function collectPlaceholders(node, trail, findings) {
|
|
76
|
+
if (typeof node === "string") {
|
|
77
|
+
if (isPlaceholder(node)) findings.push({ path: trail.join("."), value: node });
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (Array.isArray(node)) {
|
|
81
|
+
node.forEach((item, i) => collectPlaceholders(item, trail.concat(String(i)), findings));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (node && typeof node === "object") {
|
|
85
|
+
for (const [key, value] of Object.entries(node)) {
|
|
86
|
+
collectPlaceholders(value, trail.concat(key), findings);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function cmdApplyProfile(flags) {
|
|
92
|
+
const name = flags.positional[0];
|
|
93
|
+
if (!name) {
|
|
94
|
+
throw new ValidationError('config apply-profile requires a profile name. Run "sdtk-spec config --help".');
|
|
95
|
+
}
|
|
96
|
+
const configPath = path.join(flags.projectPath, CONFIG_FILE);
|
|
97
|
+
const profilesPath = path.join(flags.projectPath, PROFILES_FILE);
|
|
98
|
+
const config = readJson(configPath, "Project config");
|
|
99
|
+
const profilesDoc = readJson(profilesPath, "Config profiles file");
|
|
100
|
+
const profiles = profilesDoc.profiles || {};
|
|
101
|
+
const available = Object.keys(profiles);
|
|
102
|
+
if (!Object.prototype.hasOwnProperty.call(profiles, name)) {
|
|
103
|
+
throw new ValidationError(
|
|
104
|
+
`Unknown profile "${name}". Available profiles: ${available.join(", ") || "(none)"}`
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
const profile = profiles[name];
|
|
108
|
+
|
|
109
|
+
// The profile owns orchestration/stack/commands; everything else in the
|
|
110
|
+
// config (docs, schemaVersion, unknown future keys) is preserved.
|
|
111
|
+
// stack.detection is detector-owned state and always survives.
|
|
112
|
+
const detection = config.stack && config.stack.detection ? config.stack.detection : undefined;
|
|
113
|
+
if (profile.orchestration) config.orchestration = { ...config.orchestration, ...profile.orchestration };
|
|
114
|
+
if (profile.stack) config.stack = { ...profile.stack };
|
|
115
|
+
if (detection !== undefined) {
|
|
116
|
+
config.stack = config.stack || {};
|
|
117
|
+
config.stack.detection = detection;
|
|
118
|
+
}
|
|
119
|
+
if (profile.commands) config.commands = { ...profile.commands };
|
|
120
|
+
|
|
121
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf8");
|
|
122
|
+
|
|
123
|
+
const findings = [];
|
|
124
|
+
collectPlaceholders(config, [], findings);
|
|
125
|
+
if (flags.json) {
|
|
126
|
+
console.log(JSON.stringify({ ok: true, profile: name, remainingPlaceholders: findings.length }, null, 2));
|
|
127
|
+
} else {
|
|
128
|
+
console.log(`Applied profile "${name}" to ${configPath}`);
|
|
129
|
+
console.log(` stack.detection: ${detection !== undefined ? "preserved" : "not present"}`);
|
|
130
|
+
console.log(` remaining placeholders: ${findings.length}`);
|
|
131
|
+
if (findings.length > 0) {
|
|
132
|
+
console.log(' Run "sdtk-spec config check" to list them.');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function cmdCheck(flags) {
|
|
139
|
+
const configPath = path.join(flags.projectPath, CONFIG_FILE);
|
|
140
|
+
const config = readJson(configPath, "Project config");
|
|
141
|
+
const findings = [];
|
|
142
|
+
collectPlaceholders(config, [], findings);
|
|
143
|
+
const ok = findings.length === 0;
|
|
144
|
+
if (flags.json) {
|
|
145
|
+
console.log(JSON.stringify({ ok, findings }, null, 2));
|
|
146
|
+
} else if (ok) {
|
|
147
|
+
console.log(`OK — ${CONFIG_FILE} has no unfilled placeholders.`);
|
|
148
|
+
} else {
|
|
149
|
+
console.log(`${findings.length} unfilled placeholder(s) in ${configPath}:`);
|
|
150
|
+
for (const f of findings) {
|
|
151
|
+
console.log(` - ${f.path}: ${f.value}`);
|
|
152
|
+
}
|
|
153
|
+
console.log('Fill them (or run "sdtk-spec config apply-profile <name>") before running delivery gates.');
|
|
154
|
+
}
|
|
155
|
+
return ok ? 0 : 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function cmdConfig(args) {
|
|
159
|
+
const flags = parseFlags(args);
|
|
160
|
+
const sub = flags.positional.shift();
|
|
161
|
+
if (flags.help || !sub) {
|
|
162
|
+
console.log(HELP);
|
|
163
|
+
return 0;
|
|
164
|
+
}
|
|
165
|
+
switch (sub) {
|
|
166
|
+
case "apply-profile":
|
|
167
|
+
return cmdApplyProfile(flags);
|
|
168
|
+
case "check":
|
|
169
|
+
return cmdCheck(flags);
|
|
170
|
+
default:
|
|
171
|
+
throw new ValidationError(`Unknown config subcommand: "${sub}". Run "sdtk-spec config --help".`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
module.exports = { cmdConfig };
|
package/src/commands/help.js
CHANGED
|
@@ -17,6 +17,14 @@ function cmdHelp() {
|
|
|
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
|
+
" config Project config helpers: apply a stack profile, check for unfilled placeholders",
|
|
21
|
+
"",
|
|
22
|
+
"Config subcommands:",
|
|
23
|
+
" sdtk-spec config apply-profile <name> [--project-path <path>] [--json]",
|
|
24
|
+
" sdtk-spec config check [--project-path <path>] [--json]",
|
|
25
|
+
" apply-profile merges a profile from sdtk-spec.config.profiles.example.json into",
|
|
26
|
+
" sdtk-spec.config.json (orchestration/stack/commands), preserving docs, schemaVersion,",
|
|
27
|
+
" and stack.detection. check exits 1 while UPDATE_ME placeholders remain — wire it into gates.",
|
|
20
28
|
"",
|
|
21
29
|
"Init options:",
|
|
22
30
|
" --runtime <codex|claude> Runtime adapter (default: codex)",
|
package/src/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const { cmdRuntime } = require("./commands/runtime");
|
|
|
11
11
|
const { cmdUpdate } = require("./commands/update");
|
|
12
12
|
const { cmdAtlas } = require("./commands/atlas");
|
|
13
13
|
const { cmdProject } = require("./commands/project");
|
|
14
|
+
const { cmdConfig } = require("./commands/config");
|
|
14
15
|
const { ValidationError, CliError } = require("./lib/errors");
|
|
15
16
|
|
|
16
17
|
function getVersion() {
|
|
@@ -32,7 +33,7 @@ function parseCommand(argv) {
|
|
|
32
33
|
return { command: first, args: rest };
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const COMMANDS = new Set(["help", "version", "init", "auth", "activate", "entitlement", "generate", "analyze", "runtime", "update", "atlas", "project"]);
|
|
36
|
+
const COMMANDS = new Set(["help", "version", "init", "auth", "activate", "entitlement", "generate", "analyze", "runtime", "update", "atlas", "project", "config"]);
|
|
36
37
|
|
|
37
38
|
async function run(argv) {
|
|
38
39
|
const { command, args } = parseCommand(argv);
|
|
@@ -69,6 +70,8 @@ async function run(argv) {
|
|
|
69
70
|
return cmdAtlas(args);
|
|
70
71
|
case "project":
|
|
71
72
|
return cmdProject(args);
|
|
73
|
+
case "config":
|
|
74
|
+
return cmdConfig(args);
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
|