@antoneeo/kb-agentic-skill 1.39.0 → 1.40.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.
@@ -29,7 +29,7 @@ sdlc_check.py import ../kb-bundle
29
29
  sdlc_check.py check # always, right after
30
30
  ```
31
31
 
32
- **What to say to the user, in their words.** Say these four things and stop:
32
+ **What to say to the user, in their words.** Say these things and stop:
33
33
 
34
34
  1. *"I've written the bundle to `<path>`. It's a folder — move it to the other project
35
35
  however you like."*
@@ -41,6 +41,18 @@ sdlc_check.py check # always, right after
41
41
  4. If an imported ruling arrived: *"one decision came from the other project. I have kept
42
42
  it, marked as theirs, and it cannot settle anything here until you confirm it. The
43
43
  question it had closed is open again here, with their decision beside the sources."*
44
+ 5. If the import was refused because the bundle carried more than knowledge: *"the
45
+ bundle also carried `<files>`, which are not knowledge — a vision, a decision, a
46
+ workstream. Nothing was written. Ask the sender to export again from their project."*
47
+ 6. **Guides travel too (a module).** Before exporting, name the guides that would travel
48
+ (every guide in the router with no `personal:` key) and ask which are personal, then
49
+ record each answer with `record <guide> personal=true|false` — the user never edits
50
+ a file. Ask whether the receivers run this version or later; if not, export with
51
+ `--no-guides`. After importing, guides wait set aside (§3): orientation lists them,
52
+ and you ask about each, as `memory.md` §Agent home says.
53
+ On the sending side, if `export` noted a cited file that is not a corpus file:
54
+ *"`<file>` is cited directly; the other project will refuse the bundle until it is
55
+ brought into the corpus. Shall I do that?"*
44
56
 
45
57
  Do not explain the closure, the id hashing or the provenance model unless asked. The
46
58
  user asked to move their knowledge, not to learn how it is stored.
@@ -51,12 +63,17 @@ A directory mirroring the docs-root layout:
51
63
 
52
64
  ```
53
65
  <bundle>/
54
- MANIFEST.md kb_bundle: 1, source_project, topics, per-artifact sha256
66
+ MANIFEST.md kb_bundle: 1 (2 when guides travel), source_project, topics, per-artifact sha256
55
67
  topics/<slug>.md
56
68
  corpus/given/<name> + <name>.meta.md (+ the .txt extraction, when there is one)
57
69
  corpus/notes/<name>.md
70
+ reference/GUIDE_<name>.md version 2 only: a carried guide
71
+ reference/.sources/<name> version 2 only: its snapshot
58
72
  ```
59
73
 
74
+ A version-1 importer refuses a version-2 bundle, so a guide can never reach an older
75
+ receiver in force; `--no-guides` writes version 1 for receivers not yet updated.
76
+
60
77
  The layout is mirrored **on purpose**. Claim `source` cells are docs-root-relative, so
61
78
  nothing is rewritten on import — and because `kb_claim_id` hashes
62
79
  `path#locator#qty` with the text excluded, the same artifact cited at the same span
@@ -69,7 +86,12 @@ You choose topics; the export decides what must travel with them.
69
86
 
70
87
  - **Every artifact a selected claim cites**, plus its sidecar and its stored extraction.
71
88
  A claim whose source cannot be reopened is model knowledge arriving by another route —
72
- the validator would reject it in the target, and correctly.
89
+ the validator would reject it in the target, and correctly. To land, it must be a
90
+ corpus file: every source enters the corpus first (`distillation.md` §1). A claim that
91
+ cites a project file directly (an ADR, a guide, an analysis) gets a `graph` warning and
92
+ an `export` note, because an importer refuses the bundle that carries it. The fix is
93
+ the doctrine's: bring the source into `corpus/given/` and re-cite it — the claim id
94
+ changes, so a receiver of an earlier bundle no longer recognises those rows.
73
95
  - **Every row a `CONTESTED` row points at.** The symmetry check refuses a set that lost
74
96
  half its members, so a partial export ships a tree that cannot pass its own checks.
75
97
  When a partner row lives in an unselected topic, that topic is **added and reported** —
@@ -84,6 +106,11 @@ You choose topics; the export decides what must travel with them.
84
106
  If a conflict partner resolves to no row at all, the export **refuses**: exporting a
85
107
  broken set is worse than exporting nothing.
86
108
 
109
+ - **Every guide not marked `personal: true`**, code guides included, with its snapshot or
110
+ the corpus artifact it was distilled from. Each is named in the output — a code guide
111
+ says the code it describes stays here; a personal one is named as not carried. A
112
+ module may carry guides alone, with no topic.
113
+
87
114
  A withdrawn artifact (`distillation.md` §1) never travels: it has no bytes, and its
88
115
  tombstone sidecar stays home.
89
116
 
@@ -99,8 +126,25 @@ and it refuses to let the bundle settle them either: a ruling arrives foreign (
99
126
  business removing anything.
100
127
  - **All or nothing.** The whole plan is computed before a byte is written. An import that
101
128
  half-applies leaves a tree whose checks fail and whose owner cannot tell what landed.
102
-
103
- It refuses on: a missing or unmarked `MANIFEST.md`; a path that escapes the docs root; an
129
+ - **Knowledge only.** It writes topics (`topics/<slug>.md`) and corpus files
130
+ (`corpus/given/<name>`, `corpus/notes/<name>.md`), each directly in its folder and
131
+ named exactly so. Any other file — a Vision, a guide, a decision record, a workstream,
132
+ a nested path, a generated index — refuses the whole bundle, every such file named
133
+ with its reason: those files govern the receiver's agent, and authority does not
134
+ cross (§4). Operating-system clutter (`.DS_Store`, `Thumbs.db`, `desktop.ini`, `._*`,
135
+ `__MACOSX/`) is skipped with one note.
136
+ - **Guides arrive set aside.** In a version-2 bundle, each guide and its snapshot land in
137
+ `reference/.imported/` (`.sources/` beneath it) with `imported_from:`, where no router,
138
+ check, hook or catalog reads them: they govern nothing. A name already in force, already
139
+ set aside, or discarded before from the same project is skipped and named. Only on the
140
+ person's yes, `imported promote <GUIDE_x.md>` puts one in force (it then governs everyone
141
+ on the project once committed); `imported discard` drops it and remembers the discard,
142
+ `imported undiscard` forgets it. A credential in a set-aside snapshot is still reported
143
+ by `check`.
144
+
145
+ It refuses on: a missing or unmarked `MANIFEST.md`, or one from a newer version of the
146
+ skill (update, then import again); a path that escapes the docs root; a file that is not
147
+ knowledge (above); an
104
148
  artifact whose name matches an existing one **with different bytes** (content-addressed
105
149
  names must mean equal content — a mismatch means one of the two is lying about its
106
150
  origin); an incomplete conflict set — a `CONTESTED` or `SUPERSEDED` pointer that would
@@ -217,7 +217,10 @@ presents the design and asks the owner whether to proceed, in the form
217
217
  is a short summary — what the change does (the Functional Spec, or the lens's
218
218
  equivalent), for whom and through which surfaces (use cases, contract), what it
219
219
  touches (Impact), the threats and their mitigations, the review's verdict with any
220
- open findings — and the path of the full design. At the round cap, the hand-over the
220
+ open findings, the findings it answered as declared residuals (from its own log),
221
+ any wider fix offered (§Receiving) and the questions the Vision did not admit
222
+ (`elicitation.md` §The legality test) — and
223
+ the path of the full design. At the round cap, the hand-over the
221
224
  cap prescribes, followed by this one question, takes the place of the form, and the
222
225
  owner's answer settles both. An approval is recorded verbatim in the request record
223
226
  under a label that begins `design approved`; a no or a correction takes its own
@@ -350,7 +353,10 @@ The binding inputs, by review type:
350
353
  false claim about existing code, a published falsehood, a missing impacted
351
354
  file, an unresolvable internal contradiction, a real regression; an
352
355
  improvement idea, a wish, or a style preference is at most a WARN and never
353
- fails the artifact. An uncalibrated "hunt hard" mandate produces
356
+ fails the artifact. A defect that predates the change and that the change does
357
+ not reach is at most a WARN, marked `pre-existing`; the reviewer says, for each
358
+ such finding, whether the change reaches it (§Receiving, how far a fix
359
+ reaches). An uncalibrated "hunt hard" mandate produces
354
360
  blocker-inflated rounds that fail artifacts on wishes — each one burns a
355
361
  round from the cap of 3 and patches the artifact for prose, the accretion
356
362
  failure the round-cap rule names. Stating the taxonomy calibrates the
@@ -397,6 +403,34 @@ resolve a disagreement by rewording the finding until it goes away. When the
397
403
  project keeps a `REVIEW_LOG` (or equivalent), log the outcome of each
398
404
  finding there.
399
405
 
406
+ **How far a fix reaches, for a defect that predates the change.** A finding about
407
+ a defect the product already had is answered by what this change does to it:
408
+
409
+ - **The change reaches it** — its own path, its own data or its new inputs pass
410
+ through the defect (a new input fed to an existing parser that trusts it; records
411
+ the change writes, missed by an existing cleanup job): the fix covers the change's
412
+ own path and data, as a threat or requirement of this design. The same fix for the
413
+ rest of the product is taken too when it is itself evident (next bullet); otherwise
414
+ it is offered at the design presentation, never asked before it.
415
+ - **The change does not reach it, and the fix is evident** — cause and fix already
416
+ known from the evidence in hand, with no new design choice, no question and no new
417
+ impact analysis (a wrong label, an off-by-one in a message): fix it in this unit
418
+ and say so in one line.
419
+ - **The change does not reach it, and fixing it needs new analysis**: a **declared
420
+ residual** — one line in the known-defects register (`memory.md` §Known defects: what,
421
+ where, evidence; for a security defect, place, kind and where the finding is recorded,
422
+ never the evidence), outside this unit's scope, listed at the design presentation,
423
+ where the owner pulls one in with a word. No question before then: the rule settles the choice, so no
424
+ doubt is left to ask (`elicitation.md` §Ask before the write). A residual or a wider
425
+ fix found after the design presentation — by a closure review or a later round — is
426
+ listed, or offered, in the closure message (code lens: and the `MERGE_REVIEW` brief)
427
+ instead; below L3/E3, in the reply.
428
+
429
+ Why: a review that finds real defects around a change turns each into a question
430
+ and then into scope, and every widening adds files the next round must check
431
+ (field case, 2026-11: a capability reached 65 files in its impact map and 30 owner
432
+ decisions before any code, much of it from defects its reviews found around it).
433
+
400
434
  ### Review-driven corrections (scoped re-review)
401
435
 
402
436
  A fix made in response to a finding is new, unreviewed work — stopping after
@@ -404,7 +438,19 @@ A fix made in response to a finding is new, unreviewed work — stopping after
404
438
  therefore gets a **scoped re-review** before the review can PASS: hand the
405
439
  re-reviewer the original findings and ONLY the correction (the fix diff/range
406
440
  for code, the amended sections for a document), and require a per-finding
407
- verdict — `ADDRESSED`, `NOT ADDRESSED`, or `CONTESTED` with evidence. **A PASS
441
+ verdict — `ADDRESSED`, `NOT ADDRESSED`, or `CONTESTED` with evidence. **The
442
+ round goes to the reviewer that ran the round before.** Where the client lets the
443
+ session send a further message to a subagent it started, the scoped re-review is
444
+ that message to the same reviewer: it already holds the mandate, the inputs and the
445
+ source it read, and a new context would read them all again to judge a correction
446
+ (field case, 2026-11: resuming the reviewer halved the cost of rounds 2 and 3). Its
447
+ independence is from the author, never from its own earlier round, so resuming it
448
+ keeps the review independent. A new context runs the round only where the reviewer
449
+ cannot be resumed — the client has no such facility, or it no longer answers — where
450
+ its context was compacted, or where the round moves to another tier; the row's notes
451
+ say which. A resumed reviewer opens its verdict by saying whether it still holds the
452
+ inputs as it read them or works from a compacted context; in the second case its
453
+ verdict does not count and the round goes to a new context. **A PASS
408
454
  that carried findings is provisional until its corrections pass that round** —
409
455
  the commonest real case is a PASS with non-blocking findings the author then
410
456
  fixes, and stopping there ships precisely the unreviewed version this rule
@@ -593,4 +639,6 @@ When you are the reviewer:
593
639
  resolved without changing the code or providing evidence it is a
594
640
  non-issue.
595
641
  - **Scope-creep findings**: raising issues unrelated to the change under
596
- review instead of filing them separately.
642
+ review instead of filing them separately. A defect that predates the change and that
643
+ the change does not reach is raised once, marked `pre-existing` (§Receiving), and never
644
+ fails the artifact.