@pennixrv/trellis 0.7.1-beta.12 → 0.7.1-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/teamwork/adapters/acp.d.ts +15 -0
- package/dist/commands/teamwork/adapters/acp.d.ts.map +1 -0
- package/dist/commands/teamwork/adapters/acp.js +261 -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 +2 -1
- package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -1
- package/dist/commands/teamwork/adapters/codex.js +10 -2
- 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 +17 -8
- package/dist/commands/teamwork/artifact.d.ts.map +1 -1
- package/dist/commands/teamwork/artifact.js +69 -28
- 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 +5 -0
- package/dist/commands/teamwork/batch.d.ts.map +1 -0
- package/dist/commands/teamwork/batch.js +123 -0
- package/dist/commands/teamwork/batch.js.map +1 -0
- package/dist/commands/teamwork/coordination.d.ts +12 -0
- package/dist/commands/teamwork/coordination.d.ts.map +1 -0
- package/dist/commands/teamwork/coordination.js +46 -0
- package/dist/commands/teamwork/coordination.js.map +1 -0
- package/dist/commands/teamwork/coordinator.d.ts +3 -2
- package/dist/commands/teamwork/coordinator.d.ts.map +1 -1
- package/dist/commands/teamwork/coordinator.js +19 -23
- package/dist/commands/teamwork/coordinator.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/guard.d.ts.map +1 -1
- package/dist/commands/teamwork/guard.js +15 -1
- 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 +75 -6
- package/dist/commands/teamwork/index.js.map +1 -1
- package/dist/commands/teamwork/plan.d.ts +11 -0
- package/dist/commands/teamwork/plan.d.ts.map +1 -0
- package/dist/commands/teamwork/plan.js +183 -0
- package/dist/commands/teamwork/plan.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/rm.d.ts.map +1 -1
- package/dist/commands/teamwork/rm.js +7 -0
- package/dist/commands/teamwork/rm.js.map +1 -1
- package/dist/commands/teamwork/run.d.ts +4 -0
- package/dist/commands/teamwork/run.d.ts.map +1 -1
- package/dist/commands/teamwork/run.js +3 -0
- 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 +232 -0
- package/dist/commands/teamwork/runtime.js.map +1 -0
- package/dist/commands/teamwork/spawn.d.ts +4 -0
- package/dist/commands/teamwork/spawn.d.ts.map +1 -1
- package/dist/commands/teamwork/spawn.js +32 -4
- 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.map +1 -1
- package/dist/commands/teamwork/supervisor/inbox.js +6 -3
- package/dist/commands/teamwork/supervisor/inbox.js.map +1 -1
- package/dist/commands/teamwork/supervisor/stdout.js +1 -1
- package/dist/commands/teamwork/supervisor/stdout.js.map +1 -1
- package/dist/commands/teamwork/supervisor.d.ts +3 -0
- package/dist/commands/teamwork/supervisor.d.ts.map +1 -1
- package/dist/commands/teamwork/supervisor.js +2 -0
- package/dist/commands/teamwork/supervisor.js.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.d.ts +0 -3
- package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-adapters.js +9 -54
- package/dist/commands/teamwork/teammate-adapters.js.map +1 -1
- package/dist/commands/teamwork/teammate-launch.d.ts +8 -4
- package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -1
- package/dist/commands/teamwork/teammate-launch.js +86 -6
- package/dist/commands/teamwork/teammate-launch.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +2 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +3 -1
- package/dist/configurators/workflow.js.map +1 -1
- 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/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +13 -1
- package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +7 -3
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +14 -0
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +33 -31
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +18 -5
- package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +55 -14
- 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 +20 -10
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +16 -4
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/task_workflow.py +12 -2
- package/dist/templates/trellis/teamwork.json +9 -0
- package/package.json +3 -2
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
# Teammate
|
|
1
|
+
# Teammate 配置矩阵
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
configuration matrix. It is a selection input, not a new role system. A
|
|
5
|
-
profile may provide a default provider and model plus provider-specific
|
|
6
|
-
options. The frozen plan stores the selected execution values in the
|
|
7
|
-
`Teammate Execution Configuration` snapshot so a running batch is unaffected
|
|
8
|
-
by later matrix changes.
|
|
3
|
+
配置由项目文件持有,运行时读取;下表解释默认选择,不替代实际文件。
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
| 文件 | 职责 |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `.trellis/agents/teammate-profiles.json`,schema 2 | `default_profile`;每个 profile 的 `role`、`default_configuration` 和 2–3 套命名 `configurations` |
|
|
8
|
+
| `.trellis/agents/teammate.md` | 通用角色、只读职责和结果合同 |
|
|
9
|
+
| `.trellis/agents/profiles/<profile>.md` | 精确专业角色卡;普通 Markdown,通过 Trellis 注入,不注册宿主原生角色 |
|
|
10
|
+
| `.trellis/teamwork.json`,schema 1 | `default_mode` 及三种模式的 `default_members` |
|
|
11
|
+
| `.trellis/config.yaml` 的 `teamwork.*` | 并发和进程容量限制 |
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
每套执行配置包含 `provider`、`model`,可选 `reasoning_effort` 和适配器支持的 `options`。上下文长度沿用 provider 默认,不配置 token 或预算机制。`teammate` 是内部执行者类型,公开计划不填写 `role_id`;`lens` 只表示成员的“本次关注点”。
|
|
14
|
+
|
|
15
|
+
| Profile | 工作职责 | 默认配置 | 第二候选 | 第三候选 |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| `architecture` | 架构、接口、依赖与取舍 | codex / gpt-6.1-sol / xhigh | copilot / gpt-6.1-sol / xhigh | copilot / claude-opus-5.5 / xhigh |
|
|
18
|
+
| `review` | 基于当前差异的正确性审查 | codex / gpt-6.1-sol / high | copilot / gpt-6.1-sol / high | copilot / claude-opus-5.5 / high |
|
|
19
|
+
| `research` | 外部资料、先例与时效核验 | codex / gpt-6.1-sol / high | copilot / gpt-6.1-sol / high | copilot / claude-sonnet-5.5 / high |
|
|
20
|
+
| `verification` | 独立验收、验证和证据核对 | codex / gpt-6.1-sol / high | copilot / gpt-6.1-sol / high | copilot / claude-sonnet-5.5 / high |
|
|
21
|
+
| `exploration` | 围绕主题探索本地源码、调用和边界 | codex / gpt-6.1-sol / high | copilot / gpt-6.1-sol / high | copilot / claude-sonnet-5.5 / high |
|
|
22
|
+
| `diagnosis` | 针对已知故障验证根因假设 | codex / gpt-6.1-sol / high | copilot / gpt-6.1-sol / high | copilot / claude-opus-5.5 / high |
|
|
23
|
+
|
|
24
|
+
候选名为 `codex-sol`、`copilot-sol`,以及 `copilot-opus` 或 `copilot-sonnet`。默认 profile 为 `exploration`。先查实际设置:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
trellis teamwork config --profile architecture --configuration copilot-opus --mode committee
|
|
14
28
|
```
|
|
15
29
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
filesystem or Git permission isolation. Available tools do not authorize a
|
|
26
|
-
teammate to implement product code. The coordinator rejects an incomplete
|
|
27
|
-
runtime proof without silently changing the frozen execution values.
|
|
28
|
-
|
|
29
|
-
The public `trellis teamwork batch` entry currently refuses dispatch before
|
|
30
|
-
coordination state is written. It does not discover or connect a host adapter;
|
|
31
|
-
interactive `spawn` and `run` do not establish a verified batch adapter.
|
|
32
|
-
|
|
33
|
-
The bundled role card is `.trellis/agents/teammate.md`. It is provider-neutral
|
|
34
|
-
and limits a teammate to the frozen context and current attempt artifacts. A
|
|
35
|
-
Teamwork teammate is not the native host-created `subagent`; the two have
|
|
36
|
-
different creation paths and contracts.
|
|
30
|
+
成员显式覆盖执行值只作用于该成员,不改项目默认。多成员应考虑同 provider 不同模型、跨 provider 同模型或不同专业的收益,填写 `selection_reason`;不强制异构、不自动轮换、不静默 fallback。`architecture + committee` 可以让 2–3 位架构成员分别使用不同配置。
|
|
31
|
+
|
|
32
|
+
构造器冻结有效执行值、通用加专业角色指令、上下文、模式配置摘要和能力摘要。后续改配置只影响新计划,已有计划执行时不重新解析角色文件。模型不可用、推理强度未被后端声明或选项不支持时明确失败。
|
|
33
|
+
|
|
34
|
+
四种 transport 为 Codex app-server、Claude Code stream-json、Copilot ACP 和 DSH ACP。Copilot 原生 CLI 支持非交互调用;这里选择 ACP 是为了统一会话、配置与取消回执。DSH 使用 `dsh --profile acp`,恢复使用其声明的 `session/resume`;Copilot 使用 `session/load`。安装、账号和真实调用结果须单独核验,fixture 通过不证明某个后端已可用。
|
|
35
|
+
|
|
36
|
+
Codex 使用 `developerInstructions`,Claude 使用独立的 append-system-prompt;ACP v1 只有用户内容块,Trellis 将角色与任务编码为两个明确区分的块,但不宣称具有独立 system 优先级。不会动态改写 `AGENTS.md` 或注册 provider 原生 persona。
|
|
37
|
+
|
|
38
|
+
源码、Git、递归委派和隐式历史使用限制是角色义务。宿主能力检查只声明实际运行能力:前台等待、受控产物、transport 和容量;不声称完成文件系统只读或记忆隔离。可用工具与宽权限模式不授予 teammate 编写产品代码的职责。
|
package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md
CHANGED
|
@@ -24,10 +24,10 @@ Use the ordinary Teamwork Session commands for a deliberate one-shot or
|
|
|
24
24
|
interactive discussion:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
trellis teamwork run [name]
|
|
28
|
-
trellis teamwork spawn <name> --
|
|
29
|
-
--as reviewer --file .trellis/tasks/<task-dir>/prd.md \
|
|
30
|
-
--jsonl .trellis/tasks/<task-dir>/research.jsonl
|
|
27
|
+
trellis teamwork run [name] --profile exploration --configuration codex-sol
|
|
28
|
+
trellis teamwork spawn <name> --profile review --configuration copilot-opus \
|
|
29
|
+
--as reviewer --file .trellis/tasks/in_progress/<task-dir>/prd.md \
|
|
30
|
+
--jsonl .trellis/tasks/in_progress/<task-dir>/research.jsonl
|
|
31
31
|
trellis teamwork send <name> --as <agent> --stdin
|
|
32
32
|
trellis teamwork wait <name> --as <agent> --kind done,turn_finished
|
|
33
33
|
trellis teamwork interrupt <name> --as <agent> --to <teammate> --stdin
|
|
@@ -39,13 +39,19 @@ create a second scheduler. Do not use them to bypass a rejected batch or to
|
|
|
39
39
|
steer an active managed assignment manually.
|
|
40
40
|
|
|
41
41
|
`spawn` registers an idle teammate; the first targeted `send` starts its turn.
|
|
42
|
-
The
|
|
42
|
+
The project profile supplies the common and professional role cards plus
|
|
43
|
+
execution defaults. `--profile` and `--configuration` select them;
|
|
44
|
+
`--reasoning-effort`, `--provider`, `--model`,
|
|
43
45
|
`--cwd`, `--resume`, `--sandbox`, `--timeout`, and `--warn-before` refine one
|
|
44
46
|
launch. `--file` accepts repeatable paths or globs. `--jsonl` accepts a
|
|
45
47
|
repeatable Trellis JSONL manifest whose entries have `{ "file", "reason" }`.
|
|
46
48
|
Both forms are resolved relative to the spawn cwd, reject paths outside the
|
|
47
49
|
cwd or configured trusted roots, skip missing entries with a warning, and
|
|
48
50
|
enforce per-file and total-context limits before building the system prompt.
|
|
51
|
+
Legacy generic `--agent <card>` remains available for deliberately custom
|
|
52
|
+
agent cards, but it cannot be combined with professional profile selection.
|
|
53
|
+
Interactive roles return the requested answer; they do not invent batch
|
|
54
|
+
claims, report paths or attempt identities.
|
|
49
55
|
|
|
50
56
|
Use `--inbox-policy explicitOnly|broadcastAndExplicit` to control which
|
|
51
57
|
messages are delivered to a teammate. `send --to` selects recipients and
|
|
@@ -62,6 +68,13 @@ replacement instruction, `kill` attempts graceful shutdown, and `kill --force`
|
|
|
62
68
|
uses the hard termination path. `--resume` supplies the provider session or
|
|
63
69
|
thread identifier for a later attempt.
|
|
64
70
|
|
|
71
|
+
Codex interrupts use `turn/interrupt` and await the old terminal turn before
|
|
72
|
+
submitting the replacement. ACP sends `session/cancel` and awaits the terminal
|
|
73
|
+
prompt response; sending a notification alone is not cancellation proof.
|
|
74
|
+
Batch cancellation additionally confirms provider process exit. Unconfirmed
|
|
75
|
+
termination preserves reconciliation and its capacity reservation. Session
|
|
76
|
+
removal and prune preserve sessions with unresolved batch reservations.
|
|
77
|
+
|
|
65
78
|
For short independent work, `teamwork run` creates an ephemeral session,
|
|
66
79
|
injects the selected context, sends one prompt, waits for `done`, prints the
|
|
67
80
|
answer, and removes the session. For a managed plan, the coordinator owns
|
|
@@ -14,10 +14,13 @@ 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; reports remain schema 1. Do not hand-author frozen
|
|
23
|
+
execution objects, role or capability digests, claims, or plan hashes.
|
|
21
24
|
|
|
22
25
|
Use the native task lifecycle for task status and acceptance. Teamwork records
|
|
23
26
|
coordination facts and teammate reports; it does not write `current_phase_id`,
|
|
@@ -39,19 +42,57 @@ specs, and the generic teammate role card. Freeze the input revision and route
|
|
|
39
42
|
revision after the coordinator has selected the scope. If those values change,
|
|
40
43
|
construct a new plan rather than mixing results from different task inputs.
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
Construct and run through the native entry points:
|
|
43
46
|
|
|
44
47
|
```bash
|
|
45
|
-
trellis teamwork
|
|
48
|
+
trellis teamwork config --profile review --mode advisor
|
|
49
|
+
trellis teamwork plan <draft.json> --task <task-dir> --output <task-dir>/plan.json --dry-run
|
|
50
|
+
trellis teamwork plan <draft.json> --task <task-dir> --output <task-dir>/plan.json
|
|
51
|
+
trellis teamwork batch <task-dir>/plan.json --task <task-dir> --preflight
|
|
52
|
+
trellis teamwork batch <task-dir>/plan.json --task <task-dir>
|
|
46
53
|
```
|
|
47
54
|
|
|
48
|
-
The
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
The draft is a JSON object with `schema_version: 2`, the binding fields above,
|
|
56
|
+
safe `batch_id` and `session_id`, `deadline`, optional `requested_capacity`
|
|
57
|
+
and `protected_targets`, and explicit `assignments`. A minimal member is:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"assignment_id": "review-a",
|
|
62
|
+
"profile": "review",
|
|
63
|
+
"configuration": "codex-sol",
|
|
64
|
+
"selection_reason": "Use the configured source reviewer",
|
|
65
|
+
"summary": "Review the selected change",
|
|
66
|
+
"scope": "src/example.ts",
|
|
67
|
+
"input": "Inspect the assigned source and return evidence in the requested report.",
|
|
68
|
+
"source_digest": "<SHA-256 of the selected source evidence>",
|
|
69
|
+
"acceptance": ["Cite precise source locations and explain observable impact"],
|
|
70
|
+
"max_retries": 0
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Optional member overrides are `provider`, `model`, `reasoning_effort`, and
|
|
75
|
+
adapter-supported `options`; context comes from `context_files` and
|
|
76
|
+
`context_manifests`. Committee members additionally need distinct `lens`
|
|
77
|
+
values and otherwise share the same task/evidence/acceptance contract. The
|
|
78
|
+
constructor creates their evaluation group. Read the configuration matrix
|
|
79
|
+
before choosing candidates. Output must be inside the selected task under
|
|
80
|
+
this project's `.trellis/tasks/`; existing immutable artifacts are preserved.
|
|
81
|
+
|
|
82
|
+
`--dry-run` validates all prepared briefs and paths without writing artifacts.
|
|
83
|
+
`--preflight` validates frozen inputs, current native task revisions and
|
|
84
|
+
capacity without launching a provider; `processProbe: not_run` means accounts,
|
|
85
|
+
models and transport have not been tested by that command. Actual dispatch
|
|
86
|
+
negotiates provider model and effort and fails explicitly if unsupported.
|
|
87
|
+
|
|
88
|
+
The foreground CLI owns dispatch, waiting, report acceptance, retries, process
|
|
89
|
+
shutdown and the terminal receipt. Do not add a second scheduler or retry
|
|
90
|
+
loop. `run` and `spawn` operate interactive sessions and do not bypass batch
|
|
91
|
+
reconciliation. A restart returns a durable terminal receipt or
|
|
92
|
+
`RECONCILIATION_REQUIRED`; it never silently replays an uncertain attempt.
|
|
93
|
+
Capacity reservations survive a coordinator crash because a dead coordinator
|
|
94
|
+
does not prove its provider processes exited. Do not delete an unresolved
|
|
95
|
+
reservation to make another batch fit; inspect ownership and terminal evidence.
|
|
55
96
|
|
|
56
97
|
## Teamwork Session and forum commands
|
|
57
98
|
|
|
@@ -59,7 +100,7 @@ Create and inspect the durable runtime object with the native CLI:
|
|
|
59
100
|
|
|
60
101
|
```bash
|
|
61
102
|
trellis teamwork create <name> --type chat|forum \
|
|
62
|
-
--task .trellis/tasks/<task-dir> --description "bounded discussion"
|
|
103
|
+
--task .trellis/tasks/in_progress/<task-dir> --description "bounded discussion"
|
|
63
104
|
trellis teamwork list [--scope project|global] [--all]
|
|
64
105
|
trellis teamwork messages <name> [--raw]
|
|
65
106
|
trellis teamwork wait <name> --as <agent> --kind done,turn_finished
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 架构与方案评估(architecture)
|
|
2
|
+
|
|
3
|
+
你负责评估 brief 指定的架构问题和实质候选。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含目标与约束、当前结构、受影响边界、候选或待决问题和接受条件。先核对现有职责与接口,再比较满足当前需求的候选,包括数据与控制流、失败恢复、兼容与迁移、可验证性及维护成本。必要的源码探索或外部补证必须服务于当前决定。
|
|
6
|
+
|
|
7
|
+
结果应包含推荐及依据、排除候选与理由、接口和边界、关键情景、风险、实施与验证建议,以及仍须用户决定的取舍。证据足以评估候选后停止;不要为假设的未来增加框架,不自行扩充规划权限或实施授权。最终结论由协调者归并。
|
|
8
|
+
|
|
9
|
+
必要输入缺失、角色与 brief 冲突或需要越界操作时,报告阻断。不编写产品源码、测试或修复,不替协调者接受结果,不继续委派。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 已知故障诊断(diagnosis)
|
|
2
|
+
|
|
3
|
+
你负责诊断 brief 中已经发生的故障。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含实际症状与完整错误、期望行为、环境与版本、复现条件和近期变更。先建立事实及可重复的最小触发,再提出少量可区分的假设,按信息增益选择已授权的观测或验证,记录支持与反证。每次失败先核对现场,不连续猜测或试改。
|
|
6
|
+
|
|
7
|
+
结果应包含故障链、已排除假设、最可能根因及证据强度、剩余未知、最小修复方向和验证建议。根因证据充分或受限无法继续时停止,不把测试失败本身当作根因。复杂方法按项目技能来源规则使用,不复制用户级 Skill 内容进角色卡。
|
|
8
|
+
|
|
9
|
+
必要输入缺失、角色与 brief 冲突或需要越界操作时,报告阻断。不编写修复或顺带重构,不替协调者接受结果,不继续委派。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 本地源码探索(exploration)
|
|
2
|
+
|
|
3
|
+
你负责回答 brief 中的本地源码问题,建立可接续的代码与证据地图。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含问题、仓库与基线、主题范围、已有锚点和所需深度。先确定入口、定义和调用路径,按项目来源规则使用有效索引或有界搜索,再阅读支持结论的当前源码。追踪相关数据流、关键条件、异常路径、依赖和测试入口;区分实际源码、文档陈述和推断。
|
|
6
|
+
|
|
7
|
+
结果应直接回答问题,给出文件、符号及适用行号,说明关键路径、关系、影响边界、反例、证据不足处和建议的下一阅读点。必要路径和边界已核对后停止;不要无限扫描全库,不把代码地图写成未经验证的架构推荐或根因定论。
|
|
8
|
+
|
|
9
|
+
必要输入缺失、角色与 brief 冲突或需要越界操作时,报告阻断。不编写产品源码、测试或修复,不替协调者接受结果,不继续委派。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 外部资料研究(research)
|
|
2
|
+
|
|
3
|
+
你负责为 brief 中的问题核对外部资料与先例。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含研究问题、约束与版本、待比较路线和来源要求。先拆出可证伪的问题,再核对官方文档、标准、维护者源码或明确标注的次级材料,记录版本、日期、反证和适用边界。本地源码用于提出或核验适用条件,主体证据来自外部来源。遵循项目已有的检索和官方文档入口;搜索摘要只是候选,不等于已读全文。
|
|
6
|
+
|
|
7
|
+
结果应包含有出处的结论或比较、可核验链接、版本或检索日期,以及对当前项目的具体影响。明确区分已核实、推断、冲突和未知。证据足以支持当前决定后停止;网络或来源访问失败应如实报告,不编造检索结果,不以社区说法代替官方合同。
|
|
8
|
+
|
|
9
|
+
必要输入缺失、角色与 brief 冲突或需要越界操作时,报告阻断。不编写产品源码、测试或修复,不替协调者接受结果,不继续委派。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 变更与设计审查(review)
|
|
2
|
+
|
|
3
|
+
你负责审查 brief 明确指定的候选、差异、提交或设计。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含候选、需求基线、本次关注点和适用验收。沿真实调用方和相关上下文核对正确性、需求覆盖、回归、数据或安全风险及测试缺口。不能只看 diff,也不能按检查表制造问题或强加风格偏好。
|
|
6
|
+
|
|
7
|
+
结果按 [严重]、[主要]、[轻微] 排序;每项说明触发条件、实际影响、准确定位与证据和修复方向。无发现时说明检查范围及剩余风险,不能据此宣称没有 bug。默认不运行会修改现场的构建或安装;确需验证时遵守 brief 已有授权,或建议由 verification 执行。
|
|
8
|
+
|
|
9
|
+
候选的相关调用与关键风险已核对后停止。必要输入缺失、角色与 brief 冲突或需要越界操作时,报告阻断。不编写产品源码、测试或修复,不替协调者接受结果,不继续委派。
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 行为与接受条件验证(verification)
|
|
2
|
+
|
|
3
|
+
你负责检验 brief 中明确的行为声明和接受条件。共同角色卡规定的范围、结果写入和停止条件始终适用。
|
|
4
|
+
|
|
5
|
+
输入应包含待验证声明、期望行为、候选版本与环境、已授权命令,以及产物、临时目录和清理约定。先将声明映射到能够证实或证伪的检查,核对实际版本与环境,再执行适用的已有测试、构建或复现步骤并解释结果。不要无故重复全套检查或添加只镜像实现的断言。
|
|
6
|
+
|
|
7
|
+
结果应将声明、检查和实际结果对应起来,记录退出事实、关键证据、pass/fail/not_run/受限、环境差异、残留资源及不能据此推断的结论。工具输出、缓存和临时复现材料可能产生文件副作用,须遵守 brief 的允许位置及清理约定,不能声称绝无副作用。
|
|
8
|
+
|
|
9
|
+
适用声明已有证据或受限无法继续时停止。缺少账号、环境或授权时停止相关检查并报告,不自行安装、登录、发布或写产品测试。不替协调者接受结果,不继续委派;根因辨析交给 diagnosis。
|
|
@@ -1,8 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
+
"schema_version": 2,
|
|
3
|
+
"default_profile": "exploration",
|
|
2
4
|
"profiles": {
|
|
3
|
-
"architecture": {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
"architecture": {
|
|
6
|
+
"role": "profiles/architecture.md",
|
|
7
|
+
"default_configuration": "codex-sol",
|
|
8
|
+
"configurations": {
|
|
9
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "xhigh" },
|
|
10
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "xhigh" },
|
|
11
|
+
"copilot-opus": { "provider": "copilot", "model": "claude-opus-5.5", "reasoning_effort": "xhigh" }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"review": {
|
|
15
|
+
"role": "profiles/review.md",
|
|
16
|
+
"default_configuration": "codex-sol",
|
|
17
|
+
"configurations": {
|
|
18
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
19
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
20
|
+
"copilot-opus": { "provider": "copilot", "model": "claude-opus-5.5", "reasoning_effort": "high" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"research": {
|
|
24
|
+
"role": "profiles/research.md",
|
|
25
|
+
"default_configuration": "codex-sol",
|
|
26
|
+
"configurations": {
|
|
27
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
28
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
29
|
+
"copilot-sonnet": { "provider": "copilot", "model": "claude-sonnet-5.5", "reasoning_effort": "high" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"verification": {
|
|
33
|
+
"role": "profiles/verification.md",
|
|
34
|
+
"default_configuration": "codex-sol",
|
|
35
|
+
"configurations": {
|
|
36
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
37
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
38
|
+
"copilot-sonnet": { "provider": "copilot", "model": "claude-sonnet-5.5", "reasoning_effort": "high" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"exploration": {
|
|
42
|
+
"role": "profiles/exploration.md",
|
|
43
|
+
"default_configuration": "codex-sol",
|
|
44
|
+
"configurations": {
|
|
45
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
46
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
47
|
+
"copilot-sonnet": { "provider": "copilot", "model": "claude-sonnet-5.5", "reasoning_effort": "high" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"diagnosis": {
|
|
51
|
+
"role": "profiles/diagnosis.md",
|
|
52
|
+
"default_configuration": "codex-sol",
|
|
53
|
+
"configurations": {
|
|
54
|
+
"codex-sol": { "provider": "codex", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
55
|
+
"copilot-sol": { "provider": "copilot", "model": "gpt-6.1-sol", "reasoning_effort": "high" },
|
|
56
|
+
"copilot-opus": { "provider": "copilot", "model": "claude-opus-5.5", "reasoning_effort": "high" }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
7
59
|
}
|
|
8
60
|
}
|
|
@@ -6,14 +6,14 @@ labels: [trellis, teammate]
|
|
|
6
6
|
|
|
7
7
|
# Teammate (Teamwork runtime)
|
|
8
8
|
|
|
9
|
-
You are a bounded Trellis teammate assigned one
|
|
9
|
+
You are a bounded Trellis teammate assigned one task by the coordinator. Produce
|
|
10
10
|
independently reviewable investigation, research, review, verification, or
|
|
11
11
|
evidence. The coordinator owns dispatch, retry, acceptance, and final
|
|
12
12
|
disposition.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
For a managed batch, read the immutable brief and issued claim before substantive
|
|
15
|
+
work. Use the exact paths supplied in the launch input; task directories may
|
|
16
|
+
include a status and, for settled tasks, a month. The artifact layout is:
|
|
17
17
|
|
|
18
18
|
```text
|
|
19
19
|
.trellis/tasks/<task-dir>/teammates/<batch>/<assignment>/brief.json
|
|
@@ -23,8 +23,14 @@ the paths are:
|
|
|
23
23
|
.trellis/tasks/<task-dir>/teammates/<batch>/<assignment>/attempts/<attempt-id>/report.json
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
For an interactive `spawn` or `run` without a managed assignment, use the
|
|
27
|
+
coordinator's bounded message as the task input and return the requested answer.
|
|
28
|
+
Do not invent a brief, attempt identity, report path, or acceptance decision.
|
|
29
|
+
The same professional role, source/Git read-only obligations, and delegation
|
|
30
|
+
boundaries apply. Missing necessary task information is a blocker.
|
|
31
|
+
|
|
32
|
+
For a managed assignment, append material progress to the assigned worklog and
|
|
33
|
+
create exactly one pending report for this attempt using this JSON shape:
|
|
28
34
|
|
|
29
35
|
```json
|
|
30
36
|
{
|
|
@@ -57,11 +63,15 @@ that context is missing, report the blocker instead of inventing values.
|
|
|
57
63
|
These are role and result requirements, not a claim of sandbox isolation.
|
|
58
64
|
Available coding tools do not authorize product implementation in this role.
|
|
59
65
|
|
|
60
|
-
Use only the
|
|
66
|
+
Use only the source scope and context explicitly assigned by the coordinator.
|
|
67
|
+
Search and inspect relevant files within that scope when the task calls for
|
|
68
|
+
local exploration; injected context is an entry point, not a claim that every
|
|
69
|
+
needed source file has already been supplied. Do not read or use
|
|
61
70
|
ambient personal, session, or cross-project memory, including memory tools or
|
|
62
|
-
environment-provided memory. If
|
|
63
|
-
|
|
64
|
-
protocol.
|
|
71
|
+
environment-provided memory. If ambient memory is inseparable from the evidence
|
|
72
|
+
needed for the answer, stop and report the limitation through the assigned
|
|
73
|
+
failure protocol. This is a role obligation; do not claim technical memory
|
|
74
|
+
isolation or filesystem enforcement.
|
|
65
75
|
|
|
66
76
|
Only submit `status: complete` when every acceptance criterion is met and at
|
|
67
77
|
least one evidence item supports the result. If the work cannot be completed,
|
|
@@ -55,6 +55,7 @@ export declare const addSessionScript: string;
|
|
|
55
55
|
export declare const linearSyncScript: string;
|
|
56
56
|
export declare const workflowMdTemplate: string;
|
|
57
57
|
export declare const configYamlTemplate: string;
|
|
58
|
+
export declare const teamworkConfigTemplate: string;
|
|
58
59
|
export declare const gitignoreTemplate: string;
|
|
59
60
|
export declare const gitattributesTemplate: string;
|
|
60
61
|
export declare const teammateAgentTemplate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,cAAc,QAA8C,CAAC;AAC1E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,YAAY,QAA2C,CAAC;AACrE,eAAO,M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AAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAG9E,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAA+C,CAAC;AAG7E,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,QAAgC,CAAC;AACpE,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAC/D,eAAO,MAAM,qBAAqB,QAAoC,CAAC;AAGvE,eAAO,MAAM,qBAAqB,QAAqC,CAAC;AACxE,eAAO,MAAM,8BAA8B,QAE1C,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA6CnD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAelD"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* ├── gitignore.txt # .gitignore content
|
|
19
19
|
* └── gitattributes.txt # project-root .gitattributes content
|
|
20
20
|
*/
|
|
21
|
-
import { readFileSync } from "node:fs";
|
|
21
|
+
import { readFileSync, readdirSync } from "node:fs";
|
|
22
22
|
import { dirname, join } from "node:path";
|
|
23
23
|
import { fileURLToPath } from "node:url";
|
|
24
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -67,6 +67,7 @@ export const linearSyncScript = readTemplate("scripts/hooks/linear_sync.py");
|
|
|
67
67
|
// Configuration files
|
|
68
68
|
export const workflowMdTemplate = readTemplate("workflow.md");
|
|
69
69
|
export const configYamlTemplate = readTemplate("config.yaml");
|
|
70
|
+
export const teamworkConfigTemplate = readTemplate("teamwork.json");
|
|
70
71
|
export const gitignoreTemplate = readTemplate("gitignore.txt");
|
|
71
72
|
export const gitattributesTemplate = readTemplate("gitattributes.txt");
|
|
72
73
|
// Project agent roles loaded from `.trellis/agents/`.
|
|
@@ -128,9 +129,20 @@ export function getAllScripts() {
|
|
|
128
129
|
*/
|
|
129
130
|
export function getAllAgents() {
|
|
130
131
|
const agents = new Map();
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
function collect(directory) {
|
|
133
|
+
for (const entry of readdirSync(join(__dirname, "agents", directory), {
|
|
134
|
+
withFileTypes: true,
|
|
135
|
+
})) {
|
|
136
|
+
const relative = join(directory, entry.name);
|
|
137
|
+
if (entry.isDirectory())
|
|
138
|
+
collect(relative);
|
|
139
|
+
else if (entry.isFile())
|
|
140
|
+
agents.set(relative, readTemplate(join("agents", relative)));
|
|
141
|
+
else
|
|
142
|
+
throw new Error(`unsupported agent template: ${relative}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
collect("");
|
|
134
146
|
return agents;
|
|
135
147
|
}
|
|
136
148
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,O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AAI,KAAK,CAAC,WAAW,EAAE;gBAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;iBACtC,IAAI,KAAK,CAAC,MAAM,EAAE;gBACrB,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;;gBAC1D,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -133,6 +133,10 @@ def implementation_start_ready(data: dict, task_dir: Path) -> bool:
|
|
|
133
133
|
phase_ids = state.get("phase_ids")
|
|
134
134
|
if not isinstance(phase_ids, list) or PHASE_IDS[3] not in phase_ids:
|
|
135
135
|
return False
|
|
136
|
+
phases = state.get("phases")
|
|
137
|
+
implementation = phases.get(PHASE_IDS[3]) if isinstance(phases, dict) else None
|
|
138
|
+
if not isinstance(implementation, dict) or implementation.get("status") != "active":
|
|
139
|
+
return False
|
|
136
140
|
if state.get("task_kind") not in {"implementation", "combined"}:
|
|
137
141
|
return False
|
|
138
142
|
authorization = state.get("implementation_authorization")
|
|
@@ -460,11 +464,12 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
460
464
|
current, record = PHASE_IDS[4], state["phases"][PHASE_IDS[4]]
|
|
461
465
|
else:
|
|
462
466
|
current, record = _phase(state)
|
|
467
|
+
accepted_design_return = action == "return" and current == PHASE_IDS[2] and record.get("status") == "accepted"
|
|
463
468
|
returning_to_requirements = action == "return" and args.target_phase == PHASE_IDS[0]
|
|
464
469
|
rerouting_to_requirements = action == "route" and args.target_phase == PHASE_IDS[0]
|
|
465
470
|
if current != PHASE_IDS[0] and not returning_to_requirements and not rerouting_to_requirements:
|
|
466
471
|
_require_current_requirements_confirmation(task_dir, state)
|
|
467
|
-
if action not in {"show", "resume", "route", "authorize", "admission"} and record.get("status") != "active" and not reviewed_delivery:
|
|
472
|
+
if action not in {"show", "resume", "route", "authorize", "admission"} and record.get("status") != "active" and not reviewed_delivery and not accepted_design_return:
|
|
468
473
|
raise TaskWorkflowError("TASK_PHASE_INVALID_TRANSITION", "only the active phase can be changed")
|
|
469
474
|
|
|
470
475
|
if action == "artifact":
|
|
@@ -565,7 +570,7 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
565
570
|
target = _required_text(args.target_phase, "--target-phase")
|
|
566
571
|
if target not in state["phase_ids"] or (
|
|
567
572
|
state["phase_ids"].index(target) >= state["phase_ids"].index(current)
|
|
568
|
-
and not (reviewed_delivery and target == current)
|
|
573
|
+
and not ((reviewed_delivery or accepted_design_return) and target == current)
|
|
569
574
|
):
|
|
570
575
|
raise TaskWorkflowError("TASK_PHASE_INVALID_TRANSITION", "return target must be an earlier phase in the current route")
|
|
571
576
|
reason = _required_text(args.reason, "--reason")
|
|
@@ -760,6 +765,11 @@ def cmd_delegate_start(args: argparse.Namespace) -> int:
|
|
|
760
765
|
child_data, child_meta = _load(child_dir)
|
|
761
766
|
if child_data.get("parent") != parent_dir.name or child_dir.name not in parent_data.get("children", []):
|
|
762
767
|
raise TaskWorkflowError("TASK_DELEGATE_PARENT_LINK_INVALID", "parent and child task links do not match")
|
|
768
|
+
from .task_continuity import assert_task_mutation_allowed
|
|
769
|
+
|
|
770
|
+
assert_task_mutation_allowed(repo_root, parent_dir, parent_data)
|
|
771
|
+
if child_data.get("status") not in {"planning", "in_progress"}:
|
|
772
|
+
raise TaskWorkflowError("TASK_DELEGATE_CHILD_TERMINAL", "only a planning or in-progress child task can be delegated")
|
|
763
773
|
if parent_data.get("status") != "in_progress" or not implementation_start_ready(parent_data, parent_dir):
|
|
764
774
|
raise TaskWorkflowError("TASK_DELEGATE_IMPLEMENTATION_NOT_AUTHORIZED", "parent task is not at an authorized Task Implementation and Test Verification Phase entry")
|
|
765
775
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pennixrv/trellis",
|
|
3
|
-
"version": "0.7.1-beta.
|
|
3
|
+
"version": "0.7.1-beta.14",
|
|
4
4
|
"description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"author": "Mindfold LLC",
|
|
28
28
|
"license": "AGPL-3.0-only",
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@agentclientprotocol/sdk": "2.4.0",
|
|
30
31
|
"chalk": "^5.3.0",
|
|
31
32
|
"commander": "^12.1.0",
|
|
32
33
|
"figlet": "^1.9.4",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"inquirer": "^9.3.7",
|
|
35
36
|
"undici": "^6.21.0",
|
|
36
37
|
"zod": "^4.4.2",
|
|
37
|
-
"@pennixrv/trellis-core": "0.7.1-beta.
|
|
38
|
+
"@pennixrv/trellis-core": "0.7.1-beta.14"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@eslint/js": "^9.18.0",
|