From bcbfe2be751f15ce3398fb507c8b654f2fe3c043 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 5 May 2026 07:16:54 +0100 Subject: [PATCH] Move skills to .agents/skills --- .../skills/error-investigation/SKILL.md | 0 .../skills/external-api-integration/SKILL.md | 0 .../skills/git-commit/SKILL.md | 0 .../skills/oban-worker/SKILL.md | 0 .../skills/query-reporter/SKILL.md | 0 .../skills/sqlite-optimization/SKILL.md | 0 {.claude => .agents}/skills/testing/SKILL.md | 0 .../skills/ui-framework/SKILL.md | 0 .../skills/ui-framework/references/ecto.md | 0 .../skills/ui-framework/references/elixir.md | 0 .../skills/ui-framework/references/fluxon.md | 0 .../skills/ui-framework/references/html.md | 0 .../ui-framework/references/liveview.md | 0 .../skills/ui-framework/references/phoenix.md | 0 .../skills/update-dependencies/SKILL.md | 0 .../skills/update-documentation/SKILL.md | 54 ++++++++++--------- .pi/settings.json | 5 +- docs/project-conventions.md | 14 ++--- mix.exs | 2 +- 19 files changed, 39 insertions(+), 36 deletions(-) rename {.claude => .agents}/skills/error-investigation/SKILL.md (100%) rename {.claude => .agents}/skills/external-api-integration/SKILL.md (100%) rename {.claude => .agents}/skills/git-commit/SKILL.md (100%) rename {.claude => .agents}/skills/oban-worker/SKILL.md (100%) rename {.claude => .agents}/skills/query-reporter/SKILL.md (100%) rename {.claude => .agents}/skills/sqlite-optimization/SKILL.md (100%) rename {.claude => .agents}/skills/testing/SKILL.md (100%) rename {.claude => .agents}/skills/ui-framework/SKILL.md (100%) rename {.claude => .agents}/skills/ui-framework/references/ecto.md (100%) rename {.claude => .agents}/skills/ui-framework/references/elixir.md (100%) rename {.claude => .agents}/skills/ui-framework/references/fluxon.md (100%) rename {.claude => .agents}/skills/ui-framework/references/html.md (100%) rename {.claude => .agents}/skills/ui-framework/references/liveview.md (100%) rename {.claude => .agents}/skills/ui-framework/references/phoenix.md (100%) rename {.claude => .agents}/skills/update-dependencies/SKILL.md (100%) rename {.claude => .agents}/skills/update-documentation/SKILL.md (62%) diff --git a/.claude/skills/error-investigation/SKILL.md b/.agents/skills/error-investigation/SKILL.md similarity index 100% rename from .claude/skills/error-investigation/SKILL.md rename to .agents/skills/error-investigation/SKILL.md diff --git a/.claude/skills/external-api-integration/SKILL.md b/.agents/skills/external-api-integration/SKILL.md similarity index 100% rename from .claude/skills/external-api-integration/SKILL.md rename to .agents/skills/external-api-integration/SKILL.md diff --git a/.claude/skills/git-commit/SKILL.md b/.agents/skills/git-commit/SKILL.md similarity index 100% rename from .claude/skills/git-commit/SKILL.md rename to .agents/skills/git-commit/SKILL.md diff --git a/.claude/skills/oban-worker/SKILL.md b/.agents/skills/oban-worker/SKILL.md similarity index 100% rename from .claude/skills/oban-worker/SKILL.md rename to .agents/skills/oban-worker/SKILL.md diff --git a/.claude/skills/query-reporter/SKILL.md b/.agents/skills/query-reporter/SKILL.md similarity index 100% rename from .claude/skills/query-reporter/SKILL.md rename to .agents/skills/query-reporter/SKILL.md diff --git a/.claude/skills/sqlite-optimization/SKILL.md b/.agents/skills/sqlite-optimization/SKILL.md similarity index 100% rename from .claude/skills/sqlite-optimization/SKILL.md rename to .agents/skills/sqlite-optimization/SKILL.md diff --git a/.claude/skills/testing/SKILL.md b/.agents/skills/testing/SKILL.md similarity index 100% rename from .claude/skills/testing/SKILL.md rename to .agents/skills/testing/SKILL.md diff --git a/.claude/skills/ui-framework/SKILL.md b/.agents/skills/ui-framework/SKILL.md similarity index 100% rename from .claude/skills/ui-framework/SKILL.md rename to .agents/skills/ui-framework/SKILL.md diff --git a/.claude/skills/ui-framework/references/ecto.md b/.agents/skills/ui-framework/references/ecto.md similarity index 100% rename from .claude/skills/ui-framework/references/ecto.md rename to .agents/skills/ui-framework/references/ecto.md diff --git a/.claude/skills/ui-framework/references/elixir.md b/.agents/skills/ui-framework/references/elixir.md similarity index 100% rename from .claude/skills/ui-framework/references/elixir.md rename to .agents/skills/ui-framework/references/elixir.md diff --git a/.claude/skills/ui-framework/references/fluxon.md b/.agents/skills/ui-framework/references/fluxon.md similarity index 100% rename from .claude/skills/ui-framework/references/fluxon.md rename to .agents/skills/ui-framework/references/fluxon.md diff --git a/.claude/skills/ui-framework/references/html.md b/.agents/skills/ui-framework/references/html.md similarity index 100% rename from .claude/skills/ui-framework/references/html.md rename to .agents/skills/ui-framework/references/html.md diff --git a/.claude/skills/ui-framework/references/liveview.md b/.agents/skills/ui-framework/references/liveview.md similarity index 100% rename from .claude/skills/ui-framework/references/liveview.md rename to .agents/skills/ui-framework/references/liveview.md diff --git a/.claude/skills/ui-framework/references/phoenix.md b/.agents/skills/ui-framework/references/phoenix.md similarity index 100% rename from .claude/skills/ui-framework/references/phoenix.md rename to .agents/skills/ui-framework/references/phoenix.md diff --git a/.claude/skills/update-dependencies/SKILL.md b/.agents/skills/update-dependencies/SKILL.md similarity index 100% rename from .claude/skills/update-dependencies/SKILL.md rename to .agents/skills/update-dependencies/SKILL.md diff --git a/.claude/skills/update-documentation/SKILL.md b/.agents/skills/update-documentation/SKILL.md similarity index 62% rename from .claude/skills/update-documentation/SKILL.md rename to .agents/skills/update-documentation/SKILL.md index 259936ea..d4690ae4 100644 --- a/.claude/skills/update-documentation/SKILL.md +++ b/.agents/skills/update-documentation/SKILL.md @@ -1,12 +1,12 @@ --- name: update-documentation -description: Use when the user asks to update project documentation, or after significant code changes that may have made docs/architecture.md, docs/project-conventions.md, docs/production-infrastructure.md, or any .claude/skills/*/SKILL.md file stale. Also trigger when new modules, schemas, workers, LiveViews, routes, external integrations have been added or removed, when queues or rate limits change, when testing conventions evolve, or when new commit rules are established. +description: Use when the user asks to update project documentation, or after significant code changes that may have made docs/architecture.md, docs/project-conventions.md, docs/production-infrastructure.md, or any .agents/skills/*/SKILL.md file stale. Also trigger when new modules, schemas, workers, LiveViews, routes, external integrations have been added or removed, when queues or rate limits change, when testing conventions evolve, or when new commit rules are established. --- # Update Documentation Updates `docs/architecture.md`, `docs/project-conventions.md`, `docs/production-infrastructure.md`, -and all `.claude/skills/*/SKILL.md` files to reflect recent codebase changes. +and all `.agents/skills/*/SKILL.md` files to reflect recent codebase changes. ## Guards @@ -50,11 +50,12 @@ For each commit, check if it introduced changes relevant to the documentation fi Use `git show --stat ` and `git show ` to understand each commit. **Skip these — they do not need documentation updates:** + - Bug fixes and minor tweaks that don't change structure - Dependency version bumps (unless they change a major integration) - Refactors that rename internals without changing the public API or module structure - Test-only changes -- Skill or CLAUDE.md changes +- Skill or AGENTS.md changes ### 4. Prepare the update @@ -69,6 +70,7 @@ Use `git show --stat ` and `git show ` to understand each commit. ### 5. Get human approval Show the user: + - Which commits drove the changes - What sections are being added, modified, or removed - The exact content of each edit @@ -82,33 +84,33 @@ Only apply changes after explicit approval. ## Workflow (Skills) -Skills in `.claude/skills/*/SKILL.md` contain hardcoded reference tables and conventions +Skills in `.agents/skills/*/SKILL.md` contain hardcoded reference tables and conventions that must stay in sync with the codebase. When code changes render a skill stale, update it. ### Which Skills to Check After Code Changes -| Code Change | Skills to Check | -|-------------|-----------------| -| New/removed Oban worker | `oban-worker/SKILL.md` — worker tables (On-Demand, Cron), queue assignments | -| Queue configuration change | `oban-worker/SKILL.md` — Queues table | -| New/removed Oban plugin | `oban-worker/SKILL.md` — Plugins table | -| New/removed API integration | `external-api-integration/SKILL.md` — Rate limit intervals, fixture modules list | -| Rate limit interval change | `external-api-integration/SKILL.md` — Intervals table, `architecture.md` | -| New/removed API fixture module | `external-api-integration/SKILL.md` — Available API Fixture Modules table | -| New test fixture module | `testing/SKILL.md` — Available fixture modules table | -| New SQL pattern becomes convention | `sqlite-optimization/SKILL.md` — add to patterns/anti-patterns | -| New LiveView or LiveComponent | `architecture.md` — LiveViews / LiveComponents tables | -| New/removed schema or context | `architecture.md` — Schemas / Contexts tables | -| New/renamed module (any) | `architecture.md` — relevant section | -| Route changes | `architecture.md` — Router Structure | -| PubSub topic changes | `architecture.md` — PubSub Topics table | -| New/removed JS hook or event | `architecture.md` — JS Hooks / JS Event Listeners tables | -| Testing convention change | `testing/SKILL.md` — relevant section; `project-conventions.md` | -| Commit convention change | `git-commit/SKILL.md` — relevant section; `project-conventions.md` | -| UI convention change | `ui-framework/SKILL.md` — relevant section (outside usage_rules blocks) | -| Production infra change | `production-infrastructure.md`; `error-investigation/SKILL.md` if monitoring changes | -| Dependency category added/removed | `update-dependencies/SKILL.md` — workflow steps | -| Skill added or removed | This file — update the table above | +| Code Change | Skills to Check | +| ---------------------------------- | ------------------------------------------------------------------------------------ | +| New/removed Oban worker | `oban-worker/SKILL.md` — worker tables (On-Demand, Cron), queue assignments | +| Queue configuration change | `oban-worker/SKILL.md` — Queues table | +| New/removed Oban plugin | `oban-worker/SKILL.md` — Plugins table | +| New/removed API integration | `external-api-integration/SKILL.md` — Rate limit intervals, fixture modules list | +| Rate limit interval change | `external-api-integration/SKILL.md` — Intervals table, `architecture.md` | +| New/removed API fixture module | `external-api-integration/SKILL.md` — Available API Fixture Modules table | +| New test fixture module | `testing/SKILL.md` — Available fixture modules table | +| New SQL pattern becomes convention | `sqlite-optimization/SKILL.md` — add to patterns/anti-patterns | +| New LiveView or LiveComponent | `architecture.md` — LiveViews / LiveComponents tables | +| New/removed schema or context | `architecture.md` — Schemas / Contexts tables | +| New/renamed module (any) | `architecture.md` — relevant section | +| Route changes | `architecture.md` — Router Structure | +| PubSub topic changes | `architecture.md` — PubSub Topics table | +| New/removed JS hook or event | `architecture.md` — JS Hooks / JS Event Listeners tables | +| Testing convention change | `testing/SKILL.md` — relevant section; `project-conventions.md` | +| Commit convention change | `git-commit/SKILL.md` — relevant section; `project-conventions.md` | +| UI convention change | `ui-framework/SKILL.md` — relevant section (outside usage_rules blocks) | +| Production infra change | `production-infrastructure.md`; `error-investigation/SKILL.md` if monitoring changes | +| Dependency category added/removed | `update-dependencies/SKILL.md` — workflow steps | +| Skill added or removed | This file — update the table above | ### Skill Update Workflow diff --git a/.pi/settings.json b/.pi/settings.json index 03ae0d67..90629c4a 100644 --- a/.pi/settings.json +++ b/.pi/settings.json @@ -1,4 +1,5 @@ { - "skills": ["../.claude/skills"], - "packages": ["npm:pi-mcp-adapter"] + "packages": [ + "npm:pi-mcp-adapter" + ] } diff --git a/docs/project-conventions.md b/docs/project-conventions.md index 5c854cc5..7703448b 100644 --- a/docs/project-conventions.md +++ b/docs/project-conventions.md @@ -1,10 +1,10 @@ # Project Conventions -Rules extracted from commit history that are specific to this project and not already covered by `CLAUDE.md` usage rules. +Rules extracted from commit history that are specific to this project and not already covered by `AGENTS.md` usage rules. ## Commit Messages -→ See `.claude/skills/git-commit/SKILL.md` for full conventions, checklist, and examples. +→ See `.agents/skills/git-commit/SKILL.md` for full conventions, checklist, and examples. Key rules: imperative present tense, single-line under 60 characters, task ID prefix when the work maps to a Backlog.md task, "Update dependencies" for mix and "Update npm dependencies" for npm, never "Co-Authored-By". @@ -41,25 +41,25 @@ Key rules: imperative present tense, single-line under 60 characters, task ID pr ## Template / UI -→ See `.claude/skills/ui-framework/SKILL.md` for full conventions, component patterns, and Fluxon reference. +→ See `.agents/skills/ui-framework/SKILL.md` for full conventions, component patterns, and Fluxon reference. Key rules: Gettext wraps ALL user-facing strings, dark mode always paired (`text-zinc-900 dark:text-zinc-100`), wishlisted items dimmed (`opacity-60`), icons use `icon` class, artist names use MusicBrainz `joinphrase`, charts use CSS Grid (not SVG). ## Routes / Navigation -→ See `.claude/skills/ui-framework/SKILL.md` for full route patterns. +→ See `.agents/skills/ui-framework/SKILL.md` for full route patterns. Key rules: three routes per resource with show modals, modals close via `JS.patch`, search state in URL query params, empty params filtered from URLs, conditional links based on `purchased_at`, `/dev/` namespace for developer tooling only. ## Database -→ See `.claude/skills/sqlite-optimization/SKILL.md` for full query patterns, index rules, FTS5 conventions, and migration requirements. +→ See `.agents/skills/sqlite-optimization/SKILL.md` for full query patterns, index rules, FTS5 conventions, and migration requirements. Key rules: `json_extract()` must match expression index text exactly, subquery materialization via `limit: -1`, correlated scalar subqueries beat `LEFT JOIN` for small-LIMIT enrichment, every migration provides both `up` and `down` SQL, config-driven constants in `config/config.exs`. ## Error Handling -→ See `.claude/skills/error-investigation/SKILL.md` for production error triage, `.claude/skills/external-api-integration/SKILL.md` for ErrorResponse/ErrorHandler patterns, and `.claude/skills/oban-worker/SKILL.md` for worker return values. +→ See `.agents/skills/error-investigation/SKILL.md` for production error triage, `.agents/skills/external-api-integration/SKILL.md` for ErrorResponse/ErrorHandler patterns, and `.agents/skills/oban-worker/SKILL.md` for worker return values. - **Toast notifications:** `put_toast/3` (arity 3) in LiveViews, `put_toast!/2` (arity 2) in LiveComponents. `:info` for success, `:error` for failures. - **User-facing error reasons use `ErrorMessages.friendly_message/1`** — never `inspect(reason)`. Call sites keep their contextual prefix and append `": " <> ErrorMessages.friendly_message(reason)`. `Logger.error` calls keep `inspect` for debugging. @@ -69,7 +69,7 @@ Key rules: `json_extract()` must match expression index text exactly, subquery m ## Testing -→ See `.claude/skills/testing/SKILL.md` for full conventions, fixture modules, and SQLite/Swoosh/Worker test patterns. +→ See `.agents/skills/testing/SKILL.md` for full conventions, fixture modules, and SQLite/Swoosh/Worker test patterns. Key rules: feature setup stays in test modules that need it, fixture modules use `System.unique_integer([:positive])`, assert specific values not just shapes, error assertions match specific error types, worker tests must `assert_enqueued`, no boilerplate-only tests. diff --git a/mix.exs b/mix.exs index 75d75227..91c0a09d 100644 --- a/mix.exs +++ b/mix.exs @@ -224,7 +224,7 @@ defmodule MusicLibrary.MixProject do {:mdex, link: :at} ], skills: [ - location: ".claude/skills", + location: ".agents/skills", build: [ "ui-framework": [ description: