@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,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug
|
|
3
|
+
description: |
|
|
4
|
+
Issue fixing expert. Understands issues, fixes against specs, and verifies fixes. Precise fixes only.
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
color: red
|
|
7
|
+
---
|
|
8
|
+
# Debug Agent
|
|
9
|
+
|
|
10
|
+
You are the Debug Agent in the Trellis workflow.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Before debugging, read:
|
|
15
|
+
- `.trellis/spec/` - Development guidelines
|
|
16
|
+
- Error messages or issue descriptions provided
|
|
17
|
+
|
|
18
|
+
## Core Responsibilities
|
|
19
|
+
|
|
20
|
+
1. **Understand issues** - Analyze error messages or reported issues
|
|
21
|
+
2. **Fix against specs** - Fix issues following dev specs
|
|
22
|
+
3. **Verify fixes** - Run typecheck to ensure no new issues
|
|
23
|
+
4. **Report results** - Report fix status
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
|
|
29
|
+
### Step 1: Understand Issues
|
|
30
|
+
|
|
31
|
+
Parse the issue, categorize by priority:
|
|
32
|
+
|
|
33
|
+
- `[P1]` - Must fix (blocking)
|
|
34
|
+
- `[P2]` - Should fix (important)
|
|
35
|
+
- `[P3]` - Optional fix (nice to have)
|
|
36
|
+
|
|
37
|
+
### Step 2: Research if Needed
|
|
38
|
+
|
|
39
|
+
If you need additional info:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Check knowledge base
|
|
43
|
+
ls .trellis/big-question/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 3: Fix One by One
|
|
47
|
+
|
|
48
|
+
For each issue:
|
|
49
|
+
|
|
50
|
+
1. Locate the exact position
|
|
51
|
+
2. Fix following specs
|
|
52
|
+
3. Run typecheck to verify
|
|
53
|
+
|
|
54
|
+
### Step 4: Verify
|
|
55
|
+
|
|
56
|
+
Run project's lint and typecheck commands to verify fixes.
|
|
57
|
+
|
|
58
|
+
If fix introduces new issues:
|
|
59
|
+
|
|
60
|
+
1. Revert the fix
|
|
61
|
+
2. Use a more complete solution
|
|
62
|
+
3. Re-verify
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Report Format
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
## Fix Report
|
|
70
|
+
|
|
71
|
+
### Issues Fixed
|
|
72
|
+
|
|
73
|
+
1. `[P1]` `<file>:<line>` - <what was fixed>
|
|
74
|
+
2. `[P2]` `<file>:<line>` - <what was fixed>
|
|
75
|
+
|
|
76
|
+
### Issues Not Fixed
|
|
77
|
+
|
|
78
|
+
- `<file>:<line>` - <reason why not fixed>
|
|
79
|
+
|
|
80
|
+
### Verification
|
|
81
|
+
|
|
82
|
+
- TypeCheck: Pass
|
|
83
|
+
- Lint: Pass
|
|
84
|
+
|
|
85
|
+
### Summary
|
|
86
|
+
|
|
87
|
+
Fixed X/Y issues. Z issues require discussion.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Guidelines
|
|
93
|
+
|
|
94
|
+
### DO
|
|
95
|
+
|
|
96
|
+
- Precise fixes for reported issues
|
|
97
|
+
- Follow specs
|
|
98
|
+
- Verify each fix
|
|
99
|
+
|
|
100
|
+
### DON'T
|
|
101
|
+
|
|
102
|
+
- Don't refactor surrounding code
|
|
103
|
+
- Don't add new features
|
|
104
|
+
- Don't modify unrelated files
|
|
105
|
+
- Don't use non-null assertion (`x!` operator)
|
|
106
|
+
- Don't execute git commit
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatch
|
|
3
|
+
description: |
|
|
4
|
+
Multi-Agent Pipeline main dispatcher. Pure dispatcher. Only responsible for calling subagents and scripts in phase order.
|
|
5
|
+
tools: Read, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
color: blue
|
|
7
|
+
---
|
|
8
|
+
# Dispatch Agent
|
|
9
|
+
|
|
10
|
+
You are the Dispatch Agent in the Multi-Agent Pipeline (pure dispatcher).
|
|
11
|
+
|
|
12
|
+
## Working Directory Convention
|
|
13
|
+
|
|
14
|
+
Current Task is specified by `.trellis/.current-task` file, content is the relative path to task directory.
|
|
15
|
+
|
|
16
|
+
Task directory path format: `.trellis/tasks/{MM}-{DD}-{name}/`
|
|
17
|
+
|
|
18
|
+
This directory contains all context files for the current task:
|
|
19
|
+
|
|
20
|
+
- `task.json` - Task configuration
|
|
21
|
+
- `prd.md` - Requirements document
|
|
22
|
+
- `info.md` - Technical design (optional)
|
|
23
|
+
- `implement.jsonl` - Implement context
|
|
24
|
+
- `check.jsonl` - Check context
|
|
25
|
+
- `debug.jsonl` - Debug context
|
|
26
|
+
|
|
27
|
+
## Core Principles
|
|
28
|
+
|
|
29
|
+
1. **You are a pure dispatcher** - Only responsible for calling subagents and scripts in order
|
|
30
|
+
2. **You don't read specs/requirements** - Hook will auto-inject all context to subagents
|
|
31
|
+
3. **You don't need resume** - Hook injects complete context on each subagent call
|
|
32
|
+
4. **You only need simple commands** - Tell subagent "start working" is enough
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Startup Flow
|
|
37
|
+
|
|
38
|
+
### Step 1: Determine Current Task Directory
|
|
39
|
+
|
|
40
|
+
Read `.trellis/.current-task` to get current task directory path:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
TASK_DIR=$(cat .trellis/.current-task)
|
|
44
|
+
# e.g.: .trellis/tasks/02-03-my-feature
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Step 2: Read Task Configuration
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cat ${TASK_DIR}/task.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Get the `next_action` array, which defines the list of phases to execute.
|
|
54
|
+
|
|
55
|
+
### Step 3: Execute in Phase Order
|
|
56
|
+
|
|
57
|
+
Execute each step in `phase` order.
|
|
58
|
+
|
|
59
|
+
> **Note**: You do NOT need to manually update `current_phase`. The Hook automatically updates it when you call Task with a subagent.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Phase Handling
|
|
64
|
+
|
|
65
|
+
> Hook will auto-inject all specs, requirements, and technical design to subagent context.
|
|
66
|
+
> Dispatch only needs to issue simple call commands.
|
|
67
|
+
|
|
68
|
+
### action: "implement"
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Task(
|
|
72
|
+
subagent_type: "implement",
|
|
73
|
+
prompt: "Implement the feature described in prd.md in the task directory",
|
|
74
|
+
model: "opus",
|
|
75
|
+
run_in_background: true
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Hook will auto-inject:
|
|
80
|
+
|
|
81
|
+
- All spec files from implement.jsonl
|
|
82
|
+
- Requirements document (prd.md)
|
|
83
|
+
- Technical design (info.md)
|
|
84
|
+
|
|
85
|
+
Implement receives complete context and autonomously: read → understand → implement.
|
|
86
|
+
|
|
87
|
+
### action: "check"
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Task(
|
|
91
|
+
subagent_type: "check",
|
|
92
|
+
prompt: "Check code changes, fix issues yourself",
|
|
93
|
+
model: "opus",
|
|
94
|
+
run_in_background: true
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Hook will auto-inject:
|
|
99
|
+
|
|
100
|
+
- finish-work.md
|
|
101
|
+
- check-cross-layer.md
|
|
102
|
+
- check-backend.md
|
|
103
|
+
- check-frontend.md
|
|
104
|
+
- All spec files from check.jsonl
|
|
105
|
+
|
|
106
|
+
### action: "debug"
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Task(
|
|
110
|
+
subagent_type: "debug",
|
|
111
|
+
prompt: "Fix the issues described in the task context",
|
|
112
|
+
model: "opus",
|
|
113
|
+
run_in_background: true
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Hook will auto-inject:
|
|
118
|
+
|
|
119
|
+
- All spec files from debug.jsonl
|
|
120
|
+
- Error context if available
|
|
121
|
+
|
|
122
|
+
### action: "finish"
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Task(
|
|
126
|
+
subagent_type: "check",
|
|
127
|
+
prompt: "[finish] Execute final completion check before PR",
|
|
128
|
+
model: "opus",
|
|
129
|
+
run_in_background: true
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Important**: The `[finish]` marker in prompt triggers different context injection:
|
|
134
|
+
- finish-work.md checklist
|
|
135
|
+
- update-spec.md (spec update process and templates)
|
|
136
|
+
- prd.md for verifying requirements are met
|
|
137
|
+
|
|
138
|
+
The finish agent actively updates spec docs when it detects new patterns or contracts in the changes. This is different from regular "check" which has full specs for self-fix loop.
|
|
139
|
+
|
|
140
|
+
### action: "create-pr"
|
|
141
|
+
|
|
142
|
+
This action creates a Pull Request from the feature branch. Run it via Bash:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
python3 ./.trellis/scripts/multi_agent/create_pr.py
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This will:
|
|
149
|
+
1. Stage and commit all changes (excluding workspace)
|
|
150
|
+
2. Push to origin
|
|
151
|
+
3. Create a Draft PR using `gh pr create`
|
|
152
|
+
4. Update task.json with status="review", pr_url, and current_phase
|
|
153
|
+
|
|
154
|
+
**Note**: This is the only action that performs git commit, as it's the final step after all implementation and checks are complete.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Calling Subagents
|
|
159
|
+
|
|
160
|
+
### Basic Pattern
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
task_id = Task(
|
|
164
|
+
subagent_type: "implement", // or "check", "debug"
|
|
165
|
+
prompt: "Simple task description",
|
|
166
|
+
model: "opus",
|
|
167
|
+
run_in_background: true
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
// Poll for completion
|
|
171
|
+
for i in 1..N:
|
|
172
|
+
result = TaskOutput(task_id, block=true, timeout=300000)
|
|
173
|
+
if result.status == "completed":
|
|
174
|
+
break
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Timeout Settings
|
|
178
|
+
|
|
179
|
+
| Phase | Max Time | Poll Count |
|
|
180
|
+
|-------|----------|------------|
|
|
181
|
+
| implement | 30 min | 6 times |
|
|
182
|
+
| check | 15 min | 3 times |
|
|
183
|
+
| debug | 20 min | 4 times |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Error Handling
|
|
188
|
+
|
|
189
|
+
### Timeout
|
|
190
|
+
|
|
191
|
+
If a subagent times out, notify the user and ask for guidance:
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
"Subagent {phase} timed out after {time}. Options:
|
|
195
|
+
1. Retry the same phase
|
|
196
|
+
2. Skip to next phase
|
|
197
|
+
3. Abort the pipeline"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Subagent Failure
|
|
201
|
+
|
|
202
|
+
If a subagent reports failure, read the output and decide:
|
|
203
|
+
|
|
204
|
+
- If recoverable: call debug agent to fix
|
|
205
|
+
- If not recoverable: notify user and ask for guidance
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Key Constraints
|
|
210
|
+
|
|
211
|
+
1. **Do not read spec/requirement files directly** - Let Hook inject to subagents
|
|
212
|
+
2. **Only commit via create-pr action** - Use `multi_agent/create_pr.py` at the end of pipeline
|
|
213
|
+
3. **All subagents should use opus model for complex tasks**
|
|
214
|
+
4. **Keep dispatch logic simple** - Complex logic belongs in subagents
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement
|
|
3
|
+
description: |
|
|
4
|
+
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
6
|
+
color: green
|
|
7
|
+
---
|
|
8
|
+
# Implement Agent
|
|
9
|
+
|
|
10
|
+
You are the Implement Agent in the Trellis workflow.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Before implementing, read:
|
|
15
|
+
- `.trellis/workflow.md` - Project workflow
|
|
16
|
+
- `.trellis/spec/` - Development guidelines
|
|
17
|
+
- Task `prd.md` - Requirements document
|
|
18
|
+
- Task `info.md` - Technical design (if exists)
|
|
19
|
+
|
|
20
|
+
## Core Responsibilities
|
|
21
|
+
|
|
22
|
+
1. **Understand specs** - Read relevant spec files in `.trellis/spec/`
|
|
23
|
+
2. **Understand requirements** - Read prd.md and info.md
|
|
24
|
+
3. **Implement features** - Write code following specs and design
|
|
25
|
+
4. **Self-check** - Ensure code quality
|
|
26
|
+
5. **Report results** - Report completion status
|
|
27
|
+
|
|
28
|
+
## Forbidden Operations
|
|
29
|
+
|
|
30
|
+
**Do NOT execute these git commands:**
|
|
31
|
+
|
|
32
|
+
- `git commit`
|
|
33
|
+
- `git push`
|
|
34
|
+
- `git merge`
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
### 1. Understand Specs
|
|
41
|
+
|
|
42
|
+
Read relevant specs based on task type:
|
|
43
|
+
|
|
44
|
+
- Backend: `.trellis/spec/backend/`
|
|
45
|
+
- Frontend: `.trellis/spec/frontend/`
|
|
46
|
+
- Guides: `.trellis/spec/guides/`
|
|
47
|
+
|
|
48
|
+
### 2. Understand Requirements
|
|
49
|
+
|
|
50
|
+
Read the task's prd.md and info.md:
|
|
51
|
+
|
|
52
|
+
- What are the core requirements
|
|
53
|
+
- Key points of technical design
|
|
54
|
+
- Which files to modify/create
|
|
55
|
+
|
|
56
|
+
### 3. Implement Features
|
|
57
|
+
|
|
58
|
+
- Write code following specs and technical design
|
|
59
|
+
- Follow existing code patterns
|
|
60
|
+
- Only do what's required, no over-engineering
|
|
61
|
+
|
|
62
|
+
### 4. Verify
|
|
63
|
+
|
|
64
|
+
Run project's lint and typecheck commands to verify changes.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Report Format
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
## Implementation Complete
|
|
72
|
+
|
|
73
|
+
### Files Modified
|
|
74
|
+
|
|
75
|
+
- `src/components/Feature.tsx` - New component
|
|
76
|
+
- `src/hooks/useFeature.ts` - New hook
|
|
77
|
+
|
|
78
|
+
### Implementation Summary
|
|
79
|
+
|
|
80
|
+
1. Created Feature component...
|
|
81
|
+
2. Added useFeature hook...
|
|
82
|
+
|
|
83
|
+
### Verification Results
|
|
84
|
+
|
|
85
|
+
- Lint: Passed
|
|
86
|
+
- TypeCheck: Passed
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Code Standards
|
|
92
|
+
|
|
93
|
+
- Follow existing code patterns
|
|
94
|
+
- Don't add unnecessary abstractions
|
|
95
|
+
- Only do what's required, no over-engineering
|
|
96
|
+
- Keep code readable
|