gleanin
Rules from past failures. Apply every session.
Credentialed Write Gate
Rule:
- Before writing with ambient credentials, verify scope (
<tool> whoami, config view).
- Exact-match created resource name against intent.
- On mismatch, roll back immediately.
- Never mark done when acceptance probe failed.
Check: grep -c "inoffensif\|harmless\|can delete\|not needed" in session transcript — zero for any failed write.
Delegation Preflight
Rule:
- Scan delegation payload against delegate's Known Limitations first.
- Verify with
git diff, not the delegate's [OK] lines.
- On partial landing, name the limitation before hand-editing.
- Structural integrity check every delegate-touched file.
Check: git diff --stat HEAD after delegation — changed file count must match expected.
Device First Check
Rule:
- Search filesystem (
find, grep, ls) before asking the user.
curl -sI before declaring anything "not deployed."
- Syntax check + tail check before committing.
Check: grep -c "AskUserQuestion\|curl.*not.find\|edit.*then.*ask" in session transcript — near zero with this rule.
Reference First Porting
Rule:
- Read the reference before editing any formula or algorithm.
- Cite
file:line per edit.
- Apply supplied values verbatim before re-derivation.
Check: grep -rn "TODO\|FIXME\|guess\|maybe" <target-file> — zero after a port.
Protocol index
Trigger-loaded protocols. When a trigger matches the current task, Read the file before proceeding.
- Exact form first — literal search, decisive git comparison, file-borne payloads — Load this in any session that (a) greps source code, (b) makes claims about → read ~/distillation/artifacts/exact-form-first.md
- Hang-bisect protocol — trace before retry, never escalate timeouts blind — Load this whenever a script or pipeline invocation times out (exit 124), → read ~/distillation/artifacts/hang-bisect-protocol.md
- Reproduce the report first — locate what the user sees before defending what you did — Load this whenever a user disputes visible state: "your changes don't → read ~/distillation/artifacts/reproduce-report-first.md
- Route census before auth policy — classify every endpoint once, edit once — Load this whenever you are about to add or change authentication, API-key → read ~/distillation/artifacts/route-census-before-auth.md
- Single-file batch edit — plan the change-set, then edit once — Load this whenever a task requires 3 or more changes to the same file — → read ~/distillation/artifacts/single-file-batch-edit.md
- boundary-aware handoff — When dividing work between two or more models (or model sessions): → read ~/fable-build/rules/boundary-aware-handoff.md
- content-integrity tests — For data-driven products (games, rule engines, content systems): → read ~/fable-build/rules/content-integrity-tests.md
- contract-first interface — When building a system that runs across multiple targets (offline, online, → read ~/fable-build/rules/contract-first-interface.md
- cost-time-quality accounting — Every build produces a cost accounting artifact: → read ~/fable-build/rules/cost-time-quality-accounting.md
- cross-model relay — When routing build phases across multiple models: → read ~/fable-build/rules/cross-model-relay.md
- deterministic default — Use fixed seeds for all world/level generation: → read ~/fable-build/rules/deterministic-default.md
- effort setting by phase — When configuring a build phase, set effort level explicitly: → read ~/fable-build/rules/effort-setting-by-phase.md
- goal-verification-report loop — Replace step-based phase execution with a goal→report pattern for → read ~/fable-build/rules/goal-verification-report.md
- phase stage verification — When a phase spans significant work, split it into stages (1/2/3): → read ~/fable-build/rules/phase-stage-verification.md
- review findings accounting — Every code review produces a numbered list of findings. → read ~/fable-build/rules/review-findings-accounting.md
- safety overfit testing — For products that use LLM outputs (chatbots, content generators, agents): → read ~/fable-build/rules/safety-overfit-testing.md
- thought-partner interview — Before writing ANY spec, template, or brief, interview the model as a → read ~/fable-build/rules/thought-partner-interview.md
- vision self-correction loop — When the build produces visual output (UI, 3D scenes, renders, screenshots): → read ~/fable-build/rules/vision-self-correction.md
1---2name: gleanin3description: >4 Rules distilled from past session friction (errors, edit loops, corrections),5 analyzed by a stronger model and applied to guide future work. Regenerated6 from glean/artifacts/ plus an index of trigger-loaded protocols from7 GLEAN_PROTOCOL_DIRS by sync.sh — load every session via CLAUDE.md.8license: MIT9metadata:10 source: https://skillmd.com/skills/pcx-wave/gleanin11---1213# gleanin1415Rules from past failures. Apply every session.1617<!-- Rules are auto-generated by sync.sh. Do not edit manually. -->1819### Credentialed Write Gate2021**Rule:**221. Before writing with ambient credentials, verify scope (`<tool> whoami`, `config view`).232. Exact-match created resource name against intent.243. On mismatch, roll back immediately.254. Never mark done when acceptance probe failed.2627**Check:** `grep -c "inoffensif\|harmless\|can delete\|not needed"` in session transcript — zero for any failed write.2829### Delegation Preflight3031**Rule:**321. Scan delegation payload against delegate's Known Limitations first.332. Verify with `git diff`, not the delegate's `[OK]` lines.343. On partial landing, name the limitation before hand-editing.354. Structural integrity check every delegate-touched file.3637**Check:** `git diff --stat HEAD` after delegation — changed file count must match expected.3839### Device First Check4041**Rule:**421. Search filesystem (`find`, `grep`, `ls`) before asking the user.432. `curl -sI` before declaring anything "not deployed."443. Syntax check + tail check before committing.4546**Check:** `grep -c "AskUserQuestion\|curl.*not.find\|edit.*then.*ask"` in session transcript — near zero with this rule.4748### Reference First Porting4950**Rule:**511. Read the reference before editing any formula or algorithm.522. Cite `file:line` per edit.533. Apply supplied values verbatim before re-derivation.5455**Check:** `grep -rn "TODO\|FIXME\|guess\|maybe" <target-file>` — zero after a port.5657<!-- end gleanin rules -->5859<!-- Protocol index auto-generated by sync.sh. Do not edit manually. -->6061## Protocol index6263Trigger-loaded protocols. When a trigger matches the current task, Read the file before proceeding.6465- **Exact form first — literal search, decisive git comparison, file-borne payloads** — Load this in any session that (a) greps source code, (b) makes claims about → read ~/distillation/artifacts/exact-form-first.md66- **Hang-bisect protocol — trace before retry, never escalate timeouts blind** — Load this whenever a script or pipeline invocation times out (exit 124), → read ~/distillation/artifacts/hang-bisect-protocol.md67- **Reproduce the report first — locate what the user sees before defending what you did** — Load this whenever a user disputes visible state: "your changes don't → read ~/distillation/artifacts/reproduce-report-first.md68- **Route census before auth policy — classify every endpoint once, edit once** — Load this whenever you are about to add or change authentication, API-key → read ~/distillation/artifacts/route-census-before-auth.md69- **Single-file batch edit — plan the change-set, then edit once** — Load this whenever a task requires **3 or more changes to the same file** — → read ~/distillation/artifacts/single-file-batch-edit.md70- **boundary-aware handoff** — When dividing work between two or more models (or model sessions): → read ~/fable-build/rules/boundary-aware-handoff.md71- **content-integrity tests** — For data-driven products (games, rule engines, content systems): → read ~/fable-build/rules/content-integrity-tests.md72- **contract-first interface** — When building a system that runs across multiple targets (offline, online, → read ~/fable-build/rules/contract-first-interface.md73- **cost-time-quality accounting** — Every build produces a cost accounting artifact: → read ~/fable-build/rules/cost-time-quality-accounting.md74- **cross-model relay** — When routing build phases across multiple models: → read ~/fable-build/rules/cross-model-relay.md75- **deterministic default** — Use fixed seeds for all world/level generation: → read ~/fable-build/rules/deterministic-default.md76- **effort setting by phase** — When configuring a build phase, set effort level explicitly: → read ~/fable-build/rules/effort-setting-by-phase.md77- **goal-verification-report loop** — Replace step-based phase execution with a goal→report pattern for → read ~/fable-build/rules/goal-verification-report.md78- **phase stage verification** — When a phase spans significant work, split it into stages (1/2/3): → read ~/fable-build/rules/phase-stage-verification.md79- **review findings accounting** — Every code review produces a numbered list of findings. → read ~/fable-build/rules/review-findings-accounting.md80- **safety overfit testing** — For products that use LLM outputs (chatbots, content generators, agents): → read ~/fable-build/rules/safety-overfit-testing.md81- **thought-partner interview** — Before writing ANY spec, template, or brief, interview the model as a → read ~/fable-build/rules/thought-partner-interview.md82- **vision self-correction loop** — When the build produces visual output (UI, 3D scenes, renders, screenshots): → read ~/fable-build/rules/vision-self-correction.md8384<!-- end protocol index -->