nw-fp-algebra-driven-design

Featured

Algebra-driven API design with monoids, semigroups, and interpreters via algebraic equations

Web & Frontend 508 stars 53 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 97/100

Stars 20%
90
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# FP Algebra-Driven Design Algebraic thinking for API design. Discover the right API before implementing by specifying rules (equations) that operations must satisfy. Cross-references: [fp-principles](../nw-fp-principles/SKILL.md) | [fp-domain-modeling](../nw-fp-domain-modeling/SKILL.md) | [fp-usable-design](../nw-fp-usable-design/SKILL.md) --- ## 1. Why Algebraic Thinking [STARTER] Code is the wrong abstraction level for design. Starting with data structures inherits unnecessary constraints. - **Specify rules first, implement second.** Implementation is a solution to a system of equations. - **Rules generate tests automatically.** Every rule is directly a property test generating thousands of cases. - **Rules reveal missing features.** Analysis often exposes operations you need but haven't designed. - **Rules catch contradictions early.** Contradiction during design costs minutes; in production, days. --- ## 2. The Design Process [STARTER] 1. **Start with scope, not implementation.** Don't decide data structures upfront. 2. **Define observations first.** How do users extract information? Observations define equality: two values equal if no observation distinguishes them. Gives enormous implementation freedom. 3. **Add operations incrementally.** For each new operation, immediately write rules connecting it to existing ones. This web of rules IS the design. 4. **Let messy rules signal problems.** Complex rules mean coarse building blocks. Decompose until each rule ...

Details

Author
nWave-ai
Repository
nWave-ai/nWave
Created
3 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Featured

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

45,628 Updated yesterday
addyosmani
Web & Frontend Solid

design

Designs modular high-level architectures from functional requirements and produces design documents for each module. Use when designing a new system, creating architecture documentation, or producing module-level design specs with integration contracts and test specifications.

423 Updated 1 months ago
vladikk
Web & Frontend Listed

design-rules

Design phase rules for /designer command. Load at /designer startup (step 0). Covers spec quality, design checklist, approach evaluation criteria.

43 Updated 4 days ago
hex0xdeadbeef
Data & Documents Solid

alps

Create, validate, and improve ALPS profiles. Generate from natural language descriptions, validate existing profiles, and get improvement suggestions.

39 Updated 2 months ago
alps-asd
Web & Frontend Solid

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

140,647 Updated 6 days ago
anthropics