@pennixrv/trellis 0.7.0-beta.8 → 0.7.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/README.md +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +14 -26
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/ablate.js +1 -1
- package/dist/commands/ablate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +30 -56
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/task-progress.d.ts +2 -0
- package/dist/commands/task-progress.d.ts.map +1 -1
- package/dist/commands/task-progress.js +37 -30
- package/dist/commands/task-progress.js.map +1 -1
- package/dist/commands/{channel → teamwork}/adapters/claude.d.ts +3 -3
- package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/claude.js +3 -3
- package/dist/commands/teamwork/adapters/claude.js.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/codex.d.ts +1 -15
- package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/codex.js +5 -42
- package/dist/commands/teamwork/adapters/codex.js.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/index.d.ts +6 -6
- package/dist/commands/teamwork/adapters/index.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/index.js +16 -52
- package/dist/commands/teamwork/adapters/index.js.map +1 -0
- package/dist/commands/{channel → teamwork}/adapters/types.d.ts +2 -2
- package/dist/commands/teamwork/adapters/types.d.ts.map +1 -0
- package/dist/commands/teamwork/adapters/types.js.map +1 -0
- package/dist/commands/{channel → teamwork}/agent-loader.d.ts +2 -4
- package/dist/commands/teamwork/agent-loader.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/agent-loader.js +4 -35
- package/dist/commands/teamwork/agent-loader.js.map +1 -0
- package/dist/commands/teamwork/artifact.d.ts +177 -0
- package/dist/commands/teamwork/artifact.d.ts.map +1 -0
- package/dist/commands/teamwork/artifact.js +908 -0
- package/dist/commands/teamwork/artifact.js.map +1 -0
- package/dist/commands/{channel → teamwork}/context-loader.d.ts +1 -1
- package/dist/commands/teamwork/context-loader.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/context-loader.js +12 -12
- package/dist/commands/teamwork/context-loader.js.map +1 -0
- package/dist/commands/{channel → teamwork}/context-trust.d.ts +6 -6
- package/dist/commands/teamwork/context-trust.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/context-trust.js +16 -16
- package/dist/commands/teamwork/context-trust.js.map +1 -0
- package/dist/commands/teamwork/context.d.ts +16 -0
- package/dist/commands/teamwork/context.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/context.js +17 -17
- package/dist/commands/teamwork/context.js.map +1 -0
- package/dist/commands/teamwork/coordinator.d.ts +89 -0
- package/dist/commands/teamwork/coordinator.d.ts.map +1 -0
- package/dist/commands/teamwork/coordinator.js +1198 -0
- package/dist/commands/teamwork/coordinator.js.map +1 -0
- package/dist/commands/teamwork/create.d.ts +23 -0
- package/dist/commands/teamwork/create.d.ts.map +1 -0
- package/dist/commands/teamwork/create.js +39 -0
- package/dist/commands/teamwork/create.js.map +1 -0
- package/dist/commands/{channel → teamwork}/dev-parse-trace.d.ts +1 -1
- package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/dev-parse-trace.js +1 -1
- package/dist/commands/teamwork/dev-parse-trace.js.map +1 -0
- package/dist/commands/{channel → teamwork}/guard.d.ts +27 -46
- package/dist/commands/teamwork/guard.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/guard.js +54 -156
- package/dist/commands/teamwork/guard.js.map +1 -0
- package/dist/commands/teamwork/index.d.ts +3 -0
- package/dist/commands/teamwork/index.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/index.js +135 -165
- package/dist/commands/teamwork/index.js.map +1 -0
- package/dist/commands/{channel → teamwork}/interrupt.d.ts +1 -1
- package/dist/commands/teamwork/interrupt.d.ts.map +1 -0
- package/dist/commands/teamwork/interrupt.js +22 -0
- package/dist/commands/teamwork/interrupt.js.map +1 -0
- package/dist/commands/teamwork/kill.d.ts +7 -0
- package/dist/commands/teamwork/kill.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/kill.js +21 -21
- package/dist/commands/teamwork/kill.js.map +1 -0
- package/dist/commands/teamwork/list.d.ts +17 -0
- package/dist/commands/teamwork/list.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/list.js +18 -27
- package/dist/commands/teamwork/list.js.map +1 -0
- package/dist/commands/{channel → teamwork}/messages.d.ts +1 -1
- package/dist/commands/teamwork/messages.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/messages.js +18 -18
- package/dist/commands/teamwork/messages.js.map +1 -0
- package/dist/commands/teamwork/profiles.d.ts +25 -0
- package/dist/commands/teamwork/profiles.d.ts.map +1 -0
- package/dist/commands/teamwork/profiles.js +125 -0
- package/dist/commands/teamwork/profiles.js.map +1 -0
- package/dist/commands/teamwork/rm.d.ts +27 -0
- package/dist/commands/teamwork/rm.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/rm.js +21 -22
- package/dist/commands/teamwork/rm.js.map +1 -0
- package/dist/commands/teamwork/run.d.ts +29 -0
- package/dist/commands/{channel → teamwork}/run.d.ts.map +1 -1
- package/dist/commands/teamwork/run.js +129 -0
- package/dist/commands/teamwork/run.js.map +1 -0
- package/dist/commands/{channel → teamwork}/send.d.ts +1 -1
- package/dist/commands/teamwork/send.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/send.js +7 -7
- package/dist/commands/teamwork/send.js.map +1 -0
- package/dist/commands/{channel → teamwork}/spawn.d.ts +8 -12
- package/dist/commands/teamwork/spawn.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/spawn.js +51 -112
- package/dist/commands/teamwork/spawn.js.map +1 -0
- package/dist/commands/teamwork/store/events.d.ts +22 -0
- package/dist/commands/teamwork/store/events.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/store/events.js +8 -8
- package/dist/commands/teamwork/store/events.js.map +1 -0
- package/dist/commands/teamwork/store/filter.d.ts +3 -0
- package/dist/commands/teamwork/store/filter.d.ts.map +1 -0
- package/dist/commands/teamwork/store/filter.js +2 -0
- package/dist/commands/teamwork/store/filter.js.map +1 -0
- package/dist/commands/{channel → teamwork}/store/lock.d.ts +1 -1
- package/dist/commands/teamwork/store/lock.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/store/lock.js +2 -2
- package/dist/commands/teamwork/store/lock.js.map +1 -0
- package/dist/commands/{channel → teamwork}/store/paths.d.ts +18 -32
- package/dist/commands/teamwork/store/paths.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/store/paths.js +42 -109
- package/dist/commands/teamwork/store/paths.js.map +1 -0
- package/dist/commands/teamwork/store/schema.d.ts +18 -0
- package/dist/commands/teamwork/store/schema.d.ts.map +1 -0
- package/dist/commands/teamwork/store/schema.js +23 -0
- package/dist/commands/teamwork/store/schema.js.map +1 -0
- package/dist/commands/{channel → teamwork}/store/thread-state.d.ts +3 -3
- package/dist/commands/teamwork/store/thread-state.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/store/thread-state.js +1 -1
- package/dist/commands/teamwork/store/thread-state.js.map +1 -0
- package/dist/commands/teamwork/store/watch.d.ts +19 -0
- package/dist/commands/teamwork/store/watch.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/store/watch.js +8 -8
- package/dist/commands/teamwork/store/watch.js.map +1 -0
- package/dist/commands/teamwork/supervisor/idle.d.ts.map +1 -0
- package/dist/commands/teamwork/supervisor/idle.js.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/inbox.d.ts +2 -2
- package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/inbox.js +14 -14
- package/dist/commands/teamwork/supervisor/inbox.js.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/shutdown.d.ts +3 -6
- package/dist/commands/teamwork/supervisor/shutdown.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/shutdown.js +7 -17
- package/dist/commands/teamwork/supervisor/shutdown.js.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/stdout.d.ts +3 -5
- package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/stdout.js +12 -23
- package/dist/commands/teamwork/supervisor/stdout.js.map +1 -0
- package/dist/commands/teamwork/supervisor/turns.d.ts.map +1 -0
- package/dist/commands/teamwork/supervisor/turns.js.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/warning.d.ts +5 -5
- package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor/warning.js +6 -6
- package/dist/commands/teamwork/supervisor/warning.js.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor.d.ts +21 -21
- package/dist/commands/teamwork/supervisor.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/supervisor.js +53 -63
- package/dist/commands/teamwork/supervisor.js.map +1 -0
- package/dist/commands/teamwork/teammate-adapters.d.ts +31 -0
- package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -0
- package/dist/commands/teamwork/teammate-adapters.js +96 -0
- package/dist/commands/teamwork/teammate-adapters.js.map +1 -0
- package/dist/commands/teamwork/teammate-config.d.ts +19 -0
- package/dist/commands/teamwork/teammate-config.d.ts.map +1 -0
- package/dist/commands/teamwork/teammate-config.js +97 -0
- package/dist/commands/teamwork/teammate-config.js.map +1 -0
- package/dist/commands/teamwork/teammate-launch.d.ts +58 -0
- package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -0
- package/dist/commands/teamwork/teammate-launch.js +125 -0
- package/dist/commands/teamwork/teammate-launch.js.map +1 -0
- package/dist/commands/teamwork/text-body.d.ts +13 -0
- package/dist/commands/teamwork/text-body.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/text-body.js +3 -3
- package/dist/commands/teamwork/text-body.js.map +1 -0
- package/dist/commands/teamwork/threads.d.ts +35 -0
- package/dist/commands/teamwork/threads.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/threads.js +19 -19
- package/dist/commands/teamwork/threads.js.map +1 -0
- package/dist/commands/teamwork/title.d.ts +12 -0
- package/dist/commands/teamwork/title.d.ts.map +1 -0
- package/dist/commands/teamwork/title.js +24 -0
- package/dist/commands/teamwork/title.js.map +1 -0
- package/dist/commands/{channel → teamwork}/wait.d.ts +1 -5
- package/dist/commands/teamwork/wait.d.ts.map +1 -0
- package/dist/commands/{channel → teamwork}/wait.js +8 -21
- package/dist/commands/teamwork/wait.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +48 -89
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +9 -10
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/claude.d.ts +0 -17
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +2 -61
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +2 -2
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/snow.js +1 -1
- package/dist/configurators/snow.js.map +1 -1
- package/dist/configurators/workflow.d.ts +1 -1
- package/dist/configurators/workflow.js +5 -5
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +1 -1
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +1 -1
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
- package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
- package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
- package/dist/migrations/manifests/0.7.0-beta.51.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.52.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.53.json +27 -0
- package/dist/migrations/manifests/0.7.0-beta.54.json +8 -0
- package/dist/migrations/manifests/0.7.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.7.1.json +9 -0
- package/dist/templates/claude/hooks/statusline.py +0 -7
- package/dist/templates/codex/hooks/session-start.py +31 -38
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
- package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
- package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
- package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
- package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
- package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
- package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
- package/dist/templates/common/commands/continue.md +9 -49
- package/dist/templates/common/commands/finish-work.md +10 -58
- package/dist/templates/common/commands/start.md +19 -49
- package/dist/templates/common/skills/brainstorm.md +11 -191
- package/dist/templates/copilot/hooks/session-start.py +30 -26
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -150
- package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
- package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
- package/dist/templates/copilot/prompts/start.prompt.md +12 -10
- package/dist/templates/dsh/DSH.md +2 -2
- package/dist/templates/kiro/agents/trellis.json +2 -2
- package/dist/templates/markdown/agents.md +14 -3
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
- package/dist/templates/markdown/workspace-index.md +0 -1
- package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
- package/dist/templates/opencode/lib/session-utils.js +20 -25
- package/dist/templates/opencode/lib/trellis-context.js +4 -76
- package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
- package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
- package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
- package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
- package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
- package/dist/templates/shared-hooks/session-start.py +21 -33
- package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
- package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
- package/dist/templates/trellis/agents/teammate.md +63 -0
- package/dist/templates/trellis/config.yaml +29 -38
- package/dist/templates/trellis/gitignore.txt +1 -0
- package/dist/templates/trellis/index.d.ts +8 -12
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +14 -25
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +1 -1
- package/dist/templates/trellis/scripts/common/__init__.py +0 -1
- package/dist/templates/trellis/scripts/common/active_task.py +136 -100
- package/dist/templates/trellis/scripts/common/config.py +7 -9
- package/dist/templates/trellis/scripts/common/git_context.py +1 -1
- package/dist/templates/trellis/scripts/common/io.py +19 -0
- package/dist/templates/trellis/scripts/common/paths.py +0 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
- package/dist/templates/trellis/scripts/common/session_context.py +1 -8
- package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
- package/dist/templates/trellis/scripts/common/task_context.py +152 -59
- package/dist/templates/trellis/scripts/common/task_continuity.py +563 -0
- package/dist/templates/trellis/scripts/common/task_store.py +70 -548
- package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
- package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
- package/dist/templates/trellis/scripts/common/tasks.py +5 -8
- package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
- package/dist/templates/trellis/scripts/task.py +114 -377
- package/dist/templates/trellis/workflow.md +111 -699
- package/dist/utils/agent-refs.d.ts +5 -5
- package/dist/utils/agent-refs.js +6 -6
- package/dist/utils/file-writer.d.ts +3 -2
- package/dist/utils/file-writer.d.ts.map +1 -1
- package/dist/utils/file-writer.js +3 -2
- package/dist/utils/file-writer.js.map +1 -1
- package/dist/utils/managed-paths.d.ts +0 -7
- package/dist/utils/managed-paths.d.ts.map +1 -1
- package/dist/utils/managed-paths.js +0 -40
- package/dist/utils/managed-paths.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +2 -11
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +3 -3
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/workflow-resolver.d.ts +10 -16
- package/dist/utils/workflow-resolver.d.ts.map +1 -1
- package/dist/utils/workflow-resolver.js +25 -36
- package/dist/utils/workflow-resolver.js.map +1 -1
- package/package.json +2 -2
- package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
- package/dist/commands/channel/adapters/claude.js.map +0 -1
- package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
- package/dist/commands/channel/adapters/codex.js.map +0 -1
- package/dist/commands/channel/adapters/index.d.ts.map +0 -1
- package/dist/commands/channel/adapters/index.js.map +0 -1
- package/dist/commands/channel/adapters/types.d.ts.map +0 -1
- package/dist/commands/channel/adapters/types.js.map +0 -1
- package/dist/commands/channel/agent-loader.d.ts.map +0 -1
- package/dist/commands/channel/agent-loader.js.map +0 -1
- package/dist/commands/channel/context-loader.d.ts.map +0 -1
- package/dist/commands/channel/context-loader.js.map +0 -1
- package/dist/commands/channel/context-trust.d.ts.map +0 -1
- package/dist/commands/channel/context-trust.js.map +0 -1
- package/dist/commands/channel/context.d.ts +0 -16
- package/dist/commands/channel/context.d.ts.map +0 -1
- package/dist/commands/channel/context.js.map +0 -1
- package/dist/commands/channel/create.d.ts +0 -29
- package/dist/commands/channel/create.d.ts.map +0 -1
- package/dist/commands/channel/create.js +0 -47
- package/dist/commands/channel/create.js.map +0 -1
- package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
- package/dist/commands/channel/dev-parse-trace.js.map +0 -1
- package/dist/commands/channel/guard.d.ts.map +0 -1
- package/dist/commands/channel/guard.js.map +0 -1
- package/dist/commands/channel/index.d.ts +0 -3
- package/dist/commands/channel/index.d.ts.map +0 -1
- package/dist/commands/channel/index.js.map +0 -1
- package/dist/commands/channel/interrupt.d.ts.map +0 -1
- package/dist/commands/channel/interrupt.js +0 -22
- package/dist/commands/channel/interrupt.js.map +0 -1
- package/dist/commands/channel/kill.d.ts +0 -7
- package/dist/commands/channel/kill.d.ts.map +0 -1
- package/dist/commands/channel/kill.js.map +0 -1
- package/dist/commands/channel/list.d.ts +0 -18
- package/dist/commands/channel/list.d.ts.map +0 -1
- package/dist/commands/channel/list.js.map +0 -1
- package/dist/commands/channel/messages.d.ts.map +0 -1
- package/dist/commands/channel/messages.js.map +0 -1
- package/dist/commands/channel/rm.d.ts +0 -27
- package/dist/commands/channel/rm.d.ts.map +0 -1
- package/dist/commands/channel/rm.js.map +0 -1
- package/dist/commands/channel/run.d.ts +0 -32
- package/dist/commands/channel/run.js +0 -141
- package/dist/commands/channel/run.js.map +0 -1
- package/dist/commands/channel/send.d.ts.map +0 -1
- package/dist/commands/channel/send.js.map +0 -1
- package/dist/commands/channel/spawn.d.ts.map +0 -1
- package/dist/commands/channel/spawn.js.map +0 -1
- package/dist/commands/channel/store/events.d.ts +0 -22
- package/dist/commands/channel/store/events.d.ts.map +0 -1
- package/dist/commands/channel/store/events.js.map +0 -1
- package/dist/commands/channel/store/filter.d.ts +0 -3
- package/dist/commands/channel/store/filter.d.ts.map +0 -1
- package/dist/commands/channel/store/filter.js +0 -2
- package/dist/commands/channel/store/filter.js.map +0 -1
- package/dist/commands/channel/store/lock.d.ts.map +0 -1
- package/dist/commands/channel/store/lock.js.map +0 -1
- package/dist/commands/channel/store/paths.d.ts.map +0 -1
- package/dist/commands/channel/store/paths.js.map +0 -1
- package/dist/commands/channel/store/schema.d.ts +0 -27
- package/dist/commands/channel/store/schema.d.ts.map +0 -1
- package/dist/commands/channel/store/schema.js +0 -34
- package/dist/commands/channel/store/schema.js.map +0 -1
- package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
- package/dist/commands/channel/store/thread-state.js.map +0 -1
- package/dist/commands/channel/store/watch.d.ts +0 -19
- package/dist/commands/channel/store/watch.d.ts.map +0 -1
- package/dist/commands/channel/store/watch.js.map +0 -1
- package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/idle.js.map +0 -1
- package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/inbox.js.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
- package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/stdout.js.map +0 -1
- package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/turns.js.map +0 -1
- package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/warning.js.map +0 -1
- package/dist/commands/channel/supervisor.d.ts.map +0 -1
- package/dist/commands/channel/supervisor.js.map +0 -1
- package/dist/commands/channel/text-body.d.ts +0 -13
- package/dist/commands/channel/text-body.d.ts.map +0 -1
- package/dist/commands/channel/text-body.js.map +0 -1
- package/dist/commands/channel/threads.d.ts +0 -39
- package/dist/commands/channel/threads.d.ts.map +0 -1
- package/dist/commands/channel/threads.js.map +0 -1
- package/dist/commands/channel/title.d.ts +0 -12
- package/dist/commands/channel/title.d.ts.map +0 -1
- package/dist/commands/channel/title.js +0 -24
- package/dist/commands/channel/title.js.map +0 -1
- package/dist/commands/channel/wait.d.ts.map +0 -1
- package/dist/commands/channel/wait.js.map +0 -1
- package/dist/commands/channel/workers.d.ts +0 -9
- package/dist/commands/channel/workers.d.ts.map +0 -1
- package/dist/commands/channel/workers.js +0 -31
- package/dist/commands/channel/workers.js.map +0 -1
- package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
- package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
- package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
- package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
- package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -193
- package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
- package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
- package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
- package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
- package/dist/templates/trellis/agents/check.md +0 -70
- package/dist/templates/trellis/agents/implement.md +0 -71
- package/dist/templates/trellis/agents/subnode.env +0 -4
- package/dist/templates/trellis/agents/subnode.md +0 -69
- package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
- package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
- package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
- package/dist/templates/trellis/scripts/subnode_artifact.py +0 -597
- package/dist/templates/trellis/scripts/workspace_note.py +0 -126
- /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
- /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
- /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
- /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
- /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
|
@@ -1,156 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Route a Trellis task through its current phase."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Requirements and phase routing
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use `.trellis/workflow.md` and the current workflow-state breadcrumb as the authority for the task's phase. Task lifecycle status and artifact presence do not identify the business phase.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- No active task: if the request needs a Trellis task, obtain task-creation consent, create it, and load `trellis-goal-exploration-and-requirements`. Handle eligible low-risk, authorized work through the taskless route.
|
|
10
|
+
- Task without an initialized phase route: use `trellis-goal-exploration-and-requirements` to align the requirements; initialize the applicable ordered route only after the user confirms the current requirements baseline.
|
|
11
|
+
- Task with an active phase: load the Skill matching that phase. This shortcut must not reset or bypass the current phase.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
While any user-owned product, scope, UX, compatibility, risk, or acceptance decision remains unresolved, keep the task in planning. First inventory evidence and decision dependencies. If at least two independent material decisions remain and `pennix-decision-gates` is available, delegate one bounded batch of up to three frontier questions; otherwise ask the single highest-value question. Do not edit product code, dispatch implementation, or run `task.py start` until the decision chain is sealed.
|
|
14
|
-
|
|
15
|
-
## Non-Negotiable Evidence Rule
|
|
16
|
-
|
|
17
|
-
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
18
|
-
|
|
19
|
-
This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
|
|
20
|
-
|
|
21
|
-
Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, acceptance behavior, or decisions that remain ambiguous after inspection.
|
|
22
|
-
|
|
23
|
-
Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
|
|
28
|
-
|
|
29
|
-
## Preconditions
|
|
30
|
-
|
|
31
|
-
Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
|
|
32
|
-
|
|
33
|
-
If no task exists yet, create one:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
TASK_DIR=$({{PYTHON_CMD}} ./.trellis/scripts/task.py create "<short task title>" --description "<one-line summary>" --slug <slug>)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Use a concise title from the user's request. Both the title and `--description` must be non-empty — `create` rejects blanks, and a record with either one empty is refused at archive. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
|
|
40
|
-
|
|
41
|
-
`task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
|
|
42
|
-
|
|
43
|
-
## Planning Flow
|
|
44
|
-
|
|
45
|
-
1. Capture the user's request and initial known facts in `prd.md`.
|
|
46
|
-
2. Inspect available evidence before asking questions:
|
|
47
|
-
- code, tests, fixtures, and configs
|
|
48
|
-
- README files, docs, existing specs, and domain notes
|
|
49
|
-
- related Trellis tasks, research files, and session history when present
|
|
50
|
-
3. Separate what you found into:
|
|
51
|
-
- confirmed facts
|
|
52
|
-
- product intent still needed from the user
|
|
53
|
-
- scope or risk decisions still needed from the user
|
|
54
|
-
- likely out-of-scope items
|
|
55
|
-
4. If user-owned decisions remain, calculate the independent frontier. Use `pennix-decision-gates` for a bounded batch when two or more independent material decisions are ready; otherwise ask the single highest-value question. Include recommendation and trade-off, then stop the turn for native input.
|
|
56
|
-
5. After each answer batch, update `prd.md`, record the selected decisions, recheck evidence and conflicts, and repeat from step 2. Do not create a second Trellis lifecycle for the same decision chain.
|
|
57
|
-
6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
|
|
58
|
-
7. Run the requirement convergence gate, then the PRD convergence pass.
|
|
59
|
-
8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
|
|
60
|
-
9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If implementation reveals a material unresolved decision, record `decision-needed`, run `task.py replan <task> "<reason>"`, and return through this planning flow; do not open a popup during implementation.
|
|
61
|
-
|
|
62
|
-
Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
|
|
63
|
-
|
|
64
|
-
## Question Rules
|
|
65
|
-
|
|
66
|
-
Ask one bounded batch per message: include up to three independent material frontier questions. Ask exactly one question only when it is the sole remaining material decision or later decisions depend on its answer.
|
|
67
|
-
|
|
68
|
-
Each question must include:
|
|
69
|
-
|
|
70
|
-
- the decision needed
|
|
71
|
-
- why the answer matters
|
|
72
|
-
- your recommended answer
|
|
73
|
-
- the trade-off if the user chooses differently
|
|
74
|
-
|
|
75
|
-
Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
|
|
76
|
-
|
|
77
|
-
Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
|
|
78
|
-
|
|
79
|
-
Do not manufacture clarification questions when the request and repository evidence already resolve every decision. In that case, proceed directly to the final planning summary, which still requires a subsequent explicit approval.
|
|
80
|
-
|
|
81
|
-
The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
|
|
82
|
-
|
|
83
|
-
## Requirement Convergence Gate
|
|
84
|
-
|
|
85
|
-
Before final review, verify all of the following:
|
|
86
|
-
|
|
87
|
-
- the user outcome and product value are explicit
|
|
88
|
-
- in-scope and out-of-scope behavior are explicit
|
|
89
|
-
- acceptance criteria describe observable outcomes
|
|
90
|
-
- user-owned product, scope, UX, compatibility, and risk decisions are resolved
|
|
91
|
-
- blocking open questions are empty
|
|
92
|
-
- technical unknowns are researched or explicitly deferred without changing MVP behavior
|
|
93
|
-
|
|
94
|
-
Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
|
|
95
|
-
|
|
96
|
-
The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
|
|
97
|
-
|
|
98
|
-
## Artifact Rules
|
|
99
|
-
|
|
100
|
-
`prd.md` records requirements and acceptance:
|
|
101
|
-
|
|
102
|
-
- goal and user value
|
|
103
|
-
- confirmed facts
|
|
104
|
-
- requirements
|
|
105
|
-
- acceptance criteria
|
|
106
|
-
- out of scope
|
|
107
|
-
- open questions that still block planning
|
|
108
|
-
|
|
109
|
-
`design.md` records technical design for complex tasks:
|
|
110
|
-
|
|
111
|
-
- architecture and boundaries
|
|
112
|
-
- data flow and contracts
|
|
113
|
-
- compatibility and migration notes
|
|
114
|
-
- important trade-offs
|
|
115
|
-
- operational or rollback considerations
|
|
116
|
-
|
|
117
|
-
`implement.md` records execution planning for complex tasks:
|
|
118
|
-
|
|
119
|
-
- ordered implementation checklist
|
|
120
|
-
- validation commands
|
|
121
|
-
- risky files or rollback points
|
|
122
|
-
- follow-up checks before `task.py start`
|
|
123
|
-
|
|
124
|
-
Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start`.
|
|
125
|
-
|
|
126
|
-
`implement.md` is not a replacement for `implement.jsonl`. On sub-agent-dispatch workflows, `implement.jsonl` and `check.jsonl` must each contain at least one real spec/research entry before `task.py start`; an empty manifest, or one holding only a legacy `_example` placeholder row, does not count. Inline workflows skip this JSONL gate because Phase 2 loads context through `trellis-before-dev`.
|
|
127
|
-
|
|
128
|
-
## PRD Convergence Pass
|
|
129
|
-
|
|
130
|
-
Before declaring planning ready or running `task.py start`, rewrite `prd.md` once against the final structure described in the artifact rules above. This is not optional cleanup; it is the final planning gate.
|
|
131
|
-
|
|
132
|
-
The pass must be lossless:
|
|
133
|
-
|
|
134
|
-
- Collapse repeated facts into one authoritative section.
|
|
135
|
-
- Fold temporary brainstorm sections such as `What I already know`, `Assumptions`, and resolved `Open Questions` into Goal, Background, Requirements, Technical Notes, or Acceptance Criteria.
|
|
136
|
-
- Remove resolved open questions instead of leaving empty or already-answered sections.
|
|
137
|
-
- Merge parallel bug and requirement lists when they describe the same work; keep each defect's severity, evidence, and file:line anchors on the owning requirement.
|
|
138
|
-
- Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
|
|
139
|
-
- Do not proceed to final review while any blocking open question remains.
|
|
140
|
-
|
|
141
|
-
After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
|
|
142
|
-
|
|
143
|
-
## Quality Bar
|
|
144
|
-
|
|
145
|
-
Before declaring planning ready:
|
|
146
|
-
|
|
147
|
-
- `prd.md` contains testable acceptance criteria.
|
|
148
|
-
- `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
|
|
149
|
-
- Repository-answerable questions have already been answered through inspection.
|
|
150
|
-
- Blocking open questions are empty.
|
|
151
|
-
- Complex tasks have `design.md` and `implement.md`.
|
|
152
|
-
- Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
|
|
153
|
-
- The latest final planning summary has been presented to the user.
|
|
154
|
-
- In a subsequent message, the user explicitly approved that summary for implementation.
|
|
155
|
-
|
|
156
|
-
Do not start implementation merely because the user originally asked for implementation.
|
|
13
|
+
`task.py start` enters implementation only after the accepted Solution Design and Convergence Phase implementation contract and separate implementation authorization. The phase Skills define their own activities and acceptance conditions; do not impose a fixed number of questions, alternatives, or planning documents.
|
|
@@ -1,99 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Record progress in the Trellis developer session journal."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Finish Work
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Record progress in the developer session journal when ending this session. This prompt does not change task status, phase state, or implementation authorization. Task completion and cancellation are handled during Delivery Review and On-Site Closeout Phase through Trellis CLI.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Review the current session
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Step 1: Survey current state
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
python3 ./.trellis/scripts/get_context.py --mode record
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
This prints:
|
|
20
|
-
|
|
21
|
-
- **My active tasks** — review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
|
|
22
|
-
- **Git status** — quick visual on what's dirty.
|
|
23
|
-
- **Recent commits** — you'll need their hashes in Step 4 for `--commit`.
|
|
24
|
-
|
|
25
|
-
If `--mode record` surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.
|
|
26
|
-
|
|
27
|
-
## Step 2: Sanity check — classify dirty paths
|
|
28
|
-
|
|
29
|
-
Run:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
git status --porcelain
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Filter out paths under `.trellis/workspace/` and `.trellis/tasks/` — those are managed by `add_session.py` and `task.py archive` auto-commits and will appear dirty as part of this prompt's own work.
|
|
36
|
-
|
|
37
|
-
For each remaining dirty path, decide whether it belongs to **the current task** or to **other parallel work** (e.g., another terminal window editing the same repo). Heuristics:
|
|
38
|
-
|
|
39
|
-
- Paths referenced in the current task's `prd.md` / `implement.jsonl` / `check.jsonl` → current task
|
|
40
|
-
- Paths in code areas matching the task's stated scope, or that you remember editing this session → current task
|
|
41
|
-
- Paths in unrelated areas you have no recollection of touching this session → other parallel work
|
|
42
|
-
|
|
43
|
-
Then route:
|
|
44
|
-
|
|
45
|
-
- **Any remaining path looks like current-task work** — bail out with:
|
|
46
|
-
> "Working tree has uncommitted code changes from this task: `<list>`. Return to workflow Phase 3.4 to commit them before running `/finish-work`."
|
|
47
|
-
|
|
48
|
-
Do NOT run `git commit` here. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.
|
|
49
|
-
- **All remaining paths look unrelated** (other parallel-window work) — report them once and continue to Step 3:
|
|
50
|
-
> "FYI, dirty files outside this task's scope — leaving them for the other window: `<list>`."
|
|
51
|
-
- **Genuinely unsure** — ask the user once: "Are `<list>` this task's work I forgot to commit, or another window's? (commit / ignore)" — then route per their answer.
|
|
11
|
+
python3 ./.trellis/scripts/get_context.py --mode record
|
|
52
12
|
|
|
53
|
-
|
|
13
|
+
Review the current task, repository changes, and recent commits. Make the journal summary clear about completed work, remaining work, and blockers. A clean working tree or committed changes do not by themselves mean the task is complete.
|
|
54
14
|
|
|
55
|
-
|
|
56
|
-
python3 ./.trellis/scripts/task.py archive <task-name>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a `chore(task): archive ...` commit via the script's auto-commit.
|
|
60
|
-
|
|
61
|
-
If there is no active task and the user did not confirm any cleanup archives, skip this step.
|
|
62
|
-
|
|
63
|
-
## Step 4: Record session journal
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
python3 ./.trellis/scripts/add_session.py \
|
|
67
|
-
--title "Session Title" \
|
|
68
|
-
--commit "hash1,hash2" \
|
|
69
|
-
--summary "Brief summary"
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's `Recent commits` list, or via `git log --oneline`) for `--commit`. Do not include the archive commit hashes from Step 3. This produces a `chore: record journal` commit.
|
|
73
|
-
|
|
74
|
-
Final git log order: `<work commits from 3.4>` → `chore(task): archive ...` (one or more) → `chore: record journal`.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Relationship to Other Commands
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
Development Flow (workflow.md Phase 3):
|
|
82
|
-
3.2 Debug retrospective (on demand)
|
|
83
|
-
3.3 Spec update
|
|
84
|
-
3.4 Commit changes -> AI drafts batched commits, user confirms
|
|
85
|
-
3.5 Wrap-up -> /finish-work (this prompt: survey + archive + journal)
|
|
86
|
-
(3.1 was folded into 2.2 + 3.4 — see workflow.md "Phase 3: Finish" note)
|
|
87
|
-
|
|
88
|
-
Debug Flow:
|
|
89
|
-
Hit bug -> Fix -> /break-loop -> Knowledge capture
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
- `/finish-work` — survey + archive + record session (this prompt)
|
|
93
|
-
- `/break-loop` — deep analysis after debugging
|
|
94
|
-
|
|
95
|
-
---
|
|
15
|
+
## Record the journal
|
|
96
16
|
|
|
97
|
-
|
|
17
|
+
python3 ./.trellis/scripts/add_session.py \
|
|
18
|
+
--title "Session title" \
|
|
19
|
+
--commit "hash1,hash2" \
|
|
20
|
+
--summary "Progress, remaining work, and blockers"
|
|
98
21
|
|
|
99
|
-
|
|
22
|
+
Pass only commit hashes that belong to this session. Omit --commit when no relevant commit exists. Leave task state to Trellis CLI and formal session handoff to its separate, explicitly requested workflow.
|
|
@@ -2,28 +2,21 @@
|
|
|
2
2
|
description: "Trellis Copilot prompt: Method 1: Simple parameters"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
[!] **Prerequisite**:
|
|
5
|
+
[!] **Prerequisite**: Record verified progress and the actual commit references for this session. Do not imply that the task is complete merely because work was committed.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Task status and phase state are changed only through Trellis CLI. This prompt records the developer session journal; it does not archive, complete, or cancel tasks.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Record Work Progress
|
|
12
12
|
|
|
13
|
-
### Step 1: Get Context
|
|
13
|
+
### Step 1: Get Context
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
python3 ./.trellis/scripts/get_context.py --mode record
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- Code committed? → Archive it (don't wait for PR)
|
|
21
|
-
- All acceptance criteria met? → Archive it
|
|
22
|
-
- Don't skip archiving just because `status` still says `planning` or `in_progress`
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
python3 ./.trellis/scripts/task.py archive <task-name>
|
|
26
|
-
```
|
|
19
|
+
Review the current phase, changed files, recent commits, remaining work, and blockers. Use the Delivery Review and On-Site Closeout Phase Skill with the Trellis CLI to complete or cancel a task when its acceptance conditions are met.
|
|
27
20
|
|
|
28
21
|
### Step 2: One-Click Add Session
|
|
29
22
|
|
|
@@ -62,5 +55,4 @@ EOF
|
|
|
62
55
|
|---------|---------|
|
|
63
56
|
| `python3 ./.trellis/scripts/get_context.py --mode record` | Get context for record-session |
|
|
64
57
|
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended, branch auto-complete)** |
|
|
65
|
-
| `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task (auto-commits) |
|
|
66
58
|
| `python3 ./.trellis/scripts/task.py list` | List active tasks |
|
|
@@ -4,7 +4,7 @@ description: "Trellis Copilot prompt: Start Session"
|
|
|
4
4
|
|
|
5
5
|
# Start Session
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use this prompt to inspect or refresh Trellis context. Copilot also supplies SessionStart context and a per-turn workflow-state breadcrumb through its hooks.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -38,15 +38,13 @@ cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
|
|
|
38
38
|
Index files list the specific guideline docs to read when you actually start coding.
|
|
39
39
|
|
|
40
40
|
## Step 4: Decide next action
|
|
41
|
-
|
|
41
|
+
Use the current `<workflow-state>` breadcrumb to identify the business phase; task lifecycle status (`planning` or `in_progress`) and artifact presence do not identify that phase. If the breadcrumb is missing or stale, inspect the task with `task.py phase show <task>` and follow the matching phase Skill in `.trellis/workflow.md`.
|
|
42
42
|
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
- **No active task** → classify first. For simple conversation / small task, ask only whether this turn should create a Trellis task. For complex work, ask whether you may create a Trellis task and enter planning. If the user says no, skip Trellis for this session.
|
|
43
|
+
- **An active phase is recorded** → continue that phase and load its matching Skill.
|
|
44
|
+
- **The task has no initialized phase route** → load `trellis-goal-exploration-and-requirements`, align and obtain the user's confirmation of the current requirements baseline, then initialize the applicable ordered route with `task.py phase init`.
|
|
45
|
+
- **No active task** → classify first. Handle a clear, low-risk, reversible, authorized, immediately verifiable request directly; otherwise ask for task-creation consent and begin with `trellis-goal-exploration-and-requirements`.
|
|
46
|
+
|
|
47
|
+
`task.py start` enters implementation only after an accepted implementation contract from Solution Design and Convergence Phase and separate implementation authorization.
|
|
50
48
|
|
|
51
49
|
---
|
|
52
50
|
|
|
@@ -54,7 +52,11 @@ From Step 1 you know the current task and status. Check the task directory:
|
|
|
54
52
|
|
|
55
53
|
| User intent | Skill |
|
|
56
54
|
|---|---|
|
|
57
|
-
|
|
|
55
|
+
| Goal and requirements | `trellis-goal-exploration-and-requirements` |
|
|
56
|
+
| Decision alternatives | `trellis-decision-space-construction-and-merging` |
|
|
57
|
+
| Solution design | `trellis-solution-design-and-convergence` |
|
|
58
|
+
| Implementation | `trellis-task-implementation` |
|
|
59
|
+
| Delivery review | `trellis-delivery-review-and-closeout` |
|
|
58
60
|
| About to write code | `trellis-before-dev` |
|
|
59
61
|
| Done coding / quality check | `trellis-check` |
|
|
60
62
|
| Stuck / fixed same bug multiple times | `trellis-break-loop` |
|
|
@@ -27,8 +27,8 @@ In dsh:
|
|
|
27
27
|
2. The main session dispatches `trellis-agent-research`,
|
|
28
28
|
`trellis-agent-implement`, and `trellis-agent-check` through DSH's native
|
|
29
29
|
`subagent` tool. Each child loads exactly one matching role skill.
|
|
30
|
-
3.
|
|
31
|
-
|
|
30
|
+
3. Use Delivery Review and On-Site Closeout Phase to review and close the task. `trellis-finish-work` records
|
|
31
|
+
session progress separately and does not change task lifecycle state.
|
|
32
32
|
|
|
33
33
|
## Companion plugin fallback contract
|
|
34
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis",
|
|
3
|
-
"description": "Trellis workflow main agent.
|
|
4
|
-
"prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn
|
|
3
|
+
"description": "Trellis workflow main agent. Follows the current task route and matching Skills, or uses the taskless route when eligible.",
|
|
4
|
+
"prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn with the active task and its current phase. An `agentSpawn` hook injects a `<session-context>` overview when this agent starts. Use these to orient yourself; resolve missing or stale state through Trellis CLI.\n\n## How to Work\n\n1. Follow `.trellis/workflow.md` and the matching phase Skill. The workflow and its task route define the business phase; task lifecycle status and artifact presence do not.\n2. If the breadcrumb is missing or stale, inspect the active task with `python3 ./.trellis/scripts/task.py current --json` and `python3 ./.trellis/scripts/task.py phase show <task>`.\n3. With no active task, use the taskless route only when `.trellis/workflow.md` permits it; otherwise create the task and establish its baseline through Goal Exploration and Requirements Confirmation Phase.\n4. The Goal Exploration and Requirements Confirmation Phase requires the user's confirmation of the current requirements revision. Before Task Implementation and Test Verification Phase, both an accepted `implementation_contract` from Solution Design and Convergence Phase and separate implementation authorization are required. Delivery Review and On-Site Closeout Phase governs delivery acceptance, task completion, and cancellation.\n5. Use task artifacts and context manifests as required by the current route and any dispatched agent; do not require a fixed set of planning documents based only on task complexity.\n6. Verify with project checks appropriate to the changes before reporting completion.\n\n## Constraints\n\n- Do NOT run `git commit` / `git push` / `git merge` unless the user explicitly asks.\n- Keep changes scoped to the request.\n- Discover guidelines on demand: `python3 ./.trellis/scripts/get_context.py --mode packages`.\n",
|
|
5
5
|
"tools": [
|
|
6
6
|
"read",
|
|
7
7
|
"write",
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
<!-- TRELLIS:START -->
|
|
2
|
-
# Trellis
|
|
2
|
+
# Trellis Instructions
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
These instructions are for AI assistants working in this project.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This project is managed by Trellis. The working knowledge you need lives under `.trellis/`:
|
|
7
|
+
|
|
8
|
+
- `.trellis/workflow.md` — development phases, when to create tasks, skill routing
|
|
9
|
+
- `.trellis/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
|
|
10
|
+
- `.trellis/workspace/` — per-developer journals and session traces
|
|
11
|
+
- `.trellis/tasks/` — task records and their planning, implementation, and review artifacts
|
|
12
|
+
|
|
13
|
+
If a Trellis command is available on your platform (e.g. `/trellis:finish-work`, `/trellis:continue`), prefer it over manual steps. Not every platform exposes every command.
|
|
14
|
+
|
|
15
|
+
If you're using Codex or another agent-capable tool, additional project-scoped helpers may live in:
|
|
16
|
+
- `.agents/skills/` — reusable Trellis skills
|
|
17
|
+
- `.codex/agents/` — optional custom subagents
|
|
7
18
|
|
|
8
19
|
Managed by Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `trellis update`.
|
|
9
20
|
|
|
@@ -216,7 +216,7 @@ When a CLI auto-detects a mode by probing a remote resource (e.g., checking if `
|
|
|
216
216
|
|
|
217
217
|
**Real-world example**: Custom registry flow had 8 bugs across 3 review rounds: (1) probe only ran in interactive mode, (2) transient errors fell through to wrong mode, (3) giget URI had `#ref` in wrong position, (4) prefetched templates leaked across source switches, (5) `--template` shortcut bypassed probe but `downloadTemplateById` internally used catch-all `fetchTemplateIndex`, turning timeouts into "Template not found".
|
|
218
218
|
|
|
219
|
-
**Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@
|
|
219
|
+
**Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@mindfoldhq/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -284,7 +284,7 @@ When a CLI auto-detects a mode by probing a remote resource (e.g., checking if `
|
|
|
284
284
|
|
|
285
285
|
**Real-world example**: Custom registry flow had 8 bugs across 3 review rounds: (1) probe only ran in interactive mode, (2) transient errors fell through to wrong mode, (3) giget URI had `#ref` in wrong position, (4) prefetched templates leaked across source switches, (5) `--template` shortcut bypassed probe but `downloadTemplateById` internally used catch-all `fetchTemplateIndex`, turning timeouts into "Template not found".
|
|
286
286
|
|
|
287
|
-
**Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@
|
|
287
|
+
**Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@mindfoldhq/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
|
|
288
288
|
|
|
289
289
|
---
|
|
290
290
|
|
|
@@ -319,9 +319,10 @@ CLI input → event writer → events.jsonl → reader → filter → reducer
|
|
|
319
319
|
- [ ] Add at least one regression that proves history replay and live filtering
|
|
320
320
|
use the same filter model
|
|
321
321
|
|
|
322
|
-
**Real-world example**:
|
|
323
|
-
`context`, labels, and
|
|
324
|
-
state correctly, but several commands still
|
|
325
|
-
local casts. The fix was to make
|
|
326
|
-
and `isThreadEvent`,
|
|
327
|
-
|
|
322
|
+
**Real-world example**: Forum Teamwork Sessions added thread events with
|
|
323
|
+
`description`, `context`, labels, and sequence tracking. The first
|
|
324
|
+
implementation replayed thread state correctly, but several commands still
|
|
325
|
+
re-parsed event payload fields with local casts. The fix was to make Core own
|
|
326
|
+
`ThreadTeamworkEvent` and `isThreadEvent`, use
|
|
327
|
+
`reduceTeamworkSessionMetadata` for session metadata, and use `reduceThreads`
|
|
328
|
+
for thread replay.
|
|
@@ -600,7 +600,7 @@ When release notes or docs claim an asset is bundled, installed automatically, o
|
|
|
600
600
|
included with Trellis, verify the whole distribution path:
|
|
601
601
|
|
|
602
602
|
- [ ] Source file exists in the branch being tagged, not only in another branch,
|
|
603
|
-
docs submodule, or
|
|
603
|
+
docs submodule, or external Marketplace repository.
|
|
604
604
|
- [ ] `pnpm build` copies the asset into `dist/templates/**`.
|
|
605
605
|
- [ ] `npm pack --dry-run --json` includes the expected `dist/**` path.
|
|
606
606
|
- [ ] The built binary installs the asset in a fresh temp repository.
|
|
@@ -59,7 +59,7 @@ function isInsideRoot(root: string, candidate: string): boolean {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// ---------------------------------------------------------------------------
|
|
62
|
-
// Trusted context roots (mirrors packages/cli/src/commands/
|
|
62
|
+
// Trusted context roots (mirrors packages/cli/src/commands/teamwork/context-trust.ts;
|
|
63
63
|
// standalone copy since templates don't import from the CLI package).
|
|
64
64
|
// ---------------------------------------------------------------------------
|
|
65
65
|
|
|
@@ -69,7 +69,7 @@ function stripTrustValue(s: string): string {
|
|
|
69
69
|
return s.trim().replace(/\s*#.*$/, "").trim().replace(/^['"]|['"]$/g, "");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
function
|
|
72
|
+
function parseTeamworkTrustSection(content: string): { trustedDirs: string[]; autoTrustSymlinks?: boolean } {
|
|
73
73
|
const lines = content.split("\n");
|
|
74
74
|
const trustedDirs: string[] = [];
|
|
75
75
|
let autoTrustSymlinks: boolean | undefined;
|
|
@@ -115,7 +115,7 @@ function parseChannelTrustSection(content: string): { trustedDirs: string[]; aut
|
|
|
115
115
|
const val = stripTrustValue(boolMatch[1]!).toLowerCase();
|
|
116
116
|
if (val === "false") autoTrustSymlinks = false;
|
|
117
117
|
else if (val === "true") autoTrustSymlinks = true;
|
|
118
|
-
else process.stderr.write(`[
|
|
118
|
+
else process.stderr.write(`[teamwork] teamwork.auto_trust_trellis_symlinks: invalid value '${val}', ignoring\n`);
|
|
119
119
|
continue;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -128,7 +128,7 @@ function resolveTrustedRoots(projectRoot: string): string[] {
|
|
|
128
128
|
let config: { trustedDirs: string[]; autoTrustSymlinks?: boolean } = { trustedDirs: [] };
|
|
129
129
|
if (existsSync(configPath)) {
|
|
130
130
|
try {
|
|
131
|
-
config =
|
|
131
|
+
config = parseTeamworkTrustSection(readFileSync(configPath, "utf-8"));
|
|
132
132
|
} catch {
|
|
133
133
|
// ignore
|
|
134
134
|
}
|
|
@@ -202,9 +202,9 @@ function displayProjectPath(projectRoot: string, filePath: string, taskDir?: str
|
|
|
202
202
|
function resolveActiveTaskStatus(
|
|
203
203
|
projectRoot: string,
|
|
204
204
|
contextKey: string | null,
|
|
205
|
-
): { status: string; taskDir: string | null; taskTitle: string | null } {
|
|
205
|
+
): { status: string; phaseStatus: string | null; taskDir: string | null; taskTitle: string | null } {
|
|
206
206
|
const sessionsDir = join(projectRoot, ".trellis", ".runtime", "sessions");
|
|
207
|
-
if (!existsSync(sessionsDir)) return { status: "no_task", taskDir: null, taskTitle: null };
|
|
207
|
+
if (!existsSync(sessionsDir)) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
208
208
|
|
|
209
209
|
// --- 通过 context key 解析 session 文件 ---
|
|
210
210
|
let sessionFilePath: string | null = null;
|
|
@@ -214,7 +214,7 @@ function resolveActiveTaskStatus(
|
|
|
214
214
|
if (existsSync(candidate)) {
|
|
215
215
|
sessionFilePath = candidate;
|
|
216
216
|
} else {
|
|
217
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
217
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
218
218
|
}
|
|
219
219
|
} else {
|
|
220
220
|
// No identity: use single-session fallback only when there is exactly one session file.
|
|
@@ -222,12 +222,12 @@ function resolveActiveTaskStatus(
|
|
|
222
222
|
try {
|
|
223
223
|
sessionFiles = readdirSync(sessionsDir).filter((f) => f.endsWith(".json"));
|
|
224
224
|
} catch {
|
|
225
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
225
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
226
226
|
}
|
|
227
227
|
if (sessionFiles.length === 1) {
|
|
228
228
|
sessionFilePath = join(sessionsDir, sessionFiles[0]);
|
|
229
229
|
} else {
|
|
230
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
230
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
@@ -236,12 +236,12 @@ function resolveActiveTaskStatus(
|
|
|
236
236
|
try {
|
|
237
237
|
sessionData = JSON.parse(readFileSync(sessionFilePath, "utf-8"));
|
|
238
238
|
} catch {
|
|
239
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
239
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
const currentTask = sessionData.current_task;
|
|
243
243
|
if (typeof currentTask !== "string" || !currentTask)
|
|
244
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
244
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
245
245
|
|
|
246
246
|
// Same jail the jsonl-referenced files already go through below. `task.py`
|
|
247
247
|
// now refuses to store a ref that leaves the project, but a session file
|
|
@@ -249,19 +249,30 @@ function resolveActiveTaskStatus(
|
|
|
249
249
|
// rewrite session files — so a poisoned pointer outlives the upgrade that
|
|
250
250
|
// closed the writer.
|
|
251
251
|
const taskDir = resolveProjectFile(projectRoot, currentTask, resolveTrustedRoots(projectRoot));
|
|
252
|
-
if (!taskDir) return { status: "no_task", taskDir: null, taskTitle: null };
|
|
252
|
+
if (!taskDir) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
253
253
|
const taskJsonPath = join(taskDir, "task.json");
|
|
254
|
-
if (!existsSync(taskJsonPath)) return { status: "no_task", taskDir: null, taskTitle: null };
|
|
254
|
+
if (!existsSync(taskJsonPath)) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
255
255
|
|
|
256
256
|
let taskData: Record<string, unknown>;
|
|
257
257
|
try {
|
|
258
258
|
taskData = JSON.parse(readFileSync(taskJsonPath, "utf-8"));
|
|
259
259
|
} catch {
|
|
260
|
-
return { status: "no_task", taskDir: null, taskTitle: null };
|
|
260
|
+
return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
const taskMeta = taskData.meta;
|
|
264
|
+
const phaseWorkflow = taskMeta && typeof taskMeta === "object" && !Array.isArray(taskMeta)
|
|
265
|
+
? (taskMeta as Record<string, unknown>).task_workflow as Record<string, unknown> | undefined
|
|
266
|
+
: undefined;
|
|
267
|
+
const route = phaseWorkflow?.phase_ids;
|
|
268
|
+
const phaseId = phaseWorkflow?.current_phase_id || (Array.isArray(route) ? route[route.length - 1] : undefined);
|
|
269
|
+
const phaseMap = phaseWorkflow?.phases;
|
|
270
|
+
const phase = typeof phaseId === "string" && phaseMap && typeof phaseMap === "object" && !Array.isArray(phaseMap)
|
|
271
|
+
? (phaseMap as Record<string, Record<string, unknown>>)[phaseId]
|
|
272
|
+
: null;
|
|
263
273
|
return {
|
|
264
|
-
status: typeof taskData.status === "string" ? taskData.status : "planning",
|
|
274
|
+
status: typeof phaseId === "string" && phase ? phaseId : (typeof taskData.status === "string" ? taskData.status : "planning"),
|
|
275
|
+
phaseStatus: typeof phase?.status === "string" ? phase.status : null,
|
|
265
276
|
taskDir,
|
|
266
277
|
taskTitle: typeof taskData.title === "string" ? taskData.title : null,
|
|
267
278
|
};
|
|
@@ -818,7 +829,7 @@ class TurnContextCache {
|
|
|
818
829
|
return { workflowMsg: this.workflowMsg };
|
|
819
830
|
}
|
|
820
831
|
|
|
821
|
-
const { status } = resolveActiveTaskStatus(projectRoot, contextKey);
|
|
832
|
+
const { status, phaseStatus } = resolveActiveTaskStatus(projectRoot, contextKey);
|
|
822
833
|
|
|
823
834
|
const workflowPath = join(projectRoot, ".trellis", "workflow.md");
|
|
824
835
|
let workflowMd = "";
|
|
@@ -839,7 +850,7 @@ class TurnContextCache {
|
|
|
839
850
|
// When skip keyword is present, skip workflow state injection this turn
|
|
840
851
|
this.workflowMsg = this.skipThisTurn
|
|
841
852
|
? ""
|
|
842
|
-
: `<workflow-state>\n${workflowBody}\n</workflow-state>\n\n<session-overview>\n${SESSION_OVERVIEW_TEXT}\n</session-overview>`;
|
|
853
|
+
: `<workflow-state>\n${phaseStatus ? `Phase: ${status} (${phaseStatus})\n` : ""}${workflowBody}\n</workflow-state>\n\n<session-overview>\n${SESSION_OVERVIEW_TEXT}\n</session-overview>`;
|
|
843
854
|
|
|
844
855
|
this.key = cacheKey;
|
|
845
856
|
this.timestamp = now;
|