Skip to content

docs(ai): rewrite .ai readme around a generated catalog - #6788

Open
caseyisonit wants to merge 3 commits into
mainfrom
caseyisonit/docs-ai-readme-catalog
Open

caseyisonit wants to merge 3 commits into
mainfrom
caseyisonit/docs-ai-readme-catalog

Conversation

@caseyisonit

@caseyisonit caseyisonit commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Layers 1–3 (#6785, #6786, #6787) are merged, so this PR now targets main and is the bottom of the remaining stack.

Description

Replaces the hand-maintained .ai/README.md catalog with one that yarn ai:sync generates from frontmatter.

  • Rewrites .ai/README.md (37.6 KB → 21.6 KB) as a short guide:
    • How each source maps to each tool
    • How to choose between a rule, a skill, and AGENTS.md
    • How to author and validate each kind of file
    • Tool setup, including a Windows fallback when symlinks aren't available (copilot skill add <repo>/.ai/skills)
    • Optional personal MCP and tool-permission setup
  • Generates the catalog. The list of rules, lessons, and skills is generated between <!-- ai:catalog:start --> and <!-- ai:catalog:end -->. It's rendered as lists rather than tables so Prettier doesn't pad it. yarn lint:ai fails if the catalog drifts from frontmatter. The old hand-written catalog had already drifted, for example with a dead cursor_prompt.md path and wrong glob summaries.
  • Adds the catalog generator to sync.js. renderCatalog() and the README write moved here from feat(ai): generate copilot and cursor instructions from .ai rules #6785 after review, because this is the layer that adds the markers.
  • Keeps the git hooks in step with the catalog. The catalog reads skill frontmatter, so pre-commit also skips the sync when .ai/skills/ or .ai/README.md has unstaged changes, and re-stages the README after syncing. Pre-push treats the README as a generated file and blocks the push if the catalog is out of date.
  • Checks only git-tracked files in yarn lint:ai. The .ai/ validators and yarn ai:sync --check now read files from git ls-files (staged new files count) instead of walking the file system. Untracked or ignored local files, such as a Cursor .cursor/rules/manifest.json cache or .ai/handoffs/ notes, no longer fail the lint. A hand-authored file staged in a generated folder still fails. This came from review feedback on this PR.
  • Aligns the branch and commit guidance in the contributor docs. 04_making-a-pull-request.md now documents <username>/<type>-<description>[-swc-<issue>] and the full commitlint type list, and links to the branch-naming and conventional-commit skills. The PR template's commit-type comment listed 7 types and pointed to a PULL_REQUESTS.md that doesn't exist. It now cites commitlint.

Motivation and context

The README duplicated every skill's frontmatter by hand and had already drifted. Generating the catalog makes drift a lint failure instead of a silent inconsistency. The contributor docs, the PR template, the skills, and commitlint disagreed on branch and commit conventions (plan conflicts C-1 and C-2). Now there's one convention everywhere.

Related issue(s)

Screenshots (if appropriate)

N/A

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices. No rendered UI changes.
  • I have added automated tests to cover my changes. yarn lint:ai checks catalog drift.
  • I have included a well-written changeset if my change needs to be published. It doesn't: no published package changes.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • The catalog is generated and up to date

    1. Run yarn ai:sync --check, then yarn lint:ai.
    2. Expect both to pass. Change a skill's description without running the sync, and expect yarn lint:ai to fail on .ai/README.md.
    3. Change the "Do not edit this block by hand" text in .ai/scripts/sync.js, then run git push --dry-run. Expect ✖ yarn ai:sync updated generated files listing .ai/README.md. Revert with git checkout -- .ai/scripts/sync.js .ai/README.md.
  • yarn lint:ai ignores untracked files

    1. Run echo '{}' > .cursor/rules/manifest.json, then yarn lint:ai. Expect it to pass.
    2. Run git add .cursor/rules/manifest.json, then yarn lint:ai. Expect ✖ .cursor/rules/manifest.json: hand-authored file in a generated folder.
    3. Clean up with git rm -q --cached .cursor/rules/manifest.json && rm .cursor/rules/manifest.json.
  • Contributor docs render

    1. Run yarn storybook and open Contributor Docs › Making a pull request.
    2. Expect the updated branch naming and conventional commits sections.

Verified by the author: yarn lint:ai and Prettier pass. After rebasing onto main, yarn ai:sync --check reports 21 generated files up to date, the pre-push hook blocked a simulated stale catalog, and yarn lint:ai passed with an untracked .cursor/rules/manifest.json and failed once it was staged. The contributor docs nav script reports no new broken links. The 25 it reports are pre-existing, all in 03_project-planning/. Pending host verification: the Storybook render of the contributor docs page.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

N/A. This PR changes documentation, scripts, and git hooks only. It adds and changes no rendered UI or components.

@caseyisonit
caseyisonit requested a review from a team as a code owner September 23, 2026 23:29
@caseyisonit caseyisonit added Component:Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. Status:Ready for review PR ready for review or re-review. AI tooling labels Sep 23, 2026
@changeset-bot

changeset-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 98cd20d

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.

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

@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6788

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Comment thread .ai/ai-system.html Outdated
Comment thread .ai/scripts/sync.js
@blunteshwar blunteshwar self-assigned this Sep 24, 2026
@caseyisonit
caseyisonit added this pull request to stack #6800 September 24, 2026 15:23
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from a5a75cc to ab90dc1 Compare September 24, 2026 15:29
@caseyisonit caseyisonit added skip_vrt Skip VRT build; mark UI Tests green without running Chromatic High priority PR review PR is a high priority and should be reviewed ASAP labels Sep 24, 2026
@caseyisonit
caseyisonit removed this pull request from stack #6800 September 25, 2026 20:33
@caseyisonit
caseyisonit added this pull request to stack #6807 September 25, 2026 20:33
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from ab90dc1 to 2c21422 Compare September 25, 2026 20:37
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from 2c21422 to c05fac7 Compare September 28, 2026 16:51
@rubencarvalho
rubencarvalho force-pushed the caseyisonit/docs-ai-readme-catalog branch from c05fac7 to 2e92f6f Compare September 28, 2026 20:09
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from 2e92f6f to 81b0d21 Compare September 28, 2026 20:59
blunteshwar
blunteshwar previously approved these changes Oct 1, 2026
@blunteshwar
blunteshwar dismissed their stale review October 1, 2026 06:37

yarn lint:ai is still failing

@blunteshwar

Copy link
Copy Markdown
Contributor
Screenshot 2026-10-01 at 12 07 55 PM `yarn lint:ai` is failing with the following error

@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from 81b0d21 to ff3d237 Compare October 5, 2026 15:12
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch 4 times, most recently from ae11e15 to d19ffc5 Compare October 6, 2026 14:31
Base automatically changed from caseyisonit/refactor-ai-normalize-skills to main October 6, 2026 17:19
@caseyisonit

caseyisonit commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

@blunteshwar the error comes from .cursor/rules/manifest.json. That file isn't tracked in the repo, so a local tool probably created it, and lint:ai treats any file without the generated header in .cursor/rules/ as hand-authored. Remove just that file:

rm .cursor/rules/manifest.json
yarn lint:ai

Please don't delete the whole .cursor/ directory. It holds tracked generated rules, the skills symlink, and your personal mcp.json.

The link warnings for .ai/handoffs/ are local, gitignored files and don't fail the check. As of 98cd20d, lint:ai only checks tracked files, so after pulling, a stray local manifest.json no longer fails it either.

Replace the hand-maintained .ai/README.md catalog, which had drifted
from the skill and rule frontmatter, with one yarn ai:sync generates.

- Rewrite .ai/README.md as a short guide: how sources map to each tool,
  how to choose between a rule, a skill, and AGENTS.md, how to author
  and validate each, tool setup (including a Windows fallback), and
  optional personal MCP and permission setup. The rule and skill catalog
  is generated between markers from frontmatter, as lists.
- Add .ai/ai-system.html, a self-contained, offline visual overview of
  the system, and link it from AGENTS.md and the README.
- Align the contributor docs branch and commit guidance with the
  branch-naming and conventional-commit skills, and replace the PR
  template's incomplete commit type list with a commitlint reference.
@caseyisonit
caseyisonit force-pushed the caseyisonit/docs-ai-readme-catalog branch from d19ffc5 to b3770fb Compare October 6, 2026 17:27
@blunteshwar
blunteshwar self-requested a review October 7, 2026 09:34
@blunteshwar

Copy link
Copy Markdown
Contributor

@blunteshwar the error comes from .cursor/rules/manifest.json. That file isn't tracked in the repo, so a local tool probably created it, and lint:ai treats any file without the generated header in .cursor/rules/ as hand-authored. Remove just that file:

rm .cursor/rules/manifest.json
yarn lint:ai

Please don't delete the whole .cursor/ directory. It holds tracked generated rules, the skills symlink, and your personal mcp.json.

The link warnings for .ai/handoffs/ are local, gitignored files and don't fail the check. As of 98cd20d, lint:ai only checks tracked files, so after pulling, a stray local manifest.json no longer fails it either.

Checked locally. It works fine after removing the .cursor/rules/manifest.json

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI tooling Component:Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. High priority PR review PR is a high priority and should be reviewed ASAP skip_vrt Skip VRT build; mark UI Tests green without running Chromatic Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants