← The Machine Room · Case File 001 — ProcessOS Running · --:--:-- GST · Sheet 1 of 7
CASE FILE · PROCESSOS · CONSULTING / DEVTOOLS DWG NO. AH-CS-001

ProcessOS turns a five-minute intake into a Big-Four-grade consulting document. In under ninety seconds, gated.

A schema-first document machine for consulting agencies: five AI agents plan, draft, examine, refine and verify — and a deterministic quality gate refuses anything that scores under 80.

INTAKE · 8 FIELDS · 5 MIN
→ PLAN → GENERATE → REVIEW → REFINE → VERIFY
→ PRINT-PERFECT PDF · WORD · REVIEW PORTAL

10× FASTER THAN MANUAL DRAFTING — CLAIMED,
OWNER BASELINE 4–8 H PER DOCUMENT
90s
HARD CEILING, INTAKE → GATED DOCUMENT
ENFORCED IN CODE  VERIFIED
Drawn byAbu Huraira Mukhtar
RoleArchitect & Lead Engineer · Solo
Build window2026-03 → 2026-06 · 3.5 MO
Scale5 MIN : 90 S
ClientWithheld · Shown anonymized
StatusWorking product · Pre-deploy
Source61,469 LOC · 325 Files
Sheet1 of 7
SHEET 2 OF 7 · ABSTRACTGENERAL NOTES APPLY

01 · The intake is the product

A consultant fills eight fields — organisation, department, process, roles, steps, systems, KPIs. That is the entire ask.

Everything after the intake is the machine's problem. It plans the document, writes it as structure rather than prose — twenty-seven typed block kinds, one schema — examines the result against a six-category rubric, refines what failed, verifies what passed, and typesets the survivor to print-perfect A4, editable Word, and a live review portal with annotations, approval chains and e-signatures.

The consultant's hour moves from formatting to judgement: read, adjust, send. The client stops receiving attachments and starts receiving a document that knows who read it, who approved it, and which version is real.

GENERAL NOTES
1 · ONE SCHEMA — 27 BLOCK TYPES RENDER TO BROWSER, PDF & WORD VERIFIED
2 · 22 PRISMA MODELS · 50 API ROUTES · 116 LIB MODULES
3 · NEXT.JS · POSTGRES · CLAUDE + 7 MORE PROVIDERS, ROUTED PER AGENT
4 · 142 LOGGED DECISIONS, GOTCHAS & DEVIATIONS
SHEET 3 OF 7 · FIELD NOTESTHE BEFORE-STATE

02 · Where documents go to die

Somewhere tonight a consultant is saving final_v7_FINAL.pdf and hoping the name is true.

The SOP took two days to fight into shape in Word. It left as an email attachment the client cannot annotate, so feedback is arriving as eleven reply-alls. Nobody can say which version was approved, or whether anyone read past page four. And the hundredth document no longer looks like the first — the house style a consulting brand sells is quietly drifting away, one deliverable at a time.

This loop is the before-state ProcessOS was built against: four to eight hours of production per document, compressed to under an hour of review. FIG. 1 shows the loop as observed. It has no exit.

OBSERVED
VERSION OF RECORD — UNKNOWN
FEEDBACK CHANNEL — REPLY-ALL
HOUSE STYLE — DRIFTING
BASELINE 4–8 H / DOC CLAIMED
WORD · 2 DAYS OF FORMATTING PDF · V7_FINAL EMAIL · ATTACHMENT REPLY-ALL × 11 APPROVED VERSION: UNKNOWN — THE LOOP RETURNS TO WORD
FIG. 1 — THE MANUAL LOOP, AS OBSERVEDSCALE — ONE DELIVERABLE : 4–8 H
SHEET 4 OF 7 · SECTION A-ACUT THROUGH THE RUNNING MACHINE

03 · Five agents, one gate, no mercy

INTAKE · 8 FIELDS · 5 MIN PLAN PLANNERAGENT GENERATE TYPED BLOCKS · NOT PROSE REVIEW · SCORE ×6 81 / B 100 / A+ LLM JUDGE — ADVISORY ONLY ≥80 THE GATE REFINE — FIX FLAGGED ISSUES, GO AGAIN VERIFY → SHIP INTAKE → GATED DOCUMENT · 90 S HARD TIMEOUT · COST TRACKED IN CENTS
FIG. 2 — SECTION A-A · GENERATION PIPELINE V2SSE STREAM — EVERY BEAT IS A REAL EVENT
PHASE 1 · DOCUMENTPLAN

1Plan

PlannerAgent reads the eight fields and returns a plan — sections, estimated block count. Seconds in, the document has a skeleton and the machine knows the shape of what it owes you.

PHASE 2 · 27 BLOCK TYPES · ONE SCHEMA

2Generate

GeneratorAgent writes the full document as structure, not prose — RACI tables, step lists, KPI grids, risk heat-maps, sign-off blocks. One typed schema renders everywhere: browser, PDF, Word. Nothing is a wall of text that happens to look like a table.

PHASE 3 · TWO EXAMINERS, ONE VERDICT THAT COUNTS

3Review

A deterministic scorer grades six categories — structure, content, logic, compliance, style, domain. An LLM judge reads alongside with a senior-partner rubric, and stays advisory only, by decision. The number that gates is the number you can reproduce.

PHASE 4 · 81 → 100

4Refine

Below 80, nothing ships. RefinerAgent fixes what the examiners flagged and the draft goes back for re-review. The dashed loop is the whole product: quality is a gate, not a hope. The same loop you saw running on the tile.

PHASE 5 · 90 S CEILING · FALLBACK BUILT IN

5Verify & ship

Cross-references repaired, micro-typography applied, diagrams validated — broken ones auto-fixed by a cheap model routed just for that. Then the paginator lays it out print-perfect and the cover page slides out of the machine. If anything overruns ninety seconds, a simpler pipeline takes over. The consultant always gets a document.

DETAIL B · SEE FIG. 2, REVIEW

The judge that was refused a gavel

The tempting design: let the LLM judge the LLM and gate on its opinion. It demos beautifully and audits terribly.

Chose a deterministic six-category scorer as the only release gate, judge advisory — because a gate must be reproducible and arguable line-by-line. Cost: a hand-tuned rubric and a less flashy number. Revisit when the judge is human-calibrated: κ ≥ 0.5 across 50 rated documents — until then no customer ever sees an AI-invented score.
DETAIL C · SEE FIG. 2, VERIFY

Pagination as an optimization problem

CSS page-breaks cannot hold a Big-Four A4 layout — widowed headings, split tables, ragged fills. Most tools punt here.

Chose a Knuth-line-breaking-inspired DP optimizer — five block classes, keep-with-next chains, glue-stretch whitespace, two-pass re-pagination on measured drift — because "authority on sight" is the product's core promise and print is where consulting documents live. Cost: the deepest complexity budget in the repo. Result: 28-page live doc at A+, 91% median fill, zero warnings. VERIFIED
SHEET 5 OF 7 · REVISION HISTORYALL ENTRIES TRACEABLE

04 · What broke, by revision

Real drawings carry a revision table because real machines break. So does this one.

Every row below is traceable to a commit or a logged decision. The pattern across them: when something broke, the fix was fewer paths and harder gates — never a patch on top of the wound.

REV
DATE
WHAT BROKE
THE FIX
TRACE
A
2026-04
IMPORTThe importer had three paths. The middle one — "AI-reconciled" — injected a Source Content Reconciliation section into client deliverables. Developer language, in a document a client signs.
FEWER PATHSDeleted the path entirely. Import became binary: accept AI enhancement at ≥94 preservation with zero missing segments, or fall back to a deterministic baseline that maps every source element by construction. Nothing is silently dropped.
COMMIT 7F77A44 · ADR-069/072/073
B
2026-05
EXPORTCSS page-breaks could not hold consulting-grade A4 — widowed headings, split RACI tables, pages ending at 60% fill.
OPTIMIZE, DON'T HINTReplaced hints with the Knuth-inspired DP paginator (DETAIL C). Page layout became a solved optimization, not a browser suggestion.
DECISION-036
C
2026-05
EXPORTEstimated block heights drifted from rendered reality; long documents accumulated the error and overfilled late pages.
MEASURE, THEN COMMITTwo-pass re-pagination: render, measure actual heights, re-run the optimizer on measured truth. Median page fill 91%, zero fill warnings on the 28-page reference doc.
DECISION-039
D
2026-06
HONESTYThe six-category score was uncalibrated against human judgement — and marketing wanted to print it.
WITHHELDThresholds explicitly marked uncalibrated; no customer-visible quality score ships until κ ≥ 0.5 across ≥50 human-rated documents. The impressive number waits for the boring proof.
PRODUCT PLAN · STATE.MD

