@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,373 @@
|
|
|
1
|
+
# Start Session
|
|
2
|
+
|
|
3
|
+
Initialize your AI development session and begin working on tasks.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Operation Types
|
|
8
|
+
|
|
9
|
+
| Marker | Meaning | Executor |
|
|
10
|
+
|--------|---------|----------|
|
|
11
|
+
| `[AI]` | Bash scripts or Task calls executed by AI | You (AI) |
|
|
12
|
+
| `[USER]` | Slash commands executed by user | User |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Initialization `[AI]`
|
|
17
|
+
|
|
18
|
+
### Step 1: Understand Development Workflow
|
|
19
|
+
|
|
20
|
+
First, read the workflow guide to understand the development process:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cat .trellis/workflow.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Follow the instructions in workflow.md** - it contains:
|
|
27
|
+
- Core principles (Read Before Write, Follow Standards, etc.)
|
|
28
|
+
- File system structure
|
|
29
|
+
- Development process
|
|
30
|
+
- Best practices
|
|
31
|
+
|
|
32
|
+
### Step 2: Get Current Context
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python3 ./.trellis/scripts/get_context.py
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This shows: developer identity, git status, current task (if any), active tasks.
|
|
39
|
+
|
|
40
|
+
### Step 3: Read Guidelines Index
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cat .trellis/spec/frontend/index.md # Frontend guidelines
|
|
44
|
+
cat .trellis/spec/backend/index.md # Backend guidelines
|
|
45
|
+
cat .trellis/spec/guides/index.md # Thinking guides
|
|
46
|
+
cat .trellis/spec/unit-test/index.md # Testing guidelines
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 4: Report and Ask
|
|
50
|
+
|
|
51
|
+
Report what you learned and ask: "What would you like to work on?"
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Task Classification
|
|
56
|
+
|
|
57
|
+
When user describes a task, classify it:
|
|
58
|
+
|
|
59
|
+
| Type | Criteria | Workflow |
|
|
60
|
+
|------|----------|----------|
|
|
61
|
+
| **Question** | User asks about code, architecture, or how something works | Answer directly |
|
|
62
|
+
| **Trivial Fix** | Typo fix, comment update, single-line change | Direct Edit |
|
|
63
|
+
| **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm → Implement |
|
|
64
|
+
| **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm → Task Workflow** |
|
|
65
|
+
|
|
66
|
+
### Classification Signals
|
|
67
|
+
|
|
68
|
+
**Trivial/Simple indicators:**
|
|
69
|
+
- User specifies exact file and change
|
|
70
|
+
- "Fix the typo in X"
|
|
71
|
+
- "Add field Y to component Z"
|
|
72
|
+
- Clear acceptance criteria already stated
|
|
73
|
+
|
|
74
|
+
**Complex indicators:**
|
|
75
|
+
- "I want to add a feature for..."
|
|
76
|
+
- "Can you help me improve..."
|
|
77
|
+
- Mentions multiple areas or systems
|
|
78
|
+
- No clear implementation path
|
|
79
|
+
- User seems unsure about approach
|
|
80
|
+
|
|
81
|
+
### Decision Rule
|
|
82
|
+
|
|
83
|
+
> **If in doubt, use Brainstorm + Task Workflow.**
|
|
84
|
+
>
|
|
85
|
+
> Task Workflow ensures code-spec context is injected to agents, resulting in higher quality code.
|
|
86
|
+
> The overhead is minimal, but the benefit is significant.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Question / Trivial Fix
|
|
91
|
+
|
|
92
|
+
For questions or trivial fixes, work directly:
|
|
93
|
+
|
|
94
|
+
1. Answer question or make the fix
|
|
95
|
+
2. If code was changed, remind user to run `/trellis:finish-work`
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Simple Task
|
|
100
|
+
|
|
101
|
+
For simple, well-defined tasks:
|
|
102
|
+
|
|
103
|
+
1. Quick confirm: "I understand you want to [goal]. Ready to proceed?"
|
|
104
|
+
2. If yes, proceed to **Task Workflow Phase 1 Path B** (create task, write PRD, then research)
|
|
105
|
+
3. If no, clarify and confirm again
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Complex Task - Brainstorm First
|
|
110
|
+
|
|
111
|
+
For complex or vague tasks, use the brainstorm process to clarify requirements.
|
|
112
|
+
|
|
113
|
+
See `/trellis:brainstorm` for the full process. Summary:
|
|
114
|
+
|
|
115
|
+
1. **Acknowledge and classify** - State your understanding
|
|
116
|
+
2. **Create task directory** - Track evolving requirements in `prd.md`
|
|
117
|
+
3. **Ask questions one at a time** - Update PRD after each answer
|
|
118
|
+
4. **Propose approaches** - For architectural decisions
|
|
119
|
+
5. **Confirm final requirements** - Get explicit approval
|
|
120
|
+
6. **Proceed to Task Workflow** - With clear requirements in PRD
|
|
121
|
+
|
|
122
|
+
### Key Brainstorm Principles
|
|
123
|
+
|
|
124
|
+
| Principle | Description |
|
|
125
|
+
|-----------|-------------|
|
|
126
|
+
| **One question at a time** | Never overwhelm with multiple questions |
|
|
127
|
+
| **Update PRD immediately** | After each answer, update the document |
|
|
128
|
+
| **Prefer multiple choice** | Easier for users to answer |
|
|
129
|
+
| **YAGNI** | Challenge unnecessary complexity |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Task Workflow (Development Tasks)
|
|
134
|
+
|
|
135
|
+
**Why this workflow?**
|
|
136
|
+
- Research Agent analyzes what code-spec files are needed
|
|
137
|
+
- Code-spec files are configured in jsonl files
|
|
138
|
+
- Implement Agent receives code-spec context via Hook injection
|
|
139
|
+
- Check Agent verifies against code-spec requirements
|
|
140
|
+
- Result: Code that follows project conventions automatically
|
|
141
|
+
|
|
142
|
+
### Overview: Two Entry Points
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
From Brainstorm (Complex Task):
|
|
146
|
+
PRD confirmed → Research → Configure Context → Activate → Implement → Check → Complete
|
|
147
|
+
|
|
148
|
+
From Simple Task:
|
|
149
|
+
Confirm → Create Task → Write PRD → Research → Configure Context → Activate → Implement → Check → Complete
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Key principle: Research happens AFTER requirements are clear (PRD exists).**
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Phase 1: Establish Requirements
|
|
157
|
+
|
|
158
|
+
#### Path A: From Brainstorm (skip to Phase 2)
|
|
159
|
+
|
|
160
|
+
PRD and task directory already exist from brainstorm. Skip directly to Phase 2.
|
|
161
|
+
|
|
162
|
+
#### Path B: From Simple Task
|
|
163
|
+
|
|
164
|
+
**Step 1: Confirm Understanding** `[AI]`
|
|
165
|
+
|
|
166
|
+
Quick confirm:
|
|
167
|
+
- What is the goal?
|
|
168
|
+
- What type of development? (frontend / backend / fullstack)
|
|
169
|
+
- Any specific requirements or constraints?
|
|
170
|
+
|
|
171
|
+
**Step 2: Create Task Directory** `[AI]`
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title>" --slug <name>)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Step 3: Write PRD** `[AI]`
|
|
178
|
+
|
|
179
|
+
Create `prd.md` in the task directory with:
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
# <Task Title>
|
|
183
|
+
|
|
184
|
+
## Goal
|
|
185
|
+
<What we're trying to achieve>
|
|
186
|
+
|
|
187
|
+
## Requirements
|
|
188
|
+
- <Requirement 1>
|
|
189
|
+
- <Requirement 2>
|
|
190
|
+
|
|
191
|
+
## Acceptance Criteria
|
|
192
|
+
- [ ] <Criterion 1>
|
|
193
|
+
- [ ] <Criterion 2>
|
|
194
|
+
|
|
195
|
+
## Technical Notes
|
|
196
|
+
<Any technical decisions or constraints>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### Phase 2: Prepare for Implementation (shared)
|
|
202
|
+
|
|
203
|
+
> Both paths converge here. PRD and task directory must exist before proceeding.
|
|
204
|
+
|
|
205
|
+
**Step 4: Code-Spec Depth Check** `[AI]`
|
|
206
|
+
|
|
207
|
+
If the task touches infra or cross-layer contracts, do not start implementation until code-spec depth is defined.
|
|
208
|
+
|
|
209
|
+
Trigger this requirement when the change includes any of:
|
|
210
|
+
- New or changed command/API signatures
|
|
211
|
+
- Database schema or migration changes
|
|
212
|
+
- Infra integrations (storage, queue, cache, secrets, env contracts)
|
|
213
|
+
- Cross-layer payload transformations
|
|
214
|
+
|
|
215
|
+
Must-have before proceeding:
|
|
216
|
+
- [ ] Target code-spec files to update are identified
|
|
217
|
+
- [ ] Concrete contract is defined (signature, fields, env keys)
|
|
218
|
+
- [ ] Validation and error matrix is defined
|
|
219
|
+
- [ ] At least one Good/Base/Bad case is defined
|
|
220
|
+
|
|
221
|
+
**Step 5: Research the Codebase** `[AI]`
|
|
222
|
+
|
|
223
|
+
Based on the confirmed PRD, call Research Agent to find relevant specs and patterns:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
Task(
|
|
227
|
+
subagent_type: "research",
|
|
228
|
+
prompt: "Analyze the codebase for this task:
|
|
229
|
+
|
|
230
|
+
Task: <goal from PRD>
|
|
231
|
+
Type: <frontend/backend/fullstack>
|
|
232
|
+
|
|
233
|
+
Please find:
|
|
234
|
+
1. Relevant code-spec files in .trellis/spec/
|
|
235
|
+
2. Existing code patterns to follow (find 2-3 examples)
|
|
236
|
+
3. Files that will likely need modification
|
|
237
|
+
|
|
238
|
+
Output:
|
|
239
|
+
## Relevant Code-Specs
|
|
240
|
+
- <path>: <why it's relevant>
|
|
241
|
+
|
|
242
|
+
## Code Patterns Found
|
|
243
|
+
- <pattern>: <example file path>
|
|
244
|
+
|
|
245
|
+
## Files to Modify
|
|
246
|
+
- <path>: <what change>",
|
|
247
|
+
model: "opus"
|
|
248
|
+
)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Step 6: Configure Context** `[AI]`
|
|
252
|
+
|
|
253
|
+
Initialize default context:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type>
|
|
257
|
+
# type: backend | frontend | fullstack
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Add code-spec files found by Research Agent:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# For each relevant code-spec and code pattern:
|
|
264
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
|
|
265
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Step 7: Activate Task** `[AI]`
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
python3 ./.trellis/scripts/task.py start "$TASK_DIR"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
This sets `.current-task` so hooks can inject context.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### Phase 3: Execute (shared)
|
|
279
|
+
|
|
280
|
+
**Step 8: Implement** `[AI]`
|
|
281
|
+
|
|
282
|
+
Call Implement Agent (code-spec context is auto-injected by hook):
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
Task(
|
|
286
|
+
subagent_type: "implement",
|
|
287
|
+
prompt: "Implement the task described in prd.md.
|
|
288
|
+
|
|
289
|
+
Follow all code-spec files that have been injected into your context.
|
|
290
|
+
Run lint and typecheck before finishing.",
|
|
291
|
+
model: "opus"
|
|
292
|
+
)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Step 9: Check Quality** `[AI]`
|
|
296
|
+
|
|
297
|
+
Call Check Agent (code-spec context is auto-injected by hook):
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
Task(
|
|
301
|
+
subagent_type: "check",
|
|
302
|
+
prompt: "Review all code changes against the code-spec requirements.
|
|
303
|
+
|
|
304
|
+
Fix any issues you find directly.
|
|
305
|
+
Ensure lint and typecheck pass.",
|
|
306
|
+
model: "opus"
|
|
307
|
+
)
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Step 10: Complete** `[AI]`
|
|
311
|
+
|
|
312
|
+
1. Verify lint and typecheck pass
|
|
313
|
+
2. Report what was implemented
|
|
314
|
+
3. Remind user to:
|
|
315
|
+
- Test the changes
|
|
316
|
+
- Commit when ready
|
|
317
|
+
- Run `/trellis:record-session` to record this session
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Continuing Existing Task
|
|
322
|
+
|
|
323
|
+
If `get_context.py` shows a current task:
|
|
324
|
+
|
|
325
|
+
1. Read the task's `prd.md` to understand the goal
|
|
326
|
+
2. Check `task.json` for current status and phase
|
|
327
|
+
3. Ask user: "Continue working on <task-name>?"
|
|
328
|
+
|
|
329
|
+
If yes, resume from the appropriate step (usually Step 7 or 8).
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Commands Reference
|
|
334
|
+
|
|
335
|
+
### User Commands `[USER]`
|
|
336
|
+
|
|
337
|
+
| Command | When to Use |
|
|
338
|
+
|---------|-------------|
|
|
339
|
+
| `/trellis:start` | Begin a session (this command) |
|
|
340
|
+
| `/trellis:brainstorm` | Clarify vague requirements (called from start) |
|
|
341
|
+
| `/trellis:parallel` | Complex tasks needing isolated worktree |
|
|
342
|
+
| `/trellis:finish-work` | Before committing changes |
|
|
343
|
+
| `/trellis:record-session` | After completing a task |
|
|
344
|
+
|
|
345
|
+
### AI Scripts `[AI]`
|
|
346
|
+
|
|
347
|
+
| Script | Purpose |
|
|
348
|
+
|--------|---------|
|
|
349
|
+
| `python3 ./.trellis/scripts/get_context.py` | Get session context |
|
|
350
|
+
| `python3 ./.trellis/scripts/task.py create` | Create task directory |
|
|
351
|
+
| `python3 ./.trellis/scripts/task.py init-context` | Initialize jsonl files |
|
|
352
|
+
| `python3 ./.trellis/scripts/task.py add-context` | Add code-spec/context file to jsonl |
|
|
353
|
+
| `python3 ./.trellis/scripts/task.py start` | Set current task |
|
|
354
|
+
| `python3 ./.trellis/scripts/task.py finish` | Clear current task |
|
|
355
|
+
| `python3 ./.trellis/scripts/task.py archive` | Archive completed task |
|
|
356
|
+
|
|
357
|
+
### Sub Agents `[AI]`
|
|
358
|
+
|
|
359
|
+
| Agent | Purpose | Hook Injection |
|
|
360
|
+
|-------|---------|----------------|
|
|
361
|
+
| research | Analyze codebase | No (reads directly) |
|
|
362
|
+
| implement | Write code | Yes (implement.jsonl) |
|
|
363
|
+
| check | Review & fix | Yes (check.jsonl) |
|
|
364
|
+
| debug | Fix specific issues | Yes (debug.jsonl) |
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Key Principle
|
|
369
|
+
|
|
370
|
+
> **Code-spec context is injected, not remembered.**
|
|
371
|
+
>
|
|
372
|
+
> The Task Workflow ensures agents receive relevant code-spec context automatically.
|
|
373
|
+
> This is more reliable than hoping the AI "remembers" conventions.
|