@agent-native/core 0.44.4 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/cli/connect.d.ts +2 -1
  2. package/dist/cli/connect.d.ts.map +1 -1
  3. package/dist/cli/connect.js +185 -5
  4. package/dist/cli/connect.js.map +1 -1
  5. package/dist/cli/index.js +27 -0
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/plan-local.d.ts +43 -0
  8. package/dist/cli/plan-local.d.ts.map +1 -0
  9. package/dist/cli/plan-local.js +477 -0
  10. package/dist/cli/plan-local.js.map +1 -0
  11. package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
  12. package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
  13. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  14. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  15. package/dist/cli/recap.d.ts +164 -0
  16. package/dist/cli/recap.d.ts.map +1 -1
  17. package/dist/cli/recap.js +657 -10
  18. package/dist/cli/recap.js.map +1 -1
  19. package/dist/cli/skills.d.ts +2 -2
  20. package/dist/cli/skills.d.ts.map +1 -1
  21. package/dist/cli/skills.js +160 -387
  22. package/dist/cli/skills.js.map +1 -1
  23. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  24. package/dist/client/blocks/library/AnnotatedCodeBlock.js +4 -1
  25. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  26. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
  27. package/dist/client/blocks/library/DiffBlock.js +10 -11
  28. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  29. package/dist/client/blocks/library/annotation-rail.d.ts +15 -5
  30. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  31. package/dist/client/blocks/library/annotation-rail.js +35 -24
  32. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  33. package/dist/client/blocks/library/code-filename-label.d.ts +8 -0
  34. package/dist/client/blocks/library/code-filename-label.d.ts.map +1 -0
  35. package/dist/client/blocks/library/code-filename-label.js +15 -0
  36. package/dist/client/blocks/library/code-filename-label.js.map +1 -0
  37. package/dist/client/blocks/library/code.d.ts.map +1 -1
  38. package/dist/client/blocks/library/code.js +3 -2
  39. package/dist/client/blocks/library/code.js.map +1 -1
  40. package/dist/client/blocks/library/diff.config.d.ts +1 -1
  41. package/dist/client/blocks/library/diff.config.js.map +1 -1
  42. package/dist/client/blocks/library/narrow-container.d.ts +4 -4
  43. package/dist/client/blocks/library/narrow-container.d.ts.map +1 -1
  44. package/dist/client/blocks/library/narrow-container.js +10 -10
  45. package/dist/client/blocks/library/narrow-container.js.map +1 -1
  46. package/dist/client/blocks/library/tabs.d.ts.map +1 -1
  47. package/dist/client/blocks/library/tabs.js +7 -2
  48. package/dist/client/blocks/library/tabs.js.map +1 -1
  49. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  50. package/dist/client/composer/TiptapComposer.js +4 -1
  51. package/dist/client/composer/TiptapComposer.js.map +1 -1
  52. package/dist/client/db-admin/TableEditor.d.ts.map +1 -1
  53. package/dist/client/db-admin/TableEditor.js +3 -1
  54. package/dist/client/db-admin/TableEditor.js.map +1 -1
  55. package/dist/db/client.d.ts +8 -0
  56. package/dist/db/client.d.ts.map +1 -1
  57. package/dist/db/client.js +23 -2
  58. package/dist/db/client.js.map +1 -1
  59. package/dist/deploy/build.d.ts.map +1 -1
  60. package/dist/deploy/build.js +8 -0
  61. package/dist/deploy/build.js.map +1 -1
  62. package/dist/extensions/html-shell.js +1 -1
  63. package/dist/extensions/html-shell.js.map +1 -1
  64. package/dist/jobs/scheduler.d.ts.map +1 -1
  65. package/dist/jobs/scheduler.js +5 -1
  66. package/dist/jobs/scheduler.js.map +1 -1
  67. package/dist/mcp/build-server.d.ts +1 -0
  68. package/dist/mcp/build-server.d.ts.map +1 -1
  69. package/dist/mcp/build-server.js +7 -3
  70. package/dist/mcp/build-server.js.map +1 -1
  71. package/dist/mcp/oauth-route.d.ts.map +1 -1
  72. package/dist/mcp/oauth-route.js +56 -19
  73. package/dist/mcp/oauth-route.js.map +1 -1
  74. package/dist/mcp/oauth-store.d.ts +1 -0
  75. package/dist/mcp/oauth-store.d.ts.map +1 -1
  76. package/dist/mcp/oauth-store.js +9 -0
  77. package/dist/mcp/oauth-store.js.map +1 -1
  78. package/dist/mcp/server.d.ts.map +1 -1
  79. package/dist/mcp/server.js +9 -4
  80. package/dist/mcp/server.js.map +1 -1
  81. package/dist/mcp-client/errors.js +3 -3
  82. package/dist/mcp-client/errors.js.map +1 -1
  83. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  84. package/dist/server/agent-chat-plugin.js +3 -1
  85. package/dist/server/agent-chat-plugin.js.map +1 -1
  86. package/dist/server/agent-teams.d.ts.map +1 -1
  87. package/dist/server/agent-teams.js +10 -2
  88. package/dist/server/agent-teams.js.map +1 -1
  89. package/dist/server/auth.d.ts.map +1 -1
  90. package/dist/server/auth.js +7 -3
  91. package/dist/server/auth.js.map +1 -1
  92. package/dist/server/recap-image-route.d.ts.map +1 -1
  93. package/dist/server/recap-image-route.js +3 -6
  94. package/dist/server/recap-image-route.js.map +1 -1
  95. package/dist/server/sentry.d.ts.map +1 -1
  96. package/dist/server/sentry.js +12 -5
  97. package/dist/server/sentry.js.map +1 -1
  98. package/dist/server/social-og-image.d.ts.map +1 -1
  99. package/dist/server/social-og-image.js +3 -1
  100. package/dist/server/social-og-image.js.map +1 -1
  101. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +22 -6
  102. package/docs/content/plan-plugin.md +18 -1
  103. package/docs/content/pr-visual-recap.md +37 -10
  104. package/docs/content/template-plan.md +45 -1
  105. package/package.json +1 -1
  106. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +22 -6
@@ -1 +1 @@
1
- {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;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gBAAgB,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA0L1B;AAgBD,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAkIf"}
@@ -814,6 +814,37 @@ plan needs a richer review surface.
814
814
  update the plan with \`update-visual-plan\` rather than only changing course in
815
815
  chat, and re-read the approved plan before major steps.
816
816
 
817
+ ## Local-Files Privacy Mode
818
+
819
+ Use local-files privacy mode when the user explicitly asks for no DB writes,
820
+ no hosted Plan app, no Plan MCP publish, fully local files, offline/private
821
+ planning, or when \`AGENT_NATIVE_PLANS_MODE=local-files\` is set. In this mode the
822
+ plan data must never be sent to the Plan MCP server or Plan app action surface.
823
+
824
+ The local-files contract is:
825
+
826
+ - Read source context from local files and shell commands only.
827
+ - Write the plan as a local MDX folder under \`plans/<slug>/\`: \`plan.mdx\`,
828
+ optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
829
+ \`.plan-state.json\`.
830
+ - Run \`agent-native plan local preview --dir plans/<slug> --kind plan\` after
831
+ writing or updating the folder. Report the returned local URL or the
832
+ \`/local-plans/<slug>\` route if the local Plan app is running with the same
833
+ \`PLAN_LOCAL_DIR\`.
834
+ - Do **not** call \`create-visual-plan\`, \`create-ui-plan\`,
835
+ \`create-prototype-plan\`, \`create-plan-design\`, \`import-visual-plan-source\`,
836
+ \`update-visual-plan\`, \`patch-visual-plan-source\`, \`get-plan-feedback\`,
837
+ \`export-visual-plan\`, or any hosted Plan tool for that plan.
838
+ - Treat feedback as file or chat feedback: update the MDX files directly, rerun
839
+ the local preview command, and summarize the new local URL/path. Hosted
840
+ comments, sharing, history, and publish/export receipts are unavailable until
841
+ the user explicitly opts into publishing.
842
+
843
+ Local-files mode prevents plan content from going to the Agent-Native Plan
844
+ database. It does not by itself make the coding agent's language model local;
845
+ for that stronger privacy boundary, the host agent/model must also be local or
846
+ otherwise approved by the user.
847
+
817
848
  ## Core Workflow
818
849
 
819
850
  1. Follow the host agent's normal planning flow: inspect the codebase, delegate
@@ -1466,6 +1497,41 @@ schema, API, file, and architecture changes become the same \`data-model\`,
1466
1497
  now they summarize work that exists. A reviewer scans the shape of the change
1467
1498
  before spending attention on the literal lines.
1468
1499
 
1500
+ ## Local-Files Privacy Mode Exception
1501
+
1502
+ Use local-files privacy mode when the user explicitly asks for no DB writes,
1503
+ no hosted Plan app, no Plan MCP publish, fully local files, offline/private
1504
+ recaps, or when \`AGENT_NATIVE_PLANS_MODE=local-files\` is set. This is the only
1505
+ exception to the hosted publish rule below.
1506
+
1507
+ In local-files mode:
1508
+
1509
+ - Read the diff/stat/source context from local files and shell commands only.
1510
+ The existing \`agent-native recap collect-diff\`, \`scan\`, and
1511
+ \`build-prompt --local-files\` helpers are safe to use because they operate on
1512
+ local files and do not write to the Plan database.
1513
+ - Write the recap as a local MDX folder under \`plans/<slug>/\`: \`plan.mdx\`,
1514
+ optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
1515
+ \`.plan-state.json\`. Set \`kind: "recap"\` and \`localOnly: true\` in
1516
+ frontmatter/state when authoring the source.
1517
+ - Run \`agent-native plan local preview --dir plans/<slug> --kind recap\` after
1518
+ writing or updating the folder. Report the returned local URL or the
1519
+ \`/local-plans/<slug>\` route if the local Plan app is running with the same
1520
+ \`PLAN_LOCAL_DIR\`.
1521
+ - Do **not** call \`create-visual-recap\`, \`create-visual-plan\`,
1522
+ \`import-visual-plan-source\`, \`update-visual-plan\`,
1523
+ \`patch-visual-plan-source\`, \`get-plan-feedback\`, \`export-visual-plan\`,
1524
+ \`set-resource-visibility\`, or any hosted Plan tool for that recap.
1525
+ - Treat review feedback as file or chat feedback: update the MDX files directly,
1526
+ rerun the local preview command, and summarize the new local URL/path.
1527
+ Hosted comments, sharing, screenshots, usage attachment, and PR sticky comment
1528
+ publishing are unavailable until the user explicitly opts into publishing.
1529
+
1530
+ Local-files mode prevents recap content from going to the Agent-Native Plan
1531
+ database. It does not by itself make the coding agent's language model local;
1532
+ for that stronger privacy boundary, the host agent/model must also be local or
1533
+ otherwise approved by the user.
1534
+
1469
1535
  ## Always Publish As An Agent-Native Plan — Never Inline
1470
1536
 
1471
1537
  The deliverable is ALWAYS a published Agent-Native Plan, created with the
@@ -1476,7 +1542,8 @@ entire value is the hosted, interactive, annotatable plan; an inline summary is
1476
1542
  not a recap, it is the thing a recap replaces. The only supported output is to
1477
1543
  publish the plan and return its absolute URL.
1478
1544
 
1479
- If the \`plan\` MCP server's tools are not available, do NOT improvise an inline
1545
+ Except for the explicit local-files privacy mode above, if the \`plan\` MCP
1546
+ server's tools are not available, do NOT improvise an inline
1480
1547
  recap as a fallback. The usual cause is a connector that did not finish
1481
1548
  connecting this session (it registers zero tools), NOT necessarily an auth
1482
1549
  problem — so do not assume the user must authenticate. Stop and tell the user
@@ -1537,12 +1604,12 @@ evidence:
1537
1604
 
1538
1605
  - A \`file-tree\` of the changed files with each entry's \`change\` flag, so the
1539
1606
  reviewer sees the footprint of the work at a glance.
1540
- - The \`diff\` of the KEY changed files, grouped under a \`## Key changes\`
1541
- \`rich-text\` heading in a single vertical \`tabs\` block (file labels as the left
1542
- rail), with a one-line \`summary\` and a few \`annotations\` on each — so the
1543
- reviewer can drop from the high-altitude shape straight into the load-bearing
1544
- code. Leave \`mode\` unset so each diff renders unified the default — because a
1545
- tab panel is too narrow for split's side-by-side gutters to stay legible.
1607
+ - The split \`diff\` of the KEY changed files, grouped under a \`## Key changes\`
1608
+ \`rich-text\` heading in a single horizontal \`tabs\` block (the default
1609
+ orientation, one file per tab), with a one-line \`summary\` and a few
1610
+ \`annotations\` on each — so the reviewer can drop from the high-altitude shape
1611
+ straight into the load-bearing code. Use horizontal file tabs, not a vertical
1612
+ side rail, so the selected file has enough width for the side-by-side diff.
1546
1613
 
1547
1614
  Skip the diff appendix only for a genuinely tiny change that reviews faster as
1548
1615
  plain diff (see "When To Use"); for any change worth recapping, the file-tree and
@@ -1822,6 +1889,11 @@ text-match screenshot is not enough; visually inspect the captured image.
1822
1889
 
1823
1890
  ## Open And Report The Recap
1824
1891
 
1892
+ In local-files privacy mode, report the local preview URL/path from
1893
+ \`agent-native plan local preview\` or the \`/local-plans/<slug>\` route for a local
1894
+ Plan app using the same \`PLAN_LOCAL_DIR\`. Do not invent a hosted URL and do not
1895
+ publish just to get an absolute Plan link.
1896
+
1825
1897
  After creating the recap, link the reviewer to the rendered plan with an
1826
1898
  **absolute URL on the origin whose database actually holds the plan**. That
1827
1899
  origin is the Plan MCP server you just created the recap through — NOT whatever
@@ -1865,7 +1937,9 @@ artifacts, not as the main way to open the recap.
1865
1937
  ## Diff → Block Mapping
1866
1938
 
1867
1939
  Map each kind of change to the block that carries it, derived mechanically from
1868
- the actual diff:
1940
+ the actual diff. The names below are the CONCEPTUAL block types, not the JSX
1941
+ tags — resolve every conceptual name to its exact tag + prop schema with the
1942
+ \`get-plan-blocks\` tool (see "Block reference" below) before authoring.
1869
1943
 
1870
1944
  - **Schema / migration change** → \`data-model\` for the resulting entities,
1871
1945
  fields, and relations. Flag what moved per field/entity with
@@ -1892,42 +1966,36 @@ the actual diff:
1892
1966
  - **Compatibility-sensitive change** → short \`rich-text\` notes beside the
1893
1967
  relevant \`data-model\` / \`api-endpoint\` block. Name the changed field,
1894
1968
  endpoint, or behavior and mark whether it is breaking, risky, or non-breaking;
1895
- pair that note with a \`diff\` for the literal lines.
1896
- - **Any meaningful code hunk** → \`diff\` carrying the real \`before\` / \`after\` text
1897
- and the \`filename\` / \`language\`. Leave \`mode\` unset: unified is the default and
1898
- the right choice for a recap, since recap diffs almost always sit inside a
1899
- width-constrained container (a vertical-tabs panel or a comparison column)
1900
- where split's two line-number gutters cut the code off. Reach for \`mode:
1901
- "split"\` only for a standalone, full-document-width diff where side-by-side
1902
- genuinely helps. Give every \`diff\` a one-line \`summary\` saying what the hunk
1903
- changes and why; it renders as a description above the code so the reviewer
1904
- reads intent first. Never leave a diff unlabeled.
1969
+ pair that note with a split \`diff\` for the literal lines.
1970
+ - **Any meaningful code hunk** → \`diff\` with \`mode: "split"\`, carrying the real
1971
+ \`before\` / \`after\` text and the \`filename\` / \`language\`. Split mode is the
1972
+ default for recap code review because before/after legibility is the point;
1973
+ use \`mode: "unified"\` only for a genuinely narrow standalone hunk where
1974
+ side-by-side would hide the code. Give every \`diff\` a one-line \`summary\`
1975
+ saying what the hunk changes and why; it renders as a description above the
1976
+ code so the reviewer reads intent first. Never leave a diff unlabeled.
1905
1977
  For the KEY changed files, attach \`annotations\` to the \`diff\` so the recap
1906
1978
  calls out what each important hunk does — this is the headline affordance for
1907
- annotating the key files updated. Each annotation is
1908
- \`{ side?: "before" | "after"; lines: "13" | "13-15"; label?: string; note }\`
1909
- and anchors to the AFTER-side line numbers by default (set \`side: "before"\` to
1910
- point at removed lines). Keep it to a few high-signal notes per file, not one
1911
- per line.
1979
+ annotating the key files updated. Each annotation anchors to the AFTER-side
1980
+ line numbers by default (set \`side: "before"\` to point at removed lines). Keep
1981
+ it to a few high-signal notes per file, not one per line.
1912
1982
  When several key files each need a substantial diff, introduce the group with a
1913
1983
  \`rich-text\` heading block whose markdown is \`## Key changes\`, then place the
1914
- \`diff\` blocks under it in a reusable \`tabs\` block with
1915
- \`orientation: "vertical"\` so file labels form a left rail and the selected
1916
- file's diff renders unified on the right. Leave each diff's \`mode\` unset — the
1917
- tab panel is too narrow for split and let the unified default carry it. Let
1918
- that heading label the section — do NOT also set a \`title\` on the \`tabs\` block.
1919
- Keep each tab label to the file path or a short basename plus directory hint.
1984
+ \`diff\` blocks under it in a reusable \`tabs\` block with horizontal orientation
1985
+ (the default — omit \`orientation\`) so the selected file's split diff gets the
1986
+ full document width. Let that heading label the section do NOT also set a
1987
+ \`title\` on the \`tabs\` block. Keep each tab label to the file path or a short
1988
+ basename plus directory hint.
1920
1989
  If the recap ends with more than one supporting diff, that trailing diff
1921
- appendix should be one vertical \`tabs\` block under its own \`## Key changes\`
1990
+ appendix should be one horizontal \`tabs\` block under its own \`## Key changes\`
1922
1991
  heading, not a stack of separate \`diff\` blocks.
1923
1992
  - **Brand-new file or a substantial added block with no meaningful "before"** →
1924
- \`annotated-code\` rather than a one-sided \`diff\`. Carry the real new code
1993
+ \`annotated-code\` rather than a one-sided split \`diff\`. Carry the real new code
1925
1994
  with its \`filename\` / \`language\` and anchor a few high-signal notes to the lines
1926
- that matter (\`{ lines: "12" | "12-18"; label?; note }\`) so the reviewer reads
1927
- what the new code does, not code for code's sake. Keep \`diff\` for true
1928
- before/after hunks where the removed lines still carry meaning, and group
1929
- several annotated walkthroughs in a vertical \`tabs\` block the same way diffs are
1930
- grouped.
1995
+ that matter so the reviewer reads what the new code does, not code for code's
1996
+ sake. Keep split \`diff\` for true before/after hunks where the removed lines
1997
+ still carry meaning, and group several annotated walkthroughs in a horizontal
1998
+ \`tabs\` block the same way diffs are grouped.
1931
1999
  - **Files added / removed / renamed** → \`file-tree\` with each entry's \`change\`
1932
2000
  flag (\`added\`, \`removed\`, \`modified\`, \`renamed\`) and a short \`note\`; attach a
1933
2001
  \`snippet\` only when one tells the reviewer something the path does not.
@@ -1941,10 +2009,9 @@ the actual diff:
1941
2009
  blocks carry implementation evidence.
1942
2010
  - **Architecture or data-flow shift** → \`diagram\` with \`data.html\` / \`data.css\`
1943
2011
  as a two-panel before/after, layered, or swimlane layout, or \`mermaid\` for a
1944
- quick graph. Use the two-dimensional layouts the Document Quality core
1945
- prescribes; do not reduce a structural change to a left-to-right chain.
1946
- Do not use \`diagram\` as a stand-in for rendered UI controls; UI changes need
1947
- \`wireframe\` blocks.
2012
+ quick graph. Use two-dimensional layouts; do not reduce a structural change to
2013
+ a left-to-right chain. Do not use \`diagram\` as a stand-in for rendered UI
2014
+ controls; UI changes need \`wireframe\` blocks.
1948
2015
  Diagram HTML/CSS should use renderer-owned primitives such as
1949
2016
  \`.diagram-panel\`, \`.diagram-card\`, \`.diagram-node\`, \`.diagram-box\`,
1950
2017
  \`.diagram-pill\`, \`.diagram-muted\`, and \`[data-rough]\`; these map to the plan's
@@ -1957,349 +2024,55 @@ the actual diff:
1957
2024
  the objective the diff served, the key decisions visible in it, and the risks a
1958
2025
  reviewer should weigh. This is the only place the model writes freely.
1959
2026
 
1960
- ## Block MDX reference
1961
-
1962
- This is the authoritative tag + prop shape for every importable block. Author the
1963
- recap source against THESE tags and props do not guess from the conceptual
1964
- names above (the conceptual name like \`api-endpoint\` is NOT the JSX tag). A wrong
1965
- tag or prop shape either 500s the import with a ZodError or, for an unrecognized
1966
- capitalized tag, now **fails the import with a clear "Unknown plan block" error**
1967
- (it used to silently render as raw \`<JsonExplorer …>\` text — that footgun is
1968
- fixed). Every block also takes the shared envelope attributes \`id\` (REQUIRED,
1969
- unique across the whole plan), and optional \`title\`, \`summary\`, \`editable\`
1970
- those are omitted from the per-block prop lists below.
1971
-
1972
- The complete set of real block tags is exactly: \`RichText\`, \`FileTree\`,
1973
- \`DataModel\`, \`Endpoint\`, \`Diff\`, \`AnnotatedCode\`, \`WireframeBlock\` (body
1974
- \`<Screen>\` + wireframe-kit children), \`Columns\`/\`Column\`, \`TabsBlock\`, \`Callout\`,
1975
- \`Diagram\`, \`Mermaid\`, \`Json\`, \`HtmlBlock\`, \`Table\`, \`Checklist\`, \`Code\`,
1976
- \`OpenApi\`. Any other capitalized tag at the block level is rejected on import.
1977
-
1978
- Quick tag map (conceptual namereal JSX tag):
1979
-
1980
- | Conceptual | Real tag | Conceptual | Real tag |
1981
- | --- | --- | --- | --- |
1982
- | api-endpoint | \`Endpoint\` | diff | \`Diff\` |
1983
- | data-model | \`DataModel\` | annotated-code | \`AnnotatedCode\` |
1984
- | file-tree | \`FileTree\` | code | \`Code\` |
1985
- | mermaid | \`Mermaid\` | rich-text | \`RichText\` |
1986
- | diagram | \`Diagram\` | callout | \`Callout\` |
1987
- | json-explorer | \`Json\` | columns | \`Columns\` (cols are \`Column\`) |
1988
- | openapi-spec | \`OpenApi\` | tabs | \`TabsBlock\` |
1989
- | wireframe | \`WireframeBlock\` (body \`<Screen>\`) | table | \`Table\` |
1990
- | custom-html | \`HtmlBlock\` | checklist | \`Checklist\` |
1991
-
1992
- ### Common mistakes (these now error on import)
1993
-
1994
- These WRONG tags used to be swallowed as raw text. Common synonyms are now
1995
- auto-corrected to the canonical tag on import; anything not in this map is
1996
- rejected with a "did you mean" hint. Always author with the canonical tag —
1997
- do not rely on the aliases.
1998
-
1999
- | WRONG tag | use |
2000
- | --- | --- |
2001
- | \`JsonExplorer\` | \`Json\` |
2002
- | \`Tabs\` (or a nested \`Tab\` child) | \`TabsBlock\` (tabs are ONE JSON \`tabs={[…]}\` prop — there is NO nested \`<Tab>\` element) |
2003
- | \`ApiEndpoint\` | \`Endpoint\` |
2004
- | \`DiffBlock\` | \`Diff\` |
2005
- | \`AnnotatedCodeBlock\` | \`AnnotatedCode\` |
2006
- | \`Wireframe\` | \`WireframeBlock\` |
2007
-
2008
- Lowercase HTML tags inside \`RichText\`/markdown prose (\`<div>\`, \`<span>\`,
2009
- \`<code>\`, \`<br>\`, …) are always fine — only capitalized component-style tags at
2010
- the block level are validated.
2011
-
2012
- ### \`Endpoint\` (API / route)
2013
-
2014
- Tag is \`Endpoint\` — NOT \`ApiEndpoint\`. Required attrs: \`method\`, \`path\`. Optional
2015
- attrs: \`summary\` (the short title — NOT \`title\`), \`auth\`, \`deprecated\` (bool),
2016
- \`change\`, \`params\`, \`request\`, \`responses\`. The prose \`description\` is the MDX
2017
- **children** (body between the tags), NOT an attribute.
2018
-
2019
- - \`method\` ∈ \`GET | POST | PUT | PATCH | DELETE | HEAD | OPTIONS\`. For a
2020
- WebSocket upgrade use \`GET\`.
2021
- - \`change\` (and per-param/per-response \`change\`) ∈ \`added | modified | removed | renamed\`.
2022
- - \`params={[{ name, in, type?, required?, description?, change?, was? }]}\` where
2023
- \`in\` ∈ \`path | query | header | body\`.
2024
- - \`request={{ contentType?, example? }}\` — \`example\` is a JSON **string**, not a
2025
- nested object.
2026
- - \`responses={[{ status, description?, example?, change? }]}\` — each \`example\` is
2027
- a JSON **string** (the renderer parses it into the collapsible JsonExplorer).
2028
- Give each distinct message shape (e.g. success vs error, or separate WS frame
2029
- types) its OWN response entry, not one merged body.
2030
-
2031
- \`\`\`mdx
2032
- <Endpoint
2033
- id="ep-create-task"
2034
- method="POST"
2035
- path="/api/tasks"
2036
- summary="Create a task"
2037
- request={{ contentType: "application/json", example: '{"title":"Ship recap"}' }}
2038
- responses={[{ status: "201", description: "Created", example: '{"id":"t_1","title":"Ship recap"}' }]}
2039
- >
2040
-
2041
- Creates a task scoped to the caller's org.
2042
-
2043
- </Endpoint>
2044
- \`\`\`
2045
-
2046
- ### \`DataModel\` (schema / ER)
2047
-
2048
- Tag is \`DataModel\`. Required attr: \`entities\` (>= 1). Optional attr: \`relations\`.
2049
- There is NO top-level \`fields=\` attribute — fields live inside each entity. There
2050
- is NO per-field \`required\` or \`description\` key; fold either into \`note\`.
2051
-
2052
- - \`entities={[{ id, name, note?, change?, fields: [...] }]}\` — \`id\` is referenced
2053
- by relations.
2054
- - each field: \`{ name, type?, pk?, fk?, nullable?, default?, note?, change?, was? }\`.
2055
- \`pk\`/\`nullable\` are booleans; \`fk\` is a string target like \`"User.id"\`;
2056
- \`change\` ∈ \`added | modified | removed | renamed\`; \`was\` is the prior value
2057
- when \`change\` is \`modified\`.
2058
- - \`relations={[{ from, to, kind?, label? }]}\` (optional — the renderer infers
2059
- simple \`1-n\` from \`fk\` when omitted); \`kind\` ∈ \`1-1 | 1-n | n-n\`.
2060
-
2061
- \`\`\`mdx
2062
- <DataModel
2063
- id="dm-tasks"
2064
- entities={[
2065
- {
2066
- id: "task",
2067
- name: "Task",
2068
- fields: [
2069
- { name: "id", type: "uuid", pk: true },
2070
- { name: "title", type: "text" },
2071
- { name: "status", type: "text", change: "added", note: "open|done" }
2072
- ]
2073
- }
2074
- ]}
2075
- />
2076
- \`\`\`
2077
-
2078
- ### \`FileTree\` (changed files)
2079
-
2080
- Tag is \`FileTree\`. Required attr: \`entries\` (>= 1). Optional attr: \`title\`. The
2081
- tree is built from the leaf \`path\`s — do NOT pass an ASCII tree in children; the
2082
- block is self-closing.
2083
-
2084
- - \`entries={[{ path, change?, note?, snippet?, language? }]}\` — \`path\` is
2085
- slash-delimited; \`change\` ∈ \`added | modified | removed | renamed\`. Add a
2086
- \`snippet\` (with optional \`language\`) only when it says something the path does
2087
- not.
2088
-
2089
- \`\`\`mdx
2090
- <FileTree
2091
- id="ft-changed"
2092
- title="Files touched"
2093
- entries={[
2094
- { path: "server/routes/tasks.ts", change: "modified", note: "add POST handler" },
2095
- { path: "server/db/schema.ts", change: "modified" },
2096
- { path: "tests/tasks.test.ts", change: "added" }
2097
- ]}
2098
- />
2099
- \`\`\`
2100
-
2101
- ### \`Mermaid\` (graph)
2102
-
2103
- Tag is \`Mermaid\` — this is its OWN block, separate from \`Diagram\`. Required attr:
2104
- \`source\` (the diagram text). Optional attr: \`caption\`. Do NOT put mermaid text
2105
- inside a \`Diagram\` block, and do NOT use \`<Diagram mermaid={...}>\` — that is not a
2106
- real prop and will not render.
2107
-
2108
- \`\`\`mdx
2109
- <Mermaid
2110
- id="mm-flow"
2111
- source={\`flowchart LR
2112
- Client --> API
2113
- API --> DB\`}
2114
- caption="Request path"
2115
- />
2116
- \`\`\`
2117
-
2118
- ### \`Diagram\` (HTML/SVG or node graph)
2119
-
2120
- Tag is \`Diagram\`. The whole payload is ONE \`data\` attribute:
2121
- \`data={{ html?, css?, caption?, nodes?, edges?, notes? }}\`. It requires either
2122
- \`html\` (an inert HTML/SVG fragment) OR at least one node — a \`Diagram\` with
2123
- neither fails validation. This is for architecture / data-flow / dependency
2124
- relationships, NOT rendered UI (use a wireframe for UI) and NOT mermaid (use
2125
- \`Mermaid\`). Use \`.diagram-*\` primitives + \`--wf-*\` tokens in \`html\`/\`css\`; never
2126
- hex colors or \`font-family\`.
2127
-
2128
- \`\`\`mdx
2129
- <Diagram
2130
- id="dg-arch"
2131
- data={{
2132
- nodes: [
2133
- { id: "ui", label: "UI" },
2134
- { id: "api", label: "API" },
2135
- { id: "db", label: "DB" }
2136
- ],
2137
- edges: [
2138
- { from: "ui", to: "api" },
2139
- { from: "api", to: "db" }
2140
- ]
2141
- }}
2142
- />
2143
- \`\`\`
2144
-
2145
- ### \`Json\` (JSON explorer)
2146
-
2147
- Tag is \`Json\`. Required attr: \`json\` — a **string** containing the JSON.
2148
- Optional attrs: \`title\`, \`collapsedDepth\` (number, default 2).
2149
-
2150
- \`\`\`mdx
2151
- <Json
2152
- id="json-config"
2153
- title="Resolved config"
2154
- json={'{"flags":{"recap":true},"limit":50}'}
2155
- />
2156
- \`\`\`
2157
-
2158
- ### \`Diff\` (before/after)
2159
-
2160
- Tag is \`Diff\`. Required attrs: \`before\`, \`after\` (multiline source strings).
2161
- Optional attrs: \`filename\`, \`language\`, \`mode\` (\`unified | split\`), \`annotations\`.
2162
- Leave \`mode\` unset: it defaults to **unified**, which reads cleanly at any width
2163
- and is what recap diffs want — they almost always live inside a width-constrained
2164
- container (a vertical-tabs panel or a comparison column) where split's two
2165
- line-number gutters cut the code off. Only set \`mode: "split"\` for a standalone,
2166
- full-document-width diff where side-by-side genuinely helps. The reader always
2167
- exposes a Unified/Split toggle (when there is room), so a viewer can switch
2168
- either way regardless of the authored default. Give every diff a \`summary\` (the
2169
- shared envelope attr) so the reviewer reads intent first.
2170
-
2171
- - \`annotations={[{ side?, lines, label?, note }]}\` — \`side\` ∈ \`before | after\`
2172
- (default \`after\`); \`lines\` is a 1-based ref like \`"13"\` or \`"13-15"\`.
2173
-
2174
- \`\`\`mdx
2175
- <Diff
2176
- id="diff-handler"
2177
- filename="server/routes/tasks.ts"
2178
- language="ts"
2179
- summary="Add the POST /api/tasks handler"
2180
- before={\`router.get("/api/tasks", list);\`}
2181
- after={\`router.get("/api/tasks", list);\\nrouter.post("/api/tasks", create);\`}
2182
- annotations={[{ side: "after", lines: "2", label: "New route", note: "Creates a task" }]}
2183
- />
2184
- \`\`\`
2185
-
2186
- ### \`AnnotatedCode\` (new-file walkthrough)
2187
-
2188
- Tag is \`AnnotatedCode\`. Required attr: \`code\` (multiline string). Optional attrs:
2189
- \`filename\`, \`language\`, \`annotations\`. Use this for a brand-new file with no
2190
- meaningful "before".
2191
-
2192
- - \`annotations={[{ lines, label?, note }]}\` — 1-based \`lines\` ref (no \`side\`,
2193
- unlike \`Diff\`).
2194
-
2195
- \`\`\`mdx
2196
- <AnnotatedCode
2197
- id="ac-create"
2198
- filename="server/tasks/create.ts"
2199
- language="ts"
2200
- code={\`export async function create(input: NewTask) {\\n return db.tasks.insert(input);\\n}\`}
2201
- annotations={[{ lines: "1-3", label: "Handler", note: "Inserts and returns the row" }]}
2202
- />
2203
- \`\`\`
2204
-
2205
- ### \`RichText\` (prose)
2206
-
2207
- Tag is \`RichText\`. The markdown is the MDX **children** (body between the tags),
2208
- NOT an attribute. Use \`## Key changes\` here as the heading above a grouped diff
2209
- \`TabsBlock\`.
2210
-
2211
- \`\`\`mdx
2212
- <RichText id="rt-why">
2213
-
2214
- ## Why
2215
-
2216
- Adds a create endpoint so the agent can author tasks directly.
2217
-
2218
- </RichText>
2219
- \`\`\`
2220
-
2221
- ### \`Callout\` (tone note)
2222
-
2223
- Tag is \`Callout\`. Optional attr: \`tone\` ∈ \`info | decision | risk | warning | success\`.
2224
- The body markdown is the MDX **children**, NOT an attribute.
2225
-
2226
- \`\`\`mdx
2227
- <Callout id="co-risk" tone="risk">
2228
-
2229
- The new column is non-nullable with no default — existing rows need a backfill.
2230
-
2231
- </Callout>
2232
- \`\`\`
2233
-
2234
- ### \`Columns\` (side-by-side)
2235
-
2236
- Tag is \`Columns\`; each column is a nested \`<Column label="...">\` whose body is
2237
- markdown and/or block components. 1–4 columns. Use labels \`Before\` / \`After\` for
2238
- structured comparisons.
2239
-
2240
- \`\`\`mdx
2241
- <Columns id="cols-schema">
2242
- <Column label="Before">
2243
-
2244
- \`status\` did not exist.
2245
-
2246
- </Column>
2247
- <Column label="After">
2248
-
2249
- <DataModel id="dm-after" entities={[{ id: "task", name: "Task", fields: [{ name: "status", type: "text", change: "added" }] }]} />
2250
-
2251
- </Column>
2252
- </Columns>
2253
- \`\`\`
2254
-
2255
- ### \`TabsBlock\` (tab rail)
2256
-
2257
- Tag is \`TabsBlock\` — NOT \`Tabs\`, and there is NO nested \`<Tab>\` element. Required
2258
- attr: \`tabs\` (1–12). Optional attr: \`orientation\` (\`horizontal | vertical\`; use
2259
- \`vertical\` for a file rail). The whole \`tabs\` array (including nested child
2260
- blocks) is ONE JSON prop; do NOT nest the tabs or their child blocks as MDX
2261
- elements. Label the section with a preceding \`## Key changes\` \`RichText\` heading
2262
- rather than a \`title\` on the block.
2263
-
2264
- \`\`\`mdx
2265
- <TabsBlock
2266
- id="tabs-key"
2267
- orientation="vertical"
2268
- tabs={[
2269
- { id: "t-route", label: "routes/tasks.ts", blocks: [ /* Diff block objects */ ] },
2270
- { id: "t-schema", label: "db/schema.ts", blocks: [ /* Diff block objects */ ] }
2271
- ]}
2272
- />
2273
- \`\`\`
2274
-
2275
- ### \`WireframeBlock\` + \`<Screen>\` (UI)
2276
-
2277
- Tag is \`WireframeBlock\`; its body is a single \`<Screen surface ... >\` subtree
2278
- (this is nested MDX, not a flat prop). On \`<Screen>\`, \`html\` must be a
2279
- single-quoted string or a static template literal — NEVER a dynamic expression
2280
- (\`html={someVar}\` throws on import). \`surface\` ∈
2281
- \`desktop | mobile | popover | panel | browser\`. Optional \`<Screen>\` attrs:
2282
- \`renderMode\` (\`wireframe | design\`), \`caption\`, \`css\`, \`skeleton\`. See the
2283
- Wireframe Quality core above for the HTML rules.
2284
-
2285
- \`\`\`mdx
2286
- <WireframeBlock id="wf-tasks">
2287
- <Screen surface="browser" html={'<div style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"><h1>Tasks</h1><button class="primary">New task</button></div>'} />
2288
- </WireframeBlock>
2289
- \`\`\`
2290
-
2291
- ### Other blocks
2292
-
2293
- - \`HtmlBlock\` (custom-html) — flat attrs \`html\` (required, bounded fragment),
2294
- \`css?\`, \`caption?\`. Prefer a wireframe for UI; this is an escape hatch.
2295
- - \`Table\` — flat attrs \`columns={["A","B"]}\` and \`rows={[["1","2"]]}\` (both arrays
2296
- of strings), optional \`density\` (\`compact | normal | relaxed\`).
2297
- - \`Checklist\` — flat attr \`items={[{ id, label, checked?, note? }]}\`.
2298
- - \`Code\` — flat attrs \`code\` (required string), \`language?\`, \`filename?\`,
2299
- \`caption?\`, \`maxLines?\`. For a multi-file rail use a \`TabsBlock\` of \`Code\`
2300
- blocks.
2301
- - \`OpenApi\` — flat attrs \`spec\` (required JSON string of a whole OpenAPI/Swagger
2302
- doc), \`title?\`. The whole-document counterpart to \`Endpoint\`.
2027
+ ## Block reference — call \`get-plan-blocks\`, do not memorize tags
2028
+
2029
+ The conceptual block names above (\`api-endpoint\`, \`data-model\`, \`json-explorer\`,
2030
+ \`tabs\`, …) are NOT the JSX tags you author with, and the exact tags, required
2031
+ fields, and prop shapes change as the block library evolves. Do not author from
2032
+ memorized tags they drift and silently produce a wrong tag (\`ApiEndpoint\`
2033
+ instead of \`Endpoint\`, \`JsonExplorer\` instead of \`Json\`, \`Tabs\` instead of
2034
+ \`TabsBlock\`) that errors on import.
2035
+
2036
+ **Before writing any structured plan content, call \`get-plan-blocks\` on the
2037
+ \`plan\` MCP server.** It returns the authoritative, always-current block
2038
+ vocabulary generated live from the app's own block registry — the same config
2039
+ the renderer and MDX round-trip use so it can never be stale even if this
2040
+ SKILL.md is an old installed copy:
2041
+
2042
+ - \`get-plan-blocks\` (default \`format: "reference"\`) → a compact table of every
2043
+ block's runtime \`type\`, exact MDX \`<Tag>\`, placement, and key data fields.
2044
+ This is your map from each conceptual name above to its real tag and props.
2045
+ - \`get-plan-blocks\` with \`format: "schema"\`the full per-block JSON Schema
2046
+ plus a worked example for each block, when you need exact field types,
2047
+ enums, or nesting (e.g. \`Diff.annotations\`, \`Endpoint.params[].in\`,
2048
+ \`DataModel.entities[].fields[]\`).
2049
+
2050
+ Author the recap source against the tags and schemas that call returns. The
2051
+ complete set of valid block-level tags is whatever \`get-plan-blocks\` lists;
2052
+ any other capitalized tag at the block level is rejected on import with an
2053
+ "Unknown plan block" / "did you mean" error. Lowercase HTML tags inside
2054
+ \`rich-text\`/markdown prose (\`<div>\`, \`<span>\`, \`<code>\`, \`<br>\`, …) are always
2055
+ fine only capitalized component-style block tags are validated.
2056
+
2057
+ A few recap-specific authoring rules the registry table cannot encode:
2058
+
2059
+ - Every block takes a REQUIRED \`id\` (unique across the whole plan) plus the
2060
+ shared optional \`summary\` / \`editable\` envelope; give a block a heading by
2061
+ placing a \`rich-text\` block with a Markdown \`###\` heading directly above it
2062
+ (blocks no longer take a \`title\`).
2063
+ - \`Endpoint\`: prose \`description\` is the MDX **children** (body between the
2064
+ tags), not an attribute; for a WebSocket upgrade use \`method="GET"\`. Each
2065
+ request/response \`example\` is a JSON **string** (the renderer parses it into
2066
+ the JSON explorer), so keep it a single parseable JSON value.
2067
+ - \`TabsBlock\`: the whole \`tabs\` array (including nested child blocks) is ONE
2068
+ JSON \`tabs={[…]}\` prop there is NO nested \`<Tab>\` element.
2069
+ - \`WireframeBlock\`: its body is a single \`<Screen surface ... html=… />\` subtree
2070
+ (nested MDX, not a flat prop); \`html\` must be a single-quoted string or static
2071
+ template literal, never a dynamic \`html={someVar}\` expression. See the
2072
+ Wireframe Quality core above for the HTML rules.
2073
+ - \`Diagram\`: the whole payload is one \`data={{ html?, css?, nodes?, edges?, … }}\`
2074
+ attribute and requires either \`html\` or at least one node; \`Mermaid\` is its
2075
+ own separate block (\`source\` text), not a \`Diagram\` prop.
2303
2076
 
2304
2077
  ## Before / After Is The Headline
2305
2078
 
@@ -2313,10 +2086,10 @@ comparisons there are two primitives, and they cover the whole need together:
2313
2086
  "the schema went from X to Y" or "the endpoint contract changed like this."
2314
2087
  Do not use \`columns\` simply to compact or group a list of API endpoints.
2315
2088
  - **\`diff\`** — for **code**. It renders the literal removed and added lines. Use
2316
- it for the actual hunks. Leave \`mode\` unset so it renders unified (the default,
2317
- legible at any width); reserve \`mode: "split"\` for a standalone full-width diff
2318
- where side-by-side genuinely helps never inside a tabs panel or column, where
2319
- split's doubled gutters cut the code off.
2089
+ it for the actual hunks. Use split mode by default for recap code review;
2090
+ reserve \`mode: "unified"\` for genuinely narrow standalone hunks where
2091
+ side-by-side would hide the code. Key-file diff groups should use horizontal
2092
+ tabs so split diffs get the full document width.
2320
2093
 
2321
2094
  For UI diffs, wireframes are the visual comparison primitive. Use before/after
2322
2095
  wireframes when the comparison clarifies the change; use after-only or a state