yaaw-se 0.3.8 → 0.3.9
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 +7 -7
- package/dist/payload/payload.json +1 -1
- package/dist/payload/yaaw-core/system/core/recovery.md +4 -2
- package/dist/payload/yaaw-core/system/roles/orchestrator.md +1 -1
- package/dist/payload/yaaw-core/system/tools/orchestration-engine.mjs +16 -8
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "payload.json",
|
|
31
|
-
"sha256": "
|
|
31
|
+
"sha256": "a0cc2f108e5025cb574d243489bdd7e0696c709261d8d17adbb0653f0f6ec142",
|
|
32
32
|
"bytes": 56
|
|
33
33
|
},
|
|
34
34
|
{
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "yaaw-core/system/core/recovery.md",
|
|
141
|
-
"sha256": "
|
|
142
|
-
"bytes":
|
|
141
|
+
"sha256": "4349ce76ce652d02d5ffefa657075df3f8f064d4068b5b554fbd23af630bc73e",
|
|
142
|
+
"bytes": 1473
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"path": "yaaw-core/system/core/routing.md",
|
|
@@ -243,8 +243,8 @@
|
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"path": "yaaw-core/system/roles/orchestrator.md",
|
|
246
|
-
"sha256": "
|
|
247
|
-
"bytes":
|
|
246
|
+
"sha256": "3142d1032d6506b55a1f8ded59932ad5f72fcb4752bac856dc1ee1e509d9e8b4",
|
|
247
|
+
"bytes": 2036
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
250
|
"path": "yaaw-core/system/roles/planner.md",
|
|
@@ -488,8 +488,8 @@
|
|
|
488
488
|
},
|
|
489
489
|
{
|
|
490
490
|
"path": "yaaw-core/system/tools/orchestration-engine.mjs",
|
|
491
|
-
"sha256": "
|
|
492
|
-
"bytes":
|
|
491
|
+
"sha256": "5058465a85ef3f59d9da1159f7dd871f73930be95e7eaeeb11a1fa6cf4edd3c9",
|
|
492
|
+
"bytes": 18583
|
|
493
493
|
},
|
|
494
494
|
{
|
|
495
495
|
"path": "yaaw-core/system/tools/orchestration-runtime.mjs",
|
|
@@ -7,9 +7,11 @@ Recovery reconstructs the last trustworthy durable boundary; conversation loss i
|
|
|
7
7
|
- `READY` plus valid implementation-start evidence -> `IN_PROGRESS`.
|
|
8
8
|
- `IN_PROGRESS` plus current PASS verification -> `REVIEW_REQUIRED`.
|
|
9
9
|
- `IN_PROGRESS` plus start evidence but no PASS verification -> `implementation.verify-ticket`.
|
|
10
|
-
- `REVIEW_REQUIRED` plus a valid current immutable review -> adopt its result before another Reviewer dispatch.
|
|
10
|
+
- `REVIEW_REQUIRED` plus a valid current immutable review that references current PASS verification -> adopt its result before another Reviewer dispatch.
|
|
11
|
+
- `REVIEW_REQUIRED` plus missing/stale/non-PASS implementation verification -> dispatch `implementation.verify-ticket` without rolling lifecycle state backward.
|
|
12
|
+
- `REVIEW_REQUIRED` plus current PASS verification but missing/stale/non-referencing review -> dispatch `review.review-ticket` for a fresh immutable review round.
|
|
11
13
|
- Source drift -> use routing-policy invalidation, normally `REPLAN_REQUIRED`.
|
|
12
14
|
- Source-current acceptance/repository drift -> `REVIEW_REQUIRED`.
|
|
13
|
-
- Missing proof
|
|
15
|
+
- Missing proof is `BLOCKED` only when no authorized deterministic workflow can safely regenerate or refresh that proof; recoverable proof gaps route to their owning workflow.
|
|
14
16
|
|
|
15
17
|
Each observation applies at most one legal reconciliation and increments transition provenance once.
|
|
@@ -9,7 +9,7 @@ Own continuity, evidence-backed reconciliation, invalidation coordination, publi
|
|
|
9
9
|
3. Consume exactly one typed result. `RECONCILE_REQUIRED` applies exactly one reconciliation, then observation repeats.
|
|
10
10
|
4. Dispatch exactly one semantic handoff only after framework health, reconciliation, source-current validation, repository policy, and intent prerequisites pass.
|
|
11
11
|
5. After worker success, failure, interruption, or lost response, throw away worker text as authority and observe durable reality again.
|
|
12
|
-
6. Continue until intent completion, human input, typed blocker/framework stop, or project `COMPLETE`.
|
|
12
|
+
6. Continue until intent completion, human input, an unrecoverable typed blocker/framework stop, or project `COMPLETE`. Recoverable proof gaps must be routed to the owning verification/review workflow rather than surfaced as terminal blockers.
|
|
13
13
|
|
|
14
14
|
## Boundary
|
|
15
15
|
The Orchestrator is a traffic controller, not a super-agent. It must not author product decisions, architecture, implementation, research conclusions, or acceptance. Framework integrity is a fail-closed execution precondition. The Orchestrator never creates, edits, deletes, or weakens package-managed `.yaaw-core/system/**` content to unblock work; installer repair is the only supported framework mutation path.
|
|
@@ -94,10 +94,9 @@ export function selectReconciliation({state,artifacts:a,evidence=[],reviews=[],r
|
|
|
94
94
|
if(st==="REVIEW_REQUIRED"){
|
|
95
95
|
const v=verify(evidence,id,tr,sr),r=review(reviews,id,tr,sr),to={PASS:"PASS",REPAIR:"REPAIR_REQUIRED",REPLAN:"REPLAN_REQUIRED",BLOCKED:"BLOCKED"}[r?.value?.result];
|
|
96
96
|
if(r&&to&¤tRepo(r,repository)){
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if(!evidenceRefs(r).has(String(v.value.id)))
|
|
100
|
-
return{id:"REVIEW_EVIDENCE_INVALID",kind:"BLOCKED",reason:"current review does not reference current PASS verification"};
|
|
97
|
+
const verificationCurrent=Boolean(v?.value?.schema==="yaaw.evidence/v3"&&v.value.result==="PASS"&¤tRepo(v,repository));
|
|
98
|
+
if(!verificationCurrent)return null;
|
|
99
|
+
if(!evidenceRefs(r).has(String(v.value.id)))return null;
|
|
101
100
|
if(!legal(transitions,"REVIEW_REQUIRED",to))
|
|
102
101
|
return{id:"ILLEGAL_REVIEW_TRANSITION",kind:"BLOCKED",reason:"review result is not a legal lifecycle transition"};
|
|
103
102
|
return transition("REVIEW_RESULT_UNAPPLIED",id,"REVIEW_REQUIRED",to,"REVIEW_"+r.value.result,[r.path,v.path]);
|
|
@@ -125,14 +124,23 @@ export function selectReconciliation({state,artifacts:a,evidence=[],reviews=[],r
|
|
|
125
124
|
return null;
|
|
126
125
|
}
|
|
127
126
|
function deps(id,a,state){return (a?.tickets?.[id]?.meta?.dependencies??[]).every(d=>state.tickets?.[d]==="PASS");}
|
|
128
|
-
function baseRoute(state,a,evidence,p){
|
|
127
|
+
function baseRoute(state,a,evidence,reviews,repository,p){
|
|
129
128
|
if(state?.blocker)return{kind:"BLOCKED",terminal:"BLOCKED",reason:state.blocker.kind??"PROJECT_BLOCKED"};
|
|
130
129
|
if(normalizeStatus(state?.product?.status)!=="ready")return{kind:"DISPATCH_READY",workflow:p.product_unready_workflow};
|
|
131
130
|
const tickets=state?.tickets??{},replan=Object.keys(tickets).sort().find(id=>tickets[id]==="REPLAN_REQUIRED");if(replan)return{kind:"DISPATCH_READY",workflow:"planning.replan",ticket:replan};
|
|
132
131
|
if(normalizeStatus(state?.planning?.status)!=="ready"||state.planning.readiness!=="PASS")return{kind:"DISPATCH_READY",workflow:p.planning_unready_workflow};
|
|
133
132
|
const s=activeSpec(state,a);if(!s||normalizeStatus(s.status)!=="accepted")return{kind:"DISPATCH_READY",workflow:p.missing_spec_workflow};
|
|
134
133
|
const ids=currentTicketIds(state,a);if(!ids.length)return{kind:"DISPATCH_READY",workflow:p.missing_tickets_workflow};
|
|
135
|
-
|
|
134
|
+
const repair=ids.find(x=>tickets[x]==="REPAIR_REQUIRED");if(repair)return{kind:"DISPATCH_READY",workflow:"implementation.repair-ticket",ticket:repair};
|
|
135
|
+
const reviewRequired=ids.find(x=>tickets[x]==="REVIEW_REQUIRED");
|
|
136
|
+
if(reviewRequired){
|
|
137
|
+
const m=a.tickets[reviewRequired].meta,tr=Number(m.revision),sr=Number(s.revision),v=verify(evidence,reviewRequired,tr,sr);
|
|
138
|
+
const verificationCurrent=Boolean(v?.value?.schema==="yaaw.evidence/v3"&&v.value.result==="PASS"&¤tRepo(v,repository));
|
|
139
|
+
if(!verificationCurrent)return{kind:"DISPATCH_READY",workflow:"implementation.verify-ticket",ticket:reviewRequired,reason:"REVIEW_VERIFICATION_RECOVERY_REQUIRED"};
|
|
140
|
+
const r=review(reviews,reviewRequired,tr,sr),reviewCurrent=Boolean(r&¤tRepo(r,repository)&&evidenceRefs(r).has(String(v.value.id)));
|
|
141
|
+
if(!reviewCurrent)return{kind:"DISPATCH_READY",workflow:"review.review-ticket",ticket:reviewRequired,reason:"REVIEW_REFRESH_REQUIRED"};
|
|
142
|
+
return{kind:"DISPATCH_READY",workflow:"review.review-ticket",ticket:reviewRequired,reason:"REVIEW_RESULT_REFRESH_REQUIRED"};
|
|
143
|
+
}
|
|
136
144
|
const ip=ids.find(x=>tickets[x]==="IN_PROGRESS");if(ip){const m=a.tickets[ip].meta;return start(evidence,ip,Number(m.revision),Number(s.revision))?{kind:"DISPATCH_READY",workflow:"implementation.verify-ticket",ticket:ip}:{kind:"ROOT_ACTION",workflow:"orchestration.recover-interruption",ticket:ip,reason:"IMPLEMENTATION_START_EVIDENCE_MISSING"};}
|
|
137
145
|
const ready=ids.find(x=>tickets[x]==="READY"&&deps(x,a,state));if(ready)return{kind:"DISPATCH_READY",workflow:"implementation.implement-ticket",ticket:ready};
|
|
138
146
|
const vals=ids.map(x=>tickets[x]);if(vals.some(x=>x==="BLOCKED"))return{kind:"BLOCKED",terminal:"BLOCKED",reason:"TICKET_BLOCKED"};
|
|
@@ -163,8 +171,8 @@ export function intentComplete(i,state,a){
|
|
|
163
171
|
if(o==="PLANNING_REVIEW")return ["PASS","MISSING_DECISIONS","PRODUCT_GAP","REPLAN","BLOCKED"].includes(state.planning?.readiness);
|
|
164
172
|
return false;
|
|
165
173
|
}
|
|
166
|
-
export function selectRoute({state,artifacts:a,evidence=[],intent,routingPolicy}){
|
|
167
|
-
const normal=baseRoute(state,a,evidence,routingPolicy);if(!intent||intent.desired_outcome==="CONTINUE")return normal;
|
|
174
|
+
export function selectRoute({state,artifacts:a,evidence=[],reviews=[],repository,intent,routingPolicy}){
|
|
175
|
+
const normal=baseRoute(state,a,evidence,reviews,repository,routingPolicy);if(!intent||intent.desired_outcome==="CONTINUE")return normal;
|
|
168
176
|
if(intentComplete(intent,state,a))return{kind:"INTENT_COMPLETE",reason:intent.completion_kind};
|
|
169
177
|
if(intent.requested_workflow&&legalNow(intent.requested_workflow,state,a)){const map={"implementation.implement-ticket":"READY","implementation.repair-ticket":"REPAIR_REQUIRED","review.review-ticket":"REVIEW_REQUIRED"},st=map[intent.requested_workflow],ticket=st&&Object.keys(state.tickets??{}).sort().find(id=>state.tickets[id]===st);return{kind:"DISPATCH_READY",workflow:intent.requested_workflow,...(ticket?{ticket}:{})};}
|
|
170
178
|
if(["REVIEW","REPAIR"].includes(intent.desired_outcome))return{kind:"ROOT_ACTION",workflow:"orchestration.recover-interruption",reason:intent.desired_outcome+"_PRECONDITION_UNSATISFIED"};
|