@antoneeo/agentic-sdlc-skill 1.15.0 → 1.17.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 +22 -0
- package/README.md +2 -1
- package/gemini-extension.json +1 -1
- package/package.json +2 -1
- package/skills/agentic-sdlc-skill/ENFORCEMENT.md +4 -2
- package/skills/agentic-sdlc-skill/SKILL.md +17 -9
- package/skills/agentic-sdlc-skill/dispatch.md +3 -1
- package/skills/agentic-sdlc-skill/elicitation.md +5 -1
- package/skills/agentic-sdlc-skill/guides.md +17 -0
- package/skills/agentic-sdlc-skill/review.md +8 -0
- package/skills/agentic-sdlc-skill/templates.md +115 -21
- package/skills/agentic-sdlc-skill/vision.md +245 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Tutte le modifiche significative a questa skill saranno documentate in questo file.
|
|
4
4
|
|
|
5
|
+
## [1.17.0] - 2026-07-27 (Parallel Handoff)
|
|
6
|
+
### Changed
|
|
7
|
+
- **`audit/handoff.md` becomes a workstream registry (F-019)** — the single narrative handoff was session-scoped: with milestones in parallel, the last session to close overwrote everyone else's resume point (observed live: two 2026-07-27 sessions clobbered each other's handoff). Now: **one row per open workstream** (feature, level, branch, status, since, next step, pointers) — closing one milestone removes one row and never touches another's; whoever opens the project sees at a glance what is in PROGRESS, on which branch, since when. Volatile resume logistics (branch/worktree, uncommitted state, environment notes, next command) move to **`audit/HANDOFF_[feature].md`** — ephemeral by design, **deleted at that feature's closure**: the ANALYSIS Diary keeps the durable narrative (DRY — anything in the HANDOFF file worth keeping was in the wrong file). The registry is an inventory for lookup, not a work board: no assignment, no due dates, no execution ordering (the Vision's work-management Non-Goal is the binding constraint, checked in the ANALYSIS). `ORIENT_DOCS` path unchanged — the registry flows through the SessionStart hook with no validator change. Touches `SKILL.md` (Write Triggers row split, Phase 1, Phase 5), `templates.md` (registry + per-feature templates with the Diary/logistics boundary), new invariant `test_parallel_handoff_wired`. Governed by `ai_docs/solutions/ANALYSIS_parallel_handoff.md`.
|
|
8
|
+
- **Upgrading from ≤1.16 costs nothing and requires nothing.** A legacy narrative handoff keeps working: the validator checks only its `Date:` header and age, the orientation hook reads the same path verbatim, and installing the skill never touches a consumer's `ai_docs/`. It reads as a one-row registry; **convert it lazily, the next time the write trigger fires** — `## Active features` bullets become rows, `## Next step` becomes that row's next step, `## Session notes` becomes `## Project-wide notes`. No migration sweep, no script, and deliberately **no validator warning** for the old form: nagging every existing project about a file that works is exactly the ceremony the Vision forbids. The invariant now asserts the migration clause is present — shipping a format change that strands existing projects is a caught regression.
|
|
9
|
+
|
|
10
|
+
## [1.16.0] - 2026-07-27 (Guide Activation + Verifiable Vision)
|
|
11
|
+
### Changed
|
|
12
|
+
- **Rule Zero declares the router verdict** — the triage level is declared together with the guide-router lookup result, as one line (`Level: L2 · router: no match` / `Level: L3 · router: GUIDE_x.md → read`). L1 stays exempt. Rationale: the consult trigger already existed in three places (Phase 4 bullet, `## Operative Guides`, `guides.md` §0) and still did not fire — none of them sits on a path every request executes. Making the lookup a **declared output** is what closes it: an undeclared lookup is indistinguishable from a skipped one, so `no match` is the expected, correct output on a repo with no matching guide. Field report that triggered this: guides were written and then never consulted unless the user asked by hand.
|
|
13
|
+
- **Phase 1 reads the guide router** — `ai_docs/reference/INDEX.md` joins `README.md` + `INDEX.md` as a mandatory orientation read: it is the only step that tells you a guide already governs the work you are about to do. The `templates.md` README template and this repo's own `ai_docs/README.md` list it first, so new projects inherit the fix.
|
|
14
|
+
- **SessionStart `orient` hook promoted from optional to recommended default** (`ENFORCEMENT.md` §4) and wired in this repo (`.claude/settings.json`). It already emitted the router (`ORIENT_DOCS`); it was simply off by default. Prompt placement carries the process, the hook is the backstop that survives long contexts and compaction. `sdlc_check.py` unchanged.
|
|
15
|
+
- **`source_kind: code` write trigger gets a real phase** — the Write-Triggers row moves from phase `any` (nobody's phase) to `4 / 5`, and Phase 5 gains a **Comprehension checkpoint** that asks the question out loud before closure: did this session force me to build a model of a high-complexity component no CURRENT guide covers? The duty still fires the moment the signal is recognized; the checkpoint is a backstop, not a deferral.
|
|
16
|
+
- **`guides.md` §0** gains the declare-the-verdict rule and its anti-theater twin (never fake a verdict; a verdict listing several guides means the match was not targeted, T7). **`dispatch.md`** pins verdict ownership: the orchestrator declares once at plan-authoring; a dispatched subagent does not.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **`vision.md` — the drafting discipline that makes a Vision verifiable by a cold reviewer (F-018).** A Vision is a gate: a reader with no other context must rule ACCEPT or REJECT on a proposed change, quoting one line. Most cannot, and the gap is invisible from the inside. This file is the *why it works*, derived empirically from six blind adversarial rounds (reviewers with no repository access, ~25 attack proposals) by comparing the rules that survived every attack against the rules that fell. It carries: the **nine properties of a rule that holds** (key it to an observable property of the artifact, never to intent — *a rule whose predicate is a promise is satisfied by making the opposite promise*; both branches of the decision question answered; counterfactual phrasing; near-miss verbs enumerated; terms defined by effect with a closure rule; forms rather than instances; a checkable subject predicate; an IN/OUT pair on one axis; the anticipated re-descriptions named inside the rule's own sentence); the **five structural clauses** around them (supremacy, exceptions attached affirmatively, anti-abuse on every exemption, stated defaults per path, precedence); the **reject/admit asymmetry** — *only prohibitions reject, only positives admit*, so a Goal cannot stop anything and a criterion phrased as an already-true state cannot be advanced; the **minimum operable sections**; the **five failure classes no wording fixes** (each mapped to a mechanism, not better prose); and the **blind-check procedure** — text pasted not linked, fresh context, a battery with an accept side because *a gate that can only reject is half a gate*, and the demand for the mechanism behind each ruling. Wired from the Vision Gate (Standalone and Hybrid/M-VISION), the Write-Triggers Vision row and the `templates.md` Vision template, which is restructured to the operable sections with each marked `[gate]` or orientation. Shipped in the package allowlist. New invariant `test_vision_discipline_wired`; battery 57/57. Anchored by the owner's definition (`## What a Vision IS`): *a Vision states the benefit to be obtained while leaving the most degrees of freedom possible — it binds nothing that does not obstruct that benefit.* Operationalized as: benefit-not-mechanism (the test a North Star must pass), the **deletion test** as the generative rule for every constraint (remove the rule — benefit still reachable? delete it) and its stop rule, constraints that accumulate as work reveals obstacles (an almost-empty first draft is correct: DRAFT informs, APPROVED binds), and the invariant that a constraint never obstructs the Vision — a conflict is an amendment, owner-owned. The deletion test decides WHICH rules exist; the nine properties decide HOW to write one that holds. `elicitation.md` aligned: a mechanism is not an acceptable answer to the benefit question.
|
|
20
|
+
|
|
21
|
+
### Repository (this project's own `ai_docs/`, not shipped in the package)
|
|
22
|
+
- **Vision rewritten after a blind-reviewer clarity check (F-017)** — three reviewers with fresh context and **no repository access** read `ai_docs/vision/project_vision.md` cold: verdict FAIL, 10 convergent findings. Decisive one: the proposal *"cap how many operative guides a free user may create per month"* was **admissible on the literal text** — no Non-Goal covered metering, and every anti-paywall constraint was bound to the proper noun `devPNT` rather than to paywalling as a class, so the same proposal under another name passed untouched. The Vision was also undecidable in general: its only affirmative admission test was that a change "inherits `ai_docs/` frontmatter, manifest and lifecycle" — a test of form, not substance. Rewritten as `Status: DRAFT` (pending owner promotion): the product is stated in its own terms with no competitor in the North Star, a `## Core Problem` names myopia, Non-Goals are rules over classes (metering/paywall/account-gating; required network or off-repo storage; code or release coupling), a new `## The admission test` requires a change to advance a Success Signal and not merely be well-formed, and the six Success Signals are each checkable against a named artifact or command. The A/B/C/D layer map moved to its real home `strategic/capabilities_and_positioning.md`, declared a dated snapshot. Evidence: `audit/reviews/BLIND_VISION_REVIEW_2026-07-27.md`; finding-by-finding disposition: `solutions/ANALYSIS_vision_clarity.md`. **No skill file changed** — this is the project's own governance, and the improvement is asserted until the blind lenses are re-run against the promoted text.
|
|
23
|
+
|
|
24
|
+
### Process note
|
|
25
|
+
Doc-only + tests: no `sdlc_check.py` or packaging change. Standalone L3 (devPNT off this session). Governed by `ai_docs/solutions/ANALYSIS_guide_activation.md` (F-016). Four new static invariants (Rule-Zero verdict, Phase-1 router read, code-guide phase, hook promotion) — battery 56/56 green; `validate` 0 errors. New behavioral scenario `verdict_declared_on_no_match.md` proves the "looked, nothing fitted" case; `consult_fires_on_match.md` now also asserts the verdict and that the consult fires unprompted.
|
|
26
|
+
|
|
5
27
|
## [1.15.0] - 2026-07-19 (Write Triggers + Code-Comprehension Guides)
|
|
6
28
|
### Added
|
|
7
29
|
- **Code-comprehension guides (`source_kind: code`)** — a new guide kind the agent writes **autonomously** (a duty, no proposal) when it recognizes a high-complexity component / feature / abstraction layer with no CURRENT guide: a source-faithful map of how the thing works, so the next session starts with the model instead of re-deriving it and breaking the component from partial understanding. Reuses the ENTIRE guide machinery (snapshot + `source_hash` + `stale` + router + fidelity markers) — the source is verbatim CODE EXCERPTS in `.sources/` instead of a handed document; `sdlc_check.py` is unchanged. The skill-wide "propose, never a silent write" rule is relaxed for THIS kind only (additive, code-anchored, reversible); the anti-hallucination floor holds — every claim traces to a code excerpt. Triggered by concrete signals (high comprehension cost, high fan-in, non-obvious flow, prior / repeated-across-sessions breakage from partial understanding, non-local rationale) and by **chronic fragility** (a component breaking repeatedly across sessions → write the guide AND escalate a refactor as its own L3; stop patching). Touches `guides.md` §1–§6, `SKILL.md` (4th "Comprehend" moment + Write-Triggers `code` row + consult wording), `templates.md` (`source_kind` + comprehension repertoire), `debugging.md` (capture-the-model + chronic-fragility). Positioned under Vision **Layer A** (Documentation-First lifecycle applied to code understanding), distinct from Layer D's user-indication operative guides.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- **Self-activating**: a SessionStart hook emits repo-sourced orientation; a deterministic self-eval battery guards the skill's own doctrine as the release gate.
|
|
13
13
|
- **Standalone complete**: works fully with local `ai_docs/` without requiring devPNT.
|
|
14
14
|
- **devPNT symbiosis**: when devPNT is available, Master Plan, Action Plan, M-VISION, and governed artifacts become the authoritative planning layer, with independent fresh-context reviews of technical artifacts and diffs.
|
|
15
|
-
- **Installed support files**: Claude, Codex, Gemini, and Google Antigravity receive the full skill folder, including `templates.md`, `guides.md`, `tdd.md`, `debugging.md`, `elicitation.md`, `review.md`, `dispatch.md`, `ENFORCEMENT.md`, and `scripts/sdlc_check.py`.
|
|
15
|
+
- **Installed support files**: Claude, Codex, Gemini, and Google Antigravity receive the full skill folder, including `templates.md`, `guides.md`, `vision.md`, `tdd.md`, `debugging.md`, `elicitation.md`, `review.md`, `dispatch.md`, `ENFORCEMENT.md`, and `scripts/sdlc_check.py`.
|
|
16
16
|
- **Mechanical checks**: optional validator for document structure, generated feature history, stale audit areas, and protected-path gates.
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
@@ -50,6 +50,7 @@ skills/agentic-sdlc-skill/
|
|
|
50
50
|
├── SKILL.md
|
|
51
51
|
├── templates.md
|
|
52
52
|
├── guides.md
|
|
53
|
+
├── vision.md
|
|
53
54
|
├── tdd.md
|
|
54
55
|
├── debugging.md
|
|
55
56
|
├── elicitation.md
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antoneeo/agentic-sdlc-skill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Documentation-First SDLC protocol for Claude Code, Gemini CLI, Google Antigravity and Codex with risk triage, Vision governance, installed support files and optional devPNT integration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"skills/agentic-sdlc-skill/SKILL.md",
|
|
29
29
|
"skills/agentic-sdlc-skill/templates.md",
|
|
30
30
|
"skills/agentic-sdlc-skill/guides.md",
|
|
31
|
+
"skills/agentic-sdlc-skill/vision.md",
|
|
31
32
|
"skills/agentic-sdlc-skill/tdd.md",
|
|
32
33
|
"skills/agentic-sdlc-skill/debugging.md",
|
|
33
34
|
"skills/agentic-sdlc-skill/elicitation.md",
|
|
@@ -55,9 +55,11 @@ Semantics: exit code 2 + message on stderr ⇒ the write is blocked and the mess
|
|
|
55
55
|
- The hook assumes the working directory is the project root (standard behavior of Claude Code hooks).
|
|
56
56
|
- **Hybrid/devPNT projects**: add `--hybrid` to the gate command. Governed designs live in the devPNT DB, so the gate also unlocks when an approved E-TDD shadow (`ai_docs/solutions/SHADOW_*tdd*.md`, exported before implementation — see the SKILL.md shadow discipline) is present. Without the flag the gate would block legitimate governed work. The flag is deliberately explicit: never auto-detected.
|
|
57
57
|
|
|
58
|
-
## 4. SessionStart hook (orientation,
|
|
58
|
+
## 4. SessionStart hook (orientation, recommended default)
|
|
59
59
|
|
|
60
|
-
Emits the `ai_docs/` orientation — reading guide (`README.md`), manifest (`INDEX.md`), guide router (`reference/INDEX.md`) and last `handoff.md` — plus the Rule-Zero triage reminder to stdout at session start, so the agent begins already oriented instead of reading them only if it remembers to. It is **fail-open**: a missing, unreadable or oversized doc is skipped, the output is size-capped, and it always exits 0 — a broken or empty `ai_docs/` never blocks the session. It is **zero-execution** (it reads and prints, never runs anything)
|
|
60
|
+
Emits the `ai_docs/` orientation — reading guide (`README.md`), manifest (`INDEX.md`), guide router (`reference/INDEX.md`) and last `handoff.md` — plus the Rule-Zero triage reminder to stdout at session start, so the agent begins already oriented instead of reading them only if it remembers to. It is **fail-open**: a missing, unreadable or oversized doc is skipped, the output is size-capped, and it always exits 0 — a broken or empty `ai_docs/` never blocks the session. It is **zero-execution** (it reads and prints, never runs anything).
|
|
61
|
+
|
|
62
|
+
**Wire it on every project that has `ai_docs/` and a Python interpreter.** It was opt-in until v1.16.0 and the field result was the defect this level exists to prevent: the guide router stayed unread unless the user asked for it by hand, so guides were written and never consulted. Prompt-level placement (Rule Zero declares the router verdict; Phase 1 reads the router) carries the process on its own — this hook is the backstop that survives long contexts, compaction and a session that never enters Phase 1 explicitly. Skip it only where Python is unavailable, and know what you are trading.
|
|
61
63
|
|
|
62
64
|
Wire it via each client's SessionStart mechanism — the same command everywhere (add `--hybrid` on devPNT/Hybrid projects):
|
|
63
65
|
|
|
@@ -14,6 +14,7 @@ This skill guides software development with a Documentation-First process propor
|
|
|
14
14
|
Support files in the skill directory:
|
|
15
15
|
- `templates.md`: templates for Vision, ANALYSIS, Spike, audit plan and handoff.
|
|
16
16
|
- `guides.md`: pipeline for distilling user-provided indications into `ai_docs/reference/GUIDE_[topic].md`.
|
|
17
|
+
- `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 run before promoting one to APPROVED.
|
|
17
18
|
- `scripts/sdlc_check.py`: mechanical validator for `ai_docs/` (`check`, `validate`, `index`, `stale`, `mark`, `gate`).
|
|
18
19
|
- `ENFORCEMENT.md`: optional setup for CI and hooks.
|
|
19
20
|
|
|
@@ -35,6 +36,8 @@ If a patch looks easy but you do not understand why the current code is shaped t
|
|
|
35
36
|
|
|
36
37
|
Always classify the request before choosing the process. Declare the chosen level to the user when you start operational work.
|
|
37
38
|
|
|
39
|
+
**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.md → read`. The lookup is the consult trigger; making its result a declared output is what keeps it from being skipped — a level declared without a verdict makes "did not look" indistinguishable from "looked, nothing matched". Name the guide you matched, or `no match`; name a second one only when it covers a genuinely distinct concern (typically one operative guide plus the comprehension map of the component you are touching). The verdict is never a listing of the catalogue, and never an excuse to read every guide.
|
|
40
|
+
|
|
38
41
|
| Level | Criteria | Required process |
|
|
39
42
|
|---|---|---|
|
|
40
43
|
| **L1 - Trivial** | About 10 lines in 1-2 files; no API, dependency or new-behavior change; typos or fixes restoring already-expected behavior | Implement. Run relevant existing tests. No new documents. |
|
|
@@ -57,13 +60,15 @@ Triage decides IF documentation is due; this table decides WHICH document each e
|
|
|
57
60
|
| `solutions/ANALYSIS_[feature].md` | Every L3, after elicitation and before any code. On topic match with an existing analysis, update that one instead of a new file. | 3 |
|
|
58
61
|
| `solutions/SPIKE_[topic].md` | Closing any Spike — including a failed one (a negative outcome is still an outcome). | — |
|
|
59
62
|
| `vision/features/VISION_[feature].md` | Feature known multi-milestone at analysis time, OR the retroactive trigger: you are about to create the SECOND `ANALYSIS_*` on the same theme — extract the shared feature vision first, then let both analyses reference it. | 3 |
|
|
60
|
-
| `audit/handoff.md` |
|
|
63
|
+
| `audit/handoff.md` (workstream registry) | One row per OPEN workstream (feature, level, branch, status, since, next step, pointer to its Diary/HANDOFF file) — parallel-safe: closing one milestone touches one row, never another's resume point. Refresh the row at every L3 closure (remove it) and at session end when that ANALYSIS is IN_PROGRESS; discretionary after an L2. ≤ 20 lines. | 5 / session end |
|
|
64
|
+
| `audit/handoff.md` — legacy narrative form (pre-1.17 projects) | **Convert lazily, on first write, never as a migration sweep.** A narrative handoff still works: read it as a single-row registry (`## Active features` bullets = the rows, `## Next step` = that row's next step). The first time the Write Trigger above fires, write it in registry form; until then, leave it. Nothing breaks in the meantime — the validator checks only the `Date:` header and its age, and the `orient` hook reads the file verbatim at the same path. | 5 / session end |
|
|
65
|
+
| `audit/HANDOFF_[feature].md` | Session ends with that feature unfinished AND there is volatile resume state (branch/worktree, uncommitted work, environment notes, next command). **Resume logistics only — the ANALYSIS Diary keeps the durable narrative (DRY)**; the file is ephemeral and is DELETED at that feature's closure, same step that flips the ANALYSIS to COMPLETED. | 4 / 5 / session end |
|
|
61
66
|
| `audit/audit_plan.md` (Standalone) | Bootstrap, and whenever a mapped area changes state (`sdlc_check.py mark` records the reference — git hash, else UTC timestamp). | 1 |
|
|
62
67
|
| `reference/GUIDE_[topic].md` (`source_kind: document`) | Origin+purpose test (`guides.md`), or a proactive proposal the user accepted. Propose, never a silent write, never from model knowledge. | 4 / 5 |
|
|
63
|
-
| `reference/GUIDE_[topic].md` (`source_kind: code`) | Recognized high-complexity component/feature/layer with no CURRENT guide — including one that breaks repeatedly across sessions → **duty to write autonomously** (no proposal; additive, code-anchored, reversible). Fidelity floor: every claim traces to a code excerpt. Signals + guard-rails: `guides.md` §1. |
|
|
68
|
+
| `reference/GUIDE_[topic].md` (`source_kind: code`) | Recognized high-complexity component/feature/layer with no CURRENT guide — including one that breaks repeatedly across sessions → **duty to write autonomously** (no proposal; additive, code-anchored, reversible). Fidelity floor: every claim traces to a code excerpt. Signals + guard-rails: `guides.md` §1. Write it as soon as you recognize the signal; the Phase-5 Comprehension checkpoint is the backstop that asks the question, never the only moment it may fire. | 4 / 5 |
|
|
64
69
|
| ADR — `architecture/` (Standalone) or devPNT DB (Hybrid) | An architectural decision was taken (new pattern, layer or contract change, structural dependency): record it at closure, before DONE. No decision, no ADR. | 5 |
|
|
65
70
|
| `strategic/architecture.md`, `strategic/existing_features.md` | Bootstrap; update at closure when the stack or the feature catalog actually changed. | 1 / 5 |
|
|
66
|
-
| `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap, as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation. | 1 / 2 |
|
|
71
|
+
| `vision/project_vision.md`, `roadmap.md`, `principles.md` | Bootstrap, as `Status: DRAFT`; promoted to APPROVED only by explicit user confirmation, and only after the blind check (`vision.md` §6) — which also gates any amendment of an APPROVED Vision. Write it against `vision.md` §1–§4 from the first draft. | 1 / 2 |
|
|
67
72
|
| `INDEX.md`, `reference/INDEX.md`, `strategic/features_history.md` | Never by hand: regenerated by `sdlc_check.py index` at closure when canonical docs or guides changed (prose discipline where the validator is not adopted). | 5 |
|
|
68
73
|
|
|
69
74
|
## Operating Modes
|
|
@@ -174,9 +179,9 @@ gate) instead of requiring an IN_PROGRESS ANALYSIS.
|
|
|
174
179
|
|
|
175
180
|
### 1. Audit and Alignment
|
|
176
181
|
|
|
177
|
-
- Read `ai_docs/audit/handoff.md` if it exists
|
|
178
|
-
- Read `ai_docs/README.md` (curated must-reads)
|
|
179
|
-
-
|
|
182
|
+
- Read `ai_docs/audit/handoff.md` if it exists — the **workstream registry**: one row per open workstream, so you see at a glance what is in PROGRESS, on which branch, since when, before touching anything. If a row's Date/Branch are inconsistent with reality, treat that row as history. When resuming a specific workstream, read its `audit/HANDOFF_[feature].md` (volatile resume logistics) AND its ANALYSIS Diary (durable narrative) — the registry row points at both. A **narrative handoff from a pre-1.17 project** reads as a single-row registry; convert it when you next write it, not now (Write Triggers).
|
|
183
|
+
- Read `ai_docs/README.md` (curated must-reads), `ai_docs/INDEX.md` (generated manifest of all canonical docs) and `ai_docs/reference/INDEX.md` (the guide router) to know what exists before exploring the code. 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. `solutions/` and `audit/` are not indexed per file: search them with glob/grep.
|
|
184
|
+
- Recommended default: a SessionStart hook (`ENFORCEMENT.md` §4) emits this orientation automatically at session start (README + INDEX + guide router + handoff + triage reminder), so the router reaches the context even in a session that never opens Phase 1 explicitly. Wire it wherever Python is available; when it is not wired, do these reads manually as above — the process never depends on it, and it fails open (a missing/empty `ai_docs/` never blocks the session).
|
|
180
185
|
- If `ai_docs/` is missing or incomplete, create the structure and the **bootstrap set** by analyzing the project in batches: `README.md`, the three `vision/` docs (`Status: DRAFT`), `strategic/architecture.md`, `strategic/existing_features.md` and — Standalone — `audit/audit_plan.md`; then regenerate `INDEX.md`. Nothing else is mandatory at bootstrap (per-document triggers: Write Triggers).
|
|
181
186
|
- In Standalone use `ai_docs/audit/audit_plan.md` for mapping and state.
|
|
182
187
|
- In Hybrid prefer the devPNT/KL mapping when available; do not duplicate plan governance.
|
|
@@ -189,11 +194,13 @@ Standalone:
|
|
|
189
194
|
- If a document declares `Status: DRAFT`, treat it as a hypothesis: flag conflicts, but do not block an explicit user request.
|
|
190
195
|
- If it declares `Status: APPROVED` and the request conflicts, stop and ask for a choice: update the Vision or modify/reject the request.
|
|
191
196
|
- Never promote a Vision to `APPROVED` without the user's confirmation.
|
|
197
|
+
- **Writing or amending a Vision is its own discipline — follow `vision.md`.** Draft against its §1–§4 (the properties that make a rule survive a motivated reader, and the minimum sections a gate needs), then run the **blind check** (§6) before promotion to APPROVED and before any amendment of an approved Vision. A Vision that has never been read cold by someone with no other context has not been tested at the only thing it exists to do.
|
|
192
198
|
|
|
193
199
|
Hybrid:
|
|
194
200
|
- Read the milestone's M-VISION, or ask for/create the step required by the devPNT protocol.
|
|
195
201
|
- Verify that the request serves a benefit or success signal of the M-VISION.
|
|
196
202
|
- If the request adds unauthorized scope, treat it as a Vision divergence.
|
|
203
|
+
- The M-VISION is a Vision: `vision.md` applies to it too. The gate lens of the blind check (§6) is the proportional subset for a milestone-scope document.
|
|
197
204
|
|
|
198
205
|
### 3. Request Analysis
|
|
199
206
|
|
|
@@ -219,7 +226,7 @@ Hybrid L3:
|
|
|
219
226
|
- Isolate the work: run an L3 change on its own branch. In Hybrid, prefer a git worktree from the start — a running devPNT server locks `.devpnt/*.db` and blocks in-place branch switches/merges in the primary worktree.
|
|
220
227
|
- Modify surgically, consistently with the plan.
|
|
221
228
|
- Implementation work follows the TDD discipline in `tdd.md` (RED/GREEN/REFACTOR — the L2/L3 default; record the reason when it does not apply).
|
|
222
|
-
- Before implementing (L2/L3; L1 exempt), **consult the guide router** for a guide covering the task — operative, or a comprehension map of the component you are about to touch — and read it first (the consult trigger, `guides.md` §0, summarized under `## Operative Guides`). A targeted description match, not a blanket read.
|
|
229
|
+
- Before implementing (L2/L3; L1 exempt), **consult the guide router** for a guide covering the task — operative, or a comprehension map of the component you are about to touch — and read it first (the consult trigger, `guides.md` §0, summarized under `## Operative Guides`). A targeted description match, not a blanket read. Its result is the router verdict already declared with the triage level (Rule Zero); re-run the lookup here only if the work has moved to a topic the first lookup did not cover, and say so if the verdict changes.
|
|
223
230
|
- If the environment does not allow automated tests, declare the alternative verification and the reason.
|
|
224
231
|
- For bugs (L2/L3), follow the systematic debugging method in `debugging.md`.
|
|
225
232
|
- Circuit breaker: after 3 consecutive runs without progress on the tests, stop, switch to the systematic method in `debugging.md`, and ask for instructions if still stuck. `debugging.md` also covers **chronic fragility** — a component that breaks repeatedly across sessions is a comprehension + complexity signal (write the `source_kind: code` guide AND escalate a refactor), not a fourth patch.
|
|
@@ -232,8 +239,9 @@ Hybrid L3:
|
|
|
232
239
|
- For the review itself follow `review.md` (requesting and receiving findings) — the single definition, intended for reuse by the Hybrid review gates (devPNT-side wiring out of this unit's scope).
|
|
233
240
|
- Verify alignment with the local Vision or the devPNT M-VISION.
|
|
234
241
|
- 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.
|
|
242
|
+
- **Comprehension checkpoint**: ask explicitly — *did this session force me to build a model of a high-complexity component that no CURRENT guide covers?* If yes, WRITE the `source_kind: code` guide now (a duty, not a proposal — `guides.md` §1) and say so in the closure. The knowledge you paid to build is at its most complete right here; one closure later it is gone, and the next session re-derives it or breaks the component from partial understanding.
|
|
235
243
|
- Update only the documents actually impacted.
|
|
236
|
-
- **Update `audit/handoff.md
|
|
244
|
+
- **Update the workstream registry (`audit/handoff.md`)** — mandatory at every L3 closure: REMOVE the closed workstream's row and DELETE its `audit/HANDOFF_[feature].md` (history lives in git and in the Diary); leave every other row untouched — that is the parallel-safety the registry exists for. ≤ 20 lines. The session-end rule and the L2 case: Write Triggers.
|
|
237
245
|
- **Aligned indexes (Poka-Yoke)**: if you created, moved or removed canonical documents (`vision/`, `reference/`, `architecture/`, `functional/`, `strategic/`):
|
|
238
246
|
- regenerate the manifest with `sdlc_check.py index` (writes `ai_docs/INDEX.md`) — never write it by hand;
|
|
239
247
|
- if the document is a must-read, add/update its line in the curated `README.md`;
|
|
@@ -274,7 +282,7 @@ Legacy note: the validator also accepts the deprecated Italian frontmatter keys
|
|
|
274
282
|
## Operative Guides
|
|
275
283
|
|
|
276
284
|
Guides are **consulted, created, proposed, and (for code) authored for comprehension** — four moments; the mechanics live once in `guides.md`. Two source kinds: `document` (user indications, operative) and `code` (a comprehension map of a complex component):
|
|
277
|
-
- **Consult (before acting):** before operative L2/L3 work (L1 exempt), check the guide router for a guide covering the task and read the match first — a targeted description match, never a blanket read. → `guides.md` §0.
|
|
285
|
+
- **Consult (before acting):** before operative L2/L3 work (L1 exempt), check the guide router for a guide covering the task and read the match first — a targeted description match, never a blanket read. **Declare the verdict** on the same line as the triage level (Rule Zero): the lookup is only reliable when its result is visible. → `guides.md` §0.
|
|
278
286
|
- **Create (from user indications):** the origin+purpose test below (`source_kind: document`).
|
|
279
287
|
- **Propose proactively (after success):** after reusable, user-indication-governed work, PROPOSE distilling a guide — a proposal, never a silent write, never from model knowledge. → `guides.md` §1.
|
|
280
288
|
- **Comprehend (code, autonomous):** when a component/feature/layer is high-complexity and no CURRENT guide covers it, it is your DUTY to WRITE a `source_kind: code` comprehension guide autonomously — no proposal (additive, code-anchored, reversible); every claim traces to a code excerpt. Signals + guard-rails: `guides.md` §1.
|
|
@@ -38,7 +38,9 @@ consult trigger (`guides.md` §0) applied at plan-authoring time: the orchestrat
|
|
|
38
38
|
runs the router lookup (project router `ai_docs/reference/INDEX.md` + the agent-KB
|
|
39
39
|
router) when populating `guides`. A dispatched context-free subagent does **NOT**
|
|
40
40
|
run its own router consult — it reads the guide pointers handed to it in the
|
|
41
|
-
brief.
|
|
41
|
+
brief. The router verdict (Rule Zero) is therefore declared ONCE, by the
|
|
42
|
+
orchestrator, when it authors the plan; a dispatched subagent does not declare
|
|
43
|
+
one. (Proactive guide-creation stays at closure — the same broad final pass
|
|
42
44
|
below — so it needs no separate dispatch hook.)
|
|
43
45
|
|
|
44
46
|
## Model tiers (client-relative, no provider names)
|
|
@@ -14,7 +14,11 @@ Ask ONE structured set of questions, not a drip of follow-ups. Keep each
|
|
|
14
14
|
question short and numbered; offer concrete options where a real choice
|
|
15
15
|
exists (this narrows the reply and speeds up the round). Cover:
|
|
16
16
|
|
|
17
|
-
1. **Goal / benefit** — what problem this closes and why now.
|
|
17
|
+
1. **Goal / benefit** — what problem this closes and why now. The answer must
|
|
18
|
+
name what the actor *obtains*, not a mechanism: "a dashboard" is not an
|
|
19
|
+
answer to "never lose the thread" — ask again until it is a benefit
|
|
20
|
+
(`vision.md`: the Vision is the distilled benefit; solutions and preferences
|
|
21
|
+
are what gets filtered out).
|
|
18
22
|
2. **Actors** — who interacts with this: their role, primary goal, and what
|
|
19
23
|
"good UX" means to them. These become the Vision's `## Actors`; each
|
|
20
24
|
use-case below attaches to one (actor = who they are, use-case = what
|
|
@@ -40,6 +40,18 @@ already cover how to do this well?*
|
|
|
40
40
|
the task — never load every guide, which would reintroduce the exact token
|
|
41
41
|
cost the "point to them" model exists to avoid. The two-level model (compact
|
|
42
42
|
synthesis / verbatim snapshot) already bounds a single guide's cost.
|
|
43
|
+
- **Declare the router verdict.** The lookup result travels with the triage
|
|
44
|
+
level (`SKILL.md` Rule Zero) as one line — `router: no match`, or
|
|
45
|
+
`router: GUIDE_x.md → read`. This is what makes the consult reliable: an
|
|
46
|
+
undeclared lookup is indistinguishable from a skipped one, to the user, to a
|
|
47
|
+
later reviewer, and to you in the next session. Declaring `no match` on a repo
|
|
48
|
+
with no matching guide is the correct, expected output — not noise.
|
|
49
|
+
- **Never fake the verdict.** `no match` means the router was read and nothing
|
|
50
|
+
fitted. A verdict that is always `no match` certifies a lookup that did not
|
|
51
|
+
happen and is worse than silence; a verdict listing the catalogue means the
|
|
52
|
+
match was not targeted (T7). Two guides are legitimate only when they cover
|
|
53
|
+
distinct concerns — typically an operative guide plus the comprehension map of
|
|
54
|
+
the component being touched; three is a smell, not a thorough lookup.
|
|
43
55
|
- **Under subagent dispatch** the consult happens at plan-authoring time (the
|
|
44
56
|
orchestrator populates each task's `guides` field); a context-free subagent
|
|
45
57
|
reads the pointers it was handed and does not run its own router lookup. See
|
|
@@ -103,6 +115,11 @@ the component from partial understanding.
|
|
|
103
115
|
guide per topic, both routers). Honor the fidelity floor (§3). RECOMMEND the
|
|
104
116
|
independent guide-vs-source review (§5) — it matters more here, since no human gated
|
|
105
117
|
creation. Announce the autonomous write in the closure / handoff so it is visible.
|
|
118
|
+
- **When it fires.** As soon as you recognize the signal, during the work. The
|
|
119
|
+
Phase-5 **Comprehension checkpoint** (`SKILL.md` §5) is the backstop that asks the
|
|
120
|
+
question out loud before closure — a safety net for a signal you noticed and did not
|
|
121
|
+
act on, never a licence to defer. Writing it at closure is still far better than not
|
|
122
|
+
writing it: the model you built is complete now and gone next session.
|
|
106
123
|
|
|
107
124
|
## 2. Pipeline
|
|
108
125
|
|
|
@@ -22,6 +22,14 @@ When you hand work to a reviewer (human or agent), give them:
|
|
|
22
22
|
(Hybrid: `P-TM`; Standalone: the ANALYSIS `## Security and Threat Model`). Hand these
|
|
23
23
|
*in addition to* the design artifact — the reviewer checks the artifact **against**
|
|
24
24
|
them, not only for internal consistency.
|
|
25
|
+
- **For a design review, the threat model too** (same sources as above). Why this
|
|
26
|
+
one and not the whole set: file coverage crosses the impact-analysis→design hop on
|
|
27
|
+
a mechanical gate (every impacted file needs a design block), so a dropped file is
|
|
28
|
+
caught; **threats have no such gate** — a threat answered in the impact analysis
|
|
29
|
+
can silently fail to become a security requirement in the design, and the later
|
|
30
|
+
code review only verifies the requirements that are there, never the ones that
|
|
31
|
+
should have been. The design reviewer checks that every threat surface the change
|
|
32
|
+
touches has a matching security requirement.
|
|
25
33
|
|
|
26
34
|
Never ask a reviewer to "review my session" or "review what I just did"
|
|
27
35
|
without the artifacts above — that forces them to reconstruct scope from
|
|
@@ -77,9 +77,10 @@ Curated must-read index, by hand (it is NOT the generated manifest). Created at
|
|
|
77
77
|
Must-reads for this project, in order. The full manifest of canonical docs is
|
|
78
78
|
`INDEX.md` (generated — regenerate with `sdlc_check.py index`, never edit by hand).
|
|
79
79
|
|
|
80
|
-
1. `
|
|
81
|
-
2. `
|
|
82
|
-
3. `
|
|
80
|
+
1. `reference/INDEX.md` — the guide router: which guide already governs the work you are about to do (generated).
|
|
81
|
+
2. `vision/project_vision.md` — why the project exists (check its Status first).
|
|
82
|
+
3. `strategic/architecture.md` — how it is built.
|
|
83
|
+
4. `audit/handoff.md` — where work stopped last session (if present).
|
|
83
84
|
|
|
84
85
|
Directory purposes: `vision/` (project direction), `strategic/` (architecture and
|
|
85
86
|
feature catalog), `reference/` (operative guides), `solutions/` (per-feature
|
|
@@ -88,23 +89,81 @@ analyses, discovery-by-grep), `audit/` (audit plan and handoff).
|
|
|
88
89
|
|
|
89
90
|
## ai_docs/vision/project_vision.md
|
|
90
91
|
|
|
92
|
+
A Vision states **the benefit to be obtained while leaving the most degrees of
|
|
93
|
+
freedom possible** — it binds nothing that does not obstruct that benefit (the
|
|
94
|
+
deletion test, `vision.md` §What-a-Vision-IS). It is *applied* as a **gate**: a
|
|
95
|
+
cold reader must be able to rule ACCEPT or REJECT on a proposed change, quoting
|
|
96
|
+
one line, without asking anyone anything. Write it against `vision.md` §1–§4 from
|
|
97
|
+
the first draft — the properties that make a rule survive a motivated reader are
|
|
98
|
+
cheap to apply while writing and expensive to retrofit. `vision.md` §6 is the
|
|
99
|
+
blind check that gates promotion to APPROVED.
|
|
100
|
+
|
|
101
|
+
Sections below marked **[gate]** are load-bearing for that ruling; the others are
|
|
102
|
+
orientation for humans. Keep the human ones — just know which is which.
|
|
103
|
+
|
|
91
104
|
```markdown
|
|
92
105
|
# Project Vision
|
|
93
106
|
Status: DRAFT
|
|
94
107
|
<!-- Status: DRAFT (reconstructed by the agent, NOT a gating authority)
|
|
95
|
-
or APPROVED (by <who>, <date>) — only after the user's explicit confirmation
|
|
108
|
+
or APPROVED (by <who>, <date>) — only after the user's explicit confirmation
|
|
109
|
+
AND the blind check in vision.md §6. -->
|
|
96
110
|
|
|
97
111
|
## North Star
|
|
112
|
+
<!-- [gate, partly] The BENEFIT to be obtained — what the actor gets, never the
|
|
113
|
+
mechanism, and never by comparison to another product (a comparative
|
|
114
|
+
definition rots silently when the comparison target moves). Concrete enough
|
|
115
|
+
that an obstacle to it is recognizable: that is what makes every Non-Goal
|
|
116
|
+
below derivable and refutable. Also restate here any boundary a ruling
|
|
117
|
+
depends on but that is defined elsewhere: risk tiers, lifecycle states,
|
|
118
|
+
scale levels. Routing the reader to another file breaks the cold-read
|
|
119
|
+
premise. -->
|
|
120
|
+
## Core Problem
|
|
121
|
+
<!-- Human orientation: what goes wrong without this product. Carries no gate
|
|
122
|
+
weight unless the admission test names it. -->
|
|
98
123
|
## Actors
|
|
99
|
-
<!-- the cast this product serves. One light line per actor:
|
|
124
|
+
<!-- [gate] the cast this product serves. One light line per actor:
|
|
100
125
|
**Role** — primary goal; good UX = what a good experience means to them.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
126
|
+
The "good UX =" clauses are admissible work, not decoration — say so in the
|
|
127
|
+
admission test. Define each actor ONCE here; use-cases (Standalone) / D-UC
|
|
128
|
+
(Hybrid) reference them by role and never re-describe them (anti-DRY).
|
|
129
|
+
Proportional: a role list, not persona research. -->
|
|
105
130
|
## Goals
|
|
131
|
+
<!-- [gate — the ACCEPT side] Each with a baseline and headroom, so "advances this"
|
|
132
|
+
has meaning. A goal phrased as an already-true state cannot be advanced.
|
|
133
|
+
Include the recurring legitimate work explicitly (packaging and installation,
|
|
134
|
+
the product's own tests, reducing what the agent must read, one more client) —
|
|
135
|
+
otherwise your own test rejects the maintenance the product needs. -->
|
|
136
|
+
## Invariants
|
|
137
|
+
<!-- [gate] The promises that outrank everything: what the user is guaranteed, what
|
|
138
|
+
the architecture must always be true of. State each as ONE decision question
|
|
139
|
+
with BOTH branches answered, plus an anti-laundering clause naming the
|
|
140
|
+
re-descriptions you expect. Omit the section if the product has none. -->
|
|
106
141
|
## Non-Goals
|
|
142
|
+
<!-- [gate — the REJECT side; this is your ENTIRE rejection surface]
|
|
143
|
+
Derive every rule by the deletion test: remove it — if the benefit is still
|
|
144
|
+
reachable, the rule does not belong (it spends a degree of freedom on
|
|
145
|
+
nothing); if not, keep it and name the obstacle it removes. Constraints
|
|
146
|
+
accumulate as work reveals obstacles — an almost-empty first draft is
|
|
147
|
+
correct, not incomplete.
|
|
148
|
+
Open with a supremacy clause: what these bind (all layers, tiers, paid
|
|
149
|
+
components, future components), and that packaging or naming is irrelevant.
|
|
150
|
+
Each rule: an observable property of the artifact (never intent or a promise),
|
|
151
|
+
a closed enumeration with a closure rule, the near-miss verbs, an IN and an OUT
|
|
152
|
+
example on the same axis, and its exception attached in the same bullet.
|
|
153
|
+
Nothing here that cannot be violated by a proposed change — a rule about this
|
|
154
|
+
document's own prose can never fire, and wastes a slot. -->
|
|
155
|
+
## The admission test
|
|
156
|
+
<!-- [gate] One sentence naming EXACTLY which sections are positive sources and
|
|
157
|
+
EXACTLY which are prohibitions. State what the test does NOT govern (defect
|
|
158
|
+
fixes, performance, maintenance) and give that exemption its own anti-abuse
|
|
159
|
+
clause. State the default for anything unreached, per path. -->
|
|
107
160
|
## Success Signals
|
|
161
|
+
<!-- [gate] Each checkable against a NAMED artifact or command by someone who was
|
|
162
|
+
not here. Not "we are the best" — a file, a command, a battery, and what the
|
|
163
|
+
result must be. -->
|
|
164
|
+
## Where the rest lives
|
|
165
|
+
<!-- Pointers, so an absence reads as intentional rather than as a gap. Competitive
|
|
166
|
+
positioning goes here as a dated snapshot, never in the Vision body. -->
|
|
108
167
|
```
|
|
109
168
|
|
|
110
169
|
## ai_docs/vision/roadmap.md
|
|
@@ -277,26 +336,61 @@ States: PENDING (to analyze) | ANALYZED (analyzed, with reference) | SKIPPED (wi
|
|
|
277
336
|
| vendor/ | SKIPPED | - | vendored code |
|
|
278
337
|
```
|
|
279
338
|
|
|
280
|
-
## ai_docs/audit/handoff.md
|
|
339
|
+
## ai_docs/audit/handoff.md — the workstream registry
|
|
340
|
+
|
|
341
|
+
One row per OPEN workstream, ≤ 20 lines. **Parallel-safe by construction**: closing
|
|
342
|
+
one milestone removes one row and never touches another's resume point — the defect
|
|
343
|
+
this replaces was a single narrative slot where the last session to close overwrote
|
|
344
|
+
everyone else's handoff. It is an **inventory for lookup** (like the generated
|
|
345
|
+
manifest), not a work board: no assignment, no due dates, no execution ordering.
|
|
281
346
|
|
|
282
|
-
|
|
347
|
+
Updated at every L3 closure (row removed) AND at session end with work still
|
|
348
|
+
IN_PROGRESS (row refreshed) — see Write Triggers.
|
|
283
349
|
|
|
284
|
-
|
|
350
|
+
**Coming from a pre-1.17 project** (narrative handoff with `## Active features` /
|
|
351
|
+
`## Next step` / `## Session notes`): nothing is broken and nothing is urgent — the
|
|
352
|
+
validator only checks the `Date:` header and its age, and the orientation hook reads
|
|
353
|
+
the file verbatim. Read it as a one-row registry, and convert it the next time the
|
|
354
|
+
write trigger fires: each `## Active features` bullet becomes a row, `## Next step`
|
|
355
|
+
becomes that row's next step, `## Session notes` becomes `## Project-wide notes`.
|
|
356
|
+
Migrating a repository that is not being worked on buys nothing.
|
|
285
357
|
|
|
286
358
|
```markdown
|
|
287
|
-
# Handoff
|
|
359
|
+
# Handoff — workstream registry
|
|
288
360
|
Date: 2026-06-11 (UTC)
|
|
289
|
-
Branch: feature/sso-login
|
|
290
|
-
Agent: Claude
|
|
291
361
|
|
|
292
|
-
|
|
293
|
-
|
|
362
|
+
| Workstream | Level | Branch | Status | Since | Next step | Details |
|
|
363
|
+
|---|---|---|---|---|---|---|
|
|
364
|
+
| F-001 SSO login | L3 | feature/sso-login | PROGRESS | 2026-06-10 | wire callback tests | HANDOFF_login_sso.md · ANALYSIS_login_sso.md |
|
|
365
|
+
| F-002 Audit refresh | L3 | feature/audit | PAUSED | 2026-06-02 | resume at Phase 4 | ANALYSIS_audit_refresh.md (no volatile state) |
|
|
366
|
+
|
|
367
|
+
## Project-wide notes
|
|
368
|
+
<!-- one or two lines: release pending, environment quirks that affect everyone -->
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## ai_docs/audit/HANDOFF_[feature].md — volatile resume logistics (ephemeral)
|
|
372
|
+
|
|
373
|
+
**Resume logistics ONLY; the ANALYSIS Diary keeps the durable narrative (DRY).**
|
|
374
|
+
The boundary: Diary = what happened and why (decisions, state of the work — survives
|
|
375
|
+
forever); this file = how to pick the work back up (branch/worktree, uncommitted
|
|
376
|
+
state, environment notes, the next concrete command — worthless once resumed).
|
|
377
|
+
Created only when a session pauses the feature WITH volatile state to record;
|
|
378
|
+
**DELETED at the feature's closure**, in the same step that flips the ANALYSIS to
|
|
379
|
+
COMPLETED — anything in it worth keeping was in the wrong file.
|
|
380
|
+
|
|
381
|
+
```markdown
|
|
382
|
+
# HANDOFF: [feature] (ephemeral — deleted at closure)
|
|
383
|
+
Updated: 2026-06-11 (UTC)
|
|
384
|
+
Branch: feature/sso-login (worktree ../wt-sso)
|
|
385
|
+
|
|
386
|
+
## Resume state
|
|
387
|
+
<!-- uncommitted files, half-run migrations, env vars, running services -->
|
|
294
388
|
|
|
295
|
-
## Next
|
|
296
|
-
<!--
|
|
389
|
+
## Next command
|
|
390
|
+
<!-- the literal next thing to run or edit -->
|
|
297
391
|
|
|
298
|
-
##
|
|
299
|
-
<!--
|
|
392
|
+
## Watch out
|
|
393
|
+
<!-- traps discovered this session that bite on resume (locks, CRLF, flaky test) -->
|
|
300
394
|
```
|
|
301
395
|
|
|
302
396
|
## ai_docs/strategic/architecture.md and existing_features.md
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Writing a Vision that a cold reviewer can actually apply
|
|
2
|
+
|
|
3
|
+
Support file for `ai_docs/vision/project_vision.md`, `vision/features/VISION_*.md`
|
|
4
|
+
and (Hybrid) the devPNT M-VISION. Read it when writing or amending any of them.
|
|
5
|
+
The template lives in `templates.md`; this file is the *why it works*.
|
|
6
|
+
|
|
7
|
+
**The problem this solves.** A Vision's job is to be read cold — by a later
|
|
8
|
+
session, by a reviewer, by another agent — and to produce a ruling on a proposed
|
|
9
|
+
change. Most Visions cannot do that: they read as intent to whoever wrote them and
|
|
10
|
+
as ambiguity to everyone else, and the gap is invisible until something wrong gets
|
|
11
|
+
through. Writing one and then discovering the holes by adversarial rounds works,
|
|
12
|
+
but it costs several rewrites. The checklist below exists so a Vision is
|
|
13
|
+
verifiable on the **first** draft.
|
|
14
|
+
|
|
15
|
+
Everything here was derived empirically: six blind adversarial rounds against one
|
|
16
|
+
real Vision, reviewers with no repository access, ~25 attack proposals. Rules that
|
|
17
|
+
survived every attack and rules that fell were compared for structure. What
|
|
18
|
+
follows is that difference.
|
|
19
|
+
|
|
20
|
+
## What a Vision IS
|
|
21
|
+
|
|
22
|
+
A Vision states **what is to be obtained — the benefit — while leaving the most
|
|
23
|
+
degrees of freedom possible. It binds nothing that does not obstruct that
|
|
24
|
+
benefit.**
|
|
25
|
+
|
|
26
|
+
Four consequences, each operational:
|
|
27
|
+
|
|
28
|
+
- **State the benefit, not the mechanism.** What the actor *obtains*, never how —
|
|
29
|
+
and concrete enough that an obstacle to it is *recognizable*. This is the test a
|
|
30
|
+
North Star must pass: from "best-in-class" no constraint is derivable and none
|
|
31
|
+
is refutable, because nothing recognizably obstructs it. From "everything the
|
|
32
|
+
methodology produces stays usable in full without paying", a metering ban
|
|
33
|
+
follows and can be checked.
|
|
34
|
+
- **The deletion test — the generative rule for every constraint.** Remove the
|
|
35
|
+
rule: is the benefit still reachable? If **yes**, delete the rule — it was
|
|
36
|
+
spending a degree of freedom on nothing. If **no**, keep it, and its sentence
|
|
37
|
+
must name the obstacle it removes. This is also the stop rule: when nothing on
|
|
38
|
+
the table would obstruct the benefit, the Vision needs no new rule.
|
|
39
|
+
- **Constraints accumulate as the work reveals obstacles.** The first draft is the
|
|
40
|
+
benefit plus the few constraints already known — usually almost none, and that
|
|
41
|
+
is correct (`DRAFT` informs, `APPROVED` binds). Each constraint added later
|
|
42
|
+
*sharpens* the Vision without shrinking it more than the obstacle requires.
|
|
43
|
+
- **A constraint never obstructs the Vision.** A proposed rule that conflicts with
|
|
44
|
+
the benefit is not a constraint to negotiate in place — it is a Vision
|
|
45
|
+
**amendment**, and amending is the owner's decision, never a side effect of a
|
|
46
|
+
downstream edit.
|
|
47
|
+
|
|
48
|
+
Extracting the benefit from a discussion is real work: a discourse arrives with
|
|
49
|
+
solutions, preferences and constraints tangled together, and the Vision is the
|
|
50
|
+
distilled benefit only. The elicitation round (`elicitation.md`) asks for it first
|
|
51
|
+
— and a mechanism ("a dashboard") is not an acceptable answer to a benefit
|
|
52
|
+
question ("never lose the thread"); ask again until the answer names what the
|
|
53
|
+
actor obtains.
|
|
54
|
+
|
|
55
|
+
The deletion test decides **which** rules exist. Everything below decides **how**
|
|
56
|
+
to write a rule so it holds once you know it must exist.
|
|
57
|
+
|
|
58
|
+
## 0. The one-line test
|
|
59
|
+
|
|
60
|
+
> Could a reader who has never seen this project rule ACCEPT or REJECT on a
|
|
61
|
+
> proposed change, quoting one line of this document, without asking anyone
|
|
62
|
+
> anything?
|
|
63
|
+
|
|
64
|
+
If a section cannot contribute to that, it is background — keep it if it helps a
|
|
65
|
+
human, but know it carries no gate weight.
|
|
66
|
+
|
|
67
|
+
## 1. The nine properties of a rule that holds
|
|
68
|
+
|
|
69
|
+
Each is stated as a drafting action, with the attack it defeats.
|
|
70
|
+
|
|
71
|
+
1. **Key the rule to a property observable in the artifact — never to intent,
|
|
72
|
+
commitment, plan or purpose.** Test while drafting: *could I verify compliance
|
|
73
|
+
by reading the diff, without asking the author what they meant?*
|
|
74
|
+
→ Defeats: the proposer simply promises the opposite. A rule that forbids
|
|
75
|
+
"committing to track someone's format" is satisfied by saying "we commit to
|
|
76
|
+
nothing"; a rule that forbids "code in this repo that parses a format we do
|
|
77
|
+
not define" is not.
|
|
78
|
+
2. **Write it as one yes/no question with BOTH branches answered.**
|
|
79
|
+
→ Defeats: a gate that can only reject. A prohibition-only Vision rejects the
|
|
80
|
+
work it wants (new client support, packaging, bug fixes) and is abandoned.
|
|
81
|
+
3. **Phrase the question counterfactually about capability, not about the status
|
|
82
|
+
quo** — "could the user obtain this…", not "does the product currently do it".
|
|
83
|
+
→ Defeats: "we never shipped it, so nothing is being taken away."
|
|
84
|
+
4. **Enumerate the near-miss verbs, not just the headline one** — charge / count /
|
|
85
|
+
cap / condition / gate / degrade / delay / require-signup.
|
|
86
|
+
→ Defeats: the soft form. A generous cap, a free-but-registered tier, a
|
|
87
|
+
zero-cost counter — all are the same harm and none is the headline verb.
|
|
88
|
+
5. **Define every term the rule turns on by EFFECT, and close the list.** A
|
|
89
|
+
definition that enumerates mechanisms is a list of the ways you already thought
|
|
90
|
+
of; end it with "…and anything else the user must give, accept or obtain from
|
|
91
|
+
us."
|
|
92
|
+
→ Defeats: the third mechanism. "Charge = payment or account" is walked past by
|
|
93
|
+
"requires opting into telemetry".
|
|
94
|
+
6. **Enumerate the FORMS a violation can take, then state a closure rule** —
|
|
95
|
+
"anything not named here is out unless it is X".
|
|
96
|
+
→ Defeats: the unnamed variant. "A step, a required field, a check, or a cost
|
|
97
|
+
that varies but is never zero" kills "auto-filled, zero human input", because
|
|
98
|
+
the form is still a required field.
|
|
99
|
+
7. **State the subject predicate of any enumerated test in checkable terms.** If
|
|
100
|
+
the test applies to "a record of work", say what makes something one.
|
|
101
|
+
→ Defeats: denying the subject. The proposer agrees with every item on your
|
|
102
|
+
list and asserts the list does not apply.
|
|
103
|
+
8. **Give one IN and one OUT example on the same axis, differing in a single
|
|
104
|
+
variable.** The pair carries the discriminator; without it the reader invents
|
|
105
|
+
one.
|
|
106
|
+
→ Defeats: the borderline case, which is where every real argument happens.
|
|
107
|
+
9. **Name the re-descriptions you expect, inside the rule's own sentence** —
|
|
108
|
+
"in any presentation", "however the code got here", "not by a component that
|
|
109
|
+
does not exist yet", "storing it as Markdown changes nothing".
|
|
110
|
+
→ Defeats: relabeling. A board called a "view" is still a board.
|
|
111
|
+
|
|
112
|
+
## 2. The five clauses a Vision needs around its rules
|
|
113
|
+
|
|
114
|
+
Rules do not hold alone. These structural clauses were the difference between a
|
|
115
|
+
rule that survived and the same rule leaking.
|
|
116
|
+
|
|
117
|
+
- **Supremacy clause** — on any rule a second layer, product, tier or future
|
|
118
|
+
component could route around: *"these bind the product as a whole; shipping a
|
|
119
|
+
forbidden thing in the paid layer does not put it out of reach."*
|
|
120
|
+
- **Exceptions attached to the rule they limit, in the same bullet, phrased
|
|
121
|
+
affirmatively.** An exception in another section is a leak; an exception phrased
|
|
122
|
+
only as a negation produces CANNOT DECIDE. *"This rule does not reach X;
|
|
123
|
+
supporting one more X is squarely wanted."*
|
|
124
|
+
- **Anti-abuse clause on every exemption, naming the only permitted outcomes.**
|
|
125
|
+
A maintenance exemption without one lets any forbidden thing that already
|
|
126
|
+
shipped be maintained forever, and any new one be framed as a fix to it:
|
|
127
|
+
*"work framed as a fix to something that should never have shipped is not
|
|
128
|
+
exempt — it is the removal of that thing, or it is out."*
|
|
129
|
+
- **Stated defaults, per path including the exempt path** — "anything unreached is
|
|
130
|
+
out"; "an exempt fix that preserves a forbidden thing is out". A test that says
|
|
131
|
+
"admitted only if" gives new capability a default; exempt work has none unless
|
|
132
|
+
you write one.
|
|
133
|
+
- **Precedence, when two sentences can both apply.** Two adjacent statements
|
|
134
|
+
pointing opposite ways are decided by whichever the reader reaches first.
|
|
135
|
+
|
|
136
|
+
## 3. Only prohibitions can reject; only positives can admit
|
|
137
|
+
|
|
138
|
+
This is the most common structural failure and it is invisible from the inside.
|
|
139
|
+
|
|
140
|
+
- **A Goal cannot reject anything.** If the admission test says "advances a Goal
|
|
141
|
+
and violates no Non-Goal", then rejection power lives *only* in the Non-Goals.
|
|
142
|
+
A Goal that says "scale cost to risk in both directions" cannot stop cost
|
|
143
|
+
inflation — you need a prohibition for that.
|
|
144
|
+
- **A prohibition scoped to one rung of your own scale protects only that rung.**
|
|
145
|
+
Banning ceremony on trivial edits invites the same ceremony one level up.
|
|
146
|
+
- **A criterion phrased as an already-true state cannot be advanced.** "The check
|
|
147
|
+
is CLEAN at every closure" is a state, so "advances this signal" is meaningless
|
|
148
|
+
and any proposal citing it is undecidable. Give every positive criterion a
|
|
149
|
+
**baseline with headroom**: a current value and date, or an explicit list of
|
|
150
|
+
improvement categories that count.
|
|
151
|
+
- **Give recurring legitimate work an explicit authorization clause**, or it will
|
|
152
|
+
be rejected by your own test: packaging and installation, the product's own
|
|
153
|
+
tests, reducing what the agent must read, supporting one more client. Each needs
|
|
154
|
+
a home in the positive sources — otherwise "moves nothing this document commits
|
|
155
|
+
to" fires on exactly the maintenance the product needs.
|
|
156
|
+
|
|
157
|
+
## 4. Minimum operable sections
|
|
158
|
+
|
|
159
|
+
A Vision is a gate. These are the load-bearing parts; anything else is
|
|
160
|
+
orientation for humans and should be recognized as such.
|
|
161
|
+
|
|
162
|
+
| Section | Must contain | Enables |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| Authority & scope | what it binds (all layers, tiers, future components), that packaging is irrelevant, precedence among its own sections, the approval line | both |
|
|
165
|
+
| Defaults | the default ruling for anything unreached, stated per path | both |
|
|
166
|
+
| Admission test | one sentence naming *exactly which* sections are positive sources and *exactly which* are prohibitions | ACCEPT |
|
|
167
|
+
| Positive sources | Goals / Actor commitments / Success Signals — each with a baseline and headroom, checkable against a named artifact | ACCEPT |
|
|
168
|
+
| Prohibitions | property-based, closed enumerations, named re-descriptions, in/out pairs | REJECT |
|
|
169
|
+
| Invariants | the decision question with both branches answered, plus an anti-laundering clause | both |
|
|
170
|
+
| Exemptions | each with its anti-abuse clause | prevents laundering |
|
|
171
|
+
| Definitions & imported facts | terms defined by effect; **any fact from another document a ruling depends on, restated here** with the reason | standalone use |
|
|
172
|
+
| Pointers | what deliberately lives elsewhere, so an absence reads as intentional | prevents false CANNOT DECIDE |
|
|
173
|
+
|
|
174
|
+
**Imported facts matter more than they look.** If a ruling needs your triage
|
|
175
|
+
levels, your risk tiers or your lifecycle states, restate the boundaries in the
|
|
176
|
+
Vision — routing the reader to another file breaks the cold-read premise the
|
|
177
|
+
whole gate rests on. Keep the procedure elsewhere; bring the boundaries here.
|
|
178
|
+
|
|
179
|
+
**Keep competitive positioning OUT.** A Vision defined by comparison to another
|
|
180
|
+
product rots silently: the comparison target moves and no one edits your document.
|
|
181
|
+
Put it in a dated snapshot elsewhere and point to it.
|
|
182
|
+
|
|
183
|
+
## 5. What no wording can fix — use a mechanism instead
|
|
184
|
+
|
|
185
|
+
Five failure classes are structural. Prose cannot close them; do not try.
|
|
186
|
+
|
|
187
|
+
| Failure | Mechanism |
|
|
188
|
+
|---|---|
|
|
189
|
+
| "Advances a Goal" is a claim about the world, not the text | Measure it: run the ruling battery before and after, admit on measured improvement |
|
|
190
|
+
| **Cumulative ratchet** — each addition defensible, the sum is the ceremony the Vision forbids | A measured budget: steps per level, tokens the agent loads, artifacts per change; add-one-remove-one |
|
|
191
|
+
| Facts the proposal never states ("a quota of *what*?") | A proposal template that demands them, and a stated rule that omission resolves against the proposal |
|
|
192
|
+
| Structural compliance without truth — every rule satisfied, the artifact still wrong | Independent review; a Vision cannot detect this |
|
|
193
|
+
| An accepted change silently falsifying the Vision | Require the amendment in the same change; check cross-document facts mechanically |
|
|
194
|
+
|
|
195
|
+
And the sixth, which is why this file exists:
|
|
196
|
+
|
|
197
|
+
**Adversarial re-description is unbounded.** Every patch names the evasions seen so
|
|
198
|
+
far; a new one always exists. Patch-after-defeat is a treadmill. The only thing
|
|
199
|
+
that converts it into a ratchet is a **standing battery**: keep every attack
|
|
200
|
+
proposal that ever worked as a fixture and re-run the whole set against every
|
|
201
|
+
Vision edit. A Vision without a battery decays the moment someone motivated reads
|
|
202
|
+
it.
|
|
203
|
+
|
|
204
|
+
## 6. The blind check (procedure)
|
|
205
|
+
|
|
206
|
+
Run this **before promoting any Vision to APPROVED, and before any amendment of an
|
|
207
|
+
approved one**. Not for DRAFT edits — promotion is when authority is granted, and
|
|
208
|
+
it is rare, so the cost lands where it buys most.
|
|
209
|
+
|
|
210
|
+
1. **Give the reviewer the document text and nothing else.** Not a path — the
|
|
211
|
+
text, pasted. Forbid opening files, searching, and web access explicitly. A
|
|
212
|
+
term the reviewer cannot resolve is then a property of the document, not of
|
|
213
|
+
their tooling.
|
|
214
|
+
2. **Fresh context, and a different model from the author where the client allows
|
|
215
|
+
it.** Author self-review is structurally blind to its own omissions.
|
|
216
|
+
3. **Hand them a battery, not an open question.** Concrete proposals to rule on:
|
|
217
|
+
- the standing fixtures (every attack that ever worked — see §5);
|
|
218
|
+
- **reject-side** proposals aimed at each prohibition;
|
|
219
|
+
- **accept-side** proposals the document plainly wants (a bug fix, packaging
|
|
220
|
+
work, supporting one more client, a documentation improvement). *A gate that
|
|
221
|
+
can only reject is half a gate, and the accept side is where most Visions
|
|
222
|
+
fail without anyone noticing.*
|
|
223
|
+
4. **Ask for the mechanism, not just the verdict.** For each ruling: the exact
|
|
224
|
+
quoted line, or precisely what the document fails to say. Then: *which rules
|
|
225
|
+
could you not get around, and what structural property defeated you?* That
|
|
226
|
+
answer is worth more than the findings.
|
|
227
|
+
5. **Ask for rewords.** "Slip a bad proposal past this document, including one
|
|
228
|
+
dressed in its own approving vocabulary." A rule nobody can reword is done; a
|
|
229
|
+
rule that falls to the first attempt was never a rule.
|
|
230
|
+
6. **Every finding is answered — fixed, or refused with reasoning** (`review.md`
|
|
231
|
+
§Receiving). Add every successful reword to the standing battery, whether or
|
|
232
|
+
not you fix it this round.
|
|
233
|
+
|
|
234
|
+
Three lenses are worth running for a product-level Vision: **comprehension** (what
|
|
235
|
+
is this, what could you not resolve), **gate operability** (the battery above),
|
|
236
|
+
**durability** (what rots, what is unfalsifiable, what is a time bomb). For a
|
|
237
|
+
feature-level Vision or an M-VISION, the gate lens alone is usually enough.
|
|
238
|
+
|
|
239
|
+
## 7. Cost, honestly
|
|
240
|
+
|
|
241
|
+
A first draft written against §1–§4 will still have findings — the checklist
|
|
242
|
+
removes the structural classes, not judgement errors. Expect one blind round to
|
|
243
|
+
find real things and a second to confirm. What it should NOT take is five rounds
|
|
244
|
+
of discovering the same class of defect in a new disguise; that is the specific
|
|
245
|
+
waste this file exists to prevent.
|