Repository navigation
chore: promote dev to main - #606
namastex888 wants to merge 77 commits into
Conversation
…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)
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>
…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>
- 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>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (131)
📝 WalkthroughWalkthroughThis PR updates the plugin version from 3.260314.8 to 3.260316.14 and performs a significant architectural refactoring of the Genie agent system. Key changes include migrating from inline system prompts to file-path-based agent identity resolution, introducing project/global directory scoping for agent registration, implementing dynamic agent discovery from AGENTS.md frontmatter, adding team status lifecycle tracking (in_progress/done/blocked), and documenting comprehensive agent specifications for new roles (engineer, team-lead, PM, reviewer) and council member profiles. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests (beta)
|
Summary of ChangesHello, 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 significantly refines the Genie CLI's agent orchestration and user guidance. It introduces a comprehensive Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
💡 Codex Review
genie/src/term-commands/agents.ts
Lines 533 to 534 in 77bf4ed
When spawnIntoCurrentWindow is enabled, launchTmuxSpawn intentionally passes teamWindow = null, but applySpawnLayout then falls back to wins[0]. In any session where the current window is not the first window, implicit genie spawn calls will re-layout the wrong window and leave the newly spawned pane in the current window un-arranged. This should resolve to the active/current window for the no-team-window path instead of hardcoding the first window.
ℹ️ 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".
| `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)}`, |
There was a problem hiding this comment.
Keep team-lead identity stable across native routing
This now derives the leader identity from basename(process.cwd()), but the rest of the native messaging path still treats the leader as team-lead (for example session.ts registers the leader role/native ID as team-lead, and protocol-router.ts writes native inbox messages using worker.role). That mismatch means messages addressed to the lead can be routed to a different inbox/agent ID than the process launched here, which can break leader-directed messaging and auto-spawn coordination in native-team sessions.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Code Review
This pull request is a major release, promoting the dev branch to main. It includes a vast number of improvements, new features, and significant refactoring for better maintainability and robustness. Key changes include a new /level-up command, a complete overhaul of built-in agent definitions to be file-based, the introduction of project-scoped agent directories, and enhanced automation in the agent workflow. The code quality is high, and the changes are well-structured. I have one minor suggestion to clean up a redundant entry in the .gitignore file.
| # Claude Code worktrees | ||
| .claude/worktrees/ | ||
| .worktrees/ |
Rolling Promotion: dev → main
Changes since last release
Summary by CodeRabbit
New Features
Improvements
Chores