Task — engineering-spec@1

Outer loop - propose skill amendments from run evidence

doneTASK-IMP-110
module improvement · class product · priority p1 · created 2026-07-17 · shipped null
depends on none · blocks none

TASK-IMP-110: Outer loop - propose skill amendments from run evidence

Summary

Every ingredient of a learning loop exists and nothing consumes them: human verdicts at two gates, routed_back_count, route-back reasons, memory.status_overridden, retrospectives, reconcile reports. All written down, none read back. Add a workflow-improver skill that reads the last N runs' evidence and proposes skill-amendment@1 records - landed as DRAFT tasks, never applied directly.

Problem

This run proves the gap twice over. An external reviewer found the same defect class - a spec promise with no implementation under it - in three consecutive rounds, and a human noticed the pattern, not the system. Every correction the operator made across five batches ("drop section 4", "gate depends_on", "fix IMP-19 now") lives in a gate log, not in a skill. The next run re-derives them or does not.

TASK-IMP-028 (ACE-style skill curation loop) has been in the backlog as a stub since 2026-07-08 - filed, never authored. The idea was ours before it was the article's; what is missing is the authoring.

Proposed Solution

workflow-improver reads a bounded window of run evidence - gate logs, route-back reasons, status_overridden rows, reconcile reports - clusters recurring shapes, and emits at most three skill-amendment@1 proposals per run: which skill, which passage, what evidence (quoted rows with ids), what changes. Each lands as a DRAFT task through create-tasks. It never edits a skill.

The cap is deliberate. An improver that proposes twenty amendments produces a review nobody does, and an unreviewed amendment to a skill is worse than no amendment - it is doctrine nobody agreed to.

Alternatives Considered

Success Metrics

Scope

In scope: the workflow-improver skill, the skill-amendment@1 shape, the evidence readers, suite arms.

Out of scope / Non-Goals

Dependencies

None mechanically. Consumes artefacts that exist.

Serialisation note: touches build.sh (shared with TASK-IMP-111 - both extend VENDORED_SKILLS). Parent-serialised per §11a.

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

§1 - Verdict summary

Spec is 92 lines, 7 §1 clauses, 7 ACs, 5 edge cases. Authors the loop TASK-IMP-028 reserved on 2026-07-08 and never specified. Passes after 7 findings.

§2 - Findings (all resolved)

ISS-001 - Gate logs are model-written prose - untrusted input

An improver that quotes evidence into a command is an injection path through our own artefacts. Resolved: §3 security-class requires verbatim reproduction with ids, no interpolation, and relUnderRoot confinement - the TASK-IMP-100 rung-5 rule.

ISS-002 - Applying amendments directly would delete the human-accepts premise

The article's outer agent opens a PR against its own skill; our doctrine says a human accepts every change, and a skill edit is a doctrine change. Resolved: §1 #1.4 forbids writing modules/; §1 #1.5 lands proposals as draft tasks; AC 4 asserts modules/ byte-identical after a run.

ISS-003 - An unbounded proposal count produces a review nobody does

An unreviewed amendment to a skill is doctrine nobody agreed to. Resolved: §1 #1.2 caps at 3; AC 3 asserts 8 patterns yield exactly 3, highest-evidence first.

ISS-004 - A single occurrence is an anecdote, not a pattern

Proposing from one event manufactures doctrine from noise. Resolved: §1 #1.3 requires >=2 independent evidence rows; AC 2 asserts the single-occurrence case yields nothing.

ISS-005 - A clean window could be padded to the cap

An improver that must always find three findings will invent the third. Resolved: §1 #1.6 requires reporting no proposal and emitting nothing; AC 5 asserts silence.

ISS-006 - TASK-IMP-028 would become a silent duplicate

Two tasks for one idea, the older left as a stub nobody closes. Resolved: §1 #1.7 requires flipping 028 to duplicate with a resolving duplicate_of (FM-113); AC 7 covers it.

ISS-007 - Confidence-thresholded auto-apply was tempting and is wrong

Confidence is the model's opinion of itself - precisely what the two-gate design exists not to trust. Resolved: recorded in Alternatives as rejected.

§3 - Resolution

All 7 concerns addressed. The machine floor (task-lint) ran FIRST and was clean before any judgment family was applied, per TASK-IMP-084. Score = 10/10.


End of TASK-IMP-110 audit.