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

@@ -806,6 +806,77 @@ Each agent type represents a specialized role in the software development lifecy
- [ ] AC-703.5: Test documentation (how to run, what's covered)
- [ ] AC-703.6: Performance test results (if applicable)
### 4.8 Cost & Budget Management (FR-800 Series)
#### FR-801: Real-Time Cost Tracking
| Attribute | Value |
|-----------|-------|
| **ID** | FR-801 |
| **Title** | Real-Time Cost Tracking |
| **Description** | System shall track LLM API costs per agent, project, and sprint in real-time |
| **Priority** | Must Have |
| **Dependencies** | FR-102 |
**Acceptance Criteria:**
- [ ] AC-801.1: Token usage captured for every LLM call
- [ ] AC-801.2: Cost calculated using provider pricing
- [ ] AC-801.3: Cost attributed to agent, project, and sprint
- [ ] AC-801.4: Real-time cost dashboard updates via SSE
- [ ] AC-801.5: Historical cost data persisted for analytics
- [ ] AC-801.6: Cost breakdown by model type available
#### FR-802: Budget Configuration
| Attribute | Value |
|-----------|-------|
| **ID** | FR-802 |
| **Title** | Budget Configuration |
| **Description** | System shall support configurable budget limits per project with soft and hard enforcement |
| **Priority** | Must Have |
| **Dependencies** | FR-801 |
**Acceptance Criteria:**
- [ ] AC-802.1: Daily, weekly, and monthly budget limits configurable
- [ ] AC-802.2: Soft limits trigger alerts and model downgrades
- [ ] AC-802.3: Hard limits block LLM requests
- [ ] AC-802.4: Budget inheritance from organization to project
- [ ] AC-802.5: Budget override capability for administrators
#### FR-803: Budget Alerts
| Attribute | Value |
|-----------|-------|
| **ID** | FR-803 |
| **Title** | Budget Alerts |
| **Description** | System shall send notifications when budget thresholds are approached or exceeded |
| **Priority** | Should Have |
| **Dependencies** | FR-801, FR-802 |
**Acceptance Criteria:**
- [ ] AC-803.1: Configurable alert thresholds (e.g., 50%, 80%, 100%)
- [ ] AC-803.2: SSE notifications for real-time alerts
- [ ] AC-803.3: Email notifications for budget events
- [ ] AC-803.4: Alert history logged in audit trail
- [ ] AC-803.5: Auto-downgrade to cheaper models on soft limit
#### FR-804: Cost Analytics
| Attribute | Value |
|-----------|-------|
| **ID** | FR-804 |
| **Title** | Cost Analytics |
| **Description** | System shall provide cost analytics and optimization recommendations |
| **Priority** | Nice to Have |
| **Dependencies** | FR-801 |
**Acceptance Criteria:**
- [ ] AC-804.1: Cost trends visualization (daily, weekly, monthly)
- [ ] AC-804.2: Cost comparison across projects
- [ ] AC-804.3: Agent efficiency metrics (cost per task)
- [ ] AC-804.4: Model usage breakdown
- [ ] AC-804.5: Cost optimization recommendations
---
## 5. Non-Functional Requirements