mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
- Add lite-fix.md command based on lite-plan.md structure - Create diagnosis-json-schema.json for bug diagnosis results - Create fix-plan-json-schema.json for fix planning - Update intelligent-tools-strategy.md: simplify model selection, add 5min minimum timeout - Fix missing _metadata.diagnosis_index in agent prompt - Clarify --hotfix mode skip behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
274 lines
8.7 KiB
JSON
274 lines
8.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Fix Plan Schema",
|
|
"description": "Bug fix plan from cli-lite-planning-agent or direct planning",
|
|
"type": "object",
|
|
"required": [
|
|
"summary",
|
|
"root_cause",
|
|
"strategy",
|
|
"tasks",
|
|
"estimated_time",
|
|
"recommended_execution",
|
|
"severity",
|
|
"risk_level",
|
|
"_metadata"
|
|
],
|
|
"properties": {
|
|
"summary": {
|
|
"type": "string",
|
|
"description": "2-3 sentence overview of the fix plan"
|
|
},
|
|
"root_cause": {
|
|
"type": "string",
|
|
"description": "Consolidated root cause statement from all diagnoses"
|
|
},
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["immediate_patch", "comprehensive_fix", "refactor"],
|
|
"description": "Fix strategy: immediate_patch (minimal change), comprehensive_fix (proper solution), refactor (structural improvement)"
|
|
},
|
|
"tasks": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 5,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "title", "scope", "action", "description", "implementation", "verification"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^FIX[0-9]+$",
|
|
"description": "Task identifier (FIX1, FIX2, FIX3...)"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Task title (action verb + target, e.g., 'Fix token validation edge case')"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Task scope: module path (src/auth/), feature name, or single file. Prefer module level."
|
|
},
|
|
"file": {
|
|
"type": "string",
|
|
"description": "Primary file (deprecated, use scope + modification_points instead)"
|
|
},
|
|
"action": {
|
|
"type": "string",
|
|
"enum": ["Fix", "Update", "Refactor", "Add", "Delete", "Configure"],
|
|
"description": "Primary action type"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "What to fix (1-2 sentences)"
|
|
},
|
|
"modification_points": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["file", "target", "change"],
|
|
"properties": {
|
|
"file": {
|
|
"type": "string",
|
|
"description": "File path within scope"
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "Function/class/line range (e.g., 'validateToken:45-60')"
|
|
},
|
|
"change": {
|
|
"type": "string",
|
|
"description": "Brief description of change"
|
|
}
|
|
}
|
|
},
|
|
"description": "All modification points for this fix task. Group related changes into one task."
|
|
},
|
|
"implementation": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"minItems": 2,
|
|
"maxItems": 5,
|
|
"description": "Step-by-step fix implementation guide"
|
|
},
|
|
"verification": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"minItems": 1,
|
|
"maxItems": 3,
|
|
"description": "Verification/test criteria to confirm fix works"
|
|
},
|
|
"reference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "Pattern name to follow"
|
|
},
|
|
"files": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Reference file paths to study"
|
|
},
|
|
"examples": {
|
|
"type": "string",
|
|
"description": "Specific guidance or example references"
|
|
}
|
|
},
|
|
"description": "Reference materials for fix implementation (optional)"
|
|
},
|
|
"depends_on": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^FIX[0-9]+$"
|
|
},
|
|
"description": "Task IDs this task depends on (e.g., ['FIX1'])"
|
|
},
|
|
"risk": {
|
|
"type": "string",
|
|
"enum": ["low", "medium", "high"],
|
|
"description": "Risk level of this specific fix task"
|
|
}
|
|
}
|
|
},
|
|
"description": "Structured fix task breakdown (1-5 tasks)"
|
|
},
|
|
"flow_control": {
|
|
"type": "object",
|
|
"properties": {
|
|
"execution_order": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phase": {
|
|
"type": "string",
|
|
"description": "Phase name (e.g., 'parallel-1', 'sequential-1')"
|
|
},
|
|
"tasks": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Task IDs in this phase"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["parallel", "sequential"],
|
|
"description": "Execution type"
|
|
}
|
|
}
|
|
},
|
|
"description": "Ordered execution phases"
|
|
},
|
|
"exit_conditions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "string",
|
|
"description": "Condition for successful fix completion"
|
|
},
|
|
"failure": {
|
|
"type": "string",
|
|
"description": "Condition that indicates fix failure"
|
|
}
|
|
},
|
|
"description": "Conditions for fix workflow termination"
|
|
}
|
|
},
|
|
"description": "Execution flow control (optional, auto-inferred from depends_on if not provided)"
|
|
},
|
|
"focus_paths": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Key file paths affected by this fix (aggregated from tasks)"
|
|
},
|
|
"test_strategy": {
|
|
"type": "object",
|
|
"properties": {
|
|
"scope": {
|
|
"type": "string",
|
|
"enum": ["unit", "integration", "e2e", "smoke", "full"],
|
|
"description": "Test scope to run after fix"
|
|
},
|
|
"specific_tests": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Specific test files or patterns to run"
|
|
},
|
|
"manual_verification": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Manual verification steps if automated tests not available"
|
|
}
|
|
},
|
|
"description": "Testing strategy for fix verification"
|
|
},
|
|
"rollback_plan": {
|
|
"type": "object",
|
|
"properties": {
|
|
"strategy": {
|
|
"type": "string",
|
|
"enum": ["git_revert", "feature_flag", "manual"],
|
|
"description": "Rollback strategy if fix fails"
|
|
},
|
|
"steps": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Rollback steps"
|
|
}
|
|
},
|
|
"description": "Rollback plan if fix causes issues (optional, recommended for high severity)"
|
|
},
|
|
"estimated_time": {
|
|
"type": "string",
|
|
"description": "Total estimated fix time (e.g., '30 minutes', '2 hours')"
|
|
},
|
|
"recommended_execution": {
|
|
"type": "string",
|
|
"enum": ["Agent", "Codex"],
|
|
"description": "Recommended execution method based on complexity"
|
|
},
|
|
"severity": {
|
|
"type": "string",
|
|
"enum": ["Low", "Medium", "High", "Critical"],
|
|
"description": "Bug severity level"
|
|
},
|
|
"risk_level": {
|
|
"type": "string",
|
|
"enum": ["low", "medium", "high"],
|
|
"description": "Risk level of implementing the fix"
|
|
},
|
|
"_metadata": {
|
|
"type": "object",
|
|
"required": ["timestamp", "source"],
|
|
"properties": {
|
|
"timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "ISO 8601 timestamp of planning"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"enum": ["cli-lite-planning-agent", "direct-planning"],
|
|
"description": "Planning source"
|
|
},
|
|
"planning_mode": {
|
|
"type": "string",
|
|
"enum": ["direct", "agent-based"],
|
|
"description": "Planning execution mode"
|
|
},
|
|
"diagnosis_angles": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Diagnosis angles used for context"
|
|
},
|
|
"duration_seconds": {
|
|
"type": "integer",
|
|
"description": "Planning duration in seconds"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|