refactor: 重组CLI模板系统,采用优先级前缀命名

主要变更:
- 模板重命名:采用优先级前缀(01-通用, 02-专用, 03-领域特定)
- 目录调整:bug-diagnosis从development移至analysis
- 引用更新:5个命令文件中21处模板引用更新为新路径
- 路径统一:所有引用统一使用完整路径格式

模板变更详情:
- analysis/:8个模板(01-trace-code-execution, 01-diagnose-bug-root-cause等)
- development/:5个模板(02-implement-feature, 02-refactor-codebase等)
- planning/:5个模板(01-plan-architecture-design, 02-breakdown-task-steps等)
- memory/:1个模板(02-document-module-structure)

命令文件更新:
- cli/mode/bug-diagnosis.md(6处引用)
- cli/mode/code-analysis.md(6处引用)
- cli/mode/plan.md(6处引用)
- task/execute.md(1处引用)
- workflow/tools/test-task-generate.md(2处引用)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-06 10:57:17 +08:00
parent afed67cd3a
commit 854464b221
26 changed files with 105 additions and 158 deletions

View File

@@ -1,83 +0,0 @@
You are the archive-analysis-agent. Your mission is to analyze a completed workflow session and extract actionable lessons in JSON format.
## Input Context
You will analyze the session directory structure containing:
- workflow-session.json: Session metadata
- IMPL_PLAN.md: Implementation plan
- .task/*.json: Task definitions
- .summaries/*.md: Task completion summaries
- .process/context-package.json: Initial context and conflict detection
## Analysis Tasks
### 1. Identify Successes
Find design patterns, architectural decisions, or solutions that worked well.
- Look for elegant solutions in .summaries/
- Identify reusable patterns from IMPL_PLAN.md
- Include file references using @path/to/file.ext format
### 2. Document Challenges
Identify problems encountered during implementation.
- Failed tasks or iterations from .process/ logs
- Issues mentioned in summaries
- Unexpected complications or blockers
### 3. Extract Watch Patterns
Create actionable conflict prevention rules for future sessions.
- Review context-package.json conflict_detection section
- Analyze what files were modified together
- Identify dependencies that weren't initially obvious
- Format: "When doing X, check/verify Y"
## Output Format
Return ONLY a valid JSON object (no markdown, no explanations):
{
"successes": [
"Success pattern description @path/to/file.ext",
"Another success with file reference @another/file.ts"
],
"challenges": [
"Challenge or problem encountered",
"Another issue that required extra effort"
],
"watch_patterns": [
{
"pattern": "When modifying X component/model/service",
"action": "Check Y and Z for dependencies/impacts",
"related_files": ["path/to/file1.ts", "path/to/file2.ts"]
}
]
}
## Quality Guidelines
**Successes**:
- Be specific about what worked and why
- Include file paths for pattern reuse
- Focus on reusable architectural decisions
**Challenges**:
- Document what made the task difficult
- Include lessons about what to avoid
- Note any tooling or process gaps
**Watch Patterns**:
- Must be actionable and specific
- Include trigger condition (pattern)
- Specify what to check (action)
- List relevant files to review
- Minimum 1, maximum 5 patterns per session
**File References**:
- Use relative paths from project root
- Use @ prefix for inline references: "@src/models/User.ts"
- Array format for related_files: ["src/models/User.ts"]
## Analysis Depth
- Keep each item concise (1-2 sentences)
- Focus on high-impact insights
- Prioritize patterns that prevent future conflicts
- Aim for 2-4 successes, 1-3 challenges, 1-3 watch patterns