Generate comprehensive API endpoint documentation from Bruno (.bru) files by mapping requests to a Django4Lyfe/Diversio-style backend implementation (Django REST Framework or Django Ninja), including auth/permissions, multi-tenant filtering, request/response schemas, and line-numbered code references. Use for single endpoints, directory scans of .bru files, or when writing docs to a specific output path.
This skill is limited to using the following tools:
This Skill expects one of:
*.bru), OR--scan <dir> to analyze all .bru files under a directory.Optional flags:
--dry-run – produce an analysis plan only (no deep codebase search).--output <path> – write the generated markdown documentation to a file.If inputs are missing or ambiguous, ask the user to confirm:
.bru file(s) to analyze.--dry-run or full documentation.Return a short plan containing:
Generate a single markdown document for each endpoint using this structure:
# <Endpoint Name><METHOD> <URL Pattern>## Overview## Request (headers + params/body with types/validation)## Response (success example + common error cases)## Implementation Details (URL config + view + serializer/schema; always with file.py:line)## Business Logic (step-by-step, include side effects like tasks/external calls)## Frontend Integration (TypeScript types + call example + React Query hook example)## Testing (Bruno tests + edge cases + required fixtures/data)## Notes (perf considerations, related endpoints, rollout notes)Use severity tags only when something prevents correctness/completeness:
[BLOCKING] – cannot locate the endpoint implementation or critical auth/permission logic.[SHOULD_FIX] – documentation gaps due to missing/incomplete source details (e.g., response shape unclear).[NOTE] – optional improvements, related endpoints, refactors, or performance observations.For each .bru file:
Treat these repo conventions as first-class when present:
/api/v2/:
dashboardapp/v2_urls.py.dashboardapp/views/v2/ for the view/viewset./api/v2/pulse/:
pulse_iq/api/ for Django Ninja routers/endpoints.urls.py modules for the path prefix.Grep for a distinctive path segment from the Bruno URL.Once the route is found, identify the implementation type:
list, retrieve, create, custom actions).Always record code references with line numbers (path/to/file.py:123).
For the located endpoint:
Write the markdown doc per “Full documentation output”.
Rules:
[SHOULD_FIX].--output and --scan--scan <dir>:
.bru files recursively under that directory.--output is provided, return docs in the response (grouped by file).--output <path> is provided: