Skip to content

Built-in task type: self-media (trends -> topic -> draft -> archive) #2714

Closed

Description

@argszero

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:

  1. 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.
  2. Choose a topic — one topic per round, with the source of that choice named.
  3. Draft — one of three declared structures (list-style, single-point long form,
    narrative), and the round states why it chose that one.
  4. 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_TEMPLATES maps self-media to a new emrg/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-media appears in the built-in task-type list of both README.md and
    README.cn.md — the guard reads both files, in both directions.
  • A self-media record passes validate_task_record, and an unknown type is still refused.
  • Built-in resolution still wins over a same-named custom template: a self-media.md in
    ~/.emrg/task-templates/ cannot shadow the built-in one. Inverting that precedence fails a
    test.
  • list_templates() reports it as builtin: true with a non-empty prompt, which is what
    puts its body in the GUI's read-only viewer.

Activity

  1. argszero commented on Nov 5, 2026

    @argszero
    OwnerAuthor

    Handled by #2715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions