Skip to content

chore: rolling promotion dev -> main - #602

Closed
namastex888 wants to merge 77 commits into
mainfrom
dev
Closed

namastex888 wants to merge 77 commits into
mainfrom
dev

Conversation

@namastex888

@namastex888 namastex888 commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Rolling Promotion PR

Auto-maintained rolling promotion PR from dev to main.

Process:

  • This PR is automatically created and kept open
  • Agent monitors CI status and fixes issues
  • Human reviews and merges when ready
  • Label ready-to-merge added when all checks pass

Human approval required for merge to production.

Summary by CodeRabbit

  • New Features

    • Introduced Council advisory system with ten specialized agents for architectural review, benchmarking, deployment, operations, and observability guidance
    • Added Team Lead and Project Manager agents for autonomous task coordination
    • Introduced Team Status tracking (in_progress, done, blocked) for workflow management
    • Added Wish-based team creation workflow
    • Enhanced agent discovery with dynamic filesystem-based lookup
  • Bug Fixes & Improvements

    • Improved system prompt delivery mechanism
    • Refined team directory scoping for project and global contexts
    • Enhanced skill workflows for brainstorm, council, docs, dream, learn, report, and trace

github-actions Bot and others added 30 commits March 14, 2026 19:52
…arn+brain

Group 1 — Orchestration Rules Rewrite:
- Rewrite ORCHESTRATION_PROMPT in smart-install.js and install.sh with current
  CLI commands (spawn, kill, stop, ls, team create/hire/fire/disband, send,
  broadcast, chat, done, status, reset)
- Add skill auto-invocation chain, team lifecycle, and rules sections
- Remove stale genie agent spawn, genie team ensure, genie agent dashboard refs
- Both files have identical orchestration content

Group 2 — Kill Onboarding + Inline References:
- Delete skills/onboarding/ directory entirely
- Inline prompt optimizer content into skills/refine/SKILL.md
- Inline design template into skills/brainstorm/SKILL.md
- Inline wish template into skills/wish/SKILL.md
- Remove all references/ file paths from SKILL.md files

Group 5 — Learn Rewrite + Brain Update:
- Rewrite skills/learn/SKILL.md: primary trigger is user correction, diagnoses
  which behavioral surface needs change (CLAUDE.md, AGENTS.md, SOUL.md, rules/,
  memory/, hooks, configs). Remove BOOTSTRAP.md ref. Connect to Claude native memory.
- Update skills/brain/SKILL.md: add brain vs memory distinction (brain=context
  graph, memory=behavioral learnings). Add auto-install: detect notesmd-cli,
  offer install from https://github.com/Yakitrak/notesmd-cli
Group 3 — Core Chain Skills:
- brainstorm: remove genie brainstorm crystallize, auto-invoke /review at
  WRS=100, suggest /council when Decisions stuck after 2+ exchanges
- wish: fuzzy gate check auto-triggers /brainstorm, step 7 declares depends-on,
  handoff auto-invokes /review instead of suggesting /work
- work: clarify as implementor skill via genie work dispatch, add local /review
  per group, genie send signaling, leader uses genie done (not worker),
  remove "no state management" confusion
- review: add SHIP next-steps per context (plan→wish/work, execution→PR,
  PR→merge), auto-invoke /fix on FIX-FIRST, /trace for unclear root cause

Group 4 — Support Skills:
- council: add auto-invocation triggers (review arch decisions, brainstorm
  stuck decisions), document genie team hire council, add 2min timeout for
  full spawn, clarify lightweight=simulate vs full spawn=real agents
- trace: add genie send for reporting findings, clarify spawned agent IS
  the tracer, /review can invoke /trace
- report: document agent-browser as genie dependency, add wish criteria
  linking during QA, add QA failure auto-invocation chain
- docs: add doc types (README, CLAUDE.md, API, architecture, JSDoc),
  CLAUDE.md as first-class surface, post-work suggestion
- refine: verified inlined content, no remaining references/ paths

Group 6 — Dream Lifecycle:
- Phase 1: use genie work dispatch per group (state tracking for free),
  genie status/done/reset for monitoring
