feat(lang): canonicalize pattern reference syntax and documentation (#170) - #177
Open
Adityakk9031 wants to merge 1 commit into
Open
feat(lang): canonicalize pattern reference syntax and documentation (#170)#177Adityakk9031 wants to merge 1 commit into
Adityakk9031 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Resolves #170
OpenProse patterns (
kind: pattern) are compile-time coordination abstractions. However, as identified in #170, pattern references and instantiations suffered from documentation inconsistencies:### Patternswas used in smoke tests and referenced in specs, but missing from the canonical section tables.prose.mdpointed to a nonexistent Forme pattern-expansion section (forme.md, Pattern Expansion).prose composelacked a single cross-linked definition showing the relationship amonguse(import/aliases),pattern:(reference),with:(slot binding), andconfig:(parameters).This PR canonicalizes pattern references, adds the missing Forme expansion specification, repairs cross-references, and adds a dedicated conformance test suite.
Key Changes
Canonical Section:
### Patterns(skills/open-prose/contract-markdown.md,spec/01-Language.md)### Patternsto the Canonical Sections tables in Contract Markdown and the Language Specification.### Patternsusing fencedyamldeclarations (- name:,pattern:,with:,config:).Unified Definition of
use,pattern:,with:, andconfig:(skills/open-prose/contract-markdown.md)use "std/patterns/worker-critic"creates a local alias thatpattern: worker-criticcan reference directly.name:defines the expanded node name invoked by ProseScriptcall {name}in### Execution.with:) and configuration overrides (config:).use,### Patterns, and### Execution.Forme Pattern Expansion Specification (
skills/open-prose/forme.md)## Pattern Expansionsection detailing the compile-time expansion lifecycle:deps/), andstd/shorthand expansion.### Slotsare satisfied by responsibilities, functions, or nested pattern instances.### Config.### Delegationinto ProseScript execution logic.Repaired Cross-References (
skills/open-prose/prose.md)contract-markdown.md(Patterns) andforme.md, Pattern Expansion.Conformance Tests (
tests/open-prose/contract-markdown/patterns.test.ts)### Patternsin the Canonical Sections tables ofcontract-markdown.mdand01-Language.md.use,pattern:,with:, andconfig:.## Pattern Expansioninforme.md.prose.md.09-local-pattern.prose.md.Verification
pnpm vitest run tests/open-prose/contract-markdown/patterns.test.ts(6/6 tests passed).pnpm vitest run tests/open-prose/forme/forme.test.ts(23/23 tests passed).