Skip to content

Package responsibilities

Use for portable data and validation:

  • parseFormContract
  • canonicalStringify
  • contract, profile, effect, and provenance types
  • canonical serialization and SHA-256 hashes
  • pure agent-context queries, strict typed intent, and source-intent-bound canonical plan validation/revalidation

It does not load Formly, Angular, application configs, or browser code. Its package README documents the browser-safe authoring subpath and contributor checks. The public API reference groups its primary parsers, canonical operations, registries, query surface, and authoring helpers.

Use in trusted build/test tooling that has Formly field configuration:

  • extractFormContract for declared projection
  • compileFormContractScenario for controlled scenario outcomes
  • field-profile preparation and resolution
  • cross-field effect resolution
  • the type-only FactoryInputAuthoringHarness surface used by local generated factory-input drafts

It projects through allowlists. It does not serialize live Formly objects, and the authoring harness type has no runtime implementation or factory-execution authority. Its package README documents extraction boundaries and focused checks. See the compiler API for declared and scenario entry points.

Use for repository-aware adoption:

  • defineConfig, defineFormContractProject, and defineFormContractSource
  • discoverWorkspaceProjects
  • inspectWorkspaceFactoryInputs for read-only, definition-linked authoring drafts
  • runWorkspace and checkWorkspace
  • parseWorkspaceContractIndex
  • the formly-contracts CLI

Configuration and source factories are trusted executable code. Generated indexes and contracts are portable validated data. Factory-input drafts are a separate local authoring result: the inspector reads the existing TypeScript Program and lineage but does not call the registered form factory or write the suggested file. Its package README maps configuration, discovery, generation, source indexing, and CLI ownership. The workspace API and CLI reference are the current consumer lookup surfaces.

Use for the guarded Angular JIT runtime host and the formly-contracts-angular CLI. It resolves the selected project’s Angular and Formly peers, reserves @angular/compiler before partially compiled Angular modules load, and evaluates each selected project in a disposable child.

It does not make every application browser barrel safe to evaluate under Node. A consuming forms library must still expose a Node-safe contracts entry point whose runtime imports exclude Angular components, browser integrations, and eager application initialization. Follow Node-safe Angular libraries for the complete consumer setup and the Angular package README for the programmatic host boundary.

Private @formly-contract/playwright experiment

Section titled “Private @formly-contract/playwright experiment”

The repository contains a private 0.0.0 package that binds validated driver identities to reviewed trusted-local implementation definitions. It can also revalidate a CTX-2 plan and produce an all-or-nothing ordered batch pairing each exact approved step with its trusted implementation. The directory reserves the intended ownership boundary and supports ongoing design work.

It does not currently depend on Playwright, launch a browser, generate tests, invoke drivers, or provide the planned browser execution vertical. It is not a published user capability. See its package README and private API boundary before contributing there.

  • apps/demo-cli proves deterministic extraction against a synthetic form.
  • apps/formly-test-app is the maintained single Angular project example. It renders and generates contracts for a twelve-form synthetic corpus.
  • fixtures/angular-monorepo exercises distributed Angular CLI integration, cross-field effects, custom profiles, and committed contract goldens.
  • fixtures/nx-workspace exercises Nx project boundaries, path aliases, a ten-form regulated-workflow corpus plus two sanitized typed-input authoring forms, custom fields, source-usage linkage, effects, and deterministic generation.

See Maintained examples for the exact support evidence and shared compliance command.

For repository navigation, the packages/ guide, apps/ guide, and fixtures/ guide explain which directories are product code, runnable examples, or test-only inputs.

No MCP server, browser-executing Playwright integration, or test-intent package is published in the current repository.