@antoneeo/kb-agentic-skill 1.5.1 → 1.6.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/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  Every significant change to this skill is recorded here.
4
4
 
5
+ ## [1.6.0] - 2026-08-26
6
+
7
+ F-038 — the gated rung: truthful log vocabulary and a mandated ask, no grant memory.
8
+
9
+ ### Fixed
10
+ - **A review rung that exists behind a permission policy is no longer logged as
11
+ "unavailable".** The ladder knew two states (the client supports the rung, or not)
12
+ and hard-coded rung 3's reason as "no subagent facility on this client" — so a gated
13
+ facility produced false log rows, and the ladder's own prohibition ("rung 3 is
14
+ illegitimate wherever rung 1 or 2 exists") was unsatisfiable on a gated client: the
15
+ agent could not obey it without asking, and no rule said to ask.
16
+
17
+ ### Added
18
+ - **The gated-rung stop.** At a due review gate (design; closure), when the best rung is
19
+ permission-gated (a standing policy — an interactive per-call prompt is NOT this) and
20
+ no ungated rung works (a working one-shot CLI pre-empts the stop; a gated rung 2 joins
21
+ the question instead), the gate stops and asks ONE question in the five-bullet blocking
22
+ form: the gated rung(s) vs the fallback, each higher rung's status, the quoted policy,
23
+ the cost (~130-175k subagent tokens per deep review, measured 2026-08) AND what
24
+ independence last bought, and what stays blocked. **No grant memory**: the answer holds
25
+ while the conversation does; an agent that cannot recall a grant asks again. Unattended
26
+ runs never emit the question — rung 2 is still owed a try, then rung 3 with its reason.
27
+ (Successor to a design CANCELLED at the review cap after grant memory failed three
28
+ ways; rulings r18/r19.)
29
+ - **The reason words.** A below-rung-1 row says why the rung(s) above did not run:
30
+ `absent` (the client has no such facility — a claim about the client, never a policy),
31
+ `gated, declined`, `gated, unattended`, `gated, pre-empted` (nothing asked — an
32
+ ungated lower rung ran the review). A rung-1 row owes nothing. For rung 3 this
33
+ re-words an existing duty; for rung 2 it is a new one-word duty, disclosed and
34
+ accepted with the rest.
35
+
5
36
  ## [1.5.1] - 2026-08-25
6
37
 
7
38
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kb-agentic-skill",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "Knowledge-Base & Document-First protocol with risk triage, Vision governance, signal distillation and optional devPNT integration.",
5
5
  "author": "Antonio Pinto (https://github.com/Antoneeo)"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antoneeo/kb-agentic-skill",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "Knowledge-Base & Document-First protocol for Claude Code, Gemini CLI, Google Antigravity and Codex with risk triage, Vision governance, signal distillation and optional devPNT integration.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kb-agentic
3
- version: 1.5.1
3
+ version: 1.6.0
4
4
  description: Knowledge-Base & Document-First protocol with risk-proportional triage, Vision as a guide, Signal Distillation, a complete Standalone mode and optional symbiosis with devPNT. Use for user documentation, knowledge extraction, SOPs, research notes, decision logs and knowledge management.
