MEM/FWU Roundtrip Pipeline
This pipeline tests whether a SkillPilot publication package can be represented as an RDF/OWL artifact based on the FWU Lehrplan-Ontologie and reconstructed afterwards without reading the original ZIP.
Initial input package:
tmp/exports/skillpilot-de-gymnasium-mathematik-v0.1.0.zip
Goal
The primary test chain is semantic, not byte-identical:
curricular SkillPilot landscape package
-> clean MEM-compatible RDF/OWL representation based on FWU-DE/lehrplan-ontologie
-> reconstructed SkillPilot knowledge-landscape content
-> semantic validation against the original package
The first implemented roundtrip uses the FWU Lehrplan-Ontologie as the base vocabulary for curriculum, subject, school type, competencies, curricular elements, parts, and source references. SkillPilot-specific runtime semantics that are not explicit FWU terms are kept in a small SkillPilot roundtrip profile:
sp:didacticRequiresfor SkillPilot prerequisite edgessp:containsGoalfor SkillPilot graph containmentsp:hasCurricularPartas a strict curricular part-whole relation mapped toBFO_0000051/hat Teilonly where that semantics is intendedsp:CompositionViewfor learner-facing view treessp:MappingRecordandsp:ReviewDecisionfor canonical/state curriculum mappingssp:SourceGoalReferencefor official source text spanssp:CardDeckandsp:Cardfor memorization cards
The profile is intentionally small. It should make missing relations visible instead of hiding them in application code.
Concept Alignment
The primary relation focus comes from the concept paper "Schulisch verantwortete KI-Lernbegleitung entlang der Lehrplaene", version 1.0:
The paper describes a machine-readable learning-goal graph that covers learning-goal containment and prerequisite relations. In SkillPilot terms, those are the two core graph edges:
contains: a goal or cluster comprises subgoalsrequires: a goal presupposes prerequisite goals
Therefore the first MEM/FWU modeling question is whether these two relations can be represented cleanly, explicitly, and inspectably in or alongside the FWU Lehrplan-Ontologie. View-to-canonical mapping relations are important, but they are a later modeling layer on top of the core graph.
Quality Goal 1: Semantically Lossless MEM Roundtrip
The first quality goal is not an elegant RDF export in isolation. It is a clean semantic roundtrip that proves which SkillPilot knowledge-landscape information can be carried by a MEM-compatible representation based on the FWU Lehrplan-Ontologie.
The quality target is met when:
- the publication-oriented RDF is generated from
skillpilot-de-gymnasium-mathematik-v0.1.0.zip - the RDF uses FWU/MEM vocabulary wherever this is semantically correct
- the remaining SkillPilot profile terms are explicit, documented, and not hidden inside opaque JSON blobs
- reconstruction reads only the RDF bundle, not the original ZIP content
- all SkillPilot runtime-relevant data is reconstructed with semantic equivalence, not necessarily byte-identical ZIP layout
- the reconstructed data passes the SkillPilot validators and roundtrip comparison checks
- the profile terms that remain outside FWU/MEM are classified as either candidate MEM/FWU improvements, legitimate SkillPilot extensions, or purely technical reconstruction metadata
This gives the MEM/FWU discussion an evidence base: SkillPilot can show concrete data, transformation code, and validation reports instead of arguing abstractly about ontology gaps.
Commands
Run the primary semantic roundtrip:
cd app
npm run roundtrip:mem-fwu:semantic
Run only the clean semantic MEM/FWU export without the lossless ZIP text carrier:
cd app
npm run roundtrip:mem-fwu:slim -- --zip tmp/exports/skillpilot-de-gymnasium-mathematik-v0.1.0.zip
Run only the semantic reconstruction check from the slim bundle:
cd app
npm run roundtrip:mem-fwu:semantic-reconstruct
Optional technical/debug lane: build the monolithic carrier RDF that can reconstruct the ZIP byte-for-byte:
cd app
npm run roundtrip:mem-fwu:to-rdf -- --zip tmp/exports/skillpilot-de-gymnasium-mathematik-v0.1.0.zip
Optional technical/debug lane: reconstruct plus validate the byte-carrier RDF:
cd app
npm run roundtrip:mem-fwu:validate -- \
--zip tmp/exports/skillpilot-de-gymnasium-mathematik-v0.1.0.zip \
--rdf tmp/roundtrip/mem-fwu/skillpilot-de-gymnasium-mathematik-v0.1.0/rdf/skillpilot-mem-fwu.nt
Run the semantic reconstruction check against an explicitly selected RDF file:
cd app
npm run roundtrip:mem-fwu:semantic-reconstruct -- \
--rdf tmp/roundtrip/mem-fwu/skillpilot-de-gymnasium-mathematik-v0.1.0/slim/bundle.nt \
--zip tmp/exports/skillpilot-de-gymnasium-mathematik-v0.1.0.zip
Output
Default output directory:
tmp/roundtrip/mem-fwu/skillpilot-de-gymnasium-mathematik-v0.1.0/
Important files:
slim/- clean semantic MEM/FWU bundle without the technical ZIP text carrierslim/landscape.nt- package metadata, canonical goals, program units, placements,contains, andrequiresslim/sources.nt- official source documents, source URLs, and exact source-goal spansslim/mappings.nt- reviewed source-to-canonical decisions and state mapping recordsslim/views.nt- learner-facing Bundesland and aggregate composition viewsslim/cards.nt- memorization card decks and cardsslim/bundle.nt- concatenation of the slim semantic files for single-file RDF loadersslim/skillpilot-mem-fwu-profile.ttl- profile without carrier-only terms such assp:textLineslim/semantic-reconstructed/- SkillPilot core artifacts reconstructed from the slim semantic RDF bundleslim/semantic-reconstructed/semantic-reconstruction-report.*- semantic reconstruction reportrdf/skillpilot-mem-fwu.nt- optional monolithic technical/debug RDF with lossless text carrierrdf/skillpilot-mem-fwu-profile.ttl- profile for the monolithic technical/debug RDFreconstructed/- reconstructed package directoryskillpilot-de-gymnasium-mathematik-v0.1.0.roundtrip.zip- reconstructed ZIProundtrip-report.jsonandroundtrip-report.md- roundtrip resultpackage-validation/subject-export-package-validation-report.*- independent SkillPilot package validation
Representation Strategy
There are two RDF export forms with different purposes.
The slim MEM/FWU export under slim/ is the publication-oriented representation. It represents the actual learning landscape:
- SkillPilot graph nodes as
sp:LearningGoal - semantically curricular atomic goals additionally as FWU
LP_0000263competency specifications - semantically curricular clusters additionally as FWU
LP_0000349curricular areas - runtime-only nodes such as memorization, practice, assessment, orientation, or program-structure nodes as SkillPilot profile classes without forced FWU competency typing
- the package and landscape as FWU
LP_0000438curricula - Mathematik via KIM school subject
http://w3id.org/kim/schulfaecher/s1017 - Gymnasium as a school-type resource linked through FWU
LP_0000812 - SkillPilot
containsthroughsp:containsGoal - strict curricular part-whole decomposition through
sp:hasCurricularPartandBFO_0000051/hat Teilonly where source and target are classified as curricular graph elements requiresthroughsp:didacticRequires- source goals and official text spans as
sp:SourceGoalReference/ FWU references - composition views, mappings, review decisions, and card decks as explicit SkillPilot profile resources
The FWU-DE/schulfach-ontologie should be considered for the subject-identifier layer. The current export links Mathematik through the generic KIM subject IRI http://w3id.org/kim/schulfaecher/s1017; the school-subject ontology additionally provides state-specific subject individuals such as https://w3id.org/schulfach/HE_0000027 with skos:exactMatch to that KIM IRI. This is relevant for full MEM/FWU alignment, but separate from the learning-goal graph relation proposal.
The slim export intentionally does not include:
sp:PackageFilesp:hasFilesp:textLinesp:lineText- file-path-derived SkillPilot resource IRIs such as
/file/... - embedded ZIP file lines
- the redundant
sp:sourceIndexSummaryJsonblob
The monolithic rdf/skillpilot-mem-fwu.nt keeps an additional carrier lane that stores every package file as RDF text-line resources. This is deliberately not the semantic model. It is a technical proof artifact for byte-identical ZIP reconstruction.
sp:zipPath may still appear in the slim bundle as a local package placement literal for deterministic reconstruction. It is not used as curriculum-source provenance; official source provenance is represented through source-document URLs and exact source-goal spans.
requires and contains are treated as unordered graph edges. The semantic comparison therefore compares them as sets. Stable ordering is only represented where it has actual meaning for a consumer, for example in learner-facing composition-view children and memorization cards.
Current Validation Result
For skillpilot-de-gymnasium-mathematik-v0.1.0.zip, the optional monolithic byte-carrier run produced:
- 163 reconstructed files
- 163 byte-identical files
- 1,037 canonical goals
- 1,142
containsedges - 2,312
requiresedges - 70 composition views
- 2,539 canonical mapping records
- 9,797 review decisions
- 9,797 source-goal references with official text spans
- 10 card decks with 126 cards
The reconstructed ZIP passed npm run export:subject-packages:validate.
The slim MEM/FWU export generated on 2026-05-16 produced:
slim/bundle.nt: 437,681 semantic triples, about 130 MBslim/landscape.nt: about 7.2 MBslim/sources.nt: about 65 MBslim/mappings.nt: about 44 MBslim/views.nt: about 9.9 MBslim/cards.nt: about 284 KB
The semantic reconstruction from slim/bundle.nt passed these content checks:
- landscape metadata, filters, program units, goal placements, and competency catalog match
- 1,037/1,037 goals reconstructed with all relevant fields
- 31/31 source collections and 9,797/9,797 source goals reconstructed
- 126/126 cards reconstructed
- 62/62 mapping file metadata records reconstructed
- 2,539/2,539 mapping records and 9,797/9,797 review decisions reconstructed
- all 16 state mapping lanes present
- 70/70 composition views reconstructed with 5,991/5,991 view goal refs
- all 16 state view lanes plus 5 DE aggregate views present
Interpretation
This is a practical first proof that the current public SkillPilot mathematics package can survive a semantic RDF roundtrip without losing the data required by the SkillPilot runtime and publication validator.
The additional semantic reconstruction check proves more than byte-identical transport: the SkillPilot core landscape, source references, mappings, views, and cards can be rebuilt from explicit RDF triples.
For MEM-oriented publication, the slim/ bundle is the preferred artifact. The large monolithic RDF file remains useful for reproducibility and byte-identical technical roundtrip testing, but it should not be treated as the clean MEM representation.
It still does not prove that the FWU Lehrplan-Ontologie alone already contains every SkillPilot relation. The test currently makes those gaps explicit through the SkillPilot roundtrip profile, especially for didactic prerequisite logic, learner-facing composition views, reviewed source mappings, and memorization cards.
MEM/FWU Improvement Candidates
The current slim roundtrip is deliberately modeled as "FWU/MEM first, SkillPilot profile only where necessary". The profile terms should therefore be reviewed after every successful roundtrip.
Priority candidate areas for upstream discussion:
- Didactic prerequisites:
sp:didacticRequiresis not the same as a FWUCE-Verweis. A curriculum reference can point to a related element, while SkillPilot needs an explicit prerequisite relation for frontier and next-step logic. - Learning-goal containment:
sp:containsGoalpreserves the SkillPilot graph. Onlysp:hasCurricularPartis mapped toBFO_0000051/hat Teil, and only for genuine curricular part-whole relations. This must not be used for UI placement, ordering, loose topic association, state visibility, or view mappings. The upstream question is whether FWU/MEM wants to documenthat Teilas the intended pattern for strict curricular goal decomposition or provide a more specific relation. - Exact source spans:
sp:SourceGoalReferenceconnects a source URL and source-goal identity with exact official text spans, page or locator metadata, and extraction context. This is needed for independent validation of mapping decisions. - Learner-facing composition views:
sp:CompositionViewand ordered composition nodes express scoped, single-occurrence user views over a canonical graph. This is different from the canonical curriculum graph itself and matters for Bundesland-specific views. This should come afterrequiresandcontains. - Reviewed source-to-canonical mappings:
sp:MappingRecordandsp:ReviewDecisionexpress auditable mapping decisions, including evidence, status, and reviewer judgement. This is stronger than a loose source reference and becomes more important when composition views are mapped explicitly onto the canonical graph. - Memorization cards:
sp:CardDeckandsp:Cardare probably a SkillPilot learning-runtime extension, not necessarily a MEM core concern, unless MEM wants to model fine-grained learning media or practice resources.
Potential GitHub contribution path:
- Keep the SkillPilot roundtrip passing as the reproducible evidence artifact.
- Check whether each remaining
sp:term already has an appropriate FWU/MEM equivalent before proposing a new term. - Open a focused issue in
FWU-DE/lehrplan-ontologiewith the SkillPilot story, the concept-paper relation focus, RDF examples, and validation report. - If maintainers agree that a gap belongs in MEM/FWU, submit a small PR, preferably starting with
didacticRequiresand documented semantic guidance forcontains/hat Teilas strict curricular goal composition.