agentleFS
localtaskrepolocaltaskrepo/lotar/.github/skills/api-contract-change-end-to-end/SKILL.md

api-contract-change-end-to-end

Skill2 starsChanged 34 days agoMITView on GitHub

Use this when changing REST endpoints so Rust DTOs, UI DTOs, OpenAPI, and docs stay in sync.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update Rust contract types

    line 15
  2. Very specific:

    If you adjust validation/errors, keep behavior consistent with existing API error shapes (crates/lotar-core/src/errors.rs).

    line 17
  3. Distinctive:

    Update UI types + API client

    line 19
  4. Distinctive:

    Update OpenAPI + help docs

    line 23
  5. Very specific:

    If it’s user-visible, update relevant guides under docs/help/* (often docs/help/api-quick-reference.md, plus the feature-specific page).

    line 25
  6. Distinctive:

    Verify with targeted behavior checks, then the final gates in AGENTS.md.

    line 32
  7. Very specific:

    Treat this repo as “contract-synchronized”: changing just one of Rust/UI/OpenAPI will likely break users or tests.

    line 38
  8. Distinctive:

    Prefer incremental changes that preserve backwards compatibility for existing clients when practical.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Goal

Make API changes once, but keep all consumers consistent (CLI/server, UI, docs).

Checklist

  1. Locate the endpoint
  • Routing/handlers: crates/lotar-lib/src/routes/, crates/lotar-lib/src/api_server.rs, crates/lotar-lib/src/web_server.rs
  1. Update Rust contract types
  • DTOs: crates/lotar-core/src/api_types.rs
  • If you adjust validation/errors, keep behavior consistent with existing API error shapes (crates/lotar-core/src/errors.rs).
  1. Update UI types + API client
  • DTOs: view/api/types.ts (explicit note at top: aligned with crates/lotar-core/src/api_types.rs)
  • Calls: view/api/client.ts
  1. Update OpenAPI + help docs
  • REST schema: docs/openapi.json
  • If it’s user-visible, update relevant guides under docs/help/* (often docs/help/api-quick-reference.md, plus the feature-specific page).
  1. Add/adjust tests
  • Rust behavior: crates/lotar-lib/tests/*.rs (integration-heavy, many use assert_cmd).
  • UI behavior: npm run test:ui (Vitest).
  • Cross-cutting behavior: consider adding/updating smoke coverage under smoke/tests/.
  1. Verify with targeted behavior checks, then the final gates in AGENTS.md. Use testing-strategy for targeting and low-noise output.

Notes

  • Treat this repo as “contract-synchronized”: changing just one of Rust/UI/OpenAPI will likely break users or tests.
  • Prefer incremental changes that preserve backwards compatibility for existing clients when practical.

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.