Skip to content
Open
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
12 changes: 12 additions & 0 deletions factory/workflow/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,18 @@ def design_workflow(just_plan: bool = False) -> Workflow:
update={"reads": (node.reads or set()) | {".factory/strategy/study-combined.md"}},
)

_strat = wf.nodes["strategist"]
wf.nodes["strategist"] = _strat.model_copy(
update={"post_checks": [
ArtifactCheck(
path=".factory/strategy/current.md",
must_exist=True,
min_size=200,
must_contain=["### Phase 1", "### Hypotheses"],
)
]},
)

wf.edges.extend(
[
*s_edges,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,16 +521,16 @@ def test_build_workflow_has_post_checks(self) -> None:
assert "code_reviewer" in wf.nodes
assert "adversarial_tester" in wf.nodes

def test_design_workflow_inherits_post_checks(self) -> None:
def test_design_workflow_overrides_post_checks(self) -> None:
from factory.workflow.definitions import design_workflow

wf = design_workflow()
# Design inherits from build — verify inherited sentinel values
# Design overrides build's strategist post_checks with dual-format sentinels
strat = wf.nodes["strategist"]
assert isinstance(strat, AgentNode)
assert len(strat.post_checks) > 0
assert "### Phase 1" in strat.post_checks[0].must_contain
assert "### Architecture" in strat.post_checks[0].must_contain
assert "### Hypotheses" in strat.post_checks[0].must_contain

builder = wf.nodes["builder"]
assert isinstance(builder, AgentNode)
Expand Down
Loading