feat: end-to-end task→workflow→outer-loop creation pipeline (#1478) - #1481
Draft
colehurwitz wants to merge 8 commits into
Draft
feat: end-to-end task→workflow→outer-loop creation pipeline (#1478)#1481colehurwitz wants to merge 8 commits into
colehurwitz wants to merge 8 commits into
Conversation
Sentrux Quality ReportAbsoluteDiff (vs base branch) |
6 tasks
…r loop (#1478) Phase 1 of the task→workflow→outer-loop creation pipeline. - Add resolve_task() to factory/task.py: 3-step resolution (TOML file → Python file → module:Class string) with project-relative path support - Add --task flag to both calibrate and evaluate subcommands in factory/cli/outer_loop.py, using the shared resolver (one helper, not two — lesson from #1449) - Keep --task-module as a functional escape hatch - Resolved tasks attach via set_task() for highest precedence in SwarmConfig.get_task() - 12 new tests covering all resolution paths and equivalence - Updated docs/outer-loop.md with --task documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 2 of the task→workflow→outer-loop creation pipeline. - Add task_setup_workflow() to factory/workflow/definitions.py: fork(researcher_domain, researcher_verification) → join → CEO gate → strategist → user gate → builder → FnNode(validate) → archivist - Register in _get_builtin_registry() for automatic discovery - Add WORKFLOW_META entry in skill_export.py for SKILL.md generation - Add 'task-setup' to CEO_MODES in _helpers.py - Add mode suffix in _task_builder.py for CEO task string - Add mode detection line in ceo.md prompt - SKILL.md auto-generates via skill_cache (139 lines) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
) Phase 3 of the task→workflow→outer-loop creation pipeline. - Add --task CLI flag to factory ceo parser for task-aware create mode - Add _build_task_aware_directive() in _task_builder.py: resolves the task, extracts scoring contract/constraints, injects directive section with OptKnob mechanical derivation table (same directive-injection pattern as Plugin Package and Update Existing Mode extensions) - Wire --task through cmd_ceo → _execute_ceo → _build_ceo_task - Update create_workflow() strategist prompt to handle Task-Aware directive and include OptKnob generation instructions - Update create_workflow() builder prompt with knob_values/knob_bounds and compose.py validate_composition() post-build gate - 12 new tests for directive injection and task-setup workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…on (#1478) Phase 4 of the task→workflow→outer-loop creation pipeline. - Add optional threshold: float | None = None field to ScoringContract - Parse threshold from TOML [scoring] section via from_toml() - Add domain-level OptKnob suggestion instructions to the task-aware create mode directive: CEO-gated, Strategist-proposed, restricted to prompt/model/threshold kinds (never topology), expandable=False by default - Use ScoringContract.threshold for threshold-kind domain knobs when scoring.method is json with a numeric metric_path - 6 new tests for threshold field and domain-level knob directives Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Relative path 'benchmarks/configs/chess-evolve.toml' breaks when the working directory changes due to test ordering/isolation. Resolve the path relative to the repo root via Path(__file__). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…1478) Add a '### DataNode OptKnob Auto-Generation' section to _build_task_aware_directive() with mechanical derivation rules for DataNode fields: - parallelism → threshold knob, bounds [1, current, current*2, 8] - limit (when set) → threshold knob, bounds [limit//2, limit, limit*2] - max_items → threshold knob, bounds [100, 250, 500, 1000] Explicitly prohibits topology knobs for split/shuffle fields. Includes OptKnob.description for each knob (uses PR #1487's field). 8 new tests covering DataNode section presence, individual field derivation rules, kind validation, expandable flags, and topology exclusion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
colehurwitz
force-pushed
the
factory/run-71a91bd3
branch
from
September 11, 2026 16:20
3cbd759 to
32ad738
Compare
…count - Add _deep_qa_subgraph() to task_setup_workflow(): fork_qa → [health_checker, code_reviewer, adversarial_tester] → join_qa → gate_qa between builder and validate_task - Update registry count assertion from 16 to 17 in test_spec_generate.py - Regenerate workflow-task-setup/SKILL.md and SKILL.annotations.yaml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1478
Changes
Phase 1: Shared
resolve_task()+--taskCLI flagresolve_task()3-step resolver infactory/task.py: TOML file → Python file →module:Classimport string_load_task_from_python_file()helper using importlib introspection--taskflag tofactory outer-loop calibrateandfactory outer-loop evaluatecommandsSwarmConfig.set_task()for outer-loop integrationdocs/outer-loop.mdwith Task Discovery documentationPhase 2:
task-setupworkflow mode (W₁₄)task_setup_workflow()graph definition: fork(researcher_domain, researcher_verification) → join → CEO gate → strategist → user gate → builder → FnNode(validate_task) → archivist (10 nodes, 12 edges)_get_builtin_registry()andWORKFLOW_META"task-setup"toCEO_MODESin_helpers.pyceo.mdpromptPhase 3:
--taskflag for create mode + OptKnob auto-generation_build_task_aware_directive()in_task_builder.pyusing same directive-injection pattern as Plugin Package and Update Existing Mode--taskargument to CEO parser in_parser_groups.pytask_refthroughceo.py→_ceo_helpers.py→_task_builder.pyPhase 4:
ScoringContract.threshold+ domain-level OptKnobsthreshold: float | None = Nonefield toScoringContractTaskDefinition.from_toml()to parse threshold from TOML scoring section_build_task_aware_directive()to emit domain-level OptKnob instructions based on threshold presencePhase 5: DataNode OptKnob integration (rebased onto PR #1483)
factory/run-3110c50a) — inherits DataNode, main, and review fixes### DataNode OptKnob Auto-Generationsection to_build_task_aware_directive()parallelism→ threshold knob, bounds [1, current, current*2, 8], expandable=Falselimit(when set) → threshold knob, bounds [limit//2, limit, limit*2], expandable=Truemax_items→ threshold knob, bounds [100, 250, 500, 1000], expandable=TrueOptKnob.descriptionfield (from PR workflow: make Workflow.to_dict() deterministic; add OptKnob.description #1487)Base branch:
factory/run-3110c50a(PR #1483). When PR #1483 merges to main, this PR automatically retargets to main.Test results
oc/kubectlin CI environment)🤖 Generated with Claude Code