chore: add /worktree skill for parallel worktree management#171
chore: add /worktree skill for parallel worktree management#171
Conversation
Adds a Claude Code skill that automates the multi-worktree development workflow: setup with auto-generated prompts, cleanup after merge, milestone tree view, status overview, and rebase. Commands: setup, cleanup, status, tree, rebase.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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 powerful new Highlights
Changelog
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
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a new .claude/skills/worktree/SKILL.md documenting a Worktree Manager CLI: commands (setup, cleanup, status, tree, rebase), input validation, worktree lifecycle rules, dependency parsing and ordering, Claude prompt templates, directory conventions, and platform-specific handling. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant CLI as Worktree CLI
participant Git as Git (local)
participant GH as GitHub API
participant FS as Filesystem
participant Claude as Claude (prompting)
User->>CLI: run command (setup/status/tree/rebase/cleanup)
CLI->>GH: fetch issues, PRs, branches, metadata
GH-->>CLI: issues/PRs/branch state
CLI->>Git: create/prune worktrees, checkout branches, rebase
Git-->>CLI: worktree/branch state, conflict notifications
CLI->>FS: create directories, copy .claude settings, write prompts
CLI->>Claude: submit generated prompt per worktree
Claude-->>CLI: responses (analysis / next-steps)
CLI->>User: present status/tree/output and next actions
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive and well-documented /worktree skill for managing parallel development workflows. The skill definition is detailed, covering setup, cleanup, status checks, and more. My review focuses on improving the robustness, efficiency, and maintainability of the shell commands and instructions within the skill definition. I've identified a few areas where commands could be more reliable or efficient, and where instructions could be clarified to prevent ambiguity for the AI agent executing the skill.
Note: Security Review has been skipped due to the limited scope of the PR.
.claude/skills/worktree/SKILL.md
Outdated
|
|
||
| Directory suffix is auto-derived from the branch name: | ||
| - `feat/delegation-loop-prevention` → `../ai-company-wt-delegation-loop-prevention` | ||
| - Strip the `feat/`, `fix/`, `refactor/` etc. prefix, prepend `wt-` |
There was a problem hiding this comment.
The instruction "Strip the feat/, fix/, refactor/ etc. prefix" is ambiguous for an automated agent because of "etc.". This could lead to incorrect directory names if a branch uses a prefix not explicitly listed (e.g., chore/). It would be more robust to provide a complete list of prefixes or a more generic rule, such as "strip the part of the branch name before the first /, if one exists".
.claude/skills/worktree/SKILL.md
Outdated
| If dirty, warn and ask via AskUserQuestion whether to proceed or abort. | ||
|
|
||
| c. For each worktree definition, verify: | ||
| - Branch doesn't already exist: `git branch --list <branch-name>` |
There was a problem hiding this comment.
The command git branch --list <branch-name> is not a reliable way to check if a specific branch exists. It performs a pattern match, which can lead to false positives (e.g., checking for feat/foo might match an existing branch feat/foobar). A more robust approach is to verify the exact ref.
| - Branch doesn't already exist: `git branch --list <branch-name>` | |
| - Branch doesn't already exist: `git rev-parse --verify --quiet refs/heads/<branch-name>` |
.claude/skills/worktree/SKILL.md
Outdated
| cp .claude/settings.local.json <dir-path>/.claude/settings.local.json | ||
| ``` |
There was a problem hiding this comment.
The instructions state that if .claude/settings.local.json is missing, the process should warn the user and continue. However, the cp command on line 97 will fail if the file doesn't exist. To prevent this error, the file should only be copied if it exists, similar to the logic used for other .local.* files on line 101.
| cp .claude/settings.local.json <dir-path>/.claude/settings.local.json | |
| ``` | |
| test -f .claude/settings.local.json && cp .claude/settings.local.json <dir-path>/.claude/settings.local.json |
| c. **Match spec labels to source directories.** From each issue's labels, map `spec:*` labels to source directories: | ||
| - `spec:communication` → `src/ai_company/communication/` | ||
| - `spec:agent-system` → `src/ai_company/engine/`, `src/ai_company/core/` | ||
| - `spec:task-workflow` → `src/ai_company/engine/` | ||
| - `spec:company-structure` → `src/ai_company/core/`, `src/ai_company/config/` | ||
| - `spec:templates` → `src/ai_company/templates/` | ||
| - `spec:providers` → `src/ai_company/providers/` | ||
| - `spec:budget` → `src/ai_company/budget/` | ||
| - `spec:tools` → `src/ai_company/tools/` | ||
| - `spec:hr` → `src/ai_company/core/` | ||
| - `spec:human-interaction` → `src/ai_company/api/`, `src/ai_company/cli/` |
There was a problem hiding this comment.
Hardcoding the mapping from spec:* labels to source directories directly within the skill definition makes it brittle. If the project's structure or labeling conventions change, this skill will need to be manually updated. For better maintainability, consider moving this mapping to a configuration file within the repository (e.g., in .claude/config.json) that the skill can read at runtime.
| ```bash | ||
| gh pr list --repo <owner/repo> --state merged --json headRefName --jq '.[].headRefName' | ||
| gh pr list --repo <owner/repo> --state open --json headRefName,number --jq '.[] | "\(.headRefName) #\(.number)"' | ||
| ``` |
There was a problem hiding this comment.
Fetching all merged and open pull requests to check the status of each worktree's branch can be inefficient, especially in a repository with many PRs. A more efficient approach would be to query for the PR associated with each specific branch. You can do this by running the following command for each branch:
gh pr view <branch-name> --repo <owner/repo> --json state,numberThe output of this command will directly tell you if the PR is OPEN, MERGED, CLOSED, or if no PR exists for that branch (the command will fail). This avoids fetching and processing potentially large lists of all repository PRs.
.claude/skills/worktree/SKILL.md
Outdated
| 1. **Fetch all issues for the milestone:** | ||
|
|
||
| ```bash | ||
| gh issue list --repo <owner/repo> --milestone "<milestone-title>" --state all --limit 100 --json number,title,state,labels,body |
There was a problem hiding this comment.
The command to fetch milestone issues has a hardcoded --limit 100. If a milestone contains more than 100 issues, the dependency tree will be incomplete and potentially incorrect. It's safer to use a much larger limit (e.g., --limit 1000, which is often the API maximum) or explicitly instruct the AI to handle pagination if the number of issues might exceed the limit.
| gh issue list --repo <owner/repo> --milestone "<milestone-title>" --state all --limit 100 --json number,title,state,labels,body | |
| gh issue list --repo <owner/repo> --milestone "<milestone-title>" --state all --limit 1000 --json number,title,state,labels,body |
There was a problem hiding this comment.
Pull request overview
Adds a new Claude skill (/worktree) to automate a multi-worktree parallel development workflow (create worktrees + prompts, cleanup after merge, status, milestone dependency tree, and rebasing).
Changes:
- Introduces
/worktreeskill documentation and operational steps forsetup,cleanup,status,tree, andrebase. - Specifies pre-flight validation, PR merge-status checks, milestone-aware issue grouping, and prompt generation rules.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.claude/skills/worktree/SKILL.md
Outdated
|
|
||
| c. Copy all `.claude/` local files (settings, hooks, etc.): | ||
| ```bash | ||
| cp .claude/settings.local.json <dir-path>/.claude/settings.local.json |
There was a problem hiding this comment.
Step 2 says to continue even when .claude/settings.local.json is missing, but the next step unconditionally copies that file. This will make /worktree setup fail in the missing-file case; make the copy conditional (or skip it) to match the earlier behavior.
| cp .claude/settings.local.json <dir-path>/.claude/settings.local.json | |
| test -f .claude/settings.local.json && cp .claude/settings.local.json <dir-path>/.claude/settings.local.json |
.claude/skills/worktree/SKILL.md
Outdated
| gh pr list --repo <owner/repo> --state merged --json headRefName --jq '.[].headRefName' | ||
| gh pr list --repo <owner/repo> --state open --json headRefName,number --jq '.[] | "\(.headRefName) #\(.number)"' |
There was a problem hiding this comment.
gh pr list defaults to a small page size (typically 30). Without --limit (or querying per branch), merged/open PR detection can be incomplete and cause incorrect “No PR found” prompts and unsafe cleanup decisions.
| gh pr list --repo <owner/repo> --state merged --json headRefName --jq '.[].headRefName' | |
| gh pr list --repo <owner/repo> --state open --json headRefName,number --jq '.[] | "\(.headRefName) #\(.number)"' | |
| gh pr list --repo <owner/repo> --state merged --limit 1000 --json headRefName --jq '.[].headRefName' | |
| gh pr list --repo <owner/repo> --state open --limit 1000 --json headRefName,number --jq '.[] | "\(.headRefName) #\(.number)"' |
.claude/skills/worktree/SKILL.md
Outdated
| 8. **Show milestone progress** (if determinable). Detect the milestone from the branches/issues that were cleaned up: | ||
|
|
||
| ```bash | ||
| gh issue list --repo <owner/repo> --milestone "<milestone>" --state all --json state --jq '[group_by(.state) | .[] | {state: .[0].state, count: length}]' |
There was a problem hiding this comment.
This jq uses group_by(.state) without sorting first; group_by requires sorted input, otherwise counts can be wrong. Sort by state (e.g., sort_by(.state) | group_by(.state) | ...) before grouping.
| gh issue list --repo <owner/repo> --milestone "<milestone>" --state all --json state --jq '[group_by(.state) | .[] | {state: .[0].state, count: length}]' | |
| gh issue list --repo <owner/repo> --milestone "<milestone>" --state all --json state --jq '[sort_by(.state) | group_by(.state) | .[] | {state: .[0].state, count: length}]' |
.claude/skills/worktree/SKILL.md
Outdated
| If there are multiple issues in one worktree that have a natural ordering (from dependency parsing or logical sequence), add an `## Implementation order` section. | ||
|
|
||
| 6. **Present the output** to the user: | ||
| - For each worktree: the `cd` + `claude` command using **Windows-native paths** (e.g. `cd C:\Users\Aurelio\ai-company-wt-delegation-loop-prevention && claude`), followed by the prompt in a code block |
There was a problem hiding this comment.
This skill instructs users to run cd <path> && claude, but the repo’s CLAUDE.md explicitly says to never use cd in Bash commands and even calls out cd C:/Users/... as an anti-pattern. Consider rephrasing to avoid encouraging cd (or clearly separate “user-local shell instruction” from “Bash tool commands”) to stay consistent with project guidance.
| - For each worktree: the `cd` + `claude` command using **Windows-native paths** (e.g. `cd C:\Users\Aurelio\ai-company-wt-delegation-loop-prevention && claude`), followed by the prompt in a code block | |
| - For each worktree: show the **Windows-native path** to the worktree directory (e.g. `C:\Users\Aurelio\ai-company-wt-delegation-loop-prevention`) and a separate `claude` invocation, followed by the prompt in a code block. Do not embed `cd` in Bash examples; treat navigation to the directory as a user-local step. |
Greptile SummaryThis PR introduces a new Three logic issues were found that will cause silent failures or incorrect behaviour at runtime:
Two style-level gaps were also flagged:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
ARGS["$ARGUMENTS"] --> DISPATCH{Command?}
DISPATCH -->|setup| S1[Pre-flight checks\ngh auth · git status · git checkout main]
S1 --> S2[Check .claude/ local files]
S2 --> S3[For each definition:\ngit worktree add -b · cp .claude/ files]
S3 --> S4[Verify: git worktree list]
S4 --> S5[Generate Claude Code prompts\nfetch issues · parse deps · match spec: labels]
S5 --> S6[Present output: paths + claude commands]
DISPATCH -->|cleanup| C1[git worktree list]
C1 --> C2[git checkout main && git pull\ngit fetch --prune]
C2 --> C3[Check PR merge status per branch\ngh pr list --head branch]
C3 --> C4[Remove approved worktrees\ntrack successes]
C4 --> C5[Delete branches\nonly for successfully removed worktrees]
C5 --> C6[Verify + show milestone progress]
DISPATCH -->|status| ST1[git worktree list]
ST1 --> ST2[Per worktree: ahead/behind main\nuncommitted changes]
ST2 --> ST3[Match to open PRs]
ST3 --> ST4[Render summary table]
DISPATCH -->|tree| T1[Fetch milestone issues via gh api]
T1 --> T2[Parse dependency graph]
T2 --> T3{Circular deps?}
T3 -->|yes| T3E["⚠️ Flag error\n(no recovery guidance — gap)"]
T3 -->|no| T4[Topological sort → tiers]
T4 --> T5[Identify active worktrees]
T5 --> T6[Render tier tree + summary]
DISPATCH -->|rebase| R1[git checkout main && git pull]
R1 --> R2[For each worktree:\ncheck uncommitted changes]
R2 -->|dirty| R2S[Skip immediately]
R2 -->|clean| R3["Check commits ahead\nrev-list --count main..branch\n⚠️ Does NOT check 'behind' — gap"]
R3 -->|0 ahead| R3S["Skip as 'no-op'\n⚠️ Wrong if behind main"]
R3 -->|N ahead| R4[Ask user: rebase / skip / abort]
R4 -->|approved| R5[git rebase main\nAbort on conflict]
R5 --> R6[Report: N rebased, M skipped]
Last reviewed commit: d2103b3 |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/worktree/SKILL.md:
- Around line 357-365: Update the rebase logic wording in the SKILL.md section
that describes checking non-main worktrees so it’s clearer: replace the existing
"If 0 commits ahead: safe to rebase" line with "If 0 commits ahead: already up
to date or can fast-forward—safe to rebase (no-op or fast-forward)," and change
the "If has commits" line to "If has commits: needs rebase onto new
main—conflicts possible; warn the user and present AskUserQuestion options:
rebase anyway / skip / abort all." Reference the same paragraph that currently
shows the git rev-list command and ensure the new phrasing replaces the two
lines about 0 commits and has commits.
- Around line 162-164: The documentation mixes Bash commands with Windows-native
path examples causing platform confusion; update the SKILL.md by adding a short
clarification in the Introduction or Rules section (and adjust the example text
under the "Present the output" step) that states the skill runs/bash commands in
a Unix-like environment internally (e.g., WSL/Git Bash or container) while the
visible "cd ... && claude" examples are intentionally shown as Windows-native
paths for Windows users; explicitly note what macOS/Linux users should expect
(use Unix-style paths) and add a brief sentence telling users how to request
alternate path styles if needed so examples at the "Present the output" section
and any referenced example lines are consistent with the stated platform
assumptions.
- Around line 27-44: The fenced code blocks (e.g., the blocks showing "/worktree
setup", the Mode 2 shorthand examples "#12,`#17` "Delegation + Loop Prevention"",
and the Mode 3 example "/worktree setup --milestone M4 --issues
`#26`,`#30`,`#133`,`#168`") need blank lines before and after each triple-backtick block
to satisfy Markdown best practices (MD031) and improve readability; update all
occurrences (notably the blocks around lines with the setup input formats and
the other listed ranges) by inserting a blank line immediately above and below
each ```...``` block so the file renders cleanly.
- Around line 78-84: Replace the `ls .claude/settings.local.json 2>/dev/null`
existence check with a `test -f` style check to match the `test -d` pattern used
elsewhere; locate the string `ls .claude/settings.local.json 2>/dev/null` in
SKILL.md and change the instructions to use a `test -f` file-existence check
while keeping the same warning text ("No .claude/settings.local.json found —
worktrees will prompt for tool permissions.") and behavior (continue anyway).
- Around line 110-115: Add a pre-flight prerequisite that verifies the GitHub
CLI is installed and the user is authenticated before any steps that call "gh"
(e.g., before the "For each worktree, generate a Claude Code prompt" section
that uses "gh issue view <number> --repo <owner/repo> --json
title,body,labels"); implement this by checking for the "gh" binary and running
"gh auth status", and if missing or unauthenticated, print a clear instruction
to install/enable the CLI or run "gh auth login" and abort the setup flow until
resolved.
- Around line 60-76: Move the uncommitted-changes check before the main
checkout: run the `git status --short` check first and, if dirty, invoke the
existing AskUserQuestion prompt to warn and allow proceed/abort; then perform
`git checkout main && git pull`. Update the numbered sub-steps in the Pre-flight
checks section so the "check for uncommitted changes" appears before "Ensure on
main and up to date" (adjust labels a/b accordingly) and keep the subsequent
per-worktree verifications unchanged.
- Around line 119-130: Add a short maintenance note immediately after the "Match
spec labels to source directories." mapping block (the list containing entries
like `spec:communication → src/ai_company/communication/`, `spec:agent-system →
src/ai_company/engine/, src/ai_company/core/`, etc.) that states this mapping is
repository-specific and must be updated when new `spec:*` labels are added or
when directory structure changes; keep the note concise (one or two sentences)
and mention who should update it (maintainers) and where to find the mapping to
edit.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: a2cfcde6-e824-465e-84cc-307318963008
📒 Files selected for processing (1)
.claude/skills/worktree/SKILL.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cleanup artifacts
- GitHub Check: Greptile Review
🧰 Additional context used
🪛 LanguageTool
.claude/skills/worktree/SKILL.md
[style] ~307-~307: Try elevating your writing by using a synonym here.
Context: ...losed or external) - Tier 1: depends only on Tier 0 issues - Tier N: depends o...
(ONLY_SOLELY)
[style] ~402-~402: Consider using the typographical ellipsis character here instead.
Context: ...se backslash Windows-native paths (e.g. C:\Users\...). - Worktree directories are always si...
(ELLIPSIS)
🪛 markdownlint-cli2 (0.21.0)
.claude/skills/worktree/SKILL.md
[warning] 27-27: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 27-27: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 34-34: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 34-34: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 38-38: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 42-42: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 42-42: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 44-44: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 63-63: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 68-68: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 70-70: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 91-91: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 96-96: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 98-98: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 100-100: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 113-113: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 137-137: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 137-137: Code fence style
Expected: backtick; Actual: tilde
(MD048, code-fence-style)
[warning] 252-252: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 254-254: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 256-256: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 270-270: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 284-284: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 299-299: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 312-312: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 323-323: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 323-323: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 337-337: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 337-337: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 381-381: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 408-408: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 408-408: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (6)
.claude/skills/worktree/SKILL.md (6)
1-18: LGTM: Clear skill definition and metadata.The frontmatter correctly declares the allowed tools and provides a clear description. The argument hint appropriately shows the command structure.
214-218: LGTM: Branch deletion correctly handles squash-merge.The use of
-Dflag is appropriate for squash-merged branches that won't be recognized as merged by git. The earlier PR status checks (steps 4-5) provide necessary safety.
136-159: LGTM: Well-structured prompt template.The prompt template provides clear guidance with appropriate sections (Issues, Instructions, Scope, Workflow). The use of tilde fences to avoid conflicts with embedded backticks is correct. The references to TDD, CLAUDE.md conventions, and the /pre-pr-review workflow align well with the skill's purpose.
237-275: LGTM: Status command uses correct git syntax and clear output format.The use of
git rev-list --left-right --count main...<branch>(line 253) correctly uses the triple-dot syntax for symmetric difference to show ahead/behind counts. The table format provides a clear summary.
395-401: LGTM: Strong safety rules and sensible detection methods.The safety rules appropriately prevent data loss by requiring user confirmation for destructive operations. The repo name and owner/repo detection methods are correct and straightforward.
407-415: LGTM: Clear and helpful usage guide.The usage guide provides concise examples of all five commands with appropriate flags and arguments. Good UX for users who invoke the skill without proper arguments.
| ``` | ||
| /worktree setup | ||
| feat/delegation-loop-prevention #12,#17 "Delegation + Loop Prevention" | ||
| feat/parallel-execution #22 "Parallel Agent Execution" | ||
| ``` | ||
|
|
||
| **Mode 2 — Shorthand (issues + description only):** | ||
| ``` | ||
| /worktree setup | ||
| #12,#17 "Delegation + Loop Prevention" | ||
| #22 "Parallel Execution" | ||
| ``` | ||
| Branch names auto-generated from description: `feat/delegation-loop-prevention`. | ||
|
|
||
| **Mode 3 — Milestone-aware:** | ||
| ``` | ||
| /worktree setup --milestone M4 --issues #26,#30,#133,#168 | ||
| ``` |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider adding blank lines around fenced code blocks for readability.
Multiple fenced code blocks throughout the file lack surrounding blank lines, which reduces readability per Markdown best practices (MD031). While not critical, adding blank lines would improve document clarity.
Example sections affected: lines 27-44 (setup input formats), 63-102 (pre-flight checks and setup steps), and similar patterns throughout.
Also applies to: 63-102, 113-115, 176-199, 252-257, 284-301, 312-314, 323-325, 337-339, 381-383, 408-415
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 27-27: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 27-27: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 34-34: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 34-34: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 38-38: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 42-42: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 42-42: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 44-44: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/skills/worktree/SKILL.md around lines 27 - 44, The fenced code
blocks (e.g., the blocks showing "/worktree setup", the Mode 2 shorthand
examples "#12,`#17` "Delegation + Loop Prevention"", and the Mode 3 example
"/worktree setup --milestone M4 --issues `#26`,`#30`,`#133`,`#168`") need blank lines
before and after each triple-backtick block to satisfy Markdown best practices
(MD031) and improve readability; update all occurrences (notably the blocks
around lines with the setup input formats and the other listed ranges) by
inserting a blank line immediately above and below each ```...``` block so the
file renders cleanly.
…odeRabbit, and Greptile Critical fixes: - Add input validation rules for shell-interpolated values (command injection prevention) - Make cleanup branch deletion conditional on successful worktree removal - Reorder rebase steps: dirty-state check before user confirmation - Make settings.local.json copy conditional (was failing when missing) Major fixes: - Reorder setup pre-flight: uncommitted check before git checkout main - Add gh auth status pre-flight check - Complete spec:* label mapping (add memory, security, architecture, providers-scope) - Switch cleanup PR check to per-branch gh pr list --head query - Clarify rebase "0 commits ahead" as no-op (skip, don't rebase) - Clarify cd in prompts is for user terminal, not Bash tool - Add dynamic path derivation for platform-aware output Medium fixes: - Replace ambiguous "etc." with explicit branch prefix stripping rule - Use git rev-parse --verify for exact branch existence check - Use test -f instead of ls for file existence consistency - Fix quoting bug in basename call - Add sort_by before group_by in jq expression - Increase tree command --limit from 100 to 500 - Add Task to allowed-tools for parallel operations - Add maintenance note for spec label mapping Minor fixes: - Add rebase to frontmatter description - Specify branch type prefix rule for auto-generated names
| 3. **Then check for local commits beyond main:** | ||
|
|
||
| ```bash | ||
| git -C <path> rev-list --count main..<branch> | ||
| ``` | ||
|
|
||
| - If **0 commits ahead**: already up to date with main — skip (rebase is a no-op). | ||
| - If **has commits**: this worktree needs rebasing. Warn the user — "Worktree <name> has N local commits. Rebase may cause conflicts." Ask via AskUserQuestion: rebase anyway / skip / abort all. |
There was a problem hiding this comment.
rebase skips worktrees that are behind main but have no local commits
rev-list --count main..<branch> counts commits that are in <branch> but not in main. After git pull on main in Step 1 advances the main pointer, a newly-created worktree branch (0 local commits) will still report 0 from this command — even though the branch is now N commits behind main and genuinely needs updating.
The current logic labels this case "already up to date with main — skip (rebase is a no-op)", but that is incorrect: git rebase main on a branch that is behind but has no local commits is a meaningful fast-forward, not a no-op.
You need to check both directions:
ahead=$(git -C <path> rev-list --count main..<branch>)
behind=$(git -C <path> rev-list --count <branch>..main)behind == 0 && ahead == 0→ truly up to date, skip.behind > 0 && ahead == 0→ branch needs fast-forwarding to latest main; proceed without prompting (no conflict risk).ahead > 0→ has local commits; warn and prompt as today.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .claude/skills/worktree/SKILL.md
Line: 390-397
Comment:
**`rebase` skips worktrees that are behind main but have no local commits**
`rev-list --count main..<branch>` counts commits that are in `<branch>` but not in `main`. After `git pull` on main in Step 1 advances the main pointer, a newly-created worktree branch (0 local commits) will still report **0** from this command — even though the branch is now N commits *behind* main and genuinely needs updating.
The current logic labels this case "already up to date with main — skip (rebase is a no-op)", but that is incorrect: `git rebase main` on a branch that is behind but has no local commits *is* a meaningful fast-forward, not a no-op.
You need to check **both directions**:
```bash
ahead=$(git -C <path> rev-list --count main..<branch>)
behind=$(git -C <path> rev-list --count <branch>..main)
```
- `behind == 0 && ahead == 0` → truly up to date, skip.
- `behind > 0 && ahead == 0` → branch needs fast-forwarding to latest main; proceed without prompting (no conflict risk).
- `ahead > 0` → has local commits; warn and prompt as today.
How can I resolve this? If you propose a fix, please make it concise.| d. For each worktree definition, verify: | ||
| - Branch doesn't already exist: `git rev-parse --verify --quiet refs/heads/<branch-name>` | ||
| - Directory doesn't already exist: `test -d <dir-path>` | ||
| If either exists, warn and ask how to proceed (skip / reuse / abort). | ||
|
|
||
| 2. **Check `.claude/` local files exist:** | ||
|
|
||
| ```bash | ||
| test -f .claude/settings.local.json | ||
| ``` | ||
|
|
||
| If missing, warn: "No .claude/settings.local.json found — worktrees will prompt for tool permissions." Continue anyway. | ||
|
|
||
| 3. **For each worktree definition**, run in sequence: | ||
|
|
||
| a. Determine the directory path: `../<repo-name>-wt-<slug>` (e.g. `../ai-company-wt-delegation-loop-prevention`) | ||
|
|
||
| b. Create the worktree: | ||
|
|
||
| ```bash | ||
| git worktree add -b <branch-name> <dir-path> main | ||
| ``` |
There was a problem hiding this comment.
reuse path in setup will fail — -b flag creates a new branch and errors on existing ones
Step 1d tells the agent to ask "skip / reuse / abort" when a branch already exists, but Step 3b unconditionally uses:
git worktree add -b <branch-name> <dir-path> mainThe -b flag means "create a new branch named <branch-name>". If the branch already exists and the user chose "reuse", this command fails with:
fatal: A branch named '<branch-name>' already exists.
The "reuse" case needs a different command that attaches the worktree to the existing branch without re-creating it:
git worktree add <dir-path> <branch-name>Step 3b should branch on the outcome of Step 1d:
- Branch did not exist (or user chose
skippre-flight) → usegit worktree add -b <branch-name> <dir-path> main - User chose "reuse" → use
git worktree add <dir-path> <branch-name>
Prompt To Fix With AI
This is a comment left during a code review.
Path: .claude/skills/worktree/SKILL.md
Line: 86-107
Comment:
**`reuse` path in setup will fail — `-b` flag creates a new branch and errors on existing ones**
Step 1d tells the agent to ask "skip / reuse / abort" when a branch already exists, but Step 3b unconditionally uses:
```bash
git worktree add -b <branch-name> <dir-path> main
```
The `-b` flag means "create a **new** branch named `<branch-name>`". If the branch already exists and the user chose "reuse", this command fails with:
```
fatal: A branch named '<branch-name>' already exists.
```
The "reuse" case needs a different command that attaches the worktree to the **existing** branch without re-creating it:
```bash
git worktree add <dir-path> <branch-name>
```
Step 3b should branch on the outcome of Step 1d:
- Branch did not exist (or user chose `skip` pre-flight) → use `git worktree add -b <branch-name> <dir-path> main`
- User chose "reuse" → use `git worktree add <dir-path> <branch-name>`
How can I resolve this? If you propose a fix, please make it concise.| b. Check for uncommitted changes: | ||
|
|
||
| ```bash | ||
| git status --short | ||
| ``` | ||
|
|
||
| If dirty, warn and ask via AskUserQuestion whether to proceed or abort. | ||
|
|
||
| c. Ensure on main and up to date: | ||
|
|
||
| ```bash | ||
| git checkout main && git pull | ||
| ``` |
There was a problem hiding this comment.
git checkout main in Step 1c will fail when user proceeds with a dirty working tree
Step 1b asks the user whether to "proceed or abort" when the working tree is dirty. If the user chooses proceed, Step 1c immediately runs:
git checkout main && git pullgit checkout main refuses to switch branches when there are unstaged changes to tracked files that would be overwritten, producing:
error: Your local changes to the following files would be overwritten by checkout: ...
Please commit your changes or stash them before you switch branches.
The skill has no handling for this failure. Options to consider:
- Auto-stash before checkout and pop afterward:
git stash push -u && git checkout main && git pull && git stash pop - Or: if the user's choice is "proceed", note that the dirty files are on the pre-worktree branch and only allow proceeding when those changes are stashable/committable, then abort with instructions if
checkoutfails.
At minimum, the failure of git checkout main should be caught and the user should be told to stash or commit their changes before continuing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .claude/skills/worktree/SKILL.md
Line: 72-84
Comment:
**`git checkout main` in Step 1c will fail when user proceeds with a dirty working tree**
Step 1b asks the user whether to "proceed or abort" when the working tree is dirty. If the user chooses **proceed**, Step 1c immediately runs:
```bash
git checkout main && git pull
```
`git checkout main` refuses to switch branches when there are unstaged changes to tracked files that would be overwritten, producing:
```
error: Your local changes to the following files would be overwritten by checkout: ...
Please commit your changes or stash them before you switch branches.
```
The skill has no handling for this failure. Options to consider:
- Auto-stash before checkout and pop afterward: `git stash push -u && git checkout main && git pull && git stash pop`
- Or: if the user's choice is "proceed", note that the dirty files are on the pre-worktree branch and only allow proceeding when those changes are stashable/committable, then abort with instructions if `checkout` fails.
At minimum, the failure of `git checkout main` should be caught and the user should be told to stash or commit their changes before continuing.
How can I resolve this? If you propose a fix, please make it concise.| 3. **Compute tiers** using topological sort: | ||
| - Tier 0: issues with no open M-internal dependencies (all deps are closed or external) | ||
| - Tier 1: depends only on Tier 0 issues | ||
| - Tier N: depends on Tier N-1 issues | ||
| - Flag circular dependencies as errors |
There was a problem hiding this comment.
Circular dependency detection has no recovery guidance
Step 3 says "Flag circular dependencies as errors" but gives no instruction for what to do next. Should the tree command abort entirely? Display the partial tree with the cycle clearly marked? Skip the offending issues and continue rendering the rest?
Without a recovery path, an agent may halt with an unformatted error or silently drop the cyclic issues, leaving the user with an unexpected result. Consider adding, for example:
If a circular dependency is detected, render the partial tier tree for non-cyclic issues, then append a
⚠️ CYCLE DETECTEDsection listing the issue numbers involved in each cycle (e.g.,#12 → #17 → #12). Do not abort — continue with the rest of the milestone.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .claude/skills/worktree/SKILL.md
Line: 330-334
Comment:
**Circular dependency detection has no recovery guidance**
Step 3 says "Flag circular dependencies as errors" but gives no instruction for what to do next. Should the `tree` command abort entirely? Display the partial tree with the cycle clearly marked? Skip the offending issues and continue rendering the rest?
Without a recovery path, an agent may halt with an unformatted error or silently drop the cyclic issues, leaving the user with an unexpected result. Consider adding, for example:
> If a circular dependency is detected, render the partial tier tree for non-cyclic issues, then append a `⚠️ CYCLE DETECTED` section listing the issue numbers involved in each cycle (e.g., `#12 → #17 → #12`). Do not abort — continue with the rest of the milestone.
How can I resolve this? If you propose a fix, please make it concise.| 2. **For each non-main worktree**, show: | ||
| - Branch name | ||
| - How many commits ahead/behind main: | ||
| ```bash | ||
| git -C <path> rev-list --left-right --count main...<branch> | ||
| ``` | ||
| - Whether it has uncommitted changes: | ||
| ```bash | ||
| git -C <path> status --short | ||
| ``` | ||
|
|
||
| 3. **Check for corresponding PRs:** | ||
|
|
||
| ```bash | ||
| gh pr list --repo <owner/repo> --state open --json number,title,headRefName | ||
| ``` | ||
|
|
||
| Match each worktree branch to any open PR. | ||
|
|
||
| 4. **Present a summary table:** | ||
|
|
||
| ``` | ||
| Worktree | Branch | vs Main | PR | Status | ||
| wt-delegation | feat/delegation-loop-prev | +5 ahead | #142 | clean | ||
| wt-parallel | feat/parallel-execution | +3 ahead | — | 2 modified | ||
| ``` |
There was a problem hiding this comment.
status table only surfaces "ahead" — "behind" count is equally actionable
git -C <path> rev-list --left-right --count main...<branch> outputs two tab-separated numbers: <commits_behind>\t<commits_ahead>. The example table only uses the "ahead" count:
wt-delegation | feat/delegation-loop-prev | +5 ahead | #142 | clean
A worktree that is, say, +5 ahead, -8 behind is a rebase candidate; one that is 0 ahead, -15 behind needs attention even though it has no local work. Surfacing only the ahead count masks this.
Suggested table format:
| 2. **For each non-main worktree**, show: | |
| - Branch name | |
| - How many commits ahead/behind main: | |
| ```bash | |
| git -C <path> rev-list --left-right --count main...<branch> | |
| ``` | |
| - Whether it has uncommitted changes: | |
| ```bash | |
| git -C <path> status --short | |
| ``` | |
| 3. **Check for corresponding PRs:** | |
| ```bash | |
| gh pr list --repo <owner/repo> --state open --json number,title,headRefName | |
| ``` | |
| Match each worktree branch to any open PR. | |
| 4. **Present a summary table:** | |
| ``` | |
| Worktree | Branch | vs Main | PR | Status | |
| wt-delegation | feat/delegation-loop-prev | +5 ahead | #142 | clean | |
| wt-parallel | feat/parallel-execution | +3 ahead | — | 2 modified | |
| ``` |
Worktree | Branch | vs Main | PR | Status
wt-delegation | feat/delegation-loop-prev | +5 / -0 | #142 | clean
wt-parallel | feat/parallel-execution | +3 / -8 | — | 2 modified
(where +ahead / -behind makes both directions immediately scannable)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .claude/skills/worktree/SKILL.md
Line: 274-299
Comment:
**`status` table only surfaces "ahead" — "behind" count is equally actionable**
`git -C <path> rev-list --left-right --count main...<branch>` outputs **two** tab-separated numbers: `<commits_behind>\t<commits_ahead>`. The example table only uses the "ahead" count:
```
wt-delegation | feat/delegation-loop-prev | +5 ahead | #142 | clean
```
A worktree that is, say, `+5 ahead, -8 behind` is a rebase candidate; one that is `0 ahead, -15 behind` needs attention even though it has no local work. Surfacing only the ahead count masks this.
Suggested table format:
```suggestion
```
Worktree | Branch | vs Main | PR | Status
wt-delegation | feat/delegation-loop-prev | +5 / -0 | #142 | clean
wt-parallel | feat/parallel-execution | +3 / -8 | — | 2 modified
```
```
(where `+ahead / -behind` makes both directions immediately scannable)
How can I resolve this? If you propose a fix, please make it concise.PR #174 — git_worktree.py: - _validate_git_ref now accepts error_cls/event params so merge context raises WorkspaceMergeError and teardown raises WorkspaceCleanupError - _run_git catches asyncio.CancelledError to kill subprocess before re-raising, preventing orphaned git processes PR #172 — task assignment: - TaskAssignmentConfig.strategy validated against known strategy names - max_concurrent_tasks_per_agent now enforced in _score_and_filter_candidates via new AssignmentRequest.max_concurrent_tasks field - TaskAssignmentStrategy protocol docstring documents error signaling contract PR #171 — worktree skill: - rebase uses --left-right --count with triple-dot to detect behind-main - setup reuse path uses correct git worktree add (without -b) - setup handles dirty working tree with stash/abort prompt - status table shows both ahead and behind counts - tree command provides circular dependency recovery guidance PR #170 — meeting parsing: - Fix assigned? regex to assigned (prevents false-positive assignee extraction from "assign to X" in action item descriptions)
…176) ## Summary - Fix CI failures on main: 2 test assertion mismatches in cost-optimized assignment tests + mypy `attr-defined` error in strategy registry test - Address all Greptile post-merge review findings across PRs #170–#175 (14 fixes total) ### PR #175 — Test assertion fixes (CI blockers) - `"no cost data"` → `"insufficient cost data"` to match implementation wording - `unknown-dev` → `known-dev` winner assertion (all-or-nothing fallback, sort stability) - `getattr()` for `_scorer` access on protocol type (Windows/Linux mypy difference) ### PR #174 — Workspace isolation - `_validate_git_ref` raises context-appropriate exception types (`WorkspaceMergeError` in merge, `WorkspaceCleanupError` in teardown) - `_run_git` catches `asyncio.CancelledError` to kill subprocess before re-raising (prevents orphaned git processes) ### PR #172 — Task assignment - `TaskAssignmentConfig.strategy` validated against 6 known strategy names - `max_concurrent_tasks_per_agent` enforced via new `AssignmentRequest.max_concurrent_tasks` field in `_score_and_filter_candidates` - `TaskAssignmentStrategy` protocol docstring documents error signaling contract (raises vs `selected=None`) ### PR #171 — Worktree skill - `rebase` uses `--left-right --count` with triple-dot to detect behind-main worktrees - `setup` reuse path uses `git worktree add` without `-b` for existing branches - `setup` handles dirty working tree with stash/abort prompt - `status` table shows both ahead and behind counts - `tree` provides circular dependency recovery guidance ### PR #170 — Meeting parsing - `assigned?` → `assigned` regex fix (prevents false-positive assignee extraction from "assign to X") ## Test plan - [x] All 3988 tests pass (10 new tests added) - [x] mypy strict: 0 errors (463 source files) - [x] ruff lint + format: all clean - [x] Coverage: 96.53% (threshold: 80%) - [x] Pre-commit hooks pass ## Review coverage Quick mode — automated checks only (lint, type-check, tests, coverage). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
🤖 I have created a release *beep* *boop* --- ## [0.1.1](ai-company-v0.1.0...ai-company-v0.1.1) (2026-03-10) ### Features * add autonomy levels and approval timeout policies ([#42](#42), [#126](#126)) ([#197](#197)) ([eecc25a](eecc25a)) * add CFO cost optimization service with anomaly detection, reports, and approval decisions ([#186](#186)) ([a7fa00b](a7fa00b)) * add code quality toolchain (ruff, mypy, pre-commit, dependabot) ([#63](#63)) ([36681a8](36681a8)) * add configurable cost tiers and subscription/quota-aware tracking ([#67](#67)) ([#185](#185)) ([9baedfa](9baedfa)) * add container packaging, Docker Compose, and CI pipeline ([#269](#269)) ([435bdfe](435bdfe)), closes [#267](#267) * add coordination error taxonomy classification pipeline ([#146](#146)) ([#181](#181)) ([70c7480](70c7480)) * add cost-optimized, hierarchical, and auction assignment strategies ([#175](#175)) ([ce924fa](ce924fa)), closes [#173](#173) * add design specification, license, and project setup ([8669a09](8669a09)) * add env var substitution and config file auto-discovery ([#77](#77)) ([7f53832](7f53832)) * add FastestStrategy routing + vendor-agnostic cleanup ([#140](#140)) ([09619cb](09619cb)), closes [#139](#139) * add HR engine and performance tracking ([#45](#45), [#47](#47)) ([#193](#193)) ([2d091ea](2d091ea)) * add issue auto-search and resolution verification to PR review skill ([#119](#119)) ([deecc39](deecc39)) * add memory retrieval, ranking, and context injection pipeline ([#41](#41)) ([873b0aa](873b0aa)) * add pluggable MemoryBackend protocol with models, config, and events ([#180](#180)) ([46cfdd4](46cfdd4)) * add pluggable MemoryBackend protocol with models, config, and events ([#32](#32)) ([46cfdd4](46cfdd4)) * add pluggable PersistenceBackend protocol with SQLite implementation ([#36](#36)) ([f753779](f753779)) * add progressive trust and promotion/demotion subsystems ([#43](#43), [#49](#49)) ([3a87c08](3a87c08)) * add retry handler, rate limiter, and provider resilience ([#100](#100)) ([b890545](b890545)) * add SecOps security agent with rule engine, audit log, and ToolInvoker integration ([#40](#40)) ([83b7b6c](83b7b6c)) * add shared org memory and memory consolidation/archival ([#125](#125), [#48](#48)) ([4a0832b](4a0832b)) * design unified provider interface ([#86](#86)) ([3e23d64](3e23d64)) * expand template presets, rosters, and add inheritance ([#80](#80), [#81](#81), [#84](#84)) ([15a9134](15a9134)) * implement agent runtime state vs immutable config split ([#115](#115)) ([4cb1ca5](4cb1ca5)) * implement AgentEngine core orchestrator ([#11](#11)) ([#143](#143)) ([f2eb73a](f2eb73a)) * implement basic tool system (registry, invocation, results) ([#15](#15)) ([c51068b](c51068b)) * implement built-in file system tools ([#18](#18)) ([325ef98](325ef98)) * implement communication foundation — message bus, dispatcher, and messenger ([#157](#157)) ([8e71bfd](8e71bfd)) * implement company template system with 7 built-in presets ([#85](#85)) ([cbf1496](cbf1496)) * implement conflict resolution protocol ([#122](#122)) ([#166](#166)) ([e03f9f2](e03f9f2)) * implement core entity and role system models ([#69](#69)) ([acf9801](acf9801)) * implement crash recovery with fail-and-reassign strategy ([#149](#149)) ([e6e91ed](e6e91ed)) * implement engine extensions — Plan-and-Execute loop and call categorization ([#134](#134), [#135](#135)) ([#159](#159)) ([9b2699f](9b2699f)) * implement enterprise logging system with structlog ([#73](#73)) ([2f787e5](2f787e5)) * implement graceful shutdown with cooperative timeout strategy ([#130](#130)) ([6592515](6592515)) * implement hierarchical delegation and loop prevention ([#12](#12), [#17](#17)) ([6be60b6](6be60b6)) * implement LiteLLM driver and provider registry ([#88](#88)) ([ae3f18b](ae3f18b)), closes [#4](#4) * implement LLM decomposition strategy and workspace isolation ([#174](#174)) ([aa0eefe](aa0eefe)) * implement meeting protocol system ([#123](#123)) ([ee7caca](ee7caca)) * implement message and communication domain models ([#74](#74)) ([560a5d2](560a5d2)) * implement model routing engine ([#99](#99)) ([d3c250b](d3c250b)) * implement parallel agent execution ([#22](#22)) ([#161](#161)) ([65940b3](65940b3)) * implement per-call cost tracking service ([#7](#7)) ([#102](#102)) ([c4f1f1c](c4f1f1c)) * implement personality injection and system prompt construction ([#105](#105)) ([934dd85](934dd85)) * implement single-task execution lifecycle ([#21](#21)) ([#144](#144)) ([c7e64e4](c7e64e4)) * implement subprocess sandbox for tool execution isolation ([#131](#131)) ([#153](#153)) ([3c8394e](3c8394e)) * implement task assignment subsystem with pluggable strategies ([#172](#172)) ([c7f1b26](c7f1b26)), closes [#26](#26) [#30](#30) * implement task decomposition and routing engine ([#14](#14)) ([9c7fb52](9c7fb52)) * implement Task, Project, Artifact, Budget, and Cost domain models ([#71](#71)) ([81eabf1](81eabf1)) * implement tool permission checking ([#16](#16)) ([833c190](833c190)) * implement YAML config loader with Pydantic validation ([#59](#59)) ([ff3a2ba](ff3a2ba)) * implement YAML config loader with Pydantic validation ([#75](#75)) ([ff3a2ba](ff3a2ba)) * initialize project with uv, hatchling, and src layout ([39005f9](39005f9)) * initialize project with uv, hatchling, and src layout ([#62](#62)) ([39005f9](39005f9)) * Litestar REST API, WebSocket feed, and approval queue (M6) ([#189](#189)) ([29fcd08](29fcd08)) * make TokenUsage.total_tokens a computed field ([#118](#118)) ([c0bab18](c0bab18)), closes [#109](#109) * parallel tool execution in ToolInvoker.invoke_all ([#137](#137)) ([58517ee](58517ee)) * testing framework, CI pipeline, and M0 gap fixes ([#64](#64)) ([f581749](f581749)) * wire all modules into observability system ([#97](#97)) ([f7a0617](f7a0617)) ### Bug Fixes * address Greptile post-merge review findings from PRs [#170](https://github.com/Aureliolo/ai-company/issues/170)-[#175](https://github.com/Aureliolo/ai-company/issues/175) ([#176](#176)) ([c5ca929](c5ca929)) * address post-merge review feedback from PRs [#164](https://github.com/Aureliolo/ai-company/issues/164)-[#167](https://github.com/Aureliolo/ai-company/issues/167) ([#170](#170)) ([3bf897a](3bf897a)), closes [#169](#169) * enforce strict mypy on test files ([#89](#89)) ([aeeff8c](aeeff8c)) * harden Docker sandbox, MCP bridge, and code runner ([#50](#50), [#53](#53)) ([d5e1b6e](d5e1b6e)) * harden git tools security + code quality improvements ([#150](#150)) ([000a325](000a325)) * harden subprocess cleanup, env filtering, and shutdown resilience ([#155](#155)) ([d1fe1fb](d1fe1fb)) * incorporate post-merge feedback + pre-PR review fixes ([#164](#164)) ([c02832a](c02832a)) * pre-PR review fixes for post-merge findings ([#183](#183)) ([26b3108](26b3108)) * strengthen immutability for BaseTool schema and ToolInvoker boundaries ([#117](#117)) ([7e5e861](7e5e861)) ### Performance * harden non-inferable principle implementation ([#195](#195)) ([02b5f4e](02b5f4e)), closes [#188](#188) ### Refactoring * adopt NotBlankStr across all models ([#108](#108)) ([#120](#120)) ([ef89b90](ef89b90)) * extract _SpendingTotals base class from spending summary models ([#111](#111)) ([2f39c1b](2f39c1b)) * harden BudgetEnforcer with error handling, validation extraction, and review fixes ([#182](#182)) ([c107bf9](c107bf9)) * harden personality profiles, department validation, and template rendering ([#158](#158)) ([10b2299](10b2299)) * pre-PR review improvements for ExecutionLoop + ReAct loop ([#124](#124)) ([8dfb3c0](8dfb3c0)) * split events.py into per-domain event modules ([#136](#136)) ([e9cba89](e9cba89)) ### Documentation * add ADR-001 memory layer evaluation and selection ([#178](#178)) ([db3026f](db3026f)), closes [#39](#39) * add agent scaling research findings to DESIGN_SPEC ([#145](#145)) ([57e487b](57e487b)) * add CLAUDE.md, contributing guide, and dev documentation ([#65](#65)) ([55c1025](55c1025)), closes [#54](#54) * add crash recovery, sandboxing, analytics, and testing decisions ([#127](#127)) ([5c11595](5c11595)) * address external review feedback with MVP scope and new protocols ([#128](#128)) ([3b30b9a](3b30b9a)) * expand design spec with pluggable strategy protocols ([#121](#121)) ([6832db6](6832db6)) * finalize 23 design decisions (ADR-002) ([#190](#190)) ([8c39742](8c39742)) * update project docs for M2.5 conventions and add docs-consistency review agent ([#114](#114)) ([99766ee](99766ee)) ### Tests * add e2e single agent integration tests ([#24](#24)) ([#156](#156)) ([f566fb4](f566fb4)) * add provider adapter integration tests ([#90](#90)) ([40a61f4](40a61f4)) ### CI/CD * add Release Please for automated versioning and GitHub Releases ([#278](#278)) ([a488758](a488758)) * bump actions/checkout from 4 to 6 ([#95](#95)) ([1897247](1897247)) * bump actions/upload-artifact from 4 to 7 ([#94](#94)) ([27b1517](27b1517)) * harden CI/CD pipeline ([#92](#92)) ([ce4693c](ce4693c)) * split vulnerability scans into critical-fail and high-warn tiers ([#277](#277)) ([aba48af](aba48af)) ### Maintenance * add /worktree skill for parallel worktree management ([#171](#171)) ([951e337](951e337)) * add design spec context loading to research-link skill ([8ef9685](8ef9685)) * add post-merge-cleanup skill ([#70](#70)) ([f913705](f913705)) * add pre-pr-review skill and update CLAUDE.md ([#103](#103)) ([92e9023](92e9023)) * add research-link skill and rename skill files to SKILL.md ([#101](#101)) ([651c577](651c577)) * bump aiosqlite from 0.21.0 to 0.22.1 ([#191](#191)) ([3274a86](3274a86)) * bump pyyaml from 6.0.2 to 6.0.3 in the minor-and-patch group ([#96](#96)) ([0338d0c](0338d0c)) * bump ruff from 0.15.4 to 0.15.5 ([a49ee46](a49ee46)) * fix M0 audit items ([#66](#66)) ([c7724b5](c7724b5)) * pin setup-uv action to full SHA ([#281](#281)) ([4448002](4448002)) * post-audit cleanup — PEP 758, loggers, bug fixes, refactoring, tests, hookify rules ([#148](#148)) ([c57a6a9](c57a6a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.1.0](v0.0.0...v0.1.0) (2026-03-11) ### Features * add autonomy levels and approval timeout policies ([#42](#42), [#126](#126)) ([#197](#197)) ([eecc25a](eecc25a)) * add CFO cost optimization service with anomaly detection, reports, and approval decisions ([#186](#186)) ([a7fa00b](a7fa00b)) * add code quality toolchain (ruff, mypy, pre-commit, dependabot) ([#63](#63)) ([36681a8](36681a8)) * add configurable cost tiers and subscription/quota-aware tracking ([#67](#67)) ([#185](#185)) ([9baedfa](9baedfa)) * add container packaging, Docker Compose, and CI pipeline ([#269](#269)) ([435bdfe](435bdfe)), closes [#267](#267) * add coordination error taxonomy classification pipeline ([#146](#146)) ([#181](#181)) ([70c7480](70c7480)) * add cost-optimized, hierarchical, and auction assignment strategies ([#175](#175)) ([ce924fa](ce924fa)), closes [#173](#173) * add design specification, license, and project setup ([8669a09](8669a09)) * add env var substitution and config file auto-discovery ([#77](#77)) ([7f53832](7f53832)) * add FastestStrategy routing + vendor-agnostic cleanup ([#140](#140)) ([09619cb](09619cb)), closes [#139](#139) * add HR engine and performance tracking ([#45](#45), [#47](#47)) ([#193](#193)) ([2d091ea](2d091ea)) * add issue auto-search and resolution verification to PR review skill ([#119](#119)) ([deecc39](deecc39)) * add mandatory JWT + API key authentication ([#256](#256)) ([c279cfe](c279cfe)) * add memory retrieval, ranking, and context injection pipeline ([#41](#41)) ([873b0aa](873b0aa)) * add pluggable MemoryBackend protocol with models, config, and events ([#180](#180)) ([46cfdd4](46cfdd4)) * add pluggable MemoryBackend protocol with models, config, and events ([#32](#32)) ([46cfdd4](46cfdd4)) * add pluggable output scan response policies ([#263](#263)) ([b9907e8](b9907e8)) * add pluggable PersistenceBackend protocol with SQLite implementation ([#36](#36)) ([f753779](f753779)) * add progressive trust and promotion/demotion subsystems ([#43](#43), [#49](#49)) ([3a87c08](3a87c08)) * add retry handler, rate limiter, and provider resilience ([#100](#100)) ([b890545](b890545)) * add SecOps security agent with rule engine, audit log, and ToolInvoker integration ([#40](#40)) ([83b7b6c](83b7b6c)) * add shared org memory and memory consolidation/archival ([#125](#125), [#48](#48)) ([4a0832b](4a0832b)) * design unified provider interface ([#86](#86)) ([3e23d64](3e23d64)) * expand template presets, rosters, and add inheritance ([#80](#80), [#81](#81), [#84](#84)) ([15a9134](15a9134)) * implement agent runtime state vs immutable config split ([#115](#115)) ([4cb1ca5](4cb1ca5)) * implement AgentEngine core orchestrator ([#11](#11)) ([#143](#143)) ([f2eb73a](f2eb73a)) * implement AuditRepository for security audit log persistence ([#279](#279)) ([94bc29f](94bc29f)) * implement basic tool system (registry, invocation, results) ([#15](#15)) ([c51068b](c51068b)) * implement built-in file system tools ([#18](#18)) ([325ef98](325ef98)) * implement communication foundation — message bus, dispatcher, and messenger ([#157](#157)) ([8e71bfd](8e71bfd)) * implement company template system with 7 built-in presets ([#85](#85)) ([cbf1496](cbf1496)) * implement conflict resolution protocol ([#122](#122)) ([#166](#166)) ([e03f9f2](e03f9f2)) * implement core entity and role system models ([#69](#69)) ([acf9801](acf9801)) * implement crash recovery with fail-and-reassign strategy ([#149](#149)) ([e6e91ed](e6e91ed)) * implement engine extensions — Plan-and-Execute loop and call categorization ([#134](#134), [#135](#135)) ([#159](#159)) ([9b2699f](9b2699f)) * implement enterprise logging system with structlog ([#73](#73)) ([2f787e5](2f787e5)) * implement graceful shutdown with cooperative timeout strategy ([#130](#130)) ([6592515](6592515)) * implement hierarchical delegation and loop prevention ([#12](#12), [#17](#17)) ([6be60b6](6be60b6)) * implement LiteLLM driver and provider registry ([#88](#88)) ([ae3f18b](ae3f18b)), closes [#4](#4) * implement LLM decomposition strategy and workspace isolation ([#174](#174)) ([aa0eefe](aa0eefe)) * implement meeting protocol system ([#123](#123)) ([ee7caca](ee7caca)) * implement message and communication domain models ([#74](#74)) ([560a5d2](560a5d2)) * implement model routing engine ([#99](#99)) ([d3c250b](d3c250b)) * implement parallel agent execution ([#22](#22)) ([#161](#161)) ([65940b3](65940b3)) * implement per-call cost tracking service ([#7](#7)) ([#102](#102)) ([c4f1f1c](c4f1f1c)) * implement personality injection and system prompt construction ([#105](#105)) ([934dd85](934dd85)) * implement single-task execution lifecycle ([#21](#21)) ([#144](#144)) ([c7e64e4](c7e64e4)) * implement subprocess sandbox for tool execution isolation ([#131](#131)) ([#153](#153)) ([3c8394e](3c8394e)) * implement task assignment subsystem with pluggable strategies ([#172](#172)) ([c7f1b26](c7f1b26)), closes [#26](#26) [#30](#30) * implement task decomposition and routing engine ([#14](#14)) ([9c7fb52](9c7fb52)) * implement Task, Project, Artifact, Budget, and Cost domain models ([#71](#71)) ([81eabf1](81eabf1)) * implement tool permission checking ([#16](#16)) ([833c190](833c190)) * implement YAML config loader with Pydantic validation ([#59](#59)) ([ff3a2ba](ff3a2ba)) * implement YAML config loader with Pydantic validation ([#75](#75)) ([ff3a2ba](ff3a2ba)) * initialize project with uv, hatchling, and src layout ([39005f9](39005f9)) * initialize project with uv, hatchling, and src layout ([#62](#62)) ([39005f9](39005f9)) * Litestar REST API, WebSocket feed, and approval queue (M6) ([#189](#189)) ([29fcd08](29fcd08)) * make TokenUsage.total_tokens a computed field ([#118](#118)) ([c0bab18](c0bab18)), closes [#109](#109) * parallel tool execution in ToolInvoker.invoke_all ([#137](#137)) ([58517ee](58517ee)) * testing framework, CI pipeline, and M0 gap fixes ([#64](#64)) ([f581749](f581749)) * wire all modules into observability system ([#97](#97)) ([f7a0617](f7a0617)) ### Bug Fixes * address Greptile post-merge review findings from PRs [#170](https://github.com/Aureliolo/ai-company/issues/170)-[#175](https://github.com/Aureliolo/ai-company/issues/175) ([#176](#176)) ([c5ca929](c5ca929)) * address post-merge review feedback from PRs [#164](https://github.com/Aureliolo/ai-company/issues/164)-[#167](https://github.com/Aureliolo/ai-company/issues/167) ([#170](#170)) ([3bf897a](3bf897a)), closes [#169](#169) * enforce strict mypy on test files ([#89](#89)) ([aeeff8c](aeeff8c)) * harden Docker sandbox, MCP bridge, and code runner ([#50](#50), [#53](#53)) ([d5e1b6e](d5e1b6e)) * harden git tools security + code quality improvements ([#150](#150)) ([000a325](000a325)) * harden subprocess cleanup, env filtering, and shutdown resilience ([#155](#155)) ([d1fe1fb](d1fe1fb)) * incorporate post-merge feedback + pre-PR review fixes ([#164](#164)) ([c02832a](c02832a)) * pre-PR review fixes for post-merge findings ([#183](#183)) ([26b3108](26b3108)) * resolve circular imports, bump litellm, fix release tag format ([#286](#286)) ([a6659b5](a6659b5)) * strengthen immutability for BaseTool schema and ToolInvoker boundaries ([#117](#117)) ([7e5e861](7e5e861)) ### Performance * harden non-inferable principle implementation ([#195](#195)) ([02b5f4e](02b5f4e)), closes [#188](#188) ### Refactoring * adopt NotBlankStr across all models ([#108](#108)) ([#120](#120)) ([ef89b90](ef89b90)) * extract _SpendingTotals base class from spending summary models ([#111](#111)) ([2f39c1b](2f39c1b)) * harden BudgetEnforcer with error handling, validation extraction, and review fixes ([#182](#182)) ([c107bf9](c107bf9)) * harden personality profiles, department validation, and template rendering ([#158](#158)) ([10b2299](10b2299)) * pre-PR review improvements for ExecutionLoop + ReAct loop ([#124](#124)) ([8dfb3c0](8dfb3c0)) * split events.py into per-domain event modules ([#136](#136)) ([e9cba89](e9cba89)) ### Documentation * add ADR-001 memory layer evaluation and selection ([#178](#178)) ([db3026f](db3026f)), closes [#39](#39) * add agent scaling research findings to DESIGN_SPEC ([#145](#145)) ([57e487b](57e487b)) * add CLAUDE.md, contributing guide, and dev documentation ([#65](#65)) ([55c1025](55c1025)), closes [#54](#54) * add crash recovery, sandboxing, analytics, and testing decisions ([#127](#127)) ([5c11595](5c11595)) * address external review feedback with MVP scope and new protocols ([#128](#128)) ([3b30b9a](3b30b9a)) * expand design spec with pluggable strategy protocols ([#121](#121)) ([6832db6](6832db6)) * finalize 23 design decisions (ADR-002) ([#190](#190)) ([8c39742](8c39742)) * update project docs for M2.5 conventions and add docs-consistency review agent ([#114](#114)) ([99766ee](99766ee)) ### Tests * add e2e single agent integration tests ([#24](#24)) ([#156](#156)) ([f566fb4](f566fb4)) * add provider adapter integration tests ([#90](#90)) ([40a61f4](40a61f4)) ### CI/CD * add Release Please for automated versioning and GitHub Releases ([#278](#278)) ([a488758](a488758)) * bump actions/checkout from 4 to 6 ([#95](#95)) ([1897247](1897247)) * bump actions/upload-artifact from 4 to 7 ([#94](#94)) ([27b1517](27b1517)) * bump anchore/scan-action from 6.5.1 to 7.3.2 ([#271](#271)) ([80a1c15](80a1c15)) * bump docker/build-push-action from 6.19.2 to 7.0.0 ([#273](#273)) ([dd0219e](dd0219e)) * bump docker/login-action from 3.7.0 to 4.0.0 ([#272](#272)) ([33d6238](33d6238)) * bump docker/metadata-action from 5.10.0 to 6.0.0 ([#270](#270)) ([baee04e](baee04e)) * bump docker/setup-buildx-action from 3.12.0 to 4.0.0 ([#274](#274)) ([5fc06f7](5fc06f7)) * bump sigstore/cosign-installer from 3.9.1 to 4.1.0 ([#275](#275)) ([29dd16c](29dd16c)) * harden CI/CD pipeline ([#92](#92)) ([ce4693c](ce4693c)) * split vulnerability scans into critical-fail and high-warn tiers ([#277](#277)) ([aba48af](aba48af)) ### Maintenance * add /worktree skill for parallel worktree management ([#171](#171)) ([951e337](951e337)) * add design spec context loading to research-link skill ([8ef9685](8ef9685)) * add post-merge-cleanup skill ([#70](#70)) ([f913705](f913705)) * add pre-pr-review skill and update CLAUDE.md ([#103](#103)) ([92e9023](92e9023)) * add research-link skill and rename skill files to SKILL.md ([#101](#101)) ([651c577](651c577)) * bump aiosqlite from 0.21.0 to 0.22.1 ([#191](#191)) ([3274a86](3274a86)) * bump pyyaml from 6.0.2 to 6.0.3 in the minor-and-patch group ([#96](#96)) ([0338d0c](0338d0c)) * bump ruff from 0.15.4 to 0.15.5 ([a49ee46](a49ee46)) * fix M0 audit items ([#66](#66)) ([c7724b5](c7724b5)) * **main:** release ai-company 0.1.1 ([#282](#282)) ([2f4703d](2f4703d)) * pin setup-uv action to full SHA ([#281](#281)) ([4448002](4448002)) * post-audit cleanup — PEP 758, loggers, bug fixes, refactoring, tests, hookify rules ([#148](#148)) ([c57a6a9](c57a6a9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: Aurelio <19254254+Aureliolo@users.noreply.github.com>
Summary
/worktreeClaude Code skill that automates the multi-worktree parallel development workflowsetup,cleanup,status,tree,rebaseCommands
/worktree setup/worktree cleanup/worktree status/worktree tree --milestone M4/worktree rebaseFeatures
spec:*labels to source directories, reads§references for DESIGN_SPEC sectionsContext
Extracted from a real workflow where we managed 10 PRs across 4 phases for M4 (18 issues). Every step in this skill was done manually at least once during that session.
Test plan
/worktree setupwith explicit definitions creates worktrees + copies settings + generates prompts/worktree setupshorthand auto-derives branch names and dir suffixes/worktree cleanupchecks PR merge status, removes worktrees, deletes branches, shows milestone progress/worktree statusshows table with ahead/behind counts and PR links/worktree tree --milestone M4renders tier-based dependency tree/worktree rebasesafely rebases only clean worktrees