Skip to content

Render site prompt docs from the napl q canonical document #45

Description

@omridevk

Context

Issue #10 predates the shipped canonical query document. napl q now exposes committed prompt documentation as structured modules, sections, cases, attribution, laws, and snapshot-bound refs. napl prompt materializes selected text from the same committed snapshot.

The site should consume that language-owned representation instead of independently parsing .napl markdown into a second semantic model.

Architecture

  • Obtain document structure and metadata from the napl q canonical document.
  • Treat sections, cases, attribution status, laws, file ownership, and refs as authoritative language output.
  • Materialize referenced prompt prose from the committed snapshot.
  • Render prose with plain remark plus remark-directive, not MDX. MDX interprets { as expression syntax and cannot safely parse directive case values such as given: { ... } as ordinary prompt content.
  • Keep site rendering presentation-only. It must not infer section boundaries, directive semantics, ownership, or attribution by reparsing markdown.

Acceptance criteria

  • The rendered NAPL view is built from napl q canonical-document data and snapshot-bound refs.
  • Headings, prose, lists, fences, and directives render without MDX expression parsing.
  • ::: test cases render from canonical case data, including given values containing {.
  • Attribution, laws, stale associations, and file links come directly from canonical fields.
  • The site has no independent NAPL semantic parser and no fixture-only AST that can drift from the CLI.
  • SSR and hydrated output use the same canonical fixture data and remain pixel-equivalent.

Relationship to existing work

This narrows #10 and #14. The directive grammar and canonical semantic projection already shipped in #13; remaining site work is a renderer over that projection, not a new NAPL AST authority.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions