ai-worktree-rule
v0.1.0
Published
Install a cross-tool AI rule for Git worktree based iteration workflows.
Maintainers
Readme
AI Worktree Rule
Install once locally, then use the same Git worktree workflow across AI tools and projects.
Install
With npm:
npx ai-worktree-rule --dry-run
npx ai-worktree-ruleFrom this repository:
Preview changes:
./install.sh --dry-runInstall:
./install.shThe installer writes:
~/.ai-rules/worktree-iteration.md
~/.codex/AGENTS.md
~/.claude/CLAUDE.md
~/.cursor/rules/worktree-iteration.mdcIt updates tool adapter files using a marked block, so running the installer again replaces only this rule block.
Publish
Check the package:
npm run check
npm pack --dry-runPublish publicly:
npm login
npm publish --access publicIf the package name is taken, rename name in package.json to a scoped name such as:
@your-scope/ai-worktree-ruleThen publish:
npm publish --access publicUsage
Use an existing branch:
worktree BRMMP-924
开迭代 BRMMP-924Create a new branch and worktree:
worktree new BRMMP-925 from origin/dev-seven-stage
新建迭代 BRMMP-925 from origin/dev-seven-stageBase Ref Semantics
This workflow follows normal Git naming:
origin/dev-seven-stage # remote-tracking branch
dev-seven-stage # local branchThe AI should not infer origin/<branch> from <branch>.
Notes
Some AI tools may not automatically load the generated adapter files in every setup. If a tool does not pick up the rule, paste the generated adapter block into that tool's user-level rules/settings.
