Logo di Nw Fp Usable Design

Nw Fp Usable Design

Organizzazione
nWave-ai
nw-fp-usable-design

Naming conventions, API ergonomics, and usability patterns for functional code

Panoramica

Pubblicato danWave-ai
RepositorynWave
Nome della skillnw-fp-usable-design
Stelle
616
Fork
65
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da nWave-ai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Nw Fp Usable Design in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-fp-usable-design
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nWave-ai/nWave.git /tmp/nWave
mkdir -p .claude/skills
cp -r /tmp/nWave/nWave/skills/nw-fp-usable-design .claude/skills/nw-fp-usable-design
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Nw Fp Usable Design in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Nw Fp Usable Design non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Nw Fp Usable Design non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

FP Usable Design

Make functional code usable. The developer is the user of your design. Apply usability thinking to code organization, naming, and architecture.

Cross-references: fp-domain-modeling | fp-hexagonal-architecture | fp-algebra-driven-design


1. Core Insight

[STARTER]

The user of software design is the developer, not the end user. When developers struggle, blame the design, not the people. Pressure, team churn, unclear specs, and noisy environments produce unusable designs. Improve the design.


2. Five Evaluation Goals

[STARTER]

GoalWhat It MeansHow to Assess
LearnabilityHow quickly a new developer becomes productiveTimed tasks for unfamiliar developers
EfficiencyHow fast common tasks are performedCount unnecessary navigation and decisions
MemorabilityHow easily proficiency returns after time awayWhat do returning developers re-learn?
Error resistanceHow many bugs the design inducesTrack bug locations; ask "what design change prevents this category?"
SatisfactionHow pleasant to work in the codebaseDeveloper interviews, retrospectives

3. Naming Conventions

[STARTER]

Domain Language in Function Names

Use domain expert's vocabulary, not mathematical conventions or technical jargon. No OrderFactory, OrderManager, OrderHelper.

Verb-Noun for Transformations (Pipeline-Friendly)

rawOrder
  |> validateOrderFields
  |> enrichWithCustomerData
  |> calculateOrderTotal
  |> applyDiscountRules
  |> generateOrderConfirmation

Predicate Functions Use Question-Style Names

isActiveCustomer     -- not: checkActive, activeP
hasShippingAddress   -- not: shippingAddr, addrCheck
canPlaceOrder        -- not: orderOk, validateOrderBool

When Short Names Are Acceptable

Single-letter names appropriate only in: library internals and generic utilities | lambda parameters in trivial operations | type variables | mathematical domains where convention IS domain language.

Lifecycle Prefixes

Types at different workflow stages get prefixed: UnvalidatedOrder, ValidatedOrder, PricedOrder. Stage immediately visible in any type signature.

Error Type Naming

Named after what went wrong, scoped to context: ValidationError, PricingError. Pipeline-level: PlaceOrderError (choice type unifying step errors).


4. Feature-Oriented Organization

[STARTER]

Organize by feature domain rather than technical layer.

Instead of (technical layers):

controllers/
services/
models/

Use (feature domains):

auth/
speakers/
speakers/profile/
order/

When: Developers frequently need to find and modify all code related to a specific feature. Why: When something changes in "call for speakers," it's obvious where to look. Technical layering scatters related code across entire codebase.

Module Organization Within a Feature

  • Simple types at top (no dependencies)
  • Compound domain types in middle
  • Aggregates and workflow types at bottom
  • Types and functions in same file or types-first, functions-second

5. Navigability as First-Class Concern

[STARTER]

Typical developer workflow (find, navigate, read, write, test) executes hundreds of times per day. Small improvements compound.

Eliminate: Long methods requiring scrolling | unclear method names forcing reading implementations | tests unrelatable to features | inconsistent placement of similar logic.

Naming as navigation: Consistent patterns where suffix/prefix indicates design role. Names precise enough that search yields 3-4 results at most. IDE-friendly casing enables fast jump-to.

Why: Navigability is quasi-ignored with enormous cumulative impact.


6. Design Elements (Constrained Roles)

[INTERMEDIATE]

Define constrained roles for your codebase. Each role specifies: responsibilities, allowed collaborators, and testing approach.

RoleResponsibilitiesCan CallTest With
ControllerDelegates operations, renders viewsServices, Command ObjectsComponent tests
Command ObjectValidates input, delegates writesDatabase services, queriesUnit tests
Application ServiceOrchestrates business logicCommands, other servicesIntegration tests
Database QueryRead-only data accessDatabase onlyUnit tests
View ModelShapes data for presentationNothingUnit tests

Why: Makes design "easy to use correctly, hard to use incorrectly." Controller can't write to database, so database bugs can't originate in Controllers.

Rules for design elements:

  • Derive after building 10+ features, not upfront
  • Cover 80% of cases; handle exceptions case-by-case
  • Review periodically as product evolves
  • Make compliance easier than deviation (samples, generators, testing support)

7. Constraints as Clarity

[INTERMEDIATE]

Deliberately restrict what each component can do. Constrain both behavior (what a thing does) and collaboration (what it can call).

Why: Unconstrained components express too much. Good abstractions restrict possibilities to make remaining ones clearer. Immutability is a prime example.

When a use case doesn't fit: Extract into separate module with its own consistency rules rather than polluting main design.


8. Root-Cause Bugs in the Design

[INTERMEDIATE]

Ask "what design change prevents this category of bug?" rather than fixing individual instances. Track bug-prone areas and redesign them.

Fear of making changes signals design problem: unclear side effects | missing tests | tangled responsibilities. Fixing individual bugs without addressing design guarantees recurrence.

See fp-algebra-driven-design section 5 for algebraic contradiction analysis.


9. Prescribed Testing Strategy

[INTERMEDIATE]

Assign testing approach to each design element role. Controllers get component tests. Command objects get unit tests. Removes "how should I test this?" decision entirely.

Why: Reduces decision fatigue. Tests also document and enforce what each role should do.


10. Usability Testing the Design

[ADVANCED]

Apply UX research techniques to your codebase:

TechniqueApplication
Developer interviewsWhat was hard? Confusing? Risky?
PersonasDeveloper profiles (skill level, domain knowledge, tool familiarity)
Flow analysisMap steps for common tasks; identify bottlenecks
Timed tasksGive unfamiliar developers specific tasks; observe friction
Continuous feedbackRetrospectives and root-cause analysis as ongoing design feedback

Decision Tree: How to Organize This Module?

Does this module represent a feature domain?
  YES --> Feature-oriented folder (auth/, order/, speakers/)
    Does the feature have sub-features?
      YES --> Nested feature folders (speakers/profile/)
      NO --> Single feature folder
  NO --> Is it shared infrastructure?
    YES --> Infrastructure folder, organized by capability
    NO --> Is it a cross-cutting concern?
      YES --> Shared module, referenced by feature modules
      NO --> Evaluate whether it belongs in an existing feature

11. Design Heuristics

  1. Blame the design, not the people -- foundational heuristic
  2. No best practices, only contextual practices -- SOLID helps when you need low cost of change; skip it otherwise
  3. Constraints enable creativity -- limiting what a component can do leads to more focused solutions
  4. Improve incrementally -- use the imperfect name now, improve next time you can't find it
  5. Action over analysis -- make things work first, then refine structure
  6. Consistency at module level -- system-wide conceptual integrity is hard; module-level consistency is practical

12. Combining with Other Patterns

Design Elements + Algebraic Rules: Each element's constraints ("a Controller can only call Services") are formalizable as algebraic rules, making constraints machine-checkable. See fp-algebra-driven-design. Example: imports(controllerModule) intersect dbModules == empty.

Navigability + Simple Rules: Algebraic decomposition produces small, orthogonal operations with simple rules. Small operations are easy to name well. Example: applyDiscount and calculateTax are instantly searchable; processOrder is not.

Feature Organization + Domain Modeling: Feature folders align with bounded contexts. Each feature owns its domain types and workflows. See fp-domain-modeling. Example: order/types.fs, order/validate.fs, order/price.fs.

Prescribed Testing + Property-Based Testing: Design elements prescribe WHAT kind of test. PBT prescribes HOW to write those tests as properties. Example: Command objects get conservation properties (forAll(order -> totalOf(applyDiscount(order)) <= totalOf(order))). Controllers get round-trip properties.

Domande frequenti

Cosa fa la skill IA Nw Fp Usable Design?

Naming conventions, API ergonomics, and usability patterns for functional code

Perché usare Nw Fp Usable Design su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Nw Fp Usable Design è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Nw Fp Usable Design in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-fp-usable-design. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Nw Fp Usable Design?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Nw Fp Usable Design?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Nw Fp Usable Design: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Nw Fp Usable Design è gratuita?

Sì. È pubblicata su GitHub da nWave-ai con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