Power-Fx
CLAUDE.md3.4k starsChanged 6 months agoMITView on GitHub
Power Fx is a low-code general-purpose programming language based on spreadsheet-like formulas. This is the open-source C# implementation used across Microsoft Power Platform. The codebase contains a complete compiler and interpreter. Build configurations: Debug/Release (single-target), Debug462/Release462 (net462 only), Debug70/Release70 (net7.0 only), DebugAll/ReleaseAll (multi-target, used by local build scripts). Separation of Compilation and Execution: Core compiles to IR with zero evaluation code. Multiple backends (JavaScript, SQL, etc.) can consume the same IR independently. Symbol Table Composition: Layered symbol tables (Config ->…
Trending
More talk lately.about the whole repository
Who's talking about microsoft/Power-Fx
- A Hacker News story“Microsoft Power Fx – A low-code general purpose programming language”Hacker News · Mar 3, 2021 · 395 points
- A Hacker News story“Microsoft Power-Fx – Low-code programming language”Hacker News · Mar 8, 2021 · 2 points
- A Hacker News story“Power Fx low-code programming language”Hacker News · Mar 2, 2021 · 2 points
- microsoft/PowerApps-Tooling“Directly pass through custom page schema files, and handle any validation in canvas”GitHub · Sep 15, 2022 · 1 reactions
- ECas95/canvas-app-visualizer“v0.2: Run the official Microsoft Power Fx engine locally in browser WebAssembly”GitHub · Oct 3, 2026
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub and Hacker News (22 times).
On GitHub · 19
- Sep 15, 2022Directly pass through custom page schema files, and handle any validation in canvas — microsoft/PowerApps-Tooling1 reaction · 2 comments
- Oct 3, 2026v0.2: Run the official Microsoft Power Fx engine locally in browser WebAssembly — ECas95/canvas-app-visualizer0 reactions
- Mar 21, 2025Reduce network calls when CDP results are returned — microsoft/Power-Fx-Dataverse0 reactions · 2 comments
- Jan 25, 2025feat(powerfx): Transform expressions to syntax tree. — hastebrot/2025-toy-compiler0 reactions
- Jan 24, 2025Dependency scan — microsoft/Power-Fx-Dataverse0 reactions · 2 comments
14 more on GitHub
- Jan 3, 2025Summarize() when grouping on Columns should propagate the display names. — microsoft/Power-Fx-Dataverse0 reactions
- Nov 19, 2024Update build numbers to use 1.99.0-local for local builds — microsoft/Power-Fx-Dataverse0 reactions · 1 comment
- Nov 19, 2024pickup fix to stabalize tests — microsoft/Power-Fx-Dataverse0 reactions · 1 comment
- Nov 16, 2024Get latest Fx — microsoft/Power-Fx-Dataverse0 reactions · 2 comments
- Oct 16, 2024Add CDP test with delegation — microsoft/Power-Fx-Dataverse0 reactions · 3 comments
- Jul 31, 2024working by adding nuget source of powerfx daily builds — rajyraman/Power-Fx-.NET-Interactive0 reactions · 1 comment
- Dec 12, 2023Sql: support OptionSetInfo — microsoft/Power-Fx-Dataverse0 reactions
- Oct 25, 2023你现在的工作快乐吗 — guevara/read-it-later0 reactions
- Oct 10, 2023Upgrade to 1.0 Power Fx — UiPath/CoreWF0 reactions · 1 comment
- Aug 7, 2023SQL compiler: updated Text compat — microsoft/Power-Fx-Dataverse0 reactions
- May 11, 2023Move Formula Columns resource strings out of PowerFx into Dataverse — microsoft/Power-Fx-Dataverse0 reactions · 1 comment
- Apr 20, 2023Standardize editor config — microsoft/Power-Fx-Dataverse0 reactions
- Oct 1, 2022Microsoft.DotNet.ApiCompat reports a false CannotChangeAttribute compat issue — dotnet/arcade0 reactions · 1 comment
- Dec 29, 2021Mac OS: The type initializer for 'Microsoft.PowerFx.Core.Texl.BuiltinFunctionsCore' threw an exception — microsoft/power-fx-host-samples0 reactions
On Hacker News · 3
- Mar 3, 2021Microsoft Power Fx – A low-code general purpose programming language395 points · 189 comments
- Mar 8, 2021Microsoft Power-Fx – Low-code programming language2 points
- Mar 2, 2021Power Fx low-code programming language2 points
In this repositoryOne other file it gives its agents.
- src/CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 140
Test projects organized into .Net4.6.2/ and .Net7.0/ folders with .Shared/ projects for shared code
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
Power Fx is a low-code general-purpose programming language based on spreadsheet-like formulas. This is the open-source C# implementation used across Microsoft Power Platform. The codebase contains a complete compiler and interpreter.
Build Commands
# Build (from repo root)
dotnet build src/Microsoft.PowerFx.sln
# Build specific configuration (Debug, Release, DebugAll, ReleaseAll, Debug462, Debug70)
dotnet build src/Microsoft.PowerFx.sln -p:Configuration=Release
# Run all tests
dotnet test src/Microsoft.PowerFx.sln
# Run tests for a specific project
dotnet test src/tests/Microsoft.PowerFx.Core.Tests.Shared/Microsoft.PowerFx.Core.Tests.Shared.csproj
# Run a single test by name
dotnet test src/Microsoft.PowerFx.sln --filter "FullyQualifiedName~YourTestName"
# Run tests by category
dotnet test src/Microsoft.PowerFx.sln --filter "Category=ExpressionTest"
# Build local NuGet packages (from src/ directory, outputs to src/outputpackages/)
.\src\buildLocalPackages.cmd [Configuration]
# Run tests on both net462 and net7.0 via VSTest (from src/ directory)
.\src\runLocalTests.cmd [Configuration]Build configurations: Debug/Release (single-target), Debug462/Release462 (net462 only), Debug70/Release70 (net7.0 only), DebugAll/ReleaseAll (multi-target, used by local build scripts).
Architecture
Compiler Pipeline
Expression Text -> [Lexer] -> Tokens -> [Parser] -> AST -> [Binder] -> Typed AST -> [IR Translator] -> IR -> [Interpreter/Backend] -> ResultCore Libraries
- Microsoft.PowerFx.Core - Compiler only (no evaluation)
Lexer/- Tokenization with culture-aware parsingParser/- Recursive descent parser producing AST nodes (Syntax/Nodes/)Binding/Binder.cs(~240KB) - Heart of semantic analysis, symbol resolution, type checkingTypes/DType.cs(~160KB) - Internal discriminated union type representation (viaDKindenum)IR/- Intermediate Representation with explicit coercion nodes, normalized operatorsTexl/Builtins/- Function signatures and type checking only (no implementations)Public/Engine.cs- Main entry point for compilationPublic/CheckResult.cs- Lazy compilation pipeline result
- Microsoft.PowerFx.Interpreter - Execution engine
EvalVisitor.cs- Walks IR tree to compute resultsFunctions/Library*.cs(~144KB) - Function implementationsRecalcEngine.cs- ExtendsEnginewith evaluation and reactive formulas
- Microsoft.PowerFx.Connectors - OpenAPI connector support for external APIs
- Microsoft.PowerFx.Json - JSON serialization/deserialization
- Microsoft.PowerFx.LanguageServerProtocol - LSP for IDE integration
- Microsoft.PowerFx.Repl - Read-Eval-Print-Loop
Key Architecture Patterns
Separation of Compilation and Execution: Core compiles to IR with zero evaluation code. Multiple backends (JavaScript, SQL, etc.) can consume the same IR independently.
Symbol Table Composition: Layered symbol tables (Config -> Engine -> Parameters) for flexible scoping:
SymbolTable(mutable) /ReadOnlySymbolTable(immutable, composable) for definitionsSymbolValuesfor runtime values paired with a SymbolTable
CheckResult Workflow:
var check = engine.Check(expressionText, parameterType);
check.ThrowOnErrors();
var result = check.Eval(); // Interpreter onlyType System: DType is the internal representation, FormulaType is the public API wrapper. CoercionMatrix.cs defines valid conversions, BinaryOpMatrix.cs defines operator type rules.
Display Names vs Logical Names: Dual tracking throughout - display names are user-facing/localized (e.g., "First Name"), logical names are internal identifiers (e.g., "nwind_firstname").
Naming: "Texl" = Power Fx
"Texl" is the internal codename (from Excel heritage). TexlFunction, TexlLexer, TexlParser all refer to Power Fx components.
Adding a New Built-in Function
- Define signature in
src/libraries/Microsoft.PowerFx.Core/Texl/Builtins/NewFunction.cs:- Extend
TexlFunction, implementCheckInvocationfor type checking - Register in
BuiltinFunctionsCore._library
- Extend
- Implement logic in
src/libraries/Microsoft.PowerFx.Interpreter/Functions/Library*.cs:- Return
FormulaValueresults - Register in appropriate
Librarycategory
- Return
- Add tests in
src/tests/Microsoft.PowerFx.Core.Tests.Shared/ExpressionTestCases/NewFunction.txt
Expression Test Cases
Tests use a .txt format in tests/Microsoft.PowerFx.Core.Tests.Shared/ExpressionTestCases/:
>> If(true, "yes", "no")
"yes"
>> 1+1
2
>> 1/0
Error({Kind:ErrorKind.Div0})BaseRunner.csis the test harness infrastructure- Tests run across multiple backends/configurations
- Special markers:
#skip,#error,#novalue - 60-second timeout per test
Important Concepts
- Cooperative Cancellation: Interpreter checks
CancellationTokenand callsGovernor.Poll()in loops to prevent runaway evaluation. - Immutability: Most core data structures (DType, IR nodes, bound trees) are immutable. Symbol tables are mutable but have version hashes to detect concurrent mutations.
- DPath: Represents paths through type structure (e.g., "record.field.subfield"), used for type navigation and error reporting.
- GuardSingleThreaded: Detects concurrent mutations of mutable structures in development builds.
- Feature Flags:
Featuresclass controls language behavior.Features.PowerFxV1is the current standard. Configured viaPowerFxConfig. - UDFs: User-defined functions support recursion with stack depth tracking. Added via
Engine.AddUserDefinedFunction().
Code Quality
- StyleCop analyzers enforce code style (configured in
src/PowerFx.ruleset, relaxed insrc/PowerFx.Tests.ruleset) - Warnings treated as errors in Release builds
- C# 10.0 language version, .editorconfig enforces formatting (4-space indent, CRLF, UTF-8 BOM)
- Multi-targets: .NET Standard 2.0, .NET Framework 4.6.2, .NET 7.0
- Tests use xUnit with aggressive parallelization
- Test projects organized into
.Net4.6.2/and.Net7.0/folders with.Shared/projects for shared code - Versioning via Nerdbank.GitVersioning (NBGV), config in
version.json(base version: 1.8)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

