plateprocess.dev · PLATE release v0.12.0

Autonomous Plate Engine

Autonomous PLATE Engine & Scheduled Procedures — Design Spec

Problem

PLATE's core promise is "humans keep judgment, agents do the toil." Current autonomy is partial and fragmented:

The result: PLATE can be driven autonomously today with host loops (/loop, babysit watch, Grok scheduler tools) + the plate persona + MCP tools, but it is not self-driving at the user's budgeted token rate for very long periods with graduated risk tolerance and built-in recurring work. This Epic is the heart of the PLATE vision — turning the methodology + core software into a reliable, observable, low-touch autonomous engine that users love.

Vision (from interactive planning)

Constraints

Design Decision

1. .plate autonomy section (config surface)

Add to schema (plate_config.py + DEFAULT_CONFIG + validation/migration):

{
  "autonomy": {
    "enabled": true,
    "risk_tolerance": "medium",
    "token_budget": {
      "daily": 50000,
      "per_cycle": 8000,
      "action": "throttle"
    },
    "cost_ceiling_usd": 10.0,
    "schedules_enabled": true,
    "loop": {
      "default_sleep_seconds": 300,
      "max_cycles": null
    }
  }
}

2. Risk tolerance matrix (MVP, adopted exactly from planning)

Tolerance Auto-merge PRs Babysit auto-apply Audits / drift plan_epic auto-stubs Scheduled procedures Delegation scope Notes
off None (manual) None (manual review) dry_run default Never None (manual only) Standard Explicit disable of autonomous features. This replaces the old need for deleting the AUTONOMOUS_MODE marker file.
low risk:low (config-driven; guards still apply) Safe suggestions only dry_run default Explicit only Only if declared risk:low Standard + quiet loops Entry-level autonomous; equivalent to old "AUTONOMOUS_MODE present + risk:low" but now expressed in .plate
medium risk:low + risk:medium Medium-safe + thread resolve apply ok for medium Limited (high-confidence only) Procedures <= medium Broader autonomous agents Balanced default for most teams
high risk:low/medium/high (never critical) Broad (still respect suggestion safety) apply for non-critical Yes, from Goals + audit (stubs carry need:refinement) Procedures <= high Full (within budget) "Low touch" single-knob experience

Critical always human: Any change touching AGENTS.md, SPEC.md, .github/CODEOWNERS/workflows, credentials/secrets/auth, or carrying risk:critical or need:human-review requires explicit human action (Task or review). Governor and risk checks are enforced in enforce_budget + decide_next.

3. Token budget governor (full core enforcement)

The refined acceptance criteria for this Design (from #472) are documented in the GitHub issue. They emphasize the ideal contract shapes, methods, safety, quiet rules, procedures, and observability as described in the planning. See https://github.com/akasper/plate/issues/472 for the full refined ACs. Implementation in subsequent Features may note deviations with justification.

4. First-class AutonomyEngine runtime

New src/plate_core/autonomy.py (orchestrator.py) with:

@dataclass
class AutonomyStatus: ...
@dataclass
class ProjectSnapshot: ...
@dataclass
class CycleReport: ...
@dataclass
class ProcedureDef: ...

class AutonomyEngine:
    def __init__(self, plate_config: PlateConfig, gh_client=None): ...
    def get_status(self) -> AutonomyStatus: ...
    def introspect(self) -> ProjectSnapshot: ...
    def enforce_budget(self, estimated: int, action_kind: str) -> bool: ...
    def decide_next(self, snapshot: ProjectSnapshot) -> list[Action]: ...
    def run_cycle(self, *, dry_run: bool = False, max_steps: int | None = None) -> CycleReport: ...
    def run_procedure(self, proc_id: str, *, dry_run: bool = False) -> ProcedureRunReport: ...
    def tick_schedules(self) -> list[ProcedureRunReport]: ...
    # helpers for host loop integration

MCP tools (registered in mcp_server.py):

CLI (cli.py): gh plate autonomy status|run|loop --loop --max-cycles N --dry-run --budget-override ...

gh plate autonomy run --loop implements the persistent driver: read config, instantiate engine, while within budget and no external stop: report = engine.run_cycle(); emit terse bullet summary; sleep(configured or host-provided jitter).

Host integration: Grok TUI scheduler tools, /loop, Copilot equivalents simply invoke the CLI or MCP in their cadence. No host changes required for basic use.

5. Data-driven procedures (new .agentic/procedures/)

Directory + files (parallel to unreleased fragments):

.agentic/procedures/nightly-drift-detection.json (or .yml):

{
  "id": "nightly-drift-detection",
  "cadence": "nightly",
  "risk_level": "medium",
  "description": "Compare live labels, wiki/Goals, .agentic/ fragments, health, and .plate against expected; surface drift as Audit or Question issues.",
  "steps": [
    {"tool": "plate_perform_information_audit", "args": {"scope": "repo", "dry_run": false}, "apply_if_risk_ok": true},
    {"tool": "plate_health", "args": {}},
    {"action": "compare_and_propose_drift_issues"}
  ],
  "log_to": ".agentic/autonomy/runs/",
  "max_tokens_per_run": 12000,
  "enabled": true,
  "requires": ["goals_page_present"]
}

Built-ins (MVP, shipped in core/template): nightly-drift-detection, nightly-info-audit, feedback-integration (babysit-all for PLATE_PR_FEEDBACK_AGENTS), cost-rollup, release-readiness-scan, stale-branch-cleanup, goals-refresh, binary-hygiene-audit, contemplation-backlog-sweep.

Engine tick_schedules (called from run_cycle or dedicated scheduled tick): enumerate due procedures (simple "nightly" resolution or cronparse for advanced), filter by risk_tolerance, execute via allow-listed dispatch, record markers + costs, write run log.

Users add/override in their repo; extensions can contribute via the existing extension manifest + .plate.installed mechanism (new contribution key allowed under the autonomy extension rules).

Logging: every run appends a structured <!-- PLATE-PROCEDURE-RUN:BEGIN ... --> comment (on a standing "Autonomy" Discussion in Ideas, on the Epic, or in .agentic/autonomy/runs/<date>-<id>.md committed on next human PR or by a maintenance procedure). Always includes usage block.

6. Observability & "users love it" surfaces

These directly address the prioritized love factors: budget governor visible, single risk knob, magical recurring procedures, visible autopilot %.

7. Integration & evolution points

8. Safety, rollback, human override

Alternatives Rejected

Alternative Why Rejected
Keep everything in persona prose + host scheduler only (no new core AutonomyEngine) Violates the explicit request for "core software that introspects on project state and delegates to agents"; misses budget governor and first-class procedures.
Full external daemon or new hosted service Breaks "GitHub is the single source of truth" and "lightweight / no new external services" constraints.
Allow-list every possible MCP call for procedures without risk gating Too dangerous; would let high-tolerance users accidentally run destructive or high-cost things.
Replace risk:* labels with only config Labels are stable metadata and already used in templates/workflows; config + labels together is the right split.
Hard real-time cron inside plate-core MCP/CLI are the portable surfaces; host schedulers + GitHub scheduled workflows are the right triggers. Engine provides the "what to do" and "can I afford it".

Artifact

Open Questions (to be refined in child Research/Design stubs)

Acceptance Evidence

Proving tests (per test-classification convention): unit coverage of governor, procedure dispatch, risk filtering, budget pause paths; e2e that exercises a simulated multi-cycle run under budget constraint without human input; health + status surface tests.

This design directly realizes the interactive planning consensus: full governor in core, new AutonomyEngine class + MCP/CLI, data-driven procedures under .agentic/procedures/, adopted risk matrix, prioritized love features (budget visibility, single risk knob, recurring magic, autopilot score), and the full interactive planning + creation flow used to birth the Epic.


Planning provenance: Interactive Q&A (two rounds) via Grok Build TUI on the plate repository. Consensus captured: title, risk model, full governor, AutonomyEngine shape + surfaces, procedures schema + built-ins, child list, "create Epic + stubs in session" flow, dogfood fragments. All per PLATE AGENTS.md (Design artifact here, GitHub Epic as traceable issue artifact, fragments for process change, human judgment preserved).

Usage Note (for this planning session)

This design + the subsequent GitHub Epic/child creation constitute the traceable artifact for the planning work. No Feature or Question was closed in this session, so no USAGE REPORT block is required on an issue closure; the design doc and Epic body serve as the record. Future implementation children will carry proper usage blocks on their closures.

Implementation Status (after autonomous slices for #473/#474/#478/#482)