Skip to content

emrg: task prompts: support per-task extra_prompt from tasks.yml config (rant 2026-08-24T21:59:15) - #964

Merged
argszero merged 1 commit into
masterfrom
feature/task-extra-prompt
Aug 24, 2026
Merged

emrg: task prompts: support per-task extra_prompt from tasks.yml config (rant 2026-08-24T21:59:15)#964
argszero merged 1 commit into
masterfrom
feature/task-extra-prompt

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Support a per-task supplementary prompt (extra_prompt) configured in tasks.yml under a task's config, 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

  • All 5 builtin task templates (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:
{% if task.extra_prompt %}
## Task-specific Instructions (extra_prompt from tasks.yml)
{{ task.extra_prompt }}
{% endif %}
  • The task Jinja2 context (the task's config dict) already flows through _build_evolution_prompt(); jinja2.Undefined renders the section empty for tasks without extra_prompt — no backward-compat changes needed.
  • Test: test_task_extra_prompt_conditional_all_templates renders every builtin template in BOTH states — with extra_prompt configured 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

# ~/.emrg/tasks.yml
- name: deepseek-harness-opensource-tasktype: open-sourceconfig:
project: deepseek-harnessextra_prompt: "创建插件(plugin)也是对 deepseek-harness 的贡献,不应被排除在贡献范围之外"

Verification

  • pytest tests/1050 passed, 1 skipped
  • python -c "from emrg.client.app import run_client" → OK
  • python -m emrg --help → OK

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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).

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszero
argszero merged commit d1506e4 into masterAug 24, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 24, 2026
…r fix, #964 — per-task extra_prompt) (#965)
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero