Engine architecture
Software facts, intent, work, and verification connected through a change.
Three connected representations
Engine combines a model of existing software with representations of intended behaviour and executable work. A change keeps references across all three, so an operation and its checks can be traced to an agreed constraint and the software it affects.
The software graph provides the source-backed foundation. The integrated workflow connecting it to LMIR, Work IR, and verification remains under development. The architecture below describes the contracts these layers need to share.
A shared semantic interface
A software change crosses several kinds of knowledge. A person knows the desired outcome. Analysis establishes facts about the existing system. A model can interpret ambiguity and propose decisions. Tools apply changes. Tests and other observations assess the result.
Engine connects these stages through explicit representations. Each stage receives a defined input, produces an inspectable output, and retains references to the information it used. A source object can be shared by the intent specification, the operation that edits it, and the check that evaluates the change.
This gives tools and models a common subject to work on. A model can propose a constraint, an analyzer can resolve its target, and an executor can assess whether the target still satisfies its preconditions. The representations preserve the connection even when different actors perform those steps.
The important contract is semantic: what an object means, which revision it describes, which decisions are settled, and what evidence supports a result. A serialization alone cannot establish that contract.
Software understanding
Definitions, references, calls, interfaces, types, and dependencies supply facts about a codebase. Analysis coverage determines which of these an analyzer can establish. Dynamic relationships and unresolved references must remain visible.
The software-understanding layer records objects and relationships in a local SQLite graph. Language and framework plugins populate the model; CLI, MCP, and REST interfaces expose discovery and traversal. Source ranges connect a returned fact to its evidence.
A useful query result needs the source revision, analysis coverage, supporting locations, and unresolved relationships. After an edit, a result from the earlier revision needs to be refreshed or identified as stale. A graph alone does not establish runtime behaviour.
Intent: LMIR
LMIR records agreed behaviour, constraints, software references, and decisions that remain open. Lowering resolves ambiguity in stages: a request becomes a behaviour, then constraints, then decisions tied to particular software objects.
Some decisions follow from analysis or explicit human instructions. Others require judgment. Keeping the choice and its context visible allows a person or tool to inspect it before implementation.
Work: Work IR
Work IR describes operations with targets, prerequisites, dependencies, intended effects, and required checks. Each operation refers to the constraints it serves and the source state it expects.
Verification returns observed results linked to both the operation and the constraint. A failure can invalidate a dependent operation or reopen an earlier decision. Recovery semantics and executable operation types remain under definition.
Matching computation to the decision
Different stages require different forms of computation. Parsing, reference resolution, and supported framework analysis can establish repeatable facts. A constrained decision can choose among known targets, scopes, or operation types. Open-ended interpretation may require generative reasoning. An agreed, sufficiently precise operation may be applied by a deterministic transformation.
For example, finding a supported route’s handler is an analysis task. Choosing whether a limit applies to an account or a client is a product decision. Inserting a known guard against a resolved target can become a transformation task once its semantics are settled. Each step has a different source of uncertainty.
Explicit representations make those distinctions available to the system. They expose which information is missing and which choices are already constrained. A smaller specialized model might handle some structured choices; a more capable model might resolve a genuinely open question. The architecture permits that allocation without assuming a particular model will succeed.
The research question is whether changing the representation changes the amount and kind of computation required. Any gains must be measured against the cost of building and maintaining the software model, resolving decisions, and verifying the result.
Verification closes the loop
The forward path connects intent to an implementation. The return path compares the resulting software and observed behaviour with the agreed specification. A verification result needs the artifact revision, the check performed, the observation, and the constraints it addresses.
Some properties can be checked structurally: whether a guard sits on the intended path, whether a required interface is preserved, or whether an operation touched an unauthorized target. Other properties require execution, integration tests, runtime observations, or human judgment. The verifier must state which kind of evidence it collected and what remains unestablished.
A failed check can point back to a specific operation or decision. A correct implementation of the wrong scope reopens intent. A stale target reopens software resolution. An implementation defect reopens the work. Preserving these relationships makes correction more focused and leaves an account of why the next action is necessary.
An inspectable workbench
A workbench should expose the current software evidence, the intent specification, the planned operations, and the verification observations. A person can examine a decision before it becomes an edit and compare the resulting change with the constraints that justified it.
Approval belongs at meaningful boundaries: resolving a product decision, granting authority, accepting a plan, or assessing an outcome that automated checks cannot establish. A visible representation makes the subject of approval concrete. The executor still needs to enforce the granted scope and permission at the moment of action.
The same workbench can compare methods against a shared specification: direct generation, structured lowering, or a combination of analysis, model decisions, and deterministic transformations. Each method must face the same starting revision, requirements, and evaluation criteria.
Boundaries between the layers
The software model establishes facts within its analysis coverage. LMIR records intended behaviour and decisions. Work IR describes operations and their requirements. The execution environment enforces authority and supplies observable effects. None of these contracts can substitute for another.
A graph reference does not grant permission to edit. A well-formed intent specification does not prove that its requirements are achievable. An accepted operation does not prove its effect occurred. An observed test result establishes only the properties that test can actually observe.
Engine’s connection to Skillex is capability resolution: finding instructions appropriate to the task and context. Its connection to Horizon is the environment contract: explicit state, actions, authority, and events through which work can take effect.
Example: add a login limit
This is a worked specification, not a captured Engine execution. The person has agreed to a client-scoped limit of five attempts in a fixed 60-second window, a 429 response on the sixth attempt, reset at the next window boundary, and preservation of existing authentication behaviour.
| Layer | Representation | Check |
|---|---|---|
| Software understanding | Login entrypoint, authentication handler, callers, and tests, with source evidence and revision | References still identify the current code |
| LMIR | Client identity, count, window, rejection response, and authentication invariant | Every decision is explicit; unresolved decisions block lowering |
| Work IR | Resolve the entrypoint; insert a guard before authentication; add tests; run verification | The guard depends on the entrypoint; verification depends on the edit and tests |
| Verification | Results linked to the agreed constraints | Attempts 1–5 pass the guard, attempt 6 returns 429, the next window resets, and authentication still behaves as specified |
The initial sentence “limit login attempts” does not settle client identity or concurrency rules. Those choices need to be agreed before the work is executable. If the handler changes after the plan is prepared, the expected revision and references need revalidation.
Evaluation
An end-to-end demonstration should record the input revision, analysis coverage, agreed specification, planned operations, implementation, and observed checks. Compare correctness and regressions first, then context consumed, inference cost, latency, retries, human intervention, and analysis overhead. Include changes that cross modules, involve dynamic relationships, or become stale during planning. Record unresolved constraints and incomplete observations rather than counting them as successful changes.
The purpose is to establish when explicit representations make work more reliable or efficient, and where their costs outweigh their benefit. A worked specification supplies no measured performance result.