Skip to content

Instantly share code, notes, and snippets.

@jlacour-git
jlacour-git / DigestLearnings-gist.md
Last active March 16, 2026 08:46
DigestLearnings — Periodic Review of Learning Signals (PAI Skill)

DigestLearnings Workflow

Review unprocessed learning signals and extract improvement proposals.

Phase 1 — DIGEST (scan and extract)

Step 1: Find the watermark

Read ~/.claude/MEMORY/LEARNING/DIGEST-LOG.jsonl. Find the most recent entry's timestamp field. This is the watermark — only process files created AFTER this timestamp.

@jlacour-git
jlacour-git / README.md
Created March 12, 2026 18:24
Rule Adherence Interventions for PAI — Three concrete changes that improved AI rule-following behavior

Rule Adherence Interventions for PAI

Three concrete changes that improved AI rule-following behavior in PAI. Found through a structured investigation (Science → Council → RedTeam) documented in Discussion #945.

Background

PAI's AI assistant systematically underused its own quality mechanisms despite explicit rules. Across 43 tracked sessions: effort levels skewed low (35% Standard), capability invocation averaged 0.4/session against stated minimums of 1-2, and weekly ratings trended down.

The root cause: the model finds rationalization paths to skip rules. An "Efficiency" section in steering rules gave explicit textual permission to shortcut. "Standard = DEFAULT" anchored effort estimation downward. And without PlanMode enforcement, complex tasks got no structured planning.

@jlacour-git
jlacour-git / AISTEERINGRULES.md
Last active March 16, 2026 09:03
Rule Adherence Investigation — Science → Council → RedTeam findings (PAI)

AI Steering Rules — Personal

Personal behavioral rules for {PRINCIPAL.NAME}. These extend and override SYSTEM/AISTEERINGRULES.md.

Priority: Trust > Correctness > Quality

When rules conflict, higher level wins. [T]=Trust [C]=Correctness [Q]=Quality. Trust rules NEVER yield.


@jlacour-git
jlacour-git / 01-LOCAL_PATCHES-TEMPLATE.md
Last active March 18, 2026 20:57
PAI Local Patch Tracking + Upstream Monitoring System

Local Patches to PAI SYSTEM Files

Tracks modifications to SYSTEM-tier files that would be overwritten by a PAI update. Check this file before and after any git pull + reinstall.


How to Use

  1. Before PAI update: Run the upgrade check tool first:
@jlacour-git
jlacour-git / BuildSemanticIndex.ts
Last active March 24, 2026 08:48
PAI Memory System Audit Fixes — ContextAssembler, WorkCleanup, LoadContext (Discussion #884)
#!/usr/bin/env bun
/**
* BuildSemanticIndex.ts — Builds/refreshes the semantic search vector index
*
* Embeds files from MEMORY/, auto-memory/, and ~/AI-Projects/ CONCEPT.md files
* using Ollama mxbai-embed-large and stores vectors in LanceDB.
*
* Sub-file chunking: splits markdown at heading boundaries, splits oversized
* sections (>4000 chars) at paragraph breaks, skips empty-heading chunks.
* Content-hash dedup: SHA-256 per chunk, skips re-embedding unchanged content.
@jlacour-git
jlacour-git / Algorithm-Complexity-Gate.md
Last active March 12, 2026 19:59
Fix: Algorithm Mode Skipping in PAI v4.0 — root cause analysis + implementation

STEP 1 — COMPLEXITY GATE (before reading the Algorithm file):

Default: ALGORITHM. Only downshift if the task is genuinely trivial.

Evaluate: "Can I complete this with ≤2 tool calls, no external APIs, no file creation/deletion, and no verification needed?"

  • NO (or uncertain) → continue to Step 2 (read the Algorithm file)
    • Voice: bun ~/.claude/PAI/Tools/voice.ts notify algorithm-confirmed
  • YES → downshift to NATIVE mode only if NONE of these disqualifiers apply:
    • Involves GitHub, Forgejo, or any external API