cog-review
Cog architecture review guidelines
Cog packages ML models into production-ready containers. Use this skill for changes that cross language boundaries or touch core architecture.
Component overview
- CLI (Go):
cmd/cog/andpkg/-- builds, runs, and deploys models - Python SDK:
python/cog/-- predictor interface, types, HTTP/queue server - Coglet (Rust):
crates/-- prediction server inside containers (HTTP, worker management, IPC)
Key design patterns
Wheel resolution: The CLI discovers SDK and coglet wheels from dist/ at
Docker build time. Wheels are NOT embedded in the binary. Changes to build
artifacts need to account for this.
Dockerfile generation: pkg/dockerfile/ generates Dockerfiles from cog.yaml
config. Template injection and escaping matter here.
More from replicate/cog
updating-architecture-docs
Use this skill when updating, reviewing, or creating architecture documentation in the architecture/ directory. This includes after refactors, feature additions, component changes, or when auditing docs for accuracy. Use it any time code changes affect how Cog's internals work -- new packages, changed IPC protocols, modified build pipeline, runtime behavior changes. Also use it proactively when reviewing PRs that touch core systems to check whether the architecture docs need updating.
6python-review
Python code review guidelines for the Cog SDK
5go-review
Go code review guidelines for the Cog codebase
5release-cog
Guide and automate the Cog release process
5rust-review
Rust code review guidelines for Coglet
5