chore: rename Claudeman to Codeman

Full product rename across 109 files (~834 occurrences):
- Env vars: CLAUDEMAN_* → CODEMAN_*
- Data dirs: ~/.claudeman/ → ~/.codeman/, ~/claudeman-cases/ → ~/codeman-cases/
- tmux prefix: claudeman- → codeman-
- localStorage: claudeman-* → codeman-*
- Package/CLI: claudeman → codeman
- GitHub repo: Ark0N/Claudeman → Ark0N/Codeman
- systemd service: claudeman-web → codeman-web
- Class: ClaudemanApp → CodemanApp

Migration infrastructure for seamless transition:
- state-store.ts: auto-migrates data directories on startup
- tmux-manager.ts: dual-prefix detection (legacy claudeman- sessions)
- app.js: localStorage key migration (preserves old keys)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-26 16:44:34 +01:00
co-authored by Claude Opus 4.6
parent 3ccd22161c
commit 3795c45cc1
109 changed files with 711 additions and 679 deletions
+5 -5
View File
@@ -68,7 +68,7 @@ Note: Teammate transcripts appear in the **standard subagent directory** under t
}
```
Key fields: `agentId` format is `{name}@{teamName}`, `leadSessionId` links to Claudeman session, `backendType` indicates display mode, `color` for UI theming.
Key fields: `agentId` format is `{name}@{teamName}`, `leadSessionId` links to Codeman session, `backendType` indicates display mode, `color` for UI theming.
### Task file format (verified)
@@ -122,7 +122,7 @@ Message types observed:
**Teammates are IN-PROCESS THREADS, not separate OS processes.**
In `in-process` mode (the default), all teammates run as threads within the single `claude` process. Only 1 claude process exists per Claudeman session, regardless of team size.
In `in-process` mode (the default), all teammates run as threads within the single `claude` process. Only 1 claude process exists per Codeman session, regardless of team size.
This means:
- No separate PIDs to track per teammate
@@ -138,7 +138,7 @@ This means:
| **tmux** | `--teammate-mode tmux` | Split panes | tmux installed |
| **iTerm2** | Auto-detected | Native split panes | iTerm2 + `it2` CLI |
**For Claudeman: use `in-process` only.** Claudeman manages its own tmux sessions externally.
**For Codeman: use `in-process` only.** Codeman manages its own tmux sessions externally.
**In-process UI elements:**
- Status bar: `@main @teammate1 @teammate2 ...` with `shift+↑ to expand`
@@ -159,7 +159,7 @@ Fires when a task is being marked complete.
- Exit code 0: Allow completion
- Exit code 2: Prevent completion, send feedback
These are configured in `.claude/settings.local.json` alongside existing Claudeman hooks.
These are configured in `.claude/settings.local.json` alongside existing Codeman hooks.
## Subagent-Watcher Compatibility (Verified)
@@ -168,7 +168,7 @@ These are configured in `.claude/settings.local.json` alongside existing Claudem
~/.claude/projects/{hash}/{leadSessionId}/subagents/agent-{id}.jsonl
```
Claudeman's existing `subagent-watcher.ts` discovers them automatically. They appear in `/api/subagents` with status "active".
Codeman's existing `subagent-watcher.ts` discovers them automatically. They appear in `/api/subagents` with status "active".
**Distinguishing teammates from regular subagents:**
- Description field starts with `<teammate-message teammate_id= team`
+6 -6
View File
@@ -1,4 +1,4 @@
# Claudeman Agent Teams Integration — Design (Approach C: Hybrid)
# Codeman Agent Teams Integration — Design (Approach C: Hybrid)
> Updated 2026-02-12 with experiment findings. See `experiment-log.md` for raw data.
@@ -15,7 +15,7 @@ Monitors `~/.claude/teams/` for team creation/removal and tracks active teams.
**Discovery mechanism:**
- Poll `~/.claude/teams/` for directories (team names) every 3-5 seconds
- When found: parse `config.json` to get:
- `leadSessionId` → map to Claudeman session
- `leadSessionId` → map to Codeman session
- `members` array → teammate names, agentIds, colors, models
- Watch for directory deletion (cleanup signal)
@@ -25,7 +25,7 @@ Monitors `~/.claude/teams/` for team creation/removal and tracks active teams.
- Teammate transcripts are at `subagents/agent-{id}.jsonl` (standard subagent path), NOT separate session transcripts
**Association:**
- `config.json.leadSessionId` → Claudeman session ID (direct match!)
- `config.json.leadSessionId` → Codeman session ID (direct match!)
- Each member's `agentId` (e.g., `fs-researcher@research-watchers`) → links to subagent files
- `agentType: "team-lead"` vs `"general-purpose"` distinguishes lead from teammates
@@ -37,7 +37,7 @@ Monitors `~/.claude/teams/` for team creation/removal and tracks active teams.
### 2. Team-Aware Idle Detection (HIGHEST PRIORITY)
**Problem (confirmed by experiment):** Lead session shows status "idle" in Claudeman while teammates are actively working. Token count continues climbing but Claudeman thinks the session is inactive.
**Problem (confirmed by experiment):** Lead session shows status "idle" in Codeman while teammates are actively working. Token count continues climbing but Codeman thinks the session is inactive.
**Solution:**
- Before declaring a session idle, check if it's a team lead
@@ -125,7 +125,7 @@ Communication uses filesystem inbox files at `~/.claude/teams/{name}/inboxes/{te
**Potential for interaction (not tested, future work):**
- Write to teammate inbox files to inject messages
- Must respect `.json.lock` directory locking protocol
- Could enable "nudge" or "redirect" functionality from Claudeman UI
- Could enable "nudge" or "redirect" functionality from Codeman UI
## Answered Questions (from experiment)
@@ -161,7 +161,7 @@ Communication uses filesystem inbox files at `~/.claude/teams/{name}/inboxes/{te
3. **Teammate badge in subagent windows** — mark teammate subagents with name/color
4. **Team tasks API + UI** — `GET /api/sessions/:id/team-tasks` + task list panel
5. **Inbox monitoring** — watch inbox files, display message timeline
6. **TeammateIdle/TaskCompleted hooks** — add to Claudeman's hooks config generator
6. **TeammateIdle/TaskCompleted hooks** — add to Codeman's hooks config generator
## What We DON'T Need to Build
+21 -21
View File
@@ -1,7 +1,7 @@
# Agent Teams Experiment Log
> Experiment date: 2026-02-12
> Test case: `~/claudeman-cases/agent-teams-test/`
> Test case: `~/codeman-cases/agent-teams-test/`
> Team name: `research-watchers`
> Teammates: 3 (fs-researcher, perf-researcher, api-researcher)
> Lead session: `461daa80-94ec-4e5e-a1bb-0518f78311bc`
@@ -56,7 +56,7 @@ Name the team research-watchers.
Subagent transcripts also appear in the standard subagent directory:
```
~/.claude/projects/-home-arkon-claudeman-cases-agent-teams-test/
~/.claude/projects/-home-arkon-codeman-cases-agent-teams-test/
└── 461daa80.../
├── 461daa80...jsonl # Lead session transcript
└── subagents/
@@ -102,7 +102,7 @@ Key observations:
- **File locking** via `.json.lock` directories (mkdir-based atomic lock, created then deleted)
- Lead also has an inbox (`team-lead.json`) for receiving messages FROM teammates
**Implication for Claudeman:** We CAN intercept messages by watching inbox JSON files! We can also potentially inject messages by writing to inbox files.
**Implication for Codeman:** We CAN intercept messages by watching inbox JSON files! We can also potentially inject messages by writing to inbox files.
---
@@ -119,7 +119,7 @@ Teammates create transcript files at:
This is the **exact same path pattern** that regular Task tool subagents use. The existing `subagent-watcher.ts` successfully discovers them.
Claudeman's `/api/subagents` endpoint returned them with status "active":
Codeman's `/api/subagents` endpoint returned them with status "active":
```
Agent: ae50544 Status: active Tools: 8 Model: claude-opus-4-6
Desc: <teammate-message teammate_id= team
@@ -156,7 +156,7 @@ Agent: a29de32 Status: active Tools: 7 Model: claude-opus-4-6
"model": "claude-opus-4-6",
"joinedAt": 1770875105373,
"tmuxPaneId": "",
"cwd": "/home/arkon/claudeman-cases/agent-teams-test",
"cwd": "/home/arkon/codeman-cases/agent-teams-test",
"subscriptions": []
},
{
@@ -169,7 +169,7 @@ Agent: a29de32 Status: active Tools: 7 Model: claude-opus-4-6
"planModeRequired": false,
"joinedAt": 1770875126680,
"tmuxPaneId": "in-process",
"cwd": "/home/arkon/claudeman-cases/agent-teams-test",
"cwd": "/home/arkon/codeman-cases/agent-teams-test",
"subscriptions": [],
"backendType": "in-process"
},
@@ -183,7 +183,7 @@ Agent: a29de32 Status: active Tools: 7 Model: claude-opus-4-6
"planModeRequired": false,
"joinedAt": 1770875130344,
"tmuxPaneId": "in-process",
"cwd": "/home/arkon/claudeman-cases/agent-teams-test",
"cwd": "/home/arkon/codeman-cases/agent-teams-test",
"subscriptions": [],
"backendType": "in-process"
},
@@ -197,7 +197,7 @@ Agent: a29de32 Status: active Tools: 7 Model: claude-opus-4-6
"planModeRequired": false,
"joinedAt": 1770875134997,
"tmuxPaneId": "in-process",
"cwd": "/home/arkon/claudeman-cases/agent-teams-test",
"cwd": "/home/arkon/codeman-cases/agent-teams-test",
"subscriptions": [],
"backendType": "in-process"
}
@@ -280,21 +280,21 @@ Evidence supporting external writes:
---
## Question 7: What happens to Claudeman's idle detection with active teammates?
## Question 7: What happens to Codeman's idle detection with active teammates?
**Expected:** Lead may appear idle while teammates work
**Actual: Lead stays "idle" in Claudeman's view, but terminal shows active status**
**Actual: Lead stays "idle" in Codeman's view, but terminal shows active status**
Observations:
- Claudeman session status showed `"idle"` throughout the experiment
- Codeman session status showed `"idle"` throughout the experiment
- The terminal output continued updating (task list checkboxes, teammate progress messages)
- Lead displayed "Befuddling..." spinner while waiting for teammates
- Token count climbed from 27k → 33k during the experiment
- The `stop` hook DID fire at the end when the team was cleaned up
**Implication:** Current idle detection may trigger prematurely if:
- It only checks Claudeman's session status (which stays "idle")
- It only checks Codeman's session status (which stays "idle")
- It doesn't account for active teammates
**What we need:** Check `~/.claude/teams/*/config.json` for active members before declaring idle.
@@ -308,7 +308,7 @@ Observations:
**Actual: ZERO separate processes! Teammates are in-process threads.**
```
# Only 2 claude processes (both Claudeman sessions, none for teammates):
# Only 2 claude processes (both Codeman sessions, none for teammates):
25405 claude --dangerously-skip-permissions --session-id 236f004f... (our main session)
383633 claude --dangerously-skip-permissions --session-id 461daa80... (test session + 3 teammates)
@@ -327,7 +327,7 @@ claude(383633)─┬─{claude}(383635)
---
## Question 9: Do teammates inherit Claudeman env vars (hook events)?
## Question 9: Do teammates inherit Codeman env vars (hook events)?
**Expected:** Yes, if child processes
@@ -335,10 +335,10 @@ claude(383633)─┬─{claude}(383635)
Since teammates are threads in the lead's process (PID 383633), they share the exact same environment:
```
CLAUDEMAN_SCREEN=1
CLAUDEMAN_SESSION_ID=461daa80-94ec-4e5e-a1bb-0518f78311bc
CLAUDEMAN_SCREEN_NAME=claudeman-461daa80
CLAUDEMAN_API_URL=http://localhost:3000
CODEMAN_SCREEN=1
CODEMAN_SESSION_ID=461daa80-94ec-4e5e-a1bb-0518f78311bc
CODEMAN_SCREEN_NAME=codeman-461daa80
CODEMAN_API_URL=http://localhost:3000
```
The `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` env var was set via `settings.local.json`'s `env` key, which Claude Code reads at startup and sets on its process.
@@ -358,7 +358,7 @@ Teammates create transcript files in the standard subagent path:
~/.claude/projects/{hash}/{leadSessionId}/subagents/agent-{id}.jsonl
```
Claudeman's `/api/subagents` endpoint returned all 3 teammates as active subagents. They're indistinguishable from regular Task tool subagents except:
Codeman's `/api/subagents` endpoint returned all 3 teammates as active subagents. They're indistinguishable from regular Task tool subagents except:
1. Their `description` field starts with `<teammate-message teammate_id= team`
2. They can be cross-referenced with `~/.claude/teams/{name}/config.json`
3. They tend to be longer-lived than regular subagents
@@ -419,7 +419,7 @@ Claudeman's `/api/subagents` endpoint returned all 3 teammates as active subagen
- Standard bypass permissions and token count still visible
**Subagent floating windows:**
- Teammates DID appear as subagent floating windows in Claudeman's web UI
- Teammates DID appear as subagent floating windows in Codeman's web UI
- They show the standard subagent info (model, tool calls, description)
- Sub-subagents (teammates' own Task tool usage) also appear
@@ -443,7 +443,7 @@ Claudeman's `/api/subagents` endpoint returned all 3 teammates as active subagen
7. **Sub-subagents** — teammates can spawn their own Task tool subagents (3-level hierarchy).
8. **`teammateMode` is NOT a valid settings key** — display mode defaults to `in-process`.
### Design implications for Claudeman
### Design implications for Codeman
1. **TeamWatcher can be simple** — just poll `~/.claude/teams/` for directories + parse config.json
2. **Subagent-watcher already works** — no new infrastructure needed for teammate transcript tailing