← Back to list

universalist
by tkersey
public dot files
⭐ 37🍴 0📅 Jan 23, 2026
SKILL.md
name: universalist description: "Algebra-Driven Design (ADD): model domains via minimal algebra + laws; encode in types; test laws."
Universalist
Intent
Use Algebra-Driven Design (ADD) to find the smallest algebra that fits the domain, encode it in types, and enforce laws with tests.
Core workflow (ADD)
- Frame the domain: observations, invariants, operations.
- Pick the minimal algebra; avoid overfitting.
- Define types: make illegal states unrepresentable.
- State laws: identity, associativity, distributivity, absorption, round-trip, homomorphism.
- Derive operations from the algebra (map/fold/compose) to reduce ad hoc branching.
- Refactor architecture to match algebra boundaries.
- Test the laws (property/model/metamorphic checks).
- Iterate: if laws are hard to state or test, the algebra is likely wrong.
Minimal-algebra decision guide
- Alternatives/variants → coproduct (tagged union)
- Independent fields → product (record/struct)
- Combine + identity → monoid
- Combine, no identity → semigroup
- Ordering/permissions → poset/lattice
- Add+multiply structure → semiring
- Structure-preserving map → functor
- Effectful apply → applicative
- Sequenced effects → monad
Testing expectations
- Include law/property tests for the chosen algebra.
- Prefer property-based checks when the repo already supports them.
- If not, write minimal deterministic law checks in the existing test framework.
- Don’t assume tooling exists; propose new dependencies only with user approval.
References
references/addd-overview.mdreferences/addd-sources.mdreferences/structures-and-laws.mdreferences/testing-playbook.mdreferences/case-studies.mdreferences/examples-haskell.mdreferences/examples-go.mdreferences/examples-typescript.md
Scripts
scripts/emit_law_test_stub.shprints illustrative law-test stubs for Haskell, Go, or TypeScript.
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon