mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
- Introduced quality gates specification for skill tuning, detailing quality dimensions, scoring, and gate definitions. - Added comprehensive tuning strategies for various issue categories, including context explosion, long-tail forgetting, data flow, and agent coordination. - Created templates for diagnosis reports and fix proposals to standardize documentation and reporting processes.
154 lines
2.9 KiB
Markdown
154 lines
2.9 KiB
Markdown
# Diagnosis Report Template
|
|
|
|
Template for individual diagnosis action reports.
|
|
|
|
## Template
|
|
|
|
```markdown
|
|
# {{diagnosis_type}} Diagnosis Report
|
|
|
|
**Target Skill**: {{skill_name}}
|
|
**Diagnosis Type**: {{diagnosis_type}}
|
|
**Executed At**: {{timestamp}}
|
|
**Duration**: {{duration_ms}}ms
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
| Metric | Value |
|
|
|--------|-------|
|
|
| Issues Found | {{issues_found}} |
|
|
| Severity | {{severity}} |
|
|
| Patterns Checked | {{patterns_checked_count}} |
|
|
| Patterns Matched | {{patterns_matched_count}} |
|
|
|
|
---
|
|
|
|
## Patterns Analyzed
|
|
|
|
{{#each patterns_checked}}
|
|
### {{pattern_name}}
|
|
|
|
- **Status**: {{status}}
|
|
- **Matches**: {{match_count}}
|
|
- **Files Affected**: {{affected_files}}
|
|
|
|
{{/each}}
|
|
|
|
---
|
|
|
|
## Issues Identified
|
|
|
|
{{#if issues.length}}
|
|
{{#each issues}}
|
|
### {{id}}: {{description}}
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| Type | {{type}} |
|
|
| Severity | {{severity}} |
|
|
| Location | {{location}} |
|
|
| Root Cause | {{root_cause}} |
|
|
| Impact | {{impact}} |
|
|
|
|
**Evidence**:
|
|
{{#each evidence}}
|
|
- `{{this}}`
|
|
{{/each}}
|
|
|
|
**Suggested Fix**: {{suggested_fix}}
|
|
|
|
---
|
|
{{/each}}
|
|
{{else}}
|
|
_No issues found in this diagnosis area._
|
|
{{/if}}
|
|
|
|
---
|
|
|
|
## Recommendations
|
|
|
|
{{#if recommendations.length}}
|
|
{{#each recommendations}}
|
|
{{@index}}. {{this}}
|
|
{{/each}}
|
|
{{else}}
|
|
No specific recommendations - area appears healthy.
|
|
{{/if}}
|
|
|
|
---
|
|
|
|
## Raw Data
|
|
|
|
Full diagnosis data available at:
|
|
`{{output_file}}`
|
|
```
|
|
|
|
## Variable Reference
|
|
|
|
| Variable | Type | Source |
|
|
|----------|------|--------|
|
|
| `diagnosis_type` | string | 'context' \| 'memory' \| 'dataflow' \| 'agent' |
|
|
| `skill_name` | string | state.target_skill.name |
|
|
| `timestamp` | string | ISO timestamp |
|
|
| `duration_ms` | number | Execution time |
|
|
| `issues_found` | number | issues.length |
|
|
| `severity` | string | Calculated severity |
|
|
| `patterns_checked` | array | Patterns analyzed |
|
|
| `patterns_matched` | array | Patterns with matches |
|
|
| `issues` | array | Issue objects |
|
|
| `recommendations` | array | String recommendations |
|
|
| `output_file` | string | Path to JSON file |
|
|
|
|
## Usage
|
|
|
|
```javascript
|
|
function renderDiagnosisReport(diagnosis, diagnosisType, skillName, outputFile) {
|
|
return `# ${diagnosisType} Diagnosis Report
|
|
|
|
**Target Skill**: ${skillName}
|
|
**Diagnosis Type**: ${diagnosisType}
|
|
**Executed At**: ${new Date().toISOString()}
|
|
**Duration**: ${diagnosis.execution_time_ms}ms
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
| Metric | Value |
|
|
|--------|-------|
|
|
| Issues Found | ${diagnosis.issues_found} |
|
|
| Severity | ${diagnosis.severity} |
|
|
| Patterns Checked | ${diagnosis.details.patterns_checked.length} |
|
|
| Patterns Matched | ${diagnosis.details.patterns_matched.length} |
|
|
|
|
---
|
|
|
|
## Issues Identified
|
|
|
|
${diagnosis.details.evidence.map((e, i) => `
|
|
### Issue ${i + 1}
|
|
|
|
- **File**: ${e.file}
|
|
- **Pattern**: ${e.pattern}
|
|
- **Severity**: ${e.severity}
|
|
- **Context**: \`${e.context}\`
|
|
`).join('\n')}
|
|
|
|
---
|
|
|
|
## Recommendations
|
|
|
|
${diagnosis.details.recommendations.map((r, i) => `${i + 1}. ${r}`).join('\n')}
|
|
|
|
---
|
|
|
|
## Raw Data
|
|
|
|
Full diagnosis data available at:
|
|
\`${outputFile}\`
|
|
`;
|
|
}
|
|
```
|