feat: Enhance role functionality and task management across coordinator, explorer, implementer, planner, reviewer, and workflow phases

This commit is contained in:
catlog22
2026-02-15 13:57:00 +08:00
parent 80b7dfc817
commit 8985894c22
9 changed files with 68 additions and 21 deletions

View File

@@ -185,8 +185,20 @@ Dependencies: ${explorerContext.dependencies?.join(', ') || 'N/A'}
### Phase 4: Verify & Commit
```javascript
// Detect test command from package.json or project config
let testCmd = 'npm test'
try {
const pkgJson = JSON.parse(Read('package.json'))
if (pkgJson.scripts?.test) testCmd = 'npm test'
else if (pkgJson.scripts?.['test:unit']) testCmd = 'npm run test:unit'
} catch {
// Fallback: try common test runners
const hasYarn = Bash('test -f yarn.lock && echo yes || echo no').trim() === 'yes'
if (hasYarn) testCmd = 'yarn test'
}
// Verify implementation
const testResult = Bash(`npm test 2>&1 || echo "TEST_FAILED"`)
const testResult = Bash(`${testCmd} 2>&1 || echo "TEST_FAILED"`)
const testPassed = !testResult.includes('TEST_FAILED') && !testResult.includes('FAIL')
if (!testPassed) {