Repository navigation
Conversation
Make a composed clause a template instance in its own right, so an agreement's documents and the clauses composed into them form one tree with one state index: - agreement@1.0.0: Clause carries its own data and composed clauses, and a required clauseId (its stable instance id). AgreementReference gains documentId, since a clause path is only unique within a document. - runtime@1.0.0: AgreementState replaces data and clauseStates with a states map keyed by instance id (documentId or clauseId). Stateless instances have no entry. - obligation@1.0.0: add ObligationIssued, so logic issues an obligation by emitting an event, as it changes one with ObligationTransition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LWZaJoaq9HFMVceNxCXMS Signed-off-by: Claude <noreply@anthropic.com>
🧩 Concerto Playground PreviewThe
All 3 changed models together: Preview combined Auto-generated from commit 0564c23. Updates automatically on new commits. |
mttrbrts
pushed a commit
to accordproject/cicero-template-library
that referenced
this pull request
Oct 1, 2026
… API, as three templates The prototype's local runtime is replaced by the released shape of the design: - Models: the 1.0.0 namespaces are refreshed from accordproject/models#205, which folds the prototype's proposal namespace (composition.cto) into agreement@1.0.0 (Clause with data and clauses, AgreementReference with a documentId), runtime@1.0.0 (AgreementState.states) and obligation@1.0.0 (ObligationIssued). composition.cto is removed. - Templates: the composed late payment clause and the licensed work schedule become sibling templates, late-payment-poc and licensed-work-schedule-poc, since cicero-core loads model/ and logic/ recursively. The licence keeps copies of their models, which its logic uses, and names its template model in package.json (accordproject.templateModel). - Logic imports defineLogic from @accordproject/template-engine/logic and its factories from logic/generated/types.ts, which template-engine-codegen writes with Concerto's interfaces (npm run compile). runtime/ and scripts/generate-types.js are removed. - Tests use @accordproject/template-engine/testing, and the agreement tests run on template-engine's AgreementProcessor, which compiles and loads each template's logic. Without a direct concerto-core import, the vitest alias around concerto-core's ESM version is no longer needed. - The library depends on template-engine and cicero-core from the dist branches of accordproject/template-engine#187 and accordproject/template-archive#950, so the render suite loads, drafts, initialises and triggers all three templates; the expectedLoadFailures entry is removed. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LWZaJoaq9HFMVceNxCXMS
4 tasks done
This branch has not been deployed
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.
Stacked on #200. This folds "design B", prototyped in accordproject/cicero-template-library#528, into the 1.0.0 namespaces. A composed clause becomes a template instance in its own right. A document and its composed clauses then form one tree, with one state index, so logic can run embedded clauses and commit their state atomically with the document's.
Changes
agreement@1.0.0:Clausecarries its owndata(itsTemplateDatasubtype) and its own composedclauses.clauseIdis now required: it's the clause's stable instance id./).AgreementReferencegainsdocumentId, since a clause path is only unique within a document.runtime@1.0.0:AgreementStatereplacesdataandclauseStateswithstates, a map keyed by instance id (a document'sdocumentIdor a clause'sclauseId). Stateless instances have no entry, and the index doesn't mirror the tree's shape. The map is renamed fromClauseStatestoInstanceStates.obligation@1.0.0: addsevent ObligationIssued { o Obligation obligation }, so logic issues an obligation by emitting an event, just as it changes one withObligationTransition.Flags
Clause.clauseIdandClause.databecome required.AgreementState.dataandAgreementState.clauseStatesare removed.documentIdall validate. The repo has no test suite, andbuild.jsresolves imports over HTTP from the live site, which can't serve these until they're published.Related Issues
Author Checklist
--signoffoption of git commit.masterfromfork:branchname🤖 Generated with Claude Code
https://claude.ai/code/session_011LWZaJoaq9HFMVceNxCXMS
Generated by Claude Code