PPromptReports
Use cases/Incident to policy

Incident to policy

Partly builtLDG-2276RepoOpsPromptComputeContextFile

A bad outcome already starts a lesson. Lessons that propose a policy change are still to build.

Use case

Incident to policy: a workflow across RepoOps, PromptCompute, ContextFile that starts from an incident closes in RepoOps, or an approved action turns out badly.

Who would use it

Builders and whoever is on call.

What value it provides

The lesson from an incident proposes a policy change, publishes a new context version that agents read, and gets a drill to prove it holds.

Why it matters to the user

Each incident makes the next one less likely, and you can show which lessons have a check behind them.

The problem

Postmortems produce lessons that nobody enforces, so the same error comes back.

Expected outcomes

  • Lessons with a check (PromptCompute's own brain: 16 of 21 on 2026-11-07)
  • Errors that came back after a lesson
  • Days from incident to enforced policy

Each run records its outcome as met, not met or not measured.

How it runs

1. Open a lesson candidate from the incidentRepoOpsBuilt
2. File it for review (propose_brain_entry)RepoOpsBuilt
3. Propose the policy change the lesson impliesPromptComputePlanned
4. Publish a new context version with the lessonContextFileBuilt
5. Run the new rule in a shadow test firstPromptComputeBuilt
6. A person promotes the lessonPromptComputeBuilt

Products and connections

ProductRole in this workflowDocs
RepoOpsOpen a lesson candidate from the incident; File it for review (propose_brain_entry)Reference · RepoOps docs
PromptComputePropose the policy change the lesson implies; Run the new rule in a shadow test first; A person promotes the lessonReference · PromptCompute docs
ContextFilePublish a new context version with the lessonReference · ContextFile docs

Outside the family: GitHub.

What a person approves

ActionDefault risk
memory.lesson.promotemedium
memory.agentmd.publishmedium

Action keys are from the PromptCompute catalog.

How to access it from an agent

An agent will run this workflow through the PromptReports MCP server or API, with an ID agent token. The runner will then call each product for it. Proposed

// MCP: https://mcp.promptreports.ai/mcp (Proposed)
start_run({
  workflow: "incident-to-policy",
  inputs: { "incident": "INC-311", "repo": "northwind/api" },
  dry_run: false
})
// returns { run_id, status: "running", approvals_url }
get_run({ run_id })   // poll, or subscribe to run events
curl -X POST https://api.promptreports.ai/v1/runs \
  -H "Authorization: Bearer $PROMPTREPORTS_AGENT_TOKEN" \
  -d '{"workflow":"incident-to-policy"}'

Or call the products yourself, step by step:

ProductEndpointTools
RepoOpshttps://mcp.repoops.ai/mcpsearch_brain get_pre_edit_context propose_brain_entry get_incident_attribution
PromptComputehttps://mcp.promptcompute.ai/mcprequest_approval get_approval cancel_approval answer_approver
ContextFileBuiltto confirm

Set it up

  1. Sign in at app.promptreports.ai with PromptReports ID, and pick your org.
  2. Connect RepoOps, PromptCompute, ContextFile on the Connections page. Link GitHub through the product that uses it.
  3. Register the agent that will run it on the Agents page, and give it a version manifest.
  4. Set the approval policy for memory.lesson.promote, memory.agentmd.publish. Start with Require approval; critical actions are never auto.
  5. Fill in the inputs (Incident, Repo) and choose the trigger: an incident closes in RepoOps, or an approved action turns out badly.
  6. Start a dry run. It will count no workflow request, and it shows which steps would record missing evidence.
  7. Start the run. Approve each gate in the approvals inbox, then read the signed record when it ends.