You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every view template in a project lands in application.artifacts{} with roles: ["unknown"]. Measured on a fixture containing one of each shape (analyzer at HEAD, -a 2):
The record itself is complete — full source, sha256, size_bytes, correct repo-relative key — so nothing is lost. What is missing is the one field a consumer would filter on to ask "what are this application's views?", which today requires the consumer to re-derive the answer from file extensions the analyzer already inspected.
roles[] is where that answer belongs: dependency-manifest and tool-config are already assigned by exactly this kind of recognition.
Scope boundary
Roles only. This issue does not parse a single line of template content, does not add a symbol_table entry for a template, and does not model template expressions. Those are the structural half of the same subject and belong on the design rung (see the sibling issue).
No contract move.roles[] is an existing string[]; this adds new values to it, the same class of change as a new framework value in the entrypoint pass. No new field, node label, edge type or property, and schema.neo4j.json must stay byte-identical.
Cross-language parity is a live consideration: codeanalyzer-java is working on JSP/JSF/Thymeleaf views right now, so whichever analyzer assigns a role name first coins it for both. Prefer a name that is not TS-specific.
Goals
Recognize view templates by extension in the artifact role assignment: .vue, .svelte, .astro, .ejs, .hbs, .handlebars, .pug, .njk, .liquid, .html, .htm.
Assign one role name for the class, coined once (candidate: view-template), and record the chosen spelling in .claude/SCHEMA_DECISIONS.md so the sibling analyzers adopt rather than re-coin.
.html needs a judgment call, not a blanket rule: a public/index.html is a view, a coverage report under a non-skipped directory is not. Decide and document whether .html gets the role unconditionally or only outside build-output paths.
Test: a fixture with each extension asserts the role, and asserts a .json/.md artifact does not get it.
bun run gen:schema leaves schema.neo4j.json byte-identical.
Caveats and known risks
A role name is permanent vocabulary. codeanalyzer-java's equivalent work is in flight; coining view-template here and having java coin template there is the failure this repo's parity clause exists to prevent. Check before merging.
Extension-based recognition will mislabel a hand-written .html fixture used as test input as a view. Acceptable — roles[] is best-effort classification, and the artifact record is unchanged either way — but say so in the code comment rather than pretending precision.
.astro and .vue files are also the subject of the module issue. This issue must not pre-empt that decision: assigning a role now must not require re-deciding it later if the file additionally becomes a symbol_table module.
Definition of done
A fixture containing all listed extensions produces artifacts whose roles[] carries the coined view-template role, a non-template artifact does not, the chosen name is written into .claude/SCHEMA_DECISIONS.md with a note that siblings adopt it verbatim, and schema.neo4j.json is byte-identical.
Problem
Every view template in a project lands in
application.artifacts{}withroles: ["unknown"]. Measured on a fixture containing one of each shape (analyzer at HEAD,-a 2):The record itself is complete — full
source,sha256,size_bytes, correct repo-relative key — so nothing is lost. What is missing is the one field a consumer would filter on to ask "what are this application's views?", which today requires the consumer to re-derive the answer from file extensions the analyzer already inspected.roles[]is where that answer belongs:dependency-manifestandtool-configare already assigned by exactly this kind of recognition.Scope boundary
symbol_tableentry for a template, and does not model template expressions. Those are the structural half of the same subject and belong on the design rung (see the sibling issue).roles[]is an existingstring[]; this adds new values to it, the same class of change as a newframeworkvalue in the entrypoint pass. No new field, node label, edge type or property, andschema.neo4j.jsonmust stay byte-identical.codeanalyzer-javais working on JSP/JSF/Thymeleaf views right now, so whichever analyzer assigns a role name first coins it for both. Prefer a name that is not TS-specific.Goals
.vue,.svelte,.astro,.ejs,.hbs,.handlebars,.pug,.njk,.liquid,.html,.htm.view-template), and record the chosen spelling in.claude/SCHEMA_DECISIONS.mdso the sibling analyzers adopt rather than re-coin..htmlneeds a judgment call, not a blanket rule: apublic/index.htmlis a view, a coverage report under a non-skipped directory is not. Decide and document whether.htmlgets the role unconditionally or only outside build-output paths..json/.mdartifact does not get it.bun run gen:schemaleavesschema.neo4j.jsonbyte-identical.Caveats and known risks
codeanalyzer-java's equivalent work is in flight; coiningview-templatehere and having java cointemplatethere is the failure this repo's parity clause exists to prevent. Check before merging..htmlfixture used as test input as a view. Acceptable —roles[]is best-effort classification, and the artifact record is unchanged either way — but say so in the code comment rather than pretending precision..astroand.vuefiles are also the subject of the module issue. This issue must not pre-empt that decision: assigning a role now must not require re-deciding it later if the file additionally becomes asymbol_tablemodule.Definition of done
A fixture containing all listed extensions produces artifacts whose
roles[]carries the coined view-template role, a non-template artifact does not, the chosen name is written into.claude/SCHEMA_DECISIONS.mdwith a note that siblings adopt it verbatim, andschema.neo4j.jsonis byte-identical.