원클릭으로
retrofit
Brownfield lifecycle — reassess existing projects through Deep Audit, Architect recovery, Board re-prioritization, and Stabilization.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Brownfield lifecycle — reassess existing projects through Deep Audit, Architect recovery, Board re-prioritization, and Stabilization.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Upgrade DLD framework files from latest template on GitHub.
Autonomous spec execution with subagents (planner, coder, tester, reviewer).
Autonomous spec execution with subagents (planner, coder, tester, reviewer).
Feature specification and research agent. Multi-agent with 4 scouts. Creates specs in ai/features/.
Feature specification and research agent. Multi-agent with 4 scouts. Creates specs in ai/features/.
Manual QA tester — tests product behavior like a real user, not code. Triggers on keywords: test, QA, check behavior, verify feature, manual testing, протестируй, потыкай, проверь как работает
| name | retrofit |
| description | Brownfield lifecycle — reassess existing projects through Deep Audit, Architect recovery, Board re-prioritization, and Stabilization. |
| model | opus |
Systematic reassessment of existing projects. Inverted flow: understand code first, then design architecture, then set business priorities.
Activation: /retrofit, "retrofit", "brownfield", "reassess project"
Input: Existing codebase (any state)
Output: Blueprints + migration-path.md + stabilized codebase
/triz shows systemic constraint -- diagnostic suggests deep reassessmentNot for: New projects (use /bootstrap), single features (use /spark).
Analogy: Vehicle inspection. Not because the car is bad -- because any car requires periodic checks.
BROWNFIELD (this skill) GREENFIELD (normal flow)
1. Deep Audit (bottom-up) 1. Bootstrap (top-down)
"what do we have?" "what do we want?"
| |
2. Architect Recovery 2. Board
"document & design" "business strategy"
| |
3. Board Recovery 3. Architect
"priorities & direction" "system architecture"
| |
4. Stabilization 4. Spark -> Autopilot
"fix foundations" "features one by one"
|
5. Normal Flow
"build features"
Why inverted: In brownfield, code is the ONLY source of truth. You must understand what's built before making business or architecture decisions about it.
/retrofit
|
+-- Phase 1: DEEP AUDIT
| |-- Run /audit deep (full 6-persona protocol)
| +-- EXIT GATE: ai/audit/deep-audit-report.md validated
|
+-- Phase 2: ARCHITECT (retrofit mode)
| |-- Run /architect with MODE: retrofit
| |-- HUMAN CHOOSES architecture alternative
| +-- EXIT GATE: system-blueprint/ + migration-path.md validated
|
+-- Phase 3: BOARD (retrofit mode)
| |-- Run /board with MODE: retrofit
| |-- HUMAN CHOOSES strategy
| +-- EXIT GATE: business-blueprint.md validated
|
+-- Phase 4: HUMAN REVIEW
| |-- Present all artifacts
| |-- Human: approve / adjust / reject
| +-- EXIT GATE: explicit human approval
|
+-- Phase 5: STABILIZATION
| |-- Execute migration-path.md wave by wave
| |-- Each item: /spark -> /autopilot
| +-- EXIT GATE: all waves done OR human says "enough"
|
+-- Phase 6: NORMAL FLOW
+-- Blueprints in place -> Spark/Autopilot as greenfield
Delegate to /audit deep. This runs the full 6-persona protocol with Phase 0 inventory.
DO NOT re-implement audit here. The audit skill handles:
1. Ensure ai/audit/ directory exists
2. Invoke: /audit deep
3. Wait for completion
4. Verify gate:
node .claude/scripts/validate-audit-report.mjs ai/audit/deep-audit-report.md
node .claude/scripts/validate-audit-report.mjs ai/audit/deep-audit-report.md
PASS: Proceed to Phase 2. FAIL: Report issues to user. Re-run audit or fix manually.
After audit completes, present summary:
Ask: "Ready to proceed to Architect recovery?"
Architect runs with MODE: retrofit, using deep-audit-report.md as primary input instead of business-blueprint.md.
node .claude/scripts/validate-audit-report.mjs ai/audit/deep-audit-report.md
Must pass before Architect starts.
1. Invoke: /architect
- Architect SKILL.md detects retrofit mode from context
- Input: ai/audit/deep-audit-report.md
- Architect runs full 8-phase process internally
2. Architect presents 2-3 architecture alternatives
3. HUMAN CHOOSES (no auto-decide in retrofit)
4. Write chain produces system-blueprint/ + migration-path.md
node .claude/scripts/validate-architect-data.mjs ai/architect/
PASS: Proceed to Phase 3. FAIL: Re-run write chain or fix specific files.
The ONLY truly new artifact that doesn't exist in greenfield.
# Migration Path: AS-IS -> TO-BE
## Wave 1: Foundations
### MP-001: {Title}
**Type:** TECH | ARCH
**Priority:** P0
**Current state:** ...
**Target state:** ...
**Files affected:** ...
**Depends on:** none
## Wave 2: Domain Boundaries (after Wave 1)
### MP-003: {Title}
**Depends on:** MP-001, MP-002
## Exit Criterion
All items done -> AS-IS converged with TO-BE -> normal flow.
Rules:
Board runs with MODE: retrofit, using audit report + system blueprint + migration path as input.
node .claude/scripts/validate-architect-data.mjs ai/architect/
Must pass before Board starts.
1. Invoke: /board
- Board SKILL.md detects retrofit mode from context
- Input: deep-audit-report.md + system-blueprint/ + migration-path.md
- Board runs full process internally
2. Board applies KEEP/CHANGE/DROP lens to existing features
3. Board may re-prioritize waves in migration-path.md
4. HUMAN CHOOSES strategy (no auto-decide in retrofit)
5. Write chain produces business-blueprint.md with retrofit extensions
node .claude/scripts/validate-board-data.mjs ai/board/
PASS: Proceed to Phase 4. FAIL: Re-run write chain or fix specific files.
All blueprints and migration path are ready. Present everything for human approval.
RETROFIT REVIEW
===============
1. Deep Audit Summary
- {key findings}
2. Architecture Decisions
- {chosen alternative + rationale}
- migration-path.md: {N} items in {M} waves
3. Board Strategy
- KEEP: {N} decisions
- CHANGE: {N} decisions
- DROP: {N} decisions
- Investment split: {stabilization}% / {features}%
Files for review:
- ai/audit/deep-audit-report.md
- ai/blueprint/system-blueprint/ (6 files)
- ai/architect/migration-path.md
- ai/blueprint/business-blueprint.md
| Choice | Action |
|---|---|
| Approve | Proceed to Phase 5 (Stabilization) |
| Adjust | Human modifies specific files, then re-approve |
| Reject architecture | Back to Phase 2 with feedback |
| Reject strategy | Back to Phase 3 with feedback |
| Abort | Stop retrofit entirely |
EXIT GATE: Explicit human approval (verbal or written).
Execute migration-path.md wave by wave. Each item becomes a Spark spec, then runs through Autopilot.
For each wave in migration-path.md:
For each item (MP-XXX) in wave:
1. /spark (Blueprint-Initiated, Mode B)
- Spark receives MP-XXX as input
- Creates feature/tech spec
2. /autopilot
- Full pipeline (plan -> code -> test -> review)
- NO shortcuts, NO batching
3. Verify: tests pass, no regressions
Wave N+1 starts ONLY when Wave N is complete.
If stabilization uncovers new problems:
| Condition | Action |
|---|---|
| All waves complete | Proceed to Phase 6 |
| Human says "enough" | Proceed to Phase 6 (partial retrofit) |
| New architectural issue | Back to Phase 2 (loop) |
Retrofit complete. Blueprints are in place. Project operates as greenfield.
ai/blueprint/system-blueprint/ -- architecture constraints
ai/blueprint/business-blueprint.md -- business constraints
ai/architect/migration-path.md -- completed (historical record)
Next: /spark -> /autopilot (within blueprint constraints)
Retrofit stakes are high. One wrong decision can invalidate entire migration.
| Level | Mechanism | Where |
|---|---|---|
| 1 | WAIT FOR ALL | Audit personas, Architect rounds, Board rounds |
| 2 | File-based gates | validate-*.mjs scripts between phases |
| 3 | No auto-decide | Human ALWAYS chooses in retrofit |
| 4 | Inventory coverage | Phase 0 guarantees 100% file discovery |
| 5 | Quote-before-claim | Every audit finding cites exact code |
| 6 | Min operation counts | Personas have enforced minimums |
In greenfield, some skills allow AUTO mode for simple decisions. In retrofit: ALWAYS HUMAN. Every architecture choice, every Board strategy, every migration path approval.
!!! RETROFIT RULE: No auto-decide.
Every architecture alternative -> HUMAN CHOOSES.
Every Board strategy -> HUMAN CHOOSES.
Every migration wave completion -> HUMAN APPROVES.
Violation of this rule invalidates retrofit output.
| Trigger | Source |
|---|---|
/retrofit | Explicit user command |
| "retrofit", "brownfield" | Natural language |
| Bugfix/feature > 1:1 | Reflect pipeline signal (future) |
| Major pivot | Board escalation |
| Framework upgrade (v1 -> v2) | User triggers |
/triz systemic constraint | Diagnostic signal |
ai/audit/
codebase-inventory.json (Phase 0)
report-*.md (6 persona reports)
deep-audit-report.md (consolidated)
ai/architect/
research-*.md (persona research)
migration-path.md (NEW in retrofit)
ai/blueprint/
system-blueprint/ (6 architecture files)
business-blueprint.md (with KEEP/CHANGE/DROP)
Blueprints in place -> Normal flow
/spark for features (within blueprint constraints)
/autopilot for execution (full pipeline)
If problems recur -> /triz diagnostic -> /retrofit again