symfonic.evals.procedural_pack¶
procedural_pack ¶
The optional pack for a procedure a deployment learned, reviewed and enforces.
Five facts have to be true before a learned procedure governs anything, and each of them is a place a deployment silently has nothing:
- a consolidation cycle promoted a draft out of what the scope actually did;
- while still a draft it was absent from the prompt and did not govern tools;
- a reviewer saw that draft through the public review door and approved it, naming the tool it governs and the state that must hold;
- the approved procedure is persisted, so it survives the process that approved it;
- the tool gate reads that same procedure on both enforcement turns, admits the call whose state holds and refuses the one whose state does not.
So this pack takes the deployment's own promotion and review evidence rather
than a boolean, and every assertion below is against a value the deployment
read back out of its store. procedural_review_rows is the projection: it
is spelled once, here, so a target cannot invent a shape that happens to match
what a pack expects.
The gate is tools plus two traits, and not the memory name. Memory is
the umbrella the review caught: a procedure is promoted into a procedural
store and reviewed through an admin door, neither of which is the memory
capability an agent folds -- the shipped chain composes neither on the agent
-- so requiring the name would make a working deployment not-applicable while
still admitting one that merely remembers.
Per-step state is explicit and required. The two enforcement turns differ
only in the state the precondition is judged against, so a pack that carried
no state would be sending the same turn twice and calling the second one a
refusal. satisfied_state and blocked_state must differ, and the pack
refuses to build if they do not.
procedural_review_rows ¶
What the review door holds, as (status, governed tool) per row.
The projection a target publishes so the pack can assert on the review queue without the queue's content reaching a report. Sorted, so two runs of the same deployment produce the same evidence.
A draft nobody reviewed projects as ("draft", "") -- it has no status
a gate acts on and governs no tool -- which is exactly what distinguishes
it from the approved row this pack requires.
Source code in src/symfonic/evals/procedural_pack.py
procedural_skill_pack ¶
procedural_skill_pack(evidence: CapabilityEvidence, *, demonstrations: Sequence[str], review_prompt: str, draft_prompt: str, satisfied_prompt: str, blocked_prompt: str, satisfied_state: Mapping[str, Any], blocked_state: Mapping[str, Any], draft_state: Mapping[str, Any], action_tool: str, procedure_fragment: str, ledger: SideEffectLedger, promotion_attribute: str = 'procedural_promoted', review_attribute: str = 'procedural_review', review_identity_attribute: str = 'procedural_review_ids', enforcement_identity_attribute: str = 'procedural_enforcement_ids', precondition_stage: str = PRECONDITION_STAGE, restart_before_enforcement: bool = True, conversation: str = 'procedural', policy: TrialPolicy = _DEFAULT_POLICY) -> PackResolution
Demonstrate, promote, approve, persist, then enforce one procedure (SC-16).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
demonstrations
|
Sequence[str]
|
the turns that give the consolidation something to generalise. The last one is where the promotion becomes visible, so the target must have run its cycle by then and must publish the cycle's own promoted count -- not a turn counter. |
required |
review_prompt
|
str
|
the operator turn under which the draft is reviewed. The evidence is the review door's listing, so an approval that did not reach the store fails here even when the answer says it did. |
required |
draft_prompt
|
str
|
a tool-calling turn before review; it proves the draft is absent from the prompt and inert at the enforcement gate. |
required |
satisfied_state
|
Mapping[str, Any]
|
the turn state under which the approved procedure's precondition holds. |
required |
blocked_state
|
Mapping[str, Any]
|
the same request with it unmet. Must differ from
|
required |
draft_state
|
Mapping[str, Any]
|
explicit state for the pre-approval tool call. |
required |
action_tool
|
str
|
the tool the approved procedure is allowed to call, and the tool the review row must name. |
required |
procedure_fragment
|
str
|
text that must appear in the recall block once the procedure is approved. Checked against model input, because an answer that repeats a procedure proves only that the model can repeat a procedure. |
required |
ledger
|
SideEffectLedger
|
the fixture the action tool applies its effect through. |
required |
promotion_attribute
|
str
|
where the target publishes the promoted count its consolidation cycle reported. |
'procedural_promoted'
|
review_attribute
|
str
|
where the target publishes
:func: |
'procedural_review'
|
review_identity_attribute
|
str
|
approved procedure identity digests read through the review door. |
'procedural_review_ids'
|
enforcement_identity_attribute
|
str
|
identity digests from the procedures the actual precondition callback read during this turn. |
'procedural_enforcement_ids'
|
restart_before_enforcement
|
bool
|
rebuild the deployment before the turn that enforces. On by default, because everything above the store is process state: a procedure that only governs until the next restart is not one a deployment can rely on. |
True
|
The last step is the one that discriminates. A refused call still reaches the gate, so the pack requires the round to show a rejected precondition stage, a tool call, zero successful executions, and a side-effect ledger whose applied count did not move from the previous step. A tool that ran anyway moves that count, and no wording in the answer can hide it.
Source code in src/symfonic/evals/procedural_pack.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |