@pennixrv/trellis 0.7.0-beta.9 → 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.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 -199
- package/dist/templates/copilot/hooks/session-start.py +30 -26
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -160
- 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 -706
- 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 -222
- 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 -76
- 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 -735
- 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
|
@@ -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;
|
|
@@ -71,12 +71,9 @@ function getTaskStatus(ctx, platformInput = null) {
|
|
|
71
71
|
const taskStatus = taskData.status || "unknown"
|
|
72
72
|
|
|
73
73
|
if (taskStatus === "completed") {
|
|
74
|
-
return `Status: COMPLETED\nTask: ${taskTitle}\nNext-Action:
|
|
74
|
+
return `Status: COMPLETED\nTask: ${taskTitle}\nNext-Action: Start another task or end the session; finish-work only records the session journal.`
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const hasPrd = existsSync(join(taskDir, "prd.md"))
|
|
78
|
-
const hasDesign = existsSync(join(taskDir, "design.md"))
|
|
79
|
-
const hasImplementPlan = existsSync(join(taskDir, "implement.md"))
|
|
80
77
|
const artifactNames = ["prd.md", "design.md", "implement.md", "implement.jsonl", "check.jsonl"]
|
|
81
78
|
const present = artifactNames.filter(name => existsSync(join(taskDir, name)))
|
|
82
79
|
if (existsSync(join(taskDir, "research"))) present.push("research/")
|
|
@@ -87,24 +84,13 @@ function getTaskStatus(ctx, platformInput = null) {
|
|
|
87
84
|
(!existsSync(implementJsonl) || hasCuratedJsonlEntry(implementJsonl)) &&
|
|
88
85
|
(!existsSync(checkJsonl) || hasCuratedJsonlEntry(checkJsonl))
|
|
89
86
|
|
|
90
|
-
if (taskStatus === "planning" && !hasPrd) {
|
|
91
|
-
return `Status: PLANNING\nTask: ${taskTitle}\nPresent: ${presentLine}\nNext-Action: Load trellis-brainstorm and write prd.md. Stay in planning.`
|
|
92
|
-
}
|
|
93
|
-
|
|
94
87
|
if (taskStatus === "planning") {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (missingComplex.length > 0) {
|
|
100
|
-
nextBits.push(
|
|
101
|
-
`Lightweight task can request start review with PRD-only; complex task must add ${missingComplex.join(", ")} before start`,
|
|
102
|
-
)
|
|
103
|
-
} else {
|
|
104
|
-
nextBits.push("Planning artifacts are present; ask for review before `task.py start`")
|
|
105
|
-
}
|
|
88
|
+
const nextBits = [
|
|
89
|
+
"Follow the current per-turn workflow-state; task lifecycle status and artifact presence do not identify the business phase",
|
|
90
|
+
"If no phase route is initialized, load `trellis-goal-exploration-and-requirements` and confirm the requirements baseline before initializing the route",
|
|
91
|
+
]
|
|
106
92
|
if (!jsonlReady) {
|
|
107
|
-
nextBits.push("curate
|
|
93
|
+
nextBits.push("curate task context manifests only when a dispatched agent needs them")
|
|
108
94
|
}
|
|
109
95
|
return `Status: PLANNING\nTask: ${taskTitle}\nPresent: ${presentLine}\nNext-Action: ${nextBits.join("; ")}. Do not enter implementation until the user confirms start.`
|
|
110
96
|
}
|
|
@@ -112,7 +98,7 @@ function getTaskStatus(ctx, platformInput = null) {
|
|
|
112
98
|
return (
|
|
113
99
|
`Status: ${String(taskStatus).toUpperCase()}\nTask: ${taskTitle}\n` +
|
|
114
100
|
`Present: ${presentLine}\n` +
|
|
115
|
-
"Next-Action: Follow the matching per-turn workflow-state. " +
|
|
101
|
+
"Next-Action: Follow the matching per-turn workflow-state; task lifecycle status does not identify the business phase. " +
|
|
116
102
|
"Implementation/check context order is jsonl entries -> `prd.md` -> `design.md if present` -> `implement.md if present`."
|
|
117
103
|
)
|
|
118
104
|
}
|
|
@@ -393,8 +379,8 @@ Trellis compact SessionStart context. Use it to orient the session; load details
|
|
|
393
379
|
if (workflowContent) {
|
|
394
380
|
const allLines = workflowContent.split("\n")
|
|
395
381
|
const overviewLines = [
|
|
396
|
-
"#
|
|
397
|
-
"
|
|
382
|
+
"# 工作流会话摘要",
|
|
383
|
+
"完整说明:.trellis/workflow.md。阶段详情:读取当前阶段提示指定的 Skill。",
|
|
398
384
|
"",
|
|
399
385
|
]
|
|
400
386
|
|
|
@@ -402,9 +388,18 @@ Trellis compact SessionStart context. Use it to orient the session; load details
|
|
|
402
388
|
let rangeEnd = allLines.length
|
|
403
389
|
for (let i = 0; i < allLines.length; i++) {
|
|
404
390
|
const stripped = allLines[i].trim()
|
|
405
|
-
|
|
391
|
+
const heading = stripped.replace(/^#{2,3}\s+/, "")
|
|
392
|
+
const isPhaseHeading =
|
|
393
|
+
/^#{2,3}\s+/.test(stripped) &&
|
|
394
|
+
["目标探索与需求核对阶段", "Goal Exploration and Requirements Confirmation Phase"].some(
|
|
395
|
+
(title) =>
|
|
396
|
+
heading === title ||
|
|
397
|
+
heading.endsWith(`:${title}`) ||
|
|
398
|
+
heading.endsWith(`: ${title}`),
|
|
399
|
+
)
|
|
400
|
+
if (rangeStart === -1 && ["## 阶段索引", "## Phase Index"].includes(stripped)) {
|
|
406
401
|
rangeStart = i
|
|
407
|
-
} else if (rangeStart !== -1 &&
|
|
402
|
+
} else if (rangeStart !== -1 && isPhaseHeading) {
|
|
408
403
|
rangeEnd = i
|
|
409
404
|
break
|
|
410
405
|
}
|
|
@@ -372,14 +372,10 @@ export class TrellisContext {
|
|
|
372
372
|
* Get active task from session runtime context.
|
|
373
373
|
*
|
|
374
374
|
* Resolution order (mirrors Python `active_task.resolve_active_task`):
|
|
375
|
-
* 1. Lookup the runtime file for the input-derived context key.
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* exists locally, use it (`_resolveSingleSessionFallback`). Refuses to
|
|
380
|
-
* guess when 0 or ≥2 files exist so multi-window isolation holds.
|
|
381
|
-
* 3. If no session file exists, expose one resumable task assigned to the
|
|
382
|
-
* current developer as a read-only unbound projection.
|
|
375
|
+
* 1. Lookup the runtime file for the input-derived context key.
|
|
376
|
+
* 2. If that misses and exactly one session runtime file exists locally,
|
|
377
|
+
* use it (`_resolveSingleSessionFallback`). Refuses to guess when 0 or
|
|
378
|
+
* ≥2 files exist so multi-window isolation holds.
|
|
383
379
|
*/
|
|
384
380
|
getActiveTask(platformInput = null) {
|
|
385
381
|
const contextKey = this.getContextKey(platformInput)
|
|
@@ -394,11 +390,6 @@ export class TrellisContext {
|
|
|
394
390
|
stale: !taskDir || !existsSync(taskDir),
|
|
395
391
|
}
|
|
396
392
|
}
|
|
397
|
-
const unbound = this._resolveUnboundTask()
|
|
398
|
-
if (unbound) {
|
|
399
|
-
return unbound
|
|
400
|
-
}
|
|
401
|
-
return { taskPath: null, source: "none", stale: false }
|
|
402
393
|
}
|
|
403
394
|
|
|
404
395
|
const fallback = this._resolveSingleSessionFallback()
|
|
@@ -406,11 +397,6 @@ export class TrellisContext {
|
|
|
406
397
|
return fallback
|
|
407
398
|
}
|
|
408
399
|
|
|
409
|
-
const unbound = this._resolveUnboundTask()
|
|
410
|
-
if (unbound) {
|
|
411
|
-
return unbound
|
|
412
|
-
}
|
|
413
|
-
|
|
414
400
|
return { taskPath: null, source: "none", stale: false }
|
|
415
401
|
}
|
|
416
402
|
|
|
@@ -452,64 +438,6 @@ export class TrellisContext {
|
|
|
452
438
|
}
|
|
453
439
|
}
|
|
454
440
|
|
|
455
|
-
_resolveUnboundTask() {
|
|
456
|
-
const sessionsDir = join(this.directory, ".trellis", ".runtime", "sessions")
|
|
457
|
-
if (existsSync(sessionsDir)) {
|
|
458
|
-
let sessionFiles
|
|
459
|
-
try {
|
|
460
|
-
sessionFiles = readdirSync(sessionsDir).filter(name => name.endsWith(".json"))
|
|
461
|
-
} catch {
|
|
462
|
-
return null
|
|
463
|
-
}
|
|
464
|
-
if (sessionFiles.some(file => {
|
|
465
|
-
try {
|
|
466
|
-
const context = JSON.parse(readFileSync(join(sessionsDir, file), "utf-8"))
|
|
467
|
-
return Boolean(this.normalizeTaskRef(context?.current_task || ""))
|
|
468
|
-
} catch {
|
|
469
|
-
return false
|
|
470
|
-
}
|
|
471
|
-
})) return null
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
const developer = (process.env.TRELLIS_DEVELOPER || "").trim() || (() => {
|
|
475
|
-
try {
|
|
476
|
-
const content = readFileSync(join(this.directory, ".trellis", ".developer"), "utf-8")
|
|
477
|
-
return content.split(/\r?\n/).find(line => line.startsWith("name="))?.slice(5).trim() || ""
|
|
478
|
-
} catch {
|
|
479
|
-
return ""
|
|
480
|
-
}
|
|
481
|
-
})()
|
|
482
|
-
if (!developer) return null
|
|
483
|
-
|
|
484
|
-
const tasksDir = join(this.directory, ".trellis", "tasks")
|
|
485
|
-
let taskNames
|
|
486
|
-
try {
|
|
487
|
-
taskNames = readdirSync(tasksDir).filter(name => name !== "archive")
|
|
488
|
-
} catch {
|
|
489
|
-
return null
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
const candidates = taskNames.flatMap(name => {
|
|
493
|
-
try {
|
|
494
|
-
const data = JSON.parse(readFileSync(join(tasksDir, name, "task.json"), "utf-8"))
|
|
495
|
-
if (data.assignee !== developer || !["planning", "in_progress", "review"].includes(data.status)) return []
|
|
496
|
-
return [`.trellis/tasks/${name}`]
|
|
497
|
-
} catch {
|
|
498
|
-
return []
|
|
499
|
-
}
|
|
500
|
-
})
|
|
501
|
-
if (candidates.length === 0) return null
|
|
502
|
-
if (candidates.length === 1) {
|
|
503
|
-
return { taskPath: candidates[0], source: "unbound", stale: false }
|
|
504
|
-
}
|
|
505
|
-
return {
|
|
506
|
-
taskPath: null,
|
|
507
|
-
source: "unbound_ambiguous",
|
|
508
|
-
stale: false,
|
|
509
|
-
candidatePaths: candidates.sort(),
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
|
|
513
441
|
getCurrentTask(platformInput = null) {
|
|
514
442
|
return this.getActiveTask(platformInput).taskPath
|
|
515
443
|
}
|
|
@@ -471,9 +471,10 @@ export default async ({ directory, platform: hostPlatform = process.platform, en
|
|
|
471
471
|
// run when earlier ones miss):
|
|
472
472
|
// 1. Exact session runtime context lookup for input.sessionID
|
|
473
473
|
// 2. `Active task: <path>` hint in the dispatch prompt
|
|
474
|
-
// (explicit per-dispatch override
|
|
475
|
-
//
|
|
476
|
-
//
|
|
474
|
+
// (explicit per-dispatch override — beats single-session
|
|
475
|
+
// inference so multi-window users can disambiguate)
|
|
476
|
+
// 3. Single-session fallback — only when exactly 1 session
|
|
477
|
+
// runtime file exists locally
|
|
477
478
|
let taskDir = null
|
|
478
479
|
let taskSource = null
|
|
479
480
|
|
|
@@ -502,7 +503,7 @@ export default async ({ directory, platform: hostPlatform = process.platform, en
|
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
505
|
|
|
505
|
-
if (!taskDir
|
|
506
|
+
if (!taskDir) {
|
|
506
507
|
const fallback = ctx._resolveSingleSessionFallback()
|
|
507
508
|
if (fallback?.taskPath) {
|
|
508
509
|
const fallbackDir = ctx.resolveTaskDir(fallback.taskPath)
|
|
@@ -244,14 +244,6 @@ function loadBreadcrumbs(workflowPath) {
|
|
|
244
244
|
*/
|
|
245
245
|
function getActiveTask(ctx, platformInput = null) {
|
|
246
246
|
const active = ctx.getActiveTask(platformInput)
|
|
247
|
-
if (active.source === "unbound_ambiguous") {
|
|
248
|
-
return {
|
|
249
|
-
id: null,
|
|
250
|
-
status: "unbound_ambiguous",
|
|
251
|
-
source: active.source,
|
|
252
|
-
candidates: active.candidatePaths || [],
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
247
|
const taskRef = active.taskPath
|
|
256
248
|
if (!taskRef) return null
|
|
257
249
|
const taskDir = ctx.resolveTaskDir(taskRef)
|
|
@@ -264,8 +256,14 @@ function getActiveTask(ctx, platformInput = null) {
|
|
|
264
256
|
const data = JSON.parse(readFileSync(taskJsonPath, "utf-8"))
|
|
265
257
|
const status = typeof data.status === "string" ? data.status : ""
|
|
266
258
|
if (!status) return null
|
|
259
|
+
const phaseWorkflow = data.meta?.task_workflow
|
|
260
|
+
const phases = phaseWorkflow?.phases
|
|
261
|
+
const phaseId = phaseWorkflow?.current_phase_id || phaseWorkflow?.phase_ids?.at(-1)
|
|
262
|
+
const phase = typeof phaseId === "string" ? phases?.[phaseId] : null
|
|
267
263
|
const id = data.id || taskRef.split("/").pop()
|
|
268
|
-
if (
|
|
264
|
+
if (typeof phaseId === "string" && phase && typeof phase.status === "string") {
|
|
265
|
+
return { id, status: phaseId, phaseStatus: phase.status, source: active.source }
|
|
266
|
+
}
|
|
269
267
|
return { id, status, source: active.source }
|
|
270
268
|
} catch {
|
|
271
269
|
return null
|
|
@@ -279,17 +277,16 @@ function getActiveTask(ctx, platformInput = null) {
|
|
|
279
277
|
* "Refer to workflow.md for current step." line
|
|
280
278
|
* - no_task pseudo-status (id === null) → header omits task info
|
|
281
279
|
*/
|
|
282
|
-
function buildBreadcrumb(id, status, templates,
|
|
280
|
+
function buildBreadcrumb(id, status, templates, phaseStatus = null) {
|
|
283
281
|
let body = templates[status]
|
|
284
282
|
if (body === undefined) {
|
|
285
283
|
body = "Refer to workflow.md for current step."
|
|
286
284
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
285
|
+
const header = id === null
|
|
286
|
+
? `Status: ${status}`
|
|
287
|
+
: phaseStatus
|
|
288
|
+
? `Task: ${id}\nPhase: ${status} (${phaseStatus})`
|
|
289
|
+
: `Task: ${id} (${status})`
|
|
293
290
|
return `<workflow-state>\n${header}\n${body}\n</workflow-state>`
|
|
294
291
|
}
|
|
295
292
|
|
|
@@ -332,7 +329,7 @@ export default async ({ directory }) => {
|
|
|
332
329
|
const templates = loadBreadcrumbs(resolveWorkflowMd(ctx, directory, platformInput))
|
|
333
330
|
const task = getActiveTask(ctx, platformInput)
|
|
334
331
|
const breadcrumb = task
|
|
335
|
-
? buildBreadcrumb(task.id, task.status, templates, task.
|
|
332
|
+
? buildBreadcrumb(task.id, task.status, templates, task.phaseStatus)
|
|
336
333
|
: buildBreadcrumb(null, "no_task", templates)
|
|
337
334
|
|
|
338
335
|
prependEphemeralText(messages, breadcrumb)
|