opencode-thrum-pro 0.1.6 → 0.1.7

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.
Files changed (52) hide show
  1. package/assets/commands/thrum-compact-extended.md +36 -21
  2. package/assets/commands/thrum-compact.md +19 -18
  3. package/assets/commands/thrum-restart-extended.md +1 -5
  4. package/assets/commands/thrum-restart.md +1 -1
  5. package/assets/commands/thrum-sleep-extended.md +1 -5
  6. package/assets/commands/thrum-sleep.md +1 -5
  7. package/assets/commands/thrum-update-project.md +1 -1
  8. package/assets/skills/choosing-subagent-models/SKILL.md +188 -72
  9. package/assets/skills/closing-findings-while-warm/SKILL.md +1 -2
  10. package/assets/skills/configure-roles/SKILL.md +2 -2
  11. package/assets/skills/coordinator-branch-split-on-block/SKILL.md +1 -2
  12. package/assets/skills/coordinator-dispatching-work/SKILL.md +2 -3
  13. package/assets/skills/coordinator-hotpath-merge-gate/SKILL.md +3 -1
  14. package/assets/skills/coordinator-interacting-with-the-owner/SKILL.md +1 -2
  15. package/assets/skills/coordinator-maintaining-memory/SKILL.md +1 -1
  16. package/assets/skills/coordinator-managing-state-and-lifecycle/SKILL.md +1 -2
  17. package/assets/skills/coordinator-merging-code/SKILL.md +18 -11
  18. package/assets/skills/coordinator-philosophy-merge-gate/SKILL.md +1 -2
  19. package/assets/skills/coordinator-plan-reconcile-gate/SKILL.md +1 -2
  20. package/assets/skills/coordinator-running-brainstorm-cycles/SKILL.md +4 -5
  21. package/assets/skills/coordinator-running-review-cycles/SKILL.md +1 -2
  22. package/assets/{commands/thrum-_deviations-protocol.md → skills/deviations-protocol/SKILL.md} +6 -12
  23. package/assets/skills/generator-idempotency-protocol/SKILL.md +9 -0
  24. package/assets/skills/implementer-maintaining-memory/SKILL.md +3 -4
  25. package/assets/skills/implementer-orchestrating-execution/SKILL.md +1 -2
  26. package/assets/skills/implementer-receiving-dispatch/SKILL.md +15 -17
  27. package/assets/skills/implementer-receiving-review-feedback/SKILL.md +3 -4
  28. package/assets/skills/implementer-status-and-handoff/SKILL.md +1 -14
  29. package/assets/skills/implementer-tdd-and-quality/SKILL.md +2 -2
  30. package/assets/skills/memory-curate/SKILL.md +1 -1
  31. package/assets/skills/memory-write-discipline/SKILL.md +1 -1
  32. package/assets/skills/orchestrate/SKILL.md +33 -4
  33. package/assets/skills/prime-agent/SKILL.md +1 -1
  34. package/assets/skills/project-hotpath-gate/SKILL.md +1 -2
  35. package/assets/skills/project-philosophy/SKILL.md +1 -2
  36. package/assets/skills/project-rules-protocol/SKILL.md +12 -0
  37. package/assets/skills/project-setup/SKILL.md +7 -8
  38. package/assets/skills/project-setup/resources/implementation-agent.md +1 -2
  39. package/assets/skills/researcher-answering-queries/SKILL.md +1 -2
  40. package/assets/skills/researcher-investigating/SKILL.md +6 -8
  41. package/assets/skills/researcher-maintaining-memory/SKILL.md +1 -1
  42. package/assets/{commands/thrum-_snapshot-protocol.md → skills/snapshot-protocol/SKILL.md} +10 -15
  43. package/assets/{commands/thrum-_stamp-protocol.md → skills/stamp-protocol/SKILL.md} +5 -6
  44. package/assets/skills/using-thrum-state/SKILL.md +2 -2
  45. package/assets/skills/verify-against-plan/SKILL.md +2 -2
  46. package/dist/installer-assets.test.d.ts +1 -0
  47. package/dist/installer-assets.test.js +41 -0
  48. package/package.json +1 -1
  49. package/assets/commands/thrum-_compact-runtime-commands.md +0 -61
  50. package/assets/commands/thrum-_generator-idempotency-protocol.md +0 -15
  51. package/assets/commands/thrum-_project-rules-protocol.md +0 -18
  52. package/assets/commands/thrum-_verify-before-write-protocol.md +0 -27
