agentleFS
jpicklykjpicklyk/task-orchestrator/.claude/skills/add-component/SKILL.md

add-component

Skill207 starsChanged 2 months agoMITView on GitHub

Checklists for adding a new MCP tool, a new Flyway database migration, or a new Gradle dependency to the Task Orchestrator server, including the tool-documentation single-source policy (parameterSchema field descriptions vs the prose description string vs api-reference.md). Use when adding or changing an MCP tool or its parameters, creating a migration, or adding a dependency to the version catalog.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update all three documentation surfaces (see below)

    line 15
  2. Very specific:

    Add a ToolTokenBudgetTest per-tool ceiling row for the new tool (see that test's "BUDGET PHILOSOPHY" doc comment for how to measure and set …

    line 16
  3. Very specific:

    Add tests in current/src/test/kotlin/io/github/jpicklyk/mcptask/current/application/tools/

    line 19
  4. Distinctive:

    Every tool has three documentation surfaces:

    line 23
  5. Very specific:

    Add/rename a param → update its parameterSchema field description and api-reference.md.

    line 48
  6. Distinctive:

    Remove a param → same, plus remove any prose mention if one existed

    line 50
  7. Very specific:

    Do NOT reintroduce per-field prose in description that merely restates what's already in parameterSchema — that's the duplication this …

    line 52
  8. Very specific:

    Create current/src/main/resources/db/migration/V{N}__{Description}.sql.

    line 56
  9. Very specific:

    Add to gradle/libs.versions.toml ([versions] + [libraries]), then reference as libs.{name} in build.gradle.kts.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adding New Components

Moved from the root CLAUDE.md so it loads only when needed. The single-source documentation policy summary stays in CLAUDE.md; this file is the full procedure.

New MCP Tool

  1. Extend BaseToolDefinition in current/src/main/kotlin/.../application/tools/
  2. Register in buildMcpTools() (CurrentMcpServer.kt) — ToolDocumentationConsistencyTest and ToolTokenBudgetTest derive their tool list from this function, so registering here is sufficient for both guard tests to pick up the new tool automatically
  3. Update all three documentation surfaces (see below)
  4. Add a ToolTokenBudgetTest per-tool ceiling row for the new tool (see that test's "BUDGET PHILOSOPHY" doc comment for how to measure and set it) — its sync check fails loudly if a row is missing
  5. Add tests in current/src/test/kotlin/io/github/jpicklyk/mcptask/current/application/tools/

Tool Documentation Surfaces — Single-Source Policy (post token-efficiency program)

Every tool has three documentation surfaces:

SurfaceLocationAudience
description stringIn the tool source fileLLMs — seen via tools/list
parameterSchemaIn the tool source fileMCP clients — drives validation
API referencecurrent/docs/api-reference.mdHumans

Single source of truth per parameter: each parameter is documented ONCE, in its own parameterSchema field description — not duplicated in the tool's prose description string. The prose description is reserved for what a flat JSON Schema cannot express: operation/mode enum selection, mode-selection rules, trigger effects (e.g. the trigger table in advance_item), gate semantics, and mutual-exclusion/XOR constraints across fields. This keeps the tools/list payload lean — the MCP Token-Efficiency Program cut the full tool payload substantially by removing exactly this kind of prose/schema duplication; ToolTokenBudgetTest guards the result going forward with per-tool ceilings rather than a single aggregate number.

CI guard: ToolDocumentationConsistencyTest asserts (1) every parameterSchema property has a non-blank field-level description, and (2) every operation/mode enum value is still named in the prose description (so callers can discover available operations without reading the full schema). It no longer requires every param name to appear in the prose description — that older policy is what produced the bloat this program removed. The api-reference.md surface is not machine-checked — update it manually alongside code changes.

When changing a tool's parameters:

  • Add/rename a param → update its parameterSchema field description and api-reference.md; touch the prose description only if the change affects mode-selection/trigger/gate semantics
  • Remove a param → same, plus remove any prose mention if one existed
  • Change required/optional status → update the field's own schema description and api-reference.md
  • Do NOT reintroduce per-field prose in description that merely restates what's already in parameterSchema — that's the duplication this program removed

New Database Migration

Create current/src/main/resources/db/migration/V{N}__{Description}.sql. SQLite has no ALTER COLUMN — schema changes require table recreation. New tables in DirectDatabaseSchemaManager must be inserted in foreign-key order.

New Gradle Dependency

Add to gradle/libs.versions.toml ([versions] + [libraries]), then reference as libs.{name} in build.gradle.kts. Check Maven Central for the latest version.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.