Skip to content

Update architecture docs to match the codebase#2856

Merged
michaeldwan merged 7 commits intomainfrom
md/update-architecture
Mar 23, 2026
Merged

Update architecture docs to match the codebase#2856
michaeldwan merged 7 commits intomainfrom
md/update-architecture

Conversation

@michaeldwan
Copy link
Copy Markdown
Member

@michaeldwan michaeldwan commented Mar 20, 2026

The architecture docs were written before the legacy Python runtime was removed and coglet became the sole runtime. They described a system that no longer exists.

This updates them to reflect reality and adds a skill for keeping them accurate as the code evolves.

…untime

The legacy Python/FastAPI runtime has been removed and coglet is the
only runtime. This updates the architecture docs to reflect that:

- Delete architecture/legacy/ and architecture/ffi/ subdirectories
- Create canonical 03-prediction-api.md and 04-container-runtime.md
- Fix false claim that wheels are embedded in the Go binary
- Fix pydantic claims (schema gen uses inspect + custom ADT dataclasses)
- Fix stale file references (base_predictor.py, pkg/api/, etc.)
- Mark static schema path as experimental
- Fix compatibility matrix filenames, Swagger UI ghost, cog.BaseModel name
Add skills/updating-architecture-docs/ to capture the intent and process
for maintaining architecture docs -- bridge from concepts to code, not
code summaries.

Apply the skill's principles to 03-prediction-api.md and
04-container-runtime.md: cut obvious Rust snippets that just restate
code (status lifecycle, idempotent PUT, error handling), keep non-obvious
ones that convey meaning prose can't (RAII guard, permit model). Replace
exhaustive file listings and code reference tables with package-level
pointers. Slim down component ownership tree to conceptual description.
…t missing features

Fix health state machine to start at UNKNOWN (not STARTING), add
UNHEALTHY state for user-defined healthchecks. Complete IPC protocol
tables with all message variants (~8 were missing). Document four
previously undocumented features: input spilling, file outputs, custom
metrics, user-defined healthchecks. Expand env var table and Go package
listing. Add hidden CLI commands. Fix crates/README.md duplicate line.

Update skill to prefer important packages over exhaustive listings.
@michaeldwan michaeldwan changed the title docs(architecture): remove legacy runtime, establish coglet as sole runtime docs(architecture): update to reflect current codebase Mar 20, 2026
@michaeldwan michaeldwan changed the title docs(architecture): update to reflect current codebase Update architecture docs to match the codebase Mar 20, 2026
michaeldwan and others added 3 commits March 20, 2026 16:10
…sections

Addresses the question 'what is the lifetime of BasePredictor and what can I do with it at each stage?' -- previously undocumented.

- Predictor Lifecycle in 04: singleton instance, setup() once, self persists,
  no teardown, concurrency semantics, crash is terminal (no respawn)
- Life of a Prediction in 04: 9-step request-to-response walkthrough with
  error handling
- Cross-references from 01 setup()/predict() sections
- Fixes pre-existing incorrect DEFUNCT health claim in Why Two Processes
The SDK was in the diagram but disconnected and missing from the Components section and terminology table. Now it's a first-class entry so people can distinguish 'the CLI' from 'the SDK' from 'coglet'.
@michaeldwan michaeldwan marked this pull request as ready for review March 23, 2026 16:07
@michaeldwan michaeldwan requested a review from a team as a code owner March 23, 2026 16:07
Copy link
Copy Markdown
Contributor

@markphelps markphelps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice skill, although will it work if its not in the bespoke locations? like .claude or .agents or whatever?

@michaeldwan michaeldwan added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 3b814d6 Mar 23, 2026
60 of 62 checks passed
@michaeldwan michaeldwan deleted the md/update-architecture branch March 23, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants