# Definition of Done — Feature

Workflow gate used by `/tas-dev` Step 5 — verify each item before marking the Feature `Done`.

## Code

- [ ] Code implemented per all Acceptance Criteria (Given/When/Then)
- [ ] Follows conventions in CLAUDE.md
- [ ] Each public method has doc comment (XML doc / JSDoc / docstring)
- [ ] No dead code, no commented-out blocks, no debug prints
- [ ] **Component grounding** — every component (`MOD-NN.C#`) in the Technical file's `## Modules > Builds` is genuinely realized: its `File Changes` files exist on disk and are non-trivial (not a stub). This is what makes the `builds:` claim true so `/tas-status` coverage is honest.

## Testing

- [ ] Unit tests pass (Happy + Edge + Negative tables from Feature-Technical)
- [ ] Functional tests run if a FuncTest spec exists (`/tas-functest-mobile` / `/tas-functest-web`)
- [ ] No regression on existing tests
- [ ] Coverage ≥ 80% on changed files (per `tdd.md`)
- [ ] **Locator parity** (UI features only) — every testid in the Feature-Technical `### Locator Map` exists on a rendered component (`data-testid` web / `testID` app); any element built but absent from the Map was back-filled (`Origin: dev`). If the FuncTest §4 "Execution Locators" column is filled, its testids match the Map. Per `.tas/rules/common/locator-naming.md`.

## Review

- [ ] Code review passed (per `.tas/rules/common/code-review.md`)
- [ ] Security review: no Critical/High open findings
- [ ] If `auto_review: true`, automated review pass

## Documentation

- [ ] If Technical-file `sad_impact: true` → `docs/sad.md` updated AND Changelog has entry referencing `Feature-{NNN}` (gate; per `.tas/rules/common/sad-impact.md`)
- [ ] If API/schema changed beyond SAD scope, related docs updated (README, API docs)
- [ ] If new ADR was needed, ADR file created and linked from Feature-Technical
- [ ] If `docs/architecture-map.yaml` exists → write-back done for every design item this Feature claimed: components (`MOD-NN.C#` → `status: built`, `code_anchor`, `tests`, `built_by`, `last_built`) + module roll-up, entities owned (→ `built`), contracts produced (→ `built`), NFRs (→ `enforced`), security controls (→ `implemented`); `drift` noted if reality diverged — per `.tas/rules/common/architecture-map.md`
- [ ] Feature Changelog has entry for this dev cycle

## Status

- [ ] Feature `status` (frontmatter) updated in Feature file
- [ ] `project-status.yaml` updated (`features.{ID}.status`, `done_date`)
- [ ] Commit message follows conventions in CLAUDE.md
- [ ] If using ADO: `/ado-update feature {ado-id} --status "Done"` run

## Release Gate (PE owns)

- [ ] Acceptance criteria verified by PE — all G/W/T pass on staging
- [ ] **Design-item coverage = 100%** — `/tas-status` shows every tracked SAD item ✅ Covered: components (§7), entities (§8.1), contracts (§9.2), NFRs (§11), security controls (§10). A module is Covered only when all its components are. No ❌ UNCOVERED item of any type before release.
- [ ] Ready for production release
