Repository navigation
docs(self-model): model the MCP server, Jupyter kernel, JSON-RPC commands, notebook packages, markup parsers and FMI gate - #1502
Merged
Conversation
A Markdown or AsciiDoc body owned by a Document or Section nests its headings into sections by level, names them by explicit AsciiDoc id or a title slug unique within the document, resolves sysml: references to them in the same and other documents, and numbers them as part-born sections. Out-of-sequence headings are the markup-heading-level error. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…nto feat/document-whole-bodies
A reference cut from a markup body carries its own spacing, so the backends must join it without inserting a separator, as for every other run cut from the body. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t links The link checker resolves a Markdown link to a sibling document as a file next to the committed rendering, which no example or golden ships; the cross-document reference now lives in the CLI test's model. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…nto feat/document-whole-bodies Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # internal/ir/docplan/markup/asciidoc.go # scripts/asciidoc/asciidoctor-json.js
MkDocs builds the site in strict mode, so a rendered example under docs/manual/examples has to appear in the navigation like its siblings. Co-Authored-By: jason.han <hanhuijun@gmail.com>
npm install in scripts/asciidoc leaves node_modules/ and a lockfile that the pinned toolchain copy under build/doc-pdf makes redundant. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…cument examples The new manual example and the self-model's markup body move the examples and manual-examples provenance digests; the pilot-diff baseline only shifts line numbers in the self-model document, and the API-JSON record's scorecard and gap rows follow the re-recorded totals. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…e-bodies Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md
…ands, notebook packages, markup parsers and FMI gate Co-Authored-By: jason.han <hanhuijun@gmail.com>
…model-surfaces-refresh Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…s over the enlarged self-model The self-model's document.sysml gained two tables of the shape the existing ones have, so the pilot reports two more kind-mismatch warnings on it (2448 -> 2450 only-pilot, 3557 -> 3559 pilot diagnostics); the API-JSON differential's examples root grew with the new parts (26229 -> 26982 matched elements). No other root moved. The count lines docs-counts derives from the baselines follow. Co-Authored-By: jason.han <hanhuijun@gmail.com>
… ambiguous document usages An AsciiDoc anchor is the section's name as written when it is a basic name, else slugged, and a reference spelt as the id (`<<MassBudget>>`, `<<mass-budget>>`) finds the section either way. A heading qualified by a usage typed by more than one document is an ambiguous target, as for a part. Co-Authored-By: jason.han <hanhuijun@gmail.com>
A later heading's explicit id never takes over an earlier heading's name, a repeated id keeps naming its first heading, and a quoted single name (`sysml:ref['power-budget']`) is looked up by its text. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This was referenced Oct 25, 2026
Merged
…rfaces-refresh Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # README.md # docs/internals/architecture.md # docs/manual/authoring.md # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md # docs/reference/diagnostics.md # mkdocs.yml
A heading nested under another heading or under a part : Section is now a reference target by its path (sysml:appendix.derivation, sysml:overview.mass_budget), in its own document and qualified by a document from another, so the path a section renders under is also the path a reference may spell. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ging develop The merge brought develop's baseline, recorded before the self-model grew, so the examples root moves as before (26227 -> 26982 matched elements); the manual-examples root gains the whole-document example merged in from the document-bodies branch (10 -> 11 files), and spec-examples moves by three property counts develop's own later changes left behind. The record's headline, gap rows and per-root rows, and the count lines docs-counts derives, follow the new baseline. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Takes develop's README, architecture and referee baselines, then regenerates them on the merged tree: make docs-counts, pilot-diff -update (the self-model's two extra pilot-only rows on document.sysml over develop's figures), pilot-apijson-diff -update (the examples and manual-examples roots) and pilot-reject -update (no movement). The four testing-pilot skill headlines keep develop's text with the merged figures. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This was referenced Oct 26, 2026
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.
What and why
examples/self-model/is OpenSysML's architecture written in SysML v2, andexamples/self_model_test.goreads the facts back out of the analysed model and compares them with the implementation. The facts that test pins (pass registry, budgets, rendering kinds, export formats, RPCs, LSP capabilities, analysis engines, identity and sync) were current atorigin/develop=76c98694c; the surfaces it does not pin had drifted. The tree carries nine commands (cmd/), an MCP server, a Jupyter kernel with its Python package and JupyterLab extension, four JSON-RPC commands a WebAssembly host runs, Markdown and AsciiDoc parsers behind a prose body, a CLI with four report formats and an FMI gate over the Modelica Reference-FMUs — and the model had none of them (grep -ciof the model at76c98694c:mcp 0,jupyter 0,asciidoc 0,wasm 1).This PR audits the model against
cmd/,internal/,client/,editors/,Makefileanddocs/internals/architecture.mdat that commit, models every gap in the file it belongs to, pins every new fact in a second test file (examples/self_model_surfaces_test.go, soself_model_test.gostays under the 2,000-line cap oftests/hygiene/size_test.go), exposes the new parts in two new views, extends the architecture document's queries and prose, and brings the README's file table and figures back in line with real runs.Audit
Status: ok = modelled and pinned before this PR; wrong = modelled, corrected here; missing = added here; out of scope = not modelled, with the reason.
76c98694cCOMMANDS := sysml sysml-lsp sysml-grpc sysml-jupyter-kernel sysml-mcp(5 released),WASM_COMMANDSaddssysml-engine sysml-syntax sysml-core sysml-wasm(9)sysml,sysml-lsp,sysml-grpconly; comment said "the three commands build for WebAssembly"Toolchain.releasedCommandCount = 5,wasmCommandCount = 9, one part per command; pinned against the two Makefile variables (TestSelfModelCommandsMatchMakefile)internal/frontend/{repl,lsp,grpc,stdio},cmd/sysml-format text|json|sarif|junit,internal/frontend/report/{sarif,junit}CommandLine.reportSetting/reportFormats/reportPackages; pinned againstcmd/sysmlusage and the report packagescmd/sysml-mcp,internal/frontend/mcp(cataloggroupslsp, runtime, session,-tools,-http,/mcp,OPENSYSML_MCP_TOKEN),packaging/mcp/server.json,make conformance-mcpMcpServerpart; pinned against the catalog groups, flags, path and token constants, the manifest and the Make targetcmd/sysml-jupyter-kernel,internal/frontend/jupyter(kernelsysml, display nameSysML v2 (OpenSysML), nine MIME types), wraps the REPLJupyterKernelpart wired torepl; pinned against the kernelspec constants, flags and MIME constantscmd/sysml-syntax(Parse, Format, Tokens),cmd/sysml-engine,cmd/sysml-core,cmd/sysml-wasm(internal/frontend/{syntax,engine,core,combined}overinternal/frontend/jsonrpc); release shipssysml-wasm.wasmwasmmention)JsonCommandwithSyntaxCommand,EngineCommand,CoreCommand,CombinedCommand;servespinned against each package'sswitch methoddispatch,released/buildsForWasmagainst the Makefile,releaseAssetagainstbuild-release-wasm,statelessagainst whether the package imports the libraryclient/client/jupyter-kernel(jupyter-opensysml-kernel,make jupyter-kernel-install/-test)JupyterKernelPackage; pinned againstpyproject.tomland the Make targetseditors/jupyterlab(jupyterlab-opensysml,src/syntax.json,make jupyterlab-build/-test)JupyterLabExtension; pinned againstpackage.json, the syntax table and the Make targetseditors/vscode— sixopensysml.*commands,sysml/kermllanguages, diagram webview, landing page,tools/gengrammar,make vscode-grammarpackage.json, the source directories and the Makefileclient/java-basedinternal/semantic/highlight,internal/check/edit, …internal/ir/viewinternal/doc/*internal/ir/docplan/markup:Languages()=markdown,asciidoc; AsciiDoc leaves the process throughOPENSYSML_ASCIIDOCTOR/scripts/asciidoc/asciidoctor-json.jsMarkupParserwithMarkdownParser,AsciiDocParserfeedingDocumentPlanner(ProseBlocksitem); pinned againstmarkup.Languages(),For(), theexec.Commandcall and the converter scriptinternal/translate/*tests/fmigates the FMI integration overOPENSYSML_REQUIRE_REFERENCE_FMUSandscripts/download-reference-fmus.sh, CI sets the variableReferenceFmuGate— the thirteenth oracle; pinned against the test suite's constant, the script and the PR workflowmake conformance-mcpis one of the conformance protocolsConformanceSuite.protocolslackedmcpknownProtocolsinternal/syntax,internal/semantic,internal/check/passespart-usage-part-definition; not modelled here)internal/exec/*SweepEnginecoversinternal/exec/sweep, pinned byanalysis.Default())internal/semantic/identity,reposyncinternal/exec/fmianalysis.Default()grep -ri airflowfinds nothing undercmd/,internal/,client/,editors/)tests/directory held no allocationtestsdirectory added; every new part allocatedModel changes
surfaces.sysml:McpServer,JupyterKernel,JsonCommand+SyntaxCommand/EngineCommand/CoreCommand/CombinedCommand,JupyterKernelPackage,JupyterLabExtension, VS Code extension attributes,MarkupParser+MarkdownParser/AsciiDocParser,DocumentPlanner.markupLanguages,ReferenceFmuGate,CommandLinereport attributes,ConformanceSuite.protocols, andToolchaincounts, parts and connections.pipeline.sysml:item def ProseBlocks(what a markup parser hands the planner).quality.sysml:testssource directory; allocations of every new part.views.sysml:surfaceTableandmarkupParsers(forty views rendered, up from thirty-eight).document.sysml:SurfacesWithProtocolsandMarkupLanguagesqueries, adocumentPipelineroot, the surfaces section's prose and a table of every surface with its command and protocol, a table of the markup languages.README.md: file table (eleven interfaces, thirteen oracles, forty views, the parsers and notebook packages), the "Keeping it honest" section names both test files.Overlaps
Dry-merged this branch (head
0aa997f48, which mergesorigin/developat1c8e9e92f,15ac97cffand11c4699a9) against every open PR that touchesexamples/self-model/, the self-model tests, or a baseline / count line this PR re-recorded (gh pr list --json files+git ls-remote --heads origin):feat/document-whole-bodies, head2672d357c): conflicted indocument.sysmlat its earlier headd8223dcb2(both add to the Documents and views section). Resolved by merging that head as a merge commit (c39b4b368); its current head, with its two review fixes (703e4ccaa,2672d357c), is merged in as4200838ed. Nothing of it was re-done.fix/part-usage-part-definition-reading) is merged (11c4699a9), andorigin/developat that commit is merged into this branch as0aa997f48. The ten conflicts were resolved by regeneration, not by hand: develop'sREADME.md,docs/internals/architecture.md,docs/project/{pilot,api-json}-differential{,-baseline}.*and the four.agents/skills/testing-pilot-*/SKILL.mdwere taken, thenmake docs-counts,pilot-diff -update,pilot-apijson-diff -updateandpilot-reject -updateran on the merged tree; the skill headlines keep develop's wording with the merged figures. Movement against develop's files:pilot-diff— onlyexamples/self-model/document.sysml, the same two pilot-onlykind-mismatchrows as before (examples61 → 63; 2448 → 2450 only-pilot, 3557 → 3559 pilot diagnostics; develop's own 521 agreeing / 359 only-ours / 1468 our diagnostics from fix(check): withdraw part-usage-part-definition; a part usage's derived partDefinition is never empty #1484 are untouched);pilot-apijson-diff—examples(26219 → 26974 matched, 5956 → 6046 ours-only, 14768 → 15056 pilot-only: the self-model's parts) andmanual-examples(10 → 11 files, 7150 → 7191 matched: feat(docplan): headings in markup bodies open sections #1477'swhole-document.sysml);pilot-reject— none (349 cases: 337 both reject, 12 only we reject). Against this branch's previous headec1212375, the only other movement is develop's own (fix(check): withdraw part-usage-part-definition; a part usage's derived partDefinition is never empty #1484's −7 only-ours / +4 agreeing files;examples26982 → 26974 matched, 15058 → 15056 pilot-only).sysml:value) #1476 (feat/document-inline-values), fix(parser,runtime): satisfybytakes a feature chain; a satisfy stating nobyreads its owner as the subject #1466 (fix/satisfy-by-expression), refactor: replace hand-rolled membership and index helpers with slices.* #1497 (refactor/slices-contains-helpers) and fix(export): check sysx:conjugatedTyping against the typing element only #1485 (fix/rdf-conjugated-port-subsetting) are merged;origin/developat1c8e9e92f(22 PRs past76c98694c) is merged into this branch as084410b4a.origin/developat15ac97cffis merged asec1212375for test(runtime): record the Box subitems a resolvable binding end lets the walk reach #1515 (7451b58e0), which re-recorded theProbe::box.subitemssweep row andinstance_library_geometry_box.expected.jsonthat fix(runtime): read a binding linking some value of each end as a constraint #1508's merge had left develop red on — the two shards the previous head's full tier failed; it touches no baseline or count file, so nothing was regenerated. Of its seven conflicts,README.md,docs/internals/architecture.mdanddocs/project/api-json-differential{,-baseline}.*were taken from develop and regenerated (make docs-counts,pilot-apijson-diff -update, below);docs/manual/authoring.md,docs/reference/diagnostics.mdandmkdocs.ymlkeep both sides (feat(doc): read model values into Markdown and AsciiDoc prose (sysml:value) #1476'ssysml:valueprose, row and nav entry beside feat(docplan): headings in markup bodies open sections #1477's headings section, rows,markup-heading-levelcode and nav entry).rep language "asciidoc") #1454 is merged.How it was verified
All from the repo root after
make build, at head0aa997f48:./bin/sysml examples/self-model/*.sysml -validatego test -count=1 ./examples/ok(7.5s)go test -race -count=1 ./examples/ok(44.4s)make self-modelbuild/self-model/(38 views before this PR)./bin/sysml examples/self-model/*.sysml -render-document OpenSysMLDocument::ArchitectureDocument -doc-form html -doc-toc -o build/self-model/architecture.html./scripts/download-doc-pdf-toolchain.shthen the README's PDF command (-doc-title-page -doc-toc -doc-number-sections)pdfinfo). The README said thirteen; the same command overorigin/developgives 34, so the figure was already stale — the README now says thirty-sixgofmt -l .go vet ./...go test -count=1 ./tests/hygiene/ok— both self-model test files are under the 2,000-line capOPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_SPEC_EXAMPLES=1 go test -count=1 ./tests/corpus -run 'TestCorpusRoundTrip$|TestCorpusAPIJSONRoundTrip'ok(51.5s) — no movement in the eight self-model rows of either expectation filego run -C tools ./cmd/pilot-diff -check(examples/is one of its roots, the self-model included)examples/self-model/document.sysml, two more pilot-onlykind-mismatchwarnings (examples61 → 63, totals 2448 → 2450 only-pilot, 3557 → 3559 pilot diagnostics) on the two new tables'in redefines root = …lines — the same shape and warning as every table already there. Adjudicated as expected and re-recorded with-update; after the develop merge-checkreproduces the baseline unchangedgo run -C tools ./cmd/pilot-apijson-diff -checkexamples/covers the self-model, so it refused the committed baseline; re-recorded with-updateafter the develop merge. Against develop's baseline (168c882e4, #1476) the roots that move areexamples(26227 → 26982 matched, 5956 → 6046 ours-only, 14770 → 15058 pilot-only — the new parts, attributes and ports of the self-model),manual-examples(10 → 11 files:docs/manual/examples/whole-document.sysml, merged in with #1477's head) andspec-examplesby three property counts (76417 → 76419 present-equal, 1553 → 1552 present-different, 74026 → 74025 ours-missing) that develop's own changes since168c882e4left behind its baseline. The record's headline, launch-ready gap rows and per-root table follow the baseline (the per-root rows were stale on develop too — e.g.tests/testdatasaid 36 files / 1414 matched where develop's own baseline had 40 / 1460)make docs-countsREADME.md,docs/internals/architecture.md,docs/project/{pilot,api-json}-differential.md, four.agents/skills/*/SKILL.mdheadlines) were brought to the new figures;-checkpasses: "Documentation counts and refereed figures are current"Baselines that read the self-model:
tests/corpus/testdata/{api_json_roundtrip,corpus_roundtrip}_expected.txtlist the eight files —TestCorpusRoundTripand the API-JSON round trip re-run above with no movement.docs/project/api-json-differential-baseline.jsonandpilot-differential-baseline.jsondo not takeexamples/self-modelas a root (tools/referee/diff/main.go,tools/referee/apijson), so nothing there moves.The two edits to
docs/internals/architecture.mdare the generated corpus-agreement count linemake docs-countsrewrites (2448 → 2450); its prose was not touched, see Follow-ups.Follow-ups
The audit at
76c98694cfounddocs/internals/architecture.mdstale on five points (three of ninecmd/binaries,internal/frontend/withoutmcp/jupyter/syntax/engine/core/combined,client/with two of eight directories, noeditors/entry, no mention of the MCP server, Jupyter kernel, WebAssembly builds or the Markdown/AsciiDoc prose parsers). All five were fixed on develop by #1505 (f0733bae8, "docs(internals): list every binary, frontend, client and editor the tree has"), which this branch now carries; the only edits to that file here are the generated count linesmake docs-countsrewrites.Two automated review findings on #1477's planner code (nested heading paths as reference targets; punctuated explicit AsciiDoc ids) are addressed on this head: the first by
845e20e5c(markupOutline.sectionAt,TestCompileWholeDocumentNestedSectionPaths, a paragraph indocs/manual/authoring.md), the second by merging #1477's head2672d357c, which fixes it.Checklist
make testandmake lintpass locally (gates above)examples/self-model/README.md)make docs-countsrun if a gate count moved — none moved