Reverse-engineer a legacy codebase into ATDD-ready, traceable specifications
69
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
How doc-this-promote assigns next-available FR-NNN, NFR-NNN, and ADR-NNN IDs without colliding with existing project content.
Scan docs/requirements/*.md filenames AND headings to detect the project's existing convention:
| Convention | Example | When to use |
|---|---|---|
| Flat numeric | FR-001, FR-042 | Default; small to medium projects |
| Compound | FR-MEM-AUTO-5, FR-ONBOARD-1 | Project already uses subdomain prefixes |
If existing IDs are flat: use flat. If compound, follow the same prefix scheme — never mix conventions in the same project.
The pattern, which is also what a commit-traceability gate typically expects where a project enforces one:
(FR|NFR)(-segment)*-NWhere (-segment)* allows zero or more uppercase segments and the last segment is digits. Keep BUG-NNN flat-only and 3-digit zero-padded, matching the convention most bug-tracking schemes use.
In an OKF repo (docs/okf.yaml present), read docs/requirements/index.md FIRST — the generated
id — status — description catalog answers the existing-ID scan in one read. Fall back to the
directory scan below when there is no index or it lacks the generator marker.
existing_ids = scan(docs/requirements/*.md)
via filenames matching FR-(\w+-)*\d+ or NFR-(\w+-)*\d+
via headings matching # FR-(\w+-)*\d+ or # NFR-(\w+-)*\d+
next_fr = max(numeric suffix of FR-* IDs) + 1
next_nfr = max(numeric suffix of NFR-* IDs) + 1
next_adr = max(numeric suffix of ADR-* in docs/adr/*.md) + 1If no existing IDs exist:
FR-001, NFR-001, ADR-001If existing IDs use compound format with a specific prefix that matches the unit (e.g., FR-AUTH-* exists and we're promoting an auth unit):
FR-AUTH-3 → next is FR-AUTH-4If existing IDs use compound but the new unit doesn't fit any prefix:
FR-BILLING-1, FR-BILLING-2, ...The filename is <ID>-<slug>.md. Slug is the unit name:
_ → -[a-z0-9-]-Example: Place a New Order → place-a-new-order → file FR-042-place-a-new-order.md
A unit's requirements.md may contain multiple local FRs (FR-Local-1, FR-Local-2). The promotion options:
Option A — Split into separate FR files (recommended for small FRs)
FR-Local-N becomes its own FR-NNN-<slug>.mdOption B — Bundle as one FR file with sub-requirements (recommended for tightly coupled FRs)
FR-NNN-<slug>.md per unitFR-Local-N references stay as in-doc anchors (### FR-Local-N) but the file's primary ID is the unit'sDefault to A unless the unit has > 5 FRs that are facets of the same behavior. Confirm with the user during the planning step if ambiguous.
NFRs in unit requirements.md are typically per-unit (NFR-Local-1, NFR-Local-2). Promote each as its own NFR-NNN-<slug>.md UNLESS multiple units share the same NFR (e.g., "all endpoints respond < 200ms"). In that case:
requirements.mdADR files in .doc-this-sdd/adrs/ are typically already numbered (0001-jwt-auth.md). Renumber to project-wide ADR-NNN:
ADR-NNNIf a target filename already exists in docs/requirements/, docs/adr/, or tests/.../*.feature:
"Conflict:
docs/requirements/FR-042-place-order.mdalready exists. The Discovery output fororders/requirements.mdwould land at the same path. Options:
- Skip — leave existing file untouched
- Append to a new ID — assign next available (FR-043)
- Diff and merge — show me the differences first"
Default to option 2 unless the user picks otherwise.
For each ID assigned:
(FR|NFR)(-segment)*-\d+ or ADR-\d+id: equals the filename's ID (see references/okf-conformance.md)TRACEABILITY.md use the same ID.tessl-plugin
hooks
skills
doc-this
references
scripts
doc-this-architect
references
doc-this-code-analyst
references
doc-this-data-master
doc-this-design-system
doc-this-detective
references
doc-this-help
doc-this-promote
doc-this-reviewer
doc-this-scout
doc-this-tracer
doc-this-viewer
doc-this-visor
doc-this-writer