Skip to content

Commit 8985894

Browse files
author
catlog22
committed
feat: Enhance role functionality and task management across coordinator, explorer, implementer, planner, reviewer, and workflow phases
1 parent 80b7dfc commit 8985894

9 files changed

Lines changed: 68 additions & 21 deletions

File tree

.claude/skills/team-issue/roles/coordinator.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function detectMode(issueIds, userMode) {
101101
const hasHighPriority = issues.some(i => i.priority >= 4)
102102
return hasHighPriority ? 'full' : 'quick'
103103
}
104-
return count <= 5 ? 'full' : 'batch'
104+
// 3-4 issues with review, 5+ triggers batch parallel processing
105+
return count >= 5 ? 'batch' : 'full'
105106
}
106107
```
107108

@@ -228,19 +229,25 @@ for (const issueId of issueIds) {
228229
const exploreBatches = chunkArray(issueIds, 5) // max 5 parallel
229230
const solveBatches = chunkArray(issueIds, 3) // max 3 parallel
230231

231-
// Create EXPLORE tasks (parallel within batch)
232+
// Create EXPLORE tasks — all parallel within each batch, batches run in rolling window
233+
// Each batch of ≤5 runs concurrently; next batch starts when current batch completes
232234
const exploreTaskIds = []
235+
let prevBatchLastId = null
233236
for (const [batchIdx, batch] of exploreBatches.entries()) {
237+
const batchTaskIds = []
234238
for (const issueId of batch) {
235239
const id = TaskCreate({
236240
subject: `EXPLORE-${String(exploreTaskIds.length + 1).padStart(3, '0')}: Context for ${issueId}`,
237241
description: `Batch ${batchIdx + 1}: Explore codebase context for issue ${issueId}.`,
238242
activeForm: `Exploring ${issueId}`,
239243
owner: "explorer",
240-
addBlockedBy: batchIdx > 0 ? [exploreTaskIds[exploreTaskIds.length - 1]] : []
244+
// Only block on previous batch's LAST task (not within same batch)
245+
addBlockedBy: prevBatchLastId ? [prevBatchLastId] : []
241246
})
247+
batchTaskIds.push(id)
242248
exploreTaskIds.push(id)
243249
}
250+
prevBatchLastId = batchTaskIds[batchTaskIds.length - 1]
244251
}
245252

246253
// Create SOLVE tasks (blocked by corresponding EXPLORE)

.claude/skills/team-issue/roles/explorer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ TaskUpdate({ taskId: task.id, status: 'in_progress' })
7272
### Phase 2: Issue Loading & Context Setup
7373

7474
```javascript
75+
// Resolve project root from working directory
76+
const projectRoot = Bash('pwd').trim()
77+
7578
// Extract issue ID from task description
7679
const issueIdMatch = task.description.match(/(?:GH-\d+|ISS-\d{8}-\d{6})/)
7780
const issueId = issueIdMatch ? issueIdMatch[0] : null

.claude/skills/team-issue/roles/implementer.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,20 @@ Dependencies: ${explorerContext.dependencies?.join(', ') || 'N/A'}
185185
### Phase 4: Verify & Commit
186186
187187
```javascript
188+
// Detect test command from package.json or project config
189+
let testCmd = 'npm test'
190+
try {
191+
const pkgJson = JSON.parse(Read('package.json'))
192+
if (pkgJson.scripts?.test) testCmd = 'npm test'
193+
else if (pkgJson.scripts?.['test:unit']) testCmd = 'npm run test:unit'
194+
} catch {
195+
// Fallback: try common test runners
196+
const hasYarn = Bash('test -f yarn.lock && echo yes || echo no').trim() === 'yes'
197+
if (hasYarn) testCmd = 'yarn test'
198+
}
199+
188200
// Verify implementation
189-
const testResult = Bash(`npm test 2>&1 || echo "TEST_FAILED"`)
201+
const testResult = Bash(`${testCmd} 2>&1 || echo "TEST_FAILED"`)
190202
const testPassed = !testResult.includes('TEST_FAILED') && !testResult.includes('FAIL')
191203
192204
if (!testPassed) {

.claude/skills/team-issue/roles/planner.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ TaskUpdate({ taskId: task.id, status: 'in_progress' })
7171
### Phase 2: Context Loading
7272

7373
```javascript
74+
// Resolve project root from working directory
75+
const projectRoot = Bash('pwd').trim()
76+
7477
// Extract issue ID
7578
const issueIdMatch = task.description.match(/(?:GH-\d+|ISS-\d{8}-\d{6})/)
7679
const issueId = issueIdMatch ? issueIdMatch[0] : null

