Skip to content

Accountability infrastructure for autonomous engineering

DoneState documentation

Guides, concepts, complete references, security boundaries, and operating help.

Hosted liveSource

DoneState docs / Maintenance

Maintain selected repositories without turning discovery into authority

Maintenance is the repository-oriented workflow for recurring inspection and explicitly eligible PR-only repair. Discovery can record evidence; it does not automatically authorise code changes.

1. Select a repository

observe
DoneState can register the repository and discover bounded findings but cannot use that selection as PR-only repair authority.
pr_only
The selected GitHub App installation may be used for bounded branch and pull-request work. It still does not grant merge authority.
Example MCP request shape
select_maintenance_repository({
  repository: "owner/repository",
  defaultBranch: "main",
  mode: "observe",
  scheduleEnabled: false,
  autoRepair: false,
  requiredCheckNames: []
})

2. Discover maintenance work

discover_maintenance_work reads two evidence sources: explicitly labeled donestate:repair issues and recent failing GitHub Actions runs.

They are intentionally not equivalent. A labeled issue can be repair-eligible. A failed workflow is recorded as evidence only; DoneState does not infer repair authority from a red CI badge.

  1. 01

    Discover

    Call discover_maintenance_work for one selected repository.
  2. 02

    Inspect

    Use list_maintenance_findings and inspect the source, repair eligibility, state, and repository before taking action.
  3. 03

    Start only an eligible finding

    Pass the exact finding digest to start_maintenance_repair.

3. PR-only repair lifecycle

  1. 01

    Claim one finding

    The finding is durably associated with one run so duplicate repair attempts do not silently race each other.
  2. 02

    Pin the repository subject

    DoneState resolves the selected default branch to an exact base commit before execution.
  3. 03

    Execute within the maintenance policy

    The repair uses bounded local work, validation, commit, push, pull-request, and secret-access authority required by the maintenance path.
  4. 04

    Require exact CI evidence

    Configured required checks are part of the verification requirement for automatic maintenance.
  5. 05

    Stop for independent verification

    The resulting maintenance run remains separate from the owner's merge decision and requires OpsTruth verification.

Scheduled maintenance

Scheduling is repository-specific and bounded. Enabling a schedule does not turn every failure into an autonomous change. The repository's selected mode, installation, automatic-repair flag, required checks, and finding eligibility still apply on every sweep.

Related documentation