Back to stack
Dec 30, 2025
3 min read

InstruQtor – The Architect

The Principal Software Architect that breaks down high-level tasks with enforced briq sensitivity (v1.0.0)

InstruQtor

The instruQtor agent acts as the “Principal Software Architect.” Its primary role is to take a high-level task (an “input document”) and break it down into a series of smaller, granular sub-tasks called “briqs.”

v1.0.0 Highlight: Enforced Briq Sensitivity

InstruQtor now enforces briq counts with hard min/max ranges:

SensitivityRangeTarget
91-1Monolithic
73-5RECOMMENDED
58-12Component-level
315-20Standard
040-60Atomic

Enforcement Logic:

  • Too few briqs → Retry with stronger prompt (up to 2 retries)
  • Too many briqs → Intelligently merge consecutive briqs

How it works

1. Input Processing:

  • Takes an input_file (typically cyQleN_tasq.md) and an output_dir for generated briqs
  • Cleans the input content to remove non-printable characters

2. Configuration Loading:

  • Loads config.yaml to determine its AI provider and model
  • Retrieves QONQ_MODE and QONQ_SENSITIVITY environment variables

3. Codebase Context (Qodeyard):

  • Generates a tree-like representation of existing files in qodeyard
  • This context ensures the instruQtor considers the current codebase structure

4. AI Prompt Construction:

  • Constructs a detailed prompt positioning the AI as “Principal Software Architect”
  • Includes “CRITICAL RULES” based on QONQ_SENSITIVITY level
  • Includes “ARCHITECTURAL DIRECTIVES” for task breakdown guidance
  • Embeds qodeyard_tree and task_content

5. Briq Parsing and Output:

  • Parses the AI’s XML output to extract briq titles and content
  • Falls back to treating entire output as single briq if parsing fails
  • Generates slugified filenames (e.g., cyqle001_tasq01_briq001_setup_project.md)

What’s configurable

config.yaml (under agents.instruqtor):

  • provider (string): AI provider (e.g., ‘openai’, ‘anthropic’, ‘gemini’, ‘deepseek’, ‘qwen’)
  • model (string): AI model (e.g., ‘gpt-4o’, ‘claude-3-opus’)

Environment Variables:

  • QONQ_MODE: Operational mode influencing AI behavior
  • QONQ_SENSITIVITY (0-9): Controls breakdown granularity:
    • 0 (Atomic): Max granularity, 50+ briqs
    • 3 (Standard): Default, 15-20 briqs
    • 5 (Component-level): 8-12 briqs
    • 9 (Monolithic): Exactly 1 briq

Implicit Configuration:

  • Contents of qodeyard directory provide current project structure context