RFC-0018 · Design Q&A
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
Q: May a model declaration contain both digest and version?
Status: Open Decision needed: RFC-0008 §11 requires exactly one, while RFC-0018 §10.2 allows both with digest precedence. The recommendation and acceptance checks are in the model pin proposal.
Where normative: RFC-0008 §6.20/§11 and RFC-0018 §8/§10.2
Q: Should mustSatisfy completion show type-incompatible invariants?
Status: Open
Decision needed: RFC-0018 §7.3 both filters them out and displays them with a warning and deprecated: true. The recommendation and acceptance checks are in the completion filter proposal.
Where normative: RFC-0018 §7.3
Q: Should the property registry be a static compile-time artifact or a runtime-queryable structure?
A: Static compile-time artifact. The property registry is generated from the grammar at compiler build time and embedded in the compiler binary. This is significantly faster at session initialization and avoids the complexity of plugin grammar extensions. Grammar plugins are not in scope for the initial spec.
Where normative: §3 (property registry) of RFC-0018
Q: Should accessible_fields in TypeInfo include fields contributed by aspect declarations?
A: Yes, but with a caveat. accessible_fields MUST include aspect-contributed fields when the merge pass has completed for the containing declaration. When a compiler session is operating on a partial or unsaved file (before the merge pass can run), accessible_fields MUST include a mergeStatus: "incomplete" marker, signaling to the caller that the field list may be incomplete. The LSP MUST NOT surface completion suggestions for aspect-contributed fields when mergeStatus is "incomplete".
Where normative: §5 (TypeInfo API) of RFC-0018
Q: What is the right granularity for incremental reanalysis — declaration-level or statement-level?
A: Declaration-level, as specified. Statement-level reanalysis would require tracking inter-statement dependencies within a declaration body, which adds significant implementation complexity with marginal benefit given that declarations are typically small (10–50 lines). Statement-level granularity is a possible future optimization reserved as a non-normative implementation detail.
Where normative: §9 (incremental compilation) of RFC-0018
Q: Should the compiler session expose a validate_expr method?
A: Yes. The compiler session MUST expose validate_expr(expr_text: String, context: ExprContext) -> Vec<Diagnostic>. This allows the LSP to validate user-edited boolean expressions before an edit is committed to the file. Errors are returned as diagnostics with source offsets relative to the start of expr_text. This is the same validation path used by the full compiler; the method is a thin wrapper that runs the expression parser and type-checker against the current ParseContext.
Where normative: §7 (compiler session API) of RFC-0018
Q: Should the debug RPC interface be extended to allow external MCP tools to query the compiler?
A: Yes. The debug RPC interface (§12) MUST expose a read-only subset of the compiler session API accessible to MCP clients: get_type_info, validate_expr, get_diagnostics, and list_declarations. Write operations are excluded. This allows AI agents that produce .gnm files to validate their output before writing to disk (RFC-0009 §6), closing the loop between AI authoring and compiler enforcement without granting agents the ability to drive compilation directly.
Where normative: §12 (debug RPC interface) of RFC-0018