@a5c-ai/krate 5.0.1-staging.660d2b90f → 5.0.1-staging.69cb593ea
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 +31 -29
- package/bin/krate-demo.mjs +0 -0
- package/bin/krate-server.mjs +0 -0
- package/dist/krate-controller-ui.json +808 -10
- package/dist/krate-lifecycle.json +1 -1
- package/dist/krate-runtime-snapshot.json +223 -53
- package/dist/krate-summary.json +40 -3
- package/docs/agents/gaps-agent-mux-to-krate-crds.md +298 -0
- package/docs/architecture-v2.md +431 -0
- package/docs/openapi.yaml +1275 -0
- package/docs/requirements-v2.md +238 -0
- package/docs/sdk-api-reference.md +782 -0
- package/docs/system-spec-v2.md +352 -0
- package/docs/todos.md +4 -0
- package/docs/web-console-spec.md +433 -0
- package/package.json +1 -1
- package/scripts/validate-ui.mjs +305 -207
- package/src/agent-adapter-controller.js +169 -0
- package/src/agent-approval-controller.js +47 -0
- package/src/agent-dispatch-controller.js +130 -7
- package/src/agent-gateway-config-controller.js +147 -0
- package/src/agent-memory-controller.js +357 -0
- package/src/agent-memory-import.js +327 -0
- package/src/agent-memory-query.js +292 -0
- package/src/agent-memory-repository-source-controller.js +255 -0
- package/src/agent-mux-client.js +1 -1
- package/src/agent-permission-review.js +102 -14
- package/src/agent-project-controller.js +117 -0
- package/src/agent-provider-config-controller.js +150 -0
- package/src/agent-secret-config-grant-controller.js +282 -0
- package/src/agent-session-transcript-controller.js +189 -0
- package/src/agent-stack-controller.js +52 -1
- package/src/agent-subagent-controller.js +160 -0
- package/src/agent-transport-binding-controller.js +121 -0
- package/src/agent-trigger-controller.js +273 -0
- package/src/agent-workspace-controller.js +702 -0
- package/src/agent-writeback-controller.js +302 -0
- package/src/api-controller.js +338 -3
- package/src/async-controller.js +207 -0
- package/src/audit-controller.js +191 -0
- package/src/auth.js +48 -6
- package/src/controller-client.js +112 -38
- package/src/controller-ui.js +96 -16
- package/src/data-plane.js +3 -2
- package/src/event-bus.js +61 -0
- package/src/external/conflict-controller.js +225 -0
- package/src/external/github/auth.js +96 -0
- package/src/external/github/cicd.js +180 -0
- package/src/external/github/git-forge.js +240 -0
- package/src/external/github/index.js +144 -0
- package/src/external/github/issue-tracking.js +163 -0
- package/src/external/provider-adapter.js +161 -0
- package/src/external/provider-resource-factory.js +161 -0
- package/src/external/sync-controller.js +235 -0
- package/src/external/webhook-controller.js +144 -0
- package/src/external/write-controller.js +283 -0
- package/src/gitea-backend.js +36 -0
- package/src/gitea-service.js +173 -0
- package/src/http-server.js +226 -0
- package/src/index.js +27 -0
- package/src/kubernetes-controller-async.js +531 -0
- package/src/kubernetes-controller.js +156 -84
- package/src/notification-controller.js +178 -0
- package/src/org-scoping.js +5 -0
- package/src/resource-model.js +26 -8
- package/src/runner-controller.js +272 -0
- package/src/snapshot-cache.js +157 -0
- package/tests/agent-adapter-controller.test.js +361 -0
- package/tests/agent-dispatch-controller.test.js +139 -0
- package/tests/agent-gateway-config-controller.test.js +386 -0
- package/tests/agent-memory-controller.test.js +308 -0
- package/tests/agent-memory-import-snapshot.test.js +477 -0
- package/tests/agent-memory-query.test.js +404 -0
- package/tests/agent-memory-repository-source.test.js +514 -0
- package/tests/agent-permission-review-v2.test.js +317 -0
- package/tests/agent-project-controller.test.js +302 -0
- package/tests/agent-provider-config-controller.test.js +376 -0
- package/tests/agent-resources.test.js +35 -19
- package/tests/agent-secret-config-grant.test.js +231 -0
- package/tests/agent-session-transcript-controller.test.js +499 -0
- package/tests/agent-subagent-controller.test.js +201 -0
- package/tests/agent-transport-binding-controller.test.js +294 -0
- package/tests/agent-trigger-routes.test.js +190 -0
- package/tests/agent-trigger-sources.test.js +245 -0
- package/tests/agent-workspace-controller.test.js +181 -0
- package/tests/agent-writeback.test.js +292 -0
- package/tests/approval-persistence.test.js +171 -0
- package/tests/async-controller.test.js +252 -0
- package/tests/audit-controller.test.js +227 -0
- package/tests/codespace-controller.test.js +318 -0
- package/tests/controller-client.test.js +133 -0
- package/tests/deployment.test.js +43 -29
- package/tests/e2e/lifecycle.test.js +5 -2
- package/tests/event-bus-integration.test.js +190 -0
- package/tests/external-github-forge.test.js +560 -0
- package/tests/external-github-issues-cicd.test.js +520 -0
- package/tests/external-integration.test.js +470 -0
- package/tests/external-persistence.test.js +340 -0
- package/tests/external-provider-adapter.test.js +365 -0
- package/tests/external-resource-model.test.js +215 -0
- package/tests/external-webhook-sync.test.js +287 -0
- package/tests/external-write-conflict.test.js +353 -0
- package/tests/gitea-service.test.js +253 -0
- package/tests/health-check-real.test.js +165 -0
- package/tests/integration/full-flow.test.js +266 -0
- package/tests/krate.test.js +58 -6
- package/tests/memory-search-wiring.test.js +270 -0
- package/tests/notification-controller.test.js +196 -0
- package/tests/notification-integration.test.js +179 -0
- package/tests/org-scoping.test.js +687 -0
- package/tests/runner-controller.test.js +327 -0
- package/tests/runner-integration.test.js +231 -0
- package/tests/session-cookie-hmac.test.js +151 -0
- package/tests/snapshot-performance.test.js +315 -0
- package/tests/sse-events.test.js +107 -0
- package/tests/webhook-trigger.test.js +198 -0
- package/tests/workspace-volumes.test.js +312 -0
- package/tests/writeback-persistence.test.js +207 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Krate Requirements Specification v2
|
|
2
|
+
|
|
3
|
+
> Derived from implementation. Every requirement below corresponds to implemented functionality.
|
|
4
|
+
|
|
5
|
+
## 1. Functional Requirements
|
|
6
|
+
|
|
7
|
+
### FR-IDENTITY: Identity and Access Management
|
|
8
|
+
|
|
9
|
+
| ID | Requirement | Source |
|
|
10
|
+
|----|-------------|--------|
|
|
11
|
+
| FR-IDENTITY-01 | System SHALL support multi-tenant organizations with display name and namespace binding | `resource-model.js:Organization` |
|
|
12
|
+
| FR-IDENTITY-02 | System SHALL support user accounts with email, display name, admin flag, and linked identities | `resource-model.js:User` |
|
|
13
|
+
| FR-IDENTITY-03 | System SHALL support teams with membership, maintainers, and permission grants | `resource-model.js:Team` |
|
|
14
|
+
| FR-IDENTITY-04 | System SHALL support pending invitations with email, role, and team assignment | `resource-model.js:Invite` |
|
|
15
|
+
| FR-IDENTITY-05 | System SHALL map between Krate users, sign-in subjects, and external accounts | `resource-model.js:IdentityMapping` |
|
|
16
|
+
| FR-IDENTITY-06 | System SHALL support configurable auth providers (GitHub, OIDC/SSO) per org | `resource-model.js:AuthProvider` |
|
|
17
|
+
| FR-IDENTITY-07 | System SHALL support agent service accounts for K8s identity binding | `resource-model.js:AgentServiceAccount` |
|
|
18
|
+
| FR-IDENTITY-08 | System SHALL project managed RBAC bindings for agent identity | `resource-model.js:AgentRoleBinding` |
|
|
19
|
+
| FR-IDENTITY-09 | System SHALL gate secret access through explicit grants with purpose scope | `resource-model.js:AgentSecretGrant` |
|
|
20
|
+
| FR-IDENTITY-10 | System SHALL gate ConfigMap access through explicit grants with purpose scope | `resource-model.js:AgentConfigGrant` |
|
|
21
|
+
|
|
22
|
+
### FR-REPOSITORY: Repository Management
|
|
23
|
+
|
|
24
|
+
| ID | Requirement | Source |
|
|
25
|
+
|----|-------------|--------|
|
|
26
|
+
| FR-REPO-01 | System SHALL support repository CRUD with visibility settings | `resource-model.js:Repository` |
|
|
27
|
+
| FR-REPO-02 | System SHALL manage user, deploy, and automation SSH keys | `resource-model.js:SSHKey` |
|
|
28
|
+
| FR-REPO-03 | System SHALL manage repository collaborator and team permissions | `resource-model.js:RepositoryPermission` |
|
|
29
|
+
| FR-REPO-04 | System SHALL enforce branch protection rules | `resource-model.js:BranchProtection` |
|
|
30
|
+
| FR-REPO-05 | System SHALL enforce reference deny rules and force-push policies | `resource-model.js:RefPolicy` |
|
|
31
|
+
| FR-REPO-06 | System SHALL provide git object recording for repository content | `http-server.js:objects` |
|
|
32
|
+
| FR-REPO-07 | System SHALL support search indexing per repository | `http-server.js:search-index` |
|
|
33
|
+
|
|
34
|
+
### FR-POLICY: Policy Management
|
|
35
|
+
|
|
36
|
+
| ID | Requirement | Source |
|
|
37
|
+
|----|-------------|--------|
|
|
38
|
+
| FR-POLICY-01 | System SHALL support organization policy profiles with posture and rollout mode | `resource-model.js:PolicyProfile` |
|
|
39
|
+
| FR-POLICY-02 | System SHALL provide curated Kyverno policy templates with parameters | `resource-model.js:PolicyTemplate` |
|
|
40
|
+
| FR-POLICY-03 | System SHALL bind templates to orgs/repos with audit/enforce state | `resource-model.js:PolicyBinding` |
|
|
41
|
+
| FR-POLICY-04 | System SHALL support auditable exception request workflows with expiry | `resource-model.js:PolicyExceptionRequest` |
|
|
42
|
+
|
|
43
|
+
### FR-AGENT: Agent Orchestration
|
|
44
|
+
|
|
45
|
+
| ID | Requirement | Source |
|
|
46
|
+
|----|-------------|--------|
|
|
47
|
+
| FR-AGENT-01 | System SHALL define reusable agent stacks with model, prompt, tools, MCP, skills | `resource-model.js:AgentStack` |
|
|
48
|
+
| FR-AGENT-02 | System SHALL support named child-agent definitions with role/task scoping | `resource-model.js:AgentSubagent` |
|
|
49
|
+
| FR-AGENT-03 | System SHALL define tool profiles with filesystem/network/shell policies | `resource-model.js:AgentToolProfile` |
|
|
50
|
+
| FR-AGENT-04 | System SHALL manage MCP server endpoints with transport and health checks | `resource-model.js:AgentMcpServer` |
|
|
51
|
+
| FR-AGENT-05 | System SHALL support reusable skill bundles with prompt fragments | `resource-model.js:AgentSkill` |
|
|
52
|
+
| FR-AGENT-06 | System SHALL route events to agent stacks via trigger rules | `resource-model.js:AgentTriggerRule` |
|
|
53
|
+
| FR-AGENT-07 | System SHALL provide reviewed prompt fragments with provenance | `resource-model.js:AgentContextLabel` |
|
|
54
|
+
| FR-AGENT-08 | System SHALL create dispatch runs with queue, status, workspace, cost tracking | `resource-model.js:AgentDispatchRun` |
|
|
55
|
+
| FR-AGENT-09 | System SHALL track execution attempts with reason and stack snapshot | `resource-model.js:AgentDispatchAttempt` |
|
|
56
|
+
| FR-AGENT-10 | System SHALL project Agent Mux sessions with lifecycle state | `resource-model.js:AgentSession` |
|
|
57
|
+
| FR-AGENT-11 | System SHALL create immutable context bundles with digest and provenance | `resource-model.js:AgentContextBundle` |
|
|
58
|
+
| FR-AGENT-12 | System SHALL store durable agent outputs with kind and retention | `resource-model.js:KrateArtifact` |
|
|
59
|
+
| FR-AGENT-13 | System SHALL gate agent actions through human approval workflows | `resource-model.js:AgentApproval` |
|
|
60
|
+
| FR-AGENT-14 | System SHALL support adapter definitions with transport/capabilities | `resource-model.js:AgentAdapter` |
|
|
61
|
+
| FR-AGENT-15 | System SHALL configure transport bindings with endpoint/protocol/auth | `resource-model.js:AgentTransportBinding` |
|
|
62
|
+
| FR-AGENT-16 | System SHALL configure model providers with API base and rate limits | `resource-model.js:AgentProviderConfig` |
|
|
63
|
+
| FR-AGENT-17 | System SHALL group issues and repositories into projects with kanban | `resource-model.js:KrateProject` |
|
|
64
|
+
| FR-AGENT-18 | System SHALL configure gateway connections with URL and feature flags | `resource-model.js:AgentGatewayConfig` |
|
|
65
|
+
| FR-AGENT-19 | System SHALL record session transcripts with message nodes and cost | `resource-model.js:AgentSessionTranscript` |
|
|
66
|
+
| FR-AGENT-20 | System SHALL perform permission review before dispatch | `agent-dispatch-controller.js` |
|
|
67
|
+
| FR-AGENT-21 | System SHALL provision workspaces during dispatch | `agent-dispatch-controller.js` |
|
|
68
|
+
| FR-AGENT-22 | System SHALL perform MCP health checks with 3s timeout | `agent-stack-controller.js` |
|
|
69
|
+
|
|
70
|
+
### FR-MEMORY: Agent Memory
|
|
71
|
+
|
|
72
|
+
| ID | Requirement | Source |
|
|
73
|
+
|----|-------------|--------|
|
|
74
|
+
| FR-MEM-01 | System SHALL point to Git repositories for shared agent memory | `resource-model.js:AgentMemoryRepository` |
|
|
75
|
+
| FR-MEM-02 | System SHALL define read policies per repository/team/stack/trigger | `resource-model.js:AgentMemorySource` |
|
|
76
|
+
| FR-MEM-03 | System SHALL enforce ontology with required fields and vocabulary | `resource-model.js:AgentMemoryOntology` |
|
|
77
|
+
| FR-MEM-04 | System SHALL create immutable memory snapshots at dispatch time | `resource-model.js:AgentMemorySnapshot` |
|
|
78
|
+
| FR-MEM-05 | System SHALL execute graph traversal queries with depth/kind filtering | `agent-memory-query.js:queryGraph` |
|
|
79
|
+
| FR-MEM-06 | System SHALL execute full-text grep queries with context extraction | `agent-memory-query.js:queryGrep` |
|
|
80
|
+
| FR-MEM-07 | System SHALL support combined graph+grep queries | `agent-memory-query.js:queryMemory` |
|
|
81
|
+
| FR-MEM-08 | System SHALL track proposed memory mutations with validation | `resource-model.js:AgentMemoryUpdate` |
|
|
82
|
+
| FR-MEM-09 | System SHALL import run metadata into memory with redaction | `resource-model.js:AgentRunMemoryImport` |
|
|
83
|
+
| FR-MEM-10 | System SHALL bridge memory content to Krate resources | `resource-model.js:AgentMemoryAssociation` |
|
|
84
|
+
|
|
85
|
+
### FR-EXTERNAL: External Backend Integration
|
|
86
|
+
|
|
87
|
+
| ID | Requirement | Source |
|
|
88
|
+
|----|-------------|--------|
|
|
89
|
+
| FR-EXT-01 | System SHALL register external providers with type/endpoint/auth | `resource-model.js:ExternalBackendProvider` |
|
|
90
|
+
| FR-EXT-02 | System SHALL bind providers to orgs with credentials | `resource-model.js:ExternalBackendBinding` |
|
|
91
|
+
| FR-EXT-03 | System SHALL configure sync intervals and conflict resolution | `resource-model.js:ExternalBackendSyncPolicy` |
|
|
92
|
+
| FR-EXT-04 | System SHALL discover provider capabilities automatically | `resource-model.js:ExternalProviderCapabilityManifest` |
|
|
93
|
+
| FR-EXT-05 | System SHALL verify inbound webhooks with HMAC-SHA256 | `external/webhook-controller.js` |
|
|
94
|
+
| FR-EXT-06 | System SHALL deduplicate webhook deliveries by ID | `external/webhook-controller.js` |
|
|
95
|
+
| FR-EXT-07 | System SHALL track sync events with ordering metadata | `resource-model.js:ExternalSyncEvent` |
|
|
96
|
+
| FR-EXT-08 | System SHALL maintain current sync phase and error state | `resource-model.js:ExternalSyncState` |
|
|
97
|
+
| FR-EXT-09 | System SHALL queue write-back intents with approval state | `resource-model.js:ExternalWriteIntent` |
|
|
98
|
+
| FR-EXT-10 | System SHALL detect conflicts with diff and resolution outcome | `resource-model.js:ExternalSyncConflict` |
|
|
99
|
+
| FR-EXT-11 | System SHALL maintain stable local-to-external object mappings | `resource-model.js:ExternalObjectLink` |
|
|
100
|
+
| FR-EXT-12 | System SHALL provide GitHub adapter (auth, git-forge, issues, CI) | `external/github/` |
|
|
101
|
+
|
|
102
|
+
### FR-CI: Continuous Integration
|
|
103
|
+
|
|
104
|
+
| ID | Requirement | Source |
|
|
105
|
+
|----|-------------|--------|
|
|
106
|
+
| FR-CI-01 | System SHALL track pipeline runs with state and resume point | `resource-model.js:Pipeline` |
|
|
107
|
+
| FR-CI-02 | System SHALL define executable job steps with isolation | `resource-model.js:Job` |
|
|
108
|
+
| FR-CI-03 | System SHALL manage runner pools with warm/max replicas | `resource-model.js:RunnerPool` |
|
|
109
|
+
|
|
110
|
+
### FR-HOOKS: Webhook Management
|
|
111
|
+
|
|
112
|
+
| ID | Requirement | Source |
|
|
113
|
+
|----|-------------|--------|
|
|
114
|
+
| FR-HOOKS-01 | System SHALL support webhook subscriptions with URL, events, signing | `resource-model.js:WebhookSubscription` |
|
|
115
|
+
| FR-HOOKS-02 | System SHALL record durable outbound delivery attempts | `resource-model.js:WebhookDelivery` |
|
|
116
|
+
|
|
117
|
+
### FR-WEB: Web UI
|
|
118
|
+
|
|
119
|
+
| ID | Requirement | Source |
|
|
120
|
+
|----|-------------|--------|
|
|
121
|
+
| FR-WEB-01 | System SHALL support saved triage and dashboard views | `resource-model.js:View` |
|
|
122
|
+
| FR-WEB-02 | System SHALL support reusable label/query selectors | `resource-model.js:Selector` |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 2. Non-Functional Requirements
|
|
127
|
+
|
|
128
|
+
### NFR-PERF: Performance
|
|
129
|
+
|
|
130
|
+
| ID | Requirement | Source |
|
|
131
|
+
|----|-------------|--------|
|
|
132
|
+
| NFR-PERF-01 | System SHALL cache snapshots with stale-while-revalidate (30s TTL) | `snapshot-cache.js` |
|
|
133
|
+
| NFR-PERF-02 | System SHALL support per-org cache entries for independent revalidation | `snapshot-cache.js` |
|
|
134
|
+
| NFR-PERF-03 | System SHALL execute kubectl operations asynchronously | `kubernetes-controller-async.js` |
|
|
135
|
+
| NFR-PERF-04 | System SHALL batch events with configurable size (50) and interval (1000ms) | `async-controller.js:createEventBatcher` |
|
|
136
|
+
| NFR-PERF-05 | System SHALL retry operations with exponential backoff | `async-controller.js:createRetryPolicy` |
|
|
137
|
+
| NFR-PERF-06 | System SHALL deliver events via ordered async queue | `async-controller.js:createDeliveryQueue` |
|
|
138
|
+
| NFR-PERF-07 | System SHALL checkpoint long-running operations for resumption | `async-controller.js:createCheckpointer` |
|
|
139
|
+
| NFR-PERF-08 | System SHALL stream events via SSE with 30s heartbeat keepalive | `http-server.js:sseMatch` |
|
|
140
|
+
|
|
141
|
+
### NFR-SEC: Security
|
|
142
|
+
|
|
143
|
+
| ID | Requirement | Source |
|
|
144
|
+
|----|-------------|--------|
|
|
145
|
+
| NFR-SEC-01 | System SHALL sign session cookies with HMAC-SHA256 | `auth.js:createSessionCookie` |
|
|
146
|
+
| NFR-SEC-02 | System SHALL use timing-safe comparison for signatures | `auth.js:timingSafeEqual` |
|
|
147
|
+
| NFR-SEC-03 | System SHALL require auth on all mutating API routes | `http-server.js` |
|
|
148
|
+
| NFR-SEC-04 | System SHALL reject unsigned cookies when secret is configured | `auth.js:parseSessionCookie` |
|
|
149
|
+
| NFR-SEC-05 | System SHALL verify webhook signatures with HMAC-SHA256 | `external/webhook-controller.js` |
|
|
150
|
+
| NFR-SEC-06 | System SHALL set HttpOnly and SameSite=Lax on session cookies | `auth.js:createSessionCookie` |
|
|
151
|
+
| NFR-SEC-07 | System SHALL enforce org namespace isolation for all resources | `http-server.js:scopeResource` |
|
|
152
|
+
| NFR-SEC-08 | System SHALL use RBAC ClusterRole for CRD access | `kubernetes-controller.js` |
|
|
153
|
+
|
|
154
|
+
### NFR-A11Y: Accessibility
|
|
155
|
+
|
|
156
|
+
| ID | Requirement | Source |
|
|
157
|
+
|----|-------------|--------|
|
|
158
|
+
| NFR-A11Y-01 | Web console SHALL provide aria-label attributes on interactive elements | `packages/krate/web/` |
|
|
159
|
+
| NFR-A11Y-02 | Web console SHALL support keyboard navigation | `keyboard-shortcuts.jsx` |
|
|
160
|
+
| NFR-A11Y-03 | Web console SHALL provide command palette (Cmd+K) for quick access | `command-palette.jsx` |
|
|
161
|
+
|
|
162
|
+
### NFR-RESPONSIVE: Responsiveness
|
|
163
|
+
|
|
164
|
+
| ID | Requirement | Source |
|
|
165
|
+
|----|-------------|--------|
|
|
166
|
+
| NFR-RESP-01 | Web console SHALL adapt layout for mobile viewports | `packages/krate/web/` CSS |
|
|
167
|
+
| NFR-RESP-02 | Web console SHALL provide dark/light theme with system preference | `theme-runtime.jsx` |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## 3. Integration Requirements
|
|
172
|
+
|
|
173
|
+
### INT-K8S: Kubernetes
|
|
174
|
+
|
|
175
|
+
| ID | Requirement | Source |
|
|
176
|
+
|----|-------------|--------|
|
|
177
|
+
| INT-K8S-01 | System SHALL store CONFIG resources as Kubernetes CRDs | `kubernetes-controller.js` |
|
|
178
|
+
| INT-K8S-02 | System SHALL use kubectl for resource operations | `kubernetes-controller.js:spawn` |
|
|
179
|
+
| INT-K8S-03 | System SHALL define 75 CRDs under `krate.a5c.ai/v1alpha1` | `kubernetes-controller.js:KRATE_RESOURCES` |
|
|
180
|
+
| INT-K8S-04 | System SHALL scope resources to org namespaces (`krate-org-{org}`) | `org-scoping.js:orgNamespaceName` |
|
|
181
|
+
| INT-K8S-05 | System SHALL manage PersistentVolumeClaims for workspaces | `agent-workspace-controller.js` |
|
|
182
|
+
| INT-K8S-06 | System SHALL use `x-kubernetes-preserve-unknown-fields` for extensibility | CRD definitions |
|
|
183
|
+
|
|
184
|
+
### INT-GITEA: Gitea Integration
|
|
185
|
+
|
|
186
|
+
| ID | Requirement | Source |
|
|
187
|
+
|----|-------------|--------|
|
|
188
|
+
| INT-GITEA-01 | System SHALL use Gitea for repository hosting | `gitea-service.js` |
|
|
189
|
+
| INT-GITEA-02 | System SHALL access Gitea tree/blob/branch APIs | `gitea-backend.js` |
|
|
190
|
+
| INT-GITEA-03 | System SHALL sync SSH keys with Gitea repositories | `gitea-service.js` |
|
|
191
|
+
|
|
192
|
+
### INT-ATLAS: Atlas Graph
|
|
193
|
+
|
|
194
|
+
| ID | Requirement | Source |
|
|
195
|
+
|----|-------------|--------|
|
|
196
|
+
| INT-ATLAS-01 | SDK SHALL provide Atlas graph search client | `sdk/src/atlas-graph-client.js` |
|
|
197
|
+
| INT-ATLAS-02 | SDK SHALL expose stack layers and composition facets | `sdk/src/atlas-graph-client.js:STACK_LAYERS, COMPOSITION_FACETS` |
|
|
198
|
+
| INT-ATLAS-03 | Web console SHALL provide Atlas search API route | `web/app/api/atlas/search/route.js` |
|
|
199
|
+
|
|
200
|
+
### INT-GITHUB: GitHub Integration
|
|
201
|
+
|
|
202
|
+
| ID | Requirement | Source |
|
|
203
|
+
|----|-------------|--------|
|
|
204
|
+
| INT-GH-01 | System SHALL support GitHub as OAuth sign-in provider | `auth.js:github` |
|
|
205
|
+
| INT-GH-02 | System SHALL ingest GitHub webhooks with signature verification | `external/webhook-controller.js` |
|
|
206
|
+
| INT-GH-03 | System SHALL provide GitHub adapter for git-forge operations | `external/github/git-forge.js` |
|
|
207
|
+
| INT-GH-04 | System SHALL provide GitHub adapter for issue tracking | `external/github/issue-tracking.js` |
|
|
208
|
+
| INT-GH-05 | System SHALL provide GitHub adapter for CI/CD operations | `external/github/cicd.js` |
|
|
209
|
+
| INT-GH-06 | System SHALL handle GitHub App authentication | `external/github/auth.js` |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 4. Deployment Requirements
|
|
214
|
+
|
|
215
|
+
| ID | Requirement | Source |
|
|
216
|
+
|----|-------------|--------|
|
|
217
|
+
| DEP-HELM-01 | System SHALL deploy via Helm chart | Helm chart directory |
|
|
218
|
+
| DEP-HELM-02 | Helm chart SHALL manage CRD lifecycle | Chart templates |
|
|
219
|
+
| DEP-HELM-03 | Helm chart SHALL create org namespace on install | Chart templates |
|
|
220
|
+
| DEP-DOCKER-01 | System SHALL use multi-stage Docker builds | Dockerfile |
|
|
221
|
+
| DEP-DOCKER-02 | Deployment SHALL run multi-container pods (api, controllers, web, webhook-worker) | Helm values |
|
|
222
|
+
| DEP-AKS-01 | System SHALL deploy to Azure Kubernetes Service | Deployment docs |
|
|
223
|
+
| DEP-AKS-02 | System SHALL use Azure Container Registry for images | Deployment docs |
|
|
224
|
+
| DEP-CERT-01 | System SHALL use cert-manager for TLS certificates | Ingress annotations |
|
|
225
|
+
| DEP-INGRESS-01 | System SHALL use nginx ingress controller for HTTP routing | Ingress resource |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 5. Testing Requirements
|
|
230
|
+
|
|
231
|
+
| ID | Requirement | Coverage | Source |
|
|
232
|
+
|----|-------------|----------|--------|
|
|
233
|
+
| TEST-CORE-01 | Core package SHALL have 1259 unit+integration tests | `node:test` | `packages/krate/core/package.json` |
|
|
234
|
+
| TEST-SDK-01 | SDK package SHALL have 73 export and integration tests | `node:test` | `packages/krate/sdk/tests/` |
|
|
235
|
+
| TEST-CLI-01 | CLI package SHALL have 51 command and MCP protocol tests | `node:test` | `packages/krate/cli/tests/` |
|
|
236
|
+
| TEST-E2E-01 | Core SHALL have 3 end-to-end validation tests | `npm run e2e` | `packages/krate/core/package.json` |
|
|
237
|
+
| TEST-SMOKE-01 | Core SHALL have 21 MVP smoke assertions | `npm run smoke` | `packages/krate/core/package.json` |
|
|
238
|
+
| TEST-WEB-01 | Web console SHALL have build validation tests | `npm run build` | `packages/krate/web/package.json` |
|