Skip to content

feat: Genie CLI v2 — Complete Framework Redesign - #536

Merged
namastex888 merged 25 commits into
devfrom
feat/agent-directory
Mar 14, 2026
Merged

namastex888 merged 25 commits into
devfrom
feat/agent-directory

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

Complete redesign of the genie CLI framework, replacing 40+ commands with a streamlined architecture:

  • Agent Directory — Persistent registry (genie dir add/rm/ls/edit) replacing profiles and blueprints
  • Directory-Based Spawn — genie spawn <name> resolves from directory, injects identity via --system-prompt-file / --append-system-prompt-file
  • Built-in Roles & Council — 10 roles + 10 council members shipping with genie package
  • Team Lifecycle — genie team create/hire/fire/disband with git worktree management, team name = branch name
  • Wish State Machine — genie work/done/status replacing beads/daemon/ledger
  • Dispatch Commands — genie brainstorm/wish/work/review with context injection
  • Flat Messaging — genie send/broadcast/chat scoped to own team, auto-spawn on message to offline agent
  • Command Promotion — Top-level spawn/kill/stop/history/read/answer/ls, removed genie agent namespace
  • Session Management — genie --session <name> for named leader sessions
  • Skill Alignment — All 10 skill prompts updated to use new dispatch model
  • Council Dual-Mode — Lightweight (skill) + full spawn (genie team hire council)

Design

  • DRAFT.md — Full brainstorm (36 decisions)
  • WISH.md — Execution plan (10 groups)

Diff Stats

90 files changed, +7,281 / -5,861

Removed

  • genie agent * namespace (promoted to top-level)
  • genie task * namespace (replaced by wish groups)
  • genie profiles * (replaced by agent directory)
  • genie daemon/ledger * (replaced by wish state machine)
  • genie team blueprints/ensure (replaced by directory + hire)
  • persistSystemPrompt() + $(cat) pattern (replaced by --system-prompt-file)
  • Beads integration (bd CLI calls throughout)

Test Plan

  • bun run check passes (typecheck + lint + dead-code + tests)
  • bun run build succeeds
  • genie dir add/rm/ls/edit works
  • genie spawn <name> resolves from directory and built-ins
  • genie team create/hire/fire/disband manages worktrees
  • genie work/done/status tracks wish group state
  • No stale beads/profiles/blueprints references remain
  • All 10 skill SKILL.md files reference new patterns

automagik-genie and others added 13 commits March 13, 2026 19:05
Implements Group 1 of the genie v2 redesign:

- Create src/lib/agent-directory.ts — JSON registry at ~/.genie/agent-directory.json
  with add/rm/resolve/ls/edit/loadIdentity API and file-lock pattern
- Create src/lib/builtin-agents.ts — 10 built-in roles + 10 council members
  with default models, prompts, and descriptions
- Create src/term-commands/dir.ts — genie dir add/rm/ls/edit CLI commands
- Remove blueprint system from team-manager.ts (BLUEPRINTS, getBlueprint, listBlueprints)
- Remove genie profiles commands from genie.ts
- Remove genie team blueprints and genie team ensure commands
- Resolution order: user directory > built-in registry
Files removed from genie.ts by Groups 1 and 4 but not yet deleted:
profiles.ts, ledger/validate.ts, team-auto-spawn.ts, beads-validate.ts,
daemon.ts, beads-registry.ts, wish-state.ts
Previous commit had stale linter changes from concurrent agents.
This version starts from dev, adds only dir namespace registration
while keeping all existing commands intact.
Group 4 deliverables:
- Create src/lib/wish-state.ts with WishState schema, createState/
  startGroup/completeGroup/getState API, and file-locked state file
  at .genie/state/<slug>.json
- Add genie done <slug>#<group> and genie status <slug> CLI commands
  in src/term-commands/state.ts
- Remove all beads integration: daemon commands, ledger commands,
  brainstorm crystallize, beads-registry, beads-issues-jsonl
- Remove bd CLI calls from close, ship, work, and task commands
- Clean beads/bd references from comments throughout codebase
- Add systemPromptFile, promptMode, model to SpawnParams in provider-adapters
- buildClaudeCommand emits --system-prompt-file or --append-system-prompt-file
- buildClaudeCommand emits --model flag when model is set
- Rewrite genie agent spawn: positional <name> resolves from directory/built-ins
- Remove --role as required option; name is the primary identifier
- Agent CWD resolved from directory entry.dir, overridable with --cwd
- Agent identity injected via --append-system-prompt-file <dir>/AGENTS.md
- Replace persistSystemPrompt() + $(cat) pattern with --*-system-prompt-file
- Update all tests to match new --*-file flag patterns
- Rewrite team-manager.ts: new schema with repo, baseBranch, worktreePath,
  leader, members[]; createTeam creates git worktree (idempotent);
  hireAgent/fireAgent for member management; disbandTeam removes worktree
- Rewrite team.ts CLI: create (--repo, --branch), hire (council special case),
  fire, ls (teams or members), disband commands
- Remove _open hidden command and team shortcut routing from genie.ts
- Add comprehensive tests for both team-manager and team CLI
- Remove sessionCommand and SessionOptions exports (dead after _open removal)
- Remove deprecated deleteTeam alias from team-manager
- Remove unused GroupStatus type export from wish-state
- Clean up knip config: remove stale ignores for profiles.ts and bd binary
- Remove export from getWindowEnv, setWindowEnv, killSession (only used
  by removed session functions)
- Remove unused GroupStatus type alias from wish-state
- local-tasks.test.ts: save/restore TERM_USE_LOCAL_TASKS env var to
  prevent parallel test interference
- work.test.ts: disable husky hooks in temp repos via core.hooksPath
  and use conventional commit messages
Implement Group 5 dispatch commands that bridge the wish state machine
and agent spawn with context injection:

- genie brainstorm <agent> <slug> — reads DRAFT.md, spawns with content
- genie wish <agent> <slug> — reads DESIGN.md, spawns with content
- genie dispatch-work <agent> <slug>#<group> — checks deps, starts group, spawns
- genie review <agent> <slug>#<group> — spawns with group + git diff context

Shared utilities: extractGroup(), extractWishContext(), buildContextPrompt(),
writeContextFile() for temp file context injection via --append-system-prompt-file.

Exports handleWorkerSpawn and SpawnOptions from agents.ts for reuse.
…nd team chat

- Rewrite msg.ts: remove --team from send, add scope enforcement, broadcast,
  and chat commands (post/read via JSONL team channels)
- Create team-chat.ts: JSONL-based group channel with postMessage/readMessages
- Rewrite protocol-router.ts: directory-first resolution order
  (directory → built-in → worker registry), auto-spawn for directory agents
- Update auto-spawn.ts: check agent directory before templates for
  offline agent resolution with expanded search candidates
- Add comprehensive tests for team-chat, scope checking, and protocol-router
@coderabbitai

coderabbitai Bot commented Mar 14, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ecadb018-986c-46cd-80d9-9bbd0f950e8e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/agent-directory
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces Genie CLI v2, a comprehensive redesign of the command-line interface aimed at simplifying multi-agent workflows and improving developer experience. The changes focus on establishing a robust framework for agent identity, team collaboration, and task orchestration, moving away from previous complexities and consolidating functionalities into a more intuitive and scalable system. The new architecture emphasizes clear separation of concerns, persistent agent configurations, and streamlined communication, laying the groundwork for more advanced AI-assisted development.

Highlights

  • Framework Redesign: The Genie CLI has undergone a complete architectural overhaul, replacing over 40 commands with a streamlined, wish-native framework.
  • Agent Directory: Introduced a persistent agent directory (genie dir add/rm/ls/edit) for managing agent identities, replacing the old profiles and blueprints system.
  • Directory-Based Spawn: The genie spawn <name> command now resolves agents from the new directory, injecting identity via --system-prompt-file or --append-system-prompt-file.
  • Team Lifecycle Management: New commands (genie team create/hire/fire/disband) enable dynamic team collaboration with integrated Git worktree management, where team names correspond to branch names.
  • Wish State Machine: A new genie work/done/status state machine replaces the beads/daemon/ledger system for tracking wish group progress, ensuring deterministic state transitions.
  • Context-Injected Dispatch Commands: New dispatch commands (genie brainstorm/wish/dispatch-work/review) are implemented to inject rich context (file paths, extracted sections, wish-level summaries) into agent prompts.
  • Flat Messaging & Chat: Messaging is now flat (genie send/broadcast/chat) and scoped to the agent's team, with auto-spawn functionality for offline agents.
  • Command Promotion & Simplification: Many genie agent subcommands (like spawn, kill, stop, ls) have been promoted to top-level commands for easier access, and numerous deprecated commands have been removed.
  • Named Leader Sessions: The CLI now supports named leader sessions via genie --session <name> for better session management.
  • Skill Alignment: Ten core skill prompts have been updated to align with the new dispatch model and orchestration framework.
