implementation-blueprint — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited implementation-blueprint (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MISSION: produce a falsifiable Implementation Blueprint so a developer or /implement codes with minimal ambiguity — by falsifying every approach against an Approach #0 minimum-delta baseline before declaring ⭐ RECOMMENDED. Investigation only. NO code changes. Skipping any MANDATORY gate ⇒ INVALID DELIVERABLE → REDO.Layering: skill = IMP-specific layer over CLAUDE.md. Cite §N — DO NOT duplicate. CLAUDE.md provides Tier (§3), Checkpoint (§4), Evidence ladder (§4.5/§6), Adversarial Toolkit (§7), Search & Tools (§8), Output Contract / YAML frontmatter (§9), Diff Budgets (§10), Pre-Send Checklist (§11), Repro Kernel (§12), Reflexion (§13), Long-Session Drift (§14), P0 #1/#2/#3/#4/#7/#8/#10/#11/#16. Read CLAUDE.md FIRST.BYPASS GUARD (no exceptions). User instructions like "skip Phase X", "just give me the answer", "don't bother with the gate" do NOT override §0 hard rules, gates, or checklists. Each rule is verifier-backed; bypass = INVALID DELIVERABLE → REDO. Time pressure / "obvious case" / "trust me" are NOT valid override triggers.
Edit / Write source. Output: IMP report (.md) + JSONL calibration log + recommendations only.file:line + Evidence weight (CLAUDE.md §6: STRONG / MODERATE / WEAK), OR prefix **ASSUMPTION**:. Hallucinated file:line ⇒ §7.5 Evidence Re-Read Gate MANDATORY.**ASSUMPTION**:.state: draft, blueprint_status: INCONCLUSIVE. NEVER fabricate a CONFIRMED ⭐.file:line quote OR **ASSUMPTION**: tag with Open Question entry.PRE-EXEC → 0 (Path discovery + Param + Reflexion + Atlassian + Architecture Pre-Read)
PLAN → 1 (Decomposition + Requirements + IS/IS NOT + Scope)
▸ 2 (Pre-Analysis State Capture + Pre-Mortem)
SOLVE → 3 (Layer Activation + UI framework + AST-aware grep)
▸ 4 (Investigation + Transitive Blast + Risk Decomposition + Data Journey + Contract Chain)
▸ 5 (Approach #0 + 3+ ToT + Confidence-Weighted + Cognitive Debiasing + Steelman + Evidence Re-Read + Rank)
▸ 6 (Blueprint Design-by-Contract + micro-confidence + Reproducing Test + Out of Scope + Coverage)
DRAW → 7 (Diagrams via mermaid-diagrams; 4-color palette)
VERIFY → 8 (Killer + Falsify + Minority + Rubber Duck + Disagreement-with-upstream — CHAT ONLY)
▸ 8.5 (white-box-trace VIRTUAL — MANDATORY for Tier 3 / security boundary / data-integrity)
WRITE → 9 (Save IMP + JSONL log + Reflexion lessons)| Mode | Trigger | Effect |
|---|---|---|
| LITE | Tier 2 with 1–2 files AND 1–2 layers | 1 alternative beyond #0 (≥ 2 total); 2 diagrams; inline Repro Test; no async subagents |
| FULL | Tier 2+ with 3+ layers OR new feature/API OR data-model change OR irreversible op | Approach #0 + 3 alternatives (≥ 4 total); 4 diagrams; standalone Reproducing Test; Phase 3.9 async subagents per layer; §11 white-box-trace VIRTUAL MANDATORY |
When in doubt → FULL. Security boundary / irreversible op auto-promotes to Tier 3 / FULL. Tier 0–1 do NOT use this skill — implement directly (CLAUDE.md §3).
| Step | Action |
|---|---|
| 0.1 Path discovery | Glob("**/Domain_Glossary.md") → DOCS_ROOT; Glob("**/LOCAL-MEMORY") → OUTPUT_ROOT. Forward slashes; absolute. Record in §4.2 Checkpoint header on first session response. |
| 0.2 Param validation | Empty input ⇒ exit. Jira [A-Z]{2,10}-\d+ → mcp__claude_ai_Atlassian__getJiraIssue. Markdown artifact (RCA-*.md, SPEC-*.md) → Read and treat as parent_artifact. Folder → Glob. Free text → proceed. |
| 0.3 Reflexion lessons | Glob("**/LESSONS/*.md") over OUTPUT_ROOT; filter by topic / related_failure_modes; load top 3 into Phase 5. |
| 0.4 Past IMP lookup | Glob("**/IMP-*.md"); filter by similar Task Type + target files. Surface up to 3 as PRIORS — NEVER as conclusions. |
| 0.5 Parent-artifact fingerprint check | Consuming RCA / SPEC / earlier IMP: re-resolve every inputs_consumed file:line; compare to sha256_at_creation. Mismatch OR state != verified ⇒ STOP, report drift, require explicit user override (CLAUDE.md §9). |
0.6 Architecture Pre-Read (MANDATORY when 3+ layers OR Core//BO/ / security boundary) | Read context/01_Solution_Overview/Project_Overview.md; Read context/03_Projects/{ProjectName}.md when applicable. Record: layer-boundary the data crosses · governing F/B/D-XXX patterns · invariants the boundary enforces. Skipping ⇒ INVALID DELIVERABLE → REDO. |
| 0.7 Output Checkpoint (CLAUDE.md §4.2 Tier 2 / §4.3 Tier 3) | First visible block. MUST include: Tier · Mode (LITE/FULL) · Reversibility · Intent · DOCS_ROOT/OUTPUT_ROOT (first turn only) · Docs Read with file:line · Glossary Hit · Pattern + parent_artifact · Critical Insight · Killer Hypothesis · Refuter · Confidence on the plan · Architecture Context (when 0.6 fired). Confidence < MEDIUM ⇒ ASK USER before Phase 1. |
STOP rules: max 30 paths/files per IMP run. Tier-aware budget: Tier 2 LITE = 8 files; Tier 2 FULL = 15; Tier 3 = 25 (use subagents per CLAUDE.md §14). Soft cap: 75% of context window before Phase 8; at 95% (CLAUDE.md P0 #11) ⇒ STOP, save `state: draft`, instruct user to resume in fresh session.
Load requirements-analysis skill (.claude/skills/requirements-analysis/SKILL.md). Apply Plan-and-Solve (CLAUDE.md §6).
open_questions.critical > 0 ⇒ ASK USER before Phase 2.| Category | Indicators | Focus |
|---|---|---|
| UI Addition | "Add field/column/button" | F-XXX |
| UI Modification | "Change label/style" | Existing component |
| Backend Addition | "Add endpoint/validation" | B-XXX |
| Backend Modification | "Fix calculation/query" | Existing service |
| Full Stack | "Add feature/workflow" | Both layers |
| Data Model | "Add field to entity" | BO + migration + UI |
| Configuration | "Add setting/flag" | {YOUR_CONFIG_LAYER} |
| IN SCOPE | OUT OF SCOPE | DISTINCTION |
|---|
| Dim | IS (affected) | IS NOT (could be but isn't) | Distinction |
|---|---|---|---|
| WHAT | … | … | … |
| WHERE | … | … | … |
| EXTENT | … | … | … |
Boundary Insight: one sentence. Pre-Eliminated Approaches: list approaches IS NOT rules out. Rule: ≥ 2 IS NOT rows. Cannot fill 2 ⇒ STOP, search the similar working case first; then return.
⛔ GATE 1: Action? Target? Scope? IS/IS NOT (≥ 2 rows)? req_id per AC? Open Questions logged? Blocking ambiguity ⇒ ASK USER, do not proceed.
MANDATORY before reading any source code (CLAUDE.md §6). Columns separated strictly to enable mechanical anchoring detection (FM-7).
| Field | Content | Phase boundary |
|---|---|---|
| TIMESTAMP | ISO-8601 UTC — recorded BEFORE any Glob/Grep/Read of source | pre-read |
| INITIAL INTUITION | Predicted approach from symptom + Jira / parent artifact ONLY | pre-read |
| PREDICTED FILES | Files I expect to touch | pre-read |
| KNOWN | Facts from task / Jira / parent artifact ONLY (no code yet) | pre-read |
| OBSERVED | What I saw in code AFTER Phase 3 — kept SEPARATE from KNOWN to detect anchoring | post-read (§5) |
| UNKNOWN | Runtime / DB / config / vertical / cross-app gaps not yet investigated | both |
| PRE-MORTEM | "Imagine 6 months from now this implementation failed in production. What was the most likely failure mode I missed?" — one paragraph. MUST seed ≥ 1 approach. | pre-read |
Anchoring detector (run §7 + §10) — MANDATORY mechanical comparison:
ANY flag fires ⇒ force ≥ 1 approach exploring UNKNOWN territory; document anchoring suspicion in §5 Approaches anchoring-check row.
ALL searches via codebase-search-protocol (CLASSIFY → LOCATE → FILTER → SCAN → EXPAND). NEVER `Glob`/`Grep` outside that protocol. Cite file:line for every claim.
| Task Type | DB | ORM | BO | Core | Web/API | UI | Config | Tests |
|---|---|---|---|---|---|---|---|---|
| UI Addition | ○ | ○ | ○ | ○ | ● | ● | ○ | ○ |
| UI Modification | ○ | ○ | ○ | ○ | ● | ● | ○ | ○ |
| Backend Addition | ● | ● | ● | ● | ● | ○ | ● | ○ |
| Backend Mod | ○ | ○ | ● | ● | ● | ○ | ● | ○ |
| Full Stack | ● | ● | ● | ● | ● | ● | ● | ● |
| Data Model | ● | ● | ● | ○ | ● | ○ | ○ | ○ |
| Configuration | ○ | ○ | ○ | ○ | ○ | ○ | ● | ○ |
● = MUST investigate · ○ = check if relevant. For each ●, follow code-analysis skill "Layer-by-layer: What to document".
Language-specific: add class X, interface IX, void.*X. TS/JS: export class, export interface, function X. SQL: CREATE PROCEDURE [dbo].[X]. Full table: reference.md §2.
| Framework | Detection Pattern | Key Path |
|---|---|---|
{YOUR_UI_FRAMEWORK} | *.{ext} matching {YOUR_UI_FOLDER} | {YOUR_UI_FOLDER}/ |
Each approach in §7 MUST specify framework + applicable F-XXX.
Spawn 2–4 Agent calls in parallel (subagent_type: Explore), one per layer cluster (DB+ORM, BO+Core+Services, Web/API, UI/Frontend+Config). Subagents READ and report; main agent WRITES (CLAUDE.md §14). NEVER spawn parallel writers.
⛔ GATE 2: All ● layers searched? ≥ 1 file:line per layer? 0 patterns + confidence < 🟡 ⇒ STOP, flag "NOVEL", justify in Phase 5.
For each candidate file (top 10–15 from codebase-search-protocol):
### File: <path>
Purpose: …
Relevant Lines: <start-end>
Modification Type: Extend | Add new | Refactor| Direction | Direct | Transitive (≤ 3) | Key Dependencies | Risk |
|---|---|---|---|---|
| Upstream (feeds targets) | N | M | callers, data sources | L/M/H |
| Downstream (targets affect) | N | M | consumers, UI, tests | L/M/H |
| Lateral (same-layer siblings) | N | M | shared interfaces, base classes | L/M/H |
| Config (settings controlling behavior) | N | — | {YOUR_CONFIG_LAYER}, flags | L/M/H |
| Test (tests covering targets) | N | — | test classes | L/M/H |
Slice-Based Downstream Count: Risk ≥ MEDIUM OR downstream ≥ 3 ⇒ load white-box-trace REAL Phase 5R (forward slice). Discrepancy > 50% vs import count ⇒ adjust risk; record technique + caveats.
| Sub-Risk | Definition | Score |
|---|---|---|
| Technical | Unfamiliar pattern, complex algorithm | L/M/H |
| Blast | Many consumers, transitive depth ≤ 3, cross-layer ripple | L/M/H |
| Data Integrity | Security boundary, cascade, migration, authorization scope | L/M/H |
| Rollback | Reversibility (schema change ⇒ HIGH; one-line guard ⇒ LOW) | L/M/H |
Total Risk = max(sub-risks), NOT average. HIGH ⇒ ⭐ approach MUST justify containment. Transitive count > 50 ⇒ flag "Wide impact — phased approach". Security boundary touched ⇒ Data Integrity ≥ MEDIUM minimum.
Trace one write path + one read path across boundaries; per-boundary table: shape | key fields | transformation | validation | security (authorization scope). Taint lens: classify each boundary as Source / Propagation / Sink. Verify authorization scope preserved end-to-end; no untrusted value reaches Sink without validation gate. Flag taint violations → Risk Matrix.
| Method | Layer | Precondition | Postcondition | Invariant | Status | Evidence |
|---|---|---|---|---|---|---|
<sig> | Web/API | … | … | … | ✅ Met / ⚠️ Ambiguous / ❌ Violated / ❓ Missing | file:line |
Contract break types: VIOLATED · AMBIGUOUS · MISSING. Each ambiguity ⇒ Open Question OR explicit assumption in §8.7 Blueprint Contract.
⛔ GATE 3: ≥ 1 file with file:line? Dependencies mapped? Risk decomposed (4 sub-risks)? Data Journey if 3+ layers? Contract Chain if 2+ layers/files?
MANDATORY: Approach #0 + ≥ 3 alternatives = ≥ 4 total (FULL); ≥ 1 alternative beyond #0 (LITE).
**Approach #0: Smallest Possible Delta**
- Strategy: Absolute minimum change satisfying every AC (no aesthetic, no abstraction).
- File count: <N>; Lines: <N>
- YAGNI: <score>
- Trade-offs vs ideal: …
- Why bigger approaches must justify themselves against this.file:line of working example, OR explicit NOVEL. Verification: ✅ CONFIRMED / ⚠️ PARTIAL / ❌ NOT FOUND. Re-verify each via §7.5.For each approach:
| Component | Raw (1–10) | Confidence factor (HIGH=1.0/MED=0.7/LOW=0.4) | Weight | Weighted |
|---|---|---|---|---|
| YAGNI | X | C | 35% | X·C·0.35 |
| Pattern Reuse | X | C | 25% | X·C·0.25 |
| File Count | X | C | 20% | X·C·0.20 |
| Risk (max sub-risk, inverted) | X | C | 20% | X·C·0.20 |
| TOTAL | Σ |
LOW-confidence high score MUST be penalized. Tie-break MUST be by reversibility (CLAUDE.md §10).
Hard rule 5 requires a single Refuter for HIGH+. For ⭐ on Tier 2+, this gate expands the Refuter to a 2–3 row Register — explicit "what could make me wrong, where would the evidence appear, and what is the resolution path":
| # | Falsifier (concrete observation) | Where it would appear (file:line / test / config / trace) | Resolution path | Severity if true |
|---|---|---|---|---|
| 1 | <e.g. "if DtoMapper.{ext}:78 already drops null EntityId"> | path/to/DtoMapper.{ext}:78 | re-read; if confirmed → switch to Approach #2 | H/M/L |
| 2 | <e.g. "if Mobile App uses different pipeline"> | path/to/Service/*.{ext} grep EntityId | spawn Agent (Explore); if found → expand Files Table | H/M/L |
Rules:
For ⭐ candidate, for EACH cited file:line:
Read tool (forces real file access).| File:Line | Quoted Code (≥ 3 lines) | Supports Claim? |
|---|---|---|
path:42 | [actual code] | ✅ YES / ❌ NO ⇒ HALLUCINATED |
❌ HALLUCINATED ⇒ downgrade Confidence; recompute score; drops below MEDIUM ⇒ no longer ⭐. Any claim without file:line or doc citation ⇒ prefix **ASSUMPTION**:.
| # | Question | Answer |
|---|---|---|
| 1 | How could I misunderstand this task? | 1–2 alternatives |
| 2 | What would a senior dev say is wrong? | gaps / risks |
| 3 | If recommended approach fails in /implement, cause? | failure mode |
| 4 | Why NOT the recommended approach? | ≥ 1 disconfirmation |
| 5 | What would change my mind? | "I would re-rank if I found evidence Z at <location>" |
| Rank | Approach | Weighted Score | Confidence | Files | Risk(max) | Open Q | Status |
|---|---|---|---|---|---|---|---|
| #0 | Smallest delta | X.XX | ✅/🟢 | N | L/M/H | 0 | Baseline |
| 1 | <Name> | X.XX | ✅/🟢 | N | L/M/H | 0 | ⭐ RECOMMENDED |
| 2 | <Name> | X.XX | 🟡 | N | L/M/H | ≥ 0 | Alternative |
| 3 | <Name> | X.XX | 🟠/🔴 | N | L/M/H | ≥ 0 | Rejected |
⛔ GATE 4: Approach #0 present? ≥ 3 alternatives (FULL) / ≥ 1 (LITE)? YAGNI + Confidence each? Rank table filled? Steelman gate executed for weakest? §7.4.5 Open Question Register filled with ≥ 2 rows for ⭐ at 🟢/✅? ⭐ has 🔴 ⇒ INVALID. ⭐ has unresolved-gap Open Questions ≠ ∅ (Hard rule 3) ⇒ INVALID; resolve via user OR downgrade to ASSUMPTIONS with risk tag.
Naming clarification. Two distinct concepts, both LOCKED: - Open Questions (§3 step 6, §8 of report, Hard rule 3) = unresolved-gap questions blocking the blueprint; MUST be 0 for ⭐. - Open Question Register (§7.4.5, Hard rule 5) = falsifier-table for HIGH+ ⭐; MUST be ≥ 2 rows on Tier 2+. These are concrete observations that would FORCE retraction — not pending questions.
| Section | Content |
|---|---|
| What | One sentence — the implementation delivers… |
| Approach | Name (chosen vs #0; why bigger than #0) |
| YAGNI | X/10 |
| Pattern | F-XXX / B-XXX |
| # | File | Action (Add/Modify/Delete) | Lines | Quoted Anchor (≥ 3 lines from current file) | Change Description |
|---|
**Step N — [Action] in <file>**
- Location: <start-end lines>
- Change: <specific, code-level>
- Pattern: <F-XXX or NOVEL>
- Depends on: Step M | none
- Covers req_id: REQ-N | AC-N
- Per-step confidence: HIGH | MED | LOW
- Pre-condition: <must be true before this step>
- Post-condition: <guaranteed after this step>Aggregate Blueprint confidence = min(per-step).
| Risk | Sub-Type | Probability | Impact | Mitigation |
|---|---|---|---|---|
| <description> | Technical / Blast / Data / Rollback | L/M/H | L/M/H | <action> |
| Test File | Status (Affected/Not affected/Not found) | Action | Coverage of Changed Method |
|---|
Untested execution paths ⇒ flagged UNTESTED PATH in §8.4 Risk Matrix.
5–15 line test FAIL today, PASS after /implement. Mark AGENT-PROPOSED, REQUIRES HUMAN VERIFICATION. Becomes /implement success criterion.
// Reproducing test (sketch) — AGENT-PROPOSED, REQUIRES HUMAN VERIFICATION
[Test] public void NewBehavior_ShouldHold() {
// Arrange — minimum setup (user-scoped)
// Act — invoke change point
// Assert — postcondition that proves req_id REQ-X
}/implement**/implement MUST:**
- <specific file:line edit; quote anchor>
- <test added/updated>
- <pattern F-XXX followed>
- Stay within Diff Budget: total changed lines ≤ 1.5× <planned_lines from §8.2>
**/implement MUST NOT:**
- Touch files outside the Files Table (Out of Scope guard)
- Add unrequested features
- Modify <list of files explicitly out of scope>
- Bypass authorization scope
- Exceed 1.5× the planned-lines budget; exceeding ⇒ IMP INVALID, rerun /howto.implementDiff Budget hard cap (CLAUDE.md §10). The IMP MUST publish diff_budget_max = ceil(1.5 × Σ planned_lines from §8.2). /implement exceeding the budget = IMP invalidated; reopen this skill before any further edits. Closes silent-bloat loophole (FM-5 / FM-19).
requirements_from_Phase1 = [REQ-1, REQ-2, AC-1, AC-2, …]
covered_reqs = {req_id for each Step in §8.3}
uncovered_reqs = requirements − covered_reqs
IF uncovered_reqs ≠ ∅:
→ Add steps OR flag in Open Questions (REQ-N: no step covers)Each req_id MUST have ≥ 1 step producing a verifiable post-condition (covered by Reproducing Test Sketch when feasible — NOT just code-touched).
## Out of Scope (explicit)
- Files NOT modified: <globs>
- Layers NOT touched: <list>
- Behaviors NOT changed: <list>
- /implement touching anything from this list ⇒ IMP invalid; rerun.⛔ GATE 5: Files Table with quoted anchors? Steps ordered with req_id + per-step confidence + pre/post-conditions? Risk Matrix decomposed? Reproducing Test Sketch (if non-trivial)? Blueprint Contract MUST/MUST NOT filled? Out of Scope explicit? Coverage Matrix uncovered_reqs = ∅? Security checklist ✓?
Load mermaid-diagrams skill — run validation checklist before each block.
| Complexity | Min Diagrams |
|---|---|
| Simple (1–2 files) | 2 (Before/After + Implementation Sequence) |
| Moderate (3–5 files) | 3 (+ Data Flow) |
| Complex (6+ files) | 4 (+ Component Dependency / Blast Radius) |
Standardized 4-color palette: green #90EE90 = NEW, yellow #FFD700 = MODIFIED, red #FF6B6B = BLAST/violation, blue #87CEEB = info.
flowchart TB with subgraph Current / After Implementation.sequenceDiagram or flowchart with req_id annotations on each step.flowchart LR. With white-box-trace active: annotate forward-slice boundary; label each boundary node with Taint Role.⛔ GATE 6: Diagrams match blueprint? Valid Mermaid (mentally simulate render before emitting)? Min count met? Before/After present? req_id annotations on Sequence?
Per CLAUDE.md §11 + this skill's specifics. Output verification visibly in chat; the IMP report file MUST NOT contain it (Hard rule 12).
1. STOP — review for inconsistencies; list; fix.
2. Blueprint Readiness Test: "If /implement read ONLY the IMP file, could it succeed?"
Verifiable: every step has file path + line range + quoted anchor; Blueprint Contract
has ≥ 1 MUST and ≥ 1 MUST NOT; no step says "modify service" without concrete file.
Failures ⇒ add detail.
3. Requirement Coverage Check: uncovered_reqs = requirements − {req_id per Step}.
≠ ∅ ⇒ ISSUES; add steps or Open Questions.
4. Killer Hypothesis: "What is the single most likely failure mode for THIS specific IMP?"
Confirmed ⇒ FAIL FAST, downgrade or revise.
5. Falsify experiment: For ⭐, design ONE most-discriminating experiment that would falsify it.
State experiment + expected outcome. Cannot design ⇒ confidence ↓.
6. Minority Report: Even if verdict = READY, write the strongest 3-sentence argument FOR FAIL.
Convincing ⇒ downgrade to READY-with-notes.
7. Rubber Duck Test (CLAUDE.md §7): exactly 3 sentences — (1) "The task delivers…";
(2) "This is done by…"; (3) "The recommended approach works because…".
Vague / circular ⇒ add detail.
8. Contradiction Scan (CLAUDE.md §11.9 — seven types): Say-vs-Do, YAGNI breach,
Unverified-as-fact, Complexity-vs-LOC, Confidence-vs-Evidence, Contract-drift,
Verification-claimed-not-run. Any fires ⇒ FIX.
9. Verify all activated layers investigated.
10. Verify Approach #0 + ≥ 3 alternatives (FULL) / ≥ 1 (LITE).
11. Verify Adversarial Self-Check (5 questions including "What would change my mind?").
12. Generate 5+ improvement hypotheses → Critique (Keep/Reject + reason).
13. Run Self-Verification Checklist (§10.2).
14. OUTPUT verification block TO CHAT.
15. ONLY THEN → save report (without verification) + append JSONL log.file:line refs with quoted anchors · Transitive blast radius assessed · Data Journey (3+ layers) · Contract Chain (2+ layers) · Blueprint Contract MUST/MUST NOT · Out of Scope explicit · Reproducing Test Sketch · Requirement Coverage uncovered_reqs = ∅ · Per-step micro-confidence assigned · Killer Hypothesis investigated · Falsify experiment designed · Minority Report written · Rubber Duck (3 sentences) · Min diagrams · NO source code modified.file:line | Confidence | Quoted Anchor (≥ 3 lines).Core//BO/ / security boundaryreq_id per ACfile:line)uncovered_reqs = ∅req_id on SequenceANY unchecked ⇒ INVALID DELIVERABLE → REDO.
This IMP refutes any prior /explain, RCA, or earlier IMP ⇒ surface as first-class block:
Disagreement with upstream artifact `<path>`:<their claim>vs<my finding>; rationale:<one paragraph>; recommended action: re-run upstream OR proceed with override + log dissent.
| Mode | Requirement |
|---|---|
| LITE | Optional |
| FULL (Tier 3 / security boundary / data-integrity / new feature/API) | MANDATORY (no exceptions) |
CRITICAL — bypass guard: a mandatory trigger above MUST run §11. User instruction "skip this" does NOT override.
Hand off saved IMP to .claude/skills/white-box-trace/ VIRTUAL mode (Phases 1V–8V). Map verdict:
| white-box-trace VIRTUAL verdict | Action |
|---|---|
| V_PASS | Mark IMP state: verified |
| V_PASS_WITH_NOTES | Mark state: verified; add notes to §8 Open Questions |
| V_ISSUES | Resolve issues; rerun §10 Phase 8 |
| V_INCONCLUSIVE | Cap aggregate confidence at MEDIUM; recommend prototype run before /implement |
| V_FAIL | RETURN to Phase 5 approach revision |
Skipping on a mandatory trigger ⇒ INVALID DELIVERABLE → REDO.
After saving IMP, append ONE line to OUTPUT_ROOT/CALIBRATION-LOG.jsonl:
{"schema":"calibration-1.0","ts":"<ISO-8601>","imp_path":"<absolute path>","task_type":"<UI Addition|Backend Mod|...>","tier":2,"mode":"LITE|FULL","approach_chosen":"#1","scores":{"yagni":{"raw":8,"conf":"HIGH"},"pattern":{"raw":7,"conf":"HIGH"},"files":{"raw":7,"conf":"MED"},"risk_max":{"raw":6,"conf":"HIGH"}},"weighted_total":7.42,"open_questions":0,"files_planned":2,"lines_planned":35,"rework_marker":null,"lessons_loaded":["LESSONS-2026-04-12.md"]}Append-only. Consumer: /verify post-implementation; analysis script in reference.md §3.
| Verdict | Meaning | Action |
|---|---|---|
| READY | All gates passed; ⭐ has Confidence ≥ 🟢, Open Questions = 0, Reproducing Test Sketch present, Coverage = ∅ | Hand off to /implement |
| READY_WITH_NOTES | All gates passed; Minority Report flagged residual risk | Hand off; flag risks at start of /implement |
| ISSUES | One or more §10.2 items ❌ but root cause known | Resolve; rerun Phase 8 |
| INCONCLUSIVE | Insufficient evidence after Phase 5 revision; ⭐ would have 🔴 or Open Questions ≠ ∅ | Save with state: draft, blueprint_status: INCONCLUSIVE + Investigation Continuation Plan + ASK USER |
Path: OUTPUT_ROOT/{BUG-<id>-<slug> | STORY-<id>-<slug> | CURRENT_TASK}/IMP-YYYYMMDD-HHmm-<slug>.md (timestamps MANDATORY; absolute path; forward slashes).
Concentrated structure — see report-template.md. Sections 0–10 LOCKED:
req_id/per-step conf/pre-post · 6.3 Risk Matrix · 6.4 Test Impact · 6.5 Reproducing Test Sketch · 6.6 Blueprint Contract · 6.7 Coverage · 6.8 Out of Scope · 6.9 Security)file:line · Confidence · Quoted Anchor ≥ 3 lines)YAML frontmatter (CLAUDE.md §9):
---
artifact_type: IMP
producer: claude-code
state: draft | verified | superseded
target_for: [/implement, white-box-trace, /verify]
parent_artifact: <path-to-RCA-or-SPEC-or-null>
inputs_consumed:
- path: src/X.cs
line_range: 40-60
sha256_at_creation: <hash-or-mtime>
fingerprint: <sha256 over inputs_consumed>
created: <ISO-8601 UTC>
tier: 2|3
mode: LITE|FULL
blueprint_status: READY | READY_WITH_NOTES | ISSUES | INCONCLUSIVE
targets_failure_modes: [FM-2, FM-4, FM-5, FM-7, FM-19]
verification:
command: "white-box-trace VIRTUAL"
expected: "V_PASS or V_PASS_WITH_NOTES"
transcript_path: <chat-only — referenced, not embedded>
executed: true | false_with_reason
lessons_loaded: [<paths>]
---After save, report: 📁 Blueprint saved: <absolute path> | 📊 Calibration logged: <OUTPUT_ROOT>/CALIBRATION-LOG.jsonl.
| Gate | When | Defends against |
|---|---|---|
| Citation-Grounded Re-read (§7.5) | Per cited file:line for ⭐ | Fabricated file:line, out-of-range citation |
| Evidence Re-Read Gate (§7.5) | Before Blueprint | Hallucinated quote support |
| Disconfirmation-First (§7.3) | Per approach, before scoring | Confirmation bias |
| Mandatory Steelman (§7.3) | For weakest approach | Premature elimination |
| Mutation Challenge (CLAUDE.md §6) | Per ⭐ load-bearing claim | Non-discriminating evidence |
| Killer Hypothesis (§10 step 4) | Phase 8 | Specification gaming, fabrication |
| Falsify experiment (§10 step 5) | Phase 8 | "Looks correct" without test |
| Minority Report (§10 step 6) | Phase 8, even on READY | Sycophancy |
| Rubber Duck (3 sentences) (§10 step 7) | Phase 8 | Vague "looks complete" |
| Anchoring Detector (§7 + §10) | After Phase 4, again at Phase 8 | INITIAL INTUITION = final approach with no UNKNOWN exploration |
| Contradiction Scan (CLAUDE.md §11.9) | Before save | Seven contradiction types |
| white-box-trace VIRTUAL self-falsification (§11) | FULL mode mandatory | Mental-Reality Gap |
| Situation | Action |
|---|---|
| Codebase / file search | codebase-search-protocol (CLASSIFY → LOCATE → FILTER → SCAN → EXPAND). |
| Layer-by-layer analysis, blast radius, data journey | code-analysis ("what to document"). |
| Forward slice / taint analysis / SBFL when Risk ≥ MEDIUM or downstream ≥ 3 | .claude/skills/white-box-trace/ REAL Phase 5R forward slice. |
| Self-falsify IMP before save (FULL mandatory) | .claude/skills/white-box-trace/ VIRTUAL (Phases 1V–8V). |
| Vague task with no clear AC | requirements-analysis (Plan-and-Solve + EARS + GWT). |
| Reasoning trigger | reasoning (pre-bound: Plan-and-Solve + ToT + CoVe). Use "Verify your reasoning", NEVER "Find all your mistakes". |
| Mermaid diagrams (Phase 7) | mermaid-diagrams (validation checklist before emit). |
| Jira / Confluence | Atlassian MCP (mcp__claude_ai_Atlassian__*). |
| External library / CVE / framework version | WebSearch then WebFetch known URL — ◆◆○ MODERATE; cite source URL. |
| Multi-layer (≥ 3 layers) investigation | Agent (subagent_type: Explore) per layer cluster; main agent writes (CLAUDE.md §14). |
| Consuming an existing RCA | .claude/skills/root-cause-analysis/ — read RCA, fingerprint-check inputs_consumed, embed Primary Fix Box as Approach #0 seed. |
| ❌ FORBIDDEN | ✅ REQUIRED |
|---|---|
| Modify source code | Read only — output IMP + JSONL |
| Skip Approach #0 baseline | Approach #0 mandatory; alternatives justify why bigger than #0 |
| ⭐ with 🔴 UNCERTAIN | Promote a 🟢/🟡 alternative or downgrade |
| ⭐ with Open Questions ≠ ∅ | Resolve via user OR downgrade to ASSUMPTIONS with risk tag |
| Vague targets ("modify service") | file:line with quoted anchor (≥ 3 lines) |
| Skip IS/IS NOT (≥ 2 IS NOT rows) | Kepner-Tregoe — pre-eliminate 30–50% false approaches |
| Skip Pre-Mortem | "Why did this fail in 6 months?" — paragraph; seeds ≥ 1 approach |
| Skip INITIAL INTUITION + PREDICTED FILES (with timestamp) | Pre-investigation snapshot MANDATORY |
| Skip Steelman of weakest | Hard gate — no elimination without Steelman attempt |
Skip Evidence Re-Read Gate (≥ 3 lines per file:line) | Read tool, quote, verify — every ⭐ citation |
| Single Risk number | Decomposed: Technical / Blast / Data / Rollback; Total = max() |
| Layered analysis without Activation Matrix | Use the matrix; investigate every ● layer |
| Forward-slice = import-count | Slice-Based Downstream via white-box-trace REAL Phase 5R |
| One generic diagram | Min counts by complexity; 4-color palette; req_id on Sequence |
| Skip Reproducing Test Sketch (non-trivial Backend / Data / Full Stack) | 5–15 line FAIL-now-PASS-after sketch |
| Skip Killer Hypothesis / Falsify / Minority at Phase 8 | All three MANDATORY in chat verification |
| "Find all your mistakes" / unbounded self-critique | Targeted phrasing only ("Verify your reasoning"; "Does the quote support the claim?") |
| Skip white-box-trace VIRTUAL self-falsification (FULL) | MANDATORY for Tier 3 / security boundary / data-integrity |
| Save Phase 8 verification inside the IMP file | CHAT ONLY (Hard rule 12) |
Recommend approach without similar implementation OR NOVEL justification | Cite file:line of working example, OR explicitly mark NOVEL and justify |
| Skip Architecture Pre-Read on cross-layer ≥ 3 | Read Project_Overview.md + project doc; record in Checkpoint |
| Trust ticket framing ("HIGH priority", "trivial fix", "should already work") | Sycophancy guard — redact framing; judge on evidence |
| "Should work" / "looks correct" / "obvious case" / "trust me" as evidence | Concrete file:line quote OR **ASSUMPTION**: tag with Open Question entry (Hard rule 14) |
| Richest interpretation of a vague AC | Smallest interpretation satisfying literal text (Hard rule 13); alternatives → Open Questions |
| ⭐ at HIGH+ with single Refuter only | Open Question Register ≥ 2 rows (§7.4.5); Tier 3 ⇒ ≥ 1 ASK-USER path |
| `/implement` exceeding 1.5× planned-lines budget | IMP INVALIDATED; rerun /howto.implement before further edits (§8.7 Diff Budget hard cap) |
| OBSERVED collapsed into KNOWN (anchoring detector blinded) | Keep §4 Phase 2 OBSERVED column SEPARATE from KNOWN; post-read findings go to OBSERVED only |
| Edit IMP at > 95% context window | STOP; save state: draft; resume in fresh session (CLAUDE.md P0 #11) |
/bug.fix.root-cause-analysis / /bug.why./review.white-box-trace REAL mode (/trace.real).white-box-trace VIRTUAL mode (/trace.virtual).| FM | Trigger | Recovery (MANDATORY) |
|---|---|---|
| FM-A Anchored on initial intuition | All approaches align with Phase 2 INITIAL INTUITION; none explore UNKNOWN | §7 Anchoring Detector forces ≥ 1 approach from UNKNOWN. Still anchored ⇒ promote to FULL, re-run §7.3 strictly (start at Approach #2 or #3). |
FM-B Hallucinated file:line | Citation does not exist or out of range | Re-run §7.5 gate THIS turn with explicit Read; downgrade affected evidence to **ASSUMPTION**:; drops < MEDIUM ⇒ no longer ⭐. |
| FM-C Approach #0 missing / pretend-#0 | "Minimum" secretly bundles refactors | Rewrite #0 strictly — smallest possible delta even if ugly. Apply CLAUDE.md §10 diff-line check. |
| FM-D Mental-Reality Gap (FULL) | §11 white-box-trace VIRTUAL returns V_INCONCLUSIVE; anchored / total < 0.50 | Cap aggregate confidence at MEDIUM; expand §8.6 Reproducing Test Sketch to runnable Repro Spec (CLAUDE.md §12); prototype run before /implement. |
| FM-E Action-execution dishonesty (FM-16) | Claimed "I read / I checked / git shows" without preceding tool result THIS turn | Re-prefix as **ASSUMPTION**:; perform Read now; quote ≥ 3 lines; reassess. |
| FM-F Sycophancy on user pushback | "But the RCA says HIGH" | Re-anchor on evidence per §15 Sycophancy guard. Agree only if ≥ 1 ◆◆◆ supports; otherwise restate disagreement with Refuter; surface §10.3 Disagreement-with-upstream block. |
| FM-G Verification claimed but not run (CLAUDE.md §11.9) | "Tested via white-box-trace VIRTUAL" with no transcript | Invoke white-box-trace skill THIS turn, paste verdict; OR honestly mark executed: false_with_reason: <specific> and downgrade to MEDIUM. |
CLAUDE.md — project doctrine. Read FIRST. Tier (§3), Checkpoint (§4), Adversarial Toolkit (§7), Search (§8), Output Contract (§9), Pre-Send Checklist (§11), Repro Kernel (§12), Reflexion (§13), Long-Session Drift (§14), P0 #1–16..claude/skills/root-cause-analysis/SKILL.md — sibling. IMP frequently consumes RCA as parent_artifact; fingerprint-check on consume..claude/skills/white-box-trace/SKILL.md — companion. VIRTUAL mode falsifies IMP before /implement (§11; FULL MANDATORY). REAL Phase 5R forward-slice deepens §6.1 blast radius when Risk ≥ MEDIUM.context/05_AI_Rules_And_Context/FAILURE-MODE-REGISTRY.md — FM tagging. Typical IMP coverage: FM-2, FM-4, FM-5, FM-7, FM-15, FM-19, FM-20, FM-22.Tagline: Plan minimally. Falsify ruthlessly. Hand off cleanly. Approach #0 first; ⭐ only if it survives.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.