QonQrete is a Secure AI Construction Loop System, using a Multi-Agent Pipeline Orchestrator in a Sandbox environment with YAML Configuration. In short: it spawns 3 AI agents in a sandbox/container and makes them work together on tasks. It can run with a hard requirement for user approval between steps, or in a fully autonomous mode where it keeps running until the user decides to stop it.
QonQrete is a multi-agent orchestration system designed for secure, observable, and human-in-the-loop software construction. It operates on the principle of a secure build environment (Qage), managed by a host-level orchestrator (Qrane).
This architecture ensures that AI-generated code and processes cannot affect the host system, providing a robust framework for autonomous and semi-autonomous development.
Version: v1.0.2-stable (See VERSION file for the canonical version).
Note on Experimental Features:
The following features are marked as [EXPERIMENTAL] and may have bugs:
- TUI Mode (
-t/--tui): Text-based User Interface- Microsandbox (
-M/--msb): Alternative to Docker runtimeWe welcome community contributions! If you encounter any issues or have suggestions, please report them.
The briq sensitivity scale has been INVERTED for more intuitive usage:
- Higher number = MORE briqs (no more confusion!)
- Extended scale: 0-16 (was 0-9)
- New enterprise-level granularity options (10-16)
| Level | Name | Briq Range | Use Case |
|---|---|---|---|
| 0 | Monolithic | 1 | Single-file scripts |
| 1 | Very Broad | 2-3 | Backend/Frontend split |
| 2 | Broad | 3-5 | Large components |
| 3 | Feature | 5-8 | Feature-level |
| 4 | Component | 8-12 | Component-level |
| 5 | Balanced | 10-15 | β RECOMMENDED DEFAULT |
| 6 | Standard | 15-20 | Most files separate |
| 7 | High | 20-30 | Detailed split |
| 8 | Very High | 30-40 | Fine-grained |
| 9 | Atomic | 40-60 | Maximum detail |
| 10-16 | Enterprise | 50-250 | Mega-projects |
New -n/--qonstruction-name flag for automated pipelines:
./qonqrete.sh run -a -b 6 -c 3 -n myprojectQontrabender now only activates when using Gemini as the construqtor provider (it's for Gemini's context caching).
The first stable production release! This fixes the critical briq sensitivity inconsistency bug.
The Problem: briq_sensitivity was just a "hint" to the AI, resulting in wildly inconsistent outputs (1-10 briqs with same setting).
The Fix: Briq counts are now ENFORCED with hard min/max ranges:
- Too few briqs β System retries with stronger prompt
- Too many briqs β System merges briqs automatically
| Level | Name | Briq Range | Use Case |
|---|---|---|---|
| 9 | Monolithic | 1 | Single-file scripts |
| 8 | Very Broad | 2-3 | Backend/Frontend split |
| 7 | Broad | 3-5 | OLD DEFAULT |
| 6 | Feature | 5-8 | Feature-level decomposition |
| 5 | Component | 8-12 | Component-level |
| 4 | Balanced | 10-15 | Medium complexity |
| 3 | Standard | 15-20 | Standard granularity |
| 2 | High Gran. | 20-30 | High granularity |
| 1 | Very High | 30-40 | Very fine-grained |
| 0 | Atomic | 40-60 | Maximum decomposition |
| Project Type | Sensitivity | Cycles | Expected Result |
|---|---|---|---|
| Simple (API, web server) | 7 | 4 | B+ to A- grade |
| Medium (full-stack app) | 6 | 5 | B to B+ grade |
| Complex (multi-service) | 5 | 6 | Comprehensive coverage |
| Setting | Old | New |
|---|---|---|
briq_sensitivity |
8 | 7 |
auto_cycle_limit |
2 | 4 |
Less noise, more signal:
| Component | Change |
|---|---|
| TasqLeveler | Only [TasqLeveler] status lines shown |
| InspeQtor | Only final assessment displayed |
| Table dividers | Hidden from output |
| pycg warnings | Removed (package broken, using jedi instead) |
Two critical bugs discovered during multi-cycle builds:
| Issue | Fix |
|---|---|
| Skeleton overwrites code | ConstruQtor now detects and skips Qompressor skeleton markers |
| Exit code 1 after inspeqtor | Removed duplicate loqal_verifier from pipeline |
The skeleton bug occurred when AI copied bloq.d/ skeletons from context back to qodeyard/, overwriting working code with broken # ... (body stripped by Qompressor) ... stubs.
Fixes discovered during real-world multi-cycle builds:
| Issue | Fix |
|---|---|
| Cache write errors | Added --tmpfs /home/qrane/.cache:rw,size=500m for model caching |
| PATH issues | Added ENV PATH="/usr/local/bin:${PATH}" to Dockerfile |
| Setting | New Default | Previous |
|---|---|---|
briq_sensitivity |
6 (fine-grained) | 3 |
auto_cycle_limit |
3 cycles | 7 |
- Added
worqspace/qonstructions/*to.gitignoreand.dockerignore - Qonstructions are now excluded from version control (user-specific outputs)
No more losing your work! QonQrete now supports resuming from previous runs and saving projects permanently.
| Feature | Command | Description |
|---|---|---|
| Resume (Interactive) | ./qonqrete.sh resume |
kubectx-style picker for previous Qages |
| Resume (Direct) | ./qonqrete.sh resume -q qage_20251226 |
Resume specific Qage |
| Qonstructions | Auto-prompt after run | Save completed runs to qonstructions/ |
| Clean (Interactive) | ./qonqrete.sh clean |
Pick which Qage to delete |
| Clean (Specific) | ./qonqrete.sh clean -q qage_20251226 |
Delete specific Qage |
| Clean (All) | ./qonqrete.sh clean -A |
Delete all Qages |
QonQrete implements defense-in-depth security:
| Feature | Protection |
|---|---|
| Non-root execution | gosu drops to qrane user after permission fix |
| Read-only filesystem | Container root is read-only |
| Capability dropping | --cap-drop=ALL then adds only required caps |
| Resource limits | Memory (4GB), CPU (2 cores), PIDs (100) |
| Secure /tmp | --tmpfs /tmp:rw,noexec,nosuid,size=100m |
| Writable cache | --tmpfs /home/qrane/.cache:rw,size=500m |
Required Capabilities: SETUID, SETGID, CHOWN, FOWNER, DAC_OVERRIDE
| Feature | Protection |
|---|---|
| Path jail enforcement | All file ops validated against /qonq |
| Symlink protection | Paths resolved before validation |
| API timeouts | 5-minute timeout on all AI calls |
| Retry limits | Hard cap of 10 retries |
| Size limits | tasq.md: 100KB, generated files: 1MB |
| Config validation | JSON Schema validation for config.yaml |
| Feature | Protection |
|---|---|
| Pinned base image | Ubuntu with SHA256 digest |
| Pinned packages | requirements.txt with exact versions |
| Minimal install | --no-install-recommends |
Sqrapyard seeding is now opt-in to prevent accidental imports:
# Fresh start (default) - ignores sqrapyard
./qonqrete.sh run
# Seed from sqrapyard
./qonqrete.sh run -s
./qonqrete.sh run --sqrapyardNo tasq.md? No problem! QonQrete opens your $EDITOR automatically:
./qonqrete.sh run
# -> Opens vim/nano/code with template
# -> Write your task, save, run!| Old Flag | New Flag | Purpose |
|---|---|---|
-s/--msb |
-M/--msb |
Microsandbox mode |
| (none) | -s/--sqrapyard |
Seed from sqrapyard |
A new agent that supercharges your tasq.md automatically on Cycle 1:
| Enhancement | Impact |
|---|---|
| π¦ Dependency Graph | Prevents circular imports |
| π― Golden Path Tests | Defines success explicitly |
| π§ͺ Mock Infrastructure | Test without real services |
| π Success Criteria | Clear pass/fail |
| β±οΈ Phase Priority | Better token allocation |
+15-20% improvement in output quality!
# config.yaml - TasqLeveler uses instruqtor's config by default
agents:
tasqleveler:
provider: openai
model: gpt-4.1-miniOne simple rule for ALL cycles:
- π File EXISTS? β MODIFY/EXTEND it (never recreate)
- π File MISSING? β CREATE it (new modules welcome!)
No more rebuild-from-scratch bugs on multi-cycle builds!
A new policy-driven hybrid caching agent with Variable Fidelity:
- Policy-Based Configuration: All behavior controlled via
caching_policy.yaml - 6 Operational Modes:
local_fast,local_smart,cyber_bedrock,cyber_aggressive,paranoid_mincloud,debug_repro - Variable Fidelity: Intelligently mixes full code (MEAT) + skeletons (BONES)
- Schema Validation: Bad YAML can't brick your flow
- Improved Volatile Detection: Cycle-based, diff-based, git diff, mtime fallback
# Select mode in config.yaml
agents:
qontrabender:
policy_file: "./caching_policy.yaml"
mode: "local_smart"See QONTRABENDER.md for full documentation.
QonQrete now features a Triple-Core Memory System:
| Agent | Role | Output |
|---|---|---|
| Qompressor | Skeletonizer | bloq.d/ - AST-stripped code structures |
| Qontextor | Symbol Mapper | qontext.d/ - Semantic YAML maps |
| Qontrabender | Cache Bender | qache.d/ - Policy-driven cache payloads |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE DATA LAKE (Local) β
β β
β qodeyard/ (MEAT) bloq.d/ (BONES) qontext.d/ (SOUL) β
β Full source code AST skeletons Semantic maps β
β β
β β β β β
β βββββββββββββ¬βββββββββββββ΄βββββββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββ β
β β QONTRABENDER β β Policy-driven compositor β
β β caching_policy.yaml β β
β ββββββββββββ¬βββββββββββββ β
β βΌ β
β qache.d/ (Cache Ledger) β
β ββ Variable fidelity payloads β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Scenario: Medium-sized project (50 files, ~10,000 lines of code)
| Metric | Old Approach | Triple-Core | Improvement |
|---|---|---|---|
| Context Sent | 100,000 Tokens | ~4,000 Tokens | 96% Reduction |
| Indexing Cost | High (AI-based) | Zero (Local) | β Cheaper |
| Cost per Run | ~$0.25 (GPT-4o) | ~$0.01 (GPT-4o) | 25x Cheaper |
| Cache Reuse | None | Hash-based dedup | Near-zero churn |
- Isolation by Design: All agent execution occurs within the
Qage, a Docker container that acts as a secure sandbox. - Configuration-Driven: Agent models, modes, and policies defined in YAML.
- File-Based Communication: Agents communicate via markdown files, creating transparent audit trails.
- Human-in-the-Loop Control: CheQpoints pause for user review. Can be configured for autonomous mode.
- Local Sovereignty: Keep intelligence local with policy-driven caching.
qrane/: The Qrane orchestrator and CLIworqer/: AI agent scripts (tasqLeveler,instruQtor,construQtor,inspeQtor,qompressor,qontextor,qontrabender)worqspace/: Shared data plane with configuration and generated artifactsqonstructions/: Saved project outputs (NEW in v0.9.1)sqrapyard/: Input seed code for projects
- Enhance (
tasqLeveler): Cycle 1 only - Supercharges tasq with golden paths and mocks - Plan (
instruQtor): Reads thetasQand createsbriQfiles with detailed plans - Execute (
construQtor): Processes eachbriQand generates code inqodeyard/ - Review (
inspeQtor): Reviews generated code and producesreQapwith assessment - CheQpoint (
gateQeeper): Pauses for user command to proceed
- macOS: Docker Desktop for Mac
- Linux:
sudo apt-get install docker-ce docker-ce-cli containerd.io - Windows: Docker Desktop for Windows
Docker Desktop Users: Grant Docker permission to access the project directory via Settings > Resources > File Sharing.
Lightweight alternative to Docker. See Microsandbox repository.
See QUICKSTART.md for the full guide.
Export keys for your AI providers:
export OPENAI_API_KEY='your-key'
export GOOGLE_API_KEY='your-key'
export ANTHROPIC_API_KEY='your-key'
export DEEPSEEK_API_KEY='your-key'./qonqrete.sh init# Fresh start (default)
./qonqrete.sh run
# With sqrapyard seeding
./qonqrete.sh run -s
# With TUI [EXPERIMENTAL]
./qonqrete.sh run --tui --mode security
# Autonomous mode
./qonqrete.sh run --auto --briq-sensitivity 2
# User-gated mode
./qonqrete.sh run --user# Interactive picker
./qonqrete.sh resume
# Specific Qage
./qonqrete.sh resume -q qage_20251226_115701# Interactive picker
./qonqrete.sh clean
# Specific Qage
./qonqrete.sh clean -q qage_20251226_115701
# All Qages
./qonqrete.sh clean -Aagents:
tasqleveler:
provider: openai
model: gpt-4.1-mini # Runs once on Cycle 1
instruqtor:
provider: openai
model: gpt-4.1-mini
construqtor:
provider: gemini
model: gemini-2.5-pro
inspeqtor:
provider: openai
model: gpt-4.1
qontextor:
provider: local
model: qontextor
local_mode: complex
qompressor:
provider: local
model: qompressor
qontrabender:
provider: local
model: qontrabender
policy_file: "./caching_policy.yaml"
mode: local_smart
options:
use_qompressor: true
use_qontextor: true
use_qontrabender: true
cheqpoint: false
auto_cycle_limit: 4 # Recommended: 4 for simple, 5-6 for complex
briq_sensitivity: 7 # Recommended: 7 for simple, 5-6 for complex| Mode | Description |
|---|---|
local_fast |
Ultra-fast, skeleton only |
local_smart |
Variable fidelity, balanced (default) |
cyber_bedrock |
Remote cache for stable bedrock |
cyber_aggressive |
Aggressive remote caching |
paranoid_mincloud |
Minimal cloud exposure |
debug_repro |
Maximum audit logging |
Usage: ./qonqrete.sh [COMMAND] [OPTIONS]
Commands:
init Build the Qage container image.
run Start fresh QonQrete session.
resume Resume from a previous Qage.
clean Remove Qage directories.
Global Options:
-h, --help Show help message.
-V, --version Show version information.
Run Options:
-a, --auto Enable Autonomous Mode.
-u, --user Force User-gated Mode.
-t, --tui Enable TUI Mode. [EXPERIMENTAL]
-m, --mode <n> Set Operational Mode.
-b, --briq-sensitivity <N> Set Granularity (0-9). Default: 7
-c, --cyqles <N> Set max auto-cycles (1-10). Default: 4
-s, --sqrapyard Seed from sqrapyard/ directory.
-M, --msb Force Microsandbox. [EXPERIMENTAL]
-d, --docker Force Docker.
Resume Options:
-q, --qage <n> Resume from specific Qage.
(no args) Interactive selection.
Clean Options:
-q, --qage <n> Clean specific Qage.
-A, --all Clean ALL Qages.
(no args) Interactive selection.
- QUICKSTART.md - Getting started guide
- DOCUMENTATION.md - Full system documentation
- QONTRABENDER.md - Cache bender documentation
- RELEASE-NOTES.md - Version history
- TERMINOLOGY.md - QonQrete terminology
- TESTS_v1.0.0.md - Configuration A/B testing results
QonQrete is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for full text.

