Skip to content

Publish an application-owned lawpack authoring boundary #195

Description

@flyingrobots

Problem

Edict can consume and validate an application-owned lawpack closure, but an application repository cannot yet produce that closure through a public Edict boundary.

The public application build requires one root lawpack followed by its complete dependency closure, then loads canonical manifest, exports, adapter, and target-configuration artifacts before compilation. The public syntax crate exposes typed lawpack models and decode/validation functions. The only checked-in writer, however, is the repository-internal cargo xtask lawpack-goldens --write path, whose artifact constructors and fixture coordinates are hard-coded for Edict's own Hello Echo, causal-cell, workspace-snapshot, and workspace-patch fixtures.

That leaves a real application such as Jim with two unacceptable choices:

  • copy Edict's internal fixture generator into the application; or
  • hand-author canonical CBOR and digests.

Neither is a legitimate ownership boundary. Jedit must own the jedit.text@1 definitions and generated closure; Edict must own the canonical construction and validation rules.

Evidence

At the current #194 head (8a2d021525e7c92e154a139086851d7a3e3f0a8a):

Required capability

Publish a deterministic, application-facing lawpack authoring boundary that takes reviewable typed definitions and emits the canonical artifacts already consumed by edict application build.

The boundary must keep three roles distinct:

  1. the application owns coordinates, exported types/constants/helpers/effects/profiles, adapter declarations, and resource references;
  2. Edict owns schema checking, canonical encoding, digest formation, closure validation, and atomic publication;
  3. the provider/runtime remains uninvolved during lawpack authoring.

The exact review format is a design choice, but callers must not need to construct CanonicalValue, write CBOR, or reproduce Edict's digest framing.

Acceptance criteria

  • A public CLI or stable library boundary accepts one bounded, reviewable application-owned lawpack definition.
  • The definition can express the complete current edict.lawpack/v1 manifest and export surface, including exported bounded types, constants, Edict-authored pure helper bodies and costs, semantic effects, obstructions, operation profiles, dependencies, verifier metadata, and target-adapter references.
  • The boundary emits canonical manifest.cbor, exports.cbor, adapter/configuration artifacts where declared, and lowercase digest sidecars suitable for an exact source import.
  • Emitted bytes are validated through the same public decoders and complete-closure checks used by application build before publication.
  • Byte-identical definitions produce byte-identical artifacts and digests across repeated runs and different caller working directories.
  • Mutating a semantic helper body, type, constant, effect/profile obligation, dependency, adapter, or resource reference either moves the appropriate identity or fails with a stable structured error.
  • Duplicate coordinates, namespace escapes, incomplete dependency closure, malformed pure Core, cost/budget violations, unresolved resources, and digest substitution fail closed without partial publication.
  • Publication is atomic and removes or refuses stale artifacts according to a documented policy.
  • A standalone fixture outside the Edict repository proves that an application can author, generate, vendor, and then build against its own lawpack without copying xtask/src/lawpack_goldens.rs.
  • Topic-shelf documentation distinguishes review input, generated canonical artifacts, application source, provider package, and runtime receipt.

First consumer

Jedit #296 will use this boundary to author and vendor Jim's jedit.text@1 closure for ReplaceRange.edict, then pass that exact closure to Edict's public application build.

The Jedit oracle is test expectation only. It must not be accepted as lawpack source or executable semantics.

Non-goals

  • no Jim, Jedit, rope, buffer, ReplaceRange, or TextWindow vocabulary in Edict production code;
  • no Echo runtime behavior or provider invocation during authoring;
  • no handwritten executable package or caller-authored graph patch;
  • no weakening of canonical-CBOR, digest, namespace, dependency, helper-purity, or adapter-validation rules;
  • no claim that authoring alone completes Edict Compile bounded control flow and digest-bound pure lawpack helpers into Core #192 or Jedit #296.

Dependencies

Activity

  1. added
    release:lawpacksLawpack contract and authority source release work
    type: featureFeature issue for a cohesive capability
    state: frontierOpen and currently unblocked on the execution frontier
    domain: backendCompiler/backend implementation work
    on Aug 20, 2026
  2. coderabbitai commented on Aug 20, 2026

    @coderabbitai
    🔗 Related PRs

    #2 - docs: apply Phase 0 design review + nail five yellow-light joints [merged]
    #162 - Publish canonical provider contract pack [merged]
    #170 - Build verified external applications through provider components [merged]
    #174 - Preserve typed result projections for Echo targets [merged]
    #177 - Publish canonical external request application artifacts [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. added
    enhancementNew feature or request
    release:front-endFront-end parser and source-AST validation release work
    roadmap-aRoadmap A: standalone Hello Echo delivery
    on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain: backendCompiler/backend implementation workenhancementNew feature or requestrelease:front-endFront-end parser and source-AST validation release workrelease:lawpacksLawpack contract and authority source release workroadmap-aRoadmap A: standalone Hello Echo deliverystate: frontierOpen and currently unblocked on the execution frontiertype: featureFeature issue for a cohesive capability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions