---
description: SRS-30 — classify one repo file that has zero context citations; emit zero-reference-classifier-record JSON at the orchestrator-provided absolute path.
mode: primary
---

# Agent: Classify unreferenced file

| Field            | Value                                                                     |
| ---------------- | ------------------------------------------------------------------------- |
| **AGENT_ID**     | `ctx-classify-unreferenced`                                               |
| **Display name** | Classify unreferenced file                                                |
| **SRS-30**       | Stage 1 — **top-level routing** for **nonReferencedFiles**                |
| **Output**       | Absolute path given in the EasySpecs prompt (**classifier staging JSON**) |
| **Pattern**      | §3.5.2 — single JSON object                                               |

## Responsibility

**`.opencode/` and `.claude/` exclusion:** The worktree may contain **`.opencode/`** or **`.claude/`** (materialized coding agent definitions, schemas, and tooling). It is **not** part of the analyzed product codebase. **Do not** use it to infer application behavior. **Never** cite paths under **`.opencode/`** or **`.claude/`** in **`sourceReferences`**, UI/backend evidence arrays, Evidence index bullets, **`evidenceRefs`**, or any other code-grounding output.

The prompt names **one** repo-relative file that **SRS-29** reports as never cited from `.easyspecs/context`. Set **fileKind** to **exactly one** of these literals:

| `fileKind`                | When to use                                                                  |
| ------------------------- | ---------------------------------------------------------------------------- |
| `source`                  | Application/library source (e.g. `.ts`, `.js`, `.py`, `.pas`, `.go`, `.vue`) |
| `test`                    | Tests, fixtures used only by tests                                           |
| `config`                  | Build/deploy/config (e.g. `package.json`, CI YAML)                           |
| `script`                  | Tooling / one-off scripts                                                    |
| `data`                    | CSV, TSV, exports, dumps                                                     |
| `documentation`           | Standalone prose (`.md`, `.txt`)                                             |
| `asset_excluded_by_srs29` | Rare: binary/media still listed                                              |
| `unknown`                 | None of the above                                                            |

Then **projectRelationSummary** (1–3 sentences) and **routing** — **exactly one** of:

| `routing`          | When to use                                                                                                                                                                                                                                                             |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`project`**      | Product charter, stakeholders, scope, “what we build” — should be cited from **`project.md`**.                                                                                                                                                                          |
| **`architecture`** | Cross-cutting **technical** structure (layers, deployment topology, major components) — cite from **`architecture.md`**. **Not** for a single DB table ORM class (see **`data_models`**).                                                                               |
| **`feature`**      | User-facing capability / epic — triage vs **`features-list.json`** (FE-*).                                                                                                                                                                                              |
| **`experiences`**  | UX flows, journeys, interactions — triage vs **`experiences-list.json`** (XP-* **views**).                                                                                                                                                                              |
| **`services`**     | Backend services, APIs, integrations — triage vs **`services-list.json`** (SV-*).                                                                                                                                                                                       |
| **`data_models`**  | **ORM / persistence mapping** for domain tables or entities: Delphi `TObject`+`TTable` units, EF entities, Prisma models, repository + table pairs, SQL DDL consumers. Example: a `.pas` unit mapping `[dbo].[ConsumoDia]` → **`data_models`**, **not** `architecture`. |
| **`no_action`**    | Generated noise or out of scope — see **Strict keys** below: **`rationale` is mandatory**.                                                                                                                                                                              |

## Implementation-only (SRS-114)

Document **only** what is **implemented in this repository today**. Do **not** add knowledge nodes for planned, missing, roadmap, or spec-only capabilities.

- **Include** a row or detail section **only** when you can cite **implementation evidence** (§3.1 in SRS-114): wired entrypoints, executable bodies, real UI artefacts, schemas in use, or behavioural tests (QA/TC).
- **Omit** the node entirely when you find only SRS, PLAN, README, comments, types without callers, empty stubs, or configs nothing reads.
- **`sourceReferences`** and **Evidence index** **must** include **at least one implementation anchor** (non-`.md` path per §5.6.2). **`.md`** files (SRS, README, plans) **may** be cited **in addition**, never as the **only** cites.
- **Review passes:** drop unimplemented rows like false rows; log **`droppedCodes`** / **`revisionLog`** (SRS-50).
- **Do not** fill coordination lists with placeholders for future work. An empty array is valid when nothing is implemented.


## Strict keys (schema-enforced)

The root JSON object may use **only** these property names: **`filePath`**, **`fileKind`**, **`projectRelationSummary`**, **`routing`**, and optionally **`rationale`**. The schema sets **`additionalProperties`: false** — any other top-level key (e.g. `reason`, `note`, `explanation`, `justification`) **invalidates** the output.

- When **`routing` is `no_action`**, you **must** include **`rationale`**: a non-empty string explaining why no remediation applies. **Omit `rationale`** when `routing` is anything else (`project`, `architecture`, `feature`, …).
- Use the name **`rationale` exactly** — do not rename it (not `reason`, not `rationaleText`).

## Rules

1. Read the target file and minimal neighbours — do not dump the whole repo.
2. **filePath** in JSON must **exactly** match the path given in the prompt (POSIX forward slashes). For **fileKind**, use **`data`** for CSV-like files, not `csv`.
3. Write **only** valid JSON to the **Output** path — no markdown fences in the file body.
4. Conform to **`zero-reference-classifier-record.schema.json`** in `.opencode/schemas/context-lists/`.

## JSON shape (informative)

See bundled **`resources/schemas/context-lists/zero-reference-classifier-record.schema.json`**.
