mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-10 17:11:04 +08:00
Enhance UX and Coordinator Role Constraints in Skills Documentation
- Added detailed constraints for the Coordinator role in the team UX improvement skill, emphasizing orchestration responsibilities and workflow management. - Updated test cases in DashboardToolbar, useIssues, and useWebSocket to improve reliability and clarity. - Introduced new tests for configStore and ignore patterns in Codex Lens to ensure proper functionality and configuration handling. - Enhanced smart search functionality with improved embedding selection logic and added tests for various scenarios. - Updated installation and usage documentation to reflect changes in directory structure and role specifications.
This commit is contained in:
@@ -8,12 +8,12 @@ description: |
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
- Context: Coordinator spawns analyst worker
|
- Context: Coordinator spawns analyst worker
|
||||||
user: "role: analyst\nrole_spec: .claude/skills/team-lifecycle/role-specs/analyst.md\nsession: .workflow/.team/TLS-xxx"
|
user: "role: analyst\nrole_spec: ~ or <project>/.claude/skills/team-lifecycle/role-specs/analyst.md\nsession: .workflow/.team/TLS-xxx"
|
||||||
assistant: "Loading role spec, discovering RESEARCH-* tasks, executing Phase 2-4 domain logic"
|
assistant: "Loading role spec, discovering RESEARCH-* tasks, executing Phase 2-4 domain logic"
|
||||||
commentary: Agent parses prompt, loads role spec, runs built-in Phase 1 then role-specific Phase 2-4 then built-in Phase 5
|
commentary: Agent parses prompt, loads role spec, runs built-in Phase 1 then role-specific Phase 2-4 then built-in Phase 5
|
||||||
|
|
||||||
- Context: Coordinator spawns writer worker with inner loop
|
- Context: Coordinator spawns writer worker with inner loop
|
||||||
user: "role: writer\nrole_spec: .claude/skills/team-lifecycle/role-specs/writer.md\ninner_loop: true"
|
user: "role: writer\nrole_spec: ~ or <project>/.claude/skills/team-lifecycle/role-specs/writer.md\ninner_loop: true"
|
||||||
assistant: "Loading role spec, processing all DRAFT-* tasks in inner loop"
|
assistant: "Loading role spec, processing all DRAFT-* tasks in inner loop"
|
||||||
commentary: Agent detects inner_loop=true, loops Phase 1-5 for each same-prefix task
|
commentary: Agent detects inner_loop=true, loops Phase 1-5 for each same-prefix task
|
||||||
color: green
|
color: green
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-arch-opt/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-arch-opt/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: arch-opt
|
team_name: arch-opt
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ Find ready tasks, spawn workers, STOP.
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-arch-opt/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-arch-opt/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: arch-opt
|
team_name: arch-opt
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"team_name": "arch-opt",
|
"team_name": "arch-opt",
|
||||||
"team_display_name": "Architecture Optimization",
|
"team_display_name": "Architecture Optimization",
|
||||||
"skill_name": "team-arch-opt",
|
"skill_name": "team-arch-opt",
|
||||||
"skill_path": ".claude/skills/team-arch-opt/",
|
"skill_path": "~ or <project>/.claude/skills/team-arch-opt/",
|
||||||
"pipeline_type": "Linear with Review-Fix Cycle (Parallel-Capable)",
|
"pipeline_type": "Linear with Review-Fix Cycle (Parallel-Capable)",
|
||||||
"completion_action": "interactive",
|
"completion_action": "interactive",
|
||||||
"has_inline_discuss": true,
|
"has_inline_discuss": true,
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-brainstorm/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-brainstorm/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: brainstorm
|
team_name: brainstorm
|
||||||
@@ -89,7 +89,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: ideator
|
role: ideator
|
||||||
role_spec: .claude/skills/team-brainstorm/roles/ideator/role.md
|
role_spec: ~ or <project>/.claude/skills/team-brainstorm/roles/ideator/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: brainstorm
|
team_name: brainstorm
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ Find ready tasks, spawn workers, STOP.
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-brainstorm/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-brainstorm/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: brainstorm
|
team_name: brainstorm
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Generate complete team skills following the team-lifecycle-v4 architecture: SKIL
|
|||||||
## Key Design Principles
|
## Key Design Principles
|
||||||
|
|
||||||
1. **v4 Architecture Compliance**: Generated skills follow team-lifecycle-v4 pattern — SKILL.md = pure router, beat model = coordinator-only, unified structure (roles/ + specs/ + templates/)
|
1. **v4 Architecture Compliance**: Generated skills follow team-lifecycle-v4 pattern — SKILL.md = pure router, beat model = coordinator-only, unified structure (roles/ + specs/ + templates/)
|
||||||
2. **Golden Sample Reference**: Uses `team-lifecycle-v4` as reference implementation at `.claude/skills/team-lifecycle-v4/`
|
2. **Golden Sample Reference**: Uses `team-lifecycle-v4` as reference implementation at `~ or <project>/.claude/skills/team-lifecycle-v4/`
|
||||||
3. **Intelligent Commands Distribution**: Auto-determines which roles need `commands/` (2+ commands) vs inline logic (1 command)
|
3. **Intelligent Commands Distribution**: Auto-determines which roles need `commands/` (2+ commands) vs inline logic (1 command)
|
||||||
4. **team-worker Compatibility**: Role.md files include correct YAML frontmatter for team-worker agent parsing
|
4. **team-worker Compatibility**: Role.md files include correct YAML frontmatter for team-worker agent parsing
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ Return:
|
|||||||
|
|
||||||
## Golden Sample
|
## Golden Sample
|
||||||
|
|
||||||
Generated skills follow the architecture of `.claude/skills/team-lifecycle-v4/`:
|
Generated skills follow the architecture of `~ or <project>/.claude/skills/team-lifecycle-v4/`:
|
||||||
|
|
||||||
```
|
```
|
||||||
.claude/skills/<skill-name>/
|
.claude/skills/<skill-name>/
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Generate all role files, specs, and templates based on `teamConfig` and the gene
|
|||||||
|
|
||||||
## Golden Sample Reference
|
## Golden Sample Reference
|
||||||
|
|
||||||
Read the golden sample at `.claude/skills/team-lifecycle-v4/` for each file type before generating. This ensures pattern fidelity.
|
Read the golden sample at `~ or <project>/.claude/skills/team-lifecycle-v4/` for each file type before generating. This ensures pattern fidelity.
|
||||||
|
|
||||||
## Step 3.1: Generate Coordinator
|
## Step 3.1: Generate Coordinator
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ For each additional spec in `teamConfig.specs` (beyond pipelines), generate doma
|
|||||||
|
|
||||||
For each template in `teamConfig.templates`:
|
For each template in `teamConfig.templates`:
|
||||||
|
|
||||||
1. Check if golden sample has matching template at `.claude/skills/team-lifecycle-v4/templates/`
|
1. Check if golden sample has matching template at `~ or <project>/.claude/skills/team-lifecycle-v4/templates/`
|
||||||
2. If exists: copy and adapt for new domain
|
2. If exists: copy and adapt for new domain
|
||||||
3. If not: generate domain-appropriate template structure
|
3. If not: generate domain-appropriate template structure
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Agent({
|
|||||||
name: "<role>",
|
name: "<role>",
|
||||||
team_name: "<team_name>",
|
team_name: "<team_name>",
|
||||||
prompt: `role: <role>
|
prompt: `role: <role>
|
||||||
role_spec: .claude/skills/team-edict/role-specs/<role>.md
|
role_spec: ~ or <project>/.claude/skills/team-edict/role-specs/<role>.md
|
||||||
session: <session_path>
|
session: <session_path>
|
||||||
session_id: <session_id>
|
session_id: <session_id>
|
||||||
team_name: <team_name>
|
team_name: <team_name>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ team_msg(operation="log", session_id=<session_id>, from="xingbu",
|
|||||||
|
|
||||||
1. 读取当前任务(QA-* task description)
|
1. 读取当前任务(QA-* task description)
|
||||||
2. 读取 `<session_path>/plan/dispatch-plan.md` 获取验收标准
|
2. 读取 `<session_path>/plan/dispatch-plan.md` 获取验收标准
|
||||||
3. 读取 `.claude/skills/team-edict/specs/quality-gates.md` 获取质量门标准
|
3. 读取 `~ or <project>/.claude/skills/team-edict/specs/quality-gates.md` 获取质量门标准
|
||||||
4. 读取被测部门(通常为工部)的产出报告
|
4. 读取被测部门(通常为工部)的产出报告
|
||||||
|
|
||||||
## Phase 3: 质量审查
|
## Phase 3: 质量审查
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Phase 0/1 启动时执行
|
// Phase 0/1 启动时执行
|
||||||
Read(".claude/skills/team-edict/specs/team-config.json") // 加载路由规则和artifact路径
|
Read("~ or <project>/.claude/skills/team-edict/specs/team-config.json") // 加载路由规则和artifact路径
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -106,7 +106,7 @@ Read(".claude/skills/team-edict/specs/team-config.json") // 加载路由规则
|
|||||||
name: "zhongshu",
|
name: "zhongshu",
|
||||||
team_name: <team_name>,
|
team_name: <team_name>,
|
||||||
prompt: `role: zhongshu
|
prompt: `role: zhongshu
|
||||||
role_spec: .claude/skills/team-edict/role-specs/zhongshu.md
|
role_spec: ~ or <project>/.claude/skills/team-edict/role-specs/zhongshu.md
|
||||||
session: <session_path>
|
session: <session_path>
|
||||||
session_id: <session_id>
|
session_id: <session_id>
|
||||||
team_name: <team_name>
|
team_name: <team_name>
|
||||||
@@ -138,7 +138,7 @@ inner_loop: false`,
|
|||||||
name: "menxia",
|
name: "menxia",
|
||||||
team_name: <team_name>,
|
team_name: <team_name>,
|
||||||
prompt: `role: menxia
|
prompt: `role: menxia
|
||||||
role_spec: .claude/skills/team-edict/role-specs/menxia.md
|
role_spec: ~ or <project>/.claude/skills/team-edict/role-specs/menxia.md
|
||||||
session: <session_path>
|
session: <session_path>
|
||||||
session_id: <session_id>
|
session_id: <session_id>
|
||||||
team_name: <team_name>
|
team_name: <team_name>
|
||||||
@@ -177,7 +177,7 @@ inner_loop: false`,
|
|||||||
name: "shangshu",
|
name: "shangshu",
|
||||||
team_name: <team_name>,
|
team_name: <team_name>,
|
||||||
prompt: `role: shangshu
|
prompt: `role: shangshu
|
||||||
role_spec: .claude/skills/team-edict/role-specs/shangshu.md
|
role_spec: ~ or <project>/.claude/skills/team-edict/role-specs/shangshu.md
|
||||||
session: <session_path>
|
session: <session_path>
|
||||||
session_id: <session_id>
|
session_id: <session_id>
|
||||||
team_name: <team_name>
|
team_name: <team_name>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-frontend-debug/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-frontend-debug/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: <team-name>
|
team_name: <team-name>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ EXPECTED: <artifact path> + <quality criteria>
|
|||||||
CONSTRAINTS: <scope limits>
|
CONSTRAINTS: <scope limits>
|
||||||
---
|
---
|
||||||
InnerLoop: <true|false>
|
InnerLoop: <true|false>
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/<role>/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/<role>/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -55,7 +55,7 @@ EXPECTED: <session>/artifacts/TEST-001-report.md + <session>/artifacts/TEST-001-
|
|||||||
CONSTRAINTS: Use Chrome DevTools MCP only | Do not modify any code | Test all listed features
|
CONSTRAINTS: Use Chrome DevTools MCP only | Do not modify any code | Test all listed features
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/tester/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/tester/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### ANALYZE-001 (Test Mode): Analyze Discovered Issues
|
### ANALYZE-001 (Test Mode): Analyze Discovered Issues
|
||||||
@@ -75,7 +75,7 @@ EXPECTED: <session>/artifacts/ANALYZE-001-rca.md with root causes for all issues
|
|||||||
CONSTRAINTS: Read-only analysis | Skip low-severity warnings unless user requests
|
CONSTRAINTS: Read-only analysis | Skip low-severity warnings unless user requests
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/analyzer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/analyzer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
**Conditional**: If TEST-001 reports zero issues → skip ANALYZE-001, FIX-001, VERIFY-001. Pipeline completes.
|
**Conditional**: If TEST-001 reports zero issues → skip ANALYZE-001, FIX-001, VERIFY-001. Pipeline completes.
|
||||||
@@ -96,7 +96,7 @@ EXPECTED: Modified source files + <session>/artifacts/FIX-001-changes.md
|
|||||||
CONSTRAINTS: Minimal changes per issue | Follow existing code style
|
CONSTRAINTS: Minimal changes per issue | Follow existing code style
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/fixer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/fixer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### VERIFY-001 (Test Mode): Re-Test After Fix
|
### VERIFY-001 (Test Mode): Re-Test After Fix
|
||||||
@@ -117,7 +117,7 @@ EXPECTED: <session>/artifacts/VERIFY-001-report.md with pass/fail per previously
|
|||||||
CONSTRAINTS: Only re-test failed scenarios | Use Chrome DevTools MCP only
|
CONSTRAINTS: Only re-test failed scenarios | Use Chrome DevTools MCP only
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/verifier/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/verifier/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -143,7 +143,7 @@ EXPECTED: <session>/evidence/ directory with all captures + reproduction report
|
|||||||
CONSTRAINTS: Use Chrome DevTools MCP only | Do not modify any code
|
CONSTRAINTS: Use Chrome DevTools MCP only | Do not modify any code
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/reproducer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/reproducer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### ANALYZE-001 (Debug Mode): Root Cause Analysis
|
### ANALYZE-001 (Debug Mode): Root Cause Analysis
|
||||||
@@ -164,7 +164,7 @@ EXPECTED: <session>/artifacts/ANALYZE-001-rca.md with root cause, file:line, fix
|
|||||||
CONSTRAINTS: Read-only analysis | Request more evidence if inconclusive
|
CONSTRAINTS: Read-only analysis | Request more evidence if inconclusive
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/analyzer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/analyzer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### FIX-001 (Debug Mode): Code Fix
|
### FIX-001 (Debug Mode): Code Fix
|
||||||
@@ -183,7 +183,7 @@ EXPECTED: Modified source files + <session>/artifacts/FIX-001-changes.md
|
|||||||
CONSTRAINTS: Minimal changes | Follow existing code style | No breaking changes
|
CONSTRAINTS: Minimal changes | Follow existing code style | No breaking changes
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/fixer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/fixer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### VERIFY-001 (Debug Mode): Fix Verification
|
### VERIFY-001 (Debug Mode): Fix Verification
|
||||||
@@ -203,7 +203,7 @@ EXPECTED: <session>/artifacts/VERIFY-001-report.md with pass/fail verdict
|
|||||||
CONSTRAINTS: Use Chrome DevTools MCP only | Same steps as reproduction
|
CONSTRAINTS: Use Chrome DevTools MCP only | Same steps as reproduction
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/verifier/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/verifier/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -219,7 +219,7 @@ TASK: <specific evidence requests from Analyzer>
|
|||||||
CONTEXT: Session + Analyzer request
|
CONTEXT: Session + Analyzer request
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/reproducer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/reproducer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### FIX-002 (Either Mode): Re-Fix After Failed Verification
|
### FIX-002 (Either Mode): Re-Fix After Failed Verification
|
||||||
@@ -231,7 +231,7 @@ TASK: Review VERIFY-001 failure details, apply corrective fix
|
|||||||
CONTEXT: Session + VERIFY-001-report.md
|
CONTEXT: Session + VERIFY-001-report.md
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-frontend-debug/roles/fixer/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-frontend-debug/roles/fixer/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
## Conditional Skip Rules
|
## Conditional Skip Rules
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-frontend/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-frontend/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: frontend
|
team_name: frontend
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-frontend/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-frontend/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: frontend
|
team_name: frontend
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-issue/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: issue
|
team_name: issue
|
||||||
@@ -89,7 +89,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-issue/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: issue
|
team_name: issue
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ Find ready tasks, spawn workers, STOP.
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-issue/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: issue
|
team_name: issue
|
||||||
@@ -133,7 +133,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-issue/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: issue
|
team_name: issue
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-iterdev/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-iterdev/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: iterdev
|
team_name: iterdev
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-iterdev/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-iterdev/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: iterdev
|
team_name: iterdev
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-lifecycle-v4/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-lifecycle-v4/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: <team-name>
|
team_name: <team-name>
|
||||||
@@ -98,7 +98,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: supervisor
|
role: supervisor
|
||||||
role_spec: .claude/skills/team-lifecycle-v4/roles/supervisor/role.md
|
role_spec: ~ or <project>/.claude/skills/team-lifecycle-v4/roles/supervisor/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: <team-name>
|
team_name: <team-name>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ EXPECTED: <artifact path> + <quality criteria>
|
|||||||
CONSTRAINTS: <scope limits>
|
CONSTRAINTS: <scope limits>
|
||||||
---
|
---
|
||||||
InnerLoop: <true|false>
|
InnerLoop: <true|false>
|
||||||
RoleSpec: .claude/skills/team-lifecycle-v4/roles/<role>/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-lifecycle-v4/roles/<role>/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
## InnerLoop Flag Rules
|
## InnerLoop Flag Rules
|
||||||
@@ -45,7 +45,7 @@ CHECKPOINT tasks are dispatched like regular tasks but handled differently at sp
|
|||||||
- Owner: supervisor
|
- Owner: supervisor
|
||||||
- **NOT spawned as team-worker** — coordinator wakes the resident supervisor via SendMessage
|
- **NOT spawned as team-worker** — coordinator wakes the resident supervisor via SendMessage
|
||||||
- If `supervision: false` in team-session.json, skip creating CHECKPOINT tasks entirely
|
- If `supervision: false` in team-session.json, skip creating CHECKPOINT tasks entirely
|
||||||
- RoleSpec in description: `.claude/skills/team-lifecycle-v4/roles/supervisor/role.md`
|
- RoleSpec in description: `~ or <project>/.claude/skills/team-lifecycle-v4/roles/supervisor/role.md`
|
||||||
|
|
||||||
## Dependency Validation
|
## Dependency Validation
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-perf-opt/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-perf-opt/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: perf-opt
|
team_name: perf-opt
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-perf-opt/role-specs/<role>.md
|
role_spec: ~ or <project>/.claude/skills/team-perf-opt/role-specs/<role>.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: perf-opt
|
team_name: perf-opt
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol).
|
|||||||
### Initial Spawn
|
### Initial Spawn
|
||||||
|
|
||||||
Find first unblocked task and spawn its worker using SKILL.md Worker Spawn Template with:
|
Find first unblocked task and spawn its worker using SKILL.md Worker Spawn Template with:
|
||||||
- `role_spec: .claude/skills/team-perf-opt/roles/<role>/role.md`
|
- `role_spec: ~ or <project>/.claude/skills/team-perf-opt/roles/<role>/role.md`
|
||||||
- `team_name: perf-opt`
|
- `team_name: perf-opt`
|
||||||
|
|
||||||
**STOP** after spawning. Wait for worker callback.
|
**STOP** after spawning. Wait for worker callback.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"team_name": "perf-opt",
|
"team_name": "perf-opt",
|
||||||
"team_display_name": "Performance Optimization",
|
"team_display_name": "Performance Optimization",
|
||||||
"skill_name": "team-perf-opt",
|
"skill_name": "team-perf-opt",
|
||||||
"skill_path": ".claude/skills/team-perf-opt/",
|
"skill_path": "~ or <project>/.claude/skills/team-perf-opt/",
|
||||||
"worker_agent": "team-worker",
|
"worker_agent": "team-worker",
|
||||||
"pipeline_type": "Linear with Review-Fix Cycle (Parallel-Capable)",
|
"pipeline_type": "Linear with Review-Fix Cycle (Parallel-Capable)",
|
||||||
"completion_action": "interactive",
|
"completion_action": "interactive",
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-planex/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-planex/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: planex
|
team_name: planex
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ Collect task states from TaskList()
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-planex/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-planex/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: <team-name>
|
team_name: <team-name>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-quality-assurance/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-quality-assurance/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: quality-assurance
|
team_name: quality-assurance
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ EXPECTED: <artifact path> + <quality criteria>
|
|||||||
CONSTRAINTS: <scope limits>
|
CONSTRAINTS: <scope limits>
|
||||||
---
|
---
|
||||||
InnerLoop: <true|false>
|
InnerLoop: <true|false>
|
||||||
RoleSpec: .claude/skills/team-quality-assurance/roles/<role>/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/<role>/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pipeline Task Registry
|
## Pipeline Task Registry
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ EXPECTED: Fixed test files | Improved coverage
|
|||||||
CONSTRAINTS: Only modify test files | No source changes
|
CONSTRAINTS: Only modify test files | No source changes
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-quality-assurance/roles/generator/role.md"
|
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/generator/role.md"
|
||||||
})
|
})
|
||||||
TaskCreate({
|
TaskCreate({
|
||||||
subject: "QARUN-gc-<round>: Re-execute <layer> (GC #<round>)",
|
subject: "QARUN-gc-<round>: Re-execute <layer> (GC #<round>)",
|
||||||
@@ -72,7 +72,7 @@ EXPECTED: <session>/results/run-<layer>-gc-<round>.json
|
|||||||
CONSTRAINTS: Read-only execution
|
CONSTRAINTS: Read-only execution
|
||||||
---
|
---
|
||||||
InnerLoop: false
|
InnerLoop: false
|
||||||
RoleSpec: .claude/skills/team-quality-assurance/roles/executor/role.md",
|
RoleSpec: ~ or <project>/.claude/skills/team-quality-assurance/roles/executor/role.md",
|
||||||
blockedBy: ["QAGEN-fix-<round>"]
|
blockedBy: ["QAGEN-fix-<round>"]
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
@@ -149,7 +149,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-quality-assurance/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-quality-assurance/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: quality-assurance
|
team_name: quality-assurance
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-review/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-review/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: review
|
team_name: review
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ EXPECTED: <artifact path> + <quality criteria>
|
|||||||
CONSTRAINTS: <scope limits>
|
CONSTRAINTS: <scope limits>
|
||||||
---
|
---
|
||||||
InnerLoop: <true|false>
|
InnerLoop: <true|false>
|
||||||
RoleSpec: .claude/skills/team-review/roles/<role>/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-review/roles/<role>/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pipeline Task Registry
|
## Pipeline Task Registry
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ Event-driven pipeline coordination. Beat model: coordinator wake -> process -> s
|
|||||||
|
|
||||||
| Prefix | Role | Role Spec | inner_loop |
|
| Prefix | Role | Role Spec | inner_loop |
|
||||||
|--------|------|-----------|------------|
|
|--------|------|-----------|------------|
|
||||||
| SCAN-* | scanner | `.claude/skills/team-review/roles/scanner/role.md` | false |
|
| SCAN-* | scanner | `~ or <project>/.claude/skills/team-review/roles/scanner/role.md` | false |
|
||||||
| REV-* | reviewer | `.claude/skills/team-review/roles/reviewer/role.md` | false |
|
| REV-* | reviewer | `~ or <project>/.claude/skills/team-review/roles/reviewer/role.md` | false |
|
||||||
| FIX-* | fixer | `.claude/skills/team-review/roles/fixer/role.md` | true |
|
| FIX-* | fixer | `~ or <project>/.claude/skills/team-review/roles/fixer/role.md` | true |
|
||||||
|
|
||||||
## handleCallback
|
## handleCallback
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-review/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-review/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: review
|
team_name: review
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-roadmap-dev/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-roadmap-dev/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: roadmap-dev
|
team_name: roadmap-dev
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ Handle all coordinator monitoring events for the roadmap-dev pipeline using the
|
|||||||
|
|
||||||
| Prefix | Role | Role Spec | inner_loop |
|
| Prefix | Role | Role Spec | inner_loop |
|
||||||
|--------|------|-----------|------------|
|
|--------|------|-----------|------------|
|
||||||
| PLAN | planner | `.claude/skills/team-roadmap-dev/roles/planner/role.md` | true (cli_tools: gemini --mode analysis) |
|
| PLAN | planner | `~ or <project>/.claude/skills/team-roadmap-dev/roles/planner/role.md` | true (cli_tools: gemini --mode analysis) |
|
||||||
| EXEC | executor | `.claude/skills/team-roadmap-dev/roles/executor/role.md` | true (cli_tools: gemini --mode write) |
|
| EXEC | executor | `~ or <project>/.claude/skills/team-roadmap-dev/roles/executor/role.md` | true (cli_tools: gemini --mode write) |
|
||||||
| VERIFY | verifier | `.claude/skills/team-roadmap-dev/roles/verifier/role.md` | true |
|
| VERIFY | verifier | `~ or <project>/.claude/skills/team-roadmap-dev/roles/verifier/role.md` | true |
|
||||||
|
|
||||||
### Pipeline Structure
|
### Pipeline Structure
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-roadmap-dev/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-roadmap-dev/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: roadmap-dev
|
team_name: roadmap-dev
|
||||||
|
|||||||
@@ -88,6 +88,6 @@ Phase N: PLAN-N01 --> EXEC-N01 --> VERIFY-N01
|
|||||||
|
|
||||||
| Prefix | Role | Role Spec | Inner Loop |
|
| Prefix | Role | Role Spec | Inner Loop |
|
||||||
|--------|------|-----------|------------|
|
|--------|------|-----------|------------|
|
||||||
| PLAN | planner | `.claude/skills/team-roadmap-dev/roles/planner/role.md` | true |
|
| PLAN | planner | `~ or <project>/.claude/skills/team-roadmap-dev/roles/planner/role.md` | true |
|
||||||
| EXEC | executor | `.claude/skills/team-roadmap-dev/roles/executor/role.md` | true |
|
| EXEC | executor | `~ or <project>/.claude/skills/team-roadmap-dev/roles/executor/role.md` | true |
|
||||||
| VERIFY | verifier | `.claude/skills/team-roadmap-dev/roles/verifier/role.md` | true |
|
| VERIFY | verifier | `~ or <project>/.claude/skills/team-roadmap-dev/roles/verifier/role.md` | true |
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"team_name": "roadmap-dev",
|
"team_name": "roadmap-dev",
|
||||||
"team_display_name": "Roadmap Dev",
|
"team_display_name": "Roadmap Dev",
|
||||||
"skill_name": "team-roadmap-dev",
|
"skill_name": "team-roadmap-dev",
|
||||||
"skill_path": ".claude/skills/team-roadmap-dev/",
|
"skill_path": "~ or <project>/.claude/skills/team-roadmap-dev/",
|
||||||
"design_source": "roadmap-driven development workflow design (2026-02-24)",
|
"design_source": "roadmap-driven development workflow design (2026-02-24)",
|
||||||
"pipeline_type": "Phased",
|
"pipeline_type": "Phased",
|
||||||
"pipeline": {
|
"pipeline": {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-tech-debt/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-tech-debt/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: tech-debt
|
team_name: tech-debt
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-tech-debt/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-tech-debt/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: tech-debt
|
team_name: tech-debt
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-testing/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: testing
|
team_name: testing
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ EXPECTED: <deliverable path> + <quality criteria>
|
|||||||
CONSTRAINTS: <scope limits, focus areas>
|
CONSTRAINTS: <scope limits, focus areas>
|
||||||
---
|
---
|
||||||
InnerLoop: <true|false>
|
InnerLoop: <true|false>
|
||||||
RoleSpec: .claude/skills/team-testing/roles/<role>/role.md
|
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pipeline Task Registry
|
## Pipeline Task Registry
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ Event-driven pipeline coordination. Beat model: coordinator wake -> process -> s
|
|||||||
|
|
||||||
| Prefix | Role | Role Spec | inner_loop |
|
| Prefix | Role | Role Spec | inner_loop |
|
||||||
|--------|------|-----------|------------|
|
|--------|------|-----------|------------|
|
||||||
| STRATEGY-* | strategist | `.claude/skills/team-testing/roles/strategist/role.md` | false |
|
| STRATEGY-* | strategist | `~ or <project>/.claude/skills/team-testing/roles/strategist/role.md` | false |
|
||||||
| TESTGEN-* | generator | `.claude/skills/team-testing/roles/generator/role.md` | true |
|
| TESTGEN-* | generator | `~ or <project>/.claude/skills/team-testing/roles/generator/role.md` | true |
|
||||||
| TESTRUN-* | executor | `.claude/skills/team-testing/roles/executor/role.md` | true |
|
| TESTRUN-* | executor | `~ or <project>/.claude/skills/team-testing/roles/executor/role.md` | true |
|
||||||
| TESTANA-* | analyst | `.claude/skills/team-testing/roles/analyst/role.md` | false |
|
| TESTANA-* | analyst | `~ or <project>/.claude/skills/team-testing/roles/analyst/role.md` | false |
|
||||||
|
|
||||||
## handleCallback
|
## handleCallback
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ EXPECTED: Revised test files in <session>/tests/<layer>/
|
|||||||
CONSTRAINTS: Only modify test files
|
CONSTRAINTS: Only modify test files
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-testing/roles/generator/role.md"
|
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/generator/role.md"
|
||||||
})
|
})
|
||||||
TaskCreate({
|
TaskCreate({
|
||||||
subject: "TESTRUN-<layer>-fix-<round>: Re-execute <layer> (GC #<round>)",
|
subject: "TESTRUN-<layer>-fix-<round>: Re-execute <layer> (GC #<round>)",
|
||||||
@@ -80,7 +80,7 @@ CONTEXT:
|
|||||||
EXPECTED: <session>/results/run-<N>-gc.json
|
EXPECTED: <session>/results/run-<N>-gc.json
|
||||||
---
|
---
|
||||||
InnerLoop: true
|
InnerLoop: true
|
||||||
RoleSpec: .claude/skills/team-testing/roles/executor/role.md",
|
RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/executor/role.md",
|
||||||
blockedBy: ["TESTGEN-<layer>-fix-<round>"]
|
blockedBy: ["TESTGEN-<layer>-fix-<round>"]
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
@@ -150,7 +150,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-testing/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: testing
|
team_name: testing
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-uidesign/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-uidesign/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: uidesign
|
team_name: uidesign
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-uidesign/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-uidesign/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: uidesign
|
team_name: uidesign
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-ultra-analyze/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-ultra-analyze/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: ultra-analyze
|
team_name: ultra-analyze
|
||||||
|
|||||||
@@ -211,10 +211,10 @@ Find and spawn the next ready tasks.
|
|||||||
|
|
||||||
| Task Prefix | Role | Role Spec |
|
| Task Prefix | Role | Role Spec |
|
||||||
|-------------|------|-----------|
|
|-------------|------|-----------|
|
||||||
| `EXPLORE-*` | explorer | `.claude/skills/team-ultra-analyze/role-specs/explorer.md` |
|
| `EXPLORE-*` | explorer | `~ or <project>/.claude/skills/team-ultra-analyze/role-specs/explorer.md` |
|
||||||
| `ANALYZE-*` | analyst | `.claude/skills/team-ultra-analyze/role-specs/analyst.md` |
|
| `ANALYZE-*` | analyst | `~ or <project>/.claude/skills/team-ultra-analyze/role-specs/analyst.md` |
|
||||||
| `DISCUSS-*` | discussant | `.claude/skills/team-ultra-analyze/role-specs/discussant.md` |
|
| `DISCUSS-*` | discussant | `~ or <project>/.claude/skills/team-ultra-analyze/role-specs/discussant.md` |
|
||||||
| `SYNTH-*` | synthesizer | `.claude/skills/team-ultra-analyze/role-specs/synthesizer.md` |
|
| `SYNTH-*` | synthesizer | `~ or <project>/.claude/skills/team-ultra-analyze/role-specs/synthesizer.md` |
|
||||||
|
|
||||||
3. Spawn team-worker for each ready task:
|
3. Spawn team-worker for each ready task:
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-ultra-analyze/role-specs/<role>.md
|
role_spec: ~ or <project>/.claude/skills/team-ultra-analyze/role-specs/<role>.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: ultra-analyze
|
team_name: ultra-analyze
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol):
|
|||||||
### Initial Spawn
|
### Initial Spawn
|
||||||
|
|
||||||
Find first unblocked tasks and spawn their workers. Use SKILL.md Worker Spawn Template with:
|
Find first unblocked tasks and spawn their workers. Use SKILL.md Worker Spawn Template with:
|
||||||
- `role_spec: .claude/skills/team-ultra-analyze/roles/<role>/role.md`
|
- `role_spec: ~ or <project>/.claude/skills/team-ultra-analyze/roles/<role>/role.md`
|
||||||
- `team_name: ultra-analyze`
|
- `team_name: ultra-analyze`
|
||||||
- `inner_loop: false`
|
- `inner_loop: false`
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-ux-improve/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-ux-improve/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: ux-improve
|
team_name: ux-improve
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Agent({
|
|||||||
run_in_background: true,
|
run_in_background: true,
|
||||||
prompt: `## Role Assignment
|
prompt: `## Role Assignment
|
||||||
role: <role>
|
role: <role>
|
||||||
role_spec: .claude/skills/team-ux-improve/roles/<role>/role.md
|
role_spec: ~ or <project>/.claude/skills/team-ux-improve/roles/<role>/role.md
|
||||||
session: <session-folder>
|
session: <session-folder>
|
||||||
session_id: <session-id>
|
session_id: <session-id>
|
||||||
team_name: ux-improve
|
team_name: ux-improve
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ TEXT-LEVEL ONLY. No source code reading.
|
|||||||
├── explorations/
|
├── explorations/
|
||||||
└── wisdom/contributions/
|
└── wisdom/contributions/
|
||||||
```
|
```
|
||||||
3. **Wisdom Initialization**: Copy `.claude/skills/team-ux-improve/wisdom/` to `<session>/wisdom/`
|
3. **Wisdom Initialization**: Copy `~ or <project>/.claude/skills/team-ux-improve/wisdom/` to `<session>/wisdom/`
|
||||||
4. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata
|
4. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata
|
||||||
5. TeamCreate(team_name="ux-improve")
|
5. TeamCreate(team_name="ux-improve")
|
||||||
6. Do NOT spawn workers yet - deferred to Phase 4
|
6. Do NOT spawn workers yet - deferred to Phase 4
|
||||||
@@ -110,7 +110,7 @@ Delegate to `commands/monitor.md#handleSpawnNext`:
|
|||||||
|
|
||||||
3. **Wisdom Consolidation**: Check `<session>/wisdom/contributions/` for worker contributions
|
3. **Wisdom Consolidation**: Check `<session>/wisdom/contributions/` for worker contributions
|
||||||
- If contributions exist -> AskUserQuestion to merge to permanent wisdom
|
- If contributions exist -> AskUserQuestion to merge to permanent wisdom
|
||||||
- If approved -> copy to `.claude/skills/team-ux-improve/wisdom/`
|
- If approved -> copy to `~ or <project>/.claude/skills/team-ux-improve/wisdom/`
|
||||||
|
|
||||||
4. Calculate: completed_tasks, total_issues_found, issues_fixed, test_pass_rate
|
4. Calculate: completed_tasks, total_issues_found, issues_fixed, test_pass_rate
|
||||||
5. Output pipeline summary with [coordinator] prefix
|
5. Output pipeline summary with [coordinator] prefix
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ UX improvement pipeline modes and task registry.
|
|||||||
|
|
||||||
## Wisdom System
|
## Wisdom System
|
||||||
|
|
||||||
Workers contribute learnings to `<session>/wisdom/contributions/`. On pipeline completion, coordinator asks user to merge approved contributions to permanent wisdom at `.claude/skills/team-ux-improve/wisdom/`.
|
Workers contribute learnings to `<session>/wisdom/contributions/`. On pipeline completion, coordinator asks user to merge approved contributions to permanent wisdom at `~ or <project>/.claude/skills/team-ux-improve/wisdom/`.
|
||||||
|
|
||||||
| Directory | Purpose |
|
| Directory | Purpose |
|
||||||
|-----------|---------|
|
|-----------|---------|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"team_display_name": "UX Improve",
|
"team_display_name": "UX Improve",
|
||||||
"team_purpose": "Systematically discover and fix UI/UX interaction issues including unresponsive buttons, missing feedback, and state refresh problems",
|
"team_purpose": "Systematically discover and fix UI/UX interaction issues including unresponsive buttons, missing feedback, and state refresh problems",
|
||||||
"skill_name": "team-ux-improve",
|
"skill_name": "team-ux-improve",
|
||||||
"skill_path": ".claude/skills/team-ux-improve/",
|
"skill_path": "~ or <project>/.claude/skills/team-ux-improve/",
|
||||||
"worker_agent": "team-worker",
|
"worker_agent": "team-worker",
|
||||||
"pipeline_type": "Standard",
|
"pipeline_type": "Standard",
|
||||||
"completion_action": "interactive",
|
"completion_action": "interactive",
|
||||||
|
|||||||
@@ -658,3 +658,41 @@ All agents (csv-wave and interactive) share a single `discoveries.ndjson` file f
|
|||||||
8. **Max 3 Fix Cycles**: Review-fix cycle capped at 3 iterations; escalate to user after
|
8. **Max 3 Fix Cycles**: Review-fix cycle capped at 3 iterations; escalate to user after
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
### MANDATORY FIRST STEPS
|
### MANDATORY FIRST STEPS
|
||||||
1. Read shared discoveries: {session_folder}/discoveries.ndjson (if exists, skip if not)
|
1. Read shared discoveries: {session_folder}/discoveries.ndjson (if exists, skip if not)
|
||||||
2. Read project context: .workflow/project-tech.json (if exists)
|
2. Read project context: .workflow/project-tech.json (if exists)
|
||||||
3. Read task schema: .codex/skills/team-arch-opt/schemas/tasks-schema.md
|
3. Read task schema: ~ or <project>/.codex/skills/team-arch-opt/schemas/tasks-schema.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ const clarifier = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-brainstorm/agents/topic-clarifier.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-brainstorm/agents/topic-clarifier.md (MUST read first)
|
||||||
2. Read: .workflow/project-tech.json (if exists)
|
2. Read: .workflow/project-tech.json (if exists)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -478,7 +478,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-brainstorm/agents/gc-controller.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-brainstorm/agents/gc-controller.md (MUST read first)
|
||||||
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -685,3 +685,41 @@ When the challenger returns critique results with severity-graded verdicts:
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -627,3 +627,41 @@ See `instructions/agent-instruction.md` for the base instruction template that i
|
|||||||
8. **Dynamic Roles**: All worker roles are generated at runtime from task analysis -- no static role registry
|
8. **Dynamic Roles**: All worker roles are generated at runtime from task analysis -- no static role registry
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ All agents (csv-wave and interactive) share a single `discoveries.ndjson` file f
|
|||||||
**Format**: One JSON object per line (NDJSON):
|
**Format**: One JSON object per line (NDJSON):
|
||||||
|
|
||||||
```jsonl
|
```jsonl
|
||||||
{"ts":"2026-03-08T10:00:00Z","worker":"SCAFFOLD-001","type":"dir_created","data":{"path":".codex/skills/team-code-review/","description":"Created skill directory structure"}}
|
{"ts":"2026-03-08T10:00:00Z","worker":"SCAFFOLD-001","type":"dir_created","data":{"path":"~ or <project>/.codex/skills/team-code-review/","description":"Created skill directory structure"}}
|
||||||
{"ts":"2026-03-08T10:05:00Z","worker":"ROLE-001","type":"file_generated","data":{"file":"roles/coordinator/role.md","gen_type":"role-bundle","sections":["entry-router","commands"]}}
|
{"ts":"2026-03-08T10:05:00Z","worker":"ROLE-001","type":"file_generated","data":{"file":"roles/coordinator/role.md","gen_type":"role-bundle","sections":["entry-router","commands"]}}
|
||||||
{"ts":"2026-03-08T10:10:00Z","worker":"SPEC-001","type":"pattern_found","data":{"pattern_name":"full-lifecycle","description":"Pipeline with analyst -> writer -> executor -> tester"}}
|
{"ts":"2026-03-08T10:10:00Z","worker":"SPEC-001","type":"pattern_found","data":{"pattern_name":"full-lifecycle","description":"Pipeline with analyst -> writer -> executor -> tester"}}
|
||||||
```
|
```
|
||||||
@@ -651,3 +651,41 @@ All agents (csv-wave and interactive) share a single `discoveries.ndjson` file f
|
|||||||
8. **Golden Sample Fidelity**: Generated files must match existing team skill patterns
|
8. **Golden Sample Fidelity**: Generated files must match existing team skill patterns
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ Interactive tasks appear in master CSV for dependency tracking but are NOT inclu
|
|||||||
|
|
||||||
```csv
|
```csv
|
||||||
id,title,description,role,file_target,gen_type,deps,context_from,exec_mode,wave,status,findings,files_produced,error
|
id,title,description,role,file_target,gen_type,deps,context_from,exec_mode,wave,status,findings,files_produced,error
|
||||||
"SCAFFOLD-001","Create directory structure","Create complete directory structure for team-code-review skill:\n- .codex/skills/team-code-review/\n- roles/coordinator/ + commands/\n- roles/analyst/\n- roles/reviewer/\n- specs/\n- templates/","scaffolder","skill-dir","directory","","","csv-wave","1","pending","","",""
|
"SCAFFOLD-001","Create directory structure","Create complete directory structure for team-code-review skill:\n- ~ or <project>/.codex/skills/team-code-review/\n- roles/coordinator/ + commands/\n- roles/analyst/\n- roles/reviewer/\n- specs/\n- templates/","scaffolder","skill-dir","directory","","","csv-wave","1","pending","","",""
|
||||||
"ROUTER-001","Generate SKILL.md","Generate .codex/skills/team-code-review/SKILL.md with:\n- Frontmatter (name, description, allowed-tools)\n- Architecture diagram\n- Role registry table\n- CSV schema reference\n- Session structure\n- Wave execution engine\nUse teamConfig.json for role list and pipeline definitions","router-writer","SKILL.md","router","SCAFFOLD-001","SCAFFOLD-001","csv-wave","2","pending","","",""
|
"ROUTER-001","Generate SKILL.md","Generate ~ or <project>/.codex/skills/team-code-review/SKILL.md with:\n- Frontmatter (name, description, allowed-tools)\n- Architecture diagram\n- Role registry table\n- CSV schema reference\n- Session structure\n- Wave execution engine\nUse teamConfig.json for role list and pipeline definitions","router-writer","SKILL.md","router","SCAFFOLD-001","SCAFFOLD-001","csv-wave","2","pending","","",""
|
||||||
"SPEC-001","Generate pipelines spec","Generate specs/pipelines.md with:\n- Pipeline definitions from teamConfig\n- Task registry with PREFIX-NNN format\n- Conditional routing rules\n- Dynamic specialist injection\nRoles: analyst(ANALYSIS-*), reviewer(REVIEW-*)","spec-writer","specs/pipelines.md","spec","SCAFFOLD-001","SCAFFOLD-001","csv-wave","2","pending","","",""
|
"SPEC-001","Generate pipelines spec","Generate specs/pipelines.md with:\n- Pipeline definitions from teamConfig\n- Task registry with PREFIX-NNN format\n- Conditional routing rules\n- Dynamic specialist injection\nRoles: analyst(ANALYSIS-*), reviewer(REVIEW-*)","spec-writer","specs/pipelines.md","spec","SCAFFOLD-001","SCAFFOLD-001","csv-wave","2","pending","","",""
|
||||||
"ROLE-001","Generate coordinator","Generate roles/coordinator/role.md with entry router and commands/analyze.md, commands/dispatch.md, commands/monitor.md. Coordinator orchestrates the analysis pipeline","role-writer","roles/coordinator/","role-bundle","SCAFFOLD-001;SPEC-001","SPEC-001","csv-wave","3","pending","","",""
|
"ROLE-001","Generate coordinator","Generate roles/coordinator/role.md with entry router and commands/analyze.md, commands/dispatch.md, commands/monitor.md. Coordinator orchestrates the analysis pipeline","role-writer","roles/coordinator/","role-bundle","SCAFFOLD-001;SPEC-001","SPEC-001","csv-wave","3","pending","","",""
|
||||||
"ROLE-002","Generate analyst role","Generate roles/analyst/role.md with Phase 2 (context loading), Phase 3 (analysis execution), Phase 4 (output). Prefix: ANALYSIS, inner_loop: false","role-writer","roles/analyst/role.md","role-inline","SCAFFOLD-001;SPEC-001","SPEC-001","csv-wave","3","pending","","",""
|
"ROLE-002","Generate analyst role","Generate roles/analyst/role.md with Phase 2 (context loading), Phase 3 (analysis execution), Phase 4 (output). Prefix: ANALYSIS, inner_loop: false","role-writer","roles/analyst/role.md","role-inline","SCAFFOLD-001;SPEC-001","SPEC-001","csv-wave","3","pending","","",""
|
||||||
@@ -144,7 +144,7 @@ Interactive tasks output via structured text or JSON written to `interactive/{id
|
|||||||
### Discovery NDJSON Format
|
### Discovery NDJSON Format
|
||||||
|
|
||||||
```jsonl
|
```jsonl
|
||||||
{"ts":"2026-03-08T10:00:00Z","worker":"SCAFFOLD-001","type":"dir_created","data":{"path":".codex/skills/team-code-review/roles/","description":"Created roles directory with coordinator, analyst, reviewer subdirs"}}
|
{"ts":"2026-03-08T10:00:00Z","worker":"SCAFFOLD-001","type":"dir_created","data":{"path":"~ or <project>/.codex/skills/team-code-review/roles/","description":"Created roles directory with coordinator, analyst, reviewer subdirs"}}
|
||||||
{"ts":"2026-03-08T10:05:00Z","worker":"ROLE-001","type":"file_generated","data":{"file":"roles/coordinator/role.md","gen_type":"role-bundle","sections":["entry-router","phase-0","phase-1","phase-2","phase-3"]}}
|
{"ts":"2026-03-08T10:05:00Z","worker":"ROLE-001","type":"file_generated","data":{"file":"roles/coordinator/role.md","gen_type":"role-bundle","sections":["entry-router","phase-0","phase-1","phase-2","phase-3"]}}
|
||||||
{"ts":"2026-03-08T10:10:00Z","worker":"SPEC-001","type":"config_decision","data":{"decision":"full-lifecycle pipeline","rationale":"Both analyst and reviewer roles present","impact":"4-tier dependency graph"}}
|
{"ts":"2026-03-08T10:10:00Z","worker":"SPEC-001","type":"config_decision","data":{"decision":"full-lifecycle pipeline","rationale":"Both analyst and reviewer roles present","impact":"4-tier dependency graph"}}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ Each wave generates a temporary `wave-{N}.csv` with extra `prev_context` column
|
|||||||
4. Create subdirectories: plan/, review/, artifacts/, interactive/, agents/
|
4. Create subdirectories: plan/, review/, artifacts/, interactive/, agents/
|
||||||
5. Initialize registry.json: { "active": [], "closed": [] }
|
5. Initialize registry.json: { "active": [], "closed": [] }
|
||||||
6. Initialize discoveries.ndjson (empty file)
|
6. Initialize discoveries.ndjson (empty file)
|
||||||
7. Read specs: .codex/skills/team-edict/specs/team-config.json
|
7. Read specs: ~ or <project>/.codex/skills/team-edict/specs/team-config.json
|
||||||
8. Read quality gates: .codex/skills/team-edict/specs/quality-gates.md
|
8. Read quality gates: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md
|
||||||
9. Log session start to context.md
|
9. Log session start to context.md
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -236,9 +236,9 @@ const zhongshu = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-edict/agents/zhongshu-planner.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/zhongshu-planner.md (MUST read first)
|
||||||
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries, skip if not exists)
|
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries, skip if not exists)
|
||||||
3. Read: .codex/skills/team-edict/specs/team-config.json (routing rules)
|
3. Read: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ while (!approved && reviewRound < 3) {
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-edict/agents/menxia-reviewer.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/menxia-reviewer.md (MUST read first)
|
||||||
2. Read: ${sessionDir}/plan/zhongshu-plan.md (plan to review)
|
2. Read: ${sessionDir}/plan/zhongshu-plan.md (plan to review)
|
||||||
3. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
|
3. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
|
||||||
|
|
||||||
@@ -336,10 +336,10 @@ const shangshu = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-edict/agents/shangshu-dispatcher.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/shangshu-dispatcher.md (MUST read first)
|
||||||
2. Read: ${sessionDir}/plan/zhongshu-plan.md (approved plan)
|
2. Read: ${sessionDir}/plan/zhongshu-plan.md (approved plan)
|
||||||
3. Read: ${sessionDir}/review/menxia-review.md (review conditions)
|
3. Read: ${sessionDir}/review/menxia-review.md (review conditions)
|
||||||
4. Read: .codex/skills/team-edict/specs/team-config.json (routing rules)
|
4. Read: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -416,8 +416,8 @@ For each wave W in 1..max_wave:
|
|||||||
5. EXECUTE csv-wave tasks:
|
5. EXECUTE csv-wave tasks:
|
||||||
spawn_agents_on_csv({
|
spawn_agents_on_csv({
|
||||||
task_csv_path: "${sessionDir}/wave-{W}.csv",
|
task_csv_path: "${sessionDir}/wave-{W}.csv",
|
||||||
instruction_path: ".codex/skills/team-edict/instructions/agent-instruction.md",
|
instruction_path: "~ or <project>/.codex/skills/team-edict/instructions/agent-instruction.md",
|
||||||
schema_path: ".codex/skills/team-edict/schemas/tasks-schema.md",
|
schema_path: "~ or <project>/.codex/skills/team-edict/schemas/tasks-schema.md",
|
||||||
additional_instructions: "Session directory: ${sessionDir}. Department: {department}. Priority: {priority}.",
|
additional_instructions: "Session directory: ${sessionDir}. Department: {department}. Priority: {priority}.",
|
||||||
concurrency: CONCURRENCY
|
concurrency: CONCURRENCY
|
||||||
})
|
})
|
||||||
@@ -457,10 +457,10 @@ const aggregator = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-edict/agents/aggregator.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/aggregator.md (MUST read first)
|
||||||
2. Read: ${sessionDir}/tasks.csv (master state)
|
2. Read: ${sessionDir}/tasks.csv (master state)
|
||||||
3. Read: ${sessionDir}/discoveries.ndjson (all discoveries)
|
3. Read: ${sessionDir}/discoveries.ndjson (all discoveries)
|
||||||
4. Read: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
4. Read: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@ Deliverables: ${sessionDir}/context.md (final report)
|
|||||||
${listAllArtifacts()}
|
${listAllArtifacts()}
|
||||||
|
|
||||||
### Quality Gate Standards
|
### Quality Gate Standards
|
||||||
Read from: .codex/skills/team-edict/specs/quality-gates.md
|
Read from: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -609,9 +609,9 @@ const agent = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-edict/agents/qa-verifier.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/qa-verifier.md (MUST read first)
|
||||||
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
|
||||||
3. Read: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
3. Read: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -740,3 +740,42 @@ spawn_agent({
|
|||||||
12. **Rejection Loop Max 3**: Menxia can reject max 3 times before escalating to user
|
12. **Rejection Loop Max 3**: Menxia can reject max 3 times before escalating to user
|
||||||
13. **Kanban is Mandatory**: All agents must report state transitions via discoveries.ndjson
|
13. **Kanban is Mandatory**: All agents must report state transitions via discoveries.ndjson
|
||||||
14. **Quality Gates Apply**: Phase 3 aggregator validates all outputs against specs/quality-gates.md
|
14. **Quality Gates Apply**: Phase 3 aggregator validates all outputs against specs/quality-gates.md
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Crown Prince / Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned agents (Three Departments and Six Ministries). The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results into master CSV
|
||||||
|
- Coordinates workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms (600s for planning, 300s for execution)
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages (e.g., jumping from Zhongshu directly to Shangshu)
|
||||||
|
- Bypass the Three Departments serial pipeline
|
||||||
|
- Execute wave N before wave N-1 completes
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time: 30-90 minutes for typical edicts
|
||||||
|
- Phase 0 (Three Departments): 15-30 minutes
|
||||||
|
- Phase 2 (Wave Execution): 10-20 minutes per wave
|
||||||
|
- Phase 3 (Aggregation): 5-10 minutes
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Post-wave aggregation agent -- collects all ministry outputs, validates against
|
|||||||
4. Use Glob to find all files in `<session>/interactive/`
|
4. Use Glob to find all files in `<session>/interactive/`
|
||||||
5. Read each interactive result file
|
5. Read each interactive result file
|
||||||
6. Read `<session>/discoveries.ndjson` (all entries)
|
6. Read `<session>/discoveries.ndjson` (all entries)
|
||||||
7. Read `.codex/skills/team-edict/specs/quality-gates.md`
|
7. Read `~ or <project>/.codex/skills/team-edict/specs/quality-gates.md`
|
||||||
|
|
||||||
**Output**: All artifacts and status data collected
|
**Output**: All artifacts and status data collected
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Xingbu (Ministry of Justice / Quality Assurance) -- executes quality verificatio
|
|||||||
|
|
||||||
**Steps**:
|
**Steps**:
|
||||||
|
|
||||||
1. Read `.codex/skills/team-edict/specs/quality-gates.md`
|
1. Read `~ or <project>/.codex/skills/team-edict/specs/quality-gates.md`
|
||||||
2. Read `<session>/plan/dispatch-plan.md` for acceptance criteria
|
2. Read `<session>/plan/dispatch-plan.md` for acceptance criteria
|
||||||
3. Read implementation artifacts from `<session>/artifacts/`
|
3. Read implementation artifacts from `<session>/artifacts/`
|
||||||
4. Read `<session>/discoveries.ndjson` for implementation notes
|
4. Read `<session>/discoveries.ndjson` for implementation notes
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Shangshu (Department of State Affairs / Dispatch) -- parses the approved plan, r
|
|||||||
|
|
||||||
1. Read `<session>/plan/zhongshu-plan.md`
|
1. Read `<session>/plan/zhongshu-plan.md`
|
||||||
2. Read `<session>/review/menxia-review.md`
|
2. Read `<session>/review/menxia-review.md`
|
||||||
3. Read `.codex/skills/team-edict/specs/team-config.json`
|
3. Read `~ or <project>/.codex/skills/team-edict/specs/team-config.json`
|
||||||
4. Extract subtask list from plan
|
4. Extract subtask list from plan
|
||||||
5. Extract conditions from review
|
5. Extract conditions from review
|
||||||
6. Report state "Doing":
|
6. Report state "Doing":
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Zhongshu (Central Secretariat) -- analyzes the edict, explores the codebase, and
|
|||||||
**Steps**:
|
**Steps**:
|
||||||
|
|
||||||
1. Parse the edict text from the spawn message
|
1. Parse the edict text from the spawn message
|
||||||
2. Read `.codex/skills/team-edict/specs/team-config.json` for routing rules
|
2. Read `~ or <project>/.codex/skills/team-edict/specs/team-config.json` for routing rules
|
||||||
3. If revision round: Read `<session>/review/menxia-review.md` for rejection feedback
|
3. If revision round: Read `<session>/review/menxia-review.md` for rejection feedback
|
||||||
4. Read `<session>/discoveries.ndjson` if it exists
|
4. Read `<session>/discoveries.ndjson` if it exists
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
1. Read shared discoveries: .workflow/.csv-wave/{session-id}/discoveries.ndjson (if exists, skip if not)
|
1. Read shared discoveries: .workflow/.csv-wave/{session-id}/discoveries.ndjson (if exists, skip if not)
|
||||||
2. Read dispatch plan: .workflow/.csv-wave/{session-id}/plan/dispatch-plan.md (task details and acceptance criteria)
|
2. Read dispatch plan: .workflow/.csv-wave/{session-id}/plan/dispatch-plan.md (task details and acceptance criteria)
|
||||||
3. Read approved plan: .workflow/.csv-wave/{session-id}/plan/zhongshu-plan.md (overall strategy and context)
|
3. Read approved plan: .workflow/.csv-wave/{session-id}/plan/zhongshu-plan.md (overall strategy and context)
|
||||||
4. Read quality gates: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
4. Read quality gates: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
|
||||||
5. Read team config: .codex/skills/team-edict/specs/team-config.json (routing rules and artifact paths)
|
5. Read team config: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules and artifact paths)
|
||||||
|
|
||||||
> **Note**: The session directory path is provided by the orchestrator in `additional_instructions`. Use it to resolve the paths above.
|
> **Note**: The session directory path is provided by the orchestrator in `additional_instructions`. Use it to resolve the paths above.
|
||||||
|
|
||||||
|
|||||||
@@ -475,3 +475,41 @@ if (action === "Archive & Clean") {
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -781,3 +781,41 @@ After TEST-001 completes, evaluate issues:
|
|||||||
9. **Iteration Bounds**: Max 2 reproduction rounds, max 3 fix rounds
|
9. **Iteration Bounds**: Max 2 reproduction rounds, max 3 fix rounds
|
||||||
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
11. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
11. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -710,3 +710,41 @@ Convergence: qa.score >= 8 && qa.critical_count === 0
|
|||||||
8. **GC Loop Cap**: Max 2 generator-critic rounds between developer and qa
|
8. **GC Loop Cap**: Max 2 generator-critic rounds between developer and qa
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
spawn_agents_on_csv({
|
spawn_agents_on_csv({
|
||||||
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
||||||
id_column: "id",
|
id_column: "id",
|
||||||
instruction: Read(".codex/skills/team-issue/instructions/agent-instruction.md"),
|
instruction: Read("~ or <project>/.codex/skills/team-issue/instructions/agent-instruction.md"),
|
||||||
max_concurrency: maxConcurrency,
|
max_concurrency: maxConcurrency,
|
||||||
max_runtime_seconds: 1200,
|
max_runtime_seconds: 1200,
|
||||||
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
||||||
@@ -420,7 +420,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
const pendingInteractive = interactiveTasks.filter(t => t.status === 'pending')
|
const pendingInteractive = interactiveTasks.filter(t => t.status === 'pending')
|
||||||
for (const task of pendingInteractive) {
|
for (const task of pendingInteractive) {
|
||||||
// Read agent definition
|
// Read agent definition
|
||||||
const agentDef = Read(`.codex/skills/team-issue/agents/reviewer.md`)
|
const agentDef = Read(`~ or <project>/.codex/skills/team-issue/agents/reviewer.md`)
|
||||||
|
|
||||||
// Build context from upstream tasks
|
// Build context from upstream tasks
|
||||||
const contextIds = (task.context_from || '').split(';').filter(Boolean)
|
const contextIds = (task.context_from || '').split(';').filter(Boolean)
|
||||||
@@ -434,7 +434,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
message: `## TASK ASSIGNMENT
|
message: `## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-issue/agents/reviewer.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-issue/agents/reviewer.md (MUST read first)
|
||||||
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
||||||
3. Read: .workflow/project-tech.json (if exists)
|
3. Read: .workflow/project-tech.json (if exists)
|
||||||
|
|
||||||
@@ -700,3 +700,41 @@ Both csv-wave and interactive agents share the same discoveries.ndjson file:
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ const analyzer = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-iterdev/agents/task-analyzer.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-iterdev/agents/task-analyzer.md (MUST read first)
|
||||||
2. Read: .workflow/project-tech.json (if exists)
|
2. Read: .workflow/project-tech.json (if exists)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -484,7 +484,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
const waveResult = spawn_agents_on_csv({
|
const waveResult = spawn_agents_on_csv({
|
||||||
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
||||||
id_column: "id",
|
id_column: "id",
|
||||||
instruction: Read(`.codex/skills/team-iterdev/instructions/agent-instruction.md`),
|
instruction: Read(`~ or <project>/.codex/skills/team-iterdev/instructions/agent-instruction.md`),
|
||||||
max_concurrency: maxConcurrency,
|
max_concurrency: maxConcurrency,
|
||||||
max_runtime_seconds: 900,
|
max_runtime_seconds: 900,
|
||||||
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
||||||
@@ -533,7 +533,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-iterdev/agents/gc-controller.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-iterdev/agents/gc-controller.md (MUST read first)
|
||||||
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -786,3 +786,41 @@ When the reviewer returns review results with severity-graded verdicts:
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ const clarifier = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-lifecycle-v4/agents/requirement-clarifier.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-lifecycle-v4/agents/requirement-clarifier.md (MUST read first)
|
||||||
2. Read: .workflow/project-tech.json (if exists)
|
2. Read: .workflow/project-tech.json (if exists)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -436,7 +436,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
const waveResult = spawn_agents_on_csv({
|
const waveResult = spawn_agents_on_csv({
|
||||||
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
||||||
id_column: "id",
|
id_column: "id",
|
||||||
instruction: Read(`.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md`)
|
instruction: Read(`~ or <project>/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md`)
|
||||||
.replace(/{session-id}/g, sessionId),
|
.replace(/{session-id}/g, sessionId),
|
||||||
max_concurrency: maxConcurrency,
|
max_concurrency: maxConcurrency,
|
||||||
max_runtime_seconds: 900,
|
max_runtime_seconds: 900,
|
||||||
@@ -486,7 +486,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-lifecycle-v4/agents/supervisor.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-lifecycle-v4/agents/supervisor.md (MUST read first)
|
||||||
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -735,3 +735,41 @@ All agents across all waves share `discoveries.ndjson`. This enables cross-role
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -866,3 +866,41 @@ The orchestrator dynamically adds DEV-FE-NNN and QA-FE-NNN tasks to the state fi
|
|||||||
| Requirements Template | templates/requirements-prd.md | DRAFT-002 |
|
| Requirements Template | templates/requirements-prd.md | DRAFT-002 |
|
||||||
| Architecture Template | templates/architecture-doc.md | DRAFT-003 |
|
| Architecture Template | templates/architecture-doc.md | DRAFT-003 |
|
||||||
| Epics Template | templates/epics-template.md | DRAFT-004 |
|
| Epics Template | templates/epics-template.md | DRAFT-004 |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Seed analysis, codebase exploration (via shared explore subagent), and multi-dim
|
|||||||
## Identity
|
## Identity
|
||||||
|
|
||||||
- **Type**: `produce`
|
- **Type**: `produce`
|
||||||
- **Role File**: `~/.codex/skills/team-lifecycle/agents/analyst.md`
|
- **Role File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/analyst.md`
|
||||||
- **Prefix**: `RESEARCH-*`
|
- **Prefix**: `RESEARCH-*`
|
||||||
- **Tag**: `[analyst]`
|
- **Tag**: `[analyst]`
|
||||||
- **Responsibility**: Seed Analysis -> Codebase Exploration -> Context Packaging -> Inline Discuss -> Report
|
- **Responsibility**: Seed Analysis -> Codebase Exploration -> Context Packaging -> Inline Discuss -> Report
|
||||||
@@ -168,7 +168,7 @@ if (cached) {
|
|||||||
// Cache MISS - spawn explore subagent
|
// Cache MISS - spawn explore subagent
|
||||||
const explorer = spawn_agent({
|
const explorer = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/explore-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ After packaging, spawn discuss subagent (Pattern 2.8):
|
|||||||
```javascript
|
```javascript
|
||||||
const critic = spawn_agent({
|
const critic = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/discuss-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/discuss-agent.md
|
||||||
|
|
||||||
## Multi-Perspective Critique: DISCUSS-001
|
## Multi-Perspective Critique: DISCUSS-001
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ This agent spawns two utility subagents during its execution:
|
|||||||
### Explore Subagent (Phase 3)
|
### Explore Subagent (Phase 3)
|
||||||
|
|
||||||
**When**: After seed analysis, when project files detected
|
**When**: After seed analysis, when project files detected
|
||||||
**Agent File**: `~/.codex/skills/team-lifecycle/agents/explore-agent.md`
|
**Agent File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md`
|
||||||
**Pattern**: 2.9 (Cache-Aware Exploration)
|
**Pattern**: 2.9 (Cache-Aware Exploration)
|
||||||
|
|
||||||
See Phase 3 code block above. Cache is checked before spawning. If cache hit, the spawn is skipped entirely.
|
See Phase 3 code block above. Cache is checked before spawning. If cache hit, the spawn is skipped entirely.
|
||||||
@@ -305,7 +305,7 @@ See Phase 3 code block above. Cache is checked before spawning. If cache hit, th
|
|||||||
### Discuss Subagent (Phase 4b)
|
### Discuss Subagent (Phase 4b)
|
||||||
|
|
||||||
**When**: After context packaging (spec-config.json + discovery-context.json written)
|
**When**: After context packaging (spec-config.json + discovery-context.json written)
|
||||||
**Agent File**: `~/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
**Agent File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
||||||
**Pattern**: 2.8 (Inline Subagent)
|
**Pattern**: 2.8 (Inline Subagent)
|
||||||
|
|
||||||
See Phase 4b code block above.
|
See Phase 4b code block above.
|
||||||
@@ -342,7 +342,7 @@ if (cached) {
|
|||||||
// Cache MISS - spawn explore subagent, result cached by explore-agent
|
// Cache MISS - spawn explore subagent, result cached by explore-agent
|
||||||
const explorer = spawn_agent({
|
const explorer = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/explore-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Lightweight multi-perspective critique engine. Called inline by produce agents (
|
|||||||
## Identity
|
## Identity
|
||||||
|
|
||||||
- **Type**: `utility`
|
- **Type**: `utility`
|
||||||
- **Role File**: `~/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
- **Role File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
||||||
- **Tag**: `[discuss]`
|
- **Tag**: `[discuss]`
|
||||||
- **Responsibility**: Read Artifact -> Multi-CLI Perspective Analysis -> Divergence Detection -> Consensus Determination -> Write Discussion Record -> Return Verdict
|
- **Responsibility**: Read Artifact -> Multi-CLI Perspective Analysis -> Divergence Detection -> Consensus Determination -> Write Discussion Record -> Return Verdict
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Shared codebase exploration utility with centralized caching. Callable by any ag
|
|||||||
## Identity
|
## Identity
|
||||||
|
|
||||||
- **Type**: `utility`
|
- **Type**: `utility`
|
||||||
- **Role File**: `~/.codex/skills/team-lifecycle/agents/explore-agent.md`
|
- **Role File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md`
|
||||||
- **Tag**: `[explore]`
|
- **Tag**: `[explore]`
|
||||||
- **Responsibility**: Cache Check -> Codebase Exploration -> Cache Update -> Return Structured Results
|
- **Responsibility**: Cache Check -> Codebase Exploration -> Cache Update -> Return Structured Results
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ if (cached && !forceRefresh) {
|
|||||||
// After seed analysis, explore codebase context (Pattern 2.9 in analyst)
|
// After seed analysis, explore codebase context (Pattern 2.9 in analyst)
|
||||||
const explorer = spawn_agent({
|
const explorer = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/explore-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ for (const angle of angles) {
|
|||||||
// Cache check happens inside explore-agent
|
// Cache check happens inside explore-agent
|
||||||
const explorer = spawn_agent({
|
const explorer = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/explore-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/explore-agent.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Product Brief, Requirements/PRD, Architecture, and Epics & Stories document gene
|
|||||||
## Identity
|
## Identity
|
||||||
|
|
||||||
- **Type**: `produce`
|
- **Type**: `produce`
|
||||||
- **Role File**: `~/.codex/skills/team-lifecycle/agents/writer.md`
|
- **Role File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/writer.md`
|
||||||
- **Prefix**: `DRAFT-*`
|
- **Prefix**: `DRAFT-*`
|
||||||
- **Tag**: `[writer]`
|
- **Tag**: `[writer]`
|
||||||
- **Responsibility**: Load Context -> Generate Document -> Self-Validation -> Inline Discuss -> Report
|
- **Responsibility**: Load Context -> Generate Document -> Self-Validation -> Inline Discuss -> Report
|
||||||
@@ -382,7 +382,7 @@ After validation, spawn discuss subagent (Pattern 2.8) for this task's discuss r
|
|||||||
```javascript
|
```javascript
|
||||||
const critic = spawn_agent({
|
const critic = spawn_agent({
|
||||||
message: `### MANDATORY FIRST STEPS
|
message: `### MANDATORY FIRST STEPS
|
||||||
1. Read: ~/.codex/skills/team-lifecycle/agents/discuss-agent.md
|
1. Read: ~/~ or <project>/.codex/skills/team-lifecycle/agents/discuss-agent.md
|
||||||
|
|
||||||
## Multi-Perspective Critique: <DISCUSS-NNN>
|
## Multi-Perspective Critique: <DISCUSS-NNN>
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ This agent spawns the discuss subagent during Phase 4b:
|
|||||||
### Discuss Subagent (Phase 4b)
|
### Discuss Subagent (Phase 4b)
|
||||||
|
|
||||||
**When**: After self-validation of generated document
|
**When**: After self-validation of generated document
|
||||||
**Agent File**: `~/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
**Agent File**: `~/~ or <project>/.codex/skills/team-lifecycle/agents/discuss-agent.md`
|
||||||
**Pattern**: 2.8 (Inline Subagent)
|
**Pattern**: 2.8 (Inline Subagent)
|
||||||
|
|
||||||
See Phase 4b code block above. The round ID and perspectives vary per doc type -- use the Inline Discuss Mapping table.
|
See Phase 4b code block above. The round ID and perspectives vary per doc type -- use the Inline Discuss Mapping table.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Phase 1: Requirement Clarification
|
# Phase 1: Requirement Clarification
|
||||||
|
|
||||||
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/.codex/skills/team-lifecycle/phases/01-requirement-clarification.md")` before continuing. Never execute based on summaries.
|
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/~ or <project>/.codex/skills/team-lifecycle/phases/01-requirement-clarification.md")` before continuing. Never execute based on summaries.
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Phase 2: Team Initialization
|
# Phase 2: Team Initialization
|
||||||
|
|
||||||
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/.codex/skills/team-lifecycle/phases/02-team-initialization.md")` before continuing. Never execute based on summaries.
|
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/~ or <project>/.codex/skills/team-lifecycle/phases/02-team-initialization.md")` before continuing. Never execute based on summaries.
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Phase 3: Task Chain Creation
|
# Phase 3: Task Chain Creation
|
||||||
|
|
||||||
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/.codex/skills/team-lifecycle/phases/03-task-chain-creation.md")` before continuing. Never execute based on summaries.
|
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/~ or <project>/.codex/skills/team-lifecycle/phases/03-task-chain-creation.md")` before continuing. Never execute based on summaries.
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Phase 4: Pipeline Coordination
|
# Phase 4: Pipeline Coordination
|
||||||
|
|
||||||
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/.codex/skills/team-lifecycle/phases/04-pipeline-coordination.md")` before continuing. Never execute based on summaries.
|
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/~ or <project>/.codex/skills/team-lifecycle/phases/04-pipeline-coordination.md")` before continuing. Never execute based on summaries.
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Phase 5: Completion Report
|
# Phase 5: Completion Report
|
||||||
|
|
||||||
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/.codex/skills/team-lifecycle/phases/05-completion-report.md")` before continuing. Never execute based on summaries.
|
> **COMPACT PROTECTION**: This is an execution document. After context compression, phase instructions become summaries only. You MUST immediately re-read this file via `Read("~/~ or <project>/.codex/skills/team-lifecycle/phases/05-completion-report.md")` before continuing. Never execute based on summaries.
|
||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
|
|||||||
@@ -657,3 +657,41 @@ All agents (csv-wave and interactive) share a single `discoveries.ndjson` file f
|
|||||||
8. **Max 3 Fix Cycles**: Review-fix cycle capped at 3 iterations; escalate to user after
|
8. **Max 3 Fix Cycles**: Review-fix cycle capped at 3 iterations; escalate to user after
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
### MANDATORY FIRST STEPS
|
### MANDATORY FIRST STEPS
|
||||||
1. Read shared discoveries: {session_folder}/discoveries.ndjson (if exists, skip if not)
|
1. Read shared discoveries: {session_folder}/discoveries.ndjson (if exists, skip if not)
|
||||||
2. Read project context: .workflow/project-tech.json (if exists)
|
2. Read project context: .workflow/project-tech.json (if exists)
|
||||||
3. Read task schema: .codex/skills/team-perf-opt/schemas/tasks-schema.md
|
3. Read task schema: ~ or <project>/.codex/skills/team-perf-opt/schemas/tasks-schema.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
spawn_agents_on_csv({
|
spawn_agents_on_csv({
|
||||||
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
csv_path: `${sessionFolder}/wave-${wave}.csv`,
|
||||||
id_column: "id",
|
id_column: "id",
|
||||||
instruction: Read(".codex/skills/team-planex/instructions/agent-instruction.md"),
|
instruction: Read("~ or <project>/.codex/skills/team-planex/instructions/agent-instruction.md"),
|
||||||
max_concurrency: maxConcurrency,
|
max_concurrency: maxConcurrency,
|
||||||
max_runtime_seconds: 1200,
|
max_runtime_seconds: 1200,
|
||||||
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
output_csv_path: `${sessionFolder}/wave-${wave}-results.csv`,
|
||||||
@@ -597,3 +597,41 @@ Both planner and executor agents share the same discoveries.ndjson file:
|
|||||||
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
9. **Two-Wave Pipeline**: Wave 1 = Planning (PLAN-*), Wave 2 = Execution (EXEC-*)
|
9. **Two-Wave Pipeline**: Wave 1 = Planning (PLAN-*), Wave 2 = Execution (EXEC-*)
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -501,3 +501,41 @@ if (plannerAgent) {
|
|||||||
|---------|--------|
|
|---------|--------|
|
||||||
| `check` / `status` | Show progress: planned / executing / completed / failed counts |
|
| `check` / `status` | Show progress: planned / executing / completed / failed counts |
|
||||||
| `resume` / `continue` | Re-enter loop from Phase 2 |
|
| `resume` / `continue` | Re-enter loop from Phase 2 |
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -774,3 +774,41 @@ QAGEN -> QARUN -> (if coverage < target) -> GC Loop Handler
|
|||||||
9. **Scout Feeds Strategy**: Scout findings flow into strategist via prev_context and discoveries.ndjson
|
9. **Scout Feeds Strategy**: Scout findings flow into strategist via prev_context and discoveries.ndjson
|
||||||
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
11. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
11. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -493,3 +493,41 @@ send_input({
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -643,3 +643,41 @@ const discoveries = Read(`${sessionDir}/discoveries.ndjson`)
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent (tracked in registry.json)
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -668,3 +668,41 @@ Wave 3: TDVAL-001 (validator) -> 4-layer validation
|
|||||||
8. **GC Loop Bounded**: Maximum 3 fix-verify rounds before accepting current state
|
8. **GC Loop Bounded**: Maximum 3 fix-verify rounds before accepting current state
|
||||||
9. **Worktree Isolation**: All fix execution happens in git worktree, not main branch
|
9. **Worktree Isolation**: All fix execution happens in git worktree, not main branch
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -730,3 +730,41 @@ TESTGEN -> TESTRUN -> (if pass_rate < 0.95 OR coverage < target) -> GC Loop Hand
|
|||||||
8. **GC Loop Discipline**: Max 3 rounds per layer; never infinite-loop on coverage
|
8. **GC Loop Discipline**: Max 3 rounds per layer; never infinite-loop on coverage
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -727,3 +727,41 @@ Convergence: audit.score >= 8 AND audit.critical_count === 0
|
|||||||
8. **GC Loop Cap**: Max 2 generator-critic rounds between designer and reviewer
|
8. **GC Loop Cap**: Max 2 generator-critic rounds between designer and reviewer
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ const analyzer = spawn_agent({
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-ultra-analyze/agents/topic-analyzer.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-ultra-analyze/agents/topic-analyzer.md (MUST read first)
|
||||||
2. Read: .workflow/project-tech.json (if exists)
|
2. Read: .workflow/project-tech.json (if exists)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -497,7 +497,7 @@ for (let wave = 1; wave <= maxWave; wave++) {
|
|||||||
## TASK ASSIGNMENT
|
## TASK ASSIGNMENT
|
||||||
|
|
||||||
### MANDATORY FIRST STEPS (Agent Execute)
|
### MANDATORY FIRST STEPS (Agent Execute)
|
||||||
1. **Read role definition**: .codex/skills/team-ultra-analyze/agents/discussion-feedback.md (MUST read first)
|
1. **Read role definition**: ~ or <project>/.codex/skills/team-ultra-analyze/agents/discussion-feedback.md (MUST read first)
|
||||||
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
2. Read: ${sessionFolder}/discoveries.ndjson (shared discoveries)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -747,3 +747,41 @@ All agents across all waves share `discoveries.ndjson`. This enables cross-role
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent MUST have a matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
10. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -599,3 +599,41 @@ All agents share `discoveries.ndjson` for UX findings.
|
|||||||
8. **Lifecycle Balance**: Every spawn_agent has matching close_agent
|
8. **Lifecycle Balance**: Every spawn_agent has matching close_agent
|
||||||
9. **Cleanup Temp Files**: Remove wave-{N}.csv after merge
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after merge
|
||||||
10. **DO NOT STOP**: Continuous execution until all waves complete
|
10. **DO NOT STOP**: Continuous execution until all waves complete
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Coordinator Role Constraints (Main Agent)
|
||||||
|
|
||||||
|
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
||||||
|
|
||||||
|
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
||||||
|
- Spawns agents with task assignments
|
||||||
|
- Waits for agent callbacks
|
||||||
|
- Merges results and coordinates workflow
|
||||||
|
- Manages workflow transitions between phases
|
||||||
|
|
||||||
|
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
||||||
|
- Wait patiently for `wait()` calls to complete
|
||||||
|
- NOT skip workflow steps due to perceived delays
|
||||||
|
- NOT assume agents have failed just because they're taking time
|
||||||
|
- Trust the timeout mechanisms defined in the skill
|
||||||
|
|
||||||
|
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
||||||
|
- Use `send_input()` to ask questions or provide clarification
|
||||||
|
- NOT skip the agent or move to next phase prematurely
|
||||||
|
- Give agents opportunity to respond before escalating
|
||||||
|
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
||||||
|
|
||||||
|
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
||||||
|
- Skip phases or stages defined in the workflow
|
||||||
|
- Bypass required approval or review steps
|
||||||
|
- Execute dependent tasks before prerequisites complete
|
||||||
|
- Assume task completion without explicit agent callback
|
||||||
|
- Make up or fabricate agent results
|
||||||
|
|
||||||
|
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
||||||
|
- Total execution time may range from 30-90 minutes or longer
|
||||||
|
- Each phase may take 10-30 minutes depending on complexity
|
||||||
|
- The coordinator must remain active and attentive throughout the entire process
|
||||||
|
- Do not terminate or skip steps due to time concerns
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ describe('DashboardToolbar', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
fireEvent.click(screen.getByTitle('Click to configure and launch a CLI session'));
|
fireEvent.click(screen.getByRole('button', { name: 'New Session' }));
|
||||||
expect(screen.getByTestId('cli-config-modal')).toBeInTheDocument();
|
expect(screen.getByTestId('cli-config-modal')).toBeInTheDocument();
|
||||||
|
|
||||||
mockState.currentProjectPath = 'D:/workspace-b';
|
mockState.currentProjectPath = 'D:/workspace-b';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
// Tests for issue-related hooks with queue and discovery
|
// Tests for issue-related hooks with queue and discovery
|
||||||
|
|
||||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||||
import { renderHook, waitFor } from '@testing-library/react';
|
import { act, renderHook, waitFor } from '@testing-library/react';
|
||||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import {
|
import {
|
||||||
useIssueQueue,
|
useIssueQueue,
|
||||||
@@ -203,14 +203,18 @@ describe('useIssueDiscovery', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Select a session to load findings
|
// Select a session to load findings
|
||||||
result.current.selectSession('1');
|
act(() => {
|
||||||
|
result.current.selectSession('1');
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.findings).toHaveLength(2);
|
expect(result.current.findings).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Apply severity filter
|
// Apply severity filter
|
||||||
result.current.setFilters({ severity: 'critical' as const });
|
act(() => {
|
||||||
|
result.current.setFilters({ severity: 'critical' as const });
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.filteredFindings).toHaveLength(1);
|
expect(result.current.filteredFindings).toHaveLength(1);
|
||||||
@@ -239,14 +243,18 @@ describe('useIssueDiscovery', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Select a session to load findings
|
// Select a session to load findings
|
||||||
result.current.selectSession('1');
|
act(() => {
|
||||||
|
result.current.selectSession('1');
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.findings).toHaveLength(2);
|
expect(result.current.findings).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Apply type filter
|
// Apply type filter
|
||||||
result.current.setFilters({ type: 'bug' });
|
act(() => {
|
||||||
|
result.current.setFilters({ type: 'bug' });
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.filteredFindings).toHaveLength(1);
|
expect(result.current.filteredFindings).toHaveLength(1);
|
||||||
@@ -275,14 +283,18 @@ describe('useIssueDiscovery', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Select a session to load findings
|
// Select a session to load findings
|
||||||
result.current.selectSession('1');
|
act(() => {
|
||||||
|
result.current.selectSession('1');
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.findings).toHaveLength(2);
|
expect(result.current.findings).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Apply search filter
|
// Apply search filter
|
||||||
result.current.setFilters({ search: 'authentication' });
|
act(() => {
|
||||||
|
result.current.setFilters({ search: 'authentication' });
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.filteredFindings).toHaveLength(1);
|
expect(result.current.filteredFindings).toHaveLength(1);
|
||||||
@@ -310,7 +322,9 @@ describe('useIssueDiscovery', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Select a session to load findings
|
// Select a session to load findings
|
||||||
result.current.selectSession('1');
|
act(() => {
|
||||||
|
result.current.selectSession('1');
|
||||||
|
});
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(result.current.findings).toHaveLength(1);
|
expect(result.current.findings).toHaveLength(1);
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ describe('useWebSocket workspace scoping', () => {
|
|||||||
useSessionManagerStore.getState().resetState();
|
useSessionManagerStore.getState().resetState();
|
||||||
useWorkflowStore.setState({ projectPath: 'D:\\workspace-a' });
|
useWorkflowStore.setState({ projectPath: 'D:\\workspace-a' });
|
||||||
|
|
||||||
|
vi.spyOn(console, 'log').mockImplementation(() => {});
|
||||||
vi.stubGlobal('WebSocket', MockWebSocket as unknown as typeof WebSocket);
|
vi.stubGlobal('WebSocket', MockWebSocket as unknown as typeof WebSocket);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -84,6 +85,7 @@ describe('useWebSocket workspace scoping', () => {
|
|||||||
useCliSessionStore.getState().resetState();
|
useCliSessionStore.getState().resetState();
|
||||||
useExecutionMonitorStore.getState().resetState();
|
useExecutionMonitorStore.getState().resetState();
|
||||||
useSessionManagerStore.getState().resetState();
|
useSessionManagerStore.getState().resetState();
|
||||||
|
vi.restoreAllMocks();
|
||||||
vi.unstubAllGlobals();
|
vi.unstubAllGlobals();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ describe('OrchestrationPlanBuilder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should detect cycles and throw an error', () => {
|
it('should detect cycles and throw an error', () => {
|
||||||
|
const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
|
||||||
const flow: Flow = {
|
const flow: Flow = {
|
||||||
id: 'flow-cycle',
|
id: 'flow-cycle',
|
||||||
name: 'Cyclic Flow',
|
name: 'Cyclic Flow',
|
||||||
@@ -156,7 +157,11 @@ describe('OrchestrationPlanBuilder', () => {
|
|||||||
metadata: {},
|
metadata: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(() => OrchestrationPlanBuilder.fromFlow(flow)).toThrow('Cycle detected in flow graph. Cannot build orchestration plan from cyclic flow.');
|
try {
|
||||||
|
expect(() => OrchestrationPlanBuilder.fromFlow(flow)).toThrow('Cycle detected in flow graph. Cannot build orchestration plan from cyclic flow.');
|
||||||
|
} finally {
|
||||||
|
consoleErrorSpy.mockRestore();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should correctly map sessionStrategy and executionType from node data', () => {
|
it('should correctly map sessionStrategy and executionType from node data', () => {
|
||||||
|
|||||||
67
ccw/frontend/src/stores/configStore.test.ts
Normal file
67
ccw/frontend/src/stores/configStore.test.ts
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
// ========================================
|
||||||
|
// Config Store Tests
|
||||||
|
// ========================================
|
||||||
|
|
||||||
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||||
|
|
||||||
|
const CONFIG_STORE_MODULE_PATH = './configStore';
|
||||||
|
|
||||||
|
describe('configStore backend sync', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
vi.resetModules();
|
||||||
|
vi.clearAllMocks();
|
||||||
|
localStorage.clear();
|
||||||
|
window.history.replaceState({}, '', '/');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.unstubAllGlobals();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not fetch backend config during module import', async () => {
|
||||||
|
const fetchMock = vi.fn();
|
||||||
|
vi.stubGlobal('fetch', fetchMock);
|
||||||
|
|
||||||
|
await import(CONFIG_STORE_MODULE_PATH);
|
||||||
|
|
||||||
|
expect(fetchMock).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('syncs backend config explicitly with an absolute URL', async () => {
|
||||||
|
const fetchMock = vi.fn().mockResolvedValue({
|
||||||
|
json: vi.fn().mockResolvedValue({
|
||||||
|
config: {
|
||||||
|
tools: {
|
||||||
|
codex: {
|
||||||
|
enabled: true,
|
||||||
|
primaryModel: 'gpt-5',
|
||||||
|
secondaryModel: 'gpt-5-mini',
|
||||||
|
tags: ['analysis', 'debug'],
|
||||||
|
type: 'builtin',
|
||||||
|
envFile: '.env.codex',
|
||||||
|
settingsFile: 'codex.settings.json',
|
||||||
|
availableModels: ['gpt-5', 'gpt-5-mini'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
vi.stubGlobal('fetch', fetchMock);
|
||||||
|
|
||||||
|
const { syncConfigStoreFromBackend, useConfigStore } = await import(CONFIG_STORE_MODULE_PATH);
|
||||||
|
|
||||||
|
await syncConfigStoreFromBackend(true);
|
||||||
|
|
||||||
|
expect(fetchMock).toHaveBeenCalledWith(`${window.location.origin}/api/cli/config`);
|
||||||
|
expect(useConfigStore.getState().cliTools.codex).toMatchObject({
|
||||||
|
enabled: true,
|
||||||
|
primaryModel: 'gpt-5',
|
||||||
|
secondaryModel: 'gpt-5-mini',
|
||||||
|
tags: ['analysis', 'debug'],
|
||||||
|
type: 'builtin',
|
||||||
|
envFile: '.env.codex',
|
||||||
|
settingsFile: 'codex.settings.json',
|
||||||
|
availableModels: ['gpt-5', 'gpt-5-mini'],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -10,6 +10,8 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|||||||
import { MemoryRouter } from 'react-router-dom';
|
import { MemoryRouter } from 'react-router-dom';
|
||||||
import { vi } from 'vitest';
|
import { vi } from 'vitest';
|
||||||
import type { Locale } from '../types/store';
|
import type { Locale } from '../types/store';
|
||||||
|
import enMessages from '../locales/en/index';
|
||||||
|
import zhMessages from '../locales/zh/index';
|
||||||
|
|
||||||
// Mock translation messages for testing
|
// Mock translation messages for testing
|
||||||
const mockMessages: Record<Locale, Record<string, string>> = {
|
const mockMessages: Record<Locale, Record<string, string>> = {
|
||||||
@@ -677,13 +679,36 @@ interface I18nWrapperProps {
|
|||||||
locale?: Locale;
|
locale?: Locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const testMessages: Record<Locale, Record<string, string>> = {
|
||||||
|
en: { ...enMessages, ...mockMessages.en },
|
||||||
|
zh: { ...zhMessages, ...mockMessages.zh },
|
||||||
|
};
|
||||||
|
|
||||||
|
function handleIntlTestError(error: unknown): void {
|
||||||
|
const intlError = error as { code?: string } | undefined;
|
||||||
|
if (intlError?.code === 'MISSING_TRANSLATION') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
const testRouterFutureConfig = {
|
||||||
|
v7_startTransition: true,
|
||||||
|
v7_relativeSplatPath: true,
|
||||||
|
} as const;
|
||||||
|
|
||||||
function I18nWrapper({ children, locale = 'en' }: I18nWrapperProps) {
|
function I18nWrapper({ children, locale = 'en' }: I18nWrapperProps) {
|
||||||
const queryClient = createTestQueryClient();
|
const queryClient = createTestQueryClient();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MemoryRouter>
|
<MemoryRouter future={testRouterFutureConfig}>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<IntlProvider locale={locale} messages={mockMessages[locale]}>
|
<IntlProvider
|
||||||
|
locale={locale}
|
||||||
|
messages={testMessages[locale]}
|
||||||
|
onError={handleIntlTestError}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</IntlProvider>
|
</IntlProvider>
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
@@ -726,9 +751,9 @@ export const mockLocaleUtils = {
|
|||||||
export function mockI18nContext(locale: Locale = 'en') {
|
export function mockI18nContext(locale: Locale = 'en') {
|
||||||
return {
|
return {
|
||||||
locale,
|
locale,
|
||||||
messages: mockMessages[locale],
|
messages: testMessages[locale],
|
||||||
formatMessage: (id: string, values?: Record<string, unknown>) => {
|
formatMessage: (id: string, values?: Record<string, unknown>) => {
|
||||||
const message = mockMessages[locale][id];
|
const message = testMessages[locale][id];
|
||||||
if (!message) return id;
|
if (!message) return id;
|
||||||
if (!values) return message;
|
if (!values) return message;
|
||||||
|
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ const ParamsSchema = z.object({
|
|||||||
maxResults: z.number().default(5), // Default 5 with full content
|
maxResults: z.number().default(5), // Default 5 with full content
|
||||||
includeHidden: z.boolean().default(false),
|
includeHidden: z.boolean().default(false),
|
||||||
languages: z.array(z.string()).optional(),
|
languages: z.array(z.string()).optional(),
|
||||||
embeddingBackend: z.string().optional().describe('Embedding backend for action="embed": fastembed/local or litellm/api.'),
|
embeddingBackend: z.string().optional().describe('Embedding backend for action="embed": fastembed/local or litellm/api. Default bulk preset: local-fast.'),
|
||||||
embeddingModel: z.string().optional().describe('Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf".'),
|
embeddingModel: z.string().optional().describe('Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf". Default bulk preset uses "fast".'),
|
||||||
apiMaxWorkers: z.number().int().min(1).optional().describe('Max concurrent API embedding workers for action="embed". Recommended: 8-16 for litellm/api when multiple endpoints are configured.'),
|
apiMaxWorkers: z.number().int().min(1).optional().describe('Max concurrent API embedding workers for action="embed". Recommended: 8-16 for litellm/api when multiple endpoints are configured.'),
|
||||||
force: z.boolean().default(false).describe('Force regeneration for action="embed".'),
|
force: z.boolean().default(false).describe('Force regeneration for action="embed".'),
|
||||||
limit: z.number().default(5), // Default 5 with full content
|
limit: z.number().default(5), // Default 5 with full content
|
||||||
@@ -328,6 +328,7 @@ interface SearchMetadata {
|
|||||||
use_gpu?: boolean;
|
use_gpu?: boolean;
|
||||||
cascade_strategy?: string;
|
cascade_strategy?: string;
|
||||||
staged_stage2_mode?: string;
|
staged_stage2_mode?: string;
|
||||||
|
preset?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SearchResult {
|
interface SearchResult {
|
||||||
@@ -951,6 +952,42 @@ function normalizeEmbeddingBackend(backend?: string): string | undefined {
|
|||||||
return normalized;
|
return normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resolveEmbeddingSelection(
|
||||||
|
requestedBackend: string | undefined,
|
||||||
|
requestedModel: string | undefined,
|
||||||
|
config: CodexLensConfig | null | undefined,
|
||||||
|
): { backend?: string; model?: string; preset: 'explicit' | 'config' | 'bulk-local-fast'; note?: string } {
|
||||||
|
const normalizedRequestedBackend = normalizeEmbeddingBackend(requestedBackend);
|
||||||
|
const normalizedRequestedModel = requestedModel?.trim() || undefined;
|
||||||
|
|
||||||
|
if (normalizedRequestedBackend) {
|
||||||
|
return {
|
||||||
|
backend: normalizedRequestedBackend,
|
||||||
|
model: normalizedRequestedModel || config?.embedding_model,
|
||||||
|
preset: 'explicit',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (normalizedRequestedModel) {
|
||||||
|
const inferredBackend = config?.embedding_backend
|
||||||
|
|| (['fast', 'code'].includes(normalizedRequestedModel) ? 'fastembed' : undefined);
|
||||||
|
return {
|
||||||
|
backend: inferredBackend,
|
||||||
|
model: normalizedRequestedModel,
|
||||||
|
preset: inferredBackend ? 'config' : 'explicit',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
backend: 'fastembed',
|
||||||
|
model: 'fast',
|
||||||
|
preset: 'bulk-local-fast',
|
||||||
|
note: config?.embedding_backend && config.embedding_backend !== 'fastembed'
|
||||||
|
? `Using recommended bulk indexing preset: local-fast instead of configured ${config.embedding_backend}. Pass embeddingBackend="api" to force remote API embeddings.`
|
||||||
|
: 'Using recommended bulk indexing preset: local-fast. Pass embeddingBackend="api" to force remote API embeddings.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const EMBED_PROGRESS_PREFIX = '__CCW_EMBED_PROGRESS__';
|
const EMBED_PROGRESS_PREFIX = '__CCW_EMBED_PROGRESS__';
|
||||||
|
|
||||||
function resolveEmbeddingEndpoints(backend?: string): RotationEndpointConfig[] {
|
function resolveEmbeddingEndpoints(backend?: string): RotationEndpointConfig[] {
|
||||||
@@ -1214,8 +1251,9 @@ async function executeEmbedAction(params: Params): Promise<SearchResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const currentStatus = await checkIndexStatus(scope.workingDirectory);
|
const currentStatus = await checkIndexStatus(scope.workingDirectory);
|
||||||
const normalizedBackend = normalizeEmbeddingBackend(embeddingBackend) || currentStatus.config?.embedding_backend;
|
const embeddingSelection = resolveEmbeddingSelection(embeddingBackend, embeddingModel, currentStatus.config);
|
||||||
const trimmedModel = embeddingModel?.trim() || currentStatus.config?.embedding_model;
|
const normalizedBackend = embeddingSelection.backend;
|
||||||
|
const trimmedModel = embeddingSelection.model;
|
||||||
const endpoints = resolveEmbeddingEndpoints(normalizedBackend);
|
const endpoints = resolveEmbeddingEndpoints(normalizedBackend);
|
||||||
const configuredApiMaxWorkers = currentStatus.config?.api_max_workers;
|
const configuredApiMaxWorkers = currentStatus.config?.api_max_workers;
|
||||||
const effectiveApiMaxWorkers = typeof apiMaxWorkers === 'number'
|
const effectiveApiMaxWorkers = typeof apiMaxWorkers === 'number'
|
||||||
@@ -1261,12 +1299,13 @@ async function executeEmbedAction(params: Params): Promise<SearchResult> {
|
|||||||
path: scope.workingDirectory,
|
path: scope.workingDirectory,
|
||||||
backend: normalizedBackend || indexStatus?.config?.embedding_backend,
|
backend: normalizedBackend || indexStatus?.config?.embedding_backend,
|
||||||
embeddings_coverage_percent: coverage,
|
embeddings_coverage_percent: coverage,
|
||||||
api_max_workers: effectiveApiMaxWorkers,
|
api_max_workers: normalizedBackend === 'litellm' ? effectiveApiMaxWorkers : undefined,
|
||||||
endpoint_count: endpoints.length,
|
endpoint_count: endpoints.length,
|
||||||
use_gpu: true,
|
use_gpu: true,
|
||||||
cascade_strategy: currentStatus.config?.cascade_strategy,
|
cascade_strategy: currentStatus.config?.cascade_strategy,
|
||||||
staged_stage2_mode: currentStatus.config?.staged_stage2_mode,
|
staged_stage2_mode: currentStatus.config?.staged_stage2_mode,
|
||||||
note: progressMessage,
|
note: [embeddingSelection.note, progressMessage].filter(Boolean).join(' | ') || undefined,
|
||||||
|
preset: embeddingSelection.preset,
|
||||||
},
|
},
|
||||||
status: indexStatus,
|
status: indexStatus,
|
||||||
};
|
};
|
||||||
@@ -2590,8 +2629,8 @@ Recommended MCP flow: use **action=\"search\"** for lookups, **action=\"init\"**
|
|||||||
|
|
||||||
* **embed**: Generate semantic/vector embeddings for an indexed project.
|
* **embed**: Generate semantic/vector embeddings for an indexed project.
|
||||||
* *path* (string): Directory to embed (default: current).
|
* *path* (string): Directory to embed (default: current).
|
||||||
* *embeddingBackend* (string): 'litellm'/'api' for remote API embeddings, 'fastembed'/'local' for local embeddings.
|
* *embeddingBackend* (string): 'litellm'/'api' for remote API embeddings, 'fastembed'/'local' for local embeddings. Default bulk preset: local-fast.
|
||||||
* *embeddingModel* (string): Embedding model/profile to use.
|
* *embeddingModel* (string): Embedding model/profile to use. Default bulk preset uses 'fast'.
|
||||||
* *apiMaxWorkers* (number): Max concurrent API embedding workers. Defaults to auto-sizing from the configured endpoint pool.
|
* *apiMaxWorkers* (number): Max concurrent API embedding workers. Defaults to auto-sizing from the configured endpoint pool.
|
||||||
* *force* (boolean): Regenerate embeddings even if they already exist.
|
* *force* (boolean): Regenerate embeddings even if they already exist.
|
||||||
|
|
||||||
@@ -2693,11 +2732,11 @@ Recommended MCP flow: use **action=\"search\"** for lookups, **action=\"init\"**
|
|||||||
},
|
},
|
||||||
embeddingBackend: {
|
embeddingBackend: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'Embedding backend for action="embed": litellm/api (remote API) or fastembed/local (local GPU/CPU).',
|
description: 'Embedding backend for action="embed": litellm/api (remote API) or fastembed/local (local GPU/CPU). Default bulk preset: local-fast.',
|
||||||
},
|
},
|
||||||
embeddingModel: {
|
embeddingModel: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf".',
|
description: 'Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf". Default bulk preset uses "fast".',
|
||||||
},
|
},
|
||||||
apiMaxWorkers: {
|
apiMaxWorkers: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
@@ -3163,6 +3202,7 @@ export const __testables = {
|
|||||||
parseCodexLensJsonOutput,
|
parseCodexLensJsonOutput,
|
||||||
parsePlainTextFileMatches,
|
parsePlainTextFileMatches,
|
||||||
hasCentralizedVectorArtifacts,
|
hasCentralizedVectorArtifacts,
|
||||||
|
resolveEmbeddingSelection,
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function executeInitWithProgress(
|
export async function executeInitWithProgress(
|
||||||
|
|||||||
@@ -121,6 +121,66 @@ describe('Smart Search MCP usage defaults and path handling', async () => {
|
|||||||
assert.ok(toolResult.result.results.length >= 1);
|
assert.ok(toolResult.result.results.length >= 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('defaults embed selection to local-fast for bulk indexing', () => {
|
||||||
|
if (!smartSearchModule) return;
|
||||||
|
|
||||||
|
const selection = smartSearchModule.__testables.resolveEmbeddingSelection(undefined, undefined, {
|
||||||
|
embedding_backend: 'litellm',
|
||||||
|
embedding_model: 'qwen3-embedding-sf',
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(selection.backend, 'fastembed');
|
||||||
|
assert.equal(selection.model, 'fast');
|
||||||
|
assert.equal(selection.preset, 'bulk-local-fast');
|
||||||
|
assert.match(selection.note, /local-fast/i);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('keeps explicit api embedding selection when requested', () => {
|
||||||
|
if (!smartSearchModule) return;
|
||||||
|
|
||||||
|
const selection = smartSearchModule.__testables.resolveEmbeddingSelection('api', 'qwen3-embedding-sf', {
|
||||||
|
embedding_backend: 'fastembed',
|
||||||
|
embedding_model: 'fast',
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.equal(selection.backend, 'litellm');
|
||||||
|
assert.equal(selection.model, 'qwen3-embedding-sf');
|
||||||
|
assert.equal(selection.preset, 'explicit');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('parses warning-prefixed JSON and plain-text file lists for semantic fallback', () => {
|
||||||
|
if (!smartSearchModule) return;
|
||||||
|
|
||||||
|
const dir = createWorkspace();
|
||||||
|
const target = join(dir, 'target.ts');
|
||||||
|
writeFileSync(target, 'export const target = 1;\n');
|
||||||
|
|
||||||
|
const parsed = smartSearchModule.__testables.parseCodexLensJsonOutput([
|
||||||
|
'RuntimeWarning: compatibility shim',
|
||||||
|
JSON.stringify({ results: [{ file: 'target.ts', score: 0.25, excerpt: 'target' }] }),
|
||||||
|
].join('\n'));
|
||||||
|
assert.equal(Array.isArray(parsed.results), true);
|
||||||
|
assert.equal(parsed.results[0].file, 'target.ts');
|
||||||
|
|
||||||
|
const matches = smartSearchModule.__testables.parsePlainTextFileMatches(target, {
|
||||||
|
workingDirectory: dir,
|
||||||
|
searchPaths: ['.'],
|
||||||
|
});
|
||||||
|
assert.equal(matches.length, 1);
|
||||||
|
assert.match(String(matches[0].file).replace(/\\/g, '/'), /target\.ts$/);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('detects centralized vector artifacts as full embedding coverage evidence', () => {
|
||||||
|
if (!smartSearchModule) return;
|
||||||
|
|
||||||
|
const dir = createWorkspace();
|
||||||
|
writeFileSync(join(dir, '_vectors.hnsw'), 'hnsw');
|
||||||
|
writeFileSync(join(dir, '_vectors_meta.db'), 'meta');
|
||||||
|
writeFileSync(join(dir, '_binary_vectors.mmap'), 'mmap');
|
||||||
|
|
||||||
|
assert.equal(smartSearchModule.__testables.hasCentralizedVectorArtifacts(dir), true);
|
||||||
|
});
|
||||||
|
|
||||||
it('surfaces backend failure details when fuzzy search fully fails', async () => {
|
it('surfaces backend failure details when fuzzy search fully fails', async () => {
|
||||||
if (!smartSearchModule) return;
|
if (!smartSearchModule) return;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user