Skip to Content
turbo-12f
Architecture

Context and specs

How Context creator decides readiness via a 3-part Go gate, ingests existing GitHub repositories, multi-issue tickets, and image attachments, enforces 25 lint rules, and exports OpenSpec files plus SRS, Plain, and UAT views.

Explanation

turbo-12f anchors every specification to words the requester wrote so downstream agents cannot invent unasked scope. internal/roles/context runs a toolless conversation until three deterministic Go checks pass, then exports OpenSpec files plus three audience views.

Gate 1

Verbatim quotes

All six must-haves must be populated and matched to exact human quotes.

Gate 2

Zero open points

Every behavioral edge case (open_point) must be answered or accepted.

Gate 3

25 lint rules

Drafts must pass OpenSpec structural lint and plain-language word caps.

How Context knows context is enough to start

The Context creator LLM never decides when a project is ready (context-creator-v2.md). Instead, gateOf in state.go enforces three ordered checks on *st.Draft:

  1. Six must-haves backed by verbatim quotes: st.MustHaves.Missing() must be empty, and said(words, given.Quote) (answer.go) verifies every quote appears in human messages (case- and whitespace-normalized).
  2. Zero open points remaining: Behavioral gaps (open_point) keep the plan unconfirmed (still open with the person: ...) and block confirmation.
  3. Zero structural contract violations: spec.Lint (lint.go) checks 25 OpenSpec rules on *st.Draft; spec.LintPlain checks turn replies and plain.md.

