| name | infer-enriched-capabilities-from-code |
| description | Infer per-capability enrichment (business rules, depth spectrum cap, experiential warnings) during /codify by merging KB base values from core/components/memory/knowledge/domain/{domain}.md with project-specific overrides evidenced in scan-index.json. Produces scope/garura:enriched-capabilities.yaml. Used exclusively by product-keeper in the /codify play. |
| 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-enriched-capabilities-from-code
Called by product-keeper during /codify after infer-scope-from-code. Produces scope/garura:enriched-capabilities.yaml at {stm_base}/{issue}/evidence/codify/proposals/scope/garura:enriched-capabilities.yaml.
Purpose
During /codify (brownfield bootstrap), the enriched-capabilities artifact that /specify normally assembles through enrich-capabilities (KB + frozen project-profile interview) must be reverse-engineered from the existing codebase. This skill consumes the upstream proposals produced earlier in /codify — scope.yaml, domain-selection.yaml, project-profile.yaml — together with scan-index.json, and emits per-capability enrichment where every override against the KB base is grounded in a concrete scan-index evidence path or source file.
The KB carries generic capability definitions per domain (base business rules, a four-level depth spectrum, experiential warnings). The code carries the project's actual posture: what middleware is wired, what test coverage thresholds are declared, which modules churn the most, what naming conventions dominate. This skill merges the two so downstream intent-epic generation in /codify has a single enriched source per selected capability — no downstream step re-reads the KB or re-parses the scan.
Input
Receive from product-keeper via JSON contract.
| Field | Required | Description |
|---|
scan_index_path | yes | scan-index.json produced by scan-codebase. |
stm_base | yes | STM root resolved from .garura/core/config.yaml stm.base-path. |
issue | yes | Issue number driving /codify. |
related_proposal_paths | yes | List of upstream proposal paths — MUST include the codify proposals for scope.yaml, domain-selection.yaml, project-profile.yaml. |
kb_domain_dir | yes | core/components/memory/knowledge/domain/ — the canonical per-domain capability KB. |