Skip to content

Compact the generated agent-docs block - #7124

Merged
josephfarina merged 1 commit into
mainfrom
fix/compact-agent-docs-block
Oct 8, 2026
Merged

josephfarina merged 1 commit into
mainfrom
fix/compact-agent-docs-block

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Summary

The block that init and upgrade --apply write into consumer agent files (AGENTS.md, CLAUDE.md, etc.) is ~34% smaller: 27 lines / ~2 KB instead of 32 lines / ~3 KB.

Consumer projects see the smaller block the next time they run astryx init or astryx upgrade --from <version> --apply.

What changed

Section Before After
Workflow steps Verbose (5 lines incl. recovery) Tighter (3 lines — build output covers the detail)
Dense-data rule Inline (Table vs Card, StatusDot, Badge) Removed — lives in astryx docs layout and build output
Command list 8 commands under MORE CLI 5 key commands + astryx help pointer
Topic list Every topic inline (grew with integrations) 5 key topics + astryx docs pointer
Self-check Long fix list per styling system Shorter, still varies by styling system
Frame-first rule Verbose One sentence → astryx docs layout

build, template and component remain intentionally omitted from the command list — the workflow section covers them.

What is unchanged

  • Template-first workflow (Build as step 1)
  • CSS setup imports
  • No-div and frame-first rules
  • Styling-system detection (StyleX / Tailwind / CSS)
  • Token usage + theme guidance
  • Self-check pass (still system-specific)
  • Integration agentDocs.append lines
  • Upgrade command

No-context agent evaluation

4 agents (Sonnet, no CLI access, block as only context), 8 tasks each:

Task BEFORE (2 runs) AFTER (2 runs)
Q1: First step for a new page ✅ ✅ ✅ ✅
Q2: Learn a component props ✅ ✅ ✅ ✅
Q3: Search for a component ✅ ✅ ✅ ✅
Q4: Discover integrations ✅ ✅ ✅ ✅
Q5: Run upgrade after bump ✅ ✅ ✅ ✅
Q6: Table vs Card for data ✅ ✅ ✅ ✅
Q7: Brand color (theme, not :root) ✅ ✅ ✅ ✅
Q8: Find all commands ❌ ❌ ✅ ✅
Total 7/8, 7/8 8/8, 8/8

Q6 (Table vs Card): passed on all 4 runs — the dense-data rule was redundant; agents already know Table fits tabular data.

Q8 (find all commands): the old block had no help entry, so agents guessed docs cli. The compact block says astryx help explicitly.

Writing rubric results

Not applicable — no spec records changed.

Test results

  • agent-docs.test.mjs: 98/98 ✅
  • docs-graph.test.mjs: 10/10 ✅
  • Full CLI suite: 5779/5779 ✅

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 7, 2026
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 7, 2026 11:45pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 8, 2026, 1:49 AM UTC

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from 488ff42 to cc307d6 Compare October 7, 2026 19:09
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from cc307d6 to 4cef3dc Compare October 7, 2026 19:32
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from 4cef3dc to ca870a6 Compare October 7, 2026 19:42
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from ca870a6 to 2239b34 Compare October 7, 2026 20:01
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch 2 times, most recently from bc5c46e to aa709d6 Compare October 7, 2026 20:12
@josephfarina josephfarina reopened this Oct 7, 2026
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from aa709d6 to 06ac6af Compare October 7, 2026 21:14
@josephfarina josephfarina reopened this Oct 7, 2026
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from 06ac6af to ed90847 Compare October 7, 2026 21:45
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from ed90847 to 77cc279 Compare October 7, 2026 21:54
@josephfarina
josephfarina force-pushed the fix/compact-agent-docs-block branch from 77cc279 to f825169 Compare October 7, 2026 22:23
Tighten the block that init and upgrade write into consumer agent files.
29 lines / ~1.8 KB, was 32 lines / ~3 KB (39% smaller).

- Workflow steps shorter; step 2 keeps frame/gap/padding; step 3 keeps block route
- Existing-page rule preserved: skip scaffolding, add inside sections
- Dense-data rule kept compact (Table/List, Badge = counts)
- Per-system self-check with imported .css/@apply in all variants
- CSS variant warns no StyleX/Tailwind compiler
- Theme rule points at astryx docs theme
- Command list: astryx help pointer + key commands

No-context eval: 13/13 on CSS, 13/13 on Tailwind (original 7/8).
CSS agent refused Tailwind classes, raw divs, and kept an existing page.
Tailwind agent caught style={{}}, bg-[#fff], and kept an existing page.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to land. The compact block keeps the setup imports, template-first workflow, styling guidance, theme guard, and self-check intact while pointing at astryx help and astryx docs for the full command and topic lists, and the updated agent-docs and docs-graph tests pass — including the checks that every command the block shows is real.

One tiny description nit: the summary table says the dense-data rule was removed and lists five key topics, but the code keeps a shortened dense-data row and names four key topics. Worth tidying the description when convenient; it doesn't affect the change itself.

[Automated review]

@josephfarina josephfarina reopened this Oct 8, 2026
@josephfarina
josephfarina merged commit 58e62bc into main Oct 8, 2026
70 checks passed
@github-actions
github-actions Bot deleted the fix/compact-agent-docs-block branch October 9, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — 440c34a2 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant