본문으로 건너뛰기

google/site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.

https://skillcdn.ai/gh/google/site-kit-wp

내 AI에 이 주소를 연결하면 이 스킬을 쓸 수 있어요. 연결 방법 보기

  • 미확인
  • 기본 브랜치develop
  • 커밋07c24d0
  • 라이선스Apache-2.0
  • 검색단어

커밋 07c24d0 기준으로 보여 주고 있습니다

최신 커밋(b989fe8)을 색인하는 중입니다. 준비될 때까지 이 페이지와 모든 에이전트에는 마지막으로 색인된 커밋이 제공됩니다.
GitHub에서 보기

write-implementation-brief

Write the Implementation Brief and Test Coverage sections of a Site Kit issue from its acceptance criteria. Use when the user asks to write, draft, adjust, update, or fill in an implementation brief and/or test coverage for an issue (e.g. "write the implementation brief for #12345", "fill in the brief and test coverage for this issue") in the google/site-kit-wp repo.

경로
.agents/skills/write-implementation-brief/SKILL.md
라이선스
Apache-2.0
허용된 도구
Bash, Read, Grep, Glob, Edit, Write

Write an implementation brief

Write the Implementation Brief and Test Coverage sections for $ARGUMENTS — either a GitHub issue number, or a path the user supplied to a local issue file.

The brief you write is the spec that the implement-issue skill executes and the review-pr skill grades against. Write it so an engineer who has never read the design doc can implement the issue from the brief plus the codebase alone.

The brief gives technical direction, not step-by-step instructions. Keep it short, but never so short that the scope of the work is hidden.


Step 1 — Read the issue

The issue comes to you one of two ways, and only the user can tell you which:

  • An issue number — fetch it with gh issue view <number> --json title,body,labels.
  • A path to a local issue file — read that path. Do not go looking for it: such a file has no fixed home, so the user must give you the path.

If the user gave you neither a number nor a path, ask for one before doing anything else.

Parse whichever you get using the section map in .agents/skills/implement-issue/SKILL.md Step 1.

You are writing exactly two sections:

  • Implementation Brief — between ## Implementation Brief and ### Test Coverage.
  • Test Coverage — between ### Test Coverage and ## QA Brief.

The Acceptance criteria are the contract, and they describe observable behavior only: what a tester can see by using the feature. The mechanism that produces that behavior is the brief's to specify, so expect to add detail the criteria do not carry. Everything in the brief must serve a criterion, and the brief may not add behavior a user or a tester would notice that no criterion asks for.

Stop and ask the user if the acceptance criteria are missing, ambiguous, or contradict each other. A brief written over guessed criteria is worse than no brief. Writing the criteria is a separate job with its own skill, write-issue-requirements — offer it rather than filling the gap here.

Feature Description and Acceptance criteria sit under a "managed by moderators only" notice in the issue template — do not edit them. QA Brief and Changelog entry are filled in later by other roles; leave them alone unless asked.

Step 2 — Read the source material

  • The design doc. It carries the rationale, the rejected alternatives, and the constraints that an acceptance criterion compresses into a single line, so read it whenever one exists. Use it when the issue links one or the user gives you a path; otherwise ask the user for it — if you already have to ask for the issue itself (Step 1), ask for both at once. Plenty of issues have no design doc: when the answer is "there isn't one", say so and write the brief from the acceptance criteria and the code. Never stall on a design doc, and never invent a path to one.
  • Sibling issues in the same epic — they tell you where this issue's scope stops and the next one begins. Ask the user for their numbers so you can cross-reference them (see Referencing another issue, below).

Step 3 — Verify everything against the code

Do not write a brief from the issue text alone. Open every file the brief will touch and confirm, by reading it:

  • Every class, method, constant, hook, filter, option and script handle you name exists and is spelled exactly right.
  • The pattern you tell someone to follow (e.g. "mirror X::register_script()") actually looks the way you describe.
  • Hook ordering and firing conditions, whenever the brief depends on them — trace the hook to its do_action() / apply_filters() call site rather than trusting the design doc.
  • Which existing tests, fixtures, snapshots or inline data the change will move.
  • That the build can compile the kind of file you are about to name. Open the build config that will include the new file, plus the lint config and tsconfig.json. A bundle can define its own loader rules instead of using the shared createRules(), and where those rules do not already match the extension you are naming, adding a rule is part of the brief. Check the globals the new file reads in the same pass: a global with no declaration in assets/js/types/globals.d.ts fails npm run typecheck until one is added.

Where the code contradicts the design doc, the code wins: write the brief against reality and report the discrepancy (Step 7).

Step 4 — Load the relevant convention docs

Read only what the issue touches, using the scope map in .agents/skills/implement-issue/SKILL.md Step 3. The brief should not restate those conventions — it should be written so that following it produces conforming code.

Referencing another issue — always ask for the number

Every reference to another issue is a real GitHub number (#12345) — prerequisites, siblings in the same epic, the extension point this brief leaves open, the follow-up that lands the rest. There is no acceptable indirect form: not "issue 5" from a design doc's ordering, not "the next issue", not "the issue that adds the datastore".

Ask the user for the number. Never infer it from a design doc's ordering, never guess it from a nearby issue number, and never leave a placeholder to be filled in later:

  • The issue is already in GitHub — ask the user for its number, then confirm it is the issue you mean with gh issue view <number> --json title before citing it.
  • The issue only exists locally — a markdown file that has not been filed yet. Say so, and ask the user to create it in GitHub and give you the new number. Wait for it: a cross-reference is the one thing you cannot write around.
  • The user has no number to give — drop the cross-reference and name the deliverable instead (the store introduced with `getAudienceSettings` ). Report the dropped reference in Step 7.

Work out every issue you will need to cite before you start writing, and ask for all of the numbers in one message — together with the issue and design doc you already have to ask for (Steps 1 and 2) — rather than stopping repeatedly.

Step 5 — Write the Implementation Brief

Structure
<one or two sentences of context every checkbox shares, e.g. the action they all call>

* [ ] <one change — it may cover several files>
* [ ] <one change>
  • One checkbox per change, not per file: "Move FeedbackMenu and ThumbsSurveyTrigger to a new assets/js/components/feedback/ directory, with their tests and stories".
  • Give a path only where the reader needs it to find the place. Otherwise use the name (ThumbsFeedback).
  • Order the checkboxes the way someone would work through them: shared/base changes, then new classes, then registration, then build config, then components, with SCSS last.

Nest a second level when one bullet covers several related behaviors, ending the parent in a colon:

* [ ] Submit behavior:
  * <on click>
  * <on success>
  * <on failure>
Content

Give direction, not steps. Write only what an engineer who knows Site Kit could not work out from the code and the acceptance criteria: the decisions (where code lives, what to reuse or replace, new signatures and data shapes) and the places that are not obvious, such as a file the acceptance criteria imply but do not name. Leave out:

  • follow-on work after a move or rename — imports, usages, tests, stories, story titles;
  • a value the acceptance criteria define — point at the criterion instead;
  • names that no code outside this issue depends on — say what to add and where ("add constants for the feedback namespaces and keys next to the existing vote ID constants in: …"), and let the engineer name them.

Keep the scope visible. When one checkbox covers many places, list them, so the reader can size the work. Cut the how at each place, never the where:

  • Too short: "Pass the namespace and group wherever FeedbackPrompt or ThumbsFeedback is used."
  • Right: "…is used: FeatureRelevancyFeedback, OnlineStorePerformanceWidget, LeadGenerationPerformanceWidget, PrimaryActionRow and the Recent activity InsightNotice."

Write in plain, simple words — this matters more than anything else in this section. The brief is read by people: the engineer who implements it, the reviewer who grades the PR against it, and a moderator who has never read the design doc. Many of them do not speak English as a first language. Every sentence must be clear on the first reading:

  • Use the simplest word that is still accurate. Short sentences. One idea per sentence. No decoration, no "notably", "crucially", "simply", "of course", "elegant", "robust".
  • No idioms, metaphors, or cultural references. Not "standard furniture", "dead weight", "burns the flag", "under the hood", "out of the box", "for free", "a natural no-op". Write what actually happens instead: "the listener finds no matching elements, so it does nothing".
  • Explain a technical term the first time you use it, or do not use it. "the value lands in an opaque pathname" says nothing to the reader. "hostname is empty and the whole recipient stays in pathname as one unsplit string with no leading slash — tel:+15551234567 gives pathname +15551234567" says all of it.
  • Finish every sentence. "https://notwa.me/1555 must not classify" leaves out as what. Write "…is not a contact link, so nothing is emitted".
  • Name who does what to what. "the classifier short-circuits outbound_link_click" can be read in two opposite directions. "when a link is classified as a contact link, the listener emits contact_link_click and returns, so the outbound handler never receives that anchor" can be read in only one.
  • List the members of any set you name. If you write "an allowlist", "the excluded hosts", "the usual guards", write out what is in it, inline. A set the reader has to guess at is the same as no set at all.

Delete every bullet the engineer would do anyway, and check that every area the change touches is named.

Read each bullet once more before you finish, and rewrite every sentence that needs a second reading. This applies to your reply to the user (Step 7) as much as to the issue text.

Say what to do, and nothing else. Every bullet is an instruction. Leave a genuine implementation choice open rather than inventing a detail, but never leave the implementer to search for something the codebase has already decided.

Name the real thing. Wherever a symbol already exists, name it exactly:

  • classes, methods, hooks, filters, constants, script handles, datapoint names (GET:ctas);
  • datastore selectors and actions (getCTAs()), and the form/store constants they use;
  • components to reuse (SpinnerButton, ProgressBar, Notice), their props (helperText), and CSS class names (mdc-text-field--error);
  • inline-data globals and keys (wpPrivacyURL on _googlesitekitBaseData).

Give a signature only when the brief adds or changes it.

Spell out every name you invent. Name a new thing only when other code depends on the name (see Give direction, not steps). Write each name you give in full words — no abbreviations, no truncations, no initials. readThresholdPct and readMinSeconds each cost the reader a guess: what does Pct stand for, and is Min "minutes" or "minimum"? readTimeThresholdPercent and minimumReadTimeSeconds cost nothing and can only be read one way. The short forms that stay are the ones already used across the codebase (ID, URL, HTML) and any existing name, which you copy exactly as it is. See docs/context/php/naming-conventions.md.

Point at an exemplar instead of describing one. "following the pattern in includes/Modules/Analytics_4/Datapoints/", "following publications.js", "following how Analytics_4 registers POST:create-audience". One reference beats a paragraph of description.

Cross-reference sibling issues inline wherever the work meets theirs — (added in #12950), (see #13005), "the create variant is #13022". Use it for prerequisites the brief depends on and for extension points it deliberately leaves open. Every number comes from the user, never from your own inference — see Referencing another issue, above.

Fence the scope in one line when an adjacent concern could reasonably be pulled in: "No express-flow routing/gating changes in this step." "The live API wiring lands in the API integration work." "Keep shared stepper/layout styles untouched."

For UI work, reference the design (a Figma node link, or "per the design") rather than restating measurements, and spell out the interaction states: what disables the CTA, the pending state, what happens on success, what renders on error. Name the SCSS partial to create or extend and the index file to import it into.

Do not include:

  • Rationale. No "because", no "this keeps X out of Y", no trade-off discussion, no restatement of a decision's benefits. The design doc and the acceptance criteria hold the why; the brief holds the what. A reason is the exception, allowed in two places only: where the brief settles a real technical choice an engineer would otherwise stop and question — keep it to a clause — and for a section the issue template asks for that needs nothing (see the next bullet).
  • Work that isn't needed. No "no migration needed", "no new settings", "no REST route" for a concern the issue never raised. Silence already says it. The exception is what the template asks for by name — automated tests, and Storybook and VRT changes: when those aren't needed, say so and say why (Step 6).
  • Routine commands. No lint, build, test or VRT invocations — the implement-issue skill's Step 6 owns verification, and every engineer already knows to build. Mention a command only when it is unusual and specific to this issue.
  • Links to local design docs. They don't resolve for someone reading the issue on GitHub; restate the constraint in one clause instead. External links — Figma, a hosted design doc — are fine.
  • Plain-text line numbers. No includes/Core/Modules/Modules.php:212, no "see line 212", no file:line anywhere in the two sections. The number is wrong as soon as anyone edits the file, and a reader on GitHub cannot click it. When a bullet has to point at an exact place in the code, use a GitHub permalink instead — a URL pinned to a commit SHA, with the line or range on the end: https://github.com/google/site-kit-wp/blob/<commit SHA>/includes/Core/Modules/Modules.php#L212-L218. Get one by opening the file on GitHub and pressing y, or with gh browse --no-browser --commit=<commit SHA> <path> and adding the #L<start>-L<end> yourself. A URL built on a branch name (/blob/main/, /blob/develop/) is not a permalink — it points at different lines next week — so never use one. Naming the symbol is still better than linking to it: link only when there is no name to give, such as an unnamed block inside a long function.
  • Restated acceptance criteria, a recap of the Feature Description, or background on how the existing system works. This covers the user-facing copy the criteria define — headings, descriptions, CTA labels, error text. Copy gets reworded during brief review, and a verbatim quote in the brief goes stale while the criterion it came from stays current; point at the criterion instead ("the empty-state heading from the acceptance criteria"). A string that already exists in the code is not an acceptance criterion — name it exactly, as above.
  • Prose paragraphs.

Do include, when they apply:

  • The right extension on every new frontend file. New files on the JavaScript side are written in TypeScript: .ts, or .tsx when the file returns JSX, with co-located tests as .test.ts / .test.tsx. Never ask for a new .js or .jsx file. Name the types the new file exports the same way you name any other symbol — the union of allowed values, the interface a table row must match, the function signature with its return type (classifyContactLink( anchor: HTMLAnchorElement ): ContactLinkType | null). An existing .js
스킬의 지침이 아직 전부 로드되지 않았습니다. 계속 읽어 상위 폴더의 규칙과 필수 내용을 확인하세요.

이 스킬의 파일

이 스킬에는 보조 파일이 없습니다.

지원 파일 전체 둘러보기