swe-programming-fsharp
F# coding standards from authoritative docs/explanation/software-engineering/programming-languages/f-sharp/ documentation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
F# coding standards from authoritative docs/explanation/software-engineering/programming-languages/f-sharp/ documentation
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
AI agent development standards including frontmatter structure, naming conventions, tool access patterns, model selection, and reference documentation structure
UI development skill covering design token usage, shadcn/ui + Radix composition patterns, accessibility requirements, anti-patterns catalog, and brand context for OrganicLever and OSE Platform. Auto-loads when working on TSX components, CSS, or UI design tasks.
Comprehensive project planning standards for plans/ directory including folder structure (ideas/, backlog/, in-progress/, done/), stage-aware naming convention (done uses YYYY-MM-DD__identifier/; backlog and in-progress use identifier/ with no date prefix), five-document file organization (README.md, brd.md, prd.md, tech-docs.md, delivery.md for multi-file default; single README.md for trivially-small single-file exception), BRD/PRD content-placement rules, Gherkin acceptance criteria, and the mandatory structured multiple-choice grilling gates (pre-write and post-write) for resolving design decisions with the user. Essential for creating structured, executable project plans.
Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, goal, termination, inputs, outputs), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.
Trunk Based Development workflow - all development on main branch with small frequent commits, minimal branching, and continuous integration. Covers when branches are justified (exceptional cases only), commit patterns, feature flag usage for incomplete work, environment branch rules (deployment only), and AI agent default behavior (the repo-wide default delivery mode is `worktree-to-pr` -- a short-lived plan branch in a disposable worktree pushed to a draft PR; direct push to main remains available as an explicit selection). Essential for understanding repository git workflow and keeping branches short-lived
Common software development workflow patterns shared across all language developer agents
| name | swe-programming-fsharp |
| description | F# coding standards from authoritative docs/explanation/software-engineering/programming-languages/f-sharp/ documentation |
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.
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:
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.
Modules/Types/DUs: PascalCase - ZakatCalculator, MurabahaContract, PaymentResult
Functions/Values: camelCase - calculateZakat, totalAmount, validateContract
DU Cases: PascalCase - Due, BelowNisab, ValidationError
Predicate functions: isValid, hasPayments (boolean-returning functions prefixed with is/has)
// CORRECT: DU for domain states (exhaustive)
type ZakatResult =
| Due of amount: decimal
| BelowNisab
| ValidationError of message: string
// CORRECT: Exhaustive pattern matching (compiler enforced)
let handleResult result =
match result with
| Due amount -> sprintf "Zakat due: %M" amount
| BelowNisab -> "Below nisab threshold"
| ValidationError msg -> sprintf "Error: %s" msg
// CORRECT: Result type for error handling
let calculateZakat (wealth: decimal) (nisab: decimal) : Result<decimal, string> =
if wealth < 0m then
Error "Wealth cannot be negative"
elif wealth >= nisab then
Ok (wealth * 0.025m)
else
Ok 0m
// CORRECT: Computation expression for chaining
let processPayment (wealth: decimal) (nisab: decimal) =
result {
let! zakatAmount = calculateZakat wealth nisab
let! validated = validateAmount zakatAmount
return! saveZakat validated
}
// CORRECT: Use |> for readable pipelines
let totalZakat =
wealthAmounts
|> List.filter (fun w -> w >= nisabThreshold)
|> List.map (fun w -> w * 0.025m)
|> List.sum
// CORRECT: Function composition with >>
let calculateAndValidate = calculateZakat >> validateZakat
// CORRECT: Record type for value objects
type ZakatCalculation = {
Wealth: decimal
Nisab: decimal
Amount: decimal
CalculationDate: DateOnly
}
// CORRECT: Record copy expression (non-destructive update)
let updated = { calculation with Amount = newAmount }
// CORRECT: F# async computation expression
let calculateAsync wealth nisab = async {
let! nisabValue = repository.GetNisabAsync()
let result = calculateZakat wealth nisabValue
return result
}
// CORRECT: Running async
let result = calculateAsync 10000m 5000m |> Async.RunSynchronously
// CORRECT: Task interop
let taskAsync = calculateAsync 10000m 5000m |> Async.StartAsTask
// CORRECT: Fantomas-formatted code
let calculate (wealth: decimal) (nisab: decimal) =
if wealth >= nisab then
wealth * 0.025m
else
0m
// Run: dotnet fantomas . (formats all F# files)
// Pre-commit: fantomas --check . (fails if not formatted)
open Expecto
let zakatTests =
testList "ZakatCalculator" [
test "calculates 2.5% when above nisab" {
let result = calculateZakat 10000m 5000m
Expect.equal result (Ok 250m) "Should return 2.5% of wealth"
}
test "returns 0 when below nisab" {
let result = calculateZakat 1000m 5000m
Expect.equal result (Ok 0m) "Should return 0 below nisab"
}
]
[<EntryPoint>]
let main args = runTestsWithCLIArgs [] args zakatTests
open FsCheck
let zakatProperties =
testList "ZakatCalculator properties" [
testProperty "zakat is always non-negative" <| fun (wealth: decimal) ->
let nisab = 5000m
match calculateZakat (abs wealth) nisab with
| Ok amount -> amount >= 0m
| Error _ -> true
testProperty "zakat is exactly 2.5% when above nisab" <| fun (wealth: decimal) ->
wealth > 5000m ==>
(calculateZakat wealth 5000m = Ok (wealth * 0.025m))
]
Authoritative Index: docs/explanation/software-engineering/programming-languages/f-sharp/README.md