Files
Profa 2253d05618 feat: flatten project structure — archive v2, promote v3 to root
Remove the nested v3/ subdirectory by moving all active source code,
tests, configs, and assets directly to the project root. Archive v2/
(dead code, 847MB) to v2-archive.tar.gz.

Key changes:
- Move v3/src/ → src/, v3/tests/ → tests/, v3/packages/ → packages/
- Move v3/tsconfig.json, v3/vitest.config.ts to root
- Merge v3/package.json into root package.json (ESM, scripts, deps, exports)
- Merge v3/scripts/ into scripts/, v3/implementation/ into docs/implementation/
- Update all CI workflows to remove "cd v3 &&" and v3/ path prefixes
- Fix all init installer path resolution (3-level-up → 2-level-up)
- Fix hooks to use "node ./dist/cli/bundle.js" instead of bare "aqe"
- Update settings.json ADR/DDD directories to docs/implementation/
- Fix helper scripts (statusline, adr-compliance, ddd-tracker, guidance-hooks)
- Update 58 agent definitions: aqe/v3/ → aqe/ memory namespaces
- Update 15 guidance shards: v3/src/ → src/ path references
- Fix sync interfaces: remove v3/ and v2/ path references
- Fix test path calculations (process.cwd() + '..' no longer needed)
- Fix flaky perf test threshold (500ms → 1000ms for CI environments)
- Fix complexity-analyzer test to match ADR-051 keyword-based eligibility

Build passes, 17,901 tests pass, CLI and MCP bundles verified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:35:41 +00:00

98 lines
6.4 KiB
Markdown

# Agentic QE v3 - Domain-Driven Design Documentation
This directory contains Domain-Driven Design (DDD) documentation for each bounded context in the Agentic QE v3 platform.
## Bounded Contexts Overview
The Agentic QE v3 platform is organized into **12 bounded contexts**, each responsible for a specific aspect of quality engineering:
| Domain | Responsibility | Key Capabilities |
|--------|----------------|------------------|
| [Test Generation](./test-generation.md) | AI-powered test creation | TDD, property-based testing, pattern learning |
| [Test Execution](./test-execution.md) | Parallel test running | Flaky detection, retries, prioritization |
| [Coverage Analysis](./coverage-analysis.md) | Code coverage intelligence | O(log n) gap detection, risk scoring |
| [Quality Assessment](./quality-assessment.md) | Quality gate decisions | Metrics analysis, deployment advice |
| [Defect Intelligence](./defect-intelligence.md) | Defect prediction | Root cause analysis, regression risk |
| [Code Intelligence](./code-intelligence.md) | Codebase understanding | Knowledge graph, semantic search |
| [Requirements Validation](./requirements-validation.md) | Pre-development QA | BDD generation, testability scoring, SFDIPOT |
| [Security Compliance](./security-compliance.md) | Security testing | SAST/DAST, vulnerability analysis |
| [Contract Testing](./contract-testing.md) | API contracts | Consumer-driven contracts, schema validation |
| [Visual Accessibility](./visual-accessibility.md) | Visual & a11y testing | Screenshot comparison, WCAG compliance |
| [Chaos Resilience](./chaos-resilience.md) | Reliability testing | Chaos engineering, load testing |
| [Learning Optimization](./learning-optimization.md) | Continuous improvement | Pattern learning, knowledge transfer |
## Context Map
```
┌─────────────────────────────────────┐
│ Queen Coordinator │
│ (Orchestration & Task Routing) │
└─────────────────────────────────────┘
│
┌────────────────────────────────┼────────────────────────────────┐
│ │ │
┌───────────▼───────────┐ ┌────────────▼────────────┐ ┌────────────▼────────────┐
│ Pre-Development │ │ Execution Layer │ │ Intelligence Layer │
│ │ │ │ │ │
│ • Requirements Val. │◄────►│ • Test Generation │◄────►│ • Code Intelligence │
│ • Contract Testing │ │ • Test Execution │ │ • Defect Intelligence │
│ │ │ • Coverage Analysis │ │ • Learning Optimization │
└───────────────────────┘ └─────────────────────────┘ └─────────────────────────┘
│ │ │
│ │ │
┌───────────▼───────────┐ ┌────────────▼────────────┐ ┌────────────▼────────────┐
│ Quality Assurance │ │ Non-Functional Layer │ │ Reliability Layer │
│ │ │ │ │ │
│ • Quality Assessment │◄────►│ • Security Compliance │◄────►│ • Chaos Resilience │
│ │ │ • Visual Accessibility │ │ │
└───────────────────────┘ └─────────────────────────┘ └─────────────────────────┘
```
## Cross-Cutting Concerns
### Event Bus
All domains communicate via an event-driven architecture using the shared `EventBus`:
- Domain events are published after significant state changes
- Other domains can subscribe to events they care about
- Enables loose coupling between bounded contexts
### Memory Backend
All domains share access to the unified memory backend:
- HNSW-indexed vector search (O(log n) semantic queries)
- Namespace isolation per domain
- TTL-based expiration for temporal data
### MinCut Integration (ADR-047)
Domains can participate in topology-aware routing:
- Report health status to Queen coordinator
- Participate in self-healing workflows
- Optimize cross-domain communication paths
### Consensus Integration (MM-006)
Critical findings can be verified via multi-model consensus:
- Configurable severity thresholds
- Auto-approval for high-confidence results
- Audit trail for verification decisions
## Shared Kernel
The following types are shared across all bounded contexts:
```typescript
// From src/shared/types
DomainName, DomainEvent, Result, Severity, Priority, AgentId
// From src/shared/value-objects
FilePath, Version, TimeRange, RiskScore
```
## Architecture Decision Records
Relevant ADRs for domain architecture:
- **ADR-001**: Deep agentic-flow@alpha integration
- **ADR-006**: Unified Memory Service
- **ADR-009**: Hybrid Memory Backend
- **ADR-047**: MinCut topology awareness
- **ADR-051**: LLM-powered analysis
- **MM-006**: Multi-model consensus verification