You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/decisions.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,6 +323,8 @@ Rules live in `references/review-brief.md`; the four caller skills (`hyper-plan-
323
323
324
324
`docs-target` frontmatter now encodes as a JSON array in `--docs-path` list mode (vs. the pre-existing JSON string in `--docs-dir` mode); `resume.mjs`'s identity check normalizes both shapes — a legacy scalar string is wrapped to a 1-element array before the set comparison — so pre-existing single-string artifacts remain resumable without a migration.
325
325
326
+
**Follow-up 2026-07-16 — skill grammar relaxed from `.md`-only to any file.** The `hyper-docs-review` / `hyper-docs-loop` slash grammars initially accepted only `.md` file tokens, which couldn't express the motivating `site/index.html` target above even though the bridge itself never restricted extension. Relaxed to discriminate file-vs-directory by an existence check (`[ -f ]` / `[ -d ]`) rather than the `.md` extension, so the skills accept any existing file and match the bridge's capability. `--docs-dir` is still non-recursive and still top-level `.md`-only inside a directory (unchanged) — the relaxation is only about which explicit file tokens the `--docs-path` path accepts.
Copy file name to clipboardExpand all lines: docs/gates-and-agents.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ A gate skill mediates a step in the cycle that produces a canonical `.hyperclaud
141
141
-**Slash:**`/hyperclaude:hyper-docs-review [path...] [--diff-base <ref>] [--resume [<artifact>]]` — argument order is `path → --diff-base → --resume`. `path` defaults to `docs/` when omitted, so `/hyperclaude:hyper-docs-review --diff-base main` is valid (reviews `docs/` against the diff).
142
142
- Empty → top-level `.md` files in `docs/` (commentarium convention).
143
143
- Single file → reviews that file.
144
-
- Multiple `.md`files (space-separated) → each maps to its own `--docs-path` flag (repeatable; appends).
144
+
- Multiple files (space-separated, any type — e.g. `README.md` + `site/index.html`) → each maps to its own `--docs-path` flag (repeatable; appends).
145
145
- Directory → reviews top-level `.md` files in that dir (recursion deferred — see [decisions.md](decisions.md)).
146
146
-`--resume` — resume the most recent matching prior review (auto-discovers newest artifact in `.hyperclaude/docs-reviews/` matching on the docs-target SET — order-insensitive — plus diff-base and current `template-version`; falls back to fresh run if none found, records `codex-resume-status: fallback`).
147
147
-`--resume <prev-artifact-path>` — resume from an explicit prior review; validation fail → `ok:false`, no fresh run. If docs payload exceeds 200KB on a resume run, bridge returns `ok:false` (no fallback — user must narrow scope).
@@ -153,7 +153,7 @@ A gate skill mediates a step in the cycle that produces a canonical `.hyperclaud
-**Slash:**`/hyperclaude:hyper-docs-loop [target]` — same target grammar as `hyper-docs-review` (empty → `docs/` directory; a file → single-file mode; multiple files → repeated `--docs-path`; existing directory → directory mode).
157
157
- **Mechanics:** team-based docs-hardening loop. The skill confirms agent-teams availability via an env probe (`[ "$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS" = "1" ]`; a missing env var stops as a clean no-op before any tree mutation), then spawns the [`documenter`](#documenter) agent once as a persistent teammate — same agent the `hyper-docs-sync` flow uses, dispatched in this loop with a structured-findings reply contract (the agent stays loop-agnostic; the per-finding schema and `request-id: <id>` prefix live ONLY in the SKILL.md spawn-prompt, not in the agent file); every lead→teammate SendMessage (findings, corrective, shutdown) runs the §A send-resolution procedure (bare `teammate_name` on the main path; `agent_id` fallback + notification-reply driving on degraded hosts via the removable `§A-DEGRADE` override). Then it invokes Codex `docs-review` directly via the bridge for that first review, sends blocking `### Findings` bullets to the still-live documenter via SendMessage, and repeats until no blocking findings remain (judged semantically — accuracy / drift / actively misleading claims block; pure prose-polish nits and redundancy-only findings do not) or a 6-review cap is reached. Only the `### Findings` section is gating; `### Gaps`, `### Broken Or Suspect Links`, and `### Cross-Doc Inconsistencies` are reported in the final Step 9 summary but never auto-fixed (those sections need human judgment). The reviewer is always the Codex bridge — NOT a team agent — preserving the "Claude builds, Codex reviews" invariant. (At Step 0 the lead Reads both the shared `${CLAUDE_PLUGIN_ROOT}/references/loop-protocol.md` — agent-teams contract, unsolicited-message protocol, teardown, abstract request-id state machine, AND the shared **§F loop skeleton** (Step 0/2/4a/8 boilerplate + degrade-condition pointers) that this SKILL binds to by pointing at the named §F sub-blocks — and the loop-specific `skills/hyper-docs-loop/references/failure-protocol.md` — structured-schema reply with `request-id: <id>` prefix, semantic finding-map validation, docs-loop-specific anti-patterns.)
158
158
-**Writes:** the doc edits themselves (uncommitted), plus one `.hyperclaude/docs-reviews/<timestamp>-<slug>.md` per Codex review iteration.
159
159
-**No baseline sync:** docs-loop is review ↔ fix only. If you want code-change-driven syncing first, run `/hyperclaude:hyper-docs-sync` separately before invoking this skill (keeping the two flows separate avoids conflating the code-diff-driven sync with the docs-target-driven review).
Copy file name to clipboardExpand all lines: skills/hyper-docs-loop/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ The lead must also retain the following handle-resolution run-state across turns
42
42
`$ARGUMENTS` is a **docs target** (optional path tokens; the loop mirrors `hyper-docs-review`'s target grammar). Resolution:
43
43
44
44
-`$ARGUMENTS` empty → default to `docs/` (directory mode).
45
-
-`$ARGUMENTS` is one or more existing `.md`file paths → multi-file mode (each maps to its own `--docs-path`).
45
+
-`$ARGUMENTS` is one or more existing file paths (any type) → multi-file mode (each maps to its own `--docs-path`).
46
46
-`$ARGUMENTS` is a single existing directory path → directory mode.
47
47
- Anything else → ask the user to clarify and STOP.
48
48
@@ -54,18 +54,18 @@ See `${CLAUDE_PLUGIN_ROOT}/references/loop-protocol.md` §F2 for the two-file re
54
54
55
55
### Step 1 — Resolve the docs target
56
56
57
-
Apply the resolution table above to `$ARGUMENTS`. Verify each path exists via Bash (`[ -e "<path>" ]`). Record `docs_target` as the bridge argv tokens:
57
+
Apply the resolution table above to `$ARGUMENTS`. Classify each token via Bash — `[ -f "<path>" ]` (existing file → `--docs-path`) vs `[ -d "<path>" ]` (existing directory → `--docs-dir`); a token that is neither → STOP. Record `docs_target` as the bridge argv tokens:
58
58
59
59
| Argument |`docs_target` argv |
60
60
|---|---|
61
61
| Empty |`['--docs-dir', 'docs/']`|
62
-
| One or more `.md` files that exist|`['--docs-path', '<path1>', '--docs-path', '<path2>', ...]` (one flag per file, in order) |
62
+
| One or more existing files (each `[ -f ]`, any type)|`['--docs-path', '<path1>', '--docs-path', '<path2>', ...]` (one flag per file, in order) |
63
63
| Single existing directory |`['--docs-dir', '<path>']`|
64
64
| Anything else | Ask the user to clarify, STOP. |
65
65
66
66
`docs_target` is reused **verbatim** on every iteration in Step 5 and Step 7 — never change it mid-run.
67
67
68
-
**Directory-target note.** Per `docs-review`'s established contract, `--docs-dir <p>` reviews only the top-level `.md` files directly under `<p>` (not recursive). This is intentional. The loop inherits that scope; if the user wants nested docs reviewed, they invoke the loop once per subdirectory or against a single `.md` path.
68
+
**Directory-target note.** Per `docs-review`'s established contract, `--docs-dir <p>` reviews only the top-level `.md` files directly under `<p>` (not recursive). This is intentional. The loop inherits that scope; if the user wants nested docs reviewed, they invoke the loop once per subdirectory or against an explicit file path of any type.
- Group 1 = zero or more space-separated leading path tokens (split on whitespace in Step 1); each is either an existing `.md` file or, if it's the sole token, an existing directory; empty defaults to `docs/`. Negative lookahead per-token prevents matching `--diff-base` or `--resume` as a path. Many`.md` files OR one directory — never both.
34
+
- Group 1 = zero or more space-separated leading path tokens (split on whitespace in Step 1); each is either an existing file (any type — not just `.md`) or, if it's the sole token, an existing directory; empty defaults to `docs/`. Negative lookahead per-token prevents matching `--diff-base` or `--resume` as a path. Many files OR one directory — never both.
35
35
- Group 2 = optional `--diff-base <ref>` value
36
36
- Group 3 = literal `"--resume"` token (truthy when present, undefined when not)
37
37
- Group 4 = optional resume artifact path
@@ -42,6 +42,7 @@ When Group 3 is `'--resume'` (truthy) and Group 4 is undefined, treat as `--resu
42
42
-`/hyperclaude:hyper-docs-review` — reviews `docs/`, fresh run
43
43
-`/hyperclaude:hyper-docs-review docs/api.md` — reviews single file, fresh run
44
44
-`/hyperclaude:hyper-docs-review README.md docs/workflow.md docs/architecture.md` — reviews three files, fresh run
-`/hyperclaude:hyper-docs-review --resume` — reviews `docs/`, resumes from latest artifact
46
47
-`/hyperclaude:hyper-docs-review --resume <prev-artifact-path>` — resumes from explicit artifact
47
48
-`/hyperclaude:hyper-docs-review docs/api.md --diff-base main` — single file with diff context
@@ -58,14 +59,14 @@ See `${CLAUDE_PLUGIN_ROOT}/references/bridge-review-calls.md` for the shared `--
58
59
59
60
### Step 1 — Resolve target
60
61
61
-
Split Group 1 on whitespace into tokens (or default to `docs/` when empty). Verify each path exists first via Bash (`[ -e "<path>" ]`).
62
+
Split Group 1 on whitespace into tokens (or default to `docs/` when empty). Classify each token via Bash — `[ -f "<path>" ]` (existing file → `--docs-path`) vs `[ -d "<path>" ]` (existing directory → `--docs-dir`); a token that is neither → STOP.
| One or more `.md` paths that exist|`['docs-review', '--docs-path', '<path1>', '--docs-path', '<path2>', ...]` (one flag per file, in order) |
67
+
| One or more existing files (each `[ -f ]`, any type)|`['docs-review', '--docs-path', '<path1>', '--docs-path', '<path2>', ...]` (one flag per file, in order) |
67
68
| Single existing directory path |`['docs-review', '--docs-dir', '<path>']`|
68
-
| Anything else (mix of files and a dir, non-`.md` path, or a path that doesn't exist) | Tell user the contract, ask to clarify, STOP. |
69
+
| Anything else (mix of files and a dir, more than one directory, or a path that doesn't exist) | Tell user the contract, ask to clarify, STOP. |
0 commit comments