emrg: task prompts: support per-task extra_prompt from tasks.yml config (rant 2026-08-24T21:59:15) - #964
Conversation
…ig (rant 2026-08-24T21:59:15)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 221140 (1/3)
Reviewed head d80d59d against master (d68efce): 7 files (+66/−1). Adds a conditional {% if task.extra_prompt %} section to all 5 builtin task templates (evolution/paper/open-source/promote/journal) after their Current State block — the task config dict already flows through _build_evolution_prompt() with jinja2.Undefined, so tasks without extra_prompt render unchanged. Regression test validates BOTH positive (extra_prompt injected) and negative (section absent) states across all 5 templates (#455 lesson). Agent.md pytest count synced. CI green (test + test-windows, run 32737744643).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 222434 (2/3)
Reviewed head d80d59d against master (d68efce): 7 files (+66/−1). All 5 builtin task templates gain the identical conditional {% if task.extra_prompt %} section after Current State — uniform, minimal, zero residual output for unconfigured tasks (jinja2.Undefined). Regression test covers both positive and negative states per template (#455). Agent.md count synced to 1051 (doc-count guard #511). CI green (test + test-windows, run 32737744643). LGTM 2/3.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 223111 (3/3)
Reviewed head d80d59d against master (d68efce): 7 files (+66/−1). Conditional {% if task.extra_prompt %} section added uniformly to all 5 builtin task templates; dual-state regression test (positive + negative, #455); Agent.md pytest count synced (doc-count guard #511). CI green (test + test-windows, run 32737744643). 3 consecutive LGTMs from cycles 221140, 222434, 223111 — merging.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Support a per-task supplementary prompt (
extra_prompt) configured intasks.ymlunder a task'sconfig, injected into every round's task prompt so the task understands project-specific contribution rules.Rant (verbatim): open_source_prompt.md 支持 tasks.yml config 配置补充提示词(per-task extra prompt)— open-source 任务在 tasks.yml 的 config 里可配置补充提示词(如 extra_prompt),随每轮 prompt 注入,让任务理解项目特定的贡献方式。
Changes
evolution_prompt.md,paper_prompt.md,open_source_prompt.md,promote_prompt.md,journal_prompt.md) gain a conditional section right after the "Current State" block:taskJinja2 context (the task's config dict) already flows through_build_evolution_prompt();jinja2.Undefinedrenders the section empty for tasks withoutextra_prompt— no backward-compat changes needed.test_task_extra_prompt_conditional_all_templatesrenders every builtin template in BOTH states — withextra_promptconfigured the text is injected, without it the section is absent (positive + negative validation, emrg: macOS 签名 import 后加私钥存在性检查 — p12 仅证书链时明确报错(R88 根因定位) #455 lesson).Agent.md: pytest count synced 1050 → 1051 (new test).Example
Verification
pytest tests/→ 1050 passed, 1 skippedpython -c "from emrg.client.app import run_client"→ OKpython -m emrg --help→ OK