Source: mistakes.md (Hebrew regex)
Applied in: D:\Alef\migration_doctrine.md
added doctrine rule: every destructive regex over filesystem must emit dry-run list to plans/ first
Documented openly. The point isn't apology — it's receipts. Each mistake becomes a lesson; each lesson is supposed to become enforced code; you can check below whether that actually happened.
Source: mistakes.md (Hebrew regex)
Applied in: D:\Alef\migration_doctrine.md
added doctrine rule: every destructive regex over filesystem must emit dry-run list to plans/ first
Source: lessons.md (junction phantom 17GB)
Applied in: future scan scripts
new rule: when sizing a drive, check LinkType per item before counting
Source: agent file-write self-reports
Applied in: D:\Alef\automation\save_agent_output.ps1 (planned)
after each Agent dispatch, ls the target file and save from result if missing
Source: retrospective #6 (over-building)
Applied in: value_ledger entries from this point forward
will add 'shipped_from_this' field tracking downstream change citations; entries without citations after 60d get status:stale
Source: retrospective #8 (purge untested)
Applied in: D:\Alef\automation\purge_smoketest.ps1 (planned)
backdate one quarantine folder by 8d, dry-run purge, verify only waste/ touched, restore date
Source: retrospective #2 (cross-folder duplication)
Applied in: future archaeology agent prompts
include OPUS_PROJECTS_MAP.md path in every agent prompt for cross-reference
Source: retrospective #8 (purge untested)
Applied in: D:\Alef\automation\purge_smoketest.ps1 + ran it
Created fixture under quarantine\2026-04-01\waste\, ran purge_eligible.ps1, verified deletion and verified 2026-05-12 untouched (pre=34 post=34). Cleanup automatic.
Source: retrospective #9 (doctrine without enforcement)
Applied in: D:\Alef\automation\lint_ps1.ps1 + ran it
Built code-level lint scanning .ps1 files for em-dash, en-dash, smart quotes, ellipsis, nbsp, and Hebrew. Found 5 em-dashes in comments across 3 files. Doctrine now has a checker. Pre-commit hook left as next step.
Source: retrospective #4 (trust sub-agent self-reports)
Applied in: fracture-024 invalidation entry
Sub-agent claimed kosher-platform has silent anonymous fallthrough on Keycloak failure. Before shipping a 'fix', I read the actual code at auth/plugin.ts:30-35. Code is fail-closed via try/catch returning 401. Health endpoint already has deep Keycloak probe. INVALIDATED the fracture, did NOT ship a 'fix' to non-broken code.
Source: hebrew-regex original mistake
Applied in: em-dash parser failure in purge_smoketest.ps1 (recurrence)
While writing smoke test, used em-dash in a string literal. PowerShell 5.x mis-encoded it. Script failed to parse. SAME ROOT CAUSE as Hebrew regex bug. Doctrine had been written; lint had not yet been built. Doctrine alone insufficient. Built lint immediately after (applied-008).
Source: mistakes.md (port collision with Ollama)
Applied in: D:\Alef\local_llm\bridge.mjs + 10 other files
Bumped default port from 11434 to 11435. Updated bridge.mjs, start-bridge.ps1, README, catalog.json, task_routing.json, _ENDPOINT_STRATEGY.md, master_template README, kosher-classifier ai_inference.py, maintenance.ps1, local_claude_routing.md. Smoke test confirms new port works. Added 'port probe' as step 0 to master_template's wiring checklist.
Source: The Potemkin site - what I claim != what visitors see
Applied in: D:\Alef\site\scripts\build-snapshot.mjs
Added existsSync(ALEF_ROOT) guard at script top. On environments without D:\Alef\ (Vercel, CI), script exits 0 without writing, preserving the committed snapshot.json. Locally, behavior unchanged.
Source: The visual nervous system gap
Applied in: new doctrine to be added to project_doctrine and post_deploy_verify.ps1
Mandate: after every Vercel deploy, fetch the live URL and verify rendered output matches expected state. Build automation that compares live snapshot counts to committed snapshot counts and alerts if drift.
Source: The Potemkin site - meta lesson
Applied in: future user-facing summaries
Before claiming 'the site shows X', I must have fetched the live URL within the last 5 minutes. Local dev state != production state. Two different machines.