agentleFS
GoogleKnown publishergoogle/site-kit-wp/AGENTS.md

site-kit-wp

AGENTS.md1.4k starsChanged 5 months agoApache-2.0View on GitHub

Trending

Quiet since July.about the whole repository

Dec 2025: 0 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the google/site-kit-wp repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about google/site-kit-wp

The biggest 5 of 29 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 29

Talked about on GitHub (29 times).

On GitHub · 29

24 more on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When asked to create, draft, or write a GitHub issue from a design doc, from a bug report or from requirements in the message, to break an …

    line 12
  2. Very specific:

    When asked to write, draft, adjust, update, or fill in the Implementation Brief and Test Coverage sections of an issue, follow …

    line 20
  3. Distinctive:

    When asked to implement, build, or work on a GitHub issue by number, follow

    line 26
  4. Very specific:

    When asked to review a pull request by number, follow docs/context/workflow/review-pr.md and grade against …

    line 32
  5. Distinctive:

    One component per file: never define more than one React component in a single file.

    line 73
  6. Distinctive:

    JS: Create datastore + components following existing patterns

    line 87
  7. Distinctive:

    When in doubt: Check existing similar modules, refer to config files, or search the codebase for patterns.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Code Assistant Context - Site Kit by Google

Project Overview

WordPress plugin providing Google services integration. PHP backend (includes/) + React frontend (assets/js/) with modular architecture for each Google service (Analytics, AdSense, Search Console, etc.).

Workflow playbooks

Each workflow below has a shared, tool-agnostic playbook in docs/context/workflow/ that is its single source of truth: read that playbook and follow it exactly. Claude Code exposes each one as a skill of the same name; Antigravity as a workflow in .agents/workflows/.

Writing an issue

When asked to create, draft, or write a GitHub issue from a design doc, from a bug report or from requirements in the message, to break an epic's design doc into issues, or to write Acceptance criteria for an existing issue, follow docs/context/workflow/write-issue-requirements.md. Establish the type first — a feature request (.github/ISSUE_TEMPLATE/feature_request.md) or a bug report (.github/ISSUE_TEMPLATE/bug_report.md) — and ask the user which one when the request doesn't make it clear. Do not create or edit a GitHub issue unless explicitly asked.

Writing an implementation brief

When asked to write, draft, adjust, update, or fill in the Implementation Brief and Test Coverage sections of an issue, follow docs/context/workflow/write-implementation-brief.md. Touch only those two sections, and do not edit the GitHub issue or post a comment unless explicitly asked.

Implementing a GitHub issue

When asked to implement, build, or work on a GitHub issue by number, follow docs/context/workflow/implement-issue.md and review against docs/context/workflow/review-checklist.md. Never commit, push, or open a PR unless explicitly asked.

Reviewing a pull request

When asked to review a pull request by number, follow docs/context/workflow/review-pr.md and grade against docs/context/workflow/review-checklist.md. Stay read-only — do not post comments, approve, or change the PR state unless explicitly asked.

Architecture Essentials

PHP Structure

  • Namespace: Google\Site_Kit\ (PSR-4 autoloaded)
  • Core: includes/Core/ - authentication, modules, storage, REST API
  • Modules: includes/Modules/ - each Google service as separate module
  • Entry: google-site-kit.php → includes/loader.php → includes/Plugin.php

JavaScript Structure

  • Data: WordPress data stores in assets/js/googlesitekit/data/
  • Modules: assets/js/modules/{module}/ with components/, datastore/, utils/
  • Build: Webpack multi-entry with code splitting

Development Commands

Essential Scripts

  • npm run build / npm run dev - Asset builds
  • npm run lint / composer run lint - Code quality
  • npm run test / composer run test - Run tests
  • npm run watch - Development auto-rebuild

Key Config Files

  • Build: assets/webpack.config.js
  • Quality: .eslintrc.json, phpcs.xml, .prettierrc.js
  • Tests: tests/js/jest.config.js, phpunit.xml.dist

Development Standards

PHP Conventions

  • WordPress Coding Standards + PSR-4
  • Text domain: google-site-kit
  • snake_case methods, PascalCase classes with underscores
  • Details: See phpcs.xml for complete ruleset

JavaScript Conventions

  • WordPress ESLint preset + custom rules
  • Function components, React Hooks patterns
  • One component per file: never define more than one React component in a single file. Extract each additional component (including small sub-components) into its own file and import it. Shared, non-component code (styles, constants, helpers) may live in a separate non-component module (e.g. pdfStyles.ts).
  • Details: See .eslintrc.json and custom ESLint plugin

Testing Strategy

Comprehensive multi-layer testing:

  • PHP: PHPUnit with WordPress test suite (tests/phpunit/)
  • JS: Jest with React Testing Library (tests/js/)
  • E2E: Puppeteer browser automation (tests/e2e/)
  • Visual: Backstop.js for regression (tests/backstop/)

Key test utilities: tests/js/test-utils.js (JS), tests/phpunit/includes/TestCase.php (PHP)

Module Development

  1. PHP: Extend Core\Modules\Module, implement required interfaces
  2. JS: Create datastore + components following existing patterns
  3. Integration: Register in includes/Core/Modules/Modules.php

Study existing modules in includes/Modules/ and assets/js/modules/ for patterns.

Module Pattern

Each module follows consistent structure:

includes/Modules/ModuleName.php           # Main PHP class
includes/Modules/ModuleName/              # PHP subclasses
assets/js/modules/module-slug/            # JS implementation
  ├── components/                         # React components
  ├── datastore/                          # WordPress data store
  └── utils/                              # Utilities

Important Patterns

  • Feature Flags: feature-flags.json + Core\Util\Feature_Flags
  • Assets: Module-based registration via traits/interfaces
  • Data Flow: WordPress data stores → React components
  • Authentication: Google OAuth via proxy service

Visual Regression Testing & Storybook

Storybook Stories

Component documentation and testing via interactive stories:

  • Stories: **/*.stories.js - React component stories for UI development
  • Config: storybook/main.js - Storybook configuration
  • Setup: storybook/{package.json,webpack.config.js} - Storybook build setup
  • Commands: npm run storybook (dev), npm run build:storybook (build)

Story structure follows CSF (Component Story Format):

ComponentName.stories.js
├── export default { title, component }     # Story metadata
├── export const StoryName = () => <...>   # Individual stories
└── StoryName.parameters = { ... }         # Story-specific config

Visual Regression Testing (VRT)

Automated visual testing via BackstopJS + Storybook:

  • Reference Images: tests/backstop/reference/ - Golden master screenshots
  • Config: tests/backstop/config.js + scenarios.js - BackstopJS setup
  • VRT Styles: storybook/preview-head-vrt.html - Animation/transition disabling

VRT workflow:

  • npm run test:visualtest - Run VRT tests (compare vs reference)
  • npm run test:visualapprove - Accept new screenshots as reference
  • Auto-generated: Scenarios created from all *.stories.js files
  • Special classes: .googlesitekit-vrt-animation-none, .googlesitekit-vrt-animation-paused

When in doubt: Check existing similar modules, refer to config files, or search the codebase for patterns.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.