prizmkit 1.1.57 → 1.1.60
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/bin/create-prizmkit.js +8 -6
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codex/agent-adapter.js +38 -0
- package/bundled/adapters/codex/paths.js +27 -0
- package/bundled/adapters/codex/rules-adapter.js +30 -0
- package/bundled/adapters/codex/settings-adapter.js +27 -0
- package/bundled/adapters/codex/skill-adapter.js +65 -0
- package/bundled/adapters/codex/team-adapter.js +37 -0
- package/bundled/dev-pipeline/.env.example +2 -1
- package/bundled/dev-pipeline/README.md +10 -7
- package/bundled/dev-pipeline/lib/common.sh +278 -37
- package/bundled/dev-pipeline/run-bugfix.sh +10 -61
- package/bundled/dev-pipeline/run-feature.sh +10 -78
- package/bundled/dev-pipeline/run-recovery.sh +10 -46
- package/bundled/dev-pipeline/run-refactor.sh +10 -61
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/utils.py +6 -4
- package/bundled/dev-pipeline-windows/.env.example +28 -0
- package/bundled/dev-pipeline-windows/README.md +30 -0
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
- package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
- package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +26 -18
- package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/feature-planner/SKILL.md +9 -2
- package/bundled/skills/prizmkit-init/SKILL.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
- package/bundled/skills-windows/app-planner/SKILL.md +639 -0
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
- package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
- package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
- package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +68 -0
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
- package/package.json +3 -2
- package/src/clean.js +73 -2
- package/src/config.js +159 -50
- package/src/detect-platform.js +16 -8
- package/src/external-skills.js +26 -19
- package/src/index.js +31 -9
- package/src/manifest.js +6 -2
- package/src/metadata.js +43 -5
- package/src/platforms.js +36 -0
- package/src/prompts.js +31 -6
- package/src/runtimes.js +20 -0
- package/src/scaffold.js +314 -110
- package/src/upgrade.js +81 -41
package/bin/create-prizmkit.js
CHANGED
|
@@ -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
|
|
34
|
+
.option('--platform <platform>', 'Target platform: codebuddy, claude, codex, both, 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,
|
|
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
|
|
93
|
+
.option('--platform <platform>', 'Target platform: codebuddy, claude, codex, both, 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')
|
package/bundled/VERSION.json
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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
|
|
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`)
|
|
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` >
|
|
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 `
|
|
547
|
-
| `PRIZMKIT_PLATFORM` | auto-detect | all shell scripts |
|
|
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. `
|
|
644
|
-
4.
|
|
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
|
|
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.
|