aSPARK-guard
Gate enforcement in code rather than in prompt: a write that violates a quality gate is denied at the tool call — and every override costs a dated, hash-bound entry in the repository.
aSPARK Core is Markdown prompt material with no runtime, which makes its quality gates requests to a language model: “read qa.md, and if there are open blockers, refuse the release.” That holds — until an agent under context pressure reasons its way around one. From the agent's own view, a well-argued gate is a passed gate.
guard moves the check to where the model cannot argue with it: a hook outside the model, on the tool call itself. Two guarantees — no gate can be skipped silently, and no override stays invisible. Core is not modified, and in a project with no .spark/ directory nothing happens at all.
- ◆
Three gate rules
A plan against an unapproved spec, a QA report against a review that has not passed, a release over red gates or open blockers — denied before the write happens. Every denial names the rule, the state that triggered it and every way forward.
- ◆
Override — but visibly
A gate can be overruled, just not quietly: one line in overrides.jsonl carrying the rule, a reason and the SHA-256 the blocking artifact had at that moment. Change that artifact and the override lapses. And the agent may not write the file itself.
- ◆
Hash ledger
Every write under .spark/ with its SHA-256, status and git HEAD — append-only, versioned with the code. Git only sees commits and collapses intermediate states into one diff; the ledger dates each status change on its own.
- ◆
Drift detection
An artifact edited outside the loop no longer matches its last ledger entry. One line of context at the next session start says so — instead of an unverified status quietly continuing to count.
- ◆
Template contract
Checks the structures aspark-graph later parses at the moment an artifact is written, and reports form drift as context — never as a block. On its first run over 44 of the family's own artifacts it flagged exactly one, and it was real: an AC id invisible to every graph query.
- ◆
Silent, and failing open
No .spark/ directory, no output. Malformed payload, corrupt config, unexpected exception — the action proceeds anyway. No network, no LLM, no dependency: standard library only, under a thousand lines, auditable in one sitting.
Honest status: v0.1.0 is the first complete version — all six milestones built, 142 tests, replayed over 22 real gated artifacts without a single false positive. What is missing is field evidence, not mechanism: no full feature loop has run on someone else's project yet. POSIX only (macOS, Linux), Python 3.11+, and ~50 ms per Write/Edit — including in repos with no aSPARK at all.
Each product has one responsibility and stable interfaces. A weakness in one must never require changes in another.
Does this fit your delivery process?
Start with Core on a pilot project. The workflow, knowledge graph and policy packs are all open on GitHub.