| State | Accepted |
| Architectural Significance | HIGH |
| Domain | Developer Tooling |
| Document version | 1.0 |
Governs the authoring pillar (roteiro spec, Stage 13) of ADR-0001 — the "spec-store v2" intent-confirmation front door ADR-0001 always envisioned but left as a stub. Extends the tiered, offline-first model machinery decided in ADR-0003 from embedding to generative models. See docs/history/BUILD_PLAN.md Stage 13.
Make roteiro spec the front door for authoring intent — house-style ADRs/blueprints and a graph-grounded build/deploy plan — structured by GitHub spec-kit's phase discipline (constitution → specify → clarify → plan → tasks) but rendered in Roteiro's house ADR/blueprint style, not spec-kit's own format.
Two invariants make it trustworthy rather than a hallucination engine:
roteiro check validates its [[links]] / @rto: against the graph. Authoring produces authored facts; the drift gate keeps them honest.Generation is tiered, mirroring inference (ADR-0003), so it degrades gracefully with no model and no network:
pull / candle backend from embedding to text generation.Agent-vs-tool boundary: the tool owns everything deterministic and verifiable — graph-grounded context assembly, house-style skeletons, build-plan outlines from real facts, and the check gate. Prose is delegated — to a local model (Tiers 1–2) or the agent (Tier 3) — and always flows back through the tool's check gate before it counts. The tool never emits unlabelled or ungrounded intent.
ADR-0001 chose Roteiro over the three-tool stack partly on the strength of spec-store's pre-coding interview — the flow that confirms user intent before specs are written — and our house ADR/blueprint discipline. Both were named as the parts "nobody ships." Yet roteiro spec remains a bail! stub: the graph, the authored layer, check, and the inference tiers all exist, but the front door that produces new intent does not.
Four forces to reconcile:
roteiro binary must not grow.check is what separates this from a chatbot. (ADR-0001's "precise-where-known" principle.)spec-kit phase → Roteiro artifact mapping:
| spec-kit phase | Roteiro artifact | Grounding |
|---|---|---|
| constitution | house principles/invariants (ADR-0001 §1) | already exists; new work is checked against it |
| specify | house ADR / blueprint ("what & why") | authored nodes; symbol/ADR [[links]] |
| clarify | the intent interview (spec-store's front door) | graph-aware — surfaces related ADRs/symbols to prevent duplication |
| plan | graph-grounded build/deploy plan | references real symbols/deps; check-gated like BUILD_PLAN.md |
| tasks | a task outline derived from the plan | optionally linked to intent-debt markers (Stage 15) |
Option 4 — tiered, graph-grounded, house-style, check-gated authoring (recommended).
roteiro spec context <topic> — assemble grounded context for a topic from the graph (relevant symbols, ADRs, dependencies, and existing intent), as human text or --json for an agent. Tier 0; no model.roteiro spec scaffold [--kind adr|blueprint] — emit a house-style skeleton plus a build-plan outline populated with real graph facts, and a structured interview checklist. Tier 0; no model. The result is check-clean by construction (its links point at real nodes).roteiro spec draft (Tier 1+, behind inference-local-models) — fill prose into a scaffold using the local GGUF instruct model; falls back to Tier 0 (leave the checklist) when no model is installed.pull / candle backend, adding an instruct-model registry entry and a text-generation path (candle-transformers). Feature-gated under inference-local-models so the default and inference builds pull none of it.check. Whatever tier produced the prose, the artifact is validated against the graph before it is considered authored intent.check gate unless bolted on afterwards. Recreates the hallucinated-planning problem this ADR exists to prevent. Rejected as the whole answer — kept as Tier 3, but always behind the tool's grounding + gate.check-clean.check-gated. Rejected — we take spec-kit's phases, not its format.check, the graph); the agent-vs-tool boundary keeps deterministic work in the tool and prose clearly delegated.roteiro spec stops being a stub: Tier 0 (spec context, spec scaffold) ships first with no new dependencies, then Tier 1 (spec draft) extends inference-local-models with a generative entry — subject to the cargo deny licence gate like every model dep, and behind the existing feature flag so the default build is unchanged.authored provenance and are check-gated — Roteiro's own dogfood check in CI validates them, so a scaffold that links a non-existent symbol fails the build.context reads the same graph agents query (one query surface, ADR-0001); the interview is duplication-aware via the graph; tasks can reference Stage 15 intent-debt markers.Project direction incorporated above: light-mode generation must run offline on low-power local hardware (a generative sibling of the ADR-0003 inference default), not require a foundation model; and the tool must keep deterministic, verifiable work (grounding, scaffolding, check) separate from delegated prose.
| Version | Date | Notes |
|---|---|---|
| 0.1 | 2026-08-09 | For Review. Tiered (0: offline scaffold → 1: local GGUF instruct → 2: larger local → 3: agent), graph-grounded, house-style, check-gated authoring pillar; spec-kit phases mapped to house artifacts; generative tier extends ADR-0003's registry/consent/candle machinery; agent-vs-tool boundary defined. |
| 1.0 | 2026-08-09 | Accepted. Tier 0 implementation began with roteiro spec context (graph-grounded context assembly, no model). |