@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,515 @@
|
|
|
1
|
+
# Pick Task - 从任务池选择上游产出
|
|
2
|
+
|
|
3
|
+
从上游产出池选择一个任务开始开发,自动创建任务目录并注入上游产出。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 使用场景
|
|
8
|
+
|
|
9
|
+
| 当前角色 | 从哪个池子选择 | 选择什么 |
|
|
10
|
+
|---------|--------------|---------|
|
|
11
|
+
| **Designer** | `requirements` | PM 完成的 PRD |
|
|
12
|
+
| **Frontend** | `prototypes` | Designer 完成的原型代码 |
|
|
13
|
+
|
|
14
|
+
**注意**:PM 不从池子选择任务(PM 是流水线起点)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 命令格式
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/trellis:pick-task <pool-type> <task-id>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**参数**:
|
|
25
|
+
- `pool-type`: `requirements` 或 `prototypes`
|
|
26
|
+
- `task-id`: 上游任务的 ID(从池子列表获取)
|
|
27
|
+
|
|
28
|
+
**示例**:
|
|
29
|
+
```bash
|
|
30
|
+
/trellis:pick-task requirements user-login
|
|
31
|
+
/trellis:pick-task prototypes user-login
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 执行流程
|
|
37
|
+
|
|
38
|
+
### Step 1: 检查当前角色
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python3 .trellis/scripts/get_developer.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**输出示例**:`designer-bob`
|
|
45
|
+
|
|
46
|
+
**解析角色**:
|
|
47
|
+
```python
|
|
48
|
+
developer = "designer-bob"
|
|
49
|
+
role = developer.split('-')[0] # "designer"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**角色验证**:
|
|
53
|
+
- ✅ `designer` → 可以 pick `requirements`
|
|
54
|
+
- ✅ `frontend` → 可以 pick `prototypes`
|
|
55
|
+
- ❌ `pm` → 不允许 pick(PM 是起点)
|
|
56
|
+
|
|
57
|
+
**如果角色不匹配**:
|
|
58
|
+
```
|
|
59
|
+
Error: PM 不能从池子选择任务
|
|
60
|
+
|
|
61
|
+
PM 应该:
|
|
62
|
+
1. 创建新任务:python3 .trellis/scripts/task.py create "<title>"
|
|
63
|
+
2. 编写 PRD
|
|
64
|
+
3. 执行 /trellis:handoff
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**如果角色与池子不匹配**:
|
|
68
|
+
```
|
|
69
|
+
Error: Designer 不能从 prototypes 池选择任务
|
|
70
|
+
|
|
71
|
+
Designer 应该从 requirements 池选择:
|
|
72
|
+
/trellis:pick-task requirements <task-id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Step 2: 列出可用任务
|
|
78
|
+
|
|
79
|
+
调用 pool.py 列出指定池子的任务:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python3 .trellis/scripts/pool.py list <pool-type> --status available
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**输出示例**:
|
|
86
|
+
```
|
|
87
|
+
=== Requirements Pool ===
|
|
88
|
+
|
|
89
|
+
Available (2):
|
|
90
|
+
• user-login: 用户登录功能
|
|
91
|
+
Completed by: pm-alice
|
|
92
|
+
Path: deliverables/requirements/user-login
|
|
93
|
+
|
|
94
|
+
• payment: 支付功能
|
|
95
|
+
Completed by: pm-alice
|
|
96
|
+
Path: deliverables/requirements/payment
|
|
97
|
+
|
|
98
|
+
Consumed (0):
|
|
99
|
+
(none)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**AI 展示给用户**:
|
|
103
|
+
```
|
|
104
|
+
可用的 requirements 任务:
|
|
105
|
+
|
|
106
|
+
1. user-login - 用户登录功能
|
|
107
|
+
完成人: pm-alice
|
|
108
|
+
路径: deliverables/requirements/user-login
|
|
109
|
+
|
|
110
|
+
2. payment - 支付功能
|
|
111
|
+
完成人: pm-alice
|
|
112
|
+
路径: deliverables/requirements/payment
|
|
113
|
+
|
|
114
|
+
请选择任务 ID,或使用命令:
|
|
115
|
+
/trellis:pick-task requirements <task-id>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### Step 3: 验证任务状态
|
|
121
|
+
|
|
122
|
+
**读取任务池数据**:
|
|
123
|
+
```bash
|
|
124
|
+
cat .trellis/pool/<pool-type>.json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**查找任务**:
|
|
128
|
+
```python
|
|
129
|
+
# 伪代码
|
|
130
|
+
pool_data = json.loads(pool_file.read_text())
|
|
131
|
+
|
|
132
|
+
task = None
|
|
133
|
+
for t in pool_data["available"]:
|
|
134
|
+
if t["id"] == task_id:
|
|
135
|
+
task = t
|
|
136
|
+
break
|
|
137
|
+
|
|
138
|
+
if not task:
|
|
139
|
+
# 检查是否已被消费
|
|
140
|
+
for t in pool_data["consumed"]:
|
|
141
|
+
if t["id"] == task_id:
|
|
142
|
+
error(f"任务 '{task_id}' 已被消费")
|
|
143
|
+
return
|
|
144
|
+
|
|
145
|
+
error(f"任务 '{task_id}' 不存在")
|
|
146
|
+
return
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**任务状态验证**:
|
|
150
|
+
- ✅ `status == "available"` → 可以消费
|
|
151
|
+
- ❌ `status == "consumed"` → 拒绝,提示已被谁消费
|
|
152
|
+
|
|
153
|
+
**如果任务已被消费**:
|
|
154
|
+
```
|
|
155
|
+
Error: 任务 'user-login' 已被消费
|
|
156
|
+
|
|
157
|
+
消费者: designer-bob
|
|
158
|
+
消费时间: 2026-02-28 15:30:00
|
|
159
|
+
|
|
160
|
+
如需重新处理,请联系消费者或创建新任务
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### Step 4: 读取上游 HANDOFF 文档
|
|
166
|
+
|
|
167
|
+
**HANDOFF 文档路径**:
|
|
168
|
+
```python
|
|
169
|
+
handoff_path = task["handoff_doc"] # 例如:deliverables/requirements/user-login/HANDOFF.md
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**读取并展示给用户**(可选):
|
|
173
|
+
```
|
|
174
|
+
AI 提示:
|
|
175
|
+
"即将基于以下上游产出创建任务:
|
|
176
|
+
|
|
177
|
+
=== 上游交接文档摘要 ===
|
|
178
|
+
功能ID: user-login
|
|
179
|
+
功能名称: 用户登录功能
|
|
180
|
+
完成人: pm-alice
|
|
181
|
+
|
|
182
|
+
核心需求:
|
|
183
|
+
- 支持邮箱+密码登录
|
|
184
|
+
- 支持第三方登录(微信、GitHub)
|
|
185
|
+
...
|
|
186
|
+
|
|
187
|
+
是否继续?[Y/n]"
|
|
188
|
+
|
|
189
|
+
如果用户输入 n,中止执行。
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### Step 5: 创建任务目录
|
|
195
|
+
|
|
196
|
+
**生成任务目录名**:
|
|
197
|
+
```python
|
|
198
|
+
from datetime import datetime
|
|
199
|
+
|
|
200
|
+
date_prefix = datetime.now().strftime("%m-%d")
|
|
201
|
+
dir_name = f"{date_prefix}-{task_id}" # 例如:02-28-user-login
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**任务目录路径**:
|
|
205
|
+
```python
|
|
206
|
+
# Designer
|
|
207
|
+
task_dir = f".trellis/tasks/designer/{dir_name}"
|
|
208
|
+
|
|
209
|
+
# Frontend
|
|
210
|
+
task_dir = f".trellis/tasks/frontend/{dir_name}"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**注意**:按角色隔离任务目录
|
|
214
|
+
|
|
215
|
+
**创建目录**:
|
|
216
|
+
```bash
|
|
217
|
+
mkdir -p <task_dir>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
### Step 6: 生成 task.json
|
|
223
|
+
|
|
224
|
+
**基本信息**:
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"id": "<task-id>",
|
|
228
|
+
"name": "<task-id>",
|
|
229
|
+
"title": "<上游任务的 title>",
|
|
230
|
+
"description": "",
|
|
231
|
+
"role": "<当前角色>",
|
|
232
|
+
"status": "planning",
|
|
233
|
+
"dev_type": "frontend",
|
|
234
|
+
"scope": null,
|
|
235
|
+
"priority": "P2",
|
|
236
|
+
"creator": "<当前开发者>",
|
|
237
|
+
"assignee": "<当前开发者>",
|
|
238
|
+
"createdAt": "<今天日期>",
|
|
239
|
+
"completedAt": null,
|
|
240
|
+
"branch": null,
|
|
241
|
+
"base_branch": "main",
|
|
242
|
+
"worktree_path": null,
|
|
243
|
+
"current_phase": 0,
|
|
244
|
+
"next_action": [],
|
|
245
|
+
"commit": null,
|
|
246
|
+
"pr_url": null,
|
|
247
|
+
"subtasks": [],
|
|
248
|
+
"relatedFiles": [],
|
|
249
|
+
"notes": ""
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**写入文件**:
|
|
254
|
+
```bash
|
|
255
|
+
echo '<task-json>' > <task_dir>/task.json
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### Step 7: 生成 source.json
|
|
261
|
+
|
|
262
|
+
**引用上游产出**:
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"based_on": {
|
|
266
|
+
"type": "<pool-type-singular>",
|
|
267
|
+
"id": "<task-id>",
|
|
268
|
+
"path": "<上游产出路径>",
|
|
269
|
+
"handoff_doc": "<上游 HANDOFF 路径>"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**pool-type 转换**:
|
|
275
|
+
- `requirements` → `requirement`
|
|
276
|
+
- `prototypes` → `prototype`
|
|
277
|
+
|
|
278
|
+
**写入文件**:
|
|
279
|
+
```bash
|
|
280
|
+
echo '<source-json>' > <task_dir>/source.json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
### Step 8: 初始化上下文配置
|
|
286
|
+
|
|
287
|
+
**根据角色创建对应的 .jsonl 文件**:
|
|
288
|
+
|
|
289
|
+
#### Designer 角色
|
|
290
|
+
创建 `designer.jsonl`:
|
|
291
|
+
```jsonl
|
|
292
|
+
{"file": ".trellis/spec/roles/designer/index.md", "reason": "Designer工作规范"}
|
|
293
|
+
{"file": ".trellis/spec/roles/designer/prototype-guidelines.md", "reason": "原型代码规范"}
|
|
294
|
+
{"file": ".trellis/spec/frontend/component-guidelines.md", "reason": "组件开发规范"}
|
|
295
|
+
{"file": "<上游产出路径>", "type": "directory", "reason": "上游需求文档(自动注入)"}
|
|
296
|
+
{"file": "<上游HANDOFF路径>", "reason": "上游交接文档"}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
#### Frontend 角色
|
|
300
|
+
创建 `frontend.jsonl`:
|
|
301
|
+
```jsonl
|
|
302
|
+
{"file": ".trellis/spec/roles/frontend-impl/index.md", "reason": "Frontend工作规范"}
|
|
303
|
+
{"file": ".trellis/spec/roles/frontend-impl/api-integration.md", "reason": "API集成指南"}
|
|
304
|
+
{"file": ".trellis/spec/frontend/type-safety.md", "reason": "类型安全规范"}
|
|
305
|
+
{"file": ".trellis/spec/backend/api-conventions.md", "reason": "API约定(理解后端)"}
|
|
306
|
+
{"file": "<上游产出路径>", "type": "directory", "reason": "上游原型代码(自动注入)"}
|
|
307
|
+
{"file": "<上游HANDOFF路径>", "reason": "上游交接文档"}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**注意**:上游产出路径标记为 `"type": "directory"`,Hook 会自动读取目录下所有文件。
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### Step 9: 消费任务(更新池子状态)
|
|
315
|
+
|
|
316
|
+
调用 pool.py 标记任务为已消费:
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
python3 .trellis/scripts/pool.py consume <pool-type> <task-id> <当前开发者>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**池子状态变化**:
|
|
323
|
+
- 任务从 `available` 列表移动到 `consumed` 列表
|
|
324
|
+
- 添加 `consumed_by` 和 `consumed_at` 字段
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
### Step 10: 设置为当前任务
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
python3 .trellis/scripts/task.py start <task_dir>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**效果**:
|
|
335
|
+
- 更新 `.trellis/.current-task` 为新任务路径
|
|
336
|
+
- Hook 会自动注入上游产出
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
### Step 11: 输出通知信息
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
✅ 任务已选择并创建!
|
|
344
|
+
|
|
345
|
+
任务目录: <task_dir>
|
|
346
|
+
基于上游: <pool-type>/<task-id>
|
|
347
|
+
|
|
348
|
+
已注入上游产出:
|
|
349
|
+
- HANDOFF: <上游HANDOFF路径>
|
|
350
|
+
- 产出文件: <上游产出路径>
|
|
351
|
+
|
|
352
|
+
下一步:
|
|
353
|
+
1. 查看上游交接文档:cat <task_dir>/source.json
|
|
354
|
+
2. 阅读角色规范:cat .trellis/spec/roles/<role>/index.md
|
|
355
|
+
3. 开始开发
|
|
356
|
+
4. 完成后执行:/trellis:handoff
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## 错误处理
|
|
362
|
+
|
|
363
|
+
### 错误场景1:PM 尝试 pick 任务
|
|
364
|
+
```
|
|
365
|
+
Error: PM 不能从池子选择任务
|
|
366
|
+
|
|
367
|
+
PM 是流水线起点,应该:
|
|
368
|
+
1. 创建新任务:python3 .trellis/scripts/task.py create "<title>"
|
|
369
|
+
2. 设置角色:python3 .trellis/scripts/task.py set-role <dir> pm
|
|
370
|
+
3. 编写 PRD
|
|
371
|
+
4. 执行 /trellis:handoff
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### 错误场景2:角色与池子不匹配
|
|
375
|
+
```
|
|
376
|
+
Error: Frontend 不能从 requirements 池选择任务
|
|
377
|
+
|
|
378
|
+
Frontend 应该从 prototypes 池选择:
|
|
379
|
+
/trellis:pick-task prototypes <task-id>
|
|
380
|
+
|
|
381
|
+
流程说明:
|
|
382
|
+
requirements → Designer → prototypes → Frontend
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### 错误场景3:任务不存在
|
|
386
|
+
```
|
|
387
|
+
Error: 任务 'user-login' 不存在于 requirements 池
|
|
388
|
+
|
|
389
|
+
可用任务:
|
|
390
|
+
/trellis:pick-task requirements payment
|
|
391
|
+
/trellis:pick-task requirements shopping-cart
|
|
392
|
+
|
|
393
|
+
或查看完整列表:
|
|
394
|
+
python3 .trellis/scripts/pool.py list requirements
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### 错误场景4:任务已被消费
|
|
398
|
+
```
|
|
399
|
+
Error: 任务 'user-login' 已被消费
|
|
400
|
+
|
|
401
|
+
消费者: designer-bob
|
|
402
|
+
消费时间: 2026-02-28 15:30:00
|
|
403
|
+
|
|
404
|
+
如需重新处理:
|
|
405
|
+
1. 联系 designer-bob 确认状态
|
|
406
|
+
2. 或创建新任务基于相同需求
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### 错误场景5:上游 HANDOFF 缺失
|
|
410
|
+
```
|
|
411
|
+
Warning: 上游 HANDOFF 文档缺失
|
|
412
|
+
|
|
413
|
+
路径: deliverables/requirements/user-login/HANDOFF.md
|
|
414
|
+
|
|
415
|
+
将继续创建任务,但上游交接信息可能不完整。
|
|
416
|
+
|
|
417
|
+
是否继续?[y/N]
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### 错误场景6:任务目录已存在
|
|
421
|
+
```
|
|
422
|
+
Error: 任务目录已存在:.trellis/tasks/designer/02-28-user-login
|
|
423
|
+
|
|
424
|
+
可能原因:
|
|
425
|
+
- 之前创建过相同任务
|
|
426
|
+
- 日期和任务ID重复
|
|
427
|
+
|
|
428
|
+
解决方案:
|
|
429
|
+
1. 删除旧目录:rm -rf <task_dir>
|
|
430
|
+
2. 或使用不同的任务ID
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## 示例执行流程
|
|
436
|
+
|
|
437
|
+
### Designer 选择 PM 的需求
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
# 1. 查看可用需求
|
|
441
|
+
/trellis:pick-task requirements
|
|
442
|
+
|
|
443
|
+
AI 输出:
|
|
444
|
+
"可用的 requirements 任务:
|
|
445
|
+
1. user-login - 用户登录功能 (完成人: pm-alice)
|
|
446
|
+
2. payment - 支付功能 (完成人: pm-alice)"
|
|
447
|
+
|
|
448
|
+
# 2. 选择任务
|
|
449
|
+
/trellis:pick-task requirements user-login
|
|
450
|
+
|
|
451
|
+
AI 执行流程:
|
|
452
|
+
1. 检查角色:designer-bob → role=designer ✅
|
|
453
|
+
2. 验证池子匹配:designer + requirements ✅
|
|
454
|
+
3. 读取任务:user-login (status=available) ✅
|
|
455
|
+
4. 读取 HANDOFF:deliverables/requirements/user-login/HANDOFF.md
|
|
456
|
+
5. 创建目录:.trellis/tasks/designer/02-28-user-login/
|
|
457
|
+
6. 生成 task.json (role=designer)
|
|
458
|
+
7. 生成 source.json (based_on=requirement/user-login)
|
|
459
|
+
8. 创建 designer.jsonl (包含上游产出)
|
|
460
|
+
9. 消费任务:pool.py consume requirements user-login designer-bob
|
|
461
|
+
10. 设置当前:task.py start .trellis/tasks/designer/02-28-user-login
|
|
462
|
+
11. 输出通知
|
|
463
|
+
|
|
464
|
+
AI 输出:
|
|
465
|
+
"✅ 任务已选择并创建!
|
|
466
|
+
|
|
467
|
+
任务目录: .trellis/tasks/designer/02-28-user-login
|
|
468
|
+
基于上游: requirement/user-login
|
|
469
|
+
|
|
470
|
+
下一步:
|
|
471
|
+
1. 查看需求:cat deliverables/requirements/user-login/HANDOFF.md
|
|
472
|
+
2. 阅读规范:cat .trellis/spec/roles/designer/index.md
|
|
473
|
+
3. 开始创建原型
|
|
474
|
+
4. 完成后执行:/trellis:handoff"
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## 高级功能(可选)
|
|
480
|
+
|
|
481
|
+
### 批量查看任务
|
|
482
|
+
```bash
|
|
483
|
+
# 用户可以不指定任务ID,先查看列表
|
|
484
|
+
/trellis:pick-task requirements
|
|
485
|
+
|
|
486
|
+
AI 展示列表,等待用户选择
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
### 任务预览
|
|
490
|
+
```bash
|
|
491
|
+
# 在选择任务前预览 HANDOFF 内容
|
|
492
|
+
/trellis:pick-task requirements user-login --preview
|
|
493
|
+
|
|
494
|
+
AI 只展示 HANDOFF 摘要,不创建任务
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## 注意事项
|
|
500
|
+
|
|
501
|
+
1. **角色隔离**:任务目录按角色隔离(`.trellis/tasks/{role}/`)
|
|
502
|
+
2. **上游注入**:`source.json` 确保 Hook 能找到上游产出
|
|
503
|
+
3. **池子状态**:成功 pick 后,任务从 `available` 变为 `consumed`
|
|
504
|
+
4. **防重复**:如果任务目录已存在,拒绝创建(或提示用户确认覆盖)
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## 命令别名(可选)
|
|
509
|
+
|
|
510
|
+
用户可能使用以下变体,AI 应识别并执行相同逻辑:
|
|
511
|
+
- `/trellis:pick-task`
|
|
512
|
+
- `/pick-task`
|
|
513
|
+
- `/pick`
|
|
514
|
+
- "从需求池选择任务"
|
|
515
|
+
- "选择原型任务"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[!] **Prerequisite**: This command should only be used AFTER the human has tested and committed the code.
|
|
2
|
+
|
|
3
|
+
**AI must NOT execute git commit** - only read history (`git log`, `git status`, `git diff`).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Record Work Progress (Simplified - Only 2 Steps)
|
|
8
|
+
|
|
9
|
+
### Step 1: Get Context
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python3 ./.trellis/scripts/get_context.py
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Step 2: One-Click Add Session
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Method 1: Simple parameters
|
|
19
|
+
python3 ./.trellis/scripts/add_session.py \
|
|
20
|
+
--title "Session Title" \
|
|
21
|
+
--commit "hash1,hash2" \
|
|
22
|
+
--summary "Brief summary of what was done"
|
|
23
|
+
|
|
24
|
+
# Method 2: Pass detailed content via stdin
|
|
25
|
+
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
26
|
+
| Feature | Description |
|
|
27
|
+
|---------|-------------|
|
|
28
|
+
| New API | Added user authentication endpoint |
|
|
29
|
+
| Frontend | Updated login form |
|
|
30
|
+
|
|
31
|
+
**Updated Files**:
|
|
32
|
+
- `packages/api/modules/auth/router.ts`
|
|
33
|
+
- `apps/web/modules/auth/components/login-form.tsx`
|
|
34
|
+
EOF
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Auto-completes**:
|
|
38
|
+
- [OK] Appends session to journal-N.md
|
|
39
|
+
- [OK] Auto-detects line count, creates new file if >2000 lines
|
|
40
|
+
- [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Archive Completed Task (if any)
|
|
45
|
+
|
|
46
|
+
If a task was completed this session:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 ./.trellis/scripts/task.py archive <task-name>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Script Command Reference
|
|
55
|
+
|
|
56
|
+
| Command | Purpose |
|
|
57
|
+
|---------|---------|
|
|
58
|
+
| `python3 ./.trellis/scripts/get_context.py` | Get all context info |
|
|
59
|
+
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended)** |
|
|
60
|
+
| `python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>]` | Create new task directory |
|
|
61
|
+
| `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task |
|
|
62
|
+
| `python3 ./.trellis/scripts/task.py list` | List active tasks |
|