Repository navigation
feat: zero-touch install, session-per-folder, plugin rename, README rewrite - #529
Conversation
Remove `genie install` CLI command, its implementation in `src/genie-commands/install.ts`, and the defunct shell script `plugins/genie/scripts/src/install-genie-cli.sh`. The `shortcuts install` subcommand is unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move TEAM_LEAD_PROMPT.md delivery from runtime filesystem path resolution (which breaks in production bundles) to install-time injection via install.sh. The prompt is now written to ~/.claude/rules/genie-orchestration.md which Claude Code auto-loads every session. - Add inject_orchestration_prompt() to install.sh with full prompt content - Call inject_orchestration_prompt() in run_install() after install_genie_cli - Remove getTeamLeadPrompt() from team-lead-command.ts (no more import.meta.url) - Simplify persistSystemPrompt() to only write AGENTS.md content (systemPrompt) - Remove unused fileURLToPath, dirname, existsSync, readFileSync imports - Add source-of-truth comment header to TEAM_LEAD_PROMPT.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove confirm() calls from install flow; keep definitions for uninstall - check_and_repair_symlink: auto-repair broken symlinks without asking - offer_claude_plugin/openclaw/codex_skills: install directly, no prompt - Add inject_orchestration_prompt(): writes TEAM_LEAD_PROMPT to ~/.claude/rules/genie-orchestration.md - Add install_tmux_if_needed(): installs tmux via package manager if absent - Add create_default_config(): creates ~/.genie/config.json with defaults (promptMode: append, version: 2) - Add configure_tmux_defaults(): appends base-index 0 to ~/.tmux.conf - Update run_install(): calls new functions, removes INTERACTIVE branch - Update print_success(): shows genie launch command and /onboarding hint - Update output_agent_prompt(): reflects new next-steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ystem-prompt
Adds configurable promptMode ('append'|'system') to GenieConfigSchema.
Default 'append' preserves CC default prompt; 'system' replaces it.
Wires into buildTeamLeadCommand, setup wizard, and updates all tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… setup - Inlines TEAM_LEAD_PROMPT as constant in smart-install.js (no fs dependency) - Writes ~/.claude/rules/genie-orchestration.md on version change - Creates ~/.genie/config.json with defaults if missing - Ensures tmux base-index 0 in ~/.tmux.conf - Fixes misleading tui.ts warning about missing system prompt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… removal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All 6 execution groups complete, all success criteria met. 534/534 tests pass, bun run check exits 0, build succeeds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate inject_orchestration_prompt definition in install.sh (dead code at lines 504-589, second def at 740 was the active one) - Remove duplicate inject_orchestration_prompt call in run_install() - Fix marker race in smart-install.js: capture old version before installDeps() overwrites marker, pass to version-dependent functions so ensureTmuxDefaults() and injectOrchestrationPrompt() correctly detect upgrades and fresh installs - Align createDefaultConfig() schema in smart-install.js with install.sh (was missing session, terminal, logging, shell, shortcuts fields) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Defense-in-depth: pre-commit checks CI status via gh CLI and blocks commits on red branches (SKIP_CI_CHECK=1 escape hatch for fixes), pre-push now runs full `bun run check` quality gate, and Claude Code PreToolUse hook blocks --no-verify and bare --force push attempts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without --workflow filter, gh run list returns the latest run from any workflow. A passing release.yml could mask a failing ci.yml, or a failing commitlint.yml could wrongly block commits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub squash-merge commits include the full PR body as the commit body, violating body-max-line-length. Individual commits are already linted on dev — re-linting the merge commit on main is redundant. - Ignore merge commits in commitlint config - Remove main from commitlint push trigger Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
) * feat: session-per-folder, tui→session rename, plugin rename, /report skill - Session-per-folder: running `genie` from any directory creates a tmux window named after the folder inside a single "genie" session, with 4-char hash disambiguation for same-basename collisions - Rename tui→session: tui.ts→session.ts, tuiCommand→sessionCommand, TuiOptions→SessionOptions across all source, tests, and docs - Remove --team global shortcut from team-shortcut.ts (kept on subcommands) - Plugin rename: automagik-genie→genie in plugin.json and cliff.toml - Skill rename: /debug→/trace to avoid Claude Code built-in conflict - New /report skill: cascades /trace→browser evidence→observability→gh issue - Hotfix: /onboarding SKILL.md line 499 backtick split to prevent Claude SDK executable interpolation crash Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): pin Bun to 1.3.9 to avoid test runner race condition Bun 1.3.10 has a race condition in its parallel test runner's module evaluator that intermittently fails with "Export named X not found" when loading test files on CI hardware. Pinning to 1.3.9 (verified working) ensures deterministic test execution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review feedback — resume lookup, shell quoting, dup line - Sanitize team name before findLastSessionId lookup so resume detection works for folder names with spaces/uppercase/underscores - Use shellQuote in tmux getWindowEnv/setWindowEnv to handle paths containing single quotes - Remove duplicate line in brainstorm.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): add test retry for Bun test runner race condition Bun's parallel test runner intermittently fails with "Export named X not found" during module loading on CI hardware (different export names each time, confirming non-deterministic race). Cannot reproduce locally across 20+ consecutive runs. Add retry (bun test || bun test) as pragmatic workaround; revert Bun pin to latest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: pin Bun to 1.3.10 across project and all workflows - Add engines.bun >= 1.3.10 to package.json - Pin bun-version: 1.3.10 in ci.yml, release.yml, version.yml (replaces unpinned "latest") Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Genie <genie@namastex.ai> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
) * feat: session-per-folder, tui→session rename, plugin rename, /report skill - Session-per-folder: running `genie` from any directory creates a tmux window named after the folder inside a single "genie" session, with 4-char hash disambiguation for same-basename collisions - Rename tui→session: tui.ts→session.ts, tuiCommand→sessionCommand, TuiOptions→SessionOptions across all source, tests, and docs - Remove --team global shortcut from team-shortcut.ts (kept on subcommands) - Plugin rename: automagik-genie→genie in plugin.json and cliff.toml - Skill rename: /debug→/trace to avoid Claude Code built-in conflict - New /report skill: cascades /trace→browser evidence→observability→gh issue - Hotfix: /onboarding SKILL.md line 499 backtick split to prevent Claude SDK executable interpolation crash Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): pin Bun to 1.3.9 to avoid test runner race condition Bun 1.3.10 has a race condition in its parallel test runner's module evaluator that intermittently fails with "Export named X not found" when loading test files on CI hardware. Pinning to 1.3.9 (verified working) ensures deterministic test execution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review feedback — resume lookup, shell quoting, dup line - Sanitize team name before findLastSessionId lookup so resume detection works for folder names with spaces/uppercase/underscores - Use shellQuote in tmux getWindowEnv/setWindowEnv to handle paths containing single quotes - Remove duplicate line in brainstorm.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): add test retry for Bun test runner race condition Bun's parallel test runner intermittently fails with "Export named X not found" during module loading on CI hardware (different export names each time, confirming non-deterministic race). Cannot reproduce locally across 20+ consecutive runs. Add retry (bun test || bun test) as pragmatic workaround; revert Bun pin to latest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: pin Bun to 1.3.10 across project and all workflows - Add engines.bun >= 1.3.10 to package.json - Pin bun-version: 1.3.10 in ci.yml, release.yml, version.yml (replaces unpinned "latest") Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: bump deps and rewrite README with cognitive-load positioning Dependency bumps (safe patches/minors): - @types/bun ^1.1.0 → ^1.3.10 - @types/node ^20.10.5 → ^22.0.0 - esbuild ^0.27.2 → ^0.27.3 - knip ^5.85.0 → ^5.86.0 - typescript ^5.3.3 → ^5.8.0 - zod ^3.22.4 → ^3.25.0 README rewrite: - New positioning: "Wishes in, PRs out" (cognitive load reduction) - Third-person voice replacing first-person Genie voice - 3-step quickstart, 3x3 feature grid, Without/With pain table - CLI reference and config moved to collapsed <details> sections - Body reduced from 317 to 127 lines (excl. collapsed sections) - Prerequisites listed explicitly, no --dangerously-skip-permissions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: enhance README visual presentation with HTML feature grid, emoji headers, and install flip - Bold nav links, ✅ checkmarks on "right for you" bullets - Install script promoted to primary, npm collapsed in <details> - Markdown table → HTML feature grid with emoji headers - Comparison table emoji headers (❌/✅), pipeline flow emojis - All --- rules replaced with <br/> spacers (softer breathing room) - Numbered quick-start steps (01/02/03) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Genie <genie@namastex.ai> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (40)
📝 WalkthroughWalkthroughThis PR consolidates planning documents for four brainstorm initiatives (.genie files), pins bun to 1.3.10 across workflows and package.json, refactors the TUI command layer to session-based architecture with per-folder window management via tmux, introduces a promptMode configuration to control CLI prompt injection, automates the install flow with orchestration prompt injection and default config creation, removes the global --team shortcut, simplifies system detection, and adds a new /report skill with /trace renaming. Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI as genie CLI
participant Session as sessionCommand()
participant Tmux as tmux
participant Env as Environment
participant Claude as Claude
User->>CLI: genie (no args)
CLI->>Session: sessionCommand(options)
Session->>Env: Derive window name from cwd
Session->>Tmux: Check if session "genie" exists
alt Session exists
Tmux-->>Session: Session ID
Session->>Tmux: List windows, resolve/disambiguate name
Session->>Tmux: Attach to window with cwd
else Session not found
Session->>Tmux: Create session "genie"
Session->>Tmux: Create window (folder basename + hash)
Session->>Env: Set GENIE_CWD env var in window
end
Session->>Env: Read AGENTS.md for system prompt
Session->>Env: Read config for promptMode
Session->>Claude: Launch with appropriate prompt flag<br/>(--append-system-prompt or --system-prompt)
Claude-->>User: Interactive session
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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 introduces a suite of significant enhancements aimed at streamlining the developer experience and improving the robustness of the Genie CLI. The changes focus on simplifying the initial setup process, providing better context isolation for projects, refining the agent interaction model, and enhancing documentation. These updates collectively make the tool more intuitive, reliable, and powerful for managing AI-assisted development workflows. 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
|
tui.ts was renamed to session.ts on dev — resolve all conflicts in favor of the new name. Delete tui.ts brought in from main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a zero-touch installer, a session-per-folder architecture, renames components for clarity, and rewrites the README for an improved developer experience. However, a high-severity command injection vulnerability has been identified in the new /report skill and shared orchestration prompt, where LLM prompts construct shell commands using untrusted user input without proper quoting or sanitization. Additionally, a medium-severity maintainability issue exists in the installation script due to hardcoded content.
I am having trouble creating individual review comments. Click here to see my feedback.
install.sh (691-699)
A high-severity command injection vulnerability exists in the orchestration prompt template (lines 691 and 699). The examples use double quotes for shell commands (genie agent exec <agent> "<cmd>" and genie send "<text>" --to <agent>), which can lead to command injection if the LLM inserts untrusted user input with metacharacters. It is recommended to update these examples to use single quotes (e.g., '<cmd>' and '<text>') and instruct the LLM to safely quote all arguments using single quotes and escaping internal single quotes.
skills/report/SKILL.md (55-156)
The /report skill prompt instructs the LLM to construct and execute shell commands (e.g., agent-browser screenshot <url> on line 55 and gh issue create --title "<title>" --body "<report body>" on line 156) using user-provided input such as URLs and bug descriptions. However, the prompt does not include instructions for the LLM to sanitize or safely quote this input. If an attacker provides input containing shell metacharacters (e.g., ; rm -rf /, $(whoami)), and the LLM includes this input unquoted or improperly quoted in a shell command, it could lead to arbitrary command execution in the user's terminal.
To remediate this, update the prompt to include a mandatory rule for the LLM to safely quote all user-provided data when constructing shell commands. For example, instruct the LLM to use single quotes for arguments and to escape any internal single quotes.
plugins/genie/scripts/smart-install.js (272-280)
The orchestration prompt template (lines 272 and 280) provides examples of shell commands (genie agent exec <agent> "<cmd>" and genie send "<text>" --to <agent>) that use double quotes for arguments. If the LLM follows these examples and puts user-provided text containing double quotes or other shell metacharacters into these commands, it could lead to command injection or unintended behavior, as double quotes in bash still allow for expansion of backticks and $().
Consider updating the orchestration prompt examples to use single quotes (e.g., '<cmd>' and '<text>') and adding an explicit instruction for the LLM to safely quote all arguments using single quotes and escaping internal single quotes.
…ix in commitlint Squash-merges use the PR title (e.g. "Title (#123)") which may lack a conventional commit prefix. Individual commits are already linted on dev. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0278503311
ℹ️ 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".
| if (knownCommands.has(firstArg)) { | ||
| let collisionWarning: string | null = null; | ||
| if (teamExists?.(firstArg)) { | ||
| collisionWarning = `Warning: "${firstArg}" is a subcommand. To open team "${firstArg}", use: genie --team ${firstArg}`; | ||
| collisionWarning = `Warning: "${firstArg}" is a subcommand and also a team name. The subcommand takes priority.`; |
There was a problem hiding this comment.
Restore public escape hatch for command-name teams
This branch removed the --team rewrite path, so any team/window whose name matches a registered subcommand (for example work, agent, or team) is now unreachable through the public shortcut flow: genie <name> always executes the subcommand. The warning here confirms the collision but does not provide a usable CLI path, and _open is hidden, so users can no longer reliably open those teams after this change.
Useful? React with 👍 / 👎.
| await tmux.killSession(sessionName); | ||
| } | ||
| await deleteNativeTeam(windowName); | ||
| } |
There was a problem hiding this comment.
Delete all window teams when resetting a session
--reset now kills the entire tmux session but only deletes the native team for the currently derived window name. In the new multi-window session model this leaves other window teams behind with stale member state, so a “fresh reset” still carries old native-team metadata into subsequent launches. Reset should clear native teams for every window being destroyed, not just one name.
Useful? React with 👍 / 👎.
…prevent shell injection
Codex review flagged double-quoted placeholders ("<cmd>", "<text>") in
orchestration prompt examples as command injection risk. Switch to single
quotes across all 3 copies (TEAM_LEAD_PROMPT.md, install.sh, smart-install.js)
and add quoting guidance to /report skill's gh issue create command.
Also fix stale TEAM_LEAD_PROMPT.md reference in session test comment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Orchestration prompt is inlined in install.sh and smart-install.js, which write it to ~/.claude/rules/genie-orchestration.md at install time. No runtime code reads this file. Keeping it as a "source of truth" that must be manually synced to two scripts is fragile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Major release consolidating install overhaul, session architecture, naming cleanup, and developer experience improvements across 14 commits.
Zero-Touch Install Pipeline
curl | bashcommand with no promptssmart-install.js) replaces old shell-based installer with JS-driven setup that handles orchestration prompt injection, config defaults, and tmux configurationpromptModesetting — controls--system-promptvs--append-system-promptfor flexible prompt loadinginstall.tscommand,system-detect.tsexports, andinstall-genie-cli.shscriptSession-Per-Folder Architecture
tui.ts→session.tsrename — reflects that each folder gets its own isolated session, not a shared TUIPlugin & Skill Rename
/debug→/trace— agent and skill renamed to better reflect its investigation-focused behavior/reportskill added — new skill for generating structured project reportsREADME Rewrite & Visual Enhancement
<br/>spacers, install script promoted to primary pathGit Safety & CI Hardening
ci.ymlworkflow)bun run checkbefore allowing pushrepos/genie-clireferenceDependency Bump
package.jsondependencies andbun.lockrefreshcliff.tomlversion format updatedTest plan
bun run checkpasses (typecheck + lint + dead-code + 527 tests)curl -fsSL .../install.sh | bashcompletes zero-touch on clean machinegenielaunches session scoped to current folder/traceskill works (renamed from/debug)/reportskill generates structured output🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
/reportskill for streamlined bug investigation and GitHub issue creation.Changes
/debugskill to/tracefor clearer terminology.--teamshortcut; use team-specific flags where needed.Removals
genie installcommand; installation handled automatically during setup.