coral-debug
Verify and debug changes to CORAL itself — smallest reproduce loop per area (grader / daemon / CLI / hooks / manager / workspace / hub / template / config /…
Add a new component to the CORAL framework itself — a new agent runtime under `coral/agent/builtin/` (claude_code/codex/cursor_agent style), a new CLI command in `coral/cli/`, a new bundled skill or subagent template under `coral/template/skills/` or `coral/template/agents/`, a
$ npx -y skills add Human-Agent-Society/CORAL --skill coral-extend --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/coral-extendContext preview
The summary Claude sees to decide when to auto-load this skill.
Add a new component to the CORAL framework itself — a new agent runtime under `coral/agent/builtin/` (claude_code/codex/cursor_agent style), a new CLI command in `coral/cli/`, a new bundled skill or subagent template under `coral/template/skills/` or `coral/template/agents/`, a
name: coral-extend description: Add a new component to the CORAL framework itself — a new agent runtime under `coral/agent/builtin/` (claude_code/codex/cursor_agent style), a new CLI command in `coral/cli/`, a new bundled skill or subagent template under `coral/template/skills/` or `coral/template/agents/`, a new hook in `coral/hooks/`, a new field in `coral/config.py`, or a framework-level extension to the grader stack under `coral/grader/`. NOT for writing a per-task grader or adding an example task — use `coral-new-task` for that. NOT for debugging existing code — use `coral-debug`.
For day-to-day debug / reproduce loops see the sibling `coral-debug` skill. For creating a new `examples/<task>/` (seed + task.yaml + grader package) see `coral-new-task`. This skill covers *adding new components to the CORAL package itself*.
If you're writing a grader for a specific task, use `coral-new-task`. This section is only for changes to the grader **framework** under `coral/grader/`:
Adding a new runtime (e.g. another coding-agent CLI) means three small files plus a registry entry.
1. Create `coral/agent/builtin/<name>.py` and subclass `AgentRuntime` (`coral/agent/runtime.py`). Existing runtimes are the canonical reference — `claude_code.py` is the most complete; `codex.py` and `cursor_agent.py` are smaller and easier to mimic. 2. Register the runtime in `coral/agent/registry.py`:
_RUNTIMES["my_runtime"] = MyRuntime _ALIASES["mine"] = "my_runtime" _DEFAULT_MODELS["my_runtime"] = "default-model-id"
3. Decide the runtime's native shared-state directory name (`.claude` for Claude Code, `.codex` for Codex, etc.). The worktree symlink uses this; pass it through `shared_dir` so `generate_coral_md(...)` renders the right paths. 4. If the runtime needs special config plumbing (e.g. `cursor_agent.json`, `opencode.json`, gateway port), follow the `opencode` pattern: emit a per-agent config file inside the worktree at startup. 5. Add a smoke test in `tests/test_<runtime>.py` modeled on `tests/test_cursor_agent.py`.
Reference recent additions: PR #79 (cursor_agent), commit `f6f266e` (codex web_search config fix).
CLI is an old-school argparse single-file dispatcher.
1. Add a parser block in `coral/cli/__init__.py::main()`. Match the existing style — `_HelpOnErrorParser`, an epilog with `Examples:`, `_CommandHelpFormatter`. Add the new command name to `_VISIBLE_COMMANDS` so "did you mean?" suggestions work. 2. Implement `cmd_<name>(args: argparse.Namespace) -> None` in the most-fitting module under `coral/cli/`:
Create a new module if none of those fit; keep imports lazy so `coral --help` stays fast. 3. Wire the function into the `commands = {...}` dict at the bottom of `main()`. 4. If your command operates on a specific run, accept `--task` / `--run` via `_add_run_args(parser)` and resolve with `coral.cli._helpers.find_coral_dir`. 5. Add an example to `CLAUDE.md`'s Commands section.
These ship inside the package and are seeded into every run's `.coral/public/skills/` (or `agents/`) by `coral/workspace/project.py`.
The seed copy is one-shot per run (`if not dst.exists()`), so iterating on template content during development means deleting `<run_dir>/.coral/public/skills/<name>/` and re-running `coral start`, or just editing the destination directly for that run.
Right now there's only `coral/hooks/post_commit.py`. If you add another hook:
`coral/config.py` is dataclass-based and merged via OmegaConf. When adding a new field:
1. Add it to the right dataclass (`AgentConfig`, `GraderConfig`, ...) with a sensible default. 2. If it deserves runtime validation, add it to the `__post_init__` of that dataclass. 3. Cover the new field in `tests/test_config.py`. 4. Update `examples/<task>/task.yaml` only if the field is task-author facing — internal knobs should stay defaulted. 5. Mention it in `CLAUDE.md` if it changes user-visible behavior; otherwise leave the docs alone (CLAUDE.md describes invariants, not every flag).
Robust, lightweight infrastructure for multi-agent self-evolution, built for autoresearch. CORAL is infrastructure for autonomous AI agent organizations that run experiments, share knowledge, and continuously improve solutions.
Verify and debug changes to CORAL itself — smallest reproduce loop per area (grader / daemon / CLI / hooks / manager / workspace / hub / template / config /…
End-to-end recipe for adding a new task under `examples/` — the three pieces that have to line up (`task.yaml`, `seed/`, and `grader/`), what to put in each,…
Use when preparing, reviewing, resolving conflicts for, or merging a CORAL release pull request from the long-lived dev branch into main.
Write a note to {shared_dir}/notes/ that future agents can actually act on. Use after every coral eval, when a heartbeat (reflect / consolidate / pivot) asks…
Research the problem domain before coding. Web search for techniques, save raw sources, write structured findings, update the index.
Organize the shared notes directory when it becomes hard to navigate. Restructure within research/ and experiments/, deduplicate, update index.md.