Skip to content

DOCUMENTATION: Split dependency graph data into YAML per project - #33

Open
cjdutoit wants to merge 1 commit into
mainfrom
users/cjdutoit/documentation-graph-data-yml
Open

DOCUMENTATION: Split dependency graph data into YAML per project#33
cjdutoit wants to merge 1 commit into
mainfrom
users/cjdutoit/documentation-graph-data-yml

Conversation

@cjdutoit

Copy link
Copy Markdown
Contributor

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 now
lives in declarative YAML — one file per project / package boundary plus a
manifest — and index.html fetches and assembles them at load time. Same
change as NHSISL/LondonFhirService#178.

Structure

Documentation/DependencyGraph/
  index.html            renderer only (both views, unchanged behaviour)
  graph.yml             manifest: projects, root order, events, column map
  projects/
    nhsdigital-apiplatform-sdk.yml             one file per boundary, each
    nhsdigital-apiplatform-sdk-aspnetcore.yml  declaring its components with
    nhsdigital-apiplatform-infrastructure.yml  their methods + outbound flows
    ... (9 files)

Each component declares id / name / layer / col, optional
shared / utility / deriveMethods flags, its methods, and its
outbound calls (with publishes / subscribes ready for a future event
bus). Externals flagged deriveMethods still get their method rows derived
from inbound edges at load time, so rows and arrows cannot drift apart.

index.html gains a small YAML-subset parser + assembler and now exposes
window.__graph for console debugging; everything downstream of assembly is
untouched.

Basis

Converted from the newest graph content — the LoggingBroker regeneration
on users/cjdutoit/foundations-sdk-add-unit-tests (5c3bcae), not the older
copy on main — so that branch's two graph commits become redundant and can
be dropped when it rebases.

Equivalence

  • A round-trip checker evaluates the old graph-data.js and parse-assembles
    the new YAML, then compares projects, roots, events, every component
    (including derived method rows) and every edge as a multiset — identical:
    29 components, 86 edges
    .
  • Rendered counts match the README's documented numbers exactly in all four
    configurations: 25 components · 79 flows / 100 nodes · 413 flows
    (29 · 86 and 115 · 443 with utility brokers on), zero overlaps.

Trade-offs

  • Because the data is fetched, the page must be served (the README gives
    the one-liner) or viewed on GitHub Pages; opening index.html straight
    from disk shows an explanatory panel instead of a graph.

README, the /update-dependency-graph skill and pages.yml are updated to
match.

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.
Copilot AI lite review requested due to automatic review settings August 12, 2026 09:09
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js with graph.yml (manifest) plus projects/*.yml (one per project/package boundary).
  • Updated index.html to 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOCUMENTATION: Split dependency graph data into YAML per project

2 participants