DOCUMENTATION: Split dependency graph data into YAML per project - #33
Open
cjdutoit wants to merge 1 commit into
Open
DOCUMENTATION: Split dependency graph data into YAML per project#33cjdutoit wants to merge 1 commit into
cjdutoit wants to merge 1 commit into
Conversation
Replaces the executable graph-data.js with declarative data files, one per project boundary, mirroring the CMDB node style: graph.yml is the manifest (projects, roots, events, column map) and projects/*.yml each declare one project's components with their methods and outbound flows. index.html now fetches and assembles those files through a small YAML subset parser, keeping the renderer and the data fully separated; both views read the same assembled model, and externals flagged deriveMethods still get their rows derived from inbound edges at load time. Includes the LoggingBroker regeneration from the unit-tests branch, so that branch's graph commits can be dropped on rebase. Round-trip verified equivalent: identical components, edges, roots and rendered counts in both views. Because the data is fetched, the page must now be served over HTTP (or viewed via GitHub Pages) rather than opened from disk; the README and skill are updated to match and the Pages workflow stages the new files.
There was a problem hiding this comment.
Pull request overview
This PR refactors the solution dependency graph documentation so the graph model is stored as declarative YAML (manifest + per-project files) and the existing index.html renderer loads/assembles that data at runtime, enabling easier diffs/hand-edits and reuse outside the renderer.
Changes:
- Replaced executable
graph-data.jswithgraph.yml(manifest) plusprojects/*.yml(one per project/package boundary). - Updated
index.htmlto fetch, parse (limited YAML subset), assemble, and then render the graph data. - Updated supporting documentation and GitHub Pages publishing workflow to ship the new data layout.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Documentation/DependencyGraph/README.md | Updated usage docs and introduced the new data-file structure and editing guidance. |
| Documentation/DependencyGraph/index.html | Added graph data loader + YAML-subset parser; renderer now starts after assembled data loads. |
| Documentation/DependencyGraph/graph.yml | New manifest defining projects, roots, and event registry for the graph. |
| Documentation/DependencyGraph/projects/nhsdigital-apiplatform-sdk.yml | New per-project YAML defining SDK components, methods, and outbound calls. |
| Documentation/DependencyGraph/projects/nhsdigital-apiplatform-sdk-aspnetcore.yml | New per-project YAML defining ASP.NET Core session broker components and calls. |
| Documentation/DependencyGraph/projects/nhsdigital-apiplatform-infrastructure.yml | New per-project YAML defining infrastructure program/script-generation components and calls. |
| Documentation/DependencyGraph/projects/nhs-digital-api-platform-remote.yml | New external-remote YAML describing CIS2/PDS externals (deriveMethods). |
| Documentation/DependencyGraph/projects/net-base-class-library.yml | New external YAML describing BCL surface used (deriveMethods). |
| Documentation/DependencyGraph/projects/microsoft-extensions-logging.yml | New external YAML describing logging surface (utility + deriveMethods). |
| Documentation/DependencyGraph/projects/microsoft-extensions-http.yml | New external YAML describing HttpClientFactory/HttpClient surface (deriveMethods). |
| Documentation/DependencyGraph/projects/asp-net-core.yml | New external YAML describing ASP.NET Core session/context surface (deriveMethods). |
| Documentation/DependencyGraph/projects/adotnet.yml | New external YAML describing ADotNet surface used (deriveMethods). |
| Documentation/DependencyGraph/graph-data.js (deleted) | Removed old executable data model now replaced by YAML files. |
| .github/workflows/pages.yml | Updated Pages workflow to publish graph.yml and projects/ alongside index.html. |
| .claude/skills/update-dependency-graph/SKILL.md | Updated skill documentation to regenerate the new YAML-based graph data files. |
Suppressed comments (1)
Documentation/DependencyGraph/README.md:187
- The README describes a “small YAML subset” but doesn’t explicitly call out that inline comments (e.g.
key: value # comment) are not supported by the parser. Adding this avoids future edits introducing hard-to-spot parse failures.
Strings containing anything beyond letters, digits, spaces, `_.-/()` are
double-quoted JSON strings — the renderer parses a deliberately small YAML
subset, so stick to the shapes above (single-line scalars, no anchors, no
multi-line blocks).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+163
to
+175
| layer: foundation # exposer|client|processing|orchestration| | ||
| # foundation|broker|external | ||
| col: 4 # layout column — map documented in graph.yml | ||
| shared: true # optional: consumers link to ONE copy | ||
| utility: true # optional: hidden behind the header toggle | ||
| deriveMethods: true # optional: rows derived from inbound edges | ||
| # (externals — rows can never drift from arrows) | ||
| description: "..." | ||
| methods: [...] | ||
| calls: # outbound flows, one per call | ||
| - from: <method or null> # null = header-level link | ||
| to: <component id> | ||
| method: <method or null> |
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.
closes #32
Summary
Separates the dependency graph's data from its renderer, following the
CMDB-node style: instead of an executable
graph-data.js, the model nowlives in declarative YAML — one file per project / package boundary plus a
manifest — and
index.htmlfetches and assembles them at load time. Samechange as NHSISL/LondonFhirService#178.
Structure
Each component declares
id / name / layer / col, optionalshared/utility/deriveMethodsflags, itsmethods, and itsoutbound
calls(withpublishes/subscribesready for a future eventbus). Externals flagged
deriveMethodsstill get their method rows derivedfrom inbound edges at load time, so rows and arrows cannot drift apart.
index.htmlgains a small YAML-subset parser + assembler and now exposeswindow.__graphfor console debugging; everything downstream of assembly isuntouched.
Basis
Converted from the newest graph content — the LoggingBroker regeneration
on
users/cjdutoit/foundations-sdk-add-unit-tests(5c3bcae), not the oldercopy on
main— so that branch's two graph commits become redundant and canbe dropped when it rebases.
Equivalence
graph-data.jsand parse-assemblesthe new YAML, then compares projects, roots, events, every component
(including derived method rows) and every edge as a multiset — identical:
29 components, 86 edges.
configurations: 25 components · 79 flows / 100 nodes · 413 flows
(29 · 86 and 115 · 443 with utility brokers on), zero overlaps.
Trade-offs
the one-liner) or viewed on GitHub Pages; opening
index.htmlstraightfrom disk shows an explanatory panel instead of a graph.
README, the
/update-dependency-graphskill andpages.ymlare updated tomatch.