Skip to content

Commit 811b2e4

Browse files
docs(v2.0): features/value doc + plan↔code↔docs consistency review
- docs/FEATURES.md (new): feature summaries + real value, what's new since 1.0, first-of-its-kind/differentiated (hedged), full catalog + roadmap. Sourced from the repo + the author's "Agentic AI Architectures" manuscript (ch08/ch09). - Architect consistency review (master plan ↔ code ↔ docs): fixed stale-doc bugs in place — SPEC.md (THINKING emit, KaibanHandlerResult/signal, 20KB→bytes), ACTOR_MODEL.md (state diagram), SECURITY_FEATURES.md + ASVS-5.0 (paths + the now-built global limiter), README/EXAMPLES (linear-backoff wording, Vite 8, Node ≥20.19, test count 1155), .env.example (VALID_HITL_DECISIONS default + ROLE var), ADR-005 (sanitizeTraceHeaders note), llms.txt (a2a-executor ref). - docs/roadmap/V2.1-ROADMAP.md: recorded genuine deferrals (CR-1 A2A forward-compat gRPC/webhook/JWS/lifecycle states; CR-2 supervision backoff+jitter/loop guards/ half-open breaker; CR-3 provenance gate-validator + egress; CR-4 Evals/Langfuse/ Promptfoo/anti-hallucination harness). Verdict: v2.0 plan/code/docs are consistent. No code changes; CI stays green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent dcdea70 commit 811b2e4

11 files changed

Lines changed: 595 additions & 26 deletions

File tree

.env.example

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ MESSAGING_DRIVER=bullmq
3333
# Leave unset to use ConsoleSpanExporter (dev mode — verbose, not suitable for production)
3434
# OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318/v1/traces
3535

36-
# Comma-separated list of agent IDs this worker node serves (required)
36+
# Process role for the single combined image (src/main/index.ts dispatches on it).
37+
# ROLE=gateway → HTTP / WebSocket / A2A / MCP front door only (no task-consuming actors)
38+
# ROLE=worker → loads the AGENT_IDS pool and wires real LLM-backed handlers
39+
# Unset defaults to "gateway". (ADR-013 gateway/worker split.)
40+
# ROLE=gateway
41+
42+
# Comma-separated list of agent IDs this worker node serves (required for ROLE=worker)
3743
AGENT_IDS=researcher,writer,editor
3844

3945
# LLM Configuration — Standard OpenAI OR OpenRouter (or any OpenAI-compatible API)
@@ -146,8 +152,10 @@ OPENAI_API_KEY=your_openai_api_key_here
146152
# ── HITL Decision Options ───────────────────────────────────────
147153
# Comma-separated list of valid human decisions for the HITL gate.
148154
# The gateway validates incoming board decisions against this list.
149-
# VIEW is informational only (re-prompts terminal); it does not resolve the gate.
150-
VALID_HITL_DECISIONS=PUBLISH,REVISE,REJECT,VIEW
155+
# This matches the code default (src/main/config.ts). Do NOT add VIEW here:
156+
# VIEW is an interactive terminal-only action that re-prompts the orchestrator
157+
# prompt — it does not resolve the gate and is NOT a valid board/gateway decision.
158+
VALID_HITL_DECISIONS=PUBLISH,REVISE,REJECT
151159

152160
# ── Agent Identity (set per-node process / container) ───────────
153161
# Each agent node reads its own identity from AGENT_ID.

EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ interactive Human-in-the-Loop Approve / Revise / Reject controls.
571571
### Prerequisites
572572

573573
- Any kaiban-distributed gateway running (e.g. `./scripts/blog-team.sh start`)
574-
- Node.js ≥ 18 (board only; gateway still needs ≥ 22)
574+
- Node.js ≥ 20.19 (board uses Vite 8, which needs Node 20.19+/22.12+; gateway needs ≥ 22)
575575

576576
### Start
577577

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ stateDiagram-v2
277277
TODO --> DOING : Worker Claims Task
278278
279279
DOING --> DONE : Inference Success
280-
DOING --> TODO : Retry (max 3×, exp. backoff)
280+
DOING --> TODO : Retry (max 3×, linear backoff)
281281
DOING --> BLOCKED : Max Retries Exceeded (→ kaiban-events-failed)
282282
283283
DOING --> AWAITING_VALIDATION : HITL Required
@@ -956,7 +956,7 @@ kaiban-distributed/
956956
│ │ └── circuit-breaker.ts # ICircuitBreaker — success/failure tracking
957957
│ ├── application/
958958
│ │ └── actor/
959-
│ │ └── AgentActor.ts # Core: retry×3 + exp backoff, DLQ, firewall, circuit breaker
959+
│ │ └── AgentActor.ts # Core: retry×3 + linear backoff, DLQ, firewall, circuit breaker
960960
│ ├── adapters/
961961
│ │ ├── gateway/
962962
│ │ │ ├── GatewayApp.ts # Express: /health, agent-card, /a2a/rpc, 404
@@ -989,7 +989,7 @@ kaiban-distributed/
989989
│ ├── index.ts # Composition root: wires all layers + security deps, starts HTTP + actors
990990
│ └── config.ts # loadConfig(); TLS config; security feature flags
991991
├── tests/
992-
│ ├── unit/ # 769 unit tests — mirrors src/ structure, 100% coverage
992+
│ ├── unit/ # 1155 unit tests — mirrors src/ structure, 100% coverage
993993
│ └── e2e/
994994
│ ├── distributed-execution.test.ts # BullMQ: execution, fault tolerance, state sync
995995
│ ├── fan-out-fan-in.test.ts # Parallel fan-out/fan-in workflow (7 scenarios)
@@ -1027,7 +1027,7 @@ kaiban-distributed/
10271027
│ │ ├── store/boardStore.ts # Zustand: applyDelta, setConnectionStatus, addLog
10281028
│ │ ├── socket/socketClient.ts # Socket.io singleton + sendHitlDecision()
10291029
│ │ └── components/ # layout/ · workflow/ · agents/ · kanban/ · economics/ · log/
1030-
│ ├── package.json # React 18, Vite 6, Tailwind, socket.io-client, zustand
1030+
│ ├── package.json # React 18, Vite 8, Tailwind, socket.io-client, zustand
10311031
│ └── .env.example # VITE_GATEWAY_URL=http://localhost:3000
10321032
├── docker-compose.yml # Full root stack (Redis + Kafka + single worker)
10331033
├── Dockerfile # Multi-stage: builder (npm install + tsc) → runner (non-root)

0 commit comments

Comments
 (0)