AGENT SKILL

git-commits-and-reporting

Writes Pocket Arcade commit messages, Gate-Change and Spec-Change trailers, per-app release tags, plain-English evidence reports and stop-and-ask messages to the owner. Use when committing, tagging, reporting a slice or release, or blocked on the owner. Not for running gates (use quality-gates).

License 许可
MIT
最近更新
2026-11-05
Stars
★ 0
Forks
0

01 前言 Front Matter

name
git-commits-and-reporting
description
Writes Pocket Arcade commit messages, Gate-Change and Spec-Change trailers, per-app release tags, plain-English evidence reports and stop-and-ask messages to the owner. Use when committing, tagging, reporting a slice or release, or blocked on the owner. Not for running gates (use quality-gates).

02 资源文件 324

03 SKILL.md 正文

Git commits and reporting

Every change reaches the owner twice: as a commit history they can search, and as a short plain-English message they actually read. This skill makes both exact: Conventional Commits with the right trailers, per-app tags, an evidence report built from the files in reports/, and one clear question when something needs a person. Three scripts check the messages, the tags and the reports before anything is committed or sent.

Rules that must hold

  1. Headers are Conventional Commits: <type>(<scope>): <subject>, at most 72 characters, imperative, lowercase start, no trailing period. Scope is a folder under apps/ or packages/ (line-siege, shell, game-kit, tooling) or repo, deps, docs, ci, skills. The owner and later sessions search the history by scope, and the commit-msg hook rejects anything else.
  2. One behaviour per commit, its tests and code together, with a body that says why and, for a feat or a fix outside tooling, repo, deps, docs, ci and skills, names the spec lines it serves (Spec S9 and 8.3: ..., N3, D4). The history is the proof that each behaviour was built test-first.
  3. Trailers sit in the last paragraph. Gate-Change: <reason> exactly when a staged file matches gatedPaths (gate configs, goldens, baselines, save fixtures, parity/waivers.json and parity/game-facts.json, .npmrc, .claude/settings.json): a gate config changes only after the owner agreed; a golden, baseline or fixture only on purpose, with the reason. Spec-Change: spec <section> <what changed> only when a test expectation changed because the spec changed, never for "the test was wrong"; the one directed swap of the build order, Shell step 8's with-shell swap, carries exactly Spec-Change: with-shell final composer (phase 0 placeholder replaced), which needs no spec id (DIRECTED_SWAP_TRAILERS). Keep any Co-Authored-By: line the session asks for. Git reads trailers only there, and the owner lists gate changes by them.
  4. Never bypass or rewrite: no --no-verify, no LEFTHOOK=0, no amend or rebase of pushed commits. A failing hook means the commit is not ready.
  5. Nothing leaves this Mac without the owner's word in this session: no push, no tag push, no upload, no App Store Connect or Play Console change, no "submit for review" until the owner says "submit". These cannot be undone.
  6. Tags and release commits come only from npm run release:ios and npm run release:android: chore(<game-id>): build <n>, then <game-id>/vX.Y.Z+<build> after each upload and <game-id>/vX.Y.Z when the owner says "ship". Both platforms share one build number (Android's versionCode), so no two release commits or tags of a game repeat it. Never move, delete or reuse a tag; build numbers only go up.
  7. Every finished slice and release ends with the evidence report: outcome first in players' words, spec names (Home, S4), numbers copied from reports/ files with the file named, at most one request with its default, at most five things to look at, an honest "not verified" list, technical detail last. Intended changes the owner could miss get their own block: design references changed on purpose (frames and the referenceChanges id), parity waivers changed (class and the Gate-Change commit) and texts changed in all four languages (the fa and ckb drafts go to the owner's review). The owner's personal checks, the fa and ckb review, the play-test and listening to the sound previews, are listed in every slice and release report under "Owner steps (not blocking)" and never waited for; a keyless rehearsal (REHEARSAL: not a release gate) is never cited as release evidence. The owner never reads code or logs; this message is the review.
  8. Stop and ask in the listed situations (references/stop-and-ask.md): one message, one request answerable in a word, the human-step ID, the default that applies meanwhile; then keep working on anything else. Release stops (signing, agreement, 401/403, INVALID; on Google Play also app not found, a draft app, API not enabled, policy declarations, a used version code) are never retried.
  9. Never read, print, copy or commit the App Store Connect .p8 key, a JWT or a password. If a task seems to need one, ask.

