Skip to content
Agentmart
Submit a tool

doc-review

Document review via Codex exec.

Skill by sd0xdev

IndexedMIT★ 194
Write a review

Chalk Labs

Need help deploying doc-review?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

npx agentmarket install skill/sd0xdev-doc-review

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Document review via Codex exec. Use when: reviewing .md docs, tech spec audit, document quality check. Not for: code review (use codex-code-review), test review (use test-review). Output: 5-dimension rating table + gate.

Use cases: documents, testing, security, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/doc-review

Tools it pre-approves 7

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(git:*),
  • Bash(node:*),
  • Read,
  • Grep,
  • Glob,
  • Task,
  • Write

What's inside

Skill name
doc-review
Description
Document review via Codex exec. Use when: reviewing .md docs, tech spec audit, document quality check. Not for: code review (use codex-code-review), test review (use test-review). Output: 5-dimension rating table + gate.
License
MIT
Allowed tools
Bash(git:*),, Bash(node:*),, Read,, Grep,, Glob,, Task,, Write
Instructions
241 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Agent Skills spec issues

  • files: referenced but missing: scripts/lib/review-dispatch.js, scripts/validate-family-sentinel.js, scripts/resolve-review-profile.js, scripts/check-doc-links.js

Files (4)

  • SKILL.md
  • codex-prompt-doc.md · references/
  • documentation-contract.md · references/
  • review-loop-doc.md · references/

SKILL.md (first lines)

# Document Review Skill

**Read first**: `references/documentation-contract.md` — the split procedure, the
functional-document exemption and the comment-block exemption list that a review of a feature
document or a comment migration judges against (`rules/docs-numbering.md` and
`rules/docs-writing.md` are its resident cores). If that Read fails, stop and report it; do not
review from memory.

## Trigger

- Keywords: review doc, document review, tech spec review, review-spec, doc-refactor, streamline doc

## When NOT to Use

- Code review (use `codex-code-review`)
- Test coverage review (use `test-review`)
- Just want to read a document (use Read directly)

## Commands

| Command             | Description            | Use Case          |
| ------------------- | ---------------------- | ----------------- |
| `/codex-review-doc` | Codex reviews .md docs | Document changes  |
| `/review-spec`      | Review tech spec       | Spec confirmation |
| `/doc-refactor`     | Streamline documents   | Doc too long      |
| `/update-docs`      | Research & update docs | After code change |

## Workflow: `/codex-review-doc`

```
Target set → Deterministic checks → Resolve profiles + batches → Codex review per batch → Rating table + Gate → Loop
```

**All changed `.md` in one change are one review plan.** The plan is the unit; it holds one or more
physical batches, and within the budget it is exactly one batch and therefore one dispatch. Reviewing
file-by-file is what this workflow replaced — it multiplied a three-file change into three whole-
document reviews.

### Step 1: Determine the Target Set

| Condition | Action |
|-----------|--------|
| Paths specified | Use them — all of them, as one plan |
| No path | `git diff --name-only HEAD` and untracked, filtered to `.md` |
| Nothing changed | Report it and stop; there is no document to review |

Never narrow a multi-file change to one file, and never ask the user to pick one. A file the plan
drops is a file nothing reviewed.

### Step 2: Deterministic Checks First

```bash
node scripts/check-doc-links.js --root "$(git rev-parse --show-toplevel)" <changed .md paths>
```

Resolves the repo-local **file links** it can classify, prints the ones that do not resolve, and
prints `unresolved` — how many link shapes it declined to classify. **Heading fragments are out of
scope**: `[x](#frag)` is dropped uncounted the way an external URL is, and `[x](./a.md#frag)` is
checked as a link to `a.md` alone. A dead `#fragment` is therefore not a finding this step
establishes, and the reviewer is free to raise one.

**Scan only the paths that exist in the working tree.** A deleted `.md` (the resolver reports it
`deleted: true`) is **omitted from this scan** — passing it produces an `unreadable` failure that
hands the reviewer a defect when the deletion *is* the change. Its review copy is
`git show HEAD:<path>`, and the prompt says so per file.

`Bash(node:*)` and `Task` are in `allowed-tools` since review-loop-resilience (2026-08-23): the
fallback dispatch below names `scripts/lib/review-dispatch.js` and `scripts/validate-family-sentinel.js`
as steps of this workflow, and a named step should not stall on a permission prompt mid-review. The
earlier deliberate omission protected against *unnamed* `node` invocations riding a review's grant;
the boundary is now behavioural — this workflow invokes `node` only for the scripts its steps name
(the link check, the profile resolver, the dispatch decision, the sentinel validator, the state note).
**Advisory input, not a gate**: it always exits 0, and its output is fed to the reviewer as
*findings already established* so the LLM does not spend a pass rediscovering them. `markdownlint`
does not resolve links, so nothing else answers this.

**Pass both fields to the prompt, and never `failures` alone.** It is a scanner, not a CommonMark
parser — this repository ships zero dependencies — so `failures: []` settles the link question only
alongside `unresolved: 0`. With `unresolved > 0` that many link shapes went unchecked, and saying
"already settled" over them is the one way this advisory input can cost a review rather than save
one.

### Step 3: Resolve Profiles and Batches

```bash
node scripts/resolve-review-profile.js --tier <effective tier> --files <a.md,b.md> --root "$(git rev-parse --show-toplevel)"
```

Emits a per-file profile with the reasons it is not shallower, plus the batch plan. Richer inputs —
the `##` sections a shallow profile is confined to, and whether code landed with the change — go in
via `--plan <file|->`, a JSON document of the same shape the resolver prints:

```json
{ "tier": "standard", "code_changed": false,
  "files": [ { "path": "docs/features/x/2-tech-spec.md",
               "profile": "living-sync", "sections": ["3. Design"] } ] }
```

Three things this step decides, and none of them is negotiable afterwards:

- **The profile is resolved before the prompt is built.** A shallow prompt for a change that did not
  earn one is never assembled, so there is no mismatch to detect afterwards and nothing to poison.
- **Escalation is one-way and per file.** One file escalating raises that file's questions and the
  batch's shared dimensions; it never withdraws another file's `record-diff` exemption.
- **An over-budget plan splits loudly.** Say which batches were produced and why, then dispatch each.
  Never claim one dispatch you did not make, and never drop a file to fit.

### Step 4: Codex Review, One Dispatch Per Batch

**First review**: dispatch per `@skills/codex-code-review/references/codex-transport.md` § Start with the doc review prompt. See `references/codex-prompt-doc.md`.


**Save the returned `threadId`** — one per batch.

**Loop review**: dispatch per § Resume with the re-review template. See `references/review-loop-doc.md` — its Loop Rules carry the thread-rotation clause (central contract).

**`codex_fail` → fallback carries the gate** (adapter **exit 1** only — `@skills/codex-code-review/references/codex-transport.md` § Completion state machine: a pending or unknown completion keeps the gate **open** with no fallback, exit 2 is a configuration error, and an `alloc`/`cleanup` failure is a lifecycle error) (`@rules/auto-loop.md` § Review Dispatch): decide via `scripts/lib/review-dispatch.js` (`contract:'doc'`), record `[REVIEWER_FALLBACK] plane=doc_review from=codex to=contract-neutral-reviewer reason=<…> | <ISO8601>` (sticky for this change), dispatch `contract-neutral-reviewer` via Task with `references/codex-prompt-doc.md` as the governing template — batch manifest, profiles and frozen file list included (P3 = one retry on a fresh instance) — and validate the raw report with `node scripts/validate-family-sentinel.js doc` before adopting the verdict (exactly one of `✅ Mergeable` / `⛔ Needs revision`, no foreign terminal). Fallback agents are stateless, so each loop round is a fresh dispatch. Carriers exhausted → no gate sentinel, behaviour-layer `⚠️ Need Human`, nothing noted.

Stop `cat`-ing whole existing files into the prompt. Codex has sandbox access; the prompt carries the

From sd0xdev/sd0x-harness, MIT.

Signals

Stars
194
Forks
26
Open issues
5
Last commit (this folder)
Sep 25, 2026 (1 month ago)
Last release
Oct 6, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from sd0xdev

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get doc-review running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying doc-review?

CallGet help
Cite this page

doc-review skill. Agent Mart. https://agentmart.dev/skills/sd0xdev-doc-review (last updated 2026-10-24)