@johnz4021/illuminate 0.5.4 → 0.5.6

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
@@ -116,6 +116,10 @@ from the code, with the part the step is about marked. Nothing has to be running
116
116
 
117
117
  ![A user journey: the main path across the top, three coloured branches below it](docs/images/journey.png)
118
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
+
119
123
  ### 4. A change before it's made
120
124
 
121
125
  > How would we send the welcome email right away when a patient converts? Show me a plan.
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,
@@ -3729,7 +3735,7 @@ function quickAnswerPrompt(map, report, selection, question, excerpts, earlier,
3729
3735
  "## First decide how to handle it (`route`)",
3730
3736
  "- `answer`: the map and the excerpts fully answer it, without guessing about code you can't see. Then answer below.",
3731
3737
  "- `code`: it's about what this map shows (the same feature, or something its boxes lead to or come from), but answering needs code that isn't shown, or they ask for a change or fix, or a good answer would add boxes or arrows to this map. Say in `missing`, in one sentence, what you would need to look at, and leave the answer fields empty. Someone with the whole repo picks it up from there.",
3732
- "- `elsewhere`: it's about a different part of the app that this map doesn't touch, so adding it here would bolt an unrelated area onto this map. Put in `newQuestion` the question as a new map would ask it (their words, standing on its own), and if one of the other maps above already covers it, that map's id in `existingMap`. Leave the answer fields empty. They'll be asked whether to make a new map. Only use this when the question really is about something else; when in doubt, use `code`.",
3738
+ "- `elsewhere`: it's about a different part of the app that this map doesn't touch, so adding it here would bolt an unrelated area onto this map. Put in `newQuestion` their question in their own words, filling in only what it needs to make sense without this conversation (\"it\" becomes what it refers to). Don't add a route, function or detail they didn't ask about: the new map answers exactly what this says, so anything you add narrows it. If one of the other maps above already covers it, put that map's id in `existingMap`. Leave the answer fields empty. They'll be asked whether to make a new map. Only use this when the question really is about something else; when in doubt, use `code`.",
3733
3739
  "",
3734
3740
  "## How to answer (when `route` is `answer`)",
3735
3741
  ...ANSWER_STYLE,
@@ -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";
@@ -3797,6 +3803,8 @@ var init_prompts = __esm({
3797
3803
  "- Aim for 6\u20138 boxes (`nodes`); 12 is a hard ceiling, reached only when the question asks about several things at once. A map is an answer, not an inventory: someone should be able to hold it in their head. Each box is one step a person would recognize and that the answer turns on.",
3798
3804
  "- Leave plumbing off the map unless the question is about it: a request arriving, a job being started, a result being saved, an update being sent to the screen. Fold each into the box it serves and say it in that box's `explain` or on the arrow.",
3799
3805
  "- When several steps in a row just hand on to the next (a route that calls a handler that calls a service), they are one box, cited at the step that matters.",
3806
+ '- A wrapper is not just handing on: a function that works out or fixes some of what it passes before calling another (who the owner is, a mode turned on or off, a value computed from the caller) is its own box, cited in the wrapper itself, never folded into its caller or the function it calls. Its `explain` says what it fills in and how ("Makes whoever signed the owner, and turns safe mode off, then creates the record"). People new to the code can\'t guess those values from the function it calls.',
3807
+ "- When what they ask about can happen more than one way (two ways to sign up, a request through the server and a direct call, two modes), draw each way to where they meet, unless they asked about one of them. Someone new to the code needs to know the others exist. Each way can be a box or two.",
3800
3808
  "- When the answer is a list of like things (five kinds of rule, four checks), that is one box naming the group, or at most the two or three that differ in a way the question cares about; put the rest in `explain`.",
3801
3809
  "- Before returning, go through the boxes one at a time: if the answer would be the same without it, drop or merge it.",
3802
3810
  '- Box `name`: plain English, at most 30 characters ("Patient marked enrolled", not "markConverted()").',
@@ -3807,6 +3815,11 @@ var init_prompts = __esm({
3807
3815
  `- 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
3816
  "- 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
3817
  ];
3818
+ TIMELINE_RULES = [
3819
+ "## When the answer is parties taking turns (a timeline)",
3820
+ '- 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.',
3821
+ "- 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)."
3822
+ ];
3810
3823
  JOURNEY_RULES = [
3811
3824
  "## When the question is about what a person sees or does (a journey, a user flow)",
3812
3825
  '- 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 +5037,7 @@ var VERSION, PACKAGE, DAY;
5024
5037
  var init_updates = __esm({
5025
5038
  "packages/server/src/updates.ts"() {
5026
5039
  "use strict";
5027
- VERSION = true ? "0.5.4" : void 0;
5040
+ VERSION = true ? "0.5.6" : void 0;
5028
5041
  PACKAGE = "@johnz4021/illuminate";
5029
5042
  DAY = 24 * 60 * 60 * 1e3;
5030
5043
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnz4021/illuminate",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
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",