Framework 01
The 4-Question Scoping Doc
The doc I write before touching code on any new deployment. Four questions that force clarity on what you're actually building, for whom, and what failure looks like — before a line of code exists.
Who is the user on the other side?
Not the persona. Not the demographic. The actual person who will use this system at 9am on a Tuesday when they're tired and have three other things open. Are they a domain expert using a tool, or a non-technical operator running a pipeline? Do they trust computers or do they fight them? What do they do when something goes wrong — do they escalate, restart, or give up?
This question sounds obvious. It almost never gets answered completely before code is written. The OmmSai Tkinter GUI exists because I answered it: charity volunteers at an event venue, not engineers, running on Windows laptops without a terminal. A CLI would have failed at the first error message.
What's the worst-case failure mode?
Not the happy path. Not the edge case you've already thought of. The worst case: what happens when this system fails in a way you didn't design for? Who gets hurt, and how badly?
For OmmSai: worst-case was the system silently producing wrong medication dosages with high confidence. For the agentic document review system: worst-case was a partial report that looked complete — some chunks processed, some missing, the CSV report rendered anyway. For the trading automation: worst-case is a misinterpreted command that submits the wrong order against a real account.
The worst case is not a list of error codes. It's a failure scenario with a human consequence. Name it before you write the first function. It will change what you build.
What does 'good enough' look like to the customer?
Not 'done'. Not 'perfect'. Good enough. The threshold at which the customer's problem is solved well enough that they don't need to go back to the old way.
This question has two parts: the explicit answer (what the customer says) and the real answer (what you observe when you watch them work). They're often different. The explicit answer for the prescription pipeline was '15,000 PDFs processed.' The real answer, discovered by watching volunteers use it, was: 'the system tells me when it's stuck, not just when it's done.'
Good enough is also a time constraint. A system that's 95% reliable in 48 hours beats a system that's 99.9% reliable in 3 weeks when the event is tomorrow.
What part of this can I not build?
Every deployment has a constraint you can't engineer around. Naming it early is the difference between a scoped delivery and a scope spiral.
For the agentic document review: I could not build OCR. Scanned PDFs were explicitly out of scope because the existing Kendra index was built on digital-text documents, and OCR would have changed the error profile of the entire system. Naming this in the TID before the first Sprint prevented three weeks of 'but what about the scanned docs' conversations.
For OmmSai: I could not build fine-tuning on a 48-hour timeline with no budget. The answer to 'what about illegible handwriting' was the confidence-threshold human review queue — not a better model.
The constraint you name becomes a decision. The constraint you don't name becomes a blocker.
When to use it
Before any new customer engagement, any new AI feature, any new system with real users. Takes 30 minutes to write. Saves weeks of rework. The TID for the PPD Document Review system started with these four questions — the architecture decisions that followed were direct answers to them.