local-agency
Skill5 starsChanged 6 days agoMITView on GitHub
Free-first writer path. Use before a host session writer whenever a free or local model can do the item, including OpenCode on a READY local runtime.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- api-integration-testingSkill
- architectSkill
- chaos-engineSkill
- ci-cdSkill
- colibriSkill
- docs-hygieneSkill
- freetokenSkill
- git-cleanupSkill
- job-applicationsSkill
- job-applySkill
- job-searchSkill
- kanbanSkill
- learn-from-external-harnessesSkill
- local-coding-delegateSkill
- local-openai-compatSkill
- local-runtimesSkill
- mobile-testingSkill
- omnirouteSkill
- pre-done-self-reviewSkill
- security-auditSkill
- self-improveSkill
- technical-presentationsSkill
- test-engineeringSkill
- test-env-setupSkill
- web-e2e-automationSkill
- work-itemSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Prefer a READY local runtime: FreeToken (:1919), then Ollama / LM Studio / llamacpp via local-openai-compat, then Colibri (:8000) via …
- Distinctive: line 39
Do not silently fall back to cloud OmniRoute.
- Distinctive: line 42
Do not install OpenCode from this skill silently or unprompted.
- Distinctive: line 45
Never bind or probe a non-loopback URL from ChaosEngine.
- Very specific: line 112
When dispatch.py chat returns OpenAI-compat usage and --session-id is set, dispatch records session_token_usage.py with --channel local and …
- Distinctive: line 119
Follow the delegation ladder.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Local agency (OpenCode)
Free-first writer path. Not a workflow owner; select the canonical workflow in execution workflows first.
Local agency vs session agents
| Path | When | Owner |
| Session subagents / Task | Paid rung of the delegation ladder, after the ask rung | Host adapter + delegation |
| Local agency (this skill) | Default writer path when a free model or a READY local runtime exists | This skill + READY runtime |
Hard rails (never regress)
- Prefer a READY local runtime: FreeToken (
:1919), then Ollama / LM Studio / llamacpp via local-openai-compat, then Colibri (:8000) via colibri (frontier MoE; prefer FreeToken for coding agency). - Configure OpenCode with ephemeral
OPENCODE_CONFIG/OPENCODE_CONFIG_CONTENTthat setsenabled_providersto the READY local provider. OpenCode merges global config; the allowlist keeps other providers out of that process.--pureonly disables external plugins. - Never persist OpenCode settings under the durable user config directory (helper refuses those paths),
never
ft launch/ft serve, never start local servers from CE. - Do not silently fall back to cloud OmniRoute. A missing local runtime follows the delegation ladder. Do not open a paid writer or a session agent in that turn.
- Do not install OpenCode from this skill silently or unprompted. Inspect hardware, recommend fitting models, and obtain explicit owner approval before any install or configuration. Operator install stays on vendor docs (README third-party table).
- Installer / doctor / status must not fail because OpenCode or a local runtime is missing.
- Never bind or probe a non-loopback URL from ChaosEngine.
- ROG FreeToken bind: Task/box writers must not claim FreeToken.
dispatch.py resolve --prefer freetokenandrequire_rog_freetoken.pyfail closed unless the hostname looks like ROG, cwd is the operator ROG checkout (see local-agency guide (repo-onlychaos-engine/guides/local-agency.md)), orCE_ALLOW_BOX_LOCAL_AGENCY=1. Process-owner Shell withmachineIdon ROG is mandatory for ROG FreeToken/OpenCode writers. Do not dispatch those writers via Task until Grok Bot exposesmachineIdto Task/executor Shell. Diagnostic:assert_parent_rog_shell.py. Clear error when FreeToken is not READY on this host.
Probe → resolve → ephemeral OpenCode
Helper:
chaos-engine/skills/local-agency/scripts/dispatch.py. ROG gate: require_rog_freetoken.py.
python3 .chaos-engine/skills/local-agency/scripts/dispatch.py resolve
python3 .chaos-engine/skills/local-agency/scripts/dispatch.py --prefer freetoken config
python3 .chaos-engine/skills/local-agency/scripts/dispatch.py argv --prompt '…' --workdir '<worktree>'resolve ranks FreeToken, then OpenAI-compat peers, then Colibri. Use --prefer colibri when the adopter asked for Colibri. On READY, config /
argv emit ephemeral OpenCode material (OPENCODE_CONFIG path). Run OpenCode
yourself with that env; do not persist the config into the durable user file.
argv defaults include --pure and --variant high. Further effort follows the delegation ladder.
--no-pure exists for callers that already isolate
plugins. --pure still only disables plugins.
For Rung 1 OpenCode free-model fan-out (operational detail in delegation and guides/local-agency.md): probe reachable $0 models with opencode models, stage each worker brief inside its isolated git worktree (e.g., untracked .ce-brief.md) so OpenCode's external_directory guard allows reading it, record delegation_gate.py record --root <worktree> --rung free --free selected --effort high --brief <brief-path> before opencode run --model <free-model> --variant high. --root is the tree that will be edited. Omitting --root writes the receipt for the process cwd. Spread parallel writers across distinct free models (1–2 concurrent per endpoint) to avoid shared rate limits. On a stall (the delegation ladder's stall check) or multi-file acceptance failure, cancel and switch free models or escalate to Rung 4 (--root <worktree> --rung paid --free too-complex --effort low --tier cheapest) with cheapest-paid host subagents. A spawned subagent with a valid paid receipt may edit. The main session still records rung=direct for its own direct edit.
Design-turn brief and OpenCode preflight
On demand: brief and preflight.
Dispatch modes
--mode mechanical (default for small local coding models / 7B tool loops): treat the
prompt as one bounded apply command; do not auto-attach CE brief (still allowed via
--with-ce-brief).
--mode design: attach the locator-only CE brief (same as --with-ce-brief) for richer
design/spec turns. Prefer this only when the host coach wants a design draft, not for
mechanical apply.sh loops.
Design/spec turns must follow design-turn-contract.md
(verbatim CE_BRIEF_LOCATORS: closing line; host reject gates).
Parent parser uses allow_abbrev=False so --mode cannot abbreviate to --model
. Keep that guard when adding short overlapping flags.
python3 .chaos-engine/skills/local-agency/scripts/dispatch.py --mode mechanical argv --prompt 'bash <abs-dir>/apply.sh'
python3 .chaos-engine/skills/local-agency/scripts/dispatch.py --mode design argv --prompt '…' --project .Mechanical dispatch
A small local model is the mechanical case in the delegation ladder. Procedure: mechanical-dispatch.md. The OpenCode bash timeout is 120s: after a timeout kill of an apply script, re-run the same idempotent script from the orchestrator so product files are not left half-applied.
Session token usage
When dispatch.py chat returns OpenAI-compat usage and --session-id is set, dispatch records
session_token_usage.py with --channel local and a coarse --runtime-class
(freetoken / openai-compat / colibri). Never write model or provider ids into the ledger.
brief / config / argv do not call the model, so they do not record usage.
When to use local
Follow the delegation ladder. The direct-edit exception is when-to-use-local.md.
Coach loop (when local is chosen)
A chosen local writer needs an active coach: verify every artifact, give grounded feedback, and never let it finish unsupervised. Playbook: coach-loop.md.
Folded: local-coding-delegate
local-coding-delegate is a compat shim: hardware probe stays there; local OpenCode / agency routing lives here. Prefer this skill when the adopter names OpenCode or “local agents”.
Free-first policy
Writer selection: the delegation ladder.
Related
- Guide: local-agency.md (repo-only
chaos-engine/guides/local-agency.md) - freetoken, omniroute, identity-push-back.md
- Parent ROG Shell playbook: parent-rog-shell.md. Assert smoke: test_assert_parent_rog_shell.py
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

