feat(workflows,subagents): progress consumers — loop ledger + attention input (V8, #2489) - #2518
Conversation
The V8 loop-until-done consumer added progress_scoring and progress_repeats inputs. The bundled slash-command completion metadata and the workflows doc table still listed only prompt and max_iterations, so /workflow completions omitted the new inputs and builtin-workflows-builtin-index-manifest-01 failed its mirror assertion.
| // `result_path` below carries it for callers that want the contents. | ||
| outputMode: "file-only", | ||
| }); | ||
| const result = `${final.text ? `${final.text.trimEnd()}\n\n` : ""}${formatProgressReport(report)}\n`; |
There was a problem hiding this comment.
Completion artifact omits returned progress report
On the completed path, completion-summary writes result_path before this code appends the progress curve, final trend, and disclaimer to result. Callers therefore receive a complete returned result but read only the terminal completion text from the documented artifact path. Write the composed result back to resultPath, or include the appendix before the completion task writes the artifact.
Artifacts
Focused done-decision runtime harness source
- The authored Vitest harness drives the loop through a done evaluation, progress scoring, completion artifact write, and comparison of returned text with result_path; it provides the reproducible test setup.
Returned result and result_path comparison from the executed harness
- The executed harness captured a returned result containing curve, final trend, and disclaimer while the completion artifact contains only the terminal report; the appendix is absent from result_path.
Focused runtime harness pass log
- Vitest ran the focused done-decision harness successfully from /home/user/repo with exit code 0; the behavior is reproducibly confirmed.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/workflows/builtin/loop-until-done-runner.ts
Line: 243
Comment:
**Completion artifact omits returned progress report**
On the completed path, `completion-summary` writes `result_path` before this code appends the progress curve, final trend, and disclaimer to `result`. Callers therefore receive a complete returned result but read only the terminal completion text from the documented artifact path. Write the composed result back to `resultPath`, or include the appendix before the completion task writes the artifact.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| "canceled", | ||
| "aborted", | ||
| "stopped", | ||
| "terminated", | ||
| ]); |
There was a problem hiding this comment.
AST guard uses ambiguous types
The new AST traversal represents parser nodes through broad unknown values and an unknown index signature, forfeiting useful static checks and making future changes to this source guard more error-prone.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/unit/subagents-progress-attention.test.ts
Line: 61-65
Comment:
**AST guard uses ambiguous types**
The new AST traversal represents parser nodes through broad `unknown` values and an `unknown` index signature, forfeiting useful static checks and making future changes to this source guard more error-prone.
**Context Used:** AGENTS.md ([source](https://github.com/bastani-inc/atomic/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Slice V8 of the LLM-as-a-Verifier adoption program (
specs/2026-08-17-progress-scoring.md§5.2): the two consumers of the progress-scoring module.score_progresscall over the iteration-summary prefix (repeats 1);{iteration, score, trend}appended to the loop ledger; the stop/exhaustion report gains the score curve, final trend, and an advisory disclaimer. The stop condition is unchanged — thedoneboolean and iteration cap decide exactly as before, proven by byte-identical stop decisions with scoring enabled vs disabled.classify_trendduplicated as a tiny pure helper inpackages/subagents(mirrored table tests in both packages keep the copies honest); score series arrives via the existing control-config surface; a regressing/flat-low trend may raise attention priority beside the wall-clock signals — it can never mark a run failed, never suppresses a wall-clock signal, and the subagents runtime schedules no model calls of its own.loop-until-donesynced to the new inputs.Base:
verifier/progress-scoring(V7, #2514). Stack: V1 → V3 → V7 → V8.Evidence
Produced by an implement→review→repair goal run (approved turn 1; completion/evidence/risk reviewers all
complete;remaining_work: none):npm run check— green (includes the coding-agent tsgoerasableSyntaxOnlypass)TrendResultpackages/workflows/CHANGELOG.mdandpackages/subagents/CHANGELOG.mdunder## [Unreleased]### AddedSpec contract:
specs/2026-08-17-progress-scoring.md§5.2 (Q2: iteration-summary prefix; Q3: minimal subagent shape).Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
This change adds advisory progress scoring to
loop-until-doneand lets progress trends increase subagent attention without changing terminal outcomes. The completed-loop report is inconsistent: callers receive the progress curve, trend, and disclaimer in the returned result, but the documentedresult_pathfile omits them. Update the completion artifact to contain the same complete report before merging.Confidence Score: 4/5
Not safe to merge until the completion artifact preserves the full report returned to workflow callers.
A focused runtime test exercised the completed loop path and directly showed that the returned report and its documented artifact differ. The remaining comment enforces the repository's static typing requirement for the source guard.
Files Needing Attention:
packages/workflows/builtin/loop-until-done-runner.tsneeds to persist the composed report atresult_path;test/unit/subagents-progress-attention.test.tsneeds a more precise AST node representation.What T-Rex did
Comments Outside Diff (1)
General comment
result, but the documentedresult_pathartifact contains only the completion-summary stage text. The runtime harness observed all three markers present inresultand absent fromresult_path.completion-summarywritesresultPathbefore line 243 constructs the appendedresult; the appended string is returned but never written back toresultPath.resultPath(or make the completion-summary stage produce the same appendix before it writes the artifact), then return it consistently.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "merge origin/main" | Re-trigger Greptile
Context used: