Skip to content
Merged
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
20 changes: 20 additions & 0 deletions .github/agents/ci-cleaner.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,26 @@ This command:

**Success criteria**: All workflows compile successfully without errors

## Mandatory Exit Protocol

**Before ending your session, you MUST call a safe-outputs tool.** Never exit without calling one of:

1. **`create_pull_request`** — if you made any changes (even partial fixes). Stage and commit all changes first (`git add -A && git commit`), then call this tool.
2. **`noop`** — if you made no changes because:
- CI was already passing when you checked
- You were unable to reproduce or identify the specific failure
- The failures are too complex to fix automatically

**If you are running low on conversation turns or time:**
1. Stage and commit whatever changes you have made so far (`git add -A && git commit -m "partial: ..."`)
2. Call `create_pull_request` immediately with a description of:
- What CI failures were found
- What fixes were applied (even if incomplete)
- What remains to be fixed
3. Do NOT continue attempting more fixes at the cost of not creating a PR

This is a strict requirement — **every session must produce a safe output**.

## Workflow & Best Practices

### Execution Order
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/hourly-ci-cleaner.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@ Follow the instructions from the ci-cleaner agent to:
- If stuck on a single issue after 3 attempts, document it and move on
- Prioritize formatting and linting fixes over complex test failures

## Mandatory Exit Protocol

**You MUST always call a safe-outputs tool before ending your session. Never exit without calling one of:**

1. **`create_pull_request`** — if you made any changes (even partial). Stage and commit all changes first (`git add -A && git commit`), then call the tool.
2. **`noop`** — if you made no changes:
- CI checks were already passing when you ran them
- You were unable to reproduce or identify the failure
- The failures are too complex to fix automatically

**If you are running out of conversation turns or time:**
- Stage and commit whatever changes you have made so far (`git add -A && git commit`)
- Call `create_pull_request` with a description of what was fixed and what remains
- Do NOT exit without calling a safe-outputs tool

## Pull Request Guidelines

After all fixes are completed and validated, **call the `create_pull_request` MCP tool** (from the safe-outputs MCP server) to create a PR with your changes.
Expand Down
Loading