compound-engineering-pi 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +124 -0
- package/bin/compound-engineering-pi +12 -0
- package/bin/compound-plugin +12 -0
- package/compound-engineering-pi +12 -0
- package/compound-plugin +5 -0
- package/docs/pi.md +152 -0
- package/extensions/compound-engineering-compat.ts +452 -0
- package/package.json +84 -0
- package/pi-resources/compound-engineering/mcporter.json +7 -0
- package/plugins/coding-tutor/.claude-plugin/plugin.json +9 -0
- package/plugins/coding-tutor/README.md +37 -0
- package/plugins/coding-tutor/commands/quiz-me.md +1 -0
- package/plugins/coding-tutor/commands/sync-tutorials.md +25 -0
- package/plugins/coding-tutor/commands/teach-me.md +1 -0
- package/plugins/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +207 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +193 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +118 -0
- package/plugins/compound-engineering/.claude-plugin/plugin.json +33 -0
- package/plugins/compound-engineering/CHANGELOG.md +457 -0
- package/plugins/compound-engineering/CLAUDE.md +89 -0
- package/plugins/compound-engineering/LICENSE +21 -0
- package/plugins/compound-engineering/README.md +232 -0
- package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +109 -0
- package/plugins/compound-engineering/agents/design/design-iterator.md +224 -0
- package/plugins/compound-engineering/agents/design/figma-design-sync.md +190 -0
- package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +65 -0
- package/plugins/compound-engineering/agents/research/best-practices-researcher.md +126 -0
- package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +106 -0
- package/plugins/compound-engineering/agents/research/git-history-analyzer.md +59 -0
- package/plugins/compound-engineering/agents/research/learnings-researcher.md +264 -0
- package/plugins/compound-engineering/agents/research/repo-research-analyst.md +135 -0
- package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +261 -0
- package/plugins/compound-engineering/agents/review/architecture-strategist.md +67 -0
- package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +101 -0
- package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +85 -0
- package/plugins/compound-engineering/agents/review/data-migration-expert.md +112 -0
- package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +174 -0
- package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +66 -0
- package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +221 -0
- package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +133 -0
- package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +115 -0
- package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +124 -0
- package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +72 -0
- package/plugins/compound-engineering/agents/review/performance-oracle.md +137 -0
- package/plugins/compound-engineering/agents/review/schema-drift-detector.md +154 -0
- package/plugins/compound-engineering/agents/review/security-sentinel.md +114 -0
- package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +82 -0
- package/plugins/compound-engineering/agents/workflow/every-style-editor.md +64 -0
- package/plugins/compound-engineering/agents/workflow/lint.md +16 -0
- package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +84 -0
- package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +134 -0
- package/plugins/compound-engineering/commands/agent-native-audit.md +278 -0
- package/plugins/compound-engineering/commands/changelog.md +138 -0
- package/plugins/compound-engineering/commands/create-agent-skill.md +9 -0
- package/plugins/compound-engineering/commands/deepen-plan.md +546 -0
- package/plugins/compound-engineering/commands/deploy-docs.md +113 -0
- package/plugins/compound-engineering/commands/feature-video.md +342 -0
- package/plugins/compound-engineering/commands/generate_command.md +163 -0
- package/plugins/compound-engineering/commands/heal-skill.md +143 -0
- package/plugins/compound-engineering/commands/lfg.md +20 -0
- package/plugins/compound-engineering/commands/release-docs.md +212 -0
- package/plugins/compound-engineering/commands/report-bug.md +151 -0
- package/plugins/compound-engineering/commands/reproduce-bug.md +100 -0
- package/plugins/compound-engineering/commands/resolve_parallel.md +35 -0
- package/plugins/compound-engineering/commands/resolve_todo_parallel.md +37 -0
- package/plugins/compound-engineering/commands/slfg.md +32 -0
- package/plugins/compound-engineering/commands/technical_review.md +8 -0
- package/plugins/compound-engineering/commands/test-browser.md +339 -0
- package/plugins/compound-engineering/commands/test-xcode.md +332 -0
- package/plugins/compound-engineering/commands/triage.md +311 -0
- package/plugins/compound-engineering/commands/workflows/brainstorm.md +124 -0
- package/plugins/compound-engineering/commands/workflows/compound.md +239 -0
- package/plugins/compound-engineering/commands/workflows/plan.md +551 -0
- package/plugins/compound-engineering/commands/workflows/review.md +526 -0
- package/plugins/compound-engineering/commands/workflows/work.md +433 -0
- package/plugins/compound-engineering/skills/agent-browser/SKILL.md +223 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/SKILL.md +435 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/SKILL.md +184 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
- package/plugins/compound-engineering/skills/compound-docs/SKILL.md +511 -0
- package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +93 -0
- package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +65 -0
- package/plugins/compound-engineering/skills/compound-docs/schema.yaml +176 -0
- package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +275 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/api-security.md +226 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/best-practices.md +404 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/core-principles.md +437 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/executable-code.md +175 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +134 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +152 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/using-templates.md +112 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/plugins/compound-engineering/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/plugins/compound-engineering/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/SKILL.md +185 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/architecture.md +653 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/controllers.md +303 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/frontend.md +510 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/gems.md +266 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/models.md +359 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/testing.md +338 -0
- package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
- package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +737 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +187 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +300 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +221 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +674 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/observability.md +366 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +603 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +418 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/toolsets.md +502 -0
- package/plugins/compound-engineering/skills/every-style-editor/SKILL.md +134 -0
- package/plugins/compound-engineering/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/plugins/compound-engineering/skills/file-todos/SKILL.md +252 -0
- package/plugins/compound-engineering/skills/file-todos/assets/todo-template.md +155 -0
- package/plugins/compound-engineering/skills/frontend-design/SKILL.md +42 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/SKILL.md +237 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/requirements.txt +2 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/compose_images.py +157 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/edit_image.py +144 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/generate_image.py +133 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/plugins/compound-engineering/skills/git-worktree/SKILL.md +302 -0
- package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +337 -0
- package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1718 -0
- package/plugins/compound-engineering/skills/rclone/SKILL.md +150 -0
- package/plugins/compound-engineering/skills/rclone/scripts/check_setup.sh +60 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
- package/plugins/compound-engineering/skills/skill-creator/SKILL.md +210 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/init_skill.py +303 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/package_skill.py +110 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/prompts/deepen-plan.md +549 -0
- package/prompts/feature-video.md +341 -0
- package/prompts/resolve_todo_parallel.md +36 -0
- package/prompts/test-browser.md +342 -0
- package/prompts/workflows-brainstorm.md +123 -0
- package/prompts/workflows-compound.md +238 -0
- package/prompts/workflows-plan.md +550 -0
- package/prompts/workflows-review.md +529 -0
- package/prompts/workflows-work.md +432 -0
- package/skills/agent-browser/SKILL.md +223 -0
- package/skills/agent-native-architecture/SKILL.md +435 -0
- package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/skills/agent-native-reviewer/SKILL.md +260 -0
- package/skills/andrew-kane-gem-writer/SKILL.md +184 -0
- package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/skills/ankane-readme-writer/SKILL.md +63 -0
- package/skills/architecture-strategist/SKILL.md +66 -0
- package/skills/best-practices-researcher/SKILL.md +125 -0
- package/skills/brainstorming/SKILL.md +190 -0
- package/skills/bug-reproduction-validator/SKILL.md +81 -0
- package/skills/code-simplicity-reviewer/SKILL.md +100 -0
- package/skills/compound-docs/SKILL.md +511 -0
- package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/skills/compound-docs/assets/resolution-template.md +93 -0
- package/skills/compound-docs/references/yaml-schema.md +65 -0
- package/skills/compound-docs/schema.yaml +176 -0
- package/skills/create-agent-skills/SKILL.md +275 -0
- package/skills/create-agent-skills/references/api-security.md +226 -0
- package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/skills/create-agent-skills/references/best-practices.md +404 -0
- package/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/skills/create-agent-skills/references/core-principles.md +437 -0
- package/skills/create-agent-skills/references/executable-code.md +175 -0
- package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/skills/create-agent-skills/references/official-spec.md +134 -0
- package/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/skills/create-agent-skills/references/skill-structure.md +152 -0
- package/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/skills/create-agent-skills/references/using-templates.md +112 -0
- package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/skills/data-integrity-guardian/SKILL.md +84 -0
- package/skills/data-migration-expert/SKILL.md +111 -0
- package/skills/deployment-verification-agent/SKILL.md +173 -0
- package/skills/design-implementation-reviewer/SKILL.md +107 -0
- package/skills/design-iterator/SKILL.md +222 -0
- package/skills/dhh-rails-reviewer/SKILL.md +65 -0
- package/skills/dhh-rails-style/SKILL.md +185 -0
- package/skills/dhh-rails-style/references/architecture.md +653 -0
- package/skills/dhh-rails-style/references/controllers.md +303 -0
- package/skills/dhh-rails-style/references/frontend.md +510 -0
- package/skills/dhh-rails-style/references/gems.md +266 -0
- package/skills/dhh-rails-style/references/models.md +359 -0
- package/skills/dhh-rails-style/references/testing.md +338 -0
- package/skills/document-review/SKILL.md +87 -0
- package/skills/dspy-ruby/SKILL.md +737 -0
- package/skills/dspy-ruby/assets/config-template.rb +187 -0
- package/skills/dspy-ruby/assets/module-template.rb +300 -0
- package/skills/dspy-ruby/assets/signature-template.rb +221 -0
- package/skills/dspy-ruby/references/core-concepts.md +674 -0
- package/skills/dspy-ruby/references/observability.md +366 -0
- package/skills/dspy-ruby/references/optimization.md +603 -0
- package/skills/dspy-ruby/references/providers.md +418 -0
- package/skills/dspy-ruby/references/toolsets.md +502 -0
- package/skills/every-style-editor/SKILL.md +134 -0
- package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/skills/every-style-editor-2/SKILL.md +62 -0
- package/skills/figma-design-sync/SKILL.md +188 -0
- package/skills/file-todos/SKILL.md +252 -0
- package/skills/file-todos/assets/todo-template.md +155 -0
- package/skills/framework-docs-researcher/SKILL.md +105 -0
- package/skills/frontend-design/SKILL.md +42 -0
- package/skills/gemini-imagegen/SKILL.md +237 -0
- package/skills/gemini-imagegen/requirements.txt +2 -0
- package/skills/gemini-imagegen/scripts/compose_images.py +157 -0
- package/skills/gemini-imagegen/scripts/edit_image.py +144 -0
- package/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/skills/gemini-imagegen/scripts/generate_image.py +133 -0
- package/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/skills/git-history-analyzer/SKILL.md +58 -0
- package/skills/git-worktree/SKILL.md +302 -0
- package/skills/git-worktree/scripts/worktree-manager.sh +337 -0
- package/skills/julik-frontend-races-reviewer/SKILL.md +220 -0
- package/skills/kieran-python-reviewer/SKILL.md +132 -0
- package/skills/kieran-rails-reviewer/SKILL.md +114 -0
- package/skills/kieran-typescript-reviewer/SKILL.md +123 -0
- package/skills/learnings-researcher/SKILL.md +263 -0
- package/skills/lint/SKILL.md +14 -0
- package/skills/orchestrating-swarms/SKILL.md +1718 -0
- package/skills/pattern-recognition-specialist/SKILL.md +71 -0
- package/skills/performance-oracle/SKILL.md +136 -0
- package/skills/pr-comment-resolver/SKILL.md +82 -0
- package/skills/rclone/SKILL.md +150 -0
- package/skills/rclone/scripts/check_setup.sh +60 -0
- package/skills/repo-research-analyst/SKILL.md +134 -0
- package/skills/resolve_pr_parallel/SKILL.md +89 -0
- package/skills/resolve_pr_parallel/scripts/get-pr-comments +68 -0
- package/skills/resolve_pr_parallel/scripts/resolve-pr-thread +23 -0
- package/skills/schema-drift-detector/SKILL.md +153 -0
- package/skills/security-sentinel/SKILL.md +113 -0
- package/skills/skill-creator/SKILL.md +210 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/skills/spec-flow-analyzer/SKILL.md +133 -0
- package/src/commands/convert.ts +183 -0
- package/src/commands/install.ts +273 -0
- package/src/commands/list.ts +37 -0
- package/src/commands/sync.ts +89 -0
- package/src/converters/claude-to-codex.ts +182 -0
- package/src/converters/claude-to-opencode.ts +395 -0
- package/src/converters/claude-to-pi.ts +205 -0
- package/src/index.ts +22 -0
- package/src/parsers/claude-home.ts +65 -0
- package/src/parsers/claude.ts +252 -0
- package/src/sync/codex.ts +92 -0
- package/src/sync/opencode.ts +75 -0
- package/src/sync/pi.ts +88 -0
- package/src/targets/codex.ts +96 -0
- package/src/targets/index.ts +38 -0
- package/src/targets/opencode.ts +57 -0
- package/src/targets/pi.ts +131 -0
- package/src/templates/pi/compat-extension.ts +452 -0
- package/src/types/claude.ts +90 -0
- package/src/types/codex.ts +23 -0
- package/src/types/opencode.ts +54 -0
- package/src/types/pi.ts +40 -0
- package/src/utils/codex-agents.ts +64 -0
- package/src/utils/files.ts +77 -0
- package/src/utils/frontmatter.ts +65 -0
- package/src/utils/symlink.ts +43 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Git Worktree Manager
|
|
4
|
+
# Handles creating, listing, switching, and cleaning up Git worktrees
|
|
5
|
+
# KISS principle: Simple, interactive, opinionated
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
# Colors for output
|
|
10
|
+
RED='\033[0;31m'
|
|
11
|
+
GREEN='\033[0;32m'
|
|
12
|
+
YELLOW='\033[1;33m'
|
|
13
|
+
BLUE='\033[0;34m'
|
|
14
|
+
NC='\033[0m' # No Color
|
|
15
|
+
|
|
16
|
+
# Get repo root
|
|
17
|
+
GIT_ROOT=$(git rev-parse --show-toplevel)
|
|
18
|
+
WORKTREE_DIR="$GIT_ROOT/.worktrees"
|
|
19
|
+
|
|
20
|
+
# Ensure .worktrees is in .gitignore
|
|
21
|
+
ensure_gitignore() {
|
|
22
|
+
if ! grep -q "^\.worktrees$" "$GIT_ROOT/.gitignore" 2>/dev/null; then
|
|
23
|
+
echo ".worktrees" >> "$GIT_ROOT/.gitignore"
|
|
24
|
+
fi
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
# Copy .env files from main repo to worktree
|
|
28
|
+
copy_env_files() {
|
|
29
|
+
local worktree_path="$1"
|
|
30
|
+
|
|
31
|
+
echo -e "${BLUE}Copying environment files...${NC}"
|
|
32
|
+
|
|
33
|
+
# Find all .env* files in root (excluding .env.example which should be in git)
|
|
34
|
+
local env_files=()
|
|
35
|
+
for f in "$GIT_ROOT"/.env*; do
|
|
36
|
+
if [[ -f "$f" ]]; then
|
|
37
|
+
local basename=$(basename "$f")
|
|
38
|
+
# Skip .env.example (that's typically committed to git)
|
|
39
|
+
if [[ "$basename" != ".env.example" ]]; then
|
|
40
|
+
env_files+=("$basename")
|
|
41
|
+
fi
|
|
42
|
+
fi
|
|
43
|
+
done
|
|
44
|
+
|
|
45
|
+
if [[ ${#env_files[@]} -eq 0 ]]; then
|
|
46
|
+
echo -e " ${YELLOW}ℹ️ No .env files found in main repository${NC}"
|
|
47
|
+
return
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
local copied=0
|
|
51
|
+
for env_file in "${env_files[@]}"; do
|
|
52
|
+
local source="$GIT_ROOT/$env_file"
|
|
53
|
+
local dest="$worktree_path/$env_file"
|
|
54
|
+
|
|
55
|
+
if [[ -f "$dest" ]]; then
|
|
56
|
+
echo -e " ${YELLOW}⚠️ $env_file already exists, backing up to ${env_file}.backup${NC}"
|
|
57
|
+
cp "$dest" "${dest}.backup"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
cp "$source" "$dest"
|
|
61
|
+
echo -e " ${GREEN}✓ Copied $env_file${NC}"
|
|
62
|
+
copied=$((copied + 1))
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
echo -e " ${GREEN}✓ Copied $copied environment file(s)${NC}"
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# Create a new worktree
|
|
69
|
+
create_worktree() {
|
|
70
|
+
local branch_name="$1"
|
|
71
|
+
local from_branch="${2:-main}"
|
|
72
|
+
|
|
73
|
+
if [[ -z "$branch_name" ]]; then
|
|
74
|
+
echo -e "${RED}Error: Branch name required${NC}"
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
local worktree_path="$WORKTREE_DIR/$branch_name"
|
|
79
|
+
|
|
80
|
+
# Check if worktree already exists
|
|
81
|
+
if [[ -d "$worktree_path" ]]; then
|
|
82
|
+
echo -e "${YELLOW}Worktree already exists at: $worktree_path${NC}"
|
|
83
|
+
echo -e "Switch to it instead? (y/n)"
|
|
84
|
+
read -r response
|
|
85
|
+
if [[ "$response" == "y" ]]; then
|
|
86
|
+
switch_worktree "$branch_name"
|
|
87
|
+
fi
|
|
88
|
+
return
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
echo -e "${BLUE}Creating worktree: $branch_name${NC}"
|
|
92
|
+
echo " From: $from_branch"
|
|
93
|
+
echo " Path: $worktree_path"
|
|
94
|
+
|
|
95
|
+
# Update main branch
|
|
96
|
+
echo -e "${BLUE}Updating $from_branch...${NC}"
|
|
97
|
+
git checkout "$from_branch"
|
|
98
|
+
git pull origin "$from_branch" || true
|
|
99
|
+
|
|
100
|
+
# Create worktree
|
|
101
|
+
mkdir -p "$WORKTREE_DIR"
|
|
102
|
+
ensure_gitignore
|
|
103
|
+
|
|
104
|
+
echo -e "${BLUE}Creating worktree...${NC}"
|
|
105
|
+
git worktree add -b "$branch_name" "$worktree_path" "$from_branch"
|
|
106
|
+
|
|
107
|
+
# Copy environment files
|
|
108
|
+
copy_env_files "$worktree_path"
|
|
109
|
+
|
|
110
|
+
echo -e "${GREEN}✓ Worktree created successfully!${NC}"
|
|
111
|
+
echo ""
|
|
112
|
+
echo "To switch to this worktree:"
|
|
113
|
+
echo -e "${BLUE}cd $worktree_path${NC}"
|
|
114
|
+
echo ""
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# List all worktrees
|
|
118
|
+
list_worktrees() {
|
|
119
|
+
echo -e "${BLUE}Available worktrees:${NC}"
|
|
120
|
+
echo ""
|
|
121
|
+
|
|
122
|
+
if [[ ! -d "$WORKTREE_DIR" ]]; then
|
|
123
|
+
echo -e "${YELLOW}No worktrees found${NC}"
|
|
124
|
+
return
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
local count=0
|
|
128
|
+
for worktree_path in "$WORKTREE_DIR"/*; do
|
|
129
|
+
if [[ -d "$worktree_path" && -e "$worktree_path/.git" ]]; then
|
|
130
|
+
count=$((count + 1))
|
|
131
|
+
local worktree_name=$(basename "$worktree_path")
|
|
132
|
+
local branch=$(git -C "$worktree_path" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
|
133
|
+
|
|
134
|
+
if [[ "$PWD" == "$worktree_path" ]]; then
|
|
135
|
+
echo -e "${GREEN}✓ $worktree_name${NC} (current) → branch: $branch"
|
|
136
|
+
else
|
|
137
|
+
echo -e " $worktree_name → branch: $branch"
|
|
138
|
+
fi
|
|
139
|
+
fi
|
|
140
|
+
done
|
|
141
|
+
|
|
142
|
+
if [[ $count -eq 0 ]]; then
|
|
143
|
+
echo -e "${YELLOW}No worktrees found${NC}"
|
|
144
|
+
else
|
|
145
|
+
echo ""
|
|
146
|
+
echo -e "${BLUE}Total: $count worktree(s)${NC}"
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
echo ""
|
|
150
|
+
echo -e "${BLUE}Main repository:${NC}"
|
|
151
|
+
local main_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
|
152
|
+
echo " Branch: $main_branch"
|
|
153
|
+
echo " Path: $GIT_ROOT"
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
# Switch to a worktree
|
|
157
|
+
switch_worktree() {
|
|
158
|
+
local worktree_name="$1"
|
|
159
|
+
|
|
160
|
+
if [[ -z "$worktree_name" ]]; then
|
|
161
|
+
list_worktrees
|
|
162
|
+
echo -e "${BLUE}Switch to which worktree? (enter name)${NC}"
|
|
163
|
+
read -r worktree_name
|
|
164
|
+
fi
|
|
165
|
+
|
|
166
|
+
local worktree_path="$WORKTREE_DIR/$worktree_name"
|
|
167
|
+
|
|
168
|
+
if [[ ! -d "$worktree_path" ]]; then
|
|
169
|
+
echo -e "${RED}Error: Worktree not found: $worktree_name${NC}"
|
|
170
|
+
echo ""
|
|
171
|
+
list_worktrees
|
|
172
|
+
exit 1
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
echo -e "${GREEN}Switching to worktree: $worktree_name${NC}"
|
|
176
|
+
cd "$worktree_path"
|
|
177
|
+
echo -e "${BLUE}Now in: $(pwd)${NC}"
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
# Copy env files to an existing worktree (or current directory if in a worktree)
|
|
181
|
+
copy_env_to_worktree() {
|
|
182
|
+
local worktree_name="$1"
|
|
183
|
+
local worktree_path
|
|
184
|
+
|
|
185
|
+
if [[ -z "$worktree_name" ]]; then
|
|
186
|
+
# Check if we're currently in a worktree
|
|
187
|
+
local current_dir=$(pwd)
|
|
188
|
+
if [[ "$current_dir" == "$WORKTREE_DIR"/* ]]; then
|
|
189
|
+
worktree_path="$current_dir"
|
|
190
|
+
worktree_name=$(basename "$worktree_path")
|
|
191
|
+
echo -e "${BLUE}Detected current worktree: $worktree_name${NC}"
|
|
192
|
+
else
|
|
193
|
+
echo -e "${YELLOW}Usage: worktree-manager.sh copy-env [worktree-name]${NC}"
|
|
194
|
+
echo "Or run from within a worktree to copy to current directory"
|
|
195
|
+
list_worktrees
|
|
196
|
+
return 1
|
|
197
|
+
fi
|
|
198
|
+
else
|
|
199
|
+
worktree_path="$WORKTREE_DIR/$worktree_name"
|
|
200
|
+
|
|
201
|
+
if [[ ! -d "$worktree_path" ]]; then
|
|
202
|
+
echo -e "${RED}Error: Worktree not found: $worktree_name${NC}"
|
|
203
|
+
list_worktrees
|
|
204
|
+
return 1
|
|
205
|
+
fi
|
|
206
|
+
fi
|
|
207
|
+
|
|
208
|
+
copy_env_files "$worktree_path"
|
|
209
|
+
echo ""
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
# Clean up completed worktrees
|
|
213
|
+
cleanup_worktrees() {
|
|
214
|
+
if [[ ! -d "$WORKTREE_DIR" ]]; then
|
|
215
|
+
echo -e "${YELLOW}No worktrees to clean up${NC}"
|
|
216
|
+
return
|
|
217
|
+
fi
|
|
218
|
+
|
|
219
|
+
echo -e "${BLUE}Checking for completed worktrees...${NC}"
|
|
220
|
+
echo ""
|
|
221
|
+
|
|
222
|
+
local found=0
|
|
223
|
+
local to_remove=()
|
|
224
|
+
|
|
225
|
+
for worktree_path in "$WORKTREE_DIR"/*; do
|
|
226
|
+
if [[ -d "$worktree_path" && -e "$worktree_path/.git" ]]; then
|
|
227
|
+
local worktree_name=$(basename "$worktree_path")
|
|
228
|
+
|
|
229
|
+
# Skip if current worktree
|
|
230
|
+
if [[ "$PWD" == "$worktree_path" ]]; then
|
|
231
|
+
echo -e "${YELLOW}(skip) $worktree_name - currently active${NC}"
|
|
232
|
+
continue
|
|
233
|
+
fi
|
|
234
|
+
|
|
235
|
+
found=$((found + 1))
|
|
236
|
+
to_remove+=("$worktree_path")
|
|
237
|
+
echo -e "${YELLOW}• $worktree_name${NC}"
|
|
238
|
+
fi
|
|
239
|
+
done
|
|
240
|
+
|
|
241
|
+
if [[ $found -eq 0 ]]; then
|
|
242
|
+
echo -e "${GREEN}No inactive worktrees to clean up${NC}"
|
|
243
|
+
return
|
|
244
|
+
fi
|
|
245
|
+
|
|
246
|
+
echo ""
|
|
247
|
+
echo -e "Remove $found worktree(s)? (y/n)"
|
|
248
|
+
read -r response
|
|
249
|
+
|
|
250
|
+
if [[ "$response" != "y" ]]; then
|
|
251
|
+
echo -e "${YELLOW}Cleanup cancelled${NC}"
|
|
252
|
+
return
|
|
253
|
+
fi
|
|
254
|
+
|
|
255
|
+
echo -e "${BLUE}Cleaning up worktrees...${NC}"
|
|
256
|
+
for worktree_path in "${to_remove[@]}"; do
|
|
257
|
+
local worktree_name=$(basename "$worktree_path")
|
|
258
|
+
git worktree remove "$worktree_path" --force 2>/dev/null || true
|
|
259
|
+
echo -e "${GREEN}✓ Removed: $worktree_name${NC}"
|
|
260
|
+
done
|
|
261
|
+
|
|
262
|
+
# Clean up empty directory if nothing left
|
|
263
|
+
if [[ -z "$(ls -A "$WORKTREE_DIR" 2>/dev/null)" ]]; then
|
|
264
|
+
rmdir "$WORKTREE_DIR" 2>/dev/null || true
|
|
265
|
+
fi
|
|
266
|
+
|
|
267
|
+
echo -e "${GREEN}Cleanup complete!${NC}"
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
# Main command handler
|
|
271
|
+
main() {
|
|
272
|
+
local command="${1:-list}"
|
|
273
|
+
|
|
274
|
+
case "$command" in
|
|
275
|
+
create)
|
|
276
|
+
create_worktree "$2" "$3"
|
|
277
|
+
;;
|
|
278
|
+
list|ls)
|
|
279
|
+
list_worktrees
|
|
280
|
+
;;
|
|
281
|
+
switch|go)
|
|
282
|
+
switch_worktree "$2"
|
|
283
|
+
;;
|
|
284
|
+
copy-env|env)
|
|
285
|
+
copy_env_to_worktree "$2"
|
|
286
|
+
;;
|
|
287
|
+
cleanup|clean)
|
|
288
|
+
cleanup_worktrees
|
|
289
|
+
;;
|
|
290
|
+
help)
|
|
291
|
+
show_help
|
|
292
|
+
;;
|
|
293
|
+
*)
|
|
294
|
+
echo -e "${RED}Unknown command: $command${NC}"
|
|
295
|
+
echo ""
|
|
296
|
+
show_help
|
|
297
|
+
exit 1
|
|
298
|
+
;;
|
|
299
|
+
esac
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
show_help() {
|
|
303
|
+
cat << EOF
|
|
304
|
+
Git Worktree Manager
|
|
305
|
+
|
|
306
|
+
Usage: worktree-manager.sh <command> [options]
|
|
307
|
+
|
|
308
|
+
Commands:
|
|
309
|
+
create <branch-name> [from-branch] Create new worktree (copies .env files automatically)
|
|
310
|
+
(from-branch defaults to main)
|
|
311
|
+
list | ls List all worktrees
|
|
312
|
+
switch | go [name] Switch to worktree
|
|
313
|
+
copy-env | env [name] Copy .env files from main repo to worktree
|
|
314
|
+
(if name omitted, uses current worktree)
|
|
315
|
+
cleanup | clean Clean up inactive worktrees
|
|
316
|
+
help Show this help message
|
|
317
|
+
|
|
318
|
+
Environment Files:
|
|
319
|
+
- Automatically copies .env, .env.local, .env.test, etc. on create
|
|
320
|
+
- Skips .env.example (should be in git)
|
|
321
|
+
- Creates .backup files if destination already exists
|
|
322
|
+
- Use 'copy-env' to refresh env files after main repo changes
|
|
323
|
+
|
|
324
|
+
Examples:
|
|
325
|
+
worktree-manager.sh create feature-login
|
|
326
|
+
worktree-manager.sh create feature-auth develop
|
|
327
|
+
worktree-manager.sh switch feature-login
|
|
328
|
+
worktree-manager.sh copy-env feature-login
|
|
329
|
+
worktree-manager.sh copy-env # copies to current worktree
|
|
330
|
+
worktree-manager.sh cleanup
|
|
331
|
+
worktree-manager.sh list
|
|
332
|
+
|
|
333
|
+
EOF
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
# Run
|
|
337
|
+
main "$@"
|