Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

execute-specs

/execute-specs

Pomaga wdrożyć zatwierdzoną specyfikację SPEC SDD metodą test-driven development, czyli od testów do działającego kodu.

Repozytorium
skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
19.10.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
7
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

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

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/validate_spec.py

Co robi i kiedy

Pomaga wdrożyć zatwierdzoną specyfikację SPEC SDD metodą test-driven development, czyli od testów do działającego kodu.

Oryginalny opis (EN)

Use when the user asks to implement an approved SPEC SDD using test-driven development.

Jak działa

  1. When to Use
  2. When NOT to Use
  3. Core Principles
  4. Process
  5. GitHub Issue Status Sync
  6. Anti-Patterns
  7. Common Mistakes
  8. References
Sekcje z nagłówków SKILL.md, w oryginale · 162 linii, 1 189 słów
Podgląd SKILL.md
---
name: execute-specs
license: MIT
description: "Use when the user asks to implement an approved SPEC SDD using test-driven development."
metadata:
  version: "1.4.0"
  visibility: public
  author: afonsoft
  url: https://github.com/afonsoft/skills
---

# Execute TDD from SPEC

Test-driven development guided by the approved SPEC SDD. The SPEC is the single source of truth. Every test is derived from a numbered requirement or acceptance criterion.

Internal reasoning and commands are in English. All questions and explanations to the user are in **Portuguese (pt-BR)**.

## When to Use

- A `.specs/SPEC-{YYYYMMDD}-{feature}.md` exists with `Status: Approved`.
- The user asks to implement a feature, change, or bugfix.
- The user asks to execute or run a SPEC (e.g., "execute the spec", "run the spec", "run TDD from the spec").
- O usuário pede para executar ou rodar um SPEC (ex.: "executar o spec", "rodar o spec", "fazer TDD a partir do spec").
- Before writing implementation code.

## When NOT to Use

- Do not use when the SPEC is missing or still in `Draft`.
- Do not use when the user only wants a code review or fix without tests.
- Do not use when the SPEC explicitly declines a requirement (marked `[A DEFINIR]`).

## Core Principles

1. **The SPEC is the oracle.** Every test must map to a requirement or acceptance criterion.
2. **One vertical slice at a time.** One failing test, one passing test, one refactor.
3. **No speculative code.** Write only the minimum code to make the current test pass.
4. **No refactor in RED.** Refactor only when the suite is green.
5. **Re-validate after every change.** Run the full suite before moving to the next slice.

## Process

### 1. Read the SPEC

Load `.specs/SPEC-{YYYYMMDD}-{feature}.md` and identify:

- Section 4 — numbered requirements (`RF-001`, `RF-002`, ...).
- Section 6 — acceptance criteria in BDD `Given...when...then`.
- Section 7 — task plan and validation strategy.
- Section 3 — files to create or modify.
- Section 0 — the `Ticket` field: resolve the linked GitHub Issue number (e.g. `#123`) if present.

If the SPEC is not approved, stop and invoke `/write-specs`.

### 2. Slice the work

Order the work by the task plan (Section 7). Each slice is one requirement or one acceptance criterion. Never write all tests upfront.

When the first slice starts, set the SPEC `Status` to `In implementation` and sync the linked Issue to `in_progress` (see GitHub Issue Status Sync).

### 3. Red-Green-Refactor loop

For each slice:

```text
RED    → Write one test that exercises a public seam and fails.
GREEN  → Write the minimum code that passes the test.
REFACTOR → Clean duplication, improve names, respect SOLID while green.
```

### 4. Test at the public seam

Test behavior through public interfaces (API, function, component), not internal implementation. Tests must survive internal refactors. See [references/tests.md](references/tests.md) for examples and [references/mocking.md](references/mocking.md) for mock rules.

### 5. Mapping to the SPEC

For each test, include a comment or description pointing to the source requirement:

```python
# Covers RF-003: order total must include tax
# Covers AC-02: Given an empty cart, when checking out, then the system returns 422
```

### 6. Re-validate and report

After every slice:

1. Run the full test suite for the affected stack.
2. Run lint / type check.
3. Confirm the SPEC requirement is satisfied.

Report progress to the user in Portuguese and continue automatically to the next slice. Do not ask for approval between slices; the approved SPEC is the source of truth.

```text
Slice concluido: [RF-XXX / AC-YYY]
- Teste: [PASS/FAIL]
- Build: [PASS/FAIL]
- Lint: [PASS/FAIL]

Avançando para o proximo slice: [PROXIMO].
```

### 7. Closure

When all slices are green:

- Run the full suite (unit, integration, relevant E2E).
- Run the validation strategy from the SPEC (Section 7.1).
- Update `docs/qa/test-plan-<feature>.md` or equivalent if it exists.
- Sync the linked Issue to `in_review` (see GitHub Issue Status Sync).
- Invoke `/qa-analyst` for the mandatory pre-PR review.
- Do not open the PR until QA approves.
- When the PR opens, sync the Issue to `in_pullrequest`. When the PR merges and delivery is finalized, sync to `done`, set the SPEC `Status` to `Done`, and close the Issue if GitHub did not close it automatically.

