Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f693fd3
docs: ADR batch for the agent object model
buchk Jul 22, 2026
76db9e5
feat: .tfer file format and a language server
buchk Jul 23, 2026
b1dbd6b
feat: typed-context semantics and tool dependencies
buchk Jul 23, 2026
b6c4df4
feat: capability exposure/visibility (ADR-0015)
buchk Jul 23, 2026
ec5b306
feat: sealing (mutability/presence) on skill bindings (ADR-0016)
buchk Jul 23, 2026
1b06575
feat: invocation-mode skill variants (ADR-0012)
buchk Jul 23, 2026
53e42f8
feat: fuller LSP — completion, definition, symbols, composition diagn…
buchk Jul 23, 2026
d2957e6
example: repo-agent exercising the full object model
buchk Jul 23, 2026
8a544ad
style: gofmt map-literal alignment in lsp server
buchk Jul 23, 2026
28b82f5
refactor: drop the C# implementation; Go is the sole implementation (…
buchk Jul 23, 2026
3055cf3
chore: remove stray codex attachment, gitignore the scratch dir
buchk Jul 23, 2026
6d0efcb
refactor: migrate examples/helio to the .tfer format
buchk Jul 23, 2026
4f0ce05
refactor: migrate examples/repo-agent to .tfer
buchk Jul 23, 2026
927cdec
refactor: migrate the self-hosted maintainer to .tfer
buchk Jul 23, 2026
88dc5b5
feat: emit callable-resource cards from exposed capabilities (ADR-0018)
buchk Jul 23, 2026
d0fd461
feat: callable card renders the a2a variant; accept implemented ADRs
buchk Jul 23, 2026
5b5aeec
feat: allowedContextTypes gating and per-variant requirements (ADR-00…
buchk Jul 23, 2026
d516bc9
feat: variant fan-out — per-mode SKILL.md in the neutral bundle (ADR-…
buchk Jul 23, 2026
a046e75
feat: schema-directed context fields (ADR-0013)
buchk Jul 23, 2026
bdfb34f
feat: VS Code editor client for the language server
buchk Jul 23, 2026
106b981
feat: publish edge verb (ADR-0018)
buchk Jul 23, 2026
c588531
feat: emit held context objects in the neutral bundle (ADR-0013)
buchk Jul 23, 2026
b2c79df
example: helio adopts the object-model features
buchk Jul 23, 2026
7dbe252
feat: inline held context content into compiled artifacts (ADR-0013)
buchk Jul 23, 2026
e6917b6
feat: targets select a surface-appropriate variant; deliver instructi…
buchk Jul 23, 2026
d434d9c
fix: refresh the maintainer definition for the Go-only pivot
buchk Jul 23, 2026
759e877
fix: review findings — wasm artifact, requiredFields, pathToURI, seal…
buchk Jul 23, 2026
183f4ba
feat: schema-directed field-type checking and a complete callable card
buchk Jul 23, 2026
009c00f
feat: callable card lists each capability's required tools (ADR-0017)
buchk Jul 23, 2026
d0b8b31
feat: emit conformant A2A Agent Cards and MCP tool manifests (ADR-0018)
buchk Jul 23, 2026
d4f9924
feat: ARD catalog carries official-typed A2A and MCP entries (ADR-0018)
buchk Jul 23, 2026
038cccc
feat: pure-standard ai-catalog.json + project manifest (no proprietar…
buchk Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 25 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,6 @@ on:
pull_request:

jobs:
build-test-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: dotnet restore TypeFerence.slnx
- run: dotnet build TypeFerence.slnx --no-restore --configuration Release
- run: dotnet test TypeFerence.slnx --no-build --configuration Release
- run: dotnet src/TypeFerence.Cli/bin/Release/net10.0/typeference.dll build examples/helio --target all --out dist-ci-1 --emit-ard --publisher-domain helio.example
- run: dotnet src/TypeFerence.Cli/bin/Release/net10.0/typeference.dll build examples/helio --target all --out dist-ci-2 --emit-ard --publisher-domain helio.example
- run: diff -qr dist-ci-1 dist-ci-2
- run: pip install -r tools/requirements-docs.txt
- run: python tools/render_whitepaper.py
- run: cp output/pdf/typeference-whitepaper.pdf /tmp/typeference-whitepaper-first.pdf
- run: python tools/render_whitepaper.py
- run: cmp /tmp/typeference-whitepaper-first.pdf output/pdf/typeference-whitepaper.pdf
- run: sudo apt-get update && sudo apt-get install -y poppler-utils
- run: pdfinfo output/pdf/typeference-whitepaper.pdf

go-implementation:
runs-on: ubuntu-latest
steps:
Expand All @@ -44,8 +20,10 @@ jobs:
working-directory: go
- run: go test ./...
working-directory: go
- name: Static binary (CGO_ENABLED=0)
run: CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /tmp/typeference ./cmd/typeference
- name: Static binaries (CGO_ENABLED=0)
run: |
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /tmp/typeference ./cmd/typeference
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /tmp/typeference-lsp ./cmd/typeference-lsp
working-directory: go
- name: Go binary reproduces committed reference output byte-for-byte
run: /tmp/typeference diff examples/helio --against dist --emit-ard --publisher-domain helio.example
Expand All @@ -56,31 +34,21 @@ jobs:
GOOS=js GOARCH=wasm go build ./cmd/typeference-wasm
go run ./cmd/playground-pack -root .. -out /tmp/examples.json
working-directory: go
# NOTE: BETH pack/score is intentionally NOT gating CI yet. The harness is
# unproven end to end (no real judged run has been collected), and an
# offline pack+score observes nothing — a green scorecard there would be
# vacuous (see ADR-0009 and score.go's judged-coverage requirement). Wire
# it back in once a real run is exercisable in CI or on the dev machine.

# Cross-implementation conformance: both compilers run the shared fixture
# corpus in conformance/; a digest mismatch on any fixture is a broken
# build. See conformance/README.md and ADR-0005.
conformance:
# Determinism suite: the Go compiler compiles the shared fixture corpus in
# conformance/ and must reproduce the committed digests. This is the
# single-implementation successor to the cross-implementation suite; the
# fixtures and canonicalization rulings (ADR-0004) are unchanged (ADR-0014).
determinism:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- uses: actions/setup-go@v5
with:
go-version: stable
cache-dependency-path: go/go.sum
- name: Conformance suite (Go implementation)
run: go test ./conformance -v
- run: go test ./conformance -v
working-directory: go
- name: Conformance suite (C# reference implementation)
run: dotnet test TypeFerence.slnx --filter FullyQualifiedName~ConformanceSuiteTests

# The repository-root AGENTS.md and dist-maintainer are build artifacts of
# agents/maintainer (the self-hosted maintainer definition). Drift between
Expand All @@ -98,3 +66,18 @@ jobs:
working-directory: go
- name: Root AGENTS.md is the compiled artifact
run: cmp AGENTS.md dist-maintainer/neutral/typeference-maintainer/AGENTS.md

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r tools/requirements-docs.txt
- run: python tools/render_whitepaper.py
- run: cp output/pdf/typeference-whitepaper.pdf /tmp/typeference-whitepaper-first.pdf
- run: python tools/render_whitepaper.py
- run: cmp /tmp/typeference-whitepaper-first.pdf output/pdf/typeference-whitepaper.pdf
- run: sudo apt-get update && sudo apt-get install -y poppler-utils
- run: pdfinfo output/pdf/typeference-whitepaper.pdf
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ permissions:
contents: write

jobs:
# Nothing ships unless both implementations, the shared conformance suite,
# and the self-host drift gate are green at the tagged commit.
# Nothing ships unless the test suite, the determinism suite, and the
# self-host drift gate are green at the tagged commit.
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- uses: actions/setup-go@v5
with:
go-version: stable
cache-dependency-path: go/go.sum
- run: dotnet test TypeFerence.slnx
- run: go test ./...
working-directory: go
- name: Self-host drift gate
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ __pycache__/
web/playground/typeference.wasm
web/playground/wasm_exec.js
web/playground/examples.json

# Codex remote attachment scratch
.codex-remote-attachments/
go/typeference-wasm
*.wasm
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ The agent that maintains the TypeFerence repository, defined in TypeFerence's ow
- Where the specification and an implementation disagree, the specification wins; record the ruling in docs/decisions and cover it with a conformance fixture.
- Every canonicalization or composition ruling ships with a fixture under conformance/fixtures in the same change.
- Never silently diverge from the specification; fixing the specification is allowed, silent divergence is not.
- Any change to code generation must keep the C# and Go implementations byte-identical, verified by the conformance suite before merge.
- Any change to code generation must reproduce the committed digests, verified by the determinism suite before merge.
- Never weaken determinism, provenance, or fail-closed behavior to make a change easier.
- A conformance digest is regenerated only together with the specification change and ADR that justify it; never hand-edit a digest.
- Repeated builds from identical source must stay byte-identical on every platform.
- The signature map always resides outside the source root; moving it inside creates a digest/signature cycle and is forbidden.
- signatureIntent.required fails closed; the unsigned-staging option exists solely to emit payloads for an external signer.
- TypeFerence imports externally produced signatures; it never signs, never verifies cryptographic validity, and never resolves keys.
- Trust metadata is declarative; never dereference identity, attestation, or provenance URIs during compilation.
- Every commit builds and passes both implementations' test suites and the shared conformance suite.
- Every commit builds and passes the test suite and the determinism suite.
- Decisions with real tradeoffs are recorded as ADRs in docs/decisions before the change merges.
- Documentation must be accurate against the code at the commit that includes it; no fabricated adoption, benchmarks, or endorsements.
- Commit messages are conventional and written for a critical human reader.
Expand All @@ -28,5 +28,5 @@ The agent that maintains the TypeFerence repository, defined in TypeFerence's ow
## Available skills

- `typeference-maintainer.audit-drift`: Confirms the committed AGENTS.md and maintainer bundle are exact build artifacts of this definition.
- `typeference-maintainer.verify-conformance`: Runs the shared conformance suite on both implementations and reports any digest disagreement.
- `typeference-maintainer.verify-conformance`: Runs the determinism suite and reports whether the compiler reproduces the committed digests.

22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ versioning. Tool versions (this file) are independent of the typed-resource
TypeFerence is an experimental reference implementation; pre-1.0 versions make no
compatibility promises between minor versions.

## [Unreleased]

### Changed

- **Go-only implementation** ([ADR-0014](docs/decisions/0014-go-only-implementation.md)).
The C# reference implementation was retired; the Go implementation is now the
sole implementation. The specification stays normative in principle. The
cross-implementation conformance suite becomes a single-implementation
golden-file determinism suite over the same fixtures — the determinism
guarantee is unchanged.

### Added

- **`.tfer` source format** and object-model constructs (ADRs 0012–0019):
invocation-mode skill variants, user-defined typed context (`contextType`
refinement, context held by id, `requiresContextTypes`), tools as extern
declarations (`requiresTools`), capability exposure/visibility, and sealing
(`sealed`/`required` bindings). All additive and opt-in.
- **Language server** (`typeference-lsp`): authoring and composition
diagnostics, completion, go-to-definition, and document symbols for `.tfer`
and `.yaml` sources.

## [0.0.4] - 2026-07-15

### Added
Expand Down
11 changes: 0 additions & 11 deletions Directory.Build.props

This file was deleted.

27 changes: 11 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
# TypeFerence build entry points. Requires: Go 1.24+, .NET 10 SDK (reference
# implementation only). All artifacts are deterministic; run `make conformance`
# to verify both implementations agree byte-for-byte.
# TypeFerence build entry points. Requires: Go 1.24+ and nothing else. All
# artifacts are deterministic; run `make conformance` to verify the compiler
# reproduces the committed digests byte-for-byte (ADR-0014).

GO ?= go
DOTNET ?= dotnet
VERSION ?= dev
GOFLAGS := -trimpath
LDFLAGS := -s -w -X main.version=$(VERSION)
BINDIR := bin

.PHONY: all build build-go build-dotnet test test-go test-dotnet conformance \
.PHONY: all build build-go build-lsp test test-go conformance \
selfhost selfhost-check fmt vet clean release-binaries playground

all: build test

build: build-go build-dotnet
build: build-go build-lsp

# Single static binary, no runtime dependencies.
build-go:
cd go && CGO_ENABLED=0 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o ../$(BINDIR)/typeference$(shell $(GO) env GOEXE) ./cmd/typeference

build-dotnet:
$(DOTNET) build TypeFerence.slnx
# Language server for .tfer/.yaml authoring diagnostics (internal/lsp).
build-lsp:
cd go && CGO_ENABLED=0 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o ../$(BINDIR)/typeference-lsp$(shell $(GO) env GOEXE) ./cmd/typeference-lsp

test: test-go test-dotnet
test: test-go

test-go:
cd go && $(GO) test ./...

test-dotnet:
$(DOTNET) test TypeFerence.slnx

# Cross-implementation conformance: both compilers run the shared fixture
# corpus; digests must match the manifests and each other.
# Determinism suite: the compiler compiles the shared fixture corpus and must
# reproduce the committed digests (ADR-0014).
conformance:
cd go && $(GO) test ./conformance -run TestConformance -v
$(DOTNET) test TypeFerence.slnx --filter FullyQualifiedName~ConformanceSuiteTests

# Recompile the self-hosted maintainer definition (agents/maintainer) into its
# committed artifacts: dist-maintainer and the repository-root AGENTS.md.
Expand All @@ -50,7 +46,6 @@ selfhost-check: build-go

fmt:
cd go && gofmt -l -w .
$(DOTNET) format TypeFerence.slnx

vet:
cd go && $(GO) vet ./...
Expand Down
47 changes: 17 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,33 +137,22 @@ what "No differences." means. `eval` and `equivalence` are covered in
[Behavioral evals](#behavioral-evals) below; both default to a dry run that
never makes a network call.

## Two implementations, one specification

The C# implementation under `src/` is the reference implementation; the Go
implementation under `go/` is an independent second implementation. Both compile
identical source to **byte-identical artifacts**, enforced by a shared conformance
suite ([conformance/](conformance/README.md)) that runs on both implementations in
CI — expected digests are generated by one implementation and independently
verified by the other. That suite is what makes the
[specification](docs/specification.md) real rather than aspirational.

### Reference implementation (C#)

Requires the .NET 10 SDK.

```powershell
dotnet build TypeFerence.slnx
dotnet src/TypeFerence.Cli/bin/Debug/net10.0/typeference.dll validate examples/helio
dotnet src/TypeFerence.Cli/bin/Debug/net10.0/typeference.dll serve dist/neutral
```

The MCP server (`typeference serve`) is currently implemented in the reference
implementation only. It exposes tools such as:

- `executive-assistant.prepare-brief`
- `payments-repo-agent.repository-status`

Calls return a deterministic invocation package for the host agent. TypeFerence does not embed an LLM provider.
## One implementation, one specification

The Go implementation under `go/` is the reference implementation. The
[specification](docs/specification.md) stays normative in principle — the
abstraction is the contract, and anyone may realize it differently — but this
repository's Go compiler is the one living answer ([ADR-0014](docs/decisions/0014-go-only-implementation.md)).
Determinism is preserved and made visible by the
[conformance suite](conformance/README.md): the compiler must reproduce the
committed digests byte-for-byte.

An earlier C# reference implementation was retired when the project committed to
being a tool rather than a multi-implementation standard. Determinism — the
property that makes `diff` and the committed-digest guarantee real — is a property
of one good compiler and was unaffected; only the second implementation, and the
cross-implementation half of the conformance suite, went away. TypeFerence embeds
no LLM provider and holds no deployment state.

## Self-hosting

Expand Down Expand Up @@ -220,8 +209,7 @@ TypeFerence does not hold signing keys. An external signer can produce detached

## Repository map

- `src/` - C# reference implementation: compiler, target adapters, CLI, and MCP runtime.
- `go/` - independent Go implementation: compiler, target adapters, CLI, and eval harness.
- `go/` - the Go implementation: compiler, target adapters, CLI, language server (`cmd/typeference-lsp`), and eval harness.
- `conformance/` - shared cross-implementation conformance fixtures (byte-identity contract).
- `examples/helio/` - fictional cross-domain organization.
- `web/playground/` - browser playground: the Go compiler built for `js/wasm`, plus the BETH operator console.
Expand All @@ -230,7 +218,6 @@ TypeFerence does not hold signing keys. An external signer can produce detached
- `docs/specification.md` - normative v3 behavior.
- `docs/decisions/` - architecture decision records.
- `docs/whitepaper.md` and `output/pdf/typeference-whitepaper.pdf` - design paper.
- `tests/` - C# test suite: type system, targets, determinism, conformance runner, MCP integration.
- `CHANGELOG.md` and `docs/release-checklist.md` - versioning and release process.

## Design boundaries
Expand Down
5 changes: 0 additions & 5 deletions TypeFerence.slnx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
schemaVersion: 3
kind: agent
id: typeference/typeference-maintainer@0.1.0
Expand All @@ -12,3 +13,4 @@ slots:
repositoryMap: context/repository-map.md
contextFiles:
- context/repository-map.md
---
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
schemaVersion: 3
kind: capability
id: typeference/capabilities/audit-drift@0.1.0
displayName: Audit Self-Host Drift
description: Recompile the maintainer definition and report drift against the committed artifacts.
inputSchema: '{"type":"object","additionalProperties":false}'
outputSchema: '{"type":"object","properties":{"clean":{"type":"boolean"},"driftedFiles":{"type":"array","items":{"type":"string"}}},"required":["clean","driftedFiles"]}'
---
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
schemaVersion: 3
kind: capability
id: typeference/capabilities/verify-conformance@0.1.0
displayName: Verify Conformance
description: Run both implementations against the shared conformance suite and report agreement.
description: Run the determinism suite and report whether the compiler reproduces the committed digests.
inputSchema: '{"type":"object","additionalProperties":false}'
outputSchema: '{"type":"object","properties":{"passed":{"type":"boolean"},"mismatches":{"type":"array","items":{"type":"string"}}},"required":["passed","mismatches"]}'
---
5 changes: 2 additions & 3 deletions agents/maintainer/context/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

- Work on feature branches; never rewrite published history; never tag or publish a
release outside the checklist in `docs/release-checklist.md`.
- Before any commit: `dotnet test TypeFerence.slnx`, `go test ./...` (from `go/`),
and the conformance suite (`make conformance`) all pass. A commit that breaks any
of them does not land.
- Before any commit: `go test ./...` (from `go/`) and the determinism suite
(`make conformance`) both pass. A commit that breaks either does not land.
- Design decisions with real tradeoffs — spec semantics, canonical bytes, trust
model, dependencies — are recorded in `docs/decisions/` as numbered ADRs in the
same change.
Expand Down
Loading
Loading