Compare commits

...

16 Commits

Author SHA1 Message Date
HAL9000 43df9576ba fix(cleanup): invalidate sandbox_dirs_cache after purge (#7527)
CleanupService._purge_sandboxes() removed stale sandbox directories via
shutil.rmtree() without invalidating _sandbox_dirs_cache, causing subsequent
calls to _get_sandbox_dirs() to return references to already-deleted paths.

Fix: reset _sandbox_dirs_cache to None at end of _purge_sandboxes() so that
the next scan re-reads the filesystem state. Updated docstring to document
this cache invalidation behavior. Added BDD scenarios verifying the cache is
reset after purge and that subsequent scans re-discover filesystem content.

ISSUES CLOSED: #7527
2026-05-08 17:31:48 +00:00
clever-agent 7d3715bd58 build: restricted bash to durther prevent force merges or sudo escalation
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 1m24s
CI / lint (pull_request) Successful in 1m38s
CI / quality (pull_request) Successful in 1m39s
CI / push-validation (pull_request) Successful in 48s
CI / benchmark-regression (pull_request) Failing after 1m29s
CI / helm (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 1m58s
CI / security (pull_request) Successful in 2m1s
CI / e2e_tests (pull_request) Successful in 5m57s
CI / integration_tests (pull_request) Successful in 6m56s
CI / unit_tests (pull_request) Failing after 9m12s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
2026-05-07 23:17:32 -04:00
clever-agent d53cdc3607 build: Had to re-restrict the permissions on the agents, they were misbehaving 2026-05-07 21:08:31 -04:00
clever-agent 5d02a7c957 Fixed a bad/old escalation table 2026-05-07 18:10:43 -04:00
HAL9000 b9edc377d8 docs(spec): clarify layer boundary DI exception, ULID scope, TUI/ACMS gap-fill [AUTO-ARCH-1]
Add targeted clarifications to docs/specification.md to fill identified gaps:

1. Layer boundary DI Container Exception (Cross-Milestone Architectural Invariants)
2. ULID Scope Clarification - domain vs internal identifiers
3. ACMS Pipeline Protocol Contracts with storage tiers and budget protocol
4. TUI Component Interfaces with verifiable checks

Co-authored-by: CleverAgents Bot <bot@cleveragents.com>

ISSUES CLOSED: #10451
2026-05-07 10:43:39 +00:00
clever-agent df04392ebb build: testing agents with allow first permissions 2026-05-06 22:36:23 -04:00
clever-agent 8758455aaa build: fixed the tiers to now only use qwen and kimi 2026-05-05 23:27:43 -04:00
clever-agent 581b59f070 build: improved the startup script for auto-agents 2026-05-05 20:19:24 -04:00
clever-agent 3da61ba891 build: opened up echo and cat perms to help smooth over some tool calls 2026-05-05 20:11:19 -04:00
clever-agent b75feaf7a3 build: changed permission on auto-agents script 2026-05-05 18:56:03 -04:00
clever-agent 7dda57b054 build: added deny permission for sudo calls 2026-05-05 18:54:42 -04:00
clever-agent fc5a8a9e6d build: implement explicit-vs-fetched variable propagation across all agents
All agents now track which variables were explicitly present in their prompt
versus fetched from environment variables or git remote. When constructing
subagent prompts, only explicitly-present variables are included. Fetched
variables are omitted, allowing each subagent to fetch them independently.

This prevents credentials and other fetched values from being garbled as they
propagate through multiple LLM prompt layers.

Affected agents:
- auto-agents (primary orchestrator)
- implementation-supervisor, pr-merge-supervisor, pr-review-supervisor
- supervisor (generic)
- implementation-worker, pr-merge-worker, pr-review-worker
- task-implementor, tier-dispatcher
- work-group-util, git-clone-util, git-push-util, git-checkout-util
2026-05-05 22:22:09 +00:00
clever-agent f8f74a56d9 build: added critical rule clearly stating no question asking 2026-05-05 16:54:25 -04:00
clever-agent 02e7cb39f6 build: improved some of the standard bash permissions to access fetchable variables at every level 2026-05-05 16:32:01 -04:00
clever-agent e1bfc970a7 build: Fixed models being used to align with new endpoints 2026-05-05 16:18:33 -04:00
clever-agent e16181a7ec build: pulled in new endpoints and fixing permission from experimental branch 2026-05-05 16:12:53 -04:00
50 changed files with 4220 additions and 1081 deletions
+143 -7
View File
@@ -17,7 +17,7 @@
"CleverThis": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://d651xgxku0ipo0pb.us-east-2.aws.endpoints.huggingface.cloud/v1",
"baseURL": "https://ke5ntcikhnj2clcp.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
@@ -89,7 +89,7 @@
"CleverThis-5": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://f4jvts1w3gue3tqu.us-east-1.aws.endpoints.huggingface.cloud/v1",
"baseURL": "https://fhe4kwehnm1rb275.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
@@ -97,8 +97,8 @@
}
},
"models": {
"Qwen3-Coder-Next-GGUF-Q8-0": {
"name": "Qwen3 Coder Next GGUF Q8_0 (Instruct)",
"Qwen3-Coder-Next-GGUF-BF16": {
"name": "Qwen3 Coder Next GGUF BF16",
"tools": true
}
}
@@ -140,7 +140,7 @@
"CleverThis-8": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://u1txtbgmwbllttq0.us-east-1.aws.endpoints.huggingface.cloud/v1",
"baseURL": "https://ki19d58snp1d3qa4.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
@@ -148,8 +148,144 @@
}
},
"models": {
"Qwen3-Coder-Next-GGUF-Q6-K": {
"name": "Qwen3 Coder Next GGUF Q6_K (Instruct)",
"Qwen3-Coder-Next-GGUF-Q4-0": {
"name": "Qwen3 Coder Next GGUF Q4_0",
"tools": true
}
}
},
"CleverThis-9": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://m56026p5kxvout0d.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-6-35B-A3B-GGUF-MXFP4-MOE": {
"name": "Qwen 3.6 35b A3B GGUF MXFP4_MOE (Thinking)",
"tools": true
}
}
},
"CleverThis-10": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://dirv1cnem5wqzoax.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-235B-A22B-INST-GGUF-Q8-0": {
"name": "Qwen3 235b A22B GGUF Q8_0 (Instruct)",
"tools": true
}
}
},
"CleverThis-11": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://hueiyrdbly1ff4oo.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-235B-A22B-INST-GGUF-UD-Q2-K-XL": {
"name": "Qwen3 235b A22B GGUF UD-Q2_K_XL (Instruct)",
"tools": true
}
}
},
"CleverThis-12": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://atocunu78hjdnu3f.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-30B-A3B-INST-GGUF-UD-Q8-K-XL": {
"name": "Qwen3 30b A3B GGUF UD-Q8_K_XL (Instruct)",
"tools": true
}
}
},
"CleverThis-13": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://dpe3orf5en4581im.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-30B-A3B-INST-GGUF-UD-Q5-K-XL": {
"name": "Qwen3 30b A3B GGUF UD-Q5_K_XL (Instruct)",
"tools": true
}
}
},
"CleverThis-14": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://jamyigykfzm39bcu.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"MiniMax-M2-7-GGUF-UD-Q4-K-XL": {
"name": "MiniMax M2.7 GGUF UD-Q4_K_XL (Thinking)",
"tools": true
}
}
},
"CleverThis-15": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://n4u4h8h0fgintms4.us-east-1.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL": {
"name": "Qwen 3.6 35b A3B GGUF UD-Q3_K_XL (Thinking)",
"tools": true
}
}
},
"CleverThis-16": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://kcgeda25msp4dkwm.us-east-2.aws.endpoints.huggingface.cloud/v1",
"apiKey": "{env:HF_TOKEN}",
"headers": {
"X-HF-Bill-To": "CleverThis",
"Authorization": "Bearer {env:HF_TOKEN}",
}
},
"models": {
"Qwen3-code-480B-A35B-INST-GGUF-1M-UD-Q3-K-XL": {
"name": "Qwen3 Code 480b A35B GGUF UD-Q3_K_XL (Instruct, 1M Context)",
"tools": true
}
}
@@ -1,38 +0,0 @@
---
description: >
Agent evolution pool supervisor. Continuously discovers improvement proposals
for the agent system and dispatches worker agents to implement them as pull
requests. Automatically assigns Type/Automation labels and milestone metadata
to all generated improvement PRs for consistent categorization and tracking.
mode: all
hidden: false
---
# Agent Evolution Pool Supervisor
## PR Metadata Assignment
The supervisor looks up the Type/Automation label and earliest open milestone
before dispatching a worker to create an improvement PR.
### Label Lookup
Search repository labels for Type/Automation or Automation/* pattern.
Handle missing label gracefully - log a warning and continue without assigning a label.
### Milestone Lookup
Retrieve the earliest open milestone by due date.
Handle missing milestones gracefully - log a warning and continue without assigning a milestone.
### Passing Metadata to the Worker
Include the resolved label ID and milestone ID in the worker prompt context.
The worker uses these values when calling the Forgejo PR creation API.
## Permissions
This agent requires the following Forgejo API permissions:
- `forgejo_list_repo_labels` -- to look up the Type/Automation label ID
- `forgejo_list_repo_milestones` -- to look up the earliest open milestone ID
+79 -13
View File
@@ -8,29 +8,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -44,8 +104,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# Session scripts — the primary way this agent calls localhost:4096
"npx --yes tsx *.opencode/skills/auto-agents-system/scripts/*": allow
@@ -56,6 +119,9 @@ permission:
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"*force_merge": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -488,6 +554,6 @@ If a script exits with a non-zero status code or writes `ERROR:` to stderr:
- **Always use --prompt-file for complex prompts.** Write to /tmp first to avoid shell-escaping issues with large or special-character prompt text.
- **Return structured results.** Always include the session ID, status, and any relevant details from the script output.
- **Scripts handle retries.** Each script retries up to 3 times on transient failures — do not add external retry loops around script calls.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
- **Return script output faithfully.** For all standard operations, return the JSON from the script to the caller without unnecessary transformation. For composite queries (e.g. counting available worker slots from a session list), you may compute and report derived values on top of the raw script output.
- **For `health`, apply genuine judgment.** Read the `recent_messages` field of each session carefully. Look for error patterns, workaround attempts, tool failures, and progress signals before classifying. Do not guess — base your classification on the actual message content.
+92 -18
View File
@@ -9,28 +9,88 @@ description: >
mode: primary
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#FF9999"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent runs autonomously and never needs to ask questions
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -44,9 +104,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"npx --yes tsx *.opencode/skills/auto-agents-system/scripts/*": allow
@@ -57,10 +119,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -110,9 +177,10 @@ Startup steps:
1. Parse and validate prompt parameters
2. Fallback to environment variables, and fetch needed variables, for any missing settings
3. If any required parameters are still missing or malformed, exit immediately and report the error
4. For each supervisor in the managed list, check whether a session with its tag already exists using `async-agent-util` and stop it if its busy, then delete the session, again using `async-agent-util` to carry this out.
5. For each supervisor in the managed list, bring up the agent via `async-agent-util`.
3. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in supervisor launch prompts. Fetched variables must never be propagated through prompts — each supervisor will fetch them itself.
4. If any required parameters are still missing or malformed, exit immediately and report the error
5. For each supervisor in the managed list, check whether a session with its tag already exists using `async-agent-util` and stop it if its busy, then delete the session, again using `async-agent-util` to carry this out.
6. For each supervisor in the managed list, bring up the agent via `async-agent-util`.
**CRITICAL:** After the startup sequence above completes successfully immediately start the main loop (see section "Main loop"), which must run forever until this process is killed. Do **not** under any circumstances stop to summarize or pause for further instructions, and do not ask questions.
@@ -184,6 +252,8 @@ The following represents the variables that are either passed down through the p
**CRITICAL:** For all parameters in the above table, the value should first attempt to be set from information in the prompt, if that doesn't exist then you should either attempt to fetch the variable, or check the environment variable, if those are available options. Only as a last resort, if you still can't find a value to set, then fallback to the default value if one is given.
**CRITICAL — Explicit vs Fetched Variables:** When constructing supervisor launch prompts, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table above may be passed in your prompt. Some are required and some are optional. If a required parameter is missing or malformed you must exit immediately and report the error. Optional parameters that are absent from the prompt can be resolved through the fallback mechanisms described below.
@@ -341,7 +411,7 @@ Used when starting or restarting the PR merge supervisor.
```
```
**NOTE:** Do NOT include credentials in the prompt_text. Supervisors read all credentials (Forgejo PAT, URL, owner, repo, git identity) directly from environment variables. Passing credentials through prompts risks corruption. The `max_workers` parameter is calculated and passed separately to control the supervisor's worker pool size.
**CRITICAL — Variable conditional inclusion:** Only include a variable line above if that variable was **explicitly present** in the prompt you received. If you fetched a variable from an environment variable or git remote, **omit that line entirely**. The `pr-merge-supervisor` will fetch missing variables itself from its own environment variables.
#### Operation: Launch implementation-supervisor
@@ -354,7 +424,7 @@ Used when starting or restarting the implementation supervisor.
Start the async agent with the above parameters.
Start the `implementation-supervisor` agent asynchronously with the above parameters alogn with the following prompt body:
Start the `implementation-supervisor` agent asynchronously with the above parameters along with the following prompt body:
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -369,6 +439,8 @@ Used when starting or restarting the implementation supervisor.
```
```
**CRITICAL — Variable conditional inclusion:** Only include a variable line above if that variable was **explicitly present** in the prompt you received. If you fetched a variable from an environment variable or git remote, **omit that line entirely**. The `implementation-supervisor` will fetch missing variables itself from its own environment variables.
#### Operation: Launch pr-review-supervisor
Used when starting or restarting the PR review supervisor. **Important:** This supervisor runs entirely on the reviewer bot identity — pass `forgejo_reviewer_pat`, `forgejo_reviewer_username`, and `forgejo_reviewer_password` as its `forgejo_pat`, `forgejo_username`, and `forgejo_password` respectively. Do NOT pass the primary bot credentials.
@@ -392,6 +464,8 @@ Used when starting or restarting the PR review supervisor. **Important:** This s
```
```
**CRITICAL — Variable conditional inclusion:** Only include a variable line above if that variable was **explicitly present** in the prompt you received. If you fetched a variable from an environment variable or git remote, **omit that line entirely**. The `pr-review-supervisor` will fetch missing variables itself from its own environment variables.
#### Parameters to pass
| Operation | Key parameters passed |
@@ -410,7 +484,7 @@ All credential variables (`{forgejo_url}`, `{forgejo_owner}`, `{forgejo_repo}`,
- **Run forever.** This agent must never exit under any circumstances. If all supervisors are healthy, keep sleeping and checking. There is no "done" state.
- **Never implement work yourself.** You only launch and monitor supervisors. All actual work is performed by the supervisors and their workers.
- **Never skip a health check cycle.** Every supervisor must be checked on every loop iteration, regardless of what happened to the others.
- **Always restart with full credentials.** When launching or restarting a supervisor, always embed the complete set of credentials in the prompt. Supervisors never read environment variables — they get everything from their prompt.
- **Only pass explicitly-present variables.** When launching or restarting a supervisor, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — subagents will fetch them themselves.
- **Use `restart: true` when launching after a prior session.** This ensures the old session is cleaned up and does not conflict with the new one.
- **15 minutes is the staleness threshold.** A busy session with no message activity for 15 or more minutes is considered unhealthy and must be restarted.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
-509
View File
@@ -1,509 +0,0 @@
---
description: >
Testing infrastructure improvement pool supervisor and worker. In pool mode
(max_workers > 1), identifies analysis areas (CI timing, coverage gaps, test
architecture, flaky tests, pipeline optimization, missing test levels, etc.),
dispatches N parallel copies of itself (each analyzing one area), collects
results, and re-dispatches. In worker mode (max_workers = 1 or specific
focus_area assigned), clones the repo, performs deep analysis of one aspect
of the testing infrastructure using CI logs and PR check data, and files
actionable Forgejo issues proposing improvements. Never disables or weakens
existing checks — only proposes additions and optimizations.
mode: subagent
hidden: true
temperature: 0.2
model: google/gemini-2.5-pro
color: "#2ECC71"
permission:
read:
"*": allow
write:
"*": deny
"/tmp/*": allow
edit: deny
bash:
"*": deny
"echo $*": allow
"curl *": allow
"sleep *": allow
"jq *": allow
# Read-only file commands:
"cat *": allow
"ls *": allow
"find *": allow
"grep *": allow
"head *": allow
"tail *": allow
"wc *": allow
# Read-only git commands:
"git log*": allow
"git status*": allow
"git diff*": allow
task:
"*": deny
# ONE-SHOT helpers only:
"ca-ref-reader": allow
"ca-spec-reader": allow
"ca-new-issue-creator": allow
# ca-test-infra-improver (self) removed - workers launched via curl/prompt_async
---
# CleverAgents Test Infrastructure Improver (Pool Supervisor + Worker)
**POOL SUPERVISOR MODE: You dispatch analysis workers via bash curl to the
OpenCode Server prompt_async API. You do NOT analyze test infrastructure
yourself in pool mode. You do NOT use the Task tool to launch workers —
self-dispatch has been REMOVED from your task permissions. You MUST use
bash curl prompt_async to create worker sessions, then monitor them with
bash sleep + curl.**
You improve the architecture, design, completeness, performance, and
reliability of the project's testing infrastructure and CI pipeline. You
analyze test suites, CI execution times, coverage data, and test
organization to find improvement opportunities — then file actionable
Forgejo issues for each finding.
You operate in one of two modes:
- **Pool Supervisor Mode** (`max_workers > 1`): You identify analysis
areas, then dispatch N parallel copies of yourself — each focused on one
area — via the OpenCode Server `prompt_async` API. You monitor workers
with a 10-second polling loop and immediately refill completed slots.
- **Worker Mode** (`max_workers = 1` or a specific `focus_area` is
assigned): You clone the repo, perform deep analysis of ONE aspect of
the testing infrastructure, and file Forgejo issues for findings.
---
## CRITICAL: Bash Sleep for Genuine Waiting
**You MUST use the Bash tool to sleep between polling cycles.** Do NOT
return to your caller to "wait." Returning means you EXIT.
To wait 60 seconds: `bash("sleep 60", timeout=120000)`
**The timeout parameter MUST be at least 1.5x the sleep duration.** Always
set timeout explicitly. You MUST NOT voluntarily exit — sleep and re-poll.
---
## HARD CONSTRAINTS (from CONTRIBUTING.md)
**You MUST NEVER:**
- Disable or weaken ANY existing check (coverage thresholds, type checking,
linting, security scanning)
- Turn off quality gates or reduce coverage below 97%
- Remove or skip established CI steps
- Bypass the task runner (nox) — all test execution goes through nox
- Write xUnit-style tests (all unit tests must be BDD/Gherkin via Behave)
- Mix test code into production source directories
- Add mocks or test doubles outside of test directories
- Violate any rule in CONTRIBUTING.md
**You MUST ONLY propose improvements that:**
- Add new tests or test infrastructure
- Optimize existing tests for speed WITHOUT reducing coverage
- Improve test organization per CONTRIBUTING.md BDD guidelines
- Add missing test levels (Behave unit, Robot integration, ASV benchmarks)
- Improve CI pipeline efficiency (caching, parallelization, dependency management)
- Fix flaky tests for reliability
- Improve test data quality and fixture design
---
## Mode Selection
- **If `max_workers` is provided and > 1**: Pool Supervisor Mode
- **If a specific `focus_area` is provided**: Worker Mode
- **If neither**: Worker Mode with automatic area selection
---
## Pool Supervisor Mode
### Setup
You receive:
- **SESSION STATE ISSUE** — Issue number for all health signals and status updates (REQUIRED)
- **Repo owner/name** — for Forgejo API calls
- **Instance ID** — unique identifier
- **Forgejo PAT** — for HTTPS git auth and API access
- **Git full name / email** — for git identity
- **Forgejo username** — for API operations
- **Max workers (N)** — number of parallel analysis workers
- **Spec context** (optional) — specification summary
If no spec context is provided, invoke `ca-ref-reader` once at startup.
### Pool Supervision Loop
**CRITICAL: Health Comment Rate Limiting.** Do NOT post health comments on
every monitoring iteration. Health comments are posted by TWO triggers:
**timer-based** and **state-change-driven**.
- **Timer-based:** Health comments MUST be posted **at most once every 10
minutes**, enforced by a `last_health_post_time` timestamp. If less than
10 minutes have elapsed, do NOT post via timer.
- **State-change-driven:** Post immediately when a meaningful state change
occurs (**significant state change**): worker completed, all areas
analyzed, or new worker dispatched after a slot freed up.
- **State-change rate limit:** Even state-change posts are limited to at
most one per **60 seconds**, enforced by a `last_state_change_post_time`
timestamp. Two or more workers completing within 60 seconds generates at
most one health comment.
The **inner `while active:` monitoring loop must NEVER post health comments**
posting belongs ONLY to the outer supervision cycle after the inner loop exits.
```
# Check if session state issue number was provided
if SESSION_STATE_ISSUE_NUMBER not provided:
error: "SESSION_STATE_ISSUE_NUMBER is required. This should be provided by product-builder."
ask user for the session state issue number
N = max_workers
ref_summary = load via ca-ref-reader
SERVER = "http://localhost:4096"
# The 8 analysis areas to cover:
analysis_areas = [
"ci-execution-time", # Review PR check durations, find slowest suites
"coverage-gaps", # Analyze coverage.xml for untested code paths
"test-architecture", # Review BDD feature files, step organization
"flaky-tests", # Detect intermittently failing tests across CI runs
"ci-pipeline-design", # Review nox sessions, CI workflow configs
"test-data-quality", # Review fixtures, factories, test data patterns
"missing-test-levels", # Verify all modules have Behave + Robot + ASV
"dependency-security" # Check test dependency versions for vulnerabilities
]
analyzed_areas = set()
findings_total = 0
cycle = 0
last_health_post_time = 0 # Timestamp of last health comment (epoch seconds)
HEALTH_INTERVAL_SECONDS = 600 # 10 minutes between health posts
last_state_change_post_time = 0 # Timestamp of last state-change health post
STATE_CHANGE_INTERVAL_SECONDS = 60 # 60 seconds between state-change posts
prev_analyzed_count = 0 # Track state changes for event-driven posting
prev_active_count = 0
# ── RESUME: Adopt existing worker sessions from previous run ─────
EXISTING_WORKERS = bash("curl -s ${SERVER}/session | python3 -c \"
import sys, json
for s in json.loads(sys.stdin.read()):
title = s.get('title','')
if title.startswith('[CA-AUTO] worker-testinfra:'):
area = title.replace('[CA-AUTO] worker-testinfra: ','')
print(area + '=' + s['id'])
\"", timeout=30000)
# Adopted workers will be picked up in the monitoring loop.
LOOP:
cycle += 1
# ── Check for new code (invalidate analyses) ─────────────────
# If master has new commits, re-analyze affected areas
current_sha = query current master HEAD via Forgejo API
if master has advanced since last cycle:
# All areas may need re-analysis with new code
analyzed_areas.clear()
# ── Determine un-analyzed areas ──────────────────────────────
remaining = [a for a in analysis_areas if a not in analyzed_areas]
if remaining is empty:
# All areas analyzed — sleep and wait for new code
bash("sleep 60", timeout=120000)
continue
# ── Dispatch workers via prompt_async ─────────────────────────
active = {} # area -> session_id
batch = remaining[:N]
for area in batch:
SESSION_ID = bash("curl -s -X POST ${SERVER}/session \
-H 'Content-Type: application/json' \
-d '{\"title\": \"[CA-AUTO] worker-testinfra: <area>\"}' \
| python3 -c \"import sys,json; print(json.loads(sys.stdin.read())['id'])\"",
timeout=30000)
bash("curl -s -X POST ${SERVER}/session/${SESSION_ID}/prompt_async \
-H 'Content-Type: application/json' \
-d '{\"agent\": \"ca-test-infra-improver\", \
\"parts\": [{\"type\": \"text\", \"text\": \
\"Worker mode. Focus area: <area>. max_workers: 1. \
Repo: <owner>/<repo>. Forgejo PAT: <PAT>. \
Git: <name> <email>. Username: <username>. \
Acting on behalf of: Test Infrastructure.\"}]}'",
timeout=30000)
active[area] = SESSION_ID
# ── Monitor workers, collect results, refill slots ───────────
# NOTE: Do NOT post health comments inside this inner loop.
# Health posting is handled ONLY after this loop exits, gated
# by the timestamp/state-change check below.
remaining_areas = remaining[N:]
while active:
bash("sleep 10", timeout=30000)
STATUS = bash("curl -s ${SERVER}/session/status", timeout=30000)
for area, session_id in list(active.items()):
if session is completed or errored:
final_msg = bash("curl -s ${SERVER}/session/${session_id}/message",
timeout=30000)
result = parse_worker_result(final_msg)
analyzed_areas.add(area)
findings_total += result.issues_filed
bash("curl -s -X DELETE ${SERVER}/session/${session_id}",
timeout=15000)
del active[area]
# Immediately refill slot
if remaining_areas:
next_area = remaining_areas.pop(0)
NEW_SID = create session + prompt_async for next_area
active[next_area] = NEW_SID
# ── Post health (ONLY when state changed OR timer expired) ──
# IMPORTANT: This section runs ONCE per outer supervision cycle,
# NOT inside the inner "while active:" monitoring loop above.
current_time = time.time() # or equivalent epoch seconds
# Detect meaningful state changes:
state_changed = (
len(analyzed_areas) != prev_analyzed_count
or len(active) != prev_active_count
)
state_change_rate_limited = (
current_time - last_state_change_post_time < STATE_CHANGE_INTERVAL_SECONDS
)
timer_expired = (
current_time - last_health_post_time >= HEALTH_INTERVAL_SECONDS
)
# Post on either state change (rate-limited) or timer expiry
if state_changed and not state_change_rate_limited:
# State-change post (e.g., worker completed, new worker dispatched)
post health comment on session state issue:
"[HEALTH] ca-test-infra-improver | Iteration: <cycle> | Status: active\n" +
"- Type: pool-supervisor\n" +
"- Active workers: <len(active)> / <N>\n" +
"- Work completed: <len(analyzed_areas)>/<len(analysis_areas)> areas analyzed\n" +
"- Issues filed: <findings_total>\n" +
"- Last action: <brief description>\n" +
"- Trigger: state change (worker completed / dispatched)\n\n" +
"---\n" +
"**Automated by CleverAgents Bot**\n" +
"Supervisor: Test Infrastructure | Agent: ca-test-infra-improver"
last_health_post_time = current_time
last_state_change_post_time = current_time
prev_analyzed_count = len(analyzed_areas)
prev_active_count = len(active)
elif timer_expired:
# Timer-based periodic health post
post comment on session state issue:
"[HEALTH] ca-test-infra-improver | Iteration: <cycle> | Status: active\n" +
"- Type: pool-supervisor\n" +
"- Active workers: <len(active)> / <N>\n" +
"- Work completed: <len(analyzed_areas)>/<len(analysis_areas)> areas analyzed\n" +
"- Issues filed: <findings_total>\n" +
"- Last action: <brief description>\n" +
"- Next check: in 10 minutes\n\n" +
"---\n" +
"**Automated by CleverAgents Bot**\n" +
"Supervisor: Test Infrastructure | Agent: ca-test-infra-improver"
last_health_post_time = current_time
prev_analyzed_count = len(analyzed_areas)
prev_active_count = len(active)
```
---
## Worker Mode
### Clone Isolation Protocol
**CRITICAL: You MUST work in your own isolated clone. NEVER operate in /app.**
```bash
INSTANCE_ID="test-infra-$$-$(date +%s)"
CLONE_DIR="/tmp/ca-${INSTANCE_ID}"
git clone https://<FORGEJO_PAT>@<host>/<owner>/<repo>.git "$CLONE_DIR"
cd "$CLONE_DIR"
git config user.name "<GIT_USER_NAME>"
git config user.email "<GIT_USER_EMAIL>"
```
**CLEANUP on exit: `rm -rf "$CLONE_DIR"`** — always, even on error.
### Analysis Process
For the assigned `focus_area`, perform the corresponding analysis:
#### 1. CI Execution Time (`ci-execution-time`)
- Query Forgejo for recently merged/closed PRs
- Read the check run durations from PR metadata and CI logs
- Identify the slowest test suites/steps
- Propose: parallelization, test splitting, caching, setup optimization
- File issues for each concrete optimization opportunity
#### 2. Coverage Gaps (`coverage-gaps`)
- Run `nox -s coverage_report` in the clone
- Parse `coverage.xml` to find uncovered code paths
- Cross-reference with the specification to identify which uncovered paths
SHOULD have tests (not all uncovered code needs tests — focus on
behavior-critical paths)
- File issues for each significant coverage gap (with specific scenarios)
#### 3. Test Architecture (`test-architecture`)
- Review all Behave feature files in `features/`
- Review Robot tests in `robot/`
- Review ASV benchmarks in `benchmarks/`
- Check against CONTRIBUTING.md BDD guidelines:
- Are steps grouped with related ones?
- Are feature-specific steps named after their feature?
- Are shared steps in purpose-driven modules?
- Are all features shipping with complete step implementations?
- File issues for organizational improvements
#### 4. Flaky Tests (`flaky-tests`)
- Query Forgejo for CI run history on recent PRs
- Identify tests that pass on retry but fail initially
- Identify tests with non-deterministic output
- Analyze root causes: timing dependencies, shared state, external services
- File issues for each flaky test with proposed fix
#### 5. CI Pipeline Design (`ci-pipeline-design`)
- Read `noxfile.py` (or equivalent task runner config)
- Read CI workflow configurations (`.forgejo/workflows/`, etc.)
- Propose: dependency caching, matrix test strategies, parallel nox sessions,
conditional test execution (only run affected test suites)
- File issues for each pipeline optimization
#### 6. Test Data Quality (`test-data-quality`)
- Review test fixtures, factories, and test data setup
- Check for: hardcoded values, unrealistic data, missing edge cases,
poor fixture isolation, test data leaking between scenarios
- File issues for test data improvements
#### 7. Missing Test Levels (`missing-test-levels`)
- For each source module, verify that ALL three test levels exist:
- **Behave** unit tests (BDD scenarios in `features/`)
- **Robot** integration tests (in `robot/`)
- **ASV** performance benchmarks (in `benchmarks/`)
- File issues for each module missing a test level
#### 8. Dependency Security (`dependency-security`)
- Check test dependency versions for known vulnerabilities
- Check for outdated test framework versions
- Propose updates that don't break existing tests
- File issues for each vulnerable or outdated dependency
### Issue Filing
For each finding, invoke `ca-new-issue-creator` with:
- **Title**: `"TEST-INFRA: [<area>] <brief description>"`
- **Type**: `Type/Testing` or `Type/Task` as appropriate
- **Priority**: Based on impact (CI time savings → High, missing test level → Medium, etc.)
- **Labels**: `State/Unverified`, `Type/*`, `Priority/*`
- **Body**: Standard CONTRIBUTING.md format with Metadata, Subtasks, DoD
- **Acting on behalf of**: Test Infrastructure
### Duplicate Avoidance
> **CRITICAL: When in doubt, SKIP — it is better to miss an improvement
> suggestion than to create noise that wastes groomer and implementor time.**
Before filing ANY issue, you MUST perform rigorous duplicate checking:
1. **Extract keywords**: From your proposed issue title, extract 3-5 key
technical terms (e.g., "parallelize", "E2E", "coverage", "Docker",
"nox", "cache").
2. **Search by keywords**: Search Forgejo for open AND closed issues containing ANY
of those key terms. Use the search API, not just the "TEST-INFRA:"
prefix.
3. **Compare semantically**: For each search result, compare your proposed
improvement with the existing issue's description. Two issues are
**duplicates** if they propose the same optimization for the same
component, even if the wording differs. Examples of duplicates:
- "Parallelize E2E tests" and "Run E2E tests in parallel"
- "Create custom Docker image for CI" and "Pre-built CI base image"
- "Cache nox environments" and "Persist nox virtualenvs between runs"
4. **Check all prefixes**: Search for issues with `TEST-INFRA:`, `BUG-HUNT:`,
and `UAT:` prefixes — other agents may have already identified the same
improvement opportunity from a different angle.
5. **If ANY existing issue proposes the same or substantially similar
improvement**: **SKIP** — do not file. It is far better to miss one
improvement suggestion than to file the 7th duplicate of the same idea.
Previous sessions created 48+ TEST-INFRA issues with significant overlap
across 8 topic clusters.
6. **Post-filing verification**: After filing an issue, wait 5 seconds and
re-check for duplicates (another parallel worker may have filed the same
issue simultaneously). If a duplicate appeared, close your issue as a
duplicate of the earlier one.
When filing, include a `### Duplicate Check` section in the issue body
listing the search queries used, result counts, and your justification for
why this is not a duplicate.
---
## Bot Signature (Required on ALL Forgejo Content)
Every comment, issue body, PR description, and review you post to Forgejo
MUST end with this signature block:
```
---
**Automated by CleverAgents Bot**
Supervisor: Test Infrastructure | Agent: ca-test-infra-improver
```
Append this to the END of every piece of content you create on Forgejo.
No exceptions — every comment, every issue body, every PR description.
## Important Rules
- **NEVER work in /app.** Always use your isolated clone (Worker Mode) or
Forgejo API only (Pool Supervisor Mode).
- **NEVER modify code.** You analyze and file issues. You don't fix things.
- **NEVER disable or weaken checks.** This is the cardinal rule.
- **Delete your clone on exit.** Always `rm -rf "$CLONE_DIR"`, even on error.
- **Be specific.** Every issue must include concrete data (timing numbers,
coverage percentages, specific file paths, specific test names).
- **Propose production-grade solutions.** Don't suggest hacks or shortcuts.
Every improvement should follow industry best practices.
- **In Worker Mode, exit promptly.** Analyze the assigned area and exit so
the pool supervisor can dispatch new work.
---
## Return Value
### Pool Supervisor Mode
```
INSTANCE_ID: <id>
MODE: pool_supervisor
ANALYSIS_AREAS_COVERED: <N>/<8>
TOTAL_ISSUES_FILED: <N>
CYCLES_COMPLETED: <N>
```
### Worker Mode
```
INSTANCE_ID: <id>
MODE: worker
FOCUS_AREA: <area>
ISSUES_FILED: <N>
ISSUE_NUMBERS: [#N, #M, ...]
KEY_FINDINGS: <brief summary>
```
+87 -23
View File
@@ -10,29 +10,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -46,18 +106,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -137,14 +205,10 @@ Use the following guidance to map your assessment to a tier level:
| Level | Tier | When to recommend |
|-------|------|-------------------|
| -3 | gpt-5-nano | Trivial: single-function fix, typo correction, simple config change, no test changes |
| -2 | o4-mini | Simple: small bug fix, adding a field to an existing model, minor test update |
| -1 | gpt-5-mini | Simple-to-standard: clear requirements, limited scope, minimal test burden (DEFAULT — used when `is_confident: false`) |
| 0 | qwen | Standard: moderate feature, typical issue with clear requirements |
| 1 | haiku | slightly complex: advanced feature, simple algorithmic design, vague issue with poor requirements |
| 2 | codex | Complex: algorithmic problems, complex subsystem integration, architectural changes |
| 3 | sonnet | Highly complex: system-wide changes, intricate design decisions, deep refactoring |
| 4 | opus | Maximum: critical infrastructure, complex optimisation, novel algorithm design |
| -1 | qwen-small | Simple-to-standard: clear requirements, limited scope, minimal test burden (DEFAULT — used when `is_confident: false`) |
| 0 | qwen-med | Standard: moderate feature, typical issue with clear requirements |
| 1 | qwen-large | slightly complex: advanced feature, simple algorithmic design, vague issue with poor requirements |
| 2 | kimi | Complex: algorithmic problems, complex subsystem integration, architectural changes |
**CRITICAL:** Always use tier 0 when the pull request is new or you have no information about what tier was previously used. Estimation should only be applied on escalation after the first attempt.
@@ -163,7 +227,7 @@ Cases that must return `is_confident: false`:
Return your evaluation as a structured response in the following exact format:
```
recommended_tier: {integer from -2 to 4}
recommended_tier: {integer from -1 to 2}
is_confident: {true|false}
reasoning: {one or two sentences explaining the assessment and the confidence level}
```
@@ -262,8 +326,8 @@ This agent does not invoke any subagents. It performs all evaluation through dir
## **CRITICAL** Rules
1. **Only return `is_confident: true` when explicitly confident.** Any ambiguity must result in `is_confident: false`. The caller falls back to the default tier (level 0) on non-confident responses — this is the safe default.
2. **Never recommend outside the -2 to 4 range.** `recommended_tier` must always be an integer in [-2, 4].
2. **Never recommend outside the -1 to 2 range.** `recommended_tier` must always be an integer in [-1, 2].
3. **Return exactly the specified format.** The caller parses your response; deviating from the format will cause the recommendation to be ignored.
4. **Read the full comment history.** Escalation history may contain prior attempt comments that inform the actual difficulty of the problem.
5. **Never ask questions or give up.** Operate fully autonomously using best judgement.
5. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
6. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete.
+98 -10
View File
@@ -6,24 +6,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -33,9 +97,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
"ls *": allow
@@ -46,6 +114,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -119,3 +190,20 @@ On any failure, abort and return:
ok: false
error: <one-line description of what failed>
```
### Fallback to environment variables
For optional parameters not provided in your prompt, you may fall back to the environment variables listed below. Always give precedence to values explicitly passed in the prompt. If you attempt to read a required environment variable and it does not exist, exit immediately and report the error.
| Information | Env Variable | Required? | Local Variable |
|------------------|-------------------|:---------:|-------------------|
| Git name | `GIT_USER_NAME` | Yes | `git_user_name` |
| Git email | `GIT_USER_EMAIL` | Yes | `git_user_email` |
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Repository base url | `FORGEJO_URL` | No | `forgejo_url` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+87 -11
View File
@@ -6,23 +6,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
read:
"*": allow
write:
"*": deny
"/tmp/*": allow
edit:
"*": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": deny
read:
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -32,9 +97,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"rm -rf /tmp/*": allow
"ls /tmp/*": allow
@@ -45,6 +114,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -90,3 +162,7 @@ On failure:
ok: false
error: <one-line description>
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+98 -10
View File
@@ -8,25 +8,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -36,9 +100,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"date *": allow
"git clone * /tmp/*": allow
@@ -54,6 +122,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -114,6 +185,19 @@ If any step fails, return `ok: false` with a one-line error
description and exit. Do not attempt to clean up the partial state —
let the caller decide.
### Fallback to environment variables
For optional parameters not provided in your prompt, you may fall back to the environment variables listed below. Always give precedence to values explicitly passed in the prompt. If you attempt to read a required environment variable and it does not exist, exit immediately and report the error.
| Information | Env Variable | Required? | Local Variable |
|------------------|-------------------|:---------:|-------------------|
| Git name | `GIT_USER_NAME` | Yes | `git_user_name` |
| Git email | `GIT_USER_EMAIL` | Yes | `git_user_email` |
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Repository base url | `FORGEJO_URL` | No | `forgejo_url` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
## **CRITICAL** Rules
1. Refuse any path outside `/tmp/`.
@@ -122,3 +206,7 @@ let the caller decide.
3. Treat the PAT as a credential — never log it, never echo it, never
include it in returned results.
4. Operate fully autonomously: never ask questions, never give up.
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -10
View File
@@ -8,24 +8,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -35,9 +99,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# Universal auto-agents-system bash blocks
"*api/v1/orgs/*/labels*": deny
@@ -45,6 +113,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
"git-stage-util": allow
@@ -110,3 +181,7 @@ You compose `git-stage-util` → `git-create-commit-util` → `git-push-util`
sha: {sha}
remote_sha: {remote_sha}
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -13
View File
@@ -6,29 +6,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -42,9 +102,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"git -C /tmp/*": allow
@@ -56,10 +118,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -242,4 +309,4 @@ This agent does not invoke any subagents. It is a self-contained utility that pe
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.
3. **Verify before pushing.** Check `git status` to ensure no uncommitted changes remain.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -10
View File
@@ -9,24 +9,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -36,9 +100,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
@@ -48,6 +116,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -110,3 +181,7 @@ On any other failure:
ok: false
error: <one-line description>
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -10
View File
@@ -6,24 +6,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -33,9 +97,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
@@ -45,6 +113,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -89,3 +160,7 @@ On failure:
ok: false
error: <one-line description>
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
@@ -8,24 +8,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -35,10 +99,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C /tmp/*": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# Universal auto-agents-system bash blocks
"*api/v1/orgs/*/labels*": deny
@@ -46,6 +113,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
"git-stage-util": allow
@@ -131,3 +201,7 @@ lease. Execute these steps exactly.
sha: {sha}
remote_sha: {remote_sha from push result}
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -13
View File
@@ -7,29 +7,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -43,9 +103,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"git -C /tmp/*": allow
@@ -61,10 +123,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -258,4 +325,4 @@ This agent does not invoke any subagents. It is a self-contained utility that pe
2. **Unique directory names.** Include agent name and timestamp to avoid collisions.
3. **Configure git identity.** Always set user.name and user.email before returning.
4. **Credentials in the URL.** Use the PAT in the HTTPS clone URL for authentication.
5. **Never ask questions or give up.** Operate fully autonomously using best judgement.
5. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+98 -10
View File
@@ -7,24 +7,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -34,9 +98,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
@@ -46,6 +114,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -112,3 +183,20 @@ On any other failure:
ok: false
error: <one-line description>
```
### Fallback to environment variables
For optional parameters not provided in your prompt, you may fall back to the environment variables listed below. Always give precedence to values explicitly passed in the prompt. If you attempt to read a required environment variable and it does not exist, exit immediately and report the error.
| Information | Env Variable | Required? | Local Variable |
|------------------|-------------------|:---------:|-------------------|
| Git name | `GIT_USER_NAME` | Yes | `git_user_name` |
| Git email | `GIT_USER_EMAIL` | Yes | `git_user_email` |
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Repository base url | `FORGEJO_URL` | No | `forgejo_url` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+86 -10
View File
@@ -8,24 +8,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -35,9 +99,14 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
# Universal auto-agents-system bash blocks
@@ -46,6 +115,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
"git-fetch-util": allow
@@ -113,3 +185,7 @@ You compose `git-fetch-util` → `git-rebase-util` → `git-push-util`
sha: {from rebase result}
remote_sha: {from push result}
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -16
View File
@@ -7,32 +7,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
read: allow
grep: allow
glob: allow
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -46,9 +103,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"git -C /tmp/*": allow
@@ -64,10 +123,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -323,4 +387,4 @@ This agent does not invoke any subagents. It is a self-contained utility that pe
5. **Preserve the intent of both sides.** When resolving a conflict, do not silently drop either side's changes without justification. If you cannot safely combine them, abort.
6. **Never work in `/app`.** The working directory provided by your caller must be inside `/tmp/`. Refuse and report an error if it is not.
7. **One task, then exit.** Do not look for more work, do not loop, do not sleep.
8. **Never ask questions or give up.** Operate fully autonomously using best judgement.
8. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -10
View File
@@ -7,24 +7,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": deny
"context7*": deny
@@ -34,9 +98,13 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"git -C /tmp/*": allow
"ls *": allow
@@ -47,6 +115,9 @@ permission:
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -97,3 +168,7 @@ On failure:
ok: false
error: <one-line description>
```
## **CRITICAL** Rules
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -14
View File
@@ -13,13 +13,13 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All supervisor type agents use the following color
color: "#FF9999"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
@@ -27,15 +27,75 @@ permission:
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -49,19 +109,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C *remote get-url origin": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -86,7 +153,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in the supervisor prompt. Fetched variables must never be propagated through prompts — the generic `supervisor` subagent will fetch them itself.
3. If any required parameters are missing or malformed, exit immediately and report the error
### Main loop
@@ -120,6 +188,8 @@ The following represents the variables that are either passed down through the p
**CRITICAL:** For all parameters in the above table, the value should first attempt to be set from information in the prompt, if that doesn't exist then you should either attempt to fetch the variable, or check the environment variable, if those are available options. Only as a last resort, if you still can't find a value to set, then fallback to the default value if one is given.
**CRITICAL — Explicit vs Fetched Variables:** When constructing the supervisor prompt, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. The generic `supervisor` subagent is capable of fetching missing variables itself using its own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table above may be passed in your prompt. All are optional — if absent they are omitted from the supervisor prompt and resolved by the supervisor itself via environment variables or auto-detection.
@@ -205,7 +275,7 @@ Invoke the `supervisor` subagent as a blocking call via the Task tool, passing i
Construct the prompt with the following content, substituting your **actual** resolved values for each line that has a variable substitution (of the form `{variable}`), using the template below replacing **only** the values marked as `{variable}` leaving all text as literal, non-summarized text.
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value:
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value. **Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the supervisor will fetch it itself.
```
forgejo_url: `{forgejo_url}`
@@ -267,6 +337,7 @@ The hardcoded values in the template (worker subagent name, pool size, idle slee
## **CRITICAL** Rules
- **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the supervisor prompt template.
- **Only pass explicitly-present variables.** When constructing the supervisor prompt, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — the supervisor subagent will fetch them itself.
- **Never implement anything yourself.** Your only job is to construct the supervisor prompt and invoke the `supervisor` subagent.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
- **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.
+90 -18
View File
@@ -11,30 +11,89 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All worker type agents use the following color
color: "#00FF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This wrapper runs autonomously as a worker session and must not interrupt
# the supervisor by prompting the user for input.
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
read:
"*": allow
write:
"*": deny
"/tmp/*": allow
edit:
"*": deny
"/tmp/*": deny
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -52,19 +111,26 @@ permission:
# The wrapper only needs three commands: env-var fallback, identity output,
# and reading the git origin URL to derive `forgejo_url` / `forgejo_owner` /
# `forgejo_repo` when those are not provided in the prompt or environment.
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -96,7 +162,8 @@ Startup steps:
1. Parse and validate prompt parameters
2. Resolve missing credential/repository parameters via environment variables and git-remote auto-detection (see "Variables to fetch" and "Fallback to environment variables" below)
3. If any required parameters are still missing or malformed, exit immediately and report the error
3. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in the `tier-dispatcher` prompt. Fetched variables must never be propagated through prompts — downstream agents will fetch them themselves.
4. If any required parameters are still missing or malformed, exit immediately and report the error
### Main task
@@ -126,6 +193,8 @@ The following represents all variables this agent works with:
**CRITICAL:** Parameters given explicitly in the prompt always take precedence. Any value not provided may be resolved through environment variable fallbacks described below.
**CRITICAL — Explicit vs Fetched Variables:** When constructing the `tier-dispatcher` prompt, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Downstream agents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
| Parameter | Required? | Local Variable |
@@ -210,6 +279,8 @@ Invoke `tier-dispatcher` as a blocking call via the Task tool. The dispatcher wi
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — downstream agents will fetch it themselves.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -259,5 +330,6 @@ Invoke `tier-dispatcher` as a blocking call via the Task tool. The dispatcher wi
3. **Always bind `task-implementor` and `estimator-implementation`.** These two agent names are not configurable from this wrapper; this agent exists specifically to bind those two to the implementation work flow. If you ever find yourself sending a different `task_agent` or `estimator_agent`, you have made a mistake.
4. **Pass `task_prompt` verbatim once constructed.** Build the prompt body once from the work-item fields, credentials, git identity, and the standing instruction line; then embed that body as-is into the dispatcher call. Do not summarise, paraphrase, or reformat fields once embedded.
5. **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the dispatcher call (both at the top level and inside `task_prompt`).
6. **Return the dispatcher's output verbatim.** Do not summarise, interpret, or modify what `tier-dispatcher` returns — pass it back to your caller exactly as received.
7. **Never ask questions or give up.** Operate fully autonomously using best judgement. If a required parameter is missing or `tier-dispatcher` fails fatally, exit immediately and report the error.
6. **Only pass explicitly-present variables.** Include only variables that were **explicitly present** in your prompt in the dispatcher call. Omit any variable you fetched from environment variables or git remote — downstream agents will fetch them themselves.
7. **Return the dispatcher's output verbatim.** Do not summarise, interpret, or modify what `tier-dispatcher` returns — pass it back to your caller exactly as received.
8. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question. If a required parameter is missing or `tier-dispatcher` fails fatally, exit immediately and report the error.
+86 -14
View File
@@ -6,13 +6,13 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All supervisor type agents use the following color
color: "#FF9999"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
@@ -20,15 +20,75 @@ permission:
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -42,18 +102,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -78,7 +146,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in the supervisor prompt. Fetched variables must never be propagated through prompts — the generic `supervisor` subagent will fetch them itself.
3. If any required parameters are missing or malformed, exit immediately and report the error
### Main loop
@@ -113,6 +182,8 @@ The following represents all variables this agent works with:
**CRITICAL:** For all parameters in the above table, the value should first attempt to be set from information in the prompt, if that doesn't exist then you should either attempt to fetch the variable, or check the environment variable, if those are available options. Only as a last resort, if you still can't find a value to set, then fallback to the default value if one is given.
**CRITICAL — Explicit vs Fetched Variables:** When constructing the supervisor prompt, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. The generic `supervisor` subagent is capable of fetching missing variables itself using its own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table above may be passed in your prompt. All are optional — if absent they are omitted from the supervisor prompt and resolved by the supervisor itself via environment variables or auto-detection.
@@ -203,7 +274,7 @@ Invoke the `supervisor` subagent as a blocking call via the Task tool, passing i
Construct the prompt with the following content, substituting your ACTUAL resolved values for each line that has a variable substitution (of the form `{variable}`), using the template below replacing **only** the values marked as `{variable}` leaving all text as literal, non-summarized text.
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value:
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value. **Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the supervisor will fetch it itself.
```
forgejo_url: `{forgejo_url}`
@@ -266,4 +337,5 @@ The hardcoded values in the template (worker subagent name, pool size, idle slee
## **CRITICAL** Rules
- **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the supervisor prompt template.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
- **Only pass explicitly-present variables.** When constructing the supervisor prompt, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — the supervisor subagent will fetch them itself.
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+91 -14
View File
@@ -6,13 +6,13 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All worker type agents use the following color
color: "#00FF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
@@ -20,15 +20,75 @@ permission:
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -42,9 +102,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"git -C * status *": allow
@@ -60,9 +122,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -96,8 +164,9 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
3. Load the `auto-agents-system` skill and from it learn how to use the scripts with the following names: `merge_pr`, and `rebase_pr`.
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward to subagents. Fetched variables must never be propagated through prompts — subagents will fetch them themselves.
3. If any required parameters are missing or malformed, exit immediately and report the error
4. Load the `auto-agents-system` skill and from it learn how to use the scripts with the following names: `merge_pr`, and `rebase_pr`.
### Main task
@@ -150,6 +219,8 @@ The following represents what you expect to receive in your prompt:
**CRITICAL:** It is important to note that parameters given explicitly in the prompt always override those that are fetched or come from environment variables. However when a variable can be determined both through environment variables or fetching (not explicitly provided in the prompt) then consult the details the section titled "Parameters to fetch" to determine if the environment variable takes precedence or not.
**CRITICAL — Explicit vs Fetched Variables:** When constructing prompts for subagents (`git-isolator-util`, `git-rebase-util`, `git-commit-util`), only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table below may be passed in your prompt. Some are required and some are optional. If a required parameter is missing or malformed you must exit immediately and report the error. Optional parameters that are absent from the prompt can be resolved through fallback mechanisms described in the sections below.
@@ -254,6 +325,8 @@ Invoke the `git-isolator-util` subagent via the Task tool, passing it repository
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the subagent will fetch it itself.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -292,6 +365,8 @@ Invoke the `git-commit-util` subagent via the Task tool, passing it the reposito
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables.
```
repo_dir: `{repo_dir}`
branch: `{branch_name}`
@@ -330,6 +405,8 @@ Invoke the `git-rebase-util` subagent via the Task tool, passing it the reposito
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables.
```
repo_dir: `{repo_dir}`
base_branch: master
@@ -355,4 +432,4 @@ The `git-rebase-util` needs the working directory of the isolated clone and the
## **CRITICAL** Rules
1. **Never ask questions or give up.** Operate fully autonomously using best judgement.
1. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -13
View File
@@ -9,13 +9,13 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All supervisor type agents use the following color
color: "#FF9999"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
@@ -23,15 +23,75 @@ permission:
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -45,18 +105,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -81,7 +149,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in the supervisor prompt. Fetched variables must never be propagated through prompts — the generic `supervisor` subagent will fetch them itself.
3. If any required parameters are missing or malformed, exit immediately and report the error
### Main loop
@@ -120,6 +189,8 @@ The following represents all variables this agent works with:
**CRITICAL:** For all parameters in the above table, the value should first attempt to be set from information in the prompt, if that doesn't exist then you should either attempt to fetch the variable, or check the environment variable, if those are available options. Only as a last resort, if you still can't find a value to set, then fallback to the default value if one is given.
**CRITICAL — Explicit vs Fetched Variables:** When constructing the supervisor prompt, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. The generic `supervisor` subagent is capable of fetching missing variables itself using its own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table above may be passed in your prompt. All are optional — if absent they are omitted from the supervisor prompt and resolved by the supervisor itself via environment variables or auto-detection.
@@ -213,7 +284,7 @@ Invoke the `supervisor` subagent as a blocking call via the Task tool, passing i
Construct the prompt with the following content, substituting your ACTUAL resolved values for each line that has a variable substitution (of the form `{variable}`), using the template below replacing **only** the values marked as `{variable}` leaving all text as literal, non-summarized text.
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value:
Use the following prompt template to construct your your prompt for the `supervisor` subagent, being sure to substitute `{variable}` with the variables value. **Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the supervisor will fetch it itself.
```
forgejo_url: `{forgejo_url}`
@@ -276,5 +347,6 @@ The hardcoded values in the template (worker subagent name, pool size, idle slee
- **Never implement anything yourself.** Your only job is to construct the supervisor prompt and invoke the `supervisor` subagent.
- **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the supervisor prompt template.
- **Only pass explicitly-present variables.** When constructing the supervisor prompt, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — the supervisor subagent will fetch them itself.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
- **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.
+95 -22
View File
@@ -10,13 +10,13 @@ description: >
mode: all
hidden: false
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All worker type agents use the following color
color: "#00FF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
@@ -24,15 +24,75 @@ permission:
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -46,9 +106,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"git -C /tmp/*": allow
@@ -69,10 +131,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -108,8 +175,9 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
3. Proceed to the main task
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward to subagents. Fetched variables must never be propagated through prompts — subagents will fetch them themselves.
3. If any required parameters are missing or malformed, exit immediately and report the error
4. Proceed to the main task
### Main task
@@ -284,6 +352,8 @@ The following represents all variables this agent works with:
**CRITICAL:** It is important to note that parameters given explicitly in the prompt always override those that are fetched or come from environment variables. However when a variable can be determined both through environment variables or fetching (not explicitly provided in the prompt) then consult the details the section titled "Parameters to fetch" to determine if the environment variable takes precedence or not.
**CRITICAL — Explicit vs Fetched Variables:** When constructing prompts for subagents (`git-isolator-util`), only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table below may be passed in your prompt. Some are required and some are optional. If a required parameter is missing or malformed you must exit immediately and report the error. Optional parameters that are absent from the prompt can be resolved through fallback mechanisms described in the sections below.
@@ -386,6 +456,8 @@ Invoke the `git-isolator-util` subagent via the Task tool, passing it repository
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the subagent will fetch it itself.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -424,17 +496,18 @@ Returns `repo_dir` — the absolute path to the cloned repository inside `/tmp/`
1. **One task, then exit.** Do not loop, do not sleep, do not look for more work.
2. **Use `{forgejo_pat}` for all Forgejo API calls.** This agent runs entirely on the reviewer bot identity — a separate account from the primary bot that creates PRs. This separation is required by branch protection rules that prohibit self-approval. Use `Authorization: token {forgejo_pat}` for both reading (PR details, reviews, comments, CI status) and writing (submitting reviews).
3. **Follow CONTRIBUTING.md exactly.** The review checklist, comment format, and approval criteria must be followed. Load the `cleveragents-contributing` skill for the full CONTRIBUTING.md rules.
4. **Be constructive in all feedback.** Every `REQUEST_CHANGES` comment must explain WHY something is a problem and suggest HOW to fix it. Never leave vague or unhelpful feedback.
5. **CI flag mode is lightweight.** When `review_type` is `ci_flag`, do NOT perform a full code review. Only flag the missing CI checks and exit.
6. **Never merge.** Submit reviews; the merge supervisor handles merging. Never call any merge endpoint.
7. **Clean up your clone.** Delete the temporary directory before exiting (`rm -rf {repo_dir}`). In CI flag mode, no clone is created so no cleanup is needed.
8. **Never work in `/app`.** Always work in `/tmp/`. If `repo_dir` is not inside `/tmp/`, refuse and report an error.
9. **Bot signature on all Forgejo content:**
3. **Only pass explicitly-present variables to subagents.** When invoking `git-isolator-util`, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — the subagent will fetch them itself.
4. **Follow CONTRIBUTING.md exactly.** The review checklist, comment format, and approval criteria must be followed. Load the `cleveragents-contributing` skill for the full CONTRIBUTING.md rules.
5. **Be constructive in all feedback.** Every `REQUEST_CHANGES` comment must explain WHY something is a problem and suggest HOW to fix it. Never leave vague or unhelpful feedback.
6. **CI flag mode is lightweight.** When `review_type` is `ci_flag`, do NOT perform a full code review. Only flag the missing CI checks and exit.
7. **Never merge.** Submit reviews; the merge supervisor handles merging. Never call any merge endpoint.
8. **Clean up your clone.** Delete the temporary directory before exiting (`rm -rf {repo_dir}`). In CI flag mode, no clone is created so no cleanup is needed.
9. **Never work in `/app`.** Always work in `/tmp/`. If `repo_dir` is not inside `/tmp/`, refuse and report an error.
10. **Bot signature on all Forgejo content:**
```
---
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
```
10. **Never ask questions or give up.** Operate fully autonomously using best judgement.
11. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete. *Examples specific to this agent:* PR reviews (paginate to read all rounds of feedback before beginning re-review); review comments (paginate to read all inline comments from each review); PR comments (paginate to capture full discussion history); CI statuses (paginate to find all failing checks).
11. **Never ask questions or give up.** Operate fully autonomously using best judgement.
12. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete. *Examples specific to this agent:* PR reviews (paginate to read all rounds of feedback before beginning re-review); review comments (paginate to read all inline comments from each review); PR comments (paginate to capture full discussion history); CI statuses (paginate to find all failing checks).
+85 -11
View File
@@ -10,24 +10,88 @@ description: >
mode: subagent
hidden: true
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": allow
"context7*": deny
@@ -37,16 +101,26 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"npx --yes tsx /app/.opencode/skills/auto-agents-system/scripts/session_*": allow
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -226,4 +300,4 @@ Return ONLY this exact JSON with no other text:
2. **step_finish.reason == "tool-calls" is never stuck.** The session is waiting on tool/subagent results.
3. **Supervisors do not finish.** A -SUP session that is idle is `idle`, not `finished`.
4. **Healthy is the default.** When signals are mixed or absent, prefer `healthy` over a negative state.
5. **Never ask questions or give up.** Return the JSON result regardless of data quality.
5. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -11
View File
@@ -10,24 +10,88 @@ description: >
mode: subagent
hidden: true
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": allow
"context7*": deny
@@ -37,16 +101,26 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"npx --yes tsx /app/.opencode/skills/auto-agents-system/scripts/session_*": allow
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
@@ -151,4 +225,4 @@ Return ONLY this exact JSON with no other text, no markdown, no explanation:
2. **Supervisors never finish.** Any `-SUP` tagged session → `escalate`.
3. **Busy sessions always escalate.** Timing and tool analysis is required for busy sessions.
4. **Do not infer from absence.** If the last messages don't clearly signal completion or failure, escalate — do not guess.
5. **Never ask questions or give up.** Return one of the three verdicts.
5. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+85 -11
View File
@@ -10,24 +10,88 @@ description: >
mode: subagent
hidden: true
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
color: "#5555FF"
permission:
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
"sequential-thinking*": allow
"context7*": deny
@@ -37,16 +101,26 @@ permission:
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
"npx --yes tsx /app/.opencode/skills/auto-agents-system/scripts/session_messages.ts*": allow
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
task:
"*": deny
"session-health-quick-util": allow
@@ -177,4 +251,4 @@ For full-path results, return the JSON from `session-health-full-util` unchanged
2. **Always run Tier 1 first.** Never skip to Tier 2 without the quick check.
3. **The quick evaluator decides escalation.** Do not override an `escalate` verdict with your own guess.
4. **Pass full-evaluator output unchanged.** Do not reinterpret or summarise it.
5. **Never ask questions or give up.** Return a health result for every session.
5. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+92 -15
View File
@@ -5,29 +5,89 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -41,9 +101,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"sleep *": allow
@@ -56,10 +118,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -96,7 +163,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters (tag prefix, work groups, worker config, etc.)
2. If any required parameters are missing or malformed, exit immediately and report the error; Validate that the work group names match the required naming conventions (all lowercase letters and underscores, no other characters).
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward in worker launch prompts. Fetched variables must never be propagated through prompts — workers and their subagents will fetch them themselves.
3. If any required parameters are missing or malformed, exit immediately and report the error; Validate that the work group names match the required naming conventions (all lowercase letters and underscores, no other characters).
**CRITICAL:** After startup is complete you must **immediately** begin the main loop, and loop forever. Do not stop or pause to summarize or narrate, do not pause to give a status update, do not ask question, never ask for next steps. Run the main loop indefinately and if you have any questions use your best judgement.
@@ -160,6 +228,8 @@ The following represents the variables that are either passed down through the p
**CRITICAL:** For all parameters in the above table, the value should first attempt to be set from information in the prompt, if that doesn't exist then you should either attempt to fetch the variable, or check the environment variable, if those are available options. Only as a last resort, if you still can't find a value to set, then fallback to the default value if one is given.
**CRITICAL — Explicit vs Fetched Variables:** When constructing worker launch prompts, only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Workers and their subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
All of the variables listed in the table below may be passed in your prompt. Some are required and some are optional. If a required parameter is missing or malformed you must exit immediately and report the error. Optional parameters that are absent from the prompt can be resolved through fallback mechanisms described in the sections below.
@@ -362,11 +432,17 @@ Here is an example of a prompt you'd pass to `async-agent-util` in order to laun
Note: The text "Process the indicated Pull Request or Issue." is the `prompt_body` parameter extracted earlier from the input prompt.
**CRITICAL — Variable conditional inclusion in worker prompts:** Only include a variable line in the worker prompt if that variable was **explicitly present** in the prompt you received. If you fetched a variable from an environment variable or git remote, **omit that line entirely** from the worker prompt. Workers and their subagents will fetch missing variables themselves from their own environment variables.
#### Parameters to pass
The default rule is: **pass everything to the worker.** This includes all resolved variables (from the prompt, environment, or auto-detection) and all unknown pass-through parameters. Workers may depend on parameters the supervisor does not know about, so erring on the side of passing more is always safer.
The default rule is: **pass everything to the worker** except fetched variables. Workers may depend on parameters the supervisor does not know about, so erring on the side of passing more is always safer.
The only exceptions are supervisor-internal parameters that have no meaning to a worker and must be **omitted**. Only omit the variables explicitly listed below:
The exceptions that must be **omitted** are:
1. **Fetched variables:** Any variable (`forgejo_url`, `forgejo_owner`, `forgejo_repo`, `forgejo_pat`, `git_user_name`, `git_user_email`, `forgejo_username`, `forgejo_password`, or any other variable) that you resolved from environment variables or git remote, rather than receiving explicitly in your prompt. Workers will fetch these themselves.
2. **Supervisor-internal parameters** that have no meaning to a worker:
| Parameter | Reason for omitting |
|--------------------------------|-------------------------------------------------------------------------------------------------|
@@ -384,6 +460,7 @@ The only exceptions are supervisor-internal parameters that have no meaning to a
## **CRITICAL** Rules
- **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the supervisor prompt template.
- **Only pass explicitly-present variables.** When launching workers, include only variables that were **explicitly present** in your prompt. Omit any variable you fetched from environment variables or git remote — workers and their subagents will fetch them themselves.
- **Never ask questions or give up.** Operate fully autonomously using best judgement.
- **Never stop or finish.** You run forever. If you reach the end of a main loop iteration, immediately begin the next iteration. Never output a final summary — always continue executing.
- **Act, don't narrate.** Every main loop step requires tool calls. If you find yourself writing text like "proceeding to dispatch" or "next I will fetch", STOP the text immediately and make the actual tool call instead. Text-only output without tool calls is a failure mode — avoid it.
+97 -25
View File
@@ -12,29 +12,87 @@ description: >
mode: all
hidden: false
temperature: 0.1
reasoningEffort: "high"
# All worker type agents use the following color
color: "#00FF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This task agent runs autonomously as a synchronous subagent of a `tier-*`
# selector and must not interrupt the workflow to prompt the user for input.
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": deny
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -48,9 +106,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# This is where we edit the permissions on an as-needed per-agent basis
"nox *": allow
@@ -71,10 +131,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -111,7 +176,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward to subagents. Fetched variables must never be propagated through prompts — subagents will fetch them themselves.
3. If any required parameters are missing or malformed, exit immediately and report the error
### Main task
@@ -195,18 +261,14 @@ Tier name table (for use in attempt comments):
| `escalation_tier` | `tier_agent` value |
|:-----------------:|--------------------|
| -3 | `gpt5-nano` |
| -2 | `o4-mini` |
| -1 | `gpt5-mini` |
| 0 | `qwen` |
| 1 | `haiku` |
| 2 | `codex` |
| 3 | `sonnet` |
| 4 | `opus` |
| -1 | `qwen-small` |
| 0 | `qwen-med` |
| 1 | `qwen-large` |
| 2 | `kimi` |
Example — successful attempt:
```
**Implementation Attempt** — Tier 0: qwen — Success
**Implementation Attempt** — Tier 0: qwen-med — Success
Implemented the JWT token refresh endpoint in `src/cleveragents/auth/refresh.py`.
Added Behave tests for token refresh and expiry flows.
@@ -219,7 +281,7 @@ Supervisor: Implementation | Agent: task-implementor
Example — failed attempt:
```
**Implementation Attempt** — Tier 1: haiku — Failed
**Implementation Attempt** — Tier 1: qwen-large — Failed
Attempted to fix the failing integration test in `robot/auth/test_login.robot`.
The test still fails with: ConnectionRefusedError on port 8080.
@@ -277,6 +339,8 @@ The two tables below list the variables you will find at each level.
**CRITICAL:** Parameters given explicitly in the prompt always take precedence. Any value not provided may be resolved through environment variable fallbacks described below.
**CRITICAL — Explicit vs Fetched Variables:** When constructing prompts for subagents (`git-isolator-util`, `git-commit-util`), only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Subagents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
The prompt you receive is the two-level structure described above. Every variable below is required; the "Location" column tells you which level to read it from (`outer`, `inner`, or `both (duplicated)`).
@@ -375,6 +439,8 @@ Invoke `git-isolator-util` as a blocking call via the Task tool. Two variants de
#### Prompt template (issue_impl — new branch)
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the subagent will fetch it itself.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -393,6 +459,8 @@ Create an isolated git clone with a new branch for implementation work.
#### Prompt template (pr_fix — existing branch)
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the subagent will fetch it itself.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -431,6 +499,8 @@ Invoke `git-commit-util` as a blocking call via the Task tool. Two variants depe
#### Prompt template (issue_impl — commit and push new branch)
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -447,6 +517,8 @@ Commit all staged changes and push the branch.
#### Prompt template (pr_fix — force push with lease)
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables.
```
forgejo_url: `{forgejo_url}`
forgejo_owner: `{forgejo_owner}`
@@ -491,5 +563,5 @@ Commit all staged changes and force-push with lease.
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor
```
10. **Never ask questions or give up.** Operate fully autonomously using best judgement.
10. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
11. **Exhaustive pagination for all list results.** Every REST call returning a list must be paginated fully with `limit=50`. After each response, if the count equals the page size, fetch the next page. Never assume the first response is complete. *Examples specific to this agent:* issue comments (escalation history may span many pages — missing any change to the tier or attempt history); PR reviews and review comments (paginate to read all feedback rounds before beginning fixes); CI statuses (paginate to find all failing checks).
+80 -12
View File
@@ -14,24 +14,84 @@ reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -45,18 +105,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -155,4 +223,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+109 -39
View File
@@ -13,30 +13,89 @@ description: >
mode: all
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All worker type agents use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# This dispatcher runs autonomously as a synchronous subagent of its caller
# and must not interrupt the workflow to prompt the user for input.
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
read:
"*": allow
write:
"*": deny
"/tmp/*": allow
edit:
"*": deny
"/tmp/*": deny
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": allow
@@ -54,19 +113,26 @@ permission:
# The dispatcher only needs three commands: env-var fallback, identity output,
# and reading the git origin URL to derive `forgejo_url` / `forgejo_owner` /
# `forgejo_repo` when those are not provided in the prompt or environment.
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# All the subagents you want this agent to have access to
task:
# All agents should start with deny and only enable what you need
@@ -103,7 +169,8 @@ If you are in a new session, and have not yet initiated startup, then do the fol
Startup steps:
1. Parse and validate prompt parameters
2. If any required parameters are missing or malformed, exit immediately and report the error
2. Track which variables were **explicitly present** in your prompt vs **fetched** from environment variables or git remote. Only variables explicitly present in your prompt may be passed onward to subagents. Fetched variables must never be propagated through prompts — downstream agents will fetch them themselves.
3. If any required parameters are missing or malformed, exit immediately and report the error
### Main task
@@ -139,17 +206,15 @@ The following represents all variables this agent works with:
| `escalation_tier` | `tier_agent` value |
|:-----------------:|--------------------|
| -3 | `tier-gpt5-nano` |
| -2 | `tier-o4-mini` |
| -1 | `tier-gpt5-mini` |
| 0 | `tier-qwen` |
| 1 | `tier-haiku` |
| 2 | `tier-codex` |
| 3 | `tier-sonnet` |
| 4 | `tier-opus` |
| -1 | `tier-qwen-small` |
| 0 | `tier-qwen-med` |
| 1 | `tier-qwen-large` |
| 2 | `tier-kimi` |
**CRITICAL:** Parameters given explicitly in the prompt always take precedence. Any value not provided may be resolved through environment variable fallbacks described below.
**CRITICAL — Explicit vs Fetched Variables:** When constructing prompts for subagents (`estimator_agent` and `tier_agent`), only include variables that were **explicitly present** in the prompt you received. Omit any variable you had to fetch from environment variables or git remote. Downstream agents are capable of fetching missing variables themselves using their own fallback mechanisms. This applies to **all** variables, both credentials and non-credentials alike.
### What you receive in your prompt
| Parameter | Required? | Local Variable |
@@ -227,14 +292,14 @@ The following are the variables and the steps to fetch them:
For optional parameters not provided in your prompt, you may fall back to the environment variables listed below. Always give precedence to values explicitly passed in the prompt. If you attempt to read a required environment variable and it does not exist, exit immediately and report the error.
| Information | Env Variable | Required? | Local Variable |
|------------------|-------------------|:---------:|-------------------|
| Git name | `GIT_USER_NAME` | Yes | `git_user_name` |
| Git email | `GIT_USER_EMAIL` | Yes | `git_user_email` |
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Information | Env Variable | Required? | Local Variable |
|---------------------|-------------------|:---------:|-------------------|
| Git name | `GIT_USER_NAME` | Yes | `git_user_name` |
| Git email | `GIT_USER_EMAIL` | Yes | `git_user_email` |
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Repository base url | `FORGEJO_URL` | No | `forgejo_url` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
**Note:** The `Required?` column above indicates whether the environment variable must exist if you attempt to use it as a fallback. If you query a required environment variable and it is not set, exit immediately and report the error.
@@ -248,6 +313,8 @@ Invoke and resolve `{estimator_agent}`, call it as a subagent. Its job is to rev
#### Prompt template
**Only include a variable line if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the estimator will fetch it itself.
```
forgejo_url: `https://git.cleverthis.com`
forgejo_owner: `cleveragents`
@@ -302,14 +369,14 @@ For example here is a possible prompt:
| Repository owner | `forgejo_owner` | Owner/org of the repository |
| Repository name | `forgejo_repo` | Name of the repository |
| Forgejo PAT | `forgejo_pat` | For authenticated API reads |
| Task agent | `task_agent` | Name of the agent that will ultimately run the task; informs the scope of complexity estimation |
| Task prompt | `task_prompt` | Full prompt body that will be passed to the task agent; embedded verbatim as context for the estimator |
| Task agent | `task_agent` | Name of the agent that will ultimately run the task; informs the scope of complexity estimation |
| Task prompt | `task_prompt` | Full prompt body that will be passed to the task agent; embedded verbatim as context for the estimator |
### Tier Selectors
The following 7 tier selectors may be invoked by this dispatcher. Each is invoked identically — the only difference is which one is called based on the resolved `tier_agent` value.
**Agents:** `tier-gpt5-nano`, `tier-o4-mini`, `tier-gpt5-mini`, `tier-qwen`, `tier-haiku`, `tier-codex`, `tier-sonnet`, `tier-opus`
**Agents:** `tier-gpt5-nano`, `tier-o4-mini`, `tier-gpt5-mini`, `tier-qwen-small`, `tier-qwen-medium`, `tier-qwen-large`, `tier-haiku`, `tier-codex`, `tier-sonnet`, `tier-opus`, `tier-kimi`
#### How to invoke
@@ -319,6 +386,8 @@ Invoke the resolved `{tier_agent}` as a blocking call via the Task tool.
The prompt sent to the tier selector must be shaped so that after the tier selector strips the `target_agent` and `tier_agent` parameter lines, the remaining content is exactly what the inner task agent (`{task_agent}`) expects to receive. For `task-implementor` (and by convention, every `task-*` agent) that means credentials at the outer level, `escalation_tier` at the outer level, and the `{task_prompt}` body embedded inside a nested code block preceded by a short intro line and followed by a short outro instruction. The tier selector forwards everything except `target_agent` and `tier_agent` verbatim.
**Only include a variable line at the outer level if that variable was explicitly present in your prompt.** Omit any variable you fetched from environment variables — the inner agent will fetch it itself. The `{task_prompt}` block is passed as-is.
```
target_agent: `{task_agent}`
escalation_tier: `{escalation_tier}`
@@ -343,7 +412,7 @@ For example here is a possible prompt (with `{task_prompt}` already substituted
```
target_agent: `task-implementor`
escalation_tier: `1`
tier_agent: `tier-haiku`
tier_agent: `tier-qwen-large`
forgejo_url: "https://git.cleverthis.com"
forgejo_owner: "cleveragents"
forgejo_repo: "cleveragents-core"
@@ -369,7 +438,7 @@ The following is the task prompt, describing the directives the inner task agent
Carry out the instructions from the task prompt above.
```
Note that the credentials (`forgejo_url`, `forgejo_owner`, `forgejo_repo`, `forgejo_pat`, `git_user_name`, `git_user_email`) appear **twice** — once at the outer level (where the tier selector forwards them through to the inner task agent) and once inside the nested `{task_prompt}` code block (because `task_prompt` was constructed to be self-contained by the dispatcher's caller). This duplication is intentional; do not collapse it.
Note that the credentials (`forgejo_url`, `forgejo_owner`, `forgejo_repo`, `forgejo_pat`, `git_user_name`, `git_user_email`) appear **twice** — once at the outer level (where the tier selector forwards them through to the inner task agent) and once inside the nested `{task_prompt}` code block (because `task_prompt` was constructed to be self-contained by the dispatcher's caller). This duplication is intentional; do not collapse it. However, only include the outer-level credential lines if those credentials were **explicitly present** in the prompt you received.
#### Parameters to pass
@@ -392,6 +461,7 @@ Note that the credentials (`forgejo_url`, `forgejo_owner`, `forgejo_repo`, `forg
2. **Never implement work yourself.** Your only responsibilities are (a) calling `{estimator_agent}` to resolve the tier and (b) forwarding `{task_prompt}` to `{task_agent}` through the resolved `{tier_agent}`. Do not attempt to perform the work described in `{task_prompt}` — that is the inner task agent's job.
3. **Pass `{task_prompt}` verbatim.** Do not summarise, paraphrase, truncate, or otherwise modify the prompt body — embed it as-is into both the estimator call and the tier-selector call. Modifying it would change what the inner agents are asked to do.
4. **Pass all credentials verbatim.** Do not interpret, summarise, or modify any credential or configuration content received in your prompt — embed it as-is into the subagent prompts.
5. **Default to tier 0 on low confidence.** If `{estimator_agent}` returns `is_confident: false`, set `escalation_tier` to `0` (and `tier_agent` to `tier-qwen`) and dispatch from there. Do not pick a tier yourself or override a confident estimator response.
6. **Return the tier-selector output verbatim.** Do not summarise, interpret, or modify what the tier selector returns — pass it back to your caller exactly as received.
7. **Never ask questions or give up.** Operate fully autonomously using best judgement. If a required parameter is missing or a subagent fails fatally, exit immediately and report the error.
5. **Only pass explicitly-present variables.** Include only variables that were **explicitly present** in your prompt in subagent calls. Omit any variable you fetched from environment variables or git remote — downstream agents will fetch them themselves.
6. **Default to tier 0 on low confidence.** If `{estimator_agent}` returns `is_confident: false`, set `escalation_tier` to `0` (and `tier_agent` to `tier-qwen`) and dispatch from there. Do not pick a tier yourself or override a confident estimator response.
7. **Return the tier-selector output verbatim.** Do not summarise, interpret, or modify what the tier selector returns — pass it back to your caller exactly as received.
8. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question. If a required parameter is missing or a subagent fails fatally, exit immediately and report the error.
+80 -12
View File
@@ -13,24 +13,84 @@ reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +104,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -154,4 +222,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -12
View File
@@ -13,24 +13,84 @@ reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +104,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -154,4 +222,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -12
View File
@@ -13,24 +13,84 @@ reasoningEffort: "max"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +104,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -154,4 +222,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
@@ -1,6 +1,6 @@
---
description: >
Level 0 tier selector (default starting tier). Enforces the Qwen
`kimi` tier selector (default starting tier). Enforces the Kimi
model tier for any target agent passed via the `target_agent` parameter.
Receives a context prompt and invokes `{target_agent}` as a synchronous
subagent that inherits the Haiku model, then returns the result verbatim.
@@ -8,29 +8,88 @@ description: >
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
reasoningEffort: "high"
model: "CleverThis-4/Kimi-K2-6-GGUF-Q2-K-XL"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +103,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -69,9 +136,9 @@ permission:
"*": deny
---
# Tier Selector: Level 1 (Qwen)
# Tier Selector: `kimi`
You are a pure pass-through agent that enforces the Qwen model tier (level 1, the default starting tier for implementation work). You receive a context prompt and immediately invoke the `{target_agent}` subagent — which inherits your Qwen model tier. You do not interpret, modify, or act on the context yourself. Your sole purpose is model-tier enforcement, enabling callers to route any compatible worker through this tier.
You are a pure pass-through agent that enforces the Kimi model tier (level 1, the default starting tier for implementation work). You receive a context prompt and immediately invoke the `{target_agent}` subagent — which inherits your Kimi model tier. You do not interpret, modify, or act on the context yourself. Your sole purpose is model-tier enforcement, enabling callers to route any compatible worker through this tier.
## Behavior
@@ -89,7 +156,7 @@ Startup steps:
### Main task
This agent has no true loop of its own. It receives the context prompt, dispatches to `{target_agent}` at the Qwen tier, and returns the result.
This agent has no true loop of its own. It receives the context prompt, dispatches to `{target_agent}` at the Kimi tier, and returns the result.
1. Forward the entire received prompt — verbatim and without modification — to `{target_agent}` via the Task tool, **omitting the `tier_agent` parameter line** (if present) and **omitting the `target_agent` parameter line**
2. Return the result from `{target_agent}` verbatim to the caller
@@ -100,11 +167,11 @@ Throughout this prompt we will use a format where we will use the local variable
| Parameter | Local Variable | Notes |
|--------------|:---------------:|---------------------------------------------------------------------|
| Target agent | `target_agent` | Name of the subagent to invoke at the Qwen model tier |
| Target agent | `target_agent` | Name of the subagent to invoke at the Kimi model tier |
All other parameters present in the prompt are opaque pass-through values for `{target_agent}`. This tier selector does not interpret, validate, or act on them.
**CRITICAL:** Never interpret or act on the context yourself. Your only job is to enforce the Qwen model tier and forward everything to `{target_agent}`.
**CRITICAL:** Never interpret or act on the context yourself. Your only job is to enforce the Kimi model tier and forward everything to `{target_agent}`.
### What you receive in your prompt
@@ -137,7 +204,7 @@ This agent does not use environment variable fallbacks. All necessary parameters
#### How to invoke
Invoke `{target_agent}` as a blocking call via the Task tool, passing the full received prompt verbatim, omitting both `tier_agent` and `target_agent`. Because `{target_agent}` has no model of its own configured, it inherits this agent's Qwen model and runs at that tier.
Invoke `{target_agent}` as a blocking call via the Task tool, passing the full received prompt verbatim, omitting both `tier_agent` and `target_agent`. Because `{target_agent}` has no model of its own configured, it inherits this agent's Kimi model and runs at that tier.
#### Prompt template
@@ -154,4 +221,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -12
View File
@@ -13,24 +13,84 @@ reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +104,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -154,4 +222,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -12
View File
@@ -14,24 +14,84 @@ reasoningEffort: "max"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -45,18 +105,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -155,4 +223,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+224
View File
@@ -0,0 +1,224 @@
---
description: >
`qwen-large` tier selector (default starting tier). Enforces the Large Qwen
model tier for any target agent passed via the `target_agent` parameter.
Receives a context prompt and invokes `{target_agent}` as a synchronous
subagent that inherits the Haiku model, then returns the result verbatim.
Reusable across any worker that supports tier-based model escalation.
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-16/Qwen3-code-480B-A35B-INST-GGUF-1M-UD-Q3-K-XL"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
"context7*": deny
#Only agents that need external information should have these as allow
webfetch: deny
websearch: deny
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
# the selector reusable across any task agent.
task:
"task-*": allow
# All the skills this agent should have access to load
skill:
# Always start with deny and enable what the agent needs
"*": deny
---
# Tier Selector: qwen-large
You are a pure pass-through agent that enforces the Large Qwen model tier (level 1, the default starting tier for implementation work). You receive a context prompt and immediately invoke the `{target_agent}` subagent — which inherits your Large Qwen model tier. You do not interpret, modify, or act on the context yourself. Your sole purpose is model-tier enforcement, enabling callers to route any compatible worker through this tier.
## Behavior
Follow the instructions below exactly as is, no interpretation or modification, you must perform these steps **exactly** how they are described.
### Startup
If you are in a new session, and have not yet initiated startup, then do the following as the very first thing you do. **Never** proceed to the operation until these startup steps are completed.
Startup steps:
1. Verify the prompt is not empty — if it is, exit immediately and report the error
2. Parse `target_agent` from the prompt — if absent or empty, exit immediately and report the error
3. Proceed to the main task
### Main task
This agent has no true loop of its own. It receives the context prompt, dispatches to `{target_agent}` at the Large Qwen tier, and returns the result.
1. Forward the entire received prompt — verbatim and without modification — to `{target_agent}` via the Task tool, **omitting the `tier_agent` parameter line** (if present) and **omitting the `target_agent` parameter line**
2. Return the result from `{target_agent}` verbatim to the caller
## Parameters and local variables
Throughout this prompt we will use a format where we will use the local variable name in curly brackets anywhere we want to substitute the contents of that variable. For example, if `{target_agent}` has the value `task-implementor` then `{target_agent}` should be replaced with `task-implementor` wherever it appears.
| Parameter | Local Variable | Notes |
|--------------|:---------------:|---------------------------------------------------------------------|
| Target agent | `target_agent` | Name of the subagent to invoke at the Large Qwen model tier |
All other parameters present in the prompt are opaque pass-through values for `{target_agent}`. This tier selector does not interpret, validate, or act on them.
**CRITICAL:** Never interpret or act on the context yourself. Your only job is to enforce the Large Qwen model tier and forward everything to `{target_agent}`.
### What you receive in your prompt
| Parameter | Required? | Local Variable |
|--------------|:---------:|-----------------|
| Target agent | yes | `target_agent` |
All other content in the prompt is pass-through for `{target_agent}`.
#### Example prompt
```
target_agent: "task-implementor"
work_type: "issue_impl"
work_number: 42
[... all other parameters for the target agent ...]
```
### Variables to fetch
This agent does not fetch any variables from the repository context or environment. All parameters must be provided directly by the caller.
### Fallback to environment variables
This agent does not use environment variable fallbacks. All necessary parameters must be provided directly in the prompt.
## Subagents
### `{target_agent}`
#### How to invoke
Invoke `{target_agent}` as a blocking call via the Task tool, passing the full received prompt verbatim, omitting both `tier_agent` and `target_agent`. Because `{target_agent}` has no model of its own configured, it inherits this agent's Qwen model and runs at that tier.
#### Prompt template
Forward the entire received prompt as-is, removing:
- The `tier_agent` parameter line (if present) — its presence in the inner call would cause a dispatch loop
- The `target_agent` parameter line — not needed by the inner agent
#### Parameters to pass
All parameters received in this agent's own prompt — **except `tier_agent`** and **`target_agent`**.
## **CRITICAL** Rules
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+225
View File
@@ -0,0 +1,225 @@
---
description: >
`qwen-med` tier selector (default starting tier). Enforces the Qwen
model tier for any target agent passed via the `target_agent` parameter.
Receives a context prompt and invokes `{target_agent}` as a synchronous
subagent that inherits the Haiku model, then returns the result verbatim.
Reusable across any worker that supports tier-based model escalation.
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-9/Qwen3-6-35B-A3B-GGUF-MXFP4-MOE"
reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
"context7*": deny
#Only agents that need external information should have these as allow
webfetch: deny
websearch: deny
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
# the selector reusable across any task agent.
task:
"task-*": allow
# All the skills this agent should have access to load
skill:
# Always start with deny and enable what the agent needs
"*": deny
---
# Tier Selector: `qwen-med`
You are a pure pass-through agent that enforces the Qwen model tier. You receive a context prompt and immediately invoke the `{target_agent}` subagent — which inherits your Qwen model tier. You do not interpret, modify, or act on the context yourself. Your sole purpose is model-tier enforcement, enabling callers to route any compatible worker through this tier.
## Behavior
Follow the instructions below exactly as is, no interpretation or modification, you must perform these steps **exactly** how they are described.
### Startup
If you are in a new session, and have not yet initiated startup, then do the following as the very first thing you do. **Never** proceed to the operation until these startup steps are completed.
Startup steps:
1. Verify the prompt is not empty — if it is, exit immediately and report the error
2. Parse `target_agent` from the prompt — if absent or empty, exit immediately and report the error
3. Proceed to the main task
### Main task
This agent has no true loop of its own. It receives the context prompt, dispatches to `{target_agent}` effectively setting it to the `qwen-med` tier, and returns the result.
1. Forward the entire received prompt — verbatim and without modification — to `{target_agent}` via the Task tool, **omitting the `tier_agent` parameter line** (if present) and **omitting the `target_agent` parameter line**
2. Return the result from `{target_agent}` verbatim to the caller
## Parameters and local variables
Throughout this prompt we will use a format where we will use the local variable name in curly brackets anywhere we want to substitute the contents of that variable. For example, if `{target_agent}` has the value `task-implementor` then `{target_agent}` should be replaced with `task-implementor` wherever it appears.
| Parameter | Local Variable | Notes |
|--------------|:---------------:|---------------------------------------------------------------------|
| Target agent | `target_agent` | Name of the subagent to invoke at the Medium Qwen model tier |
All other parameters present in the prompt are opaque pass-through values for `{target_agent}`. This tier selector does not interpret, validate, or act on them.
**CRITICAL:** Never interpret or act on the context yourself. Your only job is to enforce the Medium Qwen model tier and forward everything to `{target_agent}`.
### What you receive in your prompt
| Parameter | Required? | Local Variable |
|--------------|:---------:|-----------------|
| Target agent | yes | `target_agent` |
All other content in the prompt is pass-through for `{target_agent}`.
#### Example prompt
```
target_agent: "task-implementor"
work_type: "issue_impl"
work_number: 42
[... all other parameters for the target agent ...]
```
### Variables to fetch
This agent does not fetch any variables from the repository context or environment. All parameters must be provided directly by the caller.
### Fallback to environment variables
This agent does not use environment variable fallbacks. All necessary parameters must be provided directly in the prompt.
## Subagents
### `{target_agent}`
#### How to invoke
Invoke `{target_agent}` as a blocking call via the Task tool, passing the full received prompt verbatim, omitting both `tier_agent` and `target_agent`. Because `{target_agent}` has no model of its own configured, it inherits this agent's Medium Qwen model and runs at that tier.
#### Prompt template
Forward the entire received prompt as-is, removing:
- The `tier_agent` parameter line (if present) — its presence in the inner call would cause a dispatch loop
- The `target_agent` parameter line — not needed by the inner agent
#### Parameters to pass
All parameters received in this agent's own prompt — **except `tier_agent`** and **`target_agent`**.
## **CRITICAL** Rules
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+225
View File
@@ -0,0 +1,225 @@
---
description: >
`qwen-small` tier selector (default starting tier). Enforces the Small Qwen
model tier for any target agent passed via the `target_agent` parameter.
Receives a context prompt and invokes `{target_agent}` as a synchronous
subagent that inherits the Haiku model, then returns the result verbatim.
Reusable across any worker that supports tier-based model escalation.
mode: subagent
hidden: false
temperature: 0.0
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
"glob": allow
"grep": allow
"doom_loop": deny
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/**": allow
"/app/**": deny
edit:
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
"context7*": deny
#Only agents that need external information should have these as allow
webfetch: deny
websearch: deny
codesearch: deny
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
# the selector reusable across any task agent.
task:
"task-*": allow
# All the skills this agent should have access to load
skill:
# Always start with deny and enable what the agent needs
"*": deny
---
# Tier Selector: `qwen-small`
You are a pure pass-through agent that enforces the Small Small Qwen model tier (level 1, the default starting tier for implementation work). You receive a context prompt and immediately invoke the `{target_agent}` subagent — which inherits your Small Qwen model tier. You do not interpret, modify, or act on the context yourself. Your sole purpose is model-tier enforcement, enabling callers to route any compatible worker through this tier.
## Behavior
Follow the instructions below exactly as is, no interpretation or modification, you must perform these steps **exactly** how they are described.
### Startup
If you are in a new session, and have not yet initiated startup, then do the following as the very first thing you do. **Never** proceed to the operation until these startup steps are completed.
Startup steps:
1. Verify the prompt is not empty — if it is, exit immediately and report the error
2. Parse `target_agent` from the prompt — if absent or empty, exit immediately and report the error
3. Proceed to the main task
### Main task
This agent has no true loop of its own. It receives the context prompt, dispatches to `{target_agent}` at the Small Qwen tier, and returns the result.
1. Forward the entire received prompt — verbatim and without modification — to `{target_agent}` via the Task tool, **omitting the `tier_agent` parameter line** (if present) and **omitting the `target_agent` parameter line**
2. Return the result from `{target_agent}` verbatim to the caller
## Parameters and local variables
Throughout this prompt we will use a format where we will use the local variable name in curly brackets anywhere we want to substitute the contents of that variable. For example, if `{target_agent}` has the value `task-implementor` then `{target_agent}` should be replaced with `task-implementor` wherever it appears.
| Parameter | Local Variable | Notes |
|--------------|:---------------:|---------------------------------------------------------------------|
| Target agent | `target_agent` | Name of the subagent to invoke at the Small Qwen model tier |
All other parameters present in the prompt are opaque pass-through values for `{target_agent}`. This tier selector does not interpret, validate, or act on them.
**CRITICAL:** Never interpret or act on the context yourself. Your only job is to enforce the Small Qwen model tier and forward everything to `{target_agent}`.
### What you receive in your prompt
| Parameter | Required? | Local Variable |
|--------------|:---------:|-----------------|
| Target agent | yes | `target_agent` |
All other content in the prompt is pass-through for `{target_agent}`.
#### Example prompt
```
target_agent: "task-implementor"
work_type: "issue_impl"
work_number: 42
[... all other parameters for the target agent ...]
```
### Variables to fetch
This agent does not fetch any variables from the repository context or environment. All parameters must be provided directly by the caller.
### Fallback to environment variables
This agent does not use environment variable fallbacks. All necessary parameters must be provided directly in the prompt.
## Subagents
### `{target_agent}`
#### How to invoke
Invoke `{target_agent}` as a blocking call via the Task tool, passing the full received prompt verbatim, omitting both `tier_agent` and `target_agent`. Because `{target_agent}` has no model of its own configured, it inherits this agent's Qwen model and runs at that tier.
#### Prompt template
Forward the entire received prompt as-is, removing:
- The `tier_agent` parameter line (if present) — its presence in the inner call would cause a dispatch loop
- The `target_agent` parameter line — not needed by the inner agent
#### Parameters to pass
All parameters received in this agent's own prompt — **except `tier_agent`** and **`target_agent`**.
## **CRITICAL** Rules
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+80 -12
View File
@@ -13,24 +13,84 @@ reasoningEffort: "max"
# All pass-through type agents for abstraction and reusability purposes, use the following color
color: "#FFFF00"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# Agents called in an async manner should have this set to deny, otherwise use best discretion
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# I don't think MCP permissions work, but just in case they do these two should be the only ones usually allowed
"sequential-thinking*": deny
@@ -44,18 +104,26 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# The following bash permissions must be applied to all agents in the auto-agents-system
# Block ALL commands that could hit the label creation endpoints
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# target_agent is caller-controlled but is required by convention to be a
# `task-*` agent (the final inner work agent in the tiered dispatch flow).
# Restricting the wildcard to `task-*` enforces that contract while keeping
@@ -154,4 +222,4 @@ All parameters received in this agent's own prompt — **except `tier_agent`** a
1. **Never act on the context.** Your only role is model-tier enforcement and pass-through.
2. **Strip `tier_agent` and `target_agent` before forwarding.** `tier_agent` would cause a dispatch loop in the inner agent; `target_agent` is a routing instruction for this tier selector only.
3. **Return results verbatim.** Do not summarize, interpret, or modify what `{target_agent}` returns.
4. **Never ask questions or give up.** Operate fully autonomously using best judgement.
4. **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+92 -13
View File
@@ -7,29 +7,89 @@ description: >
mode: subagent
hidden: true
temperature: 0.1
model: "CleverThis-8/Qwen3-Coder-Next-GGUF-Q6-K"
model: "CleverThis-15/Qwen3-6-35B-A3B-GGUF-UD-Q3-K-XL"
reasoningEffort: "high"
# All utility type agents use the following color
color: "#5555FF"
permission:
# Block whatever we don't explicitly allow
"*": deny
"glob": allow
"grep": allow
"doom_loop": deny
# One-shot subagent, no questions
# This agent only needs to call one subagent
"question": deny
# All agents are supposed to be working in isolated repos in `/tmp`, so this forces that
external_directory:
"/tmp/*": allow
"/tmp/**": allow
"/app/**": deny
edit:
"*": deny
"/tmp/*": allow
write:
"*": deny
"/tmp/*": allow
"a**": deny
"b**": deny
"c**": deny
"d**": deny
"e**": deny
"f**": deny
"g**": deny
"h**": deny
"i**": deny
"j**": deny
"k**": deny
"l**": deny
"m**": deny
"n**": deny
"o**": deny
"p**": deny
"q**": deny
"r**": deny
"s**": deny
"t**": deny
"u**": deny
"v**": deny
"w**": deny
"x**": deny
"y**": deny
"z**": deny
"A**": deny
"B**": deny
"C**": deny
"D**": deny
"E**": deny
"F**": deny
"G**": deny
"H**": deny
"I**": deny
"J**": deny
"K**": deny
"L**": deny
"M**": deny
"N**": deny
"O**": deny
"P**": deny
"Q**": deny
"R**": deny
"S**": deny
"T**": deny
"U**": deny
"V**": deny
"W**": deny
"X**": deny
"Y**": deny
"Z**": deny
"1**": deny
"2**": deny
"3**": deny
"4**": deny
"5**": deny
"6**": deny
"7**": deny
"8**": deny
"9**": deny
"0**": deny
"/app/**": deny
"/tmp/**": allow
read:
"*": allow
"**": allow
# MCP permissions
"sequential-thinking*": allow
@@ -43,8 +103,11 @@ permission:
bash:
# All agents should start with deny and then add in as needed
"*": deny
"echo $*": allow
"echo *": allow
"cat *": allow
"printenv *": allow
"git -C * remote get-url origin": allow
"git remote get-url origin": allow
# Work-group fetch scripts from auto-agents-system
"npx --yes tsx *.opencode/skills/auto-agents-system/scripts/*": allow
@@ -60,10 +123,15 @@ permission:
"*api/v1/orgs/*/labels*": deny
"*api/v1/repos/*/labels*": deny
"*https://git.cleverthis.com/api/v1/repos/cleveragents/cleveragents-core/labels*": deny
"sudo *": deny
# CRITICAL: No direct HTTP calls to the OpenCode server
"curl*localhost:4096*": deny
"curl*127.0.0.1:4096*": deny
"*force_merge*": deny
"*sudo*": deny
# No subagents needed
task:
"*": deny
@@ -123,8 +191,19 @@ Each item in `items` should include only the fields the supervisor needs to disp
| Pool size | yes | Number of items to return |
| Credentials | no | May be provided, or read from vault |
### Fallback to environment variables
For optional parameters not provided in your prompt, you may fall back to the environment variables listed below. Always give precedence to values explicitly passed in the prompt. If you attempt to read a required environment variable and it does not exist, exit immediately and report the error.
| Information | Env Variable | Required? | Local Variable |
|------------------|-------------------|:---------:|-------------------|
| Forgejo PAT | `FORGEJO_PAT` | Yes | `forgejo_pat` |
| Repository base url | `FORGEJO_URL` | No | `forgejo_url` |
| Repository owner | `FORGEJO_OWNER` | No | `forgejo_owner` |
| Repository name | `FORGEJO_REPO` | No | `forgejo_repo` |
## **CRITICAL** Rules
- **Return compact results.** The whole point is to keep the supervisor's context clean. Return only what's needed.
- **Report errors, don't hide them.** If a fetch fails, include it in the `errors` array.
- **Never ask questions or give up.** Return the best results you can even if some groups fail.
- **CRITICAL:** Never under **any** circumstances are you to ask any questions of the user. If you have a question, use your best judgement and answer it yourself. Even if you are completely unsure of the answer, make your best guest. It is **COMPLETELY FORBIDDEN** for you to ever ask a question.
+13 -1
View File
@@ -5,6 +5,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]
### Documentation
- **Spec clarifications: layer boundary DI exception, ULID scope, TUI/ACMS gaps** (#10451): Added targeted clarifications to `docs/specification.md` including: the sole permitted location (`application/container.py`) where application layer may reference infrastructure concrete types; distinction between domain entity IDs (must be ULID) and ephemeral internal implementation IDs; per-stage protocol contracts, storage tier definitions, budget enforcement protocol, and output format for ACMS pipeline stages; and public interface definitions with verifiable checks for 8 TUI components.
### Changed
- **`agents session list` now displays full 26-character session ULIDs** (#10970): The Rich table
@@ -23,10 +27,18 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Agent Skills), and agent-to-agent protocol handlers. The version floor ensures vulnerable
versions (<3.13.4) cannot be installed even if upstream transitive dependencies have loose
version constraints.
### Fixed
- **fix(cleanup): invalidate ``sandbox_dirs_cache`` after purge (#7527)**: When
``CleanupService._purge_sandboxes()`` removed stale sandbox directories via
``shutil.rmtree()``, the ``_sandbox_dirs_cache`` was not invalidated, causing
subsequent calls to ``_get_sandbox_dirs()`` to return references to already-deleted
paths. Added cache invalidation at the end of ``_purge_sandboxes()`` so that the next
scan re-reads the filesystem, and added BDD scenarios verifying the cache is reset to
``None`` after purge. (#7527)
- **Implementation Supervisor PR Compliance Checklist** (#9824): Added a mandatory
8-item PR Compliance Checklist to the worker prompt body in `implementation-supervisor.md`
that every implementation worker must complete before creating a PR. Checklist covers:
CHANGELOG.md update, CONTRIBUTORS.md update, commit footer (`ISSUES CLOSED: #N`),
+5
View File
@@ -9,6 +9,9 @@
* Rui Hu <rui.hu@cleverthis.com>
# Details
* HAL 9000 has contributed spec clarifications for layer boundary DI exception, ULID scope, ACMS pipeline contracts, and TUI component interfaces (PR #10451): documented architectural invariants including the DI container exception, clarified ULID identifier scope distinguishing domain entities from internal implementation details, added per-stage protocol contracts for all 10 ACMS pipeline stages with storage tier definitions, budget enforcement protocol, and context assembly output format, and defined public interfaces with verifiable checks for 8 TUI components.
Below are some of the specific details of various contributions.
@@ -31,3 +34,5 @@ Below are some of the specific details of various contributions.
* HAL 9000 has contributed comprehensive milestone documentation for v3.6.0 (Advanced Concepts & Deferred Features) and v3.7.0 (TUI Implementation) (PR #9903): split into sub-documents covering context strategies, LLM backends, resource types, A2A rename, container tool execution, scope chain resolution, cost/safety budgets, E2E workflow tests, code review examples, plugin architecture, TUI layout, persona system, reference/command input, session management, configuration, and TuiMaterializer integration.
* HAL 9000 has contributed the LLMTraceRepository data-integrity fix (PR #8185 / issue #7505): replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a dual-path implementation that respects the UnitOfWork pattern — flushing only when an external session is provided, and flushing + committing + closing when operating standalone. This eliminates premature transaction commits, loss of rollback capability, and a docstring/implementation mismatch.
* HAL 9000 has contributed the ACMS Index Data Model and File Traversal Engine (PR #9664 / issue #9579): foundational data structures for indexed context entries with hot/warm/cold/archive storage tier classification, tag system, and a timeout-safe chunked file traversal engine for large projects with 10,000+ files.
* HAL 9000 has contributed the sandbox_dirs_cache invalidation fix (PR #8257 / issue #7527): added cache reset to ``CleanupService._purge_sandboxes()`` so that ``_get_sandbox_dirs()` re-reads the filesystem after directories are deleted by purge, and added BDD scenarios verifying the cache behaves correctly.
+70 -1
View File
@@ -47086,6 +47086,48 @@ This section defines the ordered milestone plan for CleverAgents v3.x, mapping a
| 11 | Skeleton compression for child plan context inheritance | §Skeleton Compressor | Child plans receive compressed parent context via `skeleton_ratio` budget |
| 12 | Test coverage ≥ 97% | §Quality Gates | `nox -s coverage_report` passes |
#### Pipeline Protocol Contracts
Each of the 10 Context Assembly Pipeline stages has a defined input/output contract. Implementations of pluggable components MUST honour these contracts:
| Stage | Input | Output | Error Behavior |
|-------|-------|--------|----------------|
| **StrategySelector** | `ContextRequest` (CRP directives, plan context, budget) | `list[StrategyInvocation]` — strategies to run with confidence weights | Returns empty list on failure; pipeline continues with no strategies (produces empty context) |
| **BudgetAllocator** | `list[StrategyInvocation]`, total token budget | `dict[str, int]` — per-strategy token budgets | Raises `BudgetAllocationError` if total budget < `min-useful-budget`; pipeline aborts |
| **StrategyExecutor** | `list[StrategyInvocation]` with budgets | `list[ContextFragment]` — raw retrieved fragments | Per-strategy circuit breaker; failed strategies produce empty fragment list; other strategies continue |
| **FragmentDeduplicator** | `list[ContextFragment]` | `list[ContextFragment]` — deduplicated fragments | Returns input unchanged on internal error; logs warning |
| **DetailDepthResolver** | `list[ContextFragment]` with potential depth conflicts | `list[ContextFragment]` — one entry per UKO node at resolved depth | Returns input unchanged on conflict; logs warning |
| **FragmentScorer** | `list[ContextFragment]`, `PlanContext` | `list[ScoredFragment]` — fragments with composite relevance scores | Returns fragments with score=0.0 on scoring failure; they will be deprioritized by BudgetPacker |
| **BudgetPacker** | `list[ScoredFragment]`, token budget | `list[ScoredFragment]` — fragments that fit within budget | Raises `BudgetPackingError` if no fragment fits even at depth 0; pipeline produces empty context |
| **FragmentOrderer** | `list[ScoredFragment]` | `list[ScoredFragment]` — coherently ordered fragments | Returns input in original order on failure; logs warning |
| **PreambleGenerator** | `list[ScoredFragment]`, `PlanContext` | `str` — provenance preamble (max 200 tokens) | Returns empty string on failure; context assembled without preamble |
| **SkeletonCompressor** | Parent plan `list[ScoredFragment]`, skeleton budget ratio | `list[ScoredFragment]` — compressed skeleton fragments | Returns empty list on failure; child plan receives no inherited context |
**Storage Tier Definitions:**
| Tier | Contents | Capacity | Eviction Policy |
|------|----------|----------|-----------------|
| **Hot** | Current working set loaded into LLM context window | `context.hot.max-tokens` (default: 16,000 tokens) | Overflow evicts lowest-scored fragments to warm tier |
| **Warm** | Recent decisions and fragments available for retrieval | `context.warm.max-decisions` (default: 100 decisions); retained for `context.tiers.warm.retention-hours` (default: 24h) | Age-based eviction to cold tier |
| **Cold** | Historical decisions and fragments for audit and correction | `context.cold.max-decisions` (default: 500 decisions); retained for `context.tiers.cold.retention-days` (default: 90 days) | Permanent archive; manual deletion only |
**Budget Enforcement Protocol:**
1. Files exceeding `context.file.max-size` (default: 1 MB) are summarized or excluded before fragment creation.
2. Total file size across all fragments must not exceed `context.file.max-total-size` (default: 50 MB); fragments are excluded in reverse score order until the limit is met.
3. The token budget is a hard ceiling enforced by `BudgetPacker`; no fragment may cause the assembled context to exceed `model_context_window - response_reserve - tool_definitions - skeleton_allocation`.
4. Fragments below `context.query.min-relevance` (default: 0.3) are discarded by `FragmentScorer` before packing.
**Context Assembly Output Format:**
The pipeline produces an `AssembledContext` object delivered to the actor:
- `preamble: str` — provenance summary (source strategies, fragment counts, budget utilization)
- `fragments: list[OrderedFragment]` — ordered context fragments, each with `uko_uri`, `content`, `depth`, `token_count`, `source_strategy`
- `budget_used: int` — total tokens consumed
- `budget_total: int` — total budget available
- `strategies_invoked: list[str]` — names of strategies that contributed fragments
- `skeleton_fragments: list[OrderedFragment]` — compressed parent context (empty for root plans)
#### Key Architectural Constraints
- **Pipeline composability**: All 10 Context Assembly Pipeline slots are overridable at plan > project > global scope.
@@ -47221,6 +47263,29 @@ This section defines the ordered milestone plan for CleverAgents v3.x, mapping a
| 18 | `agents tui web` launches Textual Web mode | §TUI — Web Mode | Web mode accessible via browser at configured port |
| 19 | Test coverage ≥ 97% | §Quality Gates | `nox -s coverage_report` passes |
#### Key Component Interfaces
The following components define the public interfaces for the TUI implementation. Each must be implemented as specified for the deliverables to be verifiable:
| Component | Module | Responsibility | Public Interface |
|-----------|--------|----------------|-----------------|
| `CleverAgentsApp` | `tui/app.py` | Root Textual `App`; manages screens, global state, A2A client | `run()`, `push_screen(screen)`, `switch_session(session_id)`, `notify(message, severity)` |
| `MainScreen` | `tui/screens/main.py` | Primary chat interface with sidebar and prompt | `cycle_sidebar_state()`, `submit_prompt(text)`, `stream_message(block)`, `set_persona(persona)` |
| `TuiMaterializer` | `tui/materializer.py` | `MaterializationStrategy` implementation mapping `ElementHandle` events to Textual widgets | `materialize(session: OutputSession) -> None`; implements all `ElementHandle` types from ADR-021 |
| `PersonaRegistry` | `tui/persona/registry.py` | Loads, validates, and provides access to persona YAML files | `load_all() -> list[Persona]`, `get(name: str) -> Persona`, `save(persona: Persona) -> None`, `delete(name: str) -> None` |
| `SessionTracker` | `tui/session/tracker.py` | Tracks active TUI sessions and their A2A bindings | `create_session(persona: Persona) -> TuiSession`, `get_active() -> TuiSession`, `switch(session_id: str) -> None`, `close(session_id: str) -> None` |
| `ReferencePickerOverlay` | `tui/widgets/reference_picker.py` | Fuzzy-search overlay for `@` reference resolution | `search(query: str) -> list[ReferenceResult]`; resolves to CRP directives via A2A |
| `SlashCommandOverlay` | `tui/widgets/slash_command.py` | Tab-completable command overlay for `/` prefix | `filter(prefix: str) -> list[Command]`, `execute(command: str, args: list[str]) -> None` |
| `PersonaBar` | `tui/widgets/persona_bar.py` | Always-visible status bar below prompt | `update(persona: Persona, preset: str, cost: float) -> None` |
**Verifiable Checks for Component Interfaces:**
- `TuiMaterializer` must pass the same `OutputSession` test fixtures used for `RichMaterializer` — all 9 `ElementHandle` types produce Textual widgets without error.
- `PersonaRegistry.load_all()` must return an empty list (not raise) when `~/.config/cleveragents/personas/` does not exist.
- `SessionTracker.create_session()` must persist the session to `~/.local/state/cleveragents/tui.db` before returning.
- `ReferencePickerOverlay.search()` must return results within 200ms for indexes with up to 10,000 resources.
- `MainScreen.cycle_sidebar_state()` must cycle `hidden → visible → fullscreen → hidden` and update layout without layout thrashing.
#### Key Architectural Constraints
- **Textual version**: Textual ≥ 1.0 required; no compatibility with pre-1.0 API.
@@ -47313,9 +47378,13 @@ These architectural invariants must be maintained across all milestones:
1. **Spec-first**: No feature is implemented without spec coverage. If implementation discovers a better approach, the spec is updated first via PR.
2. **Layer boundaries**: Presentation → Application → Domain → Infrastructure. No reverse dependencies.
> **DI Container Exception**: The dependency injection container (`application/container.py`) is the sole permitted location where the application layer may reference infrastructure layer concrete types. This is the wiring point. All other application services MUST depend only on protocol abstractions defined in `application/protocols/` or `domain/`. This is an architectural invariant, not a guideline.
3. **Type safety**: Full Pyright strict compliance. No `# type: ignore` suppressions.
4. **Fail-fast**: All argument validation at entry points. No silent failures.
5. **ULID identifiers**: Plans, decisions, resources, correction attempts, and validation attachments use ULIDs. Projects, actions, skills, and tools use namespaced names.
5. **ULID identifiers**: > **ULID Scope**: ULID identifiers are required for all domain entity identifiers: Plan IDs, Decision IDs, Resource IDs, Correction Attempt IDs, and Validation IDs. Internal implementation identifiers (e.g., LangGraph thread IDs, temporary cache keys) are NOT required to use ULID format. The distinction: if the ID is stored in the database as a domain entity attribute, it must be a ULID; if it is an ephemeral internal implementation detail, it may use any suitable format.
Plans, decisions, resources, correction attempts, and validation attachments use ULIDs. Projects, actions, skills, and tools use namespaced names.
6. **Namespace format**: `[[server:]namespace/]name`. `local/` reserved for local-only items.
7. **A2A exclusivity**: All client-server communication uses A2A. No REST API.
8. **BDD tests**: All unit-level tests expressed as Behave/Gherkin scenarios. No xUnit-style tests.
@@ -41,6 +41,19 @@ Feature: CleanupService uncovered lines coverage
When cleanup coverage purges sandboxes and rmtree raises OSError
Then cleanup coverage purge sandbox report should show skipped count of 1
Scenario: _purge_sandboxes invalidates cache so next scan re-reads filesystem
Given cleanup coverage has a CleanupService with default settings
And cleanup coverage has cached sandbox dir "/tmp/ca-sandbox-oldplan-abc" that is stale
When cleanup coverage purges sandboxes and rmtree succeeds for all dirs
Then cleanup coverage _sandbox_dirs_cache should be None after purge
Scenario: cache invalidation causes fresh filesystem scan after purge
Given cleanup coverage has a CleanupService with default settings
And cleanup coverage has cached sandbox dir "/tmp/ca-sandbox-oldplan-abc" that is stale
When cleanup coverage purges sandboxes and rmtree succeeds for all dirs
And cleanup coverage calls _get_sandbox_dirs after purge (cache was invalidated)
Then cleanup coverage second _get_sandbox_dirs call returns fresh filesystem result
# ── scan_checkpoints_for_plan ──────────────────────────────────
Scenario: scan_checkpoints_for_plan returns empty when dir does not exist
@@ -213,6 +213,82 @@ def step_cleanup_cov_purge_sandboxes_rmtree_oserror(context: Context) -> None:
context.cleanup_report = report
@when(
"cleanup coverage purges sandboxes and rmtree succeeds for all dirs",
)
def step_cleanup_cov_purge_sandboxes_rmtree_success(context: Context) -> None:
"""Purge sandboxes with a mock that confirms each rmtree call succeeds."""
svc = context.cleanup_service
report = CleanupReport(dry_run=False)
stale_dir = MagicMock()
stale_dir.name = "ca-sandbox-oldplan-abc"
stale_dir.stat.return_value = MagicMock(
st_mtime=time.time() - 999999,
)
svc._sandbox_dirs_cache = [stale_dir]
with patch(
"cleveragents.application.services.cleanup_service.shutil"
) as mock_shutil:
mock_shutil.rmtree.return_value = None # success
svc._purge_sandboxes(report)
context.cleanup_report = report
@when(
'cleanup coverage has cached sandbox dir "{sandbox_path}" that is stale',
)
def step_cleanup_cov_set_cached_stale_dir(context: Context, sandbox_path: str) -> None:
"""Pre-populate the cache with a single stale sandbox directory."""
svc = MagicMock()
svc.name = Path(sandbox_path).name
svc.stat.return_value = MagicMock(st_mtime=time.time() - 999999)
svc.__str__ = lambda self, path=sandbox_path: path
context.cleanup_service._sandbox_dirs_cache = [svc]
@then("cleanup coverage _sandbox_dirs_cache should be None after purge")
def step_cleanup_cov_cache_is_none(context: Context) -> None:
assert context.cleanup_service._sandbox_dirs_cache is None, (
f"Expected cache to be None after purge, got {context.cleanup_service._sandbox_dirs_cache!r}"
)
@when(
"cleanup coverage calls _get_sandbox_dirs after purge (cache was invalidated)",
)
def step_cleanup_cov_get_sandbox_dirs_after_purge(context: Context) -> None:
"""Call _get_sandbox_dirs after the cache was invalidated by a previous purge.
Since sandbox dirs have been removed from /tmp (or in this mock test the
directories don't exist), the filesystem scan returns an empty list and
a fresh cached result is stored.
"""
svc = context.cleanup_service
with patch(
"cleveragents.application.services.cleanup_service.tempfile"
) as mock_tmp:
mock_tmp.gettempdir.return_value = "/tmp"
with patch.object(Path, "exists", return_value=False):
context.cleanup_after_purge_result = svc._get_sandbox_dirs()
@then(
"cleanup coverage second _get_sandbox_dirs call returns fresh filesystem result",
)
def step_cleanup_cov_fresh_result(context: Context) -> None:
# After cache invalidation and a filesystem scan, the result should be freshly computed.
assert context.cleanup_after_purge_result is not None, (
"Expected a result from the second _get_sandbox_dirs call"
)
assert isinstance(context.cleanup_after_purge_result, list), (
f"Expected list, got {type(context.cleanup_after_purge_result)}"
)
@when("cleanup coverage scans checkpoints for a non-existent directory")
def step_cleanup_cov_scan_checkpoints_nodir(context: Context) -> None:
fake_dir = Path(tempfile.mkdtemp()) / "nonexistent"
Regular → Executable
+1 -1
View File
@@ -17,7 +17,7 @@ PORT="${OPENCODE_PORT:-4096}"
HOST="${OPENCODE_HOST:-127.0.0.1}"
BASE="http://${HOST}:${PORT}"
AGENT="auto-agents"
PROMPT="Complete the current project's milestones up to and including v3.7.0 to a production ready state"
PROMPT="Initialize the new environment then enter your main loop forever."
HEALTH_TIMEOUT=60 # seconds to wait for the server to become healthy
MAX_IDLE_PER_MINUTE=10
@@ -174,7 +174,14 @@ class CleanupService:
)
def _purge_sandboxes(self, report: CleanupReport) -> None:
"""Remove stale sandbox directories."""
"""Remove stale sandbox directories.
After purging, the ``_sandbox_dirs_cache`` is reset to ``None`` so that
the next call to :meth:`_get_sandbox_dirs` re-reads the filesystem and
picks up any directories created since the last purge. Without this
cache invalidation every subsequent scan would reference directories
that no longer exist on disk.
"""
dirs = self._get_sandbox_dirs()
for d in dirs:
report.sandboxes.scanned += 1
@@ -191,6 +198,8 @@ class CleanupService:
report.sandboxes.removed += 1
except OSError:
report.sandboxes.skipped += 1
# Invalidate cache so the next scan re-reads the filesystem.
self._sandbox_dirs_cache = None
# ── Checkpoint cleanup ────────────────────────────────────────