swarm repositories / source
summaryrefslogtreecommitdiff
path: root/assets/codex-skills/mcp-bootstrap/references/bootstrap-retrofit.md
blob: 146733cc04090d371a646b7da6e51fd0d88251c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Retrofit

Use this when the MCP already exists and cannot simply be reimagined from
scratch.

## Retrofit Order

1. Separate session ownership from fragile execution.
2. Define typed replay contracts and typed faults.
3. Replace ad hoc backend dumps with porcelain-by-default output.
4. Add health, telemetry, and recovery tests.
5. Only then promise hot rollout or stronger operational guarantees.

When `libmcp` is in play, prefer its host-session kernel and render helpers over
consumer-local copies.

## Specific Warnings

- Do not add retries before replay legality is explicit.
- Do not hide routing bugs behind warm-up masking.
- Do not call a worker self-healing if the host itself cannot roll forward.
- Do not let the canonical skill drift away from the actual library contract.

## Doctrine

The retrofit is complete only when:

- the hard posture lives in code
- the model UX doctrine is visible at the tool surface
- the skill, spec, and implementation agree