shed-safety-rules

Enforces five safety rules as structural code mechanisms in a Flutter livestock app.

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/zakariaf/Shed-Book --skill shed-safety-rules-zakariaf
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shed-safety-rules
Source: https://github.com/zakariaf/Shed-Book/tree/main/.claude/skills/shed-safety-rules
Command: npx skills add https://github.com/zakariaf/Shed-Book --skill shed-safety-rules-zakariaf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Safety rules that live only in checklists or documentation get silently deleted during refactors, and in a livestock record app a defect can hurt someone who is not the user. This Skill pushes each of the five spec §12 rules up a mechanism ladder — unrepresentable, unconstructible, unpersistable, source-text test, documented — so a rule cannot be weakened without failing a gate. ## Core Features & Use Cases - Mechanism-level enforcement: Maps each rule (never default a withdrawal, never give veterinary advice, never a compliance record, never silently correct, honest timestamps) to concrete Dart types, SQL CHECK constraints, and layer bans. - Two-way self-testing policy guards: ContentPolicy regexes over lib/**.dart and ARB files ship with planted offenders and legitimate-copy cases so a guard that never fires is detected. - Use Case: Before adding a default value, pre-fill, suggestion, hint text, or edit verb to the Flutter app, check this Skill to confirm the change does not drop a safety rule from unconstructible down to merely documented. ## Quick Start Before adding any default, pre-fill, suggestion, validation, or edit path to the app, apply the shed-safety-rules skill to verify the change keeps every §12 rule at its current mechanism level or higher.

Frequently Asked Questions about shed-safety-rules

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

FAQPage Schema
How do I enforce safety rules in code instead of a review checklist?▼

Push each rule up a mechanism ladder: make the violation unrepresentable in the type system, unconstructible via private constructors, or unpersistable via SQL CHECK constraints. A source-text test is the fallback; a rule that drops to merely documented is treated as deleted.

How do I prevent default values in a Flutter form field?▼

Ban SQL DEFAULT, drift clientDefault, null-coalescing fills like ?? 0, hintText showing a typical value, and migration fills. Absence of a row should itself be the domain state, so nothing can produce a value the user did not enter.

Can a regex content policy catch all banned clinical advice?▼

No. Regexes over string literals miss runtime substitutions like computing a dose from a stored birthweight, and naive contains() scans miss strings wrapped across adjacent Dart literals. Scanners must extract and join string literals, and arithmetic origination needs human review.

When should warnings block a save in a data-entry app?▼

Never, in this design. Warnings are recomputed on read, stored in no column, and never gate the save, because a blocked save at 3am produces a lost record which is worse than a contradictory one. Validators are pure functions with no writer access.

What are the limitations of checklist-based code review for safety rules?▼

A checklist depends on a tired reviewer noticing an absence, which is the weakest enforcement mechanism. Any rule that loses its type, constraint, policy rule, or layer ban and keeps only a comment or doc line has effectively been deleted.