@johnz4021/illuminate 0.5.0 → 0.5.2

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
@@ -1,4 +1,4 @@
1
- # illuminate
1
+ # <img src="docs/images/logo.svg" alt="" width="34" align="center"> illuminate
2
2
 
3
3
  Ask Claude Code how your code works and get a map you can point at. Claude reads the repo and draws the answer as
4
4
  boxes and arrows in your browser. A plain program then checks every box and arrow against the real code before you see
package/dist/cli.mjs CHANGED
@@ -3815,7 +3815,7 @@ var init_prompts = __esm({
3815
3815
  '- Leave out what goes on behind the screen: no boxes for routes, requests, functions, jobs, database writes or other services. When several of those sit between two screens, they are one arrow ("pays, and lands on"), and that arrow cites the code that does it. A step that happens outside the app is a box only if the person sees it (a payment page, an email they get), cited at the line that sends them there or sends it.',
3816
3816
  `- A wait is part of the journey: when the next thing the person sees comes later (an email after a nightly job, an order shipped after approval), say so on the arrow in their terms ("a day later, gets"), and don't draw the job.`,
3817
3817
  "- Each box and arrow still cites the code that makes it so: the component, the handler, the redirect.",
3818
- "- Show where each step happens: define the pages the journey goes through once, in `pages`, and give each screen box a wireframe of its page with its own part marked (see Screens). Several boxes usually share one page. A box whose page can't be drawn usefully (nothing recognisable on it, or it isn't in this repo) gets no `screen`: no picture is better than a thin one.",
3818
+ "- Show where each step happens: define the pages the journey goes through in `pages`, one for each state of a screen the person sees (see Screens), and give each screen box a wireframe of its page with its own part marked. Steps in the same state share one page. A box whose page can't be drawn usefully (nothing recognisable on it, or it isn't in this repo) gets no `screen`: no picture is better than a thin one.",
3819
3819
  "- Where the journey stops short (a button that leads nowhere, a result with no screen, nothing ever telling the person what happened), that is a break: record it as an absence.",
3820
3820
  '- One main path, with branches: the main path is what most people do from start to finish, and its boxes and arrows carry no `branch`. It is drawn on one straight line, left to right. Every box and arrow off it carries `"branch"`: a short name for that way through, in the person\'s words ("Saves for later", "Payment fails"), the same name on every box and arrow of it. An arrow that leads from a branch back to the main path carries that branch too. Each branch is drawn below the step it leaves from, in its own colour.',
3821
3821
  "- A branch leaves from a `choice`, or from any step where things can go another way (an error, a cancel, a link elsewhere). Keep to the branches that matter, at most 5. A journey with only one way through has no branches.",
@@ -3844,9 +3844,10 @@ var init_prompts = __esm({
3844
3844
  SCREEN_RULES = [
3845
3845
  "## Screens (`pages` on the map, `screen` on a box; optional, and your call)",
3846
3846
  "- A picture of where a step happens on the screen can ground a map for people who don't read code. Add one where the flow touches the screen and seeing it helps: usually the box where it starts (the button or form), sometimes where a result appears. For backend-only questions, add none.",
3847
- '- The usual picture is a wireframe of the whole page, with the part the box is about marked. Define each page once, in the map\'s `pages`: `{ "id": "\u2026", "name": "Patient page", "file": "<the page\'s own component or template>", "regions": [ \u2026 ] }`.',
3847
+ '- The usual picture is a wireframe of the whole page, with the part the box is about marked. A page is what the person sees at one moment, defined in the map\'s `pages`: `{ "id": "\u2026", "name": "Patient page", "file": "<the page\'s own component or template>", "regions": [ \u2026 ] }`.',
3848
+ '- When the same screen changes as they go (loading, then ready; a panel, dialog or bubble opening; an error; a form step), each state they see is its own page, named for it ("Map page, loading", "Map page, with an answer"), listing only what is on screen then. Never put things that are never on screen together in one page: a loading message beside the result it was waiting for, a dialog beside the screen it replaces. Steps in the same state share its page.',
3848
3849
  '- A region is one visible part of the page: `{ "id": "\u2026", "slot": "top" | "left" | "main" | "right" | "bottom", "label": "Top bar", "file": "<the file it comes from>", "elements": [{ "kind": "heading|button|field|link|text|image", "text": "\u2026" }] }`. Give the 3\u20136 regions a person would recognise the page by, not only the one the step uses. Put each in the slot where it appears on screen, going by the markup and the styles (a bar across the top is `top`, a sidebar is `left` or `right`, the content is `main`). `elements`: up to 6 of the most recognisable things in the region, in the order they appear, each `text` copied exactly from that region\'s file; a region may have none.',
3849
- '- Then on a box: `"screen": { "kind": "wireframe", "page": "<page id>", "region": "<region id>", "highlight": "<text of one element in that region>" }`. Boxes that happen on the same page use the same page, each marking its own region and element.',
3850
+ '- Then on a box: `"screen": { "kind": "wireframe", "page": "<page id>", "region": "<region id>", "highlight": "<text of one element in that region>" }`. Boxes that happen on the same page in the same state use the same page, each marking its own region and element.',
3850
3851
  "- A program checks every page: a region's `file` must be the page's `file` or one it imports (directly or through other files), every element's text must be in its region's file, and the box must cite the page's code or the code the marked element is in. A region that fails is left off; where regions sit can't be checked, so read the layout from the code and don't invent parts.",
3851
3852
  '- `{ "kind": "capture", "capture": "<id>", "highlight": "<label>" }`: a real screenshot, in place of a wireframe, when a page is already running on this machine. Only if you have the illuminate_capture tool: it screenshots a running page or an HTML file in the repo, and returns the id. Look at the image first, and don\'t use one that shows a login page, an error or the wrong state. Never start the app yourself.',
3852
3853
  '- `{ "kind": "image", "file": "<path>" }`: an image file in the repo (an icon, a sprite) that the box\'s cited code names.',
@@ -5023,7 +5024,7 @@ var VERSION, PACKAGE, DAY;
5023
5024
  var init_updates = __esm({
5024
5025
  "packages/server/src/updates.ts"() {
5025
5026
  "use strict";
5026
- VERSION = true ? "0.5.0" : void 0;
5027
+ VERSION = true ? "0.5.2" : void 0;
5027
5028
  PACKAGE = "@johnz4021/illuminate";
5028
5029
  DAY = 24 * 60 * 60 * 1e3;
5029
5030
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnz4021/illuminate",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
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",