@mindfoldhq/trellis 0.4.0 → 0.5.0-beta.10
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/dist/cli/index.js +0 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +10 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +382 -120
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +178 -61
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/antigravity.d.ts +3 -4
- package/dist/configurators/antigravity.d.ts.map +1 -1
- package/dist/configurators/antigravity.js +17 -10
- package/dist/configurators/antigravity.js.map +1 -1
- package/dist/configurators/claude.d.ts +5 -28
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +30 -51
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/codebuddy.d.ts +6 -7
- package/dist/configurators/codebuddy.d.ts.map +1 -1
- package/dist/configurators/codebuddy.js +23 -51
- package/dist/configurators/codebuddy.js.map +1 -1
- package/dist/configurators/codex.d.ts +3 -6
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +29 -12
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/copilot.d.ts +6 -5
- package/dist/configurators/copilot.d.ts.map +1 -1
- package/dist/configurators/copilot.js +42 -13
- package/dist/configurators/copilot.js.map +1 -1
- package/dist/configurators/cursor.d.ts +6 -1
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +22 -45
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/droid.d.ts +6 -1
- package/dist/configurators/droid.d.ts.map +1 -1
- package/dist/configurators/droid.js +23 -41
- package/dist/configurators/droid.js.map +1 -1
- package/dist/configurators/gemini.d.ts +8 -4
- package/dist/configurators/gemini.d.ts.map +1 -1
- package/dist/configurators/gemini.js +28 -47
- package/dist/configurators/gemini.js.map +1 -1
- package/dist/configurators/index.d.ts +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +146 -100
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/kilo.d.ts +3 -4
- package/dist/configurators/kilo.d.ts.map +1 -1
- package/dist/configurators/kilo.js +19 -46
- package/dist/configurators/kilo.js.map +1 -1
- package/dist/configurators/kiro.d.ts +4 -4
- package/dist/configurators/kiro.d.ts.map +1 -1
- package/dist/configurators/kiro.js +18 -14
- package/dist/configurators/kiro.js.map +1 -1
- package/dist/configurators/opencode.d.ts +7 -25
- package/dist/configurators/opencode.d.ts.map +1 -1
- package/dist/configurators/opencode.js +57 -56
- package/dist/configurators/opencode.js.map +1 -1
- package/dist/configurators/qoder.d.ts +6 -3
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +27 -46
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/shared.d.ts +68 -3
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +274 -3
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/windsurf.d.ts +3 -4
- package/dist/configurators/windsurf.d.ts.map +1 -1
- package/dist/configurators/windsurf.js +17 -10
- package/dist/configurators/windsurf.js.map +1 -1
- package/dist/configurators/workflow.d.ts +0 -3
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +1 -7
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.4.0.json +1 -1
- package/dist/migrations/manifests/0.5.0-beta.0.json +1646 -0
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.5.json +222 -0
- package/dist/migrations/manifests/0.5.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.9.json +48 -0
- package/dist/templates/claude/agents/{check.md → trellis-check.md} +3 -31
- package/dist/templates/claude/agents/{implement.md → trellis-implement.md} +1 -2
- package/dist/templates/claude/agents/trellis-research.md +137 -0
- package/dist/templates/claude/index.d.ts +5 -37
- package/dist/templates/claude/index.d.ts.map +1 -1
- package/dist/templates/claude/index.js +3 -42
- package/dist/templates/claude/index.js.map +1 -1
- package/dist/templates/claude/settings.json +6 -4
- package/dist/templates/{iflow/agents/check.md → codebuddy/agents/trellis-check.md} +3 -31
- package/dist/templates/{iflow/agents/implement.md → codebuddy/agents/trellis-implement.md} +1 -2
- package/dist/templates/codebuddy/agents/trellis-research.md +137 -0
- package/dist/templates/codebuddy/index.d.ts +6 -16
- package/dist/templates/codebuddy/index.d.ts.map +1 -1
- package/dist/templates/codebuddy/index.js +6 -36
- package/dist/templates/codebuddy/index.js.map +1 -1
- package/dist/templates/codebuddy/settings.json +59 -0
- package/dist/templates/codex/agents/trellis-check.toml +38 -0
- package/dist/templates/codex/agents/{implement.toml → trellis-implement.toml} +1 -1
- package/dist/templates/codex/agents/trellis-research.toml +60 -0
- package/dist/templates/codex/config.toml +10 -0
- package/dist/templates/codex/hooks/session-start.py +65 -29
- package/dist/templates/codex/hooks.json +11 -0
- package/dist/templates/codex/index.d.ts +0 -1
- package/dist/templates/codex/index.d.ts.map +1 -1
- package/dist/templates/codex/index.js +1 -8
- package/dist/templates/codex/index.js.map +1 -1
- package/dist/templates/codex/skills/start/SKILL.md +1 -1
- package/dist/templates/common/commands/continue.md +51 -0
- package/dist/templates/common/commands/finish-work.md +32 -0
- package/dist/templates/common/commands/start.md +56 -0
- package/dist/templates/common/index.d.ts +28 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +55 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/{droid/commands/trellis → common/skills}/brainstorm.md +51 -12
- package/dist/templates/{iflow/commands/trellis → common/skills}/break-loop.md +4 -4
- package/dist/templates/common/skills/check.md +87 -0
- package/dist/templates/{codebuddy/commands/trellis → common/skills}/update-spec.md +18 -21
- package/dist/templates/copilot/hooks/session-start.py +65 -29
- package/dist/templates/copilot/hooks.json +8 -0
- package/dist/templates/copilot/prompts/start.prompt.md +13 -16
- package/dist/templates/cursor/agents/trellis-check.md +94 -0
- package/dist/templates/cursor/agents/trellis-implement.md +94 -0
- package/dist/templates/cursor/agents/trellis-research.md +137 -0
- package/dist/templates/cursor/hooks.json +24 -0
- package/dist/templates/cursor/index.d.ts +6 -17
- package/dist/templates/cursor/index.d.ts.map +1 -1
- package/dist/templates/cursor/index.js +6 -37
- package/dist/templates/cursor/index.js.map +1 -1
- package/dist/templates/droid/droids/trellis-check.md +94 -0
- package/dist/templates/droid/droids/trellis-implement.md +94 -0
- package/dist/templates/droid/droids/trellis-research.md +137 -0
- package/dist/templates/droid/index.d.ts +7 -19
- package/dist/templates/droid/index.d.ts.map +1 -1
- package/dist/templates/droid/index.js +7 -39
- package/dist/templates/droid/index.js.map +1 -1
- package/dist/templates/droid/settings.json +59 -0
- package/dist/templates/extract.d.ts +7 -193
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +7 -310
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/gemini/agents/trellis-check.md +94 -0
- package/dist/templates/gemini/agents/trellis-implement.md +94 -0
- package/dist/templates/gemini/agents/trellis-research.md +137 -0
- package/dist/templates/gemini/index.d.ts +6 -14
- package/dist/templates/gemini/index.d.ts.map +1 -1
- package/dist/templates/gemini/index.js +6 -37
- package/dist/templates/gemini/index.js.map +1 -1
- package/dist/templates/gemini/settings.json +28 -0
- package/dist/templates/kiro/agents/trellis-check.json +13 -0
- package/dist/templates/kiro/agents/trellis-implement.json +13 -0
- package/dist/templates/kiro/agents/trellis-research.json +21 -0
- package/dist/templates/kiro/index.d.ts +11 -11
- package/dist/templates/kiro/index.d.ts.map +1 -1
- package/dist/templates/kiro/index.js +11 -33
- package/dist/templates/kiro/index.js.map +1 -1
- package/dist/templates/opencode/agents/{check.md → trellis-check.md} +3 -30
- package/dist/templates/opencode/agents/{implement.md → trellis-implement.md} +1 -1
- package/dist/templates/opencode/agents/{research.md → trellis-research.md} +1 -2
- package/dist/templates/opencode/plugins/inject-subagent-context.js +18 -190
- package/dist/templates/opencode/plugins/inject-workflow-state.js +172 -0
- package/dist/templates/opencode/plugins/session-start.js +76 -39
- package/dist/templates/qoder/agents/trellis-check.md +94 -0
- package/dist/templates/qoder/agents/trellis-implement.md +94 -0
- package/dist/templates/qoder/agents/trellis-research.md +137 -0
- package/dist/templates/qoder/index.d.ts +7 -10
- package/dist/templates/qoder/index.d.ts.map +1 -1
- package/dist/templates/qoder/index.js +7 -32
- package/dist/templates/qoder/index.js.map +1 -1
- package/dist/templates/qoder/settings.json +47 -0
- package/dist/templates/shared-hooks/index.d.ts +19 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +30 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/{iflow/hooks → shared-hooks}/inject-subagent-context.py +77 -266
- package/dist/templates/shared-hooks/inject-workflow-state.py +244 -0
- package/dist/templates/{claude/hooks → shared-hooks}/session-start.py +172 -55
- package/dist/templates/template-utils.d.ts +26 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +60 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/templates/trellis/config.yaml +6 -0
- package/dist/templates/trellis/index.d.ts +1 -15
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -29
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/cli_adapter.py +31 -8
- package/dist/templates/trellis/scripts/common/config.py +126 -1
- package/dist/templates/trellis/scripts/common/git_context.py +25 -2
- package/dist/templates/trellis/scripts/common/task_context.py +23 -28
- package/dist/templates/trellis/scripts/common/task_store.py +0 -12
- package/dist/templates/trellis/scripts/common/types.py +0 -2
- package/dist/templates/trellis/scripts/common/workflow_phase.py +176 -0
- package/dist/templates/trellis/scripts/task.py +13 -35
- package/dist/templates/trellis/workflow.md +283 -298
- package/dist/types/ai-tools.d.ts +30 -3
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +119 -15
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +8 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/project-detector.d.ts +2 -0
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +120 -11
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/task-json.d.ts +46 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +49 -0
- package/dist/utils/task-json.js.map +1 -0
- package/package.json +3 -2
- package/dist/configurators/iflow.d.ts +0 -33
- package/dist/configurators/iflow.d.ts.map +0 -1
- package/dist/configurators/iflow.js +0 -99
- package/dist/configurators/iflow.js.map +0 -1
- package/dist/templates/antigravity/index.d.ts +0 -12
- package/dist/templates/antigravity/index.d.ts.map +0 -1
- package/dist/templates/antigravity/index.js +0 -29
- package/dist/templates/antigravity/index.js.map +0 -1
- package/dist/templates/claude/agents/debug.md +0 -106
- package/dist/templates/claude/agents/dispatch.md +0 -213
- package/dist/templates/claude/agents/plan.md +0 -396
- package/dist/templates/claude/agents/research.md +0 -120
- package/dist/templates/claude/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/claude/commands/trellis/break-loop.md +0 -125
- package/dist/templates/claude/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/claude/commands/trellis/check.md +0 -25
- package/dist/templates/claude/commands/trellis/create-command.md +0 -154
- package/dist/templates/claude/commands/trellis/finish-work.md +0 -153
- package/dist/templates/claude/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/claude/commands/trellis/onboard.md +0 -358
- package/dist/templates/claude/commands/trellis/parallel.md +0 -192
- package/dist/templates/claude/commands/trellis/record-session.md +0 -62
- package/dist/templates/claude/commands/trellis/start.md +0 -393
- package/dist/templates/claude/commands/trellis/update-spec.md +0 -354
- package/dist/templates/claude/hooks/inject-subagent-context.py +0 -803
- package/dist/templates/claude/hooks/ralph-loop.py +0 -396
- package/dist/templates/codebuddy/commands/trellis/before-dev.md +0 -29
- package/dist/templates/codebuddy/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/codebuddy/commands/trellis/break-loop.md +0 -107
- package/dist/templates/codebuddy/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/codebuddy/commands/trellis/check.md +0 -25
- package/dist/templates/codebuddy/commands/trellis/create-command.md +0 -154
- package/dist/templates/codebuddy/commands/trellis/finish-work.md +0 -143
- package/dist/templates/codebuddy/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/codebuddy/commands/trellis/onboard.md +0 -358
- package/dist/templates/codebuddy/commands/trellis/record-session.md +0 -61
- package/dist/templates/codebuddy/commands/trellis/start.md +0 -373
- package/dist/templates/codex/agents/check.toml +0 -23
- package/dist/templates/codex/agents/research.toml +0 -26
- package/dist/templates/codex/codex-skills/parallel/SKILL.md +0 -194
- package/dist/templates/cursor/commands/trellis-before-dev.md +0 -29
- package/dist/templates/cursor/commands/trellis-brainstorm.md +0 -487
- package/dist/templates/cursor/commands/trellis-break-loop.md +0 -107
- package/dist/templates/cursor/commands/trellis-check-cross-layer.md +0 -153
- package/dist/templates/cursor/commands/trellis-check.md +0 -25
- package/dist/templates/cursor/commands/trellis-create-command.md +0 -154
- package/dist/templates/cursor/commands/trellis-finish-work.md +0 -143
- package/dist/templates/cursor/commands/trellis-integrate-skill.md +0 -219
- package/dist/templates/cursor/commands/trellis-onboard.md +0 -358
- package/dist/templates/cursor/commands/trellis-record-session.md +0 -62
- package/dist/templates/cursor/commands/trellis-start.md +0 -373
- package/dist/templates/cursor/commands/trellis-update-spec.md +0 -354
- package/dist/templates/droid/commands/trellis/before-dev.md +0 -33
- package/dist/templates/droid/commands/trellis/break-loop.md +0 -111
- package/dist/templates/droid/commands/trellis/check-cross-layer.md +0 -157
- package/dist/templates/droid/commands/trellis/check.md +0 -29
- package/dist/templates/droid/commands/trellis/create-command.md +0 -158
- package/dist/templates/droid/commands/trellis/finish-work.md +0 -147
- package/dist/templates/droid/commands/trellis/integrate-skill.md +0 -223
- package/dist/templates/droid/commands/trellis/onboard.md +0 -362
- package/dist/templates/droid/commands/trellis/record-session.md +0 -66
- package/dist/templates/droid/commands/trellis/start.md +0 -377
- package/dist/templates/droid/commands/trellis/update-spec.md +0 -358
- package/dist/templates/gemini/commands/trellis/before-dev.toml +0 -33
- package/dist/templates/gemini/commands/trellis/brainstorm.toml +0 -435
- package/dist/templates/gemini/commands/trellis/break-loop.toml +0 -129
- package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +0 -147
- package/dist/templates/gemini/commands/trellis/check.toml +0 -29
- package/dist/templates/gemini/commands/trellis/create-command.toml +0 -119
- package/dist/templates/gemini/commands/trellis/finish-work.toml +0 -133
- package/dist/templates/gemini/commands/trellis/integrate-skill.toml +0 -104
- package/dist/templates/gemini/commands/trellis/onboard.toml +0 -111
- package/dist/templates/gemini/commands/trellis/record-session.toml +0 -66
- package/dist/templates/gemini/commands/trellis/start.toml +0 -354
- package/dist/templates/gemini/commands/trellis/update-spec.toml +0 -132
- package/dist/templates/iflow/agents/debug.md +0 -106
- package/dist/templates/iflow/agents/dispatch.md +0 -213
- package/dist/templates/iflow/agents/plan.md +0 -396
- package/dist/templates/iflow/agents/research.md +0 -120
- package/dist/templates/iflow/commands/trellis/before-dev.md +0 -29
- package/dist/templates/iflow/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/iflow/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/iflow/commands/trellis/check.md +0 -25
- package/dist/templates/iflow/commands/trellis/create-command.md +0 -152
- package/dist/templates/iflow/commands/trellis/finish-work.md +0 -153
- package/dist/templates/iflow/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/iflow/commands/trellis/onboard.md +0 -358
- package/dist/templates/iflow/commands/trellis/parallel.md +0 -192
- package/dist/templates/iflow/commands/trellis/record-session.md +0 -62
- package/dist/templates/iflow/commands/trellis/start.md +0 -393
- package/dist/templates/iflow/commands/trellis/update-spec.md +0 -354
- package/dist/templates/iflow/hooks/ralph-loop.py +0 -395
- package/dist/templates/iflow/hooks/session-start.py +0 -403
- package/dist/templates/iflow/index.d.ts +0 -54
- package/dist/templates/iflow/index.d.ts.map +0 -1
- package/dist/templates/iflow/index.js +0 -85
- package/dist/templates/iflow/index.js.map +0 -1
- package/dist/templates/iflow/settings.json +0 -60
- package/dist/templates/kilo/index.d.ts +0 -16
- package/dist/templates/kilo/index.d.ts.map +0 -1
- package/dist/templates/kilo/index.js +0 -39
- package/dist/templates/kilo/index.js.map +0 -1
- package/dist/templates/kilo/workflows/before-dev.md +0 -29
- package/dist/templates/kilo/workflows/brainstorm.md +0 -487
- package/dist/templates/kilo/workflows/break-loop.md +0 -125
- package/dist/templates/kilo/workflows/check-cross-layer.md +0 -153
- package/dist/templates/kilo/workflows/check.md +0 -25
- package/dist/templates/kilo/workflows/create-command.md +0 -152
- package/dist/templates/kilo/workflows/finish-work.md +0 -129
- package/dist/templates/kilo/workflows/integrate-skill.md +0 -219
- package/dist/templates/kilo/workflows/onboard.md +0 -358
- package/dist/templates/kilo/workflows/parallel.md +0 -193
- package/dist/templates/kilo/workflows/record-session.md +0 -62
- package/dist/templates/kilo/workflows/start.md +0 -387
- package/dist/templates/kilo/workflows/update-spec.md +0 -285
- package/dist/templates/kiro/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +0 -492
- package/dist/templates/kiro/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/kiro/skills/check/SKILL.md +0 -30
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/kiro/skills/create-command/SKILL.md +0 -101
- package/dist/templates/kiro/skills/finish-work/SKILL.md +0 -148
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/kiro/skills/onboard/SKILL.md +0 -363
- package/dist/templates/kiro/skills/record-session/SKILL.md +0 -67
- package/dist/templates/kiro/skills/start/SKILL.md +0 -351
- package/dist/templates/kiro/skills/update-spec/SKILL.md +0 -335
- package/dist/templates/markdown/spec/backend/directory-structure.md +0 -292
- package/dist/templates/markdown/spec/backend/index.md +0 -40
- package/dist/templates/markdown/spec/backend/script-conventions.md +0 -742
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +0 -118
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +0 -394
- package/dist/templates/opencode/agents/debug.md +0 -129
- package/dist/templates/opencode/agents/dispatch.md +0 -223
- package/dist/templates/opencode/agents/trellis-plan.md +0 -427
- package/dist/templates/opencode/commands/trellis/before-dev.md +0 -29
- package/dist/templates/opencode/commands/trellis/brainstorm.md +0 -487
- package/dist/templates/opencode/commands/trellis/break-loop.md +0 -125
- package/dist/templates/opencode/commands/trellis/check-cross-layer.md +0 -153
- package/dist/templates/opencode/commands/trellis/check.md +0 -25
- package/dist/templates/opencode/commands/trellis/create-command.md +0 -154
- package/dist/templates/opencode/commands/trellis/finish-work.md +0 -144
- package/dist/templates/opencode/commands/trellis/integrate-skill.md +0 -219
- package/dist/templates/opencode/commands/trellis/migrate-specs.md +0 -0
- package/dist/templates/opencode/commands/trellis/onboard.md +0 -358
- package/dist/templates/opencode/commands/trellis/parallel.md +0 -193
- package/dist/templates/opencode/commands/trellis/record-session.md +0 -62
- package/dist/templates/opencode/commands/trellis/start.md +0 -351
- package/dist/templates/opencode/commands/trellis/update-spec.md +0 -354
- package/dist/templates/qoder/skills/before-dev/SKILL.md +0 -34
- package/dist/templates/qoder/skills/brainstorm/SKILL.md +0 -492
- package/dist/templates/qoder/skills/break-loop/SKILL.md +0 -130
- package/dist/templates/qoder/skills/check/SKILL.md +0 -30
- package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +0 -158
- package/dist/templates/qoder/skills/create-command/SKILL.md +0 -101
- package/dist/templates/qoder/skills/finish-work/SKILL.md +0 -134
- package/dist/templates/qoder/skills/integrate-skill/SKILL.md +0 -221
- package/dist/templates/qoder/skills/onboard/SKILL.md +0 -363
- package/dist/templates/qoder/skills/record-session/SKILL.md +0 -67
- package/dist/templates/qoder/skills/start/SKILL.md +0 -388
- package/dist/templates/qoder/skills/update-spec/SKILL.md +0 -290
- package/dist/templates/trellis/scripts/common/phase.py +0 -254
- package/dist/templates/trellis/scripts/common/registry.py +0 -335
- package/dist/templates/trellis/scripts/common/worktree.py +0 -305
- package/dist/templates/trellis/scripts/create_bootstrap.py +0 -298
- package/dist/templates/trellis/scripts/multi_agent/__init__.py +0 -5
- package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +0 -17
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +0 -398
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +0 -620
- package/dist/templates/trellis/scripts/multi_agent/plan.py +0 -213
- package/dist/templates/trellis/scripts/multi_agent/start.py +0 -539
- package/dist/templates/trellis/scripts/multi_agent/status.py +0 -76
- package/dist/templates/trellis/scripts/multi_agent/status_display.py +0 -542
- package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +0 -225
- package/dist/templates/trellis/scripts-shell-archive/add-session.sh +0 -384
- package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +0 -129
- package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +0 -263
- package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +0 -208
- package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +0 -150
- package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +0 -247
- package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +0 -142
- package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +0 -151
- package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +0 -128
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +0 -299
- package/dist/templates/trellis/scripts-shell-archive/get-context.sh +0 -7
- package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +0 -15
- package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +0 -34
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +0 -396
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +0 -241
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +0 -207
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +0 -317
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +0 -828
- package/dist/templates/trellis/scripts-shell-archive/task.sh +0 -1204
- package/dist/templates/trellis/worktree.yaml +0 -47
- package/dist/templates/windsurf/index.d.ts +0 -21
- package/dist/templates/windsurf/index.d.ts.map +0 -1
- package/dist/templates/windsurf/index.js +0 -44
- package/dist/templates/windsurf/index.js.map +0 -1
- package/dist/templates/windsurf/workflows/trellis-before-dev.md +0 -31
- package/dist/templates/windsurf/workflows/trellis-brainstorm.md +0 -491
- package/dist/templates/windsurf/workflows/trellis-break-loop.md +0 -111
- package/dist/templates/windsurf/workflows/trellis-check-cross-layer.md +0 -157
- package/dist/templates/windsurf/workflows/trellis-check.md +0 -27
- package/dist/templates/windsurf/workflows/trellis-create-command.md +0 -154
- package/dist/templates/windsurf/workflows/trellis-finish-work.md +0 -147
- package/dist/templates/windsurf/workflows/trellis-integrate-skill.md +0 -220
- package/dist/templates/windsurf/workflows/trellis-onboard.md +0 -362
- package/dist/templates/windsurf/workflows/trellis-record-session.md +0 -66
- package/dist/templates/windsurf/workflows/trellis-start.md +0 -373
- package/dist/templates/windsurf/workflows/trellis-update-spec.md +0 -358
- /package/dist/templates/{claude/commands/trellis → common/skills}/before-dev.md +0 -0
- /package/dist/templates/{claude/hooks → shared-hooks}/statusline.py +0 -0
|
@@ -1,416 +1,401 @@
|
|
|
1
1
|
# Development Workflow
|
|
2
2
|
|
|
3
|
-
> Based on [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
|
|
4
|
-
|
|
5
3
|
---
|
|
6
4
|
|
|
7
|
-
##
|
|
5
|
+
## Core Principles
|
|
8
6
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3.
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
14
|
-
6. [File Descriptions](#file-descriptions)
|
|
15
|
-
7. [Best Practices](#best-practices)
|
|
7
|
+
1. **Plan before code** — figure out what to do before you start
|
|
8
|
+
2. **Specs injected, not remembered** — guidelines are injected via hook/skill, not recalled from memory
|
|
9
|
+
3. **Persist everything** — research, decisions, and lessons all go to files; conversations get compacted, files don't
|
|
10
|
+
4. **Incremental development** — one task at a time
|
|
11
|
+
5. **Capture learnings** — after each task, review and write new knowledge back to spec
|
|
16
12
|
|
|
17
13
|
---
|
|
18
14
|
|
|
19
|
-
##
|
|
15
|
+
## Trellis System
|
|
20
16
|
|
|
21
|
-
###
|
|
17
|
+
### Developer Identity
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
On first use, initialize your identity:
|
|
24
20
|
|
|
25
21
|
```bash
|
|
26
|
-
# Check if already initialized
|
|
27
|
-
python3 ./.trellis/scripts/get_developer.py
|
|
28
|
-
|
|
29
|
-
# If not initialized, run:
|
|
30
22
|
python3 ./.trellis/scripts/init_developer.py <your-name>
|
|
31
|
-
# Example: python3 ./.trellis/scripts/init_developer.py cursor-agent
|
|
32
23
|
```
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
- `.trellis/.developer` - Your identity file (gitignored, not committed)
|
|
36
|
-
- `.trellis/workspace/<your-name>/` - Your personal workspace directory
|
|
25
|
+
Creates `.trellis/.developer` (gitignored) + `.trellis/workspace/<your-name>/`.
|
|
37
26
|
|
|
38
|
-
|
|
39
|
-
- Human developers: Use your name, e.g., `john-doe`
|
|
40
|
-
- Cursor AI: `cursor-agent` or `cursor-<task>`
|
|
41
|
-
- Claude Code: `claude-agent` or `claude-<task>`
|
|
42
|
-
- iFlow cli: `iflow-agent` or `iflow-<task>`
|
|
27
|
+
### Spec System
|
|
43
28
|
|
|
44
|
-
|
|
29
|
+
`.trellis/spec/` holds coding guidelines organized by package and layer.
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
python3 ./.trellis/scripts/get_context.py
|
|
31
|
+
- `.trellis/spec/<package>/<layer>/index.md` — entry point with **Pre-Development Checklist** + **Quality Check**. Actual guidelines live in the `.md` files it points to.
|
|
32
|
+
- `.trellis/spec/guides/index.md` — cross-package thinking guides.
|
|
49
33
|
|
|
50
|
-
|
|
51
|
-
python3 ./.trellis/scripts/
|
|
52
|
-
python3 ./.trellis/scripts/task.py list # Active tasks
|
|
53
|
-
git status && git log --oneline -10 # Git state
|
|
34
|
+
```bash
|
|
35
|
+
python3 ./.trellis/scripts/get_context.py --mode packages # list packages / layers
|
|
54
36
|
```
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
**When to update spec**: new pattern/convention found · bug-fix prevention to codify · new technical decision.
|
|
57
39
|
|
|
58
|
-
|
|
40
|
+
### Task System
|
|
41
|
+
|
|
42
|
+
Every task has its own directory under `.trellis/tasks/{MM-DD-name}/` holding `prd.md`, `implement.jsonl`, `check.jsonl`, `task.json`, optional `research/`, `info.md`.
|
|
59
43
|
|
|
60
44
|
```bash
|
|
61
|
-
#
|
|
62
|
-
python3 ./.trellis/scripts/
|
|
45
|
+
# Task lifecycle
|
|
46
|
+
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] [--parent <dir>]
|
|
47
|
+
python3 ./.trellis/scripts/task.py start <name> # set as current (writes .current-task, triggers after_start hooks)
|
|
48
|
+
python3 ./.trellis/scripts/task.py finish # clear current task (triggers after_finish hooks)
|
|
49
|
+
python3 ./.trellis/scripts/task.py archive <name> # move to archive/{year-month}/
|
|
50
|
+
python3 ./.trellis/scripts/task.py list [--mine] [--status <s>]
|
|
51
|
+
python3 ./.trellis/scripts/task.py list-archive
|
|
52
|
+
|
|
53
|
+
# Code-spec context (injected into implement/check agents via JSONL)
|
|
54
|
+
python3 ./.trellis/scripts/task.py init-context <name> <type> # type: backend|frontend|fullstack|test|docs
|
|
55
|
+
python3 ./.trellis/scripts/task.py add-context <name> <action> <file> <reason>
|
|
56
|
+
python3 ./.trellis/scripts/task.py list-context <name> [action]
|
|
57
|
+
python3 ./.trellis/scripts/task.py validate <name>
|
|
58
|
+
|
|
59
|
+
# Task metadata
|
|
60
|
+
python3 ./.trellis/scripts/task.py set-branch <name> <branch>
|
|
61
|
+
python3 ./.trellis/scripts/task.py set-base-branch <name> <branch> # PR target
|
|
62
|
+
python3 ./.trellis/scripts/task.py set-scope <name> <scope>
|
|
63
|
+
|
|
64
|
+
# Hierarchy (parent/child)
|
|
65
|
+
python3 ./.trellis/scripts/task.py add-subtask <parent> <child>
|
|
66
|
+
python3 ./.trellis/scripts/task.py remove-subtask <parent> <child>
|
|
67
|
+
|
|
68
|
+
# PR creation
|
|
69
|
+
python3 ./.trellis/scripts/task.py create-pr [name] [--dry-run]
|
|
70
|
+
```
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
cat .trellis/spec/<package>/<layer>/index.md
|
|
72
|
+
> Run `python3 ./.trellis/scripts/task.py --help` to see the authoritative, up-to-date list.
|
|
66
73
|
|
|
67
|
-
|
|
68
|
-
cat .trellis/spec/guides/index.md
|
|
69
|
-
```
|
|
74
|
+
**Current-task mechanism**: `task.py start` writes the task path into `.trellis/.current-task`. Hook-capable platforms auto-inject this at session start, so the AI knows what you're working on without being told.
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
- Understand which spec layers apply to your task
|
|
73
|
-
- Know coding standards for the packages you'll modify
|
|
74
|
-
- Learn the overall code quality requirements
|
|
76
|
+
### Workspace System
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
Records every AI session for cross-session tracking under `.trellis/workspace/<developer>/`.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
- `journal-N.md` — session log. **Max 2000 lines per file**; a new `journal-(N+1).md` is auto-created when exceeded.
|
|
81
|
+
- `index.md` — personal index (total sessions, last active).
|
|
79
82
|
|
|
80
83
|
```bash
|
|
81
|
-
|
|
82
|
-
cat .trellis/spec/<package>/<layer>/error-handling.md
|
|
83
|
-
cat .trellis/spec/<package>/<layer>/conventions.md
|
|
84
|
-
# etc. — based on what the Pre-Development Checklist lists
|
|
84
|
+
python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash" --summary "Summary"
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
## Workflow Overview
|
|
87
|
+
### Context Script
|
|
90
88
|
|
|
91
|
-
|
|
89
|
+
```bash
|
|
90
|
+
python3 ./.trellis/scripts/get_context.py # full session context
|
|
91
|
+
python3 ./.trellis/scripts/get_context.py --mode packages # available packages + spec layers
|
|
92
|
+
python3 ./.trellis/scripts/get_context.py --mode phase --step <X.Y> # detailed guide for a workflow step
|
|
93
|
+
```
|
|
92
94
|
|
|
93
|
-
|
|
94
|
-
2. **Follow Standards** - [!] **MUST read `.trellis/spec/` guidelines before coding**
|
|
95
|
-
3. **Incremental Development** - Complete one task at a time
|
|
96
|
-
4. **Record Promptly** - Update tracking files immediately after completion
|
|
97
|
-
5. **Document Limits** - [!] **Max 2000 lines per journal document**
|
|
95
|
+
---
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
## Phase Index
|
|
100
98
|
|
|
101
99
|
```
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| |-- __init__.py # Python package init
|
|
106
|
-
| |-- common/ # Shared utilities (Python)
|
|
107
|
-
| | |-- __init__.py
|
|
108
|
-
| | |-- paths.py # Path utilities
|
|
109
|
-
| | |-- developer.py # Developer management
|
|
110
|
-
| | +-- git_context.py # Git context implementation
|
|
111
|
-
| |-- multi_agent/ # Multi-agent pipeline scripts
|
|
112
|
-
| | |-- __init__.py
|
|
113
|
-
| | |-- start.py # Start worktree agent
|
|
114
|
-
| | |-- status.py # Monitor agent status
|
|
115
|
-
| | |-- create_pr.py # Create PR
|
|
116
|
-
| | +-- cleanup.py # Cleanup worktree
|
|
117
|
-
| |-- init_developer.py # Initialize developer identity
|
|
118
|
-
| |-- get_developer.py # Get current developer name
|
|
119
|
-
| |-- task.py # Manage tasks
|
|
120
|
-
| |-- get_context.py # Get session context
|
|
121
|
-
| +-- add_session.py # One-click session recording
|
|
122
|
-
|-- workspace/ # Developer workspaces
|
|
123
|
-
| |-- index.md # Workspace index + Session template
|
|
124
|
-
| +-- {developer}/ # Per-developer directories
|
|
125
|
-
| |-- index.md # Personal index (with @@@auto markers)
|
|
126
|
-
| +-- journal-N.md # Journal files (sequential numbering)
|
|
127
|
-
|-- tasks/ # Task tracking
|
|
128
|
-
| +-- {MM}-{DD}-{name}/
|
|
129
|
-
| +-- task.json
|
|
130
|
-
|-- spec/ # [!] MUST READ before coding
|
|
131
|
-
| |-- frontend/ # Frontend guidelines (if applicable)
|
|
132
|
-
| | |-- index.md # Start here - guidelines index
|
|
133
|
-
| | +-- *.md # Topic-specific docs
|
|
134
|
-
| |-- backend/ # Backend guidelines (if applicable)
|
|
135
|
-
| | |-- index.md # Start here - guidelines index
|
|
136
|
-
| | +-- *.md # Topic-specific docs
|
|
137
|
-
| +-- guides/ # Thinking guides
|
|
138
|
-
| |-- index.md # Guides index
|
|
139
|
-
| |-- cross-layer-thinking-guide.md # Pre-implementation checklist
|
|
140
|
-
| +-- *.md # Other guides
|
|
141
|
-
+-- workflow.md # This document
|
|
100
|
+
Phase 1: Plan → figure out what to do (brainstorm + research → prd.md)
|
|
101
|
+
Phase 2: Execute → write code and pass quality checks
|
|
102
|
+
Phase 3: Finish → distill lessons + wrap-up
|
|
142
103
|
```
|
|
143
104
|
|
|
144
|
-
|
|
105
|
+
### Phase 1: Plan
|
|
106
|
+
- 1.0 Create task `[required · once]`
|
|
107
|
+
- 1.1 Requirement exploration `[required · repeatable]`
|
|
108
|
+
- 1.2 Research `[optional · repeatable]`
|
|
109
|
+
- 1.3 Configure context `[required · once]` — Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid
|
|
110
|
+
- 1.4 Completion criteria
|
|
145
111
|
|
|
146
|
-
|
|
112
|
+
### Phase 2: Execute
|
|
113
|
+
- 2.1 Implement `[required · repeatable]`
|
|
114
|
+
- 2.2 Quality check `[required · repeatable]`
|
|
115
|
+
- 2.3 Rollback `[on demand]`
|
|
147
116
|
|
|
148
|
-
###
|
|
117
|
+
### Phase 3: Finish
|
|
118
|
+
- 3.1 Quality verification `[required · repeatable]`
|
|
119
|
+
- 3.2 Debug retrospective `[on demand]`
|
|
120
|
+
- 3.3 Spec update `[required · once]`
|
|
121
|
+
- 3.4 Wrap-up reminder
|
|
149
122
|
|
|
150
|
-
|
|
123
|
+
### Rules
|
|
151
124
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
125
|
+
1. Identify which Phase you're in, then continue from the next step there
|
|
126
|
+
2. Run steps in order inside each Phase; `[required]` steps can't be skipped
|
|
127
|
+
3. Phases can roll back (e.g., Execute reveals a prd defect → return to Plan to fix, then re-enter Execute)
|
|
128
|
+
4. Steps tagged `[once]` are skipped if already done; don't re-run
|
|
155
129
|
|
|
156
|
-
|
|
157
|
-
python3 ./.trellis/scripts/get_context.py --json
|
|
158
|
-
```
|
|
130
|
+
### Skill Routing
|
|
159
131
|
|
|
160
|
-
|
|
132
|
+
When a user request matches one of these intents, load the corresponding skill first — do not skip skills.
|
|
161
133
|
|
|
162
|
-
|
|
134
|
+
| User intent | Skill |
|
|
135
|
+
|---|---|
|
|
136
|
+
| Wants a new feature / requirement unclear | trellis-brainstorm |
|
|
137
|
+
| About to write code / start implementing | trellis-before-dev |
|
|
138
|
+
| Finished writing / want to verify | trellis-check |
|
|
139
|
+
| Stuck / fixed same bug several times | trellis-break-loop |
|
|
140
|
+
| Spec needs update | trellis-update-spec |
|
|
163
141
|
|
|
164
|
-
|
|
142
|
+
### DO NOT skip skills
|
|
165
143
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
144
|
+
| What you're thinking | Why it's wrong |
|
|
145
|
+
|---|---|
|
|
146
|
+
| "This is simple, just code it" | Simple tasks often grow complex; before-dev takes under a minute |
|
|
147
|
+
| "I already thought it through in plan mode" | Plan-mode output lives in memory — sub-agents can't see it; must be persisted to prd.md |
|
|
148
|
+
| "I already know the spec" | The spec may have been updated since you last read it; read again |
|
|
149
|
+
| "Code first, check later" | `check` surfaces issues you won't notice yourself; earlier is cheaper |
|
|
169
150
|
|
|
170
|
-
|
|
171
|
-
cat .trellis/spec/<package>/<layer>/index.md
|
|
151
|
+
### Loading Step Detail
|
|
172
152
|
|
|
173
|
-
|
|
174
|
-
|
|
153
|
+
At each step, run this to fetch detailed guidance:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
python3 ./.trellis/scripts/get_context.py --mode phase --step <step>
|
|
157
|
+
# e.g. python3 ./.trellis/scripts/get_context.py --mode phase --step 1.1
|
|
175
158
|
```
|
|
176
159
|
|
|
177
|
-
|
|
160
|
+
---
|
|
178
161
|
|
|
179
|
-
|
|
162
|
+
## Phase 1: Plan
|
|
180
163
|
|
|
181
|
-
|
|
182
|
-
# List active tasks
|
|
183
|
-
python3 ./.trellis/scripts/task.py list
|
|
164
|
+
Goal: figure out what to build, produce a clear requirements doc and the context needed to implement it.
|
|
184
165
|
|
|
185
|
-
|
|
186
|
-
|
|
166
|
+
#### 1.0 Create task `[required · once]`
|
|
167
|
+
|
|
168
|
+
Create the task directory and set it as current:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
python3 ./.trellis/scripts/task.py create "<task title>" --slug <name>
|
|
172
|
+
python3 ./.trellis/scripts/task.py start <task-dir>
|
|
187
173
|
```
|
|
188
174
|
|
|
189
|
-
|
|
175
|
+
Skip when: `.trellis/.current-task` already points to a task.
|
|
190
176
|
|
|
191
|
-
|
|
177
|
+
#### 1.1 Requirement exploration `[required · repeatable]`
|
|
192
178
|
|
|
193
|
-
|
|
179
|
+
Load the `trellis-brainstorm` skill and explore requirements interactively with the user per the skill's guidance.
|
|
194
180
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
181
|
+
The brainstorm skill will guide you to:
|
|
182
|
+
- Ask one question at a time
|
|
183
|
+
- Prefer researching over asking the user
|
|
184
|
+
- Prefer offering options over open-ended questions
|
|
185
|
+
- Update `prd.md` immediately after each user answer
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
--> python3 ./.trellis/scripts/task.py start <name>
|
|
201
|
-
--> Writes .trellis/.current-task; future sessions see it in <current-state>
|
|
187
|
+
Return to this step whenever requirements change and revise `prd.md`.
|
|
202
188
|
|
|
203
|
-
|
|
204
|
-
--> Read .trellis/spec/ docs relevant to your task
|
|
205
|
-
--> For cross-layer: read .trellis/spec/guides/
|
|
189
|
+
#### 1.2 Research `[optional · repeatable]`
|
|
206
190
|
|
|
207
|
-
|
|
208
|
-
--> Run project's lint/test commands (see spec docs)
|
|
209
|
-
--> Manual feature testing
|
|
191
|
+
Research can happen at any time during requirement exploration. It isn't limited to local code — you can use any available tool (MCP servers, skills, web search, etc.) to look up external information, including third-party library docs, industry practices, API references, etc.
|
|
210
192
|
|
|
211
|
-
|
|
212
|
-
--> git add <files>
|
|
213
|
-
--> git commit -m "type(scope): description"
|
|
214
|
-
Format: feat/fix/docs/refactor/test/chore
|
|
193
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
215
194
|
|
|
216
|
-
|
|
217
|
-
--> python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
195
|
+
Spawn the research sub-agent:
|
|
218
196
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
next session resumes where you left off
|
|
223
|
-
```
|
|
197
|
+
- **Agent type**: `trellis-research`
|
|
198
|
+
- **Task description**: Research <specific question>
|
|
199
|
+
- **Key requirement**: Research output MUST be persisted to `{TASK_DIR}/research/`
|
|
224
200
|
|
|
225
|
-
|
|
201
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
226
202
|
|
|
227
|
-
|
|
228
|
-
- [OK] Lint checks pass (project-specific command)
|
|
229
|
-
- [OK] Type checks pass (if applicable)
|
|
230
|
-
- [OK] Manual feature testing passes
|
|
203
|
+
[Kilo, Antigravity, Windsurf]
|
|
231
204
|
|
|
232
|
-
|
|
233
|
-
- See `.trellis/spec/<package>/<layer>/quality-guidelines.md` for package-specific checks
|
|
205
|
+
Do the research in the main session directly and write findings into `{TASK_DIR}/research/`.
|
|
234
206
|
|
|
235
|
-
|
|
207
|
+
[/Kilo, Antigravity, Windsurf]
|
|
208
|
+
|
|
209
|
+
**Research artifact conventions**:
|
|
210
|
+
- One file per research topic (e.g. `research/auth-library-comparison.md`)
|
|
211
|
+
- Record third-party library usage examples, API references, version constraints in files
|
|
212
|
+
- Note relevant spec file paths you discovered for later reference
|
|
213
|
+
|
|
214
|
+
Brainstorm and research can interleave freely — pause to research a technical question, then return to talk with the user.
|
|
215
|
+
|
|
216
|
+
**Key principle**: Research output must be written to files, not left only in the chat. Conversations get compacted; files don't.
|
|
217
|
+
|
|
218
|
+
#### 1.3 Configure context `[required · once]`
|
|
236
219
|
|
|
237
|
-
|
|
220
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
238
221
|
|
|
239
|
-
|
|
222
|
+
Once research output is solid, initialize the agent context files:
|
|
240
223
|
|
|
241
|
-
|
|
224
|
+
```bash
|
|
225
|
+
python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type> --platform <platform>
|
|
226
|
+
# type: backend | frontend | fullstack
|
|
227
|
+
# platform: claude | codex | cursor | kiro | gemini | opencode | qoder | codebuddy | copilot | droid
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
`--platform` is auto-filled by per-platform skills/commands (via `{{CLI_FLAG}}` substitution). Specify it explicitly only for CLI-direct invocations; otherwise the script falls back to filesystem auto-detection, which can misfire on multi-platform setups.
|
|
231
|
+
|
|
232
|
+
Skip when: `implement.jsonl` already exists.
|
|
233
|
+
|
|
234
|
+
Append any extra spec files or code patterns you find `[optional · repeatable]`:
|
|
242
235
|
|
|
243
236
|
```bash
|
|
244
|
-
python3 ./.trellis/scripts/
|
|
245
|
-
|
|
246
|
-
--commit "abc1234" \
|
|
247
|
-
--summary "Brief summary"
|
|
237
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
|
|
238
|
+
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
248
239
|
```
|
|
249
240
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
241
|
+
These jsonl files are auto-injected into sub-agent prompts during Phase 2 via hook.
|
|
242
|
+
|
|
243
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
244
|
+
|
|
245
|
+
[Kilo, Antigravity, Windsurf]
|
|
246
|
+
|
|
247
|
+
Skip this step. Context is loaded directly by the `trellis-before-dev` skill in Phase 2.
|
|
255
248
|
|
|
256
|
-
|
|
249
|
+
[/Kilo, Antigravity, Windsurf]
|
|
257
250
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
251
|
+
#### 1.4 Completion criteria
|
|
252
|
+
|
|
253
|
+
| Condition | Required |
|
|
254
|
+
|------|:---:|
|
|
255
|
+
| `prd.md` exists | ✅ |
|
|
256
|
+
| User confirms requirements | ✅ |
|
|
257
|
+
| `research/` has artifacts (complex tasks) | recommended |
|
|
258
|
+
| `info.md` technical design (complex tasks) | optional |
|
|
259
|
+
|
|
260
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
261
|
+
|
|
262
|
+
| `implement.jsonl` exists | ✅ |
|
|
263
|
+
|
|
264
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
264
265
|
|
|
265
266
|
---
|
|
266
267
|
|
|
267
|
-
##
|
|
268
|
+
## Phase 2: Execute
|
|
268
269
|
|
|
269
|
-
|
|
270
|
+
Goal: turn the prd into code that passes quality checks.
|
|
270
271
|
|
|
271
|
-
|
|
272
|
+
#### 2.1 Implement `[required · repeatable]`
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
workspace/
|
|
276
|
-
|-- index.md # Main index (Active Developers table)
|
|
277
|
-
+-- {developer}/ # Per-developer directory
|
|
278
|
-
|-- index.md # Personal index (with @@@auto markers)
|
|
279
|
-
+-- journal-N.md # Journal files (sequential: 1, 2, 3...)
|
|
280
|
-
```
|
|
274
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
281
275
|
|
|
282
|
-
|
|
283
|
-
- [OK] End of each session
|
|
284
|
-
- [OK] Complete important task
|
|
285
|
-
- [OK] Fix important bug
|
|
276
|
+
Spawn the implement sub-agent:
|
|
286
277
|
|
|
287
|
-
|
|
278
|
+
- **Agent type**: `trellis-implement`
|
|
279
|
+
- **Task description**: Implement the requirements per prd.md, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
|
|
288
280
|
|
|
289
|
-
|
|
281
|
+
The platform hook auto-handles:
|
|
282
|
+
- Reads `implement.jsonl` and injects the referenced spec files into the agent prompt
|
|
283
|
+
- Injects prd.md content
|
|
290
284
|
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
spec/
|
|
294
|
-
|-- frontend/ # Frontend docs (if applicable)
|
|
295
|
-
| |-- index.md # Start here
|
|
296
|
-
| +-- *.md # Topic-specific docs
|
|
297
|
-
|-- backend/ # Backend docs (if applicable)
|
|
298
|
-
| |-- index.md # Start here
|
|
299
|
-
| +-- *.md # Topic-specific docs
|
|
300
|
-
+-- guides/ # Thinking guides
|
|
301
|
-
|-- index.md # Start here
|
|
302
|
-
+-- *.md # Guide-specific docs
|
|
303
|
-
```
|
|
285
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
304
286
|
|
|
305
|
-
|
|
306
|
-
- [OK] New pattern discovered
|
|
307
|
-
- [OK] Bug fixed that reveals missing guidance
|
|
308
|
-
- [OK] New convention established
|
|
287
|
+
[Kilo, Antigravity, Windsurf]
|
|
309
288
|
|
|
310
|
-
|
|
289
|
+
1. Load the `trellis-before-dev` skill to read project guidelines
|
|
290
|
+
2. Read `{TASK_DIR}/prd.md` for requirements
|
|
291
|
+
3. Consult materials under `{TASK_DIR}/research/`
|
|
292
|
+
4. Implement the code per requirements
|
|
293
|
+
5. Run project lint and type-check
|
|
311
294
|
|
|
312
|
-
|
|
295
|
+
[/Kilo, Antigravity, Windsurf]
|
|
313
296
|
|
|
314
|
-
|
|
315
|
-
tasks/
|
|
316
|
-
|-- 01-21-my-task/
|
|
317
|
-
| +-- task.json
|
|
318
|
-
+-- archive/
|
|
319
|
-
+-- 2026-01/
|
|
320
|
-
+-- 01-15-old-task/
|
|
321
|
-
+-- task.json
|
|
322
|
-
```
|
|
297
|
+
#### 2.2 Quality check `[required · repeatable]`
|
|
323
298
|
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] # Create task directory
|
|
327
|
-
python3 ./.trellis/scripts/task.py start <name> # Set as current task (writes .current-task, triggers after_start hooks)
|
|
328
|
-
python3 ./.trellis/scripts/task.py finish # Clear current task (triggers after_finish hooks)
|
|
329
|
-
python3 ./.trellis/scripts/task.py archive <name> # Archive to archive/{year-month}/
|
|
330
|
-
python3 ./.trellis/scripts/task.py list # List active tasks
|
|
331
|
-
python3 ./.trellis/scripts/task.py list-archive # List archived tasks
|
|
332
|
-
```
|
|
299
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
333
300
|
|
|
334
|
-
|
|
301
|
+
Spawn the check sub-agent:
|
|
335
302
|
|
|
336
|
-
|
|
303
|
+
- **Agent type**: `trellis-check`
|
|
304
|
+
- **Task description**: Review all code changes against spec and prd; fix any findings directly; ensure lint and type-check pass
|
|
305
|
+
|
|
306
|
+
The check agent's job:
|
|
307
|
+
- Review code changes against specs
|
|
308
|
+
- Auto-fix issues it finds
|
|
309
|
+
- Run lint and typecheck to verify
|
|
337
310
|
|
|
338
|
-
|
|
311
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
339
312
|
|
|
340
|
-
|
|
313
|
+
[Kilo, Antigravity, Windsurf]
|
|
341
314
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
315
|
+
Load the `trellis-check` skill and verify the code per its guidance:
|
|
316
|
+
- Spec compliance
|
|
317
|
+
- lint / type-check / tests
|
|
318
|
+
- Cross-layer consistency (when changes span layers)
|
|
345
319
|
|
|
346
|
-
|
|
347
|
-
- [!] **Follow** `.trellis/spec/` guidelines
|
|
348
|
-
- For cross-layer features, use `/trellis:check-cross-layer`
|
|
349
|
-
- Develop only one task at a time
|
|
350
|
-
- Run lint and tests frequently
|
|
320
|
+
If issues are found → fix → re-check, until green.
|
|
351
321
|
|
|
352
|
-
|
|
353
|
-
- Use `/trellis:finish-work` for completion checklist
|
|
354
|
-
- After fix bug, use `/trellis:break-loop` for deep analysis
|
|
355
|
-
- Human commits after testing passes
|
|
356
|
-
- Use `add_session.py` to record progress
|
|
322
|
+
[/Kilo, Antigravity, Windsurf]
|
|
357
323
|
|
|
358
|
-
|
|
324
|
+
#### 2.3 Rollback `[on demand]`
|
|
359
325
|
|
|
360
|
-
1
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
4. **Don't** commit code with lint/test errors
|
|
364
|
-
5. **Don't** forget to update spec docs after learning something
|
|
365
|
-
6. [!] **Don't** execute `git commit` - AI should not commit code
|
|
326
|
+
- `check` reveals a prd defect → return to Phase 1, fix `prd.md`, then redo 2.1
|
|
327
|
+
- Implementation went wrong → revert code, redo 2.1
|
|
328
|
+
- Need more research → research (same as Phase 1.2), write findings into `research/`
|
|
366
329
|
|
|
367
330
|
---
|
|
368
331
|
|
|
369
|
-
##
|
|
332
|
+
## Phase 3: Finish
|
|
370
333
|
|
|
371
|
-
|
|
334
|
+
Goal: ensure code quality, capture lessons, record the work.
|
|
372
335
|
|
|
373
|
-
|
|
374
|
-
|-----------|-------------------|
|
|
375
|
-
| Frontend work | `frontend/index.md` → relevant docs |
|
|
376
|
-
| Backend work | `backend/index.md` → relevant docs |
|
|
377
|
-
| Cross-Layer Feature | `guides/cross-layer-thinking-guide.md` |
|
|
336
|
+
#### 3.1 Quality verification `[required · repeatable]`
|
|
378
337
|
|
|
379
|
-
|
|
338
|
+
Load the `trellis-check` skill and do a final verification:
|
|
339
|
+
- Spec compliance
|
|
340
|
+
- lint / type-check / tests
|
|
341
|
+
- Cross-layer consistency (when changes span layers)
|
|
380
342
|
|
|
381
|
-
|
|
382
|
-
git commit -m "type(scope): description"
|
|
383
|
-
```
|
|
343
|
+
If issues are found → fix → re-check, until green.
|
|
384
344
|
|
|
385
|
-
|
|
386
|
-
**Scope**: Module name (e.g., auth, api, ui)
|
|
345
|
+
#### 3.2 Debug retrospective `[on demand]`
|
|
387
346
|
|
|
388
|
-
|
|
347
|
+
If this task involved repeated debugging (the same issue was fixed multiple times), load the `trellis-break-loop` skill to:
|
|
348
|
+
- Classify the root cause
|
|
349
|
+
- Explain why earlier fixes failed
|
|
350
|
+
- Propose prevention
|
|
389
351
|
|
|
390
|
-
|
|
391
|
-
# Session management
|
|
392
|
-
python3 ./.trellis/scripts/get_context.py # Get full context
|
|
393
|
-
python3 ./.trellis/scripts/add_session.py # Record session
|
|
394
|
-
|
|
395
|
-
# Task management
|
|
396
|
-
python3 ./.trellis/scripts/task.py list # List tasks
|
|
397
|
-
python3 ./.trellis/scripts/task.py create "<title>" # Create task
|
|
398
|
-
|
|
399
|
-
# Slash commands
|
|
400
|
-
/trellis:finish-work # Pre-commit checklist
|
|
401
|
-
/trellis:break-loop # Post-debug analysis
|
|
402
|
-
/trellis:check-cross-layer # Cross-layer verification
|
|
403
|
-
```
|
|
352
|
+
The goal is to capture debugging lessons so the same class of issue doesn't recur.
|
|
404
353
|
|
|
405
|
-
|
|
354
|
+
#### 3.3 Spec update `[required · once]`
|
|
355
|
+
|
|
356
|
+
Load the `trellis-update-spec` skill and review whether this task produced new knowledge worth recording:
|
|
357
|
+
- Newly discovered patterns or conventions
|
|
358
|
+
- Pitfalls you hit
|
|
359
|
+
- New technical decisions
|
|
406
360
|
|
|
407
|
-
|
|
361
|
+
Update the docs under `.trellis/spec/` accordingly. Even if the conclusion is "nothing to update", walk through the judgment.
|
|
408
362
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
- [OK] Transparent team collaboration
|
|
363
|
+
#### 3.4 Wrap-up reminder
|
|
364
|
+
|
|
365
|
+
After the above, remind the user they can run `/finish-work` to wrap up (archive the task, record the session).
|
|
366
|
+
|
|
367
|
+
---
|
|
415
368
|
|
|
416
|
-
|
|
369
|
+
## Workflow State Breadcrumbs
|
|
370
|
+
|
|
371
|
+
<!-- Injected per-turn by UserPromptSubmit hook (inject-workflow-state.py).
|
|
372
|
+
Edit the text inside each [workflow-state:STATUS]...[/workflow-state:STATUS]
|
|
373
|
+
block to customize per-task-status flow reminders. Users who fork the
|
|
374
|
+
Trellis workflow only need to edit this file, not the hook script.
|
|
375
|
+
|
|
376
|
+
Tag STATUS matches task.json.status. Default statuses: planning /
|
|
377
|
+
in_progress / completed. Add custom status blocks as needed (hyphens
|
|
378
|
+
and underscores allowed). Hook falls back to built-in defaults when
|
|
379
|
+
a status has no tag block. -->
|
|
380
|
+
|
|
381
|
+
[workflow-state:no_task]
|
|
382
|
+
No active task.
|
|
383
|
+
Trigger words in the user message that REQUIRE creating a task (non-negotiable, do NOT self-exempt): 重构 / 抽成 / 独立 / 分发 / 拆出来 / 搞一个 / 做成 / 接入 / 集成 / refactor / rewrite / extract / productize / publish / build X / design Y.
|
|
384
|
+
Task is NOT required ONLY if ALL three hold: (a) zero file writes this turn, (b) answer fits in one reply with no multi-round plan, (c) no research beyond reading 1-2 repo files.
|
|
385
|
+
When in doubt: create task. Over-tasking is cheap; under-tasking leaks plans and research into main context.
|
|
386
|
+
Flow: load `trellis-brainstorm` skill → it creates the task via `python3 ./.trellis/scripts/task.py create` and drives requirements Q&A. For research-heavy work (tool comparison, docs, cross-platform survey), spawn `trellis-research` sub-agents via Task tool — NEVER do 3+ inline WebFetch/WebSearch/`gh api` calls in the main conversation.
|
|
387
|
+
[/workflow-state:no_task]
|
|
388
|
+
|
|
389
|
+
[workflow-state:planning]
|
|
390
|
+
Complete prd.md via trellis-brainstorm skill; then run task.py start.
|
|
391
|
+
Research belongs in `{task_dir}/research/*.md`, written by `trellis-research` sub-agents. Do NOT inline WebFetch/WebSearch in main session — PRD only links to research files.
|
|
392
|
+
[/workflow-state:planning]
|
|
393
|
+
|
|
394
|
+
[workflow-state:in_progress]
|
|
395
|
+
Flow: trellis-implement → trellis-check → trellis-update-spec → finish
|
|
396
|
+
Check conversation history + git status to determine current step; do NOT skip trellis-check.
|
|
397
|
+
[/workflow-state:in_progress]
|
|
398
|
+
|
|
399
|
+
[workflow-state:completed]
|
|
400
|
+
User commits changes; then run task.py archive.
|
|
401
|
+
[/workflow-state:completed]
|