---
name: sediman-agent-principle-encode-lessons-in-structure
description: "Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text."
license: "NOASSERTION"
disable-model-invocation: true
metadata:
  decimalai-skill-id: "d5c138c5-477b-4a50-bae1-7bccf022cda6"
  decimalai-version-id: "28768271-311f-48a7-8b5d-966099ab9ff7"
  decimalai-version: "1"
  decimalai-body-sha256: "2f4bf5db5d5df747781cb47e2c0d1bf257cd35e0ec72c869793005c21c5db801"
  decimalai-name: "sediman-agent/principle-encode-lessons-in-structure"
  decimalai-format: "1"
  decimalai-invocation: "user"
  decimalai-category: "coding"
  decimalai-source: "https://app.decimal.ai/s/sediman-agent-principle-encode-lessons-in-structure@1/SKILL.md"
---
# Encode Lessons in Structure

Encode recurring fixes in mechanisms (tools, code, metadata, automation) instead of textual instructions. Every error, human correction, and unexpected outcome is a learning signal. Capture it, route it, and close the loop.

**Why:** Textual instructions are easy to miss. They require the reader to notice, remember, and comply. Structural mechanisms (lint rules, metadata flags, runtime checks, automation scripts) enforce the rule without cooperation.

**Pattern:**
When you catch yourself writing the same instruction a second time:
1. Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?
2. If yes, encode it. Delete the instruction
3. If no (genuinely requires judgment), make the instruction more prominent and add an example of the failure mode

**Corollary:** Don't paper over symptoms. If the fix is structural, ONLY use the structural fix. The instruction IS the symptom.

**Feedback loop:**
- **Capture every correction.** When the human intervenes or tests fail, decide if it's a one-off or a pattern.
- **Route to the right layer.** One-off -> brain note. Recurring fix -> skill or lint rule. Systemic issue -> principle.
- **Close the loop.** Don't just record. Apply now or create a concrete todo.

**Anti-patterns:**
- Acknowledging without recording ("I'll keep that in mind" does not persist)
- Recording without routing (a brain note about a lint rule that should exist is wasted unless the lint rule gets implemented)
- Fixing without generalizing (fixing one instance while leaving the recurring pattern intact)
