| name | infer-market-brief-from-code |
| description | Produce a low-fidelity market-brief.md stub from codebase signals (README, manifests, ADRs, git tags, deploy config) during /codify. Owned by product-keeper. Confidence defaults to low; real market data is never inferable from code. |
| version | 0.1.0 |
| user-invocable | false |
| model | sonnet |
| allowed-tools | Read, Write, Grep, Glob, Bash |
| deprecated | true |
| deprecated_note | #434 ProductOS realignment — superseded by the command model; retained for Phase E reference, not installed |
infer-market-brief-from-code
Called by product-keeper during /codify. Produces specification/market-brief.md at {stm_base}/{issue}/evidence/codify/proposals/specification/market-brief.md.
Purpose
Emit a low-fidelity stub of the greenfield market brief using only codebase-visible signals. In /specify the market-analyst agent produces this artifact from web research; in /codify the codebase is the sole window. Expect thin evidence — README framing, manifest descriptions, ADR business context, git tag cadence, deploy targets — none of which surface TAM/SAM/SOM, competitive landscape, pricing strategy, or market sizing.
This skill is explicitly a stub producer. Confidence should almost always resolve to low. The artifact's most important section is knowledge_gaps — it lists what could not be inferred so downstream /codify flows file R4 entries in resolution-trace and humans can enrich the brief later.
Input
| Field | Required | Description |
|---|
scan_index_path | yes | Path to scan-index.json produced by scan.py |
stm_base | yes | STM root (resolved from .garura/core/config.yaml stm.base-path) |
issue | yes | Issue number driving /codify |
output_path | yes | Target path — typically {stm_base}/{issue}/evidence/codify/proposals/specification/market-brief.md |
decision_manifest_path | yes | Where per-decision provenance is recorded |
ltm_context | optional | Resolved LTM pointers from the Resolution Protocol (prior market briefs as templates) |
resolution_trace_path | yes | Where R1–R4 resolution decisions are recorded |
Process
-
Validate inputs. Confirm scan_index_path exists and is readable; confirm stm_base/{issue}/ is writable; confirm output_path parent directory exists (create if absent).
-
Walk R1 → R4 for any inferred market claim. R3 may consult for prior market briefs as structural templates (never as evidence). Write resolution decisions to . Claims with no KB or web backing land as R4 entries and feed .