capability

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package capability is the D-11 language capability descriptor: the machine-readable half of the "language capability matrix" (the other half is the human-readable docs/LANGUAGE-CAPABILITY-MATRIX.md, which this package's own consistency test — matrix_test.go — keeps mirrored to this file exactly, coverage value for coverage value, gap for gap).

D-11 (05-CONTEXT.md): "Ship a language capability matrix — both a committed human-readable doc and a machine-readable capability descriptor per language (extraction / resolution / dispatch / routing: full | partial | none). Priority-4 = full across the board; mainstream-6 = extraction + best-effort resolution, every gap named. 'Documented- partial' (LANG-06) means the gap is written down in the matrix, not silently missing."

Every entry below is populated from the ACTUAL coverage each language's own plan SUMMARY reported (05-04..05-12), not from aspiration — a "full" value is never claimed unless that plan's own SUMMARY (and, for priority-4, a corresponding golden-parity test in testdata/golden) backs it up. Gaps is deliberately not restricted to non-full axes only: an otherwise-"full" axis may still carry a documented heuristic boundary (e.g. Java's PascalCase/camelCase call-qualifier disambiguation) — D-11's "documented-partial means written down" discipline applies to every honestly-discovered limitation, not only ones severe enough to drop a coverage value.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() map[string]CapabilityEntry

All returns a defensive copy of the full capability descriptor, keyed by language ID — callers may range over it freely without risk of mutating the package-level matrix.

Types

type CapabilityEntry

type CapabilityEntry struct {
	Extraction Coverage
	Resolution Coverage
	Dispatch   Coverage
	Routing    Coverage
	Gaps       []string
}

CapabilityEntry describes one language's D-11 coverage across the four capability axes tracked since Phase 5:

  • Extraction: does this language's extractor turn source into the shared codegraph vocabulary (nodes + intra-file edges)?
  • Resolution: does cross-file symbol resolution connect a reference (call/embeds) to its target declaration?
  • Dispatch: does interface->implementation dispatch synthesis (RES-02, 05-09) apply to this language, and does it work within its declared scope? A language with no declared-interface construct is "none", not "full" — dispatch never fires, there is nothing to be full of.
  • Routing: does a framework-aware route detector (LANG-07, 05-12) exist and fire for this language?

Gaps names every documented limitation this language's own plan SUMMARY recorded — see the package doc comment for why this is not restricted to non-full axes only.

func Lookup

func Lookup(id string) (CapabilityEntry, bool)

Lookup returns the CapabilityEntry registered for id, if any.

type Coverage

type Coverage string

Coverage is the full|partial|none coverage level for one capability axis.

const (
	// CoverageFull means this axis is validated end-to-end for this
	// language: priority-4 languages via a corresponding golden-parity
	// test (testdata/golden), mainstream-tier languages via their own
	// extraction/resolution test suite reaching the full bar for that
	// specific axis (e.g. a mainstream language's Dispatch axis is "full"
	// only when it both emits an interface-shaped node AND resolves the
	// declared-conformance reference within its own documented resolution
	// scope).
	CoverageFull Coverage = "full"
	// CoveragePartial means this axis works within an explicitly bounded,
	// named scope (see Gaps) — extraction/resolution/dispatch/routing is
	// real and tested, but does not cover every case a full-fidelity
	// implementation would.
	CoveragePartial Coverage = "partial"
	// CoverageNone means this axis does not apply or is not implemented
	// for this language — always paired with a named gap explaining why
	// (e.g. "no framework route detector exists for this language" or
	// "this language has no declared-interface construct").
	CoverageNone Coverage = "none"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL