feat: wire preferences through run cycle into reflect prior

This commit is contained in:
AKhozya
2026-07-07 11:31:29 +01:00
parent 25b0f39405
commit 3b0af4668c
4 changed files with 8 additions and 0 deletions
+4
View File
@@ -91,6 +91,8 @@ def _add_common(p: argparse.ArgumentParser) -> None:
p.add_argument("--progress", action="store_true",
help="print phase progress to stderr")
p.add_argument("--auto-adopt", action="store_true")
p.add_argument("--preferences", default="",
help="free-text house rules injected into the optimizer's reflect step")
p.add_argument("--json", action="store_true")
@@ -118,6 +120,8 @@ def _cfg_from_args(args, task_meta: Dict[str, Any] | None = None) -> Any:
overrides["lookback_hours"] = lh
if getattr(args, "edit_budget", 0):
overrides["edit_budget"] = args.edit_budget
if getattr(args, "preferences", ""):
overrides["preferences"] = args.preferences
if getattr(args, "max_sessions", 0):
overrides["max_sessions_per_night"] = args.max_sessions
if getattr(args, "max_tasks", 0):
+1
View File
@@ -41,6 +41,7 @@ DEFAULTS: Dict[str, Any] = {
"gate_mode": "on", # "on" (validation-gated) | "off" (greedy, no hard filter)
"codex_path": "", # "" => auto-detect the real @openai/codex binary
"edit_budget": 4, # textual learning rate (max edits/night)
"preferences": "", # free-text house rules injected into reflect as a prior
"gate_metric": "mixed", # hard | soft | mixed (mixed best for tiny holdouts)
"gate_mixed_weight": 0.5,
"replay_mode": "mock", # "mock" (sandboxed prompt) | "fresh" (worktree)
+1
View File
@@ -120,6 +120,7 @@ def run_sleep_cycle(
codex_path=cfg.get("codex_path", ""),
project_dir=project,
)
backend.preferences = cfg.get("preferences", "")
_progress(cfg, f"night {night}: project={project} backend={backend.name}")
# ── live skill/memory docs ───────────────────────────────────────────