@jjanczur/tyran 0.1.44 → 0.1.45

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.
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "name": "tyran",
13
13
  "description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
14
- "version": "0.1.44",
14
+ "version": "0.1.45",
15
15
  "source": "./",
16
16
  "author": {
17
17
  "name": "Jacek Janczura",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tyran",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
5
5
  "author": {
6
6
  "name": "Jacek Janczura",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.45 — 2026-08-22
4
+
5
+ ### The review reads data access and structure, and the self-review has criteria
6
+
7
+ `code-review` gained two dimensions. **Data access and wasted work**: the
8
+ round trips one request makes and how the count moves with the rows — a query
9
+ inside a loop or an awaited per-item `map` is 1 + N, awaits with no dependency
10
+ between them run together with the fan-out bounded, the same pure computation
11
+ runs once per request, and a cache comes AFTER those, never instead of them,
12
+ with the diff saying what invalidates it and why the TTL is that number. None
13
+ of it shows in the diff alone, so the rule is to follow the new call up to the
14
+ request that triggers it, and the finding is a count — "N+1 queries for N rows,
15
+ expected 1" — which is what lets it pin as a test. **Structure**: a
16
+ thousand-line file is built one reasonable addition at a time, so the question
17
+ is whether THIS addition gives a module a second reason to change; the
18
+ counterweight is `deslop`'s own — a layer or helper introduced for one caller
19
+ is the opposite failure, not the cure — and a giant the story merely touched is
20
+ a `NOTES.md` debt, not an in-story refactor.
21
+
22
+ Reported from the operator's own repos: the implementer and reviewer shipped
23
+ N+1 queries, serial awaits over independent calls, repeated queries that could
24
+ have been one, and caches with no stated reason for their TTL, often enough
25
+ that the same eight-point checklist was being pasted into every handoff by
26
+ hand. The checklist now lives in one place — the skill the reviewer already
27
+ loads — and nowhere else.
28
+
29
+ The implementer's "self-review of your own diff" had no criteria: it named no
30
+ skill and listed no dimension. It is now the `code-review` skill run on
31
+ yourself, loaded rather than recalled, with data access called out as the
32
+ dimension an author misses most, because each call site looked fine where it
33
+ was written. For work that reads or writes data the short plan states the
34
+ round trips one request will cost. `deslop` says in one sentence that a slow
35
+ data path is not its business — it deletes, and the fix for a query in a loop
36
+ adds lines — so "the optimization pass" can no longer be read as the
37
+ performance pass. A test pins the pointer and the N+1 clause, because 0.1.40
38
+ is exactly the kind of edit that drops a cross-reference.
39
+
40
+ Not added: a performance-audit skill. The operator's four-phase audit — recon,
41
+ a false-positive pass, a report split by what is safe to fix without asking,
42
+ iterative implementation — is the shape of an initiative under `/tyran:run`:
43
+ scout, plan, implementer, reviewer, with the policy classes deciding what needs
44
+ a human. A skill nothing asks for by name is a library entry, and every
45
+ description is paid for by every session. Skill descriptions: 3868 → 3947 of
46
+ 5000.
47
+
3
48
  ## 0.1.44 — 2026-08-19
4
49
 
5
50
  ### The board follows your OS, and finally has a light mode
package/README.md CHANGED
@@ -325,11 +325,11 @@ branch), `tyran:reviewer` (may fix what it finds, but editing forfeits
325
325
  suite on the cheapest tier, reports raw counts, never fixes), `tyran:retro`. A skill is admitted only when something already asks
326
326
  for the protocol by name, and every description is loaded into every session
327
327
  whether the skill fires or not — so the combined length is capped and CI
328
- enforces the cap (3868 of 5000 characters). What each one assumes, when it
328
+ enforces the cap (3947 of 5000 characters). What each one assumes, when it
329
329
  fires and who invokes it, is in
330
330
  [skills and agents](https://jjanczur.github.io/tyran/skills/); the prompts
331
331
  themselves are in [`skills/`](skills/) and [`agents/`](agents/). Behind all of
332
- it: 1658 unit tests, run with `node --test "tests/**/*.test.mjs"`.
332
+ it: 1660 unit tests, run with `node --test "tests/**/*.test.mjs"`.
333
333
 
334
334
  ## Documentation
335
335
 
@@ -54,6 +54,14 @@ commits and anything written to disk are in English.**
54
54
  optimization pass recorded in the story file (`deslop` — it deletes rather
55
55
  than adds, and it needs a test that ran BEFORE your edit), repo validation,
56
56
  then commits, push and PR on the story branch.
57
+ - **The self-review is the `code-review` skill run on yourself** — load it
58
+ with the `Skill` tool; a checklist recalled from memory is the one you
59
+ already failed to apply while writing. The dimension an author misses
60
+ most is data access: each call site looked fine where you wrote it, and
61
+ the loop that multiplies it is in a file you did not open, so follow your
62
+ new call up to the request. For work that reads or writes data, the
63
+ short plan states the round trips one request will cost — a number
64
+ written down before the code is the cheapest one you will ever fix.
57
65
  - When a test fails for a reason you cannot explain, **stop patching and
58
66
  follow `root-cause`**. Reproduce it, change one variable at a time with
59
67
  the prediction written down first, and name the mechanism. A fix for a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjanczur/tyran",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Command-line scripts for the Tyran task conductor (doctor, journal, schema, and repo tooling) for CI and terminals outside Claude Code. Installing this package does NOT install the Claude Code plugin — add that separately with `/plugin marketplace add jjanczur/tyran` inside Claude Code.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -2269,7 +2269,15 @@ if (data.schema !== 1) {
2269
2269
  (run.paused.used_percentage === null ? 'the threshold' : run.paused.used_percentage + '%') +
2270
2270
  '. Resumes ' + (run.paused.wait || 'later') + '.');
2271
2271
  }
2272
- if (run.watcher && run.watcher.alive === false) {
2272
+ // A dead watcher is only news while something is waiting to be
2273
+ // resumed. resume.json outlives its own cancellation — overnight
2274
+ // cancel writes state 'cancelled' rather than deleting the file —
2275
+ // so alive:false with no pause marker and no 'waiting' claim is a
2276
+ // leftover, not a failure. Measured 2026-08-19 on a live board: the
2277
+ // banner burned on a watcher cancelled the previous day, on a repo
2278
+ // with overnight mode off and nothing paused at all.
2279
+ var watcherMatters = run.paused !== null || (run.watcher && run.watcher.state === 'waiting');
2280
+ if (watcherMatters && run.watcher && run.watcher.alive === false) {
2273
2281
  lines.push('The resume watcher is not running, so nothing will restart this by itself.');
2274
2282
  }
2275
2283
  if (run.usage && run.usage.stale === true) {
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: The depth half of a review - the dimensions a diff is read against (correctness, boundaries, concurrency, failure paths, secrets, test quality) and the rule that a finding is refuted before it is reported. The verdict stays with the reviewer agent. Use when reviewing a diff or a pull request.
2
+ description: The depth half of a review - the dimensions a diff is read against (correctness, boundaries, concurrency, failure paths, secrets, data access, structure, test quality) and the rule that a finding is refuted before it is reported. The verdict stays with the reviewer agent. Use when reviewing a diff or a pull request, or when asked about N+1 queries or wasted round trips.
3
3
  ---
4
4
 
5
5
  # Code review — reading depth
@@ -57,6 +57,34 @@ gap nobody notices.
57
57
  through the real producer, not a stand-in for its output.
58
58
  - **Resource lifecycle.** What is opened, started, spawned or leased, and where
59
59
  it is closed — including on the path where an exception is thrown.
60
+ - **Data access and wasted work.** Count the round trips one request makes
61
+ and how the count moves with the rows. A query, fetch or RPC inside a loop
62
+ or an awaited per-item `map` is 1 + N; one query over the set (a join, an
63
+ `IN`, a loader) is the shape. Awaits with no data dependency between them
64
+ run together, fan-out bounded — unbounded over a pool or a rate limit, a
65
+ slow request becomes a failed one. The same pure computation over the same
66
+ inputs runs once per request. A cache comes AFTER those, never instead: a
67
+ cache over a query that should not have run is a defect with a warm cache,
68
+ and one the diff adds or touches must say what invalidates it and why the
69
+ TTL is that number — a TTL is the staleness the product agreed to, and a
70
+ number with no reason is the first stale read filed in advance. None of this
71
+ shows in the diff alone: a helper that runs one query is correct where it is
72
+ written and N+1 where a loop calls it, so follow the new call up to the
73
+ request that triggers it. Rank by the path — a query on every page load is
74
+ a finding, a nightly job over twelve rows is a `NOTES.md` line. The finding
75
+ is a count, "N+1 queries for N rows, expected 1": an input and an expected
76
+ result, so it pins as a test against the query log.
77
+ - **Structure.** A thousand-line file is built one reasonable addition at a
78
+ time, so the question is about THIS addition: does it give a module a second
79
+ reason to change, or grow the largest file in its area? A new concern is a
80
+ new module, and the simplest change that meets the criteria is the bar — a
81
+ layer, an option or a generic helper introduced for the one caller the story
82
+ has is the opposite failure, not the cure; `deslop` already names it as
83
+ slop. This finding is a location, not a counterexample: the file, the two
84
+ responsibilities it now carries, the seam between them. It is the story's
85
+ finding only when the story made the tangle; a giant the story merely
86
+ touched is a `NOTES.md` debt, and splitting it here is the work nobody asked
87
+ for.
60
88
  - **The gate itself.** If the change touches a check, ask what that check can
61
89
  no longer see. A loosened tolerance, a narrowed selector, a broadened
62
90
  try/catch and a skipped test all keep the run green while removing its
@@ -64,7 +64,10 @@ fixed, the deleted test is the reason.
64
64
 
65
65
  **Keep behaviour unchanged unless you are fixing a defect you can name.** If the
66
66
  pass uncovers a real bug, that is a finding for the report and usually a
67
- separate change, not something to quietly correct inside a cleanup.
67
+ separate change, not something to quietly correct inside a cleanup. The same
68
+ goes for a slow data path — a query in a loop, awaits that could run together:
69
+ that is `code-review`'s data-access dimension, its fix usually adds lines, and
70
+ it belongs in the self-review before this pass, not inside it.
68
71
 
69
72
  ## Skill-file mode
70
73