@antoneeo/kb-agentic-skill 1.4.7 → 1.5.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.
@@ -1,148 +1,148 @@
1
- ---
2
- name: kb-agentic
3
- version: 1.4.7
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
- author: Antonio Pinto (https://github.com/Antoneeo)
6
- copyright: (c) 2026 Antonio Pinto
7
- ---
8
-
9
- # KB Agentic
10
-
11
- **Why this skill exists:** to prevent *knowledge degradation and myopia* — acting from partial understanding, where new information contradicts un-indexed notes and hard-won knowledge evaporates between sessions. Triage, the Vision Gate, signal distillation, the documentation lifecycle, and operative guide routers are all one defense against that.
12
-
13
- This skill guides knowledge management and documentation with a Document-First process proportional to risk. It works fully even without devPNT. When devPNT is available and configured for the current project, the skill works in symbiosis with its governance: M-VISION, Master Plan, Action Plan and versioned artifacts become the authoritative frame for milestones and knowledge nodes.
14
-
15
- Support files in the skill directory:
16
- - `templates.md`: templates for Vision, Knowledge ANALYSIS, Research SPIKE, SOP GUIDE, audit plan, and handoff.
17
- - `portability.md`: carrying knowledge between projects — what a bundle is, why export is a closure rather than a selection, and the rule that knowledge crosses a project boundary while authority does not (`prov: IMPORTED`). Read before `export`/`import`.
18
- - `taxonomy.md`: placing a claim in the topic graph — descent over the generated index, the five verdicts (EXISTS / INADEQUATE / MISSING / GENERALIZES / UNPLACED), the sibling rule, guarded re-parenting, canonicalization. Run at L3 before drafting.
19
- - `guides.md`: pipeline for distilling user-provided indications into `ai_docs/reference/GUIDE_[topic].md`.
20
- - `vision.md`: how to write a Vision a cold reviewer can actually apply — the properties that make a rule hold, the minimum operable sections, and the blind check.
21
- - `distillation.md`: from a source to claim rows — intake (content-addressed originals, stored canonical extraction, every provenance a real file), the claim table, extraction discipline, signal rules (symbiosis with `distill`).
22
- - `reconciliation.md`: what happens when two claims meet — five outcomes, detect-and-hold (the machine never decides), rulings with mandatory `basis:`, the claim state machine, the batched escalation form.
23
- - `review.md`: the review discipline — when a review is due, how to request one, how to receive findings, how to review.
24
- - `dispatch.md`: opt-in subagent execution of an approved plan.
25
- - `routing.md`: which lens owns this unit of work. Read ONLY when a sibling lens skill is installed alongside this one; a single-lens install never reads it.
26
- - `scripts/sdlc_check.py` + `scripts/sdlc_core.py`: the mechanical validator for the docs root (`check`, `validate`, `index`, `stale`, `mark`, `gate`, `plan`, `orient`, `migrate`, and the knowledge overlay: `graph`, `corpus`, `claim-id`, `anchor`, `export`, `import`). Two files: the core is the family's shared spine; the entry point IS the knowledge overlay — the claim ledger and topic-graph checks live inside it, so the core alone runs none of them. Copy both, or neither.
27
- - `ENFORCEMENT.md`: optional setup for CI and hooks.
28
-
29
- Read these files only when needed. `SKILL.md` is the operating contract; the support files are progressive resources.
30
-
31
- ## Knowledge Values
32
-
33
- - **Understand before writing/updating:** do not modify or create knowledge documents without checking root cause, user constraints, and existing notes — trust the primary sources and existing guides, not memory.
34
- - **Apply DRY and Single Source of Truth:** do not duplicate knowledge across files; extend existing notes (`ANALYSIS_[topic].md` or `GUIDE_[topic].md`).
35
- - **Signal & Distillation:** eliminate fluff, filler, and speculative statements; keep deterministic facts, constraints, decisions, and clear SOP steps (symbiosis with `distill`).
36
- - **Lifecycle & Freshness:** mark superseded knowledge (`status: SUPERSEDED` or `DEPRECATED`) so outdated information does not cause hallucination.
37
- - **Protect the Vision & User Style:** align all knowledge work with user strategic goals, operational preferences, and expected outcomes.
38
- - **Map-First Navigation:** rely on `ai_docs/README.md`, `INDEX.md`, and `reference/INDEX.md` router for targeted retrieval before creating new documents.
39
-
40
- ## Rule Zero: Triage
41
-
42
- Always classify the request before choosing the process. Declare the chosen level to the user when you start operational work.
43
-
44
- **Declare the level WITH the router verdict** (one line, for L2, L3 and Spike — L1 declares the level alone): the result of the guide-router lookup described under `## Operative Guides`, i.e. `Level: L2 · router: no match` or `Level: L3 · router: GUIDE_release_sop.md → read`. Name the guide you matched, or `no match`.
45
-
46
- | Level | Criteria | Required process |
47
- |---|---|---|
48
- | **L1 - Quick Fact / Snippet** | One claim row added to an existing topic; a typo; a preference update. No node created, no source entering the corpus, no frontmatter change. | Implement edit directly in existing note. No new documents. |
49
- | **L2 - Propagation of settled knowledge** | The fact is **already settled** in the corpus and the work carries it into existing documents — restating, correcting a stale copy, updating an SOP that quotes it. No node created or superseded, no hierarchy change, no node frontmatter change, no new source ingested. | Mini-analysis in message: objective, impact, sources, validation. Update existing document or create single SOP/note. |
50
- | **L3 - New knowledge unit / Corpus** | A source enters the corpus; a topic node is created or superseded; the hierarchy moves; a conflict must be reconciled; or what a claim asserts changes. | Full workflow: Vision Gate, Spec Elicitation, Taxonomy Pass, Knowledge Analysis, Distillation, Review, Indexing. |
51
- | **Spike - Exploration** | Time-boxed exploratory research or draft without merging into official KB. | Outcome in `ai_docs/solutions/SPIKE_[topic].md`. |
52
-
53
- Cross-cutting rules:
54
- - **The unit of measure here is knowledge, never file count.** In this domain risk is
55
- knowledge-shaped: carrying one settled fact into eight documents is small, and one
56
- claim that re-parents a node is not. Do not import the code lens's file thresholds —
57
- a level is chosen by what the change does to the corpus and the graph. What keeps
58
- this from becoming an escape hatch is the trigger list below, which overrides the
59
- level whatever the size, plus one limit: **propagation that changes what a claim
60
- asserts is not propagation** — it is a new knowledge unit, so L3.
61
- - **Domain routing (multi-lens installs only).** After the level is set, and only when a sibling lens skill of this family is installed (`agentic-sdlc`, `mkt-agentic-sdlc`), run the router in `routing.md` for every L2, L3 and Spike: it decides which lens's method and validation rules govern this unit of work. L1 never reaches it, and a single-lens install never reads the file — detection fails open. In such a project, never refer to a document whose meaning differs by lens ("threat model", "vision", `principles.md`, `handoff.md`) by its bare name: qualify it with its domain, or name its path.
62
- - Personal data, credentials, security-sensitive processes, authN/authZ specs are high-risk: never L1.
63
- - **Escalation triggers — ANY of these makes it L3, whatever the file count:** the change touches the topic hierarchy (`parents:`, a `GENERALIZES` verdict, a re-parent); it touches more than one node's frontmatter; it creates or supersedes a node other nodes reference. Re-shaping the graph is a unit of change, never a side effect of placing one claim.
64
- - Adding one claim row to an existing topic is L1: the `id` may be left empty (the validator fills it — `claim-id --fill`), and no check errors on a hand-written row.
65
- - If a bigger impact emerges during L1/L2 work, stop, reclassify and declare it.
66
- - When in doubt, pick the higher level.
67
- - **No useless questions.** Every question to the practitioner passes the legality test of the question discipline (`elicitation.md`): searched first with the search named, and the blocked decision named. Claim-conflict escalations additionally carry their own mandated form and are batched at run end (`reconciliation.md` §4).
68
-
69
- ## Write Triggers
70
-
71
- Triage decides IF documentation is due; this table decides WHICH document each event produces, and when. **One event, one destination:** when the trigger fires and the document does not exist, create it; when it exists, update it — never duplicate it.
72
-
73
- | Document | Write trigger | Phase |
74
- |---|---|---|
75
- | `solutions/ANALYSIS_[topic].md` | Every L3, after elicitation and before any drafting. On topic match with an existing analysis, update that one instead of a new file. | 3 |
76
- | `solutions/SPIKE_[topic].md` | Closing any Spike — including a negative outcome. | — |
77
- | `vision/features/VISION_[feature].md` | Multi-milestone topic at analysis time, or retroactive trigger (second ANALYSIS on same theme). | 3 |
78
- | `audit/handoff.md` (workstream registry) | **Never by hand — generated by `sdlc_check.py index` from the `HANDOFF_*.md` sources**, and `validate` errors when the two disagree. Regenerate at every L3 closure and at session end; the `Date:` header is derived, so no writer touches it. Inventory for lookup, never a work board. | 5 / session end |
79
- | `audit/HANDOFF_[topic].md` | **One per OPEN workstream, with or without volatile state** — it is the authored home of that workstream's registry row (frontmatter `workstream`/`level`/`branch`/`status`/`since`/`next`/`details`/`updated`), so no file means no row. Carries the resume logistics too; the ANALYSIS Diary keeps the durable narrative (DRY). DELETED at closure — deleting it *is* removing the row. | 4 / 5 / session end |
80
- | `audit/project_notes.md` | A note true for the whole project rather than one workstream. Appended verbatim to the generated registry, so regenerating cannot destroy notes that belong to no workstream. | 5 / session end |
81
- | `audit/handoff.md` — converting an existing project | **Lazily, at the first write — and then ALL AT ONCE.** Converting one row at a time is the state that loses the others, so `index` refuses to write while anything in the file is unaccounted for and names it. Until the first source exists nothing generates and nothing errors. | 5 / session end |
82
- | `audit/audit_plan.md` (Standalone) | Bootstrap, and whenever a mapped area changes state (`sdlc_check.py mark`). | 1 |
83
- | `reference/GUIDE_[topic].md` (`source_kind: document`) | Origin+purpose test (`guides.md`), or a proactive proposal accepted by user. | 4 / 5 |
84
- | `reference/GUIDE_[topic].md` (`source_kind: code`/`domain`) | Recognized high-complexity domain/concept with no CURRENT guide $\rightarrow$ duty to write autonomously. | 4 / 5 |
85
- | `audit/reviews/REVIEW_LOG.md` | Every completed review — recorded in log. | 3 / 5 |
86
- | ADR / Decision Log — `architecture/` or devPNT DB | A strategic decision was taken (pattern, policy, structural change): record before DONE. | 5 |
87
- | `strategic/architecture.md`, `strategic/existing_features.md` | Bootstrap; update at closure when the knowledge catalog actually changed. | 1 / 5 |
88
- | `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation. | 1 / 2 |
89
- | `topics/<slug>.md` | A placement verdict creates it (MISSING/INADEQUATE-child, `taxonomy.md`); reconciliation updates its claim rows. One node per topic — a similar-but-distinct concept is a sibling with `related:` + a written distinction, never a merge and never a duplicate. Merged/renamed nodes become tombstones (`status: SUPERSEDED` + `redirect_to:`), never deleted. | 4 |
90
- | a KB bundle (`export`) | Knowledge must leave this project. Export is L1 — it writes nothing into the corpus. **Importing one is L3**: a source enters the corpus and nodes are created, and a bundle is external input, so never L1 whatever its size (`portability.md`). | — |
91
- | `corpus/given/*` + sidecar | A source arrives: it becomes a content-addressed artifact with a sidecar carrying digest/date/`supersedes:`. A text source is copied verbatim. A non-text source yields its stored canonical extraction — copied **beside** the original when that is small enough to keep, or **instead of it** on a large binary corpus, where the original stays where it lives and is recorded as `original_path:`/`original_sha256:` (`distillation.md` §1, which owns this rule). Never edited after ingest — the digest check on whatever `given/` holds is what enforces it. | 4 |
92
- | `corpus/notes/*` | Something is said (`origin: elicited`), synthesised (`derived_from:`), or ruled (`basis:`). A note with none of the three is refused by the validator. | 4 / 5 |
93
- | `solutions/PLAN_[topic].md` + its ledger | A source too long for one context is ingested: **one task per reading window** (30 pages by default; the plan states the window used), each ending at a declared `extracted_through:`. That ledger is the register the ingestion resumes from across sessions — ingestion never builds a second one (`distillation.md` §3, `templates.md`). | 4 |
94
- | `corpus/given/*.meta.md` — `extracted_through:` | Every reading window closes by advancing it (`p=<n>`, `L<n>`, `complete`). Required once any claim cites the artifact: unstated, "I am finished" cannot be falsified, which is how a sampled 200-page manual passes for an ingested one. | 4 |
95
- | `INDEX.md`, `reference/INDEX.md`, `topics/INDEX.md`, `corpus/INDEX.md` | Regenerated by `sdlc_check.py index` at closure — never by hand; `validate` fails on a hand-edited one. | 5 |
96
-
97
- ## Operating Modes
98
-
99
- ### Full Standalone
100
- Use this mode when devPNT is unavailable, not configured for the current project, or the user explicitly asks for a filesystem-only workflow.
101
- - Source of truth: `ai_docs/` (`vision/`, `solutions/`, `reference/`, `audit/`, `strategic/`).
102
-
103
- ### Hybrid in symbiosis with devPNT
104
- Use this mode when `devpnt_*` tools are available and point at the current project.
105
- - devPNT governs `M-VISION`, Master Plan, Action Plan, and versioned artifacts.
106
- - Local `ai_docs/` serves as readable context, Standalone fallback, local handoff, or shadow copy.
107
-
108
- ## L3 Workflow
109
-
110
- ### 1. Audit and Alignment
111
- - Read `ai_docs/audit/handoff.md` (workstream registry) to see active topics.
112
- - Read `ai_docs/README.md`, `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md` (the guide router) before exploring notes. The router is a mandatory read, not an optional one: it is the only orientation step that tells you a guide already governs the work you are about to do.
113
- - If `ai_docs/` is missing, create the bootstrap set: `README.md`, `vision/` docs, `strategic/` docs, and `audit/audit_plan.md`, then run `sdlc_check.py index`.
114
-
115
- ### 2. Vision Gate
116
- - Read `project_vision.md`, `roadmap.md`, `principles.md` (or devPNT `M-VISION`).
117
- - Verify request aligns with expected benefits, user goals, and success signals.
118
-
119
- ### 3. Request Analysis & Taxonomy Pass
120
- - Run spec elicitation round (`elicitation.md`) before drafting analysis.
121
- - Run taxonomy pass (`taxonomy.md`): verify whether topics, categories, or SOPs already exist in `ai_docs/`. Avoid duplication.
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.
124
-
125
- ### 4. Knowledge Processing & Distillation
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.
127
- - Before drafting (L2/L3; L1 exempt), **consult the guide router** for a guide covering the task and read it first (the consult trigger, `guides.md` §0). A targeted description match, not a blanket read. Its result is the router verdict already declared with the triage level (Rule Zero).
128
- - Execute knowledge extraction using **Signal Distillation** (`distillation.md`).
129
- - **Opt-in subagent execution**: for an L3 with an approved analysis, the work MAY be executed via subagents per `dispatch.md`; default stays same-session.
130
- - Handle conflicting or outdated information via **Reconciliation** (`reconciliation.md`). Mark obsolete files `status: SUPERSEDED`.
131
-
132
- ### 5. Closure & Indexing
133
- - Run verification checks (`sdlc_check.py check --root <project_root>`).
134
- - If the work was governed by user-provided indications and is reusable, **PROPOSE distilling a guide** (proactive trigger, `guides.md` §1) — a proposal for the user, never a silent write, never from model knowledge.
135
- - Update `audit/handoff.md`.
136
- - Regenerate manifests: `python <skill_dir>/scripts/sdlc_check.py index --root <project_root>`.
137
- - Mark output clean and complete.
138
-
139
- ## Operative Guides & Router
140
- Guides are consulted, created, and distilled per `guides.md`.
141
- - **Consult (before acting)**: check `ai_docs/reference/INDEX.md` — the guide router — and declare the verdict with the triage level.
142
- - **Propose proactively**: when the user hands over indications that will govern future work, propose distilling them into a guide. A proposal, never a silent write, and never from model knowledge — a guide's whole value is that every claim traces to what the user actually provided.
143
- - Distill from user instructions into `ai_docs/reference/GUIDE_[topic].md`.
144
-
145
- ## Mechanical Enforcement
146
- - `scripts/sdlc_check.py index`: updates `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md`.
147
- - `scripts/sdlc_check.py validate`: validates YAML frontmatter (`status`, `description`).
148
- - `scripts/sdlc_check.py check`: checks dirty closures and missing indexes.
1
+ ---
2
+ name: kb-agentic
3
+ version: 1.5.0
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
+ author: Antonio Pinto (https://github.com/Antoneeo)
6
+ copyright: (c) 2026 Antonio Pinto
7
+ ---
8
+
9
+ # KB Agentic
10
+
11
+ **Why this skill exists:** to prevent *knowledge degradation and myopia* — acting from partial understanding, where new information contradicts un-indexed notes and hard-won knowledge evaporates between sessions. Triage, the Vision Gate, signal distillation, the documentation lifecycle, and operative guide routers are all one defense against that.
12
+
13
+ This skill guides knowledge management and documentation with a Document-First process proportional to risk. It works fully even without devPNT. When devPNT is available and configured for the current project, the skill works in symbiosis with its governance: M-VISION, Master Plan, Action Plan and versioned artifacts become the authoritative frame for milestones and knowledge nodes.
14
+
15
+ Support files in the skill directory:
16
+ - `templates.md`: templates for Vision, Knowledge ANALYSIS, Research SPIKE, SOP GUIDE, audit plan, and handoff.
17
+ - `portability.md`: carrying knowledge between projects — what a bundle is, why export is a closure rather than a selection, and the rule that knowledge crosses a project boundary while authority does not (`prov: IMPORTED`). Read before `export`/`import`.
18
+ - `taxonomy.md`: placing a claim in the topic graph — descent over the generated index, the five verdicts (EXISTS / INADEQUATE / MISSING / GENERALIZES / UNPLACED), the sibling rule, guarded re-parenting, canonicalization. Run at L3 before drafting.
19
+ - `guides.md`: pipeline for distilling user-provided indications into `ai_docs/reference/GUIDE_[topic].md`.
20
+ - `vision.md`: how to write a Vision a cold reviewer can actually apply — the properties that make a rule hold, the minimum operable sections, and the blind check.
21
+ - `distillation.md`: from a source to claim rows — intake (content-addressed originals, stored canonical extraction, every provenance a real file), the claim table, extraction discipline, signal rules (symbiosis with `distill`).
22
+ - `reconciliation.md`: what happens when two claims meet — five outcomes, detect-and-hold (the machine never decides), rulings with mandatory `basis:`, the claim state machine, the batched escalation form.
23
+ - `review.md`: the review discipline — when a review is due, how to request one, how to receive findings, how to review.
24
+ - `dispatch.md`: opt-in subagent execution of an approved plan.
25
+ - `routing.md`: which lens owns this unit of work. Read ONLY when a sibling lens skill is installed alongside this one; a single-lens install never reads it.
26
+ - `scripts/sdlc_check.py` + `scripts/sdlc_core.py`: the mechanical validator for the docs root (`check`, `validate`, `index`, `stale`, `mark`, `gate`, `plan`, `orient`, `migrate`, and the knowledge overlay: `graph`, `corpus`, `claim-id`, `anchor`, `export`, `import`). Two files: the core is the family's shared spine; the entry point IS the knowledge overlay — the claim ledger and topic-graph checks live inside it, so the core alone runs none of them. Copy both, or neither.
27
+ - `ENFORCEMENT.md`: optional setup for CI and hooks.
28
+
29
+ Read these files only when needed. `SKILL.md` is the operating contract; the support files are progressive resources.
30
+
31
+ ## Knowledge Values
32
+
33
+ - **Understand before writing/updating:** do not modify or create knowledge documents without checking root cause, user constraints, and existing notes — trust the primary sources and existing guides, not memory.
34
+ - **Apply DRY and Single Source of Truth:** do not duplicate knowledge across files; extend existing notes (`ANALYSIS_[topic].md` or `GUIDE_[topic].md`).
35
+ - **Signal & Distillation:** eliminate fluff, filler, and speculative statements; keep deterministic facts, constraints, decisions, and clear SOP steps (symbiosis with `distill`).
36
+ - **Lifecycle & Freshness:** mark superseded knowledge (`status: SUPERSEDED` or `DEPRECATED`) so outdated information does not cause hallucination.
37
+ - **Protect the Vision & User Style:** align all knowledge work with user strategic goals, operational preferences, and expected outcomes.
38
+ - **Map-First Navigation:** rely on `ai_docs/README.md`, `INDEX.md`, and `reference/INDEX.md` router for targeted retrieval before creating new documents.
39
+
40
+ ## Rule Zero: Triage
41
+
42
+ Always classify the request before choosing the process. Declare the chosen level to the user when you start operational work.
43
+
44
+ **Declare the level WITH the router verdict** (one line, for L2, L3 and Spike — L1 declares the level alone): the result of the guide-router lookup described under `## Operative Guides`, i.e. `Level: L2 · router: no match` or `Level: L3 · router: GUIDE_release_sop.md → read`. Name the guide you matched, or `no match`.
45
+
46
+ | Level | Criteria | Required process |
47
+ |---|---|---|
48
+ | **L1 - Quick Fact / Snippet** | One claim row added to an existing topic; a typo; a preference update. No node created, no source entering the corpus, no frontmatter change. | Implement edit directly in existing note. No new documents. |
49
+ | **L2 - Propagation of settled knowledge** | The fact is **already settled** in the corpus and the work carries it into existing documents — restating, correcting a stale copy, updating an SOP that quotes it. No node created or superseded, no hierarchy change, no node frontmatter change, no new source ingested. | Mini-analysis in message: objective, impact, sources, validation. Update existing document or create single SOP/note. |
50
+ | **L3 - New knowledge unit / Corpus** | A source enters the corpus; a topic node is created or superseded; the hierarchy moves; a conflict must be reconciled; or what a claim asserts changes. | Full workflow: Vision Gate, Spec Elicitation, Taxonomy Pass, Knowledge Analysis, Distillation, Review, Indexing. |
51
+ | **Spike - Exploration** | Time-boxed exploratory research or draft without merging into official KB. | Outcome in `ai_docs/solutions/SPIKE_[topic].md`. |
52
+
53
+ Cross-cutting rules:
54
+ - **The unit of measure here is knowledge, never file count.** In this domain risk is
55
+ knowledge-shaped: carrying one settled fact into eight documents is small, and one
56
+ claim that re-parents a node is not. Do not import the code lens's file thresholds —
57
+ a level is chosen by what the change does to the corpus and the graph. What keeps
58
+ this from becoming an escape hatch is the trigger list below, which overrides the
59
+ level whatever the size, plus one limit: **propagation that changes what a claim
60
+ asserts is not propagation** — it is a new knowledge unit, so L3.
61
+ - **Domain routing (multi-lens installs only).** After the level is set, and only when a sibling lens skill of this family is installed (`agentic-sdlc`, `mkt-agentic-sdlc`), run the router in `routing.md` for every L2, L3 and Spike: it decides which lens's method and validation rules govern this unit of work. L1 never reaches it, and a single-lens install never reads the file — detection fails open. In such a project, never refer to a document whose meaning differs by lens ("threat model", "vision", `principles.md`, `handoff.md`) by its bare name: qualify it with its domain, or name its path.
62
+ - Personal data, credentials, security-sensitive processes, authN/authZ specs are high-risk: never L1.
63
+ - **Escalation triggers — ANY of these makes it L3, whatever the file count:** the change touches the topic hierarchy (`parents:`, a `GENERALIZES` verdict, a re-parent); it touches more than one node's frontmatter; it creates or supersedes a node other nodes reference. Re-shaping the graph is a unit of change, never a side effect of placing one claim.
64
+ - Adding one claim row to an existing topic is L1: the `id` may be left empty (the validator fills it — `claim-id --fill`), and no check errors on a hand-written row.
65
+ - If a bigger impact emerges during L1/L2 work, stop, reclassify and declare it.
66
+ - When in doubt, pick the higher level.
67
+ - **No useless questions.** Every question to the practitioner passes the legality test of the question discipline (`elicitation.md`): searched first with the search named, and the blocked decision named. Claim-conflict escalations additionally carry their own mandated form and are batched at run end (`reconciliation.md` §4).
68
+
69
+ ## Write Triggers
70
+
71
+ Triage decides IF documentation is due; this table decides WHICH document each event produces, and when. **One event, one destination:** when the trigger fires and the document does not exist, create it; when it exists, update it — never duplicate it.
72
+
73
+ | Document | Write trigger | Phase |
74
+ |---|---|---|
75
+ | `solutions/ANALYSIS_[topic].md` | Every L3, after elicitation and before any drafting. On topic match with an existing analysis, update that one instead of a new file. | 3 |
76
+ | `solutions/SPIKE_[topic].md` | Closing any Spike — including a negative outcome. | — |
77
+ | `vision/features/VISION_[feature].md` | Multi-milestone topic at analysis time, or retroactive trigger (second ANALYSIS on same theme). | 3 |
78
+ | `audit/handoff.md` (workstream registry) | **Never by hand — generated by `sdlc_check.py index` from the `HANDOFF_*.md` sources**, and `validate` errors when the two disagree. Regenerate at every L3 closure and at session end; the `Date:` header is derived, so no writer touches it. Inventory for lookup, never a work board. | 5 / session end |
79
+ | `audit/HANDOFF_[topic].md` | **One per OPEN workstream, with or without volatile state** — it is the authored home of that workstream's registry row (frontmatter `workstream`/`level`/`branch`/`status`/`since`/`next`/`details`/`updated`), so no file means no row. Carries the resume logistics too; the ANALYSIS Diary keeps the durable narrative (DRY). DELETED at closure — deleting it *is* removing the row. | 4 / 5 / session end |
80
+ | `audit/project_notes.md` | A note true for the whole project rather than one workstream. Appended verbatim to the generated registry, so regenerating cannot destroy notes that belong to no workstream. | 5 / session end |
81
+ | `audit/handoff.md` — converting an existing project | **Lazily, at the first write — and then ALL AT ONCE.** Converting one row at a time is the state that loses the others, so `index` refuses to write while anything in the file is unaccounted for and names it. Until the first source exists nothing generates and nothing errors. | 5 / session end |
82
+ | `audit/audit_plan.md` (Standalone) | Bootstrap, and whenever a mapped area changes state (`sdlc_check.py mark`). | 1 |
83
+ | `reference/GUIDE_[topic].md` (`source_kind: document`) | Origin+purpose test (`guides.md`), or a proactive proposal accepted by user. | 4 / 5 |
84
+ | `reference/GUIDE_[topic].md` (`source_kind: code`/`domain`) | Recognized high-complexity domain/concept with no CURRENT guide $\rightarrow$ duty to write autonomously. | 4 / 5 |
85
+ | `audit/reviews/REVIEW_LOG.md` | Every completed review — recorded in log. | 3 / 5 |
86
+ | ADR / Decision Log — `architecture/` or devPNT DB | A strategic decision was taken (pattern, policy, structural change): record before DONE. | 5 |
87
+ | `strategic/architecture.md`, `strategic/existing_features.md` | Bootstrap; update at closure when the knowledge catalog actually changed. | 1 / 5 |
88
+ | `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation. | 1 / 2 |
89
+ | `topics/<slug>.md` | A placement verdict creates it (MISSING/INADEQUATE-child, `taxonomy.md`); reconciliation updates its claim rows. One node per topic — a similar-but-distinct concept is a sibling with `related:` + a written distinction, never a merge and never a duplicate. Merged/renamed nodes become tombstones (`status: SUPERSEDED` + `redirect_to:`), never deleted. | 4 |
90
+ | a KB bundle (`export`) | Knowledge must leave this project. Export is L1 — it writes nothing into the corpus. **Importing one is L3**: a source enters the corpus and nodes are created, and a bundle is external input, so never L1 whatever its size (`portability.md`). | — |
91
+ | `corpus/given/*` + sidecar | A source arrives: it becomes a content-addressed artifact with a sidecar carrying digest/date/`supersedes:`. A text source is copied verbatim. A non-text source yields its stored canonical extraction — copied **beside** the original when that is small enough to keep, or **instead of it** on a large binary corpus, where the original stays where it lives and is recorded as `original_path:`/`original_sha256:` (`distillation.md` §1, which owns this rule). Never edited after ingest — the digest check on whatever `given/` holds is what enforces it. | 4 |
92
+ | `corpus/notes/*` | Something is said (`origin: elicited`), synthesised (`derived_from:`), or ruled (`basis:`). A note with none of the three is refused by the validator. | 4 / 5 |
93
+ | `solutions/PLAN_[topic].md` + its ledger | A source too long for one context is ingested: **one task per reading window** (30 pages by default; the plan states the window used), each ending at a declared `extracted_through:`. That ledger is the register the ingestion resumes from across sessions — ingestion never builds a second one (`distillation.md` §3, `templates.md`). | 4 |
94
+ | `corpus/given/*.meta.md` — `extracted_through:` | Every reading window closes by advancing it (`p=<n>`, `L<n>`, `complete`). Required once any claim cites the artifact: unstated, "I am finished" cannot be falsified, which is how a sampled 200-page manual passes for an ingested one. | 4 |
95
+ | `INDEX.md`, `reference/INDEX.md`, `topics/INDEX.md`, `corpus/INDEX.md` | Regenerated by `sdlc_check.py index` at closure — never by hand; `validate` fails on a hand-edited one. | 5 |
96
+
97
+ ## Operating Modes
98
+
99
+ ### Full Standalone
100
+ Use this mode when devPNT is unavailable, not configured for the current project, or the user explicitly asks for a filesystem-only workflow.
101
+ - Source of truth: `ai_docs/` (`vision/`, `solutions/`, `reference/`, `audit/`, `strategic/`).
102
+
103
+ ### Hybrid in symbiosis with devPNT
104
+ Use this mode when `devpnt_*` tools are available and point at the current project.
105
+ - devPNT governs `M-VISION`, Master Plan, Action Plan, and versioned artifacts.
106
+ - Local `ai_docs/` serves as readable context, Standalone fallback, local handoff, or shadow copy.
107
+
108
+ ## L3 Workflow
109
+
110
+ ### 1. Audit and Alignment
111
+ - Read `ai_docs/audit/handoff.md` (workstream registry) to see active topics.
112
+ - Read `ai_docs/README.md`, `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md` (the guide router) before exploring notes. The router is a mandatory read, not an optional one: it is the only orientation step that tells you a guide already governs the work you are about to do.
113
+ - If `ai_docs/` is missing, create the bootstrap set: `README.md`, `vision/` docs, `strategic/` docs, and `audit/audit_plan.md`, then run `sdlc_check.py index`.
114
+
115
+ ### 2. Vision Gate
116
+ - Read `project_vision.md`, `roadmap.md`, `principles.md` (or devPNT `M-VISION`).
117
+ - Verify request aligns with expected benefits, user goals, and success signals.
118
+
119
+ ### 3. Request Analysis & Taxonomy Pass
120
+ - Run spec elicitation round (`elicitation.md`) before drafting analysis.
121
+ - Run taxonomy pass (`taxonomy.md`): verify whether topics, categories, or SOPs already exist in `ai_docs/`. Avoid duplication.
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.
124
+
125
+ ### 4. Knowledge Processing & Distillation
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.
127
+ - Before drafting (L2/L3; L1 exempt), **consult the guide router** for a guide covering the task and read it first (the consult trigger, `guides.md` §0). A targeted description match, not a blanket read. Its result is the router verdict already declared with the triage level (Rule Zero).
128
+ - Execute knowledge extraction using **Signal Distillation** (`distillation.md`).
129
+ - **Opt-in subagent execution**: for an L3 with an approved analysis, the work MAY be executed via subagents per `dispatch.md`; default stays same-session.
130
+ - Handle conflicting or outdated information via **Reconciliation** (`reconciliation.md`). Mark obsolete files `status: SUPERSEDED`.
131
+
132
+ ### 5. Closure & Indexing
133
+ - Run verification checks (`sdlc_check.py check --root <project_root>`).
134
+ - If the work was governed by user-provided indications and is reusable, **PROPOSE distilling a guide** (proactive trigger, `guides.md` §1) — a proposal for the user, never a silent write, never from model knowledge.
135
+ - Update `audit/handoff.md`.
136
+ - Regenerate manifests: `python <skill_dir>/scripts/sdlc_check.py index --root <project_root>`.
137
+ - Mark output clean and complete.
138
+
139
+ ## Operative Guides & Router
140
+ Guides are consulted, created, and distilled per `guides.md`.
141
+ - **Consult (before acting)**: check `ai_docs/reference/INDEX.md` — the guide router — and declare the verdict with the triage level.
142
+ - **Propose proactively**: when the user hands over indications that will govern future work, propose distilling them into a guide. A proposal, never a silent write, and never from model knowledge — a guide's whole value is that every claim traces to what the user actually provided.
143
+ - Distill from user instructions into `ai_docs/reference/GUIDE_[topic].md`.
144
+
145
+ ## Mechanical Enforcement
146
+ - `scripts/sdlc_check.py index`: updates `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md`.
147
+ - `scripts/sdlc_check.py validate`: validates YAML frontmatter (`status`, `description`).
148
+ - `scripts/sdlc_check.py check`: checks dirty closures and missing indexes.
@@ -43,16 +43,39 @@ corpus artifact on its own. Then `sha256:` is the extraction's digest — immuta
43
43
  enforced exactly as before — and the original is recorded, not copied:
44
44
 
45
45
  ```yaml
46
- sha256: <digest of this extraction> # enforced: the bytes locators address
47
- original_path: /vault/manuals/xyz.pdf # recorded: where the original lives
48
- original_sha256: <digest at ingest> # recorded, NOT verified — we do not hold it
46
+ sha256: <digest of this extraction>
47
+ original_path: /vault/manuals/xyz.pdf
48
+ original_sha256: <digest at ingest>
49
49
  ```
50
50
 
51
+ `sha256:` is the enforced one — the bytes the locators address. `original_path:` says
52
+ where the original lives and is checked to still resolve. `original_sha256:` is recorded
53
+ and never verified. **Write no trailing `# comment` on these lines**: the frontmatter
54
+ reader is a line regex and does not strip them, so the comment becomes part of the
55
+ value — which on `original_path:` now means a pointer that cannot resolve.
56
+
51
57
  Say the limit out loud, because a field that looks like a guarantee and is not is worse
52
- than an absent one: **`original_sha256` is never checked.** It lets a human re-verify by
53
- hand and it dates the ingest; it detects nothing on its own. The digest that bites is
54
- `sha256:`. Same honesty as a guide's `source_hash`, which proves the source is unchanged
55
- and never that the guide described it correctly.
58
+ than an absent one and say it **per field**, because the two are not in the same
59
+ position:
60
+
61
+ - **`original_sha256` is never checked.** We do not hold the bytes, so nothing can. It
62
+ lets a human re-verify by hand and it dates the ingest; it detects nothing on its own.
63
+ Same honesty as a guide's `source_hash`, which proves the source is unchanged and
64
+ never that the guide described it correctly.
65
+ - **`original_path` IS checked — for resolution only.** "We do not hold it" was never a
66
+ reason to leave the *pointer* unverified: it costs one `exists()`, and on a corpus
67
+ whose whole premise is that every provenance is a real file, a pointer that has gone
68
+ dangling in silence is the failure this design most wants to catch. A path that does
69
+ not resolve is a **warning**, never an error: a bundle carries artifacts and sidecars
70
+ and never the originals (`portability.md` §1), so after an import it dangles
71
+ legitimately. Absolute paths are tested as written; a relative one is tried against
72
+ the docs root's parent (the project root in the standard layout) and against the docs
73
+ root itself, and warns only if neither resolves. "Absolute" here means what either
74
+ platform calls rooted, `/vault/...` included: testing it with `Path.is_absolute()`
75
+ alone was a real defect, because on Windows a rooted path with no drive letter is not
76
+ absolute and got silently joined onto the docs root's drive.
77
+
78
+ The digest that bites is `sha256:`, on the bytes the locators actually address.
56
79
 
57
80
  ## 2. The claim — one falsifiable assertion
58
81
 
@@ -69,6 +92,15 @@ Claims live in the owning topic's `## Claims` table (`templates.md` has the temp
69
92
  - **id** — leave empty when writing by hand; `sdlc_check.py claim-id --fill <file>`
70
93
  computes it (`sha256(path#locator#qty)`, text excluded — a paraphrase must not mint a
71
94
  new identity). An empty id is a `[note]`, never an error.
95
+ **Its limit, stated as plainly as `original_sha256`'s:** excluding the text is what
96
+ makes the same assertion mint the same id in another project, which is what makes
97
+ `portability.md`'s de-duplication mechanical instead of a judgement call. The price is
98
+ that **one span cannot carry two different assertions at the same qty** — the id
99
+ cannot tell them apart, and the validator refuses the pair. The fix is to widen one
100
+ locator to the span that actually carries its assertion, or to merge the two rows.
101
+ It is **not** to edit the qty or nudge the locator until the hash differs: that
102
+ distorts the evidence to satisfy a hash function, which is the one repair this
103
+ ledger exists to prevent.
72
104
  - **valid** — `-`, `from X`, `until X`, `from X until Y`, `if <condition>`. Half-open:
73
105
  `until 2026-03-01` and `from 2026-03-01` do NOT overlap. A time-bounded fact is not a
74
106
  conflict with its successor — write the scope, or reconciliation will manufacture one.