Add SPEC mode authoring language #100

Merged
lost-rob0t merged 8 commits from agent/spec-mode-language into main 2026-08-18 14:28:38 +00:00
lost-rob0t commented 2026-08-18 14:25:31 +00:00 (Migrated from github.com)

Summary

Adds the first authoring-language slice for first-class SPEC mode.

  • adds a closed Prolog-shaped SPEC vocabulary with spec/1, subject/1, require/2-3, optional/2-3, invariant/1, output_contract/1, provenance/1, and trusted-registry assertion/2-3
  • adds spec_language_catalog/2, spec_source_normalize/2, and spec_source_compile/4
  • compiles deterministically into the canonical rlm_spec normalize/validate/freeze path rather than adding a second Spec IR
  • keeps assertion kinds provider-defined and domain-neutral
  • adds sanitized assertion argument_schema metadata without exposing validator/evaluator/observer closures
  • accepts direct terms or one parsed text term, never consults or executes model-produced source
  • rejects duplicate requirement IDs, unknown structural forms/options, non-ground semantic values, and executable-shaped authoring data
  • covers project and dataset fixtures with the same grammar plus fingerprint stability/change tests and injection cases
  • documents SPEC mode, TaskIR ownership direction, future project-KB compatibility, and the separation from Plan/Execute/Verify

Foundation

PR #92 is merged on main; this PR now targets main directly and reuses that canonical Spec/assertion/evidence substrate.

Architectural invariant

SPEC source is presentation/authoring syntax. The Frozen Spec remains the canonical desired-state contract. TaskIR may later reference the exact Frozen Spec; it must not duplicate acceptance ownership.

Validation

The first exact-head run on this implementation passed the deterministic unit/load lane, including static production-module loading, the full PlUnit suite, benchmarks/conformance, deep-recursion checks, CLI/trace smoke, persistent graph resume, durable artifact handoff, and whitespace validation. The live OpenRouter lane is also required before merge.

## Summary Adds the first authoring-language slice for first-class SPEC mode. - adds a closed Prolog-shaped SPEC vocabulary with `spec/1`, `subject/1`, `require/2-3`, `optional/2-3`, `invariant/1`, `output_contract/1`, `provenance/1`, and trusted-registry `assertion/2-3` - adds `spec_language_catalog/2`, `spec_source_normalize/2`, and `spec_source_compile/4` - compiles deterministically into the canonical `rlm_spec` normalize/validate/freeze path rather than adding a second Spec IR - keeps assertion kinds provider-defined and domain-neutral - adds sanitized assertion `argument_schema` metadata without exposing validator/evaluator/observer closures - accepts direct terms or one parsed text term, never consults or executes model-produced source - rejects duplicate requirement IDs, unknown structural forms/options, non-ground semantic values, and executable-shaped authoring data - covers project and dataset fixtures with the same grammar plus fingerprint stability/change tests and injection cases - documents SPEC mode, TaskIR ownership direction, future project-KB compatibility, and the separation from Plan/Execute/Verify ## Foundation PR #92 is merged on `main`; this PR now targets `main` directly and reuses that canonical Spec/assertion/evidence substrate. ## Architectural invariant SPEC source is presentation/authoring syntax. The Frozen Spec remains the canonical desired-state contract. TaskIR may later reference the exact Frozen Spec; it must not duplicate acceptance ownership. ## Validation The first exact-head run on this implementation passed the deterministic unit/load lane, including static production-module loading, the full PlUnit suite, benchmarks/conformance, deep-recursion checks, CLI/trace smoke, persistent graph resume, durable artifact handoff, and whitespace validation. The live OpenRouter lane is also required before merge.
Sign in to join this conversation.
No description provided.