sdtk-spec-kit 0.3.9 → 0.3.10

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 (28) hide show
  1. package/README.md +93 -85
  2. package/assets/manifest/toolkit-bundle.manifest.json +42 -43
  3. package/assets/manifest/toolkit-bundle.sha256.txt +20 -20
  4. package/assets/toolkit/toolkit/AGENTS.md +5 -4
  5. package/assets/toolkit/toolkit/install.ps1 +2 -2
  6. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +2 -2
  7. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +32 -12
  8. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +33 -6
  9. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +4 -0
  10. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +7 -4
  11. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +7 -4
  12. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +14 -5
  13. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +30 -30
  14. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +25 -25
  15. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +4 -2
  16. package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +3 -0
  17. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +1 -1
  18. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +9 -7
  19. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +10 -7
  20. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +3 -0
  21. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +40 -6
  22. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +4 -0
  23. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +5 -0
  24. package/package.json +6 -6
  25. package/src/commands/help.js +105 -97
  26. package/src/commands/init.js +10 -2
  27. package/src/commands/runtime.js +27 -5
  28. package/src/lib/scope.js +19 -4
@@ -15,21 +15,50 @@
15
15
  | Release Decision | TBD (APPROVED / REJECTED) |
16
16
  | Build/Commit | TBD |
17
17
  | Environment | TBD |
18
+ | `CODE_HANDOFF` | `docs/dev/CODE_HANDOFF_{{FEATURE_KEY}}.json` |
19
+ | `OPS_HANDOFF` | `docs/dev/OPS_HANDOFF_{{FEATURE_KEY}}.json` |
20
+ | CODE Evidence | TBD |
21
+ | OPS Evidence | TBD |
18
22
  | Test Case Spec | `docs/qa/{{FEATURE_KEY}}_TEST_CASE.md` (if used) |
19
23
 
20
24
  ---
21
25
 
22
- ## 2. TEST EXECUTION
26
+ Current formal suite flow: `DEV-Code -> DEV-Run -> QA`. Final approval requires both CODE evidence and OPS evidence.
27
+
28
+ ---
29
+
30
+ ## 2. EVIDENCE BRIDGE
31
+
32
+ ### 2.1 CODE EVIDENCE
33
+
34
+ | Evidence Type | Status | Ref / Command | Notes |
35
+ |---------------|--------|---------------|-------|
36
+ | `CODE_HANDOFF` reviewed | TBD | `docs/dev/CODE_HANDOFF_{{FEATURE_KEY}}.json` | |
37
+ | Downstream implementation evidence reviewed | TBD | TBD | |
38
+
39
+ ### 2.2 OPS EVIDENCE
40
+
41
+ | Evidence Type | Status | Ref / Command | Notes |
42
+ |---------------|--------|---------------|-------|
43
+ | `OPS_HANDOFF` reviewed | TBD | `docs/dev/OPS_HANDOFF_{{FEATURE_KEY}}.json` | |
44
+ | Downstream operational evidence reviewed | TBD | TBD | |
45
+
46
+ `OPS_HANDOFF` alone is not sufficient final release evidence. When operationalization is in scope, final QA approval requires both the formal handoff and downstream OPS evidence.
47
+
48
+ ---
49
+
50
+ ## 3. TEST EXECUTION
23
51
 
24
52
  | Test Type | Result | Notes |
25
53
  |-----------|--------|------|
26
54
  | Unit | TBD | |
27
55
  | Integration | TBD | |
28
56
  | E2E | TBD | |
57
+ | OPS Verification | TBD | Required for the current formal suite flow |
29
58
 
30
59
  ---
31
60
 
32
- ## 3. DEFECTS
61
+ ## 4. DEFECTS
33
62
 
34
63
  | ID | Severity | Description | Status |
35
64
  |----|----------|-------------|--------|
@@ -37,7 +66,7 @@
37
66
 
38
67
  ---
39
68
 
40
- ## 4. OPEN QUESTIONS / CLARIFICATIONS
69
+ ## 5. OPEN QUESTIONS / CLARIFICATIONS
41
70
 