@@ -74,8 +74,8 @@ sessions and re-readable by other agents.
74
74
 
75
75
  **How to apply:** After reporting to the requester, write the finding as a
76
76
  `research_note` memory with cited file:line refs and a verification footer. Tag
77
- with a `research-<slug>` handle so other agents can find it later via
78
- `thrum memory search --tag research-<slug>`:
77
+ it with `--tag <slug>` so other agents can find it later via
78
+ `thrum memory search --tag <slug>`:
79
79
 
80
80
  ```bash
81
81
  cat > /tmp/research-note-body.md <<EOF
@@ -85,19 +85,18 @@ Verified: $(date +%Y-%m-%d) @ $(git rev-parse HEAD)
85
85
  EOF
86
86
  thrum memory create --kind research_note --scope role \
87
87
  --title "<finding prose, ~80 char soft limit>" \
88
- --tag research-<slug> \
88
+ --tag <slug> \
89
89
  --oneline "<one-line summary>" \
90
90
  --full "@/tmp/research-note-body.md"
91
91
  ```
92
92
 
93
93
  `--full` here is multi-line prose — compose via heredoc or a captured
94
- variable, never double-quoted inline like this; see your role preamble's 🔴
95
- PROSE INTO A COMMAND rule.
94
+ variable, never double-quoted inline like this; see the heredoc-or-file rule in your role preamble.
96
95
 
97
96
  Then add one line to `.thrum/context/research.md` under Tracked Topics (note: `thrum queue` now supersedes free-text Open Questions tracking):
98
97
 
99
98
  ```markdown
100
- - `research-<slug>` — <one-line description, ≤ 80 chars>
99
+ - `<slug>` — <one-line description, ≤ 80 chars>
101
100
  ```
102
101
 
103
102
  The full index format and staleness-check protocol live in
@@ -121,8 +120,7 @@ gaps — you surface them, the implementer ships them.
121
120
 
122
121
  ## Project-specific rules (already loaded)
123
122
 
124
- Read the shared partial at the absolute path:
125
- `claude-plugin/commands/_project-rules-protocol.md`
123
+ Load the /thrum:project-rules-protocol skill and follow it.
126
124
 
127
125
  If you accumulate a new rule mid-session (the user corrects you), capture it via
128
126
  the `researcher-maintaining-memory` skill — it references the
