@geohar/opencode-cribsheet 0.5.1 → 0.5.3
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.
- package/instructions.txt +45 -29
- package/package.json +1 -1
package/instructions.txt
CHANGED
|
@@ -5,32 +5,48 @@
|
|
|
5
5
|
(the plugins symlink this file). It directs *approach*; the MCP tool
|
|
6
6
|
descriptions carry the mechanics. -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
8
|
+
Three rules. Each fires on a **cue you can catch yourself in the middle of**, not on
|
|
9
|
+
a topic you have to remember to think about. That's deliberate: you will not remember
|
|
10
|
+
to "consult memory" — but you can notice your own hand reaching for `grep`.
|
|
11
|
+
|
|
12
|
+
### 1. About to grep? That's the cue.
|
|
13
|
+
|
|
14
|
+
`grep` / `rg` / `Glob`, or opening a file to see what it does, is a **stop sign, not
|
|
15
|
+
an action**. At that exact moment:
|
|
16
|
+
|
|
17
|
+
| your next move was | do this instead |
|
|
18
|
+
|---|---|
|
|
19
|
+
| grep for a symbol — by name, or by hunch | `code_lookup "what it does, in your own words"` — answers by intent, across files |
|
|
20
|
+
| open the file to understand a symbol | `code_dossier <symbol>` — signature, description, callers, callees, references, in one call |
|
|
21
|
+
| chain greps to trace a caller | `code_xref` / `code_graph` |
|
|
22
|
+
| *(repo isn't indexed)* | `project_index` — one call, and the **expected first step**, not a dead end |
|
|
23
|
+
|
|
24
|
+
grep is the **fallback for when the index misses**. It is never the opening move.
|
|
25
|
+
There is no shortcut around indexing; the utility *is* the index.
|
|
26
|
+
|
|
27
|
+
**Catch yourself:** if you've read three files to answer one question, this rule
|
|
28
|
+
already fired and you walked past it. Stop where you are, `code_lookup`, redo it.
|
|
29
|
+
|
|
30
|
+
### 2. About to answer from your own knowledge? Look it up first.
|
|
31
|
+
|
|
32
|
+
Cue: you're about to explain a project, a past decision, or a convention — or open a
|
|
33
|
+
codebase cold. `lookup` / `apropos` **before** you answer, not after. What's stored may
|
|
34
|
+
be more current than what you'd reconstruct, and *you can't tell which from the inside*:
|
|
35
|
+
a confident reconstruction feels exactly like a correct one.
|
|
36
|
+
|
|
37
|
+
### 3. Just understood something? Store it before you move on.
|
|
38
|
+
|
|
39
|
+
Cue: the "ah, *that's* why" moment — a decision, convention, gotcha, or contract. The
|
|
40
|
+
moment passes; the note has to be written inside it. `lookup` first, then `append`/`edit`
|
|
41
|
+
over creating a near-duplicate.
|
|
42
|
+
|
|
43
|
+
Writes need an explicit `project=` — they do **not** inherit your current project. Name
|
|
44
|
+
the project the fact is *about*: the repo you're in, or `default` (or that tool's own
|
|
45
|
+
project) for cross-cutting knowledge like a CLI or editor convention. Say where it landed.
|
|
46
|
+
To pin a hard-won insight about a symbol: `code_append <symbol> "…"`.
|
|
47
|
+
|
|
48
|
+
<!-- Project selection for *reads*: code tools act on ONE current project — set it once
|
|
49
|
+
with `use_project <name>`, or it's inferred from `project_path` on your first code
|
|
50
|
+
call; reads then need no project args. To read a *different* project you must name it
|
|
51
|
+
(`project=` / `project_path=`). `project_path` means "which repo I mean" — it is not
|
|
52
|
+
your shell cwd. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geohar/opencode-cribsheet",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
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",
|