@antoneeo/kb-agentic-skill 1.18.0 → 1.19.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 +31 -8
- package/README.md +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +4 -4
- package/skills/kb-agentic-skill/SKILL.md +293 -293
- package/skills/kb-agentic-skill/dispatch.md +5 -1
- package/skills/kb-agentic-skill/elicitation.md +192 -133
- package/skills/kb-agentic-skill/review.md +8 -1
- package/skills/kb-agentic-skill/scripts/sdlc_core.py +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,14 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
Every significant change to this skill is recorded here.
|
|
4
4
|
|
|
5
|
-
## [1.
|
|
6
|
-
|
|
7
|
-
###
|
|
8
|
-
- F-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
## [1.19.0] - 2026-09-25
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **F-026 revised: a real doubt is asked when it emerges.** The question discipline
|
|
9
|
+
no longer sends doubts to the deliverable ("Default non-blocking" is gone). A real
|
|
10
|
+
doubt (a fact the search leaves open, or a choice whose pros and cons do not
|
|
11
|
+
settle it) is asked before the first write that would embed its answer, grouped,
|
|
12
|
+
with the pros and cons of each option. A choice that clearly wins the weighing is
|
|
13
|
+
taken without asking, and the weighing is written next to it — each rejected option
|
|
14
|
+
stated at its strongest; options that serve different needs, none good enough at
|
|
15
|
+
both, that nothing the user wrote ranks are a real doubt, however clear the
|
|
16
|
+
agent's own ranking. Reserved approvals
|
|
17
|
+
are always asked. A real doubt becomes a declared assumption only in unattended
|
|
18
|
+
or delegated work. `review.md` makes an unasked doubt a design-review finding; `dispatch.md`
|
|
19
|
+
tells a subagent to return its real doubts instead of deciding them.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **`stale` no longer counts the audit plan against the area that holds it.**
|
|
23
|
+
Committing a hash mark of `ai_docs/` changed `ai_docs/audit/audit_plan.md` after
|
|
24
|
+
the recorded commit, so the area went stale again and every re-mark repeated the
|
|
25
|
+
loop. The plan's own edits are now excluded; any other change in the area still
|
|
26
|
+
counts.
|
|
27
|
+
|
|
28
|
+
## [1.18.0] - 2026-09-19
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- F-057: shared project memory in every lens, no sibling installation required.
|
|
32
|
+
`index` catalogs original documents; `recall QUERY` searches live metadata.
|
|
33
|
+
KB integrity is shared; domain ownership and marketing numerical checks remain.
|
|
34
|
+
Vendored validators now require entry point + sdlc_core.py + knowledge.py.
|
|
35
|
+
|
|
13
36
|
|
|
14
37
|
### Fixed
|
|
15
38
|
- **F-056: `stale` no longer reports an area fresh when it cannot evaluate it.** An
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Deliberately absent: any per-node coverage or completion state. `gaps:` says wha
|
|
|
51
51
|
- **Several people, one project**: the workstream registry (`audit/handoff.md`) is **generated** from one file per open workstream, so two people opening or closing two workstreams on two branches edit two different files and their merge is clean. Row-per-workstream alone was not enough — a file-global `Date:` header defeats row-level ownership — so the header is derived from the sources and no writer touches it. The generated view can still conflict; that conflict is resolved by re-running `index`, never by hand, and `validate` refuses CLEAN until the file matches its sources. The append-only review log gets `merge=union` (a built-in driver, no per-clone configuration). It all works with no VCS at all: it is files and a generator.
|
|
52
52
|
- **Vision-guided governance**: Standalone projects use `ai_docs/vision/`; Hybrid projects use devPNT `M-VISION` as the milestone north star. `DRAFT` informs, `APPROVED` binds, promotion is the user's alone.
|
|
53
53
|
- **Independent review, twice**: the design before it is implemented, the result before it is declared done — fresh-context subagent > one-shot run > a declared self-pass, 3 rounds max, one log line each, and a PASS is invalid on "found nothing".
|
|
54
|
-
- **Question discipline**: a question is legal only when the agent searched first, names the search with its result, and names the decision it unblocks
|
|
54
|
+
- **Question discipline**: a real doubt is asked when it emerges, before its answer is written, with the pros and cons of each option; a choice whose pros clearly win is taken with the weighing written next to it. A question is legal only when the agent searched first, names the search with its result, and names the decision it unblocks.
|
|
55
55
|
- **Operative guides + agent-global KB**: distil user-provided indications into source-faithful `GUIDE_*.md` (`source_kind: document`) — verbatim snapshot plus hash, so drift is detected mechanically.
|
|
56
56
|
- **Mechanical checks**: `check`, `validate`, `index`, `graph`, `corpus`, `claim-id`, `anchor`, `export`, `import`, `stale` (spine staleness plus `## claims` -- superseded-cited documents, expired `valid` windows, superseded derivation chains), plus the spine's `mark`/`benefit`/`gate`/`plan`/`orient`/`migrate`. `benefit` reports what the review gates have already caught, beside what the doctrine costs to read; it always exits 0 and carries no verdict. The graph and corpus checks verify spans against the stored extraction, recompute every id, refuse cycles and unreachable nodes, and enforce `CONTESTED` symmetry.
|
|
57
57
|
- **Installed support files**: Claude, Codex, Gemini and Google Antigravity receive the full skill folder — `SKILL.md`, `templates.md`, `taxonomy.md`, `distillation.md`, `reconciliation.md`, `guides.md`, `vision.md`, `elicitation.md`, `review.md`, `dispatch.md`, `routing.md`, `ENFORCEMENT.md`, `memory.md`, and the validator's three files, `scripts/sdlc_check.py` + `scripts/sdlc_core.py` + `scripts/knowledge.py` (copy all three) — plus the `LICENSE` and `NOTICE` it ships under.
|
package/gemini-extension.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kb-agentic-skill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.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.
|
|
3
|
+
"version": "1.19.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",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"skills/kb-agentic-skill/portability.md",
|
|
40
40
|
"skills/kb-agentic-skill/ENFORCEMENT.md",
|
|
41
41
|
"skills/kb-agentic-skill/scripts/sdlc_check.py",
|
|
42
|
-
"skills/kb-agentic-skill/scripts/sdlc_core.py",
|
|
43
|
-
"skills/kb-agentic-skill/scripts/knowledge.py",
|
|
44
|
-
"skills/kb-agentic-skill/memory.md",
|
|
42
|
+
"skills/kb-agentic-skill/scripts/sdlc_core.py",
|
|
43
|
+
"skills/kb-agentic-skill/scripts/knowledge.py",
|
|
44
|
+
"skills/kb-agentic-skill/memory.md",
|
|
45
45
|
"skills/kb-agentic-skill/LICENSE",
|
|
46
46
|
"skills/kb-agentic-skill/NOTICE",
|
|
47
47
|
"gemini-extension.json",
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: kb-agentic
|
|
3
|
-
version: 1.
|
|
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, knowledge management — and for answering project questions from the claim ledger and topic graph.
|
|
5
|
-
author: Antonio Pinto (https://github.com/Antoneeo)
|
|
6
|
-
copyright: (c) 2026 Antonio Pinto
|
|
7
|
-
license: Apache-2.0
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# KB Agentic
|
|
11
|
-
|
|
12
|
-
**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.
|
|
13
|
-
|
|
14
|
-
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.
|
|
15
|
-
|
|
16
|
-
Support files in the skill directory:
|
|
17
|
-
- `templates.md`: templates for Vision, Knowledge ANALYSIS, Research SPIKE, SOP GUIDE, audit plan, and handoff.
|
|
18
|
-
- `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`.
|
|
19
|
-
- `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 — and the answer-mode descent (`§6`). Run at L3 before drafting.
|
|
20
|
-
- `guides.md`: pipeline for distilling user-provided indications into `ai_docs/reference/GUIDE_[topic].md`.
|
|
21
|
-
- `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.
|
|
22
|
-
- `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`).
|
|
23
|
-
- `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.
|
|
24
|
-
- `review.md`: the review discipline — when a review is due, how to request one, how to receive findings, how to review.
|
|
25
|
-
- `dispatch.md`: opt-in subagent execution of an approved plan, plus the family-wide delegation boundary (what may be delegated at all) — that part applies at any level.
|
|
26
|
-
- `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.
|
|
1
|
+
---
|
|
2
|
+
name: kb-agentic
|
|
3
|
+
version: 1.19.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, knowledge management — and for answering project questions from the claim ledger and topic graph.
|
|
5
|
+
author: Antonio Pinto (https://github.com/Antoneeo)
|
|
6
|
+
copyright: (c) 2026 Antonio Pinto
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# KB Agentic
|
|
11
|
+
|
|
12
|
+
**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.
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
Support files in the skill directory:
|
|
17
|
+
- `templates.md`: templates for Vision, Knowledge ANALYSIS, Research SPIKE, SOP GUIDE, audit plan, and handoff.
|
|
18
|
+
- `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`.
|
|
19
|
+
- `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 — and the answer-mode descent (`§6`). Run at L3 before drafting.
|
|
20
|
+
- `guides.md`: pipeline for distilling user-provided indications into `ai_docs/reference/GUIDE_[topic].md`.
|
|
21
|
+
- `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.
|
|
22
|
+
- `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`).
|
|
23
|
+
- `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.
|
|
24
|
+
- `review.md`: the review discipline — when a review is due, how to request one, how to receive findings, how to review.
|
|
25
|
+
- `dispatch.md`: opt-in subagent execution of an approved plan, plus the family-wide delegation boundary (what may be delegated at all) — that part applies at any level.
|
|
26
|
+
- `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.
|
|
27
27
|
- `scripts/sdlc_check.py` + `scripts/sdlc_core.py`: the mechanical validator for the docs root (`check`, `validate`, `index`, `mark`, `benefit`, `gate`, `plan`, `orient`, `migrate`, and the knowledge overlay: `graph`, `corpus`, `claim-id`, `anchor`, `export`, `import`, `stale` (spine staleness plus `## claims` -- the time cycle's consolidated view), plus `remind` — the opt-in per-turn one-line reminder, ENFORCEMENT §4). Keep the entry point, `scripts/sdlc_core.py` and `scripts/knowledge.py` together; the last supplies common memory and KB integrity.
|
|
28
|
-
- `ENFORCEMENT.md`: optional setup for CI and hooks.
|
|
29
|
-
|
|
30
|
-
Read these files only when needed. `SKILL.md` is the operating contract; the support files are progressive resources.
|
|
31
|
-
|
|
32
|
-
## Knowledge Values
|
|
33
|
-
|
|
34
|
-
- **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.
|
|
35
|
-
- **Apply DRY and Single Source of Truth:** do not duplicate knowledge across files; extend existing notes (`ANALYSIS_[topic].md` or `GUIDE_[topic].md`).
|
|
36
|
-
- **Signal & Distillation:** eliminate fluff, filler, and speculative statements; keep deterministic facts, constraints, decisions, and clear SOP steps (symbiosis with `distill`).
|
|
37
|
-
- **Lifecycle & Freshness:** mark superseded knowledge (`status: SUPERSEDED` or `DEPRECATED`) so outdated information does not cause hallucination.
|
|
38
|
-
- **Protect the Vision & User Style:** align all knowledge work with user strategic goals, operational preferences, and expected outcomes.
|
|
39
|
-
- **Map-First Navigation:** rely on `ai_docs/README.md`, `INDEX.md`, and `reference/INDEX.md` router for targeted retrieval before creating new documents — and before *answering from model memory* on the project's domain (`## Topic Recall`).
|
|
40
|
-
|
|
28
|
+
- `ENFORCEMENT.md`: optional setup for CI and hooks.
|
|
29
|
+
|
|
30
|
+
Read these files only when needed. `SKILL.md` is the operating contract; the support files are progressive resources.
|
|
31
|
+
|
|
32
|
+
## Knowledge Values
|
|
33
|
+
|
|
34
|
+
- **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.
|
|
35
|
+
- **Apply DRY and Single Source of Truth:** do not duplicate knowledge across files; extend existing notes (`ANALYSIS_[topic].md` or `GUIDE_[topic].md`).
|
|
36
|
+
- **Signal & Distillation:** eliminate fluff, filler, and speculative statements; keep deterministic facts, constraints, decisions, and clear SOP steps (symbiosis with `distill`).
|
|
37
|
+
- **Lifecycle & Freshness:** mark superseded knowledge (`status: SUPERSEDED` or `DEPRECATED`) so outdated information does not cause hallucination.
|
|
38
|
+
- **Protect the Vision & User Style:** align all knowledge work with user strategic goals, operational preferences, and expected outcomes.
|
|
39
|
+
- **Map-First Navigation:** rely on `ai_docs/README.md`, `INDEX.md`, and `reference/INDEX.md` router for targeted retrieval before creating new documents — and before *answering from model memory* on the project's domain (`## Topic Recall`).
|
|
40
|
+
|
|
41
41
|
## Shared project memory
|
|
42
42
|
|
|
43
43
|
Project memory is available by default, independently of installed sibling lenses.
|
|
@@ -47,257 +47,257 @@ plans and decisions without copying them. One owner still governs each unit.
|
|
|
47
47
|
The validator now ships as three files: entry point, `sdlc_core.py`, `knowledge.py`.
|
|
48
48
|
|
|
49
49
|
## Rule Zero: Triage
|
|
50
|
-
|
|
51
|
-
Always classify the request before choosing the process. Declare the chosen level to the user when you start operational work.
|
|
52
|
-
|
|
53
|
-
**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`.
|
|
54
|
-
|
|
55
|
-
| Level | Criteria | Required process |
|
|
56
|
-
|---|---|---|
|
|
57
|
-
| **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. |
|
|
58
|
-
| **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 (full re-read per `## Revision`) or create single SOP/note. |
|
|
59
|
-
| **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. |
|
|
60
|
-
| **Spike - Exploration** | Time-boxed exploratory research or draft without merging into official KB. | Outcome in `ai_docs/solutions/SPIKE_[topic].md`. |
|
|
61
|
-
|
|
62
|
-
Cross-cutting rules:
|
|
63
|
-
- **The unit of measure here is knowledge, never file count.** In this domain risk is
|
|
64
|
-
knowledge-shaped: carrying one settled fact into eight documents is small, and one
|
|
65
|
-
claim that re-parents a node is not. Do not import the code lens's file thresholds —
|
|
66
|
-
a level is chosen by what the change does to the corpus and the graph. What keeps
|
|
67
|
-
this from becoming an escape hatch is the trigger list below, which overrides the
|
|
68
|
-
level whatever the size, plus one limit: **propagation that changes what a claim
|
|
69
|
-
asserts is not propagation** — it is a new knowledge unit, so L3.
|
|
70
|
-
- **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.
|
|
71
|
-
- Personal data, credentials, security-sensitive processes, authN/authZ specs are high-risk: never L1.
|
|
72
|
-
- **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.
|
|
73
|
-
- 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.
|
|
74
|
-
- If a bigger impact emerges during L1/L2 work, stop, reclassify and declare it.
|
|
75
|
-
- When in doubt, pick the higher level.
|
|
76
|
-
- **
|
|
77
|
-
|
|
78
|
-
## Write Triggers
|
|
79
|
-
|
|
80
|
-
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.
|
|
81
|
-
|
|
82
|
-
| Document | Write trigger | Phase |
|
|
83
|
-
|---|---|---|
|
|
84
|
-
| `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 |
|
|
85
|
-
| `solutions/SPIKE_[topic].md` | Closing any Spike — including a negative outcome. | — |
|
|
86
|
-
| `vision/features/VISION_[feature].md` | Multi-milestone topic at analysis time, or retroactive trigger (second ANALYSIS on same theme). | 3 |
|
|
87
|
-
| `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 |
|
|
88
|
-
| `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 |
|
|
89
|
-
| `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 |
|
|
90
|
-
| `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 |
|
|
91
|
-
| `audit/audit_plan.md` (Standalone) | Bootstrap, and whenever a mapped area changes state (`sdlc_check.py mark`). | 1 |
|
|
92
|
-
| `reference/GUIDE_[topic].md` (`source_kind: document`) | Origin+purpose test (`guides.md`), or a proactive proposal accepted by user. | 4 / 5 |
|
|
93
|
-
| `reference/GUIDE_[topic].md` (`source_kind: code`/`domain`) | Recognized high-complexity domain/concept with no CURRENT guide $\rightarrow$ duty to write autonomously. | 4 / 5 |
|
|
94
|
-
| `audit/reviews/REVIEW_LOG.md` | Every completed review — recorded in log. | 3 / 5 |
|
|
95
|
-
| ADR / Decision Log — `architecture/` or devPNT DB | A strategic decision was taken (pattern, policy, structural change): record before DONE. | 5 |
|
|
96
|
-
| `strategic/architecture.md`, `strategic/existing_features.md` | Bootstrap; update at closure when the knowledge catalog actually changed. | 1 / 5 |
|
|
97
|
-
| `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation. | 1 / 2 |
|
|
98
|
-
| `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 |
|
|
99
|
-
| 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`). | — |
|
|
100
|
-
| `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 |
|
|
101
|
-
| `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 |
|
|
102
|
-
| the day's decisions, at a user-signed closing (the Capture Moment sweep) | Verification that the phase-4 notes/claims exist; NEW `corpus/notes/*` + claim rows only for what the sweep surfaces un-captured. The event is the CLOSING, disjoint from the row above (which fires when something is SAID). | 5 / session end |
|
|
103
|
-
| `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 |
|
|
104
|
-
| `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 |
|
|
105
|
-
| `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 |
|
|
106
|
-
|
|
107
|
-
## Operating Modes
|
|
108
|
-
|
|
109
|
-
### Full Standalone
|
|
110
|
-
Use this mode when devPNT is unavailable, not configured for the current project, or the user explicitly asks for a filesystem-only workflow.
|
|
111
|
-
- Source of truth: `ai_docs/` (`vision/`, `solutions/`, `reference/`, `audit/`, `strategic/`).
|
|
112
|
-
|
|
113
|
-
### Hybrid in symbiosis with devPNT
|
|
114
|
-
Use this mode when `devpnt_*` tools are available and point at the current project.
|
|
115
|
-
- devPNT governs `M-VISION`, Master Plan, Action Plan, and versioned artifacts.
|
|
116
|
-
- Local `ai_docs/` serves as readable context, Standalone fallback, local handoff, or shadow copy.
|
|
117
|
-
- **Never auto-accept a devPNT proposal**: present the preview and wait for the user's explicit confirmation. This is a human-approval guarantee, not a convenience — an agent that resolves its own proposal has removed the only step where a person can refuse.
|
|
118
|
-
|
|
119
|
-
## L3 Workflow
|
|
120
|
-
|
|
121
|
-
### 1. Audit and Alignment
|
|
122
|
-
- Read `ai_docs/audit/handoff.md` (workstream registry) to see active topics.
|
|
123
|
-
- 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.
|
|
124
|
-
- 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`.
|
|
125
|
-
|
|
126
|
-
### 2. Vision Gate
|
|
127
|
-
- Read `project_vision.md`, `roadmap.md`, `principles.md` (or devPNT `M-VISION`).
|
|
128
|
-
- Verify request aligns with expected benefits, user goals, and success signals.
|
|
129
|
-
|
|
130
|
-
### 3. Request Analysis & Taxonomy Pass
|
|
131
|
-
|
|
132
|
-
**Before authoring, know which tier is authoring.** Authoring an analysis, a taxonomy or a claim ledger is a **deep-floor role** — its output is judgement and nothing downstream scores it — and `review.md` §The capability floor owns the rule: where this session can determine that it is below that floor, say so once, before drafting, rather than producing a confident artifact nobody flags. Where it cannot determine its own tier it owes nothing. The reliably working half of that rule is addressed to the user, in the package README.
|
|
133
|
-
|
|
134
|
-
- Run spec elicitation round (`elicitation.md`) before drafting analysis.
|
|
135
|
-
- Run taxonomy pass (`taxonomy.md`): verify whether topics, categories, or SOPs already exist in `ai_docs/`. Avoid duplication.
|
|
136
|
-
- Create or update `ai_docs/solutions/ANALYSIS_[topic].md`.
|
|
137
|
-
- **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.
|
|
138
|
-
|
|
139
|
-
### 4. Knowledge Processing & Distillation
|
|
140
|
-
- **Isolate the work (Branch/worktree hygiene).** Distillation rewrites existing notes — full re-read per `## Revision` — and does 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.
|
|
141
|
-
- 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).
|
|
142
|
-
- Execute knowledge extraction using **Signal Distillation** (`distillation.md`).
|
|
143
|
-
- **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. `dispatch.md` also carries the family-wide **delegation boundary** (what may be delegated at all, and what never may) — that section is not gated by the opt-in trigger and applies at any level, dispatch or no dispatch.
|
|
144
|
-
- Handle conflicting or outdated information via **Reconciliation** (`reconciliation.md`). Mark obsolete files `status: SUPERSEDED`.
|
|
145
|
-
|
|
146
|
-
### 5. Closure & Indexing
|
|
147
|
-
- Run verification checks (`sdlc_check.py check --root <project_root>`).
|
|
148
|
-
- If the session recorded any supersession, run `sdlc_check.py stale`: its
|
|
149
|
-
`## claims` section is the revision worklist (superseded-cited documents,
|
|
150
|
-
expired windows, superseded derivation chains), worked per `## Revision`
|
|
151
|
-
-- one document, one full re-read.
|
|
152
|
-
- 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.
|
|
153
|
-
- Update `audit/handoff.md`.
|
|
154
|
-
- Regenerate manifests: `python <skill_dir>/scripts/sdlc_check.py index --root <project_root>`.
|
|
155
|
-
- Mark output clean and complete.
|
|
156
|
-
|
|
157
|
-
## Operative Guides & Router
|
|
158
|
-
Guides are consulted, created, and distilled per `guides.md`.
|
|
159
|
-
- **Consult (before acting)**: check `ai_docs/reference/INDEX.md` — the guide router — and declare the verdict with the triage level.
|
|
160
|
-
- **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.
|
|
161
|
-
- Distill from user instructions into `ai_docs/reference/GUIDE_[topic].md`.
|
|
162
|
-
|
|
163
|
-
## Topic Recall — the answer-side consult
|
|
164
|
-
|
|
165
|
-
The graph is only a second brain if it is READ when answering, not only written when
|
|
166
|
-
distilling. The descent (`taxonomy.md`) fires here with a new trigger — the answer-side
|
|
167
|
-
twin of the guide consult above.
|
|
168
|
-
|
|
169
|
-
- **Trigger — unconditional scan on domain assertions.** Whenever the reply would assert
|
|
170
|
-
facts about the PROJECT'S domain (its topics, decisions, sources, constraints), scan
|
|
171
|
-
`topics/INDEX.md`. Plausibility of coverage is judged ON the scanned top rows, never
|
|
172
|
-
before them — "the KB probably doesn't have this" is model memory talking, the exact
|
|
173
|
-
judgement this reflex removes. Exempt: pure mechanics (running a command, editing per
|
|
174
|
-
explicit instruction), general knowledge outside the project's domain, L1 gestures.
|
|
175
|
-
- **Once per topic per SESSION.** The dedup key is the matched slug (known ex post); a
|
|
176
|
-
question plainly within an already-descended branch reuses that consult, and a
|
|
177
|
-
placement descent already run this session counts. A compaction starts a new session.
|
|
178
|
-
- **The act.** Descend per `taxonomy.md` §6 (same doctrine, answer mode). On claims,
|
|
179
|
-
answer FROM them citing claim ids; a claim whose `state` is `SUPERSEDED <id>` is never
|
|
180
|
-
cited without naming its successor.
|
|
181
|
-
- **The declared verdict — only when the recall ran**, never a per-turn ritual. Four
|
|
182
|
-
legal values:
|
|
183
|
-
- `kb: <slug>[, <slug> …] → N claims cited` — **every** slug the descent opened, not
|
|
184
|
-
only the one that answered. The descent is multi-branch by mandate (`taxonomy.md`
|
|
185
|
-
§1: follow every parent, open the final candidates), so a single-slug form cannot
|
|
186
|
-
state what a correct descent did: the agent either under-reports the branches it
|
|
187
|
-
read or invents a shape for them, and both make a thorough descent
|
|
188
|
-
indistinguishable from a lucky one. Which branches were opened is the part of this
|
|
189
|
-
verdict a reader can actually check.
|
|
190
|
-
- `kb: <slug>[, <slug> …] → node matched, no claims` — surface the node's `gaps:` when
|
|
191
|
-
it answers the question: "the KB knows it doesn't know" is a first-class answer.
|
|
192
|
-
- `kb: no coverage` — index read, nothing fits.
|
|
193
|
-
- `kb: index absent — regenerate (sdlc_check.py index)` — the INDEX is missing, not
|
|
194
|
-
necessarily the graph (nodes routinely exist while the index lags); regenerate and
|
|
195
|
-
rescan.
|
|
196
|
-
Never fake the verdict: an always-"no coverage" verdict certifies a lookup that did
|
|
197
|
-
not happen. The `router:` and `kb:` verdicts are independent and may co-occur, one
|
|
198
|
-
line each — a how-to question can match a guide AND carry claims.
|
|
199
|
-
- **Anti-echo — the re-touch rule.** When a DERIVED claim grounds a decision the user is
|
|
200
|
-
about to take, walk its chain to non-DERIVED ground — a GIVEN artifact, an ELICITED or
|
|
201
|
-
RULING note — and cite that ground beside the claim id; re-opening only the immediate
|
|
202
|
-
target may re-read the agent's own synthesis, which is the echo chamber itself. If the
|
|
203
|
-
ground does not resolve (imported bundle without originals, external `original_path:`,
|
|
204
|
-
tombstone): say so beside the claim id and treat the claim as **unverified for
|
|
205
|
-
decision-grounding** — surfaced, never silently cited. Per-provenance stance: GIVEN's
|
|
206
|
-
source column is already the direct citation; ELICITED/RULING carry the practitioner's
|
|
207
|
-
own authority; an IMPORTED claim grounding a decision is named as un-re-ratified
|
|
208
|
-
foreign authority.
|
|
209
|
-
- **Citation scope — the row's test is scope, not fidelity.** Before citing a claim in
|
|
210
|
-
an answer or a document, verify every part of the row belongs to the question: a row
|
|
211
|
-
can be atomic as provenance and plural as meaning (`distillation.md` §3), and a
|
|
212
|
-
faithful quote of the whole row then asserts what the source did not — a capability
|
|
213
|
-
borrowed across subjects, another actor's surface, a silently switched referent.
|
|
214
|
-
If part of the row is out of scope, **cite the part and say where the rest
|
|
215
|
-
belongs** — never cite the whole row on the grounds that it "says what I quoted",
|
|
216
|
-
and never silently drop the off-topic part (that loses an assertion — the other
|
|
217
|
-
half of the north star). A row that keeps forcing this test is a split candidate
|
|
218
|
-
(`reconciliation.md` §Splitting a bundled row).
|
|
219
|
-
- **The trace persists.** When the decision is recorded (a ruling note, a diary entry),
|
|
220
|
-
that record cites the claim id AND the re-touched ground — the trace survives in the
|
|
221
|
-
corpus, not in ephemeral chat.
|
|
222
|
-
- **Under dispatch**, recall is an orchestrator concern: the orchestrator runs the
|
|
223
|
-
descent itself; a context-free subagent never runs its own. The task schema has no
|
|
224
|
-
claims field today, so until a dispatch-focused unit adds one, the orchestrator
|
|
225
|
-
inlines the cited claim rows in the task's free text — an explicit interim.
|
|
226
|
-
|
|
227
|
-
## The Capture Moment — the day's decisions reach the ledger
|
|
228
|
-
|
|
229
|
-
Capture today is what makes recall honest tomorrow: a captured elicited or ruled note
|
|
230
|
-
is exactly the non-DERIVED ground the re-touch rule above walks to. The rails all
|
|
231
|
-
exist — this section adds only the MOMENT.
|
|
232
|
-
|
|
233
|
-
- **When — user-signed closings, once per session.** Phase 5 of a governed unit, or
|
|
234
|
-
any closing signal from the user in an un-governed session ("chiudiamo", "we're
|
|
235
|
-
done"); the session-end pass that updates `handoff.md`/`project_notes.md` then runs
|
|
236
|
-
at that same closing. Never per-turn, never a standing interruption. **Declared
|
|
237
|
-
residual**: an unsignaled end (the user simply stops writing) captures nothing —
|
|
238
|
-
the phase-4 duty (a decision stated mid-session owes its note WHEN SAID) is the
|
|
239
|
-
protection for sessions that never close, and the orient's recency line makes the
|
|
240
|
-
miss visible next time. That line measures NOTES recency, not full ledger
|
|
241
|
-
freshness, and trusts frontmatter `date:` over file mtimes — mtimes lie after a
|
|
242
|
-
clone or worktree.
|
|
243
|
-
- **The sweep question.** At the closing, ONE question, carrying its own search
|
|
244
|
-
result inline: "today I recorded: [what the sweep found already on the rails] —
|
|
245
|
-
any other decisions from today to record?". Scoped to TODAY, so it reaches
|
|
246
|
-
decisions taken outside the session (a meeting, a call) that no transcript search
|
|
247
|
-
could find — facts only the practitioner owns. This is a **scheduled elicitation**
|
|
248
|
-
in the same family as the phase-3 round, not a blocking question (nothing stalls;
|
|
249
|
-
the session is ending), so the blocking form does not attach; the inline result
|
|
250
|
-
satisfies the search-first duty. "Niente" ends it.
|
|
251
|
-
- **The sweep is idempotent.** It verifies the day's decisions are on the rails; a
|
|
252
|
-
decision already noted at phase 4 is verified, never re-captured — no second note,
|
|
253
|
-
no duplicate claim row. The moment closes gaps; the phase-4 row stays the primary
|
|
254
|
-
channel.
|
|
255
|
-
- **What counts as a decision**: domain choices made or confirmed today — a value, a
|
|
256
|
-
threshold, a rule, a stated preference, a rejected alternative with its reason.
|
|
257
|
-
NOT mechanics (commands run, files edited), NOT process state (the handoff's job).
|
|
258
|
-
- **The channeling — existing rails, explicit provenance.**
|
|
259
|
-
- The user's words → `corpus/notes/*` with `origin: elicited` and a `date:`; a
|
|
260
|
-
claim row distilled from it carries `prov: ELICITED`, source = that note with a
|
|
261
|
-
legal `L<a>-<b>` locator.
|
|
262
|
-
- A synthesis of the day's discussion → a note with `derived_from:` → claim
|
|
263
|
-
`prov: DERIVED`.
|
|
264
|
-
- **RULING only when the decision resolves an existing contested set** — then
|
|
265
|
-
`reconciliation.md` §2 applies in full (mandatory `basis:`, supersession of the
|
|
266
|
-
whole prior set). A fresh conflict-free decision is captured elicited: a preference
|
|
267
|
-
is not a fact, and `basis:` is reserved for the fact the corpus lacks.
|
|
268
|
-
- A fact on an existing topic → claim row, L1 (`id` empty; `claim-id --fill`).
|
|
269
|
-
- No owning topic → the note is written NOW and the placement is declared as the
|
|
270
|
-
next kb unit. Capture never smuggles an L3 hierarchy change, and
|
|
271
|
-
`topics/unplaced.md` is never a decision park — UNPLACED is for topic-less
|
|
272
|
-
scraps and is invisible to recall.
|
|
273
|
-
- **Reconciliation is wired.** A captured claim meeting an existing claim on the
|
|
274
|
-
node classifies per `reconciliation.md` — capture can confirm, refine, coexist or
|
|
275
|
-
CONTEST, never silently overwrite.
|
|
276
|
-
- **Silence stays legal where no one signed off**: no closing signal → no question,
|
|
277
|
-
no ritual line.
|
|
278
|
-
|
|
279
|
-
## Revision — the full re-read
|
|
280
|
-
|
|
281
|
-
Incorporating new knowledge into an existing document is a rewrite, not an
|
|
282
|
-
append: anchored edits are each correct while the global invariant — the body
|
|
283
|
-
reads as CURRENT state — is never re-verified. The gesture:
|
|
284
|
-
- Re-read the WHOLE document before editing; then rewrite the body so it reads
|
|
285
|
-
as written today — new knowledge fused, never quarantined in dated
|
|
286
|
-
sections — never append a delta.
|
|
287
|
-
- History goes to the Diary/notes, never an inline chronicle — and past Diary
|
|
288
|
-
entries are never rewritten: a correction is a new entry.
|
|
289
|
-
- A SUPERSEDED banner is a tombstone, never a revision device in a living doc.
|
|
290
|
-
- Claim tables are EXEMPT (rows move only per `reconciliation.md`) and node
|
|
291
|
-
frontmatter moves only per `taxonomy.md` — a revision never re-parents; the
|
|
292
|
-
rewrite governs prose, never the ledger or the graph edges.
|
|
293
|
-
- A multi-document pass re-reads PER DOCUMENT; set coverage is not integrity.
|
|
294
|
-
- The re-read raises the probability of catching a false premise; it cannot
|
|
295
|
-
guarantee it — domain judgment stays the human's.
|
|
296
|
-
|
|
297
|
-
## Mechanical Enforcement
|
|
298
|
-
- `scripts/sdlc_check.py index`: updates `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md`.
|
|
299
|
-
- `scripts/sdlc_check.py validate`: validates YAML frontmatter (`status`, `description`).
|
|
300
|
-
- `scripts/sdlc_check.py check`: checks dirty closures and missing indexes.
|
|
301
|
-
- `scripts/sdlc_check.py stale`: spine staleness plus `## claims` --
|
|
302
|
-
superseded-cited documents, expired `valid` windows, superseded
|
|
303
|
-
derivation chains (the time cycle's consolidated view).
|
|
50
|
+
|
|
51
|
+
Always classify the request before choosing the process. Declare the chosen level to the user when you start operational work.
|
|
52
|
+
|
|
53
|
+
**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`.
|
|
54
|
+
|
|
55
|
+
| Level | Criteria | Required process |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| **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. |
|
|
58
|
+
| **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 (full re-read per `## Revision`) or create single SOP/note. |
|
|
59
|
+
| **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. |
|
|
60
|
+
| **Spike - Exploration** | Time-boxed exploratory research or draft without merging into official KB. | Outcome in `ai_docs/solutions/SPIKE_[topic].md`. |
|
|
61
|
+
|
|
62
|
+
Cross-cutting rules:
|
|
63
|
+
- **The unit of measure here is knowledge, never file count.** In this domain risk is
|
|
64
|
+
knowledge-shaped: carrying one settled fact into eight documents is small, and one
|
|
65
|
+
claim that re-parents a node is not. Do not import the code lens's file thresholds —
|
|
66
|
+
a level is chosen by what the change does to the corpus and the graph. What keeps
|
|
67
|
+
this from becoming an escape hatch is the trigger list below, which overrides the
|
|
68
|
+
level whatever the size, plus one limit: **propagation that changes what a claim
|
|
69
|
+
asserts is not propagation** — it is a new knowledge unit, so L3.
|
|
70
|
+
- **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.
|
|
71
|
+
- Personal data, credentials, security-sensitive processes, authN/authZ specs are high-risk: never L1.
|
|
72
|
+
- **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.
|
|
73
|
+
- 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.
|
|
74
|
+
- If a bigger impact emerges during L1/L2 work, stop, reclassify and declare it.
|
|
75
|
+
- When in doubt, pick the higher level.
|
|
76
|
+
- **Doubts asked, questions legal.** A real doubt is asked when it emerges, before its answer is written; every question 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).
|
|
77
|
+
|
|
78
|
+
## Write Triggers
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
| Document | Write trigger | Phase |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `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 |
|
|
85
|
+
| `solutions/SPIKE_[topic].md` | Closing any Spike — including a negative outcome. | — |
|
|
86
|
+
| `vision/features/VISION_[feature].md` | Multi-milestone topic at analysis time, or retroactive trigger (second ANALYSIS on same theme). | 3 |
|
|
87
|
+
| `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 |
|
|
88
|
+
| `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 |
|
|
89
|
+
| `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 |
|
|
90
|
+
| `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 |
|
|
91
|
+
| `audit/audit_plan.md` (Standalone) | Bootstrap, and whenever a mapped area changes state (`sdlc_check.py mark`). | 1 |
|
|
92
|
+
| `reference/GUIDE_[topic].md` (`source_kind: document`) | Origin+purpose test (`guides.md`), or a proactive proposal accepted by user. | 4 / 5 |
|
|
93
|
+
| `reference/GUIDE_[topic].md` (`source_kind: code`/`domain`) | Recognized high-complexity domain/concept with no CURRENT guide $\rightarrow$ duty to write autonomously. | 4 / 5 |
|
|
94
|
+
| `audit/reviews/REVIEW_LOG.md` | Every completed review — recorded in log. | 3 / 5 |
|
|
95
|
+
| ADR / Decision Log — `architecture/` or devPNT DB | A strategic decision was taken (pattern, policy, structural change): record before DONE. | 5 |
|
|
96
|
+
| `strategic/architecture.md`, `strategic/existing_features.md` | Bootstrap; update at closure when the knowledge catalog actually changed. | 1 / 5 |
|
|
97
|
+
| `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation. | 1 / 2 |
|
|
98
|
+
| `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 |
|
|
99
|
+
| 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`). | — |
|
|
100
|
+
| `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 |
|
|
101
|
+
| `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 |
|
|
102
|
+
| the day's decisions, at a user-signed closing (the Capture Moment sweep) | Verification that the phase-4 notes/claims exist; NEW `corpus/notes/*` + claim rows only for what the sweep surfaces un-captured. The event is the CLOSING, disjoint from the row above (which fires when something is SAID). | 5 / session end |
|
|
103
|
+
| `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 |
|
|
104
|
+
| `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 |
|
|
105
|
+
| `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 |
|
|
106
|
+
|
|
107
|
+
## Operating Modes
|
|
108
|
+
|
|
109
|
+
### Full Standalone
|
|
110
|
+
Use this mode when devPNT is unavailable, not configured for the current project, or the user explicitly asks for a filesystem-only workflow.
|
|
111
|
+
- Source of truth: `ai_docs/` (`vision/`, `solutions/`, `reference/`, `audit/`, `strategic/`).
|
|
112
|
+
|
|
113
|
+
### Hybrid in symbiosis with devPNT
|
|
114
|
+
Use this mode when `devpnt_*` tools are available and point at the current project.
|
|
115
|
+
- devPNT governs `M-VISION`, Master Plan, Action Plan, and versioned artifacts.
|
|
116
|
+
- Local `ai_docs/` serves as readable context, Standalone fallback, local handoff, or shadow copy.
|
|
117
|
+
- **Never auto-accept a devPNT proposal**: present the preview and wait for the user's explicit confirmation. This is a human-approval guarantee, not a convenience — an agent that resolves its own proposal has removed the only step where a person can refuse.
|
|
118
|
+
|
|
119
|
+
## L3 Workflow
|
|
120
|
+
|
|
121
|
+
### 1. Audit and Alignment
|
|
122
|
+
- Read `ai_docs/audit/handoff.md` (workstream registry) to see active topics.
|
|
123
|
+
- 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.
|
|
124
|
+
- 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`.
|
|
125
|
+
|
|
126
|
+
### 2. Vision Gate
|
|
127
|
+
- Read `project_vision.md`, `roadmap.md`, `principles.md` (or devPNT `M-VISION`).
|
|
128
|
+
- Verify request aligns with expected benefits, user goals, and success signals.
|
|
129
|
+
|
|
130
|
+
### 3. Request Analysis & Taxonomy Pass
|
|
131
|
+
|
|
132
|
+
**Before authoring, know which tier is authoring.** Authoring an analysis, a taxonomy or a claim ledger is a **deep-floor role** — its output is judgement and nothing downstream scores it — and `review.md` §The capability floor owns the rule: where this session can determine that it is below that floor, say so once, before drafting, rather than producing a confident artifact nobody flags. Where it cannot determine its own tier it owes nothing. The reliably working half of that rule is addressed to the user, in the package README.
|
|
133
|
+
|
|
134
|
+
- Run spec elicitation round (`elicitation.md`) before drafting analysis.
|
|
135
|
+
- Run taxonomy pass (`taxonomy.md`): verify whether topics, categories, or SOPs already exist in `ai_docs/`. Avoid duplication.
|
|
136
|
+
- Create or update `ai_docs/solutions/ANALYSIS_[topic].md`.
|
|
137
|
+
- **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.
|
|
138
|
+
|
|
139
|
+
### 4. Knowledge Processing & Distillation
|
|
140
|
+
- **Isolate the work (Branch/worktree hygiene).** Distillation rewrites existing notes — full re-read per `## Revision` — and does 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.
|
|
141
|
+
- 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).
|
|
142
|
+
- Execute knowledge extraction using **Signal Distillation** (`distillation.md`).
|
|
143
|
+
- **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. `dispatch.md` also carries the family-wide **delegation boundary** (what may be delegated at all, and what never may) — that section is not gated by the opt-in trigger and applies at any level, dispatch or no dispatch.
|
|
144
|
+
- Handle conflicting or outdated information via **Reconciliation** (`reconciliation.md`). Mark obsolete files `status: SUPERSEDED`.
|
|
145
|
+
|
|
146
|
+
### 5. Closure & Indexing
|
|
147
|
+
- Run verification checks (`sdlc_check.py check --root <project_root>`).
|
|
148
|
+
- If the session recorded any supersession, run `sdlc_check.py stale`: its
|
|
149
|
+
`## claims` section is the revision worklist (superseded-cited documents,
|
|
150
|
+
expired windows, superseded derivation chains), worked per `## Revision`
|
|
151
|
+
-- one document, one full re-read.
|
|
152
|
+
- 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.
|
|
153
|
+
- Update `audit/handoff.md`.
|
|
154
|
+
- Regenerate manifests: `python <skill_dir>/scripts/sdlc_check.py index --root <project_root>`.
|
|
155
|
+
- Mark output clean and complete.
|
|
156
|
+
|
|
157
|
+
## Operative Guides & Router
|
|
158
|
+
Guides are consulted, created, and distilled per `guides.md`.
|
|
159
|
+
- **Consult (before acting)**: check `ai_docs/reference/INDEX.md` — the guide router — and declare the verdict with the triage level.
|
|
160
|
+
- **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.
|
|
161
|
+
- Distill from user instructions into `ai_docs/reference/GUIDE_[topic].md`.
|
|
162
|
+
|
|
163
|
+
## Topic Recall — the answer-side consult
|
|
164
|
+
|
|
165
|
+
The graph is only a second brain if it is READ when answering, not only written when
|
|
166
|
+
distilling. The descent (`taxonomy.md`) fires here with a new trigger — the answer-side
|
|
167
|
+
twin of the guide consult above.
|
|
168
|
+
|
|
169
|
+
- **Trigger — unconditional scan on domain assertions.** Whenever the reply would assert
|
|
170
|
+
facts about the PROJECT'S domain (its topics, decisions, sources, constraints), scan
|
|
171
|
+
`topics/INDEX.md`. Plausibility of coverage is judged ON the scanned top rows, never
|
|
172
|
+
before them — "the KB probably doesn't have this" is model memory talking, the exact
|
|
173
|
+
judgement this reflex removes. Exempt: pure mechanics (running a command, editing per
|
|
174
|
+
explicit instruction), general knowledge outside the project's domain, L1 gestures.
|
|
175
|
+
- **Once per topic per SESSION.** The dedup key is the matched slug (known ex post); a
|
|
176
|
+
question plainly within an already-descended branch reuses that consult, and a
|
|
177
|
+
placement descent already run this session counts. A compaction starts a new session.
|
|
178
|
+
- **The act.** Descend per `taxonomy.md` §6 (same doctrine, answer mode). On claims,
|
|
179
|
+
answer FROM them citing claim ids; a claim whose `state` is `SUPERSEDED <id>` is never
|
|
180
|
+
cited without naming its successor.
|
|
181
|
+
- **The declared verdict — only when the recall ran**, never a per-turn ritual. Four
|
|
182
|
+
legal values:
|
|
183
|
+
- `kb: <slug>[, <slug> …] → N claims cited` — **every** slug the descent opened, not
|
|
184
|
+
only the one that answered. The descent is multi-branch by mandate (`taxonomy.md`
|
|
185
|
+
§1: follow every parent, open the final candidates), so a single-slug form cannot
|
|
186
|
+
state what a correct descent did: the agent either under-reports the branches it
|
|
187
|
+
read or invents a shape for them, and both make a thorough descent
|
|
188
|
+
indistinguishable from a lucky one. Which branches were opened is the part of this
|
|
189
|
+
verdict a reader can actually check.
|
|
190
|
+
- `kb: <slug>[, <slug> …] → node matched, no claims` — surface the node's `gaps:` when
|
|
191
|
+
it answers the question: "the KB knows it doesn't know" is a first-class answer.
|
|
192
|
+
- `kb: no coverage` — index read, nothing fits.
|
|
193
|
+
- `kb: index absent — regenerate (sdlc_check.py index)` — the INDEX is missing, not
|
|
194
|
+
necessarily the graph (nodes routinely exist while the index lags); regenerate and
|
|
195
|
+
rescan.
|
|
196
|
+
Never fake the verdict: an always-"no coverage" verdict certifies a lookup that did
|
|
197
|
+
not happen. The `router:` and `kb:` verdicts are independent and may co-occur, one
|
|
198
|
+
line each — a how-to question can match a guide AND carry claims.
|
|
199
|
+
- **Anti-echo — the re-touch rule.** When a DERIVED claim grounds a decision the user is
|
|
200
|
+
about to take, walk its chain to non-DERIVED ground — a GIVEN artifact, an ELICITED or
|
|
201
|
+
RULING note — and cite that ground beside the claim id; re-opening only the immediate
|
|
202
|
+
target may re-read the agent's own synthesis, which is the echo chamber itself. If the
|
|
203
|
+
ground does not resolve (imported bundle without originals, external `original_path:`,
|
|
204
|
+
tombstone): say so beside the claim id and treat the claim as **unverified for
|
|
205
|
+
decision-grounding** — surfaced, never silently cited. Per-provenance stance: GIVEN's
|
|
206
|
+
source column is already the direct citation; ELICITED/RULING carry the practitioner's
|
|
207
|
+
own authority; an IMPORTED claim grounding a decision is named as un-re-ratified
|
|
208
|
+
foreign authority.
|
|
209
|
+
- **Citation scope — the row's test is scope, not fidelity.** Before citing a claim in
|
|
210
|
+
an answer or a document, verify every part of the row belongs to the question: a row
|
|
211
|
+
can be atomic as provenance and plural as meaning (`distillation.md` §3), and a
|
|
212
|
+
faithful quote of the whole row then asserts what the source did not — a capability
|
|
213
|
+
borrowed across subjects, another actor's surface, a silently switched referent.
|
|
214
|
+
If part of the row is out of scope, **cite the part and say where the rest
|
|
215
|
+
belongs** — never cite the whole row on the grounds that it "says what I quoted",
|
|
216
|
+
and never silently drop the off-topic part (that loses an assertion — the other
|
|
217
|
+
half of the north star). A row that keeps forcing this test is a split candidate
|
|
218
|
+
(`reconciliation.md` §Splitting a bundled row).
|
|
219
|
+
- **The trace persists.** When the decision is recorded (a ruling note, a diary entry),
|
|
220
|
+
that record cites the claim id AND the re-touched ground — the trace survives in the
|
|
221
|
+
corpus, not in ephemeral chat.
|
|
222
|
+
- **Under dispatch**, recall is an orchestrator concern: the orchestrator runs the
|
|
223
|
+
descent itself; a context-free subagent never runs its own. The task schema has no
|
|
224
|
+
claims field today, so until a dispatch-focused unit adds one, the orchestrator
|
|
225
|
+
inlines the cited claim rows in the task's free text — an explicit interim.
|
|
226
|
+
|
|
227
|
+
## The Capture Moment — the day's decisions reach the ledger
|
|
228
|
+
|
|
229
|
+
Capture today is what makes recall honest tomorrow: a captured elicited or ruled note
|
|
230
|
+
is exactly the non-DERIVED ground the re-touch rule above walks to. The rails all
|
|
231
|
+
exist — this section adds only the MOMENT.
|
|
232
|
+
|
|
233
|
+
- **When — user-signed closings, once per session.** Phase 5 of a governed unit, or
|
|
234
|
+
any closing signal from the user in an un-governed session ("chiudiamo", "we're
|
|
235
|
+
done"); the session-end pass that updates `handoff.md`/`project_notes.md` then runs
|
|
236
|
+
at that same closing. Never per-turn, never a standing interruption. **Declared
|
|
237
|
+
residual**: an unsignaled end (the user simply stops writing) captures nothing —
|
|
238
|
+
the phase-4 duty (a decision stated mid-session owes its note WHEN SAID) is the
|
|
239
|
+
protection for sessions that never close, and the orient's recency line makes the
|
|
240
|
+
miss visible next time. That line measures NOTES recency, not full ledger
|
|
241
|
+
freshness, and trusts frontmatter `date:` over file mtimes — mtimes lie after a
|
|
242
|
+
clone or worktree.
|
|
243
|
+
- **The sweep question.** At the closing, ONE question, carrying its own search
|
|
244
|
+
result inline: "today I recorded: [what the sweep found already on the rails] —
|
|
245
|
+
any other decisions from today to record?". Scoped to TODAY, so it reaches
|
|
246
|
+
decisions taken outside the session (a meeting, a call) that no transcript search
|
|
247
|
+
could find — facts only the practitioner owns. This is a **scheduled elicitation**
|
|
248
|
+
in the same family as the phase-3 round, not a blocking question (nothing stalls;
|
|
249
|
+
the session is ending), so the blocking form does not attach; the inline result
|
|
250
|
+
satisfies the search-first duty. "Niente" ends it.
|
|
251
|
+
- **The sweep is idempotent.** It verifies the day's decisions are on the rails; a
|
|
252
|
+
decision already noted at phase 4 is verified, never re-captured — no second note,
|
|
253
|
+
no duplicate claim row. The moment closes gaps; the phase-4 row stays the primary
|
|
254
|
+
channel.
|
|
255
|
+
- **What counts as a decision**: domain choices made or confirmed today — a value, a
|
|
256
|
+
threshold, a rule, a stated preference, a rejected alternative with its reason.
|
|
257
|
+
NOT mechanics (commands run, files edited), NOT process state (the handoff's job).
|
|
258
|
+
- **The channeling — existing rails, explicit provenance.**
|
|
259
|
+
- The user's words → `corpus/notes/*` with `origin: elicited` and a `date:`; a
|
|
260
|
+
claim row distilled from it carries `prov: ELICITED`, source = that note with a
|
|
261
|
+
legal `L<a>-<b>` locator.
|
|
262
|
+
- A synthesis of the day's discussion → a note with `derived_from:` → claim
|
|
263
|
+
`prov: DERIVED`.
|
|
264
|
+
- **RULING only when the decision resolves an existing contested set** — then
|
|
265
|
+
`reconciliation.md` §2 applies in full (mandatory `basis:`, supersession of the
|
|
266
|
+
whole prior set). A fresh conflict-free decision is captured elicited: a preference
|
|
267
|
+
is not a fact, and `basis:` is reserved for the fact the corpus lacks.
|
|
268
|
+
- A fact on an existing topic → claim row, L1 (`id` empty; `claim-id --fill`).
|
|
269
|
+
- No owning topic → the note is written NOW and the placement is declared as the
|
|
270
|
+
next kb unit. Capture never smuggles an L3 hierarchy change, and
|
|
271
|
+
`topics/unplaced.md` is never a decision park — UNPLACED is for topic-less
|
|
272
|
+
scraps and is invisible to recall.
|
|
273
|
+
- **Reconciliation is wired.** A captured claim meeting an existing claim on the
|
|
274
|
+
node classifies per `reconciliation.md` — capture can confirm, refine, coexist or
|
|
275
|
+
CONTEST, never silently overwrite.
|
|
276
|
+
- **Silence stays legal where no one signed off**: no closing signal → no question,
|
|
277
|
+
no ritual line.
|
|
278
|
+
|
|
279
|
+
## Revision — the full re-read
|
|
280
|
+
|
|
281
|
+
Incorporating new knowledge into an existing document is a rewrite, not an
|
|
282
|
+
append: anchored edits are each correct while the global invariant — the body
|
|
283
|
+
reads as CURRENT state — is never re-verified. The gesture:
|
|
284
|
+
- Re-read the WHOLE document before editing; then rewrite the body so it reads
|
|
285
|
+
as written today — new knowledge fused, never quarantined in dated
|
|
286
|
+
sections — never append a delta.
|
|
287
|
+
- History goes to the Diary/notes, never an inline chronicle — and past Diary
|
|
288
|
+
entries are never rewritten: a correction is a new entry.
|
|
289
|
+
- A SUPERSEDED banner is a tombstone, never a revision device in a living doc.
|
|
290
|
+
- Claim tables are EXEMPT (rows move only per `reconciliation.md`) and node
|
|
291
|
+
frontmatter moves only per `taxonomy.md` — a revision never re-parents; the
|
|
292
|
+
rewrite governs prose, never the ledger or the graph edges.
|
|
293
|
+
- A multi-document pass re-reads PER DOCUMENT; set coverage is not integrity.
|
|
294
|
+
- The re-read raises the probability of catching a false premise; it cannot
|
|
295
|
+
guarantee it — domain judgment stays the human's.
|
|
296
|
+
|
|
297
|
+
## Mechanical Enforcement
|
|
298
|
+
- `scripts/sdlc_check.py index`: updates `ai_docs/INDEX.md` and `ai_docs/reference/INDEX.md`.
|
|
299
|
+
- `scripts/sdlc_check.py validate`: validates YAML frontmatter (`status`, `description`).
|
|
300
|
+
- `scripts/sdlc_check.py check`: checks dirty closures and missing indexes.
|
|
301
|
+
- `scripts/sdlc_check.py stale`: spine staleness plus `## claims` --
|
|
302
|
+
superseded-cited documents, expired `valid` windows, superseded
|
|
303
|
+
derivation chains (the time cycle's consolidated view).
|
|
@@ -26,7 +26,11 @@ without an E-ISP.
|
|
|
26
26
|
- `sdlc_check.py plan brief PLAN_[feature].md --task <id>` — prints the
|
|
27
27
|
task block, the `produces` of prior-order tasks (interfaces), and
|
|
28
28
|
`guides` pointers (paths, never pasted content) to stdout.
|
|
29
|
-
- Spawn the subagent with that brief
|
|
29
|
+
- Spawn the subagent with that brief plus the return-doubts line as its
|
|
30
|
+
entire context window. The line: "An open point whose answer changes the
|
|
31
|
+
work is not yours to decide: return it in your final output with what you
|
|
32
|
+
searched." The orchestrator treats them as its own candidate doubts
|
|
33
|
+
(`elicitation.md` §When a doubt emerges).
|
|
30
34
|
- Run `task.verify` out of band (the orchestrator executes it — the
|
|
31
35
|
validator only ever prints it, never runs it) plus the one-shot review
|
|
32
36
|
below.
|
|
@@ -1,133 +1,192 @@
|
|
|
1
|
-
# Spec Elicitation
|
|
2
|
-
|
|
3
|
-
`## The question discipline` below governs EVERY question to the
|
|
4
|
-
any phase, any level, inside or outside the round. The rest of the
|
|
5
|
-
spec elicitation round: it applies when an L3 request enters phase 3 (Request
|
|
6
|
-
Analysis), BEFORE drafting the ANALYSIS document (Standalone) or the D-UC/E-ISP
|
|
7
|
-
(Hybrid).
|
|
8
|
-
|
|
9
|
-
Skip path: if the spec is already complete — an approved Vision or explicit
|
|
10
|
-
user requirements already answer goal, scope, and constraints — skip the
|
|
11
|
-
round and add a one-line note in the analysis stating why it was skipped.
|
|
12
|
-
Do not run the round as a formality when the answers are already on record.
|
|
13
|
-
|
|
14
|
-
Unattended path: when the user is not reachable (a scheduled or autonomous run,
|
|
15
|
-
and a bootstrap Vision is `DRAFT` by mandate, so the skip path above cannot
|
|
16
|
-
apply on a project's first L3), do not stall and do not
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
1
|
+
# Spec Elicitation
|
|
2
|
+
|
|
3
|
+
`## The question discipline` below governs EVERY doubt and EVERY question to the
|
|
4
|
+
practitioner — any phase, any level, inside or outside the round. The rest of the
|
|
5
|
+
file is the spec elicitation round: it applies when an L3 request enters phase 3 (Request
|
|
6
|
+
Analysis), BEFORE drafting the ANALYSIS document (Standalone) or the D-UC/E-ISP
|
|
7
|
+
(Hybrid).
|
|
8
|
+
|
|
9
|
+
Skip path: if the spec is already complete — an approved Vision or explicit
|
|
10
|
+
user requirements already answer goal, scope, and constraints — skip the
|
|
11
|
+
round and add a one-line note in the analysis stating why it was skipped.
|
|
12
|
+
Do not run the round as a formality when the answers are already on record.
|
|
13
|
+
|
|
14
|
+
Unattended path: when the user is not reachable (a scheduled or autonomous run,
|
|
15
|
+
and a bootstrap Vision is `DRAFT` by mandate, so the skip path above cannot
|
|
16
|
+
apply on a project's first L3) and a real doubt remains, do not stall and do not
|
|
17
|
+
invent consensus. Write it as a **declared assumption** (§Ask before the write)
|
|
18
|
+
in the artifact it touches. At L3, mark the ANALYSIS `BLOCKED on the user` and
|
|
19
|
+
stop before implementation; below L3, proceed and list the assumption in the
|
|
20
|
+
reply. An assumption on the record is reviewable; a guess folded silently into a
|
|
21
|
+
design is not.
|
|
22
|
+
|
|
23
|
+
## The question discipline
|
|
24
|
+
|
|
25
|
+
A doubt kept silent is decided by the agent alone and reaches the documents
|
|
26
|
+
looking settled; a useless question wastes the practitioner's attention. This
|
|
27
|
+
section rules on both. The process *plans* questions in two places — the round
|
|
28
|
+
below, and the Capture Moment sweep at a user-signed closing (`SKILL.md`) — each
|
|
29
|
+
a planned occasion that keeps its own form.
|
|
30
|
+
|
|
31
|
+
### When a doubt emerges
|
|
32
|
+
|
|
33
|
+
A **candidate doubt** is an open point whose answer changes what you write or
|
|
34
|
+
record. The usual signals — they illustrate, they do not close the definition:
|
|
35
|
+
|
|
36
|
+
| Thought | What it means |
|
|
37
|
+
|---|---|
|
|
38
|
+
| "They probably mean…", "I'll assume…" | you are choosing between readings of the request |
|
|
39
|
+
| "The request doesn't say, so I'll fill it in" | a gap in scope, a non-goal, an acceptance criterion or a priority |
|
|
40
|
+
| "Either would work, I'll pick one" | equivalent in effect: yours, pick and do not ask; different in effect: weigh them below |
|
|
41
|
+
| "I'll note it as an assumption and move on" | with the practitioner reachable, that note is where doubts go to be forgotten |
|
|
42
|
+
| "It's reversible, it can be fixed later" | later is after the documents built on it exist |
|
|
43
|
+
|
|
44
|
+
- **A fact, or information only the practitioner holds** (a date, a figure, a
|
|
45
|
+
constraint): settled only by evidence, cited — never settled by a weighing. Left
|
|
46
|
+
open by the corpus and changing the work, it is a real doubt.
|
|
47
|
+
- **A choice** — a reading of intent, a structuring trade-off: cite the
|
|
48
|
+
practitioner's statement that settles it (the request, an APPROVED Vision, an
|
|
49
|
+
earlier reply); failing one, weigh the pros and cons of each option, stating each
|
|
50
|
+
rejected option at its strongest — the need it serves best; a weighing won against
|
|
51
|
+
a weak version of the alternative is not a weighing. One clearly outweighs: take
|
|
52
|
+
it and write the weighing with the choice — "I take X over Z: pro …, contro …".
|
|
53
|
+
Balanced, or turning on a priority of theirs not on record: a **real doubt** — and
|
|
54
|
+
it turns on one whenever the options serve different needs of the actor, each
|
|
55
|
+
better at one the actor would notice in using the result (a quick answer against
|
|
56
|
+
a complete record) and
|
|
57
|
+
none good enough at both, and nothing the practitioner wrote ranks those needs —
|
|
58
|
+
however clear your own ranking feels. "The more natural reading" with no pros and
|
|
59
|
+
cons written is not a weighing. Reserved approvals never enter this test
|
|
60
|
+
(§The form of a question).
|
|
61
|
+
|
|
62
|
+
### Ask before the write
|
|
63
|
+
|
|
64
|
+
A real doubt that passes the legality test below is **owed**, not merely allowed:
|
|
65
|
+
the test separates a doubt from a search not yet run, it never licenses silence.
|
|
66
|
+
Ask it before the first write that would embed its answer, grouped with every
|
|
67
|
+
doubt open at that point, in one numbered set, with the client's
|
|
68
|
+
structured-question facility where it has one. Never defer a doubt to the
|
|
69
|
+
deliverable, where the practitioner must find it inside the document; never drip
|
|
70
|
+
one question per turn. Fold every answer into the artifact, citing the reply; an
|
|
71
|
+
intent choice with neither a source nor a weighing is a finding (`review.md`
|
|
72
|
+
§Reviewing).
|
|
73
|
+
|
|
74
|
+
**Declared assumptions exist only where no question can be asked:**
|
|
75
|
+
|
|
76
|
+
- **Unattended** — the practitioner is not reachable (the Unattended path above).
|
|
77
|
+
- **Delegated** — their own words handed you this choice; quote them. A general
|
|
78
|
+
"go ahead" is not a delegation.
|
|
79
|
+
|
|
80
|
+
Each states **what it is taken from** and **the alternative it excludes**, and is
|
|
81
|
+
listed where the practitioner will read it — an assumption nobody is shown is a
|
|
82
|
+
silent decision. A dispatched subagent returns its open points in its final output
|
|
83
|
+
(`dispatch.md`); the orchestrator treats them as its own candidate doubts
|
|
84
|
+
(§When a doubt emerges).
|
|
85
|
+
|
|
86
|
+
### The legality test
|
|
87
|
+
|
|
88
|
+
Everywhere, a question is legal only when BOTH hold:
|
|
89
|
+
|
|
90
|
+
1. **Searched first, and the search is named — with its result.** The answer is
|
|
91
|
+
not on record and not derivable from the corpus, the topic graph, `ai_docs/`,
|
|
92
|
+
the Vision or the conversation — and the question states the terms, tools and
|
|
93
|
+
areas you searched **and what they returned**. Same standard as a router
|
|
94
|
+
verdict or a taxonomy-pass MISSING, and it carries their floors: a search
|
|
95
|
+
whose scope does not cover the question is not a search; a hit you did not
|
|
96
|
+
open narrows nothing; and **never fake the search** — "I looked and found
|
|
97
|
+
nothing" that names no terms and no areas is a search not run. A question the
|
|
98
|
+
corpus can answer is a search outsourced to the practitioner.
|
|
99
|
+
2. **It names what is blocked.** The question states the specific decision or
|
|
100
|
+
fact that cannot be resolved without the reply — what you will do differently
|
|
101
|
+
depending on the answer. If nothing downstream changes, there is no question.
|
|
102
|
+
|
|
103
|
+
Never legal:
|
|
104
|
+
|
|
105
|
+
- **Generic confirmation** — "shall I proceed?", "is this OK?". The process
|
|
106
|
+
authorizes proceeding; if a real risk motivates the ask, name the risk and the
|
|
107
|
+
fork — that is a blocking question and carries the form below.
|
|
108
|
+
- **Preference-fishing** — asking the practitioner to pick among options that
|
|
109
|
+
are equivalent in their effect on the benefit and already decided by the
|
|
110
|
+
project's conventions. Cheapness to undo is NOT the test.
|
|
111
|
+
- **Re-asking the record** — goal, scope or constraints that an APPROVED
|
|
112
|
+
Vision, an earlier reply, or the request itself already states; or a fact a
|
|
113
|
+
claim row already carries with its source.
|
|
114
|
+
|
|
115
|
+
What questions are FOR — what the practitioner uniquely owns: the benefit,
|
|
116
|
+
priorities between conflicting goods, non-goals, acceptance, the approvals
|
|
117
|
+
doctrine reserves to them, and **rulings on contested claims — where their
|
|
118
|
+
answer counts only as a fact they know (`basis:`), never as a preference**
|
|
119
|
+
(`reconciliation.md` §2). Facts about intent come from the practitioner; facts
|
|
120
|
+
about the documents come from the corpus. **Precedence:** a choice the
|
|
121
|
+
practitioner uniquely owns is never preference-fishing; the list above reaches
|
|
122
|
+
choices that are *not* theirs.
|
|
123
|
+
|
|
124
|
+
### The form of a question
|
|
125
|
+
|
|
126
|
+
The approvals reserved above and every stop the doctrine mandates are asked
|
|
127
|
+
whatever you expect the answer: **legal by mandate**, never weighed, never
|
|
128
|
+
re-argued here. Unattended, they are never assumed: the work holds, unless the
|
|
129
|
+
mandating rule prescribes its own unattended handling (`review.md`'s gated rung
|
|
130
|
+
does).
|
|
131
|
+
|
|
132
|
+
**Exactly two mandating files prescribe their own hand-over, and there the
|
|
133
|
+
general form does not apply**: `reconciliation.md` §4's escalation — the mandated
|
|
134
|
+
form for claim conflicts, which keeps its own timing as well; and
|
|
135
|
+
`review.md`'s round cap (the artifact plus the open findings). That list is closed. A question outside the
|
|
136
|
+
planned occasions carries the **blocking form**, one line per element:
|
|
137
|
+
|
|
138
|
+
- the fork: the options, each with its pros and cons, and what each implies for
|
|
139
|
+
the work;
|
|
140
|
+
- the evidence: what you searched, read or tried, and what it leaves undecided;
|
|
141
|
+
- why no assumption survives — why the weighing does not settle it, and what a
|
|
142
|
+
wrong pick costs; a reserved approval or a mandated stop cites the approval or
|
|
143
|
+
the mandate instead;
|
|
144
|
+
- why it is the practitioner's call;
|
|
145
|
+
- what stays blocked until answered.
|
|
146
|
+
|
|
147
|
+
## The round
|
|
148
|
+
|
|
149
|
+
Ask ONE structured set of questions, not a drip of follow-ups. Keep each
|
|
150
|
+
question short and numbered; offer concrete options where a real choice
|
|
151
|
+
exists, each with its pros and cons (this narrows the reply and speeds up the
|
|
152
|
+
round). Cover:
|
|
153
|
+
|
|
154
|
+
1. **Goal / benefit** — what problem this closes and why now. The answer must
|
|
155
|
+
name what the actor *obtains*, not a mechanism: "a dashboard" is not an
|
|
156
|
+
answer to "never lose the thread" — ask again until it is a benefit
|
|
157
|
+
(`vision.md`: the Vision is the distilled benefit; solutions and preferences
|
|
158
|
+
are what gets filtered out).
|
|
159
|
+
2. **Actors** — who interacts with this: their role, primary goal, and what
|
|
160
|
+
"good UX" means to them. These become the Vision's `## Actors`; each
|
|
161
|
+
use-case below attaches to one (actor = who they are, use-case = what
|
|
162
|
+
they do). Skip only when an approved Vision already names them.
|
|
163
|
+
3. **Scope boundaries** — what is explicitly included in this unit of work.
|
|
164
|
+
4. **Non-goals** — what is explicitly excluded, so scope does not silently
|
|
165
|
+
creep in later.
|
|
166
|
+
5. **Constraints** — technical, compatibility, and security constraints that
|
|
167
|
+
bound the solution space.
|
|
168
|
+
6. **Acceptance signals** — how you and the user will both recognize the
|
|
169
|
+
work is done and correct.
|
|
170
|
+
|
|
171
|
+
## Reflect
|
|
172
|
+
|
|
173
|
+
Fold the answers into the ANALYSIS `## Objective` / `## Vision-Alignment`
|
|
174
|
+
sections (Standalone) or into the D-UC/E-ISP (Hybrid) — do not leave them
|
|
175
|
+
sitting only in the chat transcript. The written document, not the
|
|
176
|
+
conversation, is what the next session and the next reviewer will read.
|
|
177
|
+
|
|
178
|
+
Run a second round only when an answer opens a real fork in the design (a
|
|
179
|
+
genuinely new question the first round could not have anticipated). Do not
|
|
180
|
+
run a second round to double-check answers that were already clear.
|
|
181
|
+
|
|
182
|
+
## Anti-patterns
|
|
183
|
+
|
|
184
|
+
- **Interrogation**: an endless list of questions, or drip-feeding one
|
|
185
|
+
question at a time across many turns instead of one structured round.
|
|
186
|
+
- **Asking what the approved vision already answers**: re-asking goal or
|
|
187
|
+
non-goals that a `Status: APPROVED` Vision or M-VISION already states.
|
|
188
|
+
- **Deferring a doubt into the document**: writing a guess into the artifact
|
|
189
|
+
and leaving the practitioner to find it there.
|
|
190
|
+
- **Collecting answers without folding them in**: getting replies in chat
|
|
191
|
+
and proceeding to design without writing them into the analysis document —
|
|
192
|
+
the next reader has no record of why the scope is what it is.
|
|
@@ -55,7 +55,7 @@ above is already satisfiable and no stop fires (the row still carries
|
|
|
55
55
|
rung 2 is not "usable" for this clause, it joins the question instead. When the best rung is gated and no
|
|
56
56
|
ungated rung works, the gate STOPS and asks: descending to rung 3 on silence is
|
|
57
57
|
illegal while a user is reachable. The stop is doctrine-mandated (legal by mandate,
|
|
58
|
-
`elicitation.md` §
|
|
58
|
+
`elicitation.md` §The form of a question) and carries that file's five-bullet
|
|
59
59
|
blocking form — its closed-list exemption covers this file's round-cap hand-over
|
|
60
60
|
only, not this stop. The question offers the gated rung(s) against the fallback, with what each
|
|
61
61
|
buys; states each higher rung's status (tried / unusable / gated) with the
|
|
@@ -335,6 +335,13 @@ When you are the reviewer:
|
|
|
335
335
|
statement is the proof the check ran; an unfalsifiable "I checked" is the review
|
|
336
336
|
theater this discipline exists to prevent (the reviewer-side twin of §Receiving's
|
|
337
337
|
silent-drop rule). Plain code reviews stay findings-only.
|
|
338
|
+
- **An unasked doubt is a finding (impact/solution-analysis & design reviews).** An
|
|
339
|
+
intent choice written with no owner-authored source and no weighing, a weighing
|
|
340
|
+
that names no rejected option or turns on an owner priority not on record, and a
|
|
341
|
+
fact or owner-held datum settled by a weighing instead of evidence are findings;
|
|
342
|
+
so is a cited source that does not say what the line claims. What makes a ground
|
|
343
|
+
or an assumption legal is each lens's `elicitation.md` §The question discipline —
|
|
344
|
+
cite it, never restate it. The fix is the question, not a better justification.
|
|
338
345
|
- **Restated facts (cite, never copy).** Every governance slot has ONE owning document
|
|
339
346
|
per project. A fact restated in the artifact under review when another document owns
|
|
340
347
|
it is a **finding**: the fix is a citation naming the owner, not a better copy. This
|
|
@@ -1574,6 +1574,13 @@ def cmd_stale(root, hybrid=False):
|
|
|
1574
1574
|
return rc # was: return 0 — MUST carry guide rc
|
|
1575
1575
|
use_git = git_available(root)
|
|
1576
1576
|
entry = entry_script()
|
|
1577
|
+
# The audit plan records the marks: its own edits are not a change to the area
|
|
1578
|
+
# that contains it. Counting them made a committed hash mark of that area
|
|
1579
|
+
# stale again, and every re-mark repeated the loop.
|
|
1580
|
+
try:
|
|
1581
|
+
plan_rel = f.resolve().relative_to(Path(root).resolve()).as_posix()
|
|
1582
|
+
except ValueError:
|
|
1583
|
+
plan_rel = None
|
|
1577
1584
|
# F-056: an ANALYZED row whose reference cannot be evaluated is UNVERIFIED,
|
|
1578
1585
|
# never fresh. Each `continue` below that skips such a row records it here;
|
|
1579
1586
|
# skipping silently is how a pruned reference printed `[ok]` over three areas.
|
|
@@ -1641,6 +1648,7 @@ def cmd_stale(root, hybrid=False):
|
|
|
1641
1648
|
except ValueError: # symlink out of the tree: report absolute, never crash
|
|
1642
1649
|
name = str(fp)
|
|
1643
1650
|
changed.append(name)
|
|
1651
|
+
changed = [c for c in changed if c != plan_rel]
|
|
1644
1652
|
if changed:
|
|
1645
1653
|
stale.append((rel, changed))
|
|
1646
1654
|
|