| name | infer-domain-selection-from-code |
| description | Infer which product domains a brownfield codebase evidences by cross-walking scan-index.json signals (framework idioms, dependencies, config, readme, CI) against Garura's canonical domain KB. Produces specification/domain-selection.yaml. Used by product-keeper during /codify. |
| version | 0.1.0 |
| user-invocable | false |
| model | sonnet |
| allowed-tools | Read, Write, Grep, Glob |
| deprecated | true |
| deprecated_note | #434 ProductOS realignment — superseded by the command model; retained for Phase E reference, not installed |
infer-domain-selection-from-code
Called by product-keeper during /codify. Produces specification/domain-selection.yaml at {stm_base}/{issue}/evidence/codify/proposals/specification/domain-selection.yaml.
Purpose
/codify bootstraps product LTM for a brownfield repo. This skill answers:
which product domains does this codebase actually evidence? It reads
scan-index.json (produced by scan.py), walks Garura's canonical domain
catalog (core/components/memory/knowledge/domain/*.md), scores each canonical
domain against the scan signals, and surfaces scan-only domains as proposals
for a new canonical entry (per /reap C7a).
Tier 2. learning_category: domain. sub_category: null (domain is a flat
parent).
Input
Received from the /codify play via JSON contract. All paths absolute.
| Field | Required | Description |
|---|
scan_index_path | yes | scan-index.json produced by scan.py. |
stm_base | yes | STM root, from stm.base-path in .garura/core/config.yaml. |
issue | yes | Issue number (STM namespace). |
output_path | yes | {stm_base}/{issue}/evidence/codify/proposals/specification/domain-selection.yaml. |
decision_manifest_path | yes | Sibling decision-manifest-infer-domain-selection.yaml. |
ltm_context | yes | Resolution Protocol context from product-keeper (product_base, kb_base, resolved LTM paths). |
resolution_trace_path | yes | Sibling resolution-trace-infer-domain-selection.yaml. |
kb_domain_dir | yes | core/components/memory/knowledge/domain/. Walked non-recursively; files starting with are metadata, not domains. |