build: removed rules skills, its in the system skill
CI / lint (push) Successful in 27s
CI / typecheck (push) Successful in 56s
CI / quality (push) Successful in 29s
CI / security (push) Successful in 55s
CI / build (push) Successful in 24s
CI / helm (push) Successful in 31s
CI / push-validation (push) Successful in 20s
CI / e2e_tests (push) Failing after 4m14s
CI / unit_tests (push) Successful in 5m57s
CI / integration_tests (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled

This commit is contained in:
2026-04-16 18:01:14 -04:00
parent a58d17416c
commit 703cf13c01
@@ -1,116 +0,0 @@
---
name: cleveragents-agent-rules
description: |
Universal operational rules that every CleverAgents agent must follow
without exception. Load this skill to get the complete specification for
exhaustive pagination, label management, bot signatures, credential flow,
and localhost:4096 access restrictions.
Use this skill whenever you need to know: exactly how to paginate any
list-returning call (Forgejo MCP, curl, or bash), why all label operations
must go through forgejo-label-manager, what the required bot signature
format is, how credentials flow top-down through prompts (never env vars),
and why only async-agent-manager may call localhost:4096.
Covers: exhaustive pagination protocol (limit=50, page-by-page, partial-page
stop condition), label management via forgejo-label-manager subagent (no
direct Forgejo MCP label tools, no curl label mutations, org-level labels
only, never create), bot signature block format and placement requirement,
credential flow hierarchy (product-builder reads env vars → passes to
supervisors in prompt → supervisors pass to workers in prompt → workers
never read env vars), and the localhost:4096 restriction (async-agent-manager
is the sole permitted caller of the OpenCode server API).
---
# Universal Agent Rules
These rules apply to **every** agent in the CleverAgents system without exception.
## Exhaustive Pagination
Every tool call, REST/curl request, or any other command that returns a list
must be treated as potentially paginated and incomplete.
**Required protocol:**
1. Always set `limit` to its maximum available value:
- Forgejo MCP tools: `limit=50`
- Direct REST/curl calls: `limit=50` or higher
2. After each list response, count the returned items.
3. If there is more than one item returned in the last call, fetch the next page.
4. Continue until receiving an empty page.
5. Concatenate all pages before processing. Never process a partial set.
This rule applies to **every** list-returning call without exception:
Forgejo MCP tools, curl REST calls, bash commands (`find`, `git log`,
`git branch -r`, etc.), and any other list-producing operation.
**Why this matters:** Missing a page means silently skipping work items,
causing incorrect escalation decisions, duplicate filings, or incomplete
audits. The cost of an extra API call is always less than the cost of
a missed item.
## Label Management via `forgejo-label-manager`
**All label operations must go through the `forgejo-label-manager` subagent.**
Rules:
- Never apply, remove, or replace labels using Forgejo MCP tools
(`forgejo_add_issue_labels`, `forgejo_edit_issue`, etc.)
- Never apply labels via direct curl or REST API calls
- Never use `forgejo_list_repo_labels` or any other method to retrieve
repo-level lables — use org-level labels only
- Always delegate every label operation to the `forgejo-label-manager`
subagent (operations: `apply_labels`, `remove_label`, `get_labels`,
`validate_labels`)
- Only apply existing organization-level labels — **never create new labels**
- `forgejo_create_label`, `forgejo_create_org_label`, and
`forgejo_create_repo_label` are completely forbidden
## Signature
Every piece of content you create on Forgejo (issue bodies, comments, PR
descriptions) must end with this exact block. The `Supervisor:` and
`Agent:` values are specific to your agent — use the values given in your
system prompt:
```
---
**Automated by CleverAgents Bot**
Supervisor: [Your Pool Name] | Agent: [your-agent-name]
```
Utility subagents that do not belong to a pool omit the `Supervisor:` line:
```
---
**Automated by CleverAgents Bot**
Agent: [your-agent-name]
```
## Credential Flow
**Workers never read environment variables.** All credentials flow downward
through prompt text only:
1. `product-builder` reads credentials from environment variables at startup.
2. `product-builder` embeds credentials in each supervisor's launch prompt.
3. Each supervisor embeds credentials in every worker prompt it dispatches.
4. Workers receive all credentials as plain text in their prompt — never
through `os.environ` or `echo $VAR`.
Every supervisor's worker prompt **must** include:
- Repository owner and name
- Forgejo PAT
- Git identity (name and email)
- Any other credentials the worker requires
## localhost:4096 Restriction
Only `async-agent-manager` is permitted to make HTTP calls to the OpenCode
server at `localhost:4096` (or `127.0.0.1:4096`). No other agent may call
this endpoint directly.
To launch, monitor, or clean up async agent sessions, invoke the
`async-agent-manager` subagent via the Task tool. Pass the operation and
all required parameters in the prompt.