spec.MustHaveKeys uses underscores in Go (core_journey, out_of_scope), while catalogue/*.json uses hyphens (core-journey, out-of-scope).

KeyPurposeHand-back allowed
goalCore outcome the project exists to deliverRefused (refusalRe check)
usersTarget audience and operator rolesRefused
pagesEvery page or screen, content, and actionsAllowed (catalogue/<type>.json default)
core_journeyMain step-by-step user flow in requester's wordsRefused
lookStyle, hex colors, typography, size, contrast, layoutAllowed (catalogue/<type>.json default)
out_of_scopeExplicit non-goals excluded from this changeRefused
open_pointRemaining behavioral detail (limits, errors, rollovers)Allowed: accepts recommended for remaining points

When refusalRe matches "you decide" or "skip it", Context fills defaults for pages, look, and open open_points. conversationActions exposes CanDecide and HasSuggestions so the UI swaps Decide for me for Accept suggestions when only non-delegable suggestions remain.

Image attachments, GitHub issues, and existing repositories

Context creator validates multimodal, multi-issue, and repository inputs on t12 ask and t12 ui before mutating state:

  • Limits (internal/imginput): Up to 5 PNG, JPEG, WebP, or GIF files (MaxPerTurn = 5, MaxBytes = 5 MiB each), validated against magic bytes and image headers.
  • Storage & lifecycle: Saved via Home.Evidence, recorded as record.Ref on EvInput and context/state.json, reloaded on --resume, and written to attachments.json (spec.Change.Attachments) on t12 confirm.

How a conversation becomes a confirmed spec

Flow
100%
confirmmissing / open_pointanswersConversation turncontext_turn · read-onlyQuotes + OpenSpec lint6 musts · open_point · lintReadyAll 3 checks passConfirmedchanges/<id> + queueArchivedfolds into living specsRequester replyclarifies open gaps

Context turn replies run exact-quote, open-point, and OpenSpec lint checks in Go before unlocking t12 confirm.

Click any node or press Play

Standards the Context creator follows

Across context-creator-v2.md and lint.go, Context enforces five standards:

  • ISO/IEC/IEEE 29148:2018 traits: Every requirement must be necessary, appropriate, singular, unambiguous, complete, feasible, verifiable, correct, and conforming.
  • Normative SHALL & MoSCoW: Requires uppercase SHALL (RuleShall) and must/should/could (RulePriority), while banning vague terms (RuleVague), TBD (RuleTBD), and prose filler (RuleFiller).
  • User stories & BDD Gherkin: Capabilities open with "As a <user>, I want <goal>, so that <reason>" (RuleStory), must items carry GIVEN/WHEN/THEN, and feature/change capabilities include an error: true path.
  • Three-round elicitation: Caps at 8 questions per round (1: goal/users/pages; 2: copy, WCAG 4.5:1, fonts, core_journey; 3: out_of_scope and open_points) and at most 12 requirements per change.
  • Plain-language accessibility (spec.LintPlain): Caps turn replies and plain.md sentences at 25 words (PlainSentenceWords), banning factory terms (lane, branch, commit, CI, token, hash, role names) and filler.

Export standards (openspec/changes/<id>/ and generated views)

Context writes canonical OpenSpec source files plus three read-only views (spec.IsView in files.go and views.go), committed to staging on t12 confirm:

FileKindPurpose
proposal.mdCanonicalChange ID, Project, Builds on, # Request quotes, Why, What Changes, Capabilities, "Your words"
specs/<capability>/spec.mdCanonicalDelta markdown (## ADDED Requirements), user story, metadata, and Gherkin scenarios
glossary.mdCanonicalDomain terms and UI screen IDs (home, post-page) used by e2e/t12/capture.ts and ui-check
decisions.mdCanonicalDecision log (Question, Source, Options, Choice, Reason, Changeable)
design.mdCanonicalOptional visual spec (hex palette, contrast, fonts, px size, rounding, per-screen layout)
attachments.jsonCanonicalImage attachment metadata when intake included images
srs.mdRead-only viewTailored 9-section ISO/IEC/IEEE 29148:2018 SRS (1. Purpose–9. Deliverables)
plain.mdRead-only viewRequester-readable summary checked by spec.LintPlain ([change this] markers on defaults)
uat.mdRead-only viewManual bug-bash checklist (Start, Do, Expect, [ ] pass / fail, grouped error cases)

What the Context creator leaves behind

Flow
100%
Project repo · staging branchState home · requests/<id> recordcommitsrecordst12 ask + t12 confirmsplits deliverable vs recordopenspec/changes/<id>/spec change committed to stagingproposal.mdwhy & scope changespecs/<cap>/spec.mdreqs + scenariosglossary & designdecisions · design.mdsrs · plain · uat.mdUAT checklist + viewRepository deliverable onlynever stores prompts or raw turnsevents.jsonlhash-chained log + SHA-256 linkscontext/state.jsonmust-haves + turnsdraft/ & sessions/staging draft + logsreports/ & dy-*.jsonturn-N & defaultsdecisions/ & confirmwho + spec SHA-256Private operator recordproves who confirmed and why

t12 ask and confirm separate the project repository spec change on staging from the immutable request log in the state home.

Click any node or press Play

Three readiness gates

  • Spec gate (state.go): Runs three deterministic Go checks on every draft turn: verbatim human quotes on all six must-haves, zero remaining open_point questions, and spec.Lint plus spec.LintPlain.
  • Project gate (gate.go): Triggered by t12 confirm to verify .t12/ configs, skill hashes, branches, dependencies, and base checks on staging. See DevOps internals.
  • Task gate:

Design target vs. current code

design.md specifies a standalone pre-lane Task Gate to drop duplicate or already-passing scenarios. Today strategist enforces dag.Order and 1:1 partitions while Orchestrator enforces depsDone and pausedDeps (see Strategist internals and Orchestrator execution).

How the Context creator checks readiness

Flow
100%
missingclarifyPersonplain wordsAgent turndraft + reply JSONCheck the call6 musts · open_point · lintConfirmgate closedAsk missing itemmust-have or open_point

The person talks only to an agent; scripts enforce the six must-haves, zero open points, and OpenSpec lint before confirm.

Click any node or press Play

Key takeaway

Context creator isolates requirement capture from implementation: three deterministic Go checks prove the spec is grounded and contract-valid before any repository file is touched.

Next steps

On this page