← Commit history
README.md+2−2
@@ -1,6 +1,6 @@ # AI Flow -**Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.** The AI thinks its way from parts placement through routing, copper pours, current and thermal analysis to a delivered video. The binary does the fast, deterministic parts of every step, hands back hints written for an AI, and keeps a ledger of every turn, every return to an earlier step, and the clock from your prompt to "done". One flow, one clock, one file, so Claude, Codex and any other engine are compared on the same thing.+**Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.** The AI thinks its way from parts placement through routing, copper pours, current and thermal analysis to a delivered video. The binary does the fast, deterministic parts of every step, hands back hints written for an AI, and keeps a ledger of every turn, every return to an earlier step, and the AI's time from your prompt to "done" (sessions, one per prompt, the idle cut out; docs/time.md). One flow, one clock, one file, so Claude, Codex and any other engine are compared on the same thing.  ``` adom-wiki pkg install adom/adom-aiflow@@ -81,7 +81,7 @@ Every answer is `OK:` or `ERROR:` followed by `Hint:` lines about this board, th  ## The ledger: how a run is measured -The number is the wall clock from the human's prompt to the AI saying "done, here is your video". The cost per step is the AI's thinking, not the binary's seconds: deterministic code is fast, the AI thinking its way through a board is slow, and that is what the chart shows.+The number is the AI's time from the human's prompt to the AI saying "done, here is your video": the sum of the run's sessions (one per human prompt, prompt to done) with every idle gap over 15 minutes cut out, so a night's sleep between two prompts is not charged to the AI (docs/time.md). The cost per step is the AI's thinking, not the binary's seconds: deterministic code is fast, the AI thinking its way through a board is slow, and that is what the chart shows.  `run.jsonl` is append-only, one JSON line per event, never rewritten: 
SKILL.md+4
@@ -24,6 +24,10 @@ The flow is a file, `flows/board.json`: the steps in order (intake, models, plac 7. **`measure`**: KiCad's filled copper per layer, the ablation metric. **`analyze current`** and **`analyze thermal`**: IPC-2221 on the narrowest conductor of every loaded net, pour and via capacity, copper and vias at every hot tab. A loaded net whose pads all sit on one poured outer layer is carried by that layer's pour; its vias only spread heat. Hot parts take a theta ceiling (`maxThetaCPerW`) or a rise budget (`hotMaxRiseC` spec-wide, `maxRiseC` per part) against the stated watts, so write the dissipation physically (I2R at the hot Rds(on) over the conduction duty, plus switching) and say so in the spec. A FAIL names the net or part and the fix; fix it (pours, vias, widths, or placement), land, measure and analyze again. 8. **`finish`**, then **`deliver --video <mp4> --message "..."`**: `finish` refuses until the gate passed, routing and pours landed, copper measured, both analyses passed, and the live board validates at 0 unconnected with no new errors. Then it stamps the end and writes the summary: minutes from the prompt, minutes per stage, decisions, copper, live DRC. Add your token and dollar accounting to the manifest under `tokens` and `usd`. +## Time: sessions, not the wall clock++The AI's time on a run is the sum of its sessions: one per human prompt, from the prompt to the AI's done, with idle gaps (over 15 min, no command running) cut out. The first prompt is `start --prompt-time`; every follow-up prompt is `prompt --text "..."` (`--at <time>` when you start late); the answer's end is `done --message "..."` (`deliver` is the done of the first task). Say `done` the moment an answer is complete, so nothing idle is charged; work after a done with no `prompt` mark is listed as an unmarked follow-up, one row per idle gap. The delivery number on the page is the AI time from the first prompt to `deliver`; follow-ups have their own rows. `sessions` prints the table. The per-step table and the video's run clock ("AI TIME, THIS RUN") count active seconds only.+ ## Capture, so the engines' videos line up  One clip per step. `capture open` puts the board on the test box; from then on every `step <name>` stops the previous step's clip and starts this step's own window recording, tagged with the step, and its hint says what that clip should show (the flow file's `record` line: the parts landing for placement, the nets landing for routing, the pours filling for pours, the return to an earlier step when an analysis fails). `deliver` lists the clips. The final video is cut from them, one segment per step, so two engines' videos line up step for step, and the page can show a little clip beside every step's numbers.
bin/adom-aiflow
⋯ 1 unchanged line ⋯
docs/time.mdadded+11
@@ -0,0 +1,11 @@+# 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.
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.1.15",+  "version": "0.1.16",   "title": "AI Flow",   "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad today; Altium, Fusion and Adom's own web apps next.",   "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
page.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-aiflow",   "type": "app",-  "version": "0.1.15",+  "version": "0.1.16",   "title": "AI Flow",   "description": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. One Rust binary with a crate per step (placement helpers, a grid router with Kelvin taps, pours with keepouts, KiCad's DRC gate, live landing through the KiCad Bridge, copper measurement, current and thermal analysis) and a finish line that refuses an unfinished board. Every command answers with hints for the AI; every turn, its thinking time and every rework loop go into run.jsonl, so Claude, Codex and any other engine are compared on the same flow. KiCad today; Altium, Fusion and Adom's own web apps next.",   "summary": "Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board. The AI thinks its way from placement through routing, pours, current and thermal analysis to a delivered video; the binary does the fast, deterministic parts of every step, hands back hints, and keeps a ledger of every turn, every return to an earlier step, and the clock from the prompt to done.",
skills/adom-aiflow/SKILL.md+4
@@ -24,6 +24,10 @@ The flow is a file, `flows/board.json`: the steps in order (intake, models, plac 7. **`measure`**: KiCad's filled copper per layer, the ablation metric. **`analyze current`** and **`analyze thermal`**: IPC-2221 on the narrowest conductor of every loaded net, pour and via capacity, copper and vias at every hot tab. A loaded net whose pads all sit on one poured outer layer is carried by that layer's pour; its vias only spread heat. Hot parts take a theta ceiling (`maxThetaCPerW`) or a rise budget (`hotMaxRiseC` spec-wide, `maxRiseC` per part) against the stated watts, so write the dissipation physically (I2R at the hot Rds(on) over the conduction duty, plus switching) and say so in the spec. A FAIL names the net or part and the fix; fix it (pours, vias, widths, or placement), land, measure and analyze again. 8. **`finish`**, then **`deliver --video <mp4> --message "..."`**: `finish` refuses until the gate passed, routing and pours landed, copper measured, both analyses passed, and the live board validates at 0 unconnected with no new errors. Then it stamps the end and writes the summary: minutes from the prompt, minutes per stage, decisions, copper, live DRC. Add your token and dollar accounting to the manifest under `tokens` and `usd`. +## Time: sessions, not the wall clock++The AI's time on a run is the sum of its sessions: one per human prompt, from the prompt to the AI's done, with idle gaps (over 15 min, no command running) cut out. The first prompt is `start --prompt-time`; every follow-up prompt is `prompt --text "..."` (`--at <time>` when you start late); the answer's end is `done --message "..."` (`deliver` is the done of the first task). Say `done` the moment an answer is complete, so nothing idle is charged; work after a done with no `prompt` mark is listed as an unmarked follow-up, one row per idle gap. The delivery number on the page is the AI time from the first prompt to `deliver`; follow-ups have their own rows. `sessions` prints the table. The per-step table and the video's run clock ("AI TIME, THIS RUN") count active seconds only.+ ## Capture, so the engines' videos line up  One clip per step. `capture open` puts the board on the test box; from then on every `step <name>` stops the previous step's clip and starts this step's own window recording, tagged with the step, and its hint says what that clip should show (the flow file's `record` line: the parts landing for placement, the nets landing for routing, the pours filling for pours, the return to an earlier step when an analysis fails). `deliver` lists the clips. The final video is cut from them, one segment per step, so two engines' videos line up step for step, and the page can show a little clip beside every step's numbers.
skills/aiflow-measurement/SKILL.md+4
@@ -45,3 +45,7 @@ Neither engine can see its own token bill reliably, so the binary reads what the ## Cost, two ways  Each engine writes its token counts and the dollar figure at API rates into run.json (`tokens.in`, `tokens.out`, `usd.api`). The chart shows that figure, which is what commercial users on API plans pay, and beside it the same figure divided by 20 (`usd.plan20x`), which is the real cost on a 20x subscription plan. Both lines, always; neither alone tells the story.++## Sessions (2026-09-15)++The clock of record is AI time, not wall time: the sum of the run's sessions (a human prompt to the AI's done) with idle gaps over 15 min cut out. Mark follow-up prompts with `prompt --text` and answers with `done --message`; `deliver` closes the first task. The benchmark is the AI time from the first prompt to `deliver`. docs/time.md on the page has the rules.