@jahanxu/trellis 0.4.1
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 +235 -0
- package/README.md +212 -0
- package/bin/trellis.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +97 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/init.d.ts +21 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +527 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +27 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +1289 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/configurators/antigravity.d.ts +8 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +18 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/claude.d.ts +32 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +98 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/codex.d.ts +8 -0
- package/dist/configurators/codex.d.ts.map +1 -0
- package/dist/configurators/codex.js +20 -0
- package/dist/configurators/codex.js.map +1 -0
- package/dist/configurators/cursor.d.ts +5 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +52 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/gemini.d.ts +8 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +52 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/iflow.d.ts +33 -0
- package/dist/configurators/iflow.d.ts.map +1 -0
- package/dist/configurators/iflow.js +99 -0
- package/dist/configurators/iflow.js.map +1 -0
- package/dist/configurators/index.d.ts +55 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +220 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/kilo.d.ts +8 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +51 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kiro.d.ts +8 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +20 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/configurators/opencode.d.ts +32 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +92 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/shared.d.ts +12 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +21 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/workflow.d.ts +28 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +134 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +68 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +77 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +54 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +160 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.9.json +30 -0
- package/dist/migrations/manifests/0.2.0.json +49 -0
- package/dist/migrations/manifests/0.2.12.json +9 -0
- package/dist/migrations/manifests/0.2.13.json +9 -0
- package/dist/migrations/manifests/0.2.14.json +175 -0
- package/dist/migrations/manifests/0.2.15.json +33 -0
- package/dist/migrations/manifests/0.3.0-beta.0.json +278 -0
- package/dist/migrations/manifests/0.3.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.7.json +11 -0
- package/dist/migrations/manifests/0.3.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.6.json +9 -0
- package/dist/migrations/manifests/0.3.0.json +11 -0
- package/dist/templates/antigravity/index.d.ts +12 -0
- package/dist/templates/antigravity/index.d.ts.map +1 -0
- package/dist/templates/antigravity/index.js +29 -0
- package/dist/templates/antigravity/index.js.map +1 -0
- package/dist/templates/claude/agents/check.md +122 -0
- package/dist/templates/claude/agents/debug.md +106 -0
- package/dist/templates/claude/agents/dispatch.md +214 -0
- package/dist/templates/claude/agents/implement.md +96 -0
- package/dist/templates/claude/agents/plan.md +396 -0
- package/dist/templates/claude/agents/research.md +120 -0
- package/dist/templates/claude/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/before-role-work.md +364 -0
- package/dist/templates/claude/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/claude/commands/trellis/break-loop.md +125 -0
- package/dist/templates/claude/commands/trellis/check-backend.md +13 -0
- package/dist/templates/claude/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/claude/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/claude/commands/trellis/create-command.md +154 -0
- package/dist/templates/claude/commands/trellis/finish-work.md +153 -0
- package/dist/templates/claude/commands/trellis/handoff.md +445 -0
- package/dist/templates/claude/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/claude/commands/trellis/onboard.md +358 -0
- package/dist/templates/claude/commands/trellis/parallel.md +193 -0
- package/dist/templates/claude/commands/trellis/pick-task.md +515 -0
- package/dist/templates/claude/commands/trellis/record-session.md +62 -0
- package/dist/templates/claude/commands/trellis/start.md +373 -0
- package/dist/templates/claude/commands/trellis/update-spec.md +354 -0
- package/dist/templates/claude/hooks/inject-subagent-context.py +873 -0
- package/dist/templates/claude/hooks/ralph-loop.py +388 -0
- package/dist/templates/claude/hooks/session-start.py +200 -0
- package/dist/templates/claude/index.d.ts +54 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +85 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +41 -0
- package/dist/templates/codex/index.d.ts +18 -0
- package/dist/templates/codex/index.d.ts.map +1 -0
- package/dist/templates/codex/index.js +40 -0
- package/dist/templates/codex/index.js.map +1 -0
- package/dist/templates/codex/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/brainstorm/SKILL.md +479 -0
- package/dist/templates/codex/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/codex/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/codex/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/codex/skills/create-command/SKILL.md +101 -0
- package/dist/templates/codex/skills/finish-work/SKILL.md +148 -0
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/codex/skills/onboard/SKILL.md +363 -0
- package/dist/templates/codex/skills/record-session/SKILL.md +67 -0
- package/dist/templates/codex/skills/start/SKILL.md +330 -0
- package/dist/templates/codex/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/cursor/commands/trellis-before-backend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-before-frontend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-brainstorm.md +474 -0
- package/dist/templates/cursor/commands/trellis-break-loop.md +107 -0
- package/dist/templates/cursor/commands/trellis-check-backend.md +13 -0
- package/dist/templates/cursor/commands/trellis-check-cross-layer.md +153 -0
- package/dist/templates/cursor/commands/trellis-check-frontend.md +13 -0
- package/dist/templates/cursor/commands/trellis-create-command.md +154 -0
- package/dist/templates/cursor/commands/trellis-finish-work.md +143 -0
- package/dist/templates/cursor/commands/trellis-integrate-skill.md +219 -0
- package/dist/templates/cursor/commands/trellis-onboard.md +358 -0
- package/dist/templates/cursor/commands/trellis-record-session.md +62 -0
- package/dist/templates/cursor/commands/trellis-start.md +366 -0
- package/dist/templates/cursor/commands/trellis-update-spec.md +354 -0
- package/dist/templates/cursor/index.d.ts +24 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +44 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/extract.d.ts +166 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +296 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/brainstorm.toml +420 -0
- package/dist/templates/gemini/commands/trellis/break-loop.toml +129 -0
- package/dist/templates/gemini/commands/trellis/check-backend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +147 -0
- package/dist/templates/gemini/commands/trellis/check-frontend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/create-command.toml +119 -0
- package/dist/templates/gemini/commands/trellis/finish-work.toml +133 -0
- package/dist/templates/gemini/commands/trellis/integrate-skill.toml +104 -0
- package/dist/templates/gemini/commands/trellis/onboard.toml +111 -0
- package/dist/templates/gemini/commands/trellis/record-session.toml +66 -0
- package/dist/templates/gemini/commands/trellis/start.toml +292 -0
- package/dist/templates/gemini/commands/trellis/update-spec.toml +132 -0
- package/dist/templates/gemini/index.d.ts +21 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +44 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/iflow/agents/check.md +122 -0
- package/dist/templates/iflow/agents/debug.md +106 -0
- package/dist/templates/iflow/agents/dispatch.md +214 -0
- package/dist/templates/iflow/agents/implement.md +96 -0
- package/dist/templates/iflow/agents/plan.md +396 -0
- package/dist/templates/iflow/agents/research.md +120 -0
- package/dist/templates/iflow/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/iflow/commands/trellis/break-loop.md +125 -0
- package/dist/templates/iflow/commands/trellis/check-backend.md +13 -0
- package/dist/templates/iflow/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/iflow/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/iflow/commands/trellis/create-command.md +152 -0
- package/dist/templates/iflow/commands/trellis/finish-work.md +153 -0
- package/dist/templates/iflow/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/iflow/commands/trellis/onboard.md +358 -0
- package/dist/templates/iflow/commands/trellis/parallel.md +193 -0
- package/dist/templates/iflow/commands/trellis/record-session.md +62 -0
- package/dist/templates/iflow/commands/trellis/start.md +373 -0
- package/dist/templates/iflow/commands/trellis/update-spec.md +354 -0
- package/dist/templates/iflow/hooks/inject-subagent-context.py +788 -0
- package/dist/templates/iflow/hooks/ralph-loop.py +388 -0
- package/dist/templates/iflow/hooks/session-start.py +143 -0
- package/dist/templates/iflow/index.d.ts +54 -0
- package/dist/templates/iflow/index.d.ts.map +1 -0
- package/dist/templates/iflow/index.js +85 -0
- package/dist/templates/iflow/index.js.map +1 -0
- package/dist/templates/iflow/settings.json +40 -0
- package/dist/templates/kilo/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/kilo/commands/trellis/break-loop.md +125 -0
- package/dist/templates/kilo/commands/trellis/check-backend.md +13 -0
- package/dist/templates/kilo/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/kilo/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/kilo/commands/trellis/create-command.md +152 -0
- package/dist/templates/kilo/commands/trellis/finish-work.md +129 -0
- package/dist/templates/kilo/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/kilo/commands/trellis/onboard.md +358 -0
- package/dist/templates/kilo/commands/trellis/parallel.md +194 -0
- package/dist/templates/kilo/commands/trellis/record-session.md +62 -0
- package/dist/templates/kilo/commands/trellis/start.md +321 -0
- package/dist/templates/kilo/commands/trellis/update-spec.md +285 -0
- package/dist/templates/kilo/index.d.ts +16 -0
- package/dist/templates/kilo/index.d.ts.map +1 -0
- package/dist/templates/kilo/index.js +39 -0
- package/dist/templates/kilo/index.js.map +1 -0
- package/dist/templates/kiro/index.d.ts +18 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +40 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +479 -0
- package/dist/templates/kiro/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/kiro/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/kiro/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/create-command/SKILL.md +101 -0
- package/dist/templates/kiro/skills/finish-work/SKILL.md +148 -0
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/kiro/skills/onboard/SKILL.md +363 -0
- package/dist/templates/kiro/skills/record-session/SKILL.md +67 -0
- package/dist/templates/kiro/skills/start/SKILL.md +330 -0
- package/dist/templates/kiro/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/markdown/agents.md +18 -0
- package/dist/templates/markdown/gitignore.txt +12 -0
- package/dist/templates/markdown/index.d.ts +27 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +52 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md +40 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/script-conventions.md +467 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +118 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +92 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +94 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +394 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +319 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +79 -0
- package/dist/templates/markdown/workspace-index.md +123 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/opencode/agents/check.md +146 -0
- package/dist/templates/opencode/agents/debug.md +129 -0
- package/dist/templates/opencode/agents/dispatch.md +223 -0
- package/dist/templates/opencode/agents/implement.md +120 -0
- package/dist/templates/opencode/agents/research.md +147 -0
- package/dist/templates/opencode/agents/trellis-plan.md +427 -0
- package/dist/templates/opencode/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/opencode/commands/trellis/break-loop.md +125 -0
- package/dist/templates/opencode/commands/trellis/check-backend.md +13 -0
- package/dist/templates/opencode/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/opencode/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/opencode/commands/trellis/create-command.md +154 -0
- package/dist/templates/opencode/commands/trellis/finish-work.md +144 -0
- package/dist/templates/opencode/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/opencode/commands/trellis/migrate-specs.md +0 -0
- package/dist/templates/opencode/commands/trellis/onboard.md +358 -0
- package/dist/templates/opencode/commands/trellis/parallel.md +194 -0
- package/dist/templates/opencode/commands/trellis/record-session.md +62 -0
- package/dist/templates/opencode/commands/trellis/start.md +338 -0
- package/dist/templates/opencode/commands/trellis/update-spec.md +354 -0
- package/dist/templates/opencode/lib/trellis-context.js +436 -0
- package/dist/templates/opencode/package.json +5 -0
- package/dist/templates/opencode/plugin/inject-subagent-context.js +538 -0
- package/dist/templates/opencode/plugin/session-start.js +192 -0
- package/dist/templates/trellis/VERSION +1 -0
- package/dist/templates/trellis/deliverables/README.md +51 -0
- package/dist/templates/trellis/gitignore.txt +29 -0
- package/dist/templates/trellis/index.d.ts +49 -0
- package/dist/templates/trellis/index.d.ts.map +1 -0
- package/dist/templates/trellis/index.js +92 -0
- package/dist/templates/trellis/index.js.map +1 -0
- package/dist/templates/trellis/paths.README.md +277 -0
- package/dist/templates/trellis/paths.yaml +41 -0
- package/dist/templates/trellis/pool/implementations.json +5 -0
- package/dist/templates/trellis/pool/prototypes.json +5 -0
- package/dist/templates/trellis/pool/requirements.json +5 -0
- package/dist/templates/trellis/scripts/__init__.py +5 -0
- package/dist/templates/trellis/scripts/add_session.py +391 -0
- package/dist/templates/trellis/scripts/common/__init__.py +80 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +522 -0
- package/dist/templates/trellis/scripts/common/developer.py +189 -0
- package/dist/templates/trellis/scripts/common/git_context.py +383 -0
- package/dist/templates/trellis/scripts/common/paths.py +346 -0
- package/dist/templates/trellis/scripts/common/phase.py +253 -0
- package/dist/templates/trellis/scripts/common/project_paths.py +189 -0
- package/dist/templates/trellis/scripts/common/registry.py +365 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +255 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +177 -0
- package/dist/templates/trellis/scripts/common/worktree.py +218 -0
- package/dist/templates/trellis/scripts/create_bootstrap.py +290 -0
- package/dist/templates/trellis/scripts/get_context.py +16 -0
- package/dist/templates/trellis/scripts/get_developer.py +26 -0
- package/dist/templates/trellis/scripts/handoff_generator.py +380 -0
- package/dist/templates/trellis/scripts/init_developer.py +51 -0
- package/dist/templates/trellis/scripts/multi_agent/__init__.py +5 -0
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +403 -0
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +329 -0
- package/dist/templates/trellis/scripts/multi_agent/plan.py +233 -0
- package/dist/templates/trellis/scripts/multi_agent/start.py +461 -0
- package/dist/templates/trellis/scripts/multi_agent/status.py +817 -0
- package/dist/templates/trellis/scripts/pool.py +373 -0
- package/dist/templates/trellis/scripts/task.py +1162 -0
- package/dist/templates/trellis/scripts-shell-archive/add-session.sh +384 -0
- package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +129 -0
- package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +263 -0
- package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +208 -0
- package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +150 -0
- package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +247 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +142 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +151 -0
- package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +128 -0
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +299 -0
- package/dist/templates/trellis/scripts-shell-archive/get-context.sh +7 -0
- package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +15 -0
- package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +34 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +207 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +317 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +828 -0
- package/dist/templates/trellis/scripts-shell-archive/task.sh +1204 -0
- package/dist/templates/trellis/spec/roles/designer/index.md +243 -0
- package/dist/templates/trellis/spec/roles/designer/mock-data-standards.md +481 -0
- package/dist/templates/trellis/spec/roles/designer/prototype-guidelines.md +429 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/api-integration.md +565 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/index.md +321 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/state-management.md +599 -0
- package/dist/templates/trellis/spec/roles/pm/index.md +112 -0
- package/dist/templates/trellis/spec/roles/pm/prd-template.md +124 -0
- package/dist/templates/trellis/tasks/.gitkeep +0 -0
- package/dist/templates/trellis/workflow.md +416 -0
- package/dist/templates/trellis/worktree.yaml +47 -0
- package/dist/types/ai-tools.d.ts +56 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +103 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +86 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +76 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/file-writer.d.ts +23 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +140 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/project-detector.d.ts +16 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +186 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +51 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +174 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +78 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +233 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Tool Types and Registry
|
|
3
|
+
*
|
|
4
|
+
* Defines supported AI coding tools and which command templates they can use.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Registry of all supported AI tools and their configurations.
|
|
8
|
+
* This is the single source of truth for platform data.
|
|
9
|
+
*
|
|
10
|
+
* When adding a new platform, add an entry here and create:
|
|
11
|
+
* 1. src/configurators/{platform}.ts — configure function
|
|
12
|
+
* 2. src/templates/{platform}/ — template files
|
|
13
|
+
* 3. Register in src/configurators/index.ts — PLATFORM_FUNCTIONS
|
|
14
|
+
* 4. Add CLI flag in src/cli/index.ts
|
|
15
|
+
* 5. Add to InitOptions in src/commands/init.ts
|
|
16
|
+
*/
|
|
17
|
+
export const AI_TOOLS = {
|
|
18
|
+
"claude-code": {
|
|
19
|
+
name: "Claude Code",
|
|
20
|
+
templateDirs: ["common", "claude"],
|
|
21
|
+
configDir: ".claude",
|
|
22
|
+
cliFlag: "claude",
|
|
23
|
+
defaultChecked: true,
|
|
24
|
+
hasPythonHooks: true,
|
|
25
|
+
},
|
|
26
|
+
cursor: {
|
|
27
|
+
name: "Cursor",
|
|
28
|
+
templateDirs: ["common", "cursor"],
|
|
29
|
+
configDir: ".cursor",
|
|
30
|
+
cliFlag: "cursor",
|
|
31
|
+
defaultChecked: true,
|
|
32
|
+
hasPythonHooks: false,
|
|
33
|
+
},
|
|
34
|
+
opencode: {
|
|
35
|
+
name: "OpenCode",
|
|
36
|
+
templateDirs: ["common", "opencode"],
|
|
37
|
+
configDir: ".opencode",
|
|
38
|
+
cliFlag: "opencode",
|
|
39
|
+
defaultChecked: false,
|
|
40
|
+
hasPythonHooks: false,
|
|
41
|
+
},
|
|
42
|
+
iflow: {
|
|
43
|
+
name: "iFlow CLI",
|
|
44
|
+
templateDirs: ["common", "iflow"],
|
|
45
|
+
configDir: ".iflow",
|
|
46
|
+
cliFlag: "iflow",
|
|
47
|
+
defaultChecked: false,
|
|
48
|
+
hasPythonHooks: true,
|
|
49
|
+
},
|
|
50
|
+
codex: {
|
|
51
|
+
name: "Codex",
|
|
52
|
+
templateDirs: ["common", "codex"],
|
|
53
|
+
configDir: ".agents/skills",
|
|
54
|
+
cliFlag: "codex",
|
|
55
|
+
defaultChecked: false,
|
|
56
|
+
hasPythonHooks: false,
|
|
57
|
+
},
|
|
58
|
+
kilo: {
|
|
59
|
+
name: "Kilo CLI",
|
|
60
|
+
templateDirs: ["common", "kilo"],
|
|
61
|
+
configDir: ".kilocode",
|
|
62
|
+
cliFlag: "kilo",
|
|
63
|
+
defaultChecked: false,
|
|
64
|
+
hasPythonHooks: false,
|
|
65
|
+
},
|
|
66
|
+
kiro: {
|
|
67
|
+
name: "Kiro Code",
|
|
68
|
+
templateDirs: ["common", "kiro"],
|
|
69
|
+
configDir: ".kiro/skills",
|
|
70
|
+
cliFlag: "kiro",
|
|
71
|
+
defaultChecked: false,
|
|
72
|
+
hasPythonHooks: false,
|
|
73
|
+
},
|
|
74
|
+
gemini: {
|
|
75
|
+
name: "Gemini CLI",
|
|
76
|
+
templateDirs: ["common", "gemini"],
|
|
77
|
+
configDir: ".gemini",
|
|
78
|
+
cliFlag: "gemini",
|
|
79
|
+
defaultChecked: false,
|
|
80
|
+
hasPythonHooks: false,
|
|
81
|
+
},
|
|
82
|
+
antigravity: {
|
|
83
|
+
name: "Antigravity",
|
|
84
|
+
templateDirs: ["common", "antigravity"],
|
|
85
|
+
configDir: ".agent/workflows",
|
|
86
|
+
cliFlag: "antigravity",
|
|
87
|
+
defaultChecked: false,
|
|
88
|
+
hasPythonHooks: false,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Get the configuration for a specific AI tool
|
|
93
|
+
*/
|
|
94
|
+
export function getToolConfig(tool) {
|
|
95
|
+
return AI_TOOLS[tool];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get template directories for a specific tool
|
|
99
|
+
*/
|
|
100
|
+
export function getTemplateDirs(tool) {
|
|
101
|
+
return AI_TOOLS[tool].templateDirs;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=ai-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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AE,MAAM;QACf,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;KACtB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;QAChC,SAAS,EAAE,cAAc;QACzB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;KACtB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAClC,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,QAAQ;QACjB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;KACtB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;QACvC,SAAS,EAAE,kBAAkB;QAC7B,OAAO,EAAE,aAAa;QACtB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;KACtB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration types for Trellis update command
|
|
3
|
+
*
|
|
4
|
+
* These types support intelligent migration during updates,
|
|
5
|
+
* handling file renames, deletions, and user modification detection.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A single migration action (rename, rename-dir, or delete)
|
|
9
|
+
*/
|
|
10
|
+
export interface MigrationItem {
|
|
11
|
+
/** Type of migration action */
|
|
12
|
+
type: "rename" | "rename-dir" | "delete";
|
|
13
|
+
/** Source path (relative to project root) */
|
|
14
|
+
from: string;
|
|
15
|
+
/** Target path for renames (relative to project root) */
|
|
16
|
+
to?: string;
|
|
17
|
+
/** Human-readable description of the change */
|
|
18
|
+
description?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Migration manifest for a specific version
|
|
22
|
+
*/
|
|
23
|
+
export interface MigrationManifest {
|
|
24
|
+
/** Target version this migration upgrades to */
|
|
25
|
+
version: string;
|
|
26
|
+
/** Human-readable description of changes in this version */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** List of migration actions */
|
|
29
|
+
migrations: MigrationItem[];
|
|
30
|
+
/** Detailed changelog for display to users */
|
|
31
|
+
changelog?: string;
|
|
32
|
+
/** Whether this version contains breaking changes */
|
|
33
|
+
breaking?: boolean;
|
|
34
|
+
/** Whether users should run --migrate (recommended for breaking changes) */
|
|
35
|
+
recommendMigrate?: boolean;
|
|
36
|
+
/** Detailed migration guide for AI-assisted fixes (markdown format) */
|
|
37
|
+
migrationGuide?: string;
|
|
38
|
+
/** Instructions for AI assistants on how to help with migration */
|
|
39
|
+
aiInstructions?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Classification of how a migration should be handled
|
|
43
|
+
*/
|
|
44
|
+
export type MigrationClassification = "auto" | "confirm" | "conflict" | "skip";
|
|
45
|
+
/**
|
|
46
|
+
* Classified migration item with its determined action
|
|
47
|
+
*/
|
|
48
|
+
export interface ClassifiedMigrationItem extends MigrationItem {
|
|
49
|
+
classification: MigrationClassification;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Result of classifying all migrations
|
|
53
|
+
*/
|
|
54
|
+
export interface ClassifiedMigrations {
|
|
55
|
+
/** Unmodified files - safe to auto-migrate */
|
|
56
|
+
auto: MigrationItem[];
|
|
57
|
+
/** User-modified files - need confirmation */
|
|
58
|
+
confirm: MigrationItem[];
|
|
59
|
+
/** Conflict - both old and new exist */
|
|
60
|
+
conflict: MigrationItem[];
|
|
61
|
+
/** Skip - old file doesn't exist */
|
|
62
|
+
skip: MigrationItem[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Result of executing migrations
|
|
66
|
+
*/
|
|
67
|
+
export interface MigrationResult {
|
|
68
|
+
/** Number of files renamed */
|
|
69
|
+
renamed: number;
|
|
70
|
+
/** Number of files deleted */
|
|
71
|
+
deleted: number;
|
|
72
|
+
/** Number of files skipped (user choice or no action needed) */
|
|
73
|
+
skipped: number;
|
|
74
|
+
/** Number of conflicts encountered */
|
|
75
|
+
conflicts: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* User action choice for migration confirmation
|
|
79
|
+
*/
|
|
80
|
+
export type MigrationAction = "rename" | "backup-rename" | "skip" | "view-diff";
|
|
81
|
+
/**
|
|
82
|
+
* Template hashes storage structure
|
|
83
|
+
* Maps relative file paths to their SHA256 hashes
|
|
84
|
+
*/
|
|
85
|
+
export type TemplateHashes = Record<string, string>;
|
|
86
|
+
//# sourceMappingURL=migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/types/migration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;IACzC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,8CAA8C;IAC9C,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,wCAAwC;IACxC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,oCAAoC;IACpC,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,eAAe,GACf,MAAM,GACN,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration.js","sourceRoot":"","sources":["../../src/types/migration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compare two semver versions (handles prerelease versions)
|
|
3
|
+
* Returns: -1 if a < b, 0 if a == b, 1 if a > b
|
|
4
|
+
*
|
|
5
|
+
* Semver rules:
|
|
6
|
+
* - 0.3.0-beta.1 < 0.3.0 (prerelease is less than release)
|
|
7
|
+
* - 0.3.0-alpha < 0.3.0-beta (alphabetically)
|
|
8
|
+
* - 0.3.0-beta.1 < 0.3.0-beta.2 (numerically)
|
|
9
|
+
* - 0.3.0-beta.16 < 0.3.0-rc.0 (alphabetically: "beta" < "rc")
|
|
10
|
+
*/
|
|
11
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
12
|
+
//# sourceMappingURL=compare-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare-versions.d.ts","sourceRoot":"","sources":["../../src/utils/compare-versions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CA8D5D"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compare two semver versions (handles prerelease versions)
|
|
3
|
+
* Returns: -1 if a < b, 0 if a == b, 1 if a > b
|
|
4
|
+
*
|
|
5
|
+
* Semver rules:
|
|
6
|
+
* - 0.3.0-beta.1 < 0.3.0 (prerelease is less than release)
|
|
7
|
+
* - 0.3.0-alpha < 0.3.0-beta (alphabetically)
|
|
8
|
+
* - 0.3.0-beta.1 < 0.3.0-beta.2 (numerically)
|
|
9
|
+
* - 0.3.0-beta.16 < 0.3.0-rc.0 (alphabetically: "beta" < "rc")
|
|
10
|
+
*/
|
|
11
|
+
export function compareVersions(a, b) {
|
|
12
|
+
// Split into base version and prerelease parts
|
|
13
|
+
const [aBase, aPrerelease] = a.split("-", 2);
|
|
14
|
+
const [bBase, bPrerelease] = b.split("-", 2);
|
|
15
|
+
// Parse base version (only numeric parts before any hyphen)
|
|
16
|
+
const parseBase = (v) => v.split(".").map((n) => parseInt(n, 10) || 0);
|
|
17
|
+
const aBaseParts = parseBase(aBase);
|
|
18
|
+
const bBaseParts = parseBase(bBase);
|
|
19
|
+
const maxBaseLen = Math.max(aBaseParts.length, bBaseParts.length);
|
|
20
|
+
// Compare base versions first
|
|
21
|
+
for (let i = 0; i < maxBaseLen; i++) {
|
|
22
|
+
const aVal = aBaseParts[i] ?? 0;
|
|
23
|
+
const bVal = bBaseParts[i] ?? 0;
|
|
24
|
+
if (aVal < bVal)
|
|
25
|
+
return -1;
|
|
26
|
+
if (aVal > bVal)
|
|
27
|
+
return 1;
|
|
28
|
+
}
|
|
29
|
+
// Base versions are equal, compare prerelease
|
|
30
|
+
// No prerelease > prerelease (1.0.0 > 1.0.0-beta)
|
|
31
|
+
if (!aPrerelease && bPrerelease)
|
|
32
|
+
return 1;
|
|
33
|
+
if (aPrerelease && !bPrerelease)
|
|
34
|
+
return -1;
|
|
35
|
+
if (!aPrerelease && !bPrerelease)
|
|
36
|
+
return 0;
|
|
37
|
+
// Both have prerelease, compare them (guaranteed non-null by checks above)
|
|
38
|
+
// Split prerelease by dots and compare each part
|
|
39
|
+
const aPre = aPrerelease.split(".");
|
|
40
|
+
const bPre = bPrerelease.split(".");
|
|
41
|
+
const maxPreLen = Math.max(aPre.length, bPre.length);
|
|
42
|
+
for (let i = 0; i < maxPreLen; i++) {
|
|
43
|
+
const aP = aPre[i];
|
|
44
|
+
const bP = bPre[i];
|
|
45
|
+
// Missing part means shorter prerelease comes first
|
|
46
|
+
if (aP === undefined)
|
|
47
|
+
return -1;
|
|
48
|
+
if (bP === undefined)
|
|
49
|
+
return 1;
|
|
50
|
+
// Try numeric comparison first
|
|
51
|
+
const aNum = parseInt(aP, 10);
|
|
52
|
+
const bNum = parseInt(bP, 10);
|
|
53
|
+
const aIsNum = !isNaN(aNum) && String(aNum) === aP;
|
|
54
|
+
const bIsNum = !isNaN(bNum) && String(bNum) === bP;
|
|
55
|
+
// Numeric identifiers have lower precedence than string identifiers
|
|
56
|
+
if (aIsNum && !bIsNum)
|
|
57
|
+
return -1;
|
|
58
|
+
if (!aIsNum && bIsNum)
|
|
59
|
+
return 1;
|
|
60
|
+
if (aIsNum && bIsNum) {
|
|
61
|
+
if (aNum < bNum)
|
|
62
|
+
return -1;
|
|
63
|
+
if (aNum > bNum)
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// String comparison
|
|
68
|
+
if (aP < bP)
|
|
69
|
+
return -1;
|
|
70
|
+
if (aP > bP)
|
|
71
|
+
return 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=compare-versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare-versions.js","sourceRoot":"","sources":["../../src/utils/compare-versions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,+CAA+C;IAC/C,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAE7C,4DAA4D;IAC5D,MAAM,SAAS,GAAG,CAAC,CAAS,EAAY,EAAE,CACxC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,UA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AC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9B,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAEnD,oEAAoE;QACpE,IAAI,MAAM,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,IAAI,MAAM;YAAE,OAAO,CAAC,CAAC;QAEhC,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;YACrB,IAAI,IAAI,GAAG,IAAI;gBAAE,OAAO,CAAC,CAAC,CAAC;YAC3B,IAAI,IAAI,GAAG,IAAI;gBAAE,OAAO,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,oBAAoB;YACpB,IAAI,EAAE,GAAG,EAAE;gBAAE,OAAO,CAAC,CAAC,CAAC;YACvB,IAAI,EAAE,GAAG,EAAE;gBAAE,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type WriteMode = "ask" | "force" | "skip" | "append";
|
|
2
|
+
export interface WriteOptions {
|
|
3
|
+
mode: WriteMode;
|
|
4
|
+
}
|
|
5
|
+
export declare function setWriteMode(mode: WriteMode): void;
|
|
6
|
+
export declare function getWriteMode(): WriteMode;
|
|
7
|
+
/**
|
|
8
|
+
* Write file with conflict handling
|
|
9
|
+
* - If file doesn't exist: write directly
|
|
10
|
+
* - If file exists and content is identical: skip silently
|
|
11
|
+
* - If file exists and mode is 'force': overwrite
|
|
12
|
+
* - If file exists and mode is 'skip': skip
|
|
13
|
+
* - If file exists and mode is 'append': append to end
|
|
14
|
+
* - If file exists and mode is 'ask': prompt user
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeFile(filePath: string, content: string, options?: {
|
|
17
|
+
executable?: boolean;
|
|
18
|
+
}): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Ensure directory exists
|
|
21
|
+
*/
|
|
22
|
+
export declare function ensureDir(dirPath: string): void;
|
|
23
|
+
//# sourceMappingURL=file-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-writer.d.ts","sourceRoot":"","sources":["../../src/utils/file-writer.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAC;CACjB;AASD,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAElD;AAED,wBAAgB,YAAY,IAAI,SAAS,CAExC;AA6BD;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,OAAO,CAAC,OAAO,CAAC,CAwGlB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import inquirer from "inquirer";
|
|
5
|
+
// Global write mode (set from CLI options)
|
|
6
|
+
let globalWriteMode = "ask";
|
|
7
|
+
export function setWriteMode(mode) {
|
|
8
|
+
globalWriteMode = mode;
|
|
9
|
+
}
|
|
10
|
+
export function getWriteMode() {
|
|
11
|
+
return globalWriteMode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get relative path from cwd for display
|
|
15
|
+
*/
|
|
16
|
+
function getRelativePath(filePath) {
|
|
17
|
+
const cwd = process.cwd();
|
|
18
|
+
const relativePath = path.relative(cwd, filePath);
|
|
19
|
+
return relativePath || path.basename(filePath);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Append content to file
|
|
23
|
+
*/
|
|
24
|
+
function appendToFile(filePath, content, options) {
|
|
25
|
+
const existingContent = fs.readFileSync(filePath, "utf-8");
|
|
26
|
+
const newContent = existingContent.endsWith("\n")
|
|
27
|
+
? existingContent + content
|
|
28
|
+
: existingContent + "\n" + content;
|
|
29
|
+
fs.writeFileSync(filePath, newContent);
|
|
30
|
+
if (options?.executable) {
|
|
31
|
+
fs.chmodSync(filePath, "755");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Write file with conflict handling
|
|
36
|
+
* - If file doesn't exist: write directly
|
|
37
|
+
* - If file exists and content is identical: skip silently
|
|
38
|
+
* - If file exists and mode is 'force': overwrite
|
|
39
|
+
* - If file exists and mode is 'skip': skip
|
|
40
|
+
* - If file exists and mode is 'append': append to end
|
|
41
|
+
* - If file exists and mode is 'ask': prompt user
|
|
42
|
+
*/
|
|
43
|
+
export async function writeFile(filePath, content, options) {
|
|
44
|
+
const exists = fs.existsSync(filePath);
|
|
45
|
+
const displayPath = getRelativePath(filePath);
|
|
46
|
+
if (!exists) {
|
|
47
|
+
// File doesn't exist, write directly
|
|
48
|
+
fs.writeFileSync(filePath, content);
|
|
49
|
+
if (options?.executable) {
|
|
50
|
+
fs.chmodSync(filePath, "755");
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
// File exists, check if content is identical
|
|
55
|
+
const existingContent = fs.readFileSync(filePath, "utf-8");
|
|
56
|
+
if (existingContent === content) {
|
|
57
|
+
// Content identical, skip silently (no output)
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
// File exists with different content, handle based on mode
|
|
61
|
+
const mode = globalWriteMode;
|
|
62
|
+
if (mode === "force") {
|
|
63
|
+
fs.writeFileSync(filePath, content);
|
|
64
|
+
if (options?.executable) {
|
|
65
|
+
fs.chmodSync(filePath, "755");
|
|
66
|
+
}
|
|
67
|
+
console.log(chalk.yellow(` ↻ Overwritten: ${displayPath}`));
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (mode === "skip") {
|
|
71
|
+
console.log(chalk.gray(` ○ Skipped: ${displayPath} (already exists)`));
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
if (mode === "append") {
|
|
75
|
+
appendToFile(filePath, content, options);
|
|
76
|
+
console.log(chalk.blue(` + Appended: ${displayPath}`));
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
// mode === 'ask': Interactive prompt
|
|
80
|
+
const { action } = await inquirer.prompt([
|
|
81
|
+
{
|
|
82
|
+
type: "list",
|
|
83
|
+
name: "action",
|
|
84
|
+
message: `File "${displayPath}" already exists. What would you like to do?`,
|
|
85
|
+
choices: [
|
|
86
|
+
{ name: "Skip (keep existing)", value: "skip" },
|
|
87
|
+
{ name: "Overwrite", value: "overwrite" },
|
|
88
|
+
{ name: "Append to end", value: "append" },
|
|
89
|
+
{ name: "Skip all remaining conflicts", value: "skip-all" },
|
|
90
|
+
{ name: "Overwrite all remaining conflicts", value: "overwrite-all" },
|
|
91
|
+
{ name: "Append all remaining conflicts", value: "append-all" },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
]);
|
|
95
|
+
if (action === "skip") {
|
|
96
|
+
console.log(chalk.gray(` ○ Skipped: ${displayPath}`));
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (action === "overwrite") {
|
|
100
|
+
fs.writeFileSync(filePath, content);
|
|
101
|
+
if (options?.executable) {
|
|
102
|
+
fs.chmodSync(filePath, "755");
|
|
103
|
+
}
|
|
104
|
+
console.log(chalk.yellow(` ↻ Overwritten: ${displayPath}`));
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
if (action === "append") {
|
|
108
|
+
appendToFile(filePath, content, options);
|
|
109
|
+
console.log(chalk.blue(` + Appended: ${displayPath}`));
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
if (action === "skip-all") {
|
|
113
|
+
globalWriteMode = "skip";
|
|
114
|
+
console.log(chalk.gray(` ○ Skipped: ${displayPath}`));
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (action === "overwrite-all") {
|
|
118
|
+
globalWriteMode = "force";
|
|
119
|
+
fs.writeFileSync(filePath, content);
|
|
120
|
+
if (options?.executable) {
|
|
121
|
+
fs.chmodSync(filePath, "755");
|
|
122
|
+
}
|
|
123
|
+
console.log(chalk.yellow(` ↻ Overwritten: ${displayPath}`));
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
if (action === "append-all") {
|
|
127
|
+
globalWriteMode = "append";
|
|
128
|
+
appendToFile(filePath, content, options);
|
|
129
|
+
console.log(chalk.blue(` + Appended: ${displayPath}`));
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Ensure directory exists
|
|
136
|
+
*/
|
|
137
|
+
export function ensureDir(dirPath) {
|
|
138
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=file-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/utils/file-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAYhC,2CAA2C;AAC3C,IAAI,eA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AO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1B,eAAe,GAAG,MAAM,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,WAAW,EAAE,CAAC,CAAC,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;QAC/B,eAAe,GAAG,OAAO,CAAC;QAC1B,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpC,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;YACxB,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,WAAW,EAAE,CAAC,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;QAC5B,eAAe,GAAG,QAAQ,CAAC;QAC3B,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project type detected by analyzing project files
|
|
3
|
+
*/
|
|
4
|
+
export type ProjectType = "frontend" | "backend" | "fullstack" | "unknown";
|
|
5
|
+
/**
|
|
6
|
+
* Detect project type by analyzing project files
|
|
7
|
+
*
|
|
8
|
+
* @param cwd - Current working directory to analyze
|
|
9
|
+
* @returns Detected project type
|
|
10
|
+
*/
|
|
11
|
+
export declare function detectProjectType(cwd: string): ProjectType;
|
|
12
|
+
/**
|
|
13
|
+
* Get human-readable description of project type
|
|
14
|
+
*/
|
|
15
|
+
export declare function getProjectTypeDescription(type: ProjectType): string;
|
|
16
|
+
//# sourceMappingURL=project-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-detector.d.ts","sourceRoot":"","sources":["../../src/utils/project-detector.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAiK3E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAqB1D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAWnE"}
|