External API Contract Inventory Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.
Goal: Upgrade docs/endpoint-inventory/external-api-endpoints.md into the canonical self-contained contract inventory for all implemented external API endpoints, remove obsolete docs/response-sources/*.md, and leave MDX endpoint pages unchanged for now.
Architecture: Treat docs/endpoint-inventory/external-api-endpoints.md as the single Phase 1 source of truth. Extract method/path/auth/request/response/error details directly from the live external API controllers, DTOs, services, mappers, and runtime auth/error code in the sibling backend repo, then rewrite the inventory into one summary table plus 17 detailed endpoint sections. Do not use tests as documentation evidence, and do not touch api-reference/**/*.mdx in this phase.
Tech Stack: Markdown docs, Mintlify docs repo structure, NestJS controllers/DTOs/services/mappers as source of truth, ripgrep verification, git diff review
Task 1: Map the implemented external API surface
Files:-
Modify:
docs/endpoint-inventory/external-api-endpoints.md -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-events.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-exhibitors.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-personnel.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-contacts.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-profile-matching.controller.ts - Step 1: Confirm the exact implemented route list from the five controllers
external/* controller groups and handler decorators are listed
- Step 2: Keep the summary table at the top of the inventory, but prepare to replace the old thin notes with detailed contract sections
- Step 3: Verify the route count still matches 17 before writing detailed sections
17
Task 2: Extract shared auth and error contract once
Files:-
Modify:
docs/endpoint-inventory/external-api-endpoints.md -
Read only:
../a60-lensmor-event-business/src/modules/external-api/guards/api-key-only.guard.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/external-api-auth.middleware.ts -
Read only:
../a60-lensmor-event-business/src/common/filters/all-exceptions.filter.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/filters/external-api-exception.filter.ts - Step 1: Document the shared auth rules in the inventory’s shared runtime section
docs/endpoint-inventory/external-api-endpoints.md:
- Step 2: Verify the auth token prefix and bearer parsing from runtime code, not tests
- Step 3: Verify the external error response envelope from runtime code, not tests
Task 3: Expand the Events endpoint contracts in the inventory
Files:-
Modify:
docs/endpoint-inventory/external-api-endpoints.md -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-events.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/events/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/common/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/services/external-events.service.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/mappers/external-event-response.mapper.ts - Step 1: Add detailed sections for the five Events endpoints below the summary table
Error responses
401 Unauthorized
Notes
- Add route-specific runtime caveats only.
- Step 3: Capture route-specific caveats in Notes where the runtime behavior is easy to misunderstand
Task 4: Expand the Exhibitors endpoint contracts in the inventory
Files:-
Modify:
docs/endpoint-inventory/external-api-endpoints.md -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-exhibitors.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/exhibitors/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/common/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/services/external-exhibitors.service.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/mappers/*.ts - Step 1: Add detailed sections for all six Exhibitors endpoints
- Step 2: Document body/query structures and nested response item fields for each Exhibitors route
- Step 3: Preserve the important runtime Notes for exhibitor responses when still true in code
Task 5: Expand the Personnel, Contacts, and Profile Matching contracts in the inventory
Files:-
Modify:
docs/endpoint-inventory/external-api-endpoints.md -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-personnel.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-contacts.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/controllers/external-profile-matching.controller.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/personnel/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/contacts/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/dto/profile-matching/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/services/*.ts -
Read only:
../a60-lensmor-event-business/src/modules/external-api/mappers/*.ts - Step 1: Add detailed sections for the remaining six endpoints
- Step 2: Document each route’s path/query/body contract and detailed response fields
- Step 3: Add Notes for identifier aliasing, paged recommendation metadata, and any route-specific runtime caveats
Task 6: Remove obsolete response-sources documents
Files:-
Delete:
docs/response-sources/events.md -
Delete:
docs/response-sources/exhibitors.md -
Delete:
docs/response-sources/personnel-and-contacts.md -
Delete:
docs/response-sources/profile-matching.md - Step 1: Delete the four obsolete source-tracing markdown files
- Step 2: Verify the deleted files are not still referenced anywhere in the docs repo
- Step 3: Confirm no MDX files were changed during Phase 1
Task 7: Verify the rewritten inventory before handoff
Files:-
Verify only:
docs/endpoint-inventory/external-api-endpoints.md - Step 1: Verify every implemented route appears exactly once in the detailed sections
17 detailed endpoint headings
- Step 2: Verify the inventory documents request and response sections consistently
- Step 3: Review the final diff to ensure this phase is inventory-only and self-contained