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, draws the mock UI, 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. Context creator is the Product Owner of the default team flow: it talks with the person and writes the spec, and owns no lane step. Both flows start from the same spec.

Gate 1

Verbatim quotes

All six must-haves (goal, users, pages, core journey, look, what is out) 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). Who accepts follows from the person's access to the request (see Autonomy and people), so there is no acceptor must-have. 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). The six are goal, users, pages, core_journey, look, and out_of_scope.
  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. Before a turn is accepted, spec.LintPlain also checks the turn reply and the plain view, and refuses words the person did not use themselves.

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 (the type's recommended page set)
core_journeyMain step-by-step user flow in requester's wordsRefused
lookStyle, hex colors, typography, size, contrast, layoutAllowed (the type's recommended look)
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 takes its last recommendation for pages and look and accepts its recommended answer for open open_points. For goal, users, core_journey, and out_of_scope it keeps asking. conversationActions sets CanDecide when an open question is an open_point or a must-have with a recommendation, and HasSuggestions when any open question carries one; the UI shows Decide for me and Accept suggestions from these two flags.

Recommended answers per catalogue

The recommendation comes from the project type's catalogue (web-blog version 3, web-app version 2, desktop version 2). pages and look carry a recommended answer in all three. See Catalogues.

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 in the request's context-state database document, 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

The mock UI

Context sends a mock_ui with its turns once pages and look are known: the picture the person approves before anything is built. It picks one template that fits the request, gives it a palette and the words each screen shows, and the UI renders it as a sandboxed page with no network access. The rules mirror design/mock-templates.md.

PartWhat the code enforces
TemplateOne of countdown, landing, mobile-app, game, portfolio, blog, ecommerce, dashboard (MockTemplates)
ScreensAt most 6 screens (maxMockScreens) and 8 items each; each screen id names a glossary screen. App templates may name a layout: list, form, detail, calendar, board, settings, or chart
PaletteSeven #RRGGBB colours. Text needs 4.5:1 contrast on background and on surface, muted text 3:1 on background, or checkMockUI refuses the call
StyleA mood (eight values), a font (sans, serif, mono, rounded, display), and a brand name clipped to 40 characters
Pinned commentsThe person pins change requests on the mock (up to 60, 1000 characters each, on desktop, tablet, or mobile). Context must answer every pending pin with a new mock_ui
Viewer designsDark, Light, and Project colours (the palette Context drew). With no choice, dashboard and mobile-app draw Dark and the other templates draw Project colours

The person's approval is a mock-ui-approved event written by the acceptor (the opener, or a team owner or member). It records the choice but is not one of the three readiness gates. The mock itself lives in the context-state document, not in <home>.

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.
  • Batched elicitation: Asks up to 8 questions per batch (maxQuestions). The first batch normally carries the missing must-haves (up to six), later batches only open_points, and the person answers them one at a time. A change holds at most 12 requirements.
  • 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. A confirmation stands only while its spec is on the project's staging branch: one made into a repository that was lost (a cloud runner's scratch disk) is committed again into the new repository instead of being reported as done.

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 branchPostgres · request:<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 streamhash-chained log + SHA-256 linkscontext-state docmust-haves + turnsdraft/ & sessions/files in request scopereports & dy-*turn-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 record kept in Postgres.

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 on the draft.
  • Project gate (gate.go): Triggered by t12 confirm. DevOps first bootstraps an empty project repository, then verifies .t12/ configs, skill hashes, branches, dependencies, and base checks on staging. See DevOps internals.
  • Task gate: Not a separate step today.

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