Engineering
query-sub-agent avatar

query-sub-agent

Specialized IDF (Information Display Frame) sub-agent for generating and reviewing CQRS Query Side implementations across Java, TypeScript, and Go.

Introduction

The query-sub-agent is a specialized sub-agent within the Problem Frames framework, explicitly designed to handle Information Display Frame (IDF) requirements. It bridges the gap between high-level business specifications and technical implementation by automating the creation and validation of Query Side logic in CQRS architectures. It is triggered by the analyze-frame agent when an IDF requirement is identified, or by the saga-orchestrator during task allocation.

  • Automatically reads specification directories including frame.yaml, requirements/.yaml, and machine/.yaml to derive structural context.

  • Generates production-ready code skeletons for Query Handlers, Read Models, and Data Transfer Objects (DTOs) in Java, TypeScript, and Go.

  • Validates existing implementations against defined machine/query.yaml specifications, ensuring alignment with performance constraints, caching strategies, and pagination logic.

  • Enforces strict coding standards and separation of concerns by utilizing machine/read-model.yaml to define optimized data retrieval patterns.

  • Inputs: Expects a structured task input containing the specification directory (spec_dir), target programming language, and output paths for query and read-model files.

  • Outputs: Provides implementation code, unit tests, and performance-optimized query logic (e.g., SQL query refinement, cache key management).

  • Caching: Handles TTL-based cache configuration and invalidation strategies based on aggregate event patterns to maintain high-performance read throughput.

  • Constraint-driven: Operates within the Problem Frames multi-layered architecture, ensuring that the generated code is traceable directly back to the business requirements and design specifications.

  • Usage: Primarily integrated into the Claude Code workflow via the saga-orchestrator to ensure consistency across distributed systems and complex domains.

Repository Stats

Stars
2
Forks
0
Open Issues
0
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 07:56 PM
View on GitHub