Discovery (brownfield).
Capturing an existing codebase via the discovery skill.
Discovery is the entry flow for brownfield work — projects built on top of an existing codebase. Where Intake assumes a blank slate, Discovery assumes you already have one and wants to capture it.
How it works, in three steps #
- Install the
specgraph-discoveryskill in Claude Code. The page has the install snippet. - Run the skill inside your repo. It walks the project — package manifests, route files, schema definitions, environment variables, integrations — and writes a
discovery.mdto the repo root. The first lines of that file include the repo URL and the commit it was generated against. - Paste
discovery.mdinto the Discovery page. The right-hand panel parses it live as you paste.
The skill self-triggers from natural-language phrases too — saying "run specgraph discovery" inside Claude Code launches it without a slash command.
What the parser pulls out #
As soon as Markdown lands in the textarea, the right side shows:
- Detected name — extracted from the repo or
package.json. - Source link — clickable URL back to the commit the discovery was generated from.
- Counts — features, entities, endpoints, integrations, environment variables.
- Inferred stack — frontend framework, backend framework, database, auth provider, hosting target.
- Warnings — suspicious patterns the skill flagged (e.g. plaintext secrets in
.env, unused routes, missing schema migrations).
If parsing fails, the page tells you which section was malformed so you can re-run the skill or hand-edit.
Creating the project #
The Create discovery project button at the bottom does what intake's "Create project" button does, with two differences:
- Vision, Features, Architecture, and Security phases are pre-populated from the discovery output (not blank).
- Each pre-populated phase is flagged for review rather than locked. You confirm what was extracted is correct, then lock as normal.
The created project shows a small discovery badge next to its name everywhere it appears (dashboard, portfolio, breadcrumb).
When to use Discovery vs Intake #
| Situation | Use |
|---|---|
| Brand-new product, no code yet | Intake |
| Adding a major feature to a system you maintain | Discovery |
| Inheriting a codebase from another team | Discovery |
| Documenting a finished product as a KB template | Discovery |
| Migrating an existing PRD into SpecGraph | Either |
If you're not sure, run Discovery — being too thorough up front costs nothing.