Skip to content
Back to skills

Gov Validate

BSecurity

Checks all decision records together for conflicts, broken links, stale design docs, unrecorded choices and open threads. Use when the user says "validate our ADRs" or "do our ADRs contradict each other". Not for one record (use gov-review).

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
ai-agentsgobashgit

Security analysis

B75/100
  • criticalSends environment variables or credentials to an external URL

Pro scans all 4 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add DoctorMozg/claude-pipelines --skill gov-validate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gov Validate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gov Validate
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/doctormozg-gov-validate/badge)](https://www.skillsdirectory.com/skills/doctormozg-gov-validate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gov-validate
description: 'Checks all decision records together for conflicts, broken links, stale design docs, unrecorded choices and open threads. Use when the user says "validate our ADRs" or "do our ADRs contradict each other". Not for one record (use gov-review).'
argument-hint: '[docs dir] [no-code]'
allowed-tools: Agent(gov-critic-consistency), Agent(gov-thread-finder), Agent(gov-coverage-prober), Agent(gov-coverage-answerer), Agent(pipeline-researcher), AskUserQuestion, Read, Write, Glob, Grep, Bash(${CLAUDE_PLUGIN_ROOT}/scripts/gov-program.sh *), Bash(git rev-parse *), Bash(git log *), Bash(mkdir *), Bash(date *)
---

# Gov Validate: Check the Decision Records as One Set

## Overview

`gov-review` scores records one at a time, and `gov-design-sync` rebuilds one design doc. Neither reads the whole set at once, which is where most problems sit: two accepted ADRs that can't both hold, an ADR that depends on a superseded one, a design doc whose ADRs moved, a choice the code makes that no record holds, and questions a record left open that nobody came back to. This skill finds them. A script checks the links between records, `gov-critic-consistency` reads the accepted ADRs together, the blind probe tests each design doc against its ADRs, `pipeline-researcher` reads the code for unrecorded choices, and `gov-thread-finder` lists the open threads. The result is one report, ranked by severity. Each finding names the command that fixes it. Nothing is edited.

## When to Use

- The user wants the decision records checked as a whole: "validate our ADRs", "do our ADRs contradict each other", "what decisions are we missing".
- Before a planning round, to see which decisions are open or missing.
- After several ADRs were superseded, to find what still points at the old ones.

### When NOT to use

- Scoring one record, or each record on its own: use `gov-review`.
- Rebuilding a design doc after its ADRs changed: use `gov-design-sync`. This skill reports the doc as stale and recommends it.
- Making or recording a decision: use `govern`, or `gov-program` for a whole architecture.
- Reviewing code changes: use `review-branch`.

## Input

- `$ARGUMENTS`: an optional docs directory holding `decisions/`, `rfcs/` and `design/`, by default `<PROJECT_ROOT>/docs`. A single record file → say that `gov-review` audits one record, and stop. A path that doesn't exist → ask for the right one with AskUserQuestion.
- `no-code`: skip the code scan, for a records-only check or a repo whose code lives elsewhere.

## Approval gate

None. The skill is read-only: it writes the report under `REPORT_DIR` and its working files under `TASK_DIR`, and never touches a record. The agents it dispatches write only their own output files.

## Constants

- **PROJECT_ROOT**: resolved once in setup with `echo "${MZ_MEMORY_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"`; expand `<PROJECT_ROOT>` to it in every command and agent prompt.
- **TASK_DIR**: `<PROJECT_ROOT>/.mz/task/<task_name>/` | **REPORT_DIR**: `<PROJECT_ROOT>/.mz/reviews/`
- **MAX_WAVE**: 6 agents per wave | **MAX_CONSISTENCY_SET**: 40 accepted ADRs per consistency pass; a larger set is split by design doc
- **MAX_PROBE_QUESTIONS**: 40 per design doc, across both directions | **STALE_PROPOSED_DAYS**: 30
- **SCRIPT**: `${CLAUDE_PLUGIN_ROOT}/scripts/gov-program.sh`. **SKILL_DIR**: `${CLAUDE_SKILL_DIR}`. **PLUGIN_ROOT**: `${CLAUDE_PLUGIN_ROOT}`. Phase files write `<SCRIPT>`, `<SKILL_DIR>/...` and `<PLUGIN_ROOT>/...` because files opened with Read get no variable substitution; expand them before running a command or passing a path to an agent.

## Core Process

### Phase Overview

| Phase | Goal                                                | Details            | Loop? |
| ----- | --------------------------------------------------- | ------------------ | ----- |
| 0     | Setup                                               | inline below       | —     |
| 1     | Facts: record list, link graph, design doc checks   | `phases/facts.md`  | —     |
| 2     | Scan: consistency, threads, code, design doc probes | `phases/scan.md`   | —     |
| 3     | Report                                              | `phases/report.md` | —     |

### Phase 0: Setup (inline)

1. Resolve `PROJECT_ROOT` with the command in Constants, before any `cd`, and use it for every `.mz/` path.
1. Parse `$ARGUMENTS` as Input describes: the docs directory and the `no-code` flag.
1. Derive `task_name` = `<YYYY_MM_DD>_gov-validate_<slug>`, where `<slug>` is the docs directory's name in snake_case (`docs` by default), at most 20 characters. On a same-day collision append `_v2`, `_v3`.
1. Write `<TASK_DIR>/state.md` with the Write tool, which creates the folder: `schema_version: 2`, `Status: running`, `Phase: 0`, `PhaseName: setup`, `Started: <ISO>`, `FilesWritten: []`, `phase_complete: false`, `what_remains: ["facts", "scan", "report"]`, `DocsDir: <path>`, `CodeScan: yes | no`, `Report: <REPORT_DIR><task_name>.md`.
1. Emit a setup block: task name, docs directory, code scan on or off, report path. Then read `phases/facts.md`.

### Phase 1: Facts

List every record with its status, date and kind. Run `<SCRIPT> graph` on the docs directory and `<SCRIPT> check` on each design doc that has a decision index, and write all of it to `facts.md`. With no records → report it and stop. See `phases/facts.md`.

### Phase 2: Scan

One wave holds `gov-critic-consistency` on the accepted ADRs, `gov-thread-finder` on every record and `pipeline-researcher` on the code (left out with `no-code`). The prober's ask mode for each design doc fills the remaining slots. Each design doc's blind answers and grading follow in later waves. See `phases/scan.md`.

### Phase 3: Report

Merge every finding into `<REPORT_DIR><task_name>.md`: a summary table by kind and severity, then the findings, Critical first, each with its evidence and next command. Emit a short summary in chat with the path. See `phases/report.md`.

## Red Flags

- You edited a record, or wrote anything outside `.mz/`.
- You reported a finding no agent or script produced, or dropped one an agent reported without saying why.
- You gave a finding no next command, or a `/govern` call that doesn't say what to decide.
- You marked the set clean while an agent returned no verdict or no output file. That agent's check didn't run, and the report must say so.

## Verification

The final block gives the report path, the record counts by kind, the findings by severity and kind, and every check that didn't run with its reason. Confirm the report file exists. `state.md` is `complete` with `what_remains: []`.

## References

- `<SKILL_DIR>/phases/facts.md`, `<SKILL_DIR>/phases/scan.md`, `<SKILL_DIR>/phases/report.md`: the steps of Phases 1 to 3, read at the start of each phase.
- `<PLUGIN_ROOT>/skills/gov-design-sync/references/coverage-check.md`: the probe's dispatch prompts. Phase 2 reuses its ask, answer and grade steps and leaves out the claim audit.

## Error Handling

- `graph` or `check` exits 1 or 2 → record the script's message under `## Checks not run` in the report, and go on with the agents.
- Reviewer isolation follows `<PLUGIN_ROOT>/shared/review-isolation.md`. Finish independent checks, then disclose unavailable reviews as checks not run; do not retry an unchanged unavailable boundary or count it as PASS. A diagnostic report can finish while explicitly incomplete.
- An agent returns `NEEDS_CONTEXT` → supply what it names and dispatch once more. `BLOCKED`, no valid `STATUS:` line or no output file → retry once, then record that check as not run and go on.
- Unreadable record files → list them in the report. They count as findings, since nothing else can check them.

## State Management

State persists to `.mz/task/<task_name>/state.md` under the project root, `${MZ_MEMORY_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}`, resolved once at the start of the run. Schema is **v2**: line 1 is `schema_version: 2`; line 2 is `Status:` with one of `pending`, `running`, `blocked`, `complete`, `aborted_by_user` or `failed`, lowercase and unquoted; then `Phase`, `Started`, `phase_complete` (boolean) and `what_remains` (YAML list of strings), with skill-specific keys below them. Milestones go in `Phase`; the reason for `blocked` or `failed` goes in `what_remains`. Set `phase_complete: false` on phase entry and `true` once the phase's artifacts are written and its gates pass. Refresh `what_remains` on every phase transition; it is `[]` when `Status` is `complete`. Write the file after every phase and before every gate, and re-read it after compaction. Record decisions worth recalling under a heading that reads exactly `## Decisions`, placed before `## Notes`; mz-memory harvests them only once `Status` is `complete`. Under a heading that reads exactly `## Lessons`, add one line whenever a review finding is accepted and fixed, a step fails, gate feedback corrects a mistake, or an approved approach is reversed, in the form `- (review|failure|correction|change) WHEN <situation> → <what to do> — WHY <cause>`, concrete and under about 40 words; mz-memory harvests lessons whatever the `Status`. Treat a legacy `completed` as `complete`. On reading a `schema_version: 1` or unversioned file, put `schema_version: 2` on line 1 and `Status` on line 2, add the missing keys, and log the upgrade. Leave a file with a higher `schema_version` untouched: ask whether to Restart (archive it), start New (`_v2`) or Abort, and stop if nobody can answer.

Append every file the run writes to `FilesWritten`: facts.md, each agent's output, the probe folders and the report.

Files in this skill

  • SKILL.md9.2 KB
  • phases/facts.md2.9 KB
  • phases/report.md4.7 KB
  • phases/scan.md6.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.