Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .agent/README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
# .agent/ — agentctl assets
# .agent/

This directory ships the prompts and config that `agentctl` uses.
Prompts and config that `agentctl` ships with.

```
.agent/
prompts/
gpt55-orchestrator.md # lead orchestrator: plan, route, final review, decide
claude-reviewer.md # architecture reviewer: infra risk and design validation
deepseek-worker.md # execution worker: token-efficient scout / executor
deepseek-worker.md # retrieval worker: read-only tools, returns receipts
gpt55-reviewer.md # optional second opinion from GPT-5.5
gpt55-orchestrator.md # fallback template for the GPT-5.5 reviewer
claude-reviewer.md # optional architecture and risk review
gpt55-operator-onboarding.md # paste-in briefing for driving agentctl from a ChatGPT chat
opencode/
deepseek-worker.md # OpenCode execution worker definition
config.example.json # copy to config.json to customize
config.json # your local config (gitignored)
deepseek-worker.md # OpenCode agent definition for the worker
config.example.json # shipped defaults, copy to config.json to change them
config.json # your local config (gitignored)
```

## Config resolution order
## Config resolution

`agentctl` loads the **first** file it finds, merged over built-in defaults:
`agentctl` merges the first file it finds over the built-in defaults:

1. `<cwd>/.agent/config.json` — per-repo override
2. `<install>/.agent/config.json` — your global override
3. `<install>/.agent/config.example.json` — shipped example
1. `<cwd>/.agent/config.json` for a per-repo override
2. `<install>/.agent/config.json` for your global override
3. `<install>/.agent/config.example.json`, the shipped example

## Wiring DeepSeek (OpenCode)
## DeepSeek via OpenCode

The default deepseek command is:
Default command:

```
opencode run --agent deepseek-worker --format json "<prompt>"
```

To use `--agent deepseek-worker`, install the agent definition:
Install the agent definition once:

```
mkdir -p ~/.config/opencode/agent
cp .agent/opencode/deepseek-worker.md ~/.config/opencode/agent/
```

If you don't install the agent, switch the deepseek args to the model form
(already present as `fallback_args` in `config.example.json`):
Without it, switch the deepseek `args` to the model form (already in `fallback_args` in the example):

```
opencode run --model deepseek/deepseek-chat --format json "<prompt>"
```

## Wiring GPT-5.5
## GPT-5.5

`config.example.json` ships `gpt55.command = "CONFIGURE_ME"`. Until you set a
real command, the orchestrator falls back to a local Claude/heuristic planner
and every run is flagged `GPT_LIMIT_ACTIVE`. Point `command`/`args` at your real
GPT-5.5 CLI or a thin API wrapper to enable the Lead Orchestrator.
The example config uses `"type": "http_openai"`: one HTTP request to the OpenAI API, key from `OPENAI_API_KEY`. Without
a key the review is skipped and the run flags `GPT_LIMIT_ACTIVE`. The run itself still completes.

No API key? Use `--route deepseek-chatgpt`. agentctl writes a prompt to paste into ChatGPT, and `agentctl ingest <run>`
adds the answer to the report.

## Claude

`claude -p "<prompt>" --output-format json`, using the Claude Code login. Used for `--route deepseek-claude`.
21 changes: 7 additions & 14 deletions .agent/config.example.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"orchestrator": {
"primary": "gpt55",
"fallback": "claude",
"default_caller": "local",
"default_route": "deepseek",
"review_required": true,
"review_policy": "best_effort_gpt55",
"default_caller": "gpt55",
"run_timeout_seconds": 120,
"agent_timeout_seconds": 90,
"review_timeout_seconds": 45,
"idle_timeout_seconds": 30,
"role_policy": {
"gpt55": "Lead Orchestrator: planning, routing, final review, and final decision authority",
"claude": "Architecture Reviewer: infrastructure architecture, risk review, and lightweight code design validation",
"deepseek": "Execution Worker: token-efficient repository inspection, tests, logs, context packs, and low-risk implementation"
"deepseek": "Retrieval worker: read-only tools, returns raw tool receipts, no conclusions",
"local": "Logic: synthesizes the answer and the decision from the receipts",
"gpt55": "Optional best-effort reviewer, never on the critical path",
"claude": "Optional reviewer for architecture, design and risk"
}
},
"agents": {
Expand Down Expand Up @@ -70,17 +69,11 @@
]
}
},
"limits": {
"detect_patterns": true,
"fallback_on_limit": true
},
"worktrees": {
"enabled": true,
"base_dir": ".agent-runs/worktrees"
},
"safety": {
"block_dangerous_commands": true,
"deepseek_may_edit": false,
"claude_may_edit": true
"deepseek_may_edit": false
}
}
}
56 changes: 0 additions & 56 deletions .agent/prompts/claude-builder.md

This file was deleted.

2 changes: 1 addition & 1 deletion .agent/prompts/gpt55-operator-onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ back the output, then you review and decide. Work in English, keep it concise.

## HOW THE USER DRIVES IT

- Interactive console: `agentctl console`. In the console the user just types a task (no quotes). Meta commands:
- Interactive console: `agentctl` (or `agentctl shell`). In the console the user just types a task (no quotes). Meta commands:
`/cd <path>` — set target repo
`/status`
`/review`
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: tests

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: macos-latest
strategy:
matrix:
python: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: python -m unittest discover -s tests -v
5 changes: 2 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ This repository uses `agentctl` as the local multi-agent workflow. One rule:
prose is not trusted. It carries the token-heavy file/log reading.
- **Local / Claude — Logic.** The stable reasoner and decision-maker. Synthesizes the answer from
DeepSeek's receipts. This is the default; it never depends on a flaky channel.
- **GPT-5.5 — Optional best-effort review.** A second opinion only when it has a working route. The
free OpenCode/OAuth route is unreliable and a deterministic one needs OpenAI API billing, so GPT-5.5
is never load-bearing. If it returns empty, the run completes on local synthesis.
- **GPT-5.5 — Optional best-effort review.** A second opinion when a route is configured (API key or the
ChatGPT handoff). It is never load-bearing. If it returns empty, the run completes on local synthesis.

## Default Workflow

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 nzrbits

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading