mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: Enhance team skill router with command architecture and role isolation rules
- Added command architecture section to skill router template, detailing role organization and command delegation. - Updated role router input parsing to reflect new file structure for roles. - Introduced role isolation rules to enforce strict boundaries on role responsibilities and output tagging. - Enhanced team configuration section to include role-specific guidelines and message bus requirements. feat: Improve terminal dashboard with session status indicators - Integrated terminal status indicators in the session group tree, displaying active, idle, error, paused, and resuming states. - Updated session click handling to focus on existing panes or assign sessions to available panes. feat: Add session lifecycle controls in terminal pane - Implemented restart, pause, and resume functionalities for terminal sessions with loading states. - Enhanced UI buttons for session control with appropriate loading indicators and tooltips. i18n: Update terminal dashboard localization for session controls - Added translations for restart, pause, and resume session actions in English and Chinese. chore: Create role command template for command file generation - Established a comprehensive template for generating command files in roles, including sections for strategy, execution steps, and error handling. - Included pre-built command patterns for common tasks like exploration, analysis, implementation, validation, review, dispatch, and monitoring.
This commit is contained in:
@@ -94,6 +94,46 @@ for (const [name, content] of Object.entries(roleContents)) {
|
||||
}
|
||||
```
|
||||
|
||||
### Step 3b: Command File Quality Check
|
||||
|
||||
```javascript
|
||||
const commandQuality = {}
|
||||
for (const [name, content] of Object.entries(roleContents)) {
|
||||
if (!content) continue
|
||||
|
||||
// Check if role has commands directory
|
||||
const role = config.roles.find(r => r.name === name)
|
||||
const commands = role?.commands || []
|
||||
if (commands.length === 0) {
|
||||
commandQuality[name] = { status: 'N/A', score: 100 }
|
||||
continue
|
||||
}
|
||||
|
||||
const cmdChecks = commands.map(cmd => {
|
||||
let cmdContent = null
|
||||
try { cmdContent = Read(`${previewDir}/roles/${name}/commands/${cmd}.md`) } catch {}
|
||||
|
||||
if (!cmdContent) return { command: cmd, score: 0 }
|
||||
|
||||
const checks = [
|
||||
{ name: "When to Use section", pass: /## When to Use/.test(cmdContent) },
|
||||
{ name: "Strategy section", pass: /## Strategy/.test(cmdContent) },
|
||||
{ name: "Delegation mode declared", pass: /Delegation Mode/.test(cmdContent) },
|
||||
{ name: "Execution Steps section", pass: /## Execution Steps/.test(cmdContent) },
|
||||
{ name: "Error Handling section", pass: /## Error Handling/.test(cmdContent) },
|
||||
{ name: "Output Format section", pass: /## Output Format/.test(cmdContent) },
|
||||
{ name: "Self-contained (no cross-ref)", pass: !/Read\("\.\.\//.test(cmdContent) }
|
||||
]
|
||||
|
||||
const score = checks.filter(c => c.pass).length / checks.length * 100
|
||||
return { command: cmd, checks, score }
|
||||
})
|
||||
|
||||
const avgScore = cmdChecks.reduce((sum, c) => sum + c.score, 0) / cmdChecks.length
|
||||
commandQuality[name] = { status: avgScore >= 80 ? 'PASS' : 'PARTIAL', checks: cmdChecks, score: avgScore }
|
||||
}
|
||||
```
|
||||
|
||||
### Step 4: Quality Scoring
|
||||
|
||||
```javascript
|
||||
@@ -101,7 +141,8 @@ const scores = {
|
||||
skill_md: skillScore,
|
||||
roles_avg: Object.values(roleResults).reduce((sum, r) => sum + r.score, 0) / Object.keys(roleResults).length,
|
||||
integration: integration.overall === 'PASS' ? 100 : 50,
|
||||
consistency: checkConsistency()
|
||||
consistency: checkConsistency(),
|
||||
command_quality: Object.values(commandQuality).reduce((sum, c) => sum + c.score, 0) / Math.max(Object.keys(commandQuality).length, 1)
|
||||
}
|
||||
|
||||
function checkConsistency() {
|
||||
|
||||
Reference in New Issue
Block a user