Tighten FastAPI repo boundary guidance
This commit is contained in:
+9
-24
@@ -67,14 +67,6 @@ Good source notes are dense evidence, not polished guidance.
|
||||
### 4) Synthesize conventions from the strongest repeated signals
|
||||
Start with the topics where evidence is strongest.
|
||||
|
||||
In this repo that meant:
|
||||
- routes
|
||||
- dependencies
|
||||
- errors
|
||||
- testing
|
||||
- pydantic boundaries
|
||||
- persistence
|
||||
|
||||
Each convention doc should usually include:
|
||||
- the convention
|
||||
- why it exists
|
||||
@@ -100,14 +92,17 @@ Instead:
|
||||
- reduce duplicated guidance across docs
|
||||
- preserve subtle framework caveats that are easy to flatten away
|
||||
|
||||
That was the right next move for this repo once the first source base existed.
|
||||
## Handling mixed-concern source code
|
||||
|
||||
## Fresh-context refinement pattern
|
||||
Upstream service code will often mix FastAPI behavior, Pydantic boundary behavior, and ordinary Python design in the same function or line.
|
||||
|
||||
A good refinement split is:
|
||||
- one fresh pass over convention docs
|
||||
- one fresh pass over source-note files
|
||||
- one fresh pass doing citation audit across both
|
||||
When that happens:
|
||||
- do not classify the whole snippet by file name or repo alone
|
||||
- split the evidence into **framework-owned signal** and **generic Python signal**
|
||||
- keep the request/response, dependency, lifecycle, and HTTP-boundary lesson here
|
||||
- push reusable language-level guidance back to `python-patterns`
|
||||
|
||||
If the claim still makes full sense after removing FastAPI and HTTP, it is probably too generic to live here as a FastAPI convention.
|
||||
|
||||
## Review checklist
|
||||
|
||||
@@ -132,16 +127,6 @@ When the repo is ready for human review:
|
||||
|
||||
This repo intentionally avoids pushing or creating remotes unless explicitly requested.
|
||||
|
||||
## How to repeat this process next time
|
||||
|
||||
1. Define the scope split first.
|
||||
2. Pick a compact but high-signal upstream set.
|
||||
3. Build `sources/` before `patterns/`.
|
||||
4. Synthesize the strongest conventions first.
|
||||
5. Add comparison notes where the framework bends Python defaults.
|
||||
6. Run a fresh-context refinement wave.
|
||||
7. Initialize git only when the repo is reviewable.
|
||||
|
||||
## What to avoid
|
||||
|
||||
- documenting FastAPI from memory or tutorial vibes
|
||||
|
||||
Reference in New Issue
Block a user