prizmkit 1.1.58 → 1.1.61

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 (205) hide show
  1. package/bin/create-prizmkit.js +8 -6
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/codex/agent-adapter.js +38 -0
  4. package/bundled/adapters/codex/paths.js +27 -0
  5. package/bundled/adapters/codex/rules-adapter.js +30 -0
  6. package/bundled/adapters/codex/settings-adapter.js +27 -0
  7. package/bundled/adapters/codex/skill-adapter.js +65 -0
  8. package/bundled/adapters/codex/team-adapter.js +37 -0
  9. package/bundled/agents/prizm-dev-team-dev.md +6 -5
  10. package/bundled/dev-pipeline/.env.example +2 -1
  11. package/bundled/dev-pipeline/README.md +10 -7
  12. package/bundled/dev-pipeline/lib/common.sh +278 -37
  13. package/bundled/dev-pipeline/run-bugfix.sh +10 -61
  14. package/bundled/dev-pipeline/run-feature.sh +10 -78
  15. package/bundled/dev-pipeline/run-recovery.sh +10 -46
  16. package/bundled/dev-pipeline/run-refactor.sh +10 -61
  17. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
  18. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
  19. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
  20. package/bundled/dev-pipeline/scripts/utils.py +6 -4
  21. package/bundled/dev-pipeline-windows/.env.example +28 -0
  22. package/bundled/dev-pipeline-windows/README.md +30 -0
  23. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
  24. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
  25. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
  26. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
  27. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
  28. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
  29. package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
  30. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
  31. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
  32. package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
  33. package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
  34. package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
  35. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
  36. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
  37. package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
  38. package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
  39. package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
  40. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
  41. package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
  42. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
  43. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
  44. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
  45. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
  46. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
  47. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
  48. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
  49. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
  50. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
  51. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
  52. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
  53. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
  54. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
  55. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
  56. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
  57. package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
  58. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
  59. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
  60. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
  61. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
  62. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
  63. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
  64. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
  65. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
  66. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
  67. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
  68. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
  69. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
  70. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
  71. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
  72. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
  73. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
  74. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
  75. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
  76. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
  77. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
  78. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
  79. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
  80. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
  81. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
  82. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
  83. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
  84. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
  85. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
  86. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
  87. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
  88. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
  89. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
  90. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
  91. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
  92. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
  93. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
  94. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
  95. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
  96. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
  97. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
  98. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
  99. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
  100. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
  101. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
  102. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
  103. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
  104. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
  105. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
  106. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
  107. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
  108. package/bundled/rules/prizm/prizm-documentation.md +2 -4
  109. package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
  110. package/bundled/skills/_metadata.json +1 -1
  111. package/bundled/skills/app-planner/SKILL.md +24 -16
  112. package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
  113. package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
  114. package/bundled/skills/feature-planner/SKILL.md +9 -2
  115. package/bundled/skills/prizmkit-implement/SKILL.md +1 -0
  116. package/bundled/skills/prizmkit-init/SKILL.md +8 -7
  117. package/bundled/skills/prizmkit-init/references/config-schema.md +3 -1
  118. package/bundled/skills/prizmkit-plan/SKILL.md +2 -0
  119. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +6 -1
  120. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +2 -2
  121. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +2 -1
  122. package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +2 -2
  123. package/bundled/skills/prizmkit-retrospective/SKILL.md +2 -0
  124. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +2 -0
  125. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +2 -0
  126. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
  127. package/bundled/skills-windows/app-planner/SKILL.md +639 -0
  128. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
  129. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
  130. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
  131. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
  132. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
  133. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
  134. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
  135. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
  136. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
  137. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
  138. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
  139. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
  140. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
  141. package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
  142. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
  143. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
  144. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
  145. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
  146. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
  147. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
  148. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
  149. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
  150. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
  151. package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
  152. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
  153. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
  154. package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
  155. package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
  156. package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
  157. package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
  158. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
  159. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
  160. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
  161. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
  162. package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
  163. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
  164. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
  165. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
  166. package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
  167. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
  168. package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
  169. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
  170. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
  171. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
  172. package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
  173. package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
  174. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
  175. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +70 -0
  176. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
  177. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
  178. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
  179. package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
  180. package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
  181. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
  182. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
  183. package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
  184. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
  185. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
  186. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
  187. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
  188. package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
  189. package/bundled/templates/hooks/diff-prizm-docs.sh +1 -1
  190. package/bundled/templates/hooks/prizm-pre-commit.sh +53 -4
  191. package/bundled/templates/hooks/validate-prizm-docs.sh +62 -7
  192. package/bundled/templates/project-memory-template.md +2 -1
  193. package/package.json +3 -2
  194. package/src/clean.js +73 -2
  195. package/src/config.js +167 -50
  196. package/src/detect-platform.js +15 -9
  197. package/src/external-skills.js +26 -19
  198. package/src/index.js +28 -10
  199. package/src/manifest.js +6 -2
  200. package/src/metadata.js +43 -5
  201. package/src/platforms.js +38 -0
  202. package/src/prompts.js +50 -9
  203. package/src/runtimes.js +20 -0
  204. package/src/scaffold.js +447 -114
  205. package/src/upgrade.js +87 -44
@@ -5,10 +5,10 @@
5
5
  *
6
6
  * Usage:
7
7
  * npx prizmkit install .
8
- * npx prizmkit install my-project --platform claude --non-interactive
8
+ * npx prizmkit install my-project --platform claude --runtime unix --non-interactive
9
9
  * npx prizmkit uninstall . --dry-run
10
10
  * npx prizmkit upgrade .
11
- * npx prizmkit config . --platform codebuddy
11
+ * npx prizmkit config . --platform codebuddy --runtime windows
12
12
  */
13
13
 
14
14
  import { readFileSync } from 'fs';
@@ -31,7 +31,8 @@ program
31
31
  program
32
32
  .command('install [directory]')
33
33
  .description('Install PrizmKit into a project directory')
34
- .option('--platform <platform>', 'Target platform: codebuddy, claude, or both')
34
+ .option('--platform <platform>', 'Target platform: codebuddy, claude, codex, or all')
35
+ .option('--runtime <runtime>', 'Runtime assets: unix, windows, or auto')
35
36
  .option('--skills <suite>', 'Skill suite: core, minimal, or recommended:<type> (frontend/backend/fullstack/library)', 'core')
36
37
  .option('--team', 'Enable multi-agent team mode (default: true)')
37
38
  .option('--no-team', 'Disable multi-agent team mode')
@@ -44,7 +45,7 @@ program
44
45
  .option('--open-cli-auto-download', 'Auto-download opencli extension if missing (default: true)')
45
46
  .option('--no-open-cli-auto-download', 'Skip auto-download, show manual steps only')
46
47
  .option('--rules <preset>', 'Rules preset: recommended, minimal, or none', 'recommended')
47
- .option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, claude-internal)')
48
+ .option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, codex)')
48
49
  .option('--external-skills <names>', 'Comma-separated external skill names to install (e.g. find-skills,impeccable)')
49
50
  .option('--non-interactive', 'Skip interactive prompts (requires --platform)')
50
51
  .option('--dry-run', 'Show what would be created without making changes')
@@ -89,10 +90,11 @@ program
89
90
  program
90
91
  .command('config [directory]')
91
92
  .description('Reconfigure existing PrizmKit installation (change platform, skills, rules, options)')
92
- .option('--platform <platform>', 'Target platform: codebuddy, claude, or both')
93
+ .option('--platform <platform>', 'Target platform: codebuddy, claude, codex, or all')
94
+ .option('--runtime <runtime>', 'Runtime assets: unix, windows, or auto')
93
95
  .option('--skills <suite>', 'Skill suite: core, minimal, or recommended:<type>')
94
96
  .option('--rules <preset>', 'Rules preset: recommended, minimal, or none')
95
- .option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude)')
97
+ .option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, codex)')
96
98
  .option('--team', 'Enable multi-agent team mode')
97
99
  .option('--no-team', 'Disable multi-agent team mode')
98
100
  .option('--pipeline', 'Enable dev-pipeline')
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.58",
3
- "bundledAt": "2026-06-07T03:11:13.582Z",
4
- "bundledFrom": "a8dffc3"
2
+ "frameworkVersion": "1.1.61",
3
+ "bundledAt": "2026-06-08T16:20:29.783Z",
4
+ "bundledFrom": "819ffc3"
5
5
  }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Codex Agent Adapter
3
+ *
4
+ * Converts core/ agent definitions to native Codex TOML subagent files.
5
+ */
6
+
7
+ import { mkdirSync } from 'node:fs';
8
+ import { readFile, writeFile } from 'node:fs/promises';
9
+ import path from 'path';
10
+ import { parseFrontmatter } from '../shared/frontmatter.js';
11
+
12
+ function toTomlString(value) {
13
+ return JSON.stringify(String(value ?? ''));
14
+ }
15
+
16
+ export function convertAgent(agentContent, options = {}) {
17
+ const { frontmatter, body } = parseFrontmatter(agentContent);
18
+ const name = frontmatter.name || options.name || 'prizmkit-agent';
19
+ const description = frontmatter.description || `${name} PrizmKit subagent`;
20
+ const developerInstructions = body.trimEnd();
21
+
22
+ return [
23
+ `name = ${toTomlString(name)}`,
24
+ `description = ${toTomlString(description)}`,
25
+ `developer_instructions = ${toTomlString(developerInstructions)}`,
26
+ '',
27
+ ].join('\n');
28
+ }
29
+
30
+ export async function installAgent(corePath, targetRoot) {
31
+ const baseName = path.basename(corePath, path.extname(corePath));
32
+ const filename = `${baseName}.toml`;
33
+ const targetDir = path.join(targetRoot, '.codex', 'agents');
34
+ mkdirSync(targetDir, { recursive: true });
35
+
36
+ const content = await readFile(corePath, 'utf8');
37
+ await writeFile(path.join(targetDir, filename), convertAgent(content, { name: baseName }));
38
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Codex platform path constants and conventions.
3
+ */
4
+
5
+ export const PLATFORM_ID = 'codex';
6
+ export const CLI_COMMAND = 'codex';
7
+
8
+ // Project-level paths (relative to project root)
9
+ export const SKILLS_DIR = '.agents/skills';
10
+ export const AGENTS_DIR = '.codex/agents';
11
+ export const RULES_DIR = '.agents/rules';
12
+ export const SETTINGS_FILE = '.codex/config.toml';
13
+ export const PROJECT_MEMORY_FILE = 'AGENTS.md';
14
+
15
+ // Skill file conventions
16
+ export const SKILL_DEFINITION_FILE = 'SKILL.md';
17
+ export const SKILL_DIR_VAR = '${SKILL_DIR}';
18
+
19
+ // Agent definition format
20
+ export const AGENT_FILE_EXT = '.toml';
21
+
22
+ // CLI flags
23
+ export const CLI_FLAGS = {
24
+ nonInteractive: 'exec',
25
+ approvalNever: '--ask-for-approval never',
26
+ sandboxFullAccess: '--sandbox danger-full-access',
27
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Codex Rules Adapter
3
+ *
4
+ * PrizmKit rules are behavioral Markdown guidance, not Codex execpolicy
5
+ * .rules files. Install them as project-local guidance resources and point
6
+ * AGENTS.md to this directory.
7
+ */
8
+
9
+ import { mkdirSync, rmSync } from 'node:fs';
10
+ import { writeFile } from 'node:fs/promises';
11
+ import path from 'path';
12
+
13
+ export const CODEX_RULES_DIR = '.agents/rules';
14
+
15
+ export async function installRules(targetRoot, ruleFiles) {
16
+ const rulesDir = path.join(targetRoot, CODEX_RULES_DIR);
17
+ mkdirSync(rulesDir, { recursive: true });
18
+
19
+ for (const rule of ruleFiles) {
20
+ const baseName = rule.name.includes('/') ? rule.name.split('/').pop() : rule.name;
21
+ await writeFile(path.join(rulesDir, `${baseName}.md`), rule.content);
22
+ }
23
+ }
24
+
25
+ export function removeLegacyCodexRules(targetRoot, ruleFileNames) {
26
+ const legacyRulesDir = path.join(targetRoot, '.codex', 'rules');
27
+ for (const fileName of ruleFileNames) {
28
+ rmSync(path.join(legacyRulesDir, path.basename(fileName)), { force: true });
29
+ }
30
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Codex Settings Adapter
3
+ *
4
+ * Writes native Codex project configuration for PrizmKit installs.
5
+ */
6
+
7
+ import { mkdirSync, rmSync } from 'node:fs';
8
+ import { writeFile } from 'node:fs/promises';
9
+ import path from 'path';
10
+
11
+ export async function generateSettings(targetRoot) {
12
+ const configPath = path.join(targetRoot, '.codex', 'config.toml');
13
+ mkdirSync(path.dirname(configPath), { recursive: true });
14
+
15
+ const configToml = `# Generated by PrizmKit for Codex CLI project configuration.
16
+ # Keep project guidance in AGENTS.md; repository skills in .agents/skills/;
17
+ # PrizmKit behavioral rules live in .agents/rules/; native Codex subagents live in .codex/agents/.
18
+
19
+ project_doc_fallback_filenames = ["CLAUDE.md", "CODEBUDDY.md"]
20
+
21
+ [agents]
22
+ max_depth = 1
23
+ `;
24
+
25
+ await writeFile(configPath, configToml);
26
+ rmSync(path.join(targetRoot, '.codex', 'prizmkit-settings.json'), { force: true });
27
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Codex Skill Adapter
3
+ *
4
+ * Codex discovers repository skills from .agents/skills in the current
5
+ * directory and parent directories up to the repository root. Project-scoped
6
+ * PrizmKit installs therefore write Codex skills to .agents/skills/.
7
+ */
8
+
9
+ import { parseFrontmatter, buildMarkdown } from '../shared/frontmatter.js';
10
+ import { SKILL_DEFINITION_FILE } from './paths.js';
11
+ import { existsSync, mkdirSync, cpSync, readdirSync } from 'node:fs';
12
+ import { readFile, writeFile } from 'node:fs/promises';
13
+ import path from 'path';
14
+
15
+ function toCodexSkillReference(commandName) {
16
+ return `PrizmKit skill \`${commandName}\` (\`.agents/skills/${commandName}/SKILL.md\`)`;
17
+ }
18
+
19
+ export function convertSkill(skillContent, skillName) {
20
+ const { frontmatter, body } = parseFrontmatter(skillContent);
21
+
22
+ if (!frontmatter.name) frontmatter.name = skillName;
23
+
24
+ let convertedBody = body.replace(
25
+ /\$\{SKILL_DIR\}/g,
26
+ `.agents/skills/${skillName}`
27
+ );
28
+
29
+ convertedBody = convertedBody.replace(
30
+ /prizmkit\.(\w+)/g,
31
+ (_match, sub) => {
32
+ const commandName = `prizmkit-${sub.replace(/_/g, '-')}`;
33
+ return toCodexSkillReference(commandName);
34
+ }
35
+ );
36
+
37
+ const codexNote = `> Codex project install: when instructions mention a PrizmKit slash command such as \`/prizmkit-plan\`, read and execute the matching project skill at \`.agents/skills/prizmkit-plan/SKILL.md\`.\n\n`;
38
+
39
+ return buildMarkdown(frontmatter, codexNote + convertedBody);
40
+ }
41
+
42
+ export async function installSkill(corePath, targetRoot) {
43
+ const skillName = path.basename(corePath);
44
+ const targetDir = path.join(targetRoot, '.agents', 'skills', skillName);
45
+ mkdirSync(targetDir, { recursive: true });
46
+
47
+ const skillMdPath = path.join(corePath, SKILL_DEFINITION_FILE);
48
+ if (existsSync(skillMdPath)) {
49
+ const content = await readFile(skillMdPath, 'utf8');
50
+ const converted = convertSkill(content, skillName);
51
+ await writeFile(path.join(targetDir, SKILL_DEFINITION_FILE), converted);
52
+ }
53
+
54
+ if (existsSync(corePath)) {
55
+ for (const entry of readdirSync(corePath, { withFileTypes: true })) {
56
+ if (entry.isDirectory()) {
57
+ cpSync(
58
+ path.join(corePath, entry.name),
59
+ path.join(targetDir, entry.name),
60
+ { recursive: true }
61
+ );
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Codex Team Adapter
3
+ *
4
+ * Codex does not require a separate team registry for PrizmKit. The team
5
+ * topology is installed as project metadata and referenced by AGENTS.md and
6
+ * pipeline prompts.
7
+ */
8
+
9
+ import { mkdirSync } from 'node:fs';
10
+ import { writeFile } from 'node:fs/promises';
11
+ import path from 'path';
12
+
13
+ export async function installTeam(teamDef, targetRoot) {
14
+ const codexDir = path.join(targetRoot, '.codex');
15
+ mkdirSync(codexDir, { recursive: true });
16
+
17
+ const teamInfo = {
18
+ name: teamDef.name,
19
+ description: teamDef.description,
20
+ platform: 'codex',
21
+ orchestrationMode: 'codex-subagents',
22
+ agents: teamDef.members
23
+ .filter(m => m.role !== 'lead')
24
+ .map(m => ({
25
+ name: m.name,
26
+ role: m.role,
27
+ agentFile: `.codex/agents/${m.agentDefinition}.toml`,
28
+ prompt: m.prompt,
29
+ subscriptions: m.subscriptions || [],
30
+ })),
31
+ };
32
+
33
+ await writeFile(
34
+ path.join(codexDir, 'team-info.json'),
35
+ JSON.stringify(teamInfo, null, 2)
36
+ );
37
+ }
@@ -48,8 +48,8 @@ If the snapshot does not exist:
48
48
  8. Checkpoint tasks must verify that build and tests pass before proceeding to the next phase
49
49
  9. Execute sequential tasks in order; stop on failure. Parallel `[P]` tasks may continue
50
50
  10. When creating a new sub-module, generate the corresponding `.prizmkit/prizm-docs/` L2 document. **Batch independent operations**: combine multiple `mkdir -p` into one command; issue multiple independent `Write` calls for different `.prizmkit/prizm-docs/` files in a single message turn (they have no dependencies between them).
51
- 11. **`.prizmkit/prizm-docs/` write safety**: Before writing ANY `.prizmkit/prizm-docs/` file, check if it already exists (`ls <path>`). If it **exists**: only append or update structural fields (KEY_FILES, INTERFACES, DEPENDENCIES, file counts, UPDATED date) — **never overwrite the full file**. DECISIONS and CHANGELOG sections are **append-only** never delete or replace existing entries. If it does **not** exist: create it only for sub-modules you are actively creating in this session. Do NOT write `.prizmkit/prizm-docs/` files for modules you are not directly creating.
52
- 11. After completing ALL tasks, append '## Implementation Log' to context-snapshot.md: files changed/created, key decisions, notable discoveries
51
+ 11. **`.prizmkit/prizm-docs/` write safety**: Before writing ANY `.prizmkit/prizm-docs/` file, check if it already exists (`ls <path>`). If it **exists**: update only durable structural/knowledge fields (KEY_FILES, INTERFACES, DEPENDENCIES, file counts, RULES, TRAPS, DECISIONS) — **never overwrite the full file**. Do not add CHANGELOG, UPDATED/date fields, Bug IDs, feature IDs, refactor IDs, task IDs, session IDs, run IDs, pipeline IDs, workflow IDs, branch names, absolute worktree paths, pipeline artifact paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths. If a durable fact changes, update the existing section in place. If the file does **not** exist: create it only for sub-modules you are actively creating in this session. Do NOT write `.prizmkit/prizm-docs/` files for modules you are not directly creating.
52
+ 12. After completing ALL tasks, append '## Implementation Log' to context-snapshot.md: files changed/created, key decisions, notable discoveries
53
53
 
54
54
  ### Never Do (NEVER)
55
55
 
@@ -59,7 +59,8 @@ If the snapshot does not exist:
59
59
  - **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited — the Orchestrator handles commits via /prizmkit-committer)
60
60
  - Do not modify any files in `.prizmkit/specs/` except `plan.md` (marking Tasks [x]) and `context-snapshot.md` (appending Implementation Log)
61
61
  - Do not use TaskCreate/TaskUpdate to create or modify Orchestrator-level tasks (Task tools are for internal progress tracking only, and task IDs are not shared across agent sub-sessions)
62
- - **Do not overwrite existing `.prizmkit/prizm-docs/` files in full** — if a doc already exists, only update structural fields; never replace the entire file. Do NOT write `.prizmkit/prizm-docs/` entries for modules you are not actively creating in this session.
62
+ - **Do not overwrite existing `.prizmkit/prizm-docs/` files in full** — if a doc already exists, only update the affected durable fields; never replace the entire file. Do NOT write `.prizmkit/prizm-docs/` entries for modules you are not actively creating in this session.
63
+ - **Do not leak internal PrizmKit metadata into product surfaces or memory docs** — feature IDs (`F-001`), bug/refactor IDs, task IDs, session IDs, run IDs, pipeline IDs, workflow IDs, branch names, absolute worktree paths, pipeline artifact paths, and `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths must not appear in `.prizmkit/prizm-docs/`, user-visible UI copy, API responses, emails, notifications, or tests that assert visible product text.
63
64
 
64
65
  ### Behavioral Rules
65
66
 
@@ -83,7 +84,8 @@ DEV-15: After ALL tasks, append '## Implementation Log' to context-snapshot.md (
83
84
  DEV-16: Without context-snapshot: read .prizmkit/prizm-docs/ → read source files directly
84
85
  DEV-17: DO NOT re-read source files already listed in context-snapshot.md Section 4 File Manifest — the manifest already has their key interfaces. Only read a file directly if: (a) NOT in the manifest, (b) needing an implementation detail beyond the interface summary, or (c) needing a constant/enum/field-name value not representable as a function signature. Unnecessary re-reads waste significant context budget.
85
86
  DEV-18: When tests fail, run `$TEST_CMD 2>&1 | tee /tmp/test-out.txt` ONCE, then grep `/tmp/test-out.txt` for failure details. Never re-run the full test suite just to apply a different grep filter to its output.
86
- DEV-19: Before writing any `.prizmkit/prizm-docs/` file, check if it exists. If it exists: only update structural fields (KEY_FILES, INTERFACES, DEPENDENCIES, file counts, UPDATED) — never overwrite the full file. DECISIONS/CHANGELOG are append-only. Only create new L2 docs for sub-modules you are actively creating in this session.
87
+ DEV-19: Before writing any `.prizmkit/prizm-docs/` file, check if it exists. If it exists: only update durable fields (KEY_FILES, INTERFACES, DEPENDENCIES, file counts, RULES, TRAPS, DECISIONS) — never overwrite the full file. Never add CHANGELOG, UPDATED/date fields, or workflow metadata. Only create new L2 docs for sub-modules you are actively creating in this session.
88
+ DEV-20: Internal tracking IDs are not product copy. Before writing UI text or UI-copy assertions, translate references like `F-003 guard` into product-language behavior such as `the high-risk guard`. Add regression coverage when a feature touches user-visible text.
87
89
  ```
88
90
 
89
91
  ### Workflow
@@ -121,4 +123,3 @@ Direct communication between Agents is allowed, but key messages and conclusions
121
123
  - Send COMPLETION_SIGNAL to indicate all tasks are complete
122
124
  - Send ESCALATION to report interface ambiguities or task blockers
123
125
  - Receive TASK_ASSIGNMENT to get assigned work
124
-
@@ -16,7 +16,8 @@
16
16
  # Unset or any other value = normal production mode
17
17
 
18
18
  # ─── AI CLI ───────────────────────────────────────────────────────────
19
- # AI_CLI=claude # AI CLI command (auto-detected from PATH: claude > cbc)
19
+ # AI_CLI=claude # AI CLI command. If unset, PrizmKit prefers the installed
20
+ # project platform, then PATH fallback: claude > cbc > codex
20
21
  # MODEL= # AI model override (e.g. claude-sonnet-4-20250514)
21
22
  # Per-task model in *-list.json overrides this
22
23
 
@@ -6,7 +6,7 @@ Autonomous development pipeline that drives the `prizm-dev-team` multi-agent tea
6
6
 
7
7
  - Python 3.8+
8
8
  - [jq](https://jqlang.github.io/jq/) (`brew install jq`)
9
- - AI CLI in PATH: CodeBuddy (`cbc`) or Claude Code (`claude`)
9
+ - AI CLI in PATH: CodeBuddy (`cbc`), Claude Code (`claude`), or Codex (`codex`)
10
10
  - `.prizmkit/plans/feature-list.json` generated by the `feature-planner` skill (for feature pipeline)
11
11
  - `.prizmkit/plans/bug-fix-list.json` generated by the `bug-planner` skill (for bug pipeline)
12
12
 
@@ -502,7 +502,7 @@ Sourced by daemon and runner scripts. Provides:
502
502
 
503
503
  | Function | Description |
504
504
  |----------|-------------|
505
- | `prizm_detect_cli_and_platform()` | Sets `CLI_CMD` and `PLATFORM`. Priority: `AI_CLI` env > `config.json` > `CODEBUDDY_CLI` > auto-detect |
505
+ | `prizm_detect_cli_and_platform()` | Sets `CLI_CMD` and `PLATFORM`. Priority: `AI_CLI` env > `config.json` `ai_cli` > manifest/config platform > `CODEBUDDY_CLI` > installed PrizmKit artifacts > PATH |
506
506
  | `prizm_check_common_dependencies(cli_cmd)` | Verifies jq, python3, and CLI are installed |
507
507
 
508
508
  Also exports: `log_info`, `log_warn`, `log_error`, `log_success` (with timestamps), and color constants.
@@ -543,8 +543,8 @@ Also exports: `log_info`, `log_warn`, `log_error`, `log_success` (with timestamp
543
543
 
544
544
  | Variable | Default | Used By | Description |
545
545
  |----------|---------|---------|-------------|
546
- | `AI_CLI` | auto-detect | all shell scripts | AI CLI command name. Auto-detects `cbc` or `claude` |
547
- | `PRIZMKIT_PLATFORM` | auto-detect | all shell scripts | Force platform: `codebuddy` or `claude` |
546
+ | `AI_CLI` | auto-detect | all shell scripts | AI CLI command name. Auto-detects `cbc`, `claude`, or `codex` |
547
+ | `PRIZMKIT_PLATFORM` | auto-detect | all shell scripts | Platform hint for custom/wrapped AI CLI commands: `codebuddy`, `claude`, or `codex` |
548
548
  | `MODEL` | (none) | run-feature.sh, run-bugfix.sh | AI model fallback. Overridden by per-feature `model` field. See [Model Selection](#model-selection) |
549
549
  | `CODEBUDDY_CLI` | (deprecated) | all shell scripts | Legacy alias for `AI_CLI`. Prefer `AI_CLI` |
550
550
  | `VERBOSE` | `0` | run-feature.sh | Set to `1` to enable `--verbose` on AI CLI |
@@ -640,8 +640,10 @@ The pipeline auto-detects which AI CLI to use. Detection priority:
640
640
 
641
641
  1. `AI_CLI` environment variable (highest)
642
642
  2. `.prizmkit/config.json` → `ai_cli` field
643
- 3. `CODEBUDDY_CLI` environment variable (legacy)
644
- 4. Auto-detect: `cbc` in PATH → `claude` in PATH (lowest)
643
+ 3. `.prizmkit/manifest.json` or `.prizmkit/config.json` `platform` field
644
+ 4. `CODEBUDDY_CLI` environment variable (legacy)
645
+ 5. Installed PrizmKit platform artifacts
646
+ 6. PATH fallback: `claude` → `cbc` → `codex`
645
647
 
646
648
  To permanently configure, create `.prizmkit/config.json`:
647
649
 
@@ -683,6 +685,7 @@ run-feature.sh main loop
683
685
  |
684
686
  +- AI CLI session # claude -p "$(cat prompt)" --dangerously-skip-permissions
685
687
  | | # cbc --print -y < prompt
688
+ | | # codex --ask-for-approval never --sandbox danger-full-access exec --cd "$PROJECT_ROOT" --skip-git-repo-check - < prompt
686
689
  | +- prizm-dev-team # Multi-agent team implements the feature
687
690
  | +- Orchestrator # Main: init, context, plan, retrospective, commit
688
691
  | +- Dev x N # Implementation with TDD
@@ -946,7 +949,7 @@ Uses a background process + watchdog pattern instead of GNU `timeout`:
946
949
  Check `set -e` interactions. All python invocations in the main loop should have `|| true` guards.
947
950
 
948
951
  ### Session log is empty
949
- Verify CLI is functional: `claude -p "test" --dangerously-skip-permissions` or `echo "test" | cbc --print -y`
952
+ Verify CLI is functional: `claude -p "test" --dangerously-skip-permissions`, `echo "test" | cbc --print -y`, or `echo "test" | codex --ask-for-approval never --sandbox danger-full-access exec --skip-git-repo-check -`
950
953
 
951
954
  ### "PIPELINE_BLOCKED" loops
952
955
  All remaining features have unmet dependencies. Use `./run-feature.sh status` to find the blocking feature, then reset or manually complete it.