5
5
  author: Antonio Pinto (https://github.com/Antoneeo)
6
6
  copyright: (c) 2026 Antonio Pinto
@@ -120,7 +120,7 @@ Use this mode when `devpnt_*` tools are available and point at the current proje
120
120
  - Run spec elicitation round (`elicitation.md`) before drafting analysis.
121
121
  - Run taxonomy pass (`taxonomy.md`): verify whether topics, categories, or SOPs already exist in `ai_docs/`. Avoid duplication.
122
122
  - Create or update `ai_docs/solutions/ANALYSIS_[topic].md`.
123
- - **Design review gate (end of Phase 3, before any drafting):** the analysis is reviewed by somebody other than its author — a subagent with fresh context, or a declared self-pass when none is available. Follow `review.md`; log the outcome in `audit/reviews/REVIEW_LOG.md`. A knowledge structure reviewed only by the person who chose it is not reviewed.
123
+ - **Design review gate (end of Phase 3, before any drafting):** the analysis is reviewed by somebody other than its author — a subagent with fresh context, or a declared self-pass when no higher rung is usable — a permission-gated rung is asked about, never silently skipped (`review.md`). Follow `review.md`; log the outcome in `audit/reviews/REVIEW_LOG.md`. A knowledge structure reviewed only by the person who chose it is not reviewed.
124
124
 
125
125
  ### 4. Knowledge Processing & Distillation
126
126
  - **Isolate the work (Branch/worktree hygiene).** Distillation rewrites existing notes: do it on a branch or a worktree, never directly on the shared corpus, so a half-finished reconciliation is never what the next reader finds.
@@ -1,96 +1,98 @@
1
- # Subagent Execution Discipline
2
-
3
- Opt-in orchestration for L3 work with an approved design: the orchestrator
4
- drives a `PLAN_[feature].md` through subagents instead of implementing every
5
- task in the same session. Default stays same-session; this is an escalation,
6
- never a requirement.
7
-
8
- ## Trigger
9
-
10
- Only for L3 (an approved E-TDD in Hybrid, or an ANALYSIS Action Plan in
11
- Standalone). Never for L1/L2 — the plan/ledger machinery is overhead a small
12
- change does not need. The plan is always `derived-from` the accepted design:
13
- it is never independently authored, exactly like an E-TDD is never authored
14
- without an E-ISP.
15
-
16
- ## The loop
17
-
18
- 1. `sdlc_check.py plan validate PLAN_[feature].md` — zero-execution schema +
19
- confinement + ledger cross-check. Non-zero exit = **no dispatch**. This is
20
- the hard gate: "no valid plan, no dispatch."
21
- 2. For each task, in plan order:
22
- - Read the task's status from the sidecar ledger
23
- (`PLAN_[feature].ledger.json`). `status: done` (exact sentinel) → skip,
24
- never re-dispatch. Anything else (pending, failed, missing, or a
25
- corrupt-but-parseable entry) → treat as pending and dispatch.
26
- - `sdlc_check.py plan brief PLAN_[feature].md --task <id>` — prints the
27
- task block, the `produces` of prior-order tasks (interfaces), and
28
- `guides` pointers (paths, never pasted content) to stdout.
29
- - Spawn the subagent with that brief as its entire context window.
30
- - Run `task.verify` out of band (the orchestrator executes it — the
31
- validator only ever prints it, never runs it) plus the one-shot review
32
- below.
33
- - Write `{status, verify_result, timestamp}` back to the ledger. The
34
- validator never writes the ledger — single-writer, orchestrator-owned.
35
-
36
- **Guide consumption under dispatch.** Selecting each task's `guides` field IS the
37
- consult trigger (`guides.md` §0) applied at plan-authoring time: the orchestrator
38
- runs the router lookup (project router `ai_docs/reference/INDEX.md` + the agent-KB
39
- router) when populating `guides`. A dispatched context-free subagent does **NOT**
40
- run its own router consult — it reads the guide pointers handed to it in the
41
- brief. The router verdict (Rule Zero) is therefore declared ONCE, by the
42
- orchestrator, when it authors the plan; a dispatched subagent does not declare
43
- one. (Proactive guide-creation stays at closure — the same broad final pass
44
- below — so it needs no separate dispatch hook.)
45
-
46
- ## Model tiers (client-relative, no provider names)
47
-
48
- - Default dispatch: **economy** implementer tier.
49
- - After **two** consecutive `verify_result: fail` on the same task: escalate
50
- to the **deep** tier for the retry (ADR 2026-07-02). Do not escalate on the
51
- first failure — a single fail is often a brief or environment issue, not a
52
- capability gap.
53
-
54
- ## Review slots — one-shot, not iterative
55
-
56
- Exactly three review touches per task, never a loop:
57
-
58
- 1. Inline self-review by the implementer subagent before it reports done
59
- (the standard critical-review pass, not a separate call).
60
- 2. One reviewer pass per task (Hybrid: reuse the devPNT code-review gate;
61
- Standalone: the `review.md` discipline).
62
- 3. One broad final pass over the whole plan at closure, after all tasks are
63
- DONE — catches cross-task drift a per-task review cannot see.
64
-
65
- If a review FAILs, fix and re-run `verify` — that is a normal loop iteration
66
- via the ledger's fail path, not an extra review slot.
67
-
68
- **The scoped re-review is a round INSIDE slot 2 or 3, never a fourth slot.**
69
- `review.md` §Receiving requires every review-driven correction to be
70
- re-reviewed against the correction alone — that round belongs to the slot whose
71
- findings caused it, and is bounded by the same cap of 3 rounds. "Never a loop"
72
- bounds the SLOTS (no unbounded re-reviewing of a task), not the rounds inside
73
- one slot: a fix nobody looked at is the defect the round exists to catch. Slot 1
74
- is the implementer's own pass, not an independent review, so its fixes carry no
75
- re-review round. The ledger records the round on the task's fail path as usual.
76
-
77
- ## Ledger protocol summary
78
-
79
- Read → skip-if-done → dispatch-if-pending → write. The ledger is the only
80
- memory the loop needs across sessions or context compaction: a resumed
81
- orchestrator re-reads it and picks up exactly where it left off, never
82
- re-running a DONE task.
83
-
84
- ## Degradation
85
-
86
- No subagent-spawning tool available the orchestrator runs each task in the
87
- same session, against the same plan and ledger, with the same one-shot review
88
- slots. No capability is lost, only the parallelism/isolation subagents would
89
- have added.
90
-
91
- ## Hybrid note
92
-
93
- The plan's `derived-from` points at the accepted E-TDD document key. Per-task
94
- review reuses the devPNT independent reviewers (§4.6 code review gate) rather
95
- than restating review doctrine see `review.md` for the single definition
96
- both modes share.
1
+ # Subagent Execution Discipline
2
+
3
+ Opt-in orchestration for L3 work with an approved design: the orchestrator
4
+ drives a `PLAN_[feature].md` through subagents instead of implementing every
5
+ task in the same session. Default stays same-session; this is an escalation,
6
+ never a requirement.
7
+
8
+ ## Trigger
9
+
10
+ Only for L3 (an approved E-TDD in Hybrid, or an ANALYSIS Action Plan in
11
+ Standalone). Never for L1/L2 — the plan/ledger machinery is overhead a small
12
+ change does not need. The plan is always `derived-from` the accepted design:
13
+ it is never independently authored, exactly like an E-TDD is never authored
14
+ without an E-ISP.
15
+
16
+ ## The loop
17
+
18
+ 1. `sdlc_check.py plan validate PLAN_[feature].md` — zero-execution schema +
19
+ confinement + ledger cross-check. Non-zero exit = **no dispatch**. This is
20
+ the hard gate: "no valid plan, no dispatch."
21
+ 2. For each task, in plan order:
22
+ - Read the task's status from the sidecar ledger
23
+ (`PLAN_[feature].ledger.json`). `status: done` (exact sentinel) → skip,
24
+ never re-dispatch. Anything else (pending, failed, missing, or a
25
+ corrupt-but-parseable entry) → treat as pending and dispatch.
26
+ - `sdlc_check.py plan brief PLAN_[feature].md --task <id>` — prints the
27
+ task block, the `produces` of prior-order tasks (interfaces), and
28
+ `guides` pointers (paths, never pasted content) to stdout.
29
+ - Spawn the subagent with that brief as its entire context window.
30
+ - Run `task.verify` out of band (the orchestrator executes it — the
31
+ validator only ever prints it, never runs it) plus the one-shot review
32
+ below.
33
+ - Write `{status, verify_result, timestamp}` back to the ledger. The
34
+ validator never writes the ledger — single-writer, orchestrator-owned.
35
+
36
+ **Guide consumption under dispatch.** Selecting each task's `guides` field IS the
37
+ consult trigger (`guides.md` §0) applied at plan-authoring time: the orchestrator
38
+ runs the router lookup (project router `ai_docs/reference/INDEX.md` + the agent-KB
39
+ router) when populating `guides`. A dispatched context-free subagent does **NOT**
40
+ run its own router consult — it reads the guide pointers handed to it in the
41
+ brief. The router verdict (Rule Zero) is therefore declared ONCE, by the
42
+ orchestrator, when it authors the plan; a dispatched subagent does not declare
43
+ one. (Proactive guide-creation stays at closure — the same broad final pass
44
+ below — so it needs no separate dispatch hook.)
45
+
46
+ ## Model tiers (client-relative, no provider names)
47
+
48
+ - Default dispatch: **economy** implementer tier.
49
+ - After **two** consecutive `verify_result: fail` on the same task: escalate
50
+ to the **deep** tier for the retry (ADR 2026-07-02). Do not escalate on the
51
+ first failure — a single fail is often a brief or environment issue, not a
52
+ capability gap.
53
+
54
+ ## Review slots — one-shot, not iterative
55
+
56
+ Exactly three review touches per task, never a loop:
57
+
58
+ 1. Inline self-review by the implementer subagent before it reports done
59
+ (the standard critical-review pass, not a separate call).
60
+ 2. One reviewer pass per task (Hybrid: reuse the devPNT code-review gate;
61
+ Standalone: the `review.md` discipline).
62
+ 3. One broad final pass over the whole plan at closure, after all tasks are
63
+ DONE — catches cross-task drift a per-task review cannot see.
64
+
65
+ If a review FAILs, fix and re-run `verify` — that is a normal loop iteration
66
+ via the ledger's fail path, not an extra review slot.
67
+
68
+ **The scoped re-review is a round INSIDE slot 2 or 3, never a fourth slot.**
69
+ `review.md` §Receiving requires every review-driven correction to be
70
+ re-reviewed against the correction alone — that round belongs to the slot whose
71
+ findings caused it, and is bounded by the same cap of 3 rounds. "Never a loop"
72
+ bounds the SLOTS (no unbounded re-reviewing of a task), not the rounds inside
73
+ one slot: a fix nobody looked at is the defect the round exists to catch. Slot 1
74
+ is the implementer's own pass, not an independent review, so its fixes carry no
75
+ re-review round. The ledger records the round on the task's fail path as usual.
76
+
77
+ ## Ledger protocol summary
78
+
79
+ Read → skip-if-done → dispatch-if-pending → write. The ledger is the only
80
+ memory the loop needs across sessions or context compaction: a resumed
81
+ orchestrator re-reads it and picks up exactly where it left off, never
82
+ re-running a DONE task.
83
+
84
+ ## Degradation
85
+
86
+ No subagent-spawning tool available absent, or permission-gated with no grant
87
+ in context (`review.md`'s gated-rung stop owns the asking; task dispatch never
88
+ asks; the broad final pass IS `review.md` moment 2 and asks there) → the
89
+ orchestrator runs each task in the same session, against the same plan and ledger,
90
+ with the same one-shot review slots. No capability is lost, only the parallelism/isolation subagents would
91
+ have added.
92
+
93
+ ## Hybrid note
94
+
95
+ The plan's `derived-from` points at the accepted E-TDD document key. Per-task
96
+ review reuses the devPNT independent reviewers (§4.6 code review gate) rather
97
+ than restating review doctrine — see `review.md` for the single definition
98
+ both modes share.
@@ -12,7 +12,7 @@ Two moments, and they review different things:
12
12
  |---|---|---|---|
13
13
  | **1. Design review** | End of Phase 3 — **before any implementation** | the ANALYSIS (Standalone) / the `E-ISP`+`E-TDD` (Hybrid) | L3 |
14
14
  | **1b. Late arrival** | Work that became L3 *after* code existed — an L1/L2 reclassified mid-flight, or a design increment on a feature already implemented — runs moment 1 **now**, before any further implementation, logged `design (late)` | same | L3 |
15
- | **2. Closure review** | Phase 5, before DONE | the actual diff, against that approved design | L2 / L3 — the L2 row is optional |
15
+ | **2. Closure review** | Phase 5, before DONE | the actual diff, against that approved design | L2 / L3 — the L2 closure review is optional; every review that runs logs its row |
16
16
 
17
17
  **Why the design review is its own moment, and not a nicety.** The closure review
18
18
  can only tell you the code matches the design; it cannot tell you the design was
@@ -30,17 +30,56 @@ blind to it, which is why independence, not effort, is what this gate buys.
30
30
  a SELF-CONTAINED prompt — the reviewer session has no other context, which is
31
31
  exactly what makes it independent.
32
32
  3. **A declared self-pass** — a separate, explicitly adversarial pass by you,
33
- against the same checklist. **Rung 3 is illegitimate wherever rung 1 or 2
34
- exists**: on a client with a subagent facility or a one-shot CLI, descending to
35
- it is choosing zero independence, which is the one thing this gate buys. When
36
- you do use it, the log row must carry *why*`self-pass (declared; no subagent
37
- facility on this client)` not merely that you did. A rung named without its
33
+ against the same checklist. **Rung 3 is illegitimate wherever a higher rung
34
+ is usable**: on a client with a working subagent facility or one-shot CLI,
35
+ descending to it is choosing zero independence, which is the one thing this
36
+ gate buys. A gated rung the user DECLINED is not usablesee *The gated
37
+ rung* below; a gated rung nobody asked about is not declined (unattended is
38
+ its own case below). When
39
+ you do use it, the log row must carry *why*, in the reason words below —
40
+ `self-pass (declared; absent — the client has no such facility)` — not merely
41
+ that you did. A rung named without its
38
42
  reason is indistinguishable from a rung chosen for convenience.
39
43
 
40
44
  Rung 3 stays in the ladder deliberately: it is what keeps the methodology
41
45
  completable with no network, no account and no subagent facility. It is a floor,
42
46
  never a default.
43
47
 
48
+ **The gated rung — present is not absent (F-038).** A rung that exists behind a
49
+ standing policy or instruction forbidding its use absent a user request is
50
+ **permission-gated**, not unavailable. An interactive per-call approval prompt is
51
+ NOT this: answering the prompt IS the grant. With an ungated rung usable — rung 1
52
+ free, or a one-shot CLI that works (try it, or show it failed) — the prohibition
53
+ above is already satisfiable and no stop fires (the row still carries
54
+ `gated, pre-empted` when a gated rung sat above the one that ran); a gated
55
+ rung 2 is not "usable" for this clause, it joins the question instead. When the best rung is gated and no
56
+ ungated rung works, the gate STOPS and asks: descending to rung 3 on silence is
57
+ illegal while a user is reachable. The stop is doctrine-mandated (legal by mandate,
58
+ `elicitation.md` §Blocking is reserved) and carries that file's five-bullet
59
+ blocking form — its closed-list exemption covers this file's round-cap hand-over
60
+ only, not this stop. The question offers the gated rung(s) against the fallback, with what each
61
+ buys; states each higher rung's status (tried / unusable / gated) with the
62
+ standing instruction quoted and "no grant visible in my current context"; says
63
+ why no assumption survives (assuming either way writes a false log row); says
64
+ why it is the USER'S call — their tokens (~130-175k per deep review, measured
65
+ 2026-08) against a benefit only they can price, stated with what independence
66
+ last bought; and names what stays blocked — which reviewer runs, nothing else.
67
+ **No grant memory exists**: the answer holds while the conversation does, and an
68
+ agent that cannot recall a grant asks again — one question per gate per intact
69
+ context; re-asking is a smaller defect than a false row. Unattended
70
+ (`elicitation.md`'s Unattended path — the user is not reachable), no question is
71
+ emitted: rung 2 is still owed a try, then rung 3 runs with its reason logged.
72
+
73
+ **The reason words.** A below-rung-1 row carries why the rung(s) above did not
74
+ run; a rung-1 row owes nothing. `absent` — the client has no such facility (a
75
+ claim about the client, never about a policy); `gated, declined` — usable only
76
+ with the user's assent at this gate, and the user withheld it (a standing policy
77
+ answered no, or a per-call prompt denied); `gated, unattended` — a standing policy
78
+ gates it and no user is reachable to ask; `gated, pre-empted` — gated, nothing
79
+ asked: an ungated lower rung ran the review instead. `gated` always appears with
80
+ its outcome. The trigger term "permission-gated" scopes the STOP; the row word
81
+ `gated` additionally covers a denied per-call prompt, which never triggers one.
82
+
44
83
  Use a different model from the author's where the client allows it.
45
84
 
46
85
  **Rounds are capped at 3.** FAIL → revise → re-review. If findings still stand
@@ -448,7 +448,7 @@ adds values to the existing columns rather than a second table.
448
448
  | date | doc_key | tier | reviewer | findings_raised | findings_real | verdict | revise_rounds |
449
449
  |---|---|---|---|---|---|---|---|
450
450
  | 2026-06-11 | ANALYSIS_login_sso.md | design | subagent (opus, fresh ctx) | 4 | 3 | FAIL → PASS | 2 |
451
- | 2026-06-12 | diff feature/sso-login | closure | self-pass (declared; no subagent facility) | 2 | 2 | PASS with findings → corrections re-reviewed, PASS | 2 |
451
+ | 2026-06-12 | diff feature/sso-login | closure | self-pass (declared; absent) | 2 | 2 | PASS with findings → corrections re-reviewed, PASS | 2 |
452
452
 
453
453
  ## Notes
454
454
  <!-- One short paragraph per review that found something worth remembering: what
@@ -463,9 +463,17 @@ and `closure` (Standalone); `deep`, `light`, `code`, `guide`, `vision` (devPNT g
463
463
  and the Vision blind check). The validator reads this column by its header name, so
464
464
  extra or reordered columns are fine — but the header must say `tier`. `reviewer`
465
465
  records the realization actually used — fresh subagent, one-shot client run, or a
466
- **declared** self-pass. Writing `self-pass` where independence was unavailable is
467
- honest; writing nothing, or implying independence you did not have, is the failure
468
- this column exists to prevent. `findings_real` is how many raised findings survived
466
+ **declared** self-pass and, for any rung below rung 1, WHY the rung(s) above did
467
+ not run, in the ladder's reason words (`review.md`): `absent` the client has no
468
+ such facility (a claim about the client, never about a policy); `gated, declined` —
469
+ usable only with the user's assent at this gate, withheld (a standing policy
470
+ answered no, or a per-call prompt denied); `gated, unattended` — a standing policy
471
+ gates it, no user reachable; `gated, pre-empted` — gated, nothing asked, an ungated
472
+ lower rung ran the review. A rung-1 row owes nothing. `gated` here is the ROW
473
+ word — it also covers a denied per-call prompt, which never triggers `review.md`'s
474
+ stop. Writing `self-pass` with its
475
+ true reason is honest; writing nothing, or implying independence you did not have,
476
+ is the failure this column exists to prevent. `findings_real` is how many raised findings survived
469
477
  triage: over time it is the only evidence of whether the gate earns its cost.
470
478
  `revise_rounds` counts **review rounds**, not fix cycles: the first review is round 1
471
479
  and every scoped re-review adds one. A review that produced findings which were then