.claude/skills/team-issue/roles/reviewer.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ for (const issueId of issueIds) {
163163
completeness: { score: 0, findings: [] }
164164
}
165165

166-
// 1. Technical Feasibility — verify solution references real files
166+
// 1. Technical Feasibility — verify solution references real files + semantic validation
167167
if (context && context.relevant_files) {
168168
const solutionFiles = solution.bound.tasks?.flatMap(t => t.files || []) || []
169169
const contextFiles = context.relevant_files.map(f => f.path || f)
@@ -177,6 +177,24 @@ for (const issueId of issueIds) {
177177
`Uncovered files: ${uncovered.join(', ')}`
178178
)
179179
}
180+
181+
// Semantic validation via ACE — verify solution references exist in codebase
182+
const projectRoot = Bash('pwd').trim()
183+
const aceResults = mcp__ace-tool__search_context({
184+
project_root_path: projectRoot,
185+
query: `${solution.bound.title || issue.title}. Verify patterns: ${solutionFiles.slice(0, 5).join(', ')}`
186+
})
187+
if (aceResults && aceResults.length > 0) {
188+
// Cross-check ACE results against solution's assumed patterns
189+
const aceFiles = aceResults.map(r => r.file || r.path).filter(Boolean)
190+
const missedByAce = solutionFiles.filter(sf => !aceFiles.some(af => af.includes(sf)))
191+
if (missedByAce.length > solutionFiles.length * 0.5) {
192+
review.technical_feasibility.score = Math.max(50, review.technical_feasibility.score - 10)
193+
review.technical_feasibility.findings.push(
194+
`ACE semantic search found divergent patterns — solution may reference outdated code`
195+
)
196+
}
197+
}
180198
} else {
181199
review.technical_feasibility.score = 70 // No context to validate against
182200
review.technical_feasibility.findings.push('Explorer context not available for cross-validation')

.claude/skills/workflow-plan/phases/04-task-generation.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,12 @@ if (userChoice.answers["Next Action"] === "Verify Plan Quality (Recommended)") {
468468
Skill(skill="workflow-execute", args="--session " + sessionId);
469469
} else if (userChoice.answers["Next Action"] === "Review Status Only") {
470470
console.log("\nDisplaying session status...\n");
471-
Skill(skill="workflow:status", args="--session " + sessionId);
471+
// Display session status inline
472+
const sessionMeta = JSON.parse(Read(`.workflow/active/${sessionId}/workflow-session.json`));
473+
const todoList = Read(`.workflow/active/${sessionId}/TODO_LIST.md`);
474+
console.log(`Session: ${sessionId}`);
475+
console.log(`Status: ${sessionMeta.status}`);
476+
console.log(`\n--- TODO List ---\n${todoList}`);
472477
}
473478
```
474479
@@ -477,7 +482,7 @@ if (userChoice.answers["Next Action"] === "Verify Plan Quality (Recommended)") {
477482
**Return to Orchestrator**: Based on user's choice:
478483
- **Verify** -> Orchestrator reads phases/05-plan-verify.md and executes Phase 5 in-process
479484
- **Execute** -> Skill(skill="workflow-execute")
480-
- **Review** -> Route to /workflow:status
485+
- **Review** -> Display session status inline
481486
482487
## Output
483488
@@ -492,4 +497,4 @@ if (userChoice.answers["Next Action"] === "Verify Plan Quality (Recommended)") {
492497
Based on user's plan confirmation choice:
493498
- If "Verify" -> [Phase 5: Plan Verification](05-plan-verify.md)
494499
- If "Execute" -> Skill(skill="workflow-execute")
495-
- If "Review" -> External: /workflow:status
500+
- If "Review" -> Display session status inline

.claude/skills/workflow-tdd/phases/05-tdd-task-generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const userConfig = {
113113
}
114114
```
115115

116-
**Auto Mode**: When `--yes` or `-y`: Skip user questions, use defaults (no materials, Agent executor).
116+
**Auto Mode**: When `workflowPreferences.autoYes` is true, skip user questions, use defaults (no materials, Agent executor).
117117

118118
---
119119

.claude/skills/workflow-tdd/phases/06-tdd-structure-validation.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ if (userChoice === "Verify TDD Compliance (Recommended)") {
159159
} else if (userChoice === "Start Execution") {
160160
Skill(skill="workflow-execute", args="--session " + sessionId);
161161
} else if (userChoice === "Review Status Only") {
162-
Skill(skill="workflow:status", args="--session " + sessionId);
162+
// Display session status inline
163+
const sessionMeta = JSON.parse(Read(`.workflow/active/${sessionId}/workflow-session.json`));
164+
const todoList = Read(`.workflow/active/${sessionId}/TODO_LIST.md`);
165+
console.log(`\nSession: ${sessionId}`);
166+
console.log(`Status: ${sessionMeta.status}`);
167+
console.log(`\n--- TODO List ---\n${todoList}`);
163168
}
164169
```
165170

@@ -176,4 +181,4 @@ if (userChoice === "Verify TDD Compliance (Recommended)") {
176181
Based on user's plan confirmation choice:
177182
- If "Verify" → [Phase 7: TDD Verification](07-tdd-verify.md)
178183
- If "Execute" → Skill(skill="workflow-execute")
179-
- If "Review" → External: /workflow:status
184+
- If "Review" -> Display session status inline

.claude/skills/workflow-test-fix/SKILL.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,14 @@ Task Pipeline (generated in Phase 4, executed in Phase 5):
5454
5. **Progressive Phase Loading**: Phase docs read **only** when that phase executes, not upfront
5555
6. **Adaptive Strategy**: Fix loop auto-selects strategy (conservative/aggressive/surgical) based on iteration context
5656
7. **Quality Gate**: Pass rate >= 95% (criticality-aware) terminates the fix loop
57-
8. **Original Commands Preserved**: Phase files preserve full original command content and Skill() calls
57+
8. **Phase File Hygiene**: Phase files reference `workflowPreferences.*` for preferences, no CLI flag parsing
5858

5959
## Usage
6060

61-
```bash
62-
# Full pipeline: generate + execute
63-
/workflow:test-fix-gen "Test the user authentication API"
64-
/workflow:test-fix-gen WFS-user-auth-v2
61+
Full pipeline and execute-only modes are triggered by skill name routing (see Mode Detection). Workflow preferences (auto mode) are collected interactively via AskUserQuestion before dispatching to phases.
6562

66-
# Execute only (resume from existing test session with generated tasks)
67-
/workflow:test-cycle-execute
68-
/workflow:test-cycle-execute --resume-session="WFS-test-user-auth"
69-
/workflow:test-cycle-execute --max-iterations=15
70-
```
63+
**Full pipeline** (workflow:test-fix-gen): Task description or session ID as arguments → interactive preference collection → generate + execute pipeline
64+
**Execute only** (workflow:test-cycle-execute): Auto-discovers active session → interactive preference collection → execution loop
7165

7266
## Interactive Preference Collection
7367

0 commit comments

Comments
 (0)