Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8d5eb49
docs: add extensibility hints to CLI, daemon, state
aronchick Jan 24, 2026
09d1f9c
docs: align extension docs with code and add verify gate
aronchick Jan 24, 2026
161dd33
Resolve conflicts with upstream/main for PR #289
aronchick Jan 24, 2026
6cadc23
Fix docs verification and CI failure for PR #289
aronchick Jan 24, 2026
9afbf27
Use double quotes for regex to avoid syntax errors
aronchick Jan 24, 2026
762ef6d
Add Makefile with verify-docs pre-commit check
aronchick Jan 24, 2026
abbabec
Fix unused verbose variable in verify-docs
aronchick Jan 24, 2026
bc3f9bb
fix: Standardize worker branch naming to multiclaude/ prefix
aronchick Jan 23, 2026
8861625
Fix reference to non-existent EXTENSION_DOCUMENTATION_SUMMARY.md
aronchick Jan 26, 2026
e447518
feat: enhance repair command to recreate core agents and default work…
aronchick Jan 27, 2026
f2ab71a
fix(cli): generate new session ID in `multiclaude claude` when no his…
aronchick Jan 29, 2026
c75f643
feat: Add --json flag for LLM-friendly CLI help output
aronchick Jan 29, 2026
8f9708c
fix: detect running Claude before restarting to prevent session ID co…
aronchick Jan 27, 2026
b50f723
fix: lowercase error messages to satisfy staticcheck ST1005
aronchick Jan 29, 2026
45747c3
feat(cli): improve help output with categorized commands
aronchick Jan 29, 2026
c8f09e3
feat: Improve CLI help and status display for token awareness
aronchick Jan 29, 2026
f061129
feat: Improve multiclaude refresh with agent-context awareness
aronchick Jan 29, 2026
89bb78b
feat: improve error messages with structured errors and suggestions
aronchick Jan 29, 2026
e1a8906
feat: Add token efficiency guidance to worker template
aronchick Jan 31, 2026
b2aa96a
fix: Clean up acknowledged messages in message routing loop
aronchick Jan 31, 2026
53d76ee
Merge PR #341: Add token efficiency guidance to worker template
whitmo Mar 1, 2026
c7f6a8f
Merge PR #308: Standardize worker branch naming to multiclaude/ prefix
whitmo Mar 1, 2026
45cc8f9
Merge PR #337: Categorized help output
whitmo Mar 1, 2026
4181de2
Merge PR #333: Enhance repair command to recreate core agents
whitmo Mar 1, 2026
be18f85
Merge PR #338: Token warnings in CLI help and status (resolved confli…
whitmo Mar 1, 2026
5c4e111
Merge PR #339: Context-aware refresh
whitmo Mar 1, 2026
227919f
Merge PR #289: Extensibility docs
whitmo Mar 1, 2026
a06d410
test: Add tests for PRs #337, #338, #339, #333 on pr-triage-b2
whitmo Mar 1, 2026
4fed016
fix: Remove phantom sc:index-repo reference from worker template
whitmo Mar 1, 2026
c5f2e63
chore: Remove stale CLI_RESTRUCTURE_PROPOSAL.md
whitmo Mar 1, 2026
85eb30b
fix: Propagate ensureCoreAgents/ensureDefaultWorkspace errors in loca…
whitmo Mar 1, 2026
79a965e
test: Add daemon repair function tests for ensureCoreAgents, ensureDe…
whitmo Mar 1, 2026
ffc1c4e
refactor: Eliminate agent creation duplication between CLI and daemon
whitmo Mar 1, 2026
4c8c037
Merge work/jolly-tiger: Remove phantom sc:index-repo from worker temp…
whitmo Mar 1, 2026
a9c8b28
Merge work/eager-panda: Archive stale doc + fix localRepair error pro…
whitmo Mar 1, 2026
8cf3cdc
Merge work/clever-raccoon-daemon-tests: Add daemon repair tests
whitmo Mar 1, 2026
3bfd0ec
Merge work/cool-otter: Centralize agent creation logic in state package
whitmo Mar 1, 2026
2d7359e
fix: spawnCoreAgent creates agents from scratch instead of delegating…
whitmo Mar 1, 2026
da23428
Merge PR #342: Clean up acknowledged messages in routing loop
whitmo Mar 1, 2026
2917149
Merge PR #334: Generate new session ID when no history exists
whitmo Mar 1, 2026
52225e5
Merge PR #336: Detect running Claude before restart + lowercase errors
whitmo Mar 1, 2026
a6a9eb6
Merge PR #340: Structured error constructors with suggestions
whitmo Mar 1, 2026
e2287c3
Merge PR #335: Add --json flag for LLM-friendly CLI help output
whitmo Mar 1, 2026
28245ca
test: Add comprehensive tests for PRs #334, #335, #336, #340, #342
whitmo Feb 28, 2026
bd82b77
docs: Restore CLI_RESTRUCTURE_PROPOSAL.md with implementation status
whitmo Mar 2, 2026
c09a5e0
Merge PR #19: Triage upstream PRs batch 2 — 12 upstream PRs with test…
whitmo Mar 12, 2026
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
23 changes: 23 additions & 0 deletions .github/workflows/verify-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Verify Docs

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
verify-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true