42
71
  Use this section when acceptance criteria, expected behavior, or scope is unclear. Escalate to PM; if PM cannot resolve from docs, PM must confirm with the user.
43
72
 
@@ -47,15 +76,20 @@ Use this section when acceptance criteria, expected behavior, or scope is unclea
47
76
 
48
77
  ---
49
78
 
50
- ## 5. RELEASE GATE
79
+ ## 6. RELEASE GATE
51
80
 
81
+ - [ ] `CODE_HANDOFF` reviewed and aligned to tested scope
82
+ - [ ] CODE evidence reviewed and sufficient
83
+ - [ ] `OPS_HANDOFF` reviewed and aligned to tested scope
84
+ - [ ] OPS evidence reviewed and sufficient
85
+ - [ ] Missing required OPS evidence blocks `APPROVED`
52
86
  - [ ] 0 HIGH severity open
53
87
  - [ ] Coverage meets targets
54
88
  - [ ] NFRs met (performance/security)
55
89
 
56
90
  ---
57
91
 
58
- ## 6. HANDOFF
92
+ ## 7. HANDOFF
59
93
 
60
94
  If APPROVED:
61
- `@pm please finalize release status for {{FEATURE_KEY}}`
95
+ `Notify @pm and stakeholders that QA approved {{FEATURE_KEY}}. PM may coordinate closure communication, but QA remains the final release authority for this verdict.`
@@ -10,7 +10,9 @@ Default bridge:
10
10
  ## Required Inputs
11
11
  - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
12
12
  - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
13
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
13
14
  - downstream implementation evidence, normally from SDTK-CODE
15
+ - downstream operational evidence
14
16
  - fresh proving checks used for QA handoff
15
17
 
16
18
  ## Required Outputs
@@ -21,6 +23,8 @@ Default bridge:
21
23
 
22
24
  ## Mandatory Checks
23
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
24
28
  - verification evidence is fresh
25
29
  - known limitations or assumptions are recorded, not hidden
26
30
 
@@ -2,7 +2,10 @@
2
2
 
3
3
  ## Required Inputs
