Przejdź do treści
Biblioteka skilli
Programowanie · Pisanie

speclink-baseline

/speclink-baseline

Tworzy początkowe specyfikacje dla istniejącego kodu bez nich, opisując jego dzisiejsze działanie, gdy wdraża się Speclink.

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

Brak sygnałów. Repozytorium zmienione 27.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 robi i kiedy

Tworzy początkowe specyfikacje dla istniejącego kodu bez nich, opisując jego dzisiejsze działanie, gdy wdraża się Speclink.

Oryginalny opis (EN)

Use when adopting Speclink on a codebase that already has behavior but no specs — establishes the baseline by generating the initial specs from what the code does today.

Jak działa

  1. Step 1: Check the current state and load the workflow config
  2. Step 2: Inventory the codebase
  3. Step 3: Propose the capability map — and wait
  4. Step 4: Write the specs
  5. Step 5: Validate and report
  6. Guardrails
  7. Next steps
Sekcje z nagłówków SKILL.md, w oryginale · 115 linii, 1 190 słów
Podgląd SKILL.md
---
name: speclink-baseline
description: "Use when adopting Speclink on a codebase that already has behavior but no specs — establishes the baseline by generating the initial specs from what the code does today."
license: MIT
compatibility: Requires speclink CLI.
metadata:
  author: speclink
  version: "v1.53.0"
  generatedBy: "Speclink"
---

**Conversation language**: write to the user in the language they use with you — progress updates, questions, and summaries. This skill is written in English, and its example messages show structure, not language: translate their prose, and keep commands, file paths, code, and fixed tokens (severity labels, status words) as they are. When a step sets the language of its own output — a document, a report, or the way it presents results and asks about them (for example through `locale`) — that step decides for that output. When you edit a document that already exists and no step sets its language, keep the language it is written in. When you run in a forked context that cannot see the conversation, use the language of the request you were given.

Establish the baseline for an existing codebase: generate the initial canonical specs from current behavior, so later changes have a spec baseline to build on.

**The baseline documents what the system does TODAY — not what it should do.** Specs written here describe observed behavior with evidence. Aspirations, fixes, and improvements belong in a change (`$speclink-propose`) after the baseline is written. Because nothing is changing, baseline writes directly to `speclink/specs/` — no change folder is involved, and no code is changed: do not refactor while writing the baseline.

**Input**: Optionally a scope hint after `$speclink-baseline` (e.g., "auth and billing only"). If omitted, baseline the whole codebase.

---

## Step 1: Check the current state and load the workflow config

```bash
speclink list --specs
speclink workflow-config show --json
```

- **No specs yet** → full baseline pass; continue below.
- **Some specs exist** → gap-filling mode: inventory what is not yet covered and scope the rest of this flow to those areas. Never rewrite an existing spec here — modifications go through a change (`$speclink-propose`).

