5-layer pipeline deep dive
The Aucert platform processes mobile application testing through a 5-layer AI pipeline. Each layer is a distinct processing stage connected by the MCP (Model Context Protocol) message envelope.
MCP message envelope
All inter-layer communication uses the MCPMessage protobuf (defined in proto/pipeline.proto):
message MCPMessage {
string task_id = 1;
string source_layer = 2;
string target_layer = 3;
bytes payload = 4;
map<string, string> context_snapshot = 5;
double confidence_score = 6;
string trace_id = 7;
int64 timestamp_ms = 8;
}
Layer 1: Generation
Location: backend/platform/src/main/kotlin/.../domain/generation/
The Generation layer takes input from the Knowledge Graph and produces test scenarios. It analyzes app structure (screens, navigation flows, API contracts) and generates comprehensive test plans that cover:
- Critical user paths
- Edge cases from node property combinations
- Regression scenarios from historical bug patterns
- Accessibility checks
MVP model: Claude Sonnet (single model, no routing yet).
Layer 2: Execution
Location: backend/platform/src/main/kotlin/.../domain/execution/
The Execution layer runs generated test scenarios on Android emulators. It performs:
- App installation and launch
- UI interactions (tap, swipe, text input, scroll)
- Screenshot capture at each step
- Execution trace recording with timing data
Device Twin overlay: Planned for Phase 2. Will augment emulator results with predicted real-device behavior.
Layer 3: Analysis
Location: backend/platform/src/main/kotlin/.../domain/analysis/
The Analysis layer applies visual reasoning to screenshots and execution logs. It compares expected vs actual behavior using multimodal AI models, detecting:
- UI regressions (layout shifts, missing elements, color changes)
- Functional failures (wrong screen, error states, crashes)
- Performance issues (slow transitions, unresponsive UI)
Layer 4: Decision
MVP: Confidence threshold only — if the Analysis layer's confidence score exceeds the configured threshold, the test passes. Below threshold, it's flagged for review.
Full version (Phase 2+): 4-stage Verification Cascade with escalating cost and rigor. See Verification Cascade.
Layer 5: Reporting
MVP: Dashboard page showing test results, bug reports, and metrics.
Full version (Phase 2+): Structured bug reports with Jira/Linear integration, team notifications, and feedback loops into the Knowledge Graph.
Interface + adapter pattern
All layers communicate through interfaces, not concrete implementations. This enables:
- Local mode (monolith): All layers in one JVM process, direct function calls
- Remote mode (microservices): Each layer as a separate service, gRPC calls
A config flag (aucert.pipeline.mode=local|remote) switches between modes. See AGENTS.md for interface rules.
What's next
- Knowledge Graph internals — How the KG engine works
- Verification Cascade — Multi-stage decision making