4
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`
5
7
  - downstream implementation evidence, normally from SDTK-CODE
8
+ - downstream operational evidence
6
9
  - fresh proving checks or benchmark-mode evidence
7
10
  - open defect list with severity
8
11
 
@@ -14,6 +17,8 @@
14
17
  ## Mandatory Checks
15
18
  - verdict is backed by fresh command evidence or benchmark policy
16
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
17
22
  - defects and known gaps are visible in the decision
18
23
 
19
24
  ## Forbidden Shortcuts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdtk-spec-kit",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
5
5
  "bin": {
6
6
  "sdtk-spec": "./bin/sdtk.js"
@@ -33,11 +33,11 @@
33
33
  "dockkit"
34
34
  ],
35
35
  "license": "MIT",
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/codexsdtk/sdtk-toolkit.git",
39
- "directory": "distribution/sdtk-cli"
40
- },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/codexsdtk/sdtk-toolkit.git",
39
+ "directory": "products/sdtk-spec/distribution/sdtk-spec-kit"
40
+ },
41
41
  "homepage": "https://agenttoolkits.dev",
42
42
  "bugs": {
43
43
  "url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
@@ -1,101 +1,109 @@
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
- " runtime Manage runtime asset installation (install, uninstall, status)",
13
- " auth Manage GitHub authentication and entitlement",
14
- " generate Scaffold feature documentation from templates (17 files)",
15
- "",
16
- "Init options:",
17
- " --runtime <codex|claude> Runtime adapter (default: codex)",
18
- " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
19
- " --project-path <path> Target project directory (default: cwd)",
20
- " --force Overwrite existing files",
21
- " --skip-runtime-assets Skip runtime asset installation",
22
- " --skip-skills (deprecated, use --skip-runtime-assets)",
23
- " --verbose Show detailed PowerShell script output",
24
- "",
25
- "Runtime subcommands:",
26
- " sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]",
27
- " sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
28
- " sdtk-spec runtime status --runtime <codex|claude>",
29
- "",
30
- "Runtime options:",
31
- " --runtime <codex|claude> Target runtime (required)",
32
- " --scope <project|user> Install scope (default: project for claude, user for codex)",
33
- " --project-path <path> Target project directory (default: cwd)",
34
- " --force Overwrite existing skills",
35
- " --all Uninstall all managed skills",
36
- " --verbose Show detailed script output",
37
- "",
38
- "Scope behavior:",
39
- " project Skills are installed inside the repo (Claude only: .claude/skills/)",
40
- " user Skills are installed in the runtime home (~/.claude/skills/ or ~/.codex/skills/)",
41
- " Note: Codex supports user scope only. Project scope is not available for Codex.",
42
- "",
43
- "Auth options:",
44
- " --token <value> Store GitHub PAT",
45
- " --verify Check private repo access",
46
- " --status Show authentication status",
47
- " --logout Clear stored credentials",
48
- "",
49
- "Generate options:",
50
- " --feature-key <KEY> Feature identifier (UPPER_SNAKE_CASE, required)",
51
- " --feature-name \"<text>\" Human-readable feature name (required)",
52
- " --project-path <path> Target project directory (default: cwd)",
53
- " --force Overwrite existing files",
54
- " --validate-only Validate templates without writing files",
55
- " --verbose Show detailed PowerShell script output",
56
- "",
57
- "Generate behavior:",
58
- " The generate command creates 17 scaffold files with TBD placeholders.",
59
- " Scaffolds define document structure for each SDLC phase.",
60
- " Content is filled in by agents or manually (PM -> BA -> ARCH -> DEV -> QA).",
61
- " Output is written to docs/ subdirectories under the project path.",
62
- "",
63
- "Global options:",
64
- " -h, --help Show this help",
65
- " -v, --version Show version",
66
- "",
67
- "Exit codes:",
68
- " 0 Success",
69
- " 1 Validation or user error",
70
- " 2 Dependency error (e.g., PowerShell not found)",
71
- " 3 Integrity error (payload hash mismatch)",
72
- " 4 Unexpected internal error",
73
- "",
74
- "Environment variables:",
75
- " SDTK_ENTITLEMENT_REPO Override default entitlement repo (owner/repo format)",
76
- "",
77
- "Examples:",
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
+ " runtime Manage runtime asset installation (install, uninstall, status)",
13
+ " auth Manage GitHub authentication and entitlement",
14
+ " generate Scaffold feature documentation from templates (17 files)",
15
+ "",
16
+ "Init options:",
17
+ " --runtime <codex|claude> Runtime adapter (default: codex)",
18
+ " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
19
+ " --project-path <path> Target project directory (default: cwd)",
20
+ " --force Overwrite existing files",
21
+ " --skip-runtime-assets Skip runtime asset installation",
22
+ " --skip-skills (deprecated, use --skip-runtime-assets)",
23
+ " --verbose Show detailed PowerShell script output",
24
+ "",
25
+ "Runtime subcommands:",
26
+ " sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]",
27
+ " sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
28
+ " sdtk-spec runtime status --runtime <codex|claude>",
29
+ "",
30
+ "Runtime options:",
31
+ " --runtime <codex|claude> Target runtime (required)",
32
+ " --scope <project|user> Install scope (default: project for claude, user for codex)",
33
+ " --project-path <path> Target project directory (default: cwd)",
34
+ " --force Overwrite existing skills",
35
+ " --all Uninstall all managed skills",
36
+ " --verbose Show detailed script output",
37
+ "",
38
+ "Scope behavior:",
39
+ " project Claude installs to <project>/.claude/skills and Codex installs to <project>/.codex/skills",
40
+ " user Skills are installed in the runtime home (~/.claude/skills/ or $CODEX_HOME/skills / ~/.codex/skills)",
41
+ " Note: Codex project scope is supported only via the explicit local CODEX_HOME=<project>/.codex contract.",
42
+ " Note: This CLI does not claim native .codex/skills auto-discovery.",
43
+ "",
44
+ "Uninstall behavior:",
45
+ " runtime uninstall removes only SDTK-managed skill folders for the selected runtime/scope.",
46
+ " It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
47
+ " npm uninstall -g sdtk-spec-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
48
+ "",
49
+ "Auth options:",
50
+ " --token <value> Store GitHub PAT",
51
+ " --verify Check private repo access",
52
+ " --status Show authentication status",
53
+ " --logout Clear stored credentials",
54
+ "",
55
+ "Generate options:",
56
+ " --feature-key <KEY> Feature identifier (UPPER_SNAKE_CASE, required)",
57
+ " --feature-name \"<text>\" Human-readable feature name (required)",
58
+ " --project-path <path> Target project directory (default: cwd)",
59
+ " --force Overwrite existing files",
60
+ " --validate-only Validate templates without writing files",
61
+ " --verbose Show detailed PowerShell script output",
62
+ "",
63
+ "Generate behavior:",
64
+ " The generate command creates 17 scaffold files with TBD placeholders.",
65
+ " Scaffolds define document structure for each SDLC phase.",
66
+ " Content is filled in by agents or manually (PM -> BA -> ARCH -> DEV -> QA).",
67
+ " Output is written to docs/ subdirectories under the project path.",
68
+ "",
69
+ "Global options:",
70
+ " -h, --help Show this help",
71
+ " -v, --version Show version",
72
+ "",
73
+ "Exit codes:",
74
+ " 0 Success",
75
+ " 1 Validation or user error",
76
+ " 2 Dependency error (e.g., PowerShell not found)",
77
+ " 3 Integrity error (payload hash mismatch)",
78
+ " 4 Unexpected internal error",
79
+ "",
80
+ "Environment variables:",
81
+ " SDTK_ENTITLEMENT_REPO Override default entitlement repo (owner/repo format)",
82
+ "",
83
+ "Examples:",
78
84
  " sdtk-spec init --runtime codex",
85
+ " sdtk-spec init --runtime codex --runtime-scope project --project-path ./my-project",
79
86
  " sdtk-spec init --runtime claude --project-path ./my-project",
80
- " sdtk-spec auth --token ghp_xxxxxxxxxxxx",
81
- " sdtk-spec auth --verify",
82
- ' sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"',
83
- " sdtk-spec generate --feature-key ORDER_MGMT --feature-name \"Order Management\" --validate-only",
84
- " sdtk-spec init --runtime claude --runtime-scope user",
87
+ " sdtk-spec auth --token ghp_xxxxxxxxxxxx",
88
+ " sdtk-spec auth --verify",
89
+ ' sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"',
90
+ " sdtk-spec generate --feature-key ORDER_MGMT --feature-name \"Order Management\" --validate-only",
91
+ " sdtk-spec init --runtime claude --runtime-scope user",
85
92
  " sdtk-spec runtime install --runtime claude --scope project",
86
93
  " sdtk-spec runtime install --runtime codex --scope user",
87
- " sdtk-spec runtime status --runtime claude",
88
- " sdtk-spec runtime uninstall --runtime claude --scope project --all",
89
- "",
90
- " # Override entitlement repo (bash/zsh):",
91
- " export SDTK_ENTITLEMENT_REPO=owner/repo",
92
- " # Override entitlement repo (PowerShell):",
93
- ' $env:SDTK_ENTITLEMENT_REPO="owner/repo"',
94
- ];
95
- console.log(text.join("\n"));
96
- return 0;
97
- }
98
-
99
- module.exports = {
100
- cmdHelp,
101
- };
94
+ " sdtk-spec runtime install --runtime codex --scope project --project-path ./my-project",
95
+ " sdtk-spec runtime status --runtime claude",
96
+ " sdtk-spec runtime uninstall --runtime claude --scope project --all",
97
+ "",
98
+ " # Override entitlement repo (bash/zsh):",
99
+ " export SDTK_ENTITLEMENT_REPO=owner/repo",
100
+ " # Override entitlement repo (PowerShell):",
101
+ ' $env:SDTK_ENTITLEMENT_REPO="owner/repo"',
102
+ ];
103
+ console.log(text.join("\n"));
104
+ return 0;
105
+ }
106
+
107
+ module.exports = {
108
+ cmdHelp,
109
+ };
@@ -30,10 +30,9 @@ async function cmdInit(args) {
30
30
  const scope = flags["runtime-scope"] || defaultScope(runtime);
31
31
  validateChoice(scope, VALID_SCOPES, "runtime-scope");
32
32
 
33
- // Gate C0: Codex does not support project-local skills
34
33
  if (scope === "project" && !isProjectScopeSupported(runtime)) {
35
34
  throw new ValidationError(
36
- "Codex does not support project-local skills. Use --runtime-scope user instead."
35
+ `${runtime} does not support project-local runtime assets. Use --runtime-scope user instead.`
37
36
  );
38
37
  }
39
38
 
@@ -70,6 +69,11 @@ async function cmdInit(args) {
70
69
  console.log(` Runtime: ${runtime}`);
71
70
  console.log(` Scope: ${scope}`);
72
71
  console.log(` Project: ${projectPath}`);
72
+ if (runtime === "codex" && scope === "project") {
73
+ console.log(` Codex home contract: ${path.join(projectPath, ".codex")}`);
74
+ console.log(" Note: Launch Codex with CODEX_HOME=<project>/.codex to use project-local skills.");
75
+ console.log(" Note: This CLI does not claim native .codex/skills auto-discovery.");
76
+ }
73
77
  console.log("");
74
78
 
75
79
  const result = await runScript(installScript, params, { silent: !flags.verbose });
@@ -85,6 +89,10 @@ async function cmdInit(args) {
85
89
 
86
90
  console.log("");
87
91
  console.log("SDTK-SPEC workspace initialized successfully.");
92
+ if (runtime === "codex" && scope === "project") {
93
+ console.log(`Project-local Codex skills were installed into ${path.join(projectPath, ".codex", "skills")}.`);
94
+ console.log("Launch Codex with CODEX_HOME=<project>/.codex to activate that local runtime home.");
95
+ }
88
96
  console.log("");
89
97
  console.log("Next steps:");
90
98
  console.log(" 1. Review and customize sdtk-spec.config.json for your project stack.");
@@ -10,6 +10,8 @@ const {
10
10
  VALID_SCOPES,
11
11
  defaultScope,
12
12
  isProjectScopeSupported,
13
+ resolveCodexProjectHome,
14
+ resolveCodexUserHome,
13
15
  resolveSkillsDir,
14
16
  managedSkillNames,
15
17
  } = require("../lib/scope");
@@ -29,7 +31,7 @@ const SUBCOMMANDS = ["install", "uninstall", "status"];
29
31
  function validateScopeForRuntime(runtime, scope) {
30
32
  if (scope === "project" && !isProjectScopeSupported(runtime)) {
31
33
  throw new ValidationError(
32
- `Codex does not support project-local skills. Use --scope user instead.`
34
+ `${runtime} does not support project-local runtime assets. Use --scope user instead.`
33
35
  );
34
36
  }
35
37
  }
@@ -55,7 +57,7 @@ async function cmdRuntimeInstall(flags) {
55
57
  const script = resolvePayloadFile(scriptName);
56
58
 
57
59
  const params = { Scope: scope };
58
- if (runtime === "claude") {
60
+ if (scope === "project") {
59
61
  params.ProjectPath = projectPath;
60
62
  }
61
63
  if (flags.force) params.Force = true;
@@ -66,6 +68,11 @@ async function cmdRuntimeInstall(flags) {
66
68
  if (scope === "project") {
67
69
  console.log(` Project: ${projectPath}`);
68
70
  }
71
+ if (runtime === "codex" && scope === "project") {
72
+ console.log(` Codex home contract: ${resolveCodexProjectHome(projectPath)}`);
73
+ console.log(" Note: Launch Codex with CODEX_HOME=<project>/.codex to activate this project-local install.");
74
+ console.log(" Note: Native .codex/skills auto-discovery is not claimed.");
75
+ }
69
76
  console.log("");
70
77
 
71
78
  const result = await runScript(script, params, {
@@ -105,8 +112,8 @@ async function cmdRuntimeUninstall(flags) {
105
112
  const script = resolvePayloadFile(scriptName);
106
113
 
107
114
  const params = {};
108
- if (runtime === "claude") {
109
- params.Scope = scope;
115
+ params.Scope = scope;
116
+ if (scope === "project") {
110
117
  params.ProjectPath = projectPath;
111
118
  }
112
119
  if (flags.all) params.All = true;
@@ -114,6 +121,9 @@ async function cmdRuntimeUninstall(flags) {
114
121
  console.log(`Uninstalling ${runtime} runtime assets...`);
115
122
  console.log(` Runtime: ${runtime}`);
116
123
  console.log(` Scope: ${scope}`);
124
+ if (scope === "project") {
125
+ console.log(` Project: ${projectPath}`);
126
+ }
117
127
  console.log("");
118
128
 
119
129
  const result = await runScript(script, params, {
@@ -144,7 +154,16 @@ function cmdRuntimeStatus(flags) {
144
154
  console.log("");
145
155
 
146
156
  // Check both scopes
147
- const scopes = runtime === "claude" ? ["project", "user"] : ["user"];
157
+ const scopes = ["project", "user"];
158
+
159
+ if (runtime === "codex") {
160
+ console.log("Codex scope truth:");
161
+ console.log(` Project-local root: ${resolveCodexProjectHome(projectPath)}`);
162
+ console.log(` User/global root: ${resolveCodexUserHome()}`);
163
+ console.log(" Project-local Codex support requires launching Codex with CODEX_HOME=<project>/.codex.");
164
+ console.log(" Native .codex/skills auto-discovery is not claimed.");
165
+ console.log("");
166
+ }
148
167
 
149
168
  for (const scope of scopes) {
150
169
  const skillsDir = resolveSkillsDir(runtime, scope, projectPath);
@@ -170,6 +189,9 @@ function cmdRuntimeStatus(flags) {
170
189
 
171
190
  console.log(` Scope: ${scope}`);
172
191
  console.log(` Path: ${skillsDir}`);
192
+ if (runtime === "codex" && scope === "project") {
193
+ console.log(" Activation: explicit CODEX_HOME=<project>/.codex contract required");
194
+ }
173
195
  const statusLabel = !exists
174
196
  ? "not installed"
175
197
  : allInstalled
package/src/lib/scope.js CHANGED
@@ -15,10 +15,23 @@ function defaultScope(runtime) {
15
15
 
16
16
  /**
17
17
  * Returns true if the given runtime supports project-local scope.
18
- * Gate C0: Codex does not support project-local skills.
19
18
  */
20
19
  function isProjectScopeSupported(runtime) {
21
- return runtime === "claude";
20
+ return runtime === "claude" || runtime === "codex";
21
+ }
22
+
23
+ function resolveCodexProjectHome(projectPath) {
24
+ return path.join(projectPath || process.cwd(), ".codex");
25
+ }
26
+
27
+ function resolveCodexUserHome() {
28
+ return process.env.CODEX_HOME || path.join(os.homedir(), ".codex");
29
+ }
30
+
31
+ function resolveCodexHome(scope, projectPath) {
32
+ return scope === "project"
33
+ ? resolveCodexProjectHome(projectPath)
34
+ : resolveCodexUserHome();
22
35
  }
23
36
 
24
37
  /**
@@ -32,8 +45,7 @@ function resolveSkillsDir(runtime, scope, projectPath) {
32
45
  return path.join(projectPath || process.cwd(), ".claude", "skills");
33
46
  }
34
47
 
35
- // Codex: always user/global scope
36
- const codexHome = process.env.CODEX_HOME || path.join(os.homedir(), ".codex");
48
+ const codexHome = resolveCodexHome(scope, projectPath);
37
49
  return path.join(codexHome, "skills");
38
50
  }
39
51
 
@@ -63,6 +75,9 @@ module.exports = {
63
75
  VALID_SCOPES,
64
76
  defaultScope,
65
77
  isProjectScopeSupported,
78
+ resolveCodexHome,
79
+ resolveCodexProjectHome,
80
+ resolveCodexUserHome,
66
81
  resolveSkillsDir,
67
82
  managedSkillNames,
68
83
  };