Przejdź do treści
Biblioteka skilli
Programowanie · Planowanie

spec-before-code-engineering

/spec-before-code-engineering

Pisze jednostronicową specyfikację i plan kroków przed kodem, a potem sprawdza wykonanie względem nich, by pracę wykonać za pierwszym razem.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
02.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
3
Przestarzałość

Brak sygnałów. Repozytorium zmienione 02.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Pisze jednostronicową specyfikację i plan kroków przed kodem, a potem sprawdza wykonanie względem nich, by pracę wykonać za pierwszym razem.

Oryginalny opis (EN)

Engineering practice: Spec before code — Write a one-page spec and a step plan before implementing, then build and check against it, so the work matches what was asked the first time. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

Jak działa

  1. How to do it
  2. Checklist
  3. Rules
  4. Do
  5. Don't
  6. Quality gates
  7. Workflow
  8. Examples
  9. Further reading
Sekcje z nagłówków SKILL.md, w oryginale · 92 linii, 787 słów
Podgląd SKILL.md
---
name: spec-before-code-engineering
description: "Engineering practice: Spec before code — Write a one-page spec and a step plan before implementing, then build and check against it, so the work matches what was asked the first time. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it."
type: engineering
stack: practice
core: "1.0"
checked: 2026-10-26
---

# Spec before code

Write a one-page spec and a step plan before implementing, then build and check against it, so the work matches what was asked the first time.

Use this for any change larger than a small fix, and always before handing work to a coding agent. A short written spec surfaces open questions and scope early, and prevents rework from misread requirements, scope creep and changes nobody can verify.

## How to do it
1. **State the problem** — Write two or three sentences on who has the problem, what they cannot do today and why it matters now. Leave solutions out of this part.
2. **Define acceptance criteria** — List the observable outcomes that mean done, each written so a test or a reviewer can check it. Include error and empty cases.
3. **Mark scope and non-goals** — List what is in scope and, just as explicitly, what is out. Name any constraints: performance targets, compatibility, deadlines.
4. **Sketch the approach** — Describe the design in a few paragraphs: modules touched, data changes, interfaces, and alternatives you rejected with one line each on why.
5. **Resolve open questions** — List unknowns and get answers from the requester or owner before coding. Unanswered questions become explicit assumptions in the spec.
6. **Break it into steps** — Split the work into ordered tasks that each end in a green build and a reviewable commit. Note which acceptance criterion each step satisfies.
7. **Build against the plan** — Implement step by step, ticking tasks off. When reality differs from the plan, update the spec first, then the code.
8. **Verify against the spec** — Before opening the pull request, walk every acceptance criterion and show evidence (test name, screenshot, preview link). Link the spec in the pull request.

## Checklist
- [ ] The spec has a problem statement, acceptance criteria, non-goals and an approach
- [ ] Every acceptance criterion is testable and has evidence attached
- [ ] Open questions are answered or recorded as assumptions
- [ ] The plan's steps are all complete or explicitly deferred
- [ ] The spec was updated where the build departed from it
- [ ] The pull request links the spec

## Rules
- Keep the spec to about one page; split the feature if it needs more. _(Long specs go unread and hide the decisions that matter.)_
- Write acceptance criteria as observable behaviour, never as implementation steps. _(Criteria tied to implementation cannot catch a wrong design.)_
- Call out every schema, API contract or data migration in the approach section. _(These are the hardest changes to undo after release.)_
- Note who is allowed to do each new action and how that is enforced. _(Authorisation decided during coding is often forgotten.)_

## Do
- Get the requester to confirm the acceptance criteria before you start
- Keep the spec next to the code or linked from the issue so it is easy to find
- Give a coding agent the spec and plan as its task, not a one-line request

## Don't
- Do not start coding while a question that changes the design is still open
- Do not let the spec silently drift from what was built
- Do not pad the spec with background nobody needs to make a decision

## Quality gates
| Gate | Tool | Threshold | When |
|---|---|---|---|
| Spec linked | Pull request template check | Pull requests over 200 changed lines link a spec with acceptance criteria | Every pull request |

## Workflow
**Review**
- Review the spec before the code; approve the approach first
- Check each acceptance criterion against evidence in the pull request

**Definition of done**
- All acceptance criteria verified with evidence
- Spec reflects what was actually built

## Examples
### One-page spec template (`docs/specs/_template.md`)

```markdown
# <Feature name>

Status: draft | agreed | built
Owner: <name>   Issue: <link>

## Problem
<Who, what they cannot do, why now.>

## Acceptance criteria
- [ ] Given <state>, when <action>, then <observable result>
- [ ] Error: when <failure>, the user sees <message> and can <recover>

## Non-goals
- <Explicitly out of scope>

## Approach
<Modules, data changes, interfaces. Rejected options, one line each.>

## Open questions / assumptions
- <Question> -> <answer or assumption>

## Plan
1. <Step> (criteria 1)
2. <Step> (criteria 2)
```

## Further reading
- [obra/superpowers](https://github.com/obra/superpowers) — Includes brainstorming, spec and plan-writing skills that agents follow before coding.
- [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) — Engineering skills that cover planning and spec-driven work for agents.
- [anthropics/skills](https://github.com/anthropics/skills) — Shows the skill format used to hand structured plans to an agent.

_Written for Celestial; the sources above inspired it._
Pliki w paczce (4)
  • AGENTS.md 3 KB
  • README.md 2 KB
  • SKILL.md 5 KB
  • rules/spec-before-code-engineering.mdc 3 KB

Wersje

W bazie nie ma innych skilli o nazwie spec-before-code-engineering.

Migawka bazy z 13.11.2026 · wersja paczki f015897aae63 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100spec-driven-development-engineering
    Prowadzi wersjonowaną specyfikację w repozytorium jako źródło prawdy, ze śledzeniem wymagań w zadaniach, testach i pull requestach.
  • 100task-breakdown-engineering
    Opisuje praktykę podziału specyfikacji na małe, uporządkowane zadania z kryteriami akceptacji i sprawdzeniem ich wykonania.
  • 100spec
    Zadaje pytania zmieniające projekt, a potem pisze specyfikację z testowalnymi wymaganiami i listą poza zakresem, przed kodem.
  • 9000-spec
    Pisze i aktualizuje specyfikacje techniczne w docs/spec przed kodem: globalną architekturę i opisy modułów.
  • 95flow-next-plan
    Rozpisuje funkcję na specyfikację i zadania w katalogu .flow, gdy trzeba zaplanować lub rozbić pracę na identyfikatory fn-N.
  • 100spec
    Przeprowadza wywiad o funkcji lub projekcie, a potem pisze specyfikację, którą można zbudować.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.