From 6a23c91fdb2b8710cc247441e97b675c5e78fc6f Mon Sep 17 00:00:00 2001 From: Erik Hjelm Fjeldheim Date: Sun, 22 Nov 2026 10:38:48 -0600 Subject: [PATCH] docs: #107 document AI task delegation and verification workflow --- docs/AI-USAGE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/AI-USAGE.md b/docs/AI-USAGE.md index 30a0a84..2030385 100644 --- a/docs/AI-USAGE.md +++ b/docs/AI-USAGE.md @@ -105,6 +105,18 @@ the part that matters most. | 2026-11-17 | erikhfj | Antigravity | #91, E2E search helper fix: updated `e2e/tests/search.spec.ts` to match the `Search` and `Filters` buttons with `exact: true` so `Clear recent searches` does not trigger a strict-mode violation, and cleared `E2E_USER_ID`'s recorded search history during cleanup. Verified locally with two consecutive full `pnpm test:e2e` runs against a throwaway seeded PostgreSQL stack. | | 2026-11-20 | erikhfj | Antigravity | #100, review author privacy: removed `User.id` from `schema.graphql` and the `AlbumDetail` query, replaced `Listener ` with deterministic SHA-256 music pseudonyms in `server/src/userIdentity.ts` (including read-time sanitization of legacy labels in `Review.user`), added `User` cache merge policy, and updated schema/unit/client tests and `docs/architecture.md`. Verified with `pnpm codegen`, `pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, and `pnpm build`. | | 2026-11-20 | erikhfj | Antigravity | #103, search history error visibility and focus: moved the search history error message and Retry button inside the open `RecentSearches` dropdown so closed-state errors cannot overlap page content, returned retry success from `useSearchHistory`, restored focus to the search input after a successful retry in `SearchForm`, and added unit/integration tests. Verified with `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build`. | +| 2026-11-22 | erikhfj | Antigravity | #117, stabilized `ReviewForm.test.tsx`: traced the intermittent CI failure (run `88055`) to `findByRole('status')` resolving via `MutationObserver` before React's passive `useEffect` focused `statusRef`, and wrapped the status focus assertions in `waitFor`. Verified with 10 consecutive test runs plus `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test`. | +| 2026-11-22 | erikhfj | Antigravity | #107, documented the team's AI task delegation, verification, and review workflow in `docs/AI-USAGE.md`, reflecting actual practices across all four contributors and complementing #97's prompt-context section. Verified with `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test`. | + +## Task delegation and verification workflow + +The table above records individual sessions; this section summarizes how AI-assisted tasks were scoped, checked, and carried through to reviewed pull requests across the team. + +- **Bounded, issue-linked tasks:** After the group overruled an early plan to split a generated prototype into PRs (24 September), all work was divided into milestone-scoped GitHub issues owned by individual contributors. Prompts and delegated work stayed tied to one issue's scope and acceptance criteria (`feat/-…`, `fix/-…`, `docs/-…`) rather than open-ended generation. +- **Different workflows across contributors:** Team members did not use a single uniform AI workflow. Some used chat and design tools (`ChatGPT`, `Figma Make`) mainly for sparring on UI sketches, dataset evaluation, schema/migration ideas, troubleshooting, and review preparation while editing or adapting code directly. Others delegated bounded implementation, test, or debugging tasks to repository-aware agents (`opencode`, `Codex (ChatGPT)`, `Claude`, `Antigravity`). +- **Scope, context, and resulting work:** When delegating a task, the contributor supplied the issue's acceptance criteria alongside the repository's contracts (`schema.graphql`, `docs/architecture.md`, `docs/ui-specification.md`, `AGENTS.md`). Grounding the task in those constraints kept generated changes small enough to audit and aligned with non-negotiable rules (SQL sorting/filtering, keyset pagination, per-request DataLoaders, simulated `X-User-Id` context, plain CSS, accessibility, URL state). +- **Checking, revising, and rejecting suggestions:** Tool output was treated as a draft rather than an authoritative change. Contributors checked proposals against the live codebase and ran automated gates (`pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, `pnpm build`, plus PostgreSQL integration suites, Playwright E2E/axe checks, Lighthouse, or VM smoke tests when applicable). Unsuitable or wrong suggestions were revised or rejected—for example, rejecting the prototype-splitting plan (24 Sep), correcting an overstated security claim on `displayName` (#40), raising dark-mode border contrast after hand-checking WCAG ratios (#18), catching a missing `DateTime` scalar and test-fixture leakage during codegen (#30), fixing microsecond cursor precision in `myCrate` (#77), and replacing a brittle `to_tsquery` prefix suggestion with a TypeScript builder (#55). +- **Human responsibility and peer review:** AI tools did not merge code or approve PRs. Every change went through `main` branch protection and was reviewed by a different teammate (`docs/WORKFLOW.md`), with the PR author responsible for understanding the final diff, verifying tests, and resolving review feedback. ## Notes