@johnz4021/illuminate 0.5.3 → 0.5.5

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/README.md CHANGED
@@ -12,15 +12,55 @@ Design: [Codemap v1 Design](https://claude.ai/artifact/55L8tokprGe61qtfpDXJ5h).
12
12
 
13
13
  ## Install
14
14
 
15
- In Claude Code (2.1.275 or later), in any repo:
15
+ You need Claude Code 2.1.275 or later (`claude --version`) and Node 20.19 or later (`node --version`). There is no API
16
+ key to set up: illuminate uses your own Claude Code session and sign-in.
17
+
18
+ **1. Install the plugin.** In a terminal:
19
+
20
+ ```
21
+ claude plugin install illuminate --marketplace johnz4021/illuminate
22
+ ```
23
+
24
+ Or inside Claude Code:
16
25
 
17
26
  ```
18
- /plugin install illuminate --marketplace johnz4021/illuminate
27
+ /plugin marketplace add johnz4021/illuminate
28
+ /plugin install illuminate@illuminate
19
29
  ```
20
30
 
21
- Then restart Claude Code. That's all: illuminate uses your own Claude Code session and sign-in, so there is no API key
22
- to set up. It needs Node 20.19 or later. If Node is missing or too old, ask for a map anyway: Claude checks, offers to
23
- install or update it, and tells you what to restart.
31
+ **2. Restart Claude Code.**
32
+
33
+ **3. Ask how something works**, in any repo:
34
+
35
+ > What happens when a user signs up?
36
+
37
+ Or start with `/illuminate`. A map opens in your browser after about a minute.
38
+
39
+ ### Or have your agent install it
40
+
41
+ Paste this into Claude Code:
42
+
43
+ ```
44
+ Install the illuminate plugin for Claude Code for me (https://github.com/johnz4021/illuminate):
45
+ 1. Check `claude --version` is 2.1.275 or later and `node --version` is 20.19 or later. If Claude Code is older,
46
+ tell me to run `claude update` myself and stop. If Node is missing or older, tell me, and offer to install it
47
+ with what my machine already uses (nvm, fnm, volta, asdf or Homebrew); only do it if I say yes.
48
+ 2. Run `claude plugin install illuminate --marketplace johnz4021/illuminate`. If it fails because the git clone
49
+ timed out, run it once more with CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=300000 set.
50
+ 3. Run `claude plugin list` and check illuminate is there and enabled.
51
+ 4. Tell me to restart Claude Code, and suggest a first question to ask about this repo.
52
+ ```
53
+
54
+ For Codex, see [Codex (preview)](#codex-preview).
55
+
56
+ ### If it doesn't work
57
+
58
+ - **"Git clone timed out" while installing:** Claude Code downloads the plugin from GitHub, and a slow connection can
59
+ time out. Run the command again, or give it longer: `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=300000 claude plugin install
60
+ illuminate --marketplace johnz4021/illuminate`.
61
+ - **Claude doesn't make a map after the restart:** run `/mcp` in Claude Code. It shows whether the illuminate server
62
+ started, and its error if it didn't. The usual cause is Node: ask for a map anyway, and Claude checks Node, offers to
63
+ install or update it, and tells you what to restart.
24
64
 
25
65
  ## Updating
26
66
 
@@ -76,6 +116,10 @@ from the code, with the part the step is about marked. Nothing has to be running
76
116
 
77
117
  ![A user journey: the main path across the top, three coloured branches below it](docs/images/journey.png)
78
118
 
119
+ When the answer is parties taking turns (a login through Google, a payment and its webhook, a swap across two
120
+ chains), Claude draws a timeline instead: a lane for each party, and the steps left to right in the order they happen,
121
+ so you can see who does what when.
122
+
79
123
  ### 4. A change before it's made
80
124
 
81
125
  > How would we send the welcome email right away when a patient converts? Show me a plan.
@@ -146,6 +190,15 @@ codex plugin marketplace add johnz4021/illuminate
146
190
  codex plugin add illuminate@illuminate
147
191
  ```
148
192
 
193
+ Then restart Codex. Or paste this into Codex:
194
+
195
+ ```
196
+ Install the illuminate plugin for Codex for me (https://github.com/johnz4021/illuminate):
197
+ 1. Check `node --version` is 20.19 or later. If Node is missing or older, tell me and stop.
198
+ 2. Run `codex plugin marketplace add johnz4021/illuminate`, then `codex plugin add illuminate@illuminate`.
199
+ 3. Tell me to restart Codex, then to ask for a map in the chat.
200
+ ```
201
+
149
202
  Or add only the server: `codex mcp add illuminate -- npx -y @johnz4021/illuminate@latest channel`. From a checkout of
150
203
  this repo: `npm i && npm run build`, then `codex mcp add illuminate -- node "$PWD/packages/server/bin/illuminate.mjs" channel`.
151
204
  To update the plugin, refresh its marketplace with `codex plugin marketplace upgrade`; with `@latest`, restart Codex.
package/dist/cli.mjs CHANGED
@@ -2507,8 +2507,12 @@ var init_format = __esm({
2507
2507
  question: z.string().min(1).max(QUESTION_MAX),
2508
2508
  /** The commit the map was made from, when known. */
2509
2509
  commit: z.string().nullable().optional(),
2510
- /** `journey`: drawn as a user flow (left to right, shapes by kind, no code on the boxes). The claims are checked the same. */
2511
- view: z.enum(["journey"]).optional(),
2510
+ /**
2511
+ * How the map is drawn; the claims are checked the same either way. `journey`: a user flow (left to right, shapes by
2512
+ * kind, no code on the boxes). `timeline`: parties taking turns, each area a lane across the map and time running
2513
+ * left to right. Neither: grouped by area.
2514
+ */
2515
+ view: z.enum(["journey", "timeline"]).optional(),
2512
2516
  /**
2513
2517
  * Set on a map of a change: the commit the code is compared with. The checker marks each box and arrow that is new
2514
2518
  * or different since then, and confirms the ones the map says were `removed`. Stored as a full hash once resolved,
@@ -3610,6 +3614,8 @@ function makerPrompt(question, headStart2) {
3610
3614
  "",
3611
3615
  ...MAP_RULES,
3612
3616
  "",
3617
+ ...TIMELINE_RULES,
3618
+ "",
3613
3619
  ...JOURNEY_RULES,
3614
3620
  "",
3615
3621
  ...EVIDENCE_RULES,
@@ -3778,7 +3784,7 @@ ${missing}`] : [],
3778
3784
  ...SCREEN_RULES
3779
3785
  ].join("\n");
3780
3786
  }
