|
| 1 | +# AGENTS |
| 2 | + |
| 3 | +Instructions for future AI coding agents working in this repository. |
| 4 | + |
| 5 | +## Repository Overview |
| 6 | + |
| 7 | +- Core library: src/Fable.Remoting.OpenAPI |
| 8 | +- Giraffe adapter: src/Fable.Remoting.OpenAPI.Giraffe |
| 9 | +- Suave adapter: src/Fable.Remoting.OpenAPI.Suave |
| 10 | +- Main solution (development/test): Fable.Remoting.OpenApi.sln |
| 11 | +- Release solution (pack/publish): Release.sln |
| 12 | +- Integration playground: app |
| 13 | +- Core tests: tests/Fable.Remoting.OpenAPI |
| 14 | +- Adapter tests: tests/Fable.Remoting.OpenAPI.Adapters |
| 15 | + |
| 16 | +## Standard Commands |
| 17 | + |
| 18 | +- Restore workspace: |
| 19 | + - dotnet restore ./Fable.Remoting.OpenApi.sln |
| 20 | +- Build workspace: |
| 21 | + - dotnet build ./Fable.Remoting.OpenApi.sln --no-restore |
| 22 | +- Run tests: |
| 23 | + - dotnet test ./Fable.Remoting.OpenApi.sln |
| 24 | +- Restore release solution: |
| 25 | + - dotnet restore ./Release.sln |
| 26 | +- Pack release artifacts: |
| 27 | + - dotnet pack ./Release.sln -c Release --no-restore -o artifacts |
| 28 | + |
| 29 | +## Important Behavioral Contracts |
| 30 | + |
| 31 | +- OpenAPI generation should stay aligned with Fable.Remoting semantics: |
| 32 | + - Unit input endpoints map to GET. |
| 33 | + - Non-unit input endpoints map to POST. |
| 34 | + - Remoting request body shape is JSON array. |
| 35 | +- Route-builder integration must remain first-class: |
| 36 | + - OpenAPI.withDocs should follow active remoting route builder. |
| 37 | + - Default docs routes derive from route builder and API type name unless explicitly overridden. |
| 38 | + |
| 39 | +## Architecture Boundaries |
| 40 | + |
| 41 | +- Keep framework-specific HTTP handler code out of core library. |
| 42 | +- Core project should remain framework-agnostic and focused on: |
| 43 | + - metadata extraction |
| 44 | + - document model creation |
| 45 | + - deterministic rendering |
| 46 | +- Adapter projects own web framework composition helpers. |
| 47 | + |
| 48 | +## Test and Change Discipline |
| 49 | + |
| 50 | +- Add or update tests when behavior changes. |
| 51 | +- Prefer deterministic assertions for JSON/YAML output. |
| 52 | +- If changing route or transport semantics, update: |
| 53 | + - core tests |
| 54 | + - adapter tests |
| 55 | + - sample app docs links |
| 56 | + - README and CONTRIBUTING |
| 57 | + |
| 58 | +## CI Alignment |
| 59 | + |
| 60 | +- CI is solution-driven. Keep workflow commands targeting: |
| 61 | + - ./Fable.Remoting.OpenApi.sln for restore/build/test |
| 62 | + - ./Release.sln for restore/pack |
| 63 | +- Keep publish command using --skip-duplicate. |
| 64 | + |
| 65 | +## Safety Notes |
| 66 | + |
| 67 | +- Do not revert unrelated user changes in working tree. |
| 68 | +- Avoid introducing framework coupling into core project references. |
| 69 | +- Preserve package version compatibility across adapter and core projects. |
0 commit comments