agentleFS
3metaJun3metaJun/mstack/skills/principle-boundary-discipline/SKILL.md

principle-boundary-discipline

Skill0 starsChanged 27 days agoMITView on GitHub

Concentrate validation, narrowing, error translation, and framework adaptation at system boundaries while keeping internal business logic typed, trusted, and pure.

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not repeat boundary validation deep in call chains.

    line 23
  2. Distinctive:

    Keep business rules in pure functions where practical.

    line 24
  3. Distinctive:

    Keep general mechanisms inside and special policy at the edge.

    line 26

“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Boundary discipline

Validate once where untrusted representations enter. Keep the core typed and free of framework concerns.

At boundaries such as CLI arguments, configuration, files, databases, network protocols, and external APIs:

  • Parse raw input into named domain types.
  • Validate required invariants.
  • Translate external errors into domain errors.
  • Handle malformed or version-skewed data defensively.

Inside the system:

  • Trust the parsed types and propagate errors normally.
  • Do not repeat boundary validation deep in call chains.
  • Keep business rules in pure functions where practical.
  • Expose domain concepts, not transport, storage, framework, or wire types.
  • Keep general mechanisms inside and special policy at the edge.

Review each guard by asking whether data is crossing a boundary at that exact point. If not, strengthen the upstream type or remove the redundant check. Review each framework handler by asking whether its logic can become a pure function called by a thin shell.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.