docs(markup): clarify native note composition#573
Conversation
7973cf1 to
49f1084
Compare
Greptile SummaryThis PR updates the STML authoring guide to clarify that agent-generated markup renders as the body inside Hunk's existing note frame, not as a standalone card replacing it. It adds a new "Composition" section with explicit guidance on border depth and structure, updates the intro example to demonstrate unboxed badge-first usage, and renames the "Titled card" example to "Focused inset" to align with the new guidance.
Confidence Score: 5/5Safe to merge — changes are confined to guide prose, one test, and a changeset file with no runtime logic touched. All three changed files are documentation or test fixtures. The guide string is a template literal with no branching logic; the new test guards the exact phrases agents are expected to learn, so any future accidental text drift will be caught immediately. The stmlGuideSnippets extractor is unchanged and the existing layout tests continue to cover every fenced snippet at the reference width. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Hunk note frame\n(drawn by Hunk: author, source location)"] --> B["STML body\n(rendered from --markup / markup field)"]
B --> C["Verdict badge + plain summary text\n(start unboxed)"]
C --> D{"Evidence needed?"}
D -- "single inset" --> E["<box border> inset\n(one border level)"]
D -- "comparison / metrics" --> F["<row gap>\n <box border> sibling A\n <box border> sibling B"]
D -- "no extra framing" --> G["Plain text, badges, gauges"]
E -. "FORBIDDEN" .-> H["<box border> inside another <box border>"]
F -. "FORBIDDEN" .-> H
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["Hunk note frame\n(drawn by Hunk: author, source location)"] --> B["STML body\n(rendered from --markup / markup field)"]
B --> C["Verdict badge + plain summary text\n(start unboxed)"]
C --> D{"Evidence needed?"}
D -- "single inset" --> E["<box border> inset\n(one border level)"]
D -- "comparison / metrics" --> F["<row gap>\n <box border> sibling A\n <box border> sibling B"]
D -- "no extra framing" --> G["Plain text, badges, gauges"]
E -. "FORBIDDEN" .-> H["<box border> inside another <box border>"]
F -. "FORBIDDEN" .-> H
Reviews (1): Last reviewed commit: "docs(markup): clarify native note compos..." | Re-trigger Greptile |
49f1084 to
929b29a
Compare
929b29a to
36123b4
Compare
Summary
Testing
bun run typecheckbun run lintbun test src/ui/lib/stml(45 passed)bun src/main.tsx markup guideThis PR description was generated by Pi using OpenAI GPT-5.3 Codex