Skip to content

docs(a2ui): add system prompts guides#2782

Merged
PupilTong merged 1 commit into
lynx-family:mainfrom
Sherry-hue:docs/a2ui-system-prompts
Jun 3, 2026
Merged

docs(a2ui): add system prompts guides#2782
PupilTong merged 1 commit into
lynx-family:mainfrom
Sherry-hue:docs/a2ui-system-prompts

Conversation

@Sherry-hue
Copy link
Copy Markdown
Collaborator

@Sherry-hue Sherry-hue commented Jun 3, 2026

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guides for generating and using A2UI system prompts: CLI static prompt generation, programmatic Node.js usage, custom catalog workflows, protocol constraints, and backend/streaming examples for interactive actions.
    • Standardized CLI invocation wording across docs and added links to the new System Prompts guide.
    • Guides provided in English and Chinese.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dc71bd31-51fb-4d46-b7f3-c519642f086c

📥 Commits

Reviewing files that changed from the base of the PR and between b99d2d4 and 537224d.

📒 Files selected for processing (8)
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/catalog-guide.md
  • packages/genui/a2ui/docs/catalog-guide_zh.md
  • packages/genui/a2ui/docs/overview.md
  • packages/genui/a2ui/docs/overview_zh.md
  • packages/genui/a2ui/docs/system-prompts.md
  • packages/genui/a2ui/docs/system-prompts_zh.md
✅ Files skipped from review due to trivial changes (6)
  • packages/genui/a2ui/docs/overview_zh.md
  • packages/genui/a2ui/docs/catalog-guide_zh.md
  • packages/genui/a2ui/docs/catalog-guide.md
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/docs/overview.md
  • packages/genui/a2ui/docs/system-prompts_zh.md

📝 Walkthrough

Walkthrough

Adds bilingual (English and Chinese) documentation for generating and using A2UI system prompts, updates README/catalog/overview CLI references to npx @lynx-js/genui a2ui, and documents CLI/programmatic generation, prompt contents/constraints, output examples, backend integration, and interactive action handling.

Changes

A2UI System Prompt Generation Documentation

Layer / File(s) Summary
Docs and README/catalog link updates
packages/genui/a2ui/README.md, packages/genui/a2ui/README_zh.md, packages/genui/a2ui/docs/catalog-guide.md, packages/genui/a2ui/docs/catalog-guide_zh.md, packages/genui/a2ui/docs/overview.md, packages/genui/a2ui/docs/overview_zh.md
Replace CLI label with npx @lynx-js/genui a2ui across README/overview/catalog docs and add links to the new System Prompts docs (English/Chinese).
CLI-based Prompt Generation
packages/genui/a2ui/docs/system-prompts.md, packages/genui/a2ui/docs/system-prompts_zh.md
Documents a2ui generate prompt CLI usage: output to file/stdout, appendix text, default basic catalog and catalogId consistency, custom catalog workflow, and catalogDir/functions structure (both languages).
Programmatic API and Prompt Building
packages/genui/a2ui/docs/system-prompts.md, packages/genui/a2ui/docs/system-prompts_zh.md
Covers Node.js usage via @lynx-js/genui/a2ui-prompt: buildA2UISystemPrompt, append appendix text, readA2UICatalogFromDirectory, and createA2UICatalogFromManifests for in-memory catalogs.
Prompt Structure and Constraints
packages/genui/a2ui/docs/system-prompts.md, packages/genui/a2ui/docs/system-prompts_zh.md
Lists A2UI v0.9 protocol requirements, required message types/order, data binding and action rules, catalog reference fields, hard constraints (JSON-only output, catalogId matching, component tree rules).
Output Format and Backend Integration Examples
packages/genui/a2ui/docs/system-prompts.md, packages/genui/a2ui/docs/system-prompts_zh.md
Shows expected JSON-array A2UI message output and backend examples sending the system message and streaming model completions to clients.
Interactive Action Handling and Usage Decision Criteria
packages/genui/a2ui/docs/system-prompts.md, packages/genui/a2ui/docs/system-prompts_zh.md
Documents preserving conversation history, sending action responses as updateDataModel/updateComponents (not recreating surfaces), and guidance when to use CLI vs programmatic generation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • PupilTong
  • HuJean
  • gaoachao
  • fzx2666-fz

Poem

🐰 I nibble docs with careful cheer,
I stitch prompts in two tongues here,
CLI or code, both paths I sow,
JSON arrays the models must know,
Hopping off — happy integrations grow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding documentation guides for A2UI system prompts. It is concise, specific, and clearly summarizes the primary objective of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 3, 2026

⚠️ No Changeset found

Latest commit: 537224d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Sherry-hue Sherry-hue marked this pull request as ready for review June 3, 2026 08:56
@Sherry-hue Sherry-hue force-pushed the docs/a2ui-system-prompts branch from a31112b to b99d2d4 Compare June 3, 2026 09:02
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/genui/a2ui/docs/system-prompts.md`:
- Line 187: Update the broken internal doc link in system-prompts.md: replace
the reference to "./catalogs.md" with the actual guide filename
"./catalog-guide.md" (or add a redirect/duplicate file if you prefer) so the
link to the catalog guide resolves; locate the line containing the link text
"Catalogs and manifests" in packages/genui/a2ui/docs/system-prompts.md and
update the target accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4af8de61-61f8-4186-a5c3-2f6b5831f4d8

📥 Commits

Reviewing files that changed from the base of the PR and between a31112b and b99d2d4.

📒 Files selected for processing (8)
  • packages/genui/a2ui/README.md
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/catalog-guide.md
  • packages/genui/a2ui/docs/catalog-guide_zh.md
  • packages/genui/a2ui/docs/overview.md
  • packages/genui/a2ui/docs/overview_zh.md
  • packages/genui/a2ui/docs/system-prompts.md
  • packages/genui/a2ui/docs/system-prompts_zh.md
✅ Files skipped from review due to trivial changes (6)
  • packages/genui/a2ui/README_zh.md
  • packages/genui/a2ui/docs/catalog-guide.md
  • packages/genui/a2ui/docs/catalog-guide_zh.md
  • packages/genui/a2ui/docs/overview_zh.md
  • packages/genui/a2ui/docs/overview.md
  • packages/genui/a2ui/docs/system-prompts_zh.md

Comment thread packages/genui/a2ui/docs/system-prompts.md Outdated
@Sherry-hue Sherry-hue force-pushed the docs/a2ui-system-prompts branch from b99d2d4 to 537224d Compare June 3, 2026 09:18
@HuJean HuJean enabled auto-merge (squash) June 3, 2026 09:29
@PupilTong PupilTong disabled auto-merge June 3, 2026 11:29
@PupilTong PupilTong merged commit 48046af into lynx-family:main Jun 3, 2026
5 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants