RFC-0008 — Autonomous PARR Completion

Status: Partially Implemented (the seven robustness fixes shipped in AIFactory; remaining autonomy gaps tracked) · Created: 2026-06-18 · Updated: 2026-06-20 · Extends: RFC-0001 (correlation key), RFC-0002 (task contract), RFC-0005 (toolchain), RFC-0006 (assurance), RFC-0007 (access) · Affects: PFactory, AIFactory, TFactory, CFactory

A team submits intent. The pipeline must return a working, tested artifact with no human in the happy path, and bounded auto-correction in the unhappy path. Human review is reserved for ambiguous intent — never for engineering mechanics the user should not have to know about. The rule carried forward from RFC-0006: never claim something works when it was never verified; this RFC adds that we must also never stall silently or escalate to a human for something the pipeline could have fixed itself.

1. The problem — the seams hold, but a human is still in the loop

On 2026-06-18 we ran the full pipeline end to end from a single brief: the OpenAPI documentation + Backstage catalog entry for a small “Task Board” service (factory-demo-taskboard). The seams held: PFactory produced a Backstage-grounded signed contract, AIFactory built the service and its web UI, TFactory independently generated a 15-file test suite and caught a real behavioural bug (the service accepted a whitespace-only title) that the build and a manual smoke test both missed.

That is the good news, and it is the point of the architecture. The bad news is that the run required a human at five separate points, none of which a real team submitting a brief would tolerate or even understand:

# What stopped the run Class Who should handle it
1 AIFactory QA agent (gemini CLI) hung 300s ×3, escalated to human_review execution / provider auto: bounded retry + failover
2 CLAUDE_CODE_OAUTH_TOKEN expired → 401, build produced nothing infra / credential auto: pre-flight + non-expiring key
3 Build had no runnable entrypoint (app assembled only in test fixtures) planning gap auto: implicit-requirement + smoke-boot
4 TFactory test-validation env had no pytest → unbounded replan loop execution / env auto: runner deps + replan cap
5 TFactory review-phase agent exited silently; status hung at reviewing orchestration auto: liveness watchdog

Every one of these was recoverable, and the pipeline did the honest thing in the sense that it never shipped anything broken — it escalated or stalled. But escalation-to-human and silent-stall are not the same as autonomous completion. This RFC closes the gap between “never ships garbage” and “delivers a working artifact without supervision”.

2. The reframe — complete the plan the user did not know to write

The deepest finding is not any single bug. It is that users describe an idea, not an implementation. “A task board” implies — to any engineer — a service that starts, declares its dependencies, passes a health check, and is deployable. The user never writes those acceptance criteria, so today nothing demands them, so the gate cannot enforce them, so the build can satisfy every stated criterion and still not run.

The pipeline’s job is therefore not only to check the plan the user wrote, but to complete it with the implicit engineering requirements the domain implies — and then hold the build to them automatically.

3. The fixes, by stage

3.1 PFactory — intent becomes a complete contract

3.2 AIFactory — code and verify

3.3 TFactory — independent gate, and the loop must close itself

3.4 CFactory — make the stall visible

4. The honesty rule, extended

RFC-0006 forbids overclaiming verification. RFC-0008 adds two siblings:

  1. No silent stall. A task that stops making progress must surface as failed or recovering, never sit indefinitely in a non-terminal phase.
  2. No human for mechanics. Escalating to a human for something the pipeline could deterministically detect and fix (missing entrypoint, missing dep, expired token, hung provider) is a defect, not a feature. Human review is for ambiguous intent only.

5. Rollout order

Highest leverage first — the subset that would have made the demo run hands-off:

  1. 3.3a + 3.3b (TFactory runner deps + replan cap / watchdog) — unblocks the most expensive failure (the infinite loop and the silent stall).
  2. 3.2d (QA smoke-boot) — turns “passes tests but does not run” into an auto-caught, auto-fixed defect.
  3. 3.1 (implicit-requirements enrichment) — so the runnable-artifact requirement exists at plan time.
  4. 3.2a/3.2b/3.2c/3.2f (auth pre-flight, non-expiring key, failover, deps).
  5. 3.3c + 3.3d + 3.2e (browser routing, autonomous handback, auto-repair).
  6. 3.4 (CFactory liveness signal).

6. Acceptance

The same brief (factory-demo-taskboard) re-run from intent produces a merged, running, browser-verified service with no human intervention, and any induced failure (revoke a token, break a dependency, hang a provider) is detected and either auto-recovered or surfaced as a named failure within a bounded time — never a silent stall, never a human asked to supply a main.py.