At 09:29 I notice the word “tomorrow” in an announcement about a meeting taking place today. I fix it and press Save. Meanwhile another perfectly sensible part of the program is watching the clock. At 09:30 it will pick up the post and send it to two channels. Which words will readers see? I used to be quite happy with the requirement “The author can edit a scheduled post.” You can build a button from that sentence. Try settling the argument between those two clocks.
Take my editorial desk. I am the customer, the author of the offending sentence and the person who will have to explain it. It makes for an acceptance committee that is easy to convene and rather difficult to impress. Here is what belongs in a specification before I hand this job to a developer or an agent.
When the author can still change their mind
The product owner makes the first decision. Until a worker claims the post, the author can replace the text and keep the time and both destinations. Once an attempt begins for either destination, freeze that edition. Correcting a published message is a separate action with a history of its own. Otherwise the same revision number will stand for two different messages. Good luck asking the person on call which one a reader saw.
That leaves four things worth naming. The material records what we are writing. A revision holds the exact words. A delivery job binds a revision to a time and a destination. A receipt records the external message ID when the destination acknowledges the request. A missing MAX receipt says nothing about whether Telegram accepted its copy. Acknowledgement by either platform says nothing about who read it.
Two tabs and one alarm clock
Both tabs open revision seven. In the first I correct the meeting date and get revision eight. A minute later I use the second tab to fix a surname. If the server simply keeps the last body it receives, my wrong meeting date comes back. A save request therefore carries the revision number I actually saw. On a conflict the form retains what I typed and tells me that the source changed. I can compare the two. Automatically merging two dates is a remarkably efficient way to schedule a third.
The other race is between an author and a worker. Saving the eighth edition and replacing its pending jobs must succeed together. Imagine pulling the plug halfway through: either the old text survives with its jobs, or the new text survives with its jobs. A reassuring Save confirmation with the old edition still queued is particularly unpleasant. I close the tab thinking the problem is solved.
| Time in the example | What the author sees | What an acceptance test checks |
|---|---|---|
| 09:28, both tabs open | Revision 7, two destinations | One pending job per destination |
| 09:29, first edit saved | Revision 8, same time | Both old jobs retired, both new jobs point to 8 |
| 09:29, second tab saves | Conflict, typed surname still in the form | Revision 8 remains queued |
| 09:30, first platform acknowledges | A receipt for this destination | The other destination can be reconciled separately |
How long should Save take?
I once thought “saves quickly” was a perfectly decent requirement, too. Try accepting it. An example target might be a p95 below 500 ms from the server receiving the request to confirming durable storage. In plain English, at least 95 percent of measured requests must finish within the limit. Suppose we agree on two concurrent editors, 4 KB posts, a running queue and a thousand saves after warm-up. Record conflicts, errors and the slowest successful response separately. These are proposed test conditions. They are not measured production performance.
The browser gives us a different number: time from clicking Save to seeing confirmation, including the network and rendering. If we measure only the server and announce that the user is happy, the word “user” may be their only contribution to the report.
The assignment I would give an engineer
| Situation | What the person should see | System invariant |
|---|---|---|
| Edit a queued post | New revision saved; queue updated | One pending delivery per selected destination of the current revision |
| Two tabs edit simultaneously | A conflict; entered wording remains available | No silent overwrite of somebody else’s revision |
| Dispatch has started | Editing is temporarily rejected | Bytes in flight cannot change |
| Delete | Material moves to trash | Pending delivery is cancelled atomically |
| Restore | Wording and history return | The old queue does not restart |
| Failure after a platform request | Outcome is unknown | No blind retry creating a duplicate |
An invariant is a condition that must remain true across every permitted state transition. “Deleted material cannot be claimed by the dispatcher” is one. The server enforces it; hiding a button is insufficient. A direct API request must not bypass the rule.
Functional requirements explain behavior. Nonfunctional requirements define its quality: edits survive a restart; only the owner has access; conflicts are found before text is lost; the journal records the revision; recovery is exercised from a backup. If we need a numerical latency target, we agree it against workload and infrastructure rather than adding an ornamental availability percentage.
Next I separate verification levels. A unit test explores state transitions. An integration test opens a real database, restarts a process and checks the saved revision. HTTP checks exercise login and reject changes without a session. Finally, I use the interface and deliver to a test channel: button wording, readability and actual delivery are also product requirements.
These checks complement one another. A green storage test does not prove that an editor can be closed on a phone. A beautiful screenshot does not prove that wording survives a restart. I want evidence for the specific claim we intend to make.
What I give the agent
The task retains the user’s goal, initial state, permitted transitions, access constraints, acceptance criteria, test data and an explicit boundary around unrelated changes. In this case the main channel was protected: testing in a separate channel and moving the editor were allowed; enabling production distribution was not.
Decomposition follows risk: storage and atomicity first, API next, then the interface and complete user journey. Acceptance identifies an exact revision. When code changes, evidence for the previous revision does not automatically become evidence for the next.
I use the same discipline in skills for LAF, my autonomous development framework. Instead of “be an excellent analyst,” I ask: “show the transitions, demonstrate preservation, identify what remains untested.” Less theatre, better chances of receiving a usable product the following morning.
Try adding one bad outcome to an existing requirement. Not just “the user saved,” but “the user saved at the same time as dispatch.” If that changes the architecture, you discovered a valuable question before an incident. That is precisely why analytical work matters to me.
Vladimir Lovtsov, Director of Project Portfolio Management
Related Articles
Everyone is busy, nothing moves: planning with real constraints
Three developers are free on Tuesday. On Thursday I have one analyst for four hours. Two teams have already promised Friday releases to their customers. Assume everyone is telling the…
10+ projects and one weekend: my autonomous development framework
I have more than ten personal projects. I also have a job, a family, two children and a persistent suspicion that the next calendar update will not include a third weekend day.
An AI agent you can answer for: requirements, workflows and production boundaries
How I built a Telegram agent in a day: deterministic workflows, an optional LLM, approvals, APIs and delivery. Python and LangGraph examples, observability, tests and an enterprise comparison.