agentleFS
roronoazoroshao369roronoazoroshao369/vibe-coding-os/skills/core/brownfield-spec-enhancement/SKILL.md

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…

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
  1. Distinctive:

    Use when changing or extending an existing feature, when behavior is poorly documented, or when a change carries regression risk in a live …

    line 21
  2. Distinctive:

    Document current observable behavior, including edge cases and known quirks.

    line 31
  3. Distinctive:

    Add or strengthen tests that pin current behavior before changing it.

    line 36
  4. Distinctive:

    No characterization tests exist before changing behavior.

    line 49
  5. Very specific:

    Not applied: upstream templates, command names, or generated scaffolding.

    line 62
  6. Distinctive:

    If this skill is not the right phase for your task, use one of these instead:

    line 76

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Document current observable behavior, including edge cases and known quirks.
  2. Define desired behavior and acceptance criteria for the change.
  3. Diff current vs desired to scope exactly what must change.
  4. Identify regression risks, compatibility concerns, and data/migration needs.
  5. Plan small, reversible increments; prefer additive changes and feature flags.
  6. Add or strengthen tests that pin current behavior before changing it.
  7. 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-debugging and test-driven-development skills.

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.