diff --git a/.claude/skills/add-contest-table-provider/SKILL.md b/.agents/skills/add-contest-table-provider/SKILL.md similarity index 100% rename from .claude/skills/add-contest-table-provider/SKILL.md rename to .agents/skills/add-contest-table-provider/SKILL.md diff --git a/.claude/skills/add-contest-table-provider/instructions.md b/.agents/skills/add-contest-table-provider/instructions.md similarity index 100% rename from .claude/skills/add-contest-table-provider/instructions.md rename to .agents/skills/add-contest-table-provider/instructions.md diff --git a/.claude/skills/dep-upgrade/SKILL.md b/.agents/skills/dep-upgrade/SKILL.md similarity index 100% rename from .claude/skills/dep-upgrade/SKILL.md rename to .agents/skills/dep-upgrade/SKILL.md diff --git a/.claude/skills/dep-upgrade/instructions.md b/.agents/skills/dep-upgrade/instructions.md similarity index 80% rename from .claude/skills/dep-upgrade/instructions.md rename to .agents/skills/dep-upgrade/instructions.md index 8b3ea9343..c73cb98a4 100644 --- a/.claude/skills/dep-upgrade/instructions.md +++ b/.agents/skills/dep-upgrade/instructions.md @@ -2,8 +2,7 @@ ## 1. Breaking Changes Analysis -Fetch the official migration guide via WebFetch. For each breaking change, grep `src/`, config files, -and `package.json` to determine applicability. Produce two tables: +Fetch the official migration guide via WebFetch. For each breaking change, grep `src/`, config files, and `package.json` to determine applicability. Produce two tables: **問題なし(対応不要)** @@ -26,14 +25,12 @@ Key areas to check: ## 2. Companion Package Check -Some packages must be upgraded together in the same commit to avoid version mismatch. -Check `package.json` for known companion pairs: +Some packages must be upgraded together in the same commit to avoid version mismatch. Check `package.json` for known companion pairs: - `@sveltejs/kit` + `@sveltejs/vite-plugin-svelte` - `eslint` + `@eslint/js` -Also verify peer dependency compatibility (`"eslint": "^8 || ^9 || ^10"` style) for all -related packages already installed. +Also verify peer dependency compatibility (`"eslint": "^8 || ^9 || ^10"` style) for all related packages already installed. If companion packages are found, include them in the upgrade scope. @@ -66,9 +63,6 @@ pnpm check pnpm test:unit ``` -> **`pnpm check` tip:** If type errors appear and you have uncommitted changes, run -> `git stash && pnpm check 2>&1 | tail -5` to confirm whether errors are pre-existing. -> Restore with `git stash pop`. If there is nothing to stash, skip this check — without -> a baseline to compare against, it gives no useful signal. +> **`pnpm check` tip:** If type errors appear and you have uncommitted changes, run `git stash && pnpm check 2>&1 | tail -5` to confirm whether errors are pre-existing. Restore with `git stash pop`. If there is nothing to stash, skip this check — without a baseline to compare against, it gives no useful signal. Update the plan.md `- [ ]` checklist and add a verification results table when done. diff --git a/.agents/skills/extract-approach/SKILL.md b/.agents/skills/extract-approach/SKILL.md new file mode 100644 index 000000000..c4fcdb996 --- /dev/null +++ b/.agents/skills/extract-approach/SKILL.md @@ -0,0 +1,14 @@ +--- +name: extract-approach +description: Use when a non-trivial problem has just been solved (bug fixed after debugging, tricky implementation completed, blocker resolved) and the session is about to move on. A solution without its learnings note is unfinished work. +argument-hint: '[task-name-en]' +--- + +Extract the approach from the just-solved problem into a learnings note for: $ARGUMENTS + +**Skip when:** trivial fixes (typo, rename, config tweak), dependency bumps, or the insight is already covered by `docs/guides/agent-rules/` or the task's `plan.md`. + +1. **Identify the problem** — the symptom from this session and what made it non-trivial; multiple candidates → confirm which one with AskUserQuestion +2. **Extract** — 問題 / 有効だったアプローチ / ハマった点 / 教訓 only; apply the extraction and abstraction rules in [instructions.md](instructions.md) +3. **Write the note** — `docs/dev-notes/YYYY-MM-DD/{task-name-en}/learning.md`; naming and format rules in [instructions.md](instructions.md) +4. **Escalate durable rules** — propose target file and exact wording for project-wide conventions; **do not apply without user confirmation** diff --git a/.agents/skills/extract-approach/instructions.md b/.agents/skills/extract-approach/instructions.md new file mode 100644 index 000000000..625b89fd5 --- /dev/null +++ b/.agents/skills/extract-approach/instructions.md @@ -0,0 +1,34 @@ +# extract-approach instructions + +## What to extract + +Record only what changes future behavior. No session log, no timestamps, no narration of the order things happened in. + +| Section | Content | +| -------------------- | --------------------------------------------- | +| 問題 | Symptom and root cause, one line each | +| 有効だったアプローチ | What worked, and **why** it worked | +| ハマった点 | Dead ends actually tried, and why each failed | +| 教訓 | Reusable rules that apply beyond this task | + +Omit a section that has nothing real to say. An empty ハマった点 is a signal the problem may have been trivial — reconsider the skip condition. + +## Align abstraction (抽象度を揃える) + +State every 教訓 at the same level of generality: + +- One general rule per bullet, optionally followed by a single concrete example from this session. +- Never mix operational steps and principles in the same list. +- A bullet that only makes sense for this one file or this one bug is not a 教訓 — move it to 有効だったアプローチ or drop it. + +## Note format + +- Path: `docs/dev-notes/YYYY-MM-DD/{task-name-en}/learning.md`, using today's date. +- Directory name: `$ARGUMENTS` if given; else the `plan.md` directory name of the task this problem belongs to (when the session is executing one); else a short kebab-case name. +- Japanese prose, English code identifiers, 30 lines or fewer. +- One semantic paragraph or list item per line; no width-based hard line breaks. +- If the file already exists, append a `---`-separated entry instead of rewriting it. + +## Escalating to a durable rule + +A 教訓 belongs in a rules document when it would apply to an unrelated future task in the same path. Propose the target file under `docs/guides/agent-rules/` (or `AGENTS.md` for a project-wide principle) and the exact wording, then wait for the user's decision. diff --git a/.claude/skills/verify-test-strength/SKILL.md b/.agents/skills/verify-test-strength/SKILL.md similarity index 100% rename from .claude/skills/verify-test-strength/SKILL.md rename to .agents/skills/verify-test-strength/SKILL.md diff --git a/.claude/skills/verify-test-strength/instructions.md b/.agents/skills/verify-test-strength/instructions.md similarity index 94% rename from .claude/skills/verify-test-strength/instructions.md rename to .agents/skills/verify-test-strength/instructions.md index e531e8305..acd9a135b 100644 --- a/.claude/skills/verify-test-strength/instructions.md +++ b/.agents/skills/verify-test-strength/instructions.md @@ -36,4 +36,4 @@ Read stdout from `--reporter=default` / `--reporter=verbose`. **Never read a cac - **A test catching nothing that other tests miss** — a deletion candidate. Confirm by re-running the full mutant set without it. - **N tests failing on one mutant** — not N times the value. Parameterized cases over one fixture usually report the same fact N times; the count is a proxy, not evidence. -Record the matrix in the commit message or `plan.md` when it justifies removing tests — it is the evidence `.claude/rules/testing.md` requires for a deliberate test-count drop. +Record the matrix in the commit message or `plan.md` when it justifies removing tests — it is the evidence `docs/guides/agent-rules/testing.md` requires for a deliberate test-count drop. diff --git a/.claude/rules/accessibility.md b/.claude/rules/accessibility.md deleted file mode 100644 index 8d386c757..000000000 --- a/.claude/rules/accessibility.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -description: Accessibility rules for UI components -paths: - - 'src/**/*.svelte' - - 'src/lib/components/**' - - 'src/features/**/components/**' ---- - -# Accessibility - -## Tables - -Always declare header scope: - -```html -Grade -abc001 -``` - -## Color - -Never use color as the sole indicator of meaning. Grade badges and status icons must -include a visible text label or `aria-label` — screen readers and users with color -vision differences depend on it. - -## Interactive Elements - -Every `