opencode-thrum-pro 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ a rule gets obeyed.** Same situation, both ways.
131
131
  ❌ *"<orchestrator> just finished reviewing <implementer>'s branch. The review found two
132
132
  minor issues: an unused import in redact.go and a missing test case for the
133
133
  empty-string path. Both were fixed and the branch is now clean. I'm going to
134
- merge it into thrum-agents now and then check on the next epic..."*
134
+ merge it into the shared integration branch now and then check on the next epic..."*
135
135
  ✅ Nothing to the pane. If the agent needs an ack, `thrum reply <msg_id>
136
136
  --stdin <<'EOF'` with `merged, see <merge-target>` as the body — the pane stays
137
137
  silent.
@@ -5,6 +5,8 @@ description: "Use when the coordinator writes a role-rule, captures an observati
5
5
 
6
6
  # Coordinator memory discipline
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  As coordinator, write role-rules (when the user corrects your judgment),
9
11
  capture observations about agent behavior, and periodically note
10
12
  project-state changes. Common memory operations (write command shape, body
@@ -250,9 +250,10 @@ executed half is **scoped to the change**:
250
250
  acceptable (a targeted run misses cross-test races). Never on primary (the
251
251
  shared fleet build box) — it is CPU-heavy; run it on the gate box.
252
252
  - The fast structural checks on the merged tree — `gate-ban-check`,
253
- `gate-omitempty-check`, `gate-lockspan-check`, `gate-marker-diff`,
254
- `gate-stamp-protocol-check`, `gate-plugin-bundle-leaks` (seconds each; they
255
- catch banned flags, `omitempty` drift, lock-span, marker and stamp drift
253
+ `gate-omitempty-check`, `gate-lockspan-check`, `gate-sourcetree-check`,
254
+ `gate-marker-diff`, `gate-stamp-protocol-check`, `gate-plugin-bundle-leaks`
255
+ (seconds each; they catch banned flags, `omitempty` drift, lock-span,
256
+ shipped code that needs a source-tree-only file, marker and stamp drift
256
257
  regardless of the change; `gate-plugin-bundle-leaks` self-skips when no plugin
257
258
  path changed).
258
259
  - The `merge-base --is-ancestor` fast-forward check (§6).
@@ -379,7 +380,7 @@ agreeing (`rev-parse origin/<branch>` and `ls-remote`). **Assert the branch TIP*
379
380
  agent's memory across restarts. **Never `git add -f`.**
380
381
  4. **Delete the merged branch AND drop its queue bundle — one ritual, at merge
381
382
  time**, after the push is verified. `feature/*` and `fix/*` are one-shot —
382
- delete freely. **`agent/*`, `salvage/*`, `website-dev` and `release/*` are
383
+ delete freely. **`agent/*`, `salvage/*`, the documentation deployment branch and `release/*` are
383
384
  ongoing or archival — do NOT delete.** Then, in the same turn: `thrum queue
384
385
  done <bundle>` + `thrum queue drop <bundle>` for the bundle that tracked this
385
386
  branch, and `bd close <id>` any beads this merge closed. A merge is not
@@ -430,7 +431,7 @@ hides staleness.
430
431
  - `go test … | tail`, or `$?` read after any pipe.
431
432
  - Pushing without guarding on the merge's exit status.
432
433
  - Declaring a class closed on a count you did not re-derive.
433
- - Deleting `agent/*`, `salvage/*`, `website-dev` or `release/*`.
434
+ - Deleting `agent/*`, `salvage/*`, the documentation deployment branch or `release/*`.
434
435
  - Pushing a merge without dropping the queue bundle that tracked it.
435
436
 
436
437
  ## See also
@@ -5,6 +5,8 @@ description: "Use when the implementer writes a role-rule after user correction,
5
5
 
6
6
  # Implementer memory discipline
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  You are the implementer. Your memory discipline is intentionally narrow: you
9
11
  READ rules at session start and you WRITE rules when the user corrects your judgment
10
12
  mid-implementation. Refactoring opportunities, lessons learned, design questions
@@ -105,9 +105,9 @@ the `implementer-maintaining-memory` skill — it references the
105
105
 
106
106
  Immediately after sending the dispatch ACK, write `agent_status="working"` to
107
107
  your local identity file. This is the Pattern D self-write that makes
108
- `agent_status` carry signal across the fleet — the sweep script +
109
- coordinator-context-monitoring skill use it to flag agents that go tmux-quiet
110
- despite claiming `working` (STUCK-WORKING classification).
108
+ `agent_status` carry signal across the fleet; the coordinator context monitoring
109
+ sweep uses it to flag agents that go tmux-quiet despite claiming `working`
110
+ (STUCK-WORKING classification).
111
111
 
112
112
  ```bash
113
113
  # Step 1: ACK the dispatch within 2 minutes
@@ -67,8 +67,8 @@ Report the result as one line:
67
67
  Branch pushed: <branch-name> @ <sha> (git ls-remote origin refs/heads/<branch-name> confirms)
68
68
  ```
69
69
 
70
- **Never push `thrum-agents`, `main`, or `website-dev`** — the coordinator merges
71
- those.
70
+ **Never push protected integration or release branches** — the coordinator
71
+ merges those.
72
72
 
73
73
  Never report DONE with the push status silently omitted — an orchestrator
74
74
  that removes a worktree assuming "DONE implies pushed" on a project that
@@ -121,8 +121,8 @@ When reporting DONE to the coordinator, write `agent_status="idle"` to your
121
121
  local identity file. This closes the `working→idle` transition opened by the ACK
122
122
  template's `set-status working` (sibling skill
123
123
  `implementer-receiving-dispatch`). The sweep script reads this field to
124
- distinguish "agent finished cleanly" from "agent stuck claiming to work" — see
125
- `coordinator-context-monitoring` SKILL.md for the tier-ladder consumption.
124
+ distinguish "agent finished cleanly" from "agent stuck claiming to work";
125
+ the coordinator context monitoring sweep uses it as one signal in its tier ladder.
126
126
 
127
127
  ```bash
128
128
  # Step 1: Report DONE to coordinator
@@ -8,6 +8,8 @@ license: "Apache-2.0"
8
8
 
9
9
  # memory-curate — edges, status, hierarchy
10
10
 
11
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
12
+
11
13
  Load this sub-skill from `thrum-memory` (umbrella) when relationships between
12
14
  memories matter — supersession, parent/child structure, comment threads, or
13
15
  related-context grouping.
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: memory-current-rule
3
+ description: "Use BEFORE writing or editing ANY memory - thrum memory create/update, thrum state set, a file-based memory, a memory index line (MEMORY.md), or a restart snapshot. A memory states only the CURRENT rule, never a timeline of rulings, corrections and reversals. Also use to audit or rewrite existing memories; written so a helper agent can apply it with no other context."
4
+ ---
5
+
6
+ # A memory states the current rule, never its history
7
+
8
+ A memory written as a timeline ("X; later corrected to Y; exception Z; Z
9
+ reversed") is worse than no memory. The reader has to rebuild what is true now,
10
+ often rebuilds it wrong, and then acts on a rule that no longer holds.
11
+ Exceptions are fine. Reversals, and layers of revisions, are not.
12
+
13
+ This applies to every store: `thrum memory`, `thrum state`, file-based memories
14
+ and their indexes, and restart snapshots.
15
+
16
+ ## Every time you touch a memory
17
+
18
+ Whenever you create, edit, append to or merge a memory, examine the WHOLE memory,
19
+ not just your change. If any part of it is a timeline, a stale version of a rule,
20
+ or a summary that disagrees with the body, rewrite the whole memory to the
21
+ current rule in the same edit.
22
+
23
+ ## The shape
24
+
25
+ ```text
26
+ <Rule, present tense, one or two sentences, with its full scope:
27
+ which roles, runtimes, repos, peers, boxes or paths it covers.>
28
+ <Exceptions as part of the rule: "except X, where Y". An exception that ends
29
+ on a condition says so: "until <bead/event>; check it before applying".>
30
+ Owner, date and one short quote of the CURRENT ruling (optional).
31
+
32
+ Why: <the reason, short>
33
+ How to apply: <as many bullets as the rule needs: every still-current
34
+ precondition, command, control and bound>
35
+ ```
36
+
37
+ A memory that carries several independent rules (a reader could need one without
38
+ the others) keeps each as its own headed section in this shape, or is split into
39
+ separate memories that link to each other. Never collapse independent rules into
40
+ one sentence, and never drop a rule because it is not the title's rule.
41
+
42
+ ## What stays and what goes
43
+
44
+ Stays:
45
+ - The current rule, its full scope words, and its current exceptions.
46
+ - The current ruling's owner, date and one short quote.
47
+ - The reason. A past incident stays only if, without it, the Why would be empty
48
+ or the rule would look optional; keep it to two lines.
49
+ - Every still-current precondition, command, control and bound.
50
+
51
+ Goes:
52
+ - Replaced statements, their quotes and their dates.
53
+ - "First X, then Y" narratives of how the rule changed.
54
+ - An exception that no longer applies.
55
+ - Evidence (file:line, probes, controls) that only supported a replaced
56
+ statement. Never keep evidence for a rule that no longer holds.
57
+ - Markers: "UPDATE", "CORRECTED", "SUPERSEDED", "REVERSED", "STRICKEN",
58
+ "later", "(late)", strikethrough.
59
+
60
+ ## Scope is part of the rule
61
+
62
+ Never shorten scope words (which repo, role, runtime, peer, box, path). A rule
63
+ that loses its scope is a different rule. For anything about authorization,
64
+ peering, capability or access, read the project's security model before
65
+ rewriting and keep every scope qualifier word for word.
66
+
67
+ ## Every summary must agree with the body
68
+
69
+ A memory can have several summaries; find them all and make each match the
70
+ rewritten body:
71
+ - File memory: its front-matter `description:`, its line in the main index
72
+ (e.g. MEMORY.md), and its line in any secondary index (e.g.
73
+ MEMORY-reference.md). Grep the file name in every index.
74
+ - `thrum memory`: its `--title` and `--oneline`. Find related entries with
75
+ `thrum memory search <topic>`; rewrite with `thrum memory update <id>`.
76
+ - `thrum state`: the value of every key that restates the rule. When a file
77
+ memory names a state key, read it and keep the two identical.
78
+
79
+ In an index, one entry is one `[text](file.md)` link. Rewrite only that entry's
80
+ text; never touch the entries that share its line. Follow any format contract the
81
+ index states about itself (caps, demotion), except that an index entry which
82
+ annotates a memory as superseded or corrected is itself a timeline and must be
83
+ rewritten or removed.
84
+
85
+ ## Rewriting a memory, step by step
86
+
87
+ 1. Read the memory in full, every memory it links to, and every memory on the
88
+ same topic (search by topic, not only by title). If it names a live source
89
+ (a config key, skill, template, bead), read that too: when the live source is
90
+ newer, it decides the current rule, and the memory should say "read X at the
91
+ moment of use" instead of restating X.
92
+ 2. List, privately, every distinct statement it makes, with its date or position.
93
+ 3. Decide the current rule POINT BY POINT, not file by file. For each point,
94
+ take the latest owner statement on that point. A later statement REPLACES an
95
+ earlier one only when it covers the same scope. If it covers a narrower scope,
96
+ it is an exception, and the earlier statement still governs everywhere else.
97
+ If two statements have the same scope and no clear order, mark the memory
98
+ AMBIGUOUS, change nothing, and report the exact question for the owner.
99
+ 4. Rewrite the memory in the shape above, one section per independent rule.
100
+ 5. Rewrite every summary (see above) to match.
101
+ 6. If another memory states the same rule: move every still-current point from
102
+ it into the memory you keep, then reduce it to a one-line body
103
+ ("Merged into <name>.") and re-point or remove its index entries. Never reduce
104
+ a memory to a pointer before its current points have moved.
105
+ 7. Self-check (all must be yes):
106
+ - A reader could act correctly after reading only the first section.
107
+ - Each rule is stated once, with no earlier version beside it.
108
+ - Every summary says the same thing as the body.
109
+ - No other memory states a different version of the rule.
110
+ - No scope word, current exception, precondition or reason was lost.
111
+ 8. Report each memory as REWRITTEN, MERGED INTO x, AMBIGUOUS (question) or
112
+ UNCHANGED (why), with one line saying which rules were kept, dropped (and
113
+ why) or moved (and where).
114
+
115
+ Never invent a rule. When unsure whether a statement is still current, ask.
116
+
117
+ ## Auditing a store
118
+
119
+ Grep the store for the markers above and for topics that more than one memory
120
+ covers, then follow the steps for each hit. Grep finds only marked memories, so
121
+ also read memories that share a topic with a hit.
@@ -5,6 +5,8 @@ description: "Use when an agent needs to update, delete, supersede, or audit an
5
5
 
6
6
  # Maintaining thrum memory entries
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  This skill carries the canonical lifecycle operations on existing memory entries
9
11
  — edit, delete, supersede, history audit.
10
12
 
@@ -5,6 +5,8 @@ description: "Use when an agent needs to capture a new memory entry — a rule,
5
5
 
6
6
  # Writing thrum memory entries
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  This skill carries the canonical write-command shape + content discipline shared
9
11
  by every role that writes memory. Per-role skills
10
12
  (researcher/coordinator/implementer-maintaining-memory) reference this skill for
@@ -6,8 +6,8 @@
6
6
  # never-merged personal-branch scripts (`origin/agent/watcher-primary` and
7
7
  # `origin/agent/brainstorm-steward`, reconciled against a full byte-level
8
8
  # diff account of both) into one canonical, git-tracked script.
9
- # Neither branch is an ancestor of thrum-agents; this is the first time
10
- # either design lands in the shared tree.
9
+ # Neither branch is an ancestor of the shared integration branch; this is
10
+ # the first time either design lands in the shared tree.
11
11
  #
12
12
  # EXECUTION MODEL: single-pass / cron-driven by default (ported from
13
13
  # brainstorm-steward, the LATER of the two designs, Sep 10 vs Sep 6). Its
@@ -5,6 +5,8 @@ description: "Use after completing research, when updating research memory, when
5
5
 
6
6
  # Researcher memory discipline
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  You are the researcher. You write research findings, role-rules, and curate the
9
11
  project-local research index. Common memory operations (write command shape,
10
12
  body conventions, lookup patterns, edit/delete protocol) live in the common
@@ -8,6 +8,8 @@ license: "Apache-2.0"
8
8
 
9
9
  # thrum memory — capture and query structured memories
10
10
 
11
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
12
+
11
13
  ## When to use thrum memory vs. other stores
12
14
 
13
15
  Just learned something that future work should respect? → `thrum memory create`
@@ -71,7 +71,7 @@ Three distinct fields, do not conflate them:
71
71
  | `thrum queue wait <bundle-id> [--reason "..."]` | -> waiting (alias for `queue update --status=waiting`; `--reason` optional) |
72
72
  | `thrum queue ready <bundle-id>` | -> ready (alias for `queue update --status=ready`) |
73
73
  | `thrum queue update <bundle-id> [flags]` | General partial update: `--status`, `--stage`, `--reason` (status_reason), `--title`, `--ref` (repeatable, replaces existing refs), `--priority`, `--assigned-by`, `--assigned-to-remove` - at least one required; `--status=blocked` requires `--reason` |
74
- | `thrum queue drop <bundle-id>` | DELETE bundle + all its items, any status (the one destructive verb - drop promptly once a done bundle's record stops being useful) |
74
+ | `thrum queue drop <bundle-id>` | DELETE bundle + all its items, any status. This is the normal close-out: drop a bundle in the same turn its work lands |
75
75
  | `thrum queue assign <bundle-id> <agent-id>...` | Append agent(s) to assigned_to (routing metadata only) |
76
76
  | `thrum queue note <bundle-id> --stdin` (or `--body-file <f>`) | Append a dated progress note (append-only; shown by `show`, last note previewed by `list`) |
77
77
  | `thrum queue item add <bundle-id> --title "..."` | Add one embedded item |
@@ -143,9 +143,9 @@ thrum queue list --agent @impl_foo --status in_progress
143
143
  **Finish vs discard:** `done` is a WAYPOINT, not a resting place - it marks a
144
144
  bundle done and KEEPS it visible (`start` reopens it), but it is not where
145
145
  finished work should live. `drop` DELETES it and every item inside, regardless
146
- of status. Reconcile at session start and natural breakpoints: `done` then a
147
- prompt `drop` is the normal close-out; `drop` alone is fine too. Don't let a
148
- done bundle outlive your next reconcile unless you deliberately keep it.
146
+ of status. When the work lands, `drop` it in the same turn (`done` first is
147
+ optional). A finished bundle is never kept: its history lives in git and the
148
+ bead, not in the queue.
149
149
 
150
150
  **Close on a TRIGGER, not a reminder.** The moment a bundle's branch merges into
151
151
  trunk, OR its last referenced bead closes, `done` + `drop` it in that same turn -
@@ -226,9 +226,8 @@ preference, not built here - out of scope per the project's security model.
226
226
  it only tags your own bundle. Always follow it with a `thrum send`; the
227
227
  recipient adds it themselves via `--from-message` (with that message's exact id).
228
228
  - **Leaving done bundles to pile up.** `done` never removes anything - the
229
- bundle stays, and only `drop` deletes it. Drop each done bundle promptly once
230
- its record stops being useful; a queue full of undropped done bundles is the
231
- primary rot mode.
229
+ bundle stays, and only `drop` deletes it. Drop each bundle the turn its work
230
+ lands; a queue full of undropped done bundles is the primary rot mode.
232
231
  - **Reaching for a `remove`/item-`drop` verb.** Removal (of a bundle and every
233
232
  item inside it) happens only at the bundle level via `drop` - there is no
234
233
  finer-grained delete. Renaming/re-titling is NOT in this category: `queue
@@ -5,6 +5,8 @@ description: "Use when reading or writing thrum state - checking your own agent-
5
5
 
6
6
  # Using Thrum State
7
7
 
8
+ > **Before writing or editing any memory or state entry, use the `memory-current-rule` skill:** a memory states only the CURRENT rule (exceptions allowed), never a timeline of rulings, corrections or reversals, and every touch re-examines the whole memory.
9
+
8
10
  ## Overview
9
11
 
10
12
  `thrum state` is a two-tier current-value store. **Agent-local** state
@@ -99,7 +99,7 @@ clear error — do not proceed with partial inputs.
99
99
  4. **Authored-against drift check (informational; does not block on missing stamp).**
100
100
  Look for a stamp of this form near the top of the plan:
101
101
 
102
- Literal example: `**Authored-against:** \`a1b2c3d4e5\` target: \`thrum-agents\``
102
+ Literal example: `**Authored-against:** \`a1b2c3d4e5\` target: \`<merge-target>\``
103
103
 
104
104
  Regex: `^\*\*Authored-against:\*\* \`([0-9a-f]+)\` target: \`([^\`]+)\``
105
105
  (sha → capture group 1, merge_target → capture group 2)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-thrum-pro",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "Thrum multi-agent coordination plugin for Open Code",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",