--- name: look-back-effort-accounting description: > Weigh completed agent-assisted software work after it ships. Produces an anonymized human-effort-equivalent activity measure, cleanup credit, attended wall-clock, agent labor when available, and calibration rows for later forecasts. Use for retrospective accounting, not prediction or valuation. --- # Look-Back Effort Accounting (public draft) Measure a completed git range or finished run. This is a retrospective activity-volume model: it estimates how much implementation work the delivered change represents under a consistent set of coefficients. It does **not** measure business value, code quality, developer worth, dollars saved, or what a team “should” have taken. Lines changed are a size proxy, not an outcome. ## Credit and adaptation This draft descends from [Todd Saunders’s public `/cost-estimate` prompt](https://x.com/toddsaunders/status/2029594318361571497): lines of code plus complexity translated into senior-developer hours. I first used it publicly on March 5, 2026 with both hours and dollar return-on-investment framing. This version changes the purpose and mechanics: - retrospective activity accounting rather than replacement-cost valuation; - hours only, with no dollar or return-on-investment claim; - a small five-tier file model; - deletions reported as separate cleanup credit; - attended wall-clock kept separate from summed agent labor; - anonymized ledger rows feeding a separate forward-estimation draft. The current fork retires the dollar layer and keeps the hours-only accounting skeleton. Julien Barbier’s later open-source [`/cost-estimate`](https://github.com/jbarbier/claude-code-cost-estimate) is a parallel expansion of Todd’s idea, not the direct parent of this fork. The adaptations and any mistakes here are mine. ## Inputs Collect: 1. a closed git range; 2. per-file insertions and deletions with rename detection; 3. session start and verified finish; 4. summed worker durations, if the harness exposes them; 5. completed task count and task types; 6. exclusions for generated, vendored, lock, snapshot, and minified files. Do not publish repository names, branches, home paths, emails, account names, customer data, or raw agent transcripts. ## Real coefficients used by this draft These are the current coefficients from one personal workflow. They are knobs, not validated industry constants. | Tier | Category | Examples | Human-equivalent rate | |------|----------|----------|----------------------:| | T1 | Trivial | Config, boilerplate, CI configuration | 60 lines/hour | | T2 | Low | Simple UI, tests, docs, routine scripts | 35 lines/hour | | T3 | Medium | Business logic, data access, API integration | 22 lines/hour | | T4 | High | Architecture, migrations, state machines | 14 lines/hour | | T5 | Specialist | Parsers, compilers, systems, cryptography, GPU | 10 lines/hour | Deletion-only cleanup is credited separately at **120 deleted lines/hour**. For the companion forward forecast, the current anonymized trace calibration uses an overall human-equivalent → attended-agent coefficient of **43.3×** for the window **2026-06-17 through 2026-07-14**. Do not apply that coefficient to someone else’s workflow without collecting local actuals. ## File classification Use the file’s responsibility, not merely its extension. | Signal | Starting tier | |--------|---------------| | Configuration, manifests, simple generated-adjacent edits | T1 | | Tests, documentation, simple views, routine scripts | T2 | | Services, repositories, controllers, transformations | T3 | | Schemas, migrations, protocol boundaries, state machines | T4 | | Parsers, compilers, system extensions, cryptography, GPU code | T5 | When uncertain, round up one tier and record the judgment. ## Calculation For each included file: ```text creation_h = inserted_lines / tier_rate ``` Across the range: ```text human_equivalent_h = Σ creation_h cleanup_credit_h = total_included_deletions / 120 attended_wall_h = verified_finish - attended_start agent_labor_h = Σ worker durations # only when measured ``` Keep all four values separate. In particular, do not blend cleanup credit into the insertion-derived headline and do not call summed parallel labor “wall-clock.” Optional descriptive ratios: ```text attended_multiplier = human_equivalent_h / attended_wall_h labor_multiplier = human_equivalent_h / agent_labor_h ``` These ratios are diagnostics for the observed run. They are not general claims about agent productivity. ## Required output ```markdown ## Look-back: [anonymized run description] Range: [start]..[end] Tasks completed: N Commits: N | +X inserted | -Y deleted | Z files | Tier | Files | Insertions | Rate | Human-eq h | |------|------:|-----------:|-----:|-----------:| | T1 | ... | ... | 60 | ... | | ... | ... | ... | ... | ... | | **Total** | **N** | **X** | | **H.H** | Cleanup credit: D / 120 = C.C h (reported separately) Attended wall-clock: W.W h (measured | reconstructed | assumed) Agent labor: A.A h (measured | unavailable) Interpretation: activity-volume proxy only; not value, quality, savings, or a universal speed claim. ``` ## Ledger row Append an anonymized row to a private ledger: ```json { "id": "anon-001", "work_type": "chore", "tasks_completed": 4, "insertions": 1100, "deletions": 40, "human_equivalent_h": 36.2, "cleanup_credit_h": 0.33, "attended_wall_h": 0.42, "agent_labor_h": 0.90, "walltime_source": "measured", "rates_version": "personal-v1" } ``` The public artifact may contain rounded aggregates. The private ledger should retain enough provenance to recompute the result. ## Guardrails - Exclude generated and vendored material, but retain an auditable exclusion count. - Use rename-aware git statistics so moves are not counted twice. - Do not infer active human attention from the first and last commit alone. - Record failed attempts and rework when the trace supports it. - Treat zero-line work items as missing size data, not zero effort. - Label reconstructed or assumed clocks; do not present them as measured. - Keep forecasting in the companion forward skill so hindsight does not leak into a supposedly prospective estimate. - Revisit the coefficients as the model, harness, repository, and working style change. ## Closing the loop Compare the completed result with the forecast recorded before execution: ```text schedule_error = actual_attended_wall_h / forecast_schedule_wall_h labor_error = actual_agent_labor_h / forecast_agent_labor_h human_eq_error = actual_human_equivalent_h / forecast_human_equivalent_h ``` Keep the misses. A calibration that remembers only favorable runs is a story, not an estimate. --- *Portable draft · real coefficients from one anonymized personal workflow · retrospective activity accounting, not valuation*