Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion claude/agents/dependency-audit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
name: dependency-audit
description: Audits changes to dependency declarations under `buildSrc/src/main/kotlin/io/spine/dependency/` — catches accidental version downgrades, BOM mismatches, missing deprecation markers, copyright drift, and convention drift. Use proactively whenever a diff touches that directory, or when the user asks "audit this dependency bump". Read-only; does not run builds.
description: >
Audits changes to dependency declarations under
`buildSrc/src/main/kotlin/io/spine/dependency/` — catches accidental
version downgrades, BOM mismatches, missing deprecation markers, copyright
drift, and convention drift. Use proactively whenever a diff touches that
directory, or when the user asks "audit this dependency bump". Read-only;
does not run builds.
tools: Read, Grep, Glob, Bash
model: claude-haiku-4-5-20251001
---
Expand Down
10 changes: 9 additions & 1 deletion claude/agents/kotlin-engineer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
name: kotlin-engineer
description: Reviews Kotlin changes against Kotlin 2.x language and design standards — coroutine-safety, Flow correctness, null-safety, and idiomatic API design that LLMs frequently get wrong. Pairs with the `spine-code-review` agent (which owns repo-specific rules) and takes priority on general Kotlin standards. Use proactively when reviewing Kotlin, before opening a PR, or when the user asks for a Kotlin review. Read-only; does not edit files or run builds. (For writing or refactoring Kotlin in the main session, use the `kotlin-engineer` skill directly.)
description: >
Reviews Kotlin changes against Kotlin 2.x language and design standards —
coroutine-safety, Flow correctness, null-safety, and idiomatic API design
that LLMs frequently get wrong. Pairs with the `spine-code-review` agent
(which owns repo-specific rules) and takes priority on general Kotlin
standards. Use proactively when reviewing Kotlin, before opening a PR, or
when the user asks for a Kotlin review. Read-only; does not edit files or
run builds. (For writing or refactoring Kotlin in the main session, use
the `kotlin-engineer` skill directly.)
tools: Read, Grep, Glob, Bash
model: inherit
---
Expand Down
7 changes: 6 additions & 1 deletion claude/agents/review-docs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
name: review-docs
description: Reviews documentation changes — KDoc/Javadoc inside Kotlin/Java sources and Markdown docs (`README.md`, `docs/**`, `.agents/**`) — against Spine documentation conventions. Use proactively when a diff touches doc comments or Markdown, before opening a doc-affecting PR, or when the user asks for a documentation review. Read-only; does not run builds.
description: >
Reviews documentation changes — KDoc/Javadoc inside Kotlin/Java sources
and Markdown docs (`README.md`, `docs/**`, `.agents/**`) — against Spine
documentation conventions. Use proactively when a diff touches doc
comments or Markdown, before opening a doc-affecting PR, or when the user
asks for a documentation review. Read-only; does not run builds.
tools: Read, Grep, Glob, Bash
model: inherit
---
Expand Down
8 changes: 7 additions & 1 deletion claude/agents/spine-code-review.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
name: spine-code-review
description: Reviews Kotlin, Java, and build changes against repo-specific Spine rules — the AGENTS.md code-review filter, safety rules, testing policy, and version gate. Defers general Kotlin language, coroutine/Flow, null-safety, and API-design standards to the `kotlin-engineer` agent. Use proactively after any non-trivial code edit, before opening a PR, or when the user asks for a code review. Read-only; does not run builds.
description: >
Reviews Kotlin, Java, and build changes against repo-specific Spine rules
— the AGENTS.md code-review filter, safety rules, testing policy, and
version gate. Defers general Kotlin language, coroutine/Flow, null-safety,
and API-design standards to the `kotlin-engineer` agent. Use proactively
after any non-trivial code edit, before opening a PR, or when the user
asks for a code review. Read-only; does not run builds.
tools: Read, Grep, Glob, Bash
model: inherit
---
Expand Down
6 changes: 4 additions & 2 deletions claude/commands/bump-gradle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Upgrade the Gradle wrapper to the latest release.
description: >
Comment thread
alexander-yevsyukov marked this conversation as resolved.
Upgrade the Gradle wrapper to the latest release.
argument-hint: "[gradle-version]"
allowed-tools: Read, Edit, Bash(./gradlew:*), Bash(git status:*), Bash(git diff:*), WebFetch
---
Expand All @@ -8,6 +9,7 @@ Follow the `bump-gradle` skill exactly:

