Brownfield first: most software already exists
SpecGraph discovery reverse-specs an existing repository into a project, and it runs on your own machine, so teams that will never connect a repo to a cloud can still bring their code in.
SpecGraph team
Almost every AI development demo starts with an empty folder. Type an idea, watch an app appear. It makes a good video. It is also not where most teams live.
Most software already exists. It carries years of decisions, a few written down and most not. It has owners, hotspots, half-finished migrations and a dependency list nobody has read end to end. The question a team asks of an AI tool is rarely “can you build us something new?” It is “can you work safely on what we already have?”
That is why brownfield is a first-class path in SpecGraph, not an afterthought.
Discovery: reverse-specing a repo
Discovery runs as a skill inside Claude Code, in the repository you want to bring in. It reads the codebase and writes a bundle to a .specgraph/ folder: a human-readable discovery.md plus machine-readable sidecars. It captures what the code is today, not what it should become.
- Surface: features, entities, endpoints, integrations and environment keys, each pointing back to the files it came from.
- Stack and architecture: languages, frameworks, databases, hosting, the design system, and the architecture decisions visible in the code.
- Owners: CODEOWNERS plus majority authorship per path, from the last twelve months of git history.
- Where the debt lives: churn hotspots by file, and open questions about dead code and legacy paths the skill couldn't resolve.
- Compliance posture: the security model, OWASP coverage signals, the test inventory, audit events, and a software bill of materials built from the lockfile, with a licence summary.
The skill is told not to invent. What it can't derive from code (personas, KPIs, structured risks, assumptions) it lists as open questions for people to answer.
Paste discovery.mdinto the Discovery page and SpecGraph creates a project with Vision, Features, Brief, Design, Architecture, Quality and Security pre-populated and flagged for review. Features that already exist land as done stories, so a coding agent working from the pack won't try to rebuild them.
Greenfield is the demo. Brownfield is the job. A spec of the system you already run is the safest place for an agent to start.
For teams that will never connect a repo
A bank, a public agency or a regulated software company will not install a third-party app on its source control, or paste a token into someone else's cloud. Even when procurement might eventually agree, the review can outlast the project.
Discovery was designed for exactly that constraint. The skill runs on your machine, inside your network. Nothing leaves until a person reads the output and chooses to share it.
- A hard never-read list: env files with values, key and certificate files, secrets and credentials folders, and anything matched by
.gitignoreor.specgraph-ignore. - Redaction on by default, before anything is written: token-shaped strings, cloud account identifiers, internal hostnames, and email addresses outside an allowlist. The redaction log records positions, never values.
- One optional network call, a vulnerability lookup for dependencies, which is switched off in offline mode.
- An
attestation.jsonlisting every file read, every file written, every redaction class with its count, and which optional passes ran.
That is a posture a security architect can review in an afternoon. The skill is a readable file, the output is a folder on disk, and the upload is a paste someone makes on purpose.
Re-runs, not one-shots
Code moves. Discovery can be re-run, and a re-run first archives the previous bundle under .specgraph/history/, so you keep a dated record of what the codebase looked like each time. An incremental mode re-runs only the passes affected by what changed since the last attested commit.
What you can do this week
- Pick a service your team is nervous about changing. Run discovery on it and read the hotspots and open questions first. They are usually the most honest part.
- Hand the bundle to whoever owns security review before you share anything. Let them read the attestation and the redaction log.
- Answer the open questions in SpecGraph. Personas, risks and KPIs aren't in the code, and an agent working without them is guessing.
Starting from an empty folder is the easy case. Starting from the system you already run is where the value is, and where an agent most needs a spec.
- brownfield
- discovery
- enterprise
- security
- skills