|
| 1 | +# [Proposal] Add a low-cost scaffold review workflow based on run logs |
| 2 | + |
| 3 | +## Background |
| 4 | + |
| 5 | +As projects like `humanize` grow into real-world agent scaffolds, more contributors will naturally add new features, roles, and workflows. The hard part is not making changes — it is evaluating whether those changes actually improve the system. |
| 6 | + |
| 7 | +One natural idea is to build a CI-like check that runs scaffold changes against “real” development workloads. But there are two practical issues: |
| 8 | + |
| 9 | +1. It is hard to choose workloads that are genuinely representative. |
| 10 | +2. If the workloads are large and realistic, the token cost becomes too high for frequent evaluation. |
| 11 | + |
| 12 | +I think there is a useful reframing here: instead of treating scaffold changes purely as “prompt/agent capability tweaks,” we can evaluate them as an **organizational design** problem. |
| 13 | + |
| 14 | +In other words, the key question is not just “is this scaffold more sophisticated?” but: |
| 15 | + |
| 16 | +- Does it fit the actual task distribution? |
| 17 | +- Does it improve information flow and decision flow? |
| 18 | +- Does it reduce coordination friction such as repeated search, repeated review, and repeated trial-and-error? |
| 19 | +- Does it help the system surface failures earlier and reuse successful patterns more reliably? |
| 20 | + |
| 21 | +I would summarize this evaluation lens into four dimensions: |
| 22 | + |
| 23 | +- **Fit**: does the scaffold match the real task mix? |
| 24 | +- **Flow**: are information flow, decision flow, and handoffs working well? |
| 25 | +- **Friction**: where are we wasting effort through loops, queues, or duplicate work? |
| 26 | +- **Feedback**: are failures caught early, and are wins made reusable? |
| 27 | + |
| 28 | +The benefit of this framing is that it does not require a giant “real benchmark” every time. It lets us use existing run logs as evidence to continuously diagnose whether the scaffold design is improving or regressing. |
| 29 | + |
| 30 | +## Proposed change |
| 31 | + |
| 32 | +I would suggest adding a **low-cost periodic scaffold review workflow** on top of the existing logging / trace system, starting with a lightweight v1. |
| 33 | + |
| 34 | +### 1. Make runs traceable to scaffold versions |
| 35 | + |
| 36 | +Each run should retain at least: |
| 37 | + |
| 38 | +- `session_id` |
| 39 | +- `scaffold_version` |
| 40 | +- `model_version` |
| 41 | +- `task_id` |
| 42 | +- `task_slice` |
| 43 | +- `budget` |
| 44 | +- `events[]` (for example plan / search / read / edit / test / review / stop / handoff) |
| 45 | +- `outcome` (success / failure / false finish / human takeover) |
| 46 | +- `artifacts` (diff / test result / review comments) |
| 47 | + |
| 48 | +The most important point is: **logs must be attributable to a specific scaffold version**. Otherwise the analysis can describe symptoms, but not attribute them to a concrete change. |
| 49 | + |
| 50 | +### 2. Run cheap metric screening daily |
| 51 | + |
| 52 | +Do not send full logs to a strong model by default. First run programmatic metrics over all runs, for example: |
| 53 | + |
| 54 | +- `success@budget` |
| 55 | +- `tokens_per_success` |
| 56 | +- `false_finish_rate` |
| 57 | +- `human_takeover_rate` |
| 58 | +- `search_steps_before_first_edit` |
| 59 | +- `review_loop_count` |
| 60 | +- repeated reads of the same file / repeated execution of the same failing command |
| 61 | + |
| 62 | +The goal here is not to generate recommendations yet. It is to answer: **did the scaffold actually get worse, or did the task mix change?** |
| 63 | + |
| 64 | +### 3. Sample weekly instead of reviewing all raw logs |
| 65 | + |
| 66 | +To control cost, do stratified sampling over outcomes and task types — for example 20–40 sessions covering: |
| 67 | + |
| 68 | +- cheap successes |
| 69 | +- expensive successes |
| 70 | +- cheap failures |
| 71 | +- expensive failures |
| 72 | +- false finishes |
| 73 | +- human takeovers |
| 74 | + |
| 75 | +This is much cheaper and usually more stable than feeding an entire week of raw logs into a model. |
| 76 | + |
| 77 | +### 4. Generate Trace Cards before higher-level review |
| 78 | + |
| 79 | +Use a cheap or local model to compress each sampled session into a structured `Trace Card`, keeping only: |
| 80 | + |
| 81 | +- what the task was |
| 82 | +- which scaffold phases were used |
| 83 | +- where the run started to drift |
| 84 | +- which actions added value |
| 85 | +- which actions were pure waste |
| 86 | +- whether verification was sufficient |
| 87 | +- the most likely failure tag |
| 88 | +- short evidence references |
| 89 | + |
| 90 | +Then let a stronger model review only: |
| 91 | + |
| 92 | +- metric summaries |
| 93 | +- Trace Cards |
| 94 | +- the current scaffold spec |
| 95 | +- the previous review report |
| 96 | + |
| 97 | +instead of full raw logs. |
| 98 | + |
| 99 | +### 5. Constrain review output into falsifiable experiment proposals |
| 100 | + |
| 101 | +Each weekly review should produce at most 1–3 proposed changes, and every proposal should map explicitly to: |
| 102 | + |
| 103 | +- one failure mode |
| 104 | +- one scaffold module |
| 105 | +- one expected improvement metric |
| 106 | +- one low-cost falsification test |
| 107 | + |
| 108 | +For example: |
| 109 | + |
| 110 | +- skip reviewer for `small-fix` |
| 111 | +- target module: `review_trigger_policy` |
| 112 | +- expected gain: lower `tokens_per_success` and latency |
| 113 | +- risk: missing subtle regressions |
| 114 | +- validation: one-week A/B test with `false_finish_rate` as guardrail |
| 115 | + |
| 116 | +If a recommendation cannot be written in this format, it is probably still an observation rather than an actionable change. |
| 117 | + |
| 118 | +## Why this seems useful |
| 119 | + |
| 120 | +I think this workflow would help `humanize` in four ways: |
| 121 | + |
| 122 | +1. **It evaluates the whole scaffold, not just model capability.** |
| 123 | +2. **It scales better as more contributors propose changes.** |
| 124 | +3. **It controls token cost by reviewing compressed evidence instead of raw logs.** |
| 125 | +4. **It creates a tighter learning loop by turning suggestions into small experiments.** |
| 126 | + |
| 127 | +## A minimal first version |
| 128 | + |
| 129 | +If this should start small, I would begin with just three things: |
| 130 | + |
| 131 | +1. add `scaffold_version`, `task_slice`, `outcome`, `budget`, and `events` to the log schema; |
| 132 | +2. add a script or workflow that generates `weekly_scaffold_review.md`; |
| 133 | +3. define a minimal `failure taxonomy` and `Trace Card` schema. |
| 134 | + |
| 135 | +That alone would already move the discussion from subjective impressions toward low-cost, evidence-based scaffold diagnosis. |
| 136 | + |
| 137 | +If this direction sounds useful, I would be happy to help sketch a more concrete v1, such as: |
| 138 | + |
| 139 | +- a `Trace Card` schema |
| 140 | +- a first-pass `failure taxonomy` |
| 141 | +- a `weekly_scaffold_review.md` template |
| 142 | +- a constrained reviewer prompt structure |
0 commit comments