Repository navigation
Description
What was observed
A recurring self-media content task currently has to be configured as a custom task
type: a Markdown file placed in ~/.emrg/task-templates/.
That file is host-local state, not source. It does not ship with a release, does not exist
on the next machine, is displayed by the GUI as a custom type rather than a built-in one,
and no test reads it — so a change to the scheduler's template resolution, or to the
documented type list, can break it silently and nothing goes red.
The eight built-in task types (evolution, paper, open-source, promote, journal,
competition, ios-app, feishu) do not have these faults: their prompts live in
emrg/server/*_prompt.md, ship with the package, are listed by the GUI as read-only
built-ins whose body can be viewed, and are covered by tests/test_scheduler.py and by the
bidirectional task-type/README guard in tests/test_readme_matches_code.py.
What is expected
self-media becomes a ninth built-in task type, on the same footing as the other eight: a
tasks.yml record carrying type: self-media works on any installation with no local
template file, and the prompt it renders ships with the version.
The prompt must run a four-step round and stop there:
- Read platform trends — graded. Use live heat data where it can actually be read;
where it cannot, choose from domain common sense and annotate the product as "no
real-time data was obtained", rather than presenting an assumption as a measurement. - Choose a topic — one topic per round, with the source of that choice named.
- Draft — one of three declared structures (list-style, single-point long form,
narrative), and the round states why it chose that one. - Archive, and record the round's readings — one file per round, in the task's own
directory, with the date and the target platform in the file name; the file also carries
the round's readings (topic source, chosen structure, word count).
Out of scope: no publishing, and no platform account login. The round ends at a
drafted, archived product, and the readings it records are not sent anywhere.
Acceptance
TASK_TEMPLATESmapsself-mediato a newemrg/server/self_media_prompt.md; the file
exists and is non-empty. Deleting the mapping, or pointing it at a filename no file has,
fails a test.- The template names the four steps above, the three structures, the annotation for a round
without live data, the archive naming rule, the readings that must be recorded, and the
no-publish / no-login boundary. self-mediaappears in the built-in task-type list of bothREADME.mdand
README.cn.md— the guard reads both files, in both directions.- A
self-mediarecord passesvalidate_task_record, and an unknown type is still refused. - Built-in resolution still wins over a same-named custom template: a
self-media.mdin
~/.emrg/task-templates/cannot shadow the built-in one. Inverting that precedence fails a
test. list_templates()reports it asbuiltin: truewith a non-emptyprompt, which is what
puts its body in the GUI's read-only viewer.
Activity
argszero commentedon Nov 5, 2026
Handled by #2715