@a5c-ai/krate 5.0.1-staging.f672fe79b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +29 -0
- package/README.md +183 -0
- package/bin/krate-demo.mjs +23 -0
- package/bin/krate-server.mjs +14 -0
- package/dist/krate-controller-ui.json +2407 -0
- package/dist/krate-lifecycle.json +201 -0
- package/dist/krate-runtime-snapshot.json +2955 -0
- package/dist/krate-summary.json +687 -0
- package/docs/README.md +61 -0
- package/docs/agents/README.md +83 -0
- package/docs/agents/acceptance-test-matrix.md +193 -0
- package/docs/agents/agent-mux-adapter-contract.md +167 -0
- package/docs/agents/agent-mux-source-map.md +310 -0
- package/docs/agents/agent-run-memory-import-spec.md +256 -0
- package/docs/agents/agent-stack-management-spec.md +421 -0
- package/docs/agents/api-contract-spec.md +309 -0
- package/docs/agents/artifacts-writeback-spec.md +145 -0
- package/docs/agents/chart-packaging-spec.md +128 -0
- package/docs/agents/ci-orchestration-spec.md +140 -0
- package/docs/agents/context-assembly-spec.md +219 -0
- package/docs/agents/controller-reconciliation-spec.md +255 -0
- package/docs/agents/crd-schema-spec.md +315 -0
- package/docs/agents/decision-log-open-questions.md +169 -0
- package/docs/agents/developer-implementation-checklist.md +329 -0
- package/docs/agents/dispatching-design.md +262 -0
- package/docs/agents/glossary.md +66 -0
- package/docs/agents/implementation-blueprint.md +324 -0
- package/docs/agents/implementation-rollout-slices.md +251 -0
- package/docs/agents/memory-context-integration-spec.md +194 -0
- package/docs/agents/memory-ontology-schema-spec.md +253 -0
- package/docs/agents/memory-operations-runbook.md +121 -0
- package/docs/agents/mvp-vertical-slice-spec.md +146 -0
- package/docs/agents/observability-audit-spec.md +265 -0
- package/docs/agents/operator-runbook.md +174 -0
- package/docs/agents/org-memory-api-payload-examples.md +333 -0
- package/docs/agents/org-memory-controller-sequence-spec.md +181 -0
- package/docs/agents/org-memory-e2e-fixture-plan.md +161 -0
- package/docs/agents/org-memory-ui-implementation-map.md +114 -0
- package/docs/agents/org-memory-vertical-slice-spec.md +168 -0
- package/docs/agents/org-resource-model-delta-spec.md +111 -0
- package/docs/agents/org-route-resource-model-spec.md +183 -0
- package/docs/agents/org-scoping-namespace-spec.md +114 -0
- package/docs/agents/rbac-secrets-management-spec.md +406 -0
- package/docs/agents/repository-page-integration-spec.md +255 -0
- package/docs/agents/resource-contract-examples.md +808 -0
- package/docs/agents/resource-relationship-map.md +190 -0
- package/docs/agents/security-threat-model.md +188 -0
- package/docs/agents/shared-memory-company-brain-spec.md +358 -0
- package/docs/agents/storage-migration-spec.md +168 -0
- package/docs/agents/subagent-orchestration-spec.md +152 -0
- package/docs/agents/system-overview.md +88 -0
- package/docs/agents/tools-mcp-skills-spec.md +189 -0
- package/docs/agents/traceability-matrix.md +79 -0
- package/docs/agents/ui-flow-spec.md +211 -0
- package/docs/agents/ui-ux-system-spec.md +426 -0
- package/docs/agents/workspace-lifecycle-spec.md +166 -0
- package/docs/architecture-spec.md +78 -0
- package/docs/components/control-plane.md +78 -0
- package/docs/components/data-plane.md +69 -0
- package/docs/components/hooks-events.md +67 -0
- package/docs/components/identity-rbac-policy.md +73 -0
- package/docs/components/kubevela-oam.md +70 -0
- package/docs/components/operations-publishing.md +81 -0
- package/docs/components/runners-ci.md +66 -0
- package/docs/components/web-ui.md +94 -0
- package/docs/external/README.md +47 -0
- package/docs/external/bidirectional-sync-design.md +134 -0
- package/docs/external/cicd-interface.md +64 -0
- package/docs/external/external-backend-controllers.md +170 -0
- package/docs/external/external-backend-crds.md +234 -0
- package/docs/external/external-backend-ui-spec.md +151 -0
- package/docs/external/external-backend-ux-flows.md +115 -0
- package/docs/external/external-object-mapping.md +125 -0
- package/docs/external/git-forge-interface.md +68 -0
- package/docs/external/github-integration-design.md +151 -0
- package/docs/external/issue-tracking-interface.md +66 -0
- package/docs/external/provider-capability-manifests.md +204 -0
- package/docs/external/provider-catalog.md +139 -0
- package/docs/external/provider-rollout-testing.md +78 -0
- package/docs/external/research-results.md +48 -0
- package/docs/external/security-auth-permissions.md +81 -0
- package/docs/external/sync-state-machines.md +108 -0
- package/docs/external/unified-external-backend-model.md +107 -0
- package/docs/external/user-facing-changes.md +67 -0
- package/docs/gaps.md +161 -0
- package/docs/install.md +94 -0
- package/docs/krate-design.md +334 -0
- package/docs/local-minikube.md +55 -0
- package/docs/ontology/README.md +32 -0
- package/docs/ontology/bounded-contexts.md +29 -0
- package/docs/ontology/events-and-hooks.md +32 -0
- package/docs/ontology/oam-kubevela.md +32 -0
- package/docs/ontology/operations-and-release.md +25 -0
- package/docs/ontology/personas-and-actors.md +32 -0
- package/docs/ontology/policies-and-invariants.md +33 -0
- package/docs/ontology/problem-space.md +30 -0
- package/docs/ontology/resource-contracts.md +40 -0
- package/docs/ontology/resource-taxonomy.md +42 -0
- package/docs/ontology/runners-and-ci.md +29 -0
- package/docs/ontology/solution-space.md +24 -0
- package/docs/ontology/storage-and-data-boundaries.md +29 -0
- package/docs/ontology/validation-matrix.md +24 -0
- package/docs/ontology/web-ui-excellent-flows.md +32 -0
- package/docs/ontology/workflows.md +39 -0
- package/docs/ontology/world.md +35 -0
- package/docs/product-requirements.md +62 -0
- package/docs/roadmap-mvp.md +87 -0
- package/docs/system-requirements.md +90 -0
- package/docs/tests/README.md +53 -0
- package/docs/tests/agent-qa-plan.md +63 -0
- package/docs/tests/browser-ui-tests.md +62 -0
- package/docs/tests/ci-quality-gates.md +48 -0
- package/docs/tests/coverage-model.md +64 -0
- package/docs/tests/e2e-scenario-tests.md +53 -0
- package/docs/tests/fixtures-test-data.md +63 -0
- package/docs/tests/observability-reliability-tests.md +54 -0
- package/docs/tests/product-test-matrix.md +145 -0
- package/docs/tests/qa-adoption-roadmap.md +130 -0
- package/docs/tests/qa-automation-plan.md +101 -0
- package/docs/tests/security-compliance-tests.md +57 -0
- package/docs/tests/test-framework-tools.md +88 -0
- package/docs/tests/test-suite-layout.md +121 -0
- package/docs/tests/unit-integration-tests.md +48 -0
- package/docs/todo-kyverno +714 -0
- package/docs/user-stories.md +78 -0
- package/examples/minikube-demo.yaml +190 -0
- package/examples/oam-application.yaml +23 -0
- package/examples/policy-kyverno-pr-title.yaml +18 -0
- package/package.json +63 -0
- package/scripts/build.mjs +29 -0
- package/scripts/setup-minikube.mjs +65 -0
- package/scripts/smoke.mjs +37 -0
- package/scripts/validate-doc-coverage.mjs +152 -0
- package/scripts/validate-package.mjs +93 -0
- package/scripts/validate-ui.mjs +207 -0
- package/src/agent-approval-controller.js +123 -0
- package/src/agent-context-bundles.js +242 -0
- package/src/agent-dispatch-controller.js +86 -0
- package/src/agent-mux-client.js +280 -0
- package/src/agent-permission-review.js +162 -0
- package/src/agent-stack-controller.js +296 -0
- package/src/agent-trigger-controller.js +108 -0
- package/src/api-controller.js +206 -0
- package/src/argocd-gitops.js +43 -0
- package/src/auth.js +265 -0
- package/src/component-catalog.js +41 -0
- package/src/control-plane.js +136 -0
- package/src/controller-client.js +38 -0
- package/src/controller-ui.js +538 -0
- package/src/data-plane.js +178 -0
- package/src/gitea-backend.js +95 -0
- package/src/handoff.js +98 -0
- package/src/hooks-events.js +63 -0
- package/src/http-server.js +151 -0
- package/src/identity-policy.js +86 -0
- package/src/index.js +30 -0
- package/src/kubernetes-controller.js +812 -0
- package/src/kubernetes-resource-gateway.js +48 -0
- package/src/operations.js +112 -0
- package/src/resource-model.js +203 -0
- package/src/runners-ci.js +48 -0
- package/src/runtime.js +196 -0
- package/src/web-ui.js +40 -0
- package/tests/agent-approval-controller.test.js +173 -0
- package/tests/agent-context-bundles.test.js +278 -0
- package/tests/agent-dispatch-controller.test.js +176 -0
- package/tests/agent-mux-client.test.js +204 -0
- package/tests/agent-permission-review.test.js +209 -0
- package/tests/agent-resources.test.js +212 -0
- package/tests/agent-stack-controller.test.js +221 -0
- package/tests/agent-trigger-controller.test.js +211 -0
- package/tests/deployment.test.js +395 -0
- package/tests/e2e/lifecycle.test.js +117 -0
- package/tests/krate.test.js +727 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# Agent developer implementation checklist
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This checklist maps the agent docs to concrete files and implementation steps in the current Krate repo. It is intended to be used when the project moves from docs-only into code.
|
|
6
|
+
|
|
7
|
+
## Ground rules
|
|
8
|
+
|
|
9
|
+
- Keep changes incremental and validated.
|
|
10
|
+
- Preserve generic controller/resource/watch APIs.
|
|
11
|
+
- Add typed routes only as wrappers over controller/resource services.
|
|
12
|
+
- Keep Secret values out of UI, status, logs, audit, and tests.
|
|
13
|
+
- Update docs and examples with every implemented slice.
|
|
14
|
+
|
|
15
|
+
## Slice 1: resource definitions
|
|
16
|
+
|
|
17
|
+
Files:
|
|
18
|
+
|
|
19
|
+
- `src/resource-model.js`
|
|
20
|
+
- `src/kubernetes-controller.js`
|
|
21
|
+
- `charts/krate/crds/*.yaml`
|
|
22
|
+
- `examples/agents/*.yaml`
|
|
23
|
+
- `tests/*.test.js`
|
|
24
|
+
|
|
25
|
+
Tasks:
|
|
26
|
+
|
|
27
|
+
- add agent config kinds to `CONFIG_KINDS`;
|
|
28
|
+
- add agent execution kinds to `AGGREGATED_KINDS` if represented in the generic model;
|
|
29
|
+
- add `RESOURCE_DEFINITIONS` entries with plural/context/requiredSpec;
|
|
30
|
+
- add `KRATE_RESOURCES` entries;
|
|
31
|
+
- add minimal CRDs;
|
|
32
|
+
- add examples;
|
|
33
|
+
- update package validation when examples/CRDs are required.
|
|
34
|
+
|
|
35
|
+
Validation:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
npm run validate:docs
|
|
39
|
+
npm run package:check
|
|
40
|
+
npm test
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Slice 2: UI projection
|
|
44
|
+
|
|
45
|
+
Files:
|
|
46
|
+
|
|
47
|
+
- `src/controller-ui.js`
|
|
48
|
+
- `apps/web/app/ui-shell.jsx`
|
|
49
|
+
- `apps/web/app/agents/page.jsx`
|
|
50
|
+
- `apps/web/app/orgs/[org]/repositories/[repo]/*/page.jsx`
|
|
51
|
+
- `scripts/validate-ui.mjs`
|
|
52
|
+
|
|
53
|
+
Tasks:
|
|
54
|
+
|
|
55
|
+
- add `views.agents` to controller model;
|
|
56
|
+
- add agent dashboard card/counters;
|
|
57
|
+
- add repository affordance slots;
|
|
58
|
+
- keep empty states server-projected;
|
|
59
|
+
- add route wrappers for global `/agents` page;
|
|
60
|
+
- extend UI validation for agent routes once created.
|
|
61
|
+
|
|
62
|
+
Validation:
|
|
63
|
+
|
|
64
|
+
```powershell
|
|
65
|
+
npm run ui:validate
|
|
66
|
+
npm run validate:docs
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Slice 3: permission review
|
|
70
|
+
|
|
71
|
+
Files:
|
|
72
|
+
|
|
73
|
+
- `src/agent-permission-review.js`
|
|
74
|
+
- `src/agent-rbac-controller.js`
|
|
75
|
+
- `src/agent-secret-config-controller.js`
|
|
76
|
+
- `apps/web/app/api/agents/permissions/review/route.js`
|
|
77
|
+
- tests for API and controller behavior.
|
|
78
|
+
|
|
79
|
+
Tasks:
|
|
80
|
+
|
|
81
|
+
- implement deterministic permission review;
|
|
82
|
+
- check native RBAC/ServiceAccount/SecretGrant/ConfigGrant;
|
|
83
|
+
- return no Secret values;
|
|
84
|
+
- add denied response shape;
|
|
85
|
+
- wire stack builder warnings to review response.
|
|
86
|
+
|
|
87
|
+
Validation:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
npm test -- --test-name-pattern permission
|
|
91
|
+
npm run ui:validate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Slice 4: stack registry
|
|
95
|
+
|
|
96
|
+
Files:
|
|
97
|
+
|
|
98
|
+
- `src/agent-stack-controller.js`
|
|
99
|
+
- `src/agent-mux-client.js` for capability lookup only;
|
|
100
|
+
- `apps/web/app/agents/stacks/page.jsx`;
|
|
101
|
+
- API routes under `apps/web/app/api/agents/stacks`.
|
|
102
|
+
|
|
103
|
+
Tasks:
|
|
104
|
+
|
|
105
|
+
- CRUD stacks through controller resources;
|
|
106
|
+
- compute capability requirements;
|
|
107
|
+
- query Agent Mux capabilities if configured;
|
|
108
|
+
- set readiness conditions;
|
|
109
|
+
- build stack builder UI.
|
|
110
|
+
|
|
111
|
+
Validation:
|
|
112
|
+
|
|
113
|
+
```powershell
|
|
114
|
+
npm test -- --test-name-pattern AgentStack
|
|
115
|
+
npm run ui:validate
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Slice 5: context and manual dispatch
|
|
119
|
+
|
|
120
|
+
Files:
|
|
121
|
+
|
|
122
|
+
- `src/agent-context-bundles.js`
|
|
123
|
+
- `src/agent-dispatch-controller.js`
|
|
124
|
+
- `apps/web/app/api/agents/runs/route.js`
|
|
125
|
+
- `apps/web/app/agents/runs/page.jsx`
|
|
126
|
+
- repository Code page components.
|
|
127
|
+
|
|
128
|
+
Tasks:
|
|
129
|
+
|
|
130
|
+
- assemble/redact context;
|
|
131
|
+
- create `AgentContextBundle`;
|
|
132
|
+
- create `AgentDispatchRun` and `AgentDispatchAttempt` before Agent Mux launch;
|
|
133
|
+
- add dispatch composer;
|
|
134
|
+
- show queued/pending run rows.
|
|
135
|
+
|
|
136
|
+
Validation:
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
npm test -- --test-name-pattern dispatch
|
|
140
|
+
npm run ui:validate
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Slice 6: Agent Mux binding
|
|
144
|
+
|
|
145
|
+
Files:
|
|
146
|
+
|
|
147
|
+
- `src/agent-mux-client.js`
|
|
148
|
+
- `src/agent-dispatch-controller.js`
|
|
149
|
+
- `apps/web/app/agents/runs/[run]/page.jsx`
|
|
150
|
+
- Agent Mux embed components.
|
|
151
|
+
|
|
152
|
+
Tasks:
|
|
153
|
+
|
|
154
|
+
- launch through Agent Mux;
|
|
155
|
+
- bind run/session IDs;
|
|
156
|
+
- stream events;
|
|
157
|
+
- embed transcript and observability timeline;
|
|
158
|
+
- handle pending/reconnect/rejected states.
|
|
159
|
+
|
|
160
|
+
Validation:
|
|
161
|
+
|
|
162
|
+
```powershell
|
|
163
|
+
npm test -- --test-name-pattern agent-mux
|
|
164
|
+
npm run ui:validate
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Slice 7: approvals and write-back
|
|
168
|
+
|
|
169
|
+
Files:
|
|
170
|
+
|
|
171
|
+
- `src/agent-approval-controller.js`
|
|
172
|
+
- `src/agent-artifacts.js`
|
|
173
|
+
- `apps/web/app/agents/approvals/page.jsx`
|
|
174
|
+
- PR/issue/pipeline page integrations.
|
|
175
|
+
|
|
176
|
+
Tasks:
|
|
177
|
+
|
|
178
|
+
- persist artifacts;
|
|
179
|
+
- create approval requests;
|
|
180
|
+
- apply approved write-back idempotently;
|
|
181
|
+
- audit decisions;
|
|
182
|
+
- block digest mismatches.
|
|
183
|
+
|
|
184
|
+
Validation:
|
|
185
|
+
|
|
186
|
+
```powershell
|
|
187
|
+
npm test -- --test-name-pattern approval
|
|
188
|
+
npm run ui:validate
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Slice 8: triggers and CI
|
|
192
|
+
|
|
193
|
+
Files:
|
|
194
|
+
|
|
195
|
+
- `src/agent-trigger-controller.js`
|
|
196
|
+
- `src/hooks-events.js`
|
|
197
|
+
- `src/runners-ci.js`
|
|
198
|
+
- `apps/web/app/agents/rules/page.jsx`
|
|
199
|
+
- repo hooks/runs pages.
|
|
200
|
+
|
|
201
|
+
Tasks:
|
|
202
|
+
|
|
203
|
+
- evaluate `AgentTriggerRule`;
|
|
204
|
+
- create `AgentTriggerExecution`;
|
|
205
|
+
- dry-run/replay deliveries;
|
|
206
|
+
- link failed `Pipeline`/`Job` to agent runs;
|
|
207
|
+
- coalesce duplicates.
|
|
208
|
+
|
|
209
|
+
Validation:
|
|
210
|
+
|
|
211
|
+
```powershell
|
|
212
|
+
npm test -- --test-name-pattern trigger
|
|
213
|
+
npm run ui:validate
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Slice 9: workspaces and subagents
|
|
217
|
+
|
|
218
|
+
Files:
|
|
219
|
+
|
|
220
|
+
- `src/agent-workspace-controller.js`
|
|
221
|
+
- `src/agent-subagents.js`
|
|
222
|
+
- `apps/web/app/agents/workspaces/page.jsx`
|
|
223
|
+
- issue/PR/run detail integrations.
|
|
224
|
+
|
|
225
|
+
Tasks:
|
|
226
|
+
|
|
227
|
+
- manage workspace lifecycle actions;
|
|
228
|
+
- link work items/sessions/workspaces;
|
|
229
|
+
- project subagent lanes;
|
|
230
|
+
- enforce child permission subsets;
|
|
231
|
+
- show workspace missing/rebase/dirty states.
|
|
232
|
+
|
|
233
|
+
Validation:
|
|
234
|
+
|
|
235
|
+
```powershell
|
|
236
|
+
npm test -- --test-name-pattern workspace
|
|
237
|
+
npm run ui:validate
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Slice 10: hardening
|
|
241
|
+
|
|
242
|
+
Files:
|
|
243
|
+
|
|
244
|
+
- chart values/templates;
|
|
245
|
+
- retention job/controller;
|
|
246
|
+
- observability/audit exporters;
|
|
247
|
+
- e2e tests;
|
|
248
|
+
- docs/examples.
|
|
249
|
+
|
|
250
|
+
Tasks:
|
|
251
|
+
|
|
252
|
+
- retention policies;
|
|
253
|
+
- metrics and alerts;
|
|
254
|
+
- chart feature gates;
|
|
255
|
+
- network policy;
|
|
256
|
+
- e2e coverage;
|
|
257
|
+
- update `npm run check` gates as needed.
|
|
258
|
+
|
|
259
|
+
Validation:
|
|
260
|
+
|
|
261
|
+
```powershell
|
|
262
|
+
npm run check
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Documentation updates per slice
|
|
266
|
+
|
|
267
|
+
Every implementation slice should update:
|
|
268
|
+
|
|
269
|
+
- relevant spec doc;
|
|
270
|
+
- `docs/agents/implementation-rollout-slices.md` status;
|
|
271
|
+
- `docs/agents/resource-contract-examples.md` if schema changes;
|
|
272
|
+
- `docs/agents/acceptance-test-matrix.md` with proof commands;
|
|
273
|
+
- README if user-facing behavior changes.
|
|
274
|
+
|
|
275
|
+
## Stop conditions
|
|
276
|
+
|
|
277
|
+
Stop implementation and fix docs/design first if:
|
|
278
|
+
|
|
279
|
+
- a UI action cannot map to a resource/controller/API path;
|
|
280
|
+
- a Secret value would need to pass through browser or status;
|
|
281
|
+
- a label/comment could escalate permissions;
|
|
282
|
+
- Agent Mux would become source of truth for Krate repository objects;
|
|
283
|
+
- generic resource/watch APIs would be bypassed without a typed wrapper rationale.
|
|
284
|
+
|
|
285
|
+
## Org memory implementation checklist
|
|
286
|
+
|
|
287
|
+
- Add org namespace model before adding memory write paths.
|
|
288
|
+
- Add `organizationRef` to agent, runner, memory, trigger, workspace, session, and dispatch schemas.
|
|
289
|
+
- Add `AgentRunMemoryImport` and curated journal/event schemas.
|
|
290
|
+
- Ensure `.a5c` imports store digests, redaction status, source run IDs, and target memory paths.
|
|
291
|
+
- Keep UI routes under `/orgs/[org]/...` and do not add non-org repository redirects.
|
|
292
|
+
- Add admission tests for cross-org repository, deployment, secret, config, memory, runner, and ServiceAccount references.
|
|
293
|
+
|
|
294
|
+
## Current app integration checklist
|
|
295
|
+
|
|
296
|
+
- Reuse `orgHref()` and `PageFrame` patterns from `apps/web/app/ui-shell.jsx` for agent/memory pages.
|
|
297
|
+
- Add an `Agents` org navigation item rather than a global top-level `/agents` root.
|
|
298
|
+
- Use existing org route params from `apps/web/app/orgs/[org]` for every agent and memory route.
|
|
299
|
+
- Extend `loadKrateUi()` to include agent and memory resources only after resource-model additions land.
|
|
300
|
+
- Add API handlers under `apps/web/app/api/orgs/[org]` and keep generic resource API compatibility.
|
|
301
|
+
- Add route guards that verify resource org labels before rendering run/memory detail pages.
|
|
302
|
+
- Link repository dispatch actions from existing repo tabs instead of creating a separate chat-first entry point.
|
|
303
|
+
|
|
304
|
+
## Org memory vertical implementation checklist
|
|
305
|
+
|
|
306
|
+
- Implement org and memory resource definitions before UI pages.
|
|
307
|
+
- Add memory dashboard empty state before query/import actions.
|
|
308
|
+
- Add manual dispatch memory preview before trigger automation.
|
|
309
|
+
- Add `AgentMemorySnapshot` creation before Agent Mux launch.
|
|
310
|
+
- Add summary-only `AgentRunMemoryImport` before curated/full journal modes.
|
|
311
|
+
- Add cross-org negative tests before enabling multi-org demo data.
|
|
312
|
+
- Keep raw `.a5c` artifacts out of memory by default.
|
|
313
|
+
|
|
314
|
+
## API and fixture checklist
|
|
315
|
+
|
|
316
|
+
- Use `org-memory-api-payload-examples.md` as request/response fixtures when adding typed endpoints.
|
|
317
|
+
- Use `org-memory-e2e-fixture-plan.md` for duplicate repo slug, company brain, and `.a5c` redaction tests.
|
|
318
|
+
- Keep stable error codes exactly as documented before wiring UI error states.
|
|
319
|
+
- Add fixture assertions for `organizationRef`, resolved memory commit, digest fields, and redaction status.
|
|
320
|
+
- Add historical memory retry assertion once `refAt` support lands.
|
|
321
|
+
|
|
322
|
+
## QA docs reference
|
|
323
|
+
|
|
324
|
+
Before implementing agent functionality, review:
|
|
325
|
+
|
|
326
|
+
- `docs/tests/product-test-matrix.md` for required suite coverage;
|
|
327
|
+
- `docs/tests/test-suite-layout.md` for test file placement and fixture rules;
|
|
328
|
+
- `docs/tests/agent-qa-plan.md` for agent-specific negative tests;
|
|
329
|
+
- `docs/tests/qa-adoption-roadmap.md` for staged gate expectations.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Agent dispatching integration design
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Integrate Agent Mux into Krate as a system-wide agent orchestration capability. Krate should let users define reusable agent stacks, attach tools/skills/MCP/subagents, connect those stacks to triggers, run dispatches on policy-controlled workspaces/runners, and observe each dispatch like a CI pipeline run with live Agent Mux chat/session access.
|
|
6
|
+
|
|
7
|
+
The canonical resource model for stacks, tools, skills, subagents, trigger rules, dispatch runs, attempts, and work-item/session/workspace links is defined in [Agent stack management spec](./agent-stack-management-spec.md). The route, screen, custom-resource, controller, API, and watch contracts are defined in [UI/UX system spec](./ui-ux-system-spec.md). This document focuses on product surfaces, source-object flows, integration boundaries, and implementation phases.
|
|
8
|
+
|
|
9
|
+
## Product model
|
|
10
|
+
|
|
11
|
+
Krate should treat agent work as a graph, not a chat-only surface:
|
|
12
|
+
|
|
13
|
+
- `AgentStack`: reusable runtime definition such as Claude Code plus model, prompt, tools, MCP servers, skills, subagents, approval mode, runner policy, and write-back policy.
|
|
14
|
+
- `AgentTriggerRule`: connects CI events, webhooks, comments, labels, schedules, pushes, tags, repository dispatch, and manual actions to an agent stack.
|
|
15
|
+
- `AgentDispatchRun`: CI-like logical run tied to repository/ref/source event, visible beside `Pipeline` and `Job` runs.
|
|
16
|
+
- `AgentDispatchAttempt`: concrete execution attempt with Agent Mux run/session IDs, runner placement, context digest, artifacts, and subagent events.
|
|
17
|
+
- `WorkItem`: issue, PR task, failed check, flaky-test cluster, release gate, or internal card.
|
|
18
|
+
- `Workspace`: repo checkout/worktree with git state, runtime surfaces, lifecycle actions, and linked sessions/runs.
|
|
19
|
+
- `ReviewArtifact`: diff/comments/decision output linked to issue, PR, workspace, run, or session.
|
|
20
|
+
|
|
21
|
+
## Primary user flows
|
|
22
|
+
|
|
23
|
+
### Define stack and connect trigger
|
|
24
|
+
|
|
25
|
+
1. Maintainer creates an `AgentStack` such as `claude-code-release-reviewer`.
|
|
26
|
+
2. They attach a model, prompt, AGENTS doc, skills, MCP servers, subagents, tool profile, approval policy, runner pool, and write-back policy.
|
|
27
|
+
3. Krate validates the stack against Agent Mux adapter capabilities and repository policy.
|
|
28
|
+
4. Maintainer creates an `AgentTriggerRule` for failed checks, incoming webhooks, PR comments, `agent:*` labels, or schedules.
|
|
29
|
+
5. A dry-run preview shows matched source events, context bundle, selected stack snapshot, dedupe policy, approval behavior, and expected dispatch output.
|
|
30
|
+
|
|
31
|
+
### Failed CI to agent run
|
|
32
|
+
|
|
33
|
+
1. `Pipeline` or `Job` transitions to failed.
|
|
34
|
+
2. Krate captures workflow/job/step, bounded logs, artifacts, failure signature, PR/ref, runner pool, and source actor.
|
|
35
|
+
3. Matching trigger rule creates or links a work item and materializes a context bundle.
|
|
36
|
+
4. Krate creates an `AgentDispatchRun` displayed beside pipeline/job runs.
|
|
37
|
+
5. Agent Mux starts the adapter session and streams transcript/events back to Krate.
|
|
38
|
+
6. Agent output produces diagnosis, patch artifact, subagent reports, or rerun request.
|
|
39
|
+
7. Write-back to PR/check/branch/workflow requires policy approval.
|
|
40
|
+
|
|
41
|
+
### Issue/PR to workspace/session
|
|
42
|
+
|
|
43
|
+
1. User comments `@agent fix`, applies an `agent:*` label, or manually dispatches from an issue/PR.
|
|
44
|
+
2. Krate resolves context labels, source discussion, changed files, linked checks, and repository policy.
|
|
45
|
+
3. Krate provisions or links a workspace for the work item.
|
|
46
|
+
4. Agent Mux creates a session bound to that workspace and run attempt.
|
|
47
|
+
5. The issue/PR/workspace/session pages all show the same linked dispatch state.
|
|
48
|
+
|
|
49
|
+
### Human follow-up from dispatch run
|
|
50
|
+
|
|
51
|
+
1. User opens the `AgentDispatchRun` from a PR, pipeline, inbox, workspace, or issue.
|
|
52
|
+
2. The run page shows CI metadata, attempts, source refs, runner placement, artifacts, approvals, and subagent tree.
|
|
53
|
+
3. The center panel embeds Agent Mux chat/transcript and continuation controls.
|
|
54
|
+
4. User can approve/reject actions, continue the session, cancel, retry, resume, fork, link a child issue, or create a review artifact.
|
|
55
|
+
|
|
56
|
+
### Workspace lifecycle recovery
|
|
57
|
+
|
|
58
|
+
1. Workspace becomes stale, dirty, behind, missing, or blocked by rebase conflicts.
|
|
59
|
+
2. Krate surfaces lifecycle actions: pin, archive, cleanup, recover, rebase start, auto-resolve, open in editor, mark resolved, abort.
|
|
60
|
+
3. Actions are policy-checked and tied back to the work item/session/run.
|
|
61
|
+
4. Agent or human continuation resumes from the linked Agent Mux session.
|
|
62
|
+
|
|
63
|
+
## Product surfaces
|
|
64
|
+
|
|
65
|
+
### Repository code page
|
|
66
|
+
|
|
67
|
+
- Define/manual-run agent actions from selected paths.
|
|
68
|
+
- Attach files or directories to a dispatch context bundle.
|
|
69
|
+
- Show active agent workspaces and sessions for the repository.
|
|
70
|
+
- Link to stack settings and trigger rules relevant to the repo.
|
|
71
|
+
|
|
72
|
+
### Pull request page
|
|
73
|
+
|
|
74
|
+
- Show agent dispatches beside checks and reviews.
|
|
75
|
+
- Offer failed-check diagnosis/repair and review-agent actions.
|
|
76
|
+
- Show generated review artifacts, patch artifacts, subagent outputs, and approvals.
|
|
77
|
+
- Gate comments, reviews, branch updates, reruns, and PR updates through write-back policy.
|
|
78
|
+
|
|
79
|
+
### Pipeline and job pages
|
|
80
|
+
|
|
81
|
+
- Show `AgentDispatchRun` rows beside normal pipeline runs.
|
|
82
|
+
- Offer `Diagnose failure`, `Attempt repair`, `Find similar failures`, and `Summarize artifacts` actions.
|
|
83
|
+
- Preload failed job/step/log/artifact/failure-signature context.
|
|
84
|
+
|
|
85
|
+
### Issue/work board pages
|
|
86
|
+
|
|
87
|
+
- Show board columns, WIP/policy signals, dependencies, decomposition, acceptance criteria, dispatch readiness, and linked sessions/workspaces.
|
|
88
|
+
- Allow issue-to-workspace creation/linking and issue-to-session/run linking.
|
|
89
|
+
- Show context labels and rendered execution context.
|
|
90
|
+
|
|
91
|
+
### Workspace pages
|
|
92
|
+
|
|
93
|
+
- Inventory all active/idle/archived/missing workspaces.
|
|
94
|
+
- Show git state, branch, head, dirty state, notes, runtime preview, terminal/dev-server surfaces, sessions, runs, review state, and ownership.
|
|
95
|
+
- Provide lifecycle actions with audit and policy checks.
|
|
96
|
+
|
|
97
|
+
### Agent run page
|
|
98
|
+
|
|
99
|
+
A dispatch run page should feel like a CI run plus an Agent Mux session:
|
|
100
|
+
|
|
101
|
+
- Header: repo/ref/source, stack, task kind, status, runner, workspace, cost, approval state.
|
|
102
|
+
- Left panel: work item, PR/issue/check context, context labels, files/logs/artifacts.
|
|
103
|
+
- Center panel: Agent Mux transcript/chat with continuation composer.
|
|
104
|
+
- Right panel: attempts, subagents, tools/MCP/skills, runtime surfaces, artifacts, approvals, write-back controls.
|
|
105
|
+
|
|
106
|
+
### Inbox and approvals
|
|
107
|
+
|
|
108
|
+
- Pending tool approvals, write-back approvals, prompt/plan approvals, rebase conflicts, failed dispatches, and webhook/rule failures.
|
|
109
|
+
- Each item links to source object, stack snapshot, context preview, Agent Mux session, and policy reason.
|
|
110
|
+
|
|
111
|
+
### Agent settings
|
|
112
|
+
|
|
113
|
+
- Manage `AgentStack`, `AgentSubagent`, `AgentToolProfile`, `AgentMcpServer`, `AgentSkill`, context labels, and `AgentTriggerRule` resources.
|
|
114
|
+
- Show adapter capability matrix from Agent Mux.
|
|
115
|
+
- Support trigger dry-runs with sample CI/webhook/comment events.
|
|
116
|
+
|
|
117
|
+
## Agent Mux integration boundary
|
|
118
|
+
|
|
119
|
+
Krate owns:
|
|
120
|
+
|
|
121
|
+
- repository, issue, PR, CI, webhook, runner, workspace, policy, approval, artifact, and audit resources;
|
|
122
|
+
- trigger evaluation, dedupe, context assembly, source-object linking, and write-back decisions;
|
|
123
|
+
- display of dispatches as CI-like runs.
|
|
124
|
+
|
|
125
|
+
Agent Mux owns:
|
|
126
|
+
|
|
127
|
+
- adapter-specific run/session execution;
|
|
128
|
+
- transcript/event streaming;
|
|
129
|
+
- chat continuation and cancellation primitives;
|
|
130
|
+
- adapter capabilities, config schemas, MCP/plugin surfaces, and runtime projections;
|
|
131
|
+
- session parsing and native runtime behavior.
|
|
132
|
+
|
|
133
|
+
Adapter module proposal:
|
|
134
|
+
|
|
135
|
+
- `src/agent-mux-client.js`
|
|
136
|
+
|
|
137
|
+
Responsibilities:
|
|
138
|
+
|
|
139
|
+
- validate stack launch options against Agent Mux capabilities;
|
|
140
|
+
- start run/session;
|
|
141
|
+
- list active sessions/runs by workspace/source object;
|
|
142
|
+
- stream event log or proxy SSE/WebSocket;
|
|
143
|
+
- cancel, resume, fork, or continue when supported;
|
|
144
|
+
- submit approval/continuation input;
|
|
145
|
+
- fetch transcript summary and runtime surfaces;
|
|
146
|
+
- attach Agent Mux run/session IDs to `AgentDispatchAttempt` status.
|
|
147
|
+
|
|
148
|
+
## Future Krate paths
|
|
149
|
+
|
|
150
|
+
### Domain and controller
|
|
151
|
+
|
|
152
|
+
- `src/resource-model.js`: add agent stack, trigger, dispatch, attempt, context, workspace/session-link, approval, skill/tool/MCP definitions.
|
|
153
|
+
- `src/hooks-events.js`: normalize webhook, CI, issue, PR, label, comment, push, tag, schedule, and repository-dispatch events.
|
|
154
|
+
- `src/agent-trigger-rules.js`: evaluate triggers, lifecycle, dry-run, dedupe, and concurrency.
|
|
155
|
+
- `src/agent-context-bundles.js`: assemble bounded/redacted repo, issue, PR, CI, artifact, tool, skill, and context-label context.
|
|
156
|
+
- `src/agent-mux-client.js`: call Agent Mux gateway/client.
|
|
157
|
+
- `src/agent-dispatch-runs.js`: reconcile Krate dispatch resources with Agent Mux sessions/runs.
|
|
158
|
+
- `src/runners-ci.js`: place dispatch attempts on runner pools or configured external Agent Mux execution.
|
|
159
|
+
- `src/controller-ui.js`: project agent stack and dispatch graph into UI view models.
|
|
160
|
+
|
|
161
|
+
### Next.js app surfaces
|
|
162
|
+
|
|
163
|
+
- `apps/web/app/agents/page.jsx`
|
|
164
|
+
- `apps/web/app/agents/stacks/page.jsx`
|
|
165
|
+
- `apps/web/app/agents/runs/page.jsx`
|
|
166
|
+
- `apps/web/app/agents/rules/page.jsx`
|
|
167
|
+
- `apps/web/app/agents/tools/page.jsx`
|
|
168
|
+
- `apps/web/app/agents/mcp/page.jsx`
|
|
169
|
+
- `apps/web/app/agents/skills/page.jsx`
|
|
170
|
+
- `apps/web/app/orgs/[org]/repositories/[repo]/agents/page.jsx`
|
|
171
|
+
- `apps/web/app/orgs/[org]/repositories/[repo]/agents/[run]/page.jsx`
|
|
172
|
+
- `apps/web/app/orgs/[org]/repositories/[repo]/workspaces/page.jsx`
|
|
173
|
+
- Existing PR, issue, code, pipeline, hook, runner, inbox, and settings pages should project agent state inline.
|
|
174
|
+
|
|
175
|
+
## Security and policy requirements
|
|
176
|
+
|
|
177
|
+
- All trigger rules are explicit resources with lifecycle states: draft, active, paused, disabled, archived.
|
|
178
|
+
- Incoming webhooks create durable delivery records before rule evaluation.
|
|
179
|
+
- Context labels, skills, MCP servers, tools, and subagents must be visible in prompt/context preview.
|
|
180
|
+
- Fork/untrusted refs must use untrusted runner pools and receive no privileged secrets.
|
|
181
|
+
- Labels cannot inject secrets, raw launch commands, or hidden environment variables.
|
|
182
|
+
- PR comments, branch updates, review submissions, check reruns, secret/network access, and release actions require explicit policy and approval.
|
|
183
|
+
- Every dispatch records source event, rule, stack snapshot, context digest, prompt hash, tools/MCP/skills/subagents, runner, workspace, Agent Mux IDs, artifacts, approvals, and write-back decisions.
|
|
184
|
+
|
|
185
|
+
## MVP vertical slice contracts
|
|
186
|
+
|
|
187
|
+
The first implementation should prove one complete path instead of many partial pages.
|
|
188
|
+
|
|
189
|
+
### Slice 1: Agent stack registry
|
|
190
|
+
|
|
191
|
+
- Add read/write `AgentStack`, `AgentToolProfile`, `AgentMcpServer`, and `AgentSkill` resources.
|
|
192
|
+
- Resolve Agent Mux adapter capabilities and expose `Ready`/not-ready conditions.
|
|
193
|
+
- Show a GitHub-like settings page at `/orgs/[org]/repositories/[repo]/settings/agents` with YAML preview and policy errors.
|
|
194
|
+
|
|
195
|
+
### Slice 2: Manual dispatch from repository context
|
|
196
|
+
|
|
197
|
+
- Add a dispatch composer to `/orgs/[org]/repositories/[repo]/code`, PR detail, issue detail, and pipeline detail.
|
|
198
|
+
- Require selected stack, task kind, prompt, source refs, context labels, and workspace policy.
|
|
199
|
+
- Create durable `AgentDispatchRun`, `AgentDispatchAttempt`, and `AgentContextBundle` before calling Agent Mux.
|
|
200
|
+
|
|
201
|
+
### Slice 3: CI-like run projection
|
|
202
|
+
|
|
203
|
+
- List agent dispatches beside pipelines/jobs with status, branch/ref, actor, runner, duration, stack, and source event.
|
|
204
|
+
- Support cancel, retry, resume, and continue only when the adapter capability and policy allow them.
|
|
205
|
+
- Preserve legacy/deep links by redirecting to the canonical dispatch page.
|
|
206
|
+
|
|
207
|
+
### Slice 4: Agent Mux chat and observability embed
|
|
208
|
+
|
|
209
|
+
- Bind Agent Mux run/session IDs to the attempt status.
|
|
210
|
+
- Embed transcript, continuation composer, event timeline, tool/subagent tree, runtime links, and artifact shortcuts.
|
|
211
|
+
- Treat stream reconnect, pending handoff, missing workspace, and approval-blocked as first-class states.
|
|
212
|
+
|
|
213
|
+
### Slice 5: Basic approvals and write-back
|
|
214
|
+
|
|
215
|
+
- Create `AgentApproval` for shell/tool/network/secret/write-back/rebase/release gates.
|
|
216
|
+
- Keep the run blocked until a decision is recorded.
|
|
217
|
+
- Apply PR comments, check reruns, branch pushes, issue comments, and review submissions only through approved write-back actions.
|
|
218
|
+
|
|
219
|
+
## Implementation phases
|
|
220
|
+
|
|
221
|
+
### Phase 1: docs and architecture only
|
|
222
|
+
|
|
223
|
+
Current phase. Specs only; no resource/controller/UI implementation.
|
|
224
|
+
|
|
225
|
+
### Phase 2: read-only graph projection
|
|
226
|
+
|
|
227
|
+
Project agent stack/dispatch/workspace concepts into UI with mock-free empty states and source-object affordance slots.
|
|
228
|
+
|
|
229
|
+
### Phase 3: stack registry MVP
|
|
230
|
+
|
|
231
|
+
Add `AgentStack`, `AgentToolProfile`, `AgentMcpServer`, `AgentSkill`, and adapter capability projection.
|
|
232
|
+
|
|
233
|
+
### Phase 4: manual dispatch MVP
|
|
234
|
+
|
|
235
|
+
Create `AgentDispatchRun` and `AgentDispatchAttempt` from repository/PR/pipeline/manual action and link to Agent Mux session.
|
|
236
|
+
|
|
237
|
+
### Phase 5: live run/session page
|
|
238
|
+
|
|
239
|
+
Embed Agent Mux transcript/events and runtime state into a Krate CI-like dispatch run page.
|
|
240
|
+
|
|
241
|
+
### Phase 6: trigger management
|
|
242
|
+
|
|
243
|
+
Add CI/webhook/comment/label/schedule trigger rules, dry-run, dedupe, lifecycle, and execution summaries.
|
|
244
|
+
|
|
245
|
+
### Phase 7: work item/session/workspace graph
|
|
246
|
+
|
|
247
|
+
Add work item links, workspace lifecycle actions, review artifacts, subagent tree, and inbox approvals.
|
|
248
|
+
|
|
249
|
+
### Phase 8: production hardening
|
|
250
|
+
|
|
251
|
+
Add runner placement, secrets policy, audit, metrics, artifact retention, retries, repair/resume, and write-back gates at production scale.
|
|
252
|
+
|
|
253
|
+
## Non-goals for first implementation
|
|
254
|
+
|
|
255
|
+
- Do not copy the full Agent Mux web UI into Krate.
|
|
256
|
+
- Do not hide Agent Mux sessions behind opaque CI logs.
|
|
257
|
+
- Do not make labels auto-dispatch by default.
|
|
258
|
+
- Do not allow hidden prompt injection from labels, skills, or MCP config.
|
|
259
|
+
- Do not run untrusted repository code on privileged runners.
|
|
260
|
+
- Do not make Agent Mux storage the source of truth for Krate repository objects.
|
|
261
|
+
- Do not let agents publish release artifacts without a privileged human approval path.
|
|
262
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Agent glossary
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This glossary standardizes terms used across the agent orchestration docs.
|
|
6
|
+
|
|
7
|
+
## Terms
|
|
8
|
+
|
|
9
|
+
| Term | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Agent stack | Reusable definition of an agent, model, prompt, tools, MCP servers, skills, subagents, permissions, runner, workspace, and write-back policy. |
|
|
12
|
+
| Agent Mux | External/embedded execution layer that owns adapter-specific run/session/chat/runtime behavior. |
|
|
13
|
+
| AgentDispatchRun | Logical CI-like agent run visible in Krate. |
|
|
14
|
+
| AgentDispatchAttempt | Concrete execution attempt for a run, including retry/resume/fork attempts. |
|
|
15
|
+
| AgentSession | Krate projection of an Agent Mux chat/session linked to a dispatch attempt. |
|
|
16
|
+
| AgentContextBundle | Durable, redacted, digest-addressed prompt/context snapshot for a dispatch. |
|
|
17
|
+
| Context label | Reviewed prompt fragment with provenance and source restrictions. |
|
|
18
|
+
| Capability requirement | Computed dependency from a stack/tool/MCP/skill/subagent to roles, secrets, configs, or adapter capabilities. |
|
|
19
|
+
| Runtime identity | Agent ServiceAccount used by an attempt. |
|
|
20
|
+
| Runner identity | ServiceAccount used by runner pod/execution host. |
|
|
21
|
+
| Permission review | Server-side decision that checks stack, actor, ServiceAccounts, RBAC, Secret grants, ConfigMap grants, source, trust tier, and approvals. |
|
|
22
|
+
| AgentSecretGrant | Explicit permission to use selected Secret keys for a specific subject/purpose/source scope. |
|
|
23
|
+
| AgentConfigGrant | Explicit permission to use selected ConfigMap keys for a specific subject/purpose/source scope. |
|
|
24
|
+
| Write-back | Any mutation to PRs, issues, branches, checks, reviews, releases, deployments, or repository state. |
|
|
25
|
+
| Approval | Human/policy gate for privileged tool use, secret use, write-back, network, release, or workspace operation. |
|
|
26
|
+
| Artifact | Durable agent output such as diagnosis, patch, review, test report, release report, or subagent output. |
|
|
27
|
+
| Workspace | Git worktree/runtime surface associated with an issue, PR, run, session, or repository. |
|
|
28
|
+
| Work item link | Association between issue/work item and session/workspace. |
|
|
29
|
+
| Trigger execution | Durable record of a trigger rule evaluation and its created/coalesced/rejected decision. |
|
|
30
|
+
| Dedupe key | Stable key used to coalesce repeated events into an existing run. |
|
|
31
|
+
| Trust tier | Source/execution trust classification such as trusted branch or untrusted fork. |
|
|
32
|
+
| Permission snapshot | Immutable digest of roles/grants/identity decisions used for an attempt. |
|
|
33
|
+
| Context digest | Immutable digest of assembled/redacted context bundle. |
|
|
34
|
+
| Adapter capability | Agent Mux-reported support for sessions, tools, MCP, skills, subagents, approvals, actions, and streaming. |
|
|
35
|
+
| Native RBAC | Kubernetes ServiceAccounts, Roles, ClusterRoles, RoleBindings, ClusterRoleBindings, and access reviews. |
|
|
36
|
+
|
|
37
|
+
## Naming conventions
|
|
38
|
+
|
|
39
|
+
- Resource kind names use `Agent*` when they are agent-specific.
|
|
40
|
+
- `spec` describes desired state or immutable execution request.
|
|
41
|
+
- `status` describes observed/reconciled state.
|
|
42
|
+
- Condition types use stable machine-readable enums.
|
|
43
|
+
- Secret/config references include namespace/name/key metadata only, never values.
|
|
44
|
+
- Agent Mux IDs are stored in status, not treated as Krate resource names.
|
|
45
|
+
|
|
46
|
+
## Avoid these terms
|
|
47
|
+
|
|
48
|
+
| Avoid | Use instead | Reason |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| bot permission | ServiceAccount/RBAC/grant | Keep native Kubernetes model clear. |
|
|
51
|
+
| prompt tag | context label | Labels are reviewed prompt fragments with provenance. |
|
|
52
|
+
| run log | event timeline/transcript/artifact | Distinguish structured events from chat transcript and output. |
|
|
53
|
+
| agent job | AgentDispatchRun/Attempt | Align with CI-like run model. |
|
|
54
|
+
| secret access in prompt | AgentSecretGrant | Permissions cannot be prompt-injected. |
|
|
55
|
+
|
|
56
|
+
## Company brain
|
|
57
|
+
|
|
58
|
+
Org-level Git-backed shared agent memory managed by Krate. It contains Atlas-style graph YAML records, Markdown records with YAML frontmatter, ontology files, and free-form Markdown notes searchable with grep. Dispatches consume it through `AgentMemorySnapshot` and `AgentMemoryQuery` so memory is pinned, cited, redacted, and auditable.
|
|
59
|
+
|
|
60
|
+
## Memory snapshot
|
|
61
|
+
|
|
62
|
+
Immutable dispatch-time record of the company brain repository ref, resolved commit, ontology/index digests, query manifest, and selected records/excerpts. Retries reuse the snapshot unless explicitly refreshed.
|
|
63
|
+
|
|
64
|
+
## Memory update
|
|
65
|
+
|
|
66
|
+
Reviewable proposed change to the company brain, usually produced by an agent run and routed through validation, approval, and a PR or managed merge flow.
|