@pennixrv/trellis 0.7.1 → 0.7.2-beta.0
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 +10 -7
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/ablate.d.ts.map +1 -1
- package/dist/commands/ablate.js +2 -0
- package/dist/commands/ablate.js.map +1 -1
- package/dist/commands/backup.d.ts +4 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +75 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +705 -681
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +49 -7
- package/dist/commands/mem.js.map +1 -1
- package/dist/commands/task-progress.d.ts +1 -0
- package/dist/commands/task-progress.d.ts.map +1 -1
- package/dist/commands/task-progress.js +67 -25
- package/dist/commands/task-progress.js.map +1 -1
- package/dist/commands/teamwork/adapters/acp.d.ts +20 -0
- package/dist/commands/teamwork/adapters/acp.d.ts.map +1 -0
- package/dist/commands/teamwork/adapters/acp.js +268 -0
- package/dist/commands/teamwork/adapters/acp.js.map +1 -0
- package/dist/commands/teamwork/adapters/claude.d.ts +1 -0
- package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -1
- package/dist/commands/teamwork/adapters/claude.js +5 -0
- package/dist/commands/teamwork/adapters/claude.js.map +1 -1
- package/dist/commands/teamwork/adapters/codex.d.ts +3 -2
- package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -1
- package/dist/commands/teamwork/adapters/codex.js +14 -15
- package/dist/commands/teamwork/adapters/codex.js.map +1 -1
- package/dist/commands/teamwork/adapters/index.d.ts +23 -1
- package/dist/commands/teamwork/adapters/index.d.ts.map +1 -1
- package/dist/commands/teamwork/adapters/index.js +163 -24
- package/dist/commands/teamwork/adapters/index.js.map +1 -1
- package/dist/commands/teamwork/agent-loader.d.ts +2 -1
- package/dist/commands/teamwork/agent-loader.d.ts.map +1 -1
- package/dist/commands/teamwork/agent-loader.js +2 -1
- package/dist/commands/teamwork/agent-loader.js.map +1 -1
- package/dist/commands/teamwork/artifact.d.ts +33 -10
- package/dist/commands/teamwork/artifact.d.ts.map +1 -1
- package/dist/commands/teamwork/artifact.js +182 -50
- package/dist/commands/teamwork/artifact.js.map +1 -1
- package/dist/commands/teamwork/batch-reservation.d.ts +16 -0
- package/dist/commands/teamwork/batch-reservation.d.ts.map +1 -0
- package/dist/commands/teamwork/batch-reservation.js +43 -0
- package/dist/commands/teamwork/batch-reservation.js.map +1 -0
- package/dist/commands/teamwork/batch.d.ts +22 -0
- package/dist/commands/teamwork/batch.d.ts.map +1 -0
- package/dist/commands/teamwork/batch.js +394 -0
- package/dist/commands/teamwork/batch.js.map +1 -0
- package/dist/commands/teamwork/context-loader.d.ts +1 -1
- package/dist/commands/teamwork/context-loader.d.ts.map +1 -1
- package/dist/commands/teamwork/context-loader.js +19 -6
- package/dist/commands/teamwork/context-loader.js.map +1 -1
- package/dist/commands/teamwork/coordination.d.ts +88 -0
- package/dist/commands/teamwork/coordination.d.ts.map +1 -0
- package/dist/commands/teamwork/coordination.js +153 -0
- package/dist/commands/teamwork/coordination.js.map +1 -0
- package/dist/commands/teamwork/coordinator.d.ts +17 -3
- package/dist/commands/teamwork/coordinator.d.ts.map +1 -1
- package/dist/commands/teamwork/coordinator.js +772 -289
- package/dist/commands/teamwork/coordinator.js.map +1 -1
- package/dist/commands/teamwork/create.d.ts +1 -0
- package/dist/commands/teamwork/create.d.ts.map +1 -1
- package/dist/commands/teamwork/create.js +2 -1
- package/dist/commands/teamwork/create.js.map +1 -1
- package/dist/commands/teamwork/dev-parse-trace.d.ts +2 -1
- package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -1
- package/dist/commands/teamwork/dev-parse-trace.js +2 -0
- package/dist/commands/teamwork/dev-parse-trace.js.map +1 -1
- package/dist/commands/teamwork/foreground-wait.d.ts +6 -0
- package/dist/commands/teamwork/foreground-wait.d.ts.map +1 -0
- package/dist/commands/teamwork/foreground-wait.js +65 -0
- package/dist/commands/teamwork/foreground-wait.js.map +1 -0
- package/dist/commands/teamwork/guard.d.ts +2 -2
- package/dist/commands/teamwork/guard.d.ts.map +1 -1
- package/dist/commands/teamwork/guard.js +23 -5
- package/dist/commands/teamwork/guard.js.map +1 -1
- package/dist/commands/teamwork/index.d.ts.map +1 -1
- package/dist/commands/teamwork/index.js +139 -10
- package/dist/commands/teamwork/index.js.map +1 -1
- package/dist/commands/teamwork/kill.d.ts +2 -0
- package/dist/commands/teamwork/kill.d.ts.map +1 -1
- package/dist/commands/teamwork/kill.js +79 -38
- package/dist/commands/teamwork/kill.js.map +1 -1
- package/dist/commands/teamwork/messages.d.ts.map +1 -1
- package/dist/commands/teamwork/messages.js +3 -0
- package/dist/commands/teamwork/messages.js.map +1 -1
- package/dist/commands/teamwork/plan.d.ts +22 -0
- package/dist/commands/teamwork/plan.d.ts.map +1 -0
- package/dist/commands/teamwork/plan.js +288 -0
- package/dist/commands/teamwork/plan.js.map +1 -0
- package/dist/commands/teamwork/process-identity.d.ts +3 -0
- package/dist/commands/teamwork/process-identity.d.ts.map +1 -0
- package/dist/commands/teamwork/process-identity.js +24 -0
- package/dist/commands/teamwork/process-identity.js.map +1 -0
- package/dist/commands/teamwork/profiles.d.ts +43 -6
- package/dist/commands/teamwork/profiles.d.ts.map +1 -1
- package/dist/commands/teamwork/profiles.js +138 -110
- package/dist/commands/teamwork/profiles.js.map +1 -1
- package/dist/commands/teamwork/prompt.d.ts +4 -0
- package/dist/commands/teamwork/prompt.d.ts.map +1 -0
- package/dist/commands/teamwork/prompt.js +33 -0
- package/dist/commands/teamwork/prompt.js.map +1 -0
- package/dist/commands/teamwork/result.d.ts +54 -0
- package/dist/commands/teamwork/result.d.ts.map +1 -0
- package/dist/commands/teamwork/result.js +94 -0
- package/dist/commands/teamwork/result.js.map +1 -0
- package/dist/commands/teamwork/rm.d.ts.map +1 -1
- package/dist/commands/teamwork/rm.js +64 -64
- package/dist/commands/teamwork/rm.js.map +1 -1
- package/dist/commands/teamwork/run.d.ts +5 -0
- package/dist/commands/teamwork/run.d.ts.map +1 -1
- package/dist/commands/teamwork/run.js +120 -24
- package/dist/commands/teamwork/run.js.map +1 -1
- package/dist/commands/teamwork/runtime.d.ts +9 -0
- package/dist/commands/teamwork/runtime.d.ts.map +1 -0
- package/dist/commands/teamwork/runtime.js +372 -0
- package/dist/commands/teamwork/runtime.js.map +1 -0
- package/dist/commands/teamwork/send.d.ts +1 -0
- package/dist/commands/teamwork/send.d.ts.map +1 -1
- package/dist/commands/teamwork/send.js +2 -1
- package/dist/commands/teamwork/send.js.map +1 -1
- package/dist/commands/teamwork/spawn.d.ts +10 -3
- package/dist/commands/teamwork/spawn.d.ts.map +1 -1
- package/dist/commands/teamwork/spawn.js +42 -27
- package/dist/commands/teamwork/spawn.js.map +1 -1
- package/dist/commands/teamwork/store/lock.js +28 -4
- package/dist/commands/teamwork/store/lock.js.map +1 -1
- package/dist/commands/teamwork/supervisor/inbox.d.ts +1 -0
- package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor/inbox.js +28 -9
- package/dist/commands/teamwork/supervisor/inbox.js.map +1 -1
- package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor/stdout.js +2 -3
- package/dist/commands/teamwork/supervisor/stdout.js.map +1 -1
- package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor/warning.js +2 -3
- package/dist/commands/teamwork/supervisor/warning.js.map +1 -1
- package/dist/commands/teamwork/supervisor.d.ts +5 -0
- package/dist/commands/teamwork/supervisor.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor.js +21 -12
- package/dist/commands/teamwork/supervisor.js.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.d.ts +0 -5
- package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.js +9 -56
- package/dist/commands/teamwork/teammate-adapters.js.map +1 -1
- package/dist/commands/teamwork/teammate-config.d.ts +5 -1
- package/dist/commands/teamwork/teammate-config.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-config.js +62 -19
- package/dist/commands/teamwork/teammate-config.js.map +1 -1
- package/dist/commands/teamwork/teammate-launch.d.ts +15 -6
- package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-launch.js +129 -22
- package/dist/commands/teamwork/teammate-launch.js.map +1 -1
- package/dist/commands/teamwork/wait.d.ts +2 -0
- package/dist/commands/teamwork/wait.d.ts.map +1 -1
- package/dist/commands/teamwork/wait.js +44 -3
- package/dist/commands/teamwork/wait.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +92 -84
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +635 -592
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +94 -89
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/shared.js +2 -2
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +14 -32
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +3 -10
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +4 -13
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.7.1-beta.0.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.1.json +186 -0
- package/dist/migrations/manifests/0.7.1-beta.10.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.11.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.12.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.13.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.14.json +11 -0
- package/dist/migrations/manifests/0.7.1-beta.15.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.16.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.17.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.18.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.19.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.2.json +522 -0
- package/dist/migrations/manifests/0.7.1-beta.3.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.4.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.5.json +9 -0
- package/dist/migrations/manifests/0.7.1-beta.6.json +10 -0
- package/dist/migrations/manifests/0.7.1-beta.7.json +8 -0
- package/dist/migrations/manifests/0.7.1-beta.8.json +481 -0
- package/dist/migrations/manifests/0.7.1-beta.9.json +191 -0
- package/dist/migrations/manifests/0.7.2-beta.0.json +11 -0
- package/dist/templates/claude/hooks/statusline.py +9 -4
- package/dist/templates/codex/hooks/session-start.py +14 -11
- package/dist/templates/codex/hooks.json +10 -0
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +5 -5
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +3 -2
- 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/context-injection.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +14 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +8 -2
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +2 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +8 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +4 -2
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +6 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +18 -3
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +34 -3
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +37 -26
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +128 -14
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +152 -20
- package/dist/templates/common/commands/start.md +2 -2
- package/dist/templates/common/skills/before-dev.md +1 -4
- package/dist/templates/common/skills/break-loop.md +7 -18
- package/dist/templates/common/skills/check.md +7 -11
- package/dist/templates/common/skills/{brainstorm.md → request-intake.md} +5 -3
- package/dist/templates/common/skills/update-spec.md +5 -7
- package/dist/templates/copilot/hooks/session-start.py +14 -11
- package/dist/templates/copilot/index.d.ts +1 -6
- package/dist/templates/copilot/index.d.ts.map +1 -1
- package/dist/templates/copilot/index.js +1 -14
- package/dist/templates/copilot/index.js.map +1 -1
- package/dist/templates/extract.js +4 -0
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/spec/backend/index.md.txt +4 -35
- package/dist/templates/markdown/spec/frontend/index.md.txt +4 -36
- package/dist/templates/omp/extensions/trellis/index.ts.txt +2 -2
- package/dist/templates/opencode/lib/session-utils.js +301 -209
- package/dist/templates/pi/extensions/trellis/index.ts.txt +17 -1
- package/dist/templates/shared-hooks/guard-teamwork-wait.py +53 -0
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +1 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-workflow-state.py +8 -3
- package/dist/templates/shared-hooks/session-start.py +16 -12
- package/dist/templates/snow/SNOW.md +1 -1
- package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +9 -0
- package/dist/templates/trellis/agents/profiles/architecture.md +9 -0
- package/dist/templates/trellis/agents/profiles/diagnosis.md +9 -0
- package/dist/templates/trellis/agents/profiles/exploration.md +9 -0
- package/dist/templates/trellis/agents/profiles/research.md +9 -0
- package/dist/templates/trellis/agents/profiles/review.md +9 -0
- package/dist/templates/trellis/agents/profiles/verification.md +9 -0
- package/dist/templates/trellis/agents/teammate-profiles.json +56 -4
- package/dist/templates/trellis/agents/teammate.md +4 -52
- package/dist/templates/trellis/config.yaml +2 -5
- package/dist/templates/trellis/index.d.ts +4 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +22 -4
- 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/active_task.py +3 -47
- package/dist/templates/trellis/scripts/common/paths.py +9 -25
- package/dist/templates/trellis/scripts/common/safe_commit.py +8 -8
- package/dist/templates/trellis/scripts/common/task_context.py +11 -51
- package/dist/templates/trellis/scripts/common/task_continuity.py +129 -60
- package/dist/templates/trellis/scripts/common/task_layout.py +80 -0
- package/dist/templates/trellis/scripts/common/task_move.py +345 -0
- package/dist/templates/trellis/scripts/common/task_store.py +35 -57
- package/dist/templates/trellis/scripts/common/task_utils.py +23 -19
- package/dist/templates/trellis/scripts/common/task_workflow.py +339 -46
- package/dist/templates/trellis/scripts/common/tasks.py +6 -5
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +13 -3
- package/dist/templates/trellis/scripts/task.py +71 -24
- package/dist/templates/trellis/teamwork.json +10 -0
- package/dist/templates/trellis/workflow.md +11 -2
- package/dist/utils/ablation-store.d.ts +1 -1
- package/dist/utils/ablation-store.d.ts.map +1 -1
- package/dist/utils/ablation-store.js +58 -24
- package/dist/utils/ablation-store.js.map +1 -1
- package/dist/utils/asset-backup.d.ts +138 -0
- package/dist/utils/asset-backup.d.ts.map +1 -0
- package/dist/utils/asset-backup.js +513 -0
- package/dist/utils/asset-backup.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +1 -1
- package/dist/utils/atomic-write.d.ts.map +1 -1
- package/dist/utils/atomic-write.js +6 -3
- package/dist/utils/atomic-write.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +4 -1
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +17 -6
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts +4 -19
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +9 -45
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +5 -4
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +24 -17
- package/dist/utils/template-hash.js.map +1 -1
- package/package.json +3 -2
- package/dist/templates/copilot/prompts/before-dev.prompt.md +0 -39
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +0 -13
- package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -170
- package/dist/templates/copilot/prompts/check.prompt.md +0 -110
- package/dist/templates/copilot/prompts/create-command.prompt.md +0 -116
- package/dist/templates/copilot/prompts/finish-work.prompt.md +0 -22
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +0 -223
- package/dist/templates/copilot/prompts/onboard.prompt.md +0 -362
- package/dist/templates/copilot/prompts/record-session.prompt.md +0 -58
- package/dist/templates/copilot/prompts/start.prompt.md +0 -65
- package/dist/templates/copilot/prompts/update-spec.prompt.md +0 -358
package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md
CHANGED
|
@@ -7,21 +7,37 @@ evidence, path, secret, and symlink rules. The teammate writes only its
|
|
|
7
7
|
current attempt artifacts. It does not modify product source, Git state, task
|
|
8
8
|
status, or another teammate's artifacts.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
When a managed batch runtime wait yields before the frozen deadline, the CLI
|
|
11
|
+
may continue waiting on the same provider process and attempt identity. This
|
|
12
|
+
continuation does not send another provider prompt, extend the deadline, or
|
|
13
|
+
consume the full-attempt retry budget. The CLI keeps other active slots moving
|
|
14
|
+
while that wait is pending. At the deadline it closes FIFO admission and
|
|
15
|
+
cancels active attempts. A confirmed execution or acceptance failure may
|
|
16
|
+
consume the assignment's explicit retry budget and create a new attempt
|
|
17
|
+
identity. A `blocked` report with evidence ends only that assignment and does
|
|
18
|
+
not stop later FIFO work. An uncertain command, changed host identity,
|
|
19
|
+
incomplete report write, or unconfirmed cancellation enters reconciliation and
|
|
20
|
+
is not automatically duplicated. Reconciliation is a runtime outcome; the
|
|
21
|
+
task coordinator decides whether a later task phase needs a return.
|
|
22
|
+
|
|
23
|
+
For an interactive Teamwork Session `wait` invoked as a host tool, resume only
|
|
24
|
+
that host continuation until it resolves, times out, or errors. Do not run
|
|
25
|
+
another host action meanwhile, including another wait, shell command, or
|
|
26
|
+
status/message query. An empty transport slice does not mean the wait has
|
|
27
|
+
completed. Run diagnostics only after the continuation returns and diagnosis
|
|
28
|
+
is needed. This host-tool rule does not control a managed `teamwork batch`:
|
|
29
|
+
that foreground CLI call owns the batch lifecycle and returns one receipt.
|
|
16
30
|
|
|
17
31
|
Use the ordinary Teamwork Session commands for a deliberate one-shot or
|
|
18
32
|
interactive discussion:
|
|
19
33
|
|
|
20
34
|
```bash
|
|
21
|
-
trellis teamwork run [name]
|
|
22
|
-
trellis teamwork spawn <name> --
|
|
35
|
+
trellis teamwork run [name] --profile exploration --configuration codex-sol --stdin --json
|
|
36
|
+
trellis teamwork spawn <name> --profile review --configuration copilot-opus \
|
|
37
|
+
--as reviewer --file .trellis/tasks/in_progress/<task-dir>/prd.md \
|
|
38
|
+
--jsonl .trellis/tasks/in_progress/<task-dir>/research.jsonl
|
|
23
39
|
trellis teamwork send <name> --as <agent> --stdin
|
|
24
|
-
trellis teamwork wait <name> --as <agent> --
|
|
40
|
+
trellis teamwork wait <name> --as <agent> --from reviewer --json
|
|
25
41
|
trellis teamwork interrupt <name> --as <agent> --to <teammate> --stdin
|
|
26
42
|
trellis teamwork kill <name> --as <teammate>
|
|
27
43
|
```
|
|
@@ -30,8 +46,106 @@ These commands operate a Teamwork Session and do not replace a frozen plan or
|
|
|
30
46
|
create a second scheduler. Do not use them to bypass a rejected batch or to
|
|
31
47
|
steer an active managed assignment manually.
|
|
32
48
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
`spawn` registers an idle teammate; the first targeted `send` starts its turn.
|
|
50
|
+
The project profile supplies the common and professional role cards plus
|
|
51
|
+
execution defaults. `--profile` and `--configuration` select them;
|
|
52
|
+
`--reasoning-effort`, `--provider`, `--model`,
|
|
53
|
+
`--cwd`, `--resume`, `--sandbox`, `--timeout`, and `--warn-before` refine one
|
|
54
|
+
launch. `--file` accepts repeatable paths or globs. `--jsonl` accepts a
|
|
55
|
+
repeatable Trellis JSONL manifest whose entries have `{ "file", "reason", "delivery" }`.
|
|
56
|
+
Both forms are resolved relative to the spawn cwd, reject paths outside the
|
|
57
|
+
cwd or configured trusted roots, skip missing entries with a warning, and
|
|
58
|
+
enforce per-file and total-context limits before building reference data.
|
|
59
|
+
`delivery` defaults to `inline`; `required` supplies a path, digest and an
|
|
60
|
+
instruction to read the complete file before work; `on-demand` supplies a
|
|
61
|
+
path, digest and retrieval condition. Required/on-demand missing files fail
|
|
62
|
+
explicitly. New frozen batches recheck reference bytes before dispatch and
|
|
63
|
+
after completion; changed references require a new plan. This check binds
|
|
64
|
+
source versions, but does not prove the model actually read every byte.
|
|
65
|
+
Legacy generic `--agent <card>` remains available for deliberately custom
|
|
66
|
+
agent cards, but it cannot be combined with professional profile selection.
|
|
67
|
+
Interactive roles return a schema-2 JSON content report; they do not invent batch
|
|
68
|
+
claims, report paths or attempt identities.
|
|
69
|
+
|
|
70
|
+
Common/professional role rules and the mode-specific result contract are
|
|
71
|
+
initialization instructions. Codex uses `developerInstructions`; Claude uses
|
|
72
|
+
append-system-prompt. Reference material travels with the first task as data.
|
|
73
|
+
ACP has user blocks only: the role is sent once after a confirmed turn, retained
|
|
74
|
+
for follow-ups, and injected again after recovery or an unsuccessful first
|
|
75
|
+
turn. No JSON transport envelope is serialized into the role/task prose.
|
|
76
|
+
The host may add AGENTS, Skills and memory; `TRELLIS_HOOKS=0` disables Trellis
|
|
77
|
+
hooks, not all host context. No environment or memory isolation is claimed.
|
|
78
|
+
|
|
79
|
+
All providers automatically allow tool permissions. Codex defaults to
|
|
80
|
+
`danger-full-access` with `approvalPolicy: never`; an explicit user sandbox
|
|
81
|
+
override is still supported. ACP selects the offered allow option and reports
|
|
82
|
+
an error if none exists. Role boundaries remain prompt obligations.
|
|
83
|
+
|
|
84
|
+
Use `--inbox-policy explicitOnly|broadcastAndExplicit` to control which
|
|
85
|
+
messages are delivered to a teammate. `send --to` selects recipients and
|
|
86
|
+
`--delivery-mode appendOnly|requireKnownWorker|requireRunningWorker` controls
|
|
87
|
+
target validation. The runtime records the injected files, manifest paths,
|
|
88
|
+
provider identity, and terminal event in the session log.
|
|
89
|
+
|
|
90
|
+
The live budget and mode capacity come from schema-2 `.trellis/teamwork.json`;
|
|
91
|
+
explicit CLI flags and environment overrides may tighten the frozen policy.
|
|
92
|
+
Legacy `.trellis/config.yaml` teammate keys are ignored with diagnostics;
|
|
93
|
+
the separate idle timeout remains a process-lifecycle setting.
|
|
94
|
+
`--idle-timeout` cleans a continuously idle teammate; `--max-live-teammates`
|
|
95
|
+
limits live processes. A value of `0` disables the corresponding guard. An
|
|
96
|
+
idle teammate is not cleaned while it is in a turn. `interrupt` requests a
|
|
97
|
+
replacement instruction, `kill` attempts graceful shutdown, and `kill --force`
|
|
98
|
+
uses the hard termination path. `--resume` supplies the provider session or
|
|
99
|
+
thread identifier for a later attempt.
|
|
100
|
+
|
|
101
|
+
Codex interrupts use `turn/interrupt` and await the old terminal turn before
|
|
102
|
+
submitting the replacement. ACP sends `session/cancel` and awaits the terminal
|
|
103
|
+
prompt response; sending a notification alone is not cancellation proof.
|
|
104
|
+
Batch cancellation additionally confirms provider process exit. Unconfirmed
|
|
105
|
+
termination preserves reconciliation and its capacity reservation. Session
|
|
106
|
+
removal and prune preserve sessions with unresolved batch reservations.
|
|
107
|
+
|
|
108
|
+
For short independent work, `teamwork run` creates an ephemeral session,
|
|
109
|
+
injects the selected context, sends one prompt, waits for `done`, prints the
|
|
110
|
+
answer, and removes the session only after a valid complete content report.
|
|
111
|
+
`run --json` returns the common machine envelope and keeps failure diagnostics;
|
|
112
|
+
early supervisor errors/kills terminate the wait without hiding the cause.
|
|
113
|
+
`wait --json --from <one-worker>` binds the final report to `inputSeq` and
|
|
114
|
+
`turnId`; it does not stop the persistent worker. Default event waits retain
|
|
115
|
+
their existing behavior. For a managed plan, the coordinator owns
|
|
116
|
+
claim, dispatch, retry budget, terminal receipt, and reconciliation. An
|
|
117
|
+
uncertain provider action is reconciled instead of being duplicated. Settled
|
|
118
|
+
attempt reports and worklogs, including rejected attempts, remain until explicit
|
|
119
|
+
native cleanup; the result includes every attempt index. The
|
|
120
|
+
Teamwork Session event log follows its own lifecycle.
|
|
121
|
+
|
|
122
|
+
`teamwork cleanup-artifacts <plan> --task <task-dir>` previews the exact retained
|
|
123
|
+
report/worklog/stderr files of a durably settled batch. Only an explicit repeat
|
|
124
|
+
with `--confirm <preview-digest>` deletes those files; a changed preview or an
|
|
125
|
+
unresolved reservation is rejected. Read and accept needed evidence before
|
|
126
|
+
cleanup. Session removal alone does not delete task-owned attempt evidence.
|
|
127
|
+
|
|
128
|
+
Use `teamwork reconcile <original-plan> --task <task-dir>` to preview recovery
|
|
129
|
+
after coordinator loss. `--execute --reason <disposition>` only settles when
|
|
130
|
+
native process-exit facts or process birth identity prove termination. A missing
|
|
131
|
+
PID, absent report, or dead coordinator alone is insufficient. This command
|
|
132
|
+
preserves accepted assignments and releases only the original batch's leases.
|
|
133
|
+
It does not restart providers or accept task results.
|
|
134
|
+
|
|
135
|
+
After a durable failed settlement and explicit bounded retry approval, construct
|
|
136
|
+
`teamwork retry <original-plan> --task <task-dir> --output <new-plan> --batch <new-id>
|
|
137
|
+
--assignments <failed-id,...> --deadline <ISO-time> --approval-ref <approval>`.
|
|
138
|
+
Only failed assignments enter the new plan; frozen inputs and parent lineage
|
|
139
|
+
are retained. Repeating the same output is idempotent. Execute the new plan
|
|
140
|
+
normally; the original terminal result remains unchanged. A recovered subset
|
|
141
|
+
does not retroactively accept the original committee evaluation.
|
|
142
|
+
|
|
143
|
+
For a stalled process, inspect `teamwork list`,
|
|
144
|
+
`teamwork messages <session> --raw --no-progress`, the provider log, and the
|
|
145
|
+
host process state in that order. Use `messages --follow` for live output and
|
|
146
|
+
the `--since`, `--kind`, `--from`, `--to`, `--thread`, and `--action` filters
|
|
147
|
+
to isolate a turn. Use `kill` only when the process owner and current state
|
|
148
|
+
are known. The runtime event log is the source of truth for coordination
|
|
149
|
+
state; sidecar process files are diagnostic evidence. The hidden
|
|
150
|
+
`teamwork __supervisor` and `__parse-trace` commands are runtime internals,
|
|
151
|
+
not user-facing dispatch entry points.
|
|
@@ -14,10 +14,14 @@ coordination_mode
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The plan also freezes the Teamwork Session, batch, deadline, protected targets,
|
|
17
|
-
and ordered `assignments`. Each assignment has an `assignment_id`,
|
|
18
|
-
|
|
19
|
-
acceptance criteria, and an explicit retry budget. The
|
|
20
|
-
|
|
17
|
+
and ordered `assignments`. Each assignment has an `assignment_id`, selected
|
|
18
|
+
profile/configuration, selection reason, task input, scope, optional lens,
|
|
19
|
+
source digest, acceptance criteria, and an explicit retry budget. The native
|
|
20
|
+
constructor resolves the effective provider/model/effort/options and common
|
|
21
|
+
plus professional instructions, then publishes schema-2 plan and briefs.
|
|
22
|
+
Claims also use schema 2; new launches freeze `reportVersion: 2`. Historical
|
|
23
|
+
frozen launches without it continue to read schema-1 reports. Do not hand-author frozen
|
|
24
|
+
execution objects, role or capability digests, claims, or plan hashes.
|
|
21
25
|
|
|
22
26
|
Use the native task lifecycle for task status and acceptance. Teamwork records
|
|
23
27
|
coordination facts and teammate reports; it does not write `current_phase_id`,
|
|
@@ -39,40 +43,168 @@ specs, and the generic teammate role card. Freeze the input revision and route
|
|
|
39
43
|
revision after the coordinator has selected the scope. If those values change,
|
|
40
44
|
construct a new plan rather than mixing results from different task inputs.
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
Construct and run through the native entry points:
|
|
43
47
|
|
|
44
48
|
```bash
|
|
45
|
-
trellis teamwork
|
|
49
|
+
trellis teamwork config --profile review --mode advisor
|
|
50
|
+
trellis teamwork plan <draft.json> --task <task-dir> --output <task-dir>/plan.json --dry-run
|
|
51
|
+
trellis teamwork plan <draft.json> --task <task-dir> --output <task-dir>/plan.json
|
|
52
|
+
trellis teamwork batch <task-dir>/plan.json --task <task-dir> --preflight
|
|
53
|
+
trellis teamwork batch <task-dir>/plan.json --task <task-dir> --json
|
|
46
54
|
```
|
|
47
55
|
|
|
48
|
-
The
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
The draft is a JSON object with `schema_version: 2`, the binding fields above,
|
|
57
|
+
safe `batch_id` and `session_id`, `deadline`, optional `requested_capacity`
|
|
58
|
+
and `protected_targets`, and explicit `assignments`. A minimal member is:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"assignment_id": "review-a",
|
|
63
|
+
"profile": "review",
|
|
64
|
+
"configuration": "codex-sol",
|
|
65
|
+
"selection_reason": "Use the configured source reviewer",
|
|
66
|
+
"summary": "Review the selected change",
|
|
67
|
+
"scope": "src/example.ts",
|
|
68
|
+
"input": "Inspect the assigned source and return evidence in the requested report.",
|
|
69
|
+
"source_digest": "<SHA-256 of the selected source evidence>",
|
|
70
|
+
"acceptance": ["Cite precise source locations and explain observable impact"],
|
|
71
|
+
"max_retries": 0
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Optional member overrides are `provider`, `model`, `reasoning_effort`, and
|
|
76
|
+
adapter-supported `options`; context comes from `context_files` and
|
|
77
|
+
`context_manifests`. Committee members additionally need distinct `lens`
|
|
78
|
+
values and otherwise share the same task/evidence/acceptance contract. The
|
|
79
|
+
constructor creates their evaluation group. Read the configuration matrix
|
|
80
|
+
before choosing candidates. Output must be inside the selected task under
|
|
81
|
+
this project's `.trellis/tasks/`; existing immutable artifacts are preserved.
|
|
82
|
+
|
|
83
|
+
`--dry-run` validates all prepared briefs and paths without writing artifacts.
|
|
84
|
+
`--preflight` validates frozen inputs, current native task revisions and
|
|
85
|
+
capacity without launching a provider; `processProbe: not_run` means accounts,
|
|
86
|
+
models and transport have not been tested by that command. Actual dispatch
|
|
87
|
+
negotiates provider model and effort and fails explicitly if unsupported.
|
|
88
|
+
|
|
89
|
+
Invoke one foreground `trellis teamwork batch` command and wait for its
|
|
90
|
+
receipt. The CLI owns FIFO admission, capacity, provider waits, retries,
|
|
91
|
+
cancellation, report acceptance, and settlement. The main agent does not
|
|
92
|
+
schedule per-assignment waits or retries. A timeout continuation waits on the
|
|
93
|
+
same provider process under the frozen batch deadline; it does not send another
|
|
94
|
+
provider prompt or consume a full-attempt retry. At the batch deadline, the CLI
|
|
95
|
+
closes admission, marks undispatched FIFO work `FINAL_FAILED`, then cancels and
|
|
96
|
+
drains active attempts. Confirmed outcomes settle as `SETTLED_WITH_FAILURE`;
|
|
97
|
+
unconfirmed process exit requires reconciliation.
|
|
98
|
+
|
|
99
|
+
A valid `blocked` report with evidence ends only that assignment as
|
|
100
|
+
`FINAL_FAILED`; the CLI continues with the remaining FIFO work and preserves
|
|
101
|
+
the blocker report. Missing reports may use the assignment's declared retry
|
|
102
|
+
budget. A truncated report or report storage error is uncertain and requires
|
|
103
|
+
reconciliation. Other incomplete or rejected reports may retry only within the
|
|
104
|
+
declared attempt budget.
|
|
105
|
+
|
|
106
|
+
`run` and `spawn` operate interactive sessions and do not bypass batch
|
|
107
|
+
reconciliation. A restart returns a durable terminal receipt or
|
|
108
|
+
`RECONCILIATION_REQUIRED`; it never silently replays an uncertain attempt.
|
|
109
|
+
Before returning a recovered terminal receipt, the CLI checks the frozen plan,
|
|
110
|
+
all assignment dispositions, terminal attempt and teammate facts, capacity
|
|
111
|
+
leases, projection issues, and the exact receipt event. It may reconstruct a
|
|
112
|
+
missing receipt only from consistent terminal facts. Capacity reservations
|
|
113
|
+
survive a coordinator crash because a dead coordinator does not prove its
|
|
114
|
+
provider processes exited. Do not delete an unresolved reservation to make
|
|
115
|
+
another batch fit; inspect ownership and terminal evidence. An unreadable or
|
|
116
|
+
conflicting recovery state retains the reservation and original evidence; it
|
|
117
|
+
does not authorize a replacement dispatch.
|
|
51
118
|
|
|
52
119
|
## Teamwork Session and forum commands
|
|
53
120
|
|
|
54
121
|
Create and inspect the durable runtime object with the native CLI:
|
|
55
122
|
|
|
56
123
|
```bash
|
|
57
|
-
trellis teamwork create <name> --type chat|forum
|
|
124
|
+
trellis teamwork create <name> --type chat|forum \
|
|
125
|
+
--task .trellis/tasks/in_progress/<task-dir> --description "bounded discussion"
|
|
58
126
|
trellis teamwork list [--scope project|global] [--all]
|
|
59
127
|
trellis teamwork messages <name> [--raw]
|
|
60
|
-
trellis teamwork wait <name> --as <agent> --
|
|
128
|
+
trellis teamwork wait <name> --as <agent> --from <worker> --json
|
|
61
129
|
trellis teamwork forum <name>
|
|
62
130
|
trellis teamwork thread <name> <thread-key>
|
|
63
131
|
trellis teamwork context list <name> [--thread <thread-key>]
|
|
64
132
|
```
|
|
65
133
|
|
|
66
|
-
Use `--
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
134
|
+
Use `--scope global` only for a deliberately shared board; the default project
|
|
135
|
+
scope is isolated by the current project bucket. `create` also accepts
|
|
136
|
+
`--labels`, `--cwd`, `--by`, `--force`, `--context-file`, `--context-raw`, and
|
|
137
|
+
`--ephemeral`. Ephemeral sessions are hidden from `list` unless `--all` is
|
|
138
|
+
passed and are intended for short-lived coordination.
|
|
139
|
+
|
|
140
|
+
For a forum, append structured thread events with `opened`, `comment`,
|
|
141
|
+
`status`, or `summary` and inspect the reduced board or event timeline:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
trellis teamwork post <session> opened --as main --thread design \
|
|
145
|
+
--title "Design question" --description "What needs evidence?"
|
|
146
|
+
trellis teamwork post <session> comment --as reviewer --thread design \
|
|
147
|
+
--stdin
|
|
148
|
+
trellis teamwork post <session> status --as main --thread design --status open
|
|
149
|
+
trellis teamwork post <session> summary --as main --thread design \
|
|
150
|
+
--summary "Evidence collected"
|
|
151
|
+
trellis teamwork forum <session> --status open
|
|
152
|
+
trellis teamwork thread <session> design
|
|
153
|
+
trellis teamwork thread rename <session> design architecture --as main
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`post` can also replace labels or assignees and attach thread context with
|
|
157
|
+
`--context-file` / `--context-raw`. Session-level context uses
|
|
158
|
+
`teamwork context add|delete|list`; context deletion appends a durable
|
|
159
|
+
projection event rather than rewriting the event log. Use `title set` and
|
|
160
|
+
`title clear` for the display title.
|
|
161
|
+
|
|
162
|
+
Use `--stdin` or `--text-file` for long message and thread bodies. `messages`
|
|
163
|
+
supports `--raw`, `--follow`, `--last`, `--since`, `--kind`, `--from`, `--to`,
|
|
164
|
+
`--thread`, `--action`, and `--no-progress`. `--kind` selects runtime event
|
|
165
|
+
kinds; it is not a user-defined tag. Read forum summaries and thread
|
|
166
|
+
projections through the CLI before inspecting raw event storage.
|
|
167
|
+
|
|
168
|
+
Remove settled runtime state deliberately. `rm <name>` stops live teammates
|
|
169
|
+
before deleting one session. `prune` is a dry-run by default and supports one
|
|
170
|
+
of `--ephemeral`, `--empty`, `--idle <duration>`, or `--all`, plus `--keep`;
|
|
171
|
+
pass `--yes` to perform the deletion. Never use session cleanup as a task
|
|
172
|
+
archive operation.
|
|
70
173
|
|
|
71
174
|
## Result handling
|
|
72
175
|
|
|
176
|
+
Agent callers always request the machine view: `run --json`, `batch --json`,
|
|
177
|
+
or interactive `wait --json --from <one-worker>`. The common envelope has
|
|
178
|
+
`schemaVersion: 1`, `kind: trellis_result`, `mode`, `association`, `execution`,
|
|
179
|
+
`reports`, `semanticValidation: not_run`, and `disposition`. Execution facts
|
|
180
|
+
are distinct from report validation, model content status, and task acceptance.
|
|
181
|
+
`execution.stopped` describes confirmed process cleanup; a persistent wait
|
|
182
|
+
leaves its worker running. Parse stdout as one JSON object; diagnostics use
|
|
183
|
+
stderr. CLI argument-parser errors may precede this result contract.
|
|
184
|
+
|
|
185
|
+
Each new content report has `schema_version: 2`, `status` (complete, blocked,
|
|
186
|
+
incomplete, error), nonempty `answer`, nonempty `evidence` entries with
|
|
187
|
+
`id`, `locator`, `summary`, and arrays `limitations`, `unresolved`, `deviations`.
|
|
188
|
+
Interactive replies return this JSON directly, with no report file or invented
|
|
189
|
+
batch identity. Batch reports additionally copy the assigned task, batch,
|
|
190
|
+
assignment, attempt, teammate, plan, phase, route, input and source identities
|
|
191
|
+
into the exact report path. `done` is emitted by the adapter, not by the model.
|
|
192
|
+
|
|
193
|
+
Batch machine results expose validated report content, association, report path
|
|
194
|
+
and SHA-256. Missing or invalid accepted artifacts fail validation; historical
|
|
195
|
+
schema-1 content is explicitly `legacy`, never synthesized as a valid new
|
|
196
|
+
answer. Retention may remove failed-attempt artifacts. Main-agent semantic
|
|
197
|
+
review checks the answer and evidence against the acceptance criteria; shape
|
|
198
|
+
validation does not perform that review or change native task acceptance.
|
|
199
|
+
|
|
73
200
|
The coordinator returns `ALL_ACCEPTED`, `SETTLED_WITH_FAILURE`, or
|
|
74
|
-
`RECONCILIATION_REQUIRED`.
|
|
75
|
-
|
|
76
|
-
the
|
|
77
|
-
|
|
78
|
-
|
|
201
|
+
`RECONCILIATION_REQUIRED`. For `ALL_ACCEPTED`, review every accepted report
|
|
202
|
+
against the phase contract, record the evidence in the task-owned artifact, and
|
|
203
|
+
use the native task acceptance gate before advancing. For
|
|
204
|
+
`SETTLED_WITH_FAILURE`, review the failure reports and blockers, do not accept
|
|
205
|
+
or advance the phase, and decide the next task-level action through the native
|
|
206
|
+
workflow. For `RECONCILIATION_REQUIRED`, stop dispatch, retry, and cleanup;
|
|
207
|
+
preserve the reported runtime evidence and reservation for explicit
|
|
208
|
+
reconciliation. A receipt is a runtime fact, not phase acceptance. A formal
|
|
209
|
+
session handoff is an independent, lower-priority continuity artifact and does
|
|
210
|
+
not represent a phase transition.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Start Session
|
|
2
2
|
|
|
3
|
-
Load the
|
|
3
|
+
Load the session's Trellis context. Route a new request through `trellis-request-intake`; resume existing work through `trellis-continue` and the task record's current phase. Do not repeat initialization when context and ownership have already been established.
|
|
4
4
|
|
|
5
5
|
## Load context
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ Read the applicable spec indexes before editing code. The active phase breadcrum
|
|
|
12
12
|
|
|
13
13
|
## Route the current request
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- New request: use `trellis-request-intake` to determine whether it changes the current goal, is independent work, or qualifies for the taskless route. Reuse existing authorization and evidence.
|
|
16
16
|
- Task with no initialized route: inspect its current requirements, choose the applicable ordered phases with evidence for omissions, then initialize the route through task.py phase init.
|
|
17
17
|
- Goal Exploration and Requirements Confirmation Phase: load `trellis-goal-exploration-and-requirements`. Do not leave until the user confirms the current requirements artifact revision.
|
|
18
18
|
- Decision Space Construction and Consolidation Phase: load `trellis-decision-space-construction-and-merging`.
|
|
@@ -2,10 +2,7 @@ Read the relevant development guidelines before starting your task.
|
|
|
2
2
|
|
|
3
3
|
Execute these steps:
|
|
4
4
|
|
|
5
|
-
1. **Read current
|
|
6
|
-
- `prd.md` for requirements and acceptance criteria
|
|
7
|
-
- `design.md` if present for technical design
|
|
8
|
-
- `implement.md` if present for execution order and validation plan
|
|
5
|
+
1. **Read the current native phase and its accepted implementation contract**, including referenced requirements, design, execution and validation artifacts. Use the actual references; `prd.md`, `design.md` and `implement.md` are common filenames, not proof of acceptance, freshness or implementation authorization. For the authorized taskless route, use its bounded request and applicable specs.
|
|
9
6
|
|
|
10
7
|
2. **Discover packages and their spec layers**:
|
|
11
8
|
```bash
|
|
@@ -115,13 +115,7 @@ When multiple root causes are plausible and evidence is incomplete, update your
|
|
|
115
115
|
|
|
116
116
|
Before investigating, state what you believe and why:
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|------------|-------|-----------|
|
|
120
|
-
| H1: [cause A] | 40% | Most common for this pattern |
|
|
121
|
-
| H2: [cause B] | 30% | Plausible given environment |
|
|
122
|
-
| H3: [other] | 30% | Catch-all |
|
|
123
|
-
|
|
124
|
-
Priors must sum to 100%. If you can't assign probabilities, investigate first.
|
|
118
|
+
List plausible hypotheses with current supporting and contradicting evidence, uncertainty and a discriminating check. Qualitative confidence is sufficient; do not invent numeric probabilities or require them to sum to 100%.
|
|
125
119
|
|
|
126
120
|
### Step 2: Observe Evidence
|
|
127
121
|
|
|
@@ -148,12 +142,7 @@ Don't gather more of the same. Find evidence that **differs strongly** between t
|
|
|
148
142
|
|
|
149
143
|
### Step 5: State Confidence
|
|
150
144
|
|
|
151
|
-
|
|
152
|
-
|------------|--------|
|
|
153
|
-
| 90%+ | Proceed with fix, monitor |
|
|
154
|
-
| 70-90% | Proceed, add fallback check |
|
|
155
|
-
| 50-70% | Test hypothesis before committing |
|
|
156
|
-
| <50% | Need more evidence, don't guess |
|
|
145
|
+
State which hypothesis the evidence supports, what it rules out, and which limits remain. Choose the next check or authorized fix based on consequences and uncertainty, not a numeric threshold. Do not add speculative fallbacks to compensate for an unverified cause.
|
|
157
146
|
|
|
158
147
|
Never express binary certainty when evidence is incomplete. Use "most likely", "plausible but unlikely", "worth investigating".
|
|
159
148
|
|
|
@@ -169,16 +158,16 @@ Never express binary certainty when evidence is incomplete. Use "most likely", "
|
|
|
169
158
|
|
|
170
159
|
## After Analysis: Immediate Actions
|
|
171
160
|
|
|
172
|
-
|
|
161
|
+
After analysis, preserve the reusable finding at its natural owner:
|
|
173
162
|
|
|
174
|
-
1. **Update spec/guides**
|
|
163
|
+
1. **Update applicable spec/guides** when the finding establishes a reusable executable contract or thinking trigger within the task's authority:
|
|
175
164
|
- If it's a cross-platform issue → update `cross-platform-thinking-guide.md`
|
|
176
165
|
- If it's a cross-layer issue → update `cross-layer-thinking-guide.md`
|
|
177
166
|
- If it's a code reuse issue → update `code-reuse-thinking-guide.md`
|
|
178
167
|
- If it's domain-specific → update `backend/*.md` or `frontend/*.md`
|
|
179
168
|
|
|
180
|
-
2. **
|
|
169
|
+
2. **Respect the source owner** — project specs do not automatically belong in Trellis's bundled templates. Update a component template only when that component owns the rule and the task authorizes that source change; use its native generation path for installed assets.
|
|
181
170
|
|
|
182
|
-
3. **
|
|
171
|
+
3. **Record evidence and verification** in the current task or journal when no reusable spec change is justified. Commit only under the project's existing authorization; analysis does not grant commit, publication or installation authority.
|
|
183
172
|
|
|
184
|
-
|
|
173
|
+
Keep the finding discoverable without manufacturing a spec change or a second task ledger.
|
|
@@ -13,11 +13,7 @@ git status
|
|
|
13
13
|
|
|
14
14
|
## Step 2: Read Task Artifacts and Applicable Specs
|
|
15
15
|
|
|
16
|
-
Read the current
|
|
17
|
-
|
|
18
|
-
- `prd.md`
|
|
19
|
-
- `design.md` if present
|
|
20
|
-
- `implement.md` if present
|
|
16
|
+
Read the current native phase, accepted contract and its actual artifact references for requirements, design, execution and validation. Common filenames such as `prd.md`, `design.md` and `implement.md` do not prove current acceptance or authorization. For taskless work, check the authorized bounded request.
|
|
21
17
|
|
|
22
18
|
```bash
|
|
23
19
|
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
@@ -33,7 +29,7 @@ Read the specific guideline files referenced — the index is a pointer, not the
|
|
|
33
29
|
|
|
34
30
|
## Step 3: Run Project Checks
|
|
35
31
|
|
|
36
|
-
Run the project
|
|
32
|
+
Run the applicable required project checks and verification appropriate to the changed behavior and risk. Investigate failures and fix those caused by the change within its authorization; record unrelated baseline failures and unavailable checks accurately. Do not silently expand the task to repair unrelated failures or claim checks passed when evidence is incomplete.
|
|
37
33
|
|
|
38
34
|
## Step 4: Review Against Checklist
|
|
39
35
|
|
|
@@ -47,9 +43,9 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
|
|
|
47
43
|
|
|
48
44
|
### Test Coverage
|
|
49
45
|
|
|
50
|
-
- [ ]
|
|
51
|
-
- [ ] Bug fix
|
|
52
|
-
- [ ] Changed behavior
|
|
46
|
+
- [ ] Non-trivial new behavior and risk covered by meaningful existing or new tests?
|
|
47
|
+
- [ ] Bug fix reproduced by a regression check at the actual entry path?
|
|
48
|
+
- [ ] Changed behavior reflected in tests without mirroring implementation details?
|
|
53
49
|
|
|
54
50
|
### Spec Sync
|
|
55
51
|
|
|
@@ -80,7 +76,7 @@ Skip this step if your change is confined to a single layer.
|
|
|
80
76
|
|
|
81
77
|
- [ ] Searched for existing similar code before creating new?
|
|
82
78
|
```bash
|
|
83
|
-
|
|
79
|
+
rg "pattern" src/
|
|
84
80
|
```
|
|
85
81
|
- [ ] If the same value repeats, does it represent one stable concept whose callers must change together? Extract only then — two literals that merely happen to match today should stay separate.
|
|
86
82
|
- [ ] After batch modification, all occurrences updated?
|
|
@@ -101,6 +97,6 @@ Skip this step if your change is confined to a single layer.
|
|
|
101
97
|
Report every violation you find. Then:
|
|
102
98
|
|
|
103
99
|
- Mechanical and local (lint nit, missing type, wrong import, dead branch, failing assertion) → fix in place, then re-run project checks.
|
|
104
|
-
-
|
|
100
|
+
- Local engineering judgment within the accepted contract → resolve it with evidence and continue. A material unresolved change to scope, public behavior, ownership, risk or acceptance → record the recommendation and pause dependent work for the project's decision process.
|
|
105
101
|
|
|
106
102
|
If a fix would touch files outside the current task's scope, say so and stop instead of widening the change.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# Trellis
|
|
1
|
+
# Trellis Request Intake
|
|
2
2
|
|
|
3
|
-
Use this entry skill
|
|
3
|
+
Use this entry skill to route a new request. First check its relationship to the active task: a change to the same goal returns to the earliest affected phase; independent work needs its own intake. Do not put unrelated work into the active task or bypass its ownership and acceptance gates. To resume existing work, use trellis-continue and the current native task facts.
|
|
4
|
+
|
|
5
|
+
Reuse verified evidence and existing authorization. For a clear, low-risk, reversible, authorized, immediately verifiable request, follow the taskless route in workflow.md. Intake ends when the request reaches its appropriate phase; do not repeat session initialization or conduct a second requirements or planning workflow here.
|
|
4
6
|
|
|
5
7
|
## Start the task
|
|
6
8
|
|
|
7
|
-
1. Inspect only
|
|
9
|
+
1. Inspect only evidence that can change the goal, scope, acceptance criteria, constraints, or route. Ask the user only for missing intent or a material user choice; use the project's decision method when needed.
|
|
8
10
|
2. Create a Trellis task when the work needs a persistent route, coordination, or review:
|
|
9
11
|
|
|
10
12
|
{{PYTHON_CMD}} ./.trellis/scripts/task.py create "<title>" --description "<summary>"
|
|
@@ -23,9 +23,9 @@ Apply code-spec depth when the change includes any of:
|
|
|
23
23
|
- Database schema/migration change
|
|
24
24
|
- Infra integration (storage, queue, cache, secrets, env wiring)
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### Applicable Contract Coverage
|
|
27
27
|
|
|
28
|
-
For triggered tasks,
|
|
28
|
+
For triggered tasks, cover the applicable contracts below in the existing document structure. Reuse current coverage and link it where sufficient; do not require seven headings, artificial examples or empty sections for every small API change:
|
|
29
29
|
1. Scope / Trigger
|
|
30
30
|
2. Signatures (command/API/DB)
|
|
31
31
|
3. Contracts (request/response/env)
|
|
@@ -138,7 +138,7 @@ If you added a new section or the code-spec status changed, update the category'
|
|
|
138
138
|
|
|
139
139
|
## Update Templates
|
|
140
140
|
|
|
141
|
-
###
|
|
141
|
+
### Example Structure for Infra/Cross-Layer Work
|
|
142
142
|
|
|
143
143
|
```markdown
|
|
144
144
|
## Scenario: <name>
|
|
@@ -313,12 +313,10 @@ If you're unsure what to update, answer these prompts:
|
|
|
313
313
|
Before finishing your code-spec update:
|
|
314
314
|
|
|
315
315
|
- [ ] Is the content specific and actionable?
|
|
316
|
-
- [ ]
|
|
316
|
+
- [ ] Are examples included where they clarify a real contract or failure?
|
|
317
317
|
- [ ] Did you explain WHY, not just WHAT?
|
|
318
318
|
- [ ] Did you include executable signatures/contracts?
|
|
319
|
-
- [ ]
|
|
320
|
-
- [ ] Did you include Good/Base/Bad cases?
|
|
321
|
-
- [ ] Did you include required tests with assertion points?
|
|
319
|
+
- [ ] Are applicable validation, failure cases and verification assertions covered or linked?
|
|
322
320
|
- [ ] Is it in the right code-spec file?
|
|
323
321
|
- [ ] Does it duplicate existing content?
|
|
324
322
|
- [ ] Would a new team member understand it?
|
|
@@ -231,8 +231,7 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
|
|
|
231
231
|
if not active.task_path:
|
|
232
232
|
return (
|
|
233
233
|
"Status: NO ACTIVE TASK\n"
|
|
234
|
-
"Next:
|
|
235
|
-
"before creating any Trellis task."
|
|
234
|
+
"Next: Route through trellis-request-intake using the existing authorization and taskless contract."
|
|
236
235
|
)
|
|
237
236
|
|
|
238
237
|
task_ref = active.task_path
|
|
@@ -244,12 +243,10 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
|
|
|
244
243
|
)
|
|
245
244
|
|
|
246
245
|
task_json_path = task_dir / "task.json"
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
except (json.JSONDecodeError, PermissionError):
|
|
252
|
-
pass # Optional task metadata; fall back to generic status.
|
|
246
|
+
from common.io import read_json_checked # type: ignore[import-not-found]
|
|
247
|
+
task_data, _reason = read_json_checked(task_json_path)
|
|
248
|
+
if task_data is None or task_data.get("status") not in ("planning", "in_progress", "completed", "cancelled"):
|
|
249
|
+
return f"Status: TASK_ERROR\nTask: {task_ref}\nNext: Repair the existing task record through its owner before continuing; do not create a replacement task."
|
|
253
250
|
|
|
254
251
|
task_title = task_data.get("title", task_ref)
|
|
255
252
|
task_status = task_data.get("status", "unknown")
|
|
@@ -379,13 +376,15 @@ def _build_compact_current_state(
|
|
|
379
376
|
active = _resolve_active_task(trellis_dir, hook_input)
|
|
380
377
|
if active.task_path:
|
|
381
378
|
task_dir = _resolve_task_dir(trellis_dir, active.task_path)
|
|
382
|
-
status = "
|
|
379
|
+
status = "task_error"
|
|
383
380
|
task_json = task_dir / "task.json"
|
|
384
381
|
if task_json.is_file():
|
|
385
382
|
try:
|
|
386
383
|
data = json.loads(task_json.read_text(encoding="utf-8"))
|
|
387
384
|
if isinstance(data, dict):
|
|
388
|
-
|
|
385
|
+
value = data.get("status")
|
|
386
|
+
if value in ("planning", "in_progress", "completed", "cancelled"):
|
|
387
|
+
status = value
|
|
389
388
|
except (json.JSONDecodeError, OSError):
|
|
390
389
|
pass # Optional task metadata; fall back to generic status.
|
|
391
390
|
lines.append(f"Current task: {_repo_relative(repo_root, task_dir)}; status={status}.")
|
|
@@ -503,11 +502,15 @@ def main() -> None:
|
|
|
503
502
|
hook_input = json.loads(sys.stdin.read())
|
|
504
503
|
if not isinstance(hook_input, dict):
|
|
505
504
|
hook_input = {}
|
|
506
|
-
|
|
505
|
+
raw_cwd = hook_input.get("cwd")
|
|
506
|
+
project_dir = Path(_normalize_windows_shell_path(raw_cwd if isinstance(raw_cwd, str) and raw_cwd else ".")).resolve()
|
|
507
507
|
except (json.JSONDecodeError, KeyError):
|
|
508
508
|
hook_input = {}
|
|
509
509
|
project_dir = Path(".").resolve()
|
|
510
510
|
|
|
511
|
+
project_dir = next((candidate for candidate in (project_dir, *project_dir.parents) if (candidate / ".trellis").is_dir()), None)
|
|
512
|
+
if project_dir is None or not (project_dir / ".trellis" / "scripts" / "common" / "active_task.py").is_file():
|
|
513
|
+
return
|
|
511
514
|
configure_project_encoding(project_dir)
|
|
512
515
|
|
|
513
516
|
trellis_dir = project_dir / ".trellis"
|