@pennixrv/trellis 0.7.2-beta.0 → 0.7.2-beta.3
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/artifact.d.ts +9 -4
- package/dist/commands/teamwork/artifact.d.ts.map +1 -1
- package/dist/commands/teamwork/artifact.js +8 -37
- package/dist/commands/teamwork/artifact.js.map +1 -1
- package/dist/commands/teamwork/batch.d.ts +1 -0
- package/dist/commands/teamwork/batch.d.ts.map +1 -1
- package/dist/commands/teamwork/batch.js +24 -3
- package/dist/commands/teamwork/batch.js.map +1 -1
- package/dist/commands/teamwork/coordinator.d.ts +16 -3
- package/dist/commands/teamwork/coordinator.d.ts.map +1 -1
- package/dist/commands/teamwork/coordinator.js +209 -86
- package/dist/commands/teamwork/coordinator.js.map +1 -1
- package/dist/commands/teamwork/guard.js +2 -2
- 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 +25 -1
- package/dist/commands/teamwork/index.js.map +1 -1
- package/dist/commands/teamwork/result.d.ts +2 -1
- package/dist/commands/teamwork/result.d.ts.map +1 -1
- package/dist/commands/teamwork/result.js.map +1 -1
- package/dist/commands/teamwork/runtime.d.ts +1 -1
- package/dist/commands/teamwork/runtime.d.ts.map +1 -1
- package/dist/commands/teamwork/runtime.js +58 -29
- package/dist/commands/teamwork/runtime.js.map +1 -1
- package/dist/migrations/manifests/0.7.2-beta.1.json +11 -0
- package/dist/migrations/manifests/0.7.2-beta.2.json +11 -0
- package/dist/migrations/manifests/0.7.2-beta.3.json +9 -0
- package/dist/templates/common/skills/request-intake.md +3 -3
- package/dist/templates/kiro/agents/trellis.json +1 -1
- package/dist/templates/shared-hooks/guard-teamwork-wait.py +5 -0
- package/dist/templates/trellis/scripts/common/config.py +5 -0
- package/dist/templates/trellis/scripts/common/task_continuity.py +62 -0
- package/dist/templates/trellis/scripts/common/task_store.py +16 -0
- package/dist/templates/trellis/scripts/common/task_workflow.py +57 -4
- package/dist/templates/trellis/scripts/task.py +6 -1
- package/dist/templates/trellis/workflow.md +3 -3
- package/dist/utils/asset-backup.d.ts.map +1 -1
- package/dist/utils/asset-backup.js +18 -6
- package/dist/utils/asset-backup.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,11 +2,12 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { getAdapter } from "./adapters/index.js";
|
|
5
|
+
import { TeamworkPolicyChangedError, } from "./coordinator.js";
|
|
5
6
|
import { pumpStdout } from "./supervisor/stdout.js";
|
|
6
7
|
import { resolveProviderPath } from "./supervisor.js";
|
|
7
8
|
import { assertTeammateContextCurrent } from "./teammate-launch.js";
|
|
8
9
|
import { appendEvent } from "./store/events.js";
|
|
9
|
-
import { recordCoordinationEvent } from "@pennixrv/trellis-core/teamwork";
|
|
10
|
+
import { recordCoordinationEvent, redactDiagnostic, } from "@pennixrv/trellis-core/teamwork";
|
|
10
11
|
import { readProcessIdentity } from "./process-identity.js";
|
|
11
12
|
import { assertFrozenCoordination } from "./coordination.js";
|
|
12
13
|
import { resolveTeammateRuntimeConfig } from "./teammate-config.js";
|
|
@@ -27,12 +28,17 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
27
28
|
prepare(context) {
|
|
28
29
|
const config = resolveTeammateRuntimeConfig(cwd, process.env, context.plan.coordinationMode);
|
|
29
30
|
if (expectedConfigDigest && config.sourceDigest !== expectedConfigDigest)
|
|
30
|
-
throw new
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
throw new TeamworkPolicyChangedError("Runtime policy changed after batch admission; pending assignments cannot start");
|
|
32
|
+
try {
|
|
33
|
+
assertFrozenCoordination(cwd, context.plan.coordinationDigest, context.plan.coordinationSnapshot, {
|
|
34
|
+
mode: context.plan.coordinationMode,
|
|
35
|
+
maxConcurrency: config.teammate.maxConcurrency,
|
|
36
|
+
guard: config.guard,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
throw new TeamworkPolicyChangedError(error instanceof Error ? error.message : String(error));
|
|
41
|
+
}
|
|
36
42
|
assertTeammateContextCurrent(context.launch, cwd);
|
|
37
43
|
const adapter = getAdapter(context.profile.provider);
|
|
38
44
|
resolveProviderPath(adapter.provider, cwd);
|
|
@@ -44,10 +50,7 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
44
50
|
async dispatch(context) {
|
|
45
51
|
if (aborted)
|
|
46
52
|
throw new Error("batch runtime has been cancelled");
|
|
47
|
-
|
|
48
|
-
runtime.prepare?.(context);
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
53
|
+
const failBeforeStart = (error) => {
|
|
51
54
|
active.set(context.attemptId, {
|
|
52
55
|
result: Promise.resolve({
|
|
53
56
|
kind: "failed",
|
|
@@ -57,10 +60,17 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
57
60
|
stop: async () => true,
|
|
58
61
|
cancel: async () => undefined,
|
|
59
62
|
});
|
|
63
|
+
};
|
|
64
|
+
try {
|
|
65
|
+
runtime.prepare?.(context);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
failBeforeStart(error);
|
|
60
69
|
return;
|
|
61
70
|
}
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
let adapter;
|
|
72
|
+
let ctx;
|
|
73
|
+
let child;
|
|
64
74
|
const view = {
|
|
65
75
|
cwd,
|
|
66
76
|
model: context.profile.model,
|
|
@@ -68,17 +78,25 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
68
78
|
options: context.profile.options,
|
|
69
79
|
systemPrompt: context.launch.instructions,
|
|
70
80
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
try {
|
|
82
|
+
adapter = getAdapter(context.profile.provider);
|
|
83
|
+
ctx = adapter.createCtx();
|
|
84
|
+
const executable = resolveProviderPath(adapter.provider, cwd);
|
|
85
|
+
child = spawn(executable.command, [...executable.prefixArgs, ...adapter.buildArgs(view)], {
|
|
86
|
+
cwd,
|
|
87
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
88
|
+
env: {
|
|
89
|
+
...process.env,
|
|
90
|
+
TRELLIS_HOOKS: "0",
|
|
91
|
+
TRELLIS_TEAMWORK_SESSION: context.plan.sessionId,
|
|
92
|
+
TRELLIS_TEAMWORK_AS: context.teammateId,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
failBeforeStart(error);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
82
100
|
let closed = false;
|
|
83
101
|
let resolveClosed = () => undefined;
|
|
84
102
|
const close = new Promise((resolve) => {
|
|
@@ -136,11 +154,12 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
136
154
|
}
|
|
137
155
|
if (stderrTail.length) {
|
|
138
156
|
try {
|
|
139
|
-
const diagnostic = safePath(
|
|
157
|
+
const diagnostic = safePath(cwd, path.join(".trellis", ".runtime", "teamwork-diagnostics", context.plan.batchId, context.attemptId, "provider-stderr.log"));
|
|
140
158
|
const directory = path.dirname(diagnostic);
|
|
159
|
+
fs.mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
141
160
|
if (fs.lstatSync(directory).isDirectory() &&
|
|
142
161
|
!fs.lstatSync(directory).isSymbolicLink())
|
|
143
|
-
fs.writeFileSync(diagnostic, stderrTail, {
|
|
162
|
+
fs.writeFileSync(diagnostic, redactDiagnostic(stderrTail.toString("utf8")), {
|
|
144
163
|
mode: 0o600,
|
|
145
164
|
flag: "wx",
|
|
146
165
|
});
|
|
@@ -173,9 +192,19 @@ export function createCliCoordinatorRuntime(cwd, taskRoot, expectedConfigDigest)
|
|
|
173
192
|
});
|
|
174
193
|
};
|
|
175
194
|
child.once("error", (error) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
195
|
+
// A spawn failure has no PID; other errors still require confirmed shutdown.
|
|
196
|
+
if (!child.pid) {
|
|
197
|
+
closed = true;
|
|
198
|
+
resolveClosed();
|
|
199
|
+
}
|
|
200
|
+
void finish({ kind: "failed", terminal: true, reason: error.message });
|
|
201
|
+
});
|
|
202
|
+
child.stdin.on("error", (error) => {
|
|
203
|
+
void finish({
|
|
204
|
+
kind: "failed",
|
|
205
|
+
terminal: true,
|
|
206
|
+
reason: `provider input failed: ${error.message}`,
|
|
207
|
+
});
|
|
179
208
|
});
|
|
180
209
|
child.once("close", () => {
|
|
181
210
|
closed = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/commands/teamwork/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AAGnE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OA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KAAK,CAAC,MAAM,CAAC,OAAO;YAClB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAC9C,IAAI,CAAC,OAAO;gBACV,OAAO;oBACL,IAAI,EAAE,gBAAgB;oBACtB,MAAM,EAAE,wDAAwD;iBACjE,CAAC;YACJ,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;gBAC3B,CAAC,CAAC;oBACE,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;oBACd,MAAM,EAAE,iCAAiC;iBAC1C;gBACH,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,+BAA+B,EAAE,CAAC;QAC1E,CAAC;KACF,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.1",
|
|
3
|
+
"description": "Teamwork acceptance, recovery boundaries, and lifecycle revision integrity",
|
|
4
|
+
"breaking": true,
|
|
5
|
+
"recommendMigrate": true,
|
|
6
|
+
"changelog": "Separate teammate report submission from main-agent acceptance; retain complete attempt evidence until explicit cleanup; isolate member-level provider failures; tighten task lifecycle revision and metadata validation; preserve safe in-project asset symlinks; and correct release staging boundaries.",
|
|
7
|
+
"migrationGuide": "Upgrade through the beta channel to 0.7.2-beta.1, then run the native trellis update command. Existing customized project files remain subject to the normal preview and conflict review. Teamwork batches completed under this version now remain pending coordinator review until each report receives an explicit accepted or final_failed disposition; do not treat an AWAITING_REVIEW receipt as final acceptance. Attempt evidence remains until explicit cleanup-artifacts preview and confirmation.",
|
|
8
|
+
"aiInstructions": "The CLI owns FIFO dispatch, retries, background monitoring, and batch recovery. Teammates submit conclusions and evidence only. After the full batch returns, the main agent reviews each report and records a disposition bound to its digest and frozen acceptance contract. Preserve attempt evidence and use native reconcile, review, retry, and cleanup-artifacts commands. Unknown process identity remains fail closed unless explicitly confirmed through the auditable native reconciliation entry point.",
|
|
9
|
+
"migrations": [],
|
|
10
|
+
"notes": "Keep the beta npm channel. 0.7.2-beta.1 is above stable 0.7.1; do not move the latest tag."
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.2",
|
|
3
|
+
"description": "Teamwork acceptance and release parity correction",
|
|
4
|
+
"breaking": true,
|
|
5
|
+
"recommendMigrate": true,
|
|
6
|
+
"changelog": "Preserve beta.1 teamwork and lifecycle changes; include the canonical workflow scripts in the source commit so released scripts match bundled templates.",
|
|
7
|
+
"migrationGuide": "Upgrade through the beta channel to 0.7.2-beta.2, then run the native trellis update command. Existing customized project files remain subject to the normal preview and conflict review. Teamwork batches remain pending coordinator review until each report receives an explicit accepted or final_failed disposition; attempt evidence remains until explicit cleanup.",
|
|
8
|
+
"aiInstructions": "The CLI owns FIFO dispatch, retries, background monitoring, and batch recovery. Teammates submit conclusions and evidence only. After the full batch returns, the main agent reviews each report and records a disposition bound to its digest and frozen acceptance contract. Preserve attempt evidence and use native reconcile, review, retry, and cleanup-artifacts commands. Unknown process identity remains fail closed unless explicitly confirmed through the auditable native reconciliation entry point.",
|
|
9
|
+
"migrations": [],
|
|
10
|
+
"notes": "Keep the beta npm channel. 0.7.2-beta.2 is above stable 0.7.1; do not move the latest tag."
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.3",
|
|
3
|
+
"description": "Taskless routing gate and explicit task-creation approval",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Clarify the taskless workflow contract for bounded, immediately verifiable work and require approval before inferred task creation when the user did not explicitly request a task.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "The release updates bundled workflow templates and agent guidance only; no project file migration is required."
|
|
9
|
+
}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
-
Reuse verified evidence and existing authorization.
|
|
5
|
+
Reuse verified evidence and existing authorization. Follow the taskless route in workflow.md only when all of these are true: the goal is clear; the scope and owner are bounded; risk is controlled; the user has authorized the actual action; success can be verified in the current session; and the work needs no persistent route, coordination, design, review, release, installation, migration, external delivery, or dedicated rollback plan. A bounded irreversible action additionally needs exact target verification, an acceptable recovery or loss boundary, and a stop condition. User authorization alone is not sufficient. Read-only inspection, bounded diagnosis, low-impact native-owner maintenance or cleanup, small single-surface edits, and rerunning existing checks are examples, not an allowlist. Intake ends when the request reaches its appropriate phase; do not repeat session initialization or conduct a second requirements or planning workflow here.
|
|
6
6
|
|
|
7
7
|
## Start the task
|
|
8
8
|
|
|
9
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.
|
|
10
|
-
2.
|
|
10
|
+
2. When the work needs a persistent route, coordination, design, review, release, installation, migration, external delivery, or a durable record, treat it as task-based. If the user did not explicitly ask to create a task, stop before the create command and ask for creation approval. State which taskless condition is not met, the proposed owner/scope/route, and the risk of proceeding without a task. An explicit user request to create or resume a task is already authorization for that lifecycle action only; it does not authorize implementation or delivery:
|
|
11
11
|
|
|
12
12
|
{{PYTHON_CMD}} ./.trellis/scripts/task.py create "<title>" --description "<summary>"
|
|
13
13
|
|
|
14
|
-
3.
|
|
14
|
+
3. After creation approval, initialize an ordered phase route that includes Goal Exploration and Requirements Confirmation Phase, then only the later phases the task needs:
|
|
15
15
|
|
|
16
16
|
{{PYTHON_CMD}} ./.trellis/scripts/task.py phase init <task> --task-kind <analysis|implementation|combined> --complexity <simple|standard|complex> --project-context <new|existing> --phase-ids <ordered-phase-ids>
|
|
17
17
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trellis",
|
|
3
3
|
"description": "Trellis workflow main agent. Follows the current task route and matching Skills, or uses the taskless route when eligible.",
|
|
4
|
-
"prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn with the active task and its current phase. An `agentSpawn` hook injects a `<session-context>` overview when this agent starts. Use these to orient yourself; resolve missing or stale state through Trellis CLI.\n\n## How to Work\n\n1. Follow `.trellis/workflow.md` and the matching phase Skill. The workflow and its task route define the business phase; task lifecycle status and artifact presence do not.\n2. If the breadcrumb is missing or stale, inspect the active task with `python3 ./.trellis/scripts/task.py current --json` and `python3 ./.trellis/scripts/task.py phase show <task>`.\n3. With no active task,
|
|
4
|
+
"prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn with the active task and its current phase. An `agentSpawn` hook injects a `<session-context>` overview when this agent starts. Use these to orient yourself; resolve missing or stale state through Trellis CLI.\n\n## How to Work\n\n1. Follow `.trellis/workflow.md` and the matching phase Skill. The workflow and its task route define the business phase; task lifecycle status and artifact presence do not.\n2. If the breadcrumb is missing or stale, inspect the active task with `python3 ./.trellis/scripts/task.py current --json` and `python3 ./.trellis/scripts/task.py phase show <task>`.\n3. With no active task, classify the request against the taskless contract first. If taskless is eligible, process and verify it directly. If you infer that a task is needed and the user did not explicitly request one, explain the gap, proposed owner/scope/route, and risk, then ask before running task.py create. An explicit request to create or resume a task authorizes that lifecycle action only; establish its baseline through Goal Exploration and Requirements Confirmation Phase.\n4. The Goal Exploration and Requirements Confirmation Phase requires the user's confirmation of the current requirements revision. Before Task Implementation and Test Verification Phase, both an accepted `implementation_contract` from Solution Design and Convergence Phase and separate implementation authorization are required. Delivery Review and On-Site Closeout Phase governs delivery acceptance, task completion, and cancellation.\n5. Use task artifacts and context manifests as required by the current route and any dispatched agent; do not require a fixed set of planning documents based only on task complexity.\n6. Verify with project checks appropriate to the changes before reporting completion.\n\n## Constraints\n\n- Do NOT run `git commit` / `git push` / `git merge` unless the user explicitly asks.\n- Keep changes scoped to the request.\n- Discover guidelines on demand: `python3 ./.trellis/scripts/get_context.py --mode packages`.\n",
|
|
5
5
|
"tools": [
|
|
6
6
|
"read",
|
|
7
7
|
"write",
|
|
@@ -31,6 +31,11 @@ def decision(payload: dict) -> dict | None:
|
|
|
31
31
|
records = list(directory.glob("*.json"))
|
|
32
32
|
if not records:
|
|
33
33
|
return None
|
|
34
|
+
for record in records:
|
|
35
|
+
try:
|
|
36
|
+
state = json.loads(record.read_text(encoding="utf-8"))
|
|
37
|
+
except (OSError, ValueError, TypeError):
|
|
38
|
+
continue
|
|
34
39
|
tool = str(payload.get("tool_name", "")).rsplit(".", 1)[-1]
|
|
35
40
|
if tool in {"write_stdin", "wait"}:
|
|
36
41
|
return None
|
|
@@ -301,6 +301,11 @@ def get_hooks(event: str, repo_root: Path | None = None) -> list[str]:
|
|
|
301
301
|
file=sys.stderr,
|
|
302
302
|
)
|
|
303
303
|
return []
|
|
304
|
+
if event == "after_complete" and "after_archive" in hooks:
|
|
305
|
+
print(
|
|
306
|
+
"[WARN] ignoring legacy hook `after_archive`; rename it to `after_complete` in config.yaml",
|
|
307
|
+
file=sys.stderr,
|
|
308
|
+
)
|
|
304
309
|
commands = hooks.get(event)
|
|
305
310
|
if commands is None:
|
|
306
311
|
return []
|
|
@@ -97,6 +97,65 @@ def _task(root: Path, task_path: str | None = None) -> tuple[Path, dict, str, st
|
|
|
97
97
|
return directory, data, task_id, active.context_key
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
def _submodule_facts(root: Path) -> list[dict]:
|
|
101
|
+
rc, output, _ = run_git(["submodule", "status", "--recursive"], cwd=root, timeout=20)
|
|
102
|
+
if rc:
|
|
103
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", "Git submodule status is unavailable")
|
|
104
|
+
facts = []
|
|
105
|
+
for line in output.splitlines():
|
|
106
|
+
if len(line) < 43:
|
|
107
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", "Git submodule status is malformed")
|
|
108
|
+
state, revision, relative_text = line[0], line[1:41], line[42:]
|
|
109
|
+
if " (" in relative_text:
|
|
110
|
+
relative_text = relative_text.rsplit(" (", 1)[0]
|
|
111
|
+
relative = Path(relative_text)
|
|
112
|
+
candidate = root / relative
|
|
113
|
+
try:
|
|
114
|
+
candidate.resolve(strict=True).relative_to(root.resolve())
|
|
115
|
+
except (OSError, ValueError) as error:
|
|
116
|
+
if state == "-" and not candidate.exists():
|
|
117
|
+
facts.append({"path": relative.as_posix(), "revision": revision, "state": "uninitialized"})
|
|
118
|
+
continue
|
|
119
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", f"submodule path is unavailable or unsafe: {relative}") from error
|
|
120
|
+
if state == "-":
|
|
121
|
+
facts.append({"path": relative.as_posix(), "revision": revision, "state": "uninitialized"})
|
|
122
|
+
continue
|
|
123
|
+
if not candidate.is_dir():
|
|
124
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", f"submodule path is not a directory: {relative}")
|
|
125
|
+
rc, head, _ = run_git(["rev-parse", "HEAD"], cwd=candidate, timeout=5)
|
|
126
|
+
rc_status, status, _ = run_git(["status", "--porcelain=v1", "--untracked-files=all"], cwd=candidate, timeout=10)
|
|
127
|
+
rc_diff, diff, _ = run_git(["diff", "--binary", "HEAD", "--", "."], cwd=candidate, timeout=20)
|
|
128
|
+
rc_untracked, untracked, _ = run_git(["ls-files", "--others", "--exclude-standard", "-z"], cwd=candidate, timeout=10)
|
|
129
|
+
if any((rc, rc_status, rc_diff, rc_untracked)):
|
|
130
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", f"submodule worktree is unavailable: {relative}")
|
|
131
|
+
digest = hashlib.sha256(diff.encode("utf-8", errors="surrogateescape"))
|
|
132
|
+
for raw_path in sorted(os.fsencode(path) for path in untracked.split("\0") if path):
|
|
133
|
+
path = candidate / Path(os.fsdecode(raw_path))
|
|
134
|
+
try:
|
|
135
|
+
path.resolve(strict=True).relative_to(candidate.resolve())
|
|
136
|
+
if path.is_symlink():
|
|
137
|
+
content = os.fsencode(os.readlink(path))
|
|
138
|
+
elif path.is_file():
|
|
139
|
+
content = path.read_bytes()
|
|
140
|
+
else:
|
|
141
|
+
raise OSError("not a regular file or symbolic link")
|
|
142
|
+
except (OSError, ValueError) as error:
|
|
143
|
+
raise ContinuityError("TASK_CONTINUITY_WITHHELD", f"submodule untracked path is unavailable or unsafe: {relative / path.name}") from error
|
|
144
|
+
digest.update(raw_path)
|
|
145
|
+
digest.update(b"\0")
|
|
146
|
+
digest.update(content)
|
|
147
|
+
digest.update(b"\0")
|
|
148
|
+
facts.append({
|
|
149
|
+
"path": relative.as_posix(),
|
|
150
|
+
"revision": revision,
|
|
151
|
+
"head": head.strip(),
|
|
152
|
+
"state": state,
|
|
153
|
+
"status_digest": hashlib.sha256(status.encode("utf-8")).hexdigest(),
|
|
154
|
+
"content_digest": digest.hexdigest(),
|
|
155
|
+
})
|
|
156
|
+
return facts
|
|
157
|
+
|
|
158
|
+
|
|
100
159
|
def _projection(root: Path, directory: Path, data: dict, task_id: str) -> dict:
|
|
101
160
|
meta = data.get("meta")
|
|
102
161
|
if not isinstance(meta, dict):
|
|
@@ -178,6 +237,8 @@ def _projection(root: Path, directory: Path, data: dict, task_id: str) -> dict:
|
|
|
178
237
|
worktree.update(b"\0")
|
|
179
238
|
worktree.update(content)
|
|
180
239
|
worktree.update(b"\0")
|
|
240
|
+
submodules = _submodule_facts(root)
|
|
241
|
+
worktree.update(json.dumps(submodules, ensure_ascii=False, sort_keys=True, separators=(",", ":")).encode("utf-8"))
|
|
181
242
|
evidence_digest = hashlib.sha256(
|
|
182
243
|
json.dumps(sorted(evidence), ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
|
183
244
|
).hexdigest()
|
|
@@ -191,6 +252,7 @@ def _projection(root: Path, directory: Path, data: dict, task_id: str) -> dict:
|
|
|
191
252
|
"clean": not status,
|
|
192
253
|
"status_digest": hashlib.sha256(status.encode("utf-8")).hexdigest(),
|
|
193
254
|
"content_digest": worktree.hexdigest(),
|
|
255
|
+
"submodules": submodules,
|
|
194
256
|
},
|
|
195
257
|
}
|
|
196
258
|
|
|
@@ -55,6 +55,15 @@ from .task_utils import (
|
|
|
55
55
|
)
|
|
56
56
|
from .workflow_selection import DIR_WORKFLOWS, WORKFLOW_ID_RE
|
|
57
57
|
|
|
58
|
+
RESERVED_META_KEYS = {
|
|
59
|
+
"task_workflow",
|
|
60
|
+
"delegation_authorizations",
|
|
61
|
+
"delegated_worktree_execution_history",
|
|
62
|
+
"delegated_worktree_execution_record",
|
|
63
|
+
"task_cancellation",
|
|
64
|
+
"task_lifecycle_recoveries",
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
|
|
59
68
|
# =============================================================================
|
|
60
69
|
# Helper Functions
|
|
@@ -248,6 +257,9 @@ def _parse_meta_pairs(pairs: list[str] | None) -> dict[str, str] | None:
|
|
|
248
257
|
file=sys.stderr,
|
|
249
258
|
)
|
|
250
259
|
return None
|
|
260
|
+
if key in RESERVED_META_KEYS:
|
|
261
|
+
print(colored(f"Error: metadata key is managed by Trellis: {key}", Colors.RED), file=sys.stderr)
|
|
262
|
+
return None
|
|
251
263
|
meta[key] = value
|
|
252
264
|
return meta
|
|
253
265
|
|
|
@@ -1427,6 +1439,10 @@ def cmd_set_meta(args: argparse.Namespace) -> int:
|
|
|
1427
1439
|
key = args.key
|
|
1428
1440
|
value = args.value
|
|
1429
1441
|
|
|
1442
|
+
if key in RESERVED_META_KEYS:
|
|
1443
|
+
print(colored(f"Error: metadata key is managed by Trellis: {key}", Colors.RED), file=sys.stderr)
|
|
1444
|
+
return 1
|
|
1445
|
+
|
|
1430
1446
|
if not key:
|
|
1431
1447
|
print(colored("Error: Missing arguments", Colors.RED))
|
|
1432
1448
|
print("Usage: python3 task.py set-meta <task-dir> <key> <value>")
|
|
@@ -110,6 +110,28 @@ def _state(meta: dict) -> dict:
|
|
|
110
110
|
raise TaskWorkflowError("TASK_PHASE_TASK_INVALID", "route dependency admission has an invalid shape")
|
|
111
111
|
if state.get("current_phase_id") is not None and state["current_phase_id"] not in state["phase_ids"]:
|
|
112
112
|
raise TaskWorkflowError("TASK_PHASE_TASK_INVALID", "current phase is not in the task route")
|
|
113
|
+
skip_records = state.get("skip_records")
|
|
114
|
+
if not isinstance(skip_records, dict):
|
|
115
|
+
raise TaskWorkflowError("TASK_PHASE_TASK_INVALID", "task phase skip records have an invalid shape")
|
|
116
|
+
for phase_id, skip in skip_records.items():
|
|
117
|
+
if (
|
|
118
|
+
phase_id not in PHASE_ID_SET
|
|
119
|
+
or not isinstance(skip, dict)
|
|
120
|
+
or not isinstance(skip.get("reason"), str)
|
|
121
|
+
or not skip["reason"].strip()
|
|
122
|
+
or not isinstance(skip.get("evidence_refs"), list)
|
|
123
|
+
or not skip["evidence_refs"]
|
|
124
|
+
or any(not isinstance(value, str) or not value.strip() for value in skip["evidence_refs"])
|
|
125
|
+
or skip.get("task_route_revision") != state["task_route_revision"]
|
|
126
|
+
or not ROUTE_REVISION.fullmatch(str(skip.get("input_revision", "")))
|
|
127
|
+
or not isinstance(skip.get("artifact_revision"), str)
|
|
128
|
+
or not re.fullmatch(r"[a-f0-9]{64}", skip["artifact_revision"])
|
|
129
|
+
or (
|
|
130
|
+
phase_id in state["phases"]
|
|
131
|
+
and skip["artifact_revision"] != state["phases"][phase_id].get("artifact_revision")
|
|
132
|
+
)
|
|
133
|
+
):
|
|
134
|
+
raise TaskWorkflowError("TASK_PHASE_TASK_INVALID", f"task phase skip record is invalid: {phase_id}")
|
|
113
135
|
for phase_id in state["phase_ids"]:
|
|
114
136
|
record = state["phases"].get(phase_id)
|
|
115
137
|
if not isinstance(record, dict) or record.get("status") not in {"not_started", "active", "waiting_user", "blocked", "accepted", "skipped"}:
|
|
@@ -254,6 +276,7 @@ def _is_withdrawal_route(state: dict) -> bool:
|
|
|
254
276
|
and isinstance(withdrawal.get("from"), str)
|
|
255
277
|
and withdrawal["from"] in PHASE_ID_SET
|
|
256
278
|
and withdrawal.get("to") == PHASE_IDS[4]
|
|
279
|
+
and withdrawal.get("return_kind") == "withdrawal"
|
|
257
280
|
and withdrawal.get("task_route_revision") == state.get("task_route_revision")
|
|
258
281
|
and isinstance(withdrawal.get("evidence_refs"), list)
|
|
259
282
|
and bool(withdrawal["evidence_refs"])
|
|
@@ -389,6 +412,8 @@ def _validate_classification(task_kind: str | None, complexity: str | None, proj
|
|
|
389
412
|
raise TaskWorkflowError("TASK_PHASE_INVALID_INPUT", "--project-context must be new or existing")
|
|
390
413
|
if task_kind == "analysis" and PHASE_IDS[3] in phases:
|
|
391
414
|
raise TaskWorkflowError("TASK_PHASE_INVALID_ROUTE", "analysis tasks cannot include the Task Implementation and Test Verification Phase")
|
|
415
|
+
if task_kind in {"implementation", "combined"} and PHASE_IDS[3] not in phases:
|
|
416
|
+
raise TaskWorkflowError("TASK_PHASE_INVALID_ROUTE", "implementation and combined tasks must include the Task Implementation and Test Verification Phase")
|
|
392
417
|
|
|
393
418
|
|
|
394
419
|
def _increment(value: str, allow_zero: bool = False) -> str:
|
|
@@ -441,7 +466,13 @@ def _init(args: argparse.Namespace, task_dir: Path, data: dict, meta: dict) -> i
|
|
|
441
466
|
"implementation_authorization": None,
|
|
442
467
|
"closeout_disposition": None,
|
|
443
468
|
"skip_records": {
|
|
444
|
-
phase: {
|
|
469
|
+
phase: {
|
|
470
|
+
"reason": route_reason,
|
|
471
|
+
"evidence_refs": route_evidence,
|
|
472
|
+
"task_route_revision": "1",
|
|
473
|
+
"input_revision": input_revision,
|
|
474
|
+
"artifact_revision": _phase_record(input_revision)["artifact_revision"],
|
|
475
|
+
}
|
|
445
476
|
for phase in omitted
|
|
446
477
|
},
|
|
447
478
|
"return_record": None,
|
|
@@ -549,7 +580,13 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
549
580
|
if current == PHASE_IDS[0]:
|
|
550
581
|
raise TaskWorkflowError("TASK_PHASE_INVALID_TRANSITION", "The Goal Exploration and Requirements Confirmation Phase must reach minimum alignment and acceptance and cannot be skipped")
|
|
551
582
|
record.update({"status": "skipped", "reason": reason, "evidence_refs": evidence})
|
|
552
|
-
state["skip_records"][current] = {
|
|
583
|
+
state["skip_records"][current] = {
|
|
584
|
+
"reason": reason,
|
|
585
|
+
"evidence_refs": evidence,
|
|
586
|
+
"task_route_revision": state["task_route_revision"],
|
|
587
|
+
"input_revision": state["input_revision"],
|
|
588
|
+
"artifact_revision": record["artifact_revision"],
|
|
589
|
+
}
|
|
553
590
|
_advance(state, current)
|
|
554
591
|
elif action == "accept":
|
|
555
592
|
_require_current_accepted_artifacts(task_dir, state)
|
|
@@ -660,6 +697,7 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
660
697
|
target == PHASE_IDS[4]
|
|
661
698
|
and phases == [PHASE_IDS[0], PHASE_IDS[4]]
|
|
662
699
|
and bool(evidence)
|
|
700
|
+
and args.return_kind == "withdrawal"
|
|
663
701
|
)
|
|
664
702
|
if not changed and not classification_changed and target == current and not reviewed_delivery:
|
|
665
703
|
raise TaskWorkflowError("TASK_PHASE_INVALID_ROUTE", "the updated route and target are unchanged")
|
|
@@ -702,12 +740,24 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
702
740
|
if phase_id not in old_phases:
|
|
703
741
|
phase_record["input_revision"] = state["input_revision"]
|
|
704
742
|
state["skip_records"] = {
|
|
705
|
-
phase_id: {
|
|
743
|
+
phase_id: {
|
|
744
|
+
**skip,
|
|
745
|
+
"task_route_revision": state["task_route_revision"],
|
|
746
|
+
"input_revision": state["input_revision"],
|
|
747
|
+
"artifact_revision": state["phases"][phase_id]["artifact_revision"],
|
|
748
|
+
}
|
|
706
749
|
for phase_id, skip in state["skip_records"].items()
|
|
707
750
|
if phase_id in phases and state["phases"][phase_id].get("status") == "skipped"
|
|
708
751
|
}
|
|
709
752
|
for phase_id in omitted:
|
|
710
|
-
state["
|
|
753
|
+
phase_record = state["phases"].get(phase_id, old_phases.get(phase_id, _phase_record(state["input_revision"])))
|
|
754
|
+
state["skip_records"][phase_id] = {
|
|
755
|
+
"reason": reason,
|
|
756
|
+
"evidence_refs": evidence,
|
|
757
|
+
"task_route_revision": state["task_route_revision"],
|
|
758
|
+
"input_revision": state["input_revision"],
|
|
759
|
+
"artifact_revision": phase_record["artifact_revision"],
|
|
760
|
+
}
|
|
711
761
|
if withdrawal_route and state["phases"][PHASE_IDS[0]].get("status") != "accepted":
|
|
712
762
|
state["phases"][PHASE_IDS[0]].update({
|
|
713
763
|
"status": "skipped",
|
|
@@ -721,6 +771,8 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
721
771
|
"reason": reason,
|
|
722
772
|
"evidence_refs": evidence,
|
|
723
773
|
"task_route_revision": state["task_route_revision"],
|
|
774
|
+
"input_revision": state["input_revision"],
|
|
775
|
+
"artifact_revision": state["phases"][PHASE_IDS[0]]["artifact_revision"],
|
|
724
776
|
}
|
|
725
777
|
state["implementation_authorization"] = None
|
|
726
778
|
state["closeout_disposition"] = None
|
|
@@ -728,6 +780,7 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
728
780
|
state["return_record"] = {
|
|
729
781
|
"from": current,
|
|
730
782
|
"to": target,
|
|
783
|
+
**({"return_kind": "withdrawal"} if withdrawal_route else {}),
|
|
731
784
|
"reason": reason,
|
|
732
785
|
"evidence_refs": evidence,
|
|
733
786
|
"task_route_revision": state["task_route_revision"],
|
|
@@ -247,6 +247,11 @@ def cmd_start(args: argparse.Namespace) -> int:
|
|
|
247
247
|
return 1
|
|
248
248
|
|
|
249
249
|
task_json_path = full_path / FILE_TASK_JSON
|
|
250
|
+
if task_json_path.is_file():
|
|
251
|
+
task_data, _ = read_json_checked(task_json_path)
|
|
252
|
+
if task_data is not None and task_data.get("status") in {"completed", "cancelled"}:
|
|
253
|
+
print(colored(f"TASK_PHASE_TASK_TERMINAL: task is already {task_data['status']}", Colors.RED), file=sys.stderr)
|
|
254
|
+
return 1
|
|
250
255
|
|
|
251
256
|
if not resolve_context_key():
|
|
252
257
|
# Degraded mode: no session identity available.
|
|
@@ -783,7 +788,7 @@ def main() -> int:
|
|
|
783
788
|
p_phase.add_argument("--route-reason", help="Reason when initialization omits one or more phases")
|
|
784
789
|
p_phase.add_argument("--route-evidence-ref", action="append", help="Evidence supporting an abbreviated initial route")
|
|
785
790
|
p_phase.add_argument("--target-phase", help="Earlier phase to revisit, or first affected phase for route change")
|
|
786
|
-
p_phase.add_argument("--return-kind", choices=("contract_change", "execution_rework"), default="contract_change", help="
|
|
791
|
+
p_phase.add_argument("--return-kind", choices=("contract_change", "execution_rework", "withdrawal"), default="contract_change", help="Classify a return or explicitly record user withdrawal")
|
|
787
792
|
p_phase.add_argument("--artifact-ref", action="append", help="Task-relative file in the current phase output")
|
|
788
793
|
p_phase.add_argument("--artifact-revision", help="Current artifact_revision required for acceptance")
|
|
789
794
|
p_phase.add_argument("--result-ref", help="Task result artifact reference")
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
1. 保持下表列出的业务阶段各自独立。每个阶段都有自己的活动、产物、接受条件和回流路径。
|
|
6
6
|
2. 任务与阶段事实由 Trellis CLI 管理。Skills、Hooks、Teamwork、Paseo 和其他组件按各自职责提供指引、证据或执行能力。
|
|
7
|
-
3.
|
|
7
|
+
3. 采用满足任务风险和验收需要的最小流程。可以基于证据跳过阶段;目标清楚、责任方单一、范围封闭、风险受控、已获授权、能在当前会话立即验证且不需要持久路线、协调、设计、审查、发布、安装、迁移或外部交付的请求可以不创建 Trellis task。不可逆动作还必须有精确对象核验、可接受的恢复或损失边界和停止条件;用户授权不是唯一充分条件。
|
|
8
8
|
4. 在任务资产中记录决定和当前证据。不得从阶段状态、Teamwork 结果或会话交接状态推断任务状态。
|
|
9
9
|
|
|
10
10
|
## Trellis 项目上下文
|
|
@@ -74,7 +74,7 @@ python3 ./.trellis/scripts/add_session.py --title "<title>" --summary "<summary>
|
|
|
74
74
|
```mermaid
|
|
75
75
|
flowchart LR
|
|
76
76
|
request["用户请求"] --> triage{"是否需要 Trellis task?"}
|
|
77
|
-
triage -->|"
|
|
77
|
+
triage -->|"否;目标/范围清楚、风险受控、已授权、可立即验证且无需持久治理"| direct["直接处理并验证"]
|
|
78
78
|
triage -->|"是"| goal_exploration_and_requirements["目标探索与需求核对阶段"]
|
|
79
79
|
goal_exploration_and_requirements -->|"当前基线已获用户确认"| decision_space_construction_and_merging["决策空间构造与归并阶段"]
|
|
80
80
|
decision_space_construction_and_merging -->|"已接受或有证据的跳过记录"| solution_design_and_convergence["解决方案设计与收敛阶段"]
|
|
@@ -88,7 +88,7 @@ flowchart LR
|
|
|
88
88
|
<!-- 宿主 Hook 从以下区块读取每轮工作流提示。 -->
|
|
89
89
|
|
|
90
90
|
[workflow-state:no_task]
|
|
91
|
-
|
|
91
|
+
先按 taskless 合同判断目标、责任方、范围、风险、授权、立即验证和持久治理需要。全部满足时直接处理并验证,不创建 task;不可逆动作还要核验精确对象、恢复或损失边界和停止条件。若模型判断需要任务而用户没有明确要求创建,先说明不满足的门槛、任务 owner/范围/路线和不建任务的风险,向用户申请后再调用 create。用户明确要求创建或恢复任务时复用该创建授权。创建任务不代表获准实施。
|
|
92
92
|
[/workflow-state:no_task]
|
|
93
93
|
|
|
94
94
|
[workflow-state:task_error]
|