Files
Claude-Code-Workflow/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt
catlog22 15bf9cdbed Refactor workflow session archival and SKILL package updates
- Updated command invocation for SKILL memory generator to use session ID instead of incremental mode.
- Enhanced documentation on the processing of archived sessions and intelligent aggregation by the agent.
- Added templates for generating conflict patterns, lessons learned, SKILL index, and sessions timeline.
- Established clear update strategies for incremental and full modes across all new templates.
- Improved structure and formatting rules for better clarity and usability in generated documents.
2025-11-04 21:46:37 +08:00

99 lines
2.5 KiB
Plaintext

Template for generating lessons-learned.md
## Purpose
Aggregate lessons learned from workflow sessions, categorized by functional domain and severity.
## File Location
`.claude/skills/workflow-progress/lessons-learned.md`
## Update Strategy
- **Incremental mode**: Merge new session lessons into existing categories, update frequencies
- **Full mode**: Regenerate entire lessons document from all sessions
## Structure
```markdown
# Workflow Lessons Learned
## Best Practices (Successes)
### {Domain_Category}
- {success_pattern_1} (sessions: {session_id_1}, {session_id_2})
- {success_pattern_2} (sessions: {session_id_3})
### {Domain_Category_2}
...
---
## Known Challenges
### High Priority
- **{challenge_title}**: {description}
- Affected sessions: {session_id_1}, {session_id_2}
- Resolution: {resolution_strategy}
### Medium Priority
- **{challenge_title}**: {description}
- Affected sessions: {session_id_3}
- Resolution: {resolution_strategy}
### Low Priority
...
---
## Watch Patterns
### Critical (3+ sessions)
1. **{pattern_name}**: {description}
- Frequency: {count} sessions
- Affected: {session_list}
- Mitigation: {mitigation_strategy}
### High Priority (2 sessions)
...
### Normal (1 session)
...
```
## Data Sources
- Lessons: `manifest.json` -> `archives[].lessons.{successes|challenges|watch_patterns}`
- Session metadata: `.workflow/.archives/{session_id}/workflow-session.json`
## Aggregation Rules (Use Gemini CLI)
**Command Pattern**:
```bash
gemini -p "
PURPOSE: Aggregate workflow lessons from session data
TASK:
• Group successes by functional domain
• Categorize challenges by severity (HIGH/MEDIUM/LOW)
• Identify watch patterns with frequency >= 2
• Mark CRITICAL patterns (3+ sessions)
MODE: analysis
CONTEXT: @.workflow/.archives/manifest.json
EXPECTED: Aggregated lessons with frequency counts
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/workflow/skill-aggregation.txt)
"
```
**Severity Classification**:
- **HIGH**: Blocked development >4 hours OR repeated in 3+ sessions
- **MEDIUM**: Required significant rework OR repeated in 2 sessions
- **LOW**: Minor issues resolved quickly
**Pattern Identification**:
- Successes in 3+ sessions → "Best Practices"
- Challenges repeated 2+ times → "Known Issues"
- Watch patterns frequency >= 2 → "High Priority Warnings"
- Watch patterns frequency >= 3 → "CRITICAL"
## Formatting Rules
- Sort by frequency (most common first)
- Include session references for traceability
- Use bold for challenge titles
- Keep descriptions concise but actionable