Remove the predict phase; contract-driven resolution
Skills now have a single `act(ctx, request)` body phase. The free-string `Prediction.text` handoff, the `Prediction` type, and the predict phase are gone. - Resolution is pipeline-owned: the tiered config merge (global -> category -> skill) fills contract vars; the authoring-time SemIf search now searches the whole cascade; unresolved vars pause pre-act (`pre_act`, renamed from `pre_predict`) and are asked of the human one at a time. - The data contract is a module-level `CONTRACT` constant in the body, parsed by `parse_contract`; `contract.json` is a derived mirror. The separate `generate_data_contract` codegen call is removed. - Candidate selection stays in the body: a set of candidates (bridge endpoint, direct API, hard-coded list) gets a SemIf query, and the decisions ride back on `ActionResult.decisions` to be logged with the run outcome (phase `act`). - `assess:outcome`/`assess:requeue` state carries the resolved inputs (secrets redacted by name) so the decision sees the full query -> resolution -> action path. - Authoring validation enforces: compiles + `act`; `INTEGRATION` flat and valid; `CONTRACT` flat str->str; every CONTRACT key actually read from `ctx.config`. - Test-regen ladder narrowed to code/test (the contract rides in the code). SKILL.md/TESTGEN.md rewritten; seeds (calendar.next_event, simplex.next_message, simplex.connect_link) rewritten to act-only + CONTRACT; docs updated. BREAKING: persisted bodies in data/skills/ must be regenerated.
This commit is contained in:
1 parent
4a62e794a5
commit
567c280ee2
26 files changed
+679
-706
No files matched your search
+5
-6
@@ -213,11 +213,11 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
|
||||
return check
|
||||
|
||||
def make_regen_decision(run_id: str):
|
||||
"""3-option SemIf decision on a failing skill test: which artifact to
|
||||
regenerate (code, contract, or test — fixture data lives inside the
|
||||
test, so a fixture fix is a test regen). Recorded as a trace-only event
|
||||
(kind `codegen_regen`) — never in the decision log. Engine unavailable
|
||||
at call time degrades to `regen_test`."""
|
||||
"""2-option SemIf decision on a failing skill test: which artifact to
|
||||
regenerate (the body — which carries the contract — or the test; fixture
|
||||
data lives inside the test, so a fixture fix is a test regen). Recorded
|
||||
as a trace-only event (kind `codegen_regen`) — never in the decision
|
||||
log. Engine unavailable at call time degrades to `regen_test`."""
|
||||
def decide(reason: str) -> str:
|
||||
decision = DecisionRequest(
|
||||
state=f"[testgen {codegen.model}] skill test failed. {reason[-1200:]}",
|
||||
@@ -225,7 +225,6 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
|
||||
options=[
|
||||
Option("regen_code", "Regenerate the skill body code."),
|
||||
Option("regen_test", "Regenerate the test only."),
|
||||
Option("regen_contract", "Regenerate the data contract."),
|
||||
],
|
||||
)
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user