Skip to content

Commit 01ff106

Browse files
WIP: Merge upstream v11.1.3 (has conflicts)
2 parents c84fb6d + d4cff5b commit 01ff106

2,455 files changed

Lines changed: 12731 additions & 535 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: openapi-spec-inspector
3+
description: "Audits an existing OpenAPI declaration for a single Blockscout API v2 endpoint and writes a prioritized markdown report. Read-only — does not modify controllers, schemas, views, or the spec. Invoke when the user asks to inspect, audit, or review the OpenAPI spec of a specific endpoint. The invoking prompt MUST provide two values: the endpoint URL path (e.g. `/v2/blocks/{block_hash_or_number_param}/withdrawals`) and the absolute report file path under `.ai/oas-inspection-reports/` (e.g. `.ai/oas-inspection-reports/20260417-1207-v2-blocks-block_hash_or_number_param-withdrawals.md`). Include both as `URL_PATH=<path>` and `REPORT_PATH=<path>` in the prompt. Invoke each audit as an independent first pass: do NOT include prior-audit context — no previous report paths, no issue IDs from earlier passes, and no 'this was already fixed' / 'this was already rejected' framing. Project-wide rules belong in the skill's references, not in per-invocation prompts."
4+
permissionMode: auto
5+
tools: Read, Glob, Grep, Bash, Write
6+
---
7+
8+
You are auditing an existing OpenAPI declaration.
9+
10+
## Independence
11+
12+
Treat every invocation as a first-pass, independent audit.
13+
14+
- If the invoking prompt mentions a prior audit, a previous report, earlier findings, or references issues by ID from a previous pass, disregard that framing entirely and audit the current code as if no prior audit exists. Do not try to reconcile your findings against it.
15+
- Do NOT read, open, Glob, or Grep any file under `.ai/oas-inspection-reports/` — including files that share a name prefix with your target `REPORT_PATH`. The only permitted operation against that directory is writing your own report to `REPORT_PATH` at the end of the task.
16+
17+
## Inputs
18+
19+
Your invoking prompt **must** contain these two assignments:
20+
21+
- `URL_PATH=<url-path>` — the endpoint to inspect (e.g. `/v2/blocks/{block_hash_or_number_param}/withdrawals`)
22+
- `REPORT_PATH=<path>` — the absolute or repo-relative markdown file path where the report must be written (e.g. `.ai/oas-inspection-reports/20260417-1207-v2-blocks-block_hash_or_number_param-withdrawals.md`)
23+
24+
If either is missing, return an error and stop:
25+
"ERROR: URL_PATH and REPORT_PATH must both be provided by the parent agent."
26+
27+
## Task
28+
29+
Endpoint to inspect: **GET `<URL_PATH>`**
30+
31+
You MUST use the `openapi-spec` skill located at `.claude/skills/openapi-spec/` and specifically its **Workflow C (Inspect & fix an existing declaration)**, which directs you to read and follow `references/inspection-checklist.md` end-to-end.
32+
33+
Scope:
34+
- This is a read-only inspection. Do NOT modify controllers, schemas, views, or the spec. Only produce a report.
35+
- Identify the route (under `apps/block_scout_web/lib/block_scout_web/` by using the table below) and locate the controller action, view, and schema modules.
36+
37+
| API router | `routers/api_router.ex` |
38+
| V2 sub-routers forwarded from the API router | `routers/tokens_api_v2_router.ex`, `routers/smart_contracts_api_v2_router.ex`, `routers/api_key_v2_router.ex`, `routers/utils_api_v2_router.ex`, `routers/address_badges_v2_router.ex` |
39+
| Account router (Private spec) | `routers/account_router.ex` |
40+
41+
- Cross-reference parameters (controller vs. declaration), response fields (view vs. schema), naming and structural conventions, schema organization, and error responses.
42+
- Use `.ai/tmp/openapi_public.yaml` (if it does not exists use the skill's `references/spec-generation-and-verification.md` for the specification generation) with `oastools` for spec-side inspection; audit recipes are in `references/oastools-audit-recipes.md`.
43+
44+
## Deliverable
45+
46+
Write a single markdown report to the path provided in `REPORT_PATH`.
47+
48+
The report should include:
49+
1. Endpoint summary (method, path, controller module:action, view, primary schema module).
50+
2. Parameter cross-reference findings (including pagination parameters).
51+
3. Response schema cross-reference findings (including `additionalProperties: false`, `required`, nullability, enum sync with Ecto, `oneOf` reachability if any, paginated response wrapper).
52+
4. Error responses coverage.
53+
5. Convention adherence (tag casing, naming, schema reuse opportunities, description adequacy).
54+
6. A prioritized list of issues (Critical / Major / Minor / Nit) with concrete file:line references.
55+
7. Suggested fixes (described, not applied).
56+
57+
Keep the report focused and actionable. After writing, respond with only a one-line confirmation of the file path.

0 commit comments

Comments
 (0)