Use after PR merge to complete iteration cycle. Supports Ralph Loop for iterative PM refinement. Syncs Linear status, commits with standards, creates Postmortems for significant incidents, and crystallizes high-frequency rules into CLAUDE.md.
View on GitHubmorris-y/blueprint-skills
blueprint-skills
skills/blueprint-optimize/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/morris-y/blueprint-skills/blob/main/skills/blueprint-optimize/SKILL.md -a claude-code --skill blueprint-optimizeInstallation paths:
.claude/skills/blueprint-optimize/# Blueprint Optimize - Dual-Layer Memory Crystallization
## Overview
Complete the iteration cycle by syncing status, committing properly, and permanently capturing hard-won lessons in the **dual-layer memory system**:
- `./postmortem/` = Deep case history (detailed analysis)
- `./CLAUDE.md` = High-frequency operating rules (concise directives)
## Core Principle
```
./postmortem/ = 深度病历库 (Deep Case History)
→ 完整的事故分析、root cause、时间线、详细修复
→ 无行数限制,越详细越好
./CLAUDE.md = 高频手术准则 (High-Frequency Operating Rules)
→ 只有指令和警告,无解释
→ 严格 ≤ 100 行
Rule: 先写病历 (postmortem),再提炼准则 (CLAUDE.md)
```
## When to Use
- PR has been merged (after `blueprint-review`)
- Ready to close out the iteration
- User mentions "上线", "merge complete", "close ticket", or "记录经验"
- **After any incident, bug, or significant learning**
**Do NOT use when:**
- PR still under review (use `blueprint-review`)
- Still implementing (use `blueprint-develop`)
## Prerequisites
Before invoking this skill, verify:
- [ ] PR merged to main branch
- [ ] All tests passing on main
- [ ] Linear ticket exists and is linked to PR
## Workflow
```dot
digraph blueprint_optimize {
rankdir=TB;
node [shape=box];
start [label="Start: PR Merged" shape=ellipse];
sync [label="1. Status Sync\n(Linear MCP)"];
commit [label="2. Final Commit\n(commit-commands)"];
pm_decision [label="3. PM Decision\n(Need New Postmortem?)" shape=diamond style=filled fillcolor=lightyellow];
pm_write [label="3a. Write Postmortem\n(./postmortem/)" style=filled fillcolor=lightyellow];
claude_preview [label="4. CLAUDE.md Preview\n(Extract from PM)" style=filled fillcolor=lightyellow];
confirm [label="5. Human Confirms" shape=diamond];
claude_write [label="6. Write to CLAUDE.md"];
done [label="Iteration Complete" shape=ellipse];
start -> sync;
sync -> commit;
commit -> pm_decision;
pm_decision -> pm_write [label="Yes: Incident/Bug