Changelog
  • .genie/brainstorms/agent-directory/DESIGN.md
    • Added a design document for the agent directory and multi-agent spawn redesign.
  • .genie/brainstorms/agent-directory/DRAFT.md
    • Added a draft document outlining the complete framework redesign for Genie CLI v2.
  • .genie/wishes/fix-onboarding-prod-bugs/WISH.md
    • Added a wish document detailing fixes for onboarding production bugs related to tmux defaults and silent prompt failures.
  • .genie/wishes/genie-v2-framework-redesign/WISH.md
    • Added a wish document outlining the complete framework redesign for Genie CLI v2.
  • .gitignore
    • Updated to ignore Claude Code worktrees.
  • knip.json
    • Updated configuration to remove 'bd' from ignored binaries and added new ignore rules.
  • report.md
    • Added a competitive analysis report for Claude Code frameworks, positioning Genie.
  • skills/brainstorm/SKILL.md
    • Updated to reflect multi-agent awareness and shared worktree operations.
  • skills/council/SKILL.md
    • Updated to include mode detection for lightweight vs. full spawn, and detailed flow for full spawn mode.
  • skills/docs/SKILL.md
    • Updated dispatch section to use 'genie spawn docs'.
  • skills/dream/SKILL.md
    • Updated dispatch and cleanup sections to use 'genie team ensure' and 'genie spawn', and removed 'bd' references.
  • skills/fix/SKILL.md
    • Updated dispatch section to use 'genie spawn fixer' and 'genie spawn reviewer'.
  • skills/onboarding/SKILL.md
    • Updated CLI command references to reflect new 'genie spawn' and 'genie agent' commands.
  • skills/report/SKILL.md
    • Updated dispatch section to use 'genie spawn tracer'.
  • skills/review/SKILL.md
    • Updated to include context injection, council participation, and dispatch using 'genie spawn reviewer'.
  • skills/trace/SKILL.md
    • Updated dispatch section to use 'genie spawn tracer'.
  • skills/wish/SKILL.md
    • Updated to include shared worktree context and acknowledge injected context.
  • skills/work/SKILL.md
    • Updated to include context injection, use 'genie spawn' for dispatch, and remove state management logic.
  • src/tests/beads-issues-jsonl.test.ts
    • Removed unit tests related to beads issues JSONL.
  • src/tests/brainstorm-crystallize.test.ts
    • Removed unit tests for brainstorm crystallize command.
  • src/genie-commands/tests/session.test.ts
    • Updated tests to reflect changes in system prompt handling.
  • src/genie-commands/brainstorm/crystallize.ts
    • Removed brainstorm crystallize command implementation.
  • src/genie-commands/ledger/validate.ts
    • Removed ledger validate command implementation.
  • src/genie-commands/profiles.ts
    • Removed profiles management commands.
  • src/genie-commands/session.ts
    • Refactored to remove session management logic, retaining only helper functions.
  • src/genie.ts
    • Refactored CLI entrypoint to remove deprecated commands, promote others to top-level, and integrate new namespaces.
  • src/hooks/tests/branch-guard.test.ts
    • Added unit tests for the branch guard hook.
  • src/hooks/handlers/auto-spawn.ts
    • Updated auto-spawn logic to be directory-aware, checking agent directory before templates.
  • src/hooks/handlers/branch-guard.ts
    • Added a new hook handler to prevent git/gh commands targeting main/master branches.
  • src/lib/agent-directory.test.ts
    • Added unit tests for the agent directory module.
  • src/lib/agent-directory.ts
    • Added a new module for persistent agent registry with CRUD operations.
  • src/lib/agent-registry.ts
    • Updated Agent interface, removed 'formatElapsed' and 'removeTemplate' functions.
  • src/lib/auto-approve.test.ts
    • Updated a test case for command smuggling prevention.
  • src/lib/beads-issues-jsonl.ts
    • Removed beads issues JSONL helper functions.
  • src/lib/beads-registry.ts
    • Removed beads registry implementation.
  • src/lib/builtin-agents.test.ts
    • Added unit tests for the built-in agents registry.
  • src/lib/builtin-agents.ts
    • Added a new module defining built-in roles and council members.
  • src/lib/claude-logs.ts
    • Removed 'tailLogFile' function.
  • src/lib/genie-config.ts
    • Removed 'CouncilPreset' type and related helper functions.
  • src/lib/idle-timeout.ts
    • Removed 'runWatchdogLoop' function.
  • src/lib/local-tasks.test.ts
    • Updated test setup to handle 'TERM_USE_LOCAL_TASKS' environment variable.
  • src/lib/local-tasks.ts
    • Updated comments to reflect focus on local task management.
  • src/lib/protocol-router.test.ts
    • Added unit tests for the protocol router, focusing on inbox retrieval and message routing.
  • src/lib/protocol-router.ts
    • Updated 'sendMessage' to use directory-first resolution for auto-spawn.
  • src/lib/provider-adapters.test.ts
    • Added tests for '--model', '--system-prompt-file', and '--append-system-prompt-file' flags.
  • src/lib/provider-adapters.ts
    • Added 'systemPromptFile', 'systemPrompt', 'promptMode', and 'model' to 'SpawnParams' and updated 'buildClaudeCommand' to use them.
  • src/lib/session-store.ts
    • Added a new module for managing named leader sessions.
  • src/lib/spawn-command.test.ts
    • Removed tests related to 'beadsDir' and simplified shell injection tests.
  • src/lib/spawn-command.ts
    • Removed 'beadsDir' from 'SpawnOptions' and related logic.
  • src/lib/target-resolver.test.ts
    • Updated error messages to reflect new 'genie ls' and 'genie kill' commands.
  • src/lib/target-resolver.ts
    • Updated error messages to reflect new 'genie ls' and 'genie kill' commands, and removed 'beads' references.
  • src/lib/task-backend.ts
    • Simplified to only use the local task backend, removing beads integration.
  • src/lib/team-chat.test.ts
    • Added unit tests for the team chat module.
  • src/lib/team-chat.ts
    • Added a new module for JSONL-based group chat channels per team.
  • src/lib/team-lead-command.ts
    • Updated to use '--append-system-prompt-file' instead of '$(cat)' pattern, and added 'sessionId' to options.
  • src/lib/team-manager.test.ts
    • Added unit tests for the team manager module.
  • src/lib/team-manager.ts
    • Refactored to remove blueprints, added git worktree management, 'hireAgent', 'fireAgent', 'listMembers' functions.
  • src/lib/team-shortcut.test.ts
    • Updated 'KNOWN_COMMANDS' to reflect 'dir' instead of 'profiles'.
  • src/lib/tmux.ts
    • Removed several tmux utility functions related to environment variables, killing sessions/windows/panes, and synchronous command execution.
  • src/lib/wish-state.test.ts
    • Added unit tests for the wish state machine.
  • src/lib/wish-state.ts
    • Added a new module for deterministic state tracking for wish execution groups.
  • src/lib/wish-tasks.ts
    • Removed wish-task linking module.
  • src/lib/worktree-manager.test.ts
    • Removed 'BeadsWorktreeManager' tests.
  • src/lib/worktree-manager.ts
    • Simplified to only use 'GitWorktreeManager', removing 'BeadsWorktreeManager' and 'isBdAvailable'.
  • src/term-commands/agents.ts
    • Refactored to remove agent namespace, promoting commands to top-level, and integrating agent directory resolution.
  • src/term-commands/approve.ts
    • Removed CLI command handler for 'approve' and 'sharedQueue' variable.
  • src/term-commands/beads-validate.ts
    • Removed beads validate command implementation.
  • src/term-commands/brainstorm-beads.ts
    • Removed brainstorm beads helper functions.
  • src/term-commands/close.ts
    • Removed close command implementation.
  • src/term-commands/council.ts
    • Removed council command implementation.
  • src/term-commands/create.ts
    • Removed create command implementation.
  • src/term-commands/daemon.ts
    • Removed daemon management commands.
  • src/term-commands/dir.ts
    • Added a new module for agent directory CRUD commands.
  • src/term-commands/dispatch.test.ts
    • Added unit tests for dispatch commands, covering context injection and state machine integration.
  • src/term-commands/dispatch.ts
    • Added a new module for context-injecting dispatch commands (brainstorm, wish, work, review).
  • src/term-commands/events.ts
    • Removed several event-related functions, simplifying the module.
  • src/term-commands/exec.ts
    • Removed exec command implementation.
  • src/term-commands/history.ts
    • Updated error message to reflect 'genie ls' command.
  • src/term-commands/msg.ts
    • Refactored messaging commands to include 'broadcast' and 'chat', updated 'send' and 'inbox' for directory-first resolution and team scoping.
  • src/term-commands/ship.ts
    • Removed ship command implementation.
  • src/term-commands/state.ts
    • Added a new module for CLI interface for wish state machine commands ('done', 'status').
  • src/term-commands/task/commands.ts
    • Removed task namespace commands.
  • src/term-commands/team.test.ts
    • Added unit tests for team CLI commands.
  • src/term-commands/team.ts
    • Refactored team commands to include 'hire', 'fire', 'disband', and updated 'create' and 'ls' commands.
  • src/term-commands/update.ts
    • Removed update command implementation.
  • src/term-commands/work.test.ts
    • Updated test setup to disable git hooks and changed initial commit message.
  • src/term-commands/work.ts
    • Removed beads related logic, daemon, and updated error messages.
  • src/types/genie-config.ts
    • Removed 'CouncilPreset' type.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This is an impressive and comprehensive redesign of the Genie CLI framework. The move to a persistent agent directory, a simplified team and worktree management system, and a native state machine are all excellent architectural improvements that will significantly enhance usability and maintainability. The code changes are extensive but well-organized and align with the detailed design documents. I've found a few minor inconsistencies in the updated skill prompts where old command names are still referenced. These are low-risk but should be corrected to ensure the documentation and skill definitions are consistent with the new framework.

Comment thread skills/dream/SKILL.md Outdated

Three-layer chain: OpenClaw -> genie -> Claude Code -> Teams. Use timeouts; fall back to sequential on failure.
# Create a team for this dream session
genie team ensure dream-<date>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The genie team ensure command has been removed in the new framework. Please use genie team create instead. The create command is now idempotent, so it serves the same purpose.

Suggested change
genie team ensure dream-<date>
genie team create dream-<date>

Comment thread skills/dream/SKILL.md Outdated
3. Cleanup:
- `git worktree remove <worktree_path>` for each wish.
- `TeamDelete` (Claude Code) or runtime-equivalent to tear down team context.
- `genie team delete dream-<date>` to tear down team context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The command to remove a team is now disband, not delete. Please update this to genie team disband dream-<date> to align with the new command structure.

Suggested change
- `genie team delete dream-<date>` to tear down team context.
genie team disband dream-<date>

Comment thread skills/onboarding/SKILL.md Outdated
## Agent Commands (genie CLI)
- Spawn agent: `genie agent spawn --role <role>`
- Spawn agent: `genie spawn <role>`
- List agents: `genie agent list`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The genie agent list command has been promoted to the top-level genie ls command. Please update this to reflect the new, more accessible command.

Suggested change
- List agents: `genie agent list`
- List agents: `genie ls`