- Phase 2: leader creates PR, reads bot comments critically, /fix valid
  issues, CI green required (poll, don't sleep)
- Phase 3: merge to dev, spawn tester, QA loop until all criteria proven,
  each fix = new PR to dev
- Phase 4: DREAM-REPORT.md with per-wish QA status
- Remove Status: SHIPPED and sleep 5 references
- Add full team lifecycle: create→execute→review→merge→QA→disband
- Change genie agent history/read/answer to genie history/read/answer
  (top-level commands, not under agent namespace) in both install.sh
  and smart-install.js
- Fix escaped backticks in wish SKILL.md template (remove backslashes)
- Add --repo <path> to genie team create in both orchestration prompts
  (--repo is required)
fix(skills): refresh all skills + orchestration rules rewrite
- Add "leader" built-in role with full orchestration system prompt
- Add --wish <slug> flag to "genie team create" for auto-spawning leaders
- Add team status tracking (in_progress/done/blocked) with setTeamStatus()
- Add "genie team done" and "genie team blocked" CLI commands
- Add autoMergeDev config option to GenieConfigSchema
- Update "genie team ls" to show team status column
- Add file lock to setTeamStatus to prevent concurrent read-modify-write races
- Replace require("node:path").resolve with ESM import in team.ts
- Validate wish file exists before createTeam to avoid orphaned teams
- Add --team flag to all genie team commands in leader prompt since GENIE_TEAM won't be set
Co-Authored-By: Paperclip <noreply@paperclip.ing>
feat: task leader role — autonomous wish lifecycle orchestration
…rompts

Inline --append-system-prompt and --system-prompt flags broke when passed
through tmux send-keys with multi-line prompts containing code blocks.
All system prompts are now written to temp files at /tmp/genie-prompts/
and passed via --append-system-prompt-file or --system-prompt-file.

When both systemPrompt and systemPromptFile are set, they are merged into
a single temp file. Extra --append-system-prompt-file args are also merged.

Closes #568
fix: eliminate inline system prompts — all prompts via temp files (#568)
- Add initialPrompt field to SpawnParams/SpawnOptions, appended as
  Claude Code positional [prompt] arg in buildClaudeCommand()
- spawnLeaderWithWish() now passes a kickoff prompt so the leader
  begins working immediately — no manual genie send needed
- Audit and update orchestration rules in smart-install.js and
  install.sh: add team done/blocked, dir commands, update --next/
  --stable, task leader workflow, autoMergeDev config
- Both install scripts now have identical orchestration content
feat: auto-kickoff leader on wish spawn + orchestration rules audit
Group 1 — Orchestration Rules:
- Create plugins/genie/rules/genie-orchestration.md (~15 lines)
- Remove hardcoded ORCHESTRATION_PROMPT from smart-install.js
- Update install.sh to copy from package file with fallback
- Both installers log where the rule was created
- Add removal of ~/.claude/rules/genie-orchestration.md to uninstall

Group 2 — Agent Consolidation:
- Rename implementor → engineer
- Merge spec-reviewer + quality-reviewer → reviewer (SHIP/FIX-FIRST)
- Merge tests → qa (writes tests + validates on dev)
- Delete old agent files
- Update builtin-agents.ts, skills, and all references

Group 4 — Session Fixes:
- getAgentsSystemPrompt() → getAgentsFilePath() (returns path not content)
- team-lead-command.ts: accept systemPromptFile, delete PROMPTS_DIR copy
- --agent-name uses basename(cwd) instead of hardcoded "team-lead"
- launchTmuxSpawn: use send-keys for first agent in team window
…gistry

Group 3 of fix-orchestration-rules wish:

- Convert every agent .md into folder/<name>/AGENTS.md with symlinks
- Create team-lead/ with AGENTS.md + SOUL.md + HEARTBEAT.md
- Create pm/ with AGENTS.md + SOUL.md + HEARTBEAT.md
- Add SOUL.md for all council members with real-person philosophy
- Add @SOUL.md import to council AGENTS.md files
- Rewrite builtin-agents.ts: scan plugins/genie/agents/*/ for discovery,
  parse CC frontmatter, no inline systemPrompt strings
- Add resolveBuiltinAgentPath(name) for file-based resolution
- Update agents.ts: use agentPath as systemPromptFile, no inline prompts
- Update tests for new folder structure and naming (council-- double dash)
session.ts hardcoded 'team-lead' as the agent name in ensureNativeTeamForLeader,
findLastSessionId calls, and console.log messages. Since team-lead-command.ts
derives agent name from basename(cwd), session.ts must match to avoid session
resume mismatches and incorrect native team registration.

Also simplify install.sh orchestration rules lookup to use the already-resolved
PKG_DIR instead of scanning hardcoded candidate paths.
feat: orchestration rules overhaul + agent folder structure + session fixes
import.meta.dir returns CWD in compiled bundles, not the module's
directory. Use the actual script path (process.argv[1]) resolved via
realpathSync to find the package root and discover agent folders.
fix: builtin agent folder scanner — resolve package root via process.argv[1] (#576)
namastex888 and others added 20 commits March 16, 2026 01:13
fix: set GENIE_TEAM env var on agent spawn
fix: kickoff message — genie work spawns automatically
Agent directory now defaults to project scope (<repo>/.genie/agents.json)
with fallback to global (~/.genie/agent-directory.json) then built-ins.

- add/rm/edit default to project scope, accept { global: true } option
- resolve() checks project → global → built-in roles → built-in council
- ls() returns entries from all scopes with scope label
- dir CLI commands accept --global flag
- dir ls shows SCOPE column

Closes #578
feat: project-scoped agent directory — multiple engineers across projects
fix(update): delete bun lockfile before install
#593)

* fix(reset): clean up all team dirs on --reset, not just current window

When `genie --reset` was called, handleReset() killed the entire tmux
session but only deleted one native team directory (the current
windowName). Any other windows in the session left their team configs
behind in ~/.claude/teams/.

Fix: collect all window names via listWindows() before killing the
session, then delete each window's team directory.

Closes #545

* fix: use session ID instead of name in tmux calls to prevent injection

Gemini review flagged potential command injection when sessionName is
passed to tmux.listWindows/killSession. If a session name contains
single quotes it could break shell quoting in executeTmux.

Fix: use existing.id (system-assigned identifier) instead of
sessionName for the tmux calls. Session name still used for the log
message (cosmetic only).

---------

Co-authored-by: Felipe Rosa <felipe@namastex.ai>
…chTmuxSpawn (#595)

Extract helper functions to bring both functions under the biome
complexity limit of 15:

- buildClaudeCommand (27→~12): extract appendSystemPromptFlags()
- launchTmuxSpawn (22→~8): extract createTmuxPane() and applySpawnLayout()

Closes #594

Co-authored-by: Test User <test@test.com>
…596)

- Fix JSON formatting in package.json, openclaw.plugin.json, plugin.json
- Fix noAssignInExpressions in dispatch.ts (refactor while loop)
- Reduce complexity in performUninstall (21→≤15): extract tryRemoveStep()
- Reduce complexity in autoSpawn (25→≤15): extract buildSearchNames(), buildSpawnArgs()
- Reduce complexity in executeBlockingChain (18→≤15): extract runHandler()
- Reduce complexity in syncPlugin (16→≤15): extract updatePluginRegistry()
- Reduce complexity in chat action (17→≤15): extract resolveTeamName()

Biome now reports zero errors and zero warnings.

Co-authored-by: Test User <test@test.com>
Delete scale.test.ts and file-lock-concurrency.test.ts — these are
environment-dependent stress tests that cause CI failures due to
shared /tmp state and concurrent file lock race conditions. They
belong in a separate CI job, not the main test suite.

Co-authored-by: Test User <test@test.com>
* feat(worktree): move default worktree path to ~/.genie/worktrees/<project>/

Worktrees currently default to <repo>/.worktrees/ which causes accidental
git commits and bloated npm publishes. Change the default to
~/.genie/worktrees/<project-name>/ when no explicit worktreeBase is set.

- Make worktreeBase optional in config schema (undefined = new default)
- Update getWorktreeBase() to derive project name from basename(repoPath)
- Update setup wizard to show new default path

* feat(worktree): add auto-prune, fix gitignore, remove dead code

- Add pruneStaleWorktrees() to clean up team configs for non-existent
  worktree paths and run git worktree prune
- Call pruneStaleWorktrees() from disbandTeam() after cleanup
- Update .gitignore: add .worktrees/, remove dead .genie/worktrees/
- Untrack committed .worktrees/ directory from git
- Delete dead worktree-manager.ts and its test (unused legacy code)

---------

Co-authored-by: Test User <test@test.com>
Remove files that should never have been tracked:
- .worktrees/ — Claude Code worktree metadata
- .genie/agents.json — local agent directory
- .genie/teams/ — local team configs
- .genie/brainstorms/ — local brainstorm drafts
- .genie/wishes/ — local wish plans

These are local runtime state, not part of the published package.
Files remain on disk (git rm --cached), only removed from tracking.

Co-authored-by: Test User <test@test.com>
@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 several enhancements and fixes to the Genie CLI, focusing on improving agent orchestration, clarifying agent roles, enhancing code quality, and streamlining the development process. The changes aim to provide a more robust, user-friendly, and efficient experience for developers using the Genie CLI.

Highlights

  • Version Bump: The Genie CLI and related plugins have been updated to version 3.260316.14, ensuring users have the latest features and fixes.
  • Level Up Skill: Introduced a new /level-up skill to assess Claude Code proficiency and provide a personalized roadmap for improvement, enhancing user onboarding and skill development.
  • Agent Orchestration Rules: Improved agent orchestration by streamlining the installation of orchestration rules and providing a fallback mechanism for environments where the full rules file is not available.
  • Agent Roles and Responsibilities: Enhanced clarity and structure for agent roles and responsibilities by introducing SOUL.md files and refining agent descriptions, promoting better agent behavior and collaboration.
  • Testing and Code Quality: Improved code quality and reliability through comprehensive testing, code style enforcement, and updates to testing methodologies, ensuring a stable and maintainable codebase.
  • Dependency Management: Addressed dependency management issues by updating dependencies, resolving conflicts, and improving the installation process, ensuring a smooth and consistent development experience.
  • Observability and Debugging: Enhanced observability and debugging capabilities by improving logging, metrics, and tracing, enabling developers to identify and resolve issues more effectively.
Changelog
  • .claude-plugin/marketplace.json
    • Updated the version of the genie plugin in the marketplace configuration.
  • .claude/commands/level-up.md
    • Added a new skill, /level-up, to assess Claude Code proficiency and provide a personalized roadmap.
  • .genie/brainstorm.md
    • Added new features to the brainstorming list, including task leader architecture and skill refresh.
  • .gitignore
    • Updated the .gitignore file to exclude local genie state and legacy worktrees.
  • CLAUDE.md
    • Added a CLAUDE.md file to document Genie CLI commands, architecture, state file locations, environment variables, build process, testing, code style, gotchas, and PR review rules.
  • install.sh
    • Modified the install script to streamline the installation of orchestration rules and provide a fallback mechanism.
  • openclaw.plugin.json
    • Updated the version of the Genie plugin in the OpenClaw plugin configuration.
  • package.json
    • Updated the version of the Genie CLI package.
  • plugins/genie/.claude-plugin/plugin.json
    • Updated the version of the Genie plugin.
  • plugins/genie/agents/council--architect.md
    • Added a reference to SOUL.md in the architect agent's configuration.
  • plugins/genie/agents/council--architect/AGENTS.md
    • Added a new AGENTS.md file for the architect agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--architect/SOUL.md
    • Added a new SOUL.md file for the architect agent, defining its core principles and values.
  • plugins/genie/agents/council--benchmarker.md
    • Added a reference to SOUL.md in the benchmarker agent's configuration.
  • plugins/genie/agents/council--benchmarker/AGENTS.md
    • Added a new AGENTS.md file for the benchmarker agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--benchmarker/SOUL.md
    • Added a new SOUL.md file for the benchmarker agent, defining its core principles and values.
  • plugins/genie/agents/council--deployer.md
    • Added a reference to SOUL.md in the deployer agent's configuration.
  • plugins/genie/agents/council--deployer/AGENTS.md
    • Added a new AGENTS.md file for the deployer agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--deployer/SOUL.md
    • Added a new SOUL.md file for the deployer agent, defining its core principles and values.
  • plugins/genie/agents/council--ergonomist.md
    • Added a reference to SOUL.md in the ergonomist agent's configuration.
  • plugins/genie/agents/council--ergonomist/AGENTS.md
    • Added a new AGENTS.md file for the ergonomist agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--ergonomist/SOUL.md
    • Added a new SOUL.md file for the ergonomist agent, defining its core principles and values.
  • plugins/genie/agents/council--measurer.md
    • Added a reference to SOUL.md in the measurer agent's configuration.
  • plugins/genie/agents/council--measurer/AGENTS.md
    • Added a new AGENTS.md file for the measurer agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--measurer/SOUL.md
    • Added a new SOUL.md file for the measurer agent, defining its core principles and values.
  • plugins/genie/agents/council--operator.md
    • Added a reference to SOUL.md in the operator agent's configuration.
  • plugins/genie/agents/council--operator/AGENTS.md
    • Added a new AGENTS.md file for the operator agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--operator/SOUL.md
    • Added a new SOUL.md file for the operator agent, defining its core principles and values.
  • plugins/genie/agents/council--questioner.md
    • Added a reference to SOUL.md in the questioner agent's configuration.
  • plugins/genie/agents/council--questioner/AGENTS.md
    • Added a new AGENTS.md file for the questioner agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--questioner/SOUL.md
    • Added a new SOUL.md file for the questioner agent, defining its core principles and values.
  • plugins/genie/agents/council--sentinel.md
    • Added a reference to SOUL.md in the sentinel agent's configuration.
  • plugins/genie/agents/council--sentinel/AGENTS.md
    • Added a new AGENTS.md file for the sentinel agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--sentinel/SOUL.md
    • Added a new SOUL.md file for the sentinel agent, defining its core principles and values.
  • plugins/genie/agents/council--simplifier.md
    • Added a reference to SOUL.md in the simplifier agent's configuration.
  • plugins/genie/agents/council--simplifier/AGENTS.md
    • Added a new AGENTS.md file for the simplifier agent, defining its role, capabilities, communication style, analysis framework, and completion criteria.
  • plugins/genie/agents/council--simplifier/SOUL.md
    • Added a new SOUL.md file for the simplifier agent, defining its core principles and values.
  • plugins/genie/agents/council--tracer.md
    • Added a reference to SOUL.md in the tracer agent's configuration.
  • plugins/genie/agents/council--tracer/AGENTS.md
    • Added a new AGENTS.md file for the tracer agent, defining its role, process, and constraints.
  • plugins/genie/agents/council--tracer/SOUL.md
    • Added a new SOUL.md file for the tracer agent, defining its core principles and values.
  • plugins/genie/agents/council.md
    • Added a reference to SOUL.md in the council agent's configuration.
  • plugins/genie/agents/council/AGENTS.md
    • Added a new AGENTS.md file for the council agent, defining its role, capabilities, communication style, and output format.
  • plugins/genie/agents/council/SOUL.md
    • Added a new SOUL.md file for the council agent, defining its core principles and values.
  • plugins/genie/agents/docs/AGENTS.md
    • Added a new AGENTS.md file for the docs agent, defining its role, process, and constraints.
  • plugins/genie/agents/engineer.md
    • Renamed implementor.md to engineer.md and updated the agent's description and instructions.
  • plugins/genie/agents/engineer/AGENTS.md
    • Added a new AGENTS.md file for the engineer agent, defining its role, process, and constraints.
  • plugins/genie/agents/fix/AGENTS.md
    • Added a new AGENTS.md file for the fix agent, defining its role, process, and constraints.
  • plugins/genie/agents/learn/AGENTS.md
    • Added a new AGENTS.md file for the learn agent, defining its role, process, and constraints.
  • plugins/genie/agents/pm.md
    • Added references to SOUL.md and HEARTBEAT.md in the project manager agent's configuration.
  • plugins/genie/agents/pm/AGENTS.md
    • Added a new AGENTS.md file for the project manager agent, defining its role, workflow, delegation model, and escalation path.
  • plugins/genie/agents/pm/HEARTBEAT.md
    • Added a new HEARTBEAT.md file for the project manager agent, defining its heartbeat checklist.
  • plugins/genie/agents/pm/SOUL.md
    • Added a new SOUL.md file for the project manager agent, defining its core principles and values.
  • plugins/genie/agents/qa.md
    • Added a new QA agent with a description of its role.
  • plugins/genie/agents/qa/AGENTS.md
    • Added a new AGENTS.md file for the QA agent, defining its role, process, and constraints.
  • plugins/genie/agents/refactor/AGENTS.md
    • Added a new AGENTS.md file for the refactor agent, defining its role, capabilities, communication style, and analysis framework.
  • plugins/genie/agents/reviewer.md
    • Added a new reviewer agent with a description of its role.
  • plugins/genie/agents/reviewer/AGENTS.md
    • Added a new AGENTS.md file for the reviewer agent, defining its role, process, and constraints.
  • plugins/genie/agents/team-lead.md
    • Added references to SOUL.md and HEARTBEAT.md in the team-lead agent's configuration.
  • plugins/genie/agents/team-lead/AGENTS.md
    • Added a new AGENTS.md file for the team-lead agent, defining its role, lifecycle, and commands.
  • plugins/genie/agents/team-lead/HEARTBEAT.md
    • Added a new HEARTBEAT.md file for the team-lead agent, defining its heartbeat checklist.
  • plugins/genie/agents/team-lead/SOUL.md
    • Added a new SOUL.md file for the team-lead agent, defining its core principles and values.
  • plugins/genie/agents/trace.md
    • Added a reference to SOUL.md in the tracer agent's configuration.
  • plugins/genie/agents/trace/AGENTS.md
    • Added a new AGENTS.md file for the trace agent, defining its role, process, and constraints.
  • plugins/genie/agents/trace/SOUL.md
    • Added a new SOUL.md file for the trace agent, defining its core principles and values.
  • plugins/genie/package.json
    • Updated the version of the Genie plugin.
  • plugins/genie/references/wish-template.md
    • Added a QA Criteria section to the wish template.
  • plugins/genie/rules/genie-orchestration.md
    • Added a new file to define Genie CLI agent orchestration rules.
  • plugins/genie/scripts/smart-install.js
    • Modified the smart-install script to streamline the installation of orchestration rules and provide a fallback mechanism.
  • skills/brain/SKILL.md
    • Clarified the distinction between Brain and Memory, updated installation instructions, and added a rule of thumb for when to use each.
  • skills/brainstorm/SKILL.md
    • Updated the brainstorming skill to auto-invoke /review, added a design template, and provided guidance for stuck decisions.
  • skills/council/SKILL.md
    • Updated the council skill to include auto-invocation triggers, clarify mode detection, and provide instructions for full spawn mode.
  • skills/docs/SKILL.md
    • Updated the documentation skill to include documentation surfaces and a flow for generating and validating documentation.
  • skills/dream/SKILL.md
    • Updated the dream skill to include a QA loop and provide a more detailed execution plan.
  • skills/learn/SKILL.md
    • Updated the learn skill to focus on behavioral correction, diagnose surfaces, and save learnings to memory.
  • skills/refine/SKILL.md
    • Updated the refine skill to use a Prompt Optimizer System Prompt and provide instructions for its use.
  • skills/report/SKILL.md
    • Updated the report skill to include QA loop integration and dependencies.
  • skills/work/SKILL.md
    • Updated the work skill to clarify the execution process, local review, and state management.
  • src/genie-commands/tests/session.test.ts
    • Updated tests for the Session command to reflect changes in agent name and system prompt handling.
  • src/genie-commands/session.ts
    • Updated the Session command to include the agent's folder name in the GENIE_AGENT_NAME environment variable and to handle system prompt files correctly.
  • src/genie-commands/setup.ts
    • Updated the setup command to allow for an empty worktree base directory and to clarify prompt mode options.
  • src/genie-commands/uninstall.ts
    • Updated the uninstall command to remove orchestration rules and improve the removal process.
  • src/genie-commands/update.ts
    • Updated the update command to improve dependency management and sync the Claude Code plugin.
  • src/genie.ts
    • Updated the genie entry point to use the new system prompt handling.
  • src/hooks/handlers/auto-spawn.ts
    • Updated the auto-spawn handler to improve agent spawning and template matching.
  • src/hooks/index.ts
    • Updated the hooks index to include a runHandler function and improve handler execution.
  • src/lib/tests/mailbox.test.ts
    • Added new tests for the mailbox functionality, including concurrency and failure modes.
  • src/lib/agent-directory.test.ts
    • Updated tests for the agent directory to reflect changes in scope and directory structure.
  • src/lib/agent-directory.ts
    • Updated the agent directory to support project and global scopes, improve directory structure, and enhance agent resolution.
  • src/lib/agent-registry.ts
    • Updated the agent registry to reflect changes in agent roles and responsibilities.
  • src/lib/builtin-agents.test.ts
    • Updated tests for built-in agents to reflect changes in agent roles, responsibilities, and system prompt handling.
  • src/lib/builtin-agents.ts
    • Updated the built-in agents to use AGENTS.md files and improve agent loading.
  • src/lib/provider-adapters.test.ts
    • Updated tests for provider adapters to reflect changes in system prompt handling.
  • src/lib/provider-adapters.ts
    • Updated provider adapters to handle system prompt files and improve command building.
  • src/lib/team-auto-spawn.ts
    • Updated team auto-spawn to improve agent spawning and template matching.
  • src/lib/team-lead-command.ts
    • Updated the team-lead command to handle system prompt files and improve command building.
  • src/lib/team-manager.test.ts
    • Updated tests for the team manager to reflect changes in team creation, status, and member handling.
  • src/lib/team-manager.ts
    • Updated the team manager to support team status, prune stale worktrees, and improve team creation and management.
  • src/term-commands/agents.ts
    • Updated the agents command to improve agent spawning and registration.
  • src/term-commands/dir.ts
    • Updated the directory command to support global and project scopes and improve agent management.
  • src/term-commands/dispatch.ts
    • Updated the dispatch command to improve wish group parsing.
  • src/term-commands/msg.test.ts
    • Updated tests for the message command to reflect changes in team-lead command building.
  • src/term-commands/msg.ts
    • Updated the message command to improve team name resolution.
  • src/term-commands/team.test.ts
    • Updated tests for the team command to reflect changes in team creation, status, and member handling.
  • src/term-commands/team.ts
    • Updated the team command to support wish-based leader spawning and improve team management.
  • src/types/genie-config.ts
    • Updated the Genie configuration to include autoMergeDev and improve terminal configuration.
Activity
  • Version bumps across multiple files to 3.260316.14.
  • Introduction of a new /level-up skill.
  • Addition of SOUL.md files to agent directories.
  • Refinement of agent descriptions and instructions.
  • Updates to testing methodologies and code style enforcement.
  • Streamlining of installation processes and dependency management.
  • Enhancements to observability and debugging capabilities.
  • Updates to file structure and directory management.
  • Improvements to command-line interface and user experience.
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. ↩

@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: 706902d7c0

ℹ️ 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 +49 to +52
`GENIE_AGENT_NAME=${shellQuote(folderName)}`,
'claude',
`--agent-id ${shellQuote(`team-lead@${sanitized}`)}`,
`--agent-name ${shellQuote('team-lead')}`,
`--agent-id ${shellQuote(`${folderName}@${sanitized}`)}`,
`--agent-name ${shellQuote(folderName)}`,

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 Keep native team-lead identity as team-lead

This change renames the lead agent identity to the current folder name, but the rest of orchestration still routes leader-targeted native-team traffic to team-lead (for example, worker join notifications are written to team-lead inbox in src/term-commands/agents.ts and src/lib/protocol-router-spawn.ts, and session registry still records team-lead@... in src/genie-commands/session.ts). In any normal spawn flow, that mismatch means leader-directed notifications and coordination messages are written to a different identity than the running leader process, so the team lead can miss worker join/status signals.

Useful? React with 👍 / 👎.

…603)

Worktrees don't have .genie/agents.json (it's gitignored), so agent
resolution fails for project-scoped agents. Fix: detect worktree via
git rev-parse --git-common-dir and fall back to the main repo's
agents.json when the worktree's doesn't contain the requested agent.

Closes #600

Co-authored-by: Test User <test@test.com>

@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 pull request introduces significant enhancements to the Genie CLI, focusing on a more robust multi-agent orchestration system. Key improvements include dynamic agent discovery from file-based definitions, refined team and session management, and a structured workflow for handling wishes, brainstorms, and reviews. The changes also streamline the installation and update processes, ensuring better maintainability and user experience. Overall, the PR moves towards a more autonomous and integrated agent development environment.

Comment on lines +190 to +196
// Due to read-modify-write race (no lock), some messages may be lost
// This test documents the actual behavior
if (messages.length < 10) {
console.warn(
`[C-MB-01] DATA LOSS DETECTED: ${messages.length}/10 messages survived concurrent writes. This is a known bug: mailbox.send() uses read-modify-write without file lock.`,
);
}

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.

high

The warning message indicates a known bug where concurrent send() operations to the same worker can lead to data loss due to a lack of file locking. This is a critical issue for a messaging system, as it compromises data integrity. A file locking mechanism should be implemented to prevent this race condition and ensure all messages are persisted reliably.

Comment on lines +1223 to +1225

### Build: First Automation Script (for Level 5-6)

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 section provides instructions for the agent on how to build the First Automation Script. These are internal directives for the AI and should not be visible in the user-facing markdown file. They should be removed or moved to an internal configuration/prompt for the AI.

Comment on lines +1245 to +1263
**On context windows:**
Break tasks into smaller chunks. The "auto-compact" (the community calls it "the lobotomy") loses important context. Better to do 5 focused sessions than 1 marathon.

**On getting started:**
Your CLAUDE.md is 80% of the early value. Spend 30 minutes on it before anything else. Claude can only be as good as the context you give it.

**On MCP management:**
Fewer is better. Tool search helps manage context (dropped startup from 51% to 13%), but don't load MCPs you don't use daily.

**On replacing SaaS:**
Track what you're paying for monthly. Try replacing one tool per week. Members have canceled Gamma, Canva Pro, Superhuman, Clay after building equivalent workflows.

**On building your knowledge system:**
The pattern is Claude Code + MCP + markdown memory files + git. Your system gets smarter with every project. The first month feels slow. By month two, the compounding kicks in.

**On autonomous work:**
Start supervised. Remove guardrails gradually. The members who trust too fast burn tokens on bad output. The members who never trust miss the productivity multiplier.

**On the levels:**

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 headings "On context windows:", "On getting started:", "On MCP management:", "On replacing SaaS:", "On building your knowledge system:", "On autonomous work:", and "On the levels:" are internal instructions for the agent on how to present community wisdom. These should not be part of the user-facing markdown file. They should be removed or moved to an internal configuration/prompt for the AI.


If the roadmap step includes a code example, add it inside step-body wrapped in a code-wrapper with a copy button:

```html

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 CSS property word-break: break-all; can cause long lines of code to break in the middle of words, which can reduce readability. Consider using word-wrap: break-word; or overflow-wrap: break-word; instead, as they generally provide better word-breaking behavior for code snippets.

Comment on lines +1178 to +1184
```

Adapt this template. Make it specific to the user. Don't use it verbatim.

---

### Build: First MCP Setup (for Level 1)

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 section provides instructions for the agent on how to adapt and execute the CLAUDE.md Starter and First MCP Setup steps. These are internal directives for the AI and should not be visible in the user-facing markdown file. They should be removed or moved to an internal configuration/prompt for the AI.

Comment thread CLAUDE.md
Comment on lines +51 to +52

`GENIE_AGENT_NAME` and the 5 native team CLI flags must stay in sync — if any are missing, Claude Code won't recognize the agent as a team member.

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 rule states that "GENIE_AGENT_NAME and the 5 native team CLI flags must stay in sync". For clarity and completeness, it would be beneficial to explicitly list these 5 native team CLI flags. This would help users understand exactly which flags are being referred to and ensure proper synchronization.

Comment thread CLAUDE.md

- Biome: single quotes, 2-space indent, 120 line width, trailing commas
- Conventional commits (commitlint)
- No `console.log` in source (biome rule, relaxed in tests)

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 rule "No console.log in source (biome rule, relaxed in tests)" is an internal development guideline. For a user-facing CLAUDE.md that guides AI agent behavior, this information is out of place. It would be more appropriate in a CONTRIBUTING.md or a similar developer-focused document.

Comment thread CLAUDE.md
Comment on lines +84 to +91
When reviewing comments from automated bots (CodeRabbit, Gemini, Codex):

1. **Read the actual code** before accepting any finding — bots often misread control flow
2. **Check if behavior is pre-existing** — extracted/moved code inherits existing tradeoffs, not new bugs
3. **Trace fallback chains** — bots flag the first code path without checking if later candidates handle the edge case
4. **Distinguish theoretical from practical** — "could happen if X" is not a bug if X never occurs in real usage
5. **Never blindly accept severity ratings** — a bot labeling something CRITICAL doesn't make it critical. Verify actual impact
6. **Check idempotency** — many "collision" or "race" concerns are mitigated by idempotent operations the bot didn't trace

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 section provides rules for reviewing comments from automated bots. This is an instruction for a human reviewer, not for an AI agent using Claude Code. Including it in CLAUDE.md, which is meant to guide the AI, seems inappropriate. This content should be moved to a human-facing document like CONTRIBUTING.md or PR_REVIEW_GUIDELINES.md.

## CLI Commands

```bash
genie spawn <role> # Spawn agent (engineer, reviewer, qa, fix, refactor)

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 list of spawnable agents (engineer, reviewer, qa, fix, refactor) appears to be incomplete. Other roles like pm, docs, learn, trace, and team-lead are also defined in the plugins/genie/agents/ directory. For a comprehensive guide, this list should be updated to include all available roles.

Comment on lines +177 to +183
**Tone rules:**
- Talk to them like a knowledgeable friend, not a grading rubric
- Explain things like you're talking to someone smart who just hasn't seen this particular thing before
- If something is impressive, say so genuinely
- If something is messy or could be better, say that too, but constructively
- Use "you" and "your", not "the user"
- Avoid jargon without explanation. If you mention "headless mode" also say "that means running Claude from a script instead of typing into the terminal"

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 section contains internal instructions for the agent (e.g., "Talk to them like a knowledgeable friend", "Avoid jargon without explanation"). These guidelines are for the AI's behavior and should not be present in the user-facing markdown file. They should be removed or moved to an internal configuration/prompt for the AI.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@namastex888 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 13 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cd035676-3d27-4738-80a7-135f1f868a6f

📥 Commits

Reviewing files that changed from the base of the PR and between 8cb273b and 77bf4ed.

⛔ Files ignored due to path filters (1)
  • plugins/genie/scripts/smart-install.js is excluded by !plugins/genie/scripts/**
📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .github/workflows/rolling-pr.yml
📝 Walkthrough

Walkthrough

This PR implements a major refactoring of Genie's agent orchestration layer, including: scope-aware agent directory management (project/global/built-in), system prompt handling shifted to file paths, session registration with dynamic agent naming, team lifecycle status tracking, new council agent roles with voting frameworks, skill workflow updates, and corresponding test coverage. Version bumped to 3.260316.14 across all manifest files.

Changes

Cohort / File(s) Summary
Version Bumps
package.json, openclaw.plugin.json, .claude-plugin/marketplace.json, plugins/genie/.claude-plugin/plugin.json, plugins/genie/package.json
Version updated from 3.260314.8 to 3.260316.14 across package and plugin manifest files.
Brainstorm & Wish Documentation
.genie/brainstorm.md, .genie/brainstorms/*/DESIGN.md, .genie/brainstorms/*/DRAFT.md, .genie/wishes/*/WISH.md
Removed entire design/draft/wish documents for agent-directory, deps-bump-readme-rewrite, genie-default-command, prompt-loading-arch, report-skill-plugin-rename, fix-onboarding-prod-bugs, genie-v2-framework-redesign, resolve-dev-desync, unify-install-kill-fragmentation redesigns. Added two new brainstorm items (task-leader-architecture, skill-refresh).
Agent Directory Scope Support
src/lib/agent-directory.ts, src/lib/agent-directory.test.ts
Introduced project-scope and global-scope separation with resolution order (project→main-repo→global→built-in). Added DirectoryScope, ScopedDirectoryEntry, ScopeOptions types. Extended add/rm/get/ls/edit APIs with optional scope parameter. Added getProjectRoot() and related helpers for cross-scope lookups and shadowing.
Builtin Agents Dynamic Discovery
src/lib/builtin-agents.ts, src/lib/builtin-agents.test.ts
Replaced hard-coded built-in agents with dynamic scanning from plugins/genie/agents/*/AGENTS.md. Added frontmatter parsing, resolveBuiltinAgentPath(), listRoleNames(), listCouncilNames(). Updated test expectations for new agent names (engineer, trace, qa, fix, team-lead, pm) and council naming (council--).
Council Agent Definitions
plugins/genie/agents/council*.md, plugins/genie/agents/council*/AGENTS.md, plugins/genie/agents/council*/SOUL.md
Added 11 council members (architect, benchmarker, deployer, ergonomist, measurer, operator, questioner, sentinel, simplifier, tracer, council moderator) with AGENTS.md specifications including review/execution modes, voting frameworks, and analysis checklists. Each includes SOUL.md inspirational philosophy.
Agent Role Definitions
plugins/genie/agents/{engineer,docs,fix,learn,pm,qa,refactor,reviewer,team-lead,trace}/AGENTS.md, plugins/genie/agents/{pm,team-lead}/SOUL.md, plugins/genie/agents/pm/HEARTBEAT.md, plugins/genie/agents/team-lead/HEARTBEAT.md
Added comprehensive documentation for agent workflows: engineer (task execution), qa/reviewer (quality gates), pm (8-phase project management), team-lead (autonomous lifecycle with heartbeat), trace/fix/learn (diagnostic/corrective actions), refactor (staged refactoring), docs (audit-first documentation).
Session & System Prompt Refactoring
src/genie-commands/session.ts, src/genie-commands/setup.ts, src/lib/team-lead-command.ts, src/lib/provider-adapters.ts
Replaced system prompt content with file-path approach: getAgentsSystemPrompt() → getAgentsFilePath(), systemPrompt?: string → systemPromptFile?: string throughout. Added session registration via registerSessionInRegistry(). Dynamic agent naming from workspace folder basename. Added initialPrompt field to SpawnParams. Terminal worktreeBase now optional in GenieConfig.
Team Lifecycle & Status
src/lib/team-manager.ts, src/lib/team-manager.test.ts, src/term-commands/team.ts, src/term-commands/team.test.ts
Added TeamStatus type (in_progress
Agent Spawning & Auto-Spawn
src/term-commands/agents.ts, src/hooks/handlers/auto-spawn.ts, src/term-commands/dir.ts
Refactored agent spawning to use identity file paths instead of inline prompts. Added spawnIntoCurrentWindow flag and createTmuxPane/applySpawnLayout helpers. Dir commands extended with --global scope flag for add/rm/edit. Auto-spawn now performs directory-first lookup with buildSearchNames, checks for live panes, and uses buildSpawnArgs helper.
Skill Workflow Updates
skills/{brain,brainstorm,council,docs,dream,learn,onboarding,refine,report,review,trace,wish,work}/SKILL.md
Brainstorm: auto-invokes /review on DESIGN.md, added design template. Council: 2-minute timeout, full-spawn vs lightweight modes, council member routing table. Dream: multi-phase (Execute→Review+PR→Merge+QA) with disband. Learn: behavioral correction focus (not onboarding). Report: QA loop integration, auto-invocation on QA failures. Review: SHIP next-steps, auto-invoke /fix with 2-loop limit. Work: engineer/reviewer roles, local review per group. Removed onboarding.md entirely.
Installation & Orchestration
install.sh, .gitignore, plugins/genie/rules/genie-orchestration.md, src/genie-commands/uninstall.ts, src/genie-commands/update.ts
install.sh now prefers reusing orchestration file from PKG_DIR/plugins/genie/rules/genie-orchestration.md with fallback to inline minimal message. Added genie-orchestration.md rules reference file. Gitignore updated: .worktrees/ as new default, added .genie/agents.json, .genie/teams/, .genie/brainstorms/, .genie/wishes/, .genie/state.json. Uninstall now handles orchestration rules removal. Update refactored to use new updatePluginRegistry() helper.
Worktree & Registry Cleanup
.worktrees/.metadata.json, .worktrees/feat-genie-cli-automation, .worktrees/workflow-rebrand, src/lib/worktree-manager.ts, src/lib/worktree-manager.test.ts
Deleted worktree metadata file and two submodule references (feat-genie-cli-automation, workflow-rebrand). Removed entire GitWorktreeManager and WorktreeManagerInterface (replaced by team/session-based management). Deleted corresponding test suite.
Hook Handler Refactoring
src/hooks/index.ts, src/hooks/handlers/auto-spawn.ts
Introduced runHandler helper for centralized try/catch in executeBlockingChain. Added executeNonBlockingHandlers for parallel handler execution. Auto-spawn refactored with directory-first lookup and buildSearchNames/buildSpawnArgs helpers.
Command & Message Refactoring
src/term-commands/msg.ts, src/term-commands/dispatch.ts
Added resolveTeamName() helper to centralize team detection (explicit option, agent team lookup, GENIE_TEAM fallback). Refactored parseWishGroups loop syntax for readability. Updated tests for dynamic GENIE_AGENT_NAME from folder basename and systemPromptFile usage.
Test Coverage Additions
src/lib/__tests__/mailbox.test.ts, src/genie-commands/__tests__/session.test.ts, src/lib/provider-adapters.test.ts
Added mailbox unit tests (send, delivery, inbox, concurrency/data-loss documentation). Extended session/buildClaudeCommand tests for file-path system prompts. Added provider-adapters tests for systemPromptFile merging and temp file creation.
Agent Definition Removals
plugins/genie/agents/quality-reviewer.md, plugins/genie/agents/spec-reviewer.md, plugins/genie/agents/tests.md
Removed quality-reviewer, spec-reviewer, and tests agent documentation files; functionality consolidated into unified reviewer and qa agents.
Wish Template & References
plugins/genie/references/wish-template.md
Added QA Criteria section with functional, integration, regression checklist items. Minor formatting adjustment to remove dash from "Populated by /review" line.

Sequence Diagram(s)

sequenceDiagram
    participant User as User/CLI
    participant PM as Project Manager
    participant TL as Team Lead
    participant Eng as Engineer
    participant Rev as Reviewer
    participant Council as Council

    User->>PM: genie team create --wish WISH_PATH
    PM->>TL: Spawn team-lead with wish context
    
    loop Per Execution Group
        TL->>Eng: genie work (dispatch with group)
        Eng->>Eng: Implement changes (read wish, understand context)
        Eng->>Eng: Local /review (run validation)
        Eng->>TL: Signal completion (group done)
    end

    TL->>TL: Review accumulated changes
    TL->>Rev: /review (plan review mode)
    
    alt Unclear Root Cause
        Rev->>TL: Request /trace
        TL->>TL: /trace (autonomous investigation)
    end

    alt SHIP
        TL->>TL: Create PR, merge to dev
        TL->>TL: QA loop
        TL->>TL: Disband team
        TL->>User: Report done
    else FIX-FIRST
        TL->>TL: Max 2 fix rounds
        alt Still failing
            TL->>User: Mark BLOCKED
        end
    end
Loading
sequenceDiagram
    participant Caller as Caller
    participant Dir as Agent Directory
    participant Proj as Project Scope
    participant Glob as Global Scope
    participant Builtin as Built-in Registry

    Caller->>Dir: resolve(name)
    
    Dir->>Proj: Lookup in project scope
    alt Found
        Proj-->>Dir: Return ScopedDirectoryEntry
        Dir-->>Caller: Agent (project)
    else Not Found
        Dir->>Glob: Lookup in global scope
        alt Found
            Glob-->>Dir: Return ScopedDirectoryEntry
            Dir-->>Caller: Agent (global)
        else Not Found
            Dir->>Builtin: Lookup in built-in roles/council
            alt Found
                Builtin-->>Dir: Return BuiltinAgent
                Dir-->>Caller: Agent (built-in)
            else Not Found
                Dir-->>Caller: null
            end
        end
    end
Loading
sequenceDiagram
    participant Claude as Claude Code
    participant Session as Session Manager
    participant Registry as Registry
    participant TL as Team Lead Agent
    participant Tmux as Tmux

    Claude->>Session: buildClaudeCommand(team, systemPromptFile)
    Session->>Session: getAgentsFilePath() → /path/to/AGENTS.md
    Session->>Tmux: Start session with base tmux config
    Session->>Registry: registerSessionInRegistry(agentName, teamName)
    Registry-->>Session: OK
    Session->>TL: Spawn with systemPromptFile, initialPrompt
    TL->>Claude: Session active
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

The PR is large and heterogeneous, spanning multiple architectural layers: scope-aware agent directories, session registration with dynamic naming, file-path-based system prompts, team lifecycle with status tracking, new council voting frameworks, skill workflow refactors, and orphaned worktree cleanup. While individual changes are often straightforward, the interdependencies across session/team-lead/spawning/directory/builtin-agents and the variety of refactoring patterns require careful cross-reference checking to validate correctness.

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

- smart-install.js: read updateChannel from ~/.genie/config.json,
  skip CLI reinstall when channel is 'next'
- release.yml: use startsWith instead of contains for [skip ci]
- remove hardcoded worktreeBase from createDefaultConfig()

Co-authored-by: Test User <test@test.com>
- ci.yml: add publish-next job that runs on dev push after quality gate
  passes — publishes to npm @next automatically
- rolling-pr.yml: update PR body to warn against squash merge — squash
  breaks dev/main history sync causing duplicate diffs on every PR

Co-authored-by: Test User <test@test.com>
@namastex888

Copy link
Copy Markdown
Contributor Author

Stale — squash merge broke history sync. Fresh rolling PR will be created by workflow.

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.

3 participants