Skip to content

Commit 356f7ed

Browse files
authored
Add orchestrator mode (cc-orc) with workhorse agents (#14)
* Add orchestrator mode with delegation-first system prompt and 4 workhorse agents Introduces cc-orc alias for a slim orchestrator that decomposes tasks and delegates to agents instead of doing implementation work directly. Four new workhorse agents (investigator, implementer, tester, documenter) carry the detailed execution discipline, code standards, and testing standards that previously lived only in the monolithic main prompt. All agents enforce a mandatory question surfacing protocol — they stop and return questions to the orchestrator rather than making assumptions. The existing 17 specialist agents and main-system-prompt.md remain unchanged. * Fix 10 CodeRabbit review issues and stale documentation Resolve all actionable, outside-diff, duplicate, and nitpick issues from CodeRabbit review on PR #14, plus one discovered consistency issue. Major: implementer PostToolUse hook (per-Edit) → Stop hook (once at end) with 120s timeout. Tester Stop hook timeout 30s → 120s. Added cc-orc to cc-tools discovery. Updated CLAUDE.md directory tree with missing files. Fixed stale verify-no-regression.py comment. Added MD040 language specifiers. Clarified orchestrator plan mode delegation scope and added specialist catalog catch-all. --------- Co-authored-by: AnExiledDev <AnExiledDev@users.noreply.github.com>
1 parent b7f8bf5 commit 356f7ed

File tree

10 files changed

+1473
-6
lines changed

10 files changed

+1473
-6
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@
2020
#### Features
2121
- **devcontainer-bridge (dbr)** — Ports opened inside the container are now automatically discovered and forwarded to the host, even outside VS Code. Requires `dbr host-daemon` running on the host. See [devcontainer-bridge](https://github.com/bradleybeddoes/devcontainer-bridge)
2222

23+
#### Orchestrator Mode
24+
- **`cc-orc` alias** — new Claude Code entry point using `orchestrator-system-prompt.md` for delegation-first operation; orchestrator decomposes tasks, delegates to agents, surfaces questions, and synthesizes results without performing direct implementation work
25+
- **`orchestrator-system-prompt.md`** — slim system prompt (~250 lines) containing only delegation model, agent catalog, question surfacing protocol, planning gates, spec enforcement, and action safety; all code standards, testing standards, and implementation details live in agent prompts
26+
27+
#### Workhorse Agents
28+
- **`investigator`** — consolidated read-only research agent (sonnet) merging the domains of researcher, explorer, dependency-analyst, git-archaeologist, debug-logs, and perf-profiler; handles codebase search, web research, git forensics, dependency auditing, log analysis, and performance profiling
29+
- **`implementer`** — consolidated read-write implementation agent (opus, worktree) merging generalist, refactorer, and migrator; handles all code modifications with embedded code standards, execution discipline, and Stop hook regression testing
30+
- **`tester`** — enhanced test agent (opus, worktree) with full testing standards, framework-specific guidance, and Stop hook verification; creates and verifies test suites
31+
- **`documenter`** — consolidated documentation and specification agent (opus) merging doc-writer and spec-writer; handles README, API docs, docstrings, and the full spec lifecycle (create, refine, build, review, update, check)
32+
- **Question Surfacing Protocol** — all 4 workhorse agents carry an identical protocol requiring them to STOP and return `## BLOCKED: Questions` sections when hitting ambiguities, ensuring no assumptions are made without user input
33+
34+
### Fixed
35+
36+
#### CodeRabbit Review Fixes
37+
- **`implementer.md`** — changed PostToolUse hook (fires every Edit) to Stop hook (fires once at task end) with 120s timeout; prevents redundant test runs during multi-file tasks
38+
- **`tester.md`** — increased Stop hook timeout from 30s to 120s to accommodate larger test suites
39+
- **`setup-aliases.sh`** — added `cc-orc` to `cc-tools` discovery loop so it appears in tool audit
40+
- **`CLAUDE.md`** — added missing `keybindings.json`, `orchestrator-system-prompt.md`, and `writing-system-prompt.md` to directory structure tree
41+
- **`agent-system/README.md`** — updated `verify-no-regression.py` comment to list both consumers (implementer, refactorer); hyphenated "question-surfacing protocol"
42+
- **`orchestrator-system-prompt.md`** — clarified plan mode allows investigator delegation for research; added catch-all entry in selection criteria pointing to the full specialist catalog
43+
- **MD040 compliance** — added `text` language specifiers to 7 fenced code blocks across `investigator.md`, `tester.md`, and `documenter.md`
44+
2345
### Changed
2446

2547
#### Skill Engine: Auto-Suggestion
@@ -40,6 +62,13 @@
4062
- Moved `.claude` directory from `/workspaces/.claude` to `~/.claude` (home directory)
4163
- Added Docker named volume for persistence across rebuilds (per-instance isolation via `${devcontainerId}`)
4264
- `CLAUDE_CONFIG_DIR` now defaults to `~/.claude`
65+
- `file-manifest.json` — added deployment entry for `orchestrator-system-prompt.md`
66+
- `setup-aliases.sh` — added `cc-orc` alias alongside existing `cc`, `claude`, `ccw`, `ccraw`
67+
- `CLAUDE.md` — documented `cc-orc` command and orchestrator system prompt in key configuration table
68+
69+
#### Agent System
70+
- Agent count increased from 17 to 21 (4 workhorse + 17 specialist)
71+
- Agent-system README updated with workhorse agent table, per-agent hooks for implementer and tester, and updated plugin structure
4372

4473
#### Authentication
4574
- Added `CLAUDE_AUTH_TOKEN` support in `.secrets` for long-lived tokens from `claude setup-token`

.devcontainer/CLAUDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
1212
│ ├── file-manifest.json # Declarative config file deployment
1313
│ └── defaults/ # Source files deployed on start via file-manifest
1414
│ ├── settings.json # Model, permissions, plugins, env vars
15+
│ ├── keybindings.json # Keyboard shortcuts
1516
│ ├── main-system-prompt.md
17+
│ ├── orchestrator-system-prompt.md
18+
│ ├── writing-system-prompt.md
1619
│ ├── ccstatusline-settings.json # Status bar widget layout
1720
│ └── rules/ # Deployed to .claude/rules/
1821
├── features/ # Custom devcontainer features
@@ -26,6 +29,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
2629
|------|---------|
2730
| `config/defaults/settings.json` | Model, tokens, permissions, plugins, env vars |
2831
| `config/defaults/main-system-prompt.md` | System prompt defining assistant behavior |
32+
| `config/defaults/orchestrator-system-prompt.md` | Orchestrator mode prompt (delegation-first) |
2933
| `config/defaults/ccstatusline-settings.json` | Status bar widget layout (deployed to ~/.config/ccstatusline/) |
3034
| `config/file-manifest.json` | Controls which config files deploy and when |
3135
| `devcontainer.json` | Container definition: image, features, mounts |
@@ -68,6 +72,7 @@ git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
6872
| `cc` / `claude` | Run Claude Code with auto-configuration |
6973
| `ccraw` | Vanilla Claude Code (bypasses config) |
7074
| `ccw` | Claude Code with writing system prompt |
75+
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
7176
| `ccms` | Search session history (project-scoped) |
7277
| `ccusage` / `ccburn` | Token usage analysis / burn rate |
7378
| `agent-browser` | Headless Chromium (Playwright-based) |
@@ -80,7 +85,7 @@ git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
8085

8186
Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
8287

83-
- **agent-system**17 custom agents + built-in agent redirection
88+
- **agent-system**21 custom agents (4 workhorse + 17 specialist) + built-in agent redirection
8489
- **skill-engine** — 22 general coding skills + auto-suggestion
8590
- **spec-workflow** — 8 spec lifecycle skills + spec-reminder hook
8691
- **session-context** — Git state injection, TODO harvesting, commit reminders

0 commit comments

Comments
 (0)