feat: CTDL-ASN registry import and CASE alignment - #8
Draft
jeff-grann wants to merge 4 commits into
Draft
Conversation
Adds server-side import of a competency framework from a CTDL-ASN registry resource into a CASE CFPackage, plus the supporting configuration. - CredentialRegistryClient fetches the CTDL-ASN @graph. The default registry origin is configurable via CREDENTIAL_REGISTRY_BASE_URL; a full resource URL passed to import overrides it per request (enables prod/sandbox/self-hosted registries without reconfiguration). - CtdlAsnToCaseMapper maps ceasn:CompetencyFramework / ceasn:Competency graphs to a CASE CFPackage, recording registry provenance under a unified ext:opencase.source block (uri / ctid / registry / format) on the CFDocument and every CFItem, and setting officialSourceURL + sourcePackageURI. - ImportFrameworkFromRegistry and PreviewRegistryFramework endpoints, wired through the management controller/routes and DI container. - The document index lifts isModifiedFromSource / sourcePackageURI from ext:opencase; CreateFramework no longer force-marks registry-managed frameworks modified on a layout-only save (it trusts the editor's explicit fork flag; legacy CASE-package imports keep the previous behaviour). - docker-compose + docs/env.example expose CREDENTIAL_REGISTRY_BASE_URL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nal alignment Data/mapping layer for importing registry frameworks and aligning CASE items to external competencies, with round-trip integrity. - Preserve registry provenance across the editor round-trip: carry ext:opencase on the CFDocument snapshot (normalize + snapshot type) and reconcile the nested vs flattened extension shapes on export so provenance survives saves. - Unified provenance: ext:opencase.source on documents and items; forking an imported framework rewrites source -> derivedFrom (provenance.ts) and the reducer's framework/enableEditing action applies it across all nodes. - Alignment associations to BOTH registry and external-framework reference nodes are emitted on export (previously external edges were dropped); the reference nodes are persisted in the CFDocument extension and reconstructed on load, and alignment edges are re-linked to the reconstructed nodes by destination URI (fixes edges/associations being lost across a reload). - Official-format (toOpenCaseFormat) URI fixes: a top-level item's isChildOf now targets the CFDocument (not a bogus /CFItems/<docId> URI), and a registry alignment's destination identifier is the CTID's UUID rather than a hash of the "ce-" string. - Tests: toOpenCaseFormat (destination URIs), externalAlignment (association emitted + node persisted), alignmentRelink (edges re-link on reload). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Import-from-registry dialog and a read-only registry reference node type, wired into the home screen, app, and canvas (floating add menu). - Imported registry frameworks open read-only: content edits and structural changes (add/remove items and associations) are blocked while layout changes stay allowed, enforced centrally in EditorContext. A header "Enable editing" action forks the framework after confirmation, recording derivation. - Node properties panel shows registry provenance (CTID / CTDL URI / source registry) read-only, and the header/home reflect Imported vs Forked state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jeff-grann
marked this pull request as draft
August 6, 2026 17:38
Walkthrough for importing a CTDL-ASN framework from a Credential Engine registry, aligning CASE items to registry/external competencies, and the read-only/fork workflow — with expected results at each step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds the ability to import a CTDL-ASN competency framework from a Credential Engine registry into OpenCASE, view it in the editor and on the canvas, and align local CASE items to imported registry competencies (and to external frameworks) — with the registry provenance preserved end to end in a CASE-compliant way.
Imported frameworks open read-only and can be forked into an editable derivative on demand; alignments and provenance survive full save/reload round-trips.
What's included
Backend (
apps/opencase)CredentialRegistryClientfetches a CTDL-ASN@graph. The default registry origin is configurable viaCREDENTIAL_REGISTRY_BASE_URL; passing a full resource URL to import overrides it per request, so prod / sandbox / self-hosted registries work without reconfiguration.CtdlAsnToCaseMappermapsceasn:CompetencyFramework/ceasn:Competencygraphs to a CASECFPackage, recording provenance under a unifiedext:opencase.sourceblock on theCFDocumentand everyCFItem.ImportFrameworkFromRegistry+PreviewRegistryFrameworkendpoints, wired through the management controller/routes and DI container.isModifiedFromSource/sourcePackageURIfromext:opencase; a save of a still-locked registry import is no longer force-marked "modified".Editor (
apps/editor)ext:opencase.source→derivedFromand flagging the documentisModifiedFromSource.isChildOftargets theCFDocument(not a bogus/CFItems/<docId>URI); a registry alignment's destination identifier is the CTID's UUID rather than a hash.The
ext:opencaseextension contractProvenance is recorded in a namespaced CASE extension (CASE 1.1 has no native CTID field):
Alignment associations carry the target resource URL in
destinationNodeURI.uri(mirrored inext:opencase.ctdlDestinationUri/externalDestinationUri).Testing
toOpenCaseFormat(destination URIs),externalAlignment(association emitted + node persisted),alignmentRelink(edges re-link on reload), and the fork/provenance round-trip.CredentialRegistryClientbase resolution,CreateFrameworkfork-index gating, and management controller tests pass.Configuration / deployment
CREDENTIAL_REGISTRY_BASE_URL(defaulthttps://credentialengineregistry.org), surfaced indocker-compose.ymlanddocs/env.example.docker-compose up --build).🤖 Generated with Claude Code