@@ -158,7 +158,7 @@ thrum memory create --kind agent_rule --scope role \
158
158
  ```
159
159
 
160
160
  `--short`/`--full` carry real prose — compose via heredoc or file, never
161
- double-quoted inline; see your role preamble's 🔴 PROSE INTO A COMMAND rule.
161
+ double-quoted inline; see the heredoc-or-file rule in your role preamble.
162
162
 
163
163
  This is the SAME pattern as coordinator/implementer role-rule writes — see
164
164
  `memory-write-discipline` for the canonical shape.
@@ -1,20 +1,15 @@
1
1
  ---
2
- description:
3
- Shared snapshot-composition protocol consumed by the snapshot-save commands.
4
- Not user-invocable directly.
2
+ name: snapshot-protocol
3
+ description: "Use when composing a restart snapshot or continuation - snapshot structure, worktree resolution, write rules."
5
4
  ---
6
5
 
7
- # Snapshot Composition Protocol (shared partial)
8
6
 
9
- Consumers: run `grep -rl _snapshot-protocol claude-plugin/commands/` for the
10
- current set — do NOT hardcode it here. A list of consumers inside the consumed
11
- file is a second copy of a git-answerable fact and rots the moment a command is
12
- added or dropped. Note: plain `/thrum:restart` does NOT consume this partial; it
13
- carries its own inline snapshot template.
7
+ # Snapshot Composition Protocol
8
+ Note: plain `/thrum:restart` carries its own inline snapshot template rather
9
+ than consuming this skill.
14
10
 
15
- This is the canonical source-of-truth for snapshot composition discipline. The
16
- sibling commands that consume this partial compose: read this partial →
17
- variant-specific terminal action. Do NOT invoke this file directly; it has no
11
+ This is the canonical source-of-truth for snapshot composition discipline.
12
+ Invoke this skill to compose a snapshot, then take the variant-specific
18
13
  terminal action.
19
14
 
20
15
  ## Step 1 — Resolve identity and your worktree
@@ -71,14 +66,14 @@ shapes everything else you write below it.
71
66
 
72
67
  **Stamp your snapshot with the base it was authored against.**
73
68
  Derive and emit the **Authored-against** stamp per
74
- `claude-plugin/commands/_stamp-protocol.md` and place it at the very top of your
69
+ the /thrum:stamp-protocol skill and place it at the very top of your
75
70
  §1 section (that protocol computes the SHA and merge_target for you — never
76
71
  hand-type them). This is what lets `thrum prime` diff your snapshot at the next
77
72
  wake and flag which cited files have MOVED; an unstamped snapshot reads as
78
73
  "current", indistinguishable from one that never drifted.
79
74
 
80
75
  Any commit your snapshot names as its own stamped SHA must also be readable
81
- under `_stamp-protocol.md`'s "Read-time provenance re-derivation" section
76
+ under `stamp-protocol.md`'s "Read-time provenance re-derivation" section
82
77
  (SHA-resolves, then merge-status) — link to that section rather than restating
83
78
  its checks here.
84
79
 
@@ -114,7 +109,7 @@ session's conversation context. Refer to the previous session in third person.
114
109
 
115
110
  ### Choose your structure
116
111
 
117
- The variant skill that invoked this partial tells you which structure to use:
112
+ The variant skill that invoked this skill tells you which structure to use:
118
113
 
119
114
  - **`/thrum:sleep`** → use the STANDARD 11-section structure below.
120
115
  - **`/thrum:restart-extended` and `/thrum:sleep-extended`** → use the EXTENDED
@@ -1,15 +1,14 @@
1
1
  ---
2
- description:
3
- Shared Authored-against stamp protocol — canonical format, derivation
4
- commands, and never-type rule. Not user-invocable directly.
2
+ name: stamp-protocol
3
+ description: "Use when stamping a plan, prompt, or snapshot - Authored-against format, derivation commands, never-type rule."
5
4
  ---
6
5
 
7
- # Authored-against Stamp Protocol (shared partial)
8
6
 
7
+ # Authored-Against Stamp Protocol
9
8
  This is the canonical source-of-truth for the Authored-against stamp: its format,
10
9
  derivation commands, and the never-type rule. Consuming files point here instead of
11
- restating the recipe. Do NOT invoke this file directly; it has no terminal action.
12
- (To find what currently points here: `grep -rn "_stamp-protocol.md" claude-plugin/`
10
+ restating the recipe. Do not run this as a command; it has no terminal action — other skills and commands load it by name.
11
+ (To find what currently points here: `grep -rn "thrum:stamp-protocol" claude-plugin/commands/ claude-plugin/skills/`
13
12
  — a hand-listed consumer roster in this file would rot the moment a new emitter or
14
13
  reader is added, so none is kept here.)
15
14
 
@@ -42,8 +42,8 @@ time** — writing a fleet row without a fresh by-effect check, even to
42
42
  ## Reconcile, don't just read
43
43
 
44
44
  - **Agent-local** (all roles): check at session start
45
- (`thrum state list`), update as you go. Carried-over state is NOT
46
- auto-injected into prime — you must ask.
45
+ (`thrum state list`), update as you go. Prime injects only a capped digest
46
+ of agent-local state; `thrum state list` shows all.
47
47
  - **Fleet** (coordinators write; everyone reads): before citing a fleet
48
48
  fact in a decision, check `as_of`/`method`. Past the kind's threshold
49
49
  (`thrum state describe <kind>`)? Re-verify by effect before acting, or
@@ -104,7 +104,7 @@ clear error — do not proceed with partial inputs.
104
104
  Regex: `^\*\*Authored-against:\*\* \`([0-9a-f]+)\` target: \`([^\`]+)\``