- Skill: `.agents/skills/bump-gradle/SKILL.md`
- Read the skill first.
- Use https://docs.gradle.org/current/release-notes.html as the source of truth for the latest version. Do NOT rely on remembered Gradle versions.
- Use https://docs.gradle.org/current/release-notes.html as the source of
truth for the latest version. Do NOT rely on remembered Gradle versions.
- If the user supplied a version: $ARGUMENTS, use it; otherwise read it from the release notes.
- Commit the wrapper change and dependency report change in separate commits per the skill.
7 changes: 5 additions & 2 deletions claude/commands/bump-version.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
description: Bump the project version in version.gradle.kts per Spine SDK versioning policy.
description: >
Bump the project version in version.gradle.kts per Spine SDK versioning
policy.
argument-hint: "[snapshot|minor|major]"
allowed-tools: Read, Edit, Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(./gradlew:*)
---

Follow the `bump-version` skill exactly:

- Skill: `.agents/skills/bump-version/SKILL.md`
- Read the skill first; it owns the policy (snapshot numbering, version conflicts, rebuilding reports).
- Read the skill first; it owns the policy (snapshot numbering, version
conflicts, rebuilding reports).
- Increment requested by the user: $ARGUMENTS (treat as "snapshot" if empty).
- Inspect `git status --short` before editing; preserve unrelated user changes.
- Stop and ask the user before committing.
12 changes: 9 additions & 3 deletions claude/commands/dependency-update.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Refresh external dependency versions in buildSrc to their latest non-snapshot release.
description: >
Refresh external dependency versions in buildSrc to their latest
non-snapshot release.
argument-hint: "[--dry-run] [paths...]"
allowed-tools: Read, Edit, Write, Grep, Glob, WebFetch, Bash(git status:*), Bash(git diff:*), Bash(./gradlew build:*), Bash(./gradlew clean build:*)
---
Expand All @@ -9,8 +11,12 @@ Follow the `dependency-update` skill exactly:
- Skill: `.agents/skills/dependency-update/SKILL.md`
- Scope / flags: $ARGUMENTS
- Walk every dependency object under `buildSrc/src/main/kotlin/io/spine/dependency/`.
- Source of truth per artifact: the URL in the file's comment (line `// https://...` or KDoc `@see`). If no URL, fall back to Maven Central AND back-fill the URL comment.
- Source of truth per artifact: the URL in the file's comment (line
`// https://...` or KDoc `@see`). If no URL, fall back to Maven Central
AND back-fill the URL comment.
- Filter out snapshots, RCs, alphas, betas, milestones, EAPs, and `-dev` builds.
- Apply the edit. Do NOT commit; emit the report described in the skill.
- Flag `local/` (Spine SDK) updates separately so the user can decide whether to bump in lockstep.
- After the run, suggest the user review the diff and run `./gradlew build` (or `./gradlew clean build` if proto files participate). For `local/` bumps, suggest `./gradlew buildDependants`.
- After the run, suggest the user review the diff and run `./gradlew build`
(or `./gradlew clean build` if proto files participate). For `local/`
bumps, suggest `./gradlew buildDependants`.
7 changes: 5 additions & 2 deletions claude/commands/java-to-kotlin.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Convert Java files to idiomatic Kotlin, including Javadoc -> KDoc.
description: >
Convert Java files to idiomatic Kotlin, including Javadoc -> KDoc.
argument-hint: "<path-to-java-file-or-dir>"
allowed-tools: Read, Edit, Write, Bash(./gradlew:*), Bash(git status:*), Grep, Glob
---
Expand All @@ -8,6 +9,8 @@ Follow the `java-to-kotlin` skill exactly:

