orka
AGENTS.md52 starsChanged 3 days agoMITView on GitHub
Orka is a Kubernetes-native task execution platform that manages Jobs and Pods for container tasks and AI agent tasks. For non-trivial code changes, run $autoreview (.agents/skills/autoreview/SKILL.md) before final/commit/ship and keep going until there are no accepted/actionable findings, unless the change is trivial/docs-only, equivalent manual review already happened, or the human opts out. After creating or updating an agent-authored PR, use $pr-closeout (.agents/skills/pr-closeout/SKILL.md) by default, like $autoreview is used before landing. Resolve merge conflicts, fix failing CI, address or push back…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- .agents/skills/autoreview/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-sandbox-deploySkill
- agent-substrate-deploySkill
- autoreviewSkill
- delete-commentSkill
- frontend-designSkill
- kindctlSkill
- orka-kind-deploySkill
- pr-closeoutSkill
- vekil-reverse-proxy-deploySkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 1 is common, 2 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Treat review output as advisory: verify every finding against the real code path before changing code.
- Very specific: line 18
If review-triggered fixes change code, rerun focused tests and rerun $autoreview.
- Distinctive: line 47
Run after every change:
- Very specific: line 73
Use orka.ai and its subdomains for Orka domains, Kubernetes API groups, and label/annotation prefixes.
- Very specific: line 78
Put model-readable tool constraints in JSON Schema (maximum, minimum, enum, default), then validate and enforce them again in Execute.
- Very specific: line 94
Read docs/adr/README.md, ADRs 0024–0031, and 0049 first (0031 supersedes parts of 0027/0030.
- Common: line 102
Do not store secrets, credentials, tokens, raw transcripts, or one-off task status in durable memory
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Orka is a Kubernetes-native task execution platform that manages Jobs and Pods for container tasks and AI agent tasks.
Non-negotiables
- Never commit, log, or print credentials — API keys, tokens, or secrets of any kind. Use Kubernetes Secrets or env vars.
- Scope discipline — implement exactly what was asked, nothing more. Report incidental, out-of-scope findings rather than fixing them, unless necessary for the requested outcome.
- Never push to
main. Push to the current branch after a change when it is notmain. - Transaction-token integration is fail-closed — never store raw TxTokens in Task specs/status/logs. Use owner-referenced Secrets for child tokens, safe metadata/digests for audit, subset checks for child scopes, and fail-closed TTS exchanges for outbound scopes.
- Never edit generated files (below) — checked by
make verify-generated; scaffold markers bygo test -count=1 ./hack/repocheck.
Review before landing
For non-trivial code changes, run $autoreview (.agents/skills/autoreview/SKILL.md) before final/commit/ship and keep going until there are no accepted/actionable findings, unless the change is trivial/docs-only, equivalent manual review already happened, or the human opts out.
- Treat review output as advisory: verify every finding against the real code path before changing code.
- If review-triggered fixes change code, rerun focused tests and rerun
$autoreview. - Format before review when formatting can move line locations; focused tests and review may run in parallel only after formatting is stable.
PR Closeout
After creating or updating an agent-authored PR, use $pr-closeout (.agents/skills/pr-closeout/SKILL.md) by default, like $autoreview is used before landing. Resolve merge conflicts, fix failing CI, address or push back on unresolved review threads, reply on GitHub and resolve addressed comments, push the non-main PR branch, and repeat until current CI is green and no unresolved actionable review threads remain. Skip only when the human opts out, the PR is intentionally draft/WIP, or the remaining blocker is external/human-only. Do not merge or enable auto-merge unless explicitly asked.
Build & Test
make manifests # Regenerate CRDs (after editing *_types.go or markers)
make generate # Regenerate Go types
make build # Build (includes UI)
make test # Run tests
make lint-fix # Lint and fix
make docker-build-all # Controller, AI/general workers, ACP runtimes, publisher
make deploy IMG=<repo>@sha256:<digest> ACP_CODEX_RUNTIME_IMG=<repo>@sha256:<digest> ACP_CLAUDE_RUNTIME_IMG=<repo>@sha256:<digest> ACP_COPILOT_RUNTIME_IMG=<repo>@sha256:<digest> ACP_OPENCODE_RUNTIME_IMG=<repo>@sha256:<digest> WORKSPACE_PUBLISHER_IMG=<repo>@sha256:<digest>UI: cd ui && bun install && bun run dev (dev server on :5173). See website/docs/development/development.md for full commands.
For testing against a local Kubernetes cluster, use the $kindctl skill to manage repo/worktree-scoped kind clusters without touching the global kubeconfig.
To stand up a reverse proxy for Anthropic/Gemini/OpenAI-compatible clients, use the $vekil-reverse-proxy-deploy skill. When it falls back to GitHub Copilot device-code login, surface the login code and URL to the user and wait for their confirmation before continuing — never complete the login on their behalf.
External ACP provider APIs, binaries, and scoped local proof scripts live in the orka-workspace repository. Install the native backend separately. Pooled Substrate MCP Tools remain in Orka behind --substrate-mcp-tools-enabled; that flag does not admit ACP allocations. Drain every legacy ACP allocation under the previous release before upgrading its CRDs or controller; see docs/development/workspace-provider-authoring.md.
Verification
Run after every change:
make manifests generate # After *_types.go or marker edits
make verify-generated # Before pushing (clean tree): fails on stale generated files
make lint-fix && make test # After any *.go edits
make lint-comments # After deleting comments, run make comment-baseline first
cd ui && bun run lint && bun run test # After UI edits
bash -n scripts/*.sh # After shell script edits
go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/<workflow>.yml # After workflow editsSingle test: go test ./internal/api/ -run TestHandlerName -v
Auto-Generated — Do NOT Edit
config/crd/bases/*.yaml,config/rbac/role.yaml—make manifestsmanifest_staging/deploy/orka.yaml,manifest_staging/charts/orka/**—make manifestsdeploy/**,charts/orka/**—make promote-staging-manifest(release-preparation only)**/zz_generated.*.go,**/envelope_gen.go,internal/storageclient/storagefault/wrappers_gen.go—make generatepkg/storage/v1/wire/storagepb/**—make generate(frompkg/storage/proto)PROJECT— kubebuilder CLIui/src/routeTree.gen.ts— TanStack Router (cd ui && bunx vite build; checked by UI Lint)
Code Style
- Use
orka.aiand its subdomains for Orka domains, Kubernetes API groups, and label/annotation prefixes. Useai.orka.*for reverse-domain identifiers such as Docker labels. - Structured logging in
internal/— checked byforbidigo. - No code comments (ADR 0062): make names and structure explain what, record why in
docs/adr, and file an issue for a known hack. Directives, license headers,Deprecated:notices, cgo preambles, andapi/type and field docs (CRD descriptions) are exempt. The comment baselines are empty, so any new comment failsmake lint-comments/go test ./hack/repocheck(Go, shell, Python) andbun run lint(UI). Use$delete-comment(.agents/skills/delete-comment/SKILL.md) if comments ever need another cleanup round. api/andpkg/never importinternal/— checked bydepguard.- LLM tool args for nested objects arrive as
map[string]any, not strings — always type-switch - Put model-readable tool constraints in JSON Schema (
maximum,minimum,enum,default), then validate and enforce them again inExecute; schema is guidance, not a runtime trust boundary Registry.Executechecks declared argument types recursively against the tool schema beforeExecuteruns:nullfor a declared field counts as omitted, numeric and boolean strings are converted (integers to plain int64 spelling), and contradicting types are rejected. Limits and enums still belong inExecute, before any narrowing such asint32(...)- Memory features are governance-first:
rememberandpropose_memorycreate review proposals, not durable memories
Gotchas
- Worker filesystem is read-only except
/tmp,/home/worker, and/workspace - Go builds embed
internal/uiembed/dist:make buildbuilds the UI itself andmake vet/lint/testcreate a stub, but in a fresh checkout runmake ensure-ui-embedbefore rawgo build/go vet/go test - AI worker truncates messages on context overflow — keeps system prompt + newest, drops middle atomically with structured metadata
code_exectimeout is clamped to 60s — a larger caller value becomes 60s, not an error, and a value below 1 is rejected. 30s is the default only when the caller supplies none- Built-in AI worker tools:
web_search,code_exec,file_read,web_fetch,file_write,request_approval, and gateway-onlyreply_in_conversation(also registered in the production ACP broker). Reply accepts onlycontent, requires authenticated durable gateway origin and permitted tool/transaction policy, and does not stop the normal tool loop. External ACP profiles must explicitly opt in before session freezing. Only the first five tools are proxied through the OpenAI/Anthropic compatibility endpoints (builtinProxyTools) - Built-in agent runtimes (
codex,claude,copilot,opencode) use only theorka.harness.v2ACP RuntimePool path; there is no per-Task Job or legacy fallback. - Execution workspaces (
Task.spec.execution.workspace.classRef) require--acp-workspace-dispatch-enabledand--enable-workspace-provider-api, use separately deployed providers, bind a dedicated single-sessionacp-ws-*RuntimePool, and fail closed on unsupported options, including pooled classes and retention past workspace deletion. For any change touching workspace admission, RBAC, runtime auth, checkpoints, or cleanup:- Class identity is frozen in the execution snapshot; Task attachment is exclusive and epoch-fenced; provider-native identifiers never enter Task status.
- Checkpoint export needs
useon the source workspace;restoreFromneedsuseon the checkpoint. - Suspension preserves data only, never process memory. Core verifies exact Pod absence or the current-generation native-process termination for its authorized instance; resume cold-boots with rotated bootstrap credentials.
- Read
docs/adr/README.md, ADRs 0024–0031, and 0049 first (0031 supersedes parts of 0027/0030; 0049 moves to Substrate v1.0.0 and supersedes parts of 0031).
Task.spec.workspaceis the only agent repository surface. Keep clone/read credentials inreadCredentialRefand publication/forge credentials inpublicationCredentialRef; neither enters the ACP process tree.- Parked turns (
park_until, ADR 0041) are data-only: a wait arms only after its exact turn settlesSucceeded, capacity is released, and the event resumes the Session through one controller-created continuation Task with a new prompt. Never preserve process memory, carry approvals across turns, or replay the parked prompt. - RuntimePools are controller-owned, digest-pinned, scale-to-zero resources. Only
Serving+Acceptingadmits new RuntimeSessions; drain/finalization must complete before replacement or scale-down. - Safe v2 probes are
GET /v2/healthandGET /v2/capabilities; status and all mutations require controller authentication plus operation-scoped authorization and exact fences. - External v2
runtimeRefdispatch freezes and revalidates the AgentRuntime UID, generation, profile, endpoint, authentication Secret versions, and observed runtime instance. External v2 sessions receive no per-TaskAgentConfiguration; the registered profile digest remains authoritative. Onlyorka.harness.v2registrations and dispatch are supported. - ACP runtime Pods run the supervisor as root with narrowly added process/identity capabilities; ACP children use distinct non-reused UIDs/GIDs, private session trees, and no Git credentials.
- Coordination memory tools:
recall_memory,remember,propose_memory,search_transcript - Do not store secrets, credentials, tokens, raw transcripts, or one-off task status in durable memory
- Reviewing a memory proposal does not apply it; use the explicit proposal apply endpoint for accepted
memoryproposals when durable memory should be created - Kontxt TxTokens are accepted via
Txn-Tokenby default;Authorization: Bearercontext-token support is opt-in so ServiceAccount/OIDC auth can coexist - Live GitHub OIDC/kontxt E2E requires GitHub Actions
id-token: writeorORKA_GITHUB_OIDC_TOKEN; redact JWTs, TxTokens, and request tokens in logs - OpenTelemetry GenAI constants are hand-rolled in
internal/tracing/genai(forbidigoblocks the upstream ones); telemetry is enabled with--enable-telemetry/--enable-tracing, workers honorORKA_ENABLE_TELEMETRY, and prompt/completion content capture remains default-off/fail-closed - ACP real-world validation should include Codex, Claude, and OpenCode through Vekil, Copilot image/profile admission (plus live execution when provider auth is available), workspace clone/read, Session continuation, cancellation/timeout, unsafe workspace rejection, controller restart, pool replacement, clean-room branch publication, PR reconciliation, and cleanup.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

