@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,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Registry — Single source of truth for platform functions and derived helpers
|
|
3
|
+
*
|
|
4
|
+
* All platform-specific lists (backup dirs, template dirs, configured platforms, etc.)
|
|
5
|
+
* are derived from AI_TOOLS in types/ai-tools.ts. Adding a new platform requires:
|
|
6
|
+
* 1. Adding to AI_TOOLS (data)
|
|
7
|
+
* 2. Adding to PLATFORM_FUNCTIONS below (behavior)
|
|
8
|
+
* 3. Creating the configurator file + template directory
|
|
9
|
+
*/
|
|
10
|
+
import { type AITool, type CliFlag } from "../types/ai-tools.js";
|
|
11
|
+
/** All platform IDs */
|
|
12
|
+
export declare const PLATFORM_IDS: AITool[];
|
|
13
|
+
/** All platform config directory names (e.g., [".claude", ".cursor", ".iflow", ".opencode"]) */
|
|
14
|
+
export declare const CONFIG_DIRS: string[];
|
|
15
|
+
/** All directories managed by Trellis (including .trellis itself) */
|
|
16
|
+
export declare const ALL_MANAGED_DIRS: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Detect which platforms are configured by checking for directory existence
|
|
19
|
+
*/
|
|
20
|
+
export declare function getConfiguredPlatforms(cwd: string): Set<AITool>;
|
|
21
|
+
/**
|
|
22
|
+
* Get platform IDs that have Python hooks (for Windows encoding detection)
|
|
23
|
+
*/
|
|
24
|
+
export declare function getPlatformsWithPythonHooks(): AITool[];
|
|
25
|
+
/**
|
|
26
|
+
* Check if a path starts with any managed directory
|
|
27
|
+
*/
|
|
28
|
+
export declare function isManagedPath(dirPath: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Check if a directory name is a managed root directory (should not be deleted)
|
|
31
|
+
*/
|
|
32
|
+
export declare function isManagedRootDir(dirName: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Get the configure function for a platform
|
|
35
|
+
*/
|
|
36
|
+
export declare function configurePlatform(platformId: AITool, cwd: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Collect template files for a specific platform (for update tracking).
|
|
39
|
+
* Returns undefined if the platform doesn't support template tracking.
|
|
40
|
+
*/
|
|
41
|
+
export declare function collectPlatformTemplates(platformId: AITool): Map<string, string> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Build TOOLS array for interactive init prompt, derived from AI_TOOLS registry
|
|
44
|
+
*/
|
|
45
|
+
export declare function getInitToolChoices(): {
|
|
46
|
+
key: CliFlag;
|
|
47
|
+
name: string;
|
|
48
|
+
defaultChecked: boolean;
|
|
49
|
+
platformId: AITool;
|
|
50
|
+
}[];
|
|
51
|
+
/**
|
|
52
|
+
* Resolve CLI flag name to AITool id (e.g., "claude" → "claude-code")
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveCliFlag(flag: string): AITool | undefined;
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurators/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAY,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AA6K3E,uBAAuB;AACvB,eAAO,MAAM,YAAY,EAA4B,MAAM,EAAE,CAAC;AAE9D,gGAAgG;AAChG,eAAO,MAAM,WAAW,UAAmD,CAAC;AAE5E,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,UAA+B,CAAC;AAE7D;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAQ/D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEjC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI;IACpC,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,EAAE,CAOF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Registry — Single source of truth for platform functions and derived helpers
|
|
3
|
+
*
|
|
4
|
+
* All platform-specific lists (backup dirs, template dirs, configured platforms, etc.)
|
|
5
|
+
* are derived from AI_TOOLS in types/ai-tools.ts. Adding a new platform requires:
|
|
6
|
+
* 1. Adding to AI_TOOLS (data)
|
|
7
|
+
* 2. Adding to PLATFORM_FUNCTIONS below (behavior)
|
|
8
|
+
* 3. Creating the configurator file + template directory
|
|
9
|
+
*/
|
|
10
|
+
import fs from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
13
|
+
// Platform configurators
|
|
14
|
+
import { configureClaude } from "./claude.js";
|
|
15
|
+
import { configureCursor } from "./cursor.js";
|
|
16
|
+
import { configureIflow } from "./iflow.js";
|
|
17
|
+
import { configureOpenCode } from "./opencode.js";
|
|
18
|
+
import { configureCodex } from "./codex.js";
|
|
19
|
+
import { configureKilo } from "./kilo.js";
|
|
20
|
+
import { configureKiro } from "./kiro.js";
|
|
21
|
+
import { configureGemini } from "./gemini.js";
|
|
22
|
+
import { configureAntigravity } from "./antigravity.js";
|
|
23
|
+
// Shared utilities
|
|
24
|
+
import { resolvePlaceholders } from "./shared.js";
|
|
25
|
+
// Template content for update tracking
|
|
26
|
+
import { getAllAgents as getClaudeAgents, getAllCommands as getClaudeCommands, getAllHooks as getClaudeHooks, getSettingsTemplate as getClaudeSettings, } from "../templates/claude/index.js";
|
|
27
|
+
import { getAllCommands as getCursorCommands } from "../templates/cursor/index.js";
|
|
28
|
+
import { getAllAgents as getIflowAgents, getAllCommands as getIflowCommands, getAllHooks as getIflowHooks, getSettingsTemplate as getIflowSettings, } from "../templates/iflow/index.js";
|
|
29
|
+
import { getAllSkills as getCodexSkills } from "../templates/codex/index.js";
|
|
30
|
+
import { getAllCommands as getKiloCommands } from "../templates/kilo/index.js";
|
|
31
|
+
import { getAllSkills as getKiroSkills } from "../templates/kiro/index.js";
|
|
32
|
+
import { getAllCommands as getGeminiCommands } from "../templates/gemini/index.js";
|
|
33
|
+
import { getAllWorkflows as getAntigravityWorkflows } from "../templates/antigravity/index.js";
|
|
34
|
+
/**
|
|
35
|
+
* Platform functions registry — maps each AITool to its behavior.
|
|
36
|
+
* When adding a new platform, add an entry here.
|
|
37
|
+
*/
|
|
38
|
+
const PLATFORM_FUNCTIONS = {
|
|
39
|
+
"claude-code": {
|
|
40
|
+
configure: configureClaude,
|
|
41
|
+
collectTemplates: () => {
|
|
42
|
+
const files = new Map();
|
|
43
|
+
// Commands (in trellis/ subdirectory for namespace)
|
|
44
|
+
for (const cmd of getClaudeCommands()) {
|
|
45
|
+
files.set(`.claude/commands/trellis/${cmd.name}.md`, cmd.content);
|
|
46
|
+
}
|
|
47
|
+
// Agents
|
|
48
|
+
for (const agent of getClaudeAgents()) {
|
|
49
|
+
files.set(`.claude/agents/${agent.name}.md`, agent.content);
|
|
50
|
+
}
|
|
51
|
+
// Hooks
|
|
52
|
+
for (const hook of getClaudeHooks()) {
|
|
53
|
+
files.set(`.claude/${hook.targetPath}`, hook.content);
|
|
54
|
+
}
|
|
55
|
+
// Settings (resolve {{PYTHON_CMD}} to match what configure() writes)
|
|
56
|
+
const settings = getClaudeSettings();
|
|
57
|
+
files.set(`.claude/${settings.targetPath}`, resolvePlaceholders(settings.content));
|
|
58
|
+
return files;
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
cursor: {
|
|
62
|
+
configure: configureCursor,
|
|
63
|
+
collectTemplates: () => {
|
|
64
|
+
const files = new Map();
|
|
65
|
+
// Commands (flat structure with trellis- prefix, Cursor doesn't support subdirs)
|
|
66
|
+
for (const cmd of getCursorCommands()) {
|
|
67
|
+
files.set(`.cursor/commands/${cmd.name}.md`, cmd.content);
|
|
68
|
+
}
|
|
69
|
+
return files;
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
opencode: {
|
|
73
|
+
configure: configureOpenCode,
|
|
74
|
+
// OpenCode uses plugin system, templates handled separately during init
|
|
75
|
+
},
|
|
76
|
+
iflow: {
|
|
77
|
+
configure: configureIflow,
|
|
78
|
+
collectTemplates: () => {
|
|
79
|
+
const files = new Map();
|
|
80
|
+
// Commands
|
|
81
|
+
for (const cmd of getIflowCommands()) {
|
|
82
|
+
files.set(`.iflow/commands/${cmd.name}.md`, cmd.content);
|
|
83
|
+
}
|
|
84
|
+
// Agents
|
|
85
|
+
for (const agent of getIflowAgents()) {
|
|
86
|
+
files.set(`.iflow/agents/${agent.name}.md`, agent.content);
|
|
87
|
+
}
|
|
88
|
+
// Hooks
|
|
89
|
+
for (const hook of getIflowHooks()) {
|
|
90
|
+
files.set(`.iflow/${hook.targetPath}`, hook.content);
|
|
91
|
+
}
|
|
92
|
+
// Settings (resolve {{PYTHON_CMD}} to match what configure() writes)
|
|
93
|
+
const settings = getIflowSettings();
|
|
94
|
+
files.set(`.iflow/${settings.targetPath}`, resolvePlaceholders(settings.content));
|
|
95
|
+
return files;
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
codex: {
|
|
99
|
+
configure: configureCodex,
|
|
100
|
+
collectTemplates: () => {
|
|
101
|
+
const files = new Map();
|
|
102
|
+
for (const skill of getCodexSkills()) {
|
|
103
|
+
files.set(`.agents/skills/${skill.name}/SKILL.md`, skill.content);
|
|
104
|
+
}
|
|
105
|
+
return files;
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
kilo: {
|
|
109
|
+
configure: configureKilo,
|
|
110
|
+
collectTemplates: () => {
|
|
111
|
+
const files = new Map();
|
|
112
|
+
for (const cmd of getKiloCommands()) {
|
|
113
|
+
files.set(`.kilocode/commands/trellis/${cmd.name}.md`, cmd.content);
|
|
114
|
+
}
|
|
115
|
+
return files;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
kiro: {
|
|
119
|
+
configure: configureKiro,
|
|
120
|
+
collectTemplates: () => {
|
|
121
|
+
const files = new Map();
|
|
122
|
+
for (const skill of getKiroSkills()) {
|
|
123
|
+
files.set(`.kiro/skills/${skill.name}/SKILL.md`, skill.content);
|
|
124
|
+
}
|
|
125
|
+
return files;
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
gemini: {
|
|
129
|
+
configure: configureGemini,
|
|
130
|
+
collectTemplates: () => {
|
|
131
|
+
const files = new Map();
|
|
132
|
+
for (const cmd of getGeminiCommands()) {
|
|
133
|
+
files.set(`.gemini/commands/trellis/${cmd.name}.toml`, cmd.content);
|
|
134
|
+
}
|
|
135
|
+
return files;
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
antigravity: {
|
|
139
|
+
configure: configureAntigravity,
|
|
140
|
+
collectTemplates: () => {
|
|
141
|
+
const files = new Map();
|
|
142
|
+
for (const workflow of getAntigravityWorkflows()) {
|
|
143
|
+
files.set(`.agent/workflows/${workflow.name}.md`, workflow.content);
|
|
144
|
+
}
|
|
145
|
+
return files;
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
// =============================================================================
|
|
150
|
+
// Derived Helpers — all derived from AI_TOOLS registry
|
|
151
|
+
// =============================================================================
|
|
152
|
+
/** All platform IDs */
|
|
153
|
+
export const PLATFORM_IDS = Object.keys(AI_TOOLS);
|
|
154
|
+
/** All platform config directory names (e.g., [".claude", ".cursor", ".iflow", ".opencode"]) */
|
|
155
|
+
export const CONFIG_DIRS = PLATFORM_IDS.map((id) => AI_TOOLS[id].configDir);
|
|
156
|
+
/** All directories managed by Trellis (including .trellis itself) */
|
|
157
|
+
export const ALL_MANAGED_DIRS = [".trellis", ...CONFIG_DIRS];
|
|
158
|
+
/**
|
|
159
|
+
* Detect which platforms are configured by checking for directory existence
|
|
160
|
+
*/
|
|
161
|
+
export function getConfiguredPlatforms(cwd) {
|
|
162
|
+
const platforms = new Set();
|
|
163
|
+
for (const id of PLATFORM_IDS) {
|
|
164
|
+
if (fs.existsSync(path.join(cwd, AI_TOOLS[id].configDir))) {
|
|
165
|
+
platforms.add(id);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return platforms;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get platform IDs that have Python hooks (for Windows encoding detection)
|
|
172
|
+
*/
|
|
173
|
+
export function getPlatformsWithPythonHooks() {
|
|
174
|
+
return PLATFORM_IDS.filter((id) => AI_TOOLS[id].hasPythonHooks);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Check if a path starts with any managed directory
|
|
178
|
+
*/
|
|
179
|
+
export function isManagedPath(dirPath) {
|
|
180
|
+
// Normalize Windows backslashes to forward slashes for consistent matching
|
|
181
|
+
const normalized = dirPath.replace(/\\/g, "/");
|
|
182
|
+
return ALL_MANAGED_DIRS.some((d) => normalized.startsWith(d + "/") || normalized === d);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Check if a directory name is a managed root directory (should not be deleted)
|
|
186
|
+
*/
|
|
187
|
+
export function isManagedRootDir(dirName) {
|
|
188
|
+
return ALL_MANAGED_DIRS.includes(dirName);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Get the configure function for a platform
|
|
192
|
+
*/
|
|
193
|
+
export function configurePlatform(platformId, cwd) {
|
|
194
|
+
return PLATFORM_FUNCTIONS[platformId].configure(cwd);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Collect template files for a specific platform (for update tracking).
|
|
198
|
+
* Returns undefined if the platform doesn't support template tracking.
|
|
199
|
+
*/
|
|
200
|
+
export function collectPlatformTemplates(platformId) {
|
|
201
|
+
return PLATFORM_FUNCTIONS[platformId].collectTemplates?.();
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Build TOOLS array for interactive init prompt, derived from AI_TOOLS registry
|
|
205
|
+
*/
|
|
206
|
+
export function getInitToolChoices() {
|
|
207
|
+
return PLATFORM_IDS.map((id) => ({
|
|
208
|
+
key: AI_TOOLS[id].cliFlag,
|
|
209
|
+
name: AI_TOOLS[id].name,
|
|
210
|
+
defaultChecked: AI_TOOLS[id].defaultChecked,
|
|
211
|
+
platformId: id,
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Resolve CLI flag name to AITool id (e.g., "claude" → "claude-code")
|
|
216
|
+
*/
|
|
217
|
+
export function resolveCliFlag(flag) {
|
|
218
|
+
return PLATFORM_IDS.find((id) => AI_TOOLS[id].cliFlag === flag);
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configurators/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAA6B,MAAM,sBAAsB,CAAC;AAE3E,yBAAyB;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,O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,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,UAAkB;IAElB,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAMhC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/B,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO;QACzB,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI;QACvB,cAAc,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,cAAc;QAC3C,UAAU,EAAE,EAAE;KACf,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kilo CLI configurator
|
|
3
|
+
*
|
|
4
|
+
* Configures Kilo CLI by copying templates from src/templates/kilo/.
|
|
5
|
+
* Kilo CLI does not support hooks, so only commands are copied.
|
|
6
|
+
*/
|
|
7
|
+
export declare function configureKilo(cwd: string): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=kilo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilo.d.ts","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+CH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kilo CLI configurator
|
|
3
|
+
*
|
|
4
|
+
* Configures Kilo CLI by copying templates from src/templates/kilo/.
|
|
5
|
+
* Kilo CLI does not support hooks, so only commands are copied.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { getKiloTemplatePath } from "../templates/extract.js";
|
|
10
|
+
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
11
|
+
const EXCLUDE_PATTERNS = [
|
|
12
|
+
".d.ts",
|
|
13
|
+
".d.ts.map",
|
|
14
|
+
".js.map",
|
|
15
|
+
"__pycache__",
|
|
16
|
+
"node_modules",
|
|
17
|
+
"bun.lock",
|
|
18
|
+
".gitignore",
|
|
19
|
+
];
|
|
20
|
+
function shouldExclude(filename) {
|
|
21
|
+
for (const pattern of EXCLUDE_PATTERNS) {
|
|
22
|
+
if (filename.endsWith(pattern) || filename === pattern) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
async function copyDirFiltered(src, dest) {
|
|
29
|
+
ensureDir(dest);
|
|
30
|
+
for (const entry of readdirSync(src)) {
|
|
31
|
+
if (shouldExclude(entry)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const srcPath = path.join(src, entry);
|
|
35
|
+
const destPath = path.join(dest, entry);
|
|
36
|
+
const stat = statSync(srcPath);
|
|
37
|
+
if (stat.isDirectory()) {
|
|
38
|
+
await copyDirFiltered(srcPath, destPath);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const content = readFileSync(srcPath, "utf-8");
|
|
42
|
+
await writeFile(destPath, content);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export async function configureKilo(cwd) {
|
|
47
|
+
const sourcePath = getKiloTemplatePath();
|
|
48
|
+
const destPath = path.join(cwd, ".kilocode");
|
|
49
|
+
await copyDirFiltered(sourcePath, destPath);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=kilo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kilo.js","sourceRoot":"","sources":["../../src/configurators/kilo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,gBAAgB,GAAG;IACvB,OAAO;IACP,WAAW;IACX,SAAS;IACT,aAAa;IACb,cAAc;IACd,UAAU;IACV,YAAY;CACb,CAAC;AAEF,SAAS,aAAa,CAAC,QAAgB;IACrC,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;QACvC,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YACvD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAW,EAAE,IAAY;IACtD,SAAS,CAAC,IAAI,CAAC,CAAC;IAEhB,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,SAAS;QACX,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/B,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACvB,MAAM,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC/C,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAE7C,MAAM,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kiro.d.ts","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAU9D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { getAllSkills } from "../templates/kiro/index.js";
|
|
3
|
+
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
+
/**
|
|
5
|
+
* Configure Kiro Code by writing skill templates.
|
|
6
|
+
*
|
|
7
|
+
* Output:
|
|
8
|
+
* - .kiro/skills/<skill-name>/SKILL.md
|
|
9
|
+
*/
|
|
10
|
+
export async function configureKiro(cwd) {
|
|
11
|
+
const skillsRoot = path.join(cwd, ".kiro", "skills");
|
|
12
|
+
ensureDir(skillsRoot);
|
|
13
|
+
for (const skill of getAllSkills()) {
|
|
14
|
+
const skillDir = path.join(skillsRoot, skill.name);
|
|
15
|
+
ensureDir(skillDir);
|
|
16
|
+
const targetPath = path.join(skillDir, "SKILL.md");
|
|
17
|
+
await writeFile(targetPath, skill.content);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=kiro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../src/configurators/kiro.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrD,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtB,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACnD,MAAM,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode configurator
|
|
3
|
+
*
|
|
4
|
+
* Configures OpenCode by copying templates from src/templates/opencode/.
|
|
5
|
+
* This uses the dogfooding pattern - the same files used by Trellis project itself.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configure OpenCode by copying from templates
|
|
9
|
+
*
|
|
10
|
+
* The opencode templates include:
|
|
11
|
+
* - commands/ - Slash commands
|
|
12
|
+
* - agents/ - Multi-agent pipeline configurations
|
|
13
|
+
* - plugin/ - Context injection plugins
|
|
14
|
+
* - lib/ - Shared JavaScript utilities
|
|
15
|
+
* - package.json - Plugin dependencies
|
|
16
|
+
*/
|
|
17
|
+
export declare function configureOpenCode(cwd: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Configure OpenCode agents for Multi-Agent Pipeline
|
|
20
|
+
*
|
|
21
|
+
* @deprecated Agents are now included in the main .opencode directory copy.
|
|
22
|
+
* This function is kept for backwards compatibility but does nothing.
|
|
23
|
+
*/
|
|
24
|
+
export declare function configureOpenCodeAgents(_cwd: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Configure OpenCode with full Multi-Agent Pipeline support
|
|
27
|
+
*
|
|
28
|
+
* This is now equivalent to just calling configureOpenCode since the entire
|
|
29
|
+
* .opencode directory is copied at once.
|
|
30
|
+
*/
|
|
31
|
+
export declare function configureOpenCodeFull(cwd: string): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0DH;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlE;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode configurator
|
|
3
|
+
*
|
|
4
|
+
* Configures OpenCode by copying templates from src/templates/opencode/.
|
|
5
|
+
* This uses the dogfooding pattern - the same files used by Trellis project itself.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { getOpenCodeTemplatePath } from "../templates/extract.js";
|
|
10
|
+
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
11
|
+
/**
|
|
12
|
+
* Files to exclude when copying templates
|
|
13
|
+
* These are build artifacts or platform-specific files
|
|
14
|
+
*/
|
|
15
|
+
const EXCLUDE_PATTERNS = [
|
|
16
|
+
".d.ts",
|
|
17
|
+
".d.ts.map",
|
|
18
|
+
".js.map",
|
|
19
|
+
"__pycache__",
|
|
20
|
+
"node_modules",
|
|
21
|
+
"bun.lock",
|
|
22
|
+
".gitignore",
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* Check if a file should be excluded
|
|
26
|
+
*/
|
|
27
|
+
function shouldExclude(filename) {
|
|
28
|
+
for (const pattern of EXCLUDE_PATTERNS) {
|
|
29
|
+
if (filename.endsWith(pattern) || filename === pattern) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Recursively copy directory, excluding build artifacts
|
|
37
|
+
* Uses writeFile to handle file conflicts with the global writeMode setting
|
|
38
|
+
*/
|
|
39
|
+
async function copyDirFiltered(src, dest) {
|
|
40
|
+
ensureDir(dest);
|
|
41
|
+
for (const entry of readdirSync(src)) {
|
|
42
|
+
if (shouldExclude(entry)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const srcPath = path.join(src, entry);
|
|
46
|
+
const destPath = path.join(dest, entry);
|
|
47
|
+
const stat = statSync(srcPath);
|
|
48
|
+
if (stat.isDirectory()) {
|
|
49
|
+
await copyDirFiltered(srcPath, destPath);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const content = readFileSync(srcPath, "utf-8");
|
|
53
|
+
await writeFile(destPath, content);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Configure OpenCode by copying from templates
|
|
59
|
+
*
|
|
60
|
+
* The opencode templates include:
|
|
61
|
+
* - commands/ - Slash commands
|
|
62
|
+
* - agents/ - Multi-agent pipeline configurations
|
|
63
|
+
* - plugin/ - Context injection plugins
|
|
64
|
+
* - lib/ - Shared JavaScript utilities
|
|
65
|
+
* - package.json - Plugin dependencies
|
|
66
|
+
*/
|
|
67
|
+
export async function configureOpenCode(cwd) {
|
|
68
|
+
const sourcePath = getOpenCodeTemplatePath();
|
|
69
|
+
const destPath = path.join(cwd, ".opencode");
|
|
70
|
+
// Copy templates, excluding build artifacts
|
|
71
|
+
await copyDirFiltered(sourcePath, destPath);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Configure OpenCode agents for Multi-Agent Pipeline
|
|
75
|
+
*
|
|
76
|
+
* @deprecated Agents are now included in the main .opencode directory copy.
|
|
77
|
+
* This function is kept for backwards compatibility but does nothing.
|
|
78
|
+
*/
|
|
79
|
+
export async function configureOpenCodeAgents(_cwd) {
|
|
80
|
+
// Agents are now copied as part of configureOpenCode
|
|
81
|
+
// This function is kept for API compatibility
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Configure OpenCode with full Multi-Agent Pipeline support
|
|
85
|
+
*
|
|
86
|
+
* This is now equivalent to just calling configureOpenCode since the entire
|
|
87
|
+
* .opencode directory is copied at once.
|
|
88
|
+
*/
|
|
89
|
+
export async function configureOpenCodeFull(cwd) {
|
|
90
|
+
await configureOpenCode(cwd);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=opencode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/configurators/opencode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAA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OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW;IACjD,MAAM,UAAU,GAAG,uBAAuB,EAAE,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAE7C,4CAA4C;IAC5C,MAAM,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAAY;IACxD,qDAAqD;IACrD,8CAA8C;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,GAAW;IACrD,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for platform configurators.
|
|
3
|
+
*
|
|
4
|
+
* Extracted here to avoid circular dependencies (index.ts imports configurators,
|
|
5
|
+
* configurators cannot import from index.ts).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resolve platform-specific placeholders in template content.
|
|
9
|
+
* Used by both init (configurators) and update (collectTemplates in index.ts).
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolvePlaceholders(content: string): string;
|
|
12
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for platform configurators.
|
|
3
|
+
*
|
|
4
|
+
* Extracted here to avoid circular dependencies (index.ts imports configurators,
|
|
5
|
+
* configurators cannot import from index.ts).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get the Python command based on platform.
|
|
9
|
+
* Windows uses 'python', macOS/Linux use 'python3'.
|
|
10
|
+
*/
|
|
11
|
+
function getPythonCommand() {
|
|
12
|
+
return process.platform === "win32" ? "python" : "python3";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolve platform-specific placeholders in template content.
|
|
16
|
+
* Used by both init (configurators) and update (collectTemplates in index.ts).
|
|
17
|
+
*/
|
|
18
|
+
export function resolvePlaceholders(content) {
|
|
19
|
+
return content.replace(/\{\{PYTHON_CMD\}\}/g, getPythonCommand());
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,SAAS,gBAAgB;IACvB,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ProjectType } from "../utils/project-detector.js";
|
|
2
|
+
/**
|
|
3
|
+
* Options for creating workflow structure
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkflowOptions {
|
|
6
|
+
/** Detected or specified project type */
|
|
7
|
+
projectType: ProjectType;
|
|
8
|
+
/** Enable multi-agent pipeline with worktree support */
|
|
9
|
+
multiAgent?: boolean;
|
|
10
|
+
/** Skip creating local spec templates (when using remote template) */
|
|
11
|
+
skipSpecTemplates?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create workflow structure based on project type
|
|
15
|
+
*
|
|
16
|
+
* This function creates the .trellis/ directory structure by:
|
|
17
|
+
* 1. Copying scripts/ directory directly (dogfooding)
|
|
18
|
+
* 2. Copying workflow.md and .gitignore (dogfooding)
|
|
19
|
+
* 3. Creating workspace/ with index.md
|
|
20
|
+
* 4. Creating tasks/ directory
|
|
21
|
+
* 5. Creating spec/ with templates (not dogfooded - generic templates)
|
|
22
|
+
* 6. Copying worktree.yaml if multi-agent is enabled
|
|
23
|
+
*
|
|
24
|
+
* @param cwd - Current working directory
|
|
25
|
+
* @param options - Workflow options including project type
|
|
26
|
+
*/
|
|
27
|
+
export declare function createWorkflowStructure(cwd: string, options?: WorkflowOptions): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAOhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|