Project · Claude Code plugin · Open source · MIT

Brownspec: spec-driven for brownfield codebases

The name is the whole thesis: brownfield, not greenfield. A Claude Code plugin that specifies a change to a running system, not a new project from a blank slate.

Install · Claude Code

Install and get started

Two steps inside Claude Code and the plugin is available. After init it samples your code once and writes down the conventions. Then, per change, three commands.

init · once per repospec / design / tasks · per changeinterviews resume
View on GitHub ↗
/plugin marketplace add yknnv/brownspec
/plugin install brownspec@brownspec

/brownspec:init            # once per repo
/brownspec:spec ""  # interview → spec.md
/brownspec:design          # blast radius → design.md
/brownspec:tasks           # deployable at every step → tasks.md
  • After init, edit .brownspec/policies.md by hand — that file is the part the plugin is forbidden to write for you
  • Every phase writes to disk after every answer: an interview survives an interrupted session
01 — THE THESIS

The tooling assumes an empty repository. Yours is not empty.

GREENFIELD TOOLS

Spec-driven development has converged on three artifacts — requirements, design, tasks — and it converged on them for good reasons. What the tooling assumes is a blank repository: describe what you want, get a spec, generate code.

Then you open the actual repository, and there are sixty services, consumers you did not write, and a change that has to ship without breaking any of them.

BROWNSPEC

The same three artifacts, but for a codebase that already exists. What happens around them is different:

  • Conventions are read out of your code instead of declared
  • The design carries the blast radius of the change, with provenance
  • Your organization's rules live in a file the tool is forbidden to overwrite

The premise is small: a spec takes five minutes to fix. Code the agent has already written does not.

02 — HOW IT WORKS

Three artifacts on disk

Every phase appends to a file after every answer. Interrupt and come back later — that is the intended flow.

/spec

Interview → spec.md

Six questions, not a forty-field form: the plugin asks only what your repository cannot answer for it. Plus the policies the change touches.

/design

Blast radius → design.md

What the change touches: files, public contracts, consumers, migrations, rollback. With provenance — where in the code the conclusion came from.

/tasks

Steps → tasks.md

Ordered steps, each deployable on its own. No "don't deploy for a month and then ship it all in one big release".

03 — HOW IT COMPARES

How it differs from Spec Kit and Kiro

If you are starting a new project, use Spec Kit or Kiro. Brownspec's entire first phase is reading code that does not exist yet.

Greenfield assumed Reads your conventions Blast radius Regulatory profiles
GitHub Spec Kit yesnonono
Kiro (spec mode) partlynonono
Brownspec noyesyes, with provenanceyes, opt-in
04 — MAKE IT THE DEFAULT

So the plugin fires on its own, not from memory

Brownspec skills fire when you ask for a spec. They do not fire when you say "just implement this" — and that is how most work actually arrives.

If you want spec-first to be the default rather than something you remember, say so in CLAUDE.md:

  • Give it a threshold. "Everything through Brownspec" fires on typo fixes. The threshold: a public contract, a database schema, or more than one module.
  • State when it fires. What triggers /brownspec:spec/brownspec:design/brownspec:tasks, and what is just "do it".
  • State the opt-out. "Just do it" on a change above the bar does not mean "do it". It means "say a spec is needed and name the command".
## Specs

A change that touches a public contract, a database
schema, or more than one module goes through Brownspec
before any code:
/brownspec:spec → /brownspec:design → /brownspec:tasks,
then implement from tasks.md.

Below that bar — a bug fix, a copy change, a refactor
inside one module — write the code.

If the request is "just do it" and the change is above
the bar, do not start. Say a spec is needed and name
the command.
05 — REGULATORY PROFILES

152-ФЗ — only when you turn it on

Only public regulations ship with the plugin. Nothing is enabled by default.

WHAT IS IN THE BOX

The profile policies/ru/152-fz-pdn.md: seven rules on personal data under Russian law. Each is a trigger the spec phase can match, a requirement, and the facts a spec must therefore state.

GDPR is next. Once it is ready, it ships the same way.

HOW IT TURNS ON

A profile applies only once you list it under profiles: in your own policies.md. Until you do, the plugin behaves as though the profile did not exist: no prompts, no sections in the spec, no mention in the output.

Brownspec routes, it does not certify. The output is "this change touches PDN-03, so the spec must therefore state these facts". Whether the implementation actually meets the law is a call for your DPO or your lawyer, not for the plugin.

06 — FAQ

Frequently asked questions

What does Brownspec do that Spec Kit or Kiro do not?
Spec Kit and Kiro assume a blank slate: describe what you want, get a spec, generate code. Brownspec specifies a change to a running system: it reads conventions out of your code instead of asking, carries the blast radius through design, and keeps your organization's rules in a file the plugin is forbidden to overwrite.
What is a blast radius in design.md?
An explicit list of what the change touches: files, modules, public contracts, consumers, data migrations. With provenance — links back to the code the conclusion was drawn from. Design stops being a pretty picture and becomes a list of places where something can break.
Why are conventions.md and policies.md separate files?
conventions.md is generated and overwritten freely by the plugin. policies.md is written by people — security, architecture — and is never touched by the plugin. Mixing the two means one regeneration silently deletes a security control and leaves a plausible-looking document behind.
How do I enable the 152-ФЗ profile?
Nothing enables itself. After /brownspec:init, list the profile you need under profiles: in your .brownspec/policies.md — e.g. ru/152-fz-pdn. Until you list it, the plugin behaves as though the profile did not exist: no prompts, no sections in the spec, no mention in the output. Brownspec routes, it does not certify — it points at articles, it does not replace a lawyer.
How do I install and start?
In Claude Code: /plugin marketplace add yknnv/brownspec, then /plugin install brownspec@brownspec. Once per repo: /brownspec:init — the plugin samples the code and writes conventions.md. Then per change: /brownspec:spec ""/brownspec:design/brownspec:tasks. Every phase writes to disk after every answer, so an interview survives an interrupted session.
What if I have a brand-new project?
Probably not for you. Brownspec's entire first phase is reading code that does not exist yet. For greenfield, use Spec Kit or Kiro. Brownspec earns its place when the code is already there, has consumers, and cannot break.