yaaw-se 0.1.1 → 0.1.2-dev.35837895685.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/payload/payload-files.json +23 -18
- package/dist/payload/payload.json +1 -1
- package/dist/payload/yaaw-core/system/core/context-loading.md +11 -0
- package/dist/payload/yaaw-core/system/core/dispatch-execution.md +37 -0
- package/dist/payload/yaaw-core/system/core/io-contract.md +6 -1
- package/dist/payload/yaaw-core/system/core/recovery.md +3 -0
- package/dist/payload/yaaw-core/system/registries/execution-policy.json +164 -33
- package/dist/payload/yaaw-core/system/roles/orchestrator.md +5 -2
- package/dist/payload/yaaw-core/system/rules/review-independence.md +2 -0
- package/dist/payload/yaaw-core/system/workflows/orchestration/dispatch.md +9 -4
- package/dist/payload/yaaw-core/system/workflows/orchestration/route.md +5 -3
- package/dist/tui/confirm-plan.js +22 -89
- package/dist/tui/confirm-plan.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "payload.json",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"bytes":
|
|
26
|
+
"sha256": "d3420ad52523153719e738faea6b664bef79cad6af7cf09c67bf3d73a8c57a6e",
|
|
27
|
+
"bytes": 74
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "skills/yaaw-create-spec/SKILL.md",
|
|
@@ -98,8 +98,13 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"path": "yaaw-core/system/core/context-loading.md",
|
|
101
|
-
"sha256": "
|
|
102
|
-
"bytes":
|
|
101
|
+
"sha256": "ac44a03b41e4403baf2cf3ef19c40b2d82fa6b7232766912b0e6285a2a321694",
|
|
102
|
+
"bytes": 2884
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"path": "yaaw-core/system/core/dispatch-execution.md",
|
|
106
|
+
"sha256": "3adf4cf3440e3cc0361ad5ea659660f4688824900b3dcd68b8882877c2fae7b9",
|
|
107
|
+
"bytes": 2814
|
|
103
108
|
},
|
|
104
109
|
{
|
|
105
110
|
"path": "yaaw-core/system/core/execution-context.md",
|
|
@@ -113,8 +118,8 @@
|
|
|
113
118
|
},
|
|
114
119
|
{
|
|
115
120
|
"path": "yaaw-core/system/core/io-contract.md",
|
|
116
|
-
"sha256": "
|
|
117
|
-
"bytes":
|
|
121
|
+
"sha256": "509270f9f3490ddc5ca071938f66167b6db4b171b88b13a8d3497be8a0ef0adb",
|
|
122
|
+
"bytes": 2945
|
|
118
123
|
},
|
|
119
124
|
{
|
|
120
125
|
"path": "yaaw-core/system/core/lifecycle.md",
|
|
@@ -123,8 +128,8 @@
|
|
|
123
128
|
},
|
|
124
129
|
{
|
|
125
130
|
"path": "yaaw-core/system/core/recovery.md",
|
|
126
|
-
"sha256": "
|
|
127
|
-
"bytes":
|
|
131
|
+
"sha256": "f197bdb188b31decdd183fbd7a611f1fd454dd530400fbfa33453db60e8ee3cb",
|
|
132
|
+
"bytes": 2068
|
|
128
133
|
},
|
|
129
134
|
{
|
|
130
135
|
"path": "yaaw-core/system/core/routing.md",
|
|
@@ -173,8 +178,8 @@
|
|
|
173
178
|
},
|
|
174
179
|
{
|
|
175
180
|
"path": "yaaw-core/system/registries/execution-policy.json",
|
|
176
|
-
"sha256": "
|
|
177
|
-
"bytes":
|
|
181
|
+
"sha256": "d67626880e4cf5adf5e4ba6adb30e45e5a3e3a17cbf51d961bbfd74bb5c6f880",
|
|
182
|
+
"bytes": 5540
|
|
178
183
|
},
|
|
179
184
|
{
|
|
180
185
|
"path": "yaaw-core/system/registries/expertise.json",
|
|
@@ -218,8 +223,8 @@
|
|
|
218
223
|
},
|
|
219
224
|
{
|
|
220
225
|
"path": "yaaw-core/system/roles/orchestrator.md",
|
|
221
|
-
"sha256": "
|
|
222
|
-
"bytes":
|
|
226
|
+
"sha256": "6d6b433c65fd0f09f4479e6bc2ed944fe630a532923acfbd3e57c575ac4d6d64",
|
|
227
|
+
"bytes": 1696
|
|
223
228
|
},
|
|
224
229
|
{
|
|
225
230
|
"path": "yaaw-core/system/roles/planner.md",
|
|
@@ -278,8 +283,8 @@
|
|
|
278
283
|
},
|
|
279
284
|
{
|
|
280
285
|
"path": "yaaw-core/system/rules/review-independence.md",
|
|
281
|
-
"sha256": "
|
|
282
|
-
"bytes":
|
|
286
|
+
"sha256": "e6a5cc02aac19edd251dc558e98a3a9009b0123a0bd6e055f12764e553cfbf49",
|
|
287
|
+
"bytes": 870
|
|
283
288
|
},
|
|
284
289
|
{
|
|
285
290
|
"path": "yaaw-core/system/rules/ticket-sizing.md",
|
|
@@ -423,8 +428,8 @@
|
|
|
423
428
|
},
|
|
424
429
|
{
|
|
425
430
|
"path": "yaaw-core/system/workflows/orchestration/dispatch.md",
|
|
426
|
-
"sha256": "
|
|
427
|
-
"bytes":
|
|
431
|
+
"sha256": "a12046d781265e425208b708bb1ea7c65d1305121ae36e14387e289914a57467",
|
|
432
|
+
"bytes": 2141
|
|
428
433
|
},
|
|
429
434
|
{
|
|
430
435
|
"path": "yaaw-core/system/workflows/orchestration/inspect-state.md",
|
|
@@ -443,8 +448,8 @@
|
|
|
443
448
|
},
|
|
444
449
|
{
|
|
445
450
|
"path": "yaaw-core/system/workflows/orchestration/route.md",
|
|
446
|
-
"sha256": "
|
|
447
|
-
"bytes":
|
|
451
|
+
"sha256": "e01c5a537d579e04c01bb3d55f429ff88b6d40c9c38ac919327cd0ed5437e0ce",
|
|
452
|
+
"bytes": 1649
|
|
448
453
|
},
|
|
449
454
|
{
|
|
450
455
|
"path": "yaaw-core/system/workflows/planning/create-spec.md",
|
|
@@ -16,6 +16,17 @@ After exactly one workflow is selected:
|
|
|
16
16
|
|
|
17
17
|
After durable output, return to routing before opening another workflow contract.
|
|
18
18
|
|
|
19
|
+
## Fresh worker bootstrap
|
|
20
|
+
When an Orchestrator dispatch runs in a fresh host worker, the worker should receive only enough parent context to locate and execute the handoff:
|
|
21
|
+
- resolved workspace root;
|
|
22
|
+
- target semantic role;
|
|
23
|
+
- `.yaaw-core/runtime/handoff.json`;
|
|
24
|
+
- instruction to load the canonical role contract and resolve the workflow through registries;
|
|
25
|
+
- instruction to load only handoff-admitted artifacts/expertise/repository context;
|
|
26
|
+
- instruction not to route another YAAW authority role.
|
|
27
|
+
|
|
28
|
+
Do not copy the parent planning conversation, all project documents, all expertise, all workflows, review history, or a repository dump into a worker prompt. Those are either durable artifacts or discoverable only when admitted by the selected workflow.
|
|
29
|
+
|
|
19
30
|
## Normal semantic context
|
|
20
31
|
```text
|
|
21
32
|
role contract
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Dispatch execution contract
|
|
2
|
+
|
|
3
|
+
Dispatch is a semantic request to execute exactly one already-selected YAAW handoff using the strongest context-isolation mechanism the active host can safely provide.
|
|
4
|
+
|
|
5
|
+
## Canonical rules
|
|
6
|
+
1. Orchestrator selects exactly one canonical workflow.
|
|
7
|
+
2. Orchestrator persists one valid `.yaaw-core/runtime/handoff.json`.
|
|
8
|
+
3. Under orchestrated operation, a non-Orchestrator semantic role should execute in a fresh isolated worker when the host provides that capability.
|
|
9
|
+
4. The worker receives minimal bootstrap context: workspace root, semantic role, handoff path, and instructions to resolve the canonical role/workflow from YAAW registries.
|
|
10
|
+
5. The worker reads durable YAAW state instead of depending on inherited planning conversation.
|
|
11
|
+
6. One dispatch executes exactly one handoff.
|
|
12
|
+
7. A worker may not route, spawn, or command another YAAW authority role.
|
|
13
|
+
8. The worker persists the required durable artifact/state/evidence before returning.
|
|
14
|
+
9. The worker returns only a legal typed result from the handoff/workflow contract.
|
|
15
|
+
10. A worker message is an execution signal, not project truth.
|
|
16
|
+
11. After worker completion, failure, interruption, or lost response, Orchestrator re-enters `orchestration.inspect-state` before selecting another semantic workflow.
|
|
17
|
+
12. If isolated execution is unavailable, the active host adapter applies its configured fallback policy.
|
|
18
|
+
|
|
19
|
+
## Direct invocation
|
|
20
|
+
A user who directly invokes PRD, Planner, Implementer, or Reviewer has intentionally selected that role/workflow and may execute it in the current context. Isolation policy here governs **Orchestrator dispatch**, not the existence of direct public entrypoints.
|
|
21
|
+
|
|
22
|
+
## Execution-context policy
|
|
23
|
+
`.yaaw-core/system/registries/execution-policy.json` declares one of:
|
|
24
|
+
- `ROOT_ONLY`: run in the active root Orchestrator context.
|
|
25
|
+
- `ISOLATED_PREFERRED`: prefer a fresh worker; host fallback may run inline.
|
|
26
|
+
- `INLINE_ALLOWED`: current-context execution is explicitly acceptable.
|
|
27
|
+
|
|
28
|
+
A future `ISOLATED_REQUIRED` value may be introduced only with a schema/version update. Host adapters may still expose a stricter local runtime mode that blocks instead of falling back.
|
|
29
|
+
|
|
30
|
+
## Fresh-context invariant
|
|
31
|
+
An orchestrated Implementer execution context must never become the Reviewer execution context for the same work. Reviewer acceptance is an independent dispatch.
|
|
32
|
+
|
|
33
|
+
## Failure and retry invariant
|
|
34
|
+
If a worker started and later failed or disappeared, do not blindly start the same authority worker again. Inspect durable reality first because the worker may already have mutated the repository or written evidence.
|
|
35
|
+
|
|
36
|
+
## Provider boundary
|
|
37
|
+
This contract is provider-neutral. Names of host tools, agent types, provider directories, model identifiers, and provider-specific spawning schemas belong only to integration adapters.
|
|
@@ -6,7 +6,7 @@ YAAW roles communicate through durable artifacts, exact Orchestrator handoffs, a
|
|
|
6
6
|
- `.yaaw-core/system/registries/artifacts.json` defines canonical artifact classes, locations, durability, and semantic ownership.
|
|
7
7
|
- `.yaaw-core/system/registries/role-io.json` defines each role's default read/write authority.
|
|
8
8
|
- `.yaaw-core/system/registries/workflows.json` maps canonical workflow IDs to one role/workflow contract.
|
|
9
|
-
- `.yaaw-core/system/registries/execution-policy.json` defines repository requirements and context/research admission for every workflow.
|
|
9
|
+
- `.yaaw-core/system/registries/execution-policy.json` defines repository requirements, execution-context policy, and context/research admission for every workflow.
|
|
10
10
|
- `.yaaw-core/runtime/handoff.json` resolves those contracts to one exact dispatch.
|
|
11
11
|
- `.yaaw-core/runtime/intent.json` may preserve the public entrypoint's desired destination while prerequisites are resolved.
|
|
12
12
|
|
|
@@ -17,16 +17,21 @@ The role reads the handoff, then its role contract, resolves `handoff.workflow`
|
|
|
17
17
|
|
|
18
18
|
A role must not search the repository for alternate YAAW artifact locations when a canonical input is missing. Missing or stale canonical prerequisites produce a typed result to Orchestrator.
|
|
19
19
|
|
|
20
|
+
Host execution transport is separate from semantic communication. A semantic role may run in another fresh host context, but authority still flows only through durable YAAW artifacts and typed results.
|
|
21
|
+
|
|
20
22
|
## Communication topology
|
|
21
23
|
```text
|
|
22
24
|
PRD / Planner / Implementer / Reviewer
|
|
23
25
|
↓ durable output + typed result
|
|
24
26
|
Orchestrator
|
|
27
|
+
↓ inspect reality
|
|
25
28
|
↓ exactly one next dispatch
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
Roles never spawn or command peer roles. **Roles report reality; Orchestrator decides routing.**
|
|
29
32
|
|
|
33
|
+
A worker's textual success message is not semantic truth. Orchestrator verifies the expected artifact, revision, repository/evidence basis, and legal state transition after every dispatched execution.
|
|
34
|
+
|
|
30
35
|
## Typed results
|
|
31
36
|
Common results include `SUCCESS`, `READY`, `HUMAN_INPUT_REQUIRED`, `PRECONDITION_UNSATISFIED`, `REVIEW_REQUIRED`, `REPLAN_REQUIRED`, `BLOCKED`, `PASS`, `REPAIR`, `REPLAN`, and `COMPLETE`.
|
|
32
37
|
|
|
@@ -16,6 +16,9 @@ Recovery compares claimed state with observed reality and returns to the last tr
|
|
|
16
16
|
- `PASS` + missing/stale review, source revision mismatch, or repository identity mismatch -> invalidate current PASS and route to review/replan as appropriate.
|
|
17
17
|
- A stale `.yaaw-core/runtime/handoff.json` is discarded, not executed.
|
|
18
18
|
- If repository identity is required but status is not `READY`, return `PRECONDITION_UNSATISFIED:REPOSITORY_IDENTITY_UNAVAILABLE` or `BLOCKED` with exact missing proof.
|
|
19
|
+
- If a dispatched worker ends unexpectedly, returns no response, loses its context, or its response is lost, treat that as an ordinary context interruption: inspect durable artifacts/repository/evidence and route from reality.
|
|
20
|
+
- Never blindly retry a worker that was successfully created; first determine whether it already produced durable effects.
|
|
21
|
+
- Do not persist host worker/session IDs into durable project memory. Replaceable coordination data, if ever required, belongs under `.yaaw-core/runtime/`.
|
|
19
22
|
- If the last trustworthy boundary cannot be proven, return `BLOCKED` with exact missing proof.
|
|
20
23
|
|
|
21
24
|
Every reconciliation uses a legal transition and records its reason/evidence in state provenance.
|
|
@@ -1,38 +1,169 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "yaaw.execution-policy/v1",
|
|
3
|
-
"defaults": {
|
|
3
|
+
"defaults": {
|
|
4
|
+
"context_mode": "progressive",
|
|
5
|
+
"external_research": "forbidden"
|
|
6
|
+
},
|
|
4
7
|
"workflows": {
|
|
5
|
-
"prd.route": {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"prd.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
8
|
+
"prd.route": {
|
|
9
|
+
"repository_requirement": "NONE",
|
|
10
|
+
"external_research": "forbidden",
|
|
11
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
12
|
+
},
|
|
13
|
+
"prd.create": {
|
|
14
|
+
"repository_requirement": "NONE",
|
|
15
|
+
"external_research": "forbidden",
|
|
16
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
17
|
+
},
|
|
18
|
+
"prd.question-round": {
|
|
19
|
+
"repository_requirement": "NONE",
|
|
20
|
+
"external_research": "forbidden",
|
|
21
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
22
|
+
},
|
|
23
|
+
"prd.record-decisions": {
|
|
24
|
+
"repository_requirement": "NONE",
|
|
25
|
+
"external_research": "forbidden",
|
|
26
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
27
|
+
},
|
|
28
|
+
"prd.revise": {
|
|
29
|
+
"repository_requirement": "NONE",
|
|
30
|
+
"external_research": "forbidden",
|
|
31
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
32
|
+
},
|
|
33
|
+
"prd.refine": {
|
|
34
|
+
"repository_requirement": "NONE",
|
|
35
|
+
"external_research": "forbidden",
|
|
36
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
37
|
+
},
|
|
38
|
+
"prd.readiness": {
|
|
39
|
+
"repository_requirement": "NONE",
|
|
40
|
+
"external_research": "forbidden",
|
|
41
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
42
|
+
},
|
|
43
|
+
"planning.route": {
|
|
44
|
+
"repository_requirement": "INSPECT",
|
|
45
|
+
"external_research": "metadata-only",
|
|
46
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
47
|
+
},
|
|
48
|
+
"planning.discover": {
|
|
49
|
+
"repository_requirement": "INSPECT",
|
|
50
|
+
"external_research": "forbidden",
|
|
51
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
52
|
+
},
|
|
53
|
+
"planning.write-understanding": {
|
|
54
|
+
"repository_requirement": "INSPECT",
|
|
55
|
+
"external_research": "forbidden",
|
|
56
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
57
|
+
},
|
|
58
|
+
"planning.decision-frontier": {
|
|
59
|
+
"repository_requirement": "INSPECT",
|
|
60
|
+
"external_research": "admission-only",
|
|
61
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
62
|
+
},
|
|
63
|
+
"planning.research": {
|
|
64
|
+
"repository_requirement": "INSPECT",
|
|
65
|
+
"external_research": "candidate-scoped",
|
|
66
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
67
|
+
},
|
|
68
|
+
"planning.question-round": {
|
|
69
|
+
"repository_requirement": "INSPECT",
|
|
70
|
+
"external_research": "forbidden",
|
|
71
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
72
|
+
},
|
|
73
|
+
"planning.record-decisions": {
|
|
74
|
+
"repository_requirement": "INSPECT",
|
|
75
|
+
"external_research": "forbidden",
|
|
76
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
77
|
+
},
|
|
78
|
+
"planning.readiness-review": {
|
|
79
|
+
"repository_requirement": "INSPECT",
|
|
80
|
+
"external_research": "forbidden",
|
|
81
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
82
|
+
},
|
|
83
|
+
"planning.create-spec": {
|
|
84
|
+
"repository_requirement": "INSPECT",
|
|
85
|
+
"external_research": "forbidden",
|
|
86
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
87
|
+
},
|
|
88
|
+
"planning.create-tickets": {
|
|
89
|
+
"repository_requirement": "IDENTITY",
|
|
90
|
+
"external_research": "forbidden",
|
|
91
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
92
|
+
},
|
|
93
|
+
"planning.replan": {
|
|
94
|
+
"repository_requirement": "INSPECT",
|
|
95
|
+
"external_research": "admission-only",
|
|
96
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
97
|
+
},
|
|
98
|
+
"implementation.select-ticket": {
|
|
99
|
+
"repository_requirement": "IDENTITY",
|
|
100
|
+
"external_research": "forbidden",
|
|
101
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
102
|
+
},
|
|
103
|
+
"implementation.implement-ticket": {
|
|
104
|
+
"repository_requirement": "IDENTITY",
|
|
105
|
+
"external_research": "forbidden",
|
|
106
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
107
|
+
},
|
|
108
|
+
"implementation.verify-ticket": {
|
|
109
|
+
"repository_requirement": "IDENTITY",
|
|
110
|
+
"external_research": "forbidden",
|
|
111
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
112
|
+
},
|
|
113
|
+
"implementation.repair-ticket": {
|
|
114
|
+
"repository_requirement": "IDENTITY",
|
|
115
|
+
"external_research": "forbidden",
|
|
116
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
117
|
+
},
|
|
118
|
+
"review.inspect-change": {
|
|
119
|
+
"repository_requirement": "IDENTITY",
|
|
120
|
+
"external_research": "restricted",
|
|
121
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
122
|
+
},
|
|
123
|
+
"review.review-ticket": {
|
|
124
|
+
"repository_requirement": "IDENTITY",
|
|
125
|
+
"external_research": "restricted",
|
|
126
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
127
|
+
},
|
|
128
|
+
"review.classify-findings": {
|
|
129
|
+
"repository_requirement": "IDENTITY",
|
|
130
|
+
"external_research": "forbidden",
|
|
131
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
132
|
+
},
|
|
133
|
+
"review.record-review": {
|
|
134
|
+
"repository_requirement": "IDENTITY",
|
|
135
|
+
"external_research": "forbidden",
|
|
136
|
+
"execution_context": "ISOLATED_PREFERRED"
|
|
137
|
+
},
|
|
138
|
+
"orchestration.route": {
|
|
139
|
+
"repository_requirement": "INSPECT",
|
|
140
|
+
"external_research": "forbidden",
|
|
141
|
+
"execution_context": "ROOT_ONLY"
|
|
142
|
+
},
|
|
143
|
+
"orchestration.inspect-state": {
|
|
144
|
+
"repository_requirement": "INSPECT",
|
|
145
|
+
"external_research": "forbidden",
|
|
146
|
+
"execution_context": "ROOT_ONLY"
|
|
147
|
+
},
|
|
148
|
+
"orchestration.reconcile-state": {
|
|
149
|
+
"repository_requirement": "INSPECT",
|
|
150
|
+
"external_research": "forbidden",
|
|
151
|
+
"execution_context": "ROOT_ONLY"
|
|
152
|
+
},
|
|
153
|
+
"orchestration.determine-next-action": {
|
|
154
|
+
"repository_requirement": "INSPECT",
|
|
155
|
+
"external_research": "forbidden",
|
|
156
|
+
"execution_context": "ROOT_ONLY"
|
|
157
|
+
},
|
|
158
|
+
"orchestration.dispatch": {
|
|
159
|
+
"repository_requirement": "INSPECT",
|
|
160
|
+
"external_research": "forbidden",
|
|
161
|
+
"execution_context": "ROOT_ONLY"
|
|
162
|
+
},
|
|
163
|
+
"orchestration.recover-interruption": {
|
|
164
|
+
"repository_requirement": "IDENTITY",
|
|
165
|
+
"external_research": "forbidden",
|
|
166
|
+
"execution_context": "ROOT_ONLY"
|
|
167
|
+
}
|
|
37
168
|
}
|
|
38
169
|
}
|
|
@@ -11,8 +11,11 @@ Own continuity, workspace/repository reconstruction, evidence-backed reconciliat
|
|
|
11
11
|
5. Reconcile only evidence-backed inconsistencies using legal transitions.
|
|
12
12
|
6. Determine exactly one next canonical workflow or terminal state.
|
|
13
13
|
7. Populate a structured handoff from `role-io.json`, `execution-policy.json`, exact artifact references, and current repository basis.
|
|
14
|
-
8. Dispatch
|
|
15
|
-
9. After
|
|
14
|
+
8. Dispatch exactly one canonical workflow using the host execution mechanism defined by `.yaaw-core/system/core/dispatch-execution.md`. Prefer a fresh isolated worker for non-Orchestrator semantic roles when available.
|
|
15
|
+
9. After any worker completion, failure, interruption, or lost response, return to `orchestration.inspect-state` before selecting another semantic workflow.
|
|
16
|
+
10. Repeat until a real stop condition.
|
|
16
17
|
|
|
17
18
|
## Boundary
|
|
18
19
|
The Orchestrator is a traffic controller, not a super-agent. It must not author product decisions, architecture, implementation, research conclusions, or acceptance. Roles never privately delegate to peers; every successor is chosen here.
|
|
20
|
+
|
|
21
|
+
Child/worker text is not project truth. Durable artifacts, repository evidence, accepted reviews, and legal state transitions are authoritative.
|
|
@@ -7,3 +7,5 @@ Reviewer evaluates actual repository work against the current ticket/spec/produc
|
|
|
7
7
|
- Only Reviewer may transition `REVIEW_REQUIRED -> PASS`.
|
|
8
8
|
- A later source revision or repository drift can make prior PASS evidence stale without deleting the historical review.
|
|
9
9
|
- Reviewer may classify `REPLAN`, but Planner owns the resulting contract change.
|
|
10
|
+
- Under orchestrated operation, Reviewer must execute in a different fresh authority context from the Implementer whose work is being accepted. Never role-switch an Implementer worker into Reviewer.
|
|
11
|
+
- Independence is semantic, not a host depth/concurrency setting; it remains required even when a host falls back to inline execution.
|
|
@@ -10,9 +10,14 @@ Execute exactly one already-selected canonical workflow. This file is not the or
|
|
|
10
10
|
1. Validate handoff schema, workflow registry entry, execution policy, role I/O, source artifact revisions, transition-sequence basis, and repository basis.
|
|
11
11
|
2. Enforce repository requirement: `NONE` needs no Git prerequisite; `INSPECT` may proceed with a represented `UNVERSIONED` workspace; `IDENTITY` requires repository status `READY`.
|
|
12
12
|
3. If any basis is stale or unsatisfied, discard the handoff and return a typed stale/prerequisite result to `orchestration.route`; do not execute it.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
13
|
+
4. Resolve the handoff's execution-context policy from `execution-policy.json` and `.yaaw-core/system/core/dispatch-execution.md`.
|
|
14
|
+
5. If the target is an Orchestrator workflow or policy is `ROOT_ONLY`, execute in the current root context.
|
|
15
|
+
6. Otherwise request the active host adapter's isolated-worker mechanism. When isolation is available, execute this one handoff in a fresh worker with minimal bootstrap context and without relying on inherited parent conversation.
|
|
16
|
+
7. If isolation is unavailable or a named worker cannot be selected before child creation, follow the configured host fallback policy. If a child was already created and then failed, do **not** blindly retry; return to reality inspection first.
|
|
17
|
+
8. The executing context loads only the target role contract, selected workflow contract, exact handoff reads, selected expertise, and minimal relevant repository context.
|
|
18
|
+
9. Execute the target workflow once. A worker may not route or spawn another YAAW authority role.
|
|
19
|
+
10. Require the expected durable output/state/evidence or an explicit legal typed stop/prerequisite result.
|
|
20
|
+
11. Treat any child response only as an execution signal; do not accept it as project truth without re-inspection.
|
|
21
|
+
12. Mark/remove the consumed runtime handoff and return control to `orchestration.route`.
|
|
17
22
|
|
|
18
23
|
Never recursively dispatch `orchestration.dispatch` as its own target. A target role never dispatches a peer.
|
|
@@ -13,11 +13,13 @@ Repeat:
|
|
|
13
13
|
3. execute `orchestration.determine-next-action`;
|
|
14
14
|
4. if terminal/blocked/human-input stop condition is returned, stop;
|
|
15
15
|
5. execute `orchestration.dispatch` for the one persisted handoff;
|
|
16
|
-
6. require the dispatched
|
|
17
|
-
7. discard the consumed handoff and return to step 1 before loading another target workflow.
|
|
16
|
+
6. require the dispatched execution to persist its artifact/state/evidence output or legal typed prerequisite/stop result;
|
|
17
|
+
7. whether dispatch reports success, failure, interruption, or no response, discard/validate the consumed handoff as appropriate and return to step 1 before loading another target workflow.
|
|
18
|
+
|
|
19
|
+
There is no direct `worker A result -> worker B` authority chain. Reality reconstruction always sits between authority-role dispatches.
|
|
18
20
|
|
|
19
21
|
## Loop safety
|
|
20
22
|
If the same repository capability/identity, state, handoff, and expected output repeat without any durable mutation/evidence change, stop as `BLOCKED` with `no_progress` rather than spinning.
|
|
21
23
|
|
|
22
24
|
## Stop conditions
|
|
23
|
-
Human product/engineering answer required; evidence/permission unavailable; target workflow requires repository `IDENTITY` but status is not `READY`; host requires approval for consequential action; or accepted scope is terminal `COMPLETE`.
|
|
25
|
+
Human product/engineering answer required; evidence/permission unavailable; target workflow requires repository `IDENTITY` but status is not `READY`; active host/runtime policy blocks required isolation; host requires approval for consequential action; or accepted scope is terminal `COMPLETE`.
|
package/dist/tui/confirm-plan.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
|
-
import { relative } from "node:path";
|
|
3
2
|
import { integrations } from "../integrations/registry.js";
|
|
4
3
|
const actionLabels = {
|
|
5
4
|
fresh: "Fresh install",
|
|
@@ -8,111 +7,45 @@ const actionLabels = {
|
|
|
8
7
|
repair: "Repair installation",
|
|
9
8
|
uninstall: "Uninstall"
|
|
10
9
|
};
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
function plural(count, noun) {
|
|
18
|
-
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
19
|
-
}
|
|
20
|
-
function formatList(values, limit = 5) {
|
|
21
|
-
if (values.length <= limit)
|
|
22
|
-
return values.join(", ");
|
|
23
|
-
return `${values.slice(0, limit).join(", ")} (+${values.length - limit} more)`;
|
|
10
|
+
function toolSummary(plan) {
|
|
11
|
+
const tools = plan.selectedIntegrations.map(id => integrations[id].displayName);
|
|
12
|
+
if (!tools.length)
|
|
13
|
+
return "";
|
|
14
|
+
return `${tools.join(", ")} · ${plan.selectedSkills.length} skill${plan.selectedSkills.length === 1 ? "" : "s"}`;
|
|
24
15
|
}
|
|
25
16
|
export function formatPlan(plan) {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const removals = new Set();
|
|
30
|
-
const preserves = new Set();
|
|
31
|
-
const directories = new Set();
|
|
32
|
-
for (const op of plan.operations) {
|
|
33
|
-
if (op.type === "copy-managed-file" || op.type === "write-managed-file") {
|
|
34
|
-
managedWrites.add(rel(plan, op.path));
|
|
35
|
-
}
|
|
36
|
-
else if (op.type === "write-project-file-if-missing") {
|
|
37
|
-
projectCreates.add(rel(plan, op.path));
|
|
38
|
-
}
|
|
39
|
-
else if (op.type === "update-managed-section") {
|
|
40
|
-
sectionUpdates.push(`${rel(plan, op.path)} [${op.sectionId}]`);
|
|
41
|
-
}
|
|
42
|
-
else if (op.type === "remove-managed-file" || op.type === "remove-managed-section") {
|
|
43
|
-
removals.add(rel(plan, op.path));
|
|
44
|
-
}
|
|
45
|
-
else if (op.type === "preserve") {
|
|
46
|
-
preserves.add(rel(plan, op.path));
|
|
47
|
-
}
|
|
48
|
-
else if (op.type === "mkdir" || op.type === "remove-empty-dir") {
|
|
49
|
-
directories.add(rel(plan, op.path) || ".");
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const managedPaths = [...managedWrites];
|
|
53
|
-
const systemWrites = managedPaths.filter(path => path.startsWith(".yaaw-core/system/"));
|
|
54
|
-
const backupWrites = managedPaths.filter(path => path.startsWith(".yaaw-core/install/backups/"));
|
|
55
|
-
const providerSkillPaths = new Set();
|
|
56
|
-
const providerLines = [];
|
|
57
|
-
for (const id of plan.selectedIntegrations) {
|
|
58
|
-
const adapter = integrations[id];
|
|
59
|
-
const root = normalizePath(relative(plan.projectRoot, adapter.skillsRoot(plan.projectRoot)));
|
|
60
|
-
const paths = managedPaths.filter(path => path === root || path.startsWith(`${root}/`));
|
|
61
|
-
for (const path of paths)
|
|
62
|
-
providerSkillPaths.add(path);
|
|
63
|
-
if (paths.length) {
|
|
64
|
-
providerLines.push(` ${adapter.displayName} skill entrypoints: ${plural(paths.length, "file")} -> ${root}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
const otherManaged = managedPaths.filter(path => !systemWrites.includes(path) &&
|
|
68
|
-
!backupWrites.includes(path) &&
|
|
69
|
-
!providerSkillPaths.has(path));
|
|
17
|
+
const hasRemovals = plan.operations.some(op => op.type === "remove-managed-file" || op.type === "remove-managed-section");
|
|
18
|
+
const hasProjectDefaults = plan.operations.some(op => op.type === "write-project-file-if-missing");
|
|
19
|
+
const tools = plan.selectedIntegrations.map(id => integrations[id].displayName).join(", ");
|
|
70
20
|
const lines = [
|
|
71
21
|
`Project: ${plan.projectRoot}`,
|
|
72
|
-
|
|
73
|
-
`Tools: ${plan.selectedIntegrations.map(id => integrations[id].displayName).join(", ") || "none"}`,
|
|
74
|
-
`Skills exposed: ${plan.selectedSkills.length}`,
|
|
75
|
-
"",
|
|
76
|
-
"Planned file impact:",
|
|
77
|
-
` Managed files to reconcile: ${managedWrites.size}`,
|
|
78
|
-
` Project files created only if missing: ${projectCreates.size}`,
|
|
79
|
-
` Managed file sections to update: ${sectionUpdates.length}`,
|
|
80
|
-
` Managed files/sections to remove: ${removals.size}`,
|
|
81
|
-
` Local overrides explicitly preserved: ${preserves.size}`,
|
|
82
|
-
` Directories prepared/cleaned: ${directories.size}`,
|
|
22
|
+
...(toolSummary(plan) ? [toolSummary(plan)] : []),
|
|
83
23
|
"",
|
|
84
|
-
"
|
|
24
|
+
"Will:"
|
|
85
25
|
];
|
|
86
|
-
if (
|
|
87
|
-
lines.push(
|
|
88
|
-
}
|
|
89
|
-
lines.push(...providerLines);
|
|
90
|
-
if (backupWrites.length) {
|
|
91
|
-
lines.push(` Safety backups: ${plural(backupWrites.length, "file")} -> .yaaw-core/install/backups`);
|
|
92
|
-
}
|
|
93
|
-
if (otherManaged.length) {
|
|
94
|
-
lines.push(` Other YAAW-managed files: ${plural(otherManaged.length, "file")}`);
|
|
26
|
+
if (plan.action === "uninstall") {
|
|
27
|
+
lines.push(" Remove YAAW-SE managed framework and integration files");
|
|
95
28
|
}
|
|
96
|
-
if (
|
|
97
|
-
lines.push(`
|
|
29
|
+
else if (plan.action === "fresh") {
|
|
30
|
+
lines.push(` Install the YAAW-SE engine${tools ? ` and ${tools} skills` : ""}`);
|
|
98
31
|
}
|
|
99
|
-
|
|
100
|
-
lines.push(`
|
|
32
|
+
else {
|
|
33
|
+
lines.push(` Refresh the YAAW-SE engine${tools ? ` and ${tools} skills` : ""}`);
|
|
101
34
|
}
|
|
102
|
-
if (
|
|
103
|
-
lines.push(
|
|
35
|
+
if (hasRemovals) {
|
|
36
|
+
lines.push(" Remove obsolete YAAW-managed files");
|
|
104
37
|
}
|
|
105
|
-
if (
|
|
106
|
-
lines.push(
|
|
38
|
+
if (hasProjectDefaults && plan.action !== "uninstall") {
|
|
39
|
+
lines.push(" Ensure durable project memory defaults exist");
|
|
107
40
|
}
|
|
108
|
-
lines.push("
|
|
41
|
+
lines.push(" Preserve project memory and user-owned content");
|
|
109
42
|
if (plan.warnings.length) {
|
|
110
43
|
lines.push("", "Warnings:", ...plan.warnings.map(warning => ` ${warning}`));
|
|
111
44
|
}
|
|
112
45
|
return lines.join("\n");
|
|
113
46
|
}
|
|
114
47
|
export async function confirmPlan(plan) {
|
|
115
|
-
p.note(formatPlan(plan),
|
|
48
|
+
p.note(formatPlan(plan), `YAAW-SE ${actionLabels[plan.action].toLowerCase()}`);
|
|
116
49
|
const ok = await p.confirm({ message: "Continue?", initialValue: true });
|
|
117
50
|
if (p.isCancel(ok))
|
|
118
51
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-plan.js","sourceRoot":"","sources":["../../src/tui/confirm-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"confirm-plan.js","sourceRoot":"","sources":["../../src/tui/confirm-plan.ts"],"names":[],"mappings":"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"}
|