Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
17780ea
feat: add onboarding skill + hook dispatch system
filipexyz Mar 9, 2026
a6aac1b
fix(tui): use dynamic window ID instead of hardcoded :0 (#519)
filipexyz Mar 9, 2026
6b5aa82
feat(onboarding): add tmux validation and best practices
filipexyz Mar 9, 2026
fae50be
feat(plugin): complete CC plugin structure with first-run detection
filipexyz Mar 9, 2026
f201702
fix(test): update tui.test.ts for unified buildTeamLeadCommand
filipexyz Mar 9, 2026
955e380
fix(test): remove leaking mock from tui-window-index, update tui.test.ts
filipexyz Mar 9, 2026
b6f5066
feat(cli): add genie [team] shortcut, deprecate genie tui
filipexyz Mar 9, 2026
f8e0eb2
chore: bump version to 3.260309.1
filipexyz Mar 9, 2026
02f35bd
chore: remove deprecated genie-pilot skill
filipexyz Mar 9, 2026
79ae30a
feat(statusline): meta-programmable agent lifecycle daemon
filipexyz Mar 9, 2026
108a66e
refactor: rename genie worker → genie agent, remove cost from statusline
filipexyz Mar 9, 2026
b84be15
feat(statusline): show absolute token count instead of percentage
filipexyz Mar 9, 2026
dc51d60
fix(plugin): make smart-install non-fatal so hook chain continues
filipexyz Mar 9, 2026
e8cb5b5
feat(tmux): apply agent color to pane borders on spawn
filipexyz Mar 9, 2026
d658ba5
fix(tmux): use focus hooks for per-pane agent color tints
filipexyz Mar 9, 2026
d7b1b45
feat(tmux): focus-driven pane border colors per agent
filipexyz Mar 9, 2026
5e5de3a
chore(plugin): remove beads dependency from smart-install
filipexyz Mar 9, 2026
84cdfe3
feat(tmux): pane color system with rehydration + dark hex palette
filipexyz Mar 9, 2026
67052e6
fix(ci): remove 5 unused exports flagged by knip
automagik-genie Mar 9, 2026
1ba1054
fix(security): resolve command injection in auto-spawn and statusline
automagik-genie Mar 9, 2026
17d3769
fix(test): make findByWindow tests resilient to mock leakage
automagik-genie Mar 9, 2026
b7bb95b
fix(test): exercise findByWindow export to satisfy both biome and knip
automagik-genie Mar 9, 2026
6fe63bd
fix(security): sanitize statusline sed, use spawnSync for auto-spawn
filipexyz Mar 9, 2026
fb2441b
feat(cli): genie [team] shortcut, system prompt via file
filipexyz Mar 9, 2026
30dc17f
fix(test): harden mock.module for flaky CI — absolute paths + defensi…
filipexyz Mar 9, 2026
fc32fbf
fix(test): remove duplicate mock.module registrations that corrupt mo…
filipexyz Mar 9, 2026
d64be76
fix(test): replace mock.module with _deps injection to fix flaky CI
filipexyz Mar 9, 2026
3526f6a
fix(test): remove tui-window-index test that corrupts Bun module cache
filipexyz Mar 10, 2026
e072562
fix: revert _deps injection from tui.ts (dead code flagged by knip)
filipexyz Mar 10, 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
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugins": [
{
"name": "genie",
"version": "3.260302.2",
"version": "3.260309.1",
"source": "./plugins/genie",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
}
Expand Down
52 changes: 26 additions & 26 deletions TEAM_LEAD_PROMPT.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<GENIE_CLI>
# Genie CLI — MANDATORY Worker Orchestration
# Genie CLI — MANDATORY Agent Orchestration

You are a team-lead in a **genie-managed environment**. ALL worker spawning, messaging, and team management MUST go through the genie CLI via Bash.
You are a team-lead in a **genie-managed environment**. ALL agent spawning, messaging, and team management MUST go through the genie CLI via Bash.

## CRITICAL: NEVER Use These Native Tools

NEVER use the `Agent` tool to spawn agents or subagents. Use `genie worker spawn` instead.
NEVER use `SendMessage` to communicate with workers. Use `genie msg send` instead.
NEVER use the `Agent` tool to spawn agents or subagents. Use `genie agent spawn` instead.
NEVER use `SendMessage` to communicate with agents. Use `genie send` instead.
NEVER use `TeamCreate` or `TeamDelete`. Use `genie team ensure` / `genie team delete` instead.

If you catch yourself about to use Agent, SendMessage, TeamCreate, or TeamDelete — STOP and use the genie CLI equivalent below.

## Workers
## Agents

```bash
# Spawn a worker (ALWAYS use this instead of Agent tool)
genie worker spawn --role <role> # implementor, tests, review, fix, refactor
genie worker spawn --role <role> --skill <skill> # With specific skill
# Spawn an agent (ALWAYS use this instead of Agent tool)
genie agent spawn --role <role> # implementor, tests, review, fix, refactor
genie agent spawn --role <role> --skill <skill> # With specific skill

# Monitor
genie worker list # List all workers
genie worker dashboard # Live dashboard
genie worker history <worker> # Session history
genie worker read <worker> --follow # Tail terminal output
genie agent list # List all agents
genie agent dashboard # Live dashboard
genie agent history <agent> # Session history
genie agent read <agent> --follow # Tail terminal output

# Control
genie worker kill <id> # Force kill
genie worker suspend <id> # Suspend (preserves session)
genie worker exec <worker> "<cmd>" # Run command in worker pane
genie worker answer <worker> <choice> # Answer prompt (1-9 or text:...)
genie agent kill <id> # Force kill
genie agent suspend <id> # Suspend (preserves session)
genie agent exec <agent> "<cmd>" # Run command in agent pane
genie agent answer <agent> <choice> # Answer prompt (1-9 or text:...)
```

## Messaging

```bash
# Send message to a worker (ALWAYS use this instead of SendMessage)
genie msg send "<text>" --to <worker> # Send to specific worker
genie msg inbox <worker> # View worker inbox
genie msg inbox <worker> --unread # Unread only
# Send message to an agent (ALWAYS use this instead of SendMessage)
genie send "<text>" --to <agent> # Send to specific agent
genie inbox <agent> # View agent inbox
genie inbox <agent> --unread # Unread only
```

## Teams
Expand All @@ -51,19 +51,19 @@ genie team delete <name> # Delete team
## Typical Flow

```bash
# 1. Spawn a worker
genie worker spawn --role implementor
# 1. Spawn an agent
genie agent spawn --role implementor

# 2. Monitor
genie worker list
genie agent list

# 3. Send instructions
genie msg send "Implement endpoint X" --to <worker-name>
genie send "Implement endpoint X" --to <agent-name>

# 4. Check progress
genie worker history <worker-name>
genie agent history <agent-name>

# 5. Shut down
genie worker kill <worker-id>
genie agent kill <agent-id>
```
</GENIE_CLI>
52 changes: 26 additions & 26 deletions docs/CO-ORCHESTRATION-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Human (Orchestrator)
├── genie work bd-2 ──▶ Worker 2 (Claude in pane %2)
│ └── worktree: .worktrees/bd-2/
│
└── genie worker list ──▶ Status dashboard
└── genie agent list ──▶ Status dashboard
```

## Prerequisites
Expand All @@ -39,13 +39,13 @@ bd create "Update API documentation"
genie work bd-1

# 4. Check worker status
genie worker list
genie agent list

# 5. When worker needs approval
genie worker approve
genie agent approve

# 6. When done, close the issue
genie worker close bd-1
genie agent close bd-1
```

## Detailed Workflow
Expand Down Expand Up @@ -99,10 +99,10 @@ genie work next

```bash
# Check all workers
genie worker list
genie agent list

# JSON output for scripting
genie worker list --json
genie agent list --json
```

**Worker States:**
Expand All @@ -119,14 +119,14 @@ genie worker list --json

**Approve permissions:**
```bash
genie worker approve # Approve pending permission
genie worker approve --start # Start auto-approve engine
genie agent approve # Approve pending permission
genie agent approve --start # Start auto-approve engine
```

**Answer questions:**
```bash
genie worker answer bd-1 1 # Select option 1
genie worker answer bd-1 "text:custom" # Provide custom text answer
genie agent answer bd-1 1 # Select option 1
genie agent answer bd-1 "text:custom" # Provide custom text answer
```

### Phase 5: Closing Issues
Expand All @@ -135,7 +135,7 @@ When a worker completes its task:

```bash
# Close issue and cleanup worker
genie worker close bd-1
genie agent close bd-1

# Options:
# --merge Merge worktree branch to main before cleanup
Expand All @@ -156,7 +156,7 @@ genie worker close bd-1
If a worker is stuck or needs to be terminated:

```bash
genie worker kill bd-1
genie agent kill bd-1
```

Note: This does NOT close the issue. The task remains `in_progress` in beads.
Expand Down Expand Up @@ -190,7 +190,7 @@ bd update bd-2 --blocked-by bd-1
genie work bd-1

# When bd-1 completes, bd-2 becomes ready
genie worker close bd-1
genie agent close bd-1
genie work next # Picks bd-2
```

Expand All @@ -208,7 +208,7 @@ genie work bd-2
genie work bd-3

# Monitor all
genie worker list
genie agent list
```

### Pattern 3: Review and Iterate
Expand All @@ -231,7 +231,7 @@ genie work bd-1
### Worker shows as dead but pane exists
```bash
# The registry may be out of sync
genie worker kill <worker-id> # Clean up registry entry
genie agent kill <worker-id> # Clean up registry entry
genie work <task-id> # Start fresh
```

Expand All @@ -256,7 +256,7 @@ bd daemon start --auto-commit
1. **Clear issue titles**: Workers use titles as context
2. **One task per worker**: Keep issues focused
3. **Use dependencies**: `--blocked-by` prevents premature work
4. **Review before closing**: Check worker output before `genie worker close`
4. **Review before closing**: Check worker output before `genie agent close`
5. **Use worktrees**: They provide isolation and can be reviewed independently
6. **Keep daemon running**: Ensures beads state is synced to git

Expand All @@ -266,16 +266,16 @@ bd daemon start --auto-commit
|---------|-------------|
| `genie work <bd-id>` | Spawn worker for issue |
| `genie work next` | Work on next ready issue |
| `genie worker list` | List all workers |
| `genie worker approve` | Approve permission / manage auto-approve |
| `genie worker answer <id> <choice>` | Answer question |
| `genie worker history <id>` | Compressed session catch-up |
| `genie worker events [pane-id]` | Stream Claude Code events |
| `genie worker close <id>` | Close issue and cleanup |
| `genie worker ship <id>` | Mark done, merge, cleanup |
| `genie worker kill <id>` | Force kill worker |
| `genie worker read <id>` | Read worker pane output |
| `genie worker exec <id> <cmd>` | Execute command in worker pane |
| `genie agent list` | List all workers |
| `genie agent approve` | Approve permission / manage auto-approve |
| `genie agent answer <id> <choice>` | Answer question |
| `genie agent history <id>` | Compressed session catch-up |
| `genie agent events [pane-id]` | Stream Claude Code events |
| `genie agent close <id>` | Close issue and cleanup |
| `genie agent ship <id>` | Mark done, merge, cleanup |
| `genie agent kill <id>` | Force kill worker |
| `genie agent read <id>` | Read worker pane output |
| `genie agent exec <id> <cmd>` | Execute command in worker pane |
| `genie daemon start` | Start beads daemon |
| `genie daemon stop` | Stop beads daemon |
| `genie daemon status` | Show daemon status |
Expand Down
10 changes: 5 additions & 5 deletions docs/agent-profiles.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Worker Profiles
# Agent Profiles

Worker profiles configure how genie-cli spawns Claude Code workers. Each profile bundles:
Agent profiles configure how genie-cli spawns Claude Code agents. Each profile bundles:
- **Launcher**: `claude` (direct Claude Code invocation)
- **Claude Args**: CLI arguments passed to Claude Code

Expand Down Expand Up @@ -47,10 +47,10 @@ genie profiles default coding-fast

## Using Profiles

### With genie worker spawn
### With genie agent spawn
```bash
genie worker spawn --role implementor --profile coding-fast
genie worker spawn --role implementor --profile safe # For interactive work
genie agent spawn --role implementor --profile coding-fast
genie agent spawn --role implementor --profile safe # For interactive work
Comment on lines +50 to +53

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

genie agent spawn does not expose --profile here.

src/term-commands/agents.ts:1128-1169 does not register a --profile option for genie agent spawn, so the examples on Lines 52-53 would error with an unknown option. Either add --profile to the command or rewrite this section to match the supported flow.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/agent-profiles.md` around lines 50 - 53, The docs mention a --profile
flag for "genie agent spawn" but the spawn command registration (the agent spawn
command in the function that defines/registers the "agent spawn" subcommand in
src/term-commands/agents.ts) does not declare a --profile option, causing an
unknown option error; add a --profile option to the spawn command registration
(where the command is created/registered—e.g., the agent spawn command
builder/handler) and pass that value into the spawn handler logic (the spawn
handler function) so profiles are applied, or alternatively update the docs to
remove/replace the --profile examples to reflect the current supported flags.

```

### With genie work
Expand Down
2 changes: 1 addition & 1 deletion openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "genie",
"name": "Genie",
"description": "Skills, agents, and hooks for the Genie CLI terminal orchestration toolkit",
"version": "3.260302.2",
"version": "3.260309.1",
"configSchema": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automagik/genie",
"version": "3.260302.2",
"version": "3.260309.1",
"description": "Collaborative terminal toolkit for human + AI workflows",
"type": "module",
"bin": {
Expand Down
10 changes: 7 additions & 3 deletions plugins/genie/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"name": "genie",
"version": "3.260302.2",
"name": "automagik-genie",
"version": "3.260309.1",
Comment on lines +2 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if there's migration or uninstall handling for the old name
rg -n "genie" plugins/genie/ --glob "*.json" --glob "*.md" | head -30

Repository: automagik-dev/genie

Length of output: 2051


🏁 Script executed:

cat -n plugins/genie/.claude-plugin/plugin.json

Repository: automagik-dev/genie

Length of output: 780


🏁 Script executed:

cat -n plugins/genie/package.json

Repository: automagik-dev/genie

Length of output: 392


🏁 Script executed:

rg -n "automagik-genie" --glob "*.json" --glob "*.md"

Repository: automagik-dev/genie

Length of output: 45


🏁 Script executed:

rg -n "migration\|upgrade\|deprecat\|old.*plugin\|plugin.*rename" plugins/genie/ --glob "*.json" --glob "*.md"

Repository: automagik-dev/genie

Length of output: 45


🏁 Script executed:

cat -n plugins/genie/README.md | head -60

Repository: automagik-dev/genie

Length of output: 1664


🏁 Script executed:

cat -n plugins/genie/hooks/hooks.json

Repository: automagik-dev/genie

Length of output: 1925


🏁 Script executed:

rg -n "name.*:.*genie" plugins/genie/ --glob "*.json"

Repository: automagik-dev/genie

Length of output: 117


Plugin name change is incomplete—update all references.

Changing name to "automagik-genie" without updating the README creates inconsistency. Line 47 still shows the installation path as ~/.claude/plugins/genie/plugin.json and line 48 still verifies with openclaw plugins list | rg genie. If the plugin system identifies plugins by the name field, this will break existing installations; if by directory name, the name field change is misaligned with the rest of the plugin. Either revert the name to "genie" or comprehensively update all references (README, paths, and verification commands) to use "automagik-genie".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/genie/.claude-plugin/plugin.json` around lines 2 - 3, The plugin.json
"name" field was changed to "automagik-genie" but documentation and verification
commands still reference "genie"; either revert the "name" value in plugin.json
back to "genie" or update all references to match "automagik-genie" — update the
README entries (including the installation path shown as
"~/.claude/plugins/genie/plugin.json" and the verification command "openclaw
plugins list | rg genie") and any other scripts/docs that reference the old name
so the manifest field (plugin.json "name") and directory/command references are
consistent.

"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
"author": {
"name": "Namastex Labs"
},
"repository": "https://github.com/automagik-dev/genie",
"license": "MIT",
"keywords": ["workflow", "orchestration", "collaboration", "claude-code", "tmux", "agents"]
"keywords": ["workflow", "orchestration", "collaboration", "claude-code", "tmux", "agents"],
"skills": "./skills",
"hooks": "./hooks/hooks.json",
"agents": "./agents",
"settings": "./settings.json"
}
17 changes: 16 additions & 1 deletion plugins/genie/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Genie CLI hooks - setup, wish validation, session context, and completion awareness",
"description": "Genie plugin hooks — setup, onboarding, dispatch, wish validation, and completion awareness",
"hooks": {
"SessionStart": [
{
Expand All @@ -10,6 +10,11 @@
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/smart-install.js",
"timeout": 60
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/first-run-check.cjs",
"timeout": 5
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/session-context.cjs",
Expand All @@ -19,6 +24,16 @@
}
],
"PreToolUse": [
{
"matcher": "SendMessage",
"hooks": [
{
"type": "command",
"command": "genie hook dispatch",
"timeout": 15
}
]
},
{
"matcher": "Write",
"hooks": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie-plugin",
"version": "3.260302.2",
"version": "3.260309.1",
"private": true,
"description": "Runtime dependencies for genie bundled CLIs",
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions plugins/genie/references/dispatch-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ Documented for future validation. Three-layer chain: OpenClaw → genie → Clau

```bash
# Spawn a Claude Code worker via genie
genie worker spawn --role implementor
genie agent spawn --role implementor

# Or for heavy multi-file work with bead tracking
bd create "<task title>" --type task
genie work <bead-id>

# Monitor
genie worker list
genie worker read <worker>
genie agent list
genie agent read <agent>
```

- **Isolation:** Claude Code worktrees (same as CC path, initiated via genie)
- **Model:** sonnet (passed to CC via genie)
- **Coordination:** genie worker status + bead updates
- **Coordination:** genie agent status + bead updates

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Replace genie agent status with an implemented command.

src/term-commands/agents.ts:1128-1438 registers spawn, list, read, events, and other subcommands, but no status subcommand under genie agent. The guidance on Line 80 currently points readers to a command that will fail at runtime.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/genie/references/dispatch-contract.md` at line 80, The documentation
mentions a non-existent command `genie agent status`; update the text to
reference one of the actually implemented subcommands (for example `genie agent
list`, `genie agent spawn`, `genie agent read` or `genie agent events`) and
adjust the descriptive guidance accordingly so it matches the CLI behavior
registered (the implemented subcommands listed include spawn, list, read,
events). Replace the `genie agent status` mention with the chosen implemented
command and confirm any example usage or expected output in the doc matches that
command's semantics.

- **Risk:** 3 layers of indirection — use timeouts, fall back to sequential on failure

## Rules
Expand Down
Loading
Loading