| name | openapi-non-generated-only |
| description | Use when the user asks to modify code while avoiding generated files, OpenAPI generated code, asks do not touch generated files, or asks to fix npm run build / npm run test / npm run lint:all. Enforce edits only in non-generated files and always run lint, build, then test after each change. |
| user-invocable | true |
OpenAPI Non-Generated Only
Goal
Apply requested changes while editing only non-generated files.
Rules
- Never edit files generated by OpenAPI Generator.
- Treat a file as generated if at least one condition is true:
- It contains:
NOTE: This class is auto generated by OpenAPI Generator.
- It is in generated folders such as
src/api/ or src/model/.
- It is listed in
.openapi-generator/ metadata as generated output.
- Prefer editing wrapper or handwritten layers, for example:
src/core/**
src/upsun.ts
src/index.ts
tests/**
README.md and scripts/config when relevant
- If a fix appears to require generated files, do not edit them directly:
- Update non-generated adapters/types/tests first.
- If still blocked, ask for confirmation to regenerate from spec/templates.
- Preserve existing public API behavior unless the user explicitly asks for a breaking change.
- When the request is to fix npm run build, npm run test, or npm run lint:all, treat all three commands as required validation targets.
- After each modification batch, always run commands in this order:
- npm run lint:all
- npm run build
- npm run test
- Only proceed if all three pass, or report precisely what still fails.
Workflow
- Reproduce with all required commands:
- npm run lint:all
- npm run build
- npm run test
- Identify failing symbols and map renamed generated types/fields in handwritten files.
- Apply minimal patches in non-generated files only.
- After each modification batch, rerun all commands in order:
- npm run lint:all
- npm run build
- npm run test
- Report results and remaining failures, if any.
Response Contract
- Explicitly mention that only non-generated files were changed.
- List changed files.
- If blocked by generated code, explain the blocker and propose regeneration path.
Project Hint
In this repository, generated code is typically under src/api/ and src/model/.
Handwritten integration points are under src/core/ and tests/.