fix: Resolve ADR/Requirements inconsistencies from comprehensive review

## ADR Compliance Section Fixes

- ADR-007: Fixed invalid NFR-501 and TC-002 references
  - NFR-501 → NFR-402 (Fault tolerance)
  - TC-002 → Core Principle (self-hostability)

- ADR-008: Fixed invalid NFR-501 reference
  - Added TC-006 (pgvector extension)

- ADR-011: Fixed invalid FR-201-205 and NFR-201 references
  - Now correctly references FR-401-404 (Issue Tracking series)

- ADR-012: Fixed invalid FR-401, FR-402, NFR-302 references
  - Now references new FR-800 series (Cost & Budget Management)

- ADR-014: Fixed invalid FR-601-605 and FR-102 references
  - Now correctly references FR-203 (Autonomy Level Configuration)

## ADR-007 Model Identifier Fix

- Changed "claude-sonnet-4-20250514" to "claude-3-5-sonnet-latest"
- Matches documented primary model (Claude 3.5 Sonnet)

## New Requirements Added

- FR-801: Real-time cost tracking
- FR-802: Budget configuration (soft/hard limits)
- FR-803: Budget alerts
- FR-804: Cost analytics

This resolves all HIGH priority inconsistencies identified by the
4-agent parallel review of ADRs against requirements and architecture.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-29 14:13:26 +01:00
parent de47d9ee43
commit f138417486
6 changed files with 90 additions and 12 deletions

View File

@@ -297,7 +297,7 @@ def create_agent_graph() -> StateGraph:
# 4. LiteLLM handles LLM calls with failover
async def think_node(state: AgentState) -> AgentState:
response = await litellm.acompletion(
model="claude-sonnet-4-20250514",
model="claude-3-5-sonnet-latest", # Claude 3.5 Sonnet (primary)
messages=state["messages"],
fallbacks=["gpt-4-turbo", "ollama/llama3"],
metadata={"agent_id": state["agent_id"]},
@@ -373,11 +373,11 @@ class StoryWorkflow(Machine):
## Compliance
This decision aligns with:
- **FR-101-105**: Agent orchestration requirements
- **FR-101-105**: Agent management requirements (Type-Instance pattern)
- **FR-301-305**: Workflow execution requirements
- **NFR-501**: Self-hosting requirement (all components MIT/BSD licensed)
- **NFR-402**: Fault tolerance (workflow durability, crash recovery)
- **TC-001**: PostgreSQL as primary database
- **TC-002**: Redis for caching and messaging
- **Core Principle**: Self-hostability (all components MIT/BSD licensed)
## Alternatives Not Chosen

View File

@@ -162,8 +162,9 @@ If scale requires it, migrate to Qdrant (self-hosted, open-source) with the same
This decision aligns with:
- FR-103: Agent domain knowledge (RAG)
- NFR-501: Self-hostability requirement
- TC-001: PostgreSQL as primary database
- TC-006: pgvector extension required
- Core Principle: Self-hostability (pgvector is open source)
---

View File

@@ -224,8 +224,10 @@ def process_sync_outbox():
## Compliance
This decision aligns with:
- FR-201-205: Issue tracking integration
- NFR-201: Multi-provider support
- FR-401: Issue hierarchy
- FR-402: External issue synchronization
- FR-403: Issue CRUD operations
- NFR-201: Horizontal scalability (multi-provider architecture)
---

View File

@@ -190,9 +190,12 @@ GROUP BY project_id, DATE(timestamp);
## Compliance
This decision aligns with:
- FR-401: Cost tracking per agent/project
- FR-402: Budget enforcement
- NFR-302: Budget alert system
- FR-801: Real-time cost tracking
- FR-802: Budget configuration (soft/hard limits)
- FR-803: Budget alerts
- FR-804: Cost analytics
- NFR-602: Logging and monitoring (cost observability)
- BR-002: Cost overruns from API usage (risk mitigation)
---

View File

@@ -272,8 +272,9 @@ class ApprovalContextBuilder:
## Compliance
This decision aligns with:
- FR-601-605: Human-in-the-loop requirements
- FR-102: Autonomy level configuration
- FR-203: Autonomy level configuration
- FR-301-305: Workflow checkpoints (approval gates at workflow boundaries)
- NFR-402: Fault tolerance (approval state persistence)
---