opencode-thrum-pro 0.1.15 → 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.
@@ -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).
@@ -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
@@ -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
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-thrum-pro",
3
- "version": "0.1.15",
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",