tooling · v1.3
The v1.3 agent-tooling surface
A language is agent-friendly to the extent that agents can read its programs and apply its diagnostics. fastC v1.3 ships the tooling for both.
Five CLI subcommands, one unified diagnostic envelope, and an LSP. Each piece is structured to be machine-consumable first and human-consumable second — the reverse of how most language toolchains evolved.
fastc explain
Emits a JSON document of every fn's public surface:
signature, required capabilities, purity / panics annotations,
contracts. The v1.3 release adds a modules array
listing the project's module graph. This is the stable
agent-facing artifact — agent loops should read
fastc explain output, not parse compiler stderr.
{
"module": "myapp",
"functions": [
{
"name": "main",
"signature": "fn main(caps: Caps) -> i32",
"caps_required": ["CapFsRead"],
"purity": "impure",
"panics": ["E_OOM"],
"requires": [],
"ensures": []
}
],
"modules": ["cli", "log", "json"]
} Full reference: docs.skelfresearch.com/fastc/cli/explain/
fastc context
Dumps the project's pub type surface — every
exported struct, enum, function signature, and constant — as
markdown or JSON, optimized for AI context windows. Where
explain is exhaustive, context is
budget-aware: it deduplicates, abbreviates, and ranks by
likely-relevance to a query. Pair with
fastc explain when you need the agent to edit
the project, not just read it.
Full reference: docs.skelfresearch.com/fastc/cli/context/
fastc diff
Semantic AST-level diff between two snapshots. Reports added,
removed, and signature-changed pub items. CI gates
consume the JSON output to enforce semver: a removed pub item
forces a major bump; an added one forces a minor.
fastc diff is the structural answer to "did this
commit break the public API".
Full reference: docs.skelfresearch.com/fastc/cli/diff/
fastc fix
Applies the Fixit registry's structured fixes — currently the
missing-; insertion — plus the universal mechanical
fix (re-run fastc fmt). The Fixit registry is the
same mechanism the LSP surfaces as Quick Fix actions; running
fastc fix on a project in CI gives you the same
edits an editor would.
Full reference: docs.skelfresearch.com/fastc/cli/fix/
fastc mcp
A stdio JSON-RPC 2.0 server exposing the five agent-relevant
tools as MCP endpoints: explain, check,
caps_summary, context, diff.
Wire it into Claude Code or Cursor with a one-line config:
{
"mcpServers": {
"fastc": {
"command": "fastc",
"args": ["mcp"]
}
}
} Full reference: docs.skelfresearch.com/fastc/cli/mcp/
Unified diagnostic envelope
Every fastC diagnostic — compile error, P10 violation, capability violation, contract violation, discharge failure — serializes through one JSON shape. Editors, CI gates, and agent loops parse one envelope instead of five.
{
"kind": "compile_error",
"rule_id": "E_PARSE",
"severity": "error",
"span": { "file": "foo.fc", "start": 10, "end": 12 },
"message": "expected ;",
"hint": "add a semicolon"
}
Available via --output-format=json on
compile, fmt, and check.
The rule_id is the stable handle agents use to map
diagnostics back to documented rule codes.
LSP capabilities
fastc-lsp ships as part of the v1.3 release. The
server advertises:
- Code-actions. Every Fixit in the registry
surfaces as a Quick Fix. Saving with auto-fix-on-save applies
the same edits
fastc fixwould. - Semantic tokens. fastC-specific highlighting
that knows about
@purity,@panics, and capability parameters. Capability params highlight in the same color across signatures and call sites. - Workspace rename. Driven by the resolver's symbol table, so renames are correct across modules. The resolver's two-pass design (declare, then resolve) means rename never partially-applies on a file with a syntax error elsewhere.
Editor configuration: docs.skelfresearch.com/fastc/getting-started/editor-setup/