Comment on lines +440 to 446
| Spawn agent | `genie spawn <role>` | ~~genie worker spawn~~ |
| List agents | `genie agent list` | ~~genie worker list~~ |
| Kill agent | `genie agent kill <id>` | ~~genie worker kill~~ |
| Agent history | `genie agent history <name>` | ~~genie worker history~~ |
| Send message | `genie send "<text>" --to <agent>` | ~~genie msg send~~ |
| Manage teams | `genie team ensure <name>` | (same) |
| Install hooks | `genie hook install` | (none) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This command reference table contains a couple of outdated commands from the old framework:

  • genie agent list should be genie ls.
  • genie team ensure <name> should be genie team create <name>.

Please update the table to reflect the new, streamlined command structure.

Suggested change
| Spawn agent | `genie spawn <role>` | ~~genie worker spawn~~ |
| List agents | `genie agent list` | ~~genie worker list~~ |
| Kill agent | `genie agent kill <id>` | ~~genie worker kill~~ |
| Agent history | `genie agent history <name>` | ~~genie worker history~~ |
| Send message | `genie send "<text>" --to <agent>` | ~~genie msg send~~ |
| Manage teams | `genie team ensure <name>` | (same) |
| Install hooks | `genie hook install` | (none) |
| Spawn agent | `genie spawn <role>` | ~~genie worker spawn~~ |
| List agents | `genie ls` | ~~genie worker list~~ |
| Kill agent | `genie kill <name>` | ~~genie worker kill~~ |
| Agent history | `genie history <name>` | ~~genie worker history~~ |
| Send message | `genie send "<text>" --to <agent>` | ~~genie msg send~~ |
| Manage teams | `genie team create <name>` | (same) |
| Install hooks | `genie hook install` | (none) |

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec90fa76b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +243 to +245
// Start group in state machine (enforces dependencies)
try {
await wishState.startGroup(slug, group, agentName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Initialize wish state before dispatching first work group

workDispatchCommand always calls wishState.startGroup(...), but there is no production path in this commit that creates .genie/state/<slug>.json beforehand (the only createState usages are in tests), so a fresh wish will fail with State file not found on the first dispatch-work invocation. This breaks the primary wish execution flow unless users manually seed state files.

Useful? React with 👍 / 👎.

Comment thread src/lib/wish-state.ts
Comment on lines +264 to +268
if (group.status === 'done') {
throw new Error(`Group "${groupName}" is already done`);
}

group.status = 'done';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Block completing groups whose dependencies are unmet

completeGroup only rejects already-done groups and then unconditionally sets status = 'done', which allows a blocked group to be marked complete before its dependencies finish. That bypasses the dependency guarantees enforced by startGroup and can corrupt execution ordering (e.g., marking Group 2 done while Group 1 is still not done).

Useful? React with 👍 / 👎.

Test User added 5 commits March 13, 2026 21:38
…s, add session management

Group 7 of the Genie v2 Framework Redesign:

- Promote agent subcommands to top-level: genie spawn, kill,
  stop, history, read, answer
- Add `genie ls` smart view showing registered agents with
  runtime status (NAME|DIR|STATUS|TEAM|MODEL)
- Add `genie --session <name>` for named leader sessions with
  name→UUID mapping
- Remove `genie agent` namespace entirely (spawn, list, kill,
  suspend, dashboard, watchdog, approve, history, answer,
  events, close, ship, read, exec)
- Remove `genie task` namespace entirely (create, update, ship,
  close, ls, link, unlink, create-local, list-local,
  update-local)
- Remove `genie council` and `genie profiles` commands
- Rename suspend→stop for consistency
- All commands resolve by agent name (with role/suffix fallback)
- Update all command references in target-resolver, work,
  history
…il skill

- Add systemPrompt field to SpawnParams for built-in agents without AGENTS.md
- Build --append-system-prompt flag in Claude adapter for inline prompts
- Resolve built-in system prompts in agent spawn flow via getBuiltin()
- Update /council skill with dual-mode awareness:
  - Lightweight mode (default): simulated perspectives in single session
  - Full spawn mode: detects hired council members, posts to team chat,
    council members respond independently, leader synthesizes
…d remove old patterns

Replace genie agent spawn --role with genie spawn across all 10 skill
SKILL.md files. Remove Task tool, TeamCreate/TeamDelete/SendMessage
references. Remove bd/beads/bd close references. Strip state management
from /work (no checkboxes, no Status: SHIPPED). Add shared worktree
context injection sections to brainstorm, wish, review, and work skills.
Verify council dual-mode documentation. Also fix report skill dispatch.
…sign

Delete 10 unused files (profiles, skill-loader, wish-tasks, close,
council, create, exec, ship, task/commands, update) and remove 11
unused exports left over from groups 1-9 parallel work. Fix biome
format, import-type, and unused-import errors.
@namastex888
namastex888 force-pushed the feat/agent-directory branch from ec90fa7 to 9bf6634 Compare March 14, 2026 00:39
Test User added 7 commits March 13, 2026 22:13
…sion-store

- Set GENIE_AGENT_NAME env var before the native team conditional block
  so all spawns (not just native team ones) get the env var set
- Native team path still overrides with the more specific agentName
- Confirmed crypto.randomUUID() works as a Bun global (Web Crypto API),
  added clarifying comment in session-store.ts
- Replace `genie agent list/kill/spawn/read/history` with promoted
  top-level commands (`genie ls/kill/spawn/read/history`)
- Replace `genie council <topic>` with `/council` skill reference
- Update CO-ORCHESTRATION-GUIDE from beads/bd paradigm to wish
  state machine context
- Update agent-profiles.md spawn references
- Fix import ordering in team-manager.ts
- Remove unused exports and files flagged by knip: task-backend.ts,
  event-monitor.ts, updateState, generateWorkerId, findAllByTask,
  loadFullAutoApproveConfig, getSessionName, getDefaultWorkerProfile,
  getWorkerProfile, extractPermissionDetails, detectCompletion,
  executeCommand, WorkerProfile type
- Update test to match new GENIE_AGENT_NAME behavior (always set from role)
@namastex888
namastex888 merged commit 8db6c8e into dev Mar 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants