@misterhuydo/cairn-mcp 1.40.0 → 1.41.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/README.md +38 -11
- package/dist/cairn-cli.js +65 -65
- package/dist/index.js +64 -64
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -297,18 +297,44 @@ in the next publish. A relative move splices against the *effective* order (what
|
|
|
297
297
|
stated, then the rest in plan order), so phases the stated list omits keep their place
|
|
298
298
|
instead of being silently demoted.
|
|
299
299
|
|
|
300
|
-
It publishes as **`
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
It publishes as a **`priority` integer on each phase** — `1` first, contiguous `1..N`,
|
|
301
|
+
**absent where unset**. A partial list is fine; anything it omits follows in plan order.
|
|
302
|
+
|
|
303
|
+
A list is the right way to *say* an order and a number is the right way to *publish* one,
|
|
304
|
+
which is why the two halves differ. Three things follow from putting the number on the
|
|
305
|
+
phase:
|
|
306
|
+
|
|
307
|
+
- **It cannot go stale.** An array beside the plan keeps pointing at work that shipped,
|
|
308
|
+
got parked or left it. A number on the phase leaves *with* the phase — there is nothing
|
|
309
|
+
to dangle, which is why `order_advice` has no `stale` state.
|
|
310
|
+
- **cairn owns compaction.** Priority is *sequence*, not identity: nothing resolves
|
|
311
|
+
against it, so cairn renumbers it freely and there are never gaps, decimals or ties.
|
|
312
|
+
(Renumbering a phase **number** is forbidden for exactly the opposite reason — the
|
|
313
|
+
file-to-DB sync matches rows by it.)
|
|
314
|
+
- **Optional is what keeps it honest.** One real plan has 70 live phases and nobody has
|
|
315
|
+
ranked any of them; presenting file order as priority would assert a considered ranking
|
|
316
|
+
that does not exist. Both halves say how many are actually prioritised.
|
|
317
|
+
|
|
318
|
+
`priority` and `number` are never the same field, and the trap is real: stating an order
|
|
319
|
+
today can need `[11, 12, 5, 16]`, where `5` is TC-3 because TC-3 is *phase number* 5. A
|
|
320
|
+
priority of `3` meaning "third" and a phase number of `5` meaning "TC-3" must not share a
|
|
321
|
+
key. Slices carry no priority — a consumer does not sort slices across phases.
|
|
322
|
+
|
|
323
|
+
The top-level **`order`** array and **`order_source: "authored"`** are still published
|
|
324
|
+
alongside, naming the same sequence, so a consumer can switch its sort before the array
|
|
325
|
+
is removed in a later release.
|
|
326
|
+
|
|
327
|
+
Two rules hold it honest:
|
|
303
328
|
|
|
304
329
|
- **It never contradicts `blocked_by`.** If A is blocked by B, B comes first. An order
|
|
305
330
|
that disagrees is *repaired* rather than refused (publishing is a background side
|
|
306
331
|
effect and must not fail) — an unmentioned blocker is pulled in, a late one is pulled
|
|
307
332
|
forward, and everything the deps do not implicate keeps its stated position. The
|
|
308
333
|
repair is reported in the `reorder` result, never applied silently.
|
|
309
|
-
- **cairn never publishes an order it worked out itself.** When nothing is stated
|
|
310
|
-
|
|
311
|
-
A guessed sequence and a stated one are different claims and must not look
|
|
334
|
+
- **cairn never publishes an order it worked out itself.** When nothing is stated *no
|
|
335
|
+
phase carries a `priority`*, so a consumer is free to derive one and label it as
|
|
336
|
+
derived. A guessed sequence and a stated one are different claims and must not look
|
|
337
|
+
alike.
|
|
312
338
|
|
|
313
339
|
`next` follows the stated order too. A plan that publishes a priority the tool then
|
|
314
340
|
advances past is publishing a decoration.
|
|
@@ -407,11 +433,12 @@ Four things about it are deliberate:
|
|
|
407
433
|
phases live at the time, so a phase *added* later revives the question — and even then
|
|
408
434
|
the advisory says the decline stands and asks only where the newcomer goes.
|
|
409
435
|
|
|
410
|
-
A stated order is
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
436
|
+
A stated order is never reported as needing attention. There is nothing to report:
|
|
437
|
+
publishing the order as a `priority` on each phase means it leaves with the phase, so it
|
|
438
|
+
cannot point at work that shipped or got parked. Phases it simply does not mention are
|
|
439
|
+
reported in `unordered` and nothing more — *"phase 8 first, sort the rest out when we get
|
|
440
|
+
there"* is a complete answer, and an advisory that treats a partial order as unfinished
|
|
441
|
+
makes stating one a chore nobody completes.
|
|
415
442
|
|
|
416
443
|
`cursor_advice` is the same shape for the other thing nothing ever said out loud — a
|
|
417
444
|
cursor left on finished (`on_done_phase`), parked (`on_parked_phase`) or removed
|