Reverse Engineering
Recover architecture, behavior, risks, and owners.
betterCode() GenAI Summit
Claude Code, MCP Gateway, skills, subagents, dynamic context, and gates.
Bridge from Laura & Sigrid
Laura and Sigrid set the modernization frame. We go one layer deeper: the agent workflow.
Recover architecture, behavior, risks, and owners.
Derive target design, tests, and migration seams.
Pattern matrix, evidence contract, review gate.
Our focus
The model reasons. The harness controls context, tools, artifacts, and gates.
Context strategy
Better agents are not fed more material up front. They get the right material at the decision point.
Load only the files, tools, skills, and references needed for the current decision.
Turn noisy exploration into contracts, artifacts, and open questions.
Make evidence inspectable so engineers can challenge assumptions before rollout.
This is the short version. The routing trade-off comes back in depth.
Audience reality check
The agent does not forget. It keeps too much.
System prompt, project rules, safety policy.
Schemas loaded before evidence exists.
Files, grep results, logs, failed tests.
Plans, corrections, detours, assumptions.
Compressed memory with missing nuance.
Context mechanics
History, schemas, file reads, tests, and summaries share one attention budget.
Core trade-off
Target architecture
CatalogService, tests, logs, dependency metadata.
Plans the workflow, routes evidence requests, and protects main context.
Architecture Map, Risk Table, Test-Gap Report, Migration Decision, Review Gates.
Pattern selection
MCP Gateway
enable many servers reload whole session context call it context optimization hope the model sorts it out
central tool catalog application-level access user and data policy auditable tool usage
Gateway config decides which users may access which applications, tools, and evidence sources.
Subagents
Keeps interaction, task graph, and synthesis together.
Findings, references, confidence, gaps, artifacts.
Subagent trade-offs
Transition: when the method repeats, package the method as a skill.
Skills
Repeatable specialist work becomes reusable method knowledge.
Agent knows which reusable methods exist.
Like a command: load the procedure when the task matches.
References and templates stay out of main context until needed.
Many tasks that used to need a specialist subagent can become a reusable skill.
Artifact-first review
Artifacts let different engineers inspect different parts of the migration argument.
Referenced source, tests, configuration, and runtime assumptions.
Current boundaries, dependencies, and operational coupling.
Proposed seams, ownership, rollback, and integration contracts.
Evidence, assumptions, confidence, and post-migration test gaps.
Quality Hooks
Load required project state, architecture rules, or migration policy before risky steps.
Require validation, architecture, or discovery skills for matching tasks.
Detect secrets and sensitive files before they enter the agent context.
Instructions are not controls. Hooks make the harness enforceable.
Artifact 1
Controllers, services, EF model, DI wiring.
Finds layer boundaries from evidence.
Web/MVC, Catalog service, Domain model, EF data access, Composition root.
Which team can operate, deploy and roll it back?
Verification
Build proven, spec traceability complete, test job still needs follow-up.
Flags semantic deltas; never replaces tests.
Humans accept risk and approve rollout.
Limits and pitfalls
The harness reduces risk. It does not make model output deterministic truth.
Weak evidence can hide behind a clean table.
Minority findings disappear when the return contract is vague.
Business invariants can still be broken.
The fix is not more confidence. The fix is stronger evidence and explicit review.
Design principles & learnings
Purpose, cost, owner, expiry.
Schemas spend attention.
Evidence, confidence, assumptions.
Tests, security, owner review.
Teams approve and operate.
Invest in harness patterns, not bigger prompts.
Demo evidence
Start with the run summary: what executed, what passed, and which artifacts exist.
Demo evidence
The run is not a single prompt. It is a staged workflow with explicit outputs.
Demo evidence
The target shape is captured as artifacts before implementation claims are trusted.
Demo evidence
The result is inspectable: reports, references, checks, and gaps survive the chat.
Live demo
One catalog service. Five artifacts. One review gate.
Closing
Load tools, files, and skills when a decision needs them.
Every finding returns references, confidence, assumptions, and gaps.
Tests, build evidence, security checks, and owner review carry the risk decision.
Context & Harness are Keys to success.