- name: Verify extension docs are in sync with code
run: go run ./cmd/verify-docs
27 changes: 25 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ MULTICLAUDE_TEST_MODE=1 go test ./test/... # Skip Claude startup
│ Daemon (internal/daemon) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Health │ │ Message │ │ Wake/ │ │ Socket │ │
│ │ Check │ │ Router │ │ Nudge │ │ Server │ │
│ │ (2min) │ │ (2min) │ │ (2min) │ │ │ │
│ │ Check │ │ (2min) │ │ (2min) │ │ Server │ │
│ │ (2min) │ │ Router │ │ Nudge │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└────────────────────────────────┬────────────────────────────────┘
Expand Down Expand Up @@ -212,6 +212,29 @@ External tools can integrate via:

**Note:** Web UIs, event hooks, and notification systems are explicitly out of scope per ROADMAP.md.

### For LLMs: Keeping Extension Docs Updated

**CRITICAL:** When modifying multiclaude core, keep extension documentation **code-first and drift-free**. Never document an API/command/event that does not exist on `main`. If something is planned, mark it `[PLANNED]` until it ships. Always run `go run ./cmd/verify-docs` on doc or API changes.

1. **State Schema Changes** (`internal/state/state.go`)
- Update: [`docs/extending/STATE_FILE_INTEGRATION.md`](docs/extending/STATE_FILE_INTEGRATION.md)
- Update schema reference section
- Update all code examples showing state structure
- Run: `go run ./cmd/verify-docs`

2. **Socket Command Changes** (`internal/daemon/daemon.go`)
- Update: [`docs/extending/SOCKET_API.md`](docs/extending/SOCKET_API.md)
- Add/update command reference entries
- Add code examples for new commands
- Update client library examples if needed

**Pattern:** After any internal/* or pkg/* changes, search extension docs for outdated references:
```bash
# Find docs that might need updating
grep -r "internal/state" docs/extending/
grep -r "socket.Request" docs/extending/
```

## Contributing Checklist

When modifying agent behavior:
Expand Down
147 changes: 147 additions & 0 deletions docs/CLI_RESTRUCTURE_PROPOSAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# CLI Restructure Proposal

> **Status**: Partially implemented (updated 2026-03-01)
> **Author**: cool-wolf worker
> **Aligns with**: ROADMAP P2 - Better onboarding

## Implementation Status

| Item | Status | PR |
|------|--------|-----|
| Add `Hidden` field to Command struct | DONE | #337 |
| Mark aliases as hidden from `--help` | DONE | #337 |
| Restructure help output with categories | DONE | #337 |
| Add `Category` field to Command struct | DONE | #337 |
| Add `guide` command | NOT STARTED | |
| Rename `agents` → `templates` | NOT STARTED | |
| Add deprecation warnings to aliases | NOT STARTED | |
| v2.0 alias removal plan | NOT STARTED | |
| Merge `worker`/`workspace` under `agent` | NOT STARTED | |
| Update COMMANDS.md | NOT STARTED | |
| Update embedded prompts | NOT STARTED | |

---

## Problem Statement

The multiclaude CLI has grown organically and now suffers from:

1. **Too many top-level commands** (28 entries)
2. **Redundant aliases** that pollute `--help` output
3. **Inconsistent naming** (`agent`/`agents`, `work`/`worker`)
4. **Unclear mental model** - is the tool repo-centric or agent-centric?

### Evidence: Current `--help` Output

```
Subcommands:
repair ← maintenance
claude ← agent context
logs ← agent ops
status ← system overview
daemon ← daemon management
worker ← agent creation
work ← ALIAS for worker
agent ← agent ops
attach ← ALIAS for agent attach
review ← agent creation
config ← repo config
start ← ALIAS for daemon start
list ← ALIAS for repo list
workspace ← agent creation
refresh ← agent ops
docs ← meta
diagnostics ← meta
version ← meta
agents ← agent definitions (confusing: singular vs plural)
init ← ALIAS for repo init
cleanup ← maintenance
bug ← meta
stop-all ← daemon control
repo ← repo management
history ← ALIAS for repo history
message ← agent comms
```

A new user sees 28 commands and has no idea where to start.

## Proposed Solutions

### Option D: Hybrid (Recommended)

**Phase 1 (Partially Done)**:
1. ~~Hide aliases from `--help` (still work)~~ DONE
2. ~~Group help output by category~~ DONE
3. Add `multiclaude guide` command with interactive walkthrough
4. Rename `agents` → `templates` (avoids `agent`/`agents` confusion)

**Phase 2 (v2.0)**:
1. Remove deprecated aliases
2. Optionally merge `worker`/`workspace` under `agent`

## Remaining Actions

### 1. Add `guide` Command

```bash
$ multiclaude guide

Welcome to multiclaude! Here's how to get started:

1. INITIALIZE A REPO
multiclaude repo init https://github.com/you/repo

2. START THE DAEMON
multiclaude start

3. CREATE A WORKER
multiclaude worker "Fix the login bug"

4. WATCH IT WORK
multiclaude agent attach <worker-name>

Need more? See: multiclaude docs
```

### 2. Rename `agents` → `templates`

The current naming creates confusion:
- `agent attach` - operate on running agent
- `agents list` - list agent definitions (templates)

Rename to:
- `templates list` - list agent templates
- `templates spawn` - spawn from template
- `templates reset` - reset to defaults

### 3. Add Deprecation Warnings

Aliases should print notices pointing to canonical commands:

| Current | Replacement |
|---------|-------------|
| `multiclaude init` | `multiclaude repo init` |
| `multiclaude list` | `multiclaude repo list` |
| `multiclaude start` | `multiclaude daemon start` |
| `multiclaude attach` | `multiclaude agent attach` |
| `multiclaude work` | `multiclaude worker` |
| `multiclaude history` | `multiclaude repo history` |

### 4. Consider Merging `worker`/`workspace` under `agent`

```
multiclaude agent create "task" ← replaces worker create
multiclaude agent create --workspace ← replaces workspace add
multiclaude agent list ← unified listing
```

## Questions for Review

1. **Keep `start` alias?** It's the most commonly used shortcut.
2. **Merge worker/workspace?** They're conceptually similar (agent instances).
3. **Add `quickstart` or `guide`?** Which name is clearer?
4. **Timeline for v2.0?** When do we remove deprecated aliases?

---

*Originally generated by cool-wolf worker. Updated with implementation status.*
13 changes: 11 additions & 2 deletions docs/COMMANDS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Commands Reference

Everything you can tell multiclaude to do.
Everything you can tell multiclaude to do. Run `multiclaude` with no arguments for a quick reference.

## Quick Start

```bash
multiclaude repo init <github-url> # Track a repository
multiclaude start # Start the daemon (alias for daemon start)
multiclaude worker "task" # Create a worker for a task
multiclaude status # See what's running
```

## Daemon

The daemon is the brain. Start it, and agents come alive.

```bash
multiclaude start # Wake up
multiclaude daemon start # Wake up
multiclaude daemon stop # Go to sleep
multiclaude daemon status # You alive?
multiclaude daemon logs -f # What are you thinking?
Expand Down
23 changes: 23 additions & 0 deletions docs/extending/SOCKET_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ list_agents
complete_agent
restart_agent
trigger_cleanup
trigger_refresh
repair_state
get_repo_config
update_repo_config
Expand Down Expand Up @@ -49,6 +50,7 @@ Each command below matches a `case` in `handleRequest`.
| `complete_agent` | Mark agent ready for cleanup | `repo`, `name`, `summary`, `failure_reason` |
| `restart_agent` | Restart a persistent agent | `repo`, `name` |
| `trigger_cleanup` | Force cleanup cycle | none |
| `trigger_refresh` | Force worktree refresh cycle | none |
| `repair_state` | Run state repair routine | none |
| `get_repo_config` | Get merge-queue / pr-shepherd config | `repo` |
| `update_repo_config` | Update repo config | `repo`, `config` (JSON object) |
Expand Down Expand Up @@ -644,6 +646,27 @@ class MulticlaudeClient {
}
```

#### trigger_refresh

**Description:** Trigger immediate worktree refresh for all agents (syncs with main branch)

**Request:**
```json
{
"command": "trigger_refresh"
}
```

**Response:**
```json
{
"success": true,
"data": "Worktree refresh triggered"
}
```

**Note:** Refresh runs asynchronously in the background.

#### repair_state

**Description:** Repair inconsistent state (equivalent to `multiclaude repair`)
Expand Down
Loading