Files
archie/docs/prds/self-development-loop.md
T
sam dd57e6563a docs: use active voice across rules, docs and prompts
Fix every Google.Passive finding in the tracked tree: 161 reports across 24 files, including the AGENTS.md symlink duplicate. Vale at suggestion level now reports none. Every rule, invariant, prompt instruction, placeholder and technical claim is preserved.
2026-11-24 03:42:29 +11:00

72 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Self-development loop: archie develops its own codebase
**Status:** Decided, not yet built (2026-11-03, sam) **Scope:** how archie
keeps developing archie-core itself. This file records a
desired state, not an implementation or a product. Nothing below exists unless
the "Built today" section says so. Epic #1769 tracks the plan, with child
issues #1770–#1775. This file is a record, not a mechanism: agents only see what
is in their context, so verify every claim here against the code before acting
on it. Where they disagree, the code wins. The boundary below is load-bearing
only where the code enforces it (the gate, access control, the daemon's git
monopoly) and only where `AGENTS.md` states it. Everywhere else this file is a
pointer.
## Built today
The machinery the loop will reuse exists. It includes the shipped
triage/implement/pr-review workflows and the adversarial self-review stage before
a PR opens (epic #1348, closed). It also includes the prbench judge for review
quality with its acceptance bar, canary releases judged on the installed release
(releaseupdate), and the curator engine. What does not exist is the loop itself:
no self-intake curator, no automatic run for approved issues, no judge for
diffs, no outcome distillation, no canary routing specific to self-directed
changes.
## Decision
Archie improves its own codebase through a closed loop, built in stages:
1. **Self-intake** (#1770): a curator pass reads run outcomes, step transcripts,
gate failures and alerts, dedupes against open issues, and files new issues.
Archie files its own work; the maintainer approves priority.
2. **Approved-issue loop** (#1771): an approved issue runs the shipped
triage/implement workflows end to end. The workflow makes a read-only plan
and a gated build, then runs the adversarial self-review; the daemon commits
and opens a green PR. The maintainer still merges at this stage.
3. **Implementation judge** (#1772): the prbench judge pattern scores diffs,
calibrated against the maintainer's merge decisions. Automatic merge applies
only when the gate is green, the review stage is clean, and the judge is above
the calibrated bar.
4. **Outcome distillation** (#1773): a curator turns merged-run postmortems into
proposals for the repo's agent instructions. The maintainer adds each
proposal only because it changes a decision, and removes rules that stop
changing decisions.
5. **Canary** (#1774): self-directed changes ship through the canary release
window, and the canary verdict on the installed release gates their
promotion. Rollback is a plain revert, because every self-directed change is
one gated commit.
## Boundary
Enforcement lives in the code, never in the prompt (#1775). Archie may propose
changes to the commit gate, the invariants in `AGENTS.md`, access control and
grant scoping, the daemon-only git path, and webhook HMAC verification. It never
merges them; those changes require a maintainer merge. Everything else
(workflows, curators, memory, docs, the dashboard) is fair game for the loop.
## Why
Self-improvement degrades when it relies on the model choosing to follow rules.
The model can argue with a prompt, not with gates, scoped grants or the daemon's
monopoly on git. Keeping quality measurable is what lets the loop widen without
turning the codebase to garbage: a judge bar and a canary verdict as numbers,
and tests guarding the protected seams.
## Consequences
- One issue to one small PR applies doubly to self-directed work. Past about 100
lines or any new mechanism, the change stops and reassesses.
- Every self-directed commit cites the issue that authorised it.
- Rule proposals from the distillation curator must name the run that triggered
them, and `AGENTS.md` stays short enough to read in full every session.