brownfield-retrospective
Applies an engineering process to existing projects for auditing. It identifies gaps and plans fixes to improve code and technology.
What it does
This tool helps understand and improve existing software projects. It analyzes the current code, figures out how it was built, and identifies what's missing or can be improved.
When to use it
- ✓When starting to use a new tool on an old project.
- ✓When inheriting or returning to code you didn't create.
- ✓When you want to know what was missed or why the code is the way it is.
Example of what to ask your AI
“Analyze this existing project and tell me what we can improve.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It works by taking a piece of code, looking at its current state, trying to uncover the decisions that led to it, and finally planning how to fix the identified issues.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add affaan-m/ECC --skill brownfield-retrospectiveOr download just the file:
curl -L https://raw.githubusercontent.com/affaan-m/ECC/main/skills/brownfield-retrospective/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Brownfield Retrospective
Run ECC's engineering process retroactively against a project that was built without it. Pick any slice of an existing codebase, audit what exists, reconstruct how it got there, extract a four-axis gap register, then execute the fixes forward through the standard ECC pipeline.
The workflow is slice-first: no whole-repo onboarding is required before it is useful, and every phase is re-enterable from a durable artifact on disk. Start in the middle, work backwards, then move forward.
When to Activate
- Adopting ECC in a repository that already exists and is already shaped
- User asks to "audit my existing project", "retro this codebase", or "what did we miss?"
- Taking over, inheriting, or returning to a codebase after a long gap
- User asks "why is it like this?" followed by "should it stay like this?"
- A module, feature, or service needs a rethink before the next feature lands on top of it
- Deciding whether a legacy area should be fixed forward, rewritten, or left documented as-is
When Not to Use
- Greenfield work with no existing code — use
plannerandtdd-workflowdirectly - Onboarding to spec-driven development without the redesign loop — the
spec-mineragent does that on its own - A launch go/no-go production-readiness pass — use
production-audit - Security-only sweeps — use
security-review - Team process retrospectives (sprint ceremonies) — this audits a codebase, not people
The Working Set
All artifacts are written inside the audited project, under docs/retro/<slice>/:
| File | Phase | Purpose |
|---|---|---|
gap-register.md |
0-6 | The state machine — perimeter, Current phase: marker, and rows. The only file required to resume mid-stream. |
baseline-audit.md |
1 | Reviewer findings, test/CI snapshot, TODO inventory. |
reconstructed-spec.md |
2 | What the code actually does today (Requirements + Invariants). |
target-design.md |
4 | Target shape for the slice and the fix sequence. |
Backfilled decisions go to docs/adr/ per the architecture-decision-records skill. If the project uses OpenSpec, reconstructed-spec.md may instead be openspec/specs/<capability>/spec.md produced by spec-miner.
How It Works
Phase 0 — Pick the Entry Point
Start from what the user cares about today. Do not map the whole repo first.
Any of these is a valid slice:
| User signal | Slice |
|---|---|
| Names a directory, module, or service | That path plus its direct callers |
| Names a feature or user flow | The files that implement it, traced from the entry point |
| Names a bug, incident, or pain point | The code that produced it plus one level of call chain |
| Names a dependency or tech choice | Everything that touches it |
| Names nothing | The 2-3 hottest paths by churn — propose them and let the user pick |
Record the perimeter at the top of gap-register.md before anything else: paths in scope, entry points, callers, blast radius. Budget the slice at roughly 15 files or 2,000 lines; if the user's pick is bigger, cut it into named sub-slices and register each as its own row of work. A slice too big to audit in one session is a slice that never finishes. Keep a Current phase: marker beside the perimeter and advance it each time a phase completes.
Phase 1 — Present-State Audit
Establish what exists now, with evidence. Do not fix anything yet.
- Recon the slice: manifest and framework fingerprint, entry points, test layout, CI checks (borrow the recon steps from
codebase-onboarding, scoped to the perimeter). - Run the reviewers that match the stack, in parallel where possible. Every finding must carry a
file:linepointer:- The language reviewer for the stack (
typescript-reviewer,python-reviewer,go-reviewer, ...) security-reviewersilent-failure-hunterfor swallowed errorstype-design-analyzerwhere invariants are encoded in typesperformance-optimizeronly if the slice is on a hot path
- The language reviewer for the stack (
- Snapshot the current state: test count and coverage, lint/CI status,
TODO/FIXME/HACKinventory inside the perimeter.
Write everything to baseline-audit.md. Findings that get fixed during this phase corrupt the baseline — hold them for the register.
Phase 2 — Backward Reconstruction
Work backwards from the present state to the decisions that produced it.
…
FAQ
What is a code 'slice'?
It's a small part of the project, like a module or a specific feature, so the analysis doesn't need to cover the entire codebase at once.
What are the 'four axes'?
These are four categories to organize the identified issues: unrecorded decisions (thinking), coding practices, missing features, and technology choices.
Do I need to analyze the whole project?
No, you can start by analyzing just a small 'slice' of the project and expand later if needed.
Details
Original description by the author
Run the ECC engineering process retroactively against an existing project slice. Audit current state, reconstruct past decisions, produce a four-axis gap register (thinking, coding practice, missing features, technology selection), then execute fixes forward through the plan-TDD-review pipeline. Use when adopting ECC mid-project, taking over an inherited codebase, or asking what was missed and wha
repo: affaan-m/ECC
Popularity
- GitHub stars
- 280k
- Ranking position
- #146
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
accessibility
Helps your agent create interfaces that everyone can use. Ensures websites and apps work well for people with disabilities, like those who are blind or have reduced mobility.
affaan-m/ECC
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC
Similar skills
git-workflow-and-versioning
Organizes code work using Git. Helps save progress, manage different versions, and avoid conflicts when working in a team.
addyosmani/agent-skills
observability-and-instrumentation
Adds tools to monitor what the code does in production. Helps understand if something went wrong and why, making fixes easier.
addyosmani/agent-skills
github-pr-workflow
Prepares GitHub pull requests, ensuring code quality and documentation.
paperclipai/paperclip