yaaw-se 0.3.3 → 0.3.4
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/cli/commands/install.js +1 -1
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/installer/status.js +74 -0
- package/dist/installer/status.js.map +1 -1
- package/dist/installer/verify.d.ts +2 -1
- package/dist/installer/verify.js +6 -2
- package/dist/installer/verify.js.map +1 -1
- package/dist/integrations/codex-runtime.d.ts +39 -0
- package/dist/integrations/codex-runtime.js +89 -0
- package/dist/integrations/codex-runtime.js.map +1 -1
- package/dist/integrations/codex.js +103 -16
- package/dist/integrations/codex.js.map +1 -1
- package/dist/payload/integrations/codex/yaaw-runtime.md +38 -10
- package/dist/payload/payload-files.json +95 -55
- package/dist/payload/payload.json +1 -1
- package/dist/payload/yaaw-core/system/core/context-loading.md +12 -8
- package/dist/payload/yaaw-core/system/core/dispatch-execution.md +18 -2
- package/dist/payload/yaaw-core/system/core/execution-context.md +31 -23
- package/dist/payload/yaaw-core/system/core/invalidation.md +29 -12
- package/dist/payload/yaaw-core/system/core/io-contract.md +8 -0
- package/dist/payload/yaaw-core/system/core/lifecycle.md +11 -16
- package/dist/payload/yaaw-core/system/core/routing.md +7 -7
- package/dist/payload/yaaw-core/system/core/transitions.md +2 -5
- package/dist/payload/yaaw-core/system/registries/handoff-policy.json +85 -0
- package/dist/payload/yaaw-core/system/roles/orchestrator.md +16 -14
- package/dist/payload/yaaw-core/system/rules/repository-identity.md +31 -17
- package/dist/payload/yaaw-core/system/schemas/evidence-v1.schema.json +28 -0
- package/dist/payload/yaaw-core/system/schemas/evidence-v2.schema.json +19 -0
- package/dist/payload/yaaw-core/system/schemas/evidence.schema.json +20 -31
- package/dist/payload/yaaw-core/system/schemas/repository-identity.schema.json +47 -0
- package/dist/payload/yaaw-core/system/schemas/review-v1.schema.json +19 -0
- package/dist/payload/yaaw-core/system/schemas/review-v2.schema.json +17 -0
- package/dist/payload/yaaw-core/system/schemas/review.schema.json +26 -13
- package/dist/payload/yaaw-core/system/templates/evidence.json +19 -2
- package/dist/payload/yaaw-core/system/templates/handoff.json +9 -15
- package/dist/payload/yaaw-core/system/templates/observed-state.json +13 -1
- package/dist/payload/yaaw-core/system/templates/review.md +14 -5
- package/dist/payload/yaaw-core/system/tools/orchestration-runtime.mjs +689 -0
- package/dist/payload/yaaw-core/system/tools/repository-identity.mjs +92 -0
- package/dist/payload/yaaw-core/system/workflows/implementation/implement-ticket.md +4 -0
- package/dist/payload/yaaw-core/system/workflows/implementation/repair-ticket.md +4 -0
- package/dist/payload/yaaw-core/system/workflows/implementation/verify-ticket.md +3 -0
- package/dist/payload/yaaw-core/system/workflows/orchestration/determine-next-action.md +15 -15
- package/dist/payload/yaaw-core/system/workflows/orchestration/dispatch.md +22 -16
- package/dist/payload/yaaw-core/system/workflows/orchestration/inspect-state.md +12 -15
- package/dist/payload/yaaw-core/system/workflows/orchestration/recover-interruption.md +4 -0
- package/dist/payload/yaaw-core/system/workflows/orchestration/route.md +19 -11
- package/dist/payload/yaaw-core/system/workflows/planning/replan.md +4 -0
- package/dist/payload/yaaw-core/system/workflows/review/inspect-change.md +4 -1
- package/dist/tui/configuration-updates.js +12 -1
- package/dist/tui/configuration-updates.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { lstatSync, readFileSync, readlinkSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
|
|
7
|
+
const ALGORITHM = "yaaw-worktree-v2";
|
|
8
|
+
const CONTROL_OUTPUT_EXCLUDES = [
|
|
9
|
+
".yaaw-core/runtime/**",
|
|
10
|
+
".yaaw-core/project/state.json",
|
|
11
|
+
".yaaw-core/project/evidence/**",
|
|
12
|
+
".yaaw-core/project/reviews/**"
|
|
13
|
+
];
|
|
14
|
+
const EXCLUDE_PATHSPECS = CONTROL_OUTPUT_EXCLUDES.map(path => `:(exclude)${path}`);
|
|
15
|
+
const hash = value => createHash("sha256").update(value).digest("hex");
|
|
16
|
+
function stable(value) {
|
|
17
|
+
if (Array.isArray(value)) return value.map(stable);
|
|
18
|
+
if (value && typeof value === "object") return Object.fromEntries(Object.keys(value).sort().map(k => [k, stable(value[k])]));
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
const canonicalJson = value => JSON.stringify(stable(value));
|
|
22
|
+
function fail(status, message) {
|
|
23
|
+
process.stdout.write(JSON.stringify({
|
|
24
|
+
schema:"yaaw.repository-identity/v2", algorithm:null, status, workspace_scope:".",
|
|
25
|
+
git_root_relation:status==="UNVERSIONED"?"none":"unknown", head_commit:null, dirty:null,
|
|
26
|
+
worktree_digest:null, components:null, changed_paths:[], error:message
|
|
27
|
+
})+"\n");
|
|
28
|
+
process.exitCode=2;
|
|
29
|
+
}
|
|
30
|
+
function git(workspace,args) {
|
|
31
|
+
const r=spawnSync("git",["-C",workspace,...args],{encoding:null,windowsHide:true,maxBuffer:64*1024*1024});
|
|
32
|
+
if(r.error) throw r.error;
|
|
33
|
+
if(r.status!==0) throw new Error((r.stderr??Buffer.alloc(0)).toString("utf8").trim()||`git ${args.join(" ")} exited ${r.status}`);
|
|
34
|
+
return r.stdout??Buffer.alloc(0);
|
|
35
|
+
}
|
|
36
|
+
const nulPaths=buf=>buf.toString("utf8").split("\0").filter(Boolean).map(p=>p.replaceAll("\\","/")).sort();
|
|
37
|
+
function untrackedRecord(workspace,path) {
|
|
38
|
+
const absolute=resolve(workspace,path);
|
|
39
|
+
const stat=lstatSync(absolute);
|
|
40
|
+
if(stat.isSymbolicLink()) return {path,kind:"symlink",sha256:hash(Buffer.from(readlinkSync(absolute),"utf8"))};
|
|
41
|
+
if(stat.isFile()) return {path,kind:"file",sha256:hash(readFileSync(absolute))};
|
|
42
|
+
throw new Error(`unsupported untracked filesystem object: ${path}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const args=process.argv.slice(2);
|
|
46
|
+
let workspaceArg=".";
|
|
47
|
+
for(let i=0;i<args.length;i+=1){
|
|
48
|
+
if(args[i]==="--workspace" && args[i+1]) {workspaceArg=args[i+1]; i+=1;}
|
|
49
|
+
else {process.stderr.write("usage: repository-identity.mjs [--workspace <path>]\n"); process.exit(2);}
|
|
50
|
+
}
|
|
51
|
+
const workspace=resolve(workspaceArg);
|
|
52
|
+
let workspacePrefix;
|
|
53
|
+
try {
|
|
54
|
+
const inside=git(workspace,["rev-parse","--is-inside-work-tree"]).toString("utf8").trim();
|
|
55
|
+
if(inside!=="true") throw new Error("workspace is not inside a Git work tree");
|
|
56
|
+
workspacePrefix=git(workspace,["rev-parse","--show-prefix"]).toString("utf8").trim().replaceAll("\\","/");
|
|
57
|
+
}
|
|
58
|
+
catch(error){ fail("UNVERSIONED",error instanceof Error?error.message:String(error)); }
|
|
59
|
+
|
|
60
|
+
if(workspacePrefix !== undefined){
|
|
61
|
+
try {
|
|
62
|
+
const head=git(workspace,["rev-parse","HEAD"]).toString("utf8").trim();
|
|
63
|
+
const scoped=[".",...EXCLUDE_PATHSPECS];
|
|
64
|
+
const status=git(workspace,["status","--porcelain=v1","-z","--untracked-files=all","--",...scoped]);
|
|
65
|
+
const unstaged=git(workspace,["diff","--binary","--no-ext-diff","--no-textconv","HEAD","--",...scoped]);
|
|
66
|
+
const staged=git(workspace,["diff","--cached","--binary","--no-ext-diff","--no-textconv","HEAD","--",...scoped]);
|
|
67
|
+
const untracked=nulPaths(git(workspace,["ls-files","--others","--exclude-standard","-z","--",...scoped])).map(p=>untrackedRecord(workspace,p));
|
|
68
|
+
const tracked=new Set([
|
|
69
|
+
...nulPaths(git(workspace,["diff","--name-only","-z","HEAD","--",...scoped])),
|
|
70
|
+
...nulPaths(git(workspace,["diff","--cached","--name-only","-z","HEAD","--",...scoped]))
|
|
71
|
+
]);
|
|
72
|
+
const components={
|
|
73
|
+
status_sha256:hash(status),
|
|
74
|
+
unstaged_diff_sha256:hash(unstaged),
|
|
75
|
+
staged_diff_sha256:hash(staged),
|
|
76
|
+
untracked_manifest_sha256:hash(Buffer.from(canonicalJson(untracked),"utf8"))
|
|
77
|
+
};
|
|
78
|
+
const payload={algorithm:ALGORITHM,workspace_scope:".",head_commit:head,excluded:CONTROL_OUTPUT_EXCLUDES,...components,untracked};
|
|
79
|
+
const changed_paths=[
|
|
80
|
+
...[...tracked].sort().map(path=>({path,kind:"tracked"})),
|
|
81
|
+
...untracked.map(x=>({path:x.path,kind:"untracked",sha256:x.sha256}))
|
|
82
|
+
].sort((a,b)=>a.path.localeCompare(b.path));
|
|
83
|
+
process.stdout.write(JSON.stringify({
|
|
84
|
+
schema:"yaaw.repository-identity/v2",algorithm:ALGORITHM,status:"READY",workspace_scope:".",
|
|
85
|
+
git_root_relation:workspacePrefix?"ancestor":"same",head_commit:head,dirty:status.length>0,
|
|
86
|
+
worktree_digest:"sha256:"+hash(Buffer.from(canonicalJson(payload),"utf8")),
|
|
87
|
+
components,changed_paths,error:null
|
|
88
|
+
})+"\n");
|
|
89
|
+
} catch(error) {
|
|
90
|
+
if(process.exitCode!==2) fail("IDENTITY_FAILED",error instanceof Error?error.message:String(error));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -20,3 +20,7 @@ Repository status is `READY`. One ticket must be admitted as `READY`, dependenci
|
|
|
20
20
|
|
|
21
21
|
## Output
|
|
22
22
|
Reviewable implementation plus evidence, or explicit replan/blocker state.
|
|
23
|
+
|
|
24
|
+
## Evidence identity
|
|
25
|
+
|
|
26
|
+
Use the canonical repository identity utility for implementation evidence. Do not implement a private worktree digest. Changeability requirements remain in force.
|
|
@@ -16,3 +16,7 @@ Ticket is `REPAIR_REQUIRED` and latest review result is `REPAIR` against the sam
|
|
|
16
16
|
|
|
17
17
|
## Output
|
|
18
18
|
Repaired reviewable implementation or replan/blocker result.
|
|
19
|
+
|
|
20
|
+
## Repair identity
|
|
21
|
+
|
|
22
|
+
After bounded repair and verification, bind evidence to the canonical repository identity and return `REVIEW_REQUIRED`. Changeability requirements remain in force.
|
|
@@ -15,3 +15,6 @@ Ticket requirements/tests, changed surface, project tooling/rules, current repos
|
|
|
15
15
|
|
|
16
16
|
## Output
|
|
17
17
|
Evidence record(s). Verification never transitions a ticket to PASS; only Reviewer can accept.
|
|
18
|
+
|
|
19
|
+
## Verification identity
|
|
20
|
+
After verification commands finish, invoke `.yaaw-core/system/tools/repository-identity.mjs` and record that exact output in `yaaw.evidence/v2`. Do not reserialize it through a second digest implementation. Replaceable `.yaaw-core/runtime/**` coordination files are excluded by canonical `yaaw-worktree-v2`; all semantic/project/application changes remain in the basis. Changeability requirements remain in force.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# Determine next action
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Inputs
|
|
7
|
-
Current observed-state snapshot, reconciled state, `.yaaw-core/system/core/routing.md`, workflow/execution/artifact/role-I/O/expertise registries, and optional current intent.
|
|
4
|
+
Expose the deterministic route/handoff preparation contract without duplicating routing logic in the Orchestrator model.
|
|
8
5
|
|
|
9
6
|
## Procedure
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
Normal orchestration satisfies this workflow by executing:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
node .yaaw-core/system/tools/orchestration-runtime.mjs --workspace <WORKSPACE_ROOT>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The runtime reads the machine routing/execution/role-I/O/handoff policies, current durable metadata, framework basis, and canonical repository identity; it then returns exactly one typed result and, only for a dispatchable non-Orchestrator semantic workflow, persists one `yaaw.handoff/v2`.
|
|
14
|
+
|
|
15
|
+
- `DISPATCH_READY`: consume the persisted handoff; do not rebuild it.
|
|
16
|
+
- `RECONCILE_REQUIRED`: execute only `orchestration.reconcile-state` before preparing again.
|
|
17
|
+
- `ROOT_ACTION`: execute only the selected Orchestrator recovery workflow.
|
|
18
|
+
- `TERMINAL`/`BLOCKED`/`FRAMEWORK_STOP`: write no executable handoff.
|
|
18
19
|
|
|
19
20
|
## Boundary
|
|
20
|
-
Do not perform target
|
|
21
|
+
Do not perform target-role semantic work here. Do not hand-serialize a handoff or select expertise outside the deterministic handoff policy.
|
|
21
22
|
|
|
22
23
|
## Framework write guard
|
|
23
|
-
|
|
24
|
-
Before persisting a handoff, verify that its write set is a subset of the selected role's canonical artifact writes and contains no installer-managed artifact or `.yaaw-core/system/**` path. A framework defect is a stop condition, never a target workflow.
|
|
24
|
+
The runtime verifies selected reads/writes against `role-io.json`; an unauthorized artifact class or missing machine contract is `FRAMEWORK_CONTRACT_INCONSISTENCY`, never a semantic reroute.
|
|
@@ -4,26 +4,32 @@
|
|
|
4
4
|
Execute exactly one already-selected canonical workflow. This file is not the orchestration loop.
|
|
5
5
|
|
|
6
6
|
## Inputs
|
|
7
|
-
`.yaaw-core/runtime/handoff.json`
|
|
7
|
+
`.yaaw-core/runtime/handoff.json` produced by the deterministic orchestration runtime.
|
|
8
8
|
|
|
9
9
|
## Procedure
|
|
10
|
-
1.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
1. Immediately before loading target semantics, execute:
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
node .yaaw-core/system/tools/orchestration-runtime.mjs --workspace <WORKSPACE_ROOT> --check-handoff
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. Require `HANDOFF_FRESH`. `FRAMEWORK_STOP`, `RECONCILE_REQUIRED`, `ROOT_ACTION`, `TERMINAL`, `BLOCKED`, or `HANDOFF_STALE` returns control to `orchestration.route`; do not execute the stale target. This single freshness check reuses the same framework, repository-identity, artifact, routing, and handoff serialization implementation that created the handoff.
|
|
17
|
+
3. Resolve the handoff's execution-context policy from `execution-policy.json` and `.yaaw-core/system/core/dispatch-execution.md`.
|
|
18
|
+
4. If the target is an Orchestrator workflow or policy is `ROOT_ONLY`, execute in the current root context.
|
|
19
|
+
5. Otherwise ask the active host adapter to resolve the selected authority's required effective execution profile. This is host execution metadata; do not write provider model/reasoning identifiers into the canonical handoff.
|
|
20
|
+
6. Prefer the adapter's exact named authority worker when available. If named selection is unavailable before child creation, the adapter may choose a generic isolated mechanism only after proving profile equivalence or authoritatively correcting every mismatched profile dimension.
|
|
21
|
+
7. If an isolated mechanism exists but cannot guarantee the required profile, return `BLOCKED:HOST_EXECUTION_PROFILE_UNAVAILABLE`. If strict isolation is required and no isolated mechanism exists at all, return `BLOCKED:HOST_ISOLATION_UNAVAILABLE`.
|
|
22
|
+
8. In an adapter `auto` mode, inline fallback is legal only when the adapter proves the inline/root execution profile equivalent to the required authority profile. A deliberately selected adapter `inline` mode is an explicit opt-out from per-role model isolation.
|
|
23
|
+
9. If a child was already created and then failed, do **not** switch mechanisms or retry blindly; return to deterministic reality preparation first.
|
|
24
|
+
10. For Implementer or Reviewer, consult `.yaaw-core/runtime/dispatch-failures.json` only after inspection. If the unchanged handoff basis has reached the host-configured execution-failure threshold, request the configured host capability-fallback profile for this attempt. Resolve and preserve that fallback profile using the same fidelity rules. If the fallback itself already failed with no progress on this basis, return `BLOCKED:AUTHORITY_EXECUTION_FAILED`.
|
|
25
|
+
11. A pre-execution `HOST_EXECUTION_PROFILE_UNAVAILABLE` or `HOST_ISOLATION_UNAVAILABLE` stop does not increment the execution-failure ledger because no authority child executed.
|
|
26
|
+
12. The executing context loads only the target role contract, selected workflow contract, exact handoff reads, selected expertise, and minimal relevant repository context.
|
|
27
|
+
13. Execute the target workflow once. A worker may not route or spawn another YAAW authority role.
|
|
28
|
+
14. Require the expected durable output/state/evidence or an explicit legal typed stop/prerequisite result.
|
|
29
|
+
15. Treat any child response only as an execution signal; do not accept it as project truth without re-inspection.
|
|
30
|
+
16. Mark/remove the consumed runtime handoff and return control to `orchestration.route`.
|
|
24
31
|
|
|
25
32
|
Never recursively dispatch `orchestration.dispatch` as its own target. A target role never dispatches a peer.
|
|
26
33
|
|
|
27
34
|
## Package boundary
|
|
28
|
-
|
|
29
35
|
Dispatch rejects any handoff whose writes include installer-managed artifacts or `.yaaw-core/system/**`. An admitted application-file write never authorizes package framework mutation.
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
# Inspect state
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
-
Create a non-mutating observed-reality snapshot
|
|
5
|
-
|
|
6
|
-
## Inputs
|
|
7
|
-
Resolved workspace root, installation manifest/framework-integrity result, `.yaaw-core/project/state.json`, product/engineering/research/spec/ticket/review/evidence/runtime files, project rules, and available repository/application reality.
|
|
4
|
+
Create a non-mutating observed-reality snapshot using the same deterministic runtime implementation used by normal orchestration.
|
|
8
5
|
|
|
9
6
|
## Procedure
|
|
10
|
-
1. Resolve `WORKSPACE_ROOT` using `.yaaw-core/system/core/execution-context.md
|
|
11
|
-
2. Execute
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
1. Resolve `WORKSPACE_ROOT` using `.yaaw-core/system/core/execution-context.md`.
|
|
8
|
+
2. Execute:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
node .yaaw-core/system/tools/orchestration-runtime.mjs --workspace <WORKSPACE_ROOT> --inspect-only
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
3. Consume `.yaaw-core/runtime/observed-state.json` and the typed `INSPECTED`/framework-stop result.
|
|
15
|
+
4. The runtime compares current product/engineering/spec/ticket revisions and, for accepted work, current review/verification presence and repository identity so stale acceptance becomes a reconciliation input rather than a direct terminal route.
|
|
16
|
+
5. Do not independently invoke Git, calculate `worktree_digest`, discover artifact locations, or serialize a second observation.
|
|
20
17
|
|
|
21
18
|
## Output
|
|
22
|
-
Observed-state snapshot only; no semantic
|
|
19
|
+
Observed-state snapshot only; no semantic/ticket-state mutation and no executable handoff construction in `--inspect-only` mode.
|
|
@@ -15,3 +15,7 @@ Active/recent artifact, state claims, runtime caches, repository identity/histor
|
|
|
15
15
|
6. Return control to `orchestration.route` for normal next-action selection.
|
|
16
16
|
|
|
17
17
|
Never repeat destructive work merely because a context ended.
|
|
18
|
+
|
|
19
|
+
## Acceptance recovery
|
|
20
|
+
|
|
21
|
+
A source-current stale `PASS` is recovered through `REVIEW_REQUIRED`. Do not dispatch Planner unless contract invalidation is independently proven.
|
|
@@ -3,24 +3,32 @@
|
|
|
3
3
|
## Purpose
|
|
4
4
|
Continuously restore project reality and execute one safe canonical workflow at a time until a true stop condition.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
|
|
6
|
+
## Deterministic preparation
|
|
7
|
+
Normal routing uses one command per basis:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
node .yaaw-core/system/tools/orchestration-runtime.mjs --workspace <WORKSPACE_ROOT>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This command performs framework integrity, canonical repository identity, durable metadata inspection, route selection, and handoff construction together. Do not separately reconstruct those stages in shell/Python/model reasoning.
|
|
8
14
|
|
|
9
15
|
## Procedure
|
|
10
16
|
Repeat:
|
|
11
|
-
1.
|
|
12
|
-
2.
|
|
13
|
-
3. execute `orchestration.reconcile-state`
|
|
14
|
-
4. execute
|
|
15
|
-
5.
|
|
16
|
-
6. execute `orchestration.dispatch` for the
|
|
17
|
+
1. run deterministic preparation once;
|
|
18
|
+
2. on `FRAMEWORK_STOP`, invalidate executable handoffs and stop with the typed framework failure;
|
|
19
|
+
3. on `RECONCILE_REQUIRED`, execute `orchestration.reconcile-state` only, then return to step 1;
|
|
20
|
+
4. on `ROOT_ACTION`, execute the returned Orchestrator workflow only, then return to step 1;
|
|
21
|
+
5. on `TERMINAL` or `BLOCKED`, stop;
|
|
22
|
+
6. on `DISPATCH_READY`, execute `orchestration.dispatch` for the persisted handoff;
|
|
17
23
|
7. require the dispatched execution to persist its authorized durable output or legal typed prerequisite/stop result;
|
|
18
|
-
8. whether dispatch reports success, failure, interruption, or no response,
|
|
24
|
+
8. whether dispatch reports success, failure, interruption, or no response, return to step 1 before another semantic workflow.
|
|
25
|
+
|
|
26
|
+
`orchestration.inspect-state` and `orchestration.determine-next-action` remain canonical compatibility/debug workflows, but the normal loop does not execute them as separate model-driven reconstruction passes.
|
|
19
27
|
|
|
20
28
|
There is no direct `worker A result -> worker B` authority chain. Reality reconstruction always sits between authority-role dispatches.
|
|
21
29
|
|
|
22
30
|
## Loop safety
|
|
23
|
-
If the same repository
|
|
31
|
+
If the same repository basis, lifecycle state, route, and expected output repeat without durable mutation/evidence change, stop as `BLOCKED` with `no_progress` rather than spinning.
|
|
24
32
|
|
|
25
33
|
## Stop conditions
|
|
26
|
-
Framework integrity unavailable/unhealthy; framework contract inconsistency; 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`.
|
|
34
|
+
Framework integrity unavailable/unhealthy; framework contract inconsistency; 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/profile fidelity; host requires approval for consequential action; or accepted scope is terminal `COMPLETE`.
|
|
@@ -16,3 +16,7 @@ Repository evidence, product revision, review finding, or invalidation has made
|
|
|
16
16
|
|
|
17
17
|
## Output
|
|
18
18
|
Current engineering contract plus updated downstream admission state.
|
|
19
|
+
|
|
20
|
+
## Admission guard
|
|
21
|
+
|
|
22
|
+
Repository identity change alone is not sufficient reason to replan. Require stale source/contract revisions or Reviewer `REPLAN` evidence.
|
|
@@ -9,9 +9,12 @@ Current ticket/spec/product/engineering revisions, repository status `READY` plu
|
|
|
9
9
|
## Procedure
|
|
10
10
|
1. If repository status is not `READY`, return `BLOCKED`/`PRECONDITION_UNSATISFIED:REPOSITORY_IDENTITY_UNAVAILABLE`; do not review against ambiguous identity.
|
|
11
11
|
2. Revalidate source revisions and reject stale review inputs.
|
|
12
|
-
3. Compute/record repository identity using `rules/repository-identity.md
|
|
12
|
+
3. Compute/record repository identity using `rules/repository-identity.md` and the canonical utility.
|
|
13
13
|
4. Inspect actual diff/files/tests/evidence; ignore implementation summaries when they conflict with observed work.
|
|
14
14
|
5. Identify acceptance criteria, failure paths, regressions, and domain-specific requirements that must be checked.
|
|
15
15
|
|
|
16
16
|
## Output
|
|
17
17
|
Review inspection tied to exact repository and contract identity.
|
|
18
|
+
|
|
19
|
+
## Repository basis
|
|
20
|
+
Obtain repository identity from `.yaaw-core/system/tools/repository-identity.mjs`. Do not whitelist `.codex`, `.agents`, provider directories, or project/application files merely by path ownership. Only replaceable `.yaaw-core/runtime/**` coordination caches are excluded by the canonical identity algorithm so orchestration cannot invalidate its own handoff basis.
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
|
+
const CODEX_FAILURE_FALLBACK_CHANGE = "codex-authority-failure-fallback";
|
|
3
|
+
function preservationNotice(update) {
|
|
4
|
+
const lines = [
|
|
5
|
+
" Quick Update installed support for these capabilities without changing your existing provider setup.",
|
|
6
|
+
" Your current configuration and selected profile were preserved."
|
|
7
|
+
];
|
|
8
|
+
if (update.integrationId === "codex" && update.changes.some(change => change.id === CODEX_FAILURE_FALLBACK_CHANGE)) {
|
|
9
|
+
lines.push(" Astra fallback is available, but Quick Update did not enable it or replace your current Codex settings.", " To enable it: run `yaaw config codex` and choose Recommended, or choose Custom and configure Failure fallback.");
|
|
10
|
+
}
|
|
11
|
+
return lines;
|
|
12
|
+
}
|
|
2
13
|
export function formatConfigurationUpdates(updates) {
|
|
3
14
|
return updates.flatMap(update => [
|
|
4
15
|
update.displayName,
|
|
5
16
|
...update.changes.map(change => ` ${change.title}: ${change.summary}`),
|
|
6
|
-
|
|
17
|
+
...preservationNotice(update),
|
|
7
18
|
` Review: ${update.command}`,
|
|
8
19
|
""
|
|
9
20
|
]).join("\n").trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-updates.js","sourceRoot":"","sources":["../../src/tui/configuration-updates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAIpC,MAAM,UAAU,0BAA0B,CAAC,OAA8B;IACvE,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,WAAW;QAClB,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC;QACvE,
|
|
1
|
+
{"version":3,"file":"configuration-updates.js","sourceRoot":"","sources":["../../src/tui/configuration-updates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAIpC,MAAM,6BAA6B,GAAG,kCAAkC,CAAC;AAEzE,SAAS,kBAAkB,CAAC,MAA2B;IACrD,MAAM,KAAK,GAAG;QACZ,wGAAwG;QACxG,mEAAmE;KACpE,CAAC;IAEF,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,6BAA6B,CAAC,EAAE,CAAC;QACnH,KAAK,CAAC,IAAI,CACR,2GAA2G,EAC3G,kHAAkH,CACnH,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAA8B;IACvE,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,WAAW;QAClB,GAAG,MAA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