- Skill: `.agents/skills/java-to-kotlin/SKILL.md`
- Target: $ARGUMENTS
- Preserve behavior. Convert Javadoc to KDoc, `@Nullable` to nullable Kotlin types, getters/setters to properties, static methods to companion objects or top-level functions.
- Preserve behavior. Convert Javadoc to KDoc, `@Nullable` to nullable Kotlin
types, getters/setters to properties, static methods to companion objects
or top-level functions.
- After each file, run `./gradlew compileKotlin` (or the relevant module's compile task) to verify.
- Honor `.agents/guidelines/coding.md` for Kotlin idioms.
8 changes: 6 additions & 2 deletions claude/commands/move-files.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Move or rename files/directories, updating all references and build metadata.
description: >
Move or rename files/directories, updating all references and build
metadata.
argument-hint: "<source> <destination>"
allowed-tools: Read, Edit, Bash(git mv:*), Bash(git status:*), Bash(git ls-files:*), Grep, Glob
---
Expand All @@ -8,5 +10,7 @@ Follow the `move-files` skill exactly:

- Skill: `.agents/skills/move-files/SKILL.md`
- Operation: $ARGUMENTS
- Preflight (run `git status --short`, classify scope) -> Search for all old identifiers -> Move with `git mv` -> Repair references (imports, build metadata, docs) -> Verify.
- Preflight (run `git status --short`, classify scope) -> Search for all old
identifiers -> Move with `git mv` -> Repair references (imports, build
metadata, docs) -> Verify.
- Report: Moved[], UpdatedRefs[], Verification[], Risks[].
4 changes: 3 additions & 1 deletion claude/commands/pre-pr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Run the applicable pre-PR checklist (version gate, build/check, reviewers) and write a sentinel so `gh pr create` is unblocked.
description: >
Run the applicable pre-PR checklist (version gate, build/check, reviewers)
and write a sentinel so `gh pr create` is unblocked.
argument-hint: "[base-ref]"
allowed-tools: Read, Write, Grep, Glob, Agent, Bash
---
Expand Down
4 changes: 3 additions & 1 deletion claude/commands/raise-coverage.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Ensure the repo is on Kover (migrate from JaCoCo if needed), then localize coverage gaps and generate missing unit tests for a module or path.
description: >
Ensure the repo is on Kover (migrate from JaCoCo if needed), then localize
coverage gaps and generate missing unit tests for a module or path.
argument-hint: "<:module | path | --triage>"
allowed-tools: Read, Edit, Write, Grep, Glob, Bash(./gradlew:*), Bash(git status:*), Bash(find:*), Bash(xmllint:*), Bash(python3:*)
---
Expand Down
4 changes: 3 additions & 1 deletion claude/commands/review-docs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Review documentation changes (KDoc/Javadoc and Markdown) against Spine documentation conventions.
description: >
Review documentation changes (KDoc/Javadoc and Markdown) against Spine
documentation conventions.
argument-hint: "[base-ref | --staged | paths...]"
allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(git rev-parse:*), Bash(git ls-files:*)
---
Expand Down
10 changes: 7 additions & 3 deletions claude/commands/run-build.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
description: Build the project the right way based on what changed (proto vs. Kotlin/Java vs. docs).
description: >
Build the project the right way based on what changed
(proto vs. Kotlin/Java vs. docs).
allowed-tools: Bash(./gradlew:*), Bash(git status:*), Bash(git diff:*)
---

Decide which build to run by looking at `git status --short` and `git diff --name-only`:

- If any `.proto` files changed: `./gradlew clean build`
- Else if Kotlin/Java **code** changed (use `git diff` to confirm it is not comments only): `./gradlew build`
- Else if only KDoc/Javadoc in `.kt`/`.java` changed (doc-only source edit): `./gradlew dokkaGenerate` (no build, no tests)
- Else if Kotlin/Java **code** changed (use `git diff` to confirm it is not
comments only): `./gradlew build`
- Else if only KDoc/Javadoc in `.kt`/`.java` changed (doc-only source edit):
`./gradlew dokkaGenerate` (no build, no tests)
- Else if only Markdown / non-source docs changed: no Gradle build needed.

Then append `dokkaGenerate` to a *build* command whenever a `.kt`/`.java` source
Expand Down
7 changes: 5 additions & 2 deletions claude/commands/update-copyright.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Refresh copyright headers from the IntelliJ profile, replacing today.year with the current year.
description: >
Refresh copyright headers from the IntelliJ profile, replacing today.year
with the current year.
argument-hint: "[paths...]"
allowed-tools: Bash(python3 .agents/skills/update-copyright/scripts/update_copyright.py:*), Read
---
Expand All @@ -8,5 +10,6 @@ Follow the `update-copyright` skill exactly:

- Skill: `.agents/skills/update-copyright/SKILL.md`
- Run: `python3 .agents/skills/update-copyright/scripts/update_copyright.py $ARGUMENTS`
- If $ARGUMENTS is empty, run once with `--dry-run`, show the output to the user, then run without `--dry-run`.
- If $ARGUMENTS is empty, run once with `--dry-run`, show the output to the
user, then run without `--dry-run`.
- Never add a header to a file that doesn't already have one.
7 changes: 5 additions & 2 deletions claude/commands/write-docs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Write or update Markdown / KDoc documentation per Spine documentation conventions.
description: >
Write or update Markdown / KDoc documentation per Spine
documentation conventions.
argument-hint: "<topic or file path>"
allowed-tools: Read, Edit, Write, Grep, Glob
---
Expand All @@ -10,5 +12,6 @@ Follow the `writer` skill exactly:
- Topic / target: $ARGUMENTS
- Decide audience first (end user, contributor, maintainer, tooling).
- Prefer updating an existing doc over creating a new one.
- Keep `docs/data/docs/<section>/<version>/sidenav.yml` in sync when adding, removing, moving, or renaming pages under `docs/content/docs/<section>/`.
- Keep `docs/data/docs/<section>/<version>/sidenav.yml` in sync when adding,
removing, moving, or renaming pages under `docs/content/docs/<section>/`.
- Honor `.agents/guidelines/documentation.md` and `.agents/guidelines/documentation-tasks.md`.
26 changes: 26 additions & 0 deletions docs/authoring-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Frontmatter followed by the body:

Rules:

- Write the `description:` as shown — a `>` folded scalar, even when the text
would fit on one line — and wrap its lines near 80 columns (the hard limit
is 100, per `.agents/guidelines/coding.md`).
- Keep `SKILL.md` under ~500 lines; move long material into `references/` and link
to it.
- Reference shared guidance with **repo-rooted** paths
Expand All @@ -73,6 +76,25 @@ Rules:

Keep `default_prompt` short and aligned with the `SKILL.md` description.

## Claude wrapper frontmatter

Wrappers under `claude/commands/` and `claude/agents/` are Markdown, so the
100-character line limit from `.agents/guidelines/coding.md` applies to them
(see `.agents/guidelines/documentation.md`). Two conventions follow:

- **Always write `description:` as a `>` block scalar** — even when the text
would fit on one line — wrapping its lines near 80 columns, the same idiom
`skills/*/SKILL.md` files use. YAML folds the lines back into a single-line
string, so wrapping never changes the wording that drives command or agent
dispatch, and the uniform shape keeps a later edit from drifting past the
100-character limit.
- **Keep `allowed-tools:` on one line, however long** — the field is exempt
from the line-length limit (likewise an agent's `tools:` field). Its value
is machine-consumed as permission rules, and the Claude Code documentation
defines no format for it beyond single-line examples, so a folded scalar is
not confirmed to parse identically. `master` floats to every consumer
repository; do not re-wrap the field on an unverified assumption.

## Scripts & copyright

Put a skill's own helpers in `skills/<name>/scripts/`; promote a helper to the
Expand All @@ -86,6 +108,10 @@ rely only on the standard library so they run without extra installs.
- Directory name == frontmatter `name`.
- `description` < 1024 characters; `SKILL.md` < ~500 lines.
- `agents/openai.yaml` present, with a `$<name>` `default_prompt`.
- Skill files and Claude wrappers stay within the 100-character line limit;
only `allowed-tools:`/`tools:` lines are exempt, and every `description:`
is a `>` block scalar wrapped near 80 columns (see "Claude wrapper
frontmatter").
- Every `.agents/...` reference resolves (check through the in-repo symlinks).
- No skill file references a task plan:
`grep -rnE '(^|[^[:alnum:]])(\.agents/)?tasks/' skills/<name>/` returns nothing
Expand Down