Skip to content

chore: phase 4 — split AGENTS.md, add MCP config and spec-kit check - #3320

Merged
eduardoformiga merged 16 commits into
devfrom
chore/ai-week-phase-4
May 14, 2026
Merged

eduardoformiga merged 16 commits into
devfrom
chore/ai-week-phase-4

Conversation

@eduardoformiga

@eduardoformiga eduardoformiga commented May 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Phase 4 of the AI Week initiative. Restructures the agent-facing documentation and adds two small pieces of supporting tooling.

Commits (in chronological order)

  1. chore: add root MCP servers configuration — introduces a top-level mcp.json with the shared MCP server set used by the FastStore agent workflow (chrome-devtools, Playwright, github, Figma, vtex-docs, vtex-developer, Atlassian).
  2. chore: add spec-kit symlink check script — read-only scripts/check-spec-kit.mjs that warns when the private faststore-dx-spec-kit symlinks (.specify, .cursor, specs) are missing or broken. Always exits 0 so OSS contributors are not blocked. Exposed as pnpm check:spec-kit.
  3. docs(agents): add scoped per-package AGENTS guides — new packages/{api,cli,components,core,sdk}/AGENTS.md files that capture conventions previously buried in the monolithic root guide.
  4. docs(agents): refactor root AGENTS.md as public charter — trims the root down to a public charter (authority chain, architectural principles, security & dependency rules, agent autonomy boundaries) and defers package-specific conventions to the new scoped guides. Net: ~1k lines of duplicated detail removed, conventions now live next to the code they describe.

Authority chain after this PR

  1. Root AGENTS.md — substantive principles
  2. Scoped packages/*/AGENTS.md — package-specific context
  3. Skill files (~/.agents/skills/*, vtex-agent-skills) — execution recipes

Test plan

  • pnpm install still succeeds (no behavioural changes)
  • pnpm check:spec-kit runs and prints a warning (or exits silently) without failing
  • Spot-check the rendered AGENTS.md files on GitHub for broken anchors / links between root and scoped guides
  • Confirm mcp.json is recognized by tooling that expects it at the repo root

Summary by CodeRabbit

  • Documentation
    • Added comprehensive package documentation for API, CLI, Components, Core, and SDK covering purpose, tech stack, directory structure, naming/workflow conventions, build & test guidance, contribution workflows, and security/data-handling requirements.

Review Change Stack

@eduardoformiga
eduardoformiga requested a review from a team as a code owner May 13, 2026 21:02
@eduardoformiga
eduardoformiga requested review from renatamottam and renatomaurovtex and removed request for a team May 13, 2026 21:02
@codesandbox-ci

codesandbox-ci Bot commented May 13, 2026 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@eduardoformiga eduardoformiga changed the title chore(ai-week): phase 4 — split AGENTS.md, add MCP config and spec-kit check chore: phase 4 — split AGENTS.md, add MCP config and spec-kit check May 13, 2026
@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@eduardoformiga has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 57 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 011d25e5-f0bb-48b1-93e7-e1ac235b5206

📥 Commits

Reviewing files that changed from the base of the PR and between b6dab55 and c0ee476.

⛔ Files ignored due to path filters (10)
  • .github/workflows/pr.yml is excluded by none and included by none
  • .vtex/catalog-info.yaml is excluded by none and included by none
  • AGENTS.md is excluded by none and included by none
  • CHANGELOG.md is excluded by none and included by none
  • CONTRIBUTING.md is excluded by none and included by none
  • README.md is excluded by none and included by none
  • lerna.json is excluded by none and included by none
  • mcp.json is excluded by none and included by none
  • package.json is excluded by none and included by none
  • scripts/check-spec-kit.mjs is excluded by none and included by none
📒 Files selected for processing (42)
  • packages/api/AGENTS.md
  • packages/api/CHANGELOG.md
  • packages/api/README.md
  • packages/api/package.json
  • packages/cli/AGENTS.md
  • packages/cli/CHANGELOG.md
  • packages/cli/README.md
  • packages/cli/package.json
  • packages/components/AGENTS.md
  • packages/components/CHANGELOG.md
  • packages/components/README.md
  • packages/components/package.json
  • packages/core/AGENTS.md
  • packages/core/CHANGELOG.md
  • packages/core/README.md
  • packages/core/package.json
  • packages/core/src/components/cms/RenderSections.tsx
  • packages/diagnostics/CHANGELOG.md
  • packages/diagnostics/README.md
  • packages/diagnostics/package.json
  • packages/lighthouse/CHANGELOG.md
  • packages/lighthouse/README.md
  • packages/lighthouse/package.json
  • packages/sdk/AGENTS.md
  • packages/sdk/CHANGELOG.md
  • packages/sdk/README.md
  • packages/sdk/package.json
  • packages/storybook/.storybook/preview.ts
  • packages/storybook/.storybook/styles.scss
  • packages/storybook/CHANGELOG.md
  • packages/storybook/README.md
  • packages/storybook/package.json
  • packages/storybook/stories/badge.stories.tsx
  • packages/storybook/stories/button.stories.tsx
  • packages/storybook/stories/dropzone.stories.tsx
  • packages/storybook/stories/fileupload.stories.tsx
  • packages/storybook/stories/quick-order-drawer.stories.tsx
  • packages/storybook/stories/textareafield.stories.tsx
  • packages/storybook/stories/upload-file-dropdown.stories.tsx
  • packages/ui/CHANGELOG.md
  • packages/ui/README.md
  • packages/ui/package.json

Walkthrough

This PR introduces standardized AGENTS.md documentation files for five core FastStore packages. Each file establishes package purpose, tech stack, directory structure, naming conventions, common implementation patterns, testing scope, and contribution guidance—creating a uniform knowledge baseline for contributors and AI agents.

Changes

Package-specific AGENTS documentation

Layer / File(s) Summary
AGENTS documentation for all core packages
packages/api/AGENTS.md, packages/cli/AGENTS.md, packages/components/AGENTS.md, packages/core/AGENTS.md, packages/sdk/AGENTS.md
Five packages now document architecture roles, tech choices, naming/code conventions, common contribution tasks (adding sections, components, tests), testing commands, build output expectations, and scope boundaries. @faststore/api includes security requirements for server-side validation; @faststore/core covers SCSS/composition patterns and analytics; @faststore/components specifies data-attribute naming and dual-package workflow with @faststore/ui.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • renatomaurovtex

Poem

📚 Five packages now wear their docs with pride,
Guidelines aligned, architecture amplified.
API to SDK, each purpose clearly bright—
Contributing just got a whole lot more right! ✨

🚥 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 references 'phase 4,' MCP config, and spec-kit check—all primary changes in the changeset—but slightly undersells the significant documentation restructuring (splitting monolithic AGENTS.md into scoped per-package files).
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
  • Commit unit tests in branch chore/ai-week-phase-4

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/components/AGENTS.md (1)

315-331: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Checklist is missing mandatory Storybook and visual-regression items.

The implementation checklist should explicitly require Storybook stories and visual regression coverage for component changes; otherwise this guide under-specifies required contribution gates.

Suggested checklist additions
 - [ ] Component built successfully
+- [ ] Storybook stories added/updated with variants, states, and props
+- [ ] Visual regression coverage updated/passing for Storybook changes
 - [ ] Styles added to `@faststore/ui`

Based on learnings: "Every component in faststore/components and faststore/ui MUST have Storybook stories demonstrating variants, states, and props." and "Visual regression tests run against Storybook to prevent unintended UI changes."

🤖 Prompt for 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.

In `@packages/components/AGENTS.md` around lines 315 - 331, Update the "Component
Implementation Checklist" section in AGENTS.md to include mandatory Storybook
and visual-regression items: add checklist entries requiring Storybook stories
that demonstrate variants, states, and props (referencing the existing
"{ComponentName}Props" convention and the "Component Implementation Checklist"
header) and require visual-regression tests run against those Storybook stories;
ensure the new items are placed alongside other build/test/export checks and
phrased as required gates for components in `@faststore/components` and
`@faststore/ui`.
🤖 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/api/AGENTS.md`:
- Around line 11-14: Update the tech stack list in AGENTS.md to match the actual
dependency versions: replace "GraphQL 15.6" with "GraphQL 16.11.0" and
"TypeScript 5.3 (strict)" with "TypeScript 5.9.3 (strict)"; ensure the
enumerated lines that currently read "GraphQL 15.6 + GraphQL Codegen" and
"TypeScript 5.3 (strict)" are edited so the documented versions reflect the
pnpm-lock.yaml values.

In `@packages/components/AGENTS.md`:
- Around line 183-189: The example imports NewComponent from the wrong package;
update the import to use the components package so the example demonstrates Step
2’s local component structure. Replace the import statement that references
"@faststore/ui" with one that references "@faststore/components" (keeping the
same imported symbol NewComponent and the Page function JSX usage unchanged) so
the example no longer depends on the styling layer before Step 3.

In `@packages/core/AGENTS.md`:
- Around line 11-12: Update the AGENTS.md entries for "Next.js" and "React" to
reflect the actual versions used by the project: check the project's
package.json (and lockfile) for the installed next and react versions and
replace "Next.js 13.5 (SSR/SSG)" and "React 18.2" with those exact versions (or
add a short note like "varies by project — see package.json") so the doc always
matches the codebase; ensure the strings "Next.js" and "React" in AGENTS.md are
updated accordingly.

---

Outside diff comments:
In `@packages/components/AGENTS.md`:
- Around line 315-331: Update the "Component Implementation Checklist" section
in AGENTS.md to include mandatory Storybook and visual-regression items: add
checklist entries requiring Storybook stories that demonstrate variants, states,
and props (referencing the existing "{ComponentName}Props" convention and the
"Component Implementation Checklist" header) and require visual-regression tests
run against those Storybook stories; ensure the new items are placed alongside
other build/test/export checks and phrased as required gates for components in
`@faststore/components` and `@faststore/ui`.
🪄 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: c0e89c82-6e81-4fea-8f34-ebac53331ce5

📥 Commits

Reviewing files that changed from the base of the PR and between 39b75ee and 45726b5.

⛔ Files ignored due to path filters (4)
  • AGENTS.md is excluded by none and included by none
  • mcp.json is excluded by none and included by none
  • package.json is excluded by none and included by none
  • scripts/check-spec-kit.mjs is excluded by none and included by none
📒 Files selected for processing (5)
  • packages/api/AGENTS.md
  • packages/cli/AGENTS.md
  • packages/components/AGENTS.md
  • packages/core/AGENTS.md
  • packages/sdk/AGENTS.md

Comment thread packages/api/AGENTS.md Resolved
Comment thread packages/components/AGENTS.md Resolved
Comment thread packages/core/AGENTS.md Resolved
Comment thread packages/core/AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
@pkg-pr-new

pkg-pr-new Bot commented May 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@faststore/api

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/cli

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/components

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/core

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/diagnostics

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/lighthouse

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/sdk

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

@faststore/ui

yarn add https://pkg.pr.new/vtex/faststore/@faststore/[email protected]

commit: c0ee476

Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Comment thread packages/api/AGENTS.md

## GraphQL Conventions

### Naming

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.

👍

Comment thread packages/components/AGENTS.md Resolved
Comment thread packages/components/AGENTS.md Resolved
Comment thread packages/core/AGENTS.md Resolved
Comment thread packages/sdk/AGENTS.md Resolved
@eduardoformiga
eduardoformiga requested a review from hellofanny May 14, 2026 15:13

@hellofanny hellofanny 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.

🚀

Adds an `mcp.json` at the repo root with the shared MCP server set
expected by the FastStore agent workflow (chrome-devtools, Playwright,
github, Figma, vtex-docs, vtex-developer, Atlassian).
Adds a read-only `scripts/check-spec-kit.mjs` helper that warns when the
private `faststore-dx-spec-kit` symlinks (`.specify`, `.cursor`, `specs`)
are missing or broken, and exposes it via the `check:spec-kit` pnpm
script. The script always exits 0 so OSS contributors are not blocked —
SDD Full commands are optional.
Introduces per-package AGENTS.md files capturing conventions that were
previously buried in the monolithic root guide:

- packages/api: GraphQL schema, codegen, platform integrations
- packages/cli: oclif command structure and generate ordering
- packages/components: atomic design, data attributes, two-package
  architecture
- packages/core: Next.js patterns, sections.json, browser vs node tests
- packages/sdk: framework-agnostic discipline, bundle budget, store
  conventions

These are referenced from the root AGENTS.md and are intended to be the
authoritative source for package-specific rules.
eduardoformiga and others added 13 commits May 14, 2026 16:47
Trims the root AGENTS.md down to a public charter that establishes the
authority chain (root AGENTS → scoped package AGENTS → skill files),
codifies architectural principles, security & dependency rules, and
agent autonomy boundaries, then defers package-specific conventions to
the new scoped guides under `packages/*/AGENTS.md`.

Net effect: ~1k lines of duplicated package detail removed from the
root, conventions now live next to the code they describe.
- Upgraded GraphQL from 15.6 to 16.11.0 and TypeScript from 5.3 to 5.9.3 in packages/api/AGENTS.md.
- Updated Next.js version from 13.5 to 16 in packages/core/AGENTS.md.
- Updated the commit format guideline to remove the scope from the syntax, streamlining the structure to `<type>: <description>`.
Co-authored-by: Fanny Chien <[email protected]>
- Changed Lerna version from 8.1.9 to ^9.0.3 for improved versioning and publishing capabilities.
- Deleted the mention of local skills for FastStore storefront-specific recipes to avoid duplication of official VTEX skills.
- Upgraded Next.js to version ^16, TypeScript to 5.9.3, and GraphQL to 16.11.0 for improved performance and compatibility.
- Deleted the optional temporary test page section to streamline the documentation and focus on essential content.
- Replaced the media query mixin with the new utility function from the Faststore UI package for improved consistency and maintainability.
- Introduced guidelines for adding and using SVG icons from a single sprite, including steps for modifying the `public/icons.svg` file and utilizing the `Icon` component from `@faststore/ui`.
- Updated the guidelines to specify when not to add code in @faststore/sdk, emphasizing the exclusion of store-specific logic that should reside in @faststore/core.
- Added detailed instructions for adding third-party dependencies, including justification, evaluation criteria, impact measurement, and documentation requirements.
- Specified the need for explicit human approval for certain dependency changes to ensure compliance with the established Dependency Discipline.
- Updated the description of `@faststore/sdk` to emphasize the avoidance of framework-specific code, changing "MUST NOT" to "AVOID" for clarity.
- Adjusted the language in the purpose section to recommend minimizing framework dependencies instead of prohibiting them entirely.
@eduardoformiga
eduardoformiga force-pushed the chore/ai-week-phase-4 branch from 5c76372 to c0ee476 Compare May 14, 2026 19:47
@eduardoformiga
eduardoformiga changed the base branch from chore/ai-week to dev May 14, 2026 19:47
@eduardoformiga
eduardoformiga merged commit 8d861da into dev May 14, 2026
4 checks passed
@eduardoformiga
eduardoformiga deleted the chore/ai-week-phase-4 branch May 14, 2026 19:54
@eduardoformiga eduardoformiga mentioned this pull request May 15, 2026
1 of 3 tasks
eduardoformiga added a commit that referenced this pull request May 15, 2026
## Summary

Graduation PR from `dev` to `main`. Promotes the `4.1.0-dev.10`
prerelease cycle to the next stable, expected `4.1.1` (only `fix:` and
`chore:` commits since `4.1.0`).

### Notable changes since 4.1.0

- fix: region slider section render (#3318)
- fix: allow_all_components for CMS (#3312)
- chore: test coverage sonarqube (#3319)
- chore: bump next.js to 16.2.6 (#3327)
- chore: phase 4 — split AGENTS.md, add MCP config and spec-kit check
(#3320)
- chore: Update repo read me files (#3314)
- Dark Kitchen Catalog Setup (#3317)

### Back-merge

`main` was back-merged into `dev` (`3d4d24081`) before this PR to bring
in the `4.1.0` release commit and avoid silent overwrites. Conflicts
were resolved in favor of `dev` for code/CMS/version files, with
`CHANGELOG` entries merged from both sides.

## Test plan

- [x] dev CD published `4.1.0-dev.10` on the `dev` dist-tag for all 8
packages
- [ ] After merge, main CD graduates to `4.1.1` on the `latest` dist-tag
- [ ] All 8 packages publish (api, cli, components, core, diagnostics,
lighthouse, sdk, ui)


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Larícia Mota <[email protected]>
Co-authored-by: Matheus P. Silva <[email protected]>
Co-authored-by: Leandro Rodrigues <[email protected]>
Co-authored-by: vtexgithubbot <[email protected]>
Co-authored-by: Lucas Feijó <[email protected]>
Co-authored-by: Luiz Falcão <[email protected]>
Co-authored-by: Artur Santiago <[email protected]>
Co-authored-by: Sahan Jayawardana <[email protected]>
Co-authored-by: Mateus Pontes <[email protected]>
Co-authored-by: Matheus Martins <[email protected]>
Co-authored-by: renatomaurovtex <[email protected]>
Co-authored-by: Leandro Rodrigues <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Arthur Andrade <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Thiago Pereira <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Giuliana Rigaud <[email protected]>
Co-authored-by: renato <[email protected]>
Co-authored-by: Bruna Santos <[email protected]>
Co-authored-by: BrunaCubos <[email protected]>
Co-authored-by: Ícaro Oliveira <[email protected]>
Co-authored-by: Bruna Santos <[email protected]>
Co-authored-by: Everton Ataide <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Otavio Moreira Meirelles <[email protected]>
Co-authored-by: Marco Cardoso <[email protected]>
Co-authored-by: Gabriel Paladino <[email protected]>
Co-authored-by: CodeRabbit <[email protected]>
Co-authored-by: dk-portal[bot] <134092483+dk-portal[bot]@users.noreply.github.com>
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.

2 participants