Skip to content

Daily workflow

Three roles, one cycle: the spec is written and approved, the code is written from it, the checks judge the code.

Developers

When Do
Once, after cloning make install, git config core.hooksPath .githooks, then archvow doctor (checks the setup, with the fix for each problem)
Starting work archvow next - the planned components in build order, ready or what each waits for; a file already started shows what is left (a missing name, a placeholder)
Writing a component yourself open archvow show <component>: file, public names, decisions made, tests, what must never happen. Start the file with the header the spec gives, @assisted none
Writing it with an AI assistant one line in its chat (or the skill /archvow-implement): implement <component> or implement everything archvow next lists as ready. It first checks the branch (feature/<ticket>-<short-name>, created by the developer) and stops with the command to run if it is wrong. It runs archvow next --base develop before each component and stops when the change is as big as one merge request may be (ARCH022): commit, open the merge request, and go on at once on a branch started from it (below: Going on before the merge)
Something is unclear don't guess: archvow question add <component> "<question>", and the architect decides
Committing git commit - the Git hook runs ruff and archvow check (under a second)
Before a merge request make check and make test (or archvow check, ruff check ., pytest)

What a developer needs to know beyond that:

  • Private helpers are free. _parse_date or a _Row class inside a component file needs no declaration. Anything public that the spec does not declare fails the build (ARCH001, ARCH002).
  • Tests have a fixed place: tests/<layer>/test_<component>.py, one per component (in its group folder when the component has one: tests/<layer>/<group>/...). End-to-end scenarios go in tests/integration/ (with golden files in actuals/ and expecteds/).
  • Every error says how to fix it. archvow check prints file:line:col: CODE message; Rules explains each code. The open safety questions (ARCH035, warnings) are counted on one line; archvow check --all lists them.

Architects (or the lead who writes the spec)

When Do
A new feature archvow component add <type> <name> -d "..." -s <ticket> -u <components> per component - or let the AI assistant propose them: /archvow-draft-spec <feature> (or "draft the spec of: ..."), then read, edit and run its commands (AI assistants)
Making the decisions archvow show <component> (everything about it, with the columns archvow knows for it and the schemas it uses: answer with its own names), then archvow specify <component> (in a terminal: asks what is open, one at a time; Enter takes the suggestion) or archvow decision make <component> <n> ["<answer>"] (no answer: the suggested one; 3,4 for the same answer to several); extra rules: archvow rule add <component>[,...] "..." (--type <type>, --all), best as "Given ..., when ..., then ..." or, for something that happens, "When <trigger>, <component> <response>" (one rule, one test; rule edit R2)
Safety archvow show <component>: safety questions S1, S2... with suggestions (archvow specify asks them one by one); then hazard add <component> S<n> critical|high|medium|low ["text"] (no text: the suggestion, with its invariant for critical/high; show marks each hazard suggested or your own), hazard dismiss <component> S2,S4 "why", invariant add <component> "..."; or let the AI propose them: /archvow-analyze <component>. All of them on one page: .archvow/doc/project.md (Hazards, Invariants)
Personal data (GDPR) archvow column set <schema> <columns> personal\|special\|none for every column; --removes / --pseudonymises on the step that does it; the job and the writer answer P1, P2...: archvow decision make <component> P1 "...". On one page: .archvow/doc/project.md, Personal data (Compliance)
DORA (when on) archvow dependency add <package> --supplier ... --licence ... --criticality ...; jobs answer O1, O2; before a release: archvow changes --from <last tag> --markdown
Changing a component archvow component edit <component> -d "..." (or -u, --signature, -r for routes); renaming = component remove + component add
Removing something archvow component remove <component>, archvow hazard remove <component> H1, archvow invariant remove <component> INV1, archvow rule remove R2, archvow hazard remove <component> S2 (back to open), archvow question remove <component> 9 (a question a person added); it says what goes and asks first (--yes in scripts); archvow show <component> H1 shows one item. A decision is changed by answering it again (archvow decision make <component> <n> "..." replaces the answer); a question of the template is never removed - answer it ("not applicable: ...")
Many components in a layer groups: archvow component add ... -g <group>, archvow component edit <component> -g <group>. Several schemas in one place: archvow component add schema sales -g schemas gives p1_domain/schemas/sales_schema.py, next to revenue_schema.py - one file per component, never two in one schemas.py (ARCH001, ARCH018: each has its own columns, decisions, test and header)
A ticket gives an example (this input, this result) copy it into tests/examples/<component>/<ticket>-<short-name>/input/ and expected/ (text files, invented values), then archvow example add <component> <ticket>-<short-name> -s <ticket>; Jira examples of a whole flow go on the job (or the router); split a tricky rule into examples of the component that applies it (Concepts)
An AI assumed something archvow show <component> lists it; archvow assumption accept <component> <n> or reject
Reviewing a merge request the CI report of archvow diff --base develop --markdown: every spec change in plain words