Workflow

  1. Stage exactly one slice. git status and git diff --cached --stat: one behaviour, its tests and code, and any docs it changes. Split unrelated changes into their own commits. Read references/commit-format.md before the first commit of a session.
  2. Write the message into a file from templates/commit-message.txt, for example reports/commit-message.txt (reports/ is gitignored). Replace every __PLACEHOLDER__; delete the trailer lines that do not apply. examples/commit-messages.md shows good and bad messages.
  3. Check it against the staged files: node ${CLAUDE_SKILL_DIR}/scripts/check-commits.mjs . --message reports/commit-message.txt --staged. Fix every FAIL line and rerun until RESULT: PASS, then git commit -F reports/commit-message.txt. The commit-msg hook runs the same rules with the same ids (packages/tooling/src/git/commit-message-rules.ts), so a message this script passes is never rejected there, and one the hook accepts never fails here later (only a history shows build-number-reused).
  4. Check the session's history before reporting: node ${CLAUDE_SKILL_DIR}/scripts/check-commits.mjs . --range <base>..HEAD (<base> = git rev-parse --short HEAD noted at the start of the session; --range HEAD checks the whole history). A bad unpushed commit may be reworded with git commit --amend (last commit) before anything is pushed; a pushed one stays and the report says so.
  5. Write the evidence report. Read references/owner-updates.md. Copy templates/evidence-slice.md (a slice) or templates/evidence-release.md (a TestFlight release; templates/evidence-release-play.md for Google Play internal testing) to reports/evidence-<YYYY-MM-DD>-<slug>.md, fill it only from the files in reports/ and the Jest summary (the Tests line's golden count comes from npx jest --ci --selectProjects golden, and unit = total minus golden, because npm run test:coverage prints one combined summary; a changed screen also gets the "Design match" line against its Toybox design screenshot, see the reference), and compare with examples/slice-evidence.md or examples/release-evidence.md. When the work changed a committed design reference, a parity waiver or a player-visible text, paste the matching blocks of templates/report-changes.md above "Not tested or not verified" (examples/reference-and-copy-changes.md shows all three).
  6. Check the report: node ${CLAUDE_SKILL_DIR}/scripts/check-report.mjs reports/evidence-<...>.md. Fix and rerun until RESULT: PASS, then put the report in the final message (the red run and commands stay under "Details").
  7. When something needs the owner, read references/stop-and-ask.md, fill templates/owner-request.md (human step or spec question) or templates/release-stop.md (a release stopped), check it with check-report.mjs <file> --kind request (examples/owner-requests.md has one of each), send it, and continue with work that does not depend on the answer.
  8. After a release upload or a "ship", read references/tags-and-releases.md and run node ${CLAUDE_SKILL_DIR}/scripts/check-tags.mjs .. Push tags only when the owner has said so in this session.
  9. At the end of every session: the Stop hook runs npm run -s check:fast; commit the finished slices (steps 1-4), write the report (steps 5-6). If the Stop hook still fails after its 8 continuations, report the failing gate and what was tried instead of working around it.

Definition of done

  • [ ] Each new commit holds one behaviour with its tests; its body says why and names the spec lines of a feat or fix.
  • [ ] Gate-Change: appears exactly on commits that touch a gated path (gate configs agreed with the owner, goldens and baselines changed on purpose); Spec-Change: only where the spec changed.
  • [ ] No hook was bypassed; nothing was pushed, tagged, uploaded or submitted without the owner's word in this session.
  • [ ] The evidence report takes every number from a named reports/ file, lists what was not verified, names every intended design-reference change (with its referenceChanges id), waiver change (with its Gate-Change commit) and text change (four languages, fa and ckb drafts for the owner's review), lists the owner's own checks under "Owner steps (not blocking)" without waiting for them, cites no rehearsal as release evidence, and passes check-report.mjs.
  • [ ] Every owner request carries one action, its step ID when there is one, and a default; tags (after a release) pass check-tags.mjs.
  • [ ] node ${CLAUDE_SKILL_DIR}/scripts/check-commits.mjs . --range <base>..HEAD and node ${CLAUDE_SKILL_DIR}/scripts/check-report.mjs reports/<report>.md print RESULT: PASS

Anti-patterns

  • fix: stuff or Updated files. The history becomes unsearchable; write what changes for the player or the code, with a scope.
  • One commit for "stars, packs and unlocks". Three behaviours, three commits; otherwise nobody can see that each was test-first.
  • Gate-Change: update on a commit that also relaxed a lint rule. Gate changes need the owner's agreement first and a reason that says why.
  • Spec-Change: the test was wrong. That is editing a test to pass; fix the code or ask the owner.
  • "All tests green, coverage great!" Numbers come from reports/ with the file named: "Tests: 214/214 pass (unit 192, golden 22), random seed 48213".
  • Five questions in one message. Ask the most blocking one with its default; the rest can wait for the next message.
  • "Waiting for the native review before the release." The fa and ckb review, the play-test and listening to the sounds are the owner's own checks: list them under "Owner steps (not blocking)" and keep going.
  • Citing check-store-artifact --unsigned as the store gate. It is a keyless rehearsal; the release report cites only the signed archive's run.
  • Citing an owner-placeholder FAIL as evidence, or writing a release report without an upload. Until the owner supplies G3 and G5 the ship gates end with owner-placeholder lines and OWNER STEPS PENDING: G3, G5 by design: hand the pilot over with a slice report (rehearsal and those results under "Not tested or not verified", G3 and G5 under "Owner steps (not blocking)"); the release report follows the first upload.
  • Retrying release:ios after errSecInternalComponent or a 401. It needs a person or a credential; retries can lock the account or burn build numbers.
  • Pushing "because the work is done". Pushing is outward-facing until the owner says otherwise.
  • Tagging by hand, or reusing line-siege/v1.0.0 for a rebuilt binary. A new build gets a new build number and a new upload tag.

Files in this skill

File What it is Read/run when
references/commit-format.md Header, types, scopes, body, trailers, slices, good and bad headers Workflow step 1, first commit of a session
references/owner-updates.md The seven reporting rules, the evidence message shape, slice and release form, where each number comes from, honest limits, plain words Workflow step 5
references/stop-and-ask.md When to stop, every human-step ID (O, G, GP, P, R, A), App Store and Google Play release stops, how to write the message Workflow step 7, and whenever a step needs a person
references/tags-and-releases.md Upload and release tags, version and build numbers shared by iOS and Android, release commits from release:ios and release:android, pushing Workflow step 8
templates/commit-message.txt Commit message with placeholders and hints (comment lines are dropped) Workflow step 2
templates/evidence-slice.md Evidence report, slice form Workflow step 5
templates/evidence-release.md Evidence report, release form (TestFlight) Workflow step 5
templates/evidence-release-play.md Evidence report, release form for Google Play internal testing (Android E2E, design match on Android, the store-AAB gate, GP7 play-test) Workflow step 5, after release:android
templates/report-changes.md The three optional report blocks: design references changed on purpose, parity waivers changed, texts changed in all four languages Workflow step 5, when the work changed a reference, a waiver or a text
templates/owner-request.md One request: a human step or a spec question with options Workflow step 7
templates/release-stop.md The message when a release step stops Workflow step 7
examples/commit-messages.md Good messages and bad ones with the rule each breaks Workflow step 2
examples/slice-evidence.md A complete slice report Workflow step 5
examples/release-evidence.md A complete release report Workflow step 5 for a release
examples/reference-and-copy-changes.md A complete report with all three change blocks (the Line Siege no-music, score-line, Persian-digit, version-gap and march-text changes) Workflow step 5, with the change blocks
examples/owner-requests.md A human-step request, a spec question and a release stop Workflow step 7
scripts/check-commits.mjs Checks a planned message (--message, with --staged or --files) or history (--range, --log): header, scope, mood, body, spec lines, trailers, gated paths, leftover placeholders; the same rules and ids as the repo's commit-msg hook, plus, in a history only, a build number two release commits of one game share (build-number-reused). --samples <list> proves both still agree on the shared sample list Workflow steps 3-4 and the definition of done
scripts/check-report.mjs Checks an evidence report (--kind slice or release) or a request (--kind request), including the outcome line's limits (240 characters, 2 sentences, ends in . or !, each named with its number), the owner-steps block (G3 and G5 lines may name the gates they unblock), and that no report cites a keyless rehearsal or an owner-placeholder FAIL as evidence Workflow steps 6-7 and the definition of done
scripts/check-tags.mjs Checks tag names, game ids, an upload tag behind every release tag, build-number order across versions and in tag-date order (the repo's tags or --list <file>) Workflow step 8
scripts/selftest.mjs Proves all three checkers pass good fixtures and catch each planted bug, and that check-commits.mjs gives every sample of the shared commit-message list (the one the hook's own test runs) exactly its rule ids After changing a checker, a template or an example
scripts/check-lib.mjs Shared script helper, synced from the library (do not edit here) Never by hand
assets/shared.json Declares the shared files this skill copies in: check-lib.mjs and the shared commit-message sample list (into tests/fixtures/check-commits-samples/good/) When adding a shared file
tests/fixtures/ Good and planted-bad inputs; the commit logs are real git log output from throwaway repos; check-commits-samples/good/ is the synced sample list (do not edit here) When adding a rule to a checker (add its sample to the shared list too)

Related skills

  • quality-gates - what check:fast, verify and the commit-msg hook run, and which paths are gated.
  • tdd-workflow - how each slice is built test-first before it is committed.
  • pocket-arcade-product-spec - the spec IDs that commit bodies, reports and questions quote.
  • ios-release-testflight - release:ios, which makes release commits and tags.
  • golden-tests - when a golden or baseline may change (and so needs Gate-Change:).

04 同仓库更多 Skills

zakariaf
zakariaf/pocket-arcade

unit-and-component-tests

Sets up Jest and writes Pocket Arcade test code - three projects, RNTL 14 async via renderWithShell, root SDK mocks, fakes, fast-check, coverage, Stryker. Use when a test needs the Shell wrapper, a mock or a fake, or Jest fails. Not for the red-green loop (tdd-workflow) or goldens (golden-tests).

★ 0
zakariaf
zakariaf/pocket-arcade

typescript-and-lint-rules

Enforces Pocket Arcade's strict TypeScript 6 tsconfigs, ESLint 9 flat config, Prettier and size limits. Use when writing or splitting .ts/.tsx or fixing a tsc or lint error. Not for gate wiring (quality-gates), names (naming-conventions) or import zones (architecture-and-boundaries).

★ 0
zakariaf
zakariaf/pocket-arcade

demo-skill

Builds a demo. Use when testing the pitfall checker.

★ 0
zakariaf
zakariaf/pocket-arcade

demo-skill

Builds a demo. Use when testing the pitfall checker.

★ 0
zakariaf
zakariaf/pocket-arcade

troubleshooting-playbook

Diagnoses and fixes Pocket Arcade failures with a catalogue of 300+ known ones (symptom, cause, fix). Use when something errors, crashes, hangs or renders wrong, or an error or log needs explaining. Not for gate setup (quality-gates) or running builds (ios-simulator-build, ios-release-testflight).

★ 0
zakariaf
zakariaf/pocket-arcade

toybox-visual-parity

Proves a built Pocket Arcade screen matches its Toybox design screenshot (light/dark, en/fa) and drives the fixes: capture, element gates, sheets, sign-off. Use when any screen is built or changed, or for visual parity, design match, screenshot compare. Not for building screens (toybox-screens).

★ 0