docs: enhance contributing docs#1006
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds comprehensive contribution documentation for the Ctrlplane monorepo. It introduces a root-level CONTRIBUTING.md with development setup, architecture overview, coding standards, and testing guidelines, while adding service-specific contribution guides for the API, web, and workspace-engine applications. The README is refactored to reference the new CONTRIBUTING.md and streamline the quick-start snippet. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds comprehensive contributing documentation across the monorepo, with a new root guide and per-service guides to help contributors understand architecture, workflows, and local development.
Changes:
- Added new service-specific contributing guides for
apps/api,apps/web, andapps/workspace-engine. - Added a new root
CONTRIBUTING.mdcovering setup, repo structure, conventions, and testing. - Simplified the main
README.mdcontributing section to point to the new root guide and provide a short quick start.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/workspace-engine/CONTRIBUTING.md | New workspace-engine-specific architecture + controller recipes and local dev guidance. |
| apps/web/CONTRIBUTING.md | New web-app-specific stack, routing, and frontend development recipes. |
| apps/api/CONTRIBUTING.md | New API-service-specific OpenAPI/Express patterns, auth conventions, and e2e testing guidance. |
| README.md | Replaces the long contributing section with a link to the new guide + quick start snippet. |
| CONTRIBUTING.md | New root contributing guide consolidating setup, structure, conventions, and testing guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```text | ||
| apps/ | ||
| api/ # Node/Express REST + tRPC API — core business logic | ||
| web/ # React 19 + React Router frontend |
There was a problem hiding this comment.
The repository structure omits apps/relay/, even though it exists in this repo. Adding it here would help contributors discover it (and aligns with the earlier note that Go is relevant beyond workspace-engine).
| web/ # React 19 + React Router frontend | |
| web/ # React 19 + React Router frontend | |
| relay/ # Go relay service |
| db/ # Drizzle ORM schema + migrations (PostgreSQL) | ||
| trpc/ # tRPC server setup | ||
| auth/ # better-auth integration | ||
| workspace-engine-sdk/# Published TypeScript SDK for external integrations |
There was a problem hiding this comment.
Minor formatting typo in the code block path: there should be a space between the trailing slash and the # comment marker so it renders consistently with the other entries.
| workspace-engine-sdk/# Published TypeScript SDK for external integrations | |
| workspace-engine-sdk/ # Published TypeScript SDK for external integrations |
| @@ -0,0 +1,437 @@ | |||
| # Contributing to `apps/workspace-engine` | |||
|
|
|||
| This is the service guide for `apps/workspace-engine` — the Go reconciliation engine that turns user intent (a new version, a changed selector, a policy update) into concrete jobs dispatched to job agents. It assumes you've completed the root [CONTRIBUTING.md](../../CONTRIBUTING.md) setup and can run `pnpm dev` or `go run ./...` in this directory. | |||
There was a problem hiding this comment.
go run ./... from apps/workspace-engine is likely to fail because this module contains multiple package main entrypoints (e.g. main.go and tools/seed/seed.go). Use go run . (or pnpm dev / pnpm start) to run the service binary from this directory.
| This is the service guide for `apps/workspace-engine` — the Go reconciliation engine that turns user intent (a new version, a changed selector, a policy update) into concrete jobs dispatched to job agents. It assumes you've completed the root [CONTRIBUTING.md](../../CONTRIBUTING.md) setup and can run `pnpm dev` or `go run ./...` in this directory. | |
| This is the service guide for `apps/workspace-engine` — the Go reconciliation engine that turns user intent (a new version, a changed selector, a policy update) into concrete jobs dispatched to job agents. It assumes you've completed the root [CONTRIBUTING.md](../../CONTRIBUTING.md) setup and can run `pnpm dev` or `go run .` in this directory. |
| ├── oapi/ # OpenAPI-generated types (shared domain objects) | ||
| ├── pkg/ | ||
| │ ├── config/ # env var config (incl. SERVICES filter) | ||
| │ ├── db/ # pgx pool, sqlc-generated queries | ||
| │ ├── oapi/ # Domain types (Deployment, Release, etc.) |
There was a problem hiding this comment.
The directory layout description for oapi/ looks inaccurate: in this repo apps/workspace-engine/oapi/ contains the OpenAPI spec inputs/output (spec/, cfg.yaml, openapi.json), while the generated Go types live under pkg/oapi/ (e.g. pkg/oapi/oapi.gen.go). Consider updating these two lines to avoid sending contributors to the wrong directory.
| ├── oapi/ # OpenAPI-generated types (shared domain objects) | |
| ├── pkg/ | |
| │ ├── config/ # env var config (incl. SERVICES filter) | |
| │ ├── db/ # pgx pool, sqlc-generated queries | |
| │ ├── oapi/ # Domain types (Deployment, Release, etc.) | |
| ├── oapi/ # OpenAPI spec inputs/output (spec/, cfg.yaml, openapi.json) | |
| ├── pkg/ | |
| │ ├── config/ # env var config (incl. SERVICES filter) | |
| │ ├── db/ # pgx pool, sqlc-generated queries | |
| │ ├── oapi/ # Generated Go OpenAPI types (for example, oapi.gen.go) |
| | ------- | ------------ | -------------------------------------------------- | | ||
| | Node.js | `>= 22.10.0` | Managed by Flox, or install directly | | ||
| | pnpm | `^10.2.0` | Managed by Flox, or install directly | | ||
| | Go | `1.26+` | Only needed for `workspace-engine` | |
There was a problem hiding this comment.
The prerequisites table says Go is only needed for workspace-engine, but this repo also has apps/relay (a Go module). Please include relay here (or adjust the note) so contributors don't skip installing Go when working on relay.
| | Go | `1.26+` | Only needed for `workspace-engine` | | |
| | Go | `1.26+` | Needed for `workspace-engine` and `apps/relay` | |
|
|
||
| ```bash | ||
| cd apps/workspace-engine | ||
| go run ./... # Run without building |
There was a problem hiding this comment.
In the workspace-engine commands snippet, go run ./... is likely to error because ./... expands to multiple packages (and there are multiple package main entrypoints under apps/workspace-engine, including tools/seed). Prefer go run . for running the service from this directory.
| go run ./... # Run without building | |
| go run . # Run without building |
| By default `workspace-engine` runs all controllers. To run a subset (useful when debugging one), set `SERVICES` in `.env`: | ||
|
|
||
| ```bash | ||
| SERVICES=deploymentplan,policyeval |
There was a problem hiding this comment.
The SERVICES example uses deploymentplan,policyeval, but the actual controller kind names include hyphens (e.g. deployment-plan and policy-eval from pkg/reconcile/events/*). Since IsServiceEnabled does an exact string match, this example won't work as written.
| SERVICES=deploymentplan,policyeval | |
| SERVICES=deployment-plan,policy-eval |
Summary by CodeRabbit