Commit .archvow/ with every spec change. For anything beyond a small change, prefer two merge requests: the spec first (approved by an architect), then the code (normal review).

AI assistants

They follow AGENTS.md: read the spec, write exactly the declared file and names, write the tests (and the test of each invariant), run the checks, and record anything they had to assume. When a decision is still to make or the spec lacks something, they write nothing and give the archvow command that records it (decision make, component add schema, component edit, question add) - never only a question in the chat. When the description, a brief or what you told them already answers a decision, the command carries that answer: they give all of them in one block for you to check and run. They never run the commands that decide or change the spec themselves: archvow stops them (ARCH054). See AI assistants.

The cycle of a feature

1. spec       archvow component add / decision make / hazard add / invariant add  -> merge request (architects)
2. code       archvow next, then implement each ready component        -> commits (Git hook)
3. review     CI: archvow check, ruff, pytest, check --base, diff      -> merge request (reviewers)
4. release    archvow check --complete (nothing planned left unbuilt)  -> tag, package, deploy

Fixing a bug

A bug is something the code does that the spec does not want. No new command: the method is the one of every change, starting from the file the bug points to.

Example: an order charged twice. A customer is charged twice for one order. The error trace points to src/shop/p2_io/payments_client.py, line 48. The engineer on call never saw this code.

  1. Find the component and what it promised, from the file (output shortened):

    $ archvow show src/shop/p2_io/payments_client.py:48
    src/shop/p2_io/payments_client.py:48 - code of payments_client
      inside class PaymentsClient, line 21
      tests calling PaymentsClient by name: tests/p2_io/test_payments_client.py::test_a_timeout_is_retried
    
    payments_client (client) - Calls the payment provider
    status: tested - open: 0 decisions to make, 0 safety questions, 0 other items
    used by order_service
    
    Decisions - 3 of 3 made  -> archvow decision make payments_client <n> ["answer"]
       2. ✔ If a call fails, is it retried, how many times, on which errors, and can the same call
            be sent twice without doing it twice (e.g. paying twice) ...?
            -> (your own) 3 retries on timeouts  - alice@acme.com, 2026-07-02
    
    Evidence - 3 of 3 with a marked test
      decision 2             tests/p2_io/test_payments_client.py::test_a_timeout_is_retried
    

    Decision 2 answers the retry but not "without paying twice": the gap is in the spec, not only in the code. used by order_service: that component is reviewed too. 2. A person records what the code should do - a spec change, reviewed like any other: archvow decision make payments_client 2 "3 retries on timeouts and 503, each with the same idempotency key", and, so it cannot come back, a rule: archvow rule add payments_client "When a charge is retried, payments_client sends the same idempotency key". When the spec already says it, skip this step: the code is wrong, not the spec. 3. Write the failing test first, marked with it (@pytest.mark.rule("R4")), and see it fail. 4. Fix the code. Every other test of the component stays green: they are what must not change, already in the vow. Never change or delete one to make the fix pass: a deleted test file fails check --base, a changed test is for the reviewers to see. 5. Before the merge request, archvow check --base develop lists the components that use a changed public name (here order_service).

When the error names something rather than a file - a function, a column, a ticket, a business example - archvow show <name> finds it everywhere archvow keeps things: the vows (which component, which decision), the code (where it is defined, where it is used), the tests with their marks, the business examples, the briefs, the template, and the problems archvow check reports that name it - each place with its file and line. A name found nowhere gives the close names: a typo shows at once.

The AI follows the same steps when asked "Fix a bug in " (AGENTS.md), starting with archvow show <file>:<line>. Why this matters: Why archvow.

Branches (gitflow)

main is what runs in production; develop is the next version. Both change only through merge requests: the Git hook refuses a commit on them (except the very first commit of a repository).

Branch From Merged into Checks in the merge request
feature/<ticket>-<short-name> develop develop all: check, ruff, tests, guards not weakened, AI review
release/<version> develop main (tag it v<version>), then main back into develop check, ruff, tests (guards and AI review were done on develop)
hotfix/<ticket>-<short-name> main main (tag it), and develop all: a hotfix is new code
git switch -c develop main && git push -u origin develop   # once, only if develop does not exist
git switch develop && git pull
git switch -c feature/FATTRIB-001-sales-reader develop   # a feature, from develop
# ... archvow component add / decision make, commits, then a merge request into develop

git switch -c release/1.2.0 develop                       # a release: only version numbers and fixes now
archvow check --complete                                  # the release gate: everything planned is built
# merge request into main, tag v1.2.0, then a merge request main -> develop

git switch -c hotfix/INC-42-empty-input main              # a fix of production, from main
# merge request into main (tag v1.2.1), then into develop

Branch names are checked by the Git hook (at commit) and by the CI (on the merge request's source branch): feature/<ticket>-<short-name>, hotfix/<ticket>-<short-name> or release/<version>. Developers create the branch with plain Git; the post-checkout hook names a wrong one at once (it warns, never blocks) and gives the right shape. AI assistants never create branches - they stop and give the command. A wrong name: git branch -m feature/US-001-sales-reader. The ticket is written as -a ticket_pattern= says: -a ticket_pattern='FATTRIB-[0-9]+' accepts only your Jira project's keys (the default, [A-Z][A-Z0-9]*-[0-9]+, accepts any: US-001, PAY-1234). The architect sets it: init asks for it in a terminal; a company template sets it for all its projects (questions_defaults: {ticket_pattern: "FATTRIB-[0-9]+"}), asked or not. A project created without one (no terminal at init, no company default) gets a warning from the post-checkout hook on each feature branch, until an architect sets it: archvow init <package> --force -a ticket_pattern='FATTRIB-[0-9]+' (the hooks and the CI follow; it goes in a merge request like any guard change). The tickets of the spec (component add -s, component edit -s) follow the same pattern. Free names: -a branch_naming=none.

One user story, several merge requests. A story too big for one merge request (ARCH022) is split: one short branch per merge request, all with the story's ticket:

git switch -c feature/FATTRIB-001-sales-reader develop   # first merge request
git switch -c feature/FATTRIB-001-clean-sales develop    # the next one, once the first is merged

Going on before the merge. When archvow next --base develop says the change is full, commit and open the merge request, then start the next branch from this one and count from it:

git switch -c feature/FATTRIB-001-clean-sales feature/FATTRIB-001-sales-reader
archvow next --base feature/FATTRIB-001-sales-reader     # only the new work counts

Its merge request targets feature/FATTRIB-001-sales-reader, so the budget and the review see only the new work. Once the first one is merged into develop, the second targets develop (GitLab and GitHub retarget it when the first branch is deleted; otherwise change its target branch).

A spec change on main or develop cannot be committed there: every command that writes the spec says so at once, with the git switch -c that takes the change to a feature branch (uncommitted changes go with it).

Getting the others' changes on your feature branch: git pull origin develop. The change budget counts only your own changes (from where your branch meets develop), so this does not use it.

A repository with other protected branches: set ARCHVOW_PROTECTED_BRANCHES (for example "main"); an empty value turns the hook's protected-branch check off, and ARCHVOW_BRANCH_NAMING=none the naming check, for one shell. On the platform, protect main and develop and make develop the default branch (archvow init prints how).

Building and running (PySpark template)

./entrypoint.sh <entry point> <its arguments>              # run with spark-submit (YARN by default)
SPARK_MASTER="local[*]" ./entrypoint.sh <entry point> ...  # on a laptop
./entrypoint.sh --ddl                                      # create the tables (ddl/*.sql, Spark SQL)
./entrypoint.sh --package                                  # build the wheel for deployment (or: make package)

archvow next ends with the laptop command once an entry point and what it uses are coded (Try it locally: ..., the arguments from the config decision), or with what is still missing.

See The pyspark-pipeline template for tables, packaging and scheduling.