The `workflow-config show --json` payload is the canonical workflow config for this workspace — the values `speclink/config.yaml` holds (the store's config document in remote mode), in the same shape either way. Environment overrides (`SPECLINK_*`) are not applied; that is the same reading the file itself gives. Read these fields from it:

- `context` — the project context; carry it as background for the inventory and for every spec you write.
- `specLocale` — the JSON name of `spec_locale`: the language for spec prose. `null` means English, `auto` means use the payload's `locale`, any other value is the locale code to write in. Structural markers and SHALL/MUST keywords stay in English regardless.
- `rules.specs` — the project's specs rules, a list of strings (absent when the project sets none). They bind every spec you write in Step 4 — see the last rule there. When the list is absent or empty, nothing changes.

If `speclink workflow-config show --json` exits non-zero (a config that does not parse fails closed; a remote store that is offline or rejects the credentials does the same), report the error and STOP — never fall back to reading `speclink/config.yaml` by hand, and never parse the YAML yourself.

## Step 2: Inventory the codebase

Build a behavioral map before writing anything:

1. Read the README, package manifests, and entry points (main/CLI/server routes).
2. Scan the source tree for domains: commands, modules, services, UI surfaces.
3. Read the test suite — tests are the best source of observable behavior with concrete values.
4. Note behaviors you can VERIFY (code + tests) versus behaviors you can only INFER.

Spend effort proportional to repo size; for large repos, sample entry points and tests first.

## Step 3: Propose the capability map — and wait

Draft a capability list (kebab-case names, one behavior area each — the same granularity a change's delta specs would use). For each: one-line purpose + the evidence files behind it. Keep capabilities small — a capability that needs 15 requirements is probably two capabilities.

Present the map with the **AskUserQuestion tool** — or, if that tool is unavailable, as plain text — and let the user confirm, merge, split, or drop capabilities. Then wait for the answer. Do NOT write any spec before the map is confirmed — wrong boundaries here are expensive to undo later.

The confirmation also shows which specs rules this run applies, so no rule shapes the output silently. Append this block to the map, quoting each entry of `rules.specs` verbatim:

```
Specs rules applied this run (from rules.specs, N entries):
1. <first entry, verbatim>
2. <second entry, verbatim>
```

When `rules.specs` is absent or empty, the block is a single line:

```
Specs rules applied this run: none (no rules.specs configured)
```

## Step 4: Write the specs

For each confirmed capability, create `speclink/specs/<capability>/spec.md`:

```markdown
# <capability> Specification

## Purpose

<1-3 sentences: what this capability does for whom>

## Requirements

### Requirement: <Name>
<Observed behavior in SHALL form.>

#### Scenario: <name>
- **WHEN** <trigger observed in code/tests>
- **THEN** <outcome observed in code/tests>
```

Rules:

- **Evidence or flag it.** Every requirement traces to code or tests you actually read. If a behavior is inferred but unverified, ask the user or leave it out — do not guess it into the record.
- Concrete scenarios: real values from tests make the best WHEN/THEN data; add `##### Example:` blocks where tests provide exact input→output pairs.
- Behavior only — no implementation details (module names, algorithms) in requirement text.
- 4 hashes for `#### Scenario:`, SHALL/MUST keywords in English, prose in the `specLocale` language.
- **Honour every `rules.specs` entry.** Every spec you write MUST honour every entry, verbatim, without filtering by whether it applies to a baseline. These rules are instructions for what you write: `speclink validate` checks structure only and does not verify free-text rules.

## Step 5: Validate and report

```bash
speclink validate --specs --all --strict
```

Fix structural findings, then report: capabilities created (with requirement/scenario counts), behaviors flagged as unverified, areas deliberately left out, and the specs rules applied this run — the same `Specs rules applied this run` block as in Step 3 (the numbered list, or the `none` line). Then state that specs now describe the current system and that future work goes through changes — the exits are in **Next steps** below.

## Guardrails

Check these before you report:

- [ ] Every requirement traces to code or tests you read; unverified inferences are flagged or omitted (Step 4).
- [ ] No code was changed and no change folder was created — only `speclink/specs/` was written.
- [ ] No existing spec was rewritten (Step 1).
- [ ] The capability map was confirmed before any spec was written (Step 3).
- [ ] The `Specs rules applied this run` block appeared in the map confirmation and in the final report (Steps 3 and 5).
- [ ] The workflow config came from `speclink workflow-config show --json`, never from reading `speclink/config.yaml` (Step 1).

## Next steps

Suggestions only. This skill NEVER invokes any of them — report where things stand and stop; the user decides what runs next.

- The requirements for the next piece of work are clear → `$speclink-propose <idea>`
- They are still fuzzy or worth debating → `$speclink-discuss <topic>`

Wersje

RepozytoriumWynikLicencja
Ta strona · momochenisme/speclink100MIT
momochenisme/speclink100MIT

Migawka bazy z 13.11.2026 · wersja paczki 8d90b0e05df0 (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

  • 96speclink-verify
    Sprawdza, czy implementacja spełnia specyfikacje i zadania, zanim zmiana zostanie zarchiwizowana.
  • 96speclink-verify
    Sprawdza, czy implementacja spełnia specyfikacje i zadania, zanim zmiana zostanie zarchiwizowana.
  • 100spec-baseline
    Pisze bazowe specyfikacje OpenSpec opisujące bieżące zachowanie istniejącego kodu, z plikiem dowodów w postaci cytowań i testów.
  • 100distill
    Wydobywa specyfikacje BDD z istniejącego kodu, przy wdrażaniu Beat w ugruntowanej bazie kodu lub przy zamianie modułu w pliki feature.
  • 98sdd-derive
    Wyprowadza specyfikacje SDD z istniejącego kodu i dokumentuje z opóźnieniem już zaimplementowane zachowanie.
  • 81spec-first
    Prowadzi pracę ze specyfikacjami w repozytorium: tworzy folder .specs, opisuje zmianę, wykonuje kolejne zadanie i synchronizuje specyfikacje.

Uwagi i zgłoszenia

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