diff --git a/EvoScientist/middleware/ask_user.py b/EvoScientist/middleware/ask_user.py index 2a0f7da..31d9616 100644 --- a/EvoScientist/middleware/ask_user.py +++ b/EvoScientist/middleware/ask_user.py @@ -172,6 +172,7 @@ or available tools. - **Paper or report preferences**: "Which venue format should I target: NeurIPS, ICML, or ICLR?" - **Ambiguous instructions**: When the user's request has multiple valid interpretations - **Resource constraints**: When the approach depends on available compute, time, or data +- **Code generation mode**: When an iterative-coding skill (e.g. `experiment-iterative-coder`) is installed, ask the user which mode to use before delegating code tasks ### Resource & execution awareness (`ask_user` is especially valuable here): - **Pre-execution estimation**: Before heavy compute (training, large-scale eval), @@ -182,6 +183,9 @@ or available tools. (A) run in background, (B) reduce epochs, (C) switch to smaller model" - **Intermediate checkpoints**: When results diverge from expectations, ask before continuing. E.g. "Baseline accuracy 62% vs expected 80%. Investigate or proceed?" +- **Workflow mode selection**: When multiple execution strategies are available + (e.g. single-pass vs iterative refinement via `experiment-iterative-coder`), + let the user choose before committing to a path ### When NOT to use `ask_user`: - Simple yes/no decisions — proceed with your best judgment diff --git a/EvoScientist/prompts.py b/EvoScientist/prompts.py index e65b204..a0b0e9d 100644 --- a/EvoScientist/prompts.py +++ b/EvoScientist/prompts.py @@ -60,6 +60,20 @@ Read the appropriate skill's `SKILL.md` for workflow guidance at each phase. - `/success_criteria.md` for success signals ## Step 3: Execute & Debug +Before any code delegation, you MUST complete the Code Generation Mode Selection below. + +### Code Generation Mode Selection +Before delegating code tasks to code-agent, ask the user which code generation +mode they prefer. Do not skip this step or assume a default silently. + +- **Lite** (default): Delegate to code-agent normally via the `task` tool. + +- **More Effort**: Check whether the `experiment-iterative-coder` skill is installed. + - If NOT installed → STOP. Do NOT fall back to Lite silently. Inform the user + and suggest installing it, or choosing Lite mode. Then re-select. + - If installed → delegate to code-agent with the `experiment-iterative-coder` skill. + +### Task Delegation - Delegate tasks to sub-agents using the `task` tool: - Planning/structuring → planner-agent - Methods/baselines/datasets → research-agent diff --git a/README.md b/README.md index 47d3f54..d7287cc 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ Moving beyond traditional human-in-the-loop systems, EvoScientist adopts a human - **🌐 Multi-Provider** — Anthropic, OpenAI, Google, MiniMax, NVIDIA — one config to switch. - **📱 Multi-Channel** — CLI as the hub; Telegram, Slack, Feishu, WeChat, and more — one agent session. - **🔬 Scientific Workflow** — Intake → plan → execute → evaluate → write → verify. +- **🔄 Code Generation Modes** — More Effort (iterative refinement), continuously improving code quality. - **🔌 MCP & Skills** — Plug in MCP servers or install skills from GitHub on the fly. > [!TIP] diff --git a/README.zh-CN.md b/README.zh-CN.md index dbbc3dd..9417653 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -116,6 +116,7 @@ EvoScientist 超越了传统的人在回路(Human-in-the-Loop)模式,采 - **🌐 多模型供应商** — Anthropic、OpenAI、Google、MiniMax、NVIDIA——一处配置,随时切换。 - **📱 多渠道接入** — CLI 为中心;Telegram、Slack、飞书、微信等——共享同一智能体会话。 - **🔬 科学工作流** — 需求采集 → 规划 → 执行 → 评估 → 撰写 → 验证。 +- **🔄 代码生成模式** — More Effort(迭代精修),持续迭代提升代码生成质量。 - **🔌 MCP 与 Skills** — 即插即用 MCP 服务器,或从 GitHub 一键安装技能包。 > [!TIP]