Nw Fp Usable Designのロゴ

Nw Fp Usable Design

組織
nWave-ai
nw-fp-usable-design

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

概要

公開者nWave-ai
リポジトリnWave
スキル名nw-fp-usable-design
スター
616
フォーク
65
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    nWave-aiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Nw Fp Usable Design」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-fp-usable-design
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでNw Fp Usable Designを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にNw Fp Usable Designを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Nw Fp Usable Designは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「Nw Fp Usable Design」では何ができますか?

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

TypingMindでNw Fp Usable Designを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Nw Fp Usable Designはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにNw Fp Usable Designをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/nWave-ai/nWave/tree/main/nWave/skills/nw-fp-usable-designを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Nw Fp Usable Designを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Nw Fp Usable Designで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもNw Fp Usable Designを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Nw Fp Usable Design」は無料ですか?

はい。nWave-aiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