Why archvow¶
archvow is a human-governed, deterministic system that keeps AI-built software understandable, traceable and maintainable by the people who own it.
It answers one question about every feature an AI helped build: could an engineer who did not take part in building it locate, understand, and safely fix a defect in it?
The problem¶
An AI assistant builds the order processing of a web shop. Twenty-five files, every test green, the
merge request approved the same afternoon. Three months later a customer is charged twice for one
order. The engineer on call never saw this code. Which of the twenty-five files matter? Why is there
a PaymentGateway and a PaymentsClient? Where does the retry come from, and who decided it? Which
other parts break if the retry changes?
Nothing in the code answers these questions. The prompt that produced it is gone; the plan the AI wrote was a chat message. The code works, and nobody can change it safely.
The seven questions¶
A team that owns a piece of software must be able to answer seven questions about any part of it. archvow keeps each answer next to the code, and checks it on every commit:
| # | The question | What archvow keeps |
|---|---|---|
| 1 | Which component is responsible? | the file header @component; archvow show <file>:<line> names it from the file a bug points to |
| 2 | Why does it exist? | the component's description, and the brief it was drawn from (--from briefs/...) |
| 3 | What does it depend on? | its uses, and the diagram of the project's .archvow/doc/project.md |
| 4 | What guarantees must it keep? | its decisions, rules (R<n>), the business team's examples, hazards and the invariants that prevent them, each with its test |
| 5 | Where does what the code does come from? | the decision or rule number marked on each test (@pytest.mark.decision(2)), and the assumptions the AI recorded |
| 6 | Why was this implementation chosen? | each decision with who made it and when, the accepted assumptions, the merge request history |
| 7 | What could break if I change it? | used by in archvow show; archvow check --base lists the users of a changed contract |
archvow show <file>:<line> answers 1 to 7 from the file a stack trace points to:
Fixing a bug walks through the double-charge incident with it.
Executable, not prose¶
Writing a spec before letting an AI code is now common advice. Most tools keep that spec as prose: a Markdown plan the AI reads. When the code does not match it, nothing fails - the plan and the code drift apart, silently. Dave Farley makes the same point in The Industry Is Catching Up (Modern Software Engineering, October 2026): the specification must be executable.
archvow's spec is data that a check reads, on every commit and every merge request. The three hard problems of programming with an AI map to what it checks:
| Problem | What archvow checks |
|---|---|
| Saying what is intended | the vow of each component: structured, reviewed by people, never edited by the AI; a brief that changes after the spec was drawn from it is reported (ARCH039) |
| Verifying the result | each decision, rule, invariant and business example has a marked test that can fail (ARCH038, ARCH045, ARCH056); the CI's test report shows each one ran and passed (ARCH046); the business team's examples cannot be edited to fit the code (ARCH055), and on a merge request a test that disappears or is skipped is a weakening (ARCH020) |
| Small steps | big specs are cut into tasks; a merge request has a change budget (ARCH022, archvow next --base) |
Two speeds¶
An AI can produce code faster than anyone can read it. That is generation speed: high on the first day, falling as unexplained code piles up and every change needs an archaeologist. Sustainable speed starts lower - the decisions are made before the code, the tests are marked, the structure is the one the architects chose - and keeps its pace, because the next person can find their way.
archvow chooses sustainable speed, and slows the AI down on purpose.
Is archvow for you?¶
archvow holds what each part of the system must do and how the system is built.
It does not let the AI choose the structure. People decide the layers and the components; every "what" - the description, the decisions, the rules, the invariants - is attached to one of them, and the AI implements within that. Teams that want to describe features only and let the AI decide the structure should use another tool.
Product management - user stories, priorities, sprint acceptance - stays in the team's tracker
(Jira, GitLab issues...). archvow only references the tickets (-s FATTRIB-012).
archvow fits a team that:
- owns its software for years, and expects people who did not write a part to change it;
- wants the same rules for every developer and every AI assistant, checked the same way;
- accepts writing decisions down before coding, and having them reviewed.
A specs tool, more than a development tool¶
- The spec lives as long as the project. One vow for the project, one per feature (what the
product does: orders, invoices) and one per component (its file, public names, decisions made,
tests, what must never happen), in
.archvow/features/<feature>/.archvow docwrites them as Markdown to read - the whole project, one page per feature - into the ignored.archvow/doc/; CI attaches them to every merge request. It is not a one-off prompt or a plan thrown away after the feature: every later change edits it, and the code follows. - Nothing is decided silently. Each component type asks its questions (empty input? nulls? duplicates? who may call this route?); code written while one is open fails the build. Assumptions an AI had to make are recorded and wait for a person.
- What must never happen is part of the spec. Hazards per component (HAZOP guide words), invariants that prevent them, and the test that checks each one - stronger for more severe ones.
- The spec is enforced, not advisory. A static check (no AI, no network, under a second) in the Git hook and the CI: undeclared modules or public names, layers crossed, missing tests or tests, guards weakened in a merge request. The same result for every person and every AI.
- Compliance checks built in. Every column is classified (personal, special, none) and archvow follows personal data through the spec: never printed or logged, and the questions of each privacy regime decided - GDPR, the US state laws and GLBA built in, another law added with one file in a pack; tests never touch real data; DORA traceability, separation of duties, third-party register and tested resilience on request. A company adds its own rules as data. These are automated policy checks and documentation for an audit, not a certificate of compliance.
- People own the decisions. Spec and guard changes go through the architects (code owners);
AI assistants propose (
/archvow-draft-spec), implement (/archvow-implement) and review (/archvow-review), and every one of them gets the same rules (AGENTS.md), whatever the editor. - As much AI autonomy as the project wants, never silent. At
init,-a mode=strict|guided|freedecides whether the AI stops at every open question or proposes its own answers and goes on (.archvow/features/<feature>/proposals.vow, reviewed by a person), and-a rules=all|ARCH,SPARK|nonewhich rule familiescheckapplies. A few safety checks stay on whatever the choice (Project management). - Big specs in small tasks, and the spec traced to its briefs. A component with many decisions is
cut into tasks T1, T2... built one at a time, each done when its tests are marked
(
@pytest.mark.decision(3)). Briefs (user stories, functional specs inbriefs/) are where the spec comes from: each item drawn with--from briefs/sales.md#cleaningis checked against the brief's text, andcheckwarns when it changes. - Readers and writers the way Spark sees them.
-k files|table|jdbc|connector|customgives each one its own function and questions (where the password comes from, parallel reads, merge on keys, a connector's jar from the internal repository...), and each asks whether an approved shared library already does it. Packages are controlled where they are listed: one inrequirements.txtorpyproject.tomlnobody approved is an error in mode strict (ARCH024). - Business examples, locked. An example from a ticket - these rows in, these rows out - goes into
tests/examples/<component>/<example>/and is recorded by a person (archvow example add): the spec asks for its test, andcheckfails when its files change (ARCH055), so an AI cannot edit the expected result to make its test pass. The test writes what the component gave toactual/;archvow showgives its verdict and the rows whereactual/differs fromexpected/- CSV, JSON, YAML or text, each example under the rule it shows. On a merge request, a decision, rule, invariant or example whose marked test was deleted, unmarked or skipped is a weakening (ARCH020). - Finds a name everywhere.
archvow show <name>- a function, a column, a ticket, an example - lists where it is in the spec, the code, the tests, the briefs and the template, and the problemsarchvow checkreports that name it: where to look when an error names something nobody remembers. - Says exactly what it checks. Evidence is declared (a test is marked for an invariant, and can fail) and executed (the CI's test report shows it passed); whether the test checks the right thing stays a reviewer's job. The checks read the code (Python's AST, aliases followed), they do not run it. Who approved a change is enforced by your Git host, not by archvow (What your Git host must enforce).
- Says how to try it. Once an entry point and what it uses are coded,
archvow nextends with the command to try it on a laptop (Try it locally: ...), or with what it still needs; the deployment - a cluster, Kubernetes, a serverless platform - keeps its own settings.
Two failure modes, and what must never happen¶
AI writes plausible code. Two failure modes survive compilers and tests:
- It builds something else than the architecture - other names, other files, imports across layers, a "helpful" utility module. archvow fails the build on any of it.
- It decides silently. Faced with an ambiguous spec it picks a reasonable default ("negative value -> 0", "on timeout, retry") without telling anyone. archvow makes every such choice an explicit question a human must answer before the code may exist.
And the most valuable part of a spec is what must never happen. Following critical-systems
practice, archvow finds hazards systematically (HAZOP-style guide words per component), keeps
the essential invariants few, and requires a test for each - a stronger test for more severe
hazards. A hazard is what could go wrong; an invariant is what is always true, so it
can't; the test checks the invariant. Both are listed in .archvow/doc/project.md (Hazards and
Invariants), each component's in its own archvow show <component>.
archvow, spec-kit and OpenSpec¶
All three are spec-driven development tools: write the spec first, then let an AI implement it. They differ in what happens to the spec afterwards.
| GitHub spec-kit | OpenSpec | archvow | |
|---|---|---|---|
| What the spec is | Markdown per feature: spec, plan, tasks | Markdown per capability, and change proposals with delta specs | one vow per project, per feature and per component (the .vow format: one fact per line, every value with its keyword) - decisions, hazards and invariants on each component; archvow doc writes a page for the project and each feature |
| Who checks the code | the AI itself, guided by the spec; extensions and presets can add steps | the AI; openspec validate checks the spec's structure, /opsx:verify is advisory |
a static check in the Git hook and the CI: the build fails |
| Open questions | /clarify asks questions before planning |
in the proposal, if someone writes it | questions per component type; code fails while one is open |
| What must never happen | not modelled | not modelled | hazards, the invariants that prevent them, and their tests |
| Examples from the business (input -> expected) | in the prose, if someone writes them | in the prose, if someone writes them | files recorded by a person, locked by their fingerprint, each with its marked test |
| Drift between spec and code | not detected | kept in step by hand (archive) | fails the build (undeclared or missing code, guards weakened) |
| AI assistants | many, through slash commands | many, through slash commands | any: AGENTS.md for all, skills for Copilot and Claude Code, approval per tool |
| Best at | a new feature from an idea | evolving an existing product change by change | a codebase that must keep following its architecture and its safety rules |
They work together: draft a feature with Spec Kit or OpenSpec, then draw archvow's spec from it
(--from specs/001-orders/plan.md#..., once specs is a briefs folder) so the build keeps the code
honest - Using archvow with Spec Kit.