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.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- development-workflowSkill
- efficient-contextSkill
- instruction-maintenanceSkill
- local-dev-serve-troubleshootingSkill
- lotar-dev-trackingSkill
- releaseSkill
- review-handoffSkill
- skill-discoverySkill
- smoke-suite-debuggingSkill
- testing-strategySkill
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
- Distinctive: line 15
Update Rust contract types
- Very specific: line 17
If you adjust validation/errors, keep behavior consistent with existing API error shapes (crates/lotar-core/src/errors.rs).
- Distinctive: line 19
Update UI types + API client
- Distinctive: line 23
Update OpenAPI + help docs
- Very specific: line 25
If it’s user-visible, update relevant guides under docs/help/* (often docs/help/api-quick-reference.md, plus the feature-specific page).
- Distinctive: line 32
Verify with targeted behavior checks, then the final gates in AGENTS.md.
- Very specific: line 38
Treat this repo as “contract-synchronized”: changing just one of Rust/UI/OpenAPI will likely break users or tests.
- Distinctive: line 39
Prefer incremental changes that preserve backwards compatibility for existing clients when practical.
≈ “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.
Files
Goal
Make API changes once, but keep all consumers consistent (CLI/server, UI, docs).
Checklist
- Locate the endpoint
- Routing/handlers:
crates/lotar-lib/src/routes/,crates/lotar-lib/src/api_server.rs,crates/lotar-lib/src/web_server.rs
- 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).
- Update UI types + API client
- DTOs:
view/api/types.ts(explicit note at top: aligned withcrates/lotar-core/src/api_types.rs) - Calls:
view/api/client.ts
- Update OpenAPI + help docs
- REST schema:
docs/openapi.json - If it’s user-visible, update relevant guides under
docs/help/*(oftendocs/help/api-quick-reference.md, plus the feature-specific page).
- Add/adjust tests
- Rust behavior:
crates/lotar-lib/tests/*.rs(integration-heavy, many useassert_cmd). - UI behavior:
npm run test:ui(Vitest). - Cross-cutting behavior: consider adding/updating smoke coverage under
smoke/tests/.
- 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.
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
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.

