Extend platformos-graph to manage project structural/dependency model for supervisor#65
Merged
Conversation
…fs documentation feat: Extend platformos-graph to manage project structural/dependency model for supervisor feat: Enhance graph traversal to include function, graphql, and layout edges as first-class nodes feat: Implement project-structure query API in platformos-graph to restore old project-map capabilities feat: Expose per-file self-structural facts on platformos-graph modules for efficiency feat: Centralize layout-association edges and enhance DocumentsLocator for layout resolution test: Add fixtures and tests for function, graphql, and include edges in platformos-graph
Slashek
reviewed
Jun 25, 2026
- Removed the `getWebComponentMap` and `findWebComponentReferences` functions from the codebase. - Updated the `augmentDependencies` function to eliminate references to web component definitions. - Refactored tests and dependencies to remove reliance on web component functionality. - Adjusted the `getDependencies` function to simplify its return structure. - Cleaned up related types and interfaces in `types.ts`. - Updated the CLI and graph traversal logic to reflect the removal of web component handling.
…t timeout) and update related tests
Slashek
approved these changes
Jun 29, 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.
Extend platformos-graph: dependency edges, per-file extraction, CLI, web-component removal
Summary
Extends @platformos/platformos-graph so it can model the full platformOS dependency surface and expose it both as a CLI and as a per-file primitive — the structural model the rebuilt MCP supervisor will consume (TASK-9). Also removes the dead Shopify-era web-component machinery, modernizes the CLI, and hardens everything for Windows CI.
What changed
traverseModule previously extracted only {% render 'literal' %} and asset filters. It now resolves the full set of Liquid dependency constructs, each tagged with a semantic ReferenceKind:
All targets resolve through check-common's DocumentsLocator, so lib search paths, modules//public/... prefixes, and .liquid / .html.liquid extensions are handled uniformly —
commands/queries/graphql files are now first-class nodes. ReferenceKind is an additive, optional field on Reference; the LSP consumers (platformos_references / dependencies / dead_code)
were re-verified.
The visitor/resolution logic was factored into a single shared resolveLiquidReferences, used by both the full-project traversal and a new public primitive:
extractFileReferences(rootUri, sourceUri, sourceCode, { fs }): Promise<Reference[]>
It returns one file's resolved outgoing edges without building the whole graph, parsing an in-flight buffer (not disk) — the model a validate_code-style tool needs ("validate before
writing"; the file may not exist yet). Per-file and project-wide resolution share one code path, so they can't drift. Supervisor wiring guidance recorded in backlog TASK-9 / TASK-9.3.
The old bin referenced non-existent Shopify packages and an undeclared dependency. Rewritten as a thin wrapper over a testable cli.ts core:
Deleted getWebComponentMap.ts, the visitor, WebComponent* types, the getWebComponentDefinitionReference dependency, and 'web_component' from ReferenceKind — cross-package
(graph + LSP AppGraphManager). platformOS doesn't use customElements.define; this was inherited dead code.
graph-key matching; now normalized to forward slashes.
SerializableEdge = Reference.
Verification
Follow-ups (tracked in backlog, not in this PR)