@geohar/opencode-cribsheet 0.5.3 → 0.6.0

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 (2) hide show
  1. package/instructions.txt +90 -2
  2. package/package.json +1 -1
package/instructions.txt CHANGED
@@ -5,10 +5,14 @@
5
5
  (the plugins symlink this file). It directs *approach*; the MCP tool
6
6
  descriptions carry the mechanics. -->
7
7
 
8
- Three rules. Each fires on a **cue you can catch yourself in the middle of**, not on
8
+ Five rules. Each fires on a **cue you can catch yourself in the middle of**, not on
9
9
  a topic you have to remember to think about. That's deliberate: you will not remember
10
10
  to "consult memory" — but you can notice your own hand reaching for `grep`.
11
11
 
12
+ Rules 4 and 5 are the ones you will walk past most, because their cues don't feel like
13
+ actions: settling a design question and writing a todo list both feel like *thinking*,
14
+ not like *reaching for a tool*. Watch for them anyway.
15
+
12
16
  ### 1. About to grep? That's the cue.
13
17
 
14
18
  `grep` / `rg` / `Glob`, or opening a file to see what it does, is a **stop sign, not
@@ -36,15 +40,99 @@ a confident reconstruction feels exactly like a correct one.
36
40
 
37
41
  ### 3. Just understood something? Store it before you move on.
38
42
 
39
- Cue: the "ah, *that's* why" moment — a decision, convention, gotcha, or contract. The
43
+ Cue: the "ah, *that's* why" moment — a convention, a gotcha, a contract. The
40
44
  moment passes; the note has to be written inside it. `lookup` first, then `append`/`edit`
41
45
  over creating a near-duplicate.
42
46
 
47
+ **Not a decision, and not a task.** Those have their own verbs — rules 4 and 5. If what
48
+ you just understood is *why we chose this*, `note_store` is the wrong verb: it takes the
49
+ prose and silently drops the edges, which were the part worth keeping.
50
+
43
51
  Writes need an explicit `project=` — they do **not** inherit your current project. Name
44
52
  the project the fact is *about*: the repo you're in, or `default` (or that tool's own
45
53
  project) for cross-cutting knowledge like a CLI or editor convention. Say where it landed.
46
54
  To pin a hard-won insight about a symbol: `code_append <symbol> "…"`.
47
55
 
56
+ ### 4. Just settled a question — or about to explain why? Use the decision graph.
57
+
58
+ Cue: a design question stopped being open. "Chunks are keyed by X." "Writes must name
59
+ their project." It's the moment the arguing stops — and it feels like you merely
60
+ *finished thinking*, which is exactly why this rule gets walked past.
61
+
62
+ Decisions have their **own verbs**. Use those, not `note_*`: a note holds the prose,
63
+ but only the facet knows what a decision rests on, what rests on it, and what your
64
+ change just invalidated. That last part is the whole point.
65
+
66
+ | your next move was | do this instead |
67
+ |---|---|
68
+ | a question just got settled, and it has consequences | `design_add <title> <rationale>` with `--dep` on what it builds on |
69
+ | the new decision *replaces* an existing one | `design_supersede` — a second `design_add` leaves both standing and both findable |
70
+ | explain *why* it's built this way | `design_lookup "<query>"` **before** reconstructing it from the code — hits flag stale decisions |
71
+ | read / cite a decision | `design_read <ref>` — body **plus** deps, dependents, and whether either moved |
72
+ | change a decision, or code that implements one | `design_check` **first** — then `design_edit`/`design_append`, whose result lists what you just tainted |
73
+ | propose an architecture change | `design_tree` (or `--dependents`) — see what rests on it before you move it |
74
+
75
+ - **Adding is SILENT — so check what it lands next to.** `design_add` seeds its
76
+ `checked` state from its deps as they read right now, so a new decision is
77
+ born verified and nothing gains taint just because it appeared. The graph will
78
+ hold two decisions that flatly contradict each other and never say a word: it
79
+ tracks the edges you declared, not agreement. So `design_lookup` the area
80
+ first, and read the `similar` list the result hands back. Restates an existing
81
+ decision → `design_append`/`design_edit` **that one**. Replaces it →
82
+ `design_supersede`. Changes the ground under other work → `design_check`,
83
+ which is the only verb that answers "what did I just break".
84
+ - **A dep is a promise**: *if that changes, reconsider this.* A plain note can't
85
+ make that promise; the graph can. Every edge checks — there is no "just for
86
+ reference" edge that lets an origin change silently.
87
+ - **Each stale decision** comes back with the chain explaining *why*, what kind of
88
+ change did it, when, and the verb to run. After reconsidering, `design_reaffirm`
89
+ marks it current. Taint means *a dep moved*, not *you were wrong* — reaffirming
90
+ is the cheap, normal ending, so don't treat it as a crisis. When it genuinely no
91
+ longer holds, `design_supersede`.
92
+ - **A hit marked `tainted`** is a decision whose ground shifted and nobody
93
+ re-read. Don't quietly reason from it — `design_read` it first.
94
+
95
+ **Catch yourself:** if you've just written a paragraph explaining why something is
96
+ built the way it is, you either read that out of the graph or you owe it to the
97
+ graph. Same for "let's go with X" — that's a `design_add`, not a sentence.
98
+
99
+ ### 5. About to write a todo list — in a file, in chat, or in your head? That's the cue.
100
+
101
+ `plan_add` instead. An in-chat list dies with the chat and a list in your head dies
102
+ with the context window; a plan item outlives both. One call takes the whole batch,
103
+ and deps can point at earlier items in the same batch.
104
+
105
+ - **`plan_lookup` before you add — it may already be planned.** Another session,
106
+ or another agent, may have written the item you're about to write. An item
107
+ that duplicates a `done` one is louder than a duplicate: either the work
108
+ regressed or you've mis-scoped this, and both are worth knowing *before* a
109
+ second entry exists.
110
+ - **`--dep` the DECISION an item rests on, not just the items before it.** Deps
111
+ mix, and they block differently: a **plan** dep blocks until it's done; a
112
+ **design** dep blocks while it's *tainted*; a **note** dep never blocks. So an
113
+ item that declares the decision it implements drops out of `plan_next` the
114
+ moment that decision's ground moves — the work stops looking actionable
115
+ exactly when it stops being safe to do. That is the plan facet's version of
116
+ "check it didn't break", and it is the only one that fires without you asking.
117
+ - **`plan_status` as you go, not at the end** — `in-progress` is a *claim* other
118
+ agents can see, and marking one `done` tells you what it just unblocked.
119
+ - **`plan_next` is the "where was I" call** — run it when you pick work back up, and
120
+ any future session (yours or another agent's) gets exactly what's actionable now.
121
+
122
+ **Catch yourself:** if you've just typed "first I'll… then I'll…", or reached for a
123
+ scratch todo list, this rule already fired.
124
+
125
+ ### Importing a doc (either facet)
126
+
127
+ Asked to capture a DESIGN.md, a spec, or a plan file? `design_import` / `plan_import`
128
+ that doc, then follow the procedure it returns. They run no model and write nothing —
129
+ they hand you the doc's exact citable sections, what already draws on it, and the
130
+ steps. *You* read and judge. Each entry cites the **section** it came from
131
+ (`--source "DESIGN.md#10.3 Fusion"`, never the whole file), so a later edit to that
132
+ passage re-checks exactly what was drawn from it. Extracted decisions land
133
+ `proposed`: they gate work and taint nothing until a human confirms them with
134
+ `design_promote`.
135
+
48
136
  <!-- Project selection for *reads*: code tools act on ONE current project — set it once
49
137
  with `use_project <name>`, or it's inferred from `project_path` on your first code
50
138
  call; reads then need no project args. To read a *different* project you must name it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geohar/opencode-cribsheet",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "OpenCode plugin: run the crib (cribsheet) memory + code-index MCP server via sharedserver, register its endpoint, inject the reach-for-crib directive, and ship the /crib command. Stands down when a combiner already serves crib.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",