feat(engine): let a message say it needs no answer, and count debt without losing sight of the rest
Rule 7 (0.5.0) shipped an obligation on a format with four fields, none of which could tell a question from a notice. Two consequences fell out of that gap: the injection had to name both terminal states and prefer neither, and coord-count.sh had to treat every unarchived file as a reply owed. The fifth field closes both. coord-send.sh --fyi writes reply-expected: no; omitting it writes yes. Absent means expected, because every message already on disk lacks the field - so a forgotten flag over-counts debt, which is visible, rather than creating debt nobody sees. A reply is not a special case. A broadcast is always no: --reply-to resolves inside the recipient's own mailbox and a broadcast never lands there, so there is no reply path to promise. coord-count.sh now prints TWO integers per mailbox, not one. Replacing pending with debt was the obvious reading of "count debt rather than unarchived messages" and it is wrong here: board.sh counts the same inbox files itself, so a debt-only count would put two different numbers under one name with nothing to reconcile them, and a mailbox holding only notices would read as empty while its messages keep being re-injected. The field is frontmatter and only frontmatter - a body line claiming "reply-expected: no" at column 0 cannot silence a real debt, and a file without valid frontmatter counts as owing a reply. Section 20's wording changed because its stated reason expired, but its second half matters more now, not less: the marking is a DECLARATION, not an instruction. Without that clause one word in an untrusted message becomes a lever that mints obligations in another repo. coord-selftest 136 -> 151. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iJoZVmU2guTEZcMghk88z
This commit is contained in:
parent
261a75bd7b
commit
c0ccb1d611
8 changed files with 314 additions and 29 deletions
19
CLAUDE.md
19
CLAUDE.md
|
|
@ -15,7 +15,15 @@ marketplace plugin. Three components, one boundary:
|
|||
writes, `coord-inbox.sh` reads (formatted for context injection),
|
||||
`coord-done.sh` archives, `coord-count.sh` counts without delivering.
|
||||
Everything is pinned by `coord-selftest.sh`
|
||||
(136 checks, throwaway mailbox via `CLAUDE_COORD_DIR`).
|
||||
(151 checks, throwaway mailbox via `CLAUDE_COORD_DIR`).
|
||||
|
||||
**`coord-count.sh` prints TWO integers per mailbox** (`<name>\t<pending>\t<debt>`),
|
||||
and the first must stay pending: `board.sh` counts the same inbox files
|
||||
itself, so a debt-only count would put two different numbers under one name.
|
||||
Debt is read from `reply-expected` in the FRONTMATTER BLOCK ONLY - a body line
|
||||
is untrusted input and must not be able to silence a debt - and an absent
|
||||
field means a reply IS owed, because every message written before 0.11.0
|
||||
lacks it.
|
||||
|
||||
**Reading is delivering — counting is not.** `coord-inbox.sh` records a
|
||||
broadcast as seen once it has printed it, so it can never be used to survey
|
||||
|
|
@ -94,6 +102,13 @@ distinct in any reword — keeping the priority while dropping the distinction
|
|||
turns prioritization into an injection surface. Selftest section 20 pins both
|
||||
halves together for exactly that reason.
|
||||
|
||||
Since 0.11.0 the `reply-expected` field says which terminal state the SENDER
|
||||
expects. That does not soften the split, it sharpens it: the field is untrusted
|
||||
cross-repo input like the rest of the file, so the injection calls it a
|
||||
*declaration, not an instruction* and keeps both terminal states open to the
|
||||
receiver. Drop that clause and one word in a message becomes a lever that mints
|
||||
obligations in another repo.
|
||||
|
||||
## Conventions
|
||||
|
||||
- Scripts are bash-3.2-safe and ASCII-only: no `declare -A`, no
|
||||
|
|
@ -102,7 +117,7 @@ halves together for exactly that reason.
|
|||
- Zero dependencies everywhere: bash + coreutils in the engine, `node:`
|
||||
builtins only in hook and tests.
|
||||
- TDD: no behavior change without a failing selftest check first.
|
||||
`bash scripts/coord-selftest.sh` must exit 0 (136/136),
|
||||
`bash scripts/coord-selftest.sh` must exit 0 (151/151),
|
||||
`bash scripts/board-selftest.sh` must exit 0 (36/36) and
|
||||
`bash scripts/route-selftest.sh` must exit 0 (50/50).
|
||||
- English for all code, docs, and commit messages (public repo). Norwegian
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue