prizmkit 1.0.11 → 1.0.13
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/bundled/VERSION.json +3 -3
- package/bundled/agents/prizm-dev-team-dev.md +5 -2
- package/bundled/agents/prizm-dev-team-pm.md +28 -8
- package/bundled/agents/prizm-dev-team-reviewer.md +5 -1
- package/bundled/dev-pipeline/retry-bug.sh +12 -0
- package/bundled/dev-pipeline/retry-feature.sh +12 -0
- package/bundled/dev-pipeline/run-bugfix.sh +14 -0
- package/bundled/dev-pipeline/run.sh +14 -7
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +26 -3
- package/bundled/dev-pipeline/scripts/update-feature-status.py +23 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +7 -270
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +190 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +220 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +335 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +4 -2
- package/bundled/skills/prizmkit-specify/SKILL.md +3 -1
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -45,9 +45,10 @@ skills: prizmkit-implement, prizmkit-prizm-docs
|
|
|
45
45
|
- 不修改 plan.md 中的接口设计(修改需通过 PM)
|
|
46
46
|
- 不修改其他 Dev Agent 负责的模块代码
|
|
47
47
|
- 不进行集成测试(Reviewer 的职责)
|
|
48
|
-
-
|
|
48
|
+
- **不执行任何 git 操作**(git commit / git add / git reset / git push 均禁止 — 由 Orchestrator 通过 prizmkit.committer 统一提交)
|
|
49
49
|
- 不修改 `.prizmkit/specs/` 中除 `tasks.md`(标记 [x])以外的任何文件
|
|
50
50
|
- 不为 bug 修复创建新的文档条目;bug 修复是现有功能的完善,应更新原始功能的文档而非在 REGISTRY.md 中创建新条目
|
|
51
|
+
- 不使用 TaskCreate/TaskUpdate 创建或修改 Orchestrator 层的任务(Task 工具仅用于内部进度追踪,且任务 ID 在各 agent 子会话中互不共享)
|
|
51
52
|
|
|
52
53
|
### 行为规则
|
|
53
54
|
|
|
@@ -56,7 +57,7 @@ DEV-01: 实现必须严格符合 plan.md 中定义的接口设计
|
|
|
56
57
|
DEV-02: 每个公开 API/函数必须有对应的单元测试
|
|
57
58
|
DEV-03: 发现接口设计歧义时,不得自行假设,必须上报
|
|
58
59
|
DEV-04: 任务完成后必须运行全部本模块测试
|
|
59
|
-
DEV-05: 代码提交信息遵循 Conventional Commits
|
|
60
|
+
DEV-05: 代码提交信息遵循 Conventional Commits 格式(仅供参考,实际提交由 Orchestrator 执行)
|
|
60
61
|
DEV-06: 不得引入未在任务描述中声明的外部依赖
|
|
61
62
|
DEV-07: 遵循 prizmkit.implement 工作流
|
|
62
63
|
DEV-08: 每个任务完成后立即标记 tasks.md [x]
|
|
@@ -64,6 +65,8 @@ DEV-09: TDD:先写测试 → 再实现 → 再验证
|
|
|
64
65
|
DEV-10: 实现每个模块前必须读取 .prizm-docs/ TRAPS 段
|
|
65
66
|
DEV-11: 检查点任务必须验证构建通过和测试通过
|
|
66
67
|
DEV-12: 新建子模块时生成 L2 .prizm-docs/ 文档
|
|
68
|
+
DEV-13: 禁止执行任何 git 命令(git add/commit/reset/push 全部禁止)
|
|
69
|
+
DEV-14: 若 `npm test` 中存在 pre-existing 失败,不得忽略——必须在 COMPLETION_SIGNAL 中明确列出,由 Orchestrator 决策
|
|
67
70
|
```
|
|
68
71
|
|
|
69
72
|
### 工作流程
|
|
@@ -36,12 +36,13 @@ skills: prizmkit-specify, prizmkit-clarify, prizmkit-plan, prizmkit-tasks, prizm
|
|
|
36
36
|
3. 在 plan.md 中定义接口设计(API 规格、数据模型、模块依赖)
|
|
37
37
|
4. 为每个任务定义明确的输入、输出和验收标准
|
|
38
38
|
5. 识别任务间的依赖关系和可并行度
|
|
39
|
-
6.
|
|
40
|
-
7. 使用 `prizmkit.
|
|
41
|
-
8. 使用 `prizmkit.
|
|
42
|
-
9. 使用 `prizmkit.
|
|
43
|
-
10.
|
|
44
|
-
11.
|
|
39
|
+
6. **在调用任何 skill 之前,先写 `context-snapshot.md`**(若不存在)
|
|
40
|
+
7. 使用 `prizmkit.specify` 产出 `spec.md`
|
|
41
|
+
8. 使用 `prizmkit.clarify` 解决所有 `[NEEDS CLARIFICATION]` 标记
|
|
42
|
+
9. 使用 `prizmkit.plan` 生成 `plan.md`(含接口设计和数据模型)
|
|
43
|
+
10. 使用 `prizmkit.tasks` 生成 `tasks.md`,格式为 `[T-NNN]`
|
|
44
|
+
11. 所有制品放在 `.prizmkit/specs/###-feature-name/`
|
|
45
|
+
12. 规格中不应包含 bug 修复项;bug 修复属于现有功能的完善(使不完整的功能达到预期状态),不是新增功能,不应创建新的 spec/plan/tasks 或 REGISTRY.md 条目
|
|
45
46
|
|
|
46
47
|
### 绝不做 (NEVER)
|
|
47
48
|
|
|
@@ -49,6 +50,8 @@ skills: prizmkit-specify, prizmkit-clarify, prizmkit-plan, prizmkit-tasks, prizm
|
|
|
49
50
|
- 不执行测试(Reviewer 的职责)
|
|
50
51
|
- 不进行代码审查(Reviewer 的职责)
|
|
51
52
|
- 不进行任务调度(Coordinator 的职责)
|
|
53
|
+
- **不执行任何 git 操作**(git commit / git add / git reset / git push 均禁止)
|
|
54
|
+
- 不使用 TaskCreate/TaskUpdate 创建或修改 Orchestrator 层的任务(Task 工具仅用于内部进度追踪,且任务 ID 在各 agent 子会话中互不共享)
|
|
52
55
|
|
|
53
56
|
### 行为规则
|
|
54
57
|
|
|
@@ -61,15 +64,32 @@ PM-05: 使用 prizmkit.specify 作为需求捕获的主要工具
|
|
|
61
64
|
PM-06: 使用 prizmkit.clarify 解决所有 [NEEDS CLARIFICATION] 标记
|
|
62
65
|
PM-07: 使用 prizmkit.plan 生成 plan.md 作为技术实施计划
|
|
63
66
|
PM-08: 使用 prizmkit.tasks 生成 tasks.md,格式为 [T-NNN]
|
|
67
|
+
PM-09: 修改文件时,Read 之后立即 Edit,中间不插入其他工具调用,避免 "file modified since read" 错误
|
|
64
68
|
```
|
|
65
69
|
|
|
66
70
|
### 工作流程
|
|
67
71
|
|
|
68
|
-
PM
|
|
72
|
+
PM 在一次会话中连续完成以下四步:
|
|
73
|
+
|
|
74
|
+
#### Step 0: 写 Context Snapshot(仅首次,若不存在)
|
|
75
|
+
|
|
76
|
+
**在调用任何 skill 之前完成此步骤。**
|
|
77
|
+
|
|
78
|
+
检查 `.prizmkit/specs/###-feature-name/context-snapshot.md` 是否存在:
|
|
79
|
+
- **不存在** → 立即写入,包含以下内容:
|
|
80
|
+
- **Section 1 'Feature Brief'**:feature 描述和验收标准
|
|
81
|
+
- **Section 2 'Project Structure'**:`ls src/` 及相关子目录输出
|
|
82
|
+
- **Section 3 'Prizm Context'**:`.prizm-docs/root.prizm` 完整内容 + 相关 L1/L2 docs
|
|
83
|
+
- **Section 4 'Existing Source Files'**:所有相关源文件的完整内容(代码块格式)
|
|
84
|
+
- **Section 5 'Existing Tests'**:相关测试文件的完整内容(代码块格式)
|
|
85
|
+
- 完成后执行 `ls .prizmkit/specs/###-feature-name/context-snapshot.md` 确认
|
|
86
|
+
- **已存在** → 跳过,直接进入 Step 1
|
|
87
|
+
|
|
88
|
+
**完成 Step 0 后,不再读取任何原始源文件**——后续所有 skill 均从 context-snapshot.md 获取项目上下文。
|
|
69
89
|
|
|
70
90
|
#### Step 1: 需求与规格
|
|
71
91
|
|
|
72
|
-
1. 读取 `.
|
|
92
|
+
1. 读取 `.prizmkit/specs/###-feature-name/context-snapshot.md`(Section 3 含 Prizm Context,代替直接读 `.prizm-docs/`)
|
|
73
93
|
2. 运行 `prizmkit.specify` → 创建 `.prizmkit/specs/###-feature-name/spec.md`
|
|
74
94
|
- 产出 spec.md(用户故事、验收标准、范围边界)
|
|
75
95
|
- 标记不明确处为 `[NEEDS CLARIFICATION]`(最多 3 个)
|
|
@@ -42,6 +42,8 @@ skills: prizmkit-code-review, prizmkit-analyze, prizmkit-prizm-docs
|
|
|
42
42
|
- 不编写实现代码(Dev 的职责)
|
|
43
43
|
- 不分解任务(PM 的职责)
|
|
44
44
|
- 不进行任务调度(Coordinator 的职责)
|
|
45
|
+
- **不执行任何 git 操作**(git commit / git add / git reset / git push 均禁止)
|
|
46
|
+
- 不使用 TaskCreate/TaskUpdate 创建或修改 Orchestrator 层的任务(Task 工具仅用于内部进度追踪,且任务 ID 在各 agent 子会话中互不共享)
|
|
45
47
|
|
|
46
48
|
### 行为规则
|
|
47
49
|
|
|
@@ -55,16 +57,18 @@ REV-06: Spec compliance 失败始终为 HIGH 或 CRITICAL
|
|
|
55
57
|
REV-07: 安全发现始终为 HIGH 或 CRITICAL
|
|
56
58
|
REV-08: 集成测试必须覆盖 spec.md 所有用户故事
|
|
57
59
|
REV-09: 审查代码是否符合 .prizm-docs/ PATTERNS 和 RULES
|
|
60
|
+
REV-10: 禁止使用 timeout 命令(macOS 不兼容)。运行测试时直接使用 node --test 或 npm test,不加 timeout 前缀
|
|
58
61
|
```
|
|
59
62
|
|
|
60
63
|
### Phase 4 工作流程:交叉校验
|
|
61
64
|
|
|
62
65
|
**前置条件**: PM 已完成 spec.md / plan.md / tasks.md
|
|
63
66
|
|
|
64
|
-
1.
|
|
67
|
+
1. 调用 `prizmkit.analyze` skill(**不是 CLI 命令**,使用 Skill 工具或 `/prizmkit-analyze` 指令调用)
|
|
65
68
|
- 输入: spec.md, plan.md, tasks.md
|
|
66
69
|
- 6 个检测通道: 重复检测、歧义检测、不完整检测、Prizm 规则对齐、覆盖缺口、不一致性
|
|
67
70
|
- 输出: 一致性分析报告(仅对话输出)
|
|
71
|
+
- 若 Skill 工具不可用,则根据 6 个检测通道手动执行交叉一致性分析
|
|
68
72
|
2. 如发现 CRITICAL 问题,报告给 Coordinator 退回 PM 修复
|
|
69
73
|
3. 发送 COMPLETION_SIGNAL(含分析结果)
|
|
70
74
|
|
|
@@ -299,6 +299,18 @@ else
|
|
|
299
299
|
SESSION_STATUS="crashed"
|
|
300
300
|
fi
|
|
301
301
|
|
|
302
|
+
if [[ "$SESSION_STATUS" == "success" ]]; then
|
|
303
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
304
|
+
if git -C "$PROJECT_ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
305
|
+
DIRTY_FILES=$(git -C "$PROJECT_ROOT" status --porcelain 2>/dev/null || true)
|
|
306
|
+
if [[ -n "$DIRTY_FILES" ]]; then
|
|
307
|
+
log_error "Session reported success but git working tree is not clean."
|
|
308
|
+
echo "$DIRTY_FILES" | sed 's/^/ - /'
|
|
309
|
+
SESSION_STATUS="failed"
|
|
310
|
+
fi
|
|
311
|
+
fi
|
|
312
|
+
fi
|
|
313
|
+
|
|
302
314
|
# Update bug status
|
|
303
315
|
python3 "$SCRIPTS_DIR/update-bug-status.py" \
|
|
304
316
|
--bug-list "$BUG_LIST" \
|
|
@@ -300,6 +300,18 @@ else
|
|
|
300
300
|
SESSION_STATUS="crashed"
|
|
301
301
|
fi
|
|
302
302
|
|
|
303
|
+
if [[ "$SESSION_STATUS" == "success" ]]; then
|
|
304
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
305
|
+
if git -C "$PROJECT_ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
306
|
+
DIRTY_FILES=$(git -C "$PROJECT_ROOT" status --porcelain 2>/dev/null || true)
|
|
307
|
+
if [[ -n "$DIRTY_FILES" ]]; then
|
|
308
|
+
log_error "Session reported success but git working tree is not clean."
|
|
309
|
+
echo "$DIRTY_FILES" | sed 's/^/ - /'
|
|
310
|
+
SESSION_STATUS="failed"
|
|
311
|
+
fi
|
|
312
|
+
fi
|
|
313
|
+
fi
|
|
314
|
+
|
|
303
315
|
# Update feature status
|
|
304
316
|
python3 "$SCRIPTS_DIR/update-feature-status.py" \
|
|
305
317
|
--feature-list "$FEATURE_LIST" \
|
|
@@ -180,6 +180,20 @@ spawn_and_wait_session() {
|
|
|
180
180
|
session_status="crashed"
|
|
181
181
|
fi
|
|
182
182
|
|
|
183
|
+
if [[ "$session_status" == "success" ]]; then
|
|
184
|
+
local project_root
|
|
185
|
+
project_root="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
186
|
+
if git -C "$project_root" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
187
|
+
local dirty_files=""
|
|
188
|
+
dirty_files=$(git -C "$project_root" status --porcelain 2>/dev/null || true)
|
|
189
|
+
if [[ -n "$dirty_files" ]]; then
|
|
190
|
+
log_error "Session reported success but git working tree is not clean."
|
|
191
|
+
echo "$dirty_files" | sed 's/^/ - /'
|
|
192
|
+
session_status="failed"
|
|
193
|
+
fi
|
|
194
|
+
fi
|
|
195
|
+
fi
|
|
196
|
+
|
|
183
197
|
log_info "Session result: $session_status"
|
|
184
198
|
|
|
185
199
|
# Update bug status
|
|
@@ -199,6 +199,20 @@ spawn_and_wait_session() {
|
|
|
199
199
|
session_status="crashed"
|
|
200
200
|
fi
|
|
201
201
|
|
|
202
|
+
if [[ "$session_status" == "success" ]]; then
|
|
203
|
+
local project_root
|
|
204
|
+
project_root="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
205
|
+
if git -C "$project_root" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
206
|
+
local dirty_files=""
|
|
207
|
+
dirty_files=$(git -C "$project_root" status --porcelain 2>/dev/null || true)
|
|
208
|
+
if [[ -n "$dirty_files" ]]; then
|
|
209
|
+
log_error "Session reported success but git working tree is not clean."
|
|
210
|
+
echo "$dirty_files" | sed 's/^/ - /'
|
|
211
|
+
session_status="failed"
|
|
212
|
+
fi
|
|
213
|
+
fi
|
|
214
|
+
fi
|
|
215
|
+
|
|
202
216
|
log_info "Session result: $session_status"
|
|
203
217
|
|
|
204
218
|
# Update feature status
|
|
@@ -516,13 +530,6 @@ sys.exit(1)
|
|
|
516
530
|
return 0
|
|
517
531
|
fi
|
|
518
532
|
|
|
519
|
-
# Mark feature as in-progress before spawning session
|
|
520
|
-
python3 "$SCRIPTS_DIR/update-feature-status.py" \
|
|
521
|
-
--feature-list "$feature_list" \
|
|
522
|
-
--state-dir "$STATE_DIR" \
|
|
523
|
-
--feature-id "$feature_id" \
|
|
524
|
-
--action start >/dev/null 2>&1 || true
|
|
525
|
-
|
|
526
533
|
# Spawn AI CLI Session
|
|
527
534
|
echo ""
|
|
528
535
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
@@ -508,9 +508,32 @@ def main():
|
|
|
508
508
|
if args.template:
|
|
509
509
|
template_path = args.template
|
|
510
510
|
else:
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
# Determine pipeline mode to select the right tier template
|
|
512
|
+
_complexity = None
|
|
513
|
+
try:
|
|
514
|
+
_fl, _ = load_json_file(args.feature_list)
|
|
515
|
+
if _fl:
|
|
516
|
+
for _f in _fl.get("features", []):
|
|
517
|
+
if isinstance(_f, dict) and _f.get("id") == args.feature_id:
|
|
518
|
+
_complexity = _f.get("estimated_complexity", "medium")
|
|
519
|
+
break
|
|
520
|
+
except Exception:
|
|
521
|
+
pass
|
|
522
|
+
_mode = args.mode or determine_pipeline_mode(_complexity or "medium")
|
|
523
|
+
_tier_file_map = {
|
|
524
|
+
"lite": "bootstrap-tier1.md",
|
|
525
|
+
"standard": "bootstrap-tier2.md",
|
|
526
|
+
"full": "bootstrap-tier3.md",
|
|
527
|
+
}
|
|
528
|
+
_tier_file = _tier_file_map.get(_mode, "bootstrap-tier2.md")
|
|
529
|
+
_tier_path = os.path.join(script_dir, "..", "templates", _tier_file)
|
|
530
|
+
# Fall back to legacy monolithic template if tier file doesn't exist
|
|
531
|
+
if os.path.isfile(_tier_path):
|
|
532
|
+
template_path = _tier_path
|
|
533
|
+
else:
|
|
534
|
+
template_path = os.path.join(
|
|
535
|
+
script_dir, "..", "templates", "bootstrap-prompt.md"
|
|
536
|
+
)
|
|
514
537
|
|
|
515
538
|
# Load template
|
|
516
539
|
template_content, err = read_text_file(template_path)
|
|
@@ -401,6 +401,29 @@ def action_update(args, feature_list_path, state_dir):
|
|
|
401
401
|
fs = load_feature_status(state_dir, feature_id)
|
|
402
402
|
|
|
403
403
|
if session_status == "success":
|
|
404
|
+
# No-op guard: if this exact successful session was already recorded,
|
|
405
|
+
# avoid rewriting state files again (prevents post-commit dirty changes).
|
|
406
|
+
existing_sessions = fs.get("sessions", [])
|
|
407
|
+
already_completed = fs.get("status") == "completed" and fs.get("resume_from_phase") is None
|
|
408
|
+
same_session_already_recorded = (
|
|
409
|
+
session_id
|
|
410
|
+
and session_id in existing_sessions
|
|
411
|
+
and fs.get("last_session_id") == session_id
|
|
412
|
+
)
|
|
413
|
+
if already_completed and (same_session_already_recorded or not session_id):
|
|
414
|
+
summary = {
|
|
415
|
+
"action": "update",
|
|
416
|
+
"feature_id": feature_id,
|
|
417
|
+
"session_status": session_status,
|
|
418
|
+
"new_status": fs.get("status", "completed"),
|
|
419
|
+
"retry_count": fs.get("retry_count", 0),
|
|
420
|
+
"resume_from_phase": fs.get("resume_from_phase"),
|
|
421
|
+
"updated_at": fs.get("updated_at"),
|
|
422
|
+
"no_op": True,
|
|
423
|
+
}
|
|
424
|
+
print(json.dumps(summary, indent=2, ensure_ascii=False))
|
|
425
|
+
return
|
|
426
|
+
|
|
404
427
|
fs["status"] = "completed"
|
|
405
428
|
fs["resume_from_phase"] = None
|
|
406
429
|
err = update_feature_in_list(feature_list_path, feature_id, "completed")
|
|
@@ -1,273 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DEPRECATED — bootstrap-prompt.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This file has been replaced by tier-specific templates:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
- **Feature Title**: {{FEATURE_TITLE}}
|
|
9
|
-
- **Feature Slug**: {{FEATURE_SLUG}}
|
|
10
|
-
- **Complexity**: {{COMPLEXITY}} (mode: {{PIPELINE_MODE}})
|
|
11
|
-
- **Retry Count**: {{RETRY_COUNT}} / {{MAX_RETRIES}}
|
|
12
|
-
- **Previous Session Status**: {{PREV_SESSION_STATUS}}
|
|
13
|
-
- **Resume From Phase**: {{RESUME_PHASE}}
|
|
14
|
-
- **Init Status**: {{INIT_DONE}} | Artifacts: spec={{HAS_SPEC}} plan={{HAS_PLAN}} tasks={{HAS_TASKS}}
|
|
5
|
+
- `bootstrap-tier1.md` — Tier 1: Single Agent (complexity: low)
|
|
6
|
+
- `bootstrap-tier2.md` — Tier 2: Dual Agent (complexity: medium)
|
|
7
|
+
- `bootstrap-tier3.md` — Tier 3: Full Team (complexity: high)
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATURE_TITLE}}".
|
|
19
|
-
|
|
20
|
-
**CRITICAL SESSION LIFECYCLE RULE**: You are the main session process. You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding. Do NOT spawn an agent in the background and exit — that kills the session.
|
|
21
|
-
|
|
22
|
-
**MANDATORY TEAM REQUIREMENT**: You MUST use the `prizm-dev-team` multi-agent team to complete this feature. This is NON-NEGOTIABLE. You are FORBIDDEN from implementing the feature as a single agent — all work MUST be distributed through the prizm-dev-team members (PM, Dev, Reviewer). Specifically:
|
|
23
|
-
1. You MUST ensure a prizm-dev-team is available before starting any phase (see Step 1 below for reuse-or-create logic)
|
|
24
|
-
2. You MUST spawn PM, Dev, and Reviewer agents using the `Task` tool with `team_name` and `subagent_type` parameters
|
|
25
|
-
3. Every implementation, planning, and review phase MUST be executed by the appropriate team agent — NOT by you directly
|
|
26
|
-
4. If you attempt to do the work yourself without spawning team agents, the session is considered FAILED
|
|
27
|
-
|
|
28
|
-
### Team Definition Reference
|
|
29
|
-
|
|
30
|
-
The prizm-dev-team definition is maintained in the project at:
|
|
31
|
-
- **Source of truth**: `core/team/prizm-dev-team.json`
|
|
32
|
-
- **Installed team config (current platform)**: `{{TEAM_CONFIG_PATH}}`
|
|
33
|
-
- CodeBuddy: `~/.codebuddy/teams/prizm-dev-team/config.json` — full team config with members, may support reuse
|
|
34
|
-
- Claude Code: `.claude/team-info.json` — reference only (no native team system; agents are in `.claude/agents/`)
|
|
35
|
-
|
|
36
|
-
When creating a new team, use these files as reference for team member names, roles, agentTypes, and prompts.
|
|
37
|
-
|
|
38
|
-
### Feature Description
|
|
39
|
-
|
|
40
|
-
{{FEATURE_DESCRIPTION}}
|
|
41
|
-
|
|
42
|
-
### Acceptance Criteria
|
|
43
|
-
|
|
44
|
-
{{ACCEPTANCE_CRITERIA}}
|
|
45
|
-
|
|
46
|
-
### Dependencies (Already Completed)
|
|
47
|
-
|
|
48
|
-
{{COMPLETED_DEPENDENCIES}}
|
|
49
|
-
|
|
50
|
-
### App Global Context
|
|
51
|
-
|
|
52
|
-
{{GLOBAL_CONTEXT}}
|
|
53
|
-
|
|
54
|
-
## PrizmKit Directory Convention
|
|
55
|
-
|
|
56
|
-
**ALWAYS** use per-feature subdirectory `.prizmkit/specs/{{FEATURE_SLUG}}/`:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
.prizmkit/specs/{{FEATURE_SLUG}}/spec.md
|
|
60
|
-
.prizmkit/specs/{{FEATURE_SLUG}}/plan.md
|
|
61
|
-
.prizmkit/specs/{{FEATURE_SLUG}}/tasks.md
|
|
62
|
-
.prizmkit/specs/REGISTRY.md
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Execution Instructions
|
|
66
|
-
|
|
67
|
-
**YOU are the orchestrator. Do NOT delegate to a Coordinator agent. Execute each phase yourself by spawning the appropriate team agent with run_in_background=false and waiting for its result.**
|
|
68
|
-
|
|
69
|
-
**TEAM ENFORCEMENT**: Every phase below that mentions spawning a PM/Dev/Reviewer agent MUST use the `Task` tool with the active team's `team_name`. You MUST NOT skip the team setup step or attempt to perform PM/Dev/Reviewer work yourself. Violation of this rule constitutes a session failure.
|
|
70
|
-
|
|
71
|
-
### Step 1: Initialize
|
|
72
|
-
|
|
73
|
-
#### Team Setup: Reuse or Create
|
|
74
|
-
|
|
75
|
-
Different AI CLI platforms have different team lifecycle behaviors. Some support reusing an existing team across sessions; others require creating a new team every time.
|
|
76
|
-
|
|
77
|
-
**Follow this logic to determine team availability:**
|
|
78
|
-
|
|
79
|
-
1. **Check if a team already exists and can be reused**:
|
|
80
|
-
- Read the team config file at `{{TEAM_CONFIG_PATH}}`
|
|
81
|
-
- If it exists and is valid (has members with correct agentTypes like `prizm-dev-team-pm`, `prizm-dev-team-dev`, `prizm-dev-team-reviewer`), try to reuse it
|
|
82
|
-
- Set `TEAM_REUSED=true` and record the `team_name` from the config
|
|
83
|
-
|
|
84
|
-
2. **If no reusable team exists, create a new one**:
|
|
85
|
-
- Reference the team definition at `core/team/prizm-dev-team.json` (source of truth for member roles and prompts)
|
|
86
|
-
- Call `TeamCreate` with `team_name="prizm-dev-team-{{FEATURE_ID}}"` and `description="Implementing {{FEATURE_TITLE}}"`
|
|
87
|
-
- Set `TEAM_REUSED=false`
|
|
88
|
-
|
|
89
|
-
3. **Record which path was taken** — this determines whether `TeamDelete` is needed at the end (only delete if you created; do NOT delete a reused team)
|
|
90
|
-
|
|
91
|
-
{{IF_FRESH_START}}
|
|
92
|
-
#### Initialize dev-team directories
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
python3 {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}
|
|
96
|
-
```
|
|
97
|
-
{{END_IF_FRESH_START}}
|
|
98
|
-
|
|
99
|
-
{{IF_RESUME}}
|
|
100
|
-
#### Resume Context
|
|
101
|
-
|
|
102
|
-
This is a **resume** from Phase {{RESUME_PHASE}}. After completing the team setup above:
|
|
103
|
-
1. Read artifacts in `.prizmkit/specs/{{FEATURE_SLUG}}/` (spec.md, plan.md, tasks.md)
|
|
104
|
-
2. Resume the pipeline from Phase {{RESUME_PHASE}} below
|
|
105
|
-
{{END_IF_RESUME}}
|
|
106
|
-
|
|
107
|
-
### Step 2: Pipeline Phases
|
|
108
|
-
|
|
109
|
-
{{IF_INIT_NEEDED}}
|
|
110
|
-
#### Phase 0: Project Bootstrap
|
|
111
|
-
- Run `prizmkit.init` (invoke the prizmkit-init skill)
|
|
112
|
-
- Run `python3 {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
|
|
113
|
-
- **CP-0**: Verify `.prizm-docs/root.prizm`, `.prizmkit/config.json` exist
|
|
114
|
-
{{END_IF_INIT_NEEDED}}
|
|
115
|
-
{{IF_INIT_DONE}}
|
|
116
|
-
#### Phase 0: SKIP (already initialized)
|
|
117
|
-
{{END_IF_INIT_DONE}}
|
|
118
|
-
|
|
119
|
-
{{IF_MODE_LITE}}
|
|
120
|
-
#### Phase 1-3: Lightweight Planning (combined)
|
|
121
|
-
- Spawn PM agent (Task tool, subagent_type="prizm-dev-team-pm", run_in_background=false)
|
|
122
|
-
Prompt: "Read {{PM_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}), create a CONCISE implementation plan. Write:
|
|
123
|
-
1. `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` — brief architecture (under 100 lines): key components, data flow, file structure
|
|
124
|
-
2. `.prizmkit/specs/{{FEATURE_SLUG}}/tasks.md` — task checklist with `[ ]` checkboxes, each task = one implementable unit
|
|
125
|
-
Do NOT generate spec.md. Keep it minimal."
|
|
126
|
-
- **Wait for PM to return**
|
|
127
|
-
- **CP-1**: plan.md and tasks.md exist
|
|
128
|
-
|
|
129
|
-
#### Phase 4: SKIP (lite mode)
|
|
130
|
-
{{END_IF_MODE_LITE}}
|
|
131
|
-
|
|
132
|
-
{{IF_MODE_STANDARD}}
|
|
133
|
-
#### Phase 1-3: Specify + Plan + Tasks (combined, one PM session)
|
|
134
|
-
- Spawn PM agent (Task tool, subagent_type="prizm-dev-team-pm", run_in_background=false)
|
|
135
|
-
Prompt: "Read {{PM_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}), complete all three planning steps in this single session:
|
|
136
|
-
1. Run prizmkit-specify → generate `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md` (concise, under 150 lines)
|
|
137
|
-
2. Run prizmkit-plan → generate `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` (architecture, components, interface design, data model, testing strategy — all in one file)
|
|
138
|
-
3. Run prizmkit-tasks → generate `.prizmkit/specs/{{FEATURE_SLUG}}/tasks.md` with `[ ]` checkboxes
|
|
139
|
-
All three files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`."
|
|
140
|
-
- **Wait for PM to return**
|
|
141
|
-
- **CP-1**: spec.md, plan.md, and tasks.md all exist
|
|
142
|
-
|
|
143
|
-
#### Phase 4: Analyze (cross-check)
|
|
144
|
-
- Spawn Reviewer agent (Task tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false)
|
|
145
|
-
Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. Run prizmkit-analyze for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}). Cross-check `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md`, `plan.md`, and `tasks.md` for consistency. Report any CRITICAL or HIGH issues."
|
|
146
|
-
- **Wait for Reviewer to return**
|
|
147
|
-
- If CRITICAL issues found: spawn PM to fix, then re-run analyze (max 1 round)
|
|
148
|
-
- **CP-2**: No CRITICAL issues
|
|
149
|
-
{{END_IF_MODE_STANDARD}}
|
|
150
|
-
|
|
151
|
-
{{IF_MODE_FULL}}
|
|
152
|
-
#### Phase 1-3: Specify + Plan + Tasks (combined, one PM session)
|
|
153
|
-
- Spawn PM agent (Task tool, subagent_type="prizm-dev-team-pm", run_in_background=false)
|
|
154
|
-
Prompt: "Read {{PM_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}), complete all three planning steps in this single session:
|
|
155
|
-
1. Run prizmkit-specify → generate `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md`. If there are `[NEEDS CLARIFICATION]` markers, run prizmkit-clarify to resolve them.
|
|
156
|
-
2. Run prizmkit-plan → generate `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` (architecture, components, interface design, data model, testing strategy, risk assessment — all in one file)
|
|
157
|
-
3. Run prizmkit-tasks → generate `.prizmkit/specs/{{FEATURE_SLUG}}/tasks.md` with `[ ]` checkboxes
|
|
158
|
-
All three files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`."
|
|
159
|
-
- **Wait for PM to return**
|
|
160
|
-
- **CP-1**: spec.md, plan.md, and tasks.md all exist
|
|
161
|
-
|
|
162
|
-
#### Phase 4: Analyze (cross-check)
|
|
163
|
-
- Spawn Reviewer agent (Task tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false)
|
|
164
|
-
Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. Run prizmkit-analyze for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}). Cross-check `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md`, `plan.md`, and `tasks.md` for consistency. Report any CRITICAL or HIGH issues."
|
|
165
|
-
- **Wait for Reviewer to return**
|
|
166
|
-
- If CRITICAL issues found: spawn PM to fix, then re-run analyze (max 1 round)
|
|
167
|
-
- **CP-2**: No CRITICAL issues
|
|
168
|
-
{{END_IF_MODE_FULL}}
|
|
169
|
-
|
|
170
|
-
#### Phase 5: Schedule & Implement
|
|
171
|
-
- Read tasks from `.prizmkit/specs/{{FEATURE_SLUG}}/tasks.md`
|
|
172
|
-
- Create TaskList entries and assign to Dev agents
|
|
173
|
-
- Spawn Dev agent (Task tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
174
|
-
Prompt: "Read {{DEV_SUBAGENT_PATH}}. Implement all tasks for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}) using prizmkit-implement with TDD. Read the plan from `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` and tasks from `tasks.md`. Mark completed tasks [x] in tasks.md."
|
|
175
|
-
- **Wait for Dev to return**
|
|
176
|
-
- All tasks marked `[x]`, tests pass
|
|
177
|
-
|
|
178
|
-
#### Phase 6: Review
|
|
179
|
-
- Spawn Reviewer agent (Task tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false)
|
|
180
|
-
Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
181
|
-
1. Run prizmkit-code-review for spec compliance and code quality
|
|
182
|
-
2. Write and execute integration tests covering all user stories from spec.md
|
|
183
|
-
Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
184
|
-
- **Wait for Reviewer to return**
|
|
185
|
-
- If NEEDS_FIXES: spawn Dev to fix, then re-run Review (max 3 rounds)
|
|
186
|
-
- **CP-3**: Integration tests pass, review verdict is not NEEDS_FIXES
|
|
187
|
-
|
|
188
|
-
#### Phase 7: Summarize & Commit — DO NOT SKIP
|
|
189
|
-
|
|
190
|
-
**IMPORTANT**: Phase 7 is for **new feature** commits only. If this session is a bug fix to an existing feature, skip `prizmkit.summarize` (do NOT create new REGISTRY.md entries for bug fixes — bugs are refinements of incomplete features, not new functionality). Still run `prizmkit.committer` with `fix(<scope>):` prefix.
|
|
191
|
-
|
|
192
|
-
**7a.** Run `prizmkit.summarize` (invoke the prizmkit-summarize skill) → archive to REGISTRY.md
|
|
193
|
-
|
|
194
|
-
**7b.** BEFORE commit, mark current feature as completed in feature-list:
|
|
195
|
-
```bash
|
|
196
|
-
python3 {{VALIDATOR_SCRIPTS_DIR}}/update-feature-status.py \
|
|
197
|
-
--feature-list "{{FEATURE_LIST_PATH}}" \
|
|
198
|
-
--state-dir "{{PROJECT_ROOT}}/dev-pipeline/state" \
|
|
199
|
-
--feature-id "{{FEATURE_ID}}" \
|
|
200
|
-
--session-id "{{SESSION_ID}}" \
|
|
201
|
-
--action complete
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**7c.** Run `prizmkit.committer` (invoke the prizmkit-committer skill) → `feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`, do NOT push
|
|
205
|
-
|
|
206
|
-
### Step 3: Report Session Status
|
|
207
|
-
|
|
208
|
-
**CRITICAL**: Before this session ends, you MUST write the session status file.
|
|
209
|
-
|
|
210
|
-
Write to: `{{SESSION_STATUS_PATH}}`
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"session_id": "{{SESSION_ID}}",
|
|
215
|
-
"feature_id": "{{FEATURE_ID}}",
|
|
216
|
-
"feature_slug": "{{FEATURE_SLUG}}",
|
|
217
|
-
"status": "<success|partial|failed>",
|
|
218
|
-
"completed_phases": [0, 1, 2, 3, 4, 5, 6, 7],
|
|
219
|
-
"current_phase": 7,
|
|
220
|
-
"checkpoint_reached": "CP-3",
|
|
221
|
-
"tasks_completed": 12,
|
|
222
|
-
"tasks_total": 12,
|
|
223
|
-
"errors": [],
|
|
224
|
-
"can_resume": false,
|
|
225
|
-
"resume_from_phase": null,
|
|
226
|
-
"artifacts": {
|
|
227
|
-
"spec_path": ".prizmkit/specs/{{FEATURE_SLUG}}/spec.md",
|
|
228
|
-
"plan_path": ".prizmkit/specs/{{FEATURE_SLUG}}/plan.md",
|
|
229
|
-
"tasks_path": ".prizmkit/specs/{{FEATURE_SLUG}}/tasks.md"
|
|
230
|
-
},
|
|
231
|
-
"git_commit": "<commit hash if Phase 7 completed>",
|
|
232
|
-
"timestamp": "2026-03-04T10:00:00Z"
|
|
233
|
-
}
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
**Status values**: `success` (all phases done) | `partial` (can resume) | `failed` (unrecoverable)
|
|
237
|
-
|
|
238
|
-
If you encounter an error, still write session-status.json with status="failed" and error details.
|
|
239
|
-
|
|
240
|
-
### Step 4: Team Cleanup (conditional)
|
|
241
|
-
|
|
242
|
-
**Only if you CREATED the team in Step 1** (i.e. `TEAM_REUSED=false`), clean up:
|
|
243
|
-
```
|
|
244
|
-
TeamDelete
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**If you REUSED an existing team** (i.e. `TEAM_REUSED=true`), do NOT call `TeamDelete` — the team is shared and may be used by other sessions.
|
|
248
|
-
|
|
249
|
-
## Critical Paths
|
|
250
|
-
|
|
251
|
-
| Resource | Path |
|
|
252
|
-
|----------|------|
|
|
253
|
-
| Team Definition (source of truth) | `core/team/prizm-dev-team.json` |
|
|
254
|
-
| Team Config (installed) | `{{TEAM_CONFIG_PATH}}` |
|
|
255
|
-
| Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
|
|
256
|
-
| PM Agent Def | {{PM_SUBAGENT_PATH}} |
|
|
257
|
-
| Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
|
|
258
|
-
| Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
|
|
259
|
-
| Session Status Output | {{SESSION_STATUS_PATH}} |
|
|
260
|
-
| Project Root | {{PROJECT_ROOT}} |
|
|
261
|
-
| Feature List Path | {{FEATURE_LIST_PATH}} |
|
|
262
|
-
|
|
263
|
-
## Reminders
|
|
264
|
-
|
|
265
|
-
- **MANDATORY**: You MUST use `prizm-dev-team` (reuse existing or create new) — single-agent execution is FORBIDDEN
|
|
266
|
-
- **Team definition source**: `core/team/prizm-dev-team.json`; installed at `{{TEAM_CONFIG_PATH}}`
|
|
267
|
-
- **All artifacts go under `.prizmkit/specs/{{FEATURE_SLUG}}/`** — only 3 files: spec.md, plan.md, tasks.md
|
|
268
|
-
- Dev agents use TDD approach
|
|
269
|
-
- Phase 7 (summarize + commit) is MANDATORY
|
|
270
|
-
- ALWAYS write session-status.json before exiting
|
|
271
|
-
- **NEVER exit the session early** — wait for all spawned agents to complete
|
|
272
|
-
- Do NOT use `run_in_background=true` when spawning agents
|
|
273
|
-
- Only call `TeamDelete` if you created the team; do NOT delete a reused team
|
|
9
|
+
`generate-bootstrap-prompt.py` selects the correct file automatically based on `estimated_complexity`.
|
|
10
|
+
This file is kept as a fallback only — if none of the tier files exist, the script falls back to this path.
|