3781
- var EVIDENCE_RULES, MAP_RULES, JOURNEY_RULES, PROPOSAL_RULES, CHANGE_RULES, SCREEN_RULES, TOUR_RULES, NO_SYMBOL, ANSWER_STYLE;
3787
+ var EVIDENCE_RULES, MAP_RULES, TIMELINE_RULES, JOURNEY_RULES, PROPOSAL_RULES, CHANGE_RULES, SCREEN_RULES, TOUR_RULES, NO_SYMBOL, ANSWER_STYLE;
3782
3788
  var init_prompts = __esm({
3783
3789
  "packages/server/src/prompts.ts"() {
3784
3790
  "use strict";
@@ -3802,11 +3808,16 @@ var init_prompts = __esm({
3802
3808
  '- Box `name`: plain English, at most 30 characters ("Patient marked enrolled", not "markConverted()").',
3803
3809
  "- `kind`: entry (a way in), step, store (table, queue, cache), external (outside service), job (scheduled or background work).",
3804
3810
  "- `explain` for every box: just `concept`, 1\u20132 plain sentences, no jargon, saying what this step does. The box already shows its function and file, so leave those out.",
3805
- '- Arrow `label`: 1\u20133 words saying how one step leads to the next ("sends request", "calls", "announces", "every night").',
3811
+ '- Arrow `label`: a few words saying how one step leads to the next ("sends request", "calls", "announces", "every night"). People read an arrow as a sentence, "<from box> <label> <to box>", so the label\'s subject is the box it leaves. When someone else does the next step, say who or what sets it off ("then Alice claims", "once paid"), never only what the next box does.',
3806
3812
  "- Code that exists but isn't reached from the start can still be boxes. Don't draw arrows that don't exist.",
3807
3813
  `- An \`absence\` is a break in the flow you were asked about: a step on that path should lead to the next one and doesn't (something is announced that nothing listens for, a job that nothing ever starts). Most maps have none, and a map without one is complete. Don't go looking for one, and don't use one for a design choice or guarantee ("X never calls Y", "nothing here edits files"): say that in a box's explanation or the walkthrough instead. Don't record small mismatches beside the question (a command the docs don't mention, an unused option).`,
3808
3814
  "- When there is a break, record it: the `claim` in plain words, the two boxes it should connect (`between`), and the exact `search` that proves nothing is there (`pattern`, `regex`, optional `paths` globs covering every file where the missing piece could live), with `matches` set to the count that search returns (usually 0). Run that search yourself with Grep first."
3809
3815
  ];
3816
+ TIMELINE_RULES = [
3817
+ "## When the answer is parties taking turns (a timeline)",
3818
+ '- Set `"view": "timeline"` when the answer is two or more parties or places handing off to each other, back and forth, and the order between them is the point: a protocol or handshake, a login through an outside service, a payment and its webhook, a client and server over a socket, a swap across two chains. It is drawn with one lane per area and time running left to right, so make each area one party or place ("Browser", "Our server", "Google"; "Chain A", "Chain B"), and list the boxes in the order things happen.',
3819
+ "- Not for a flow that passes through each place once (the usual map already reads in order), not for how things are organised or what depends on what, and not for what a person sees (that is a journey)."
3820
+ ];
3810
3821
  JOURNEY_RULES = [
3811
3822
  "## When the question is about what a person sees or does (a journey, a user flow)",
3812
3823
  '- Set `"view": "journey"` on the map: it is then drawn as a user flow, left to right, with no code on the boxes (the code is one click away).',
@@ -5024,7 +5035,7 @@ var VERSION, PACKAGE, DAY;
5024
5035
  var init_updates = __esm({
5025
5036
  "packages/server/src/updates.ts"() {
5026
5037
  "use strict";
5027
- VERSION = true ? "0.5.3" : void 0;
5038
+ VERSION = true ? "0.5.5" : void 0;
5028
5039
  PACKAGE = "@johnz4021/illuminate";
5029
5040
  DAY = 24 * 60 * 60 * 1e3;
5030
5041
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnz4021/illuminate",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Checked, interactive maps of how your code works, drawn by your own Claude Code session.",
5
5
  "license": "MIT",
6
6
  "type": "module",