Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/admin/keys-and-permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Key secrets are shown when created or regenerated. Store them in a secret manage
| Issues | `issues:read`, `issues:create`, `issues:close` |
| Audits | `audits:read`, `audits:write` |
| Policies | `policies:read`, `policies:write`, `policies:pull` |
| Code fixes | `code_fixes:read`, `code_fixes:write` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocker The new scopes appear only in the English catalog. I opened all 14 translated catalogs; none contains code_fixes:read or code_fixes:write, although the PR description promises the new permission names in every language. Add the corresponding catalog rows, or update the description to explicitly limit this permission-documentation change to English.

| Usage | `usage:read` |
| Jev | `jev:evaluate` (requires `events:add` and `policies:pull`) |

Expand Down
32 changes: 32 additions & 0 deletions docs/audits/code-fixes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "Code fixes"
description: "Turn an insight into a GitHub issue or a pull request, from the insight itself."
icon: "git-pull-request"
---

A policy stops an agent doing the wrong thing. Sometimes the problem is how the agent is built, and the fix belongs in its code. Code fixes finish that loop from the same place you found the problem.

## From insight to pull request

Policies come first. When a policy can't stop the problem and the agent's code can, the insight offers two things, and one click does either:

- **Create a pull request.** Codex works on a copy of your repository, makes the change and runs what tests it can, then opens a draft pull request for your team to review. You get an email when it opens.
- **Raise a GitHub issue.** The insight's findings go to your repository's issues, for someone on your team to pick up.

The click is the go-ahead, recorded against the person who made it. The insight says who asked, links to the result, and says when the pull request is merged or closed.

A pull request is always yours to review, and nothing merges by itself.

## From Slack and your AI tools

You don't have to open the dashboard. Ask in Slack, or through FailproofAI's MCP server in an AI tool like Claude or Cursor, and the assistant tells you what can fix an issue.

- **In Slack:** the assistant suggests what fits, policies first. Pick one and answer yes. Codex runs in FailproofAI Cloud, and the thread hears when the pull request opens.
- **In your AI tool:** you have two choices. Submit the job to run in FailproofAI Cloud, the same as from Slack. Or get the full context of the issue, including the rules the agent must keep, and have your own agent make the change and raise the pull request itself.

## What it needs

- GitHub connected, with the agent linked to the folder that runs it.
- The `code_fixes:write` permission to raise a fix or stop one, and `code_fixes:read` to see them. These are separate from `policies:read` and `policies:write`.

GitHub connects the same way everywhere, with no app to create and no key to set. Your code goes between GitHub and your deployment directly.
3 changes: 2 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@
"audits/cadence",
"audits/findings-and-issues",
"audits/alerts",
"audits/recipes"
"audits/recipes",
"audits/code-fixes"
]
}
]
Expand Down
2 changes: 2 additions & 0 deletions fp-cloud-cli/fp_cli/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"policies:read",
"policies:write",
"policies:pull",
"code_fixes:read",
"code_fixes:write",
"usage:read",
# Jev through FailproofAI Cloud, charged to the org's plan. The built-in
# admin set carries it, so PRESETS["admin"] below does too. The server
Expand Down
Loading