main
History Download
John Lauer Release 0.1.27: native rule preservation, router and evidence gates, measured external work and reviewed component overview da373cf 18d ago

How adom-aiflow measures the AI's time (John, 2026-09-15)

The number we want is how long the AI ran on a task, not how long the wall clock ran while the human slept. A run is a set of sessions, one per human prompt, and the AI's time is the sum of its active spans.

  • A session starts at a human prompt. The first is the start command's --prompt-time (the paste time of the first prompt). Every follow-up prompt ("add the walkthroughs", "recut the video") is adom-aiflow prompt --text "..." (--at when you start late).
  • A session ends at the AI's done. adom-aiflow done --message "..." the moment the answer to that prompt is complete. deliver is the done of the first task ("done, here is your video").
  • Idle is cut out. Inside a session, a gap longer than idleMinutes (15 by default, in run.json) between two ledger events with no command running is the human away, not the AI thinking; it is subtracted. A command that runs for an hour (a landing) is not idle: its turn to turn-end covers the gap. A command that died without a turn-end covers up to the next event only.
  • Unmarked follow-ups still count right. Work after a done with no prompt mark becomes its own row ("follow-up, no prompt mark"), and every idle gap inside it starts another row, since a gap there is most likely a new prompt. The row says to mark next time.
  • The benchmark number is the AI time from the first prompt to deliver: the delivery figure on the run page and the chart. Follow-up sessions are listed under Sessions with their own minutes; none of them are in the delivery number.
  • Everything else follows the AI's time. The per-step table counts only active seconds. The video's run clock ("AI TIME, THIS RUN") is the active seconds from the first prompt to the clip, so a walkthrough recorded the next morning reads as minute 60, not hour 10. A clip recorded entirely while the human was away (a recorder left on) is left out of the video.
  • adom-aiflow sessions prints the table; --json gives the spans.

External work and unknown gaps

Wrap actual external work with adom-aiflow --ai-thread "<thread>" --run <run> exec -- <program> <args>. The child inherits the terminal, its success or failure is recorded, and the full running interval is measured, including commands longer than the idle threshold. Use it for builds, browser automation, CAD generation and wiki operations. Do not run a heartbeat while idle.

A long interval without ledger events is unobserved, not proof the human was away. Session reports label these excluded intervals explicitly; the legacy JSON idleMinutes field remains for compatibility, alongside unobservedMinutes. Existing delivery timestamps and ledger events are never rewritten. Historical reports with unwrapped external work can undercount AI activity. Do not claim harness-complete measurement or invent retrospective times.

Custom manual stages default to AI. take custom-stage=ai or take custom-stage=binary records an explicit owner.