105
105
  (sha → capture group 1, merge_target → capture group 2)
106
106
 
107
- (Canonical stamp definition: `claude-plugin/commands/_stamp-protocol.md`. The
107
+ (Canonical stamp definition: the /thrum:stamp-protocol skill. The
108
108
  stamp follows the same literal `grep -F` / fixed-field-order / case-sensitive /
109
109
  ASCII-only convention as the `THRUM-REVIEW` marker — see
110
110
  `coordinator-running-brainstorm-cycles` skill § "Footer → commit → stamp".)
@@ -158,7 +158,7 @@ clear error — do not proceed with partial inputs.
158
158
  present" outcome above, since this check only needs the stamp's
159
159
  `<sha>`/`<merge_target>`, not the plan's cited-files list. Run the
160
160
  ordered, short-circuiting two-check sequence defined canonically in
161
- `_stamp-protocol.md` § "Read-time provenance re-derivation" (SHA-resolves
161
+ `stamp-protocol.md` § "Read-time provenance re-derivation" (SHA-resolves
162
162
  first, then merge-status) against the stamp's `<sha>`/`<merge_target>` —
163
163
  the exact commands live there as the single source of truth; this section
164
164
  states outcomes and severity only:
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ // Tests for installAssets skills/commands staging (o4jgf MINOR 13):
2
+ // expected content lands on first install, and the version gate makes a
3
+ // second install a no-op. Offline/deterministic: temp XDG_CONFIG_HOME,
4
+ // stub ctx, real asset tree, never the real $HOME or network.
5
+ //
6
+ // Run: npm test (builds, then `node --test dist`)
7
+ import { test } from "node:test";
8
+ import assert from "node:assert/strict";
9
+ import fs from "fs";
10
+ import os from "os";
11
+ import path from "path";
12
+ import { getConfigDir, installAssets } from "./installer.js";
13
+ function stubCtx() {
14
+ return { client: { app: { log: async () => { } } } };
15
+ }
16
+ test("installAssets stages skills and commands; version gate skips reinstall", async () => {
17
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "thrum-oc-install-"));
18
+ const prevXdg = process.env.XDG_CONFIG_HOME;
19
+ process.env.XDG_CONFIG_HOME = tmp;
20
+ try {
21
+ await installAssets(stubCtx());
22
+ const cfg = path.join(tmp, "opencode");
23
+ assert.equal(getConfigDir(), cfg);
24
+ // protocol skills ride the wholesale skills copy (o4jgf item 5)
25
+ const skillFile = path.join(cfg, "skills", "snapshot-protocol", "SKILL.md");
26
+ assert.ok(fs.existsSync(skillFile));
27
+ assert.ok(fs.existsSync(path.join(cfg, "commands", "thrum-sleep.md")));
28
+ const mtimeBefore = fs.statSync(skillFile).mtimeMs;
29
+ await installAssets(stubCtx());
30
+ assert.equal(fs.statSync(skillFile).mtimeMs, mtimeBefore);
31
+ }
32
+ finally {
33
+ if (prevXdg === undefined) {
34
+ delete process.env.XDG_CONFIG_HOME;
35
+ }
36
+ else {
37
+ process.env.XDG_CONFIG_HOME = prevXdg;
38
+ }
39
+ fs.rmSync(tmp, { recursive: true, force: true });
40
+ }
41
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-thrum-pro",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Thrum multi-agent coordination plugin for Open Code",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,61 +0,0 @@
1
- ---
2
- description:
3
- Per-runtime compact-equivalent command table consumed by compact.md,
4
- compact-extended.md, and scripts/sync-skills.sh. Not user-invocable
5
- directly.
6
- ---
7
-
8
- # Per-Runtime Compact Command Table (shared partial)
9
-
10
- Consumers: `claude-plugin/commands/compact.md`, `compact-extended.md`
11
- (reference this table for the command each runtime's synced copy sends), and
12
- `scripts/sync-skills.sh`'s `compact_command_for_runtime()` (the executable
13
- mirror of this table — keep the two in lockstep; a row added/changed here
14
- without a matching case in that function is a defect at review, not a style
15
- nit).
16
-
17
- This is the canonical, cited source of truth for what "the compact command"
18
- means on each runtime thrum drives. Do NOT invent a command for a runtime not
19
- listed here or not sourced — an unverified guess sent to a runtime's pane is
20
- worse than no compaction at all (it either no-ops or does something
21
- unintended). A runtime found to have no equivalent is recorded as such, not
22
- silently omitted.
23
-
24
- | Runtime | Compact command | Source | Confidence |
25
- | ------------ | -------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------ |
26
- | `claude` | `/compact` | Claude Code built-in slash command (already established in this project). | Verified — first-party. |
27
- | `codex` | `/compact` | OpenAI Codex CLI context-compaction architecture (server-side `POST /v1/responses/compact`, manual trigger `/compact`). | Verified — corroborated by two independent technical write-ups; not fetched from `codex --help` directly. |
28
- | `opencode` | `/compact` (alias `/summarize`) | opencode.ai official docs, keybinds reference — `session_compact` action, default slash command `/compact`. | Verified from official docs. **Caveat:** a differently-named community fork lacks this command — confirm against the specific `opencode` binary before relying on it blindly. |
29
- | `cursor` | `/summarize` (alias `/compress`) | cursor.com CLI reference, slash-commands page. | Verified from official docs. **Differs from Claude's `/compact`** — this is the one runtime where the sent text must actually change. `/clear` (aliases `/new`, `/new-chat`) is a separate full-reset command, not compaction — do not confuse the two. |
30
- | `copilot` | `/compact` | docs.github.com, "Managing context in GitHub Copilot CLI". | Verified from official docs. **Not currently shippable**: `copilot-plugin/` has no skills/commands-loading mechanism at all (pre-existing, documented in `scripts/sync-skills.sh`'s header) — this row exists for completeness/future readiness, not because the skill ships there today. Coverage tracked as a build-vs-accept scope call, owner-owned. |
31
- | `muse` | **NONE FOUND** | musecodes.io official docs — documented commands are `/plan`, `/grill`, `/goal`, `/workflows`, `/model`, `/effort`, `Esc Esc` (rewind), `muse replay`. No manual compact/summarize trigger is documented; marketing copy describing context "compaction" refers to an automatic/internal mechanism only, not a user-invocable command. | Verified absence, not an inferred gap. Per E9 (owner-ruled), muse falls to the `restart-extended` exception — it does not receive compact.md/compact-extended.md. |
32
- | `gemini` | **UNVERIFIED** | Not researched — no plugin tree exists for this runtime, and it was never included in this table's original research pass. | **Not a confirmed negative.** Go-side `internal/runtime.RuntimePreset` exists for this runtime with `CompactCommand` deliberately left empty (falls back to `/thrum:restart-extended`, never invented). This research is not yet done — do not research here; treat future work on this row as owned elsewhere. |
33
- | `kiro-cli` | **UNVERIFIED** | Same as `gemini` — not researched, no plugin tree. | Same as `gemini` — empty `CompactCommand`, safe fallback, research pending. |
34
- | `amp` | **UNVERIFIED** | Same as `gemini` — not researched, no plugin tree. | Same as `gemini` — empty `CompactCommand`, safe fallback, research pending. |
35
- | `shell` | **UNVERIFIED** | Same as `gemini` — not researched, no plugin tree. | Same as `gemini` — empty `CompactCommand`, safe fallback, research pending. |
36
-
37
- ## Notes
38
-
39
- - `codex` and `opencode` resolve to the same literal string Claude uses
40
- (`/compact`), so their synced copies are a functional no-op substitution —
41
- still routed through the same mechanism for consistency and so a future
42
- table change (e.g. if `opencode`'s fork situation resolves differently)
43
- propagates without a second code path.
44
- - `cursor` is the one runtime whose synced copy's sent command differs from
45
- Claude's and must be verified after every sync run (`grep` step in
46
- `scripts/sync-skills.sh`'s `compact_command_for_runtime` block).
47
- - `muse` and `copilot` are both absent from compact/compact-extended's sync
48
- targets today, for two *different* reasons — `muse` because no native
49
- command exists to send, `copilot` because the plugin has no delivery
50
- mechanism at all. Neither is a silent drop: both are recorded here and
51
- reported in the completion report for this table's original research pass.
52
- - `gemini`/`kiro-cli`/`amp`/`shell` are recorded as **UNVERIFIED**, not
53
- merged into the `muse`/`copilot` "no equivalent" rows above — those two are
54
- confirmed negatives (verified by reading official docs); the four
55
- UNVERIFIED rows are an absence of research, not an absence of a command.
56
- `scripts/sync-skills.sh`'s `compact_command_for_runtime()` already returns
57
- `""` for any of these four via its `*` default case, so the executable
58
- mirror and this table already agree — no code change is needed to keep
59
- them in lockstep, only this documentation. See also
60
- `dev-docs/reference/compaction-lifecycle-attach-points.md` for the same
61
- four runtimes' hook-attach-point status.
@@ -1,15 +0,0 @@
1
- ---
2
- description:
3
- Shared generator-skill idempotency invariant consumed by config/doc
4
- generator skills. Not user-invocable directly.
5
- ---
6
-
7
- # Generator Idempotency Protocol (shared partial)
8
-
9
- Consumers: run `grep -rl _generator-idempotency-protocol claude-plugin/skills/`
10
- for the current set — do NOT hardcode it here. A list of consumers inside the
11
- consumed file is a second copy of a git-answerable fact and rots the moment a
12
- skill is added or dropped.
13
-
14
- The modes are idempotent — running the skill repeatedly on a stable project
15
- should produce no file changes after the first run.
@@ -1,18 +0,0 @@
1
- ---
2
- description:
3
- Shared project-specific-rules protocol consumed by role skills. Not
4
- user-invocable directly.
5
- ---
6
-
7
- # Project-Specific Rules Protocol (shared partial)
8
-
9
- Consumers: run `grep -rl _project-rules-protocol claude-plugin/skills/` for the
10
- current set — do NOT hardcode it here. A list of consumers inside the consumed
11
- file is a second copy of a git-answerable fact and rots the moment a skill is
12
- added or dropped.
13
-
14
- Project-local rules of kind `agent_rule` at `--scope role` were loaded at
15
- session start by your preamble (see your role template's Memory model block).
16
- If a project-local rule conflicts with a universal rule above, the
17
- project-local rule wins; surface the conflict in your reply so the user can
18
- decide whether to graduate or remove the override.
@@ -1,27 +0,0 @@
1
- ---
2
- description:
3
- Shared "Verify before you write" invariant consumed by state-writing
4
- skills. Not user-invocable directly.
5
- ---
6
-
7
- # Verify Before You Write Protocol (shared partial)
8
-
9
- Consumers: run `grep -rl _verify-before-write-protocol claude-plugin/skills/`
10
- for the current set — do NOT hardcode it here. A list of consumers inside the
11
- consumed file is a second copy of a git-answerable fact and rots the moment a
12
- skill is added or dropped.
13
-
14
- A written fact is TRUE at the moment it's recorded and can silently become
15
- FALSE later — the reader can't tell, because a note doesn't present itself as
16
- a time-bound claim. Before writing anything:
17
-
18
- - Only write what you've verified against current state — not what you
19
- remember, assume, or were told once.
20
- - A note recording an UNEXPLAINED artifact must carry the unexplained-ness
21
- forward — "not mine, cause unknown, nobody has traced this" — rather than
22
- resolving it to a disposition like "ignore it." The note isn't wrong to cope
23
- with noise you can't act on; the defect is closing the question when
24
- nothing is actually known. "Ignore it" is unfalsifiable by construction —
25
- an instruction to not look can't be caught by looking, because diligence is
26
- exactly what it switches off — and it can silently train every future
27
- session to stop looking at the one visible symptom of a live bug.