Preface
- The Trap
- The Reality
- The Engine
- Why this is a handbook
- One bounded flow
- What changes in this edition
- How Claude Code participates
- What proof means here
- The result I want
How to use this handbook
- Use the full route first
- Work in chapter-sized states
- Keep one knowledge and verification thread
- Use the standard chapter contract
- Divide machine checks from human decisions
- Use the handbook on your own system
- Choose a shorter route carefully
- Use the appendices as working material
- Know when the work is complete
Chapter 1: Knowledge Recovery and the Verification Harness
- Chapter outcome
- Phase framing: Start safely
- Practical chapter contract
- Apply the contract
Chapter 2: Build the modernization workspace
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 3: Set Claude Code boundaries
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 4: Record the baseline before asking for changes
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 5: Map code and runtime paths
- Chapter outcome
- Phase framing: Knowledge Recovery
- Practical chapter contract
- Apply the contract
Chapter 6: Trace data, messages, batch flows, and side effects
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 7: Extract rules and recover operational knowledge
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 8: Build characterisation tests
- Chapter outcome
- Phase framing: Build the Verification Harness
- Practical chapter contract
- Apply the contract
Chapter 9: Create a reviewed golden master
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 10: Protect consumer contracts
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 11: Test invariants and metamorphic relations
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 12: Create safe replay data
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 13: Define acceptance and rollback
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 14: Find and create a seam
- Chapter outcome
- Phase framing: Change one slice
- Practical chapter contract
- Apply the contract
Chapter 15: Design the strangler path
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 16: Evolve APIs and schemas
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 17: Preserve semantics across language and framework changes
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 18: Migrate data without splitting truth
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 19: Operate bounded human and Claude Code roles
- Chapter outcome
- Phase framing: Execute the Verification Harness
- Practical chapter contract
- Apply the contract
Chapter 20: Build the differential harness
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 21: Challenge the tests with mutation testing
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 22: Run old and new paths in parallel
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 23: Reconcile outputs, state, and side effects
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 24: Produce evidence, cut over, and roll back
- Chapter outcome
- Practical chapter contract
- Apply the contract
Chapter 25: Measure accepted outcomes
- Chapter outcome
- Phase framing: Finish the modernisation
- Practical chapter contract
- Apply the contract
Chapter 26: Decommission the old path
- Chapter outcome
- Practical chapter contract
- Apply the contract
Appendix A: Claude Code setup for bounded modernization work
- What this setup controls
- Start with admission, not installation
- Record the actual installation
- Create the workspace structure
- Write concise project instructions
- Apply project permissions
- Add a deterministic direct-file hook
- Define one bounded discovery task
- Run the task with explicit controls
- Review and reject deliberately
- Promote work only through human gates
- Setup acceptance checklist
- Failure file: the copied allowlist
- My position
- Practice exercises
- Notes
Appendix B: Repeatable task contracts
- What a task contract must settle
- Use one contract for one evidence dependency
- Store contracts as versioned files
- The canonical contract
- Write the prompt from the contract
- Constrain the return without confusing shape with truth
- Four reusable task profiles
- Run a contract without losing the execution record
- Validate syntax, then validate evidence
- Review with a disposition record
- Rejection tests for the contract system
- Manage contract change
- My position
- Practice exercises
- Notes
Appendix C: Test scaffolding
- Start with the evidence question
- Use a repository layout that exposes authority
- Define one case as data
- A small differential harness
- Test the harness before trusting it
- Add properties without inventing the domain
- Protect interfaces with contract scaffolds
- Record side effects rather than suppressing them silently
- Use mutation testing to challenge the oracle
- Bound Claude Code’s role
- Retain the run as evidence
- Failure file: the shared oracle
- My position
- Practice exercises
- Notes
Appendix D: Prompt and review catalogue
- How to use the catalogue
- Pattern 1: Read-only discovery
- Pattern 2: Dependency mapping
- Pattern 3: Business-rule extraction
- Pattern 4: Contradiction check
- Pattern 5: Characterisation-test design
- Pattern 6: Contract-test design
- Pattern 7: Bounded implementation
- Pattern 8: Adversarial review
- Pattern 9: Unsupported-claim check
- Pattern 10: Evidence packaging
- Bad prompt counterexamples
- Review catalogue
- Preserve human authority
Appendix E: Squad and programme templates
- Choose the smallest template that fits the decision
- Template 1: Pilot squad charter
- Template 2: Standard delivery squad charter
- Template 3: Multi-squad programme charter
- Template 4: Role charter
- Template 5: Responsibility map
- Template 6: Decision-rights map
- Template 7: Sprint evidence contract
- Template 8: Review-capacity plan
- Template 9: Scarce-specialist allocation
- Template 10: Handoff record
- Template 11: Escalation record
- Template 12: Programme coordination board
- Template 13: Full-flow time and resource baseline
- Operating the templates as one system
- Final checks before use
Appendix F: Source and version register
- Use three evidence states
- Record a claim
- Current tested compatibility register
- Add another tool or source
- Keep the boundary visible
Companion assets and reproducibility
- What is supplied
- Establish the local identity
- Run the supplied gates
- Use the verification helper
- Use the Claude compatibility helper
- Distribution note
