Spec-Driven Development Fusion Engine for HelixAgent.
HelixSpecifier fuses three development pillars into a unified, adaptive workflow:
- SpecKit -- 7-phase Spec-Driven Development (Constitution, Specify, Clarify, Plan, Tasks, Analyze, Implement)
- Superpowers -- TDD discipline with parallel subagent execution
- GSD -- Get-Shit-Done milestone lifecycle management
The engine classifies work by effort level, scales ceremony accordingly, executes debate-backed specification phases, and learns from completed flows.
HelixSpecifier ships with 10 power features:
- Parallel Execution -- Bounded-concurrency task dispatch with configurable worker pools and per-task timeouts
- Constitution as Code -- Machine-readable project constitution with mandatory rule enforcement and compliance validation
- Nyquist TDD -- Test-to-implementation ratio tracking that enforces a minimum 2x test coverage ratio (inspired by the Nyquist sampling theorem)
- Debate Architecture -- Multi-round, multi-agent debate orchestration for specification refinement with position scoring
- Skill Learning -- Adaptive skill proficiency tracking with running-average improvement based on quality feedback
- Brownfield Analysis -- Legacy codebase pattern detection and dependency analysis for constraint-aware spec generation
- Predictive Specification -- Future requirement prediction from accumulated historical patterns with confidence scoring
- Cross-Project Transfer -- Shared knowledge base enabling pattern and decision transfer between projects
- Adaptive Ceremony -- Dynamic ceremony level adjustment based on real-time quality metrics during flow execution
- Spec Memory -- Persistent specification index with semantic search, access tracking, and pattern learning
Add HelixSpecifier to your project:
go get digital.vasic.helixspecifier@latestOr use a local replace directive in your go.mod:
replace digital.vasic.helixspecifier => ./HelixSpecifier
package main
import (
"context"
"fmt"
"log"
"digital.vasic.helixspecifier/pkg/config"
"digital.vasic.helixspecifier/pkg/engine"
"digital.vasic.helixspecifier/pkg/ceremony"
"digital.vasic.helixspecifier/pkg/gsd"
"digital.vasic.helixspecifier/pkg/memory"
"digital.vasic.helixspecifier/pkg/speckit"
"digital.vasic.helixspecifier/pkg/superpowers"
"github.com/sirupsen/logrus"
)
func main() {
logger := logrus.New()
cfg := config.FromEnv()
// Create the fusion engine
eng := engine.New(cfg, logger)
// Register all three pillars
eng.RegisterSpecKit(speckit.NewPillar(cfg, logger))
eng.RegisterSuperpowers(superpowers.NewPillar(cfg, logger))
eng.RegisterGSD(gsd.NewPillar(logger))
eng.RegisterCeremonyScaler(ceremony.NewScaler(cfg, logger))
eng.RegisterSpecMemory(memory.NewStore())
// Classify effort
ctx := context.Background()
classification, err := eng.ClassifyEffort(
ctx, "Implement user authentication with OAuth2",
)
if err != nil {
log.Fatal(err)
}
fmt.Printf(
"Effort: %s, Ceremony: %s\n",
classification.Level,
classification.CeremonyLevel,
)
// Execute the full flow
result, err := eng.ExecuteFlow(
ctx,
"Implement user authentication with OAuth2",
classification,
)
if err != nil {
log.Fatal(err)
}
fmt.Printf(
"Flow %s completed: quality=%.2f\n",
result.FlowID,
result.OverallQualityScore,
)
}HelixSpecifier is organized as a 3-pillar fusion engine with supporting infrastructure:
User Request
|
v
Effort Classifier --> Ceremony Scaler
|
v
FusionEngine
|-- SpecKit Pillar (7-phase SDD with debate)
|-- Superpowers Pillar (TDD + parallel subagents)
|-- GSD Pillar (milestone lifecycle)
|-- Spec Memory (learning + retrieval)
|-- CLI Agent Adapters (output formatting)
|
v
Formatted Output --> CLI Agent
| Level | Duration | Ceremony | Description |
|---|---|---|---|
| Quick | < 5 min | Minimal | Typos, renames, log additions |
| Medium | 30-90 min | Light | Moderate features with planning |
| Large | 4-16 hours | Standard | Full SDD with all 7 phases |
| Epic | Days-weeks | Heavy | System-wide changes, full ceremony |
The module contains 27 packages (21 core + 6 test suites):
- Core:
types,config,engine - Pillars:
speckit,superpowers,gsd - Infrastructure:
intent,ceremony,memory,adapters,metrics - Features:
parallel_execution,constitution_code,nyquist_tdd,debate_architecture,skill_learning,brownfield,predictive_spec,cross_project,adaptive_ceremony,spec_memory - Tests:
integration,e2e,security,stress,benchmark,automation
HelixSpecifier is designed to be used as a Git submodule within the HelixAgent project:
cd /path/to/HelixAgent
git submodule add <repo-url> HelixSpecifierThen add a replace directive in the root go.mod:
replace digital.vasic.helixspecifier => ./HelixSpecifier
For standalone use, clone the repository and import the packages directly.
All configuration uses environment variables with the
HELIX_SPECIFIER_ prefix. Copy .env.example and adjust values:
cp .env.example .envKey configuration groups:
- Effort thresholds:
QUICK_MAX_MINUTES,MEDIUM_MAX_MINUTES,LARGE_MAX_HOURS - Ceremony:
ADAPTIVE_CEREMONY,CEREMONY_BOOST - Debate rounds per phase:
CONSTITUTION_ROUNDSthroughIMPLEMENT_ROUNDS - Caching:
CACHE_ENABLED,CACHE_DIR - Parallelism:
MAX_PARALLEL_AGENTS,MAX_PARALLEL_TASKS - Memory:
SPEC_MEMORY_ENABLED,CROSS_PROJECT_LEARN - Quality:
MIN_QUALITY_SCORE,MIN_PHASE_SCORE - Circuit breaker:
CIRCUIT_BREAKER_THRESHOLD
See .env.example for the complete list with defaults and
descriptions.
831+ tests (including subtests) across 7 test suites, all race-detector clean.
| Suite | Command | Tests | Purpose |
|---|---|---|---|
| Unit | make test-unit |
~60 | Per-package unit tests |
| Integration | make test-integration |
26 | Cross-package workflows |
| E2E | make test-e2e |
18 | Full user workflow simulation |
| Security | make test-security |
26 | Input validation, thread safety |
| Stress | make test-stress |
12 | Concurrent load, deadlocks |
| Benchmark | make test-bench |
22 | Performance measurement |
| Automation | make test-automation |
14 | Structure, API contracts |
Run all tests with resource limits (required by HelixAgent policy):
make test # All tests, resource-limited
make test-race # With race detector
make test-cover # Coverage report
make test-all # Explicit all-tests aliasOr directly:
GOMAXPROCS=2 go test -count=1 -race -p 1 ./...Run a single test:
go test -v -run TestFusionEngine_ExecuteFlow ./pkg/engine/- Follow Go conventions and the code style in
CLAUDE.md - Every change must include tests (table-driven, using testify)
- Run
make fmt vet lintbefore committing - Use Conventional Commits:
feat(engine): add adaptive ceremony scaling - Maintain the Nyquist TDD ratio: test code >= 2x implementation
HelixSpecifier ships with a layered defence against the failure mode the constitution captures verbatim:
Verbatim 2026-05-19 operator mandate (preserved per CONST-049 §11.4.17): "all existing tests and Challenges do work in anti-bluff manner - they MUST confirm that all tested codebase really works as expected! We had been in position that all tests do execute with success and all Challenges as well, but in reality the most of the features does not work and can't be used! This MUST NOT be the case and execution of tests and Challenges MUST guarantee the quality, the completition and full usability by end users of the product!"
The layers, top to bottom:
- Unit + race:
GOMAXPROCS=2 go test -count=1 -race -p 1 ./...covers every package inpkg/plus the newchallenges/runner/package. Mocks are permitted ONLY here (CONST-050(A)). - Per-locale Challenge runner (
challenges/runner/main.go): realFusionEngine+ realintent.Classifier+ reali18n.NoopTranslatorexercised across 5 locale fixtures (en,sr,de,ja,es). 20 invariants per run; each carries the actual runtime value in the PASS line. - Paired-mutation Challenge
(
challenges/helixspecifier_describe_challenge.sh): wraps the runner withHELIXSPECIFIER_MUTATE_RUNNER=1, asserts the runner DETECTS the planted invariant flip, exits 99 to signal "mutation correctly observed" (CONST-050(A) §1.1). - Domain-level Challenges (
challenges/scripts/*.sh): chaos, DDoS, scaling, stress, UI, UX — env-gated to avoid bluffing when no target endpoint is configured (SKIP-OK:markers per §11.4.6). - Test-coverage ledger (
docs/test-coverage.md): every public symbol ofpkg/engine,pkg/intent,pkg/i18n,pkg/speckit,pkg/superpowers,pkg/gsdtraced to the test + Challenge that proves it works.
# Layer 1: race-detector clean across every package
GOMAXPROCS=2 go test -count=1 -race -p 1 ./...
# Layer 2: per-locale runner (exit 0 on success)
go run ./challenges/runner/
# Layer 3: paired-mutation Challenge (exit 0 normal, 99 mutate)
./challenges/helixspecifier_describe_challenge.sh normal
./challenges/helixspecifier_describe_challenge.sh mutate
# Layer 4: domain Challenges (env-gated; SKIP-OK without target)
for c in challenges/scripts/*.sh; do bash "$c" || true; done- The runner uses
engine.NewWithTranslator+ realspeckit.NewPillar— no in-process stub pillar. - Every PASS line includes the runtime value (
got=...,signals=[...]), so a regression that returned the wrong level/signal would surface in the diff, not just in the exit code. - The mutation hook is checked by
TestRun_MutationDetected— if a future edit silently removes the mutation logic, the test fails. This is the §1.1 "paired mutation" requirement. - Fixtures are checked into the repo as plain YAML; they MUST
match the live keys in
pkg/i18n/bundles/active.en.yaml. Mismatch → runner FAIL → Challenge exit 1.
This anti-bluff stack mirrors the pattern in sibling submodules LeakHub (round 266), MCP_Module (round 267), Models (round 268), Ouroborous (round 269), and is bumped as part of every meta-repo close-out round.
Same license as HelixAgent. See the root LICENSE file.