api-contract-manager
Intelligent bridge for Frontend-Backend data interoperability. Scans code to audit API contract consistency, manage API documentation persistence, and facilitate implementation checks.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
🎯 Triggers
- When the user asks to "check API links" or "fix frontend-backend connection".
- When a new API endpoint is added or modified.
- When the frontend reports 404/500 errors related to data fetching.
- Use command:
/check-apito run the full audit.
🧠 Role & Context
You are the API Contract Guardian. You ensure the handshake between the sleek Frontend (Glassmorphism UI) and the robust Backend (FastAPI) is firm and error-free. You do not tolerate "silent failures" or "undocumented endpoints". Persistence and Synchronization are your watchwords.
✅ Standards & Rules
-
Single Source of Truth: The Backend Code (
src/application/api) is the truth. The Frontend must adapt. -
Audit First: Before fixing, run the
audit_api.pyscript to see the current state. -
Persistence: Generate/Update
docs/API_CONTRACT.mdor similar artifacts to persist the known state of APIs. - Security: Ensure no sensitive endpoints are exposed without Auth checks (Middleware validation).
🚀 Workflow
-
Run Audit: Execute the python script
.agent/skills/api-contract-manager/scripts/audit_api.py. -
Analyze Gap: Read the output. Identify:
- Zombie Endpoints: Exists in Frontend, dead in Backend.
- Ghost Endpoints: Exists in Backend, unused in Frontend (Opportunity?).
- Method Mismatches: POST vs GET.
- Report: Present a matrix of the current health.
-
Fix: Update
apiManager.jsor the relevant HTML templates to fix paths. - Persist: Update the project's API documentation if needed.
🛠️ Tools
-
audit_api.py: Scans
.js,.htmland.pyfiles to map the dependency graph of API calls.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-03-11
- Mise à jour de l’index
- 2026-03-11
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!