Architecture · canonical lifecycle

Architecture

Foundgine keeps meaning, authority and physical execution separate. Every transport and provider fits around the same core lifecycle.

Canonical lifecycle

Foundgine canonical architecture showing caller and intent, semantic model, semantic operation graph, parallel retrieval, resolution, authorization, plan binding, execution IR, provider, execution and evidence.

The diagram is the reference map for the entire site. Other pages zoom into individual sections rather than defining alternate pipelines.

Semantic model

The .NET Foundgine.Core package and Java foundgine-core module own the provider-independent semantic contracts: entities, fields, relationships, intent, resolution, validation, capabilities and authorization structures. The semantic model describes application meaning, not storage implementation. The package and Java package names differ, but the architectural boundary is shared.

Metadata

Structural metadata describes what exists in the underlying model. .NET uses a source generator; Java uses an annotation processor. Both can produce runtime metadata at compile time, but the generated type names and build integration differ. Java also has a fluent FoundgineModelConfiguration<T> API. Metadata helps build the semantic model; it does not replace semantic design.

Read Metadata → Semantics and AOT for the implementation details.

Retrieval and resolution

Retrieval is a candidate-discovery stage. Relational lookup, fuzzy matching, full-text, optional BM25 and optional graph similarity can provide candidates plus provenance. Resolution decides what those candidates mean against the semantic contract.

Retrieval is evidence. Resolution establishes meaning. Authorization establishes authority.

For free-form language, see Lexical grounding and Grounding decisions.

Authorization and plan binding

Authorization evaluates the resolved semantic operation graph before provider-specific planning. The resulting decision is bound to the plan through its semantic and authorization fingerprints.

Optimization can change physical shape, but it must preserve the authorization binding. The final execution gate checks that the provider artifact still conforms to the exact execution representation it came from.

Execution and providers

The .NET Foundgine.Runtime package and Java foundgine-runtime module orchestrate execution. The .NET Foundgine.Providers package and Java foundgine-providers module supply SQL/JDBC, InMemory and retrieval providers. ORM adapters are EF Core for .NET and JPA/Hibernate for Java; their capability status is tracked separately. The extension surfaces include Hot Chocolate GraphQL for .NET and GraphQL Java for Java. Optional Spring Boot and LangChain4j modules have source and tests, but their dependency pins and runtime verification remain pending. Java's separate foundgine-migrations source module generates PostgreSQL/Flyway schema migrations from metadata; it is developer tooling, not a runtime provider, and its Maven/runtime verification remains pending.

Provider code owns physical concerns. It does not redefine the application's semantic authorization policy.

Adapters

GraphQL, JSON and MCP integrations are callers/adapters around the same boundary. .NET includes Microsoft.Extensions.AI and Microsoft Agent Framework adapters in Foundgine.Providers; Java includes LangChain4j in foundgine-providers. Full build/runtime verification remains pending for this snapshot. Adapters translate their native request shape into Foundgine intent and receive the resulting application-controlled execution.

Security invariant

Untrusted intent
      ↓
Semantic resolution
      ↓
Authorization
      ↓
Security-preserving plan
      ↓
Provider conformance
      ↓
Execution

Capability discovery is descriptive. It never replaces authorization.