One more thing a skeptic would ask, answered before the interview: there is no unit-test suite. Verification is nine end-to-end script harnesses — PDF rendering, import preservation, contrast, calibration — run against a real database, plus seed documents rejected below a 90 score. On a three-month solo build I chose breadth of working machine over depth of test pyramid, and I schedule that debt rather than deny it.

VERIFICATION
9 SCRIPT HARNESSES · E2E
SEEDS GATED AT ≥90
UNIT TESTS — 0 · STATED, NOT HIDDEN
SHEET 6 OF 7 · APPROVAL PLATEPROVENANCE ON EVERY NUMBER

05 · Stamped, measured, shipped

90 sGeneration ceiling, enforced in code — on failure a simpler pipeline still deliversVERIFIED
≥ 80Deterministic six-category gate every document must pass before it existsVERIFIED · MECHANISM
27Typed block kinds, one schema — browser, print-perfect PDF and Word from a single sourceVERIFIED
100%Source preserved on import — AI enhancement accepted at ≥94 with zero missing segments, else deterministic fallbackVERIFIED
28 ppReference document rendered at grade A+, 91% median page fill, zero warningsVERIFIED
10×Faster than manual drafting, against a 4–8 hour owner-estimated baselineCLAIMED
SPECIMEN — "EMPLOYEE ONBOARDING PROCESS," DEMO CORP · SYNTHETIC SEED, DRAWN TO SCALE — THE REAL RENDER IS 22 PAGES, GRADE A+
DEMO CORP
STANDARD OPERATING PROCEDURE
EMPLOYEE ONBOARDING
COVER
CONTENTS
02 / 22
EXECUTIVE SUMMARY
03 / 22
RACI MATRIX
07 / 22
STEP LIST · 6 ROLES
11 / 22
KPI GRID
16 / 22
SIGN-OFF
APPROVAL CHAIN · E-SIGNATURE
QR VERIFICATION → /VERIFY
22 / 22
EVERY PAGE ABOVE IS A BLOCK TYPE FROM FIG. 2 — SAME SCHEMA, TYPESET BY THE PAGINATOR OF DETAIL C · CLIENT DOCUMENTS CANNOT BE SHOWN; THIS ONE WAS GROWN FOR DISPLAY

What the numbers mean for an agency: the four-to-eight hours a consultant spent fighting Word becomes an hour of judgement, the brand's hundredth document looks exactly like its first, and "did the client approve v7?" becomes a question the system answers with a hash, a signature and a timestamp.

Discuss a system like this →
SHEET 7 OF 7 · CLOSE-OUTPLAIN VOICE

06 · What the drawing doesn't show

A dossier this tidy hides the true shape of a build, so here is the untidy part, plainly.

The hardest engineering wasn't the agents — it was refusing what agents make easy. The quality score demos beautifully; it stays internal until it's calibrated against human judgement, because a consulting product that shows clients an unvalidated number has already broken its promise. The flashy path was always available. The defensible one shipped.

The ops story is honestly unfinished: no CI, no hosted deploy, magic-link auth only. It is a working machine, not yet a production service — this page claims the first and not the second. What it proved is the part I sell: that a solo builder with a schema, a gate and a decision log can compress a consulting agency's most expensive habit by an order of magnitude, and document every trade-off on the way.

UNRESOLVED
CALIBRATION — κ ≥ 0.5 · 50 DOCS · PENDING
CI & DEPLOY — SCHEDULED DEBT
EPICS 13–17, 19–22 — DRAWN, NOT BUILT
DRAWN & BUILT BY
ABU HURAIRA MUKHTAR · SOLO · 2026-03 → 2026-06
A. H. M.
SHEET 7 OF 7
END OF CASE FILE 001
THE DRAWING OFFICE · AFTER HOURS

The machine you just read is running tonight.

Bring the process that eats your team's evenings. The intake takes five minutes — the same eight fields you saw on sheet 4 — and the conversation costs nothing but the coffee.

Start a conversation → ← Back to the machine room
NEXT CASE FILE · 002 KorCRM — the agency that runs itself → SHEET 1 OF 6