@roulabs/mx 1.1.0 → 1.1.1
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/package.json +1 -1
- package/templates/CLAUDE.md +21 -3
package/package.json
CHANGED
package/templates/CLAUDE.md
CHANGED
|
@@ -112,9 +112,19 @@ Example entry:
|
|
|
112
112
|
|
|
113
113
|
### Reading
|
|
114
114
|
|
|
115
|
+
Primary path:
|
|
116
|
+
|
|
115
117
|
1. Read `<runtime>/context/INDEX.json` — every entry's metadata in one Read.
|
|
116
118
|
2. Open files at `<runtime>/context/<path>.md` for entries whose metadata matches the current task.
|
|
117
|
-
|
|
119
|
+
|
|
120
|
+
When INDEX descriptions don't surface what you need — and often they won't — fall back to anything that works:
|
|
121
|
+
|
|
122
|
+
- **Grep `<runtime>/context/`** for keywords. Frequently the term you need lives in a body, not in any description.
|
|
123
|
+
- **`ls` the folder recursively** to spot entries on disk that aren't indexed (orphans), and read them directly when relevant.
|
|
124
|
+
- **Follow `related` chains** outward from a known-relevant entry to find the rest of a cluster.
|
|
125
|
+
- **Read everything** if the registry is small (< ~30 entries) and you're starting unfamiliar work — cheaper than guessing.
|
|
126
|
+
|
|
127
|
+
INDEX is the *primary* discovery surface, not the only one. Use whatever gets you to the right entry fastest — direct grep, full-content scan, recursive read, following links, your judgment.
|
|
118
128
|
|
|
119
129
|
A 30-second skim of INDEX is free; do it before any non-trivial task. Skip only for typo-fix-level work.
|
|
120
130
|
|
|
@@ -128,9 +138,17 @@ When you add, rename, remove, or restructure an entry, update INDEX in the same
|
|
|
128
138
|
- **One concept per file.** If you can't fit the gist + scope + when-relevant into a 1–3 sentence `description`, the file is doing too much — split it. Aim for ≤ ~200 lines per body file; line count is just a tripwire that flags "look closer." When in doubt, factor the shared concept out into its own entry and `related`-link from the children.
|
|
129
139
|
- **Cross-link via `related` in INDEX**, not in body content.
|
|
130
140
|
|
|
131
|
-
###
|
|
141
|
+
### When and what to write
|
|
142
|
+
|
|
143
|
+
Three triggers for new entries:
|
|
144
|
+
|
|
145
|
+
1. **When the user asks.** "Save this," "remember this," "add to context" — write the entry immediately and update INDEX.
|
|
146
|
+
2. **When you make a non-obvious discovery during the session.** A root cause you traced, a system invariant you confirmed, a decision reached together, a gotcha that tripped you up — propose inline: *"This seems worth saving — add it as `<path>` with this description? OK?"* Write only after the user confirms.
|
|
147
|
+
3. **Before ending a substantial session.** Review what was learned and propose 1–3 entries the user can approve. Catches durable findings you didn't surface mid-stream.
|
|
148
|
+
|
|
149
|
+
For ephemeral scratch (a debugging journey in progress, a hypothesis you're testing) — write without asking. It's notes; promote or delete later.
|
|
132
150
|
|
|
133
|
-
|
|
151
|
+
**What's worth writing:** rationale, history, gotchas, cross-system invariants, debugging journeys, RCAs, session summaries, project-local procedures, imported reference material — your call. When in doubt, save it; prune later.
|
|
134
152
|
|
|
135
153
|
## How to do things (always via mx)
|
|
136
154
|
|