verity-framework 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -0
  3. package/commands/verity/architect.md +58 -0
  4. package/commands/verity/build.md +61 -0
  5. package/commands/verity/docs.md +37 -0
  6. package/commands/verity/golive.md +32 -0
  7. package/commands/verity/map.md +22 -0
  8. package/commands/verity/plan.md +67 -0
  9. package/commands/verity/review.md +50 -0
  10. package/commands/verity/security.md +36 -0
  11. package/commands/verity/ship.md +67 -0
  12. package/commands/verity/sre.md +31 -0
  13. package/commands/verity/test.md +29 -0
  14. package/commands/verity/verify.md +31 -0
  15. package/commands/verity/vision.md +55 -0
  16. package/package.json +31 -0
  17. package/verity/bin/lib/adr.cjs +67 -0
  18. package/verity/bin/lib/catalog.cjs +81 -0
  19. package/verity/bin/lib/config.cjs +119 -0
  20. package/verity/bin/lib/contract.cjs +57 -0
  21. package/verity/bin/lib/core.cjs +63 -0
  22. package/verity/bin/lib/golive.cjs +49 -0
  23. package/verity/bin/lib/handoff.cjs +72 -0
  24. package/verity/bin/lib/identity.cjs +112 -0
  25. package/verity/bin/lib/install.cjs +109 -0
  26. package/verity/bin/lib/ledger.cjs +244 -0
  27. package/verity/bin/lib/map.cjs +77 -0
  28. package/verity/bin/lib/recovery.cjs +37 -0
  29. package/verity/bin/lib/release.cjs +131 -0
  30. package/verity/bin/lib/review.cjs +74 -0
  31. package/verity/bin/lib/scaffold.cjs +66 -0
  32. package/verity/bin/lib/security.cjs +44 -0
  33. package/verity/bin/lib/smoke.cjs +170 -0
  34. package/verity/bin/lib/stage.cjs +180 -0
  35. package/verity/bin/lib/status.cjs +117 -0
  36. package/verity/bin/verity.cjs +190 -0
  37. package/verity/design-guides/contracts-first.md +32 -0
  38. package/verity/design-guides/features/helper-bot.md +61 -0
  39. package/verity/design-guides/stack-and-topology.md +38 -0
  40. package/verity/templates/LICENSE.tmpl +21 -0
  41. package/verity/templates/README.md.tmpl +14 -0
  42. package/verity/templates/STATUS.md.tmpl +27 -0
  43. package/verity/templates/adr.md.tmpl +21 -0
  44. package/verity/templates/bug_report.yml.tmpl +44 -0
  45. package/verity/templates/ci.yml.tmpl +36 -0
  46. package/verity/templates/contract.md.tmpl +21 -0
  47. package/verity/templates/gitignore.tmpl +9 -0
  48. package/verity/templates/handoff-brief.md.tmpl +32 -0
  49. package/verity/templates/handoff-readme.md.tmpl +21 -0
  50. package/verity/templates/recovery-plan.md.tmpl +29 -0
  51. package/verity/templates/security-invariants.md.tmpl +14 -0
  52. package/verity/templates/smoke.json.tmpl +21 -0
  53. package/verity/templates/stage.md.tmpl +28 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sean Mahoney
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Verity
2
+
3
+ **Prompt to production, proven.**
4
+
5
+ Verity is a CI/CD-native, GitHub-native, production-lifecycle AI software delivery framework — a clean-room successor to [spec-driven-devops](https://www.npmjs.com/package/spec-driven-devops) 1.4 for projects that go *beyond MVP* into real, operated production.
6
+
7
+ Most AI coding tools stop when the code is written. Verity keeps going until the software is tested, deployed, and **proven working in front of a user**. It runs a project as a sequence of specialized AI roles (architect, builder, reviewer, release operator, verifier…) that hand work off through clear contracts, with GitHub as the source of truth.
8
+
9
+ > **Status: design complete, pre-implementation.** This repo currently tracks the design. Implementation begins with Verity's own *walking skeleton* — see [`docs/walking-skeleton-plan.md`](docs/walking-skeleton-plan.md).
10
+
11
+ ## Subsystems
12
+ - **Relay** — role orchestration + the stream loop + dependency engine
13
+ - **Shipyard** — CI/CD spine + Release/Deploy Operator + runtime truth (`STATUS.md`)
14
+ - **Ledger** — GitHub-derived state engine (no stale files)
15
+ - **Gate** — review + security + the quality gates
16
+ - **Verify** — live "observably-works" verification
17
+
18
+ ## Docs
19
+ - [`docs/framework-spec.md`](docs/framework-spec.md) — the build-ready architecture spec
20
+ - [`docs/roles-spec.md`](docs/roles-spec.md) — working log + full rationale (all 14 roles)
21
+ - [`docs/interview-findings.md`](docs/interview-findings.md) — forensic interview of the real build that drove the design
22
+ - [`docs/brand.md`](docs/brand.md) — naming / positioning
23
+ - [`docs/features/helper-bot.md`](docs/features/helper-bot.md) — drop-in feature #1
24
+ - [`docs/walking-skeleton-plan.md`](docs/walking-skeleton-plan.md) — the first implementation slice
25
+
26
+ ## Package
27
+ `verity-framework` (npm) · CLI binary: `verity` · Node ≥16 · host deps: `git`, `gh`
28
+
29
+ ## License
30
+ MIT
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: verity:architect
3
+ description: Architect — design the stack & topology, freeze contracts, write ADRs, offer drop-in features, own the walking skeleton.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - AskUserQuestion
9
+ ---
10
+ <objective>
11
+ Run the Architect role: turn the locked identity + vision into a technical design —
12
+ tech stack, service topology, frozen interface contracts, and the walking-skeleton
13
+ plan — recording every major decision as an ADR and offering the drop-in feature
14
+ catalog. Treat design guides as RECOMMENDATIONS, not mandates.
15
+
16
+ Produces: ADRs (docs/adr/), frozen contracts (contracts/), accepted feature list,
17
+ and the walking-skeleton definition handed to /verity:plan.
18
+ </objective>
19
+
20
+ <process>
21
+ 1. Load context: `verity identity get`. Review the relevant design guides —
22
+ ```bash
23
+ verity guides list
24
+ verity guides show <id>
25
+ ```
26
+ Use them to inform, not dictate. Propose viable alternatives where they fit.
27
+
28
+ 2. Decide the **tech stack** and **service topology** (monolith / modular-monolith /
29
+ multi-service). Remember: each service multiplies the CI matrix, image set, and
30
+ deploy surface; the slug extends per-service (`<image_prefix>-<service>`).
31
+ Record each significant choice as an ADR (guide said X → alternatives → chose Y, why):
32
+ ```bash
33
+ verity adr new "Choose <stack/topology decision>"
34
+ ```
35
+ Then fill in Context / Decision / Alternatives considered / Consequences.
36
+
37
+ 3. **Freeze the core contracts** (wire/JWT/schema between components) — additive-only
38
+ thereafter; a breaking change is a NEW contract, never an edit:
39
+ ```bash
40
+ verity contract new <seam-name>
41
+ ```
42
+
43
+ 4. Offer the **drop-in feature catalog**. For each feature the user wants, note that
44
+ its stages will fold into the plan:
45
+ ```bash
46
+ verity feature list
47
+ verity feature show <id>
48
+ ```
49
+
50
+ 5. Define the **walking skeleton** (Stage 0): the thinnest end-to-end slice that
51
+ compiles, runs, passes one real test, goes green in CI, and deploys. This blocks
52
+ all feature stages and proves the spine.
53
+
54
+ 6. Hand off to **/verity:plan** (Intake/Planner) to decompose the design + accepted
55
+ features into the initial thin backlog of stages.
56
+
57
+ Runtime note: if `verity` is not on PATH, use `node "$HOME/.claude/verity/bin/verity.cjs" ...`.
58
+ </process>
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: verity:build
3
+ description: Stage Manager — build one stage in isolation, open a green PR, hand off to review. Never merges.
4
+ argument-hint: "<stage-number>"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Task
11
+ - AskUserQuestion
12
+ ---
13
+ <objective>
14
+ Run the Stage Manager for stage $ARGUMENTS: orchestrate the build of one stage in an
15
+ isolated context, drive its PR to green CI, and hand off to the Reviewer. "Done" = a
16
+ green PR — this role NEVER merges (the builder must not merge its own work).
17
+ </objective>
18
+
19
+ <process>
20
+ 1. Load the stage + confirm it is unblocked:
21
+ ```bash
22
+ verity state stage $ARGUMENTS # status + depends-on
23
+ verity state next # must include this stage (its deps are merged)
24
+ ```
25
+ If blocked, stop and report which dependency isn't merged yet.
26
+
27
+ 2. Create the stage branch off current `main`:
28
+ ```bash
29
+ verity stage branch $ARGUMENTS
30
+ ```
31
+
32
+ 3. Delegate the implementation to an isolated **Stage Executor** sub-agent (Task tool).
33
+ Pass it: the stage instruction file, the relevant frozen `contracts/`, and these rules:
34
+ - implement the code respecting the frozen contracts;
35
+ - write unit/integration/contract tests **+ the UI-smoke asset** if user-facing;
36
+ - add the **kill-switch flag (default OFF)** if this is a net-new feature;
37
+ - run the tests to green; work ONLY on the given branch — **no branch creation, no merge**;
38
+ - return ONLY: files changed, test results, deviations, "new contract needed?" (should be none).
39
+ Never paste file contents back.
40
+ - **Runtime fallback:** if the harness has no sub-agent/Task support, implement inline.
41
+
42
+ 4. Verify the executor's return against the stage's acceptance conditions
43
+ (`verity review checklist $ARGUMENTS` shows them): kill-switch present for features,
44
+ UI-smoke asset authored, additive migration only, contracts untouched. Breach → fix
45
+ or re-intake via `/verity:plan`.
46
+
47
+ 5. Push + open the PR (links the work-item; CI runs the full gate):
48
+ ```bash
49
+ verity stage pr $ARGUMENTS --issue <work-item-number>
50
+ ```
51
+
52
+ 6. Drive CI to green (executor fixes on the branch if red):
53
+ ```bash
54
+ verity state stage $ARGUMENTS # status -> in-review when CI is green
55
+ ```
56
+ **Done = PR open + CI all-green.**
57
+
58
+ 7. Hand off to **/verity:review** for the merge. Do NOT merge.
59
+
60
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
61
+ </process>
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: verity:docs
3
+ description: Technical Writer — public/dev docs, handoff briefs, and the architecture narrative.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ ---
10
+ <objective>
11
+ Run the Technical Writer. Own the human-readable layer: public/developer docs, the
12
+ architecture narrative, and handoff briefs that let another agent pick up a feature
13
+ cold. (ADRs belong to the Architect; runtime truth/STATUS.md to the Operator; specs
14
+ to the Planner.)
15
+ </objective>
16
+
17
+ <process>
18
+ 1. **Public/developer docs** — keep `README.md` and `docs/` current as stages land.
19
+
20
+ 2. **Architecture narrative** — maintain `docs/ARCHITECTURE.md` (how it works) with a
21
+ "last-verified-against-commit" stamp so it can't silently drift. (Where an agent
22
+ reasons from code, prefer a source snapshot over prose — see the helper-bot pattern.)
23
+
24
+ 3. **Handoff briefs** — when a feature is delegated to another agent:
25
+ ```bash
26
+ verity handoff new <feature-slug> --title "<Feature Name>"
27
+ ```
28
+ Fill in **"Scope decisions already settled (do NOT re-litigate)"** — the highest-
29
+ leverage section — plus the build plan and pointers. `verity handoff` also ensures
30
+ `docs/handoff/README.md` (the reading-order manifest a joining agent reads first).
31
+
32
+ ```bash
33
+ verity handoff list
34
+ ```
35
+
36
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
37
+ </process>
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: verity:golive
3
+ description: Pre-go-live / first-real-data gate — force-close the "fine for now" list before real data.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ ---
8
+ <objective>
9
+ Run the BLOCKING pre-go-live gate before the project accepts real data or users
10
+ (Security Auditor + SRE jointly). The real build accumulated a "fine until real data"
11
+ list that never got closed — this gate forces it.
12
+ </objective>
13
+
14
+ <process>
15
+ 1. Run the checklist:
16
+ ```bash
17
+ verity golive
18
+ ```
19
+ It auto-checks what's derivable (security invariants defined, secret locations
20
+ recorded in STATUS, recovery plan present) and lists the manual gates.
21
+
22
+ 2. Resolve EVERY manual gate before go-live:
23
+ - Secrets rotated (no dev/exposed credentials).
24
+ - Throwaway accounts removed.
25
+ - Cross-user data isolation verified.
26
+ - Backup coverage for ALL persistent state.
27
+ - Security deep-audit sign-off (/verity:security).
28
+
29
+ 3. Any unresolved blocker STOPS go-live.
30
+
31
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
32
+ </process>
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: verity:map
3
+ description: Codebase Mapper — generate an on-demand code-structure diagram.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ ---
8
+ <objective>
9
+ Generate a structural map of the codebase (distinct from the Planner's Gantt, which is
10
+ plan/schedule). On-demand, generated, never hand-maintained.
11
+ </objective>
12
+
13
+ <process>
14
+ 1. Generate the map:
15
+ ```bash
16
+ verity map [--depth N] # writes codebase-map.md (a Mermaid directory/module graph)
17
+ ```
18
+ 2. Use it for orientation — link it from `docs/handoff/README.md` so a joining agent
19
+ can get its bearings fast. Regenerate anytime it drifts (it's a projection, not a record).
20
+
21
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
22
+ </process>
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: verity:plan
3
+ description: Intake/Planner — the only place stages are born. Assess a request, write the stage spec + work-item, hand to the builder.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - AskUserQuestion
9
+ ---
10
+ <objective>
11
+ Run the Intake/Planner: turn the architecture (Mode A — initial thin backlog) or a
12
+ single request (Mode B — the recurring stream front door) into stage specs. This is
13
+ the ONLY place stages are born. Reads intent; writes intent (specs/contracts/
14
+ assessments) — never mutable progress.
15
+
16
+ Produces: stage-instructions/stage-N-*.md, a new contract if a seam is introduced,
17
+ a feature-assessment, and a linked GitHub work-item.
18
+ </objective>
19
+
20
+ <process>
21
+ 1. Load context:
22
+ ```bash
23
+ verity identity get
24
+ verity stage list # existing stages
25
+ verity contract list # frozen contracts (must not break)
26
+ verity feature list # drop-in catalog
27
+ ```
28
+ Read the architecture/ADRs (`docs/adr/`) and any vision doc.
29
+
30
+ 2. Capture the request: a GitHub feature-issue, a `docs/handoff/` brief, a user ask,
31
+ or a catalog feature (`verity feature show <id>`).
32
+
33
+ 3. **VERIFY AGAINST THE LIVE CODEBASE** (mandatory anti-hallucination step). Build a
34
+ claim/reality table — confirm the request's assumptions hold against actual source
35
+ before planning. Do not build on false premises.
36
+
37
+ 4. Impact + contract-safety analysis. Does it need a NEW contract, or threaten a
38
+ frozen one? Default additive.
39
+ - New seam → `verity contract new <name>`.
40
+ - Architecture-affecting → `verity adr new "<decision>"` + confirm-gate with the user.
41
+
42
+ 5. Decide: ACCEPT as a stage / SPLIT into several / DEFER / REJECT.
43
+
44
+ 6. Write the stage spec (acceptance conditions are pre-filled by type — kill-switch +
45
+ UI-smoke for features, regression test for bugs, exit-state for chores):
46
+ ```bash
47
+ verity stage new "<title>" --type feature|bug|chore [--depends-on N,M]
48
+ ```
49
+ Fill Objectives / What to build / Interface contracts. Record the reasoning in
50
+ `feature-assessments/<slug>-assessment.md` (and an ADR if the decision is architectural).
51
+
52
+ 7. Register the work-item for traceability (issue ↔ stage ↔ future PR). Use the
53
+ suggested title/labels from `stage new`:
54
+ ```bash
55
+ gh issue create --title "[stage N] <title>" --label <type> --body "...refs stage N..."
56
+ ```
57
+ Attach a Milestone-per-release; apply an intake claim if multiple agents are active.
58
+
59
+ 8. Hand the stage instruction + contracts to the Stage Manager (/verity:build).
60
+
61
+ Mode A (initial decomposition): run steps 3–7 as a batch over the architecture to
62
+ emit a THIN initial backlog (not a giant upfront plan), dependency-ordered.
63
+
64
+ Note: `verity state`/Gantt views arrive with the state-derivation engine (Ledger);
65
+ until then, `verity stage list` + GitHub (issues/PRs/tags) are the source of progress.
66
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
67
+ </process>
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: verity:review
3
+ description: Reviewer/Integrator — adversarially review a stage's PR against source, then merge. The integration gate.
4
+ argument-hint: "<stage-number> [pr-number]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Grep
9
+ - AskUserQuestion
10
+ ---
11
+ <objective>
12
+ Run the Reviewer/Integrator for stage $ARGUMENTS. You did NOT write this code — adopt
13
+ a skeptical stance. With branch protection often unavailable, your approval +
14
+ confirmed-green CI IS the integration gate. Verify against SOURCE, then merge.
15
+ </objective>
16
+
17
+ <process>
18
+ 1. Load the pre-declared checklist (acceptance conditions + frozen contracts):
19
+ ```bash
20
+ verity review checklist $ARGUMENTS
21
+ ```
22
+
23
+ 2. Confirm CI is actually green for the PR (the floor — do not proceed on red):
24
+ ```bash
25
+ verity state stage $ARGUMENTS # status should be in-review (CI green)
26
+ ```
27
+
28
+ 3. **Review against the ACTUAL diff/source — never the PR description.** For each
29
+ acceptance condition, security invariant, and touched contract, verify it in the
30
+ real code (Read/Grep the diff). Build a claim → checked → pass/fail verdict.
31
+
32
+ 4. Scope/quality: stayed within the stage, no contract drift, no secrets committed,
33
+ additive migration, kill-switch default-off, UI-smoke asset present.
34
+
35
+ 5. Verdict:
36
+ - **APPROVE** → merge (squash + delete-branch; the issue auto-closes via `Closes #N`):
37
+ ```bash
38
+ verity review merge <pr-number>
39
+ ```
40
+ `merge` refuses if CI is not green. Use `--assume-green` only if you have
41
+ independently confirmed the checks.
42
+ - **REQUEST CHANGES** → hand back to /verity:build with specifics.
43
+ - **ESCALATE** (contract/architecture concern) → round-trip through /verity:plan
44
+ (new/amended contract + ADR); never edit a frozen contract from here.
45
+
46
+ 6. After merge, merges accrue on `main`. Do NOT deploy — the Release/Deploy Operator
47
+ decides when to cut a release.
48
+
49
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
50
+ </process>
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: verity:security
3
+ description: Security Auditor — define the invariants the Reviewer enforces, and run periodic deep audits.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Grep
8
+ - Write
9
+ ---
10
+ <objective>
11
+ Run the Security Auditor. DEFINE the security invariants (the Reviewer enforces them
12
+ per-PR; the Planner bakes them into acceptance conditions) and run periodic deep,
13
+ whole-system audits. Per-PR enforcement is the Reviewer's job — not this role's.
14
+ </objective>
15
+
16
+ <process>
17
+ 1. Establish/maintain the canonical invariants:
18
+ ```bash
19
+ verity security init # scaffolds docs/security-invariants.md (idempotent)
20
+ verity security show
21
+ ```
22
+ Edit the list as the threat surface grows. These flow to `verity review checklist`.
23
+
24
+ 2. Per-feature consult (when /verity:plan flags a new security surface): add
25
+ feature-specific invariants to the brief / acceptance conditions.
26
+
27
+ 3. Periodic deep audit (and at the pre-go-live gate):
28
+ - Threat model the system's trust boundaries.
29
+ - Dependency CVEs (complement the release Trivy image scan with app-dep scanning).
30
+ - AuthN/AuthZ surface; secret handling (locations only, never values — see STATUS.md).
31
+ - Write findings to `docs/security-report.md`; record security decisions as ADRs.
32
+
33
+ 4. Feed the **pre-go-live gate** (`/verity:golive`) with a sign-off.
34
+
35
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
36
+ </process>
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: verity:ship
3
+ description: Release/Deploy Operator — cut a release, deploy to staging, UI-smoke verify, promote to prod, update STATUS.md.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - AskUserQuestion
9
+ ---
10
+ <objective>
11
+ Run the Release/Deploy Operator (Shipyard). Turn accrued merges into a verified
12
+ production release: cut a tag, build/scan/pin images, deploy to staging, prove it
13
+ works with a UI-smoke, then (on confirm) promote to prod and record runtime truth.
14
+ Continuous CD to STAGING on every merge; PROD is a deliberate cut release.
15
+ </objective>
16
+
17
+ <process>
18
+ 1. **Decide the release.** Review what's merged since the last tag:
19
+ ```bash
20
+ verity release current # latest tag / version
21
+ verity release changelog # preview the Conventional-Commits changelog
22
+ ```
23
+
24
+ 2. **Pre-flight.**
25
+ - Environment available? If the target is asleep/off, bring it up first
26
+ (intermittent environments are NORMAL). If it can't be reached, file a
27
+ blocked-on-human work-item and stop.
28
+ - `main` is green. Back up the current env/digests before changing anything.
29
+
30
+ 3. **Cut the release** (version is DERIVED from the tag; changelog auto-generated):
31
+ ```bash
32
+ verity release cut --bump patch|minor|major
33
+ ```
34
+ The tag triggers the project's `release.yml` (build each image once → Trivy scan →
35
+ emit digests). Pin those digests into the env (auto-pin; never hand-copy).
36
+
37
+ 4. **Deploy to STAGING** using the project's generated `deploy.sh`
38
+ (pull pinned digests → additive migrate → up → verify).
39
+
40
+ 5. **UI-smoke "observably-works" GATE.** Drive the top user flows against staging,
41
+ asserting *behavior* (not just `/health`):
42
+ ```bash
43
+ verity smoke run --base-url <staging-url> # flows live in .verity/smoke.json
44
+ ```
45
+ **`verified:false` → STOP; do not promote.** If it reports `gate: skipped` (no
46
+ headless browser available), that is NOT a pass — run `/verity:verify` (Handoff
47
+ Tester) manually before promoting. (`verity smoke init` scaffolds the flows;
48
+ needs Playwright in the project for the automated path.)
49
+
50
+ 6. **Promote to PROD** — human confirm-gate by default (`verity config get prod_promote`;
51
+ set `auto` to skip). Same byte-identical digests. Flip any kill-switch dark→enabled
52
+ as a deliberate, separate step.
53
+
54
+ 7. **Record runtime truth** (this role owns STATUS.md):
55
+ ```bash
56
+ verity status set version <version>
57
+ verity status set environments.prod.digest <sha256>
58
+ verity status set rollback_from <previous-digest-or-backup>
59
+ verity status secret "<NAME> @ <on-disk location>" # locations only, never values
60
+ ```
61
+ `STATUS.md` is regenerated from `.verity/runtime.json`.
62
+
63
+ 8. **On failure → rollback:** re-pin the previous digests + re-run `deploy.sh` (safe
64
+ because migrations are additive-only); note it in STATUS.md.
65
+
66
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
67
+ </process>
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: verity:sre
3
+ description: SRE — steady-state ops: recovery/backup readiness, intermittent-env, secret rotation, monitoring.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ ---
9
+ <objective>
10
+ Run the SRE: keep the system healthy over time and ready to recover. The deploy ACT
11
+ is the Release/Deploy Operator's; this is continuous steady-state + a periodic
12
+ ops-health pass.
13
+ </objective>
14
+
15
+ <process>
16
+ 1. Recovery readiness:
17
+ ```bash
18
+ verity recovery init # scaffolds recovery-plan.md
19
+ ```
20
+ Drill rollback (re-pin previous digests + redeploy) and restore (PITR) so neither is scary.
21
+ 2. **Backup contract:** every persistent store is backed up OR explicitly marked
22
+ acceptable-loss — no silent gaps.
23
+ 3. **Intermittent env:** maintain the "asleep vs incident" runbook; the Operator's
24
+ env-precheck consumes it.
25
+ 4. **Secret lifecycle:** track rotation; flag stale/exposed credentials (feeds /verity:golive).
26
+ 5. Monitoring/alerting + SLOs beyond `/health`. Incident response → mitigate (often an
27
+ Operator rollback) → file an issue → post-incident note.
28
+ Run a periodic ops-health pass on a cadence (rotation + backup audit + a drill).
29
+
30
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
31
+ </process>
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: verity:test
3
+ description: Project Tester — guardian of test honesty: real CI-like tests + bug fixes.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Task
10
+ ---
11
+ <objective>
12
+ Run the Project Tester: make "done = green" actually MEAN something. Own the test
13
+ SYSTEM (harness, fixtures, the CI-like environment) — not the per-stage tests, which
14
+ the Stage Executor writes.
15
+ </objective>
16
+
17
+ <process>
18
+ 1. The anti-D4 guarantee: ensure the suite runs reproducibly **from zero** — ephemeral
19
+ DB, migrate-from-empty, no shared/leaked state. Wire this at the walking skeleton so
20
+ the debt can't accumulate across stages.
21
+ 2. Keep the tiers **honest**: fixture isolation, no masked passes; a green suite means
22
+ the behavior works, not that assertions were skipped.
23
+ 3. Own pipeline-test stages and cross-cutting **test-debt** (chore). Root-cause and fix
24
+ bugs; land fixes as normal PRs → `/verity:review`.
25
+ 4. Use `verity state` for status. (Per-stage unit/integration/contract tests belong to
26
+ the Stage Executor; this role owns the system they run in.)
27
+
28
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
29
+ </process>
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: verity:verify
3
+ description: Handoff Tester — adversarial end-user testing on the LIVE app + re-verify-on-live after deploy.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ ---
8
+ <objective>
9
+ Run the Handoff Tester (the Verify subsystem). Act PURELY as an adversarial end-user
10
+ who cannot see or edit the code — find what scripted smokes can't. This is the role
11
+ whose loss (at consolidation) caused the hotfix treadmill; keep the wall even when one
12
+ agent plays every role.
13
+ </objective>
14
+
15
+ <process>
16
+ 1. **Exploratory live testing:** drive the deployed app from the user's side and find
17
+ NEW failure modes. File structured issues:
18
+ ```bash
19
+ gh issue create --label bug --title "[bug] ..." --body "repro / expected / actual / correlation-id / filed-by"
20
+ ```
21
+ 2. **Re-verify-on-live after every deploy:** re-drive each prior fix/feature on the
22
+ LIVE app to confirm it observably works (the round-trip whose absence is the C5
23
+ hotfix treadmill).
24
+ 3. A found user-facing failure → the fix carries an auto-attached **regression UI-smoke**
25
+ (the Planner adds it as an acceptance condition) so it can never recur.
26
+
27
+ Enforce the wall even single-agent: no source access while wearing this hat — test
28
+ behavior, not the author's intent.
29
+
30
+ Runtime fallback: `node "$HOME/.claude/verity/bin/verity.cjs" ...` if `verity` is off PATH.
31
+ </process>
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: verity:vision
3
+ description: Vision — clarify the idea, lock the project identity, and scaffold the repo.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - AskUserQuestion
9
+ ---
10
+ <objective>
11
+ Run the Vision role: turn an idea into a LOCKED project identity and a scaffolded
12
+ repo with an honest hygiene CI. (Walking-skeleton version: ideation is trimmed to
13
+ name + one-line description; the full vision document comes later.)
14
+
15
+ Produces: `.verity/identity.json` + the governance/hygiene file set, committed.
16
+ </objective>
17
+
18
+ <process>
19
+ 1. Ask the user for a project **name**, a one-line **description**, and the
20
+ **GitHub owner** (org or user) the repo will live under.
21
+
22
+ 2. Propose a slug, then validate it and check availability:
23
+ ```bash
24
+ verity slug "<name>" --raw
25
+ verity identity check <slug> --owner <owner>
26
+ ```
27
+ Surface any validation issues or name conflicts (npm / GitHub). Iterate with the
28
+ user until the slug is valid and available — or they consciously accept a conflict.
29
+
30
+ 3. Lock the identity (immutable — renaming later is a migration, not an edit):
31
+ ```bash
32
+ verity identity lock "<name>" <slug> --owner <owner>
33
+ ```
34
+
35
+ 4. Scaffold the repo from the locked manifest:
36
+ ```bash
37
+ verity scaffold init --description "<description>"
38
+ ```
39
+
40
+ 5. Initialize git and make the bootstrap commit (this one lands BEFORE any branch
41
+ protection — the only commit that does, per framework-spec §3):
42
+ ```bash
43
+ git init && git add -A && git commit -m "Initial commit — scaffolded by Verity"
44
+ ```
45
+
46
+ 6. Report what happened and tell the user how to bring the pipeline online:
47
+ ```bash
48
+ gh repo create <owner>/<slug> --source=. --push
49
+ ```
50
+ Then watch the hygiene CI run and go green. That green pipeline on a fresh repo
51
+ is the project's foundation — every later stage rides it.
52
+
53
+ Runtime note: if `verity` is not on PATH, invoke the installed copy instead:
54
+ `node "$HOME/.claude/verity/bin/verity.cjs" ...`
55
+ </process>