Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/design/WORKFLOW_PROGRAM_IR.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,16 @@ Agree the target shape. Reversible by definition.
the largest lift and the one most dependent on a real workflow (§7).
- Compile-time model use (one-time labeling/risk/param proposal) lands here,
guarded to preserve the runtime's $0/0-call property.
- **Status:** §3 step [3] (interactive disambiguation) shipped in
`compiler/disambiguation.py`; §3 steps [4]+[5] (multi-trace induction +
held-out validation / quarantine) shipped in `compiler/induction.py`
(`induce_program` / `validate_held_out` / `reproduction_score`). Structural
alignment infers params (values that VARY across traces), loops (a repeated
body whose count DIFFERS), branches (a divergent step under a detectable
condition — guard proposed/flagged), and optional steps — all deterministic,
ZERO model calls; the optional compile-time `Proposer` only PROPOSES (flagged,
never trusted). Contradictory / underdetermined traces are QUARANTINED (no
program emitted, `certified=False`) and routed to the disambiguation flow.

### Stays as-is (do not rebuild)
- The **visual resolution ladder** (`DESIGN.md:152-164`, `resolver.py`) — one
Expand Down
16 changes: 16 additions & 0 deletions openadapt_flow/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,29 @@
StepEffectMining,
mine_step_effects,
)
from openadapt_flow.compiler.induction import (
HeldOutValidation,
InductionResult,
Proposer,
induce_program,
reproduction_score,
validate_held_out,
)

__all__ = [
"compile_recording",
"lint_param_leakage",
"render_workflow_py",
"mine_step_effects",
"StepEffectMining",
# Multi-trace induction (RFC §3 [4]+[5]): one demo is the single-trace
# bootstrap; multiple demos induce a parameterized program or refuse.
"induce_program",
"validate_held_out",
"reproduction_score",
"InductionResult",
"HeldOutValidation",
"Proposer",
"apply_annotations",
"AnnotationResult",
"AnthropicStepAnnotator",
Expand Down
Loading
Loading