Use for test-driven development of trading strategies. Supports Ralph Loop iterative mode for complex implementations. Ensures backtest interface alignment, atomic implementation, synchronized test updates, PM regression prevention, and dependency impact analysis.
View on GitHubmorris-y/blueprint-skills
blueprint-skills
skills/blueprint-develop/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/morris-y/blueprint-skills/blob/main/skills/blueprint-develop/SKILL.md -a claude-code --skill blueprint-developInstallation paths:
.claude/skills/blueprint-develop/# Blueprint Develop - Test-Driven Strategy Implementation
## Overview
Execute strategy implementation with TDD discipline and **Postmortem regression prevention**. Every code change must align with backtest interfaces, pass PM compliance checks, and have synchronized test coverage.
## Core Principle
```
./postmortem/ = 深度病历库 (Deep Case History)
./CLAUDE.md = 高频手术准则 (High-Frequency Operating Rules)
Rule: 每写一行代码前,先查 CLAUDE.md;每改一个模块前,先查相关 postmortem
```
## When to Use
- Implementing new trading strategy logic from Linear tickets
- Modifying existing strategy code in `strategies/`
- User mentions "开发", "implement", or "code the strategy"
- Any code change that affects trading logic
**Do NOT use when:**
- Planning strategy (use `blueprint-plan` instead)
- Pure backtest runs without code changes
- Documentation or config changes only
## Prerequisites
Before invoking this skill, verify:
- [ ] Linear ticket exists for the work (from `blueprint-plan`)
- [ ] Backtest framework is in place (`backtest/` directory)
- [ ] Test file location confirmed (`tests/backtest_unit.py`)
- [ ] **PM mitigations from ticket identified** (from `blueprint-plan` Phase 0)
## Workflow
```dot
digraph blueprint_develop {
rankdir=TB;
node [shape=box];
start [label="Start: Linear Ticket Ready" shape=ellipse];
pm_load [label="0. Load PM Context\n(CLAUDE.md + postmortem/)" style=filled fillcolor=lightyellow];
env [label="1. Environment Alignment\n(GitHub MCP)"];
pm_test [label="2. PM Regression Tests First\n(TDD Red Phase)" style=filled fillcolor=lightyellow];
test_first [label="3. Feature Tests\n(TDD Red Phase)"];
impl [label="4. Atomic Implementation\n(code-simplifier)"];
sync [label="5. Sync Test Update\n(TDD Green Phase)"];
impact [label="6. Impact + PM Compliance\n(context7)"];
done [label="Code Ready for Review" shape=ellipse];
start -> pm_load;
pm_load -> env;
env -> pm_test;
pm_test -> test_first;
test_first -> impl