Thoughtware

A cognitive unit is one call

One cognitive unit invocation means one bounded judgment, one price edge, and one reproducible extent of work. Hidden multi-step chains inside a single name break cost accounting and diagnosis.

10 min read

Cover for A cognitive unit is one call

Platform billing exports show a line item labeled "meal planning." Finance asks how much Tuesday's practicality check cost. Engineering opens the repo and finds one template that interprets the week, scores meals, drafts critique, and suggests substitutions. Support finds the same text copied into a worker and a chat endpoint. Nobody can answer the finance question because the architecture never defined an atomic edge.

This intermediate note refines atomicity. A cognitive unit presents as one model call against a declared template and inputs. It returns one structured judgment outcome: answer, abstain, or refer. Wrappers may surround that call. Undeclared chains inside one name are not wrappers. They are hidden compounds that break price, cache, diagnosis, and suites.

Helpful context: Async functions and the cognitive unit maps the call pattern. One cognitive unit, one open decision limits what the call may decide. Why you cannot read a cognitive unit explains why the boundary must stay honest for evaluation.

What one call buys

Atomicity turns cognition into engineering material teams can price, cache, and diagnose.

Price. The call is the billable edge. Cost per decision arithmetic assumes you know which call happened. Cache. Same declared arguments map to the same extent of work. Closure becomes measurable when impurity is declared (purity and the five levels). Sampling, retry, and critic wrappers. Reliability tooling composes around a known boundary. Tuning by wrapping depends on knowing what one invocation means. Diagnosis. When Tuesday fails, traces point to AssessMealPracticality, not to paragraph twelve of a mega-template.

Reasoning inside a single call does not break atomicity. A reasoning model may perform extensive internal work before returning. It is still one call: one price, one boundary, one cache key family, one suite identity for that judgment.

One open decision, one billed extent of work.

One call versus one internal chain

The books allow internal multi-step reasoning within a call. They do not allow multiple open decisions stuffed into one template without contracts.

CritiquePlan returns a critique object. Generation belongs in GenerateCandidates or ComposeWeek. Separate cognitive units, separate suites, separate owners. The agent awaits each in sequence. Merging them because the model "can do both" revives the compound failure mode one cognitive unit, one open decision forbids.

Named composition is deliberate adaptivity. Several cognitive units or a declared wrapper orchestrates multiple judgments with visible edges. Hidden inner loops are several judgments inside one template without intermediate contracts. Diagnosis returns to reading prompts. Cost dashboards lie. Suites mix incompatible metrics.

Named composition

Several cognitive units or a declared wrapper. Each edge has price, suite, and owner.

Hidden inner loop

Several judgments inside one template. Failures require prompt archaeology.

If you decomposed only because no model could hold the work in one context window, a stronger model may remove the reason for the split. That removal does not license several open decisions in one unnamed compound. Re-merge only when the open decision truly unified, with evidence from suites.

Relationship to async and maturity

Async and the cognitive unit treats calls like async functions with governed side effects. One await, one judgment result, deterministic post-processing outside the edge.

Maturity moves settled work out of runtime compresses orchestration while keeping atomic edges. Compression shortens strategy. It does not hide new decisions inside existing names. When Busy Week Pattern promotion reduces calls, the remaining calls stay atomic. AssessMealPracticality still assesses one evening per invocation. Judges still run with calibration suites. Atomicity makes compression measurable.

A cognitive unit is one call. Above that you have traded predictability for adaptivity.

The cognitive unit · Ch. 4

What this looks like in practice

Walk a correction loop with atomic edges. CritiquePlan: one call returns named weaknesses. RecommendMealSubstitution: one call proposes a bounded patch for one weakness. JudgeLocalRepairQuality: one call assesses patch quality. Deterministic code validates and applies.

Four billed edges, four suite records, four diagnosis targets. Contrast with one call that silently replans, critiques, and patches. Demo looks identical. Operations and finance live in different worlds.

Invoice intake uses the same atomicity for extraction and classification cognitive units. Orchestration code sequences calls. Each call remains a contract with figures.

When teams break atomicity on purpose

Sometimes product leadership demands "one button" latency. Architects respond with declared wrappers that record inner calls, preserve suite identities, and publish wrapper-level figures. The wrapper is honest infrastructure, not a renamed mega-prompt.

Breaking atomicity without declaration is how "temporary" demos become production debt. Any deliberate break documents which predictability was spent: cache, replay, exact cost, or isolated evaluation.

Common mistakes

Tool loops inside one identity. Multiple open decisions driven by tool calls without separate cognitive unit names.

Self-critique in the same template as generation. Two decisions, one suite, confused regressions.

Caching compounds. Keys that cover unrelated inputs hide partial failures.

Confusing tokens with decisions. Long outputs are not proof of multiple judgments, but multiple wrong-answerable questions in one template are.

Wrappers and declared composition

Sampling, retry, and critic wrappers are legitimate when declared. A wrapper around AssessMealPracticality that runs two samples on high-consequence weeks appears in traces and cost models. Reviewers see wrapper identity alongside cognitive unit identity in suite records.

Undeclared loops inside templates are different. They hide price edges and mix failure modes. If internal chain-of-thought spans multiple open questions, split templates until each call answers one wrong-answerable question or promote the work to an agent strategy that orchestrates named edges explicitly.

Inside the call explores reasoning within one template. Atomicity still holds when only one open decision is at stake. Multiple open decisions inside one call break atomicity regardless of internal reasoning depth.

Finance and observability

Finance teams ask for cost per accepted plan, not cost per token blob. Atomic edges make that question answerable. When costs spike, traces show whether critique, assessment, or composition drove the increase. Hidden compounds force finance back to guessing.

Capacity planning uses the same boundaries. If Tuesday assessments dominate spend, invest in AssessMealPracticality suites and library promotion rather than blindly upgrading every template in a monolith. Targeted investment at the cognitive unit level produces measurable cost reduction on the edge that matters, rather than broad optimization that dilutes effort across edges that already perform within budget. Structured traces list cognitive unit identity, wrapper identity if any, and case class tags. Observability without identity metadata repeats the readability trap at runtime. Operators see activity without knowing which judgment failed.

Invest in trace schemas early when adopting Thoughtware. Retrofitting identity into logs after launch is slower than declaring it beside contracts. When estimating latency budgets, sum declared cognitive edges rather than guessing monolith runtime. Atomicity makes budgets negotiable because edges are visible.

Teaching atomicity to new teams

Workshops that jump straight to agent frameworks skip atomicity and pay later. A useful exercise asks teams to label each model call in a trace with a decision sentence. Calls that need two sentences get split in the architecture diagram before the next sprint.

Backend engineers often grasp atomicity quickly through the async metaphor. Product managers grasp it through price and diagnosis stories. Finance grasps it through cost per accepted outcome. The audience-appropriate story differs, but the shared edge list stays the same.

What to do next

Implement one open decision as one template and one model call. Price and cache against that boundary honestly. Compose adaptivity through named cognitive units or declared wrappers with traces, and document deliberate breaks with the same measurement discipline as identities.

See inside the call for within-call reasoning boundaries and cost per decision for economics.

Read next: Why you cannot read a cognitive unit.