principle-encode-lessons-in-structure

Converts recurring corrections into lint rules, runtime checks, and automation scripts.

6.6k|542|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/cursor/plugins --skill principle-encode-lessons-in-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-encode-lessons-in-structure
Source: https://github.com/cursor/plugins/tree/main/pstack/skills/principle-encode-lessons-in-structure
Command: npx skills add https://github.com/cursor/plugins --skill principle-encode-lessons-in-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repeatedly writing the same instruction or correction wastes effort and fails because textual guidance is easy to miss. This Skill helps you recognize recurring fixes and encode them as enforceable mechanisms instead of more prose.

Core Features & Use Cases

  • Structural Encoding: Turn repeated instructions into lint rules, metadata flags, runtime checks, or scripts that enforce the rule automatically.
  • Strongest-Rung Selection: Choose the strongest available mechanism, from unrepresentable states that fail compilation down to runtime checks.
  • Feedback Loop Discipline: Capture every correction, route it to the right layer (note, skill, lint rule, or principle), and close the loop with concrete action.
  • Use Case: After correcting the same code pattern twice in review, use this Skill to decide whether a CI lint rule or a canonical helper should replace the review comment.

Quick Start

Apply this principle whenever you catch yourself writing the same instruction a second time and encode it as a lint rule, check, or script.

Frequently Asked Questions about principle-encode-lessons-in-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop repeating the same code review comments?

Encode the recurring correction as a lint rule, metadata flag, runtime check, or script instead of writing the comment again. If the rule genuinely requires human judgment, make the instruction more prominent and include an example of the failure mode.

When should a rule become a lint check instead of documentation?

Convert a rule to a lint check when you catch yourself writing the same instruction a second time or notice a recurring correction. Structural mechanisms enforce the rule without requiring readers to notice, remember, and comply.

What is the strongest way to enforce a coding rule?

The strongest enforcement is an unrepresentable state that cannot compile, followed by a lint rule or banned API that fails CI, then a canonical helper, then a runtime check. Pick the strongest rung the situation allows.

Why do textual instructions fail in agent workflows?

Textual instructions require the reader to notice, remember, and comply, and agents copy whatever the surrounding code already does. A weaker guard becomes the next template, so structural mechanisms are more reliable than prose.

What are common mistakes when encoding lessons in structure?

Common anti-patterns include acknowledging a correction without recording it, recording it without routing it to implementation, and fixing one instance without generalizing the recurring pattern. Each correction should be captured, routed, and closed with action.