/functional-clarity:functional-clarityfrom functional-clarity
Applies a 22-principle methodology for fail-fast error handling, explicit dependencies, and minimal cognitive load. Useful for code reviews, refactoring, and enforcing coding standards.
Ships in functional-clarity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A methodology for building reliable, simple, and understandable software. Every principle serves one goal: minimize cognitive load while maximizing code reliability.
Simplicity — the right solution is the simplest one that works. Reliability — fail-fast, no Error Hiding, honest error reflection. Clarity — code reads like a story, names explain intent. Maintainability — every change reduces cost of future changes.
Analyze your solutions to extract general principles and apply them to new tasks. This works not only for technical tasks but for any challenge. Programming reflects reality — solutions are inseparable from the real world. A principle works everywhere; if there's an exception, it's not a principle.
Numbering follows the original scheme: 1, 2, 2A, 3–22.
Concrete techniques against exception swallowing:
try-except Exception without re-raise — FORBIDDENAlways set timeouts for network calls. Your SLO depends on it.
| Role | Defaults | Rationale |
|---|---|---|
| FK dependency | Minimal for validity | Consumer doesn't care about details |
| Entry point (API, factory) | Maximal for usefulness | Consumer wants to work, not configure |
| Edge case | Explicitly different | Deviation must be visible |
Default != Error Hiding: Returning empty value on error is NOT a default, it's Error Hiding.
pytest.fail() not raise in testsSee references/01-style-guide.md for the full version with details.
# CORRECT: Fail-fast with feature flag
def process_with_feature(data):
if not settings.FEATURE_ENABLED:
return 0 # Only legitimate early return
result = _do_actual_work(data) # Let exceptions bubble up
return result
# CORRECT: Re-raise with context enrichment
try:
result = external_api.call()
except ExternalApiError as e:
raise ServiceError(f"Failed for {user_id=}") from e
# CORRECT: Honest error reflection in data
except Config.DoesNotExist as e:
event.status = 'FAILED'
event.error_message = str(e)
event.save()
# FORBIDDEN: Error Hiding
try:
do_something()
except Exception:
logger.error("Failed") # Swallowed!
return None
references/00-principles.md — Complete 22 principles with detailed explanations and code examplesreferences/01-style-guide.md — Full style guide with details on each pointreferences/02-code-change-discipline.md — 7-step algorithm for working with existing code, reinforced by FPF principles (A.7 Strict Distinction, A.10 Evidence Graph, A.11 Ontological Parsimony, A.1.1 BoundedContext)references/03-developer-levels.md — Developer level definitions (Junior → Senior+)references/04-bash-instructions.md — Bash script guidelinesreferences/frameworks/python.md — Python-specific: modern syntax, pathlib, type annotations, pytest patternsreferences/05-comment-style.md — Comment discipline: four comment
smell classes (doc-refs, changelog-in-code, restating the obvious,
reporting your own work to the human) with
❌/✅, the allowlist, and borderline cases (external standards,
versioned-API docs). Normative source — every other mention points here.
Tracking-id (FEAT-XXXX) enforced separately by sdlc.references/06-boundary-vocabulary.md — Boundary vocabulary: what a
context declares on its boundary it names in its own language — and the
rule is the same at every scale (layer, module, service, cross-team
system). The ownership rule, the three leak channels (name,
type/signature, prose), the substitution test (objective criterion), the
translation duty (the dependent side translates, in its own adapter), a
worked module-level case with ❌/✅, and false-positive guards
(context-internal names, presentation-layer copy). Normative source —
every other mention points here. Design-time check owned by
sdlc:architect, review category by sdlc:code-reviewer.references/00-principles.mdreferences/01-style-guide.mdreferences/02-code-change-discipline.md BEFORE making changesreferences/03-developer-levels.mdreferences/04-bash-instructions.mdreferences/frameworks/python.mdreferences/05-comment-style.mdreferences/06-boundary-vocabulary.mdThis skill complements tdd-master:
Both share the Fail-Fast and Error Hiding prevention philosophy.
If the user asks about writing tests, TDD, or test-driven development and the tdd-master skill is not available, recommend installing the tdd-master plugin from the same repository: plugins/tdd-master/.
references/00-principles.md (opens in a new tab)references/01-style-guide.md (opens in a new tab)references/02-code-change-discipline.md (opens in a new tab)references/03-developer-levels.md (opens in a new tab)references/04-bash-instructions.md (opens in a new tab)references/05-comment-style.md (opens in a new tab)references/06-boundary-vocabulary.md (opens in a new tab)references/frameworks/python.md (opens in a new tab)test_boundary_vocabulary.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub spumer/i-m-senior-developer --plugin functional-clarityOther plugins' skills for the same job