All specifications live in .ai/spec/. Start with .ai/spec/README.md for project overview, reading order, and structure guide.
What lives where: agent.md (how agents should work), README.md (tests, make manifests, Makefile, cluster workflow, make api-lint, CEL / XValidation notes). This file is architecture and conventions for humans and agents editing the tree.
go.mod— main module (github.com/openshift/lightspeed-agentic-operator): controller, CLI, etc.api/go.mod— API-only module so downstreams can depend on types without the operator. Rootgo.modusesreplace … => ./apifor local dev.
| Path | Role |
|---|---|
api/v1alpha1/ |
CRD types, DerivePhase, constants |
controller/agenticrun/ |
AgenticRun reconciler, approval, sandbox wiring |
controller/agenticolsconfig/ |
AgenticOLSConfig reconciler |
controller/sandbox/ |
Sandbox pod management |
cli/ |
oc-agentic plugin |
config/crd/bases/ |
Generated CRD YAML (regen: README.md → make manifests) |
config/rbac/ |
SA, bindings, generated role.yaml |
config/manager/, config/default/ |
In-cluster Deployment kustomize |
examples/setup/ |
Day-0 YAML (agents, policies, runs) |
test/agent/ |
Mock agent HTTP server (POST /v1/agent/run), image Makefile, cmd/schemadump |
test/agent/sandboxtemplate/ |
Kustomize base SandboxTemplate for in-cluster mock |
test/e2e/ |
Build tag e2e: black-box tests against live cluster + running operator (make test-e2e) |
Derived from conditions via DerivePhase() — never stored on the spec:
Pending → Analyzing → Proposed → Executing → Verifying → Completed
→ Failed
→ Denied
→ Escalated
- Proposed — analysis done, awaiting execution approval (Analyzed=True, no Executed condition).
- Executing — in flight (Executed=Unknown) or retry (Verified=False / RetryingExecution).
make build # Build the operator binary (bin/manager)
make test # Unit tests (always use make, not go test directly)
make test-e2e # E2E tests (requires cluster + running operator)
make manifests # Regenerate CRD YAML and RBAC ClusterRole
make api-lint # Kube API linter on api/ types (golangci-lint)
make fmt # go fmt
make vet # go vet- Create-only idempotency:
Create+ handleAlreadyExists(not Get-then-Create). - Owner refs on children:
Controller: true,BlockOwnerDeletion: trueforOwns()watches. - Errors:
const ErrFoo = "…", wrap withfmt.Errorf("%s: %w", …). - Status:
client.MergeFrom(base)patch pattern.
- Start with the Jira ticket reference:
OLS-XXXX description - Keep the first line under 72 characters
- Use imperative mood
This repo uses a fork-based workflow:
- Push to your fork, not to
origin(openshift/lightspeed-agentic-operator) - Create the PR against
origin/mainusing your fork's branch:git push <your-fork-remote> <branch> gh pr create --repo openshift/lightspeed-agentic-operator --head <your-github-user>:<branch> --base main
- PR title must start with the Jira reference:
OLS-XXXX description - Squash commits before pushing