Skip to content

Commit 28673bc

Browse files
Merge pull request #544 from proffesor-for-testing/feat/darwin-qe-self-learning
chore(release): v3.11.0
2 parents dba4a14 + 5a07f52 commit 28673bc

38 files changed

Lines changed: 8928 additions & 175 deletions

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agentic-qe",
3-
"version": "3.10.4",
3+
"version": "3.11.0",
44
"description": "Agentic Quality Engineering — AI-powered QE platform with 60 specialized agents, 75+ skills, sublinear coverage analysis, ReasoningBank pattern learning, and deep MCP integration for Claude Code and 11 coding agent platforms",
55
"author": {
66
"name": "Agentic QE Team",

.claude/skills/skills-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@
939939
},
940940
"metadata": {
941941
"generatedBy": "Agentic QE Fleet",
942-
"fleetVersion": "3.10.9",
942+
"fleetVersion": "3.11.0",
943943
"manifestVersion": "1.4.0",
944944
"lastUpdated": "2026-04-13T00:00:00.000Z",
945945
"contributors": [

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,57 @@ All notable changes to the Agentic QE project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.11.0] - 2026-06-20
9+
10+
Run test generation on **free local models first**, falling back to paid models
11+
only when needed. This release adds an opt-in "cheap-first" path: a local model
12+
(Ollama, OpenRouter free tier, or any OpenAI-compatible endpoint) attempts test
13+
generation with an automatic repair loop, and only the hard cases escalate up to
14+
your normal LLM tiers — so most routine generation can run at $0. Every cheap-vs-
15+
escalated outcome feeds routing feedback, so model selection improves over time.
16+
17+
Off by default; nothing changes unless you opt in. Inspired by the "the harness
18+
matters as much as the model" economics from Ruv's MetaHarness Darwin Mode.
19+
20+
### Added
21+
22+
- **Free-tier local test generation (opt-in).** Enable with `AQE_FREE_TIER=1`
23+
(or `enableFreeTier` in the test-generation coordinator config) to generate
24+
tests on a free/local model before any paid LLM call. Default model `qwen3:8b`.
25+
See the [Free-Tier Local Models guide](docs/guides/free-tier-local-models.md).
26+
- **Configurable free-tier providers** — local Ollama, cloud Ollama, OpenRouter
27+
free models, or any OpenAI-compatible endpoint (vLLM, LM Studio, Groq, …). API
28+
keys are read from named environment variables and never stored.
29+
- **Repair loop** — when the local model's first output isn't a valid test, the
30+
failure is fed back and it retries before falling back (configurable retries).
31+
- **Automatic escalation** — hard cases the local model + repair can't solve
32+
escalate up the existing model ladder (Haiku → Sonnet → Opus) via the router.
33+
- **Self-learning routing feedback** — free-tier outcomes feed the routing
34+
calibrator and escalation tracker, improving model-tier confidence over time.
35+
- **`agentic-qe/routing/free-tier` package export** for programmatic configuration.
36+
37+
### Fixed
38+
39+
- **Restored `@ruvector/ruvllm-*` optional platform packages** dropped from the
40+
lockfile by a Dependabot update, which could break `npm ci` for consumers. (#541)
41+
- **Multi-file test-generation requests** now correctly fall back to the full
42+
generation path so every requested file is covered (the free-tier path handles
43+
the single-file case).
44+
- Security bump of the transitive `hono` dev dependency. (#541)
45+
46+
### Changed
47+
48+
- **Auto-escalation tracker is now ladder-configurable** (generic over tier
49+
names) so a free local tier can sit below the paid tiers. Fully backward
50+
compatible — existing behavior and the default Claude ladder are unchanged.
51+
- **QE framework evolved PACT → PACTS** — adds a fifth principle, **Structured**
52+
(governance, observability, and explainability of agent behavior; measure
53+
*confidence*, not trust), inspired by DORA's research on AI-assisted delivery.
54+
Ships with a playbook + readiness-assessment guide. The skill id/dir
55+
`holistic-testing-pact` and schema slugs are unchanged (cross-repo stable); the
56+
output schema gains an **optional** `structured` dimension (non-breaking).
57+
PACT originated with Reuven Cohen (Agentics Foundation); PACTS adds Structured. (#545)
58+
859
## [3.10.9] - 2026-06-17
960

1061
MCP server reliability and database-free completeness, all from community-reported

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,30 @@ export AQE_LLM_ROUTER_DISABLED=1 # env-only kill-switch
405405

406406
Or programmatically: `new QEKernelImpl({ llmRouter: { enabled: false } })`.
407407

408+
### Free local models (opt-in) — cheap-first test generation
409+
410+
Run test generation on a **free local model first** (local Ollama, cloud Ollama,
411+
OpenRouter free models, or any OpenAI-compatible endpoint), with an automatic
412+
**repair loop**, falling back to your normal LLM path only when needed. Off by
413+
default — enable with `AQE_FREE_TIER=1`:
414+
415+
```bash
416+
ollama pull qwen3:8b
417+
export AQE_FREE_TIER=1 # opt in (default model: qwen3:8b)
418+
```
419+
420+
Most routine test generation is then handled locally at **$0**. See the
421+
[Free-Tier Local Models guide](docs/guides/free-tier-local-models.md) for
422+
provider options and configuration.
423+
408424
---
409425

410426
## Documentation
411427

412428
| Guide | Description |
413429
|-------|-------------|
414430
| [Platform Setup](docs/platform-setup-guide.md) | Per-platform configuration instructions |
431+
| [Free-Tier Local Models](docs/guides/free-tier-local-models.md) | Cheap-first test generation on local/free models (opt-in) |
415432
| [Skill Validation](docs/guides/skill-validation.md) | Trust tiers and evaluation system |
416433
| [Learning System](docs/guides/reasoningbank-learning-system.md) | ReasoningBank pattern learning |
417434
| [Code Intelligence](docs/guides/fleet-code-intelligence-integration.md) | Knowledge graph and semantic search |

assets/skills/skills-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@
939939
},
940940
"metadata": {
941941
"generatedBy": "Agentic QE Fleet",
942-
"fleetVersion": "3.10.4",
942+
"fleetVersion": "3.11.0",
943943
"manifestVersion": "1.4.0",
944944
"lastUpdated": "2026-04-13T00:00:00.000Z",
945945
"contributors": [
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Free-Tier Local Models for Test Generation
2+
3+
Run AQE's test generation on a **free local model first**, with an automatic
4+
**repair loop**, and only pay for a cloud model when you choose to. Most routine
5+
test generation can be handled by a small local model at **$0** — you reserve
6+
paid models for the hard cases.
7+
8+
> **Status:** opt-in, off by default. Enabling it changes nothing for anyone who
9+
> doesn't turn it on. Today the free tier runs **local-only with a repair loop**
10+
> (no automatic escalation to paid models yet).
11+
12+
This is AQE's adaptation of the "cheap-first, repair, escalate" economics
13+
demonstrated by [Darwin Mode](https://github.com/ruvnet/agent-harness-generator):
14+
a feedback/repair loop roughly doubled a fixed cheap model's bug-fix rate
15+
(7.7% → 15.3%) **without retraining anything** — the software around the model
16+
did the work.
17+
18+
---
19+
20+
## What you get
21+
22+
- **Cheap-first generation** — test generation tries your configured free/local
23+
model before any paid LLM call.
24+
- **Repair loop (D8)** — if the model's first output isn't a valid test (no
25+
assertion, etc.), AQE feeds the failure back and asks it to fix it, up to a
26+
configurable number of retries, *before* falling back.
27+
- **Safe fallback** — if the local model can't produce a valid test, AQE
28+
silently falls back to the normal generation path. You never get a worse
29+
result than today.
30+
- **Self-learning (D9)** — when wired to routing feedback, every cheap-vs-fallback
31+
outcome is recorded so routing confidence improves over time.
32+
33+
---
34+
35+
## Quick start (local Ollama)
36+
37+
1. **Install Ollama** and pull a small coding model:
38+
39+
```bash
40+
# on your machine (or the Docker host)
41+
ollama pull qwen3:8b
42+
```
43+
44+
`qwen3:8b` (~5 GB) is the recommended default — it was the most productive
45+
local worker in our benchmarks and fits an 8 GB machine. `qwen3:30b-a3b` is
46+
faster if you have the RAM; `gemma3/4` work but were slower for this task.
47+
48+
2. **Enable the opt-in** (either env var or config):
49+
50+
```bash
51+
export AQE_FREE_TIER=1 # turn it on
52+
export AQE_FREE_TIER_MODEL=qwen3:8b # optional; this is the default
53+
```
54+
55+
3. **Generate tests as usual.** AQE now tries the local model first:
56+
57+
```bash
58+
claude "Use qe-test-architect to generate tests for src/services/Add.ts"
59+
```
60+
61+
You'll see a log line: `Free-tier local test generation enabled (model=qwen3:8b, repair-only, no escalation)`.
62+
63+
### Running in a container (Docker Desktop / dev container)
64+
65+
If AQE runs in a container and Ollama runs on the host, point the free tier at
66+
the host gateway (this is the default for the `local-ollama` provider):
67+
68+
```
69+
http://host.docker.internal:11434/v1
70+
```
71+
72+
---
73+
74+
## Choosing a provider
75+
76+
The free tier speaks the OpenAI-compatible `/v1/chat/completions` API, so it
77+
works with several backends. Configure programmatically via `defaultFreeTierLadder()`
78+
and rebinding the bottom (`local`) tier:
79+
80+
```ts
81+
import { defaultFreeTierLadder } from 'agentic-qe/routing/free-tier';
82+
83+
// 1) Local Ollama (default) — $0, private
84+
const ladder = defaultFreeTierLadder('qwen3:8b');
85+
86+
// 2) Cloud Ollama (ollama.com) — key from env, never stored
87+
ladder.bindings.local = {
88+
provider: 'free-tier',
89+
config: { kind: 'cloud-ollama', model: 'qwen3:8b', apiKeyEnv: 'OLLAMA_API_KEY' },
90+
};
91+
92+
// 3) OpenRouter free models
93+
ladder.bindings.local = {
94+
provider: 'free-tier',
95+
config: { kind: 'openrouter', model: 'mistralai/devstral-small:free', apiKeyEnv: 'OPENROUTER_API_KEY' },
96+
};
97+
98+
// 4) Any OpenAI-compatible endpoint (Groq, vLLM, LM Studio, llama.cpp, …)
99+
ladder.bindings.local = {
100+
provider: 'free-tier',
101+
config: { kind: 'openai-compatible', model: 'llama-3.3-70b',
102+
baseUrl: 'https://api.groq.com/openai/v1', apiKeyEnv: 'GROQ_API_KEY' },
103+
};
104+
```
105+
106+
| Provider kind | `baseUrl` default | API key |
107+
|---|---|---|
108+
| `local-ollama` | `http://host.docker.internal:11434/v1` | none |
109+
| `cloud-ollama` | `https://ollama.com/v1` | `OLLAMA_API_KEY` (or custom `apiKeyEnv`) |
110+
| `openrouter` | `https://openrouter.ai/api/v1` | `OPENROUTER_API_KEY` |
111+
| `openai-compatible` | *(you must set `baseUrl`)* | optional `apiKeyEnv` |
112+
113+
**Secrets:** API keys are read from the named environment variable at run time
114+
and **never stored** in any config file — the same policy as AQE's main LLM
115+
router.
116+
117+
---
118+
119+
## Configuration reference
120+
121+
When constructing the test-generation coordinator (or via project config):
122+
123+
| Option | Env var | Default | Meaning |
124+
|---|---|---|---|
125+
| `enableFreeTier` | `AQE_FREE_TIER=1` | `false` | Turn the free tier on |
126+
| `freeTierModel` | `AQE_FREE_TIER_MODEL` | `qwen3:8b` | Local model id |
127+
| `freeTierRepairAttempts` || `1` | Same-tier repair retries before fallback |
128+
129+
---
130+
131+
## How it works
132+
133+
1. AQE reads the source file and asks the local model for tests.
134+
2. An **objective check** verifies the output is a real test (contains a
135+
`test`/`it`/`describe` block *and* an `expect`/`assert`).
136+
3. On failure, the **repair loop** feeds the rejection reason back and retries
137+
the same local model (up to `freeTierRepairAttempts`).
138+
4. If a valid test is produced, AQE returns it and **skips the paid path**.
139+
5. Otherwise AQE **falls back** to the normal generation path unchanged.
140+
141+
For the design and measured results, see
142+
[Darwin-for-QE action lane](../metaharness/06-darwin-qe-self-learning-action-lane.md).
143+
144+
---
145+
146+
## Troubleshooting
147+
148+
- **No effect / paid path still used:** confirm `AQE_FREE_TIER=1` is set in the
149+
environment AQE runs in, and that the model responds:
150+
`curl http://localhost:11434/api/tags` (or `host.docker.internal` in a container).
151+
- **Empty output from reasoning models:** qwen3/gemma split a `reasoning` channel
152+
from `content`; AQE reads `content` and allows a generous token budget, so this
153+
is handled — but a very small model on a large file may still fail verification
154+
and fall back. Try a wider model (`qwen3:30b-a3b`) or a smaller source file.
155+
- **Slow first call:** the first request loads the model into memory; subsequent
156+
calls are much faster.

0 commit comments

Comments
 (0)