Short rule sheet for AI agents working in this repo. If you're a human, read
CONTRIBUTING.md instead.
AInsel: a Kubernetes-native platform for AI agents that react to events from code forges. Monorepo — every component lives here, deploys as a single Helm chart into a single namespace.
Folder map (role -> path):
| Path | Role |
|---|---|
frontend/ |
React operations console |
services/hub/ |
Control plane (event routing, REST API) |
services/webhook-receiver/ |
Forgejo webhook receiver / event normalizer |
services/mcp/ |
MCP server registry |
operators/agent/ |
K8s operator for Agent + Trigger CRDs |
operators/event-gateway/ |
K8s operator for WebhookConnector CRD |
shared/api/ |
Shared Go module (event schema, NATS constants, filter engine) |
chart/ |
Helm chart |
pi/ |
Pi-native agent runtime |
docs/ |
Architecture, CRDs, deployment, conventions |
- Never commit to
main. Always create a branch and open a PR. - Conventional Commits for every commit:
feat:,fix:,chore:,docs:,refactor:,test:,perf:. Imperative, lowercase, no trailing period. - One topic per PR. Don't bundle unrelated changes — open separate PRs.
- Sync before editing:
git fetch originand check for divergence on your branch. Multiple agents work in this repo; local state goes stale. git pull --rebasebefore push. Never force-push to shared branches.- Lint and test before claiming done:
go build ./...,go test ./...,golangci-lint run,pnpm lint,pnpm test,helm lint chart/where applicable. - Do not touch CI workflows or any
Dockerfilewithout coordinating with the CI/Dockerfile workstream. - Never read
.envfiles. Use.env.examplefor reference.
git fetch origin && git status— confirm your branch is in sync with the remote and you're not onmain.- If you're picking up an open PR, verify it's still open and unmerged before adding commits.
- Run
go build ./...andpnpm installonce to confirm a clean baseline before changing anything. A failing baseline is not your bug to fix unless that's the task.
| If you need… | Look in… |
|---|---|
| Platform architecture, data flow, NATS streams | docs/architecture.md |
CRD specs (Agent, Trigger, WebhookConnector) |
docs/crd-reference.md |
| Admin-facing concepts (personas, models, tools, triggers) | docs/administrator-guide.md |
| Canonical event schema | docs/event-schema.md |
| Hub REST API endpoints | docs/api-reference.md |
| Deploying the platform | docs/deployment.md |
| Current and planned work | docs/roadmap.md |
| Repo conventions (commits, branching, style) | docs/conventions.md, CONTRIBUTING.md |
| Package-specific details (how to run, env vars) | that package's README.md |
Before reporting work as complete:
- Tests pass:
go test ./...andpnpm testin any package you touched. - Lint passes:
golangci-lint run,pnpm lint. - Build passes:
go build ./...,pnpm build(frontend),helm lint chart/(if chart touched). - Commit messages use Conventional Commits style; PR title does too.
- PR body explains why, not just what.
- Diff contains only changes relevant to the PR's one topic.
- No commented-out code, no debug prints, no
TODOleft for the reviewer to chase. - Cross-links in any docs you touched still resolve to real files.