brownfield-spec-enhancement
Skill1 starsChanged 5 months agoMITView on GitHub
Apply spec discipline to existing systems: capture current behavior, define desired behavior, and plan a safe, incremental migration without rewriting from scratch. Use when changing or extending an existing feature, when behavior is poorly documented, or when a change carries regression risk in a live system. The existing code and behavior, the requested change, known constraints, and any tests or docs describing current behavior. A brownfield spec (templates/brownfield-spec-template.md) with current behavior, desired behavior, a change diff, risks, and an incremental…
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-orchestrationSkill
- architect-agentSkill
- implementer-agentSkill
- quality-councilSkill
- reviewer-agentSkill
- tester-agentSkill
- writer-critic-pairSkill
- authoring-skillsSkill
- api-endpoint-qualitySkill
- async-job-qualitySkill
- auth-qualitySkill
- db-migration-qualitySkill
- frontend-state-qualitySkill
- acceptance-criteriaSkill
- adaptive-flowSkill
- adaptive-prompt-selectionSkill
- adversarial-code-reviewSkill
- architecture-decision-recordsSkill
- brainstormingSkill
- bug-fix-lifecycleSkill
- checkpoint-validationSkill
- cicd-integrationSkill
- clarify-before-codeSkill
- claude-code-hooks-packSkill
- code-context-packSkill
- code-intelligence-reviewSkill
- context-policySkill
- context-rich-implementationSkill
- crash-proof-planningSkill
- critique-pass-protocolSkill
- dependency-aware-task-orderingSkill
- deprecation-migrationSkill
- disciplined-diagnosisSkill
- docs-authorSkill
- executing-plansSkill
- external-skillSkill
- finishing-a-development-branchSkill
- git-guardrailsSkill
- goal-driven-executionSkill
- grill-user-before-buildingSkill
- guard-bypass-protocolSkill
- improve-codebase-architectureSkill
- incremental-reviewSkill
- issue-slicingSkill
- lessons-learned-dbSkill
- loop-engineeringSkill
- model-aware-configSkill
- model-weakness-memorySkill
- multi-repo-learningSkill
- orchestration-workflowsSkill
- plan-driven-executionSkill
- plan-from-specSkill
- prd-from-contextSkill
- project-constitutionSkill
- prompt-architectureSkill
- prototype-before-commitmentSkill
- quality-engineSkill
- quality-execution-contractSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Use when changing or extending an existing feature, when behavior is poorly documented, or when a change carries regression risk in a live …
- Distinctive: line 31
Document current observable behavior, including edge cases and known quirks.
- Distinctive: line 36
Add or strengthen tests that pin current behavior before changing it.
- Distinctive: line 49
No characterization tests exist before changing behavior.
- Very specific: line 62
Not applied: upstream templates, command names, or generated scaffolding.
- Distinctive: line 76
If this skill is not the right phase for your task, use one of these instead:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Brownfield Spec Enhancement
Purpose
Apply spec discipline to existing systems: capture current behavior, define desired behavior, and plan a safe, incremental migration without rewriting from scratch.
When to use
Use when changing or extending an existing feature, when behavior is poorly documented, or when a change carries regression risk in a live system.
Inputs
The existing code and behavior, the requested change, known constraints, and any tests or docs describing current behavior.
Workflow
- Document current observable behavior, including edge cases and known quirks.
- Define desired behavior and acceptance criteria for the change.
- Diff current vs desired to scope exactly what must change.
- Identify regression risks, compatibility concerns, and data/migration needs.
- Plan small, reversible increments; prefer additive changes and feature flags.
- Add or strengthen tests that pin current behavior before changing it.
- Sequence the migration so each step is verifiable and rollback-able.
Outputs
A brownfield spec (templates/brownfield-spec-template.md) with current behavior, desired
behavior, a change diff, risks, and an incremental migration plan.
Failure modes
- Current behavior is assumed rather than observed.
- A large rewrite replaces a safe incremental change.
- Regression risks and compatibility are not assessed.
- No characterization tests exist before changing behavior.
Verification checklist
- Current behavior is documented from observation.
- Desired behavior has acceptance criteria.
- Regression and compatibility risks are listed.
- Migration is incremental and reversible.
- Characterization tests exist before changes.
Applied / Not Applied
- Applied: brownfield iterative enhancement discipline from
github/spec-kit. - Not applied: upstream templates, command names, or generated scaffolding. Composes with
local
systematic-debuggingandtest-driven-developmentskills.
Ghi chú tiếng Việt
Áp dụng kỷ luật spec cho hệ thống sẵn có: ghi lại hành vi hiện tại (quan sát thật), định
nghĩa hành vi mong muốn, đánh giá rủi ro hồi quy, và lên kế hoạch di trú từng bước, có thể
rollback. Thêm test ghim hành vi trước khi đổi. Liên kết:
skills/core/systematic-debugging/SKILL.md, templates/brownfield-spec-template.md.
Choose instead
Adding to an existing spec or contract in an existing codebase.
If this skill is not the right phase for your task, use one of these instead:
skills/core/spec-first-development/SKILL.md— if there is no existing spec and the project is greenfield.skills/core/writing-plans/SKILL.md— if the spec change is trivial and a plan can be written directly.
For the full decision tree across all 6 plan-family skills, see docs/workflows/plan-skill-decision-tree.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

