Skip to content

Commit e6e9939

Browse files
feat: cross-run learning registry, narration stripping, and CLI improvements
Three related improvements that together make the pipeline learn across runs, produce cleaner outputs, and report its operating mode clearly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 78bcab4 commit e6e9939

4 files changed

Lines changed: 594 additions & 12 deletions

File tree

researchclaw/cli.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def cmd_run(args: argparse.Namespace) -> int:
5555
topic = cast(str | None, args.topic)
5656
output = cast(str | None, args.output)
5757
from_stage_name = cast(str | None, args.from_stage)
58-
auto_approve = cast(bool, args.auto_approve)
58+
auto_approve_cli = cast(bool, args.auto_approve)
5959
skip_preflight = cast(bool, args.skip_preflight)
6060
resume = cast(bool, args.resume)
6161
skip_noncritical = cast(bool, args.skip_noncritical_stage)
@@ -71,17 +71,18 @@ def cmd_run(args: argparse.Namespace) -> int:
7171
new_research = _dc_gd.replace(config.research, graceful_degradation=False)
7272
config = _dc_gd.replace(config, research=new_research)
7373

74-
# Derive gate behavior from project.mode (CLI --auto-approve overrides)
75-
mode = config.project.mode.lower()
76-
if auto_approve:
77-
# Explicit CLI flag takes precedence over config mode
78-
stop_on_gate = False
79-
elif mode == "full-auto":
74+
# Derive gate behavior from project.mode, CLI --auto-approve overrides
75+
project_mode = config.project.mode
76+
if auto_approve_cli or project_mode == "full-auto":
8077
auto_approve = True
8178
stop_on_gate = False
82-
else:
83-
# "semi-auto" and "docs-first" should block on gates
79+
elif project_mode == "semi-auto":
80+
auto_approve = False
8481
stop_on_gate = True
82+
else: # "docs-first" or unknown
83+
auto_approve = False
84+
stop_on_gate = True
85+
8586

8687
if topic:
8788
import dataclasses
@@ -139,7 +140,8 @@ def cmd_run(args: argparse.Namespace) -> int:
139140
print(f" Run ID: {run_id}")
140141
print(f" Topic: {config.research.topic}")
141142
print(f" Output: {run_dir}")
142-
print(f" Mode: {config.project.mode}")
143+
print(f" Mode: {project_mode} (experiment: {config.experiment.mode})")
144+
print(f" Gates: {'auto-approve' if auto_approve else 'HITL blocking'}")
143145
print(f" From: Stage {int(from_stage)}: {from_stage.name}")
144146
print()
145147

0 commit comments

Comments
 (0)