Skip to content

Plan: CLAUDE.md and Skills for recurring workflows - #443

Merged
mnindrazaka merged 1 commit into
chore/claude-mdfrom
claude/zealous-edison-ue894g
Sep 12, 2026
Merged

Plan: CLAUDE.md and Skills for recurring workflows#443
mnindrazaka merged 1 commit into
chore/claude-mdfrom
claude/zealous-edison-ue894g

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

This document specifies the structure and content of a new CLAUDE.md system and six reusable Skills to guide AI agents through the repo's conventions and templated workflows.

Summary

The repo has strict, non-obvious conventions (FSM-based use cases, inverted useForm ownership, gitignored generated Go code, stale planning documents) that agents must rediscover every session. Separately, day-to-day work is highly templated: 87 use cases, 58 handler/screen pairs, 25 migrations, all following a single pattern. This plan introduces:

  1. Three CLAUDE.md files (root + frontend + backend areas) that index rules and link to their authorities rather than duplicating prose
  2. Six Skills (.claude/skills/<name>/SKILL.md) for the most-repeated, highest-failure-cost workflows: verify, ui-feature-slice, api-endpoint, db-migration, write-spec, docs-site-page, e2e-spec

Each skill includes the template file structure, the specific gotchas that cannot be inferred from siblings, and the exact verification command.

Key sections

  • §1–2: Problem statement and goals — agents rediscover conventions; templated work earns Skills
  • §3: Audit of what is documented well (README, handlers.md, forms.md, eslintrc) vs. what is missing (Go codegen prerequisite, stale root docs, barrel discipline, migration paths)
  • §4: Design decisions — CLAUDE.md is a rule sheet and index, not a second README; Skills carry traps, not just templates; every skill names its verification command
  • §5: Six Skills with frontmatter and outline (S1–S7, though S7 is e2e-spec not listed in the count)
  • §6: Phased delivery — 11 phases, each one small PR; Phases 1–3 are sequential (root + two area files), Phases 4–10 are independent Skills, Phase 11 is optional session bootstrap
  • §7–10: Defects found (not fixed), deferred work, risks, rollback

Acceptance criteria

  • Audit in §3 is accurate to the codebase today
  • Design decisions in §4 are sound (especially D1's 180-line cap, D3's three-file split, D6's skill selection criteria)
  • Skill outlines in §5 are complete enough to write without re-deriving the research
  • Phase breakdown in §6 is genuinely one PR per phase, each reviewable in ~15 minutes

https://claude.ai/code/session_01VM4BAxzahdoj9mzpEGRaYQ

Audits what the repo already documents well (README, docs/handlers.md,
docs/forms.md, the per-folder eslint import bans) against what is written
down nowhere — the codegen prerequisite that makes apps/api uncompilable on
a fresh clone, the four stale root-level plans describing the removed
controllers layer, the Makefile's wrong MIGRATIONS_DIR default, and the
barrel/test/story siblings every slice is expected to carry.

Proposes a root CLAUDE.md plus one per area (libs/ui, apps/api) so frontend
rules are not paid for by Go-only sessions, and six Skills for the workflows
the file counts show are templated: verify, ui-feature-slice, api-endpoint,
db-migration, write-spec, docs-site-page, e2e-spec.

Phases are sized one per PR. No application code is touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VM4BAxzahdoj9mzpEGRaYQ
@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
gatherloop-order Ready Ready Preview Sep 12, 2026 12:28am UTC
gatherloop-pos Ready Ready Preview Sep 12, 2026 12:28am UTC
gatherloop-ui-storybook Ready Ready Preview Sep 12, 2026 12:28am UTC

@mnindrazaka
mnindrazaka changed the base branch from main to chore/claude-md September 12, 2026 04:13
@mnindrazaka
mnindrazaka merged commit 9f179b8 into chore/claude-md Sep 12, 2026
7 checks passed
@mnindrazaka
mnindrazaka deleted the claude/zealous-edison-ue894g branch September 12, 2026 04:14
mnindrazaka added a commit that referenced this pull request Sep 12, 2026
* docs: plan a CLAUDE.md and Skills for the repo's recurring workflows (#443)

Audits what the repo already documents well (README, docs/handlers.md,
docs/forms.md, the per-folder eslint import bans) against what is written
down nowhere — the codegen prerequisite that makes apps/api uncompilable on
a fresh clone, the four stale root-level plans describing the removed
controllers layer, the Makefile's wrong MIGRATIONS_DIR default, and the
barrel/test/story siblings every slice is expected to carry.

Proposes a root CLAUDE.md plus one per area (libs/ui, apps/api) so frontend
rules are not paid for by Go-only sessions, and six Skills for the workflows
the file counts show are templated: verify, ui-feature-slice, api-endpoint,
db-migration, write-spec, docs-site-page, e2e-spec.

Phases are sized one per PR. No application code is touched.


Claude-Session: https://claude.ai/code/session_01VM4BAxzahdoj9mzpEGRaYQ

Co-authored-by: Claude <noreply@anthropic.com>

* docs: rewrite root CLAUDE.md as a rule sheet and index (#444)

Implements Phase 1 of docs/plan-claude-md-and-skills.md: keeps the
existing comment rule verbatim and first, then adds the traps an agent
otherwise rediscovers by trial and error (the gitignored Go codegen
prerequisite, the four stale root-level planning docs), a summary of
the ESLint-enforced layer boundaries with the eslintrc as authority,
the conventions lint can't catch (usecase FSMs, barrel exports,
*domain.Error, mockgen, migration gotchas), and a doc index. No prose
duplicated from README.md; every link resolves.


Claude-Session: https://claude.ai/code/session_012qMpjsE9bwgZvWngdWkNhs

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add libs/ui CLAUDE.md for frontend slice rules (#445)

Phase 2 of docs/plan-claude-md-and-skills.md: the FSM use case shape,
handler/form/screen boundaries with their authoritative docs, barrel
discipline, and the test-harness gotchas that lint cannot catch.


Claude-Session: https://claude.ai/code/session_011QausgGEHDtqAXUR1p2XGf

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add apps/api/CLAUDE.md for backend slice rules (phase 3) (#446)

Adds the backend area rules file from docs/plan-claude-md-and-skills.md
phase 3: the domain/data/presentation file shape per feature, the
*domain.Error contract, public-vs-authenticated routing, and the
migrations/MIGRATIONS_DIR trap, each cited to its authority in the repo.


Claude-Session: https://claude.ai/code/session_011y6QEDeaJ4m2XyhcjYsHUu

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add verify skill for choosing the narrow test/lint command (phase 4) (#447)

Adds the verify skill from docs/plan-claude-md-and-skills.md phase 4:
a what-changed to command table, the api-contract codegen prerequisite,
single-file test loops, and what pr-test.yml/e2e-main.yml will and
will not catch before merge.


Claude-Session: https://claude.ai/code/session_01H1vxxZZ2mXWVEgsGqzGXyM

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add ui-feature-slice skill for frontend slice template (phase 5) (#448)

Documents the file set, FSM use-case skeleton, handler/form/screen
rules, composition root shape, and test pattern for adding a frontend
feature slice in libs/ui, using the Budget slice as the verified
reference example.


Claude-Session: https://claude.ai/code/session_01Jbag8Fr19FqhGcH3DnP1tA

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add api-endpoint skill for Go REST feature template (phase 6) (#449)

Claude-Session: https://claude.ai/code/session_01MrPsaMenWC7KCKqjyVqJ3g

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add db-migration skill for golang-migrate workflows (#450)

Phase 7 of docs/plan-claude-md-and-skills.md: a Skill for creating,
writing, and running apps/api MySQL migrations, covering the
MIGRATIONS_DIR default mismatch and the go.work install trap.


Claude-Session: https://claude.ai/code/session_019PubCtkZbjkU1fSShMVCKn

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add write-spec skill for PRD/TRD/plan authoring (#451)

Phase 8 of docs/plan-claude-md-and-skills.md: documents the docs/
house style (PRD vs TRD vs plan, D-numbered decisions, one-phase-per-PR
sizing) so specs stay consistent and their decision numbers stay stable.


Claude-Session: https://claude.ai/code/session_01Pjw1aXnLk2WBXqtEEDLGQj

Co-authored-by: Claude <noreply@anthropic.com>

* docs: add docs-site-page skill for VitePress feature pages (phase 9) (#452)

Phase 9 of docs/plan-claude-md-and-skills.md: documents where a feature
page and its screenshots/diagrams belong, and the sidebar-wiring step in
.vitepress/config.ts that has no error when skipped, leaving a page built
but unreachable.


Claude-Session: https://claude.ai/code/session_01Asbozcv2zvRwh5csDDNgcp

Co-authored-by: Claude <noreply@anthropic.com>

* skill: add e2e-spec for Playwright e2e coverage in pos-web-e2e/order-web-e2e (#453)

Phase 10 of docs/plan-claude-md-and-skills.md (S7). Documents where specs
live, the seeded environment and pre-baked auth CI assumes, the
testMatch/testIgnore routing for no-auth and mobile projects, the DOKU
stub flow, and why the suite must be run green locally since pr-test.yml
never runs it.


Claude-Session: https://claude.ai/code/session_01AMGf2tLqmznUEDx5HM48Xa

Co-authored-by: Claude <noreply@anthropic.com>

* chore: add session-start hook and command allowlist (phase 11) (#454)

Runs the api-contract codegen targets on SessionStart so apps/api
resolves from the first turn instead of showing phantom Go errors on a
cold clone, and allowlists the read-only test/lint/codegen commands the
new skills rely on.


Claude-Session: https://claude.ai/code/session_01MXUeuX9Aq7KFdzCUvfxaqK

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.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