harnessed 5.0.5 → 5.0.7
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/CHANGELOG.md +3193 -0
- package/README-en.md +10 -1
- package/README-zh.md +10 -1
- package/README.md +10 -1
- package/bin/harnessed-check-docs.mjs +1 -0
- package/bin/harnessed-inject-state.mjs +57 -9
- package/bin/harnessed-stop-hook.mjs +51 -9
- package/bin/harnessed-update-reminder-worker.mjs +3 -1
- package/bin/harnessed-update-reminder.mjs +3 -1
- package/dist/cli.mjs +2960 -585
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/schemas/index.mjs +53 -1
- package/dist/schemas/index.mjs.map +1 -1
- package/manifests/optional/codegraph.yaml +2 -0
- package/manifests/skill-packs/gsd.yaml +23 -3
- package/manifests/skill-packs/mattpocock-skills.yaml +93 -3
- package/manifests/tools/playwright-cli.yaml +4 -0
- package/messages/en.json +1 -0
- package/messages/zh-Hans.json +3 -2
- package/package.json +3 -1
- package/schemas/manifest.v1.schema.json +191 -0
- package/workflows/auto/SKILL.md +1 -1
- package/workflows/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/defaults.yaml +12 -0
- package/workflows/discuss/phase/SKILL.md +1 -1
- package/workflows/discuss/phase/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/subtask/SKILL.md +1 -1
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +1 -1
- package/workflows/plan/ai-integration/SKILL.md +39 -0
- package/workflows/plan/ai-integration/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/ai-integration/workflow.yaml +12 -0
- package/workflows/plan/auto/workflow.yaml +22 -2
- package/workflows/plan/phase/SKILL.md +2 -2
- package/workflows/plan/phase/SKILL.zh-Hans.md +2 -2
- package/workflows/plan/secure/SKILL.md +39 -0
- package/workflows/plan/secure/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/secure/workflow.yaml +12 -0
- package/workflows/plan/spec/SKILL.md +39 -0
- package/workflows/plan/spec/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/spec/workflow.yaml +12 -0
- package/workflows/plan/ui/SKILL.md +39 -0
- package/workflows/plan/ui/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/ui/workflow.yaml +12 -0
- package/workflows/role-prompts.yaml +36 -6
- package/workflows/role-prompts.zh-Hans.yaml +36 -6
- package/workflows/ship/auto/SKILL.md +2 -1
- package/workflows/ship/auto/SKILL.zh-Hans.md +2 -1
- package/workflows/task/clarify/SKILL.md +2 -2
- package/workflows/task/clarify/SKILL.zh-Hans.md +2 -2
- package/workflows/task/code/SKILL.md +1 -1
- package/workflows/task/code/SKILL.zh-Hans.md +1 -1
- package/workflows/task/deliver/SKILL.md +1 -1
- package/workflows/task/deliver/SKILL.zh-Hans.md +1 -1
- package/workflows/task/test/SKILL.md +1 -1
- package/workflows/task/test/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/auto/SKILL.md +1 -1
- package/workflows/verify/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/design/SKILL.md +1 -1
- package/workflows/verify/design/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/progress/SKILL.md +1 -1
- package/workflows/verify/progress/SKILL.zh-Hans.md +1 -1
|
@@ -1343,6 +1343,197 @@
|
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
+
},
|
|
1347
|
+
"ownership": {
|
|
1348
|
+
"additionalProperties": false,
|
|
1349
|
+
"type": "object",
|
|
1350
|
+
"required": [
|
|
1351
|
+
"resources"
|
|
1352
|
+
],
|
|
1353
|
+
"properties": {
|
|
1354
|
+
"resources": {
|
|
1355
|
+
"minItems": 1,
|
|
1356
|
+
"type": "array",
|
|
1357
|
+
"items": {
|
|
1358
|
+
"anyOf": [
|
|
1359
|
+
{
|
|
1360
|
+
"additionalProperties": false,
|
|
1361
|
+
"type": "object",
|
|
1362
|
+
"required": [
|
|
1363
|
+
"root",
|
|
1364
|
+
"kind",
|
|
1365
|
+
"selector",
|
|
1366
|
+
"marker"
|
|
1367
|
+
],
|
|
1368
|
+
"properties": {
|
|
1369
|
+
"root": {
|
|
1370
|
+
"anyOf": [
|
|
1371
|
+
{
|
|
1372
|
+
"const": "platform-skills",
|
|
1373
|
+
"type": "string"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"const": "native-home",
|
|
1377
|
+
"type": "string"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"const": "host-agents",
|
|
1381
|
+
"type": "string"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"const": "host-commands",
|
|
1385
|
+
"type": "string"
|
|
1386
|
+
}
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
"kind": {
|
|
1390
|
+
"const": "directory",
|
|
1391
|
+
"type": "string"
|
|
1392
|
+
},
|
|
1393
|
+
"selector": {
|
|
1394
|
+
"anyOf": [
|
|
1395
|
+
{
|
|
1396
|
+
"additionalProperties": false,
|
|
1397
|
+
"type": "object",
|
|
1398
|
+
"required": [
|
|
1399
|
+
"names"
|
|
1400
|
+
],
|
|
1401
|
+
"properties": {
|
|
1402
|
+
"names": {
|
|
1403
|
+
"minItems": 1,
|
|
1404
|
+
"uniqueItems": true,
|
|
1405
|
+
"type": "array",
|
|
1406
|
+
"items": {
|
|
1407
|
+
"minLength": 1,
|
|
1408
|
+
"type": "string"
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"additionalProperties": false,
|
|
1415
|
+
"type": "object",
|
|
1416
|
+
"required": [
|
|
1417
|
+
"prefix"
|
|
1418
|
+
],
|
|
1419
|
+
"properties": {
|
|
1420
|
+
"prefix": {
|
|
1421
|
+
"minLength": 1,
|
|
1422
|
+
"type": "string"
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
]
|
|
1427
|
+
},
|
|
1428
|
+
"marker": {
|
|
1429
|
+
"additionalProperties": false,
|
|
1430
|
+
"type": "object",
|
|
1431
|
+
"required": [
|
|
1432
|
+
"path",
|
|
1433
|
+
"contains"
|
|
1434
|
+
],
|
|
1435
|
+
"properties": {
|
|
1436
|
+
"path": {
|
|
1437
|
+
"minLength": 1,
|
|
1438
|
+
"pattern": "^(?!/)(?![A-Za-z]:/)(?!.*//)(?!.*(?:^|/)(?:\\.|\\.\\.)(?:/|$))[^\\\\]+$",
|
|
1439
|
+
"type": "string"
|
|
1440
|
+
},
|
|
1441
|
+
"contains": {
|
|
1442
|
+
"minLength": 1,
|
|
1443
|
+
"type": "string"
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"additionalProperties": false,
|
|
1451
|
+
"type": "object",
|
|
1452
|
+
"required": [
|
|
1453
|
+
"root",
|
|
1454
|
+
"kind",
|
|
1455
|
+
"selector",
|
|
1456
|
+
"marker"
|
|
1457
|
+
],
|
|
1458
|
+
"properties": {
|
|
1459
|
+
"root": {
|
|
1460
|
+
"anyOf": [
|
|
1461
|
+
{
|
|
1462
|
+
"const": "platform-skills",
|
|
1463
|
+
"type": "string"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"const": "native-home",
|
|
1467
|
+
"type": "string"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"const": "host-agents",
|
|
1471
|
+
"type": "string"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"const": "host-commands",
|
|
1475
|
+
"type": "string"
|
|
1476
|
+
}
|
|
1477
|
+
]
|
|
1478
|
+
},
|
|
1479
|
+
"kind": {
|
|
1480
|
+
"const": "file",
|
|
1481
|
+
"type": "string"
|
|
1482
|
+
},
|
|
1483
|
+
"selector": {
|
|
1484
|
+
"anyOf": [
|
|
1485
|
+
{
|
|
1486
|
+
"additionalProperties": false,
|
|
1487
|
+
"type": "object",
|
|
1488
|
+
"required": [
|
|
1489
|
+
"names"
|
|
1490
|
+
],
|
|
1491
|
+
"properties": {
|
|
1492
|
+
"names": {
|
|
1493
|
+
"minItems": 1,
|
|
1494
|
+
"uniqueItems": true,
|
|
1495
|
+
"type": "array",
|
|
1496
|
+
"items": {
|
|
1497
|
+
"minLength": 1,
|
|
1498
|
+
"type": "string"
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"additionalProperties": false,
|
|
1505
|
+
"type": "object",
|
|
1506
|
+
"required": [
|
|
1507
|
+
"prefix"
|
|
1508
|
+
],
|
|
1509
|
+
"properties": {
|
|
1510
|
+
"prefix": {
|
|
1511
|
+
"minLength": 1,
|
|
1512
|
+
"type": "string"
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
"marker": {
|
|
1519
|
+
"additionalProperties": false,
|
|
1520
|
+
"type": "object",
|
|
1521
|
+
"required": [
|
|
1522
|
+
"contains"
|
|
1523
|
+
],
|
|
1524
|
+
"properties": {
|
|
1525
|
+
"contains": {
|
|
1526
|
+
"minLength": 1,
|
|
1527
|
+
"type": "string"
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
]
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1346
1537
|
}
|
|
1347
1538
|
}
|
|
1348
1539
|
}
|
package/workflows/auto/SKILL.md
CHANGED
|
@@ -125,7 +125,7 @@ Do NOT pipe to `harnessed run auto` — that is the CI/headless path ({{ host.ha
|
|
|
125
125
|
{{ host.teams_step_note.skill }}
|
|
126
126
|
{{ host.teams_teardown_note }}
|
|
127
127
|
5. Otherwise, for each fired sub in `order` (serial subs sequentially, parallel subs concurrently):
|
|
128
|
-
- **If the entry has `is_master: true`** (a stage master — e.g. `/auto` firing `plan`/`task`/`verify`): do NOT prompt+spawn it. RECURSE: run that master’s own `harnessed facts <sub> --out .harnessed-facts.json` (fill the nulls) → `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → repeat this loop for ITS fired subs.
|
|
128
|
+
- **If the entry has `is_master: true`** (a stage master — e.g. `/auto` firing `plan`/`task`/`verify`): do NOT prompt+spawn it. RECURSE: run that master’s own `harnessed facts <sub> --out .harnessed-facts.json` (fill the nulls) → `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → repeat this loop for ITS fired subs. The nested `checkpoint start` expands that parent entry inside the existing root ledger; it must not replace the root workflow owner, timestamps, checkpoint path, or sibling entries.
|
|
129
129
|
- **Else (leaf sub):**
|
|
130
130
|
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → parse `{prompt, max_iterations, model}`.
|
|
131
131
|
b. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
@@ -123,7 +123,7 @@ Sister `workflows/capabilities.yaml`:
|
|
|
123
123
|
{{ host.teams_step_note.skill }}
|
|
124
124
|
{{ host.teams_teardown_note }}
|
|
125
125
|
5. 否则,对 `order` 里每个 fired sub(serial 串行、parallel 并发):
|
|
126
|
-
- **若该项 `is_master: true`**(本身是 stage master —— 如 `/auto` fire `plan`/`task`/`verify`):**不要**直接 prompt+spawn。RECURSE:跑该 master 自己的 `harnessed facts <sub> --out .harnessed-facts.json`(填完 null)→ `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → 对它的 fired subs 重复本循环。
|
|
126
|
+
- **若该项 `is_master: true`**(本身是 stage master —— 如 `/auto` fire `plan`/`task`/`verify`):**不要**直接 prompt+spawn。RECURSE:跑该 master 自己的 `harnessed facts <sub> --out .harnessed-facts.json`(填完 null)→ `harnessed gates <sub> --task "<spec>" --context-file .harnessed-facts.json --skip-sub discuss` → `harnessed checkpoint start <sub> --plan '<json>'` → 对它的 fired subs 重复本循环。nested `checkpoint start` 会在现有 root ledger 内展开 parent entry;不得替换 root workflow owner、时间戳、checkpoint path 或 sibling entries。
|
|
127
127
|
- **否则(leaf sub):**
|
|
128
128
|
a. Bash: `harnessed prompt <sub> --task "<spec>" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
129
129
|
b. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
package/workflows/defaults.yaml
CHANGED
|
@@ -45,6 +45,18 @@ ralph_max_iterations:
|
|
|
45
45
|
plan-architecture:
|
|
46
46
|
01-plan-eng-review: 3
|
|
47
47
|
|
|
48
|
+
plan-spec:
|
|
49
|
+
01-spec-phase: 5
|
|
50
|
+
|
|
51
|
+
plan-ui:
|
|
52
|
+
01-ui-phase: 5
|
|
53
|
+
|
|
54
|
+
plan-secure:
|
|
55
|
+
01-secure-phase: 5
|
|
56
|
+
|
|
57
|
+
plan-ai-integration:
|
|
58
|
+
01-ai-integration-phase: 5
|
|
59
|
+
|
|
48
60
|
plan-phase:
|
|
49
61
|
01-gsd-plan: 5
|
|
50
62
|
02-persist: 5
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
implementation decisions / 跨 phase API contract 不清 / phase scope > 1 day / 灰色地带)。
|
|
6
6
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
7
7
|
(gsd-discuss-phase + planning-with-files) + 2 phases (01-gsd-discuss + 02-persist findings.md
|
|
8
|
-
+ knowledge.md)。Triggered by
|
|
8
|
+
+ knowledge.md)。Triggered by headless CLI `harnessed run discuss-phase` or slash
|
|
9
9
|
command `/discuss-phase` after `harnessed setup`.
|
|
10
10
|
trigger_phrases:
|
|
11
11
|
- "discuss phase"
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
实现决策 / 跨 phase API contract 不清 / phase scope > 1 天 / 灰色地带)。
|
|
6
6
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
7
7
|
(gsd-discuss-phase + planning-with-files) + 2 phases(01-gsd-discuss + 02-persist findings.md
|
|
8
|
-
+ knowledge.md)。Triggered by
|
|
8
|
+
+ knowledge.md)。Triggered by headless CLI `harnessed run discuss-phase` or slash
|
|
9
9
|
command `/discuss-phase` after `harnessed setup`.
|
|
10
10
|
trigger_phrases:
|
|
11
11
|
- "discuss phase"
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
API contract / 错误成本高)。schema_version: harnessed.workflow.v3 with disciplines_applied (6
|
|
6
6
|
default) + tools_available (superpowers-brainstorming + grill-with-docs + grill-me) + 1 phase
|
|
7
7
|
(01-brainstorm with conditional invokes_tools for spec_ambiguous + no_docs)。Triggered by
|
|
8
|
-
|
|
8
|
+
headless CLI `harnessed run discuss-subtask` or slash command `/discuss-subtask`
|
|
9
9
|
after `harnessed setup`.
|
|
10
10
|
trigger_phrases:
|
|
11
11
|
- "discuss subtask"
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
API contract / 错误成本高)。schema_version: harnessed.workflow.v3 with disciplines_applied (6
|
|
6
6
|
default) + tools_available (superpowers-brainstorming + grill-with-docs + grill-me) + 1 phase
|
|
7
7
|
(01-brainstorm,含 spec_ambiguous + no_docs 条件调用 invokes_tools)。Triggered by
|
|
8
|
-
|
|
8
|
+
headless CLI `harnessed run discuss-subtask` or slash command `/discuss-subtask`
|
|
9
9
|
after `harnessed setup`.
|
|
10
10
|
trigger_phrases:
|
|
11
11
|
- "discuss subtask"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-ai-integration
|
|
3
|
+
description: Run the conditional GSD ai-integration-phase AI-SPEC contract before plan-phase.
|
|
4
|
+
trigger_phrases: ["plan ai integration", "gsd ai integration phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-ai-integration workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Run `harnessed prompt plan-ai-integration --task "$ARGUMENTS" --json`, execute `/gsd-ai-integration-phase`, then complete the registered checkpoint with verifiable output.
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
Fires only when `phase.builds_ai_system == true`.
|
|
16
|
+
|
|
17
|
+
## How to invoke
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-ai-integration`
|
|
20
|
+
|
|
21
|
+
> The banner above (when present) means this invocation is REGISTERED with the engine (an intent marker) — not yet compliant: the steps below (prompt → spawn → checkpoint complete) resolve it, and a per-turn `<workflow-intent>` reminder persists until they run.
|
|
22
|
+
|
|
23
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
24
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
25
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
26
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
27
|
+
|
|
28
|
+
Do NOT pipe to `harnessed run plan-ai-integration` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
29
|
+
|
|
30
|
+
1. Bash: `harnessed prompt plan-ai-integration --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
31
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
32
|
+
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete plan-ai-integration --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
33
|
+
- if it blocks, run `harnessed checkpoint fail plan-ai-integration --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
34
|
+
- respawn ONLY while none of those three has fired. Any one of them means stop: re-scope the subtask, fix the blocker, or escalate to the user. Never respawn past a stop directive.
|
|
35
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
36
|
+
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete plan-ai-integration --result-file <path> --summary "<one-line>"`. Fail-CLOSED — it blocks unless every declared `artifacts_expected` file exists, the TDD boundary passes (non-empty evidence / both the red and green sides present / the test file was not deleted), and the result carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
37
|
+
5. If the complete gate blocked: Bash `harnessed checkpoint fail plan-ai-integration --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. Respawn ONLY while none of those three has fired; any one of them means STOP — re-scope the subtask, fix the blocker, or escalate to the user.
|
|
38
|
+
|
|
39
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-ai-integration
|
|
3
|
+
description: 在 plan-phase 前按条件运行 GSD ai-integration-phase AI-SPEC 契约。
|
|
4
|
+
trigger_phrases: ["plan ai integration", "gsd ai integration phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-ai-integration workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
运行 `harnessed prompt plan-ai-integration --task "$ARGUMENTS" --json`,执行 `/gsd-ai-integration-phase`,再用可验证输出完成已登记 checkpoint。
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
仅当 `phase.builds_ai_system == true` 时触发。
|
|
16
|
+
|
|
17
|
+
## 如何调用
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-ai-integration`
|
|
20
|
+
|
|
21
|
+
> 上方 banner(如出现)表示本次调用已在引擎**登记**(intent 标记)——尚未合规:按下方步骤(prompt → spawn → checkpoint complete)完成即解除;在此之前每 turn 会持续注入 `<workflow-intent>` 提醒。
|
|
22
|
+
|
|
23
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
24
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
25
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
26
|
+
|
|
27
|
+
**不要** pipe 到 `harnessed run plan-ai-integration` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
28
|
+
|
|
29
|
+
1. Bash: `harnessed prompt plan-ai-integration --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
30
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
31
|
+
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete plan-ai-integration --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
32
|
+
- 若被拦下,跑 `harnessed checkpoint fail plan-ai-integration --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
33
|
+
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
34
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
35
|
+
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete plan-ai-integration --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
36
|
+
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail plan-ai-integration --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
37
|
+
|
|
38
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema_version: harnessed.workflow.v3
|
|
2
|
+
workflow: plan-ai-integration
|
|
3
|
+
description: GSD ai-integration-phase AI-SPEC contract before ordinary phase planning.
|
|
4
|
+
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
5
|
+
tools_available: [gsd-ai-integration-phase]
|
|
6
|
+
phases:
|
|
7
|
+
- id: 01-ai-integration-phase
|
|
8
|
+
name: gsd-ai-integration-phase
|
|
9
|
+
upstream: gsd
|
|
10
|
+
capability: '{{ capabilities.gsd-ai-integration-phase.cmd }}'
|
|
11
|
+
model: sonnet
|
|
12
|
+
gate: judgments.stage-phase-gate.gsd-ai-integration-phase.fires
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# workflows/plan/auto/workflow.yaml — Phase v3.0-3.5 W1 T3.5.W1.2
|
|
2
2
|
#
|
|
3
|
-
# Stage ② Plan master orchestrator —
|
|
3
|
+
# Stage ② Plan master orchestrator — serial design-contract gates, then phase always.
|
|
4
4
|
# per bundled Plan-stage cadence + RESEARCH-workflows § Area 2。
|
|
5
5
|
# planning-with-files /plan 是 D-06 cross-cutting tool (NOT 独立 sub-workflow per user clarification 2)。
|
|
6
6
|
#
|
|
@@ -28,6 +28,10 @@ disciplines_applied: [karpathy, output-style, language, operational, priority, p
|
|
|
28
28
|
tools_available:
|
|
29
29
|
- planning-with-files
|
|
30
30
|
- plan-eng-review
|
|
31
|
+
- gsd-spec-phase
|
|
32
|
+
- gsd-ui-phase
|
|
33
|
+
- gsd-secure-phase
|
|
34
|
+
- gsd-ai-integration-phase
|
|
31
35
|
- gsd-plan-phase
|
|
32
36
|
|
|
33
37
|
delegates_to:
|
|
@@ -35,6 +39,22 @@ delegates_to:
|
|
|
35
39
|
gate: judgments.stage-routing.plan-architecture-delegate.fires
|
|
36
40
|
mode: serial
|
|
37
41
|
order: 1
|
|
38
|
-
- sub:
|
|
42
|
+
- sub: spec
|
|
43
|
+
gate: judgments.stage-phase-gate.gsd-spec-phase.fires
|
|
39
44
|
mode: serial
|
|
40
45
|
order: 2
|
|
46
|
+
- sub: ui
|
|
47
|
+
gate: judgments.stage-phase-gate.gsd-ui-phase.fires
|
|
48
|
+
mode: serial
|
|
49
|
+
order: 3
|
|
50
|
+
- sub: secure
|
|
51
|
+
gate: judgments.stage-phase-gate.gsd-secure-phase.fires
|
|
52
|
+
mode: serial
|
|
53
|
+
order: 4
|
|
54
|
+
- sub: ai-integration
|
|
55
|
+
gate: judgments.stage-phase-gate.gsd-ai-integration-phase.fires
|
|
56
|
+
mode: serial
|
|
57
|
+
order: 5
|
|
58
|
+
- sub: phase
|
|
59
|
+
mode: serial
|
|
60
|
+
order: 6
|
|
@@ -6,8 +6,8 @@ description: |
|
|
|
6
6
|
progress.md (bundled Plan-stage cadence: GSD + planning-with-files)。Stage ② 铁律:
|
|
7
7
|
dual capability (GSD orchestration + planning-with-files plugin)。schema_version:
|
|
8
8
|
harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available [gsd-plan-phase,
|
|
9
|
-
planning-with-files] + 2 phases (01-gsd-plan + 02-persist)。Triggered by
|
|
10
|
-
`harnessed plan-phase
|
|
9
|
+
planning-with-files] + 2 phases (01-gsd-plan + 02-persist)。Triggered by headless CLI
|
|
10
|
+
`harnessed run plan-phase` or slash command `/plan-phase` after `harnessed setup`.
|
|
11
11
|
trigger_phrases:
|
|
12
12
|
- "plan phase"
|
|
13
13
|
- "计划层 phase"
|
|
@@ -6,8 +6,8 @@ description: |
|
|
|
6
6
|
progress.md(打包的 Plan-stage 节奏:GSD + planning-with-files)。Stage ② 铁律:
|
|
7
7
|
dual capability (GSD orchestration + planning-with-files plugin)。schema_version:
|
|
8
8
|
harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available [gsd-plan-phase,
|
|
9
|
-
planning-with-files] + 2 phases (01-gsd-plan + 02-persist)。Triggered by
|
|
10
|
-
`harnessed plan-phase
|
|
9
|
+
planning-with-files] + 2 phases (01-gsd-plan + 02-persist)。Triggered by headless CLI
|
|
10
|
+
`harnessed run plan-phase` or slash command `/plan-phase` after `harnessed setup`.
|
|
11
11
|
trigger_phrases:
|
|
12
12
|
- "plan phase"
|
|
13
13
|
- "计划层 phase"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-secure
|
|
3
|
+
description: Run the conditional GSD secure-phase threat-model contract before plan-phase.
|
|
4
|
+
trigger_phrases: ["plan secure", "gsd secure phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-secure workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Run `harnessed prompt plan-secure --task "$ARGUMENTS" --json`, execute `/gsd-secure-phase`, then complete the registered checkpoint with verifiable output.
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
Fires only when `phase.has_auth_or_secrets == true`.
|
|
16
|
+
|
|
17
|
+
## How to invoke
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-secure`
|
|
20
|
+
|
|
21
|
+
> The banner above (when present) means this invocation is REGISTERED with the engine (an intent marker) — not yet compliant: the steps below (prompt → spawn → checkpoint complete) resolve it, and a per-turn `<workflow-intent>` reminder persists until they run.
|
|
22
|
+
|
|
23
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
24
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
25
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
26
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
27
|
+
|
|
28
|
+
Do NOT pipe to `harnessed run plan-secure` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
29
|
+
|
|
30
|
+
1. Bash: `harnessed prompt plan-secure --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
31
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
32
|
+
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete plan-secure --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
33
|
+
- if it blocks, run `harnessed checkpoint fail plan-secure --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
34
|
+
- respawn ONLY while none of those three has fired. Any one of them means stop: re-scope the subtask, fix the blocker, or escalate to the user. Never respawn past a stop directive.
|
|
35
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
36
|
+
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete plan-secure --result-file <path> --summary "<one-line>"`. Fail-CLOSED — it blocks unless every declared `artifacts_expected` file exists, the TDD boundary passes (non-empty evidence / both the red and green sides present / the test file was not deleted), and the result carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
37
|
+
5. If the complete gate blocked: Bash `harnessed checkpoint fail plan-secure --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. Respawn ONLY while none of those three has fired; any one of them means STOP — re-scope the subtask, fix the blocker, or escalate to the user.
|
|
38
|
+
|
|
39
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-secure
|
|
3
|
+
description: 在 plan-phase 前按条件运行 GSD secure-phase threat-model 契约。
|
|
4
|
+
trigger_phrases: ["plan secure", "gsd secure phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-secure workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
运行 `harnessed prompt plan-secure --task "$ARGUMENTS" --json`,执行 `/gsd-secure-phase`,再用可验证输出完成已登记 checkpoint。
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
仅当 `phase.has_auth_or_secrets == true` 时触发。
|
|
16
|
+
|
|
17
|
+
## 如何调用
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-secure`
|
|
20
|
+
|
|
21
|
+
> 上方 banner(如出现)表示本次调用已在引擎**登记**(intent 标记)——尚未合规:按下方步骤(prompt → spawn → checkpoint complete)完成即解除;在此之前每 turn 会持续注入 `<workflow-intent>` 提醒。
|
|
22
|
+
|
|
23
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
24
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
25
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
26
|
+
|
|
27
|
+
**不要** pipe 到 `harnessed run plan-secure` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
28
|
+
|
|
29
|
+
1. Bash: `harnessed prompt plan-secure --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
30
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
31
|
+
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete plan-secure --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
32
|
+
- 若被拦下,跑 `harnessed checkpoint fail plan-secure --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
33
|
+
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
34
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
35
|
+
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete plan-secure --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
36
|
+
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail plan-secure --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
37
|
+
|
|
38
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema_version: harnessed.workflow.v3
|
|
2
|
+
workflow: plan-secure
|
|
3
|
+
description: GSD secure-phase threat-model contract before ordinary phase planning.
|
|
4
|
+
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
5
|
+
tools_available: [gsd-secure-phase]
|
|
6
|
+
phases:
|
|
7
|
+
- id: 01-secure-phase
|
|
8
|
+
name: gsd-secure-phase
|
|
9
|
+
upstream: gsd
|
|
10
|
+
capability: '{{ capabilities.gsd-secure-phase.cmd }}'
|
|
11
|
+
model: sonnet
|
|
12
|
+
gate: judgments.stage-phase-gate.gsd-secure-phase.fires
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-spec
|
|
3
|
+
description: Run the conditional GSD spec-phase design contract before plan-phase.
|
|
4
|
+
trigger_phrases: ["plan spec", "gsd spec phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-spec workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Run `harnessed prompt plan-spec --task "$ARGUMENTS" --json`, execute `/gsd-spec-phase`, then complete the registered checkpoint with verifiable output.
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
Fires only when `phase.requires_spec == true`.
|
|
16
|
+
|
|
17
|
+
## How to invoke
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-spec`
|
|
20
|
+
|
|
21
|
+
> The banner above (when present) means this invocation is REGISTERED with the engine (an intent marker) — not yet compliant: the steps below (prompt → spawn → checkpoint complete) resolve it, and a per-turn `<workflow-intent>` reminder persists until they run.
|
|
22
|
+
|
|
23
|
+
The numbered sequence below **is** the state machine — execute it with Bash. Do NOT improvise
|
|
24
|
+
an equivalent flow from the Overview above: freelancing bypasses the engine (no ledger, no
|
|
25
|
+
evidence guard). harnessed gives you the spawn-ready prompt; YOU spawn the subagent with a
|
|
26
|
+
{{ host.native }} {{ host.spawn_subagent }} (keeps the session responsive + lets clarification round-trips reach the user).
|
|
27
|
+
|
|
28
|
+
Do NOT pipe to `harnessed run plan-spec` — that is the CI/headless path ({{ host.harnessed_run_warning_note.execution_tail }}
|
|
29
|
+
|
|
30
|
+
1. Bash: `harnessed prompt plan-spec --task "$ARGUMENTS" --json` → parse `{prompt, max_iterations, model}`.
|
|
31
|
+
2. Spawn a {{ host.native }} subagent ({{ host.spawn_subagent }}) with that `prompt` and `model`, then drive delivery with harnessed's own completion gate:
|
|
32
|
+
- on return, write the subagent's final output to a file and run `harnessed checkpoint complete plan-spec --result-file <path>` — it is fail-closed on the declared artifacts, the TDD boundary, and the verbatim `<promise>COMPLETE</promise>`.
|
|
33
|
+
- if it blocks, run `harnessed checkpoint fail plan-spec --failing-tests <n>` to record the attempt; it prints BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP when a stop condition is reached.
|
|
34
|
+
- respawn ONLY while none of those three has fired. Any one of them means stop: re-scope the subtask, fix the blocker, or escalate to the user. Never respawn past a stop directive.
|
|
35
|
+
3. If the output contains `STATUS: NEEDS_CLARIFICATION` + a question list: STOP, relay them verbatim via {{ host.ask_user }}, append the answers to the spec, then re-spawn the same sub.
|
|
36
|
+
4. On `<promise>COMPLETE</promise>`: write the subagent’s final output to a file, then Bash `harnessed checkpoint complete plan-spec --result-file <path> --summary "<one-line>"`. Fail-CLOSED — it blocks unless every declared `artifacts_expected` file exists, the TDD boundary passes (non-empty evidence / both the red and green sides present / the test file was not deleted), and the result carries a verbatim `<promise>COMPLETE</promise>` (or a structured COMPLETE status). `--result <text>` is the inline variant; `--result-file` wins and is quoting-safe on Windows. `--force` records an audited override (`evidence_status=overridden`) — it does not silently pass.
|
|
37
|
+
5. If the complete gate blocked: Bash `harnessed checkpoint fail plan-spec --failing-tests <n>` to record the attempt. It prints `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP` once a stop condition is reached. Respawn ONLY while none of those three has fired; any one of them means STOP — re-scope the subtask, fix the blocker, or escalate to the user.
|
|
38
|
+
|
|
39
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-spec
|
|
3
|
+
description: 在 plan-phase 前按条件运行 GSD spec-phase 设计契约。
|
|
4
|
+
trigger_phrases: ["plan spec", "gsd spec phase"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# plan-spec workflow
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
运行 `harnessed prompt plan-spec --task "$ARGUMENTS" --json`,执行 `/gsd-spec-phase`,再用可验证输出完成已登记 checkpoint。
|
|
12
|
+
|
|
13
|
+
## Invocation
|
|
14
|
+
|
|
15
|
+
仅当 `phase.requires_spec == true` 时触发。
|
|
16
|
+
|
|
17
|
+
## 如何调用
|
|
18
|
+
|
|
19
|
+
!`harnessed checkpoint intent plan-spec`
|
|
20
|
+
|
|
21
|
+
> 上方 banner(如出现)表示本次调用已在引擎**登记**(intent 标记)——尚未合规:按下方步骤(prompt → spawn → checkpoint complete)完成即解除;在此之前每 turn 会持续注入 `<workflow-intent>` 提醒。
|
|
22
|
+
|
|
23
|
+
下面这套编号序列**就是** state machine —— 用 Bash 执行。**不要**从上方 Overview 自行演绎等价流程:
|
|
24
|
+
freestyle 会旁路引擎(无 ledger、无 evidence guard)。harnessed 给你 spawn-ready prompt;**你**用
|
|
25
|
+
{{ host.native }} {{ host.spawn_subagent.zh_tool }} spawn subagent(保持 session 响应 + 让澄清 round-trip 能回到用户)。
|
|
26
|
+
|
|
27
|
+
**不要** pipe 到 `harnessed run plan-spec` —— 那是 CI/headless 路径({{ host.harnessed_run_warning_note.execution_tail }}
|
|
28
|
+
|
|
29
|
+
1. Bash: `harnessed prompt plan-spec --task "$ARGUMENTS" --json` → 解析 `{prompt, max_iterations, model}`。
|
|
30
|
+
2. 用 {{ host.native }} subagent({{ host.spawn_subagent.zh_tool }})以该 `prompt` + `model` spawn,然后用 harnessed 自己的完成闸门驱动交付:
|
|
31
|
+
- subagent 返回后,把它的最终输出写入文件,跑 `harnessed checkpoint complete plan-spec --result-file <path>` —— 该命令对声明的产物、TDD boundary、逐字 `<promise>COMPLETE</promise>` 三者 fail-closed。
|
|
32
|
+
- 若被拦下,跑 `harnessed checkpoint fail plan-spec --failing-tests <n>` 记录本次尝试;命中停机条件时它会打印 BUDGET-EXHAUSTED / NO-PROGRESS / BREAK-LOOP。
|
|
33
|
+
- **仅当**这三者都未触发时才允许重 spawn。任一触发即停:重新收敛子任务范围、修掉阻塞点,或上报用户。绝不越过停机指令继续重 spawn。
|
|
34
|
+
3. 若输出含 `STATUS: NEEDS_CLARIFICATION` + 问题列表:STOP,用 {{ host.ask_user }} 原样转达,把答案 append 进 spec,再重 spawn。
|
|
35
|
+
4. 命中 `<promise>COMPLETE</promise>`:把 subagent 最终输出写入文件,再 Bash `harnessed checkpoint complete plan-spec --result-file <path> --summary "<one-line>"`。fail-CLOSED —— 除非声明的 `artifacts_expected` 文件全部存在、TDD boundary 通过(证据非空 / 红绿两侧齐全 / 测试文件未被删除)、且结果含逐字 `<promise>COMPLETE</promise>`(或结构化 COMPLETE 状态),否则拦下。`--result <text>` 是内联变体;`--result-file` 优先且在 Windows 上引号安全。`--force` 记录可审计的覆盖(`evidence_status=overridden`),不是静默放行。
|
|
36
|
+
5. 若 complete 闸门拦下:Bash `harnessed checkpoint fail plan-spec --failing-tests <n>` 记录本次尝试。命中停机条件时会打印 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。**仅当**三者都未触发时才允许重 spawn;任一触发即 STOP —— 重新收敛子任务范围、修掉阻塞点,或上报用户。
|
|
37
|
+
|
|
38
|
+
<!-- harnessed-generated:v4.12.0 -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema_version: harnessed.workflow.v3
|
|
2
|
+
workflow: plan-spec
|
|
3
|
+
description: GSD spec-phase design contract before ordinary phase planning.
|
|
4
|
+
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
5
|
+
tools_available: [gsd-spec-phase]
|
|
6
|
+
phases:
|
|
7
|
+
- id: 01-spec-phase
|
|
8
|
+
name: gsd-spec-phase
|
|
9
|
+
upstream: gsd
|
|
10
|
+
capability: '{{ capabilities.gsd-spec-phase.cmd }}'
|
|
11
|
+
model: sonnet
|
|
12
|
+
gate: judgments.stage-phase-gate.gsd-spec-phase.fires
|