@johnz4021/illuminate 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +122 -2
- package/bin/illume.mjs +3 -0
- package/dist/cli.mjs +5010 -0
- package/package.json +43 -4
- package/viewer/assets/elk.bundled-0O-UVY-Y.js +25 -0
- package/viewer/assets/elk.bundled-0O-UVY-Y.js.map +1 -0
- package/viewer/assets/index-D374Mq5G.js +70 -0
- package/viewer/assets/index-D374Mq5G.js.map +1 -0
- package/viewer/assets/index-DACroyIO.css +1 -0
- package/viewer/assets/instrument-sans-latin-ext-wght-normal-B5bTHO_g.woff2 +0 -0
- package/viewer/assets/instrument-sans-latin-wght-normal-BbzFLZTg.woff2 +0 -0
- package/viewer/index.html +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 johnz4021
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,123 @@
|
|
|
1
|
-
#
|
|
1
|
+
# illuminate
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ask how your code works and get a map you can point at. Claude explores the repo and drafts the answer as a graph of
|
|
4
|
+
areas, steps and labeled arrows. A plain program checks every box and arrow against the real code before you see it.
|
|
5
|
+
Then you can take a walkthrough, select any part and ask about it, and fix a missing connection right from the map.
|
|
6
|
+
|
|
7
|
+
Design: [Codemap v1 Design](https://claude.ai/artifact/55L8tokprGe61qtfpDXJ5h).
|
|
8
|
+
|
|
9
|
+
## Use it in Claude Code (no API key)
|
|
10
|
+
|
|
11
|
+
illuminate runs as an MCP server in Claude Code: your own Claude Code session does the reading and writing on your own
|
|
12
|
+
sign-in, and illuminate checks every claim and draws the map. Questions you ask on the map go to that same session,
|
|
13
|
+
and the answers come back to the map.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
npm i && npm run build # once, in this checkout
|
|
17
|
+
claude mcp add --scope user illuminate -- node "$PWD/packages/server/bin/illuminate.mjs" channel
|
|
18
|
+
|
|
19
|
+
cd /path/to/your/repo
|
|
20
|
+
claude
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Ask something like "how does sign-up work? Draw me a map." Claude calls `illuminate_map`, the map opens in your
|
|
24
|
+
browser, and Claude keeps working until it has passed the check. Then Claude keeps one `illuminate_listen` call open:
|
|
25
|
+
after two minutes Claude Code moves it to the background and gives you your terminal back, and when you ask on the map
|
|
26
|
+
it wakes the session with your question. The session has to stay open for that. Every 25 minutes or so the call
|
|
27
|
+
returns and Claude quietly starts another (Claude Code drops a call that has been quiet for 30 minutes); after about
|
|
28
|
+
two hours with no questions, illuminate stops listening. If a question on the map says Claude
|
|
29
|
+
Code isn't listening, tell Claude "listen to illuminate". To skip approving each illuminate tool call, allow
|
|
30
|
+
`mcp__illuminate__*` when Claude Code asks.
|
|
31
|
+
|
|
32
|
+
Moving long tool calls to the background is on by default; if you've turned it off (`CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS=0`),
|
|
33
|
+
listening holds your terminal until you ask on the map. Starting Claude Code with
|
|
34
|
+
`--dangerously-load-development-channels server:illuminate` is optional: it also pushes questions into the session
|
|
35
|
+
when nothing is listening.
|
|
36
|
+
|
|
37
|
+
Differences from the CLI: Claude works with your session's own tools and permissions, so the read-only tools and the
|
|
38
|
+
secret-file guard of the Agent SDK session aren't enforced, only asked for. Everything shown still passes the checker,
|
|
39
|
+
and fixes are still applied by illuminate only after you approve them.
|
|
40
|
+
|
|
41
|
+
## Use it from the command line (API key)
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
npm i
|
|
45
|
+
npm run build # the viewer
|
|
46
|
+
npm run illume -- "What happens when a user signs up?" --repo /path/to/your/repo
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
It prints a link (`http://127.0.0.1:4317/m/<id>?t=<token>`) and opens it. illuminate stops on its own about 30 seconds after
|
|
50
|
+
you close its last tab (never while Claude is working), or when you press Stop illuminate on the page. Maps are saved in the target repo under
|
|
51
|
+
`.illuminate/maps/`; commit them to share. Other commands:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
npm run illume -- open --repo <dir> # maps already made in that repo
|
|
55
|
+
npm run illume -- check <map-id> --repo <dir> # re-check a saved map against the code (exit 1 if a claim fails)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Options: `--port <n>` (default 4317), `--no-open`, `--model <id>` (default `claude-opus-5-5`, or `ILLUMINATE_MODEL`).
|
|
59
|
+
|
|
60
|
+
Claude access: an `ANTHROPIC_API_KEY` (a logged-in Claude Code also works for your own use, but don't hand illuminate to
|
|
61
|
+
others that way: Anthropic doesn't allow products on the Agent SDK to use people's claude.ai sign-in). To keep the key in a file,
|
|
62
|
+
`cp .env.example .env` at the root of this checkout and fill it in; the CLI loads it, and your shell's variables win.
|
|
63
|
+
|
|
64
|
+
To put `illuminate` on your PATH: `npm link -w @illuminate/server`.
|
|
65
|
+
|
|
66
|
+
### From a coding agent
|
|
67
|
+
|
|
68
|
+
`integrations/skills/illuminate/SKILL.md` is a skill in the standard `SKILL.md` format. Copy the `illuminate` folder into
|
|
69
|
+
`.claude/skills/` (Claude Code), `.agents/skills/` (Codex, Gemini CLI) or `.cursor/skills/` (Cursor). Your agent then
|
|
70
|
+
runs illuminate when you ask how something works, and hands you the link.
|
|
71
|
+
|
|
72
|
+
### Try it without a model
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
npm run preview
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The real server and viewer on a throwaway copy of the care-app fixture, with a scripted stand-in for Claude. Nothing
|
|
79
|
+
is sent anywhere. Useful for UI work and demos.
|
|
80
|
+
|
|
81
|
+
### Screens on the map
|
|
82
|
+
|
|
83
|
+
When a flow starts from something you can see (a button, a form), Claude can put a picture of that screen on the box,
|
|
84
|
+
with the button marked. It decides case by case; backend-only maps get none. If your app is already running on
|
|
85
|
+
localhost, or the repo has an HTML file, illuminate screenshots it with the Chrome you already have, in a clean profile
|
|
86
|
+
(pages behind a login show their login page, and Claude then falls back). Otherwise Claude can show an image file from
|
|
87
|
+
the repo or a rough sketch of a component. illuminate never starts your app, and a screen is only shown if the checker
|
|
88
|
+
can tie it to the code. Screenshots are saved under `.illuminate/screens/`.
|
|
89
|
+
|
|
90
|
+
## How it works
|
|
91
|
+
|
|
92
|
+
1. **Make a map.** A deterministic scan gives Claude a head start (entry points, routes, which requests hit which
|
|
93
|
+
routes, which tables are written). Claude explores with Read/Grep/Glob only and returns the map in a fixed format.
|
|
94
|
+
2. **Check every claim.** `check()` re-reads each cited line, verifies calls, requests and imports against code facts,
|
|
95
|
+
and re-runs the search behind every "nothing does X". Claude gets up to two rounds to fix what didn't hold. Anything
|
|
96
|
+
still unconfirmed is shown with a "?", never hidden.
|
|
97
|
+
3. **Explore.** The viewer draws areas, steps, labeled arrows and red dashed gaps, with a walkthrough Claude wrote. Select
|
|
98
|
+
anything and ask, as a conversation: replies are short and lead with the answer, and the map does the explaining (each reply
|
|
99
|
+
lights up what it's about). Claude explores further when the map isn't enough; what it finds is drawn only if it
|
|
100
|
+
passes the checker.
|
|
101
|
+
4. **Fix from the map.** Ask for a change and Claude proposes a fix, drawn as a green dashed arrow next to the exact diff.
|
|
102
|
+
Nothing changes until you approve. Then illuminate writes exactly that change (refusing if the files changed since),
|
|
103
|
+
re-checks the map, and offers Undo.
|
|
104
|
+
|
|
105
|
+
## Packages
|
|
106
|
+
|
|
107
|
+
| Package | What it does |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `@illuminate/facts` | What the code says, read deterministically: imports, symbols, calls, routes, table reads and writes, fetch → route links. TS/JS via oxc, Python and Go via tree-sitter. Carried over from the hackathon harness with its tests. |
|
|
110
|
+
| `@illuminate/core` | The map format (`parseMap`), the checker (`check`), map edits, and read-only repo access that never reads secrets. |
|
|
111
|
+
| `@illuminate/server` | The Claude map maker and explainer (Agent SDK, read-only tools, secret guard), fixes, the local HTTP/WebSocket server, and the `illume` CLI. |
|
|
112
|
+
| `@illuminate/viewer` | The React Flow + ELK viewer: the map, walkthrough, answers, fixes and the input bar. |
|
|
113
|
+
|
|
114
|
+
## Development
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
npm test # every package (no model calls; Claude is scripted in tests)
|
|
118
|
+
npm run typecheck
|
|
119
|
+
npm run build # the viewer bundle the server serves
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`packages/core/test/fixtures/care-app` is the reference app: staff convert a patient, the app announces it, nothing
|
|
123
|
+
listens, so the welcome email never goes out. `care-app.map.json` is the map of that question.
|
package/bin/illume.mjs
ADDED