## GitHub Issue Status Sync

When the SPEC's `Ticket` field points to a GitHub Issue, keep its status label in sync with execution, per the Label Contract in `create-issues`. Status labels are exclusive — always remove the previous one when applying the next. If `gh` is unavailable or the SPEC has no linked Issue, skip the sync and continue — never let label management block TDD.

| Moment | Action |
| --- | --- |
| Implementation starts (first slice) | Swap current status label → `in_progress`; set SPEC `Status: In implementation` |
| All slices green (before the QA gate) | Swap → `in_review` |
| PR opened | Swap → `in_pullrequest` |
| PR merged and delivery finalized | Swap → `done`; set SPEC `Status: Done`; close the Issue if still open |
| SPEC canceled at any point | Swap → `canceled` + pt-BR comment with the reason; set SPEC `Status: Canceled` |

**Blockers** — PR merge conflict, failing CI that cannot be resolved in the slice, missing dependency, unanswered question, or any other impediment: keep the current status label, add `blocked`, and post a pt-BR comment describing the blocker. When the blocker clears, remove `blocked` and comment the resolution.

```bash
# status transition (exclusive)
gh issue edit 123 --remove-label todo --add-label in_progress

# flag a blocker
gh issue edit 123 --add-label blocked
gh issue comment 123 --body "Bloqueio: conflito de merge no PR #45 em src/foo.ts. Aguardando resolução."

# blocker cleared
gh issue edit 123 --remove-label blocked
gh issue comment 123 --body "Bloqueio resolvido: conflito do PR #45 resolvido no merge com develop."
```

After flagging a blocker, report it to the user in Portuguese and pause that work item — do not mark the slice as done while `blocked`.

## Anti-Patterns

- ❌ Writing all tests before any implementation.
- ❌ Testing private methods or internal state.
- ❌ Mismatched expectations in mocks (see [references/mocking.md](references/mocking.md)).
- ❌ Refactoring while a test is red.
- ❌ Skipping the validation strategy from the SPEC.

## Common Mistakes

| Mistake | Fix |
| --- | --- |
| Implementing before the test | Write the failing test first. |
| The test does not map to the SPEC | Link every test to `RF-###` or `AC-###`. |
| Slice too large | Break the slice until one behavior is tested. |
| Not running the full suite after a green test | Re-validate before moving on. |
| Leaving the Issue status label stale | Sync the label at every transition (`in_progress` → `in_review` → `in_pullrequest` → `done`). |
| Hiding a blocker | Add `blocked` + a pt-BR comment on the Issue and report to the user; never silently stall. |

## References

- `write-specs` — for producing the SPEC SDD
- `qa-analyst` — for the mandatory pre-PR review
- `diagnose` — when a test fails unexpectedly and the cause is unclear
- `references/tests.md` — test examples and patterns
- `references/mocking.md` — mocking rules
- `references/refactoring.md` — refactoring guidance
- `references/deep-modules.md` — deep module design
- `references/interface-design.md` — interface design patterns
Pliki w paczce (7)
  • SKILL.md 7 KB
  • references/deep-modules.md 1 KB
  • references/interface-design.md 1 KB
  • references/mocking.md 1 KB
  • references/refactoring.md 1 KB
  • references/tests.md 2 KB
  • scripts/validate_spec.py 2 KB

Wersje

W bazie nie ma innych skilli o nazwie execute-specs.

Migawka bazy z 28.10.2026 · wersja paczki 9b24ff65ad51 (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

  • 90sdd-workflow
    Prowadzi projekt metodą Spec-Driven Development: od pomysłu przez zatwierdzoną specyfikację i plan po walidację i dziennik zmian.
  • 100write-specs
    Tworzy lub doprecyzowuje specyfikację funkcji SPEC SDD przed rozpoczęciem implementacji.
  • 100spec-dd
    Pisze specyfikacje testowe i behawioralne przed implementacją, wyprowadza scenariusze i sprawdza zgodność implementacji ze specyfikacją.
  • 100spec-driven-development
    Prowadzi planowanie funkcji w aplikacjach Rails z agentami AI: pisze specyfikacje, dzieli pracę na zadania i tworzy prompty.
  • 98sdd
    Obsługuje cały cykl rozwoju sterowanego specyfikacją (SDD): eksplorację, wyprowadzanie specyfikacji z kodu, propozycje zmian, wdrażanie, weryfikację, synchronizację delt i archiwizację.
  • 98sdd-derive
    Wyprowadza specyfikacje SDD z istniejącego kodu i dokumentuje z opóźnieniem już zaimplementowane zachowanie.

Uwagi i zgłoszenia

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