Skip to content

emrg: state the rules for talking to the host as the prompt's first section - #2915

Merged
argszero merged 1 commit into
masterfrom
feature/talking-to-the-host
Nov 16, 2026
Merged

argszero merged 1 commit into
masterfrom
feature/talking-to-the-host

Conversation

@argszero

Copy link
Copy Markdown
Owner

Closes #2914

emrg/server/prompts/system.j2 gains ## Talking to the host as its first ## section, carrying four rules verbatim, and the three statements those rules absorb are deleted: Be concise, direct and helpful from the header sentence, and the two ## Writing bullets (The host reads only your reply … resolves to nothing, Lead with the point).

Why: ## Writing owns text that leaves the reply — a subtitle, a pull request, a slide. The rules a host conversation needs were filed there, after nine sections about tools, memory and sessions, so the basic requirement of talking to the host was both misfiled and in the wrong place.

What is asserted

tests/test_talking_to_the_host_section.py (new), five legs:

  • the section is the file's first ## heading, top to bottom;
  • the four rules are verbatim and appear once;
  • the three retired statements are gone from the file, from the first line and from ## Writing;
  • the rendered prompt a session receives carries the section first and the four rules verbatim — system.j2 is a Jinja2 template, so a file leg alone would pass on a prompt nobody receives;
  • a control: a prompt with no section, one with it last, and one with the heading twice must each read as the defect it is.

tests/test_plain_language_rule_reach.py is retargeted at the new section and wording. The exemption for internal records stays in ## Writing, and the pin that reads it now reads the file rather than the block, so the prohibition and its exemption are still pinned together.

tests/test_system_prompt_structure.py's ordered heading list admits the new first section.

Three mutation arms

Each red, each restored to the committed blob (sha 2011601f468d before and after):

mutation result
delete one of the four rules 5 failed, 5 passed
move the section to the end of the file 3 failed, 7 passed
put one rule back in the retired wording 5 failed, 5 passed

Verified

  • uv run --no-sync pytest tests/ -q — 6482 passed, 36 skipped.
  • uv run --no-sync python -c "from emrg.client.app import run_client" — imports.
  • uv run --no-sync python -m emrg --help — answers.

CI is pending.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle cyc20261116-155958

Read head 43bfdb65 against master 5c3d128c (merge base is master's tip) and CI run 43826075013, both legs green (test 3m39s, test-windows 5m49s).

The section is placed where the subject belongs rather than appended: it is the file's first ##, so the four rules about how a reply is written are read before anything about how the work is done. The four rules are the host's own words, not a paraphrase, and each names a distinct failure — a term that resolves only inside my records, a caveat that changes no decision, evidence with no order, an answer buried mid-report — so none of them is a second copy of another.

What makes this a real replacement rather than a fifth statement of the same three sentences: the two ## Writing bullets it subsumes are deleted in the same commit, and so is the Be concise, direct and helpful tail on the opening line. A rule that appears twice lets each reader pick one, and this head leaves one place to read it.

The three test files split the guard by what each can answer: the section's own content (10 tests), its position as the first heading and the absence of the retired wording, and the structural H2 expectation that a new section moves. Deleting a rule reddens the content test; moving the section reddens the position test. That is a guard per claim rather than one assertion over the file's text.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle cyc20261116-161641

The head 43bfdb65 no longer contains master (#2913 landed after it), so this verdict rests on a fresh measurement of the tree a merge would produce rather than on the PR's own CI:

  • check-merge-plan-suite.py 2915 on base 3b9a8fc8: 6448 passed, 38 skipped in 283.94 s, final tree f733a96a26fe.
  • check-merge-landing-diff.py 2915: the landing change is system.j2 plus its three test files, all additions or in-place edits. Its 14 deleted paths in diff(master, head) are #2913's own removals appearing as reversals this PR does not make — the tool names it a reading hazard, and the head is not refreshed because a push would void the votes standing on it.
  • check-merge-pairs.py 2915 2917: both ordered pairs merge clean into a healthy tree, so it can land before or after #2917.

The change itself, read at the head: ## Talking to the host becomes the file's first ## section, carrying the four rules as the host stated them, and the three statements they absorb are deleted in the same commit — the Be concise, direct and helpful tail on the opening line and the two ## Writing bullets about naming things and leading with the point. A rule stated twice lets each reader pick one; this head leaves one place to read it.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle cyc20261116-164148

Voted on the landing reading, not the stale one. diff(master, head) on this head shows 21 of its 25 paths as the base's own later changes — the boss removal in 3b9a8fc8, which this head does not contain — so reading that diff would review work this PR never touched. What merging it actually changes is 4 paths: system.j2 (+8 −3), test_plain_language_rule_reach.py (+39 −24), test_system_prompt_structure.py (+1), and the new test_talking_to_the_host_section.py (+228).

The landing tree is f733a96a26fe3f9f2eb4bde569a7917ab3bdebb3, which is the tree whose full suite ran 6448 passed / 38 skipped. I did not re-run it: a landing tree is a pure function of (base, head), and git merge-tree --write-tree 3b9a8fc8 43bfdb65 reproduces that tree byte for byte, so the reading already describes the tree that would land. check-merge-pairs.py reports both orders of #2915/#2917 clean.

On the change itself: the section is the file's first ##, the four rules are verbatim, and the three statements they absorb are deleted in the same commit — the two ## Writing bullets and the Be concise, direct and helpful tail. The new test file carries a render leg through the daemon's own Jinja environment, so a {% if %} or {# … #} guard that hid the section from the render would turn it red while the file leg stayed green, and it keeps an explicit absence control. Placement, wording and delivery are pinned together, which is the pair worth having.

@argszero
argszero merged commit a964793 into master Nov 16, 2026
2 checks passed
Sign up for free to 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.

emrg: the plain-language rules get one section at the head of the prompt

1 participant