F# Coding Standards
Purpose
Progressive disclosure of F# coding standards for agents writing F# code.
Authoritative Source: docs/explanation/software-engineering/programming-languages/f-sharp/README.md
Usage: Auto-loaded for agents when writing F# code. Provides quick reference to idioms, best practices, and antipatterns.
Prerequisite Knowledge
IMPORTANT: This skill provides OSE Platform-specific style guides, not educational tutorials.
You MUST understand F# fundamentals before using these standards. Complete the AyoKoding F# learning path first:
- F# Learning Path - Initial setup, language overview, quick start guide (0-95% language coverage)
- F# By Example - 75+ annotated code examples (beginner to advanced patterns)
What this skill covers: OSE Platform naming conventions, framework choices, repository-specific patterns, how to apply F# knowledge in THIS codebase.
What this skill does NOT cover: F# syntax, language fundamentals, generic patterns (those are in ayokoding-web).
See: Programming Language Documentation Separation for content separation rules.
Quick Standards Reference
- Naming, DUs, Railway, Pipeline — naming conventions, discriminated unions, railway-oriented programming, pipeline operator
- Records, Async, Formatting, Testing — immutable records, async workflows, Fantomas formatting, Expecto/FsCheck testing
Comprehensive Documentation
Authoritative Index: docs/explanation/software-engineering/programming-languages/f-sharp/README.md
Mandatory Standards (All F# Code MUST Follow)
- Coding Standards - F# naming conventions, module organization, pipeline idioms
- Testing Standards - Expecto, FsCheck property-based testing, AltCover coverage
- Code Quality Standards - Fantomas, FSharpLint, exhaustive pattern matching
- Build Configuration - .fsproj file order, dotnet CLI, Nx integration
Context-Specific Standards (Apply When Relevant)
- Error Handling Standards - Result type, railway-oriented programming, computation expressions
- Concurrency Standards - Async workflows, MailboxProcessor, Task interop
- Functional Programming Standards - Computation expressions, monads, applicatives
- Type Safety Standards - DUs, units of measure, phantom types
- Performance Standards - Tail recursion, sequences, lazy evaluation
- Security Standards - Type-driven validation, Giraffe authentication
- API Standards - Giraffe HttpHandler composition, Saturn routing
- DDD Standards - DU-based domain modeling, making illegal states unrepresentable
Related Skills
- docs-applying-content-quality
- repo-practicing-trunk-based-development
References
1---2name: swe-programming-fsharp3description: F# coding standards from authoritative docs/explanation/software-engineering/programming-languages/f-sharp/ documentation4---56# F# Coding Standards78## Purpose910Progressive disclosure of F# coding standards for agents writing F# code.1112**Authoritative Source**: [docs/explanation/software-engineering/programming-languages/f-sharp/README.md](../../../docs/explanation/software-engineering/programming-languages/f-sharp/README.md)1314**Usage**: Auto-loaded for agents when writing F# code. Provides quick reference to idioms, best practices, and antipatterns.1516## Prerequisite Knowledge1718**IMPORTANT**: This skill provides **OSE Platform-specific style guides**, not educational tutorials.1920**You MUST understand F# fundamentals before using these standards.** Complete the AyoKoding F# learning path first:21221. **[F# Learning Path](../../../apps/ayokoding-www/content/en/learn/software-engineering/programming-languages/f-sharp/)** - Initial setup, language overview, quick start guide (0-95% language coverage)232. **[F# By Example](../../../apps/ayokoding-www/content/en/learn/software-engineering/programming-languages/f-sharp/by-example/)** - 75+ annotated code examples (beginner to advanced patterns)2425**What this skill covers**: OSE Platform naming conventions, framework choices, repository-specific patterns, how to apply F# knowledge in THIS codebase.2627**What this skill does NOT cover**: F# syntax, language fundamentals, generic patterns (those are in ayokoding-web).2829**See**: [Programming Language Documentation Separation](../../../repo-governance/conventions/structure/programming-language-docs-separation.md) for content separation rules.3031## Quick Standards Reference3233- [Naming, DUs, Railway, Pipeline](./reference/qs-naming-and-railway.md) — naming conventions, discriminated unions, railway-oriented programming, pipeline operator34- [Records, Async, Formatting, Testing](./reference/qs-records-async-testing.md) — immutable records, async workflows, Fantomas formatting, Expecto/FsCheck testing3536## Comprehensive Documentation3738**Authoritative Index**: [docs/explanation/software-engineering/programming-languages/f-sharp/README.md](../../../docs/explanation/software-engineering/programming-languages/f-sharp/README.md)3940### Mandatory Standards (All F# Code MUST Follow)41421. **[Coding Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/coding-standards.md)** - F# naming conventions, module organization, pipeline idioms432. **[Testing Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/testing-standards.md)** - Expecto, FsCheck property-based testing, AltCover coverage443. **[Code Quality Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/code-quality-standards.md)** - Fantomas, FSharpLint, exhaustive pattern matching454. **[Build Configuration](../../../docs/explanation/software-engineering/programming-languages/f-sharp/build-configuration.md)** - .fsproj file order, dotnet CLI, Nx integration4647### Context-Specific Standards (Apply When Relevant)48491. **[Error Handling Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/error-handling-standards.md)** - Result type, railway-oriented programming, computation expressions502. **[Concurrency Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/concurrency-standards.md)** - Async workflows, MailboxProcessor, Task interop513. **[Functional Programming Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/functional-programming-standards.md)** - Computation expressions, monads, applicatives524. **[Type Safety Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/type-safety-standards.md)** - DUs, units of measure, phantom types535. **[Performance Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/performance-standards.md)** - Tail recursion, sequences, lazy evaluation546. **[Security Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/security-standards.md)** - Type-driven validation, Giraffe authentication557. **[API Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/api-standards.md)** - Giraffe HttpHandler composition, Saturn routing568. **[DDD Standards](../../../docs/explanation/software-engineering/programming-languages/f-sharp/ddd-standards.md)** - DU-based domain modeling, making illegal states unrepresentable5758## Related Skills5960- docs-applying-content-quality61- repo-practicing-trunk-based-development6263## References6465- [F# README](../../../docs/explanation/software-engineering/programming-languages/f-sharp/README.md)66- [Functional Programming](../../../repo-governance/development/pattern/functional-programming.md)