80 / TOC · THEORY OF CONSTRAINTS / DESIGN-TIME PROBLEM SOLVING
80 / METHODOLOGY / CONSTRAINT · THROUGHPUT · INVENTORY · OPERATING EXPENSE · DRUM-BUFFER-ROPE

TOC — THEORY
OF CONSTRAINTS.

TOC — Theory of Constraints / Теория ограничений — методология управления системой через поиск главного ограничения, которое в текущий момент определяет её общий результат. Вместо локальной оптимизации каждого компонента TOC концентрирует усилия там, где изменение действительно увеличит throughput всей системы.

Главный принцип: если система представляет цепочку зависимых шагов, её результат ограничивается не средним качеством компонентов, а узким местом. Улучшение не-ограничения часто почти не меняет итог — а иногда создаёт больше WIP, очередей и сложности.
00. ARCHITECTURAL STATUS

DESIGN-TIME / OPERATIONS METHODOLOGY, NOT A RUNTIME MODULE

В нашем Master Plan №80 закреплён как METHODOLOGY / DEFAULT N/A / SEPARATE COMPONENT N/A и живёт в Design-time / Problem Solving. TOC — это способ анализировать и улучшать систему, а не обязательный шаг в каждом AI request.
TYPEMETHODOLOGYSystem improvement through constraint focus.
DEFAULTN/ANot a runtime toggle.
USE WHENFLOW / THROUGHPUT IS STUCKQueueing, bottlenecks, delivery limits.
SEPARATE COMPONENTN/ANo “TOC Service”.
LIVES INDESIGN-TIME / PROBLEM SOLVINGOperations, product, architecture, workflows.
COMPLEXITYLOW → MEDIUMSimple bottleneck analysis → full TOC thinking processes.
USE WHEN SYSTEM FLOW MATTERS
80% практической ценности: define system goal and throughput unit, map end-to-end flow, identify the real constraint from evidence, exploit it, subordinate non-constraints, elevate only if required, then repeat because the constraint moves. For software/AI: measure queue age, saturation, capacity, rework, human review load, model/tool bottlenecks and verified completions — not isolated component utilization.
01A. ARCHITECTURE BOUNDARIES & OPERATIONS

ГРАНИЦЫ С СОСЕДНИМИ МЕТОДАМИ

A. BOUNDARY WITH NEIGHBORS

№78 TRIZ помогает снять противоречие внутри найденного проблемного узла; №79 Kepner–Tregoe помогает диагностировать конкретное отклонение и выбрать действие; TOC отвечает на более системный вопрос: какой один фактор сейчас ограничивает результат всей цепочки? №81 IDEF0 помогает моделировать функции; №82 BPMN — поток процесса; TOC использует такие модели для поиска constraint и управления flow.

B. PREREQUISITES / CROSS-REFERENCES

Хорошо сочетается с №13 Problem Formulation, №14 Decomposition, №30 Simulation, №45 Verification, №46 Observability, №47 Evals, №57 Queues & Workers, №64 Budgets, №68 Durable Workflow и №69 Distributed Reliability. Для production AI именно telemetry показывает, где реально накапливается очередь и где throughput перестаёт расти.

C. CONTROL / DATA / RUNTIME / OFFLINE

CONTROL PLANE: capacity policies, WIP limits, queue priorities, buffer targets, release rules. DATA PLANE: jobs, queues, work-in-progress, completions, failures. RUNTIME: TOC-derived controls могут работать автоматически — admission control, concurrency, routing, batching. OFFLINE: основная методология — анализ flow и изменение архитектуры/операций.

D. FAILURE & OPERATIONS CONTRACT

Success: системный throughput/goal metric improves after interventions at the identified constraint. Failure: optimizing local utilization, mistaking a symptom queue for the actual constraint, elevating before exploitation/subordination, or measuring “busy” instead of useful completed work. Evidence: end-to-end throughput, queue growth, blocking/starvation, WIP, cycle time and constraint utilization.

E. WHAT THIS TOPIC DOES NOT OWN

TOC не является универсальным load-balancer, scheduler, queue implementation или performance profiler. Она не доказывает root cause конкретного сбоя и не генерирует автоматически inventive solution. Она владеет SYSTEM-LEVEL FOCUS: IDENTIFY THE CURRENT CONSTRAINT AND ALIGN THE REST OF THE SYSTEM AROUND IT.

01. SYSTEM GOAL

ПЕРЕД ПОИСКОМ CONSTRAINT НУЖНО ЗНАТЬ, ЧТО СИСТЕМА ПЫТАЕТСЯ УВЕЛИЧИТЬ

GOAL

What outcome matters?

Revenue, completed cases, verified answers, shipped features, resolved tickets, accepted content, successful workflows.

THROUGHPUT

Rate of goal creation

How quickly the system creates units that count toward the goal.

INVENTORY / WIP

Money/work tied inside flow

Unfinished jobs, queued tasks, drafts, pending reviews, unprocessed documents.

OPERATING EXPENSE

Cost to run flow

Compute, people, tooling, model spend, infrastructure and operational effort.

Классическая терминология TOC ориентирована на бизнес/производство. В digital/AI systems её полезно переводить на verified useful completions, WIP and operating cost, не теряя системную логику.
02. LOCAL OPTIMUM ≠ SYSTEM OPTIMUM

100% UTILIZATION EVERYWHERE МОЖЕТ СДЕЛАТЬ СИСТЕМУ ХУЖЕ

PIPELINE CAPACITY:

A ingest       100 jobs/min
B parse         90 jobs/min
C verify        30 jobs/min   ← CONSTRAINT
D export        80 jobs/min

If A runs at 100:
  100 jobs/min enter system

But C can finish only:
  30 jobs/min

Result:
  WIP grows before C
  queues grow
  cycle time grows
  retries/timeouts may grow
  memory/storage pressure grows

SYSTEM THROUGHPUT:
  ≈ 30 useful jobs/min

Optimizing A from 100 → 150
does NOT improve system throughput.

It may only create
50 more waiting jobs/min.
TOC changes management target from “keep every resource busy” to “protect and improve the system constraint while preventing excess WIP elsewhere.”
03. WHAT COUNTS AS A CONSTRAINT?

НЕ ТОЛЬКО CPU И НЕ ТОЛЬКО “САМАЯ МЕДЛЕННАЯ ФУНКЦИЯ”

CAPACITY

Resource constraint

GPU, human reviewer, parser pool, browser sessions, external API quota.

POLICY

Rule constraint

Batching rule, approval policy, release window, concurrency cap, organizational procedure.

MARKET / DEMAND

External constraint

System can produce more than users/business can absorb or value.

INFORMATION / QUALITY

Effective flow constraint

Poor inputs cause rework; verification capacity becomes apparent constraint.

Constraint — это то, что currently limits goal throughput. Самый высокий utilization часто является сигналом, но не определением.
04. FIVE FOCUSING STEPS

IDENTIFY → EXPLOIT → SUBORDINATE → ELEVATE → REPEAT

1. IDENTIFYWhat currently constrains system goal?
2. EXPLOITGet more useful output from constraint without major investment.
3. SUBORDINATEAlign upstream/downstream behavior around constraint.
4. ELEVATEAdd capacity/change architecture if still constraint.
5. REPEATConstraint moved. Find the new one.
Порядок важен: часто throughput можно сильно поднять exploitation/subordination без покупки новой инфраструктуры.
05. STEP 1 — IDENTIFY

ИСКАТЬ CONSTRAINT ПО FLOW EVIDENCE

QUEUE BUILDUP

Work accumulates before

Growing WIP upstream is a strong clue.

STARVATION AFTER

Downstream waits

If stage after resource is often idle waiting for it, resource may constrain flow.

THROUGHPUT RESPONSE

Capacity experiment

If giving component more capacity increases end-to-end output, evidence for constraint strengthens.

REWORK

Hidden load

Constraint may spend capacity fixing upstream defects rather than processing useful flow.

GOOD EVIDENCE:
  queue_before ↑
  resource busy / scarce
  downstream frequently starved
  end-to-end throughput tracks this resource
  capacity increase raises whole-system throughput

WEAK EVIDENCE:
  “this service has the highest CPU”
  “this team feels overloaded”
  “this function is slow”
  “this component is expensive”
06. STEP 2 — EXPLOIT

НЕ ДАВАТЬ CONSTRAINT ТРАТИТЬ ВРЕМЯ НА РАБОТУ, КОТОРАЯ НЕ УВЕЛИЧИВАЕТ GOAL

REMOVE IDLE

Keep useful work available

Avoid starvation caused by missing inputs, approvals or batching gaps.

REMOVE REWORK

Quality before constraint

Validate cheap errors upstream so bottleneck does not waste scarce capacity.

PRIORITIZE

Best work first

Use constraint for high-value/goal-producing tasks, not optional low-value load.

REDUCE SETUP

Batch/context switching

Reduce unnecessary switching, cold starts, repeated setup or duplicated checks.

Для AI: если human verification — constraint, сначала уберите из его очереди автоматически проверяемые low-risk cases, а не нанимайте ещё reviewers.
07. STEP 3 — SUBORDINATE

NON-CONSTRAINTS НЕ ДОЛЖНЫ ЗАЛИВАТЬ BOTTLENECK РАБОТОЙ “ПОТОМУ ЧТО МОГУТ”

RELEASE RATE

Control entry

Upstream work released according to constraint capacity + buffer, not maximum upstream capacity.

PRIORITY

Protect constraint sequence

Noncritical jobs should not crowd out critical throughput units.

QUALITY GATE

Do cheap checks earlier

Constraint sees prepared, valid work.

Subordination often feels counterintuitive because it intentionally leaves some non-constraint capacity unused. In TOC, idle non-constraint resource can be healthier than producing excess WIP.
08. STEP 4 — ELEVATE

ТОЛЬКО ТЕПЕРЬ ДОБАВЛЯТЬ РЕСУРСЫ И МЕНЯТЬ ARCHITECTURE

SCALE

Add capacity

More workers, GPUs, reviewers, browser sessions, provider quota.

PARALLELIZE

Split workload

Sharding, parallel verifier pool, extra provider route.

AUTOMATE

Replace scarce manual work

Deterministic checks or tools take part of constraint workload.

REDESIGN

Change flow

Remove the step, alter architecture, outsource or avoid needing the constrained operation.

После elevation constraint может переместиться. Продолжать оптимизировать старое bottleneck после его снятия — типичная ошибка.
09. STEP 5 — REPEAT

CONSTRAINT MOVES

BEFORE:
  ingest 100
  parse   90
  verify  30   ← constraint
  export  80

AFTER:
  exploit/subordinate/elevate verify → 85

NOW:
  ingest 100
  parse   90
  verify  85
  export  80   ← NEW constraint

If team keeps optimizing verification
from 85 → 150,
system remains ≈ 80.

TOC is continuous focusing,
not one-time “find bottleneck” exercise.
10. DRUM–BUFFER–ROPE

КАК УПРАВЛЯТЬ FLOW ВОКРУГ CONSTRAINT

DRUM

Constraint sets pace

The bottleneck's sustainable rate becomes the rhythm of the system.

BUFFER

Protect constraint

Small controlled queue/time buffer ensures constraint does not starve when upstream varies.

ROPE

Control release

Upstream admission/release rate tied to drum and buffer state, preventing uncontrolled WIP growth.

SOURCE
  ↓
ROPE / ADMISSION CONTROL
  ↓
UPSTREAM WORK
  ↓
BUFFER
  ↓
[ CONSTRAINT = DRUM ]
  ↓
DOWNSTREAM
  ↓
COMPLETED THROUGHPUT

If buffer too low:
  risk starvation.

If buffer too high:
  excess WIP / long cycle time.

Goal:
  enough protection,
  not infinite queue.
В distributed AI systems DBR можно реализовать через queue admission, concurrency limits, priority classes and buffer/queue-age targets.
11. BUFFERS

BUFFER — НЕ “ЧЕМ БОЛЬШЕ ОЧЕРЕДЬ, ТЕМ НАДЁЖНЕЕ”

STARVATION BUFFER

Protect scarce stage

Enough ready work so constraint keeps processing despite upstream variability.

TIME BUFFER

Protect deadline

Slack before critical delivery point absorbs variation.

BUFFER TOO LARGE

WIP explosion

Long cycle time, stale inputs, hidden failures and larger retry blast radius.

BUFFER STATUS

Control signal

Green/yellow/red consumption can guide release/priorities instead of static schedules.

12. FLOW METRICS

MEASURE COMPLETION, WIP AND TIME — NOT JUST UTILIZATION

T

Throughput

Useful goal units completed per time.

WIP

Work in Progress

Started but not yet goal-complete work.

CT

Cycle Time

Start/release → useful completion.

Q

Queue Age

How long oldest/typical work waits before constrained stage.

STV

Constraint Starvation

Time constraint idle because valid work unavailable.

RW

Rework at Constraint

Scarce capacity consumed by defects/retries.

BUF

Buffer Health

How often protection buffer becomes dangerously depleted/overfilled.

ΔT

Throughput Delta

Did intervention at suspected constraint actually improve total output?

13. LITTLE'S LAW AS A COMPANION TOOL

WIP, THROUGHPUT И CYCLE TIME СВЯЗАНЫ

For a stable flow:

WIP ≈ THROUGHPUT × CYCLE TIME

Example:

Throughput:
  20 tasks / hour

Average WIP:
  100 tasks

Average cycle time:
  ≈ 5 hours

If throughput remains 20/h
but we let WIP grow to 200,
cycle time tends toward ≈ 10h.

This is why
“keep feeding the system”
can make responsiveness worse
without increasing output.
Little's Law — не часть TOC как таковая, но это очень полезный quantitative companion для объяснения, почему subordination и WIP control работают.
14. FALSE BOTTLENECKS

ОЧЕРЕДЬ МОЖЕТ БЫТЬ SYMPTOM

DOWNSTREAM BLOCK

Work cannot leave

Queue near component grows because later system is blocked, not because this stage lacks capacity.

BAD PRIORITY

High-value work hidden

Wrong scheduling makes stage look constrained.

REWORK LOOP

Same jobs repeat

Capacity appears low because defects loop back.

BATCH RELEASE

Bursty input

Temporary queue after batch does not necessarily define long-run constraint.

Use KT Problem Analysis if you need to diagnose why a stage behaves unexpectedly before declaring it the system constraint.
15. POLICY CONSTRAINTS

ИНогда УЗКОЕ МЕСТО — ЭТО ПРАВИЛО, А НЕ HARDWARE

EXAMPLE:

Human reviewers:
  theoretical capacity = 100 cases/day

Current policy:
  every case must be reviewed twice

Effective system:
  ≈ 50 cases/day

If duplicate review adds
almost no quality uplift
for low-risk cases,
the constraint is partly policy-driven.

TOC move:
  exploit:
    prioritize high-value reviews
  subordinate:
    validate low-risk cases upstream
  elevate:
    change review policy by risk class
    after eval evidence

No extra reviewer
may be required.
Для AI systems policy constraints особенно важны: blanket HITL, always-on critic, overly conservative tool approval or one-model-only policy can become the actual throughput constraint.
16. CONSTRAINT vs BOTTLENECK

ТЕРМИНЫ ПОХОЖИ, НО TOC ПОДЧЁРКИВАЕТ SYSTEM GOAL

BOTTLENECK

Capacity perspective

Stage whose capacity is lower than demand / neighboring flow.

CONSTRAINT

Goal perspective

Any factor that currently limits achievement of the system goal — resource, policy, demand, quality, information.

В обычной software-речи “bottleneck” часто достаточно. TOC добавляет дисциплину: does fixing it actually increase system throughput toward the goal?
17. AI EXAMPLE — HUMAN REVIEW

HITL IS THE CONSTRAINT

FLOW:

1. AI draft          500/day
2. deterministic QA  450/day
3. human approval    120/day  ← constraint
4. publish           400/day

SYMPTOM:
  approval queue grows daily.

BAD RESPONSE:
  optimize generation from 500 → 900/day.

TOC:

IDENTIFY:
  human approval = current constraint.

EXPLOIT:
  reviewers see:
    highest-risk / highest-value cases first;
    complete evidence package;
    no malformed drafts.

SUBORDINATE:
  generation rate follows approval capacity;
  low-priority drafts do not flood queue;
  cheap checks happen before review.

ELEVATE:
  eval risk-based auto-approval;
  hire/train more reviewers;
  improve reviewer UI;
  split specialist queues.

AFTER:
  approval capacity reaches 350/day.

NEW CONSTRAINT:
  publishing API = 300/day.

Repeat.
18. AI EXAMPLE — MODEL GATEWAY

MODEL CAPACITY IS NOT ALWAYS THE REAL CONSTRAINT

REQUEST PIPELINE:

API ingress          500 rps
retrieval            480 rps
model gateway        300 rps
verification          90 rps  ← actual goal constraint
response delivery    450 rps

Model team sees:
  model gateway 80% busy
  and wants more capacity.

But verified completions
are limited to ≈ 90 rps.

Adding model capacity:
  300 → 600 rps
creates more verification WIP
without raising verified throughput.

TOC move:
  first improve/subordinate around verification.

Only after verification > 300
does model gateway become relevant.
19. AI EXAMPLE — INGESTION

THE INDEXER IS NOT THE CONSTRAINT IF PARSER REWORK DOMINATES

DAILY FLOW:

fetch        2M docs/day
parse        1.2M docs/day
quality      0.4M docs/day
index        1.5M docs/day

Looks like:
  quality is capacity constraint.

Deeper observation:
  55% quality failures
  return to parse due broken table extraction.

Scarce useful throughput:
  quality capacity consumed by rework.

TOC:
  exploit quality:
    stop sending known-bad document classes.

subordinate:
    parser prechecks / quarantine before QA.

elevate:
    improve table parser
    only if still needed.

Result:
  quality useful throughput may rise
  without scaling QA workers.
20. AI EXAMPLE — RESEARCH AGENT

TOO MANY SUBAGENTS CAN REDUCE THROUGHput

ONE USER TASK:

planner creates 12 branches
  ↓
12 research workers
  ↓
12 × web/search/model traffic
  ↓
evidence merge
  ↓
single verifier   ← constraint

If verifier can evaluate
3 branches/second,

generating 30 branches/second
only creates WIP.

TOC move:
  identify quality merge/verifier constraint
  ↓
  restrict research fan-out
  ↓
  prioritize highest-value evidence gaps
  ↓
  stop when coverage sufficient
  ↓
  reserve DEEP fan-out only for tasks
  where verifier capacity and value justify it.

This aligns perfectly with:
  FAST / STANDARD / DEEP.
TOC is one more argument against “more agents = better”: parallelism only helps while the rest of system can convert it into useful completed output.
21. CONSTRAINT BUFFER IN QUEUES

QUEUE TARGET AS CONTROL SIGNAL

GREEN

Healthy buffer

Enough ready work; no urgent intervention.

YELLOW

Risk of starvation/delay

Prioritize upstream tasks feeding constraint.

RED

Constraint threatened

Escalate missing inputs or reduce competing work; admission rules change.

В digital systems цветовая buffer management может быть основана на queue age/time-to-deadline, а не количестве элементов alone.
22. WIP LIMITS

START LESS TO FINISH MORE

ADMISSION

Bound new work

Don't create more task instances than flow can absorb.

PER-RUN FANOUT

Bound subagents/tools

Planner cannot spawn unlimited parallel branches.

TENANT WIP

Fairness

One tenant/workload cannot occupy all bottleneck capacity.

PRIORITY

Goal contribution

WIP budget favors high-value/urgent throughput units.

WIP limits reduce tail latency and make bottlenecks visible earlier instead of hiding them behind huge queues.
23. TOC & BACKPRESSURE

SUBORDINATION AS SYSTEMIC BACKPRESSURE

CONSTRAINT SIGNAL

Queue age, utilization, buffer state, latency, rejection rate.

UPSTREAM CONTROL

Slow release, reduce optional deep work, prioritize critical jobs.

FLOW STABILIZES

Less excess WIP, lower cycle time, constraint remains useful rather than overloaded.

№20 backpressure concept from Production Architecture gets a management rationale here: upstream must subordinate to the current constraint.
24. COST OPTIMIZATION THROUGH TOC

CUTTING COST AT NON-CONSTRAINT CAN REDUCE THROUGHPUT

Suppose:
  constraint = human review

Upstream model cost = $0.08/task
Strong model reduces review time 30%.

Switch to cheaper model:
  cost = $0.03/task
but review time +40%

Local model spend improves.

System effect:
  human constraint processes fewer cases/day.
  total throughput/revenue may fall.

TOC asks:
  what is the effect on the system constraint?

Not:
  which local component has lower unit cost?
Это особенно важно в AI: “cheapest model” может быть дороже system-wide, если создаёт больше rework на scarce reviewer/tool stage.
25. QUALITY AT THE CONSTRAINT

DEFECT BEFORE CONSTRAINT IS CHEAP; DEFECT AT/AFTER CONSTRAINT WASTES SCARCE CAPACITY

PRE-CHECK

Cheap deterministic quality

Reject malformed jobs before scarce model/human/browser stage.

PROTECT

High-quality input

Constraint receives complete context, evidence and valid schema.

POST-DEFECT

Expensive rework

If bad work consumes constraint and then returns, system loses more throughput than same defect caught earlier.

26. TOC THINKING PROCESSES

BEYOND FIVE STEPS: CAUSE–EFFECT MAPS AND CONFLICT CLOUDS

CURRENT REALITY TREE

Why do undesirable effects coexist?

Cause-effect map linking visible symptoms to deeper policies/conditions.

EVAPORATING CLOUD

Conflict structure

Expose assumptions behind two apparently incompatible requirements.

FUTURE REALITY TREE

Will proposed change work?

Map intended causal chain and possible negative branches.

PREREQUISITE / TRANSITION TREE

How to implement?

Identify obstacles, intermediate objectives and ordered actions.

Для AI/software команд Five Focusing Steps обычно дают большую часть пользы. Thinking Processes полезны для сложных policy/organizational constraints and change management.
27. EVAPORATING CLOUD

TOC CONFLICT TOOL И ЕГО СВЯЗЬ С TRIZ

GOAL:
  reliable AI product

NEED B:
  high quality

NEED C:
  low latency

ACTION D:
  verify every response deeply

ACTION D':
  avoid deep verification

APPARENT CONFLICT:
  D ↔ D'

ASSUMPTIONS:
  B requires D because
  only deep verification catches material errors.

  C requires D' because
  all deep verification is slow.

CHALLENGE ASSUMPTION:
  Is deep verification required for EVERY case?

INJECTION:
  risk-based verification ladder.

Then:
  high quality
  AND low average latency
  become compatible.
По духу это близко к TRIZ physical contradiction. Разница — TOC cloud чаще работает через явные needs/actions/assumptions in organizational/system reasoning.
28. TOC + KEPNER–TREGOE

FIND THE LEVERAGE POINT → DIAGNOSE ITS DEVIATION

TOC

Shows which stage/factor actually governs system throughput.

KT PROBLEM ANALYSIS

If that constraint behaves unexpectedly, IS/IS NOT helps identify why.

KT DECISION / PPA

Select/evaluate interventions and de-risk rollout.

29. TOC + TRIZ

WHERE TO INVENT + HOW TO BREAK THE TRADE-OFF

TOC

Focus

Identifies the one constraint where improvement matters most.

TRIZ

Invent

If improving the constraint creates a hard contradiction, use TRIZ to generate mechanisms that escape compromise.

Practical combination: TOC says where to spend inventive effort; TRIZ says how to redesign that point.
30. TOC + IDEF0 / BPMN

MODEL THE FLOW, THEN ANALYZE THE CONSTRAINT

IDEF0

Functional model

Clarifies functions, inputs, controls, outputs and mechanisms. Helps reveal overloaded/shared mechanisms.

BPMN

Process flow

Makes waits, queues, handoffs, parallel gateways and approvals visible. TOC then asks which one limits end-to-end goal throughput.

31. AI-ASSISTED TOC

LLM CAN HELP MAP THE SYSTEM; TELEMETRY MUST IDENTIFY THE REAL CONSTRAINT

MAP

Extract flow

Convert docs/traces/workflow descriptions into stage map and candidate bottlenecks.

HYPOTHESES

Suggest constraint candidates

Based on queues, dependencies, policy and rework patterns.

INTERVENTIONS

Generate exploit/subordinate/elevate options

AI can propose but must quantify expected system effect.

NO

“Looks slow” ≠ constraint

LLM should not declare bottleneck without flow evidence or experiment.

Best AI use: combine architecture map + observability data + queues/metrics, then generate a ranked constraint hypothesis with falsification tests.
32. STRUCTURED TOC CONTRACT

MAKE SYSTEM IMPROVEMENT MACHINE-READABLE

{
  "system_goal": "verified reports completed/day",
  "flow_unit": "report",
  "stages": [
    {
      "id":"research",
      "capacity_per_day":180,
      "wip":24,
      "queue_age_p95":"18m"
    },
    {
      "id":"human_review",
      "capacity_per_day":55,
      "wip":140,
      "queue_age_p95":"9h"
    }
  ],
  "constraint_candidate":"human_review",
  "evidence":[
    "queue_before_growing",
    "downstream_starved",
    "capacity_test_increases_total_output"
  ],
  "exploit_actions":[],
  "subordinate_actions":[],
  "elevate_actions":[],
  "expected_throughput_delta":null,
  "verification_plan":[]
}
KEY RULE

Candidate until tested

Constraint hypothesis should be confirmed by end-to-end behavior: if intervention there does not improve system throughput, reassess the model.

33. CONSTRAINT IDENTIFICATION CHECK

QUESTIONS FOR A SUSPECTED BOTTLENECK

QuestionWhy it matters
Does work accumulate before it?Suggests incoming demand exceeds effective processing.
Is downstream often waiting for its output?Shows stage controls supply to later work.
Does reducing its rework increase system output?Constraint capacity is being wasted.
Does adding temporary capacity improve end-to-end throughput?Strong empirical test.
Does optimizing another stage leave throughput unchanged?Supports that other stage is non-constraint.
Could a policy rather than physical capacity be limiting flow?Avoids unnecessary scale spend.
34. ANTI-PATTERNS

HOW TO DESTROY FLOW WHILE EVERY DASHBOARD LOOKS “BUSY”

OPTIMIZE EVERYWHERE
Engineering effort spreads across non-constraints.
FOCUS ON SYSTEM CONSTRAINT
100% UTILIZATION
Upstream overproduction creates huge WIP.
SUBORDINATE RELEASE
BIGGEST QUEUE = CONSTRAINT
Queue may be downstream block or batching symptom.
VERIFY FLOW CAUSALLY
SCALE FIRST
Buy capacity while scarce resource wastes time on invalid/rework jobs.
EXPLOIT BEFORE ELEVATE
LOCAL COST MINIMUM
Cheaper component creates more work at bottleneck.
SYSTEM THROUGHPUT ECONOMICS
NO WIP LIMIT
Latency/staleness grow without throughput gain.
CONTROL RELEASE
OLD CONSTRAINT FOREVER
Team keeps optimizing bottleneck after it moved.
REPEAT STEP 1
AI GUESS = BOTTLENECK
Plausible story replaces telemetry.
OBSERVE + TEST ΔTHROUGHPUT
35. PRACTICAL TOC METRICS FOR AI

THE GOAL IS USEFUL COMPLETIONS, NOT TOKENS PROCESSED

MetricUse
Verified task throughputCompleted tasks that pass acceptance per hour/day.
End-to-end cycle timeUser/job release → accepted outcome.
WIP by stageWhere unfinished work accumulates.
Queue age p95Better than queue length alone when task sizes vary.
Constraint starvationHow often scarce capacity waits for valid work.
Constraint rework rateShare of scarce capacity wasted on repeated/invalid work.
Throughput per constraint-hourUseful output normalized by scarce resource time.
ΔThroughput after interventionEmpirical confirmation that constraint hypothesis was meaningful.
36. 30-MINUTE TOC SESSION

LIGHTWEIGHT VERSION FOR A SOFTWARE TEAM

TimeAction
0–4 minDefine system boundary, goal and one throughput unit.
4–9 minMap 5–10 major stages from entry to useful completion.
9–14 minAdd capacity, WIP, queue age, rework, starvation evidence.
14–18 minSelect constraint candidate and state why it limits system throughput.
18–22 minList exploitation moves that require little/no new capacity.
22–26 minList subordination rules for upstream/downstream flow.
26–28 minIf still constrained, propose elevation options.
28–30 minDefine metric/experiment that proves total throughput improved and when to reassess the new constraint.
37. PRACTICAL WORKSHEET

COPY THIS FOR A REAL SYSTEM

TOC WORKSHEET
=======================================================

1. SYSTEM BOUNDARY
From:
→
To:
→

2. SYSTEM GOAL
→

3. THROUGHPUT UNIT
One useful completion is:
→

4. FLOW STAGES

Stage:
Capacity:
WIP:
Queue age:
Rework:
Starvation:
Notes:

(repeat)

5. CURRENT CONSTRAINT CANDIDATE
→

Evidence:
[ ] queue accumulates before
[ ] downstream starves after
[ ] resource/policy is scarce
[ ] capacity change affects total throughput
[ ] rework consumes scarce capacity
[ ] other stage optimization does not move throughput

6. EXPLOIT
How can we get more useful output
without major capacity investment?
→
→
→

7. SUBORDINATE
What must upstream stop / slow / prioritize?
→

What cheap checks should happen before constraint?
→

What downstream behavior should protect flow?
→

8. BUFFER
What should protect the constraint?
→

Target:
→

9. ELEVATE
Only if still needed:
[ ] add capacity
[ ] parallelize
[ ] automate
[ ] redesign
[ ] change policy
[ ] outsource / alternate provider

10. EXPECTED EFFECT

Baseline throughput:
→

Expected:
→

WIP:
→

Cycle time:
→

11. VERIFICATION
What experiment proves
this was the real constraint?
→

12. REPEAT
When will we re-identify the new constraint?
→
38. AI PROMPT TEMPLATE

TOC-STYLE SYSTEM ANALYSIS

You are assisting with Theory of Constraints analysis.

Do not optimize components independently.

1. Define:
   - system boundary;
   - system goal;
   - one measurable throughput unit.
2. Map the end-to-end flow from release to useful completion.
3. For each stage collect:
   capacity, WIP, queue age, rework,
   blocking, starvation and policy constraints.
4. Do not declare the slowest-looking stage a constraint.
5. Rank constraint candidates using evidence:
   - work accumulation before;
   - downstream starvation;
   - scarce/effective capacity;
   - end-to-end throughput response to capacity changes.
6. For the leading candidate propose:
   a) EXPLOIT actions first;
   b) SUBORDINATE actions second;
   c) ELEVATE only if needed.
7. Identify WIP/admission/buffer controls.
8. Estimate how each intervention affects:
   throughput, WIP, cycle time, quality,
   operating cost and secondary bottlenecks.
9. Define a falsifiable experiment:
   if this really is the constraint,
   what system-level metric should improve?
10. After improvement,
    explicitly search for the next constraint.
11. Never use “100% utilization everywhere”
    as a goal.
12. Prefer system throughput
    over local optimization.
39. PRACTICAL DECISION

WHERE TOC EARNS ITS PLACE

QuestionAnswer
Стоит ли использовать?Да. Когда есть multi-stage flow, очереди, ограниченная capacity, human review, provider quotas или recurring delivery bottlenecks.
Separate Component?N/A. Это methodology/control logic, not runtime service.
Минимум 80% ценности?Goal + throughput unit + flow map + real constraint + exploit + subordinate + elevate + verify Δthroughput + repeat.
Когда overkill?Single isolated operation without meaningful flow dependencies, simple bug, or decision where throughput is not the system objective.
Trigger?“More local capacity/optimization is not improving end-to-end completion”; “queues keep growing”; “one scarce resource governs output”.
Как измерить uplift?Verified throughput ↑, WIP ↓, cycle time ↓, constraint rework/starvation ↓, cost per useful completion stable or lower.
Можно ли использовать AI?Да. AI can map flow and propose interventions; observability and experiments must establish the actual constraint and throughput delta.
40. DESIGN RULES

THE TOC RULEBOOK

RULE 01

Define the goal first

Without system goal, “constraint” has no operational meaning.

RULE 02

Optimize throughput, not activity

Busy components are not the target.

RULE 03

One dominant constraint deserves focus

Spread improvements only after system evidence says constraint moved.

RULE 04

Exploit before scale

Remove idle/rework/setup/low-value load before buying capacity.

RULE 05

Subordinate non-constraints

Upstream should not create more WIP than constraint can convert.

RULE 06

Protect constraint with a bounded buffer

Enough work to avoid starvation, not an infinite backlog.

RULE 07

Local cost can mislead

Evaluate decisions by effect on scarce capacity and total throughput.

RULE 08

Constraint can be policy

Do not assume the answer is more hardware/people.

RULE 09

Repeat

A solved constraint creates a new system constraint.

41. FINAL MAP

TOC AS A SYSTEM IMPROVEMENT LOOP

SYSTEM
  ↓
DEFINE GOAL
  ↓
DEFINE THROUGHPUT UNIT
  ↓
MAP END-TO-END FLOW

stage A
  ↓
stage B
  ↓
stage C
  ↓
stage D
  ↓
useful completion
  ↓
MEASURE:

capacity
WIP
queue age
rework
blocking
starvation
policy constraints
  ↓
IDENTIFY CURRENT CONSTRAINT

Question:

“Which factor currently limits
the rate at which the WHOLE SYSTEM
creates goal units?”
  ↓
────────────────────────────────────
1. IDENTIFY
────────────────────────────────────

candidate must explain:

queue build-up
downstream starvation
scarcity
throughput response
  ↓
────────────────────────────────────
2. EXPLOIT
────────────────────────────────────

protect scarce capacity

remove:
  idle
  rework
  invalid input
  low-value work
  setup waste
  unnecessary switching
  ↓
────────────────────────────────────
3. SUBORDINATE
────────────────────────────────────

upstream:
  release only what flow can absorb
  apply cheap quality gates
  respect WIP limits
  prioritize goal-critical jobs

buffer:
  protect constraint
  avoid starvation
  stay bounded

downstream:
  be ready for constraint output
  ↓
────────────────────────────────────
4. ELEVATE
────────────────────────────────────

only if still needed:

add capacity
parallelize
automate
change policy
redesign
alternate provider
remove step
  ↓
MEASURE SYSTEM EFFECT

throughput ↑ ?
WIP ↓ ?
cycle time ↓ ?
rework ↓ ?
cost / useful completion acceptable?
  ↓
NO
  → constraint model may be wrong
  → reassess

YES
  ↓
────────────────────────────────────
5. REPEAT
────────────────────────────────────

the constraint moved.

find the new one.

════════════════════════════════════

AI SYSTEM EXAMPLES:

HUMAN REVIEW
  can constrain verified output

MODEL PROVIDER
  can constrain inference flow

VECTOR / RETRIEVAL
  can constrain evidence path

BROWSER SESSIONS
  can constrain action agents

EXTERNAL API QUOTA
  can constrain tool throughput

PARSER QUALITY
  can create rework that consumes QA

POLICY
  can constrain more than hardware

DEEP REASONING
  can create WIP at verifier/merge stage

════════════════════════════════════

TOC + OTHER METHODS:

TOC
  where is the leverage point?

KT
  why is that point behaving badly?

TRIZ
  how can we redesign the conflict?

IDEF0
  what functions/resources/control exist?

BPMN
  how does work actually flow?

EVALS / OBSERVABILITY
  did the change really improve the system?

════════════════════════════════════

THE CENTRAL QUESTION IS NOT:

“WHICH COMPONENT
CAN WE MAKE FASTER?”

IT IS:

“WHICH ONE CHANGE
CAN INCREASE
THE OUTPUT OF THE WHOLE SYSTEM
RIGHT NOW?”

AND THEN:

“WHAT MUST THE REST
OF THE SYSTEM STOP DOING
SO IT DOES NOT
OVERWHELM THAT CONSTRAINT?”

THAT IS THE PRACTICAL
POWER OF TOC.

ECC RETROFIT / PRACTICAL HARNESS INTEGRATION

A. Related ECC ideas. Context-as-cache, scoped memory, lifecycle hooks, selective capabilities, feature flags, deterministic enforcement, provider-neutral adapters and eval-gated learning are applied only where relevant to №80 TOC — Theory of Constraints.

B–E. Existing boundary and placement. The existing conceptual boundary, class METHODOLOGY, default N/A and owner Design-time / Problem Solving remain authoritative. Runtime/control/data/offline placement is unchanged; durable state stays outside model context.

F–H. Hooks and contracts. Use bounded PRE_MODEL/POST_MODEL, PRE_TOOL/POST_TOOL, CHECKPOINT and TASK_COMPLETED events as applicable. Illustrative fields and canonical contracts are defined in NEW_CONTRACTS_SPEC.md; no universal schema is implied.

I–J. Security and evaluation. Host-side schema, permission, secret, budget, idempotency and audit checks take precedence over LLM output. Optional mechanisms require a feature flag and WITH/WITHOUT ablation; measure quality, acceptance, correction, latency, cost, escalations and severe errors.

K–L. Task profiles and cross-references. A TaskProfile selects the relevant skill, tool/context slice, memory scope and enforcement profile independently from FAST/STANDARD/DEEP. See cross-reference map, hook spec and ablation plan. Provider adapters remain outside the core.