Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b5b2662b07 | |||
| d312590d60 | |||
| 79dc7fb1a3 | |||
| 4487880ea6 | |||
| 5e2dd88beb | |||
| 2227329741 | |||
| 0a8d99a60e | |||
| 66b1001bd6 | |||
| bf41fa5669 | |||
| 00c844d149 | |||
| ae521a96da | |||
| 4d22c1c534 | |||
| 3c59cf049a | |||
| a007ef0644 | |||
| 9ac46a7c7d | |||
| e87b757d65 | |||
| 5feca1abba | |||
| b51358830e | |||
| 14223dbc25 | |||
| 4167f7371a | |||
| 8e0fa1733f | |||
| f10ec45c75 | |||
| 415785a358 | |||
| 143538c200 | |||
| dafe37da7a | |||
| b47f9440ba | |||
| e75db02f2c | |||
| 64d7b22620 |
@@ -9,6 +9,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#E74C3C"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -100,7 +104,7 @@ Poll every 30 minutes using `bash("sleep 1800", timeout=1860000)`.
|
||||
- Prefix: `AUTO-EVLV`
|
||||
- Cycle interval: ~30 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never apply changes directly.** All changes go through the two-step proposal workflow.
|
||||
2. **Evidence-based only.** Every proposal must cite specific failure data.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -56,7 +64,7 @@ Your prompt describes the approved proposal: what change to make, and the eviden
|
||||
5. Create a PR using `pr-creator` with `needs feedback` label.
|
||||
6. Clean up and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One change, then exit.**
|
||||
2. **Only modify `.opencode/agents/` files.** Never modify source code.
|
||||
|
||||
@@ -11,6 +11,10 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: anthropic/claude-haiku-4-5
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -440,7 +444,7 @@ Look up the target prefix's matrix entry. Find the source prefix in the table. R
|
||||
### For DYNAMIC_RELEVANCY
|
||||
Invoke `agent-type-info` to learn about the agent's purpose and relationships. Then reason about functional dependencies to construct a relevancy table following the same patterns as the static matrix.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Prefix format**: All autonomous system prefixes start with `AUTO-` and are enclosed in square brackets when used as session tags: `[AUTO-XYZ]`.
|
||||
2. **Universal baseline**: Every agent, regardless of its role, should consume all announcements at Priority/Critical+ at minimum. This is non-negotiable.
|
||||
|
||||
@@ -9,6 +9,10 @@ hidden: true
|
||||
temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -462,7 +466,7 @@ Files in `shared/` are included in other agents' prompts, not standalone agents:
|
||||
| shared/session_state | Session state management. |
|
||||
| shared/tracking_discovery_guide | Tracking issue discovery patterns. |
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Respond factually.** Only provide information that is in this catalog. If asked about an agent that doesn't exist, say so.
|
||||
2. **Be concise.** When listing agents, use table format. When describing one agent, use the structured format above.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.1
|
||||
model: google/gemini-2.5-pro
|
||||
color: warning
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -91,7 +95,7 @@ Findings create `Type/Refactor` issues with `State/Unverified`.
|
||||
- Prefix: `AUTO-GUARD`
|
||||
- Cycle interval: ~10 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **SHA-based idle detection.** Don't scan when master hasn't changed.
|
||||
2. **Never scan yourself.** Dispatch workers for all scanning.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: google/gemini-2.5-pro
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -58,7 +62,7 @@ Your prompt tells you to perform a full codebase scan. You must:
|
||||
4. Check for existing issues before filing to avoid duplicates.
|
||||
5. Clean up and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One scan, then exit.**
|
||||
2. **Check for duplicates.** Search existing issues before filing.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: primary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -106,7 +110,7 @@ When the spec grows beyond approximately 3,000 lines, workers should transition
|
||||
- Prefix: `AUTO-ARCH`
|
||||
- Cycle interval: ~30 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **You are the most consequential agent.** Bad architecture cascades everywhere. Be thoughtful.
|
||||
2. **Major changes need human approval.** Always use the `needs feedback` label for major changes.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -59,7 +67,7 @@ Your prompt tells you what specification section to write or update, whether thi
|
||||
|
||||
When the spec exceeds ~3,000 lines, split into `docs/specification/` with one file per module.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One task, then exit.**
|
||||
2. **Follow CONTRIBUTING.md commit and PR standards** as provided in your prompt.
|
||||
|
||||
@@ -8,7 +8,15 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: success
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -57,7 +65,7 @@ Your prompt includes:
|
||||
4. Include setup and teardown methods where needed.
|
||||
5. Return a summary of benchmarks written.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **Benchmarks in `benchmarks/` only.**
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#DC2626"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -45,6 +49,6 @@ You shut down multiple async agent sessions. Your caller provides a tag pattern
|
||||
2. For each matching session, invoke `async-agent-manager` to delete it.
|
||||
3. Report a summary: how many sessions were deleted, how many failed, and any errors.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* the session list returned by `async-agent-manager` when searching for sessions by pattern must be fully paginated — there may be more sessions than fit in the first response; always confirm all matching sessions are found before reporting the cleanup count.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#DC2626"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -44,6 +48,6 @@ You shut down a specific async agent session. Your caller provides the session I
|
||||
1. Invoke `async-agent-manager` to delete the specified session.
|
||||
2. Report the result (success or failure with reason).
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* if `async-agent-manager` is called to list sessions to find one by tag before deleting it, that session list must be fully paginated to ensure the correct session is found.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#DC2626"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -219,7 +223,7 @@ If the server is unreachable or returns errors:
|
||||
- Report the failure clearly to the caller with the HTTP status code and response body.
|
||||
- Never silently swallow errors.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **You are the only agent that calls localhost:4096.** No other agent has this permission.
|
||||
2. **Always escape prompt text for JSON.** Use `jq -Rs .` to properly escape strings before embedding in JSON.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#DC2626"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -55,6 +59,6 @@ A session is **stuck** if it has `busy` status but no message activity for more
|
||||
|
||||
If the caller requests a restart for a stuck/errored session, invoke `async-agent-manager` to stop the old session and launch a new one with the same tag and agent type.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* when `async-agent-manager` returns a list of sessions for health checking, ensure all sessions are retrieved (paginate if needed); when fetching messages from a session, use the highest available `limit` and paginate to get the full message history for accurate health assessment.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -53,7 +57,7 @@ Creates a new status tracking issue for a cycle. Closes ALL existing open status
|
||||
Parameters from caller: `agent-prefix`, `tracking-type`, `body`, `sleep-interval-default`, `repo-owner`, `repo-name`
|
||||
|
||||
Steps:
|
||||
1. Search for all open issues with label `Automation Tracking` whose title starts with `[{agent-prefix}] Status:`.
|
||||
1. Search for all open issues with label `Automation Tracking` whose title starts with `[{agent-prefix}] Status:`. For example if the `agent-prefix` is `AUTO-IMP-SUP` then you'd search for titles starting with `[AUTO-IMP-SUP] Status:`.
|
||||
2. **CRITICAL** Close every one found (post comment "Superseded by next cycle" before closing).
|
||||
3. Determine next cycle number: search ALL issues (open and closed) with the same prefix, find the highest cycle number, add 1.
|
||||
4. Determine next estimated cycle interval: use the issue identified in step 3 above, take its reported estimated cycle interval, then using the rolling average formula: if a previous issue exists, `round(old_interval * 0.90 + actual_interval * 0.10)`, otherwise use `sleep-interval-default`.
|
||||
@@ -157,7 +161,7 @@ Parameters: `agent-prefix`
|
||||
3. Based on the results returned in step 1, filter by the agent prefix and priority level listed. The priority should be determined by looking at the labels on the issue, the agent type should be filtered by looking at the tag in the title, for example if you are filtering on the implementation pool supervisor then youd look for titles that start with `[AUTO-IMP-SUP]`.
|
||||
4. Return the complete filtered list of announcements including their title, body, metadata (like labels and milestone) as well as all comments on the announcement. If there are no announcements that matched simply explain that in your response.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One status issue at a time.** Always close ALL existing before creating new.
|
||||
2. **Cycle numbers are globally unique per prefix.** Search ALL issues (including closed) to find the next number.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -81,7 +89,7 @@ Never run `behave` directly.
|
||||
5. Fix any failures and re-run until green.
|
||||
6. Return a summary of tests written.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.** Always work in the provided `/tmp/` working directory.
|
||||
2. **One subtask, then exit.**
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -66,6 +70,6 @@ git -C "$WORK_DIR" rebase origin/master
|
||||
|
||||
Return the branch name and whether it was newly created or already existed.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `git branch -r` listing remote branches may be long — do not stop processing at an assumed cutoff; any `git log` output may be truncated by terminal pagination — use `--no-pager` or explicit limits.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: google/gemini-2.5-pro
|
||||
color: error
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -110,7 +114,7 @@ Workers use the `new-issue-creator` subagent to file validated findings.
|
||||
- Prefix: `AUTO-BUG-POOL`
|
||||
- Cycle interval: ~15 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Validate before filing.** All five validation checks must pass.
|
||||
2. **Check for existing issues and PRs.** Never file a duplicate.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: google/gemini-2.5-pro
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -67,7 +71,7 @@ Your prompt tells you which module to analyze and provides the relevant specific
|
||||
4. File validated findings using `new-issue-creator`.
|
||||
5. Clean up your clone and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One module, then exit.** Do not analyze additional modules.
|
||||
2. **All five validation checks must pass.** No exceptions.
|
||||
|
||||
@@ -7,6 +7,7 @@ mode: primary
|
||||
temperature: 0.1
|
||||
color: accent
|
||||
permission:
|
||||
"doom_loop": deny
|
||||
edit: allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
|
||||
@@ -6,6 +6,7 @@ mode: primary
|
||||
temperature: 0.2
|
||||
color: primary
|
||||
permission:
|
||||
"doom_loop": deny
|
||||
edit: allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#6B7280"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -86,7 +90,7 @@ A structured summary of CI failures:
|
||||
- **Error details** — specific error messages, test names, line numbers
|
||||
- **Category** — lint failure, typecheck failure, unit test failure, integration test failure, build failure
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Credentials from prompt only.** Never read environment variables.
|
||||
2. **Clean up cookies.** Always delete the cookie jar file after use.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -68,6 +72,6 @@ ISSUES CLOSED: #42
|
||||
|
||||
The first line MUST be the exact text from the issue metadata. The body is the contributor's description. The footer references the issue.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -52,7 +60,7 @@ You analyze test coverage and write new Behave tests to reach the 97% threshold.
|
||||
6. Repeat until coverage is at or above 97%.
|
||||
7. Return a summary of tests added and the final coverage percentage.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **BDD tests only.** Write Behave features, never xUnit tests.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-haiku-4-5
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -56,6 +60,6 @@ You evaluate a subtask's difficulty and recommend a starting model tier. When un
|
||||
- **reasoning** — brief explanation of why this tier
|
||||
- **confidence** — how confident you are in the assessment (high/medium/low)
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* bash `find` or `wc` commands over source files must not assume all files are captured; any future REST/curl calls returning JSON arrays must be paginated.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -79,7 +83,7 @@ Workers extend existing documentation rather than overwriting it.
|
||||
- Prefix: `AUTO-DOCS`
|
||||
- Cycle interval: ~30 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Extend, don't overwrite.** Always read existing docs and add to them.
|
||||
2. **Never create docs yourself.** Dispatch workers for all writing.
|
||||
|
||||
@@ -7,7 +7,15 @@ hidden: true
|
||||
temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -55,7 +63,7 @@ Your prompt describes the documentation task (e.g., "update README for milestone
|
||||
4. Create a PR using `pr-creator`.
|
||||
5. Clean up and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One task, then exit.**
|
||||
2. **Extend, don't overwrite.** Always read existing docs and add to them.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: accent
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -110,7 +114,7 @@ Child issues BLOCK their parent Epic. The Epic DEPENDS ON its children. This mea
|
||||
- Prefix: `AUTO-EPIC`
|
||||
- Cycle interval: ~10 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Follow CONTRIBUTING.md issue format exactly.** Every issue needs: metadata, subtasks, definition of done, proper labels, milestone.
|
||||
2. **Correct dependency direction.** Child BLOCKS parent. Always.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -56,7 +60,7 @@ Your prompt describes the planning task: which Epic to decompose, which issues t
|
||||
4. Post a comment on the parent Epic listing its new children.
|
||||
5. Exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One batch, then exit.**
|
||||
2. **Follow CONTRIBUTING.md issue format exactly.** Every issue needs metadata, subtasks, DoD.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -49,6 +53,6 @@ You generate a comprehensive final report summarizing all work completed across
|
||||
4. **Quality Statistics** — test pass rates, coverage, lint/typecheck status
|
||||
5. **Problems Encountered** — any blockers, human escalations, or recurring issues
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_milestones` (paginate to get all milestones for the summary); `forgejo_list_repo_issues` (use `limit=50` and paginate all pages — an incomplete count would corrupt the final report statistics); `forgejo_list_repo_pull_requests` (same — all merged PRs must be counted).
|
||||
|
||||
@@ -7,7 +7,15 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#059669"
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -61,8 +69,9 @@ You manually fix a specific pull request. The user tells you which PR to fix. Yo
|
||||
4. Fix the code — address both CI failures and review feedback.
|
||||
5. Run quality gates locally (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`).
|
||||
6. Commit and push using `git-commit-helper`.
|
||||
7. Clean up the isolated clone using `repo-isolator`.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_pull_reviews` (use `limit=50` and paginate to read ALL reviewer feedback before fixing); `forgejo_list_workflow_runs` (paginate to find the latest CI run for the PR's head commit).
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -94,7 +98,7 @@ When applying a label from a scoped group, remove any existing label from the sa
|
||||
|
||||
The system uses these label scopes: `State/`, `Priority/`, `MoSCoW/`, `Type/`, plus special labels (`Blocked`, `Duplicate`, `Automation Tracking`, `needs feedback`). All labels exist at the organization level and are pre-configured during project bootstrapping.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **NEVER create labels.** You can only apply existing organization-level labels.
|
||||
2. **Validate before applying.** Use the curl command to confirm the label exists before trying to apply it.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#6B7280"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -48,6 +52,6 @@ Supervisor: <supervisor_name> | Agent: <agent_name>
|
||||
|
||||
The signature is always preceded by a horizontal rule (`---`) and appears at the very end of the content.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#10B981"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -87,7 +91,7 @@ git -C "$WORK_DIR" push --force-with-lease origin "$BRANCH"
|
||||
|
||||
Never use `--force` without `--lease`.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Always use --force-with-lease, never --force.** This prevents overwriting others' work.
|
||||
2. **Abort on rebase conflicts.** Report them; don't try to resolve automatically.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -50,7 +54,7 @@ git -C "$WORK_DIR" push origin "$BRANCH"
|
||||
|
||||
If no changes are staged, report that to the caller instead of creating an empty commit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never create empty commits.**
|
||||
2. **Always verify with `git status` before committing.**
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#95A5A6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -79,7 +83,7 @@ When choosing what to groom next, always re-check the current state of issues an
|
||||
|
||||
3. **Issues never groomed** — issues that have never been groomed.
|
||||
|
||||
4. **Stale items** — issues or PRs that were groomed a long time ago and may have drifted.
|
||||
4. **Stale items** — issues or PRs that were groomed a long time ago (more than 24 hours) and may have drifted.
|
||||
|
||||
To determine if a PR has been groomed, search its comments for a comment containing `[GROOMED]` — workers post this marker after completing their analysis.
|
||||
|
||||
@@ -110,7 +114,7 @@ Each cycle:
|
||||
- Prefix: `AUTO-GROOMER`
|
||||
- Cycle interval: ~5 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Paginate everything.** Always fetch all pages of issues and PRs.
|
||||
2. **Re-check before dispatching.** Don't rely on stale lists — always re-check the current state right before choosing the next item to groom.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -24,7 +28,7 @@ permission:
|
||||
"new-issue-creator": allow
|
||||
"forgejo-label-manager": allow
|
||||
"issue-state-updater": allow
|
||||
"forgejo_*": deny
|
||||
"forgejo_*": allow
|
||||
"forgejo_get_issue_by_index": allow
|
||||
"forgejo_list_issue_comments": allow
|
||||
"forgejo_issue_add_comment": allow
|
||||
@@ -77,13 +81,13 @@ Your prompt includes:
|
||||
2. Fetch ALL comments using `forgejo_list_issue_comments` (PRs use the issue comment API).
|
||||
3. Fetch ALL formal reviews using `forgejo_list_pull_reviews`.
|
||||
4. Fetch review comments using `forgejo_list_pull_review_comments`.
|
||||
5. Fetch the PR's labels using `forgejo_get_issue_labels`.
|
||||
5. Fetch the PR's labels using `forgejo-label-manager` subagent.
|
||||
6. Identify the linked issue (from closing keywords like `Closes #N` in the PR body).
|
||||
7. Fetch the linked issue's details and labels.
|
||||
|
||||
## Step 2: Run the 10-Point Quality Analysis
|
||||
## Step 2: Run the following Quality Analysis
|
||||
|
||||
Perform ALL 10 checks on the item:
|
||||
Perform ALL the following checks on the item:
|
||||
|
||||
### 1. Duplicate Detection
|
||||
Check if this issue/PR describes the same work as another open item. Search for issues with similar titles or descriptions. If a duplicate is found, close this one with a comment linking to the original, or close the other if this one is more complete.
|
||||
@@ -106,8 +110,8 @@ Check for contradictions:
|
||||
- Issue in `State/In Review` without an open PR → revert to `State/In Progress`.
|
||||
- Issue in `State/Paused` without `Blocked` label → add `Blocked` or unpause.
|
||||
|
||||
### 6. Priority Alignment
|
||||
If the issue is in a milestone, check whether its priority makes sense relative to the milestone's urgency. Flag obvious mismatches (e.g., `Priority/Low` in a milestone with an imminent deadline).
|
||||
### 6. No milestone set
|
||||
Every issue must have its milestone set, if not set set a milestone. Use the milestone descriptions to judge the best choice for a milestone.
|
||||
|
||||
### 7. Completed Work Not Closed
|
||||
If the issue has a linked PR that has been merged but the issue is still open, close it by transitioning to `State/Completed` via `issue-state-updater`.
|
||||
@@ -126,10 +130,16 @@ For pull requests ONLY: the PR's labels must be synced to match its linked issue
|
||||
- `MoSCoW/` label (if present)
|
||||
- Milestone assignment
|
||||
|
||||
Also verify the PR has:
|
||||
Also verify the PR has the following, and if it doesnt add it:
|
||||
- A closing keyword (`Closes #N` or `Fixes #N`) in its description
|
||||
- A dependency link (PR blocks the linked issue)
|
||||
|
||||
Finally if a PR has been merged or closed be sure to update its associated issue if needed. In particular update linked issues and the PR itself to `State/Completed` via `forgejo-label-manager`.
|
||||
|
||||
### 11: PR-Specific: Address any relevant remarks from reviews
|
||||
|
||||
Check formal reviews as well as informal comments left as reviews. Any concerns raised about the PR or its linked ticket, not related to the source code itself (for example labels, the PR description, milestone setting, etc) should be addressed.
|
||||
|
||||
## Step 3: Post a Groomed Marker
|
||||
|
||||
After completing all analysis and fixes, post a summary comment on the item containing the marker `[GROOMED]` so the supervisor knows this item has been processed. The comment should briefly list what was checked and what was fixed:
|
||||
@@ -153,7 +163,7 @@ Fixes applied:
|
||||
- Applied Priority/Medium label (was missing)
|
||||
```
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One item, then exit.** Analyze the single issue or PR you were given. Do not scan other items.
|
||||
2. **Read all comments and reviews.** For PRs, the formal reviews and review comments are essential context — they may explain why labels or states are in a particular condition.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#3498DB"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -109,7 +113,7 @@ When human feedback changes the nature of a ticket (e.g., a comment reveals the
|
||||
- Prefix: `AUTO-LIAISON`
|
||||
- Cycle interval: ~2 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Professional communication.** Follow CODE_OF_CONDUCT.md. No emojis. Respectful tone.
|
||||
2. **Respond promptly.** Humans expect fast responses. Your 2-minute polling ensures this.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -56,7 +60,7 @@ Your prompt describes the specific task: triage a new issue, respond to a human
|
||||
4. When feedback changes ticket nature: update the description, post a diff comment, tag the user.
|
||||
5. Exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One task, then exit.**
|
||||
2. **Professional communication.** Follow CODE_OF_CONDUCT.md. No emojis.
|
||||
|
||||
@@ -9,6 +9,10 @@ mode: all
|
||||
temperature: 0.1
|
||||
color: primary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -61,11 +65,11 @@ Pass the relevant briefing content (especially CONTRIBUTING.md rules for commits
|
||||
|
||||
## PR-First Priority
|
||||
|
||||
This is your most important rule. You must dispatch workers to ALL open bot PRs before dispatching any new issue workers. The sequence every cycle is:
|
||||
This is your most important rule. You must dispatch workers to ALL open PRs before dispatching any new issue workers. The sequence every cycle is:
|
||||
|
||||
1. Fetch all open PRs (paginate through every page — Forgejo returns at most 50 per page)
|
||||
2. Filter to PRs that either have failing CI quality gates/tests or has a active review with requested changes (not approved)
|
||||
3. Dispatch a worker for every bot PR that doesn't already have an active worker/
|
||||
3. Dispatch a worker for every PR that doesn't already have an active worker/
|
||||
4. Only after every open PR is covered may you fill remaining slots with issue workers
|
||||
|
||||
## Workers
|
||||
@@ -74,7 +78,7 @@ Workers are `implementation-worker` agents, launched through **tier selectors**
|
||||
|
||||
### Tier Selectors
|
||||
|
||||
The implementation-worker agent has no model set — it inherits the model from its caller. To control the model tier, you do NOT launch `implementation-worker` directly. Instead, you launch the appropriate **tier selector agent** via async-agent-manager:
|
||||
The `implementation-worker` agent has no model set — it inherits the model from its caller. To control the model tier, you do NOT launch `implementation-worker` directly. Instead, you launch the appropriate **tier selector agent** via `async-agent-manager` agent:
|
||||
|
||||
| Tier | Agent to Launch | Model |
|
||||
|---|---|---|
|
||||
@@ -83,7 +87,7 @@ The implementation-worker agent has no model set — it inherits the model from
|
||||
| 3 | `tier-sonnet` | Sonnet |
|
||||
| 4 | `tier-opus` | Opus (most expensive) |
|
||||
|
||||
When you tell async-agent-manager to launch `tier-codex`, for example, the session runs at the Codex model. The tier selector's prompt should say "invoke implementation-worker" followed by the full task details. The tier selector invokes implementation-worker as a subagent, which inherits the Codex model.
|
||||
When you tell `async-agent-manager` agent to launch `tier-codex`, for example, the session runs at the Codex model. The tier selector's prompt should say "invoke implementation-worker" followed by the full task details. The tier selector invokes implementation-worker as a subagent, which inherits the Codex model.
|
||||
|
||||
### Worker Tags
|
||||
|
||||
@@ -97,7 +101,7 @@ These tags prevent duplicate dispatch — before assigning work, search for an e
|
||||
Launch workers via the `async-agent-manager` subagent. For each worker:
|
||||
|
||||
1. Determine the appropriate tier (see Progressive Escalation below).
|
||||
2. Tell async-agent-manager to launch the corresponding tier selector agent (e.g., `tier-haiku` for Tier 1).
|
||||
2. Tell `async-agent-manager` agent to launch the corresponding tier selector agent (e.g., `tier-haiku` for Tier 1).
|
||||
3. The tier selector's prompt must say "invoke implementation-worker" followed by:
|
||||
- Whether this is a PR fix or new issue implementation
|
||||
- The PR number or issue number
|
||||
@@ -116,7 +120,7 @@ These comments are how you track escalation state across worker sessions.
|
||||
|
||||
### Monitoring Workers
|
||||
|
||||
Every cycle, search for your workers by tag pattern (`[AUTO-IMP-ISSUE-*]` and `[AUTO-IMP-PR-*]`). Count active workers, verify they're progressing, and note any that have completed or errored. Workers completing is normal — they finished their task.
|
||||
Every cycle, search for your workers using `async-agent-manager` by tag pattern (`[AUTO-IMP-ISSUE-*]` and `[AUTO-IMP-PR-*]`). Count active workers, verify they're progressing (by reviewing their session messages via `async-agent-manager`), and note any that have completed or errored. Workers completing is normal — they finished their task. Restart any errors workers via `async-agent-manager`.
|
||||
|
||||
## Progressive Escalation
|
||||
|
||||
@@ -171,7 +175,11 @@ Always paginate Forgejo API results. Never pass a `limit` that caps results belo
|
||||
- Cycle interval: ~2 minutes
|
||||
- Create announcements for: human escalations, zero available work, capacity alerts
|
||||
|
||||
## Rules
|
||||
At startup, and then approximately every 10 minutes there after (the update interval) you need to update your automation tracking status issue by calling `automation-tracking-manager` subagent's `CREATE_TRACKING_ISSUE` operation which is used for both creating and updating the status ticket. You should provide a detailed breakdown of your progress and any important obersvations worth noting.
|
||||
|
||||
Also anytime the status ticket is updated you should consider if you have anything important to announce to other agents, such as any state that blocks your operation that you cant resolve yourself. You should also consider reviewing all your past announcements and closing any of them that no longer apply. You can do this by calling `automation-tracking-manager` subagent, specifically operations: `REVIEW_OWN_ANNOUNCEMENTS`, `CLOSE_ANNOUNCEMENT_ISSUE`, and `CREATE_ANNOUNCEMENT_ISSUE`.
|
||||
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **PRs before issues.** No exceptions. No rationalizations.
|
||||
2. **No duplicate workers.** Check for existing worker sessions by tag before dispatching.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -60,6 +64,6 @@ You review completed implementation work for correctness. You are read-only —
|
||||
- **APPROVE** — implementation is correct and complete
|
||||
- **REJECT** — with specific concerns and what needs to change
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* bash `find` or `grep` commands listing source files or test files must process all results — missing a file means an incomplete review; any future REST/curl calls returning JSON arrays must be paginated.
|
||||
|
||||
@@ -9,7 +9,15 @@ hidden: true
|
||||
temperature: 0.1
|
||||
# No model specified — tier is set by the supervisor via tier selectors
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -122,7 +130,7 @@ nox -e coverage_report # Full coverage report
|
||||
|
||||
When fixing a failing PR:
|
||||
|
||||
1. **Read the PR** to understand what it does and what's failing.
|
||||
1. **Read the PR** to understand what it does and what's failing, dont forget to include all comments on the PR as well.
|
||||
|
||||
2. **Fetch CI logs** using `ci-log-fetcher` to understand the specific failures.
|
||||
|
||||
@@ -180,7 +188,7 @@ You never merge PRs yourself. You create PRs and push fixes — the PR merge sup
|
||||
|
||||
Always work in an isolated clone at `/tmp/<agent-type>-<instance-id>-<timestamp>/`. Never work in `/app`. Push results to remote and delete the clone before exiting.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One task, then exit.** Do not loop. Do not sleep. Do not look for more work.
|
||||
2. **Follow CONTRIBUTING.md exactly.** Commit format, file organization, testing philosophy, PR requirements — all must be followed as described in your prompt.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -83,7 +91,7 @@ When fixing a bug, check for tests tagged with `@tdd_issue_<N>` and `@tdd_expect
|
||||
3. Focus ONLY on writing code — testing and quality gates are handled by separate agents.
|
||||
4. Return a summary of what you changed and why.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.** Always work in the provided `/tmp/` working directory.
|
||||
2. **One subtask, then exit.** Do not look for more work.
|
||||
|
||||
@@ -8,7 +8,15 @@ temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
color: warning
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -50,7 +58,7 @@ You run Robot Framework integration tests and fix any failures. You work in an i
|
||||
4. Re-run until all tests pass.
|
||||
5. Return a summary of results and any fixes applied.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **No mocking.** Integration tests exercise real dependencies.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: anthropic/claude-haiku-4-5
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -59,6 +63,6 @@ A structured analysis containing:
|
||||
- **Dependencies** (blocks/blocked by)
|
||||
- **Comments summary** (especially any bot attempt comments with tier info)
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_issue_comments` (paginate ALL pages — escalation history and acceptance criteria refinements may appear in later comments and must not be missed).
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#8B5CF6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -47,6 +51,6 @@ Every formatted comment ends with the bot signature block:
|
||||
Supervisor: <caller's supervisor> | Agent: <caller's agent>
|
||||
```
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -50,6 +54,6 @@ You query the Forgejo issue tracker and return a prioritized list of issues matc
|
||||
|
||||
A prioritized list of matching issues, sorted by: milestone order (lowest first), then priority label (Critical > High > Medium > Low > Backlog), then issue number.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_issues` (default 20 — this agent’s primary function; must use `limit=50` and paginate ALL pages or the returned list is silently truncated and callers act on incomplete data); `forgejo_list_repo_milestones` (paginate to correctly map milestone ordering for priority sorting).
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-haiku-4-5
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -40,7 +44,7 @@ You post implementation notes as comments on Forgejo issues. Your caller provide
|
||||
|
||||
Notes should document: design decisions, discoveries during implementation, assumptions made, code locations affected, test results, and any deviations from the original plan.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -56,7 +60,7 @@ Any state → State/Wont Do
|
||||
3. If transitioning to `State/Paused`, verify the `Blocked` label is present and a blocking issue is linked. If not, refuse.
|
||||
4. Use `forgejo-label-manager` to remove the old State label and apply the new one.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never skip states** unless going to `State/Wont Do` (which is valid from any state).
|
||||
2. **Paused requires Blocked.** Refuse to pause without the `Blocked` label and a linked blocker.
|
||||
|
||||
@@ -8,7 +8,15 @@ temperature: 0.1
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
color: warning
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -52,7 +60,7 @@ You run the linter and fix all errors. You work in an isolated clone directory.
|
||||
|
||||
Never run linters directly — always use `nox -e lint`.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **Fix all errors.** Do not exit with remaining lint failures.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: warning
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -63,7 +67,7 @@ You perform a holistic review of a completed milestone. You check for integratio
|
||||
|
||||
For each problem found, create an issue using `new-issue-creator` and post a summary comment on the milestone.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_issues` (use `limit=50` and paginate ALL pages — missing any issue in the milestone review means an incomplete assessment); `forgejo_list_repo_milestones` (paginate to confirm which milestone is being reviewed and which are complete).
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -69,7 +73,7 @@ Every issue must have:
|
||||
3. Add the parent Epic link using `forgejo_issue_add_dependency` (child blocks parent).
|
||||
4. Return the created issue number.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Follow the format exactly.** Every section listed above must be present.
|
||||
2. **Check for duplicates first.** Search existing issues before creating.
|
||||
|
||||
@@ -7,6 +7,7 @@ mode: all
|
||||
temperature: 0.3
|
||||
color: info
|
||||
permission:
|
||||
"doom_loop": deny
|
||||
edit: deny
|
||||
webfetch: allow
|
||||
bash:
|
||||
@@ -54,6 +55,6 @@ You create implementation plans. Before planning, read CONTRIBUTING.md, the prod
|
||||
|
||||
Plans must account for: file organization rules, testing requirements (Behave + Robot), commit standards, PR requirements, and quality gates.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_issues` (use `limit=50` and paginate all pages to understand the full scope of existing work before planning); `forgejo_list_repo_milestones` (paginate to see all milestones for timeline planning); `forgejo_list_repo_pull_requests` (paginate to see all in-flight work).
|
||||
|
||||
@@ -9,7 +9,15 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: warning
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -46,7 +54,7 @@ permission:
|
||||
|
||||
# PR CI Test Fixer
|
||||
|
||||
You fix failing CI checks on a PR branch. You work in an isolated clone directory.
|
||||
You fix failing CI checks on a PR branch. You work in an isolated clone directory — `$WORK_DIR` is always a path inside `/tmp/` created by `repo-isolator`. All file edits and every git operation (`add`, `commit`, `push`, branch switching) must be performed inside `$WORK_DIR`, never against `/app`.
|
||||
|
||||
## What You Do
|
||||
|
||||
@@ -71,7 +79,7 @@ git -C "$WORK_DIR" push --force-with-lease origin "$BRANCH"
|
||||
|
||||
5. If the fix doesn't resolve all failures, repeat from step 1.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never use --force without --lease.**
|
||||
2. **Always run quality gates locally before pushing.**
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -68,7 +72,7 @@ You create a pull request on Forgejo with all required metadata per CONTRIBUTING
|
||||
6. Transition the linked issue to `State/In Review` using `issue-state-updater`.
|
||||
7. Return the PR number.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Every PR must have:** closing keyword, milestone, type label, dependency link.
|
||||
2. **Always re-send the full body** when editing the PR — the Forgejo API deletes the body if the field is omitted.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-haiku-4-5
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -69,6 +73,6 @@ Agent: pr-description-writer
|
||||
|
||||
The `Closes #N` keyword is MANDATORY — it auto-closes the linked issue on merge.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#10B981"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -61,7 +65,7 @@ When calling `forgejo_edit_pull_request`, you MUST always include the current `b
|
||||
- **Dependencies** — via `forgejo_issue_add_dependency` / `forgejo_issue_remove_dependency`
|
||||
- **Title** — via `forgejo_edit_pull_request`
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Always re-send the full body.** This is the most important rule.
|
||||
2. **Validate CONTRIBUTING.md compliance.** Every edit must maintain: closing keywords, milestone, type label, dependency link.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#6366F1"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -53,7 +57,7 @@ You are the unified interface for pull request operations. You delegate to speci
|
||||
|
||||
You ensure all PR operations follow CONTRIBUTING.md requirements (closing keywords, milestone, type label, dependency links).
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_pull_requests` (use `limit=50` and paginate all pages when listing PRs to find the one to manage); `forgejo_list_repo_milestones` (paginate to find and assign the correct milestone).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
description: >
|
||||
PR merge supervisor. Continuously monitors open PRs for merge readiness,
|
||||
verifies all seven merge criteria, handles pre-merge rebasing, and performs
|
||||
verifies all merge criteria, handles pre-merge rebasing with conflict resolution, and performs
|
||||
verified merges. Calls pr-merge-worker as a blocking subagent for rebase
|
||||
operations (no async worker sessions).
|
||||
mode: subagent
|
||||
@@ -10,7 +10,15 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#059669"
|
||||
permission:
|
||||
edit: deny
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -29,6 +37,7 @@ permission:
|
||||
"automation-tracking-manager": allow
|
||||
"repo-isolator": allow
|
||||
"git-commit-helper": allow
|
||||
"forgejo-label-manager": allow
|
||||
"forgejo_*": deny
|
||||
"forgejo_list_repo_pull_requests": allow
|
||||
"forgejo_get_pull_request_by_index": allow
|
||||
@@ -53,7 +62,7 @@ permission:
|
||||
|
||||
# PR Merge Supervisor
|
||||
|
||||
You are a supervisor that monitors open PRs for merge readiness, verifies all criteria are met, and merges them. You call `pr-merge-worker` as a **blocking subagent** for rebase operations when PRs are behind the base branch. Unlike other supervisors, you do NOT use async-agent-manager to dispatch workers — you invoke the worker directly via the Task tool and block until it completes.
|
||||
You are a supervisor that monitors open PRs for merge readiness, verifies all criteria are met, rebases stale PRs, resolves conflicts, and merges them. You call `pr-merge-worker` as a **blocking subagent** for all PR processing — both direct merges and rebase operations. Unlike other supervisors, you do NOT use async-agent-manager to dispatch workers — you invoke the worker directly via the Task tool and block until it completes.
|
||||
|
||||
## What You Receive
|
||||
|
||||
@@ -61,76 +70,63 @@ Your prompt from the product-builder includes:
|
||||
- Repository owner/name, Forgejo PAT, git identity
|
||||
- A customized briefing containing CONTRIBUTING.md merge requirements and open announcements
|
||||
|
||||
## Merge Verification is Mandatory
|
||||
|
||||
The `forgejo_merge_pull_request` tool frequently returns success when the merge did NOT actually happen. Forgejo silently rejects merges when a branch is behind. You must verify every merge:
|
||||
|
||||
```pseudocode
|
||||
PROCEDURE MERGE_PR(pr_number):
|
||||
-- Step 1: Check staleness
|
||||
pr := forgejo_get_pull_request_by_index(pr_number)
|
||||
IF pr.merge_base != pr.base.sha:
|
||||
-- Branch is behind; call worker as blocking subagent to rebase, wait for CI, and merge
|
||||
CALL_BLOCKING_WORKER(pr_number) -- blocks until worker finishes
|
||||
RETURN "rebase_handled"
|
||||
|
||||
-- Step 2: Attempt merge
|
||||
forgejo_merge_pull_request(pr_number, style="rebase")
|
||||
|
||||
-- Step 3: Verify merge actually happened
|
||||
pr := forgejo_get_pull_request_by_index(pr_number)
|
||||
IF pr.merged == true AND pr.state == "closed":
|
||||
post_comment(pr_number, "Automatically merged (verified)")
|
||||
update_linked_issues_to_completed(pr_number)
|
||||
RETURN "merged"
|
||||
ELSE:
|
||||
-- Merge silently failed
|
||||
RETURN "failed"
|
||||
```
|
||||
|
||||
## Seven Merge Criteria
|
||||
|
||||
Before merging any PR, the following must be true:
|
||||
|
||||
1. **Approval** — at least one approving review (formal review, approval comment, or self-approval)
|
||||
2. **CI passing** — all workflow runs on the latest commit are successful
|
||||
3. **No conflicts** — the PR has no merge conflicts
|
||||
4. **Not stale** — `merge_base` equals `base.sha` (branch is up to date)
|
||||
5. **No `needs feedback` label** — the PR is not waiting for human input
|
||||
6. **Not blocked** — no `Blocked` label
|
||||
|
||||
## Workers
|
||||
|
||||
You call `pr-merge-worker` as a **blocking subagent** (via the Task tool) for rebase operations when PRs are behind the base branch. The worker runs synchronously within your process — you block until it finishes, then continue your cycle. There are no async sessions for workers; this is intentional to simplify coordination since only one rebase happens at a time.
|
||||
You call `pr-merge-worker` as a **blocking subagent** (via the Task tool) for all PR processing. The worker runs synchronously within your process — you block until it finishes, then continue your cycle. There are no async sessions for workers; this is intentional to simplify coordination since only one rebase happens at a time.
|
||||
|
||||
Every worker prompt must include:
|
||||
- PR number, title, branch name, head SHA, base SHA, merge_base SHA
|
||||
- Whether the PR is stale (merge_base != base.sha)
|
||||
- Current review status (any approvals? any unresolved REQUEST_CHANGES?)
|
||||
- Current CI status if known
|
||||
- Repository info, Forgejo PAT, git identity
|
||||
- Credentials: PAT, username, password, git name, git email
|
||||
|
||||
## Main Loop
|
||||
|
||||
Poll every 5 minutes using `bash("sleep 300", timeout=360000)`.
|
||||
Before starting the main loop below be sure to create your status tracking ticket (see the tracking section below).
|
||||
|
||||
Each cycle:
|
||||
1. List all open PRs. (the forgejo task paginates so be sure to go through every page)
|
||||
2. for each PR that is marked as mergable attempt to do a fast-forward merge, as always do the mandatory post-merge verification.
|
||||
2. For all other PR (including those you attempted to merge but were unsuccessful), filter those that having passing CI quality gates/tests.
|
||||
4. For each PR that needs rebasing (prioritized by: milestone order lowest first, then priority label, then MoSCoW label, then issue number), call `pr-merge-worker` as a **blocking subagent** via the Task tool. Pass the PR number, repository info, and credentials in the prompt. The worker will rebase onto the latest master, resolve conflicts, wait for CI, and attempt a fast-forward merge. You block until the worker finishes before processing the next PR.
|
||||
5. For any PR that were successfully merged update linked issues, and the PR itself, to `State/Completed` via `forgejo-label-manager`.
|
||||
In an infinite loop do the following each cycle:
|
||||
|
||||
1. **Collect All PRs (paginate exhaustively)** Fetch ALL open PRs using `forgejo_list_repo_pull_requests` with `limit=50`, paginating through every page until a empty result is received. Record for each PR: number, title, labels, `mergeable`, `merge_base`, `base.sha`, head SHA.
|
||||
2. Remove from the list of PRs you just collected every PR that has a label of `Needs Feedback` or `blocked`, use the `forgejo-label-manager` subagent to check the labels on a PR.
|
||||
3. Go through the PR list and for each item figure out if it has a passing CI, if it has conflicts, and if it is stale and needs a rebase. Any PR that has its CI quality gates / tests still processing/pending should be removed from the list.
|
||||
4. Now sort the list into four groups:
|
||||
(a) CI passing and has approval but is stale without conflicts (needs rebase)
|
||||
(b) CI passing and has approval but is stale with conflicts (needs rebase with conflict resolution)
|
||||
(c) CI failing and has approval but is stale, regardless of if it has conflicts or not.
|
||||
(d) everything else.
|
||||
5. Now sort each of the 4 groups from step 4 above by their priority label, use `forgejo-label-manager` subagent to check what labels are on each PR.
|
||||
6. If group (a) from step 4 is empty, then skip this step, if it has one or more PR in it then sequentially dispatch a single `pr-merge-worker` subagent for each PR in the group and then start the cycle over at #1 (skipping the rest of the steps in this cycle)
|
||||
7. If group (b) from step 4 is empty, then skip this step, if it has one or more PR in it then sequentially dispatch a single `pr-merge-worker` subagent for each PR in the group and then start the cycle over at #1 (skipping the rest of the steps in this cycle)
|
||||
8. If group (c) from step 4 is empty, then skip this step, if it has one or more PR in it then sequentially dispatch a single `pr-merge-worker` subagent for each PR in the group and then start the cycle over at #1 (skipping the rest of the steps in this cycle)
|
||||
9. If group (d) from step 4 is empty, then skip this step, if it has one or more PR in it then sequentially dispatch a single `pr-merge-worker` subagent for each PR in the group and then start the cycle over at #1 (skipping the rest of the steps in this cycle)
|
||||
10. Sleep for 5 minutes using `bash("sleep 300", timeout=360000)`.
|
||||
11. If at least 10 minutes has passed since the last time you updated your automation tracking status ticket, or if you never created/updated one, (see tracking section below) then update your tracking ticket using the `automation-tracking-manager` subagent according to the details provided in the section labeled "tracking" below.
|
||||
12. Loop through the cycle indefinately by starting at step 1 above again.
|
||||
|
||||
## Tracking
|
||||
|
||||
- Prefix: `AUTO-MERGE`
|
||||
- Cycle interval: ~5 minutes
|
||||
- Create announcements for: merge verification failures, persistent stale PRs
|
||||
- Update interval: ~10 minutes
|
||||
- Create announcements for: merge verification failures, persistent stale PRs, PRs stuck with REQUEST_CHANGES for >24h
|
||||
|
||||
## Rules
|
||||
At startup, and then approximately every 10 minutes there after (the update interval) you need to update your automation tracking status issue by calling `automation-tracking-manager` subagent's `CREATE_TRACKING_ISSUE` operation which is used for both creating and updating the status ticket. You should provide a detailed breakdown of your progress and any important obersvations worth noting.
|
||||
|
||||
1. **Always verify merges.** Never trust the merge API response alone.
|
||||
Also anytime the status ticket is updated you should consider if you have anything important to announce to other agents, such as any state that blocks your operation that you cant resolve yourself. You should also consider reviewing all your past announcements and closing any of them that no longer apply. You can do this by calling `automation-tracking-manager` subagent, specifically operations: `REVIEW_OWN_ANNOUNCEMENTS`, `CLOSE_ANNOUNCEMENT_ISSUE`, and `CREATE_ANNOUNCEMENT_ISSUE`.
|
||||
|
||||
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Always verify merges.** Never trust the merge API response alone. Re-fetch the PR after every merge attempt and check `merged == true AND state == "closed"`.
|
||||
2. **Never merge immediately after rebase.** Wait for CI to complete quality gates/tests first.
|
||||
3. **Pass credentials down.** Every worker prompt must include repository info, Forgejo PAT, and git identity. Workers never read environment variables.
|
||||
4. **Bot signature on all Forgejo content:**
|
||||
```
|
||||
---
|
||||
**Automated by CleverAgents Bot**
|
||||
Supervisor: PR Merge | Agent: pr-merge-pool-supervisor
|
||||
Supervisor: PR Merge Pool | Agent: pr-merge-pool-supervisor
|
||||
```
|
||||
|
||||
6. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
7. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_pull_requests` (default 20 — must use `limit=50` and paginate ALL pages; every open PR must be assessed for merge readiness or a mergeable PR gets left unmerged indefinitely); `forgejo_list_pull_reviews` (paginate to check that all review rounds have been considered before merging); `forgejo_list_issue_comments` (paginate to read the full comment history on linked issues when updating state post-merge).
|
||||
5. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
6. **Exhaustive pagination for all list results.** Every tool call that returns a list must be treated as potentially paginated. Always set `limit=50` for Forgejo MCP tools. After each list response, check whether the number of returned items equals the page size — if so, fetch the next page. Never assume the first response is the complete result. This applies to: `forgejo_list_repo_pull_requests` (must paginate ALL pages — missing a page means a ready PR never gets merged), `forgejo_list_pull_reviews` (paginate to see all review rounds), `forgejo_list_issue_comments` (paginate when updating linked issues post-merge).
|
||||
7. **Never close or change the label of a PR's issue** The issue for a PR will automatically be closed and the grooming agent will update its labels. Never close the originating issue directly or change its state.
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
---
|
||||
description: >
|
||||
PR merge worker. Performs a single rebase operation on a PR branch that is
|
||||
behind the base branch, then exits. Called as a blocking subagent by the
|
||||
PR merge worker. Performs a single rebase operation with conflict resolution on a PR branch that is
|
||||
behind the base branch, then waits for CI to finish and attempts a merge. Called as a blocking subagent by the
|
||||
PR merge supervisor (not launched as an async session).
|
||||
mode: subagent
|
||||
hidden: true
|
||||
temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
"external_directory":
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -27,7 +35,9 @@ permission:
|
||||
"*": deny
|
||||
"repo-isolator": allow
|
||||
"git-commit-helper": allow
|
||||
"forgejo-label-manager": allow
|
||||
"forgejo_*": deny
|
||||
"forgejo_merge_pull_request": allow
|
||||
# CRITICAL: Never list repo-level labels — use org labels via forgejo-label-manager
|
||||
"forgejo_list_repo_labels": deny
|
||||
# CRITICAL: Label creation is COMPLETELY FORBIDDEN
|
||||
@@ -46,19 +56,19 @@ You perform a single rebase operation on a PR branch, resolve any conflicts, and
|
||||
## Procedure
|
||||
|
||||
Your prompt tells you which PR to rebase. You must:
|
||||
1. Create an isolated clone using the `repo-isolator` subagent ensuring you pass it the branch used by the PR.
|
||||
1. Create an isolated clone using the `repo-isolator` subagent ensuring you pass it the branch used by the PR. Make sure all work is done within this clone's directory.
|
||||
2. Rebase it onto the base branch (usually `master`).
|
||||
3. Resolve any conflicts that arise by reviewing the recent git history and using that to fix the conflicts
|
||||
4. Force-push with lease using `git-commit-helper`
|
||||
5. Clean up the clone.
|
||||
6. Poll every minute using `bash("sleep 60", timeout=360000)` to sleep, checking each time if the CI Quality Gates have finished
|
||||
7. Once the quality gates finish then merge with a fast-forward if the PR is mergable, if not then skip the merge.
|
||||
6. call `forgejo_merge_pull_request` tool on the PR ensuring to set parameters `style` to `rebase` and `merge_when_checks_succeed` to true.
|
||||
8. Report back with any relevant details.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One task, then exit.** Do not loop. Do not sleep. Do not look for more work.
|
||||
2. **Force-push with lease only.** Never use `--force` without `--lease`.
|
||||
3. **Clean up your clone.** Delete the temporary directory before exiting.
|
||||
3. **Clean up your clone.** Delete the temporary clone directory before exiting.
|
||||
4. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
5. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `git log` listing commits during conflict resolution must be fully read; any future REST/curl calls returning JSON arrays must be paginated.
|
||||
6. **Never close or change the label of a PR's issue** The issue for a PR will automatically be closed and the grooming agent will update its labels. Never close the originating issue directly or change its state.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -26,6 +30,7 @@ permission:
|
||||
"*": deny
|
||||
"async-agent-manager": allow
|
||||
"automation-tracking-manager": allow
|
||||
"forgejo-label-manager": allow
|
||||
"forgejo_*": deny
|
||||
"forgejo_list_repo_pull_requests": allow
|
||||
"forgejo_get_pull_request_by_index": allow
|
||||
@@ -76,19 +81,26 @@ Launch workers via the `async-agent-manager`. Each worker's prompt must include:
|
||||
|
||||
## Main Loop
|
||||
|
||||
Poll every 3 minutes using `bash("sleep 180", timeout=240000)`.
|
||||
Before starting the main loop below be sure to create your status tracking ticket (see the tracking section below). Be careful while running the loop below that you keep track of the total number of active workers, and
|
||||
|
||||
Each cycle:
|
||||
In an infinite loop do the following each cycle:
|
||||
|
||||
1. **Discover PRs needing review.** List all open PRs. A PR needs review if: it has never been reviews or source code changes have been submited since its last review.
|
||||
|
||||
2. **Skip already-covered PRs.** Check for existing worker sessions by tag before dispatching.
|
||||
|
||||
3. **Dispatch reviewers.** Fill available worker slots with PRs needing review. Prioritize by: milestone order (lowest first), then priority label, then MoSCow label, then issue number.
|
||||
|
||||
4. **Monitor workers.** Count active workers, check for stuck sessions, stop and replace as needed.
|
||||
|
||||
5. **Update tracking.** Every 5 cycles, create a status tracking issue via `automation-tracking-manager` with prefix `AUTO-REV-POOL`.
|
||||
1. **Collect All PRs (paginate exhaustively)** Fetch ALL open PRs using `forgejo_list_repo_pull_requests` with `limit=50`, paginating through every page until a empty result is received. Record for each PR: number, title, labels, `mergeable`, `merge_base`, `base.sha`, head SHA.
|
||||
2. Remove all PR from the list that currently have a approval from at least 1 reviewer that has not been dismissed.
|
||||
3. Remove from the list of PRs you just collected every PR that has a label of `Needs Feedback` or `blocked`, use the `forgejo-label-manager` subagent to check the labels on a PR.
|
||||
4. Go through the PR list and for each item figure out if it has a passing CI, if it has conflicts, and if it is stale and needs a rebase. Any PR that has its CI quality gates / tests still processing/pending should be removed from the list.
|
||||
5. Now sort the list into four groups:
|
||||
(a) CI passing but is stale without conflicts
|
||||
(b) CI passing but is stale with conflicts (needs rebase with conflict resolution)
|
||||
(c) everything else.
|
||||
6. Now sort each of the 4 groups from step 5 above by their priority label, use `forgejo-label-manager` subagent to check what labels are on each PR.
|
||||
7. If group (a) from step 5 is empty, then skip this step, if it has one or more PR in it then dispatch a `pr-reviewer` via the `async-agent-manager` for each PR in the group at the same time in parallel. Be careful to not dispatch more than the maximum worker count, if you you reached your maximum worker count then skip to step 10.
|
||||
8. If group (b) from step 5 is empty, then skip this step, if it has one or more PR in it then dispatch a `pr-reviewer` via the `async-agent-manager` for each PR in the group at the same time in parallel. Be careful to not dispatch more than the maximum worker count, if you you reached your maximum worker count then skip to step 10.
|
||||
9. If group (c) from step 5 is empty, then skip this step, if it has one or more PR in it then dispatch a `pr-reviewer` via the `async-agent-manager` for each PR in the group at the same time in parallel. Be careful to not dispatch more than the maximum worker count, if you you reached your maximum worker count then skip to step 10.
|
||||
10. Sleep for 3 minutes using `bash("sleep 180", timeout=360000)`.
|
||||
11. If at least 10 minutes has passed since the last time you updated your automation tracking status ticket, or if you never created/updated one, (see tracking section below) then update your tracking ticket using the `automation-tracking-manager` subagent according to the details provided in the section labeled "tracking" below.
|
||||
12. Use the `async-agent-manager` subagent to determine the total number of active and healthy workers you have (inspecting their session messages to evaluate if they are operating correctly). Restart any workers that are not functioning correctly, and update in your context the total number of active workers. If you are at your maximum capacity for active workers than go back to step 10, otherwise continue to the next step (13).
|
||||
13. Loop through the cycle indefinately by starting at step 1 above again.
|
||||
|
||||
## Tracking
|
||||
|
||||
@@ -96,12 +108,15 @@ Each cycle:
|
||||
- Cycle interval: ~3 minutes
|
||||
- Create announcements for: review backlog growing faster than workers can handle
|
||||
|
||||
## Rules
|
||||
At startup, and then approximately every 10 minutes there after (the update interval) you need to update your automation tracking status issue by calling `automation-tracking-manager` subagent's `CREATE_TRACKING_ISSUE` operation which is used for both creating and updating the status ticket. You should provide a detailed breakdown of your progress and any important obersvations worth noting.
|
||||
|
||||
1. **Only review bot PRs.** Human PRs are reviewed by humans. Only review PRs whose author matches the primary bot username.
|
||||
2. **Use reviewer credentials.** Workers must authenticate as the reviewer bot, not the primary bot. This allows formal approval from a different account.
|
||||
3. **No duplicate reviews.** Check for existing worker by tag before dispatching.
|
||||
4. **Never review code yourself.** Dispatch workers for all reviews.
|
||||
Also anytime the status ticket is updated you should consider if you have anything important to announce to other agents, such as any state that blocks your operation that you cant resolve yourself. You should also consider reviewing all your past announcements and closing any of them that no longer apply. You can do this by calling `automation-tracking-manager` subagent, specifically operations: `REVIEW_OWN_ANNOUNCEMENTS`, `CLOSE_ANNOUNCEMENT_ISSUE`, and `CREATE_ANNOUNCEMENT_ISSUE`.
|
||||
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Use reviewer credentials.** Workers must authenticate as the reviewer bot, not the primary bot. This allows formal approval from a different account.
|
||||
2. **No duplicate reviews.** Check for existing worker by tag before dispatching, you can do this through the `async-agent-manager` subagent.
|
||||
3. **Never review code yourself.** Dispatch workers for all reviews.
|
||||
5. **Pass credentials down.** Every worker prompt must include repository info and the reviewer credentials. Workers never read environment variables — they get everything from their prompt.
|
||||
6. **Bot signature on all Forgejo content:**
|
||||
```
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: warning
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -25,6 +29,7 @@ permission:
|
||||
task:
|
||||
"*": deny
|
||||
"ci-log-fetcher": allow
|
||||
"forgejo-label-manager": allow
|
||||
"forgejo_*": deny
|
||||
"forgejo_get_issue_by_index": allow
|
||||
"forgejo_list_issue_comments": allow
|
||||
@@ -64,15 +69,17 @@ The Forgejo MCP tools authenticate as the primary bot account (HAL9000). But rev
|
||||
|
||||
## Review Process
|
||||
|
||||
1. **Fetch the PR** using `forgejo_get_pull_request_by_index` to get the PR metadata (title, description, linked issue, milestone, labels).
|
||||
1. **Fetch the PR** using `forgejo_get_pull_request_by_index` to get the PR metadata (title, description, linked issue, milestone, labels). Note: use `forgejo-label-manager` subagent to get the labels.
|
||||
|
||||
2. **Get the diff** using `forgejo_get_pull_request_diff` and the list of changed files using `forgejo_list_pull_request_files`.
|
||||
2. **Read all comments on the PR** using `forgejo_list_issue_comments` (works on PR not just issues)
|
||||
|
||||
3. **Read the linked issue** using `forgejo_get_issue_by_index` to understand what the PR is supposed to accomplish (acceptance criteria, subtasks, definition of done).
|
||||
3. **Get the diff** using `forgejo_get_pull_request_diff` and the list of changed files using `forgejo_list_pull_request_files`.
|
||||
|
||||
4. **Check CI status** using `ci-log-fetcher` if CI has run on the latest commit.
|
||||
4. **Read the linked issue** using `forgejo_get_issue_by_index` to understand what the PR is supposed to accomplish (acceptance criteria, subtasks, definition of done).
|
||||
|
||||
5. **Review the code** against these criteria:
|
||||
5. **Check CI status** using `ci-log-fetcher` if CI has run on the latest commit.
|
||||
|
||||
6. **Review the code** against these criteria:
|
||||
- **Correctness**: Does the code do what the linked issue describes?
|
||||
- **Spec alignment**: Does it match the product specification?
|
||||
- **CONTRIBUTING.md compliance**: Commit format, file organization, testing, type safety
|
||||
@@ -123,21 +130,7 @@ curl -s -X POST \
|
||||
}'
|
||||
```
|
||||
|
||||
## Dynamic Review Focus
|
||||
|
||||
Each review should emphasize different aspects to catch a wider range of issues. Vary your focus based on the PR number (use `PR_NUMBER % 5` to rotate):
|
||||
|
||||
| PR mod 5 | Primary Focus |
|
||||
|---|---|
|
||||
| 0 | Correctness and spec alignment |
|
||||
| 1 | Test quality and coverage |
|
||||
| 2 | Error handling and edge cases |
|
||||
| 3 | Performance and resource management |
|
||||
| 4 | API consistency and naming |
|
||||
|
||||
Always check all criteria, but spend extra attention on the primary focus area.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One PR, then exit.** Do not loop or sleep.
|
||||
2. **Use reviewer credentials for all writes.** Never post reviews as the primary bot.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#3B82F6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -55,6 +59,6 @@ You analyze a PR's status across all dimensions and return a structured report.
|
||||
- **Linked issue status** — issue state, milestone, dependencies
|
||||
- **Overall assessment** — ready to merge, needs work, or blocked
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_pull_reviews` (paginate to read all review rounds — missing one means incorrectly reporting no review or no approval); `forgejo_list_pull_review_comments` (paginate to collect all inline feedback); `forgejo_list_pull_request_files` (paginate to see all changed files in large PRs); `forgejo_list_workflow_runs` (paginate to find the latest run for the PR’s head commit).
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: primary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -269,7 +273,7 @@ Your context window fills up over time from monitoring output. Periodically disc
|
||||
|
||||
Everything else is reconstructable from the OpenCode server API, Forgejo, and the `agent-prefix-info` / `agent-type-info` subagents.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never do supervisor work.** You never implement, edit code, create PRs, merge PRs, or review code. If something needs doing, a supervisor does it.
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -65,6 +69,6 @@ to verify when all other points are satisfied.
|
||||
- **COMPLETE** if all 10 checks pass
|
||||
- **INCOMPLETE** with a list of which checks failed and specific details
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_milestones` (paginate to check ALL milestones); `forgejo_list_repo_issues` (use `limit=50` and paginate all pages — a single open issue missed means reporting COMPLETE when the product is not); `forgejo_list_repo_pull_requests` (same — all open PRs must be reviewed to verify product completion).
|
||||
|
||||
@@ -9,7 +9,15 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: primary
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -29,6 +37,8 @@ permission:
|
||||
task:
|
||||
"*": deny
|
||||
"forgejo-label-manager": allow
|
||||
"repo-isolator": allow
|
||||
"git-commit-helper": allow
|
||||
"forgejo_*": allow
|
||||
# CRITICAL: Never list repo-level labels — use org labels via forgejo-label-manager
|
||||
"forgejo_list_repo_labels": deny
|
||||
@@ -55,10 +65,11 @@ You set up project infrastructure from scratch. Your caller provides the product
|
||||
6. **Forgejo milestones** — initial milestones based on product vision
|
||||
7. **Branch protection** — require CI and review for master/main
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Detect before creating.** Always check if something exists before creating it.
|
||||
2. **Never overwrite.** If a file or label already exists, skip it.
|
||||
3. **Credentials from prompt.** All Forgejo PAT, git identity, etc. come from the caller's prompt.
|
||||
4. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
5. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* any `forgejo_list_*` calls used when checking for existing labels, milestones, or workflows must be paginated — missing one means re-creating something that already exists.
|
||||
4. **Work in an isolated clone.** Use `repo-isolator` to create an isolated clone of the target repository in `/tmp/`. All file creation and edits must be done in the clone — never directly in `/app`. Use `git-commit-helper` to commit and push changes. Clean up the isolated clone using `repo-isolator` when done.
|
||||
5. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
6. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* any `forgejo_list_*` calls used when checking for existing labels, milestones, or workflows must be paginated — missing one means re-creating something that already exists.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#8E44AD"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -83,7 +87,7 @@ Each cycle:
|
||||
- Prefix: `AUTO-PROJ-OWN`
|
||||
- Cycle interval: ~5 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Only project owners assign MoSCoW labels.** Per CONTRIBUTING.md, MoSCoW labels are set exclusively by the project owner. That's you.
|
||||
2. **Comment on every triage decision.** Explain why an issue was verified, rejected, or marked Wont Do.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -50,7 +54,7 @@ Your prompt describes the triage decisions to apply (e.g., "verify issue #42 as
|
||||
1. For each issue in the batch: update its state label (via `issue-state-updater`), apply MoSCoW and priority labels (via `forgejo-label-manager`), assign milestone, and post a comment explaining the triage decision.
|
||||
2. Exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One batch, then exit.**
|
||||
2. **Comment on every triage decision.** Explain why.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: error
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -59,7 +63,7 @@ For each violation found, create an issue using `new-issue-creator` with:
|
||||
- Detailed description of what was merged without checks
|
||||
- Reference to the specific PR and commit
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_pull_requests` (use `limit=50` and paginate ALL pages — checking only the first page means CI violations in older PRs go undetected); `forgejo_list_pull_reviews` (paginate to verify all reviews on each PR); `forgejo_list_workflow_runs` (paginate to find all runs and identify any PRs merged without CI); `forgejo_list_branches` (paginate to verify branch protection on all branches).
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#6B7280"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -44,6 +48,6 @@ You load project reference materials and prepare them for distribution to child
|
||||
|
||||
You invoke `ref-reader` to get the raw summaries, then optionally tailor the content for specific consumers based on their role.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* bash `find` commands listing reference files must process all results; any future REST/curl calls returning JSON arrays must be paginated.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: google/gemini-2.5-pro
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -60,6 +64,6 @@ A structured summary covering:
|
||||
- Key architectural decisions from the specification
|
||||
- Current milestone status from the timeline
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* bash `find` commands listing documentation files must process all results to ensure the full specification and CONTRIBUTING.md are read.
|
||||
|
||||
@@ -9,7 +9,13 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: "#6B7280"
|
||||
permission:
|
||||
edit: deny
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -37,6 +43,8 @@ permission:
|
||||
# CRITICAL: DO NOT use forgejo_add_issue_labels directly
|
||||
# Always delegate to forgejo-label-manager for label operations
|
||||
"forgejo_add_issue_labels": deny
|
||||
"external_directory":
|
||||
"/tmp/**": allow
|
||||
---
|
||||
|
||||
# Repository Isolator
|
||||
@@ -101,7 +109,7 @@ Removes the temporary directory.
|
||||
rm -rf "$WORK_DIR"
|
||||
```
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never clone into `/app`.** Always use `/tmp/`.
|
||||
2. **Unique directory names.** Include agent name and timestamp to avoid collisions.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -73,7 +81,7 @@ Never run `robot` directly.
|
||||
4. Fix any failures and re-run until green.
|
||||
5. Return a summary of tests written.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.** Always work in the provided `/tmp/` directory.
|
||||
2. **One subtask, then exit.**
|
||||
|
||||
@@ -7,6 +7,10 @@ mode: primary
|
||||
temperature: 0.0
|
||||
color: error
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -44,6 +48,6 @@ You find and stop all stale automated sessions from previous runs. Use this befo
|
||||
1. Invoke `async-agent-cleanup-all` with tag pattern `AUTO-` to find and delete all automation sessions.
|
||||
2. Report how many sessions were cleaned up.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* the session list from `async-agent-cleanup-all` must include all sessions matching the pattern — if any page is missed, stale sessions survive and create duplicate supervisors on the next run.
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: secondary
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -41,7 +45,7 @@ You persist session state by creating tracking issues on Forgejo via the `automa
|
||||
|
||||
This agent delegates all tracking operations to `automation-tracking-manager` for consistency with the centralized tracking system.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent delegates to `automation-tracking-manager`, which itself must paginate all issue searches; ensure the tracking manager is invoked with complete parameters.
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: google/gemini-2.5-pro
|
||||
color: info
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -39,6 +43,6 @@ permission:
|
||||
|
||||
You read `docs/specification.md` and extract sections relevant to a specific issue or module. Your caller provides the context (issue description, module name) and you return the relevant architectural details.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* bash `find` or `cat` commands reading specification files must process all content; if `docs/specification/` is a directory with multiple section files, all files must be read.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -109,7 +113,7 @@ Every 5th idle cycle (when master hasn't changed), perform a proactive deep scan
|
||||
- Prefix: `AUTO-SPEC`
|
||||
- Cycle interval: ~15 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never remove unimplemented spec content.** The spec is forward-looking.
|
||||
2. **Two-step proposals.** Never modify the spec without approval.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -58,7 +66,7 @@ Your prompt describes the discrepancy between spec and implementation, the propo
|
||||
6. When updating an existing PR, always re-send the full body to prevent Forgejo API description deletion.
|
||||
7. Clean up and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One update, then exit.**
|
||||
2. **Never remove unimplemented spec content.**
|
||||
|
||||
@@ -8,6 +8,10 @@ temperature: 0.0
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: warning
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -56,6 +60,6 @@ You bulk-fix state label mismatches and dependency issues across all open issues
|
||||
- Always post a comment explaining each fix
|
||||
- **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* `forgejo_list_repo_issues` (use `limit=50` and paginate ALL pages — this agent’s entire purpose is auditing all issues; missing a page leaves state mismatches unfixed); `forgejo_list_repo_pull_requests` (same — all PRs must be checked for linked issue state correctness).
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.0
|
||||
model: openai/gpt-5-nano
|
||||
color: "#9B59B6"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -49,7 +53,7 @@ You check off completed subtasks in a Forgejo issue body. Your caller tells you
|
||||
|
||||
Always re-send the full issue body to avoid accidentally deleting content.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Apply labels via `forgejo-label-manager`.** Never apply labels directly or using the Forgejo MCP/task. All label operations must go through `forgejo-label-manager`.
|
||||
2. **Exhaustive pagination for all list results.** Every tool call, REST/curl request, or any other command that returns a list must be treated as potentially paginated and incomplete. Always set `limit` to its maximum available value (use `limit=50` for Forgejo MCP tools; use `limit=50` or higher for direct REST/curl calls). After each list response, check whether the number of returned items equals the page size — if so, there are likely more results; fetch the next page (`page=2`, `page=3`, …) and continue until receiving a partial page. Never assume the first response is the complete result. This rule applies to every list-returning call without exception. *Examples specific to this agent (not exhaustive):* this agent makes no direct paginated list calls, but any future tool or REST calls returning arrays must be paginated.
|
||||
|
||||
@@ -11,7 +11,15 @@ temperature: 0.1
|
||||
model: openai/gpt-5-codex
|
||||
color: accent
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -110,7 +118,7 @@ WHILE current_tier <= 4:
|
||||
|
||||
If all four tiers are exhausted with the same error, return failure with the persistent error details. The supervisor handles human escalation.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Escalate only on same problem.** Different errors = progress = stay at current tier.
|
||||
2. **Never skip quality gates.** All four must pass (lint, typecheck, unit, integration).
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#E74C3C"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -129,7 +133,7 @@ Each cycle:
|
||||
- Cycle interval: ~5 minutes
|
||||
- Read tracking issues from ALL other supervisors (you are the most comprehensive consumer)
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **You are the safety net.** If all other checks fail, you catch the problem.
|
||||
2. **Never merge PRs yourself.** That's the PR merge supervisor's job. If it's not working, create an announcement.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -54,7 +58,7 @@ Your prompt describes the correction to make (e.g., "fix the state label on issu
|
||||
2. Post a comment on affected issues explaining what was corrected and why.
|
||||
3. Exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One correction, then exit.**
|
||||
2. **Comment on changes.** Always explain what was fixed and why.
|
||||
|
||||
@@ -9,7 +9,15 @@ temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
color: warning
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -61,7 +69,7 @@ If unsure, treat it as a genuine bug — err on the side of fixing code rather t
|
||||
5. Re-run until all tests pass.
|
||||
6. Return a summary of what was fixed and why.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **Never delete a test without replacement.** If a test is obsolete, replace it with one that tests the current behavior.
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.2
|
||||
model: google/gemini-2.5-pro
|
||||
color: "#2ECC71"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -63,6 +67,13 @@ Workers are `test-infra-worker` agents. Each worker analyzes one area of testing
|
||||
|
||||
Workers use: `[AUTO-INF-<N>]` where N is a sequential number or area identifier.
|
||||
|
||||
### Dispatching Workers
|
||||
|
||||
Launch workers via the `async-agent-manager`. Each worker's prompt must include:
|
||||
- Area of focus (one of: CI timing, coverage gaps, test architecture, flaky tests, pipeline design, test data quality, missing test levels, dependency security)
|
||||
- Repository owner/name, Forgejo PAT, git identity
|
||||
- A customized briefing containing CONTRIBUTING.md merge requirements and open announcements
|
||||
|
||||
### Eight Analysis Areas
|
||||
|
||||
Workers are assigned one of these focus areas:
|
||||
@@ -104,7 +115,7 @@ This is the most critical concern for this supervisor. Historically, this agent
|
||||
- Prefix: `AUTO-INF-POOL`
|
||||
- Cycle interval: ~15 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never disable or weaken checks.** Never reduce coverage below 97%. Never remove CI steps.
|
||||
2. **Five dedup checks before every issue.** No exceptions.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.2
|
||||
model: google/gemini-2.5-pro
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -64,7 +68,7 @@ Your prompt tells you which analysis area to focus on (one of: CI timing, covera
|
||||
4. File validated proposals using `new-issue-creator`.
|
||||
5. Clean up your clone and exit.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One area, then exit.** Do not analyze additional areas.
|
||||
2. **Never disable or weaken checks.** Only propose additions and optimizations.
|
||||
|
||||
@@ -7,7 +7,15 @@ hidden: true
|
||||
temperature: 0.0
|
||||
model: openai/gpt-5-codex
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
|
||||
@@ -7,7 +7,15 @@ hidden: true
|
||||
temperature: 0.0
|
||||
model: anthropic/claude-haiku-4-5
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
|
||||
@@ -7,7 +7,15 @@ hidden: true
|
||||
temperature: 0.0
|
||||
model: anthropic/claude-opus-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
|
||||
@@ -7,7 +7,15 @@ hidden: true
|
||||
temperature: 0.0
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: deny
|
||||
bash:
|
||||
"*": deny
|
||||
|
||||
@@ -9,6 +9,10 @@ temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: "#2ECC71"
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -85,7 +89,7 @@ Each cycle:
|
||||
- Prefix: `AUTO-TIME`
|
||||
- Cycle interval: ~60 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Update at least daily.** The timeline must be updated at minimum once per day.
|
||||
2. **Never overwrite.** Add new entries; don't remove existing ones.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.1
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -53,8 +61,9 @@ Your prompt provides the current milestone status data and the timeline file for
|
||||
3. Add new entries — never overwrite existing ones.
|
||||
4. Commit using `git-commit-helper` with a Conventional Changelog message.
|
||||
5. Push and exit. (No PR needed — timeline updates go directly to master.)
|
||||
6. Clean up the isolated clone using `repo-isolator`.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One update, then exit.**
|
||||
2. **Never overwrite.** Add new entries; don't remove existing ones.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.1
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -50,7 +58,7 @@ You run the type checker and fix all type errors. You work in an isolated clone
|
||||
4. Repeat until all type checks pass.
|
||||
5. Return a summary of what was fixed.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never use `# type: ignore`.** Fix the actual type problem. This is non-negotiable per CONTRIBUTING.md.
|
||||
2. **Never work in `/app`.**
|
||||
|
||||
@@ -10,6 +10,10 @@ temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
color: success
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -103,7 +107,7 @@ Only assign critical bugs (`Priority/Critical`) to the active milestone. All oth
|
||||
- Prefix: `AUTO-UAT-POOL`
|
||||
- Cycle interval: ~10 minutes
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Test against the spec.** The specification is the source of truth for expected behavior.
|
||||
2. **Check before filing.** Always verify no open PR already addresses a gap before creating a bug issue.
|
||||
|
||||
@@ -8,6 +8,10 @@ hidden: true
|
||||
temperature: 0.3
|
||||
model: anthropic/claude-sonnet-4-6
|
||||
permission:
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit: deny
|
||||
webfetch: deny
|
||||
bash:
|
||||
@@ -63,7 +67,7 @@ Your prompt tells you which feature area to test and provides the relevant speci
|
||||
|
||||
Only assign `Priority/Critical` bugs to the active milestone. All other bugs go to the backlog with no milestone.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **One feature area, then exit.** Do not test additional features.
|
||||
2. **Check before filing.** Search for existing issues and PRs before creating bug reports.
|
||||
|
||||
@@ -8,7 +8,15 @@ hidden: true
|
||||
temperature: 0.2
|
||||
# NO MODEL SPECIFIED - inherits from caller (tier selector)
|
||||
permission:
|
||||
edit: allow
|
||||
"*": deny
|
||||
"doom_loop": deny
|
||||
question: deny
|
||||
"sequential-thinking*": allow
|
||||
edit:
|
||||
"*": deny
|
||||
"/tmp/**": allow
|
||||
external_directory:
|
||||
"/tmp/**": allow
|
||||
webfetch: allow
|
||||
bash:
|
||||
"*": deny
|
||||
@@ -50,7 +58,7 @@ You run Behave unit tests and fix any failures. You work in an isolated clone di
|
||||
4. Re-run until all tests pass.
|
||||
5. Return a summary of results and any fixes applied.
|
||||
|
||||
## Rules
|
||||
## **CRITICAL** Rules
|
||||
|
||||
1. **Never work in `/app`.**
|
||||
2. **Never suppress failures.** Fix the root cause.
|
||||
|
||||
+181
-158
@@ -5,6 +5,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Documentation
|
||||
|
||||
- Add `docs/api/decisions.md` — decision recording and tree CLI reference (v3.2.0)
|
||||
- Add `docs/api/invariants.md` — invariant management CLI reference (v3.2.0)
|
||||
- Add `docs/api/checkpoints.md` — checkpoint and rollback CLI reference (v3.3.0)
|
||||
- Add `docs/api/plan-corrections.md` — plan correction modes and subplan system overview (v3.2.0/v3.3.0)
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Automation Profile Silent Fallback** (#8232): `_resolve_profile_for_plan` in
|
||||
@@ -16,6 +23,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
logged at debug level for observability.
|
||||
|
||||
### Added
|
||||
- Wired `StrategyActor` into the real plan execution path: `_get_plan_executor`
|
||||
in `plan.py` now resolves the strategy actor via `resolve_strategy_actor()`
|
||||
(reading the `actor.default.strategy` config key) instead of always
|
||||
constructing `LLMStrategizeActor`. `run_strategize` in `PlanExecutor` now
|
||||
passes `resources` (derived from `plan.project_links`) and `project_context`
|
||||
to the actor so the LLM prompt receives full project context. Strategy
|
||||
decisions are serialised as JSON in `plan.error_details["strategy_decisions_json"]`
|
||||
so `_build_decisions` can reconstruct the full hierarchy (dependency ordering,
|
||||
parent/child structure) during Execute instead of rebuilding from
|
||||
`definition_of_done`. `StrategizeStubActor.execute` accepts `**kwargs` for
|
||||
forward-compatibility. Added BDD coverage for the stored-JSON path,
|
||||
corrupt-JSON fallback, resource-passing, and stub extra-kwargs scenarios.
|
||||
(#828)
|
||||
|
||||
|
||||
- **TDD Issue-Capture Test Activation** (#7025): Replaced 234 bare `@skip` tags
|
||||
across 82 Behave feature files with the correct `@tdd_expected_fail @tdd_issue
|
||||
@@ -143,6 +164,34 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Plan Concurrency Race Condition** (#7989): Fixed critical race condition in `execute_plan()` and
|
||||
`apply_plan()` where concurrent CLI/worker sessions could simultaneously modify the same plan,
|
||||
corrupting plan state. `LockService` is now wired into the plan lifecycle with plan-level advisory
|
||||
locking. Each invocation generates a unique caller identity (UUID) to prevent re-entrant lock
|
||||
acquisition by concurrent sessions on the same plan. Concurrent attempts now raise `LockConflictError`
|
||||
instead of silently racing. Lock is acquired before phase transition and released in a `finally`
|
||||
block to ensure cleanup even on error.
|
||||
|
||||
- **`--format color` ANSI Output** (#7910): Fixed `format_output` routing the `color` format
|
||||
option to `_format_plain`, which produced plain uncoloured text instead of ANSI escape
|
||||
sequences. The `color` format is now routed to `format_output_session` which uses the
|
||||
`ColorMaterializer` to emit proper ANSI-coloured output. `--format plain` and all other
|
||||
formats remain unaffected.
|
||||
|
||||
- **ContextTierService Thread Safety** (#7547): Added `threading.RLock` to
|
||||
`ContextTierService` to prevent `RuntimeError: dictionary changed size during
|
||||
iteration` and data corruption under concurrent plan execution. All public
|
||||
methods (`store`, `get`, `promote`, `demote`, `evict_lru`, `enforce_staleness`,
|
||||
`get_metrics`, `get_all_fragments`, `get_hot_fragments`, `get_for_actor`,
|
||||
`get_scoped_view`, `get_scoped_by_resource`, `get_scoped_metrics`) now acquire
|
||||
the reentrant lock before accessing the hot/warm/cold tier dicts. The service
|
||||
was previously documented as single-threaded but registered as a DI Singleton,
|
||||
causing potential data corruption when parallel subplans shared the same
|
||||
instance. The `TierRuntimeMixin.enforce_staleness()` and
|
||||
`ScopedTierMixin.get_scoped_by_resource()` / `get_scoped_metrics()` methods
|
||||
are also protected. The DI container registration as `providers.Singleton`
|
||||
is now correct and safe.
|
||||
|
||||
- **Validation Gate Empty-Run Guard** (#7508): Fixed `ApplyValidationSummary.all_required_passed`
|
||||
returning `True` when zero validations were run, silently bypassing the apply gate. The property
|
||||
now returns `False` when the validation result set is empty (`is_empty` is `True`), ensuring
|
||||
@@ -163,6 +212,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
`sandbox_root=.cleveragents/sandbox/`, so LLM file output (`FILE:` blocks)
|
||||
is written to disk during the execute phase. (#4222)
|
||||
|
||||
- **SubplanExecutionService fail_fast cancellation** (#7582): Fixed a race condition where
|
||||
already-running parallel subplans were not cancelled when `fail_fast` fired. Previously,
|
||||
`Future.cancel()` only prevented queued futures from starting but had no effect on
|
||||
in-flight futures that completed after `stop_flag` was set — their `COMPLETE` results
|
||||
were incorrectly included in the merge output. The fix adds a post-completion guard that
|
||||
overrides any non-`ERRORED`/non-`CANCELLED` result to `CANCELLED` when `stop_flag` is
|
||||
active, and clears the associated output to prevent it from entering the merge. Also
|
||||
replaces the O(n) linear `status` lookup in the `as_completed()` loop with an O(1)
|
||||
`status_map` dict pre-computed before the executor block.
|
||||
|
||||
- **Robot Framework TDD Listener Guards** (#5436): Added three guard conditions to the
|
||||
`tdd_expected_fail_listener` `end_test()` function to prevent blindly inverting ALL test
|
||||
failures to passes, which was masking infrastructure errors and causing flaky CI behavior.
|
||||
@@ -185,8 +244,130 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
`pr-merge-pool-supervisor` to the product-builder's supervisor launch list (18 total
|
||||
supervisors). Updated all numeric references, pre-flight checklists, and validation logic.
|
||||
|
||||
- `ActionRepository.update()` now uses explicit bulk `sa_delete()` + `session.flush()`
|
||||
before re-inserting child rows for `action_arguments` and `action_invariants`, fixing
|
||||
a `sqlite3.IntegrityError: UNIQUE constraint failed` crash when `agents plan use` was
|
||||
called on an action that already had arguments registered via `action create`. (#4197)
|
||||
|
||||
---
|
||||
## [3.5.0] — Unreleased (Autonomy Hardening)
|
||||
|
||||
### Added
|
||||
|
||||
- **A2A Facade Session and Plan Lifecycle** — Session and plan lifecycle operations
|
||||
are now functional via the CLI using the A2A (Agent-to-Agent) protocol facade.
|
||||
Supports `agents session start/list/stop` and plan execution via `agents plan execute
|
||||
--session SESSION_ID`. Follows ADR-047 (A2A Standard Adoption).
|
||||
|
||||
- **Event Queue Publish/Subscribe** — A new event queue system enables asynchronous
|
||||
publish/subscribe communication between agents and plan lifecycle components.
|
||||
Supports `agents events subscribe` and `agents events publish` CLI commands.
|
||||
Event types include `PLAN_CREATED`, `STRATEGIZE_COMPLETE`, `EXECUTE_COMPLETE`,
|
||||
`APPLY_COMPLETE`, `CORRECTION_APPLIED`, `INVARIANT_VIOLATED`, `SUBPLAN_STARTED`,
|
||||
`SUBPLAN_COMPLETE`, `SUBPLAN_FAILED`, and `GUARD_TRIGGERED`.
|
||||
|
||||
- **Guard Enforcement** — Three guard types protect against runaway autonomous
|
||||
execution: denylist (blocks specific tools/commands/file patterns), budget caps
|
||||
(limits LLM tokens, cost, wall time, file writes), and tool call limits (caps
|
||||
tool calls per subplan/plan and consecutive failures). Guards are configurable
|
||||
at tool, subplan, plan, and global levels.
|
||||
|
||||
- **Automation Profile Resolution Precedence** — Automation profiles now resolve
|
||||
with correct precedence: plan-level > action-level > global. The
|
||||
`_resolve_profile_for_plan` function raises a clear `ValidationError` when an
|
||||
unknown profile name is configured, listing available built-in profiles
|
||||
(`manual`, `semi-auto`, `auto`, `supervised`).
|
||||
|
||||
- **Hierarchical Plan Decomposition (4+ Levels)** — The strategy actor now
|
||||
decomposes plans into hierarchical subplan trees with 4+ levels of depth.
|
||||
Decomposition considers dependency analysis, complexity estimation, risk
|
||||
assessment, and resource constraints.
|
||||
|
||||
- **Decision Correction with Selective Subtree Recomputation** — When a decision
|
||||
correction is applied, only the affected subtree is recomputed. Unaffected
|
||||
branches of the plan tree are preserved, minimizing wasted work.
|
||||
|
||||
- **Parallel Execution Scaling (10+ Concurrent Subplans)** — `SubplanExecutionService`
|
||||
now scales to 10+ concurrent subplans via `ThreadPoolExecutor`. Fail-fast
|
||||
cancellation correctly overrides in-flight subplan results to `CANCELLED` when
|
||||
`stop_flag` is active, preventing corrupted merge output.
|
||||
|
||||
- **Large-Scale Autonomous Task Execution** — A realistic large-scale porting task
|
||||
(Firefox-scale codebase) completes autonomously using hierarchical decomposition,
|
||||
parallel execution, and validation-gated apply.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Server Stubs Moved to M9 (v3.8.0)** — Server stubs previously scoped to this
|
||||
milestone have been moved to v3.8.0 following the ACP to A2A protocol adoption
|
||||
(ADR-047) and server architecture redesign (ADR-048).
|
||||
|
||||
- **TUI Features Moved to M8 (v3.7.0)** — TUI features previously scoped to this
|
||||
milestone have been moved to v3.7.0.
|
||||
|
||||
### Technical
|
||||
|
||||
- `nox` passes with coverage >= 97% including large-project suites
|
||||
- Hierarchical decomposition validated at 4+ levels of subplan depth
|
||||
- Parallel execution validated at 10+ concurrent subplans
|
||||
- Decision correction validated for selective subtree recomputation only
|
||||
|
||||
---
|
||||
|
||||
## [3.4.0] — Unreleased (ACMS v1 + Context Scaling)
|
||||
|
||||
### Added
|
||||
|
||||
- **Advanced Context Management System (ACMS) v1** — The ACMS pipeline is now
|
||||
operational. Projects with 10,000+ files can be indexed and queried. The context
|
||||
assembly pipeline produces scoped, budget-constrained context views for actors.
|
||||
Hot/warm/cold storage tiers manage context lifecycle. See `docs/context.md` for
|
||||
full documentation.
|
||||
|
||||
- **Context Assembly CLI** — New `agents context` command suite:
|
||||
- `agents context list` — List all context fragments grouped by storage tier
|
||||
- `agents context add PATH` — Manually add a file or directory to context
|
||||
- `agents context show` — Show fragment details or assembled context view
|
||||
- `agents context clear` — Remove fragments from the tier service
|
||||
|
||||
- **Context Policies with View-Specific Settings** — Context policies are
|
||||
configurable in `.cleveragents/config.toml` with per-view overrides. Supports
|
||||
`max_file_size`, `max_total_size`, tier capacity thresholds, and file exclusion
|
||||
patterns.
|
||||
|
||||
- **Budget Enforcement** — `max_file_size` (default 256 KB) and `max_total_size`
|
||||
(default 10 MB) constraints are enforced during context assembly. Files exceeding
|
||||
`max_file_size` are skipped. Assembly stops when `max_total_size` is reached.
|
||||
|
||||
- **Context Analysis Summaries** — Context assembly produces meaningful summaries
|
||||
of the assembled context, including fragment counts per tier, total size, and
|
||||
coverage metrics.
|
||||
|
||||
- **ACMS Integration with Plan Execution** — Plan execution (`agents plan execute`)
|
||||
now leverages ACMS context for LLM calls. The `LLMExecuteActor` receives a
|
||||
scoped, budget-constrained context view assembled from project resources.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **ContextTierService Thread Safety** (#7547) — Added `threading.RLock` to
|
||||
`ContextTierService` to prevent `RuntimeError: dictionary changed size during
|
||||
iteration` and data corruption under concurrent plan execution. All public
|
||||
methods now acquire the reentrant lock before accessing tier data structures.
|
||||
|
||||
- **ACMS Context Tier Hydration** (#1028) — `ContextTierService` no longer starts
|
||||
empty on every CLI invocation. A new `context_tier_hydrator.py` reads files from
|
||||
linked project resources, creates `TieredFragment` objects, and stores them in
|
||||
the tier service before context assembly. Respects max file size (256 KB), total
|
||||
budget (10 MB), binary file exclusion, and directory skipping.
|
||||
|
||||
### Technical
|
||||
|
||||
- Projects with 10,000+ files index without timeout
|
||||
- Context window management validated across hot/warm/cold tiers
|
||||
- ACMS v1 pipeline produces scoped context output
|
||||
- Test coverage >= 97%
|
||||
|
||||
---
|
||||
## [3.8.0] — 2026-04-05
|
||||
|
||||
### Added
|
||||
@@ -208,161 +389,3 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
renders permission requests directly in the conversation stream for single-file
|
||||
operations. Users can allow/reject with single-key shortcuts (`a`/`A`/`r`/`R`),
|
||||
navigate with arrow keys, confirm with `Enter`, or press `v` to open the full
|
||||
permissions screen. (#1004)
|
||||
|
||||
- **TUI — Actor thought blocks**: Expandable reasoning trace widgets rendered
|
||||
inline in the conversation stream with muted styling. Collapsed by default;
|
||||
expand with `Space` or click. (#1005)
|
||||
|
||||
- **UKO provenance tracking**: Every typed triple now carries `sourceResource`,
|
||||
`validFrom`, and `isCurrent` metadata. A revision chain enables temporal
|
||||
queries and point-in-time ontology state reconstruction.
|
||||
|
||||
- **JSON-RPC 2.0 A2A wire format**: `A2aRequest`/`A2aResponse` fields renamed to
|
||||
standard JSON-RPC 2.0 names (`method`, `id`, `result`, `error`). The
|
||||
`A2aVersionNegotiator` handles backward compatibility.
|
||||
|
||||
- **Database resource handler**: Full CRUD and checkpoint/rollback support for
|
||||
SQLite, PostgreSQL, MySQL, and DuckDB resources via the resource DAG.
|
||||
|
||||
- **Estimation lifecycle hook**: `actor.default.estimation` config key wires an
|
||||
estimation actor into the Strategize-to-Estimate lifecycle hook.
|
||||
|
||||
- **Persona system**: YAML-backed personas bind actors, argument presets, and scope
|
||||
references to named identities; persisted in `~/.config/cleveragents/personas/`.
|
||||
|
||||
- **Session management**: Create, list, export, and import conversation sessions;
|
||||
full JSON export/import for portability; Markdown transcript export
|
||||
(`--format md`) for human-readable sharing.
|
||||
|
||||
- **First-run experience**: `ActorSelectionOverlay` guides new users to pick an
|
||||
actor on first TUI launch; creates a `"default"` persona automatically.
|
||||
|
||||
- **Server mode**: `agents server connect` configures a remote CleverAgents server;
|
||||
Kubernetes Helm chart in `k8s/` for production deployment.
|
||||
|
||||
- **A2A integration**: Agent-to-Agent protocol facade wires CLI and TUI to live
|
||||
application services (session, plan, registry, event).
|
||||
|
||||
- **Permissions screen**: TUI overlay for reviewing tool permission requests with
|
||||
unified, side-by-side, and context diff views; session-scoped allow/reject decisions.
|
||||
|
||||
- **Inline permission questions**: `PermissionQuestionWidget` renders single-file
|
||||
permission requests directly in the conversation stream with single-key shortcuts.
|
||||
|
||||
- **Invariant reconciliation**: `InvariantReconciliationActor` runs automatically at
|
||||
every plan phase transition; failures block the transition and emit `INVARIANT_VIOLATED`.
|
||||
|
||||
- **UKO runtime**: Universal Knowledge Ontology query interface, inference engine, and
|
||||
graph persistence for ACMS context strategies.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `LangChainChatProvider.name` and `model_id` are now mutable properties with setters,
|
||||
fixing an `AttributeError` when `PlanService` attempted to resolve provider names after
|
||||
instantiation. (#1553)
|
||||
|
||||
---
|
||||
|
||||
## [3.7.0] — 2026-03-15
|
||||
|
||||
### Added
|
||||
|
||||
- **Interactive TUI** (`agents tui`) — full-screen Textual app with multi-session tabs,
|
||||
persona switching, slash commands (67 commands across 14 groups), reference picker
|
||||
(`@`), shell mode (`!`), context-sensitive F1 help, and `Ctrl+T` argument preset cycling.
|
||||
- **Slash command system** — 67 commands across 14 groups accessible via `/` overlay.
|
||||
- **Reference picker** — `@` key opens a file/resource reference picker that inserts
|
||||
references into the input field.
|
||||
- **TUI persona system** — YAML-backed personas bind actors, argument presets, and scope
|
||||
references; persisted in `~/.config/cleveragents/personas/`.
|
||||
- **TUI session export/import** — full JSON round-trip and Markdown transcript export
|
||||
(`--format md`).
|
||||
|
||||
---
|
||||
|
||||
## [3.6.0] — 2026-02-28
|
||||
|
||||
### Added
|
||||
|
||||
- Advanced Context Management System (ACMS) with three-tier context strategy.
|
||||
- UKO Runtime (Universal Knowledge Ontology) with graph persistence and inference engine.
|
||||
- Implicit inference engine producing `uko:implicitSiblingOf`, `uko:implicitContains`,
|
||||
and `uko:implicitDependsOn` triples with confidence 0.7.
|
||||
|
||||
---
|
||||
|
||||
## [3.5.0] — 2026-02-14
|
||||
|
||||
### Added
|
||||
|
||||
- Autonomy hardening: advisory locking, validation pipeline, definition-of-done gating.
|
||||
- Resource DAG with dependency tracking and type hierarchy with multiple inheritance.
|
||||
- Container resource types (`container.docker`, `container.podman`).
|
||||
- LSP resource types (`lsp.*`).
|
||||
|
||||
---
|
||||
|
||||
## [3.4.0] — 2026-01-31
|
||||
|
||||
### Added
|
||||
|
||||
- ACMS v1 with context scaling strategies.
|
||||
- Resource type inheritance system (ADR-042).
|
||||
- Safety profile extraction (ADR-041).
|
||||
|
||||
---
|
||||
|
||||
## [3.3.0] — 2026-01-17
|
||||
|
||||
### Added
|
||||
|
||||
- Corrections and subplans support in plan lifecycle.
|
||||
- Checkpoint and rollback for all resource writes.
|
||||
- Decision tree versioning and history (ADR-034).
|
||||
- Decision tree rollback and replay (ADR-035).
|
||||
|
||||
---
|
||||
|
||||
## [3.2.0] — 2026-01-03
|
||||
|
||||
### Added
|
||||
|
||||
- Decisions, validations, and invariants in plan lifecycle.
|
||||
- Validation abstraction layer (ADR-013).
|
||||
- Invariant system (ADR-016).
|
||||
- Automation profiles (ADR-017).
|
||||
- Semantic error prevention (ADR-018).
|
||||
|
||||
---
|
||||
|
||||
## [3.1.0] — 2025-12-20
|
||||
|
||||
### Added
|
||||
|
||||
- MCP (Model Context Protocol) adapter and client (ADR-029).
|
||||
- LSP (Language Server Protocol) client integration (ADR-027).
|
||||
- Agent Skills Standard (AgentSkills.io) support (ADR-028).
|
||||
- Skill abstraction definition (ADR-030).
|
||||
|
||||
---
|
||||
|
||||
## [3.0.0] — 2025-12-06
|
||||
|
||||
### Added
|
||||
|
||||
- Initial public release of CleverAgents Core.
|
||||
- Unified `agents` / `cleveragents` CLI entry points.
|
||||
- Layered architecture: Entry Points → Application → Domain → Infrastructure → Integration → Core.
|
||||
- Actor system with YAML-defined LangGraph node graphs.
|
||||
- Tool system with four-stage lifecycle (activate → validate → execute → deactivate).
|
||||
- Skill system with three-tier progressive disclosure.
|
||||
- Resource system with DAG and type hierarchy.
|
||||
- A2A (Agent-to-Agent) protocol facade.
|
||||
- DI container (`cleveragents.application.container`).
|
||||
- LangChain/LangGraph integration (ADR-022).
|
||||
- Provider registry with fallback chain (OpenAI → Anthropic → Google → Azure → OpenRouter → Groq → Together → Cohere).
|
||||
- Observability: structured logging, metrics, audit trail, token/cost tracking.
|
||||
- BDD test suite (Behave + Robot Framework).
|
||||
- Nox automation for lint, typecheck, tests, docs, benchmarks.
|
||||
- MkDocs-powered documentation with CleverAgents branding.
|
||||
|
||||
@@ -15,4 +15,7 @@ Below are some of the specific details of various contributions.
|
||||
* Jeffrey Phillips Freeman has acted as Lead Developer, daily contributor, and Project Owner.
|
||||
* Brent E. Edwards has contributed quality assurance, test coverage, and CI pipeline improvements.
|
||||
* HAL 9000 has contributed automated implementation, bug fixes, and feature development as part of the CleverAgents automation pool.
|
||||
* HAL 9000 has contributed concurrency safety improvements, including thread-safe context tier management (issue #7547) for parallel plan execution.
|
||||
* HAL 9000 has contributed the plan concurrency race-condition fix (#7989): wired `LockService` into the plan lifecycle, guarding `execute_plan()` and `apply_plan()` with plan-level advisory locks and unique per-invocation owner identities to prevent silent concurrent state corruption.
|
||||
* This project was made possible thanks to considerable donation of time, money, and resources by CleverThis, Inc.
|
||||
* HAL 9000 has contributed automated bug fixes, CLI output formatting improvements, and ongoing maintenance as part of the CleverAgents automation system.
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
"""ASV benchmarks for LangGraph execution hotspots.
|
||||
|
||||
Measures performance of:
|
||||
- GraphExecutor.step execution
|
||||
- RouterNode.route decision making
|
||||
- Checkpoint read/write operations
|
||||
- Graph state transitions
|
||||
- Node execution throughput
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
try:
|
||||
from cleveragents.langgraph.graph import GraphConfig, LangGraph
|
||||
from cleveragents.langgraph.nodes import Edge, Node, NodeConfig, NodeType
|
||||
from cleveragents.langgraph.state import GraphState
|
||||
except ModuleNotFoundError:
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
|
||||
from cleveragents.langgraph.graph import GraphConfig, LangGraph
|
||||
from cleveragents.langgraph.nodes import Edge, Node, NodeConfig, NodeType
|
||||
from cleveragents.langgraph.state import GraphState
|
||||
|
||||
|
||||
def _create_simple_graph() -> LangGraph:
|
||||
"""Create a simple representative plan graph for benchmarking."""
|
||||
config = GraphConfig(
|
||||
name="bench-graph",
|
||||
nodes={
|
||||
"start": NodeConfig(name="start", type=NodeType.START),
|
||||
"process": NodeConfig(name="process", type=NodeType.FUNCTION),
|
||||
"route": NodeConfig(name="route", type=NodeType.CONDITIONAL),
|
||||
"end": NodeConfig(name="end", type=NodeType.END),
|
||||
},
|
||||
edges=[
|
||||
Edge(source="start", target="process"),
|
||||
Edge(source="process", target="route"),
|
||||
Edge(source="route", target="end"),
|
||||
],
|
||||
entry_point="start",
|
||||
checkpointing=False,
|
||||
)
|
||||
return LangGraph(config)
|
||||
|
||||
|
||||
def _create_checkpoint_graph() -> LangGraph:
|
||||
"""Create a graph with checkpointing enabled for persistence benchmarks."""
|
||||
checkpoint_dir = Path("/tmp/langgraph_bench_checkpoints")
|
||||
checkpoint_dir.mkdir(exist_ok=True)
|
||||
|
||||
config = GraphConfig(
|
||||
name="bench-graph-checkpoint",
|
||||
nodes={
|
||||
"start": NodeConfig(name="start", type=NodeType.START),
|
||||
"process": NodeConfig(name="process", type=NodeType.FUNCTION),
|
||||
"end": NodeConfig(name="end", type=NodeType.END),
|
||||
},
|
||||
edges=[
|
||||
Edge(source="start", target="process"),
|
||||
Edge(source="process", target="end"),
|
||||
],
|
||||
entry_point="start",
|
||||
checkpointing=True,
|
||||
checkpoint_dir=checkpoint_dir,
|
||||
)
|
||||
return LangGraph(config)
|
||||
|
||||
|
||||
def _create_complex_graph() -> LangGraph:
|
||||
"""Create a more complex graph with multiple nodes for throughput testing."""
|
||||
config = GraphConfig(
|
||||
name="bench-graph-complex",
|
||||
nodes={
|
||||
"start": NodeConfig(name="start", type=NodeType.START),
|
||||
"node1": NodeConfig(name="node1", type=NodeType.FUNCTION),
|
||||
"node2": NodeConfig(name="node2", type=NodeType.FUNCTION),
|
||||
"node3": NodeConfig(name="node3", type=NodeType.FUNCTION),
|
||||
"route": NodeConfig(name="route", type=NodeType.CONDITIONAL),
|
||||
"end": NodeConfig(name="end", type=NodeType.END),
|
||||
},
|
||||
edges=[
|
||||
Edge(source="start", target="node1"),
|
||||
Edge(source="node1", target="node2"),
|
||||
Edge(source="node2", target="node3"),
|
||||
Edge(source="node3", target="route"),
|
||||
Edge(source="route", target="end"),
|
||||
],
|
||||
entry_point="start",
|
||||
checkpointing=False,
|
||||
parallel_execution=True,
|
||||
)
|
||||
return LangGraph(config)
|
||||
|
||||
|
||||
class LangGraphExecutionSuite:
|
||||
"""Benchmark LangGraph execution hotspots."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize graphs for benchmarking."""
|
||||
self.simple_graph = _create_simple_graph()
|
||||
self.checkpoint_graph = _create_checkpoint_graph()
|
||||
self.complex_graph = _create_complex_graph()
|
||||
|
||||
# Sample input state
|
||||
self.sample_state = GraphState()
|
||||
|
||||
def time_simple_graph_execute(self) -> None:
|
||||
"""Measure simple graph execution time."""
|
||||
asyncio.run(self.simple_graph.execute(self.sample_state))
|
||||
|
||||
def time_complex_graph_execute(self) -> None:
|
||||
"""Measure complex graph execution time."""
|
||||
asyncio.run(self.complex_graph.execute(self.sample_state))
|
||||
|
||||
def time_checkpoint_graph_execute(self) -> None:
|
||||
"""Measure graph execution with checkpointing enabled."""
|
||||
asyncio.run(self.checkpoint_graph.execute(self.sample_state))
|
||||
|
||||
def time_state_manager_get_state(self) -> None:
|
||||
"""Measure state manager state retrieval."""
|
||||
self.simple_graph.state_manager.get_state()
|
||||
|
||||
def time_state_manager_update_state(self) -> None:
|
||||
"""Measure state manager state update."""
|
||||
new_state = GraphState()
|
||||
self.simple_graph.state_manager.state = new_state
|
||||
|
||||
def track_graph_nodes_count(self) -> int:
|
||||
"""Track number of nodes in simple graph."""
|
||||
return len(self.simple_graph.nodes)
|
||||
|
||||
def track_graph_edges_count(self) -> int:
|
||||
"""Track number of edges in simple graph."""
|
||||
return len(self.simple_graph.config.edges)
|
||||
|
||||
def track_execution_history_length(self) -> int:
|
||||
"""Track execution history length after execution."""
|
||||
return len(self.simple_graph.get_execution_history())
|
||||
|
||||
|
||||
class LangGraphRouterNodeSuite:
|
||||
"""Benchmark RouterNode routing performance."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize router node for benchmarking."""
|
||||
self.router_config = NodeConfig(
|
||||
name="router",
|
||||
type=NodeType.CONDITIONAL,
|
||||
condition={"type": "simple_condition"},
|
||||
)
|
||||
self.router_node = Node(self.router_config)
|
||||
|
||||
def time_router_node_creation(self) -> None:
|
||||
"""Measure router node instantiation time."""
|
||||
Node(self.router_config)
|
||||
|
||||
def time_router_node_config_access(self) -> None:
|
||||
"""Measure router node config access."""
|
||||
_ = self.router_node.config.condition
|
||||
|
||||
|
||||
class LangGraphStateTransitionSuite:
|
||||
"""Benchmark graph state transitions and updates."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize state for benchmarking."""
|
||||
self.state = GraphState()
|
||||
self.graph = _create_simple_graph()
|
||||
|
||||
def time_state_creation(self) -> None:
|
||||
"""Measure GraphState creation time."""
|
||||
GraphState()
|
||||
|
||||
def time_state_dict_conversion(self) -> None:
|
||||
"""Measure state to dict conversion."""
|
||||
self.state.to_dict()
|
||||
|
||||
def time_state_from_dict(self) -> None:
|
||||
"""Measure state from dict creation."""
|
||||
GraphState.from_dict({"messages": []})
|
||||
|
||||
def time_state_copy(self) -> None:
|
||||
"""Measure state copy operation."""
|
||||
self.state.copy()
|
||||
@@ -0,0 +1,200 @@
|
||||
"""ASV benchmarks for TUI rendering and command routing performance.
|
||||
|
||||
Measures performance of:
|
||||
- TUI layout and render cycle time
|
||||
- Slash command catalog hydration
|
||||
- Command routing overhead
|
||||
- Widget rendering performance
|
||||
- Session view updates
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
try:
|
||||
from cleveragents.tui.slash_catalog import (
|
||||
SLASH_COMMAND_SPECS,
|
||||
SlashCommandSpec,
|
||||
slash_command_specs,
|
||||
)
|
||||
except ModuleNotFoundError:
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
|
||||
from cleveragents.tui.slash_catalog import (
|
||||
SLASH_COMMAND_SPECS,
|
||||
SlashCommandSpec,
|
||||
slash_command_specs,
|
||||
)
|
||||
|
||||
|
||||
def _build_command_index() -> dict[str, list[SlashCommandSpec]]:
|
||||
"""Build a command index grouped by category."""
|
||||
index: dict[str, list[SlashCommandSpec]] = {}
|
||||
for spec in SLASH_COMMAND_SPECS:
|
||||
if spec.group not in index:
|
||||
index[spec.group] = []
|
||||
index[spec.group].append(spec)
|
||||
return index
|
||||
|
||||
|
||||
def _filter_commands_by_prefix(prefix: str) -> list[SlashCommandSpec]:
|
||||
"""Filter commands by prefix for autocomplete."""
|
||||
return [cmd for cmd in SLASH_COMMAND_SPECS if cmd.command.startswith(prefix)]
|
||||
|
||||
|
||||
class TUISlashCatalogSuite:
|
||||
"""Benchmark TUI slash command catalog operations."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize catalog for benchmarking."""
|
||||
self.catalog = SLASH_COMMAND_SPECS
|
||||
self.command_index = _build_command_index()
|
||||
|
||||
def time_catalog_iteration(self) -> None:
|
||||
"""Measure time to iterate through all commands."""
|
||||
for _ in self.catalog:
|
||||
pass
|
||||
|
||||
def time_catalog_grouping(self) -> None:
|
||||
"""Measure time to group commands by category."""
|
||||
_build_command_index()
|
||||
|
||||
def time_catalog_prefix_filter(self) -> None:
|
||||
"""Measure time to filter commands by prefix."""
|
||||
_filter_commands_by_prefix("session:")
|
||||
|
||||
def time_catalog_search(self) -> None:
|
||||
"""Measure time to search for a specific command."""
|
||||
target = "plan:execute"
|
||||
for cmd in self.catalog:
|
||||
if cmd.command == target:
|
||||
break
|
||||
|
||||
def time_command_spec_creation(self) -> None:
|
||||
"""Measure time to create a SlashCommandSpec."""
|
||||
SlashCommandSpec(
|
||||
command="test:command",
|
||||
group="Test",
|
||||
description="Test command",
|
||||
)
|
||||
|
||||
def track_catalog_size(self) -> int:
|
||||
"""Track total number of commands in catalog."""
|
||||
return len(self.catalog)
|
||||
|
||||
def track_unique_groups(self) -> int:
|
||||
"""Track number of unique command groups."""
|
||||
return len(self.command_index)
|
||||
|
||||
def track_largest_group_size(self) -> int:
|
||||
"""Track size of largest command group."""
|
||||
return max(len(cmds) for cmds in self.command_index.values())
|
||||
|
||||
|
||||
class TUICommandRoutingSuite:
|
||||
"""Benchmark TUI command routing performance."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize routing structures for benchmarking."""
|
||||
self.catalog = SLASH_COMMAND_SPECS
|
||||
self.command_map = {cmd.command: cmd for cmd in self.catalog}
|
||||
|
||||
def time_command_lookup(self) -> None:
|
||||
"""Measure time to lookup a command in the map."""
|
||||
_ = self.command_map.get("session:create")
|
||||
|
||||
def time_command_validation(self) -> None:
|
||||
"""Measure time to validate a command exists."""
|
||||
command = "plan:execute"
|
||||
command in self.command_map
|
||||
|
||||
def time_group_lookup(self) -> None:
|
||||
"""Measure time to find all commands in a group."""
|
||||
group = "Session"
|
||||
[cmd for cmd in self.catalog if cmd.group == group]
|
||||
|
||||
def time_description_search(self) -> None:
|
||||
"""Measure time to search commands by description."""
|
||||
search_term = "session"
|
||||
[
|
||||
cmd
|
||||
for cmd in self.catalog
|
||||
if search_term.lower() in cmd.description.lower()
|
||||
]
|
||||
|
||||
def track_command_map_size(self) -> int:
|
||||
"""Track size of command lookup map."""
|
||||
return len(self.command_map)
|
||||
|
||||
|
||||
class TUISessionViewSuite:
|
||||
"""Benchmark TUI session view operations."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize session view for benchmarking."""
|
||||
from cleveragents.tui.app import SessionView
|
||||
|
||||
self.session = SessionView(
|
||||
session_id="bench-session-001",
|
||||
transcript=["message 1", "message 2", "message 3"],
|
||||
)
|
||||
|
||||
def time_session_view_creation(self) -> None:
|
||||
"""Measure time to create a SessionView."""
|
||||
from cleveragents.tui.app import SessionView
|
||||
|
||||
SessionView(
|
||||
session_id="test-session",
|
||||
transcript=["test message"],
|
||||
)
|
||||
|
||||
def time_transcript_append(self) -> None:
|
||||
"""Measure time to append to transcript."""
|
||||
self.session.transcript.append("new message")
|
||||
|
||||
def time_transcript_iteration(self) -> None:
|
||||
"""Measure time to iterate through transcript."""
|
||||
for _ in self.session.transcript:
|
||||
pass
|
||||
|
||||
def track_session_id_length(self) -> int:
|
||||
"""Track session ID length."""
|
||||
return len(self.session.session_id)
|
||||
|
||||
def track_transcript_size(self) -> int:
|
||||
"""Track transcript message count."""
|
||||
return len(self.session.transcript)
|
||||
|
||||
|
||||
class TUIWidgetRenderingSuite:
|
||||
"""Benchmark TUI widget rendering operations."""
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Initialize widgets for benchmarking."""
|
||||
self.command_specs = SLASH_COMMAND_SPECS
|
||||
self.sample_text = "Sample widget content for rendering"
|
||||
|
||||
def time_command_spec_string_conversion(self) -> None:
|
||||
"""Measure time to convert command spec to string."""
|
||||
spec = self.command_specs[0]
|
||||
str(spec)
|
||||
|
||||
def time_command_spec_formatting(self) -> None:
|
||||
"""Measure time to format command spec for display."""
|
||||
spec = self.command_specs[0]
|
||||
f"{spec.command} - {spec.description}"
|
||||
|
||||
def time_text_rendering_short(self) -> None:
|
||||
"""Measure time to render short text."""
|
||||
len(self.sample_text)
|
||||
|
||||
def time_text_rendering_long(self) -> None:
|
||||
"""Measure time to render long text."""
|
||||
long_text = self.sample_text * 100
|
||||
len(long_text)
|
||||
|
||||
def track_widget_content_size(self) -> int:
|
||||
"""Track size of widget content."""
|
||||
return len(self.sample_text)
|
||||
@@ -0,0 +1,237 @@
|
||||
# Checkpoint and Rollback API (v3.3.0)
|
||||
|
||||
CleverAgents supports checkpointing and rollback to snapshot sandbox state during plan
|
||||
execution and restore it later. This page documents the CLI commands and Python API for
|
||||
managing checkpoints.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Checkpointing introduced in **v3.3.0** allows operators to:
|
||||
|
||||
- Snapshot sandbox state at key points during plan execution.
|
||||
- Roll back to a previous snapshot to undo tool side-effects.
|
||||
- Integrate with the decision-correction revert flow for targeted re-execution.
|
||||
|
||||
Checkpoints are immutable records stored in the `checkpoint_metadata` SQLite table and
|
||||
backed by a `CheckpointRepository`. The `CheckpointService` is registered in the DI
|
||||
container and injected into `ToolRunner`, `SubplanExecutionService`, and `PlanExecutor`.
|
||||
|
||||
---
|
||||
|
||||
## CLI Reference
|
||||
|
||||
### `agents plan checkpoint list`
|
||||
|
||||
List all checkpoints for a plan.
|
||||
|
||||
```bash
|
||||
agents plan checkpoint list <PLAN_ID> [OPTIONS]
|
||||
```
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--format`, `-f` | Output format: `json`, `yaml`, `plain`, `table`, `rich` |
|
||||
|
||||
**Examples:**
|
||||
|
||||
```bash
|
||||
# List checkpoints for a plan
|
||||
agents plan checkpoint list 01HXYZ1234567890ABCDEFGH
|
||||
|
||||
# JSON output for scripting
|
||||
agents plan checkpoint list 01HXYZ1234567890ABCDEFGH --format json
|
||||
```
|
||||
|
||||
Each checkpoint entry shows:
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| `checkpoint_id` | ULID identifier |
|
||||
| `checkpoint_type` | `pre_write`, `post_step`, or `manual` |
|
||||
| `decision_id` | Optional decision this checkpoint is aligned to |
|
||||
| `sandbox_ref` | Git commit hash or patch reference |
|
||||
| `size_bytes` | Size of the checkpoint data |
|
||||
| `created_at` | UTC creation timestamp |
|
||||
|
||||
---
|
||||
|
||||
### `agents plan rollback`
|
||||
|
||||
Roll back a plan's sandbox to a previously captured checkpoint.
|
||||
|
||||
```bash
|
||||
agents plan rollback [--yes|-y] <PLAN_ID> <CHECKPOINT_ID>
|
||||
```
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--yes`, `-y` | Skip the interactive confirmation prompt |
|
||||
|
||||
**Examples:**
|
||||
|
||||
```bash
|
||||
# Rollback with confirmation prompt
|
||||
agents plan rollback 01HXYZ1234567890ABCDEFGH 01HABC1234567890ABCDEFGH
|
||||
|
||||
# Skip confirmation (for scripts/CI)
|
||||
agents plan rollback --yes 01HXYZ1234567890ABCDEFGH 01HABC1234567890ABCDEFGH
|
||||
```
|
||||
|
||||
**JSON output envelope** (when using `--format json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"rollback_summary": {
|
||||
"plan_id": "...",
|
||||
"from_checkpoint_id": "...",
|
||||
"restored_files_count": 3
|
||||
},
|
||||
"changes_reverted": ["path/to/file1.py", "path/to/file2.py"],
|
||||
"impact": {
|
||||
"files_affected": 3
|
||||
},
|
||||
"post_rollback_state": {
|
||||
"active_checkpoint": "...",
|
||||
"plan_id": "..."
|
||||
},
|
||||
"timing": {
|
||||
"elapsed_seconds": 0.042
|
||||
},
|
||||
"messages": ["Rollback completed successfully."]
|
||||
}
|
||||
```
|
||||
|
||||
**Error cases:**
|
||||
|
||||
| Error | Cause |
|
||||
|-------|-------|
|
||||
| `Rollback blocked: plan is already applied` | Plan has reached terminal `applied` state |
|
||||
| `Rollback blocked: sandbox is missing` | Sandbox was cleaned up before rollback |
|
||||
| `Not found: checkpoint` | Checkpoint ID does not exist |
|
||||
| `Validation Error` | Checkpoint does not belong to the specified plan |
|
||||
|
||||
---
|
||||
|
||||
## Checkpoint Lifecycle
|
||||
|
||||
### Checkpoint Types
|
||||
|
||||
| Type | When Created |
|
||||
|------|-------------|
|
||||
| `pre_write` | Automatically before each write-tool execution |
|
||||
| `post_step` | Automatically after each write-tool execution |
|
||||
| `manual` | Via `CheckpointService.create_checkpoint()` directly |
|
||||
|
||||
### Automatic Checkpoint Triggers (v3.8.0+)
|
||||
|
||||
The execution engine supports four automatic triggers, configurable via
|
||||
`core.checkpoints.auto_create_on`:
|
||||
|
||||
| Trigger | When | Component |
|
||||
|---------|------|-----------|
|
||||
| `on_tool_write` | Before each write-tool execution | `ToolRunner` |
|
||||
| `on_tool_write_complete` | After each write-tool execution | `ToolRunner` |
|
||||
| `on_subplan_spawn` | Before first subplan execution attempt | `SubplanExecutionService` |
|
||||
| `on_error` | When the Execute phase fails | `PlanExecutor` |
|
||||
|
||||
**Configuration:**
|
||||
|
||||
```toml
|
||||
[core.checkpoints]
|
||||
auto_create_on = ["on_tool_write", "on_tool_write_complete", "on_subplan_spawn", "on_error"]
|
||||
```
|
||||
|
||||
To disable all automatic checkpoints:
|
||||
|
||||
```toml
|
||||
[core.checkpoints]
|
||||
auto_create_on = []
|
||||
```
|
||||
|
||||
### Retention Policy
|
||||
|
||||
A `CheckpointRetentionPolicy` governs how many checkpoints a plan may keep:
|
||||
|
||||
| Field | Default | Range |
|
||||
|-------|---------|-------|
|
||||
| `max_checkpoints` | 50 | 1–100 |
|
||||
| `auto_prune` | `true` | — |
|
||||
|
||||
When `auto_prune` is enabled and the count exceeds `max_checkpoints`, the oldest
|
||||
**interior** checkpoints are removed. The first (earliest) and most recent checkpoints
|
||||
are always preserved.
|
||||
|
||||
---
|
||||
|
||||
## Checkpoint Data Model
|
||||
|
||||
Each checkpoint stores:
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `checkpoint_id` | ULID | Unique identifier |
|
||||
| `plan_id` | ULID | The plan that owns this checkpoint |
|
||||
| `sandbox_ref` | str | Git commit hash or patch reference |
|
||||
| `decision_id` | ULID \| None | Optional decision alignment |
|
||||
| `checkpoint_type` | str | `pre_write`, `post_step`, or `manual` |
|
||||
| `resource_id` | ULID \| None | Optional resource association |
|
||||
| `filesystem_path` | str | Relative path within the checkpoint directory |
|
||||
| `size_bytes` | int | Size of the checkpoint data in bytes |
|
||||
| `created_at` | datetime | UTC creation timestamp |
|
||||
| `metadata` | dict | Audit metadata: `reason`, `source_tool`, `phase`, `extra` |
|
||||
|
||||
---
|
||||
|
||||
## Python API
|
||||
|
||||
The `CheckpointService` is obtained from the DI container:
|
||||
|
||||
```python
|
||||
from cleveragents.application.container import get_container
|
||||
|
||||
checkpoint_service = get_container().checkpoint_service()
|
||||
|
||||
# Create a manual checkpoint
|
||||
checkpoint = checkpoint_service.create_checkpoint(
|
||||
plan_id="01HV...",
|
||||
sandbox_ref="abc123",
|
||||
checkpoint_type="manual",
|
||||
metadata={"reason": "pre-correction snapshot", "phase": "execute"},
|
||||
)
|
||||
|
||||
# List checkpoints for a plan
|
||||
checkpoints = checkpoint_service.list_checkpoints(plan_id="01HV...")
|
||||
|
||||
# Roll back to a checkpoint
|
||||
result = checkpoint_service.rollback_to_checkpoint(
|
||||
plan_id="01HV...",
|
||||
checkpoint_id="01HABC...",
|
||||
)
|
||||
print(f"Restored {result.restored_files_count} files")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Rollback Guards
|
||||
|
||||
The rollback operation enforces two guards:
|
||||
|
||||
1. **Plan is applied** — Once a plan reaches the `applied` terminal state, rollback is
|
||||
rejected with a `BusinessRuleViolation`.
|
||||
2. **Sandbox is missing** — If the sandbox has been cleaned up, rollback is rejected
|
||||
because there is nothing to restore.
|
||||
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
- [`docs/reference/checkpointing.md`](../reference/checkpointing.md) — Full checkpointing domain model reference
|
||||
- [`docs/api/plan-corrections.md`](plan-corrections.md) — Plan correction modes (revert uses checkpoints)
|
||||
- [ADR-015: Sandbox & Checkpoint](../adr/ADR-015-sandbox-and-checkpoint.md)
|
||||
- [ADR-035: Decision Tree Rollback & Replay](../adr/ADR-035-decision-tree-rollback-and-replay.md)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user