prizmkit 1.1.119 → 1.1.121
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 +1 -5
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +41 -38
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +76 -0
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +2 -8
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +23 -25
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +8 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +10 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +88 -32
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +28 -6
- package/bundled/dev-pipeline/scripts/continuation.py +51 -6
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +60 -102
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +1 -19
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +1 -19
- package/bundled/dev-pipeline/scripts/{init-dev-team.py → init-change-artifact.py} +6 -16
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +364 -76
- package/bundled/dev-pipeline/scripts/update-bug-status.py +57 -14
- package/bundled/dev-pipeline/scripts/update-feature-status.py +54 -5
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +57 -14
- package/bundled/dev-pipeline/scripts/utils.py +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -11
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +2 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +6 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +6 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +4 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +5 -3
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +20 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/tests/test_auto_skip.py +5 -5
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +214 -144
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -12
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +11 -14
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +235 -32
- package/bundled/dev-pipeline/tests/test_unified_cli.py +219 -16
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +2 -2
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -3
- package/bundled/skills/prizmkit-code-review/SKILL.md +50 -47
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +13 -8
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +47 -33
- package/bundled/skills/prizmkit-code-review/references/reviewer-workspace-protocol.md +90 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +21 -1
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +67 -0
- package/bundled/skills/prizmkit-test/SKILL.md +159 -155
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +420 -0
- package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +116 -0
- package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +112 -0
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +97 -0
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +76 -192
- package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +65 -0
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +194 -0
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +78 -0
- package/bundled/skills/prizmkit-test/references/examples.md +65 -108
- package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +10 -7
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +90 -82
- package/bundled/skills/prizmkit-test/references/test-report-template.md +77 -98
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +97 -0
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +723 -0
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +1426 -0
- package/package.json +1 -1
- package/src/clean.js +12 -8
- package/src/config.js +24 -42
- package/src/index.js +1 -10
- package/src/manifest.js +3 -9
- package/src/metadata.js +0 -26
- package/src/prompts.js +0 -13
- package/src/scaffold.js +76 -201
- package/src/upgrade.js +16 -33
- package/bundled/adapters/claude/agent-adapter.js +0 -96
- package/bundled/adapters/claude/team-adapter.js +0 -183
- package/bundled/adapters/codebuddy/agent-adapter.js +0 -42
- package/bundled/adapters/codebuddy/team-adapter.js +0 -46
- package/bundled/adapters/codex/agent-adapter.js +0 -38
- package/bundled/adapters/codex/team-adapter.js +0 -37
- package/bundled/agents/prizm-dev-team-dev.md +0 -123
- package/bundled/agents/prizm-dev-team-reviewer.md +0 -113
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +0 -65
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +0 -436
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -510
- package/bundled/skills/prizmkit-test/scripts/validate_boundary_report.py +0 -347
- package/bundled/team/prizm-dev-team.json +0 -27
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code Team Adapter
|
|
3
|
-
*
|
|
4
|
-
* 支持 Claude Code 原生 Agent Teams 系统。
|
|
5
|
-
* 通过环境变量 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 启用原生团队模式。
|
|
6
|
-
*
|
|
7
|
-
* 两种模式:
|
|
8
|
-
* 1. 原生 Agent Teams 模式 (推荐): 使用 SendMessage 实现 teammate 间多向通信
|
|
9
|
-
* 2. Subagent 模式 (兜底): 通过 Task 工具由 Coordinator 单向编排
|
|
10
|
-
*
|
|
11
|
-
* 原生 Agent Teams 的核心机制:
|
|
12
|
-
* - 每个 agent 作为 teammate 持续运行
|
|
13
|
-
* - 通过 SendMessage 工具实现点对点、广播通信
|
|
14
|
-
* - 共享任务目录 ~/.claude/tasks/{team-name}/
|
|
15
|
-
* - 支持 shutdown 消息终止 teammate
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { mkdirSync } from 'node:fs';
|
|
19
|
-
import { writeFile } from 'node:fs/promises';
|
|
20
|
-
import path from 'path';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 检测是否启用了原生 Agent Teams 模式
|
|
24
|
-
* @returns {boolean}
|
|
25
|
-
*/
|
|
26
|
-
export function isNativeTeamsEnabled() {
|
|
27
|
-
return process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS === '1';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 生成原生 Agent Teams 配置
|
|
32
|
-
* 当 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 时使用此模式
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} teamDef - 平台无关的团队定义 (core/team/*.json)
|
|
35
|
-
* @param {string} targetRoot - 目标项目根目录
|
|
36
|
-
*/
|
|
37
|
-
async function installNativeTeam(teamDef, targetRoot) {
|
|
38
|
-
const claudeDir = path.join(targetRoot, '.claude');
|
|
39
|
-
mkdirSync(claudeDir, { recursive: true });
|
|
40
|
-
|
|
41
|
-
// 构建原生 Agent Teams 配置
|
|
42
|
-
const teamConfig = {
|
|
43
|
-
name: teamDef.name,
|
|
44
|
-
description: teamDef.description,
|
|
45
|
-
platform: 'claude',
|
|
46
|
-
orchestrationMode: 'native-agent-teams',
|
|
47
|
-
envVar: 'CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1',
|
|
48
|
-
teammates: teamDef.members.map(m => ({
|
|
49
|
-
name: m.name,
|
|
50
|
-
role: m.role,
|
|
51
|
-
agentFile: `.claude/agents/${m.agentDefinition}.md`,
|
|
52
|
-
prompt: m.prompt || '',
|
|
53
|
-
subscriptions: m.subscriptions || [],
|
|
54
|
-
})),
|
|
55
|
-
communication: {
|
|
56
|
-
protocol: 'SendMessage',
|
|
57
|
-
modes: ['point-to-point', 'broadcast', 'shutdown'],
|
|
58
|
-
messageTypes: [
|
|
59
|
-
'STATUS_UPDATE',
|
|
60
|
-
'COMPLETION_SIGNAL',
|
|
61
|
-
'ISSUE_REPORT',
|
|
62
|
-
'ESCALATION',
|
|
63
|
-
'HEARTBEAT_CHECK',
|
|
64
|
-
'TASK_ASSIGNMENT',
|
|
65
|
-
],
|
|
66
|
-
routing: 'mesh',
|
|
67
|
-
note: 'Teammates 之间可直接通信 (SendMessage),关键消息同时通知 Coordinator。',
|
|
68
|
-
},
|
|
69
|
-
sharedTaskDir: `~/.claude/tasks/${teamDef.name}/`,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
await writeFile(
|
|
73
|
-
path.join(claudeDir, 'team-info.json'),
|
|
74
|
-
JSON.stringify(teamConfig, null, 2)
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
// 生成 Agent Teams 使用说明
|
|
78
|
-
const teamGuide = `# ${teamDef.name} — Agent Teams 配置
|
|
79
|
-
|
|
80
|
-
## 启用方式
|
|
81
|
-
|
|
82
|
-
\`\`\`bash
|
|
83
|
-
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
|
|
84
|
-
\`\`\`
|
|
85
|
-
|
|
86
|
-
## 团队成员
|
|
87
|
-
|
|
88
|
-
| 名称 | 角色 | Agent 文件 |
|
|
89
|
-
|------|------|-----------|
|
|
90
|
-
${teamDef.members.map(m => `| ${m.name} | ${m.role} | \`.claude/agents/${m.agentDefinition}.md\` |`).join('\n')}
|
|
91
|
-
|
|
92
|
-
## 通信机制
|
|
93
|
-
|
|
94
|
-
原生 Agent Teams 使用 **SendMessage** 工具实现 teammate 间通信:
|
|
95
|
-
|
|
96
|
-
- **点对点**: \`SendMessage(to: "pm", message: "...")\`
|
|
97
|
-
- **广播**: \`SendMessage(to: "*", message: "...")\`
|
|
98
|
-
- **终止**: \`SendMessage(to: "dev", type: "shutdown")\`
|
|
99
|
-
|
|
100
|
-
## 消息类型
|
|
101
|
-
|
|
102
|
-
- \`STATUS_UPDATE\` — Agent 汇报状态变化
|
|
103
|
-
- \`COMPLETION_SIGNAL\` — Agent 完成任务通知
|
|
104
|
-
- \`ISSUE_REPORT\` — Agent 报告问题
|
|
105
|
-
- \`ESCALATION\` — Agent 请求升级处理
|
|
106
|
-
- \`HEARTBEAT_CHECK\` — 检查 Agent 存活
|
|
107
|
-
- \`TASK_ASSIGNMENT\` — 任务分配指令
|
|
108
|
-
|
|
109
|
-
## 与 Subagent 模式的区别
|
|
110
|
-
|
|
111
|
-
| 维度 | Subagent 模式 | 原生 Agent Teams |
|
|
112
|
-
|------|---------------|-----------------|
|
|
113
|
-
| 通信方式 | Coordinator 通过 Task 单向 spawn | SendMessage 多向通信 |
|
|
114
|
-
| Agent 生命周期 | 完成即消亡 | 持续运行 |
|
|
115
|
-
| 协作模式 | 星型 (Coordinator 中心) | 网状 (任意 teammate 间) |
|
|
116
|
-
| 共享状态 | 无 | ~/.claude/tasks/${teamDef.name}/ |
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
await writeFile(
|
|
120
|
-
path.join(claudeDir, 'team-guide.md'),
|
|
121
|
-
teamGuide
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* 生成 Subagent 模式配置 (兜底)
|
|
127
|
-
* 当未启用 Agent Teams 时使用此模式
|
|
128
|
-
*
|
|
129
|
-
* @param {Object} teamDef - 平台无关的团队定义
|
|
130
|
-
* @param {string} targetRoot - 目标项目根目录
|
|
131
|
-
*/
|
|
132
|
-
async function installSubagentTeam(teamDef, targetRoot) {
|
|
133
|
-
const claudeDir = path.join(targetRoot, '.claude');
|
|
134
|
-
mkdirSync(claudeDir, { recursive: true });
|
|
135
|
-
|
|
136
|
-
const teamInfo = {
|
|
137
|
-
name: teamDef.name,
|
|
138
|
-
description: teamDef.description,
|
|
139
|
-
platform: 'claude',
|
|
140
|
-
orchestrationMode: 'subagent',
|
|
141
|
-
note: 'Subagent 兜底模式。如需启用原生 Agent Teams,设置 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 后重新安装。',
|
|
142
|
-
agents: teamDef.members
|
|
143
|
-
.filter(m => m.role !== 'lead')
|
|
144
|
-
.map(m => ({
|
|
145
|
-
name: m.name,
|
|
146
|
-
role: m.role,
|
|
147
|
-
agentFile: `.claude/agents/${m.agentDefinition}.md`,
|
|
148
|
-
prompt: m.prompt,
|
|
149
|
-
})),
|
|
150
|
-
upgrade: {
|
|
151
|
-
envVar: 'CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS',
|
|
152
|
-
command: 'npx prizmkit init # 重新安装以启用原生 Agent Teams',
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
await writeFile(
|
|
157
|
-
path.join(claudeDir, 'team-info.json'),
|
|
158
|
-
JSON.stringify(teamInfo, null, 2)
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* 安装团队配置到目标项目。
|
|
164
|
-
* 自动检测环境变量决定使用原生 Agent Teams 或 Subagent 模式。
|
|
165
|
-
*
|
|
166
|
-
* @param {Object} teamDef - 平台无关的团队定义
|
|
167
|
-
* @param {string} targetRoot - 目标项目根目录
|
|
168
|
-
* @returns {Promise<{ mode: string }>} - 安装的模式
|
|
169
|
-
*/
|
|
170
|
-
export async function installTeam(teamDef, targetRoot) {
|
|
171
|
-
const nativeMode = isNativeTeamsEnabled();
|
|
172
|
-
|
|
173
|
-
if (nativeMode) {
|
|
174
|
-
console.log(' ✓ Agent Teams 模式: 原生 (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)');
|
|
175
|
-
await installNativeTeam(teamDef, targetRoot);
|
|
176
|
-
return { mode: 'native-agent-teams' };
|
|
177
|
-
} else {
|
|
178
|
-
console.log(' ✓ Agent Teams 模式: Subagent (兜底模式)');
|
|
179
|
-
console.log(' 提示: 设置 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 可启用原生 Agent Teams');
|
|
180
|
-
await installSubagentTeam(teamDef, targetRoot);
|
|
181
|
-
return { mode: 'subagent' };
|
|
182
|
-
}
|
|
183
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CodeBuddy Agent Adapter
|
|
3
|
-
* Converts core/ agent definitions to .codebuddy/agents/ format.
|
|
4
|
-
* For CodeBuddy, this is mostly pass-through as the core format matches.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { existsSync, mkdirSync } from 'node:fs';
|
|
8
|
-
import { readFile, writeFile, symlink } from 'node:fs/promises';
|
|
9
|
-
import path from 'path';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Convert a core agent definition to CodeBuddy format.
|
|
13
|
-
* @param {string} agentContent - Content of the core agent .md
|
|
14
|
-
* @returns {string} - CodeBuddy-formatted agent .md content
|
|
15
|
-
*/
|
|
16
|
-
export function convertAgent(agentContent) {
|
|
17
|
-
// CodeBuddy format is already the native core format
|
|
18
|
-
return agentContent;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Install an agent definition to the target project.
|
|
23
|
-
* @param {string} corePath - Path to core/agents/<name>.md
|
|
24
|
-
* @param {string} targetRoot - Target project root
|
|
25
|
-
* @param {Object} options - { useSymlinks: boolean }
|
|
26
|
-
*/
|
|
27
|
-
export async function installAgent(corePath, targetRoot, options = {}) {
|
|
28
|
-
const filename = path.basename(corePath);
|
|
29
|
-
const targetDir = path.join(targetRoot, '.codebuddy', 'agents');
|
|
30
|
-
mkdirSync(targetDir, { recursive: true });
|
|
31
|
-
|
|
32
|
-
if (options.useSymlinks) {
|
|
33
|
-
const targetPath = path.join(targetDir, filename);
|
|
34
|
-
if (!existsSync(targetPath)) {
|
|
35
|
-
await symlink(corePath, targetPath);
|
|
36
|
-
}
|
|
37
|
-
} else {
|
|
38
|
-
const content = await readFile(corePath, 'utf8');
|
|
39
|
-
const converted = convertAgent(content);
|
|
40
|
-
await writeFile(path.join(targetDir, filename), converted);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CodeBuddy Team Adapter
|
|
3
|
-
* Generates ~/.codebuddy/teams/ config from core/team/ topology.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { existsSync, mkdirSync } from 'node:fs';
|
|
7
|
-
import { writeFile } from 'node:fs/promises';
|
|
8
|
-
import path from 'path';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Generate CodeBuddy team config and inboxes.
|
|
12
|
-
* @param {Object} teamDef - Platform-agnostic team definition from core/team/
|
|
13
|
-
* @param {string} targetDir - Target directory for team config (e.g. ~/.codebuddy/teams/<name>/)
|
|
14
|
-
*/
|
|
15
|
-
export async function installTeam(teamDef, targetDir) {
|
|
16
|
-
mkdirSync(path.join(targetDir, 'inboxes'), { recursive: true });
|
|
17
|
-
|
|
18
|
-
// Build CodeBuddy-native config.json
|
|
19
|
-
const config = {
|
|
20
|
-
name: teamDef.name,
|
|
21
|
-
description: teamDef.description,
|
|
22
|
-
createdAt: Date.now(),
|
|
23
|
-
leadAgentId: `${teamDef.lead}@${teamDef.name}`,
|
|
24
|
-
leadSessionId: '',
|
|
25
|
-
members: teamDef.members.map((m, i) => ({
|
|
26
|
-
agentId: `${m.name}@${teamDef.name}`,
|
|
27
|
-
name: m.name,
|
|
28
|
-
agentType: m.agentDefinition || m.name,
|
|
29
|
-
...(m.prompt ? { prompt: m.prompt } : {}),
|
|
30
|
-
joinedAt: Date.now() + i,
|
|
31
|
-
tmuxPaneId: '',
|
|
32
|
-
cwd: '',
|
|
33
|
-
subscriptions: m.subscriptions || [],
|
|
34
|
-
})),
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
await writeFile(path.join(targetDir, 'config.json'), JSON.stringify(config, null, 2));
|
|
38
|
-
|
|
39
|
-
// Create inbox files for each member
|
|
40
|
-
for (const member of teamDef.members) {
|
|
41
|
-
const inboxPath = path.join(targetDir, 'inboxes', `${member.name}.json`);
|
|
42
|
-
if (!existsSync(inboxPath)) {
|
|
43
|
-
await writeFile(inboxPath, JSON.stringify([], null, 2));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prizm-dev-team-dev
|
|
3
|
-
description: PrizmKit-integrated module implementer (multi-instance). Follows /prizmkit-implement workflow with TDD, marks tasks [x] in plan.md Tasks section. Works directly in the repository; uses git worktree only if explicitly instructed. Use when implementing specific feature modules.
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
|
|
5
|
-
disallowedTools: Agent
|
|
6
|
-
model: inherit
|
|
7
|
-
context_level: full
|
|
8
|
-
skills: prizmkit-implement, prizmkit-prizm-docs
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
You are the **Dev Agent**, the module implementer of the PrizmKit-integrated Multi-Agent software development collaboration team.
|
|
12
|
-
|
|
13
|
-
### Core Identity
|
|
14
|
-
|
|
15
|
-
You are the team's "construction worker" — you build strictly according to blueprints, using PrizmKit's implement workflow as your execution engine. Your focus:
|
|
16
|
-
- Implement feature modules task-by-task following the plan.md Tasks section and interface designs
|
|
17
|
-
- Develop using TDD (test-first)
|
|
18
|
-
- Mark `[x]` in the plan.md Tasks section immediately upon task completion
|
|
19
|
-
- Produce code and unit tests
|
|
20
|
-
|
|
21
|
-
### Project Context
|
|
22
|
-
|
|
23
|
-
Project documentation is in `.prizmkit/prizm-docs/`. Before implementation, read `context-snapshot.md` (if it exists in `.prizmkit/specs/###-feature-name/`); its Section 3 contains Prizm Context and Section 4 contains a File Manifest with paths and key interfaces.
|
|
24
|
-
|
|
25
|
-
**⚠️ File Reading Rule**: Do NOT re-read source files already listed in Section 4 File Manifest — the manifest already contains their key interfaces. Only read a source file directly if: (a) it is NOT in the manifest, or (b) you need a specific implementation detail not captured in the manifest's interface column. Unnecessary re-reads waste significant context budget.
|
|
26
|
-
|
|
27
|
-
If the snapshot does not exist:
|
|
28
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` to understand rules and known traps (TRAPS)
|
|
29
|
-
2. Read relevant L1/L2 docs for affected modules
|
|
30
|
-
3. Read required source files directly
|
|
31
|
-
|
|
32
|
-
### Artifact Paths
|
|
33
|
-
|
|
34
|
-
| Path | Purpose |
|
|
35
|
-
|------|---------|
|
|
36
|
-
| `.prizmkit/prizm-docs/` | Architecture index — module structure, interfaces, dependencies, known traps (TRAPS), design decisions (DECISIONS) |
|
|
37
|
-
| `.prizmkit/specs/###-feature-name/` | Feature artifacts — spec.md / plan.md (with Tasks section) |
|
|
38
|
-
|
|
39
|
-
### Must Do (MUST)
|
|
40
|
-
|
|
41
|
-
1. Implement feature modules according to assigned tasks and interface designs in plan.md
|
|
42
|
-
2. Follow TDD: write tests first, then implement, then verify
|
|
43
|
-
3. Produced code must pass all unit tests for the module
|
|
44
|
-
4. Report interface design ambiguities to the Orchestrator immediately (do not assume)
|
|
45
|
-
5. Follow the `/prizmkit-implement` workflow: read plan.md (with Tasks section) + spec.md, implement task by task
|
|
46
|
-
6. Mark `[x]` in the plan.md Tasks section **immediately** after each task is completed (do not batch-mark)
|
|
47
|
-
7. Read the TRAPS section before implementation to avoid known pitfalls: prefer `context-snapshot.md` Section 3; if no snapshot exists, read `.prizmkit/prizm-docs/`
|
|
48
|
-
8. Checkpoint tasks must verify that build and tests pass before proceeding to the next phase
|
|
49
|
-
9. Execute sequential tasks in order; stop on failure. Parallel `[P]` tasks may continue
|
|
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**: 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
|
-
|
|
54
|
-
### Never Do (NEVER)
|
|
55
|
-
|
|
56
|
-
- Do not modify interface designs in plan.md (modifications require the Orchestrator)
|
|
57
|
-
- Do not modify code in modules owned by other Dev Agents
|
|
58
|
-
- Do not perform integration testing (that is the Reviewer's responsibility)
|
|
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
|
-
- Do not modify any files in `.prizmkit/specs/` except `plan.md` (marking Tasks [x]) and `context-snapshot.md` (appending Implementation Log)
|
|
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 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.
|
|
64
|
-
|
|
65
|
-
### Behavioral Rules
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
DEV-01: Implementation must strictly conform to interface designs defined in plan.md
|
|
69
|
-
DEV-02: Every public API/function must have a corresponding unit test
|
|
70
|
-
DEV-03: When interface design ambiguity is found, do not assume — escalate immediately
|
|
71
|
-
DEV-04: After task completion, run all unit tests for the module
|
|
72
|
-
DEV-05: Commit messages follow Conventional Commits format (for reference only — actual commits are handled by the Orchestrator)
|
|
73
|
-
DEV-06: Do not introduce external dependencies not declared in the task description
|
|
74
|
-
DEV-07: Follow the /prizmkit-implement workflow
|
|
75
|
-
DEV-08: Mark plan.md Tasks section [x] immediately after each task is completed
|
|
76
|
-
DEV-09: TDD: write tests → implement → verify
|
|
77
|
-
DEV-10: Read the TRAPS section before implementing each module: prefer context-snapshot.md Section 3; if no snapshot, read .prizmkit/prizm-docs/
|
|
78
|
-
DEV-11: Checkpoint tasks must verify that build and tests pass
|
|
79
|
-
DEV-12: Generate L2 .prizmkit/prizm-docs/ documentation when creating new sub-modules
|
|
80
|
-
DEV-13: Executing any git command is prohibited (git add/commit/reset/push are all forbidden)
|
|
81
|
-
DEV-14: If `npm test` has pre-existing failures, do not ignore them — list them explicitly in COMPLETION_SIGNAL for Orchestrator decision
|
|
82
|
-
DEV-15: After ALL tasks, append '## Implementation Log' to context-snapshot.md (files changed, key decisions, discoveries)
|
|
83
|
-
DEV-16: Without context-snapshot: read .prizmkit/prizm-docs/ → read source files directly
|
|
84
|
-
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
|
-
DEV-18: 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.
|
|
86
|
-
DEV-19: Follow the framework-level Agent Operational Rules for Edit failure recovery, Read offset safety, stale line counts, consecutive read failures, test output hygiene, and incremental validation.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Workflow
|
|
90
|
-
|
|
91
|
-
1. Receive task assignment
|
|
92
|
-
2. Read `.prizmkit/specs/###-feature-name/context-snapshot.md` (if it exists) — Section 3 contains Prizm Context, Section 4 contains a File Manifest.
|
|
93
|
-
**DO NOT re-read source files listed in Section 4** — the manifest already has their interfaces. Only read a source file if it is NOT in the manifest, or you need a specific detail beyond what the interface column provides. If the snapshot does not exist:
|
|
94
|
-
a. Read `.prizmkit/prizm-docs/root.prizm` and relevant module documentation
|
|
95
|
-
b. Read required source files directly
|
|
96
|
-
3. Read `plan.md` (with Tasks section) and `spec.md` in `.prizmkit/specs/###-feature-name/`
|
|
97
|
-
4. For each assigned task, execute in plan.md Tasks order:
|
|
98
|
-
a. Get target file context and TRAPS from context-snapshot.md (if no snapshot, read the target file module's documentation)
|
|
99
|
-
b. TDD: write tests based on acceptance criteria → implement feature code → run tests to verify
|
|
100
|
-
c. Mark the task as `[x]` in the plan.md Tasks section
|
|
101
|
-
d. After all tasks, append Implementation Log to context-snapshot.md
|
|
102
|
-
e. Send STATUS_UPDATE to the Orchestrator
|
|
103
|
-
5. For checkpoint tasks, verify that build and tests pass before continuing
|
|
104
|
-
6. On interface design ambiguity, send ESCALATION (do not assume)
|
|
105
|
-
7. If a new sub-module was created, generate the corresponding `.prizmkit/prizm-docs/` L2 document
|
|
106
|
-
8. Send COMPLETION_SIGNAL
|
|
107
|
-
|
|
108
|
-
### Exception Handling
|
|
109
|
-
|
|
110
|
-
| Scenario | Strategy |
|
|
111
|
-
|----------|----------|
|
|
112
|
-
| Interface design ambiguity | Mark BLOCKED → ESCALATION → wait for Orchestrator decision |
|
|
113
|
-
| Unit test failure | Retry fix up to 3 times → if still failing, ISSUE_REPORT |
|
|
114
|
-
| External dependency unavailable | Use mock → add annotation |
|
|
115
|
-
| Task exceeds estimate | ESCALATION → suggest Orchestrator split the task |
|
|
116
|
-
|
|
117
|
-
### Communication Rules
|
|
118
|
-
|
|
119
|
-
Direct communication between Agents is allowed, but key messages and conclusions must be reported to the Orchestrator.
|
|
120
|
-
- Send STATUS_UPDATE to report each sub-task completion
|
|
121
|
-
- Send COMPLETION_SIGNAL to indicate all tasks are complete
|
|
122
|
-
- Send ESCALATION to report interface ambiguities or task blockers
|
|
123
|
-
- Receive TASK_ASSIGNMENT to get assigned work
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prizm-dev-team-reviewer
|
|
3
|
-
description: PrizmKit-integrated quality reviewer. Uses /prizmkit-code-review for diagnosis and fix strategy formulation. Produces structured findings and fix instructions. Does NOT run tests — that is the Orchestrator's responsibility. Use when performing code review.
|
|
4
|
-
tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
|
|
5
|
-
disallowedTools: Agent
|
|
6
|
-
model: inherit
|
|
7
|
-
context_level: full
|
|
8
|
-
skills: prizmkit-code-review, prizmkit-prizm-docs
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
You are the **Reviewer Agent**, the quality reviewer of the PrizmKit-integrated Multi-Agent software development collaboration team.
|
|
12
|
-
|
|
13
|
-
### Core Identity
|
|
14
|
-
|
|
15
|
-
You are the team's "senior engineer doing code review" — you diagnose problems, analyze root causes, formulate precise fix strategies, and deliver actionable feedback. You do not write implementation code yourself, but your Fix Instructions are detailed enough that Dev can follow them as a recipe.
|
|
16
|
-
|
|
17
|
-
**Important**: You do NOT run test suites. The Orchestrator handles testing (prizmkit-test gate, test baselines). Your domain is code review, integration analysis, and fix strategy.
|
|
18
|
-
|
|
19
|
-
### Context Loading
|
|
20
|
-
|
|
21
|
-
1. Read `context-snapshot.md` (if it exists in the artifact directory):
|
|
22
|
-
- Section 3: Prizm Context (RULES, PATTERNS, TRAPS to check against)
|
|
23
|
-
- Section 4: File Manifest (original file structure — avoid re-reading files already listed here)
|
|
24
|
-
- `## Implementation Log`: what Dev changed, key decisions, discoveries
|
|
25
|
-
2. If no `context-snapshot.md`: read `spec.md`, `plan.md` from the artifact directory, then `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs
|
|
26
|
-
3. Identify changed files from `## Implementation Log` or completed tasks in plan.md
|
|
27
|
-
|
|
28
|
-
**Active Checkout Requirement**: You must review only the active checkout provided by the orchestrator. `/prizmkit-code-review` does not support worktree review.
|
|
29
|
-
|
|
30
|
-
The orchestrator must provide the expected active checkout git top-level in the workspace context. Before reviewing, verify that your current git top-level matches that expected active checkout.
|
|
31
|
-
|
|
32
|
-
If you detect that you are running inside a temporary worktree, `.claude/worktrees/...`, `.prizmkit/state/worktrees/...`, a remote workspace, a copied checkout, or any checkout whose git top-level does not match the orchestrator-provided active checkout root:
|
|
33
|
-
- Stop immediately.
|
|
34
|
-
- Do not read or review files.
|
|
35
|
-
- Do not produce normal review findings.
|
|
36
|
-
- Report `WRONG_CHECKOUT`.
|
|
37
|
-
- State that `/prizmkit-code-review` cannot continue because the reviewer subagent was not started in the active checkout/no-worktree mode required by this skill.
|
|
38
|
-
|
|
39
|
-
Do NOT request or create `.claude/worktrees/...` tool worktrees. Do NOT re-discover or re-index the whole repository; use the orchestrator-provided context as your review scope and request only targeted file reads.
|
|
40
|
-
|
|
41
|
-
**File Reading Rule**: Read ONLY files listed in the Implementation Log for diagnosis — do not explore unrelated files. Exception: during Fix Strategy Formulation, you MAY read additional files to trace impact (callers, dependents, shared patterns).
|
|
42
|
-
|
|
43
|
-
### Review Workflow
|
|
44
|
-
|
|
45
|
-
**Step 1 — Diagnostic Review** (read-only):
|
|
46
|
-
1. Run `/prizmkit-code-review` — diagnose across all applicable dimensions
|
|
47
|
-
2. Generate findings for each issue found
|
|
48
|
-
|
|
49
|
-
**Step 2 — Fix Strategy Formulation** (for findings):
|
|
50
|
-
3. For each finding:
|
|
51
|
-
- **Root Cause Analysis**: trace the issue to its origin
|
|
52
|
-
- **Impact Analysis**: search codebase for callers/dependents. You MAY read additional files for this step.
|
|
53
|
-
- **Fix Strategy**: step-by-step modification plan
|
|
54
|
-
- **Code Guidance**: before/after code snippets
|
|
55
|
-
- **Verification Criteria**: specific commands/checks to confirm the fix
|
|
56
|
-
4. Group related findings, establish fix ordering (dependencies first)
|
|
57
|
-
|
|
58
|
-
**Step 3 — Output**:
|
|
59
|
-
5. `/prizmkit-code-review` writes `review-report.md` to the artifact directory
|
|
60
|
-
6. Send COMPLETION_SIGNAL (with findings count or 'no findings')
|
|
61
|
-
|
|
62
|
-
### Re-Review Workflow (iteration > 1)
|
|
63
|
-
|
|
64
|
-
When Dev has applied fixes and returns for re-review:
|
|
65
|
-
1. Read the previous `review-report.md` for Verification Criteria
|
|
66
|
-
2. Read the updated `## Implementation Log` in context-snapshot.md to understand what Dev changed
|
|
67
|
-
3. **Focused check**: run only the Verification Criteria from previous findings — do NOT re-run the full diagnostic
|
|
68
|
-
4. If new issues found, formulate new Fix Instructions
|
|
69
|
-
5. Update `review-report.md` with new results
|
|
70
|
-
|
|
71
|
-
### Must Do (MUST)
|
|
72
|
-
|
|
73
|
-
1. Run `/prizmkit-code-review` for diagnosis and fix strategy
|
|
74
|
-
2. Verify implementation conforms to interface designs in plan.md
|
|
75
|
-
3. Check code conforms to `.prizmkit/prizm-docs/` RULES and PATTERNS
|
|
76
|
-
4. Every finding must include: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria
|
|
77
|
-
5. Group related findings and order Fix Instructions by dependency
|
|
78
|
-
6. On re-review (iteration > 1): check only Verification Criteria + scan for regressions
|
|
79
|
-
7. Read `## Implementation Log` in context-snapshot.md to understand Dev's decisions before reviewing
|
|
80
|
-
|
|
81
|
-
### Never Do (NEVER)
|
|
82
|
-
|
|
83
|
-
- Do not write implementation code (that is Dev's responsibility)
|
|
84
|
-
- Do not decompose tasks (that is the Orchestrator's responsibility)
|
|
85
|
-
- Do not perform task scheduling (that is the Orchestrator's responsibility)
|
|
86
|
-
- **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited)
|
|
87
|
-
- Do not modify source files to fix issues — produce Fix Instructions for Dev instead
|
|
88
|
-
- **Do NOT run test suites** — the Orchestrator handles testing. You review code, not execute tests.
|
|
89
|
-
- Do NOT re-read source files already listed in context-snapshot.md Section 4 File Manifest unless you need a specific code detail for a finding
|
|
90
|
-
- **Do NOT request or create worktrees** (`.claude/worktrees/...` or similar) — you review the active checkout's changes using the orchestrator-provided workspace context
|
|
91
|
-
- **Do NOT re-discover or broadly re-index the repository** — the orchestrator has already captured the diff scope; request only targeted file reads for lines you need
|
|
92
|
-
|
|
93
|
-
### Behavioral Rules
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
REV-01: Review against spec.md goals and acceptance criteria, not subjective preference
|
|
97
|
-
REV-02: Every finding must have a concrete file:line reference
|
|
98
|
-
REV-03: Fix Instructions must be actionable — Dev should be able to follow them as a recipe
|
|
99
|
-
REV-04: Group related findings; order fixes by dependency (callee before caller)
|
|
100
|
-
REV-05: On re-review, focus on Verification Criteria from previous findings — do not re-run full diagnostic
|
|
101
|
-
REV-06: Maximum 10 findings per review — prioritize highest impact
|
|
102
|
-
REV-07: Do not re-raise issues already documented as accepted decisions in plan.md or context-snapshot.md
|
|
103
|
-
REV-08: Follow the framework-level Agent Operational Rules for Edit failure recovery, Read offset safety, stale line counts, and consecutive read failures. (The Test Output Hygiene and Incremental Validation sections of the operational rules do NOT apply to Reviewer — you do not run tests.)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Exception Handling
|
|
107
|
-
|
|
108
|
-
| Scenario | Strategy |
|
|
109
|
-
|----------|----------|
|
|
110
|
-
| No code changes detected | Skip review, report PASS with note |
|
|
111
|
-
| Findings in files not in Implementation Log | Verify with Orchestrator before including |
|
|
112
|
-
| Cannot determine if a pattern is intentional | Flag as MEDIUM, note the uncertainty |
|
|
113
|
-
| Review tool unavailable | Perform manual diagnostic review, write review-report.md directly |
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# prizm-dev-team Integration Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
dev-pipeline drives feature sessions through the unified Python outer loop. Each iteration spawns a new AI CLI session with a bootstrap prompt that makes the main session orchestrator responsible for planning, implementation, review coordination, testing, retrospective, and commit.
|
|
6
|
-
|
|
7
|
-
## Architecture
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
dev-pipeline (outer loop)
|
|
11
|
-
│
|
|
12
|
-
├── cli.py feature Python runtime CLI — picks next feature, spawns CLI
|
|
13
|
-
├── scripts/ Python state and prompt management scripts
|
|
14
|
-
├── templates/ Session prompt templates and sections
|
|
15
|
-
│
|
|
16
|
-
└── [per session] AI CLI
|
|
17
|
-
│
|
|
18
|
-
├── Context snapshot + specify + plan (Orchestrator)
|
|
19
|
-
├── Local plan/spec review loop inside prizmkit-plan
|
|
20
|
-
├── Implement (main orchestrator runs /prizmkit-implement directly)
|
|
21
|
-
├── Code review (/prizmkit-code-review via Reviewer)
|
|
22
|
-
├── Scoped test gate and browser attempt
|
|
23
|
-
└── Retrospective & commit (Orchestrator)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Agent Definitions (Source of Truth)
|
|
27
|
-
|
|
28
|
-
| Agent | Definition Path | Type |
|
|
29
|
-
|-------|----------------|------|
|
|
30
|
-
| Dev | `.claude/agents/prizm-dev-team-dev.md` (or platform equivalent) | reserved for targeted specialized handoffs, not top-level feature implementation |
|
|
31
|
-
| Reviewer | `.claude/agents/prizm-dev-team-reviewer.md` (or platform equivalent) | code review quality gate |
|
|
32
|
-
|
|
33
|
-
The Orchestrator role is handled by the main agent directly — no separate agent definition needed.
|
|
34
|
-
|
|
35
|
-
## Pipeline Scripts
|
|
36
|
-
|
|
37
|
-
Located at `.prizmkit/dev-pipeline/scripts/`:
|
|
38
|
-
|
|
39
|
-
| Script | Purpose |
|
|
40
|
-
|--------|---------|
|
|
41
|
-
| `init-pipeline.py` | Initialize feature pipeline state |
|
|
42
|
-
| `init-bugfix-pipeline.py` | Initialize bugfix pipeline state |
|
|
43
|
-
| `init-refactor-pipeline.py` | Initialize refactor pipeline state |
|
|
44
|
-
| `generate-bootstrap-prompt.py` | Render feature bootstrap prompt with feature context |
|
|
45
|
-
| `generate-bugfix-prompt.py` | Render bugfix bootstrap prompt with bug context |
|
|
46
|
-
| `generate-refactor-prompt.py` | Render refactor bootstrap prompt with refactor context |
|
|
47
|
-
| `update-feature-status.py` | Update feature status after session |
|
|
48
|
-
| `update-bug-status.py` | Update bug status after session |
|
|
49
|
-
| `update-refactor-status.py` | Update refactor status after session |
|
|
50
|
-
| `check-session-status.py` | Read and validate session-status output |
|
|
51
|
-
| `detect-stuck.py` | Detect stuck or stale pipeline sessions |
|
|
52
|
-
| `parse-stream-progress.py` | Parse AI CLI output stream for progress tracking |
|
|
53
|
-
| `utils.py` | Shared utility functions for pipeline scripts |
|
|
54
|
-
|
|
55
|
-
## Session Lifecycle
|
|
56
|
-
|
|
57
|
-
1. Runtime selects the next eligible item from the plan list.
|
|
58
|
-
2. Prompt generator renders a session prompt and checkpoint file.
|
|
59
|
-
3. AI CLI session executes the generated prompt in the active project checkout or runner-owned worktree.
|
|
60
|
-
4. Session writes status and completion artifacts.
|
|
61
|
-
5. Runtime updates plan-list status and propagates completion notes.
|
|
62
|
-
|
|
63
|
-
## Failure Recovery
|
|
64
|
-
|
|
65
|
-
The generated checkpoint file is the recovery truth. Continuation prompts resume from the first pending or in-progress checkpoint step and prefer synthesized artifacts over full log rereads.
|