feat(markdown-format): add setup skill on the uniform contract (0.5.0) - #342
Conversation
First tranche of wave #314 (epic #313, dim 8): the fleet's first conforming setup exemplar. check verifies the hook's runtime prerequisites read-only (Bash version, jq, markdownlint-cli2 via the hook's two sanctioned resolution paths, discovered markdownlint config plus the trust boundary, effective toggle); apply re-checks and resolves — pure guidance for system tools and the native userConfig toggle, with an explicitly requested consumer-repo npm install --save-dev markdownlint-cli2 as its only write path. Non-interactive when the action argument is supplied; never writes the plugin cache, user settings, or pluginConfigs. Contract-gate extension (check/apply structural rule) is deferred to the wave's final tranche: it would fail the 19 not-yet-migrated shape-B setups today. ## Related - Part of #314 - Part of #313 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb6a90de90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nfigs Codex review on #342: apply install-lint now detects the repository's package manager from its lockfile (pnpm/yarn/bun/npm) and stops with guidance on ambiguity instead of hardcoding npm; check scans the whole tree for markdownlint configs since the hook loads the file-to-root cascade, so nested executable configs now surface in the trust-boundary report instead of a falsely reassuring root-only scan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d9afdc504
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…er field Codex round 2 on #342: check's trust-boundary scan now mirrors the hook's collect_risky_configs exactly — declarative .markdownlint-cli2.* files declaring customRules/markdownItPlugins/outputFormatters are risky, not just .cjs/.mjs. Package-manager resolution gains the package.json "packageManager" rung between lockfile and the npm default, and a lockfile-vs-packageManager contradiction stops with guidance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0efc44db4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…n PnP Codex round 3 on #342: check now applies the hook's shim validation (resolve symlinks, reject targets escaping the repo's node_modules) so a shim the hook rejects cannot PASS setup; apply routes Yarn Berry/PnP repos to guidance instead of an install that yields no node_modules/.bin shim, and every remediation re-runs its check probe before claiming resolved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 482ca750b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Pointer-over-copy: check no longer hand-copies the hook's resolution paths and risk criteria — it reads the hook script as the single source of truth and mirrors what it actually does, killing the drift class the last two review rounds exposed. Yarn linker semantics corrected against the yarnpkg nodeLinker docs (pnp default; node-modules and pnpm are the linkers that materialize node_modules). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…l-lint Codex round 4 on #342: PnP guidance now triggers only on positive PnP evidence (.pnp.cjs/.pnp.loader.mjs or nodeLinker: pnp) so Yarn Classic and materializing-linker Berry repos install normally, with the verify-after-remediation rule as the backstop; the install-lint action is exposed in the argument-hint and routing instead of being reachable only from prose. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 114d4e5d28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… installing Codex round 5 on #342: Berry defaults nodeLinker to pnp when unset, so marker-file inference misses a fresh Berry checkout. The install path now asks the repository's own Yarn (yarn config get nodeLinker) and routes pnp to guidance; node-modules/pnpm and Yarn Classic install. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98c809eeaf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…antee Codex round 6 on #342: the purpose-level "never a repository write" rule contradicted the explicitly authorized apply install-lint path; the guarantee now names that single write-path exception. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fd0127497
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bare "PnP" trips the spell-checker's word splitter (Pn -> On); the full spelling is cleaner prose and needs no allowlist change to the standards-managed typos config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d39f19a45a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude finished @kyle-sexton's task in 4m 2s —— View job PR Review
SummaryStrong design. The nine fix commits across this PR show disciplined iteration on Codex feedback, and the core architecture is sound: Three issues remain from the last two Codex review rounds (commits Findings1. README install instructions omit Plain Fix: change to 2. CHANGELOG 0.5.0 entry names The skill auto-detects the repo's package manager and uses Fix: replace with something like "an explicitly invoked 3. SKILL.md check step 4 conflates advisory whole-tree scan with the hook's per-file walk These two instructions contradict each other. The hook's walk is file-specific (file directory → repo root); the check's whole-tree scan is a superset with no target file. "Mirror the hook's config walk" signals that the check reproduces the hook's exact behavior, but immediately "Search the whole tree" does something broader — an advisory scan of all configs the hook could load for any file in the repository. This is distinct from the final Codex comment's claim (which I believe is based on a misread of the README — the README says config discovery starts "from the repository root", but the hook's Fix: drop "mirror the hook's config walk" and describe this as an advisory whole-tree scan, e.g. "Check step 4 does a comprehensive advisory scan of the entire repository (skip 4. Yarn Classic and The SKILL.md says run Fix: add Not a bug: README config-discovery direction
What's working well
|
|
Claude finished @kyle-sexton's task in 3m 35s —— View job PR Review
Status: 4 findings carried forward from prior review rounds, still open at HEAD
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87fbd5842a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude finished @kyle-sexton's task in 2m 38s —— View job PR Review
Status: 5 open findings — 4 carried forward, 1 newThe merge commit ( Finding 1 — README claims plain
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42660b3120
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ap rung README documents apply install-lint explicitly and states the per-file config cascade accurately (nested configs govern their subtree; discovery caps at the repo root the hook cds to — per upstream markdownlint-cli2 docs); CHANGELOG describes the package-manager-aware install instead of hardcoding npm; npm-shrinkwrap.json now counts as an npm lockfile signal (and as a party to multi-lockfile ambiguity). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 2m 45s —— View job PR Review
Status: 3 of 5 findings fixed — 2 carry forward, 1 Codex finding still openCommit Fixed in
|
Codex round 8 on #342: a repo shim can resolve yet be broken (missing Node interpreter, dangling target), so resolution-only PASS was misleading. check now executes the resolved linter with --version and fails with the execution error when it cannot run; the does-NOT-do section scopes its no-execution claim to that single liveness probe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 3m 29s —— View job PR Review
Status: 4 of 5 prior findings resolved; 1 still openTwo commits landed since the last Claude review at
Resolved since last reviewFinding 1 — README
Finding 2 — CHANGELOG names
Finding 5 —
Codex Finding (liveness probe) —
Still openFinding 4 — SKILL.md: Yarn Classic On Yarn Classic, Fix: add Finding 3 — residual note (not re-raising as a blocker)
What's working wellThe two new commits are clean:
The core architecture remains solid: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 435af2ecb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 2. **`jq`** — `command -v jq`. FAIL if absent: the hook then skips with a visible | ||
| once-per-session notice instead of formatting. |
There was a problem hiding this comment.
Verify that jq can execute before reporting it available
When jq resolves on PATH but cannot run (for example, a stale binary with a missing dynamic loader or an incompatible executable), this probe reports PASS. The hook uses the same command -v gate in hooks/markdown-format.sh:132-139, then relies on jq to parse file_path at lines 193-210; a failed parse makes the hook exit without formatting. Run a harmless jq execution/capability probe so setup does not report the prerequisite as configured in this case.
Useful? React with 👍 / 👎.
…#355) ## Summary Tranche 2 of wave #314 (epic #313, dim 8): the battle-tested markdown-format exemplar from #342 (six adversarial review rounds), cloned to the nine collision-free shape-A plugins. | Plugin | Version | apply write path | |---|---|---| | actionlint | 0.4.0 | none — guidance only | | bash-format | 0.5.0 | none — guidance only | | powershell-format | 0.4.0 | none — guidance only (module install is user-scope guidance) | | eol-normalizer | 0.4.0 | none — guidance only | | desktop-notification | 0.4.0 | none — probes only the current OS family's channel deps | | biome-format | 0.4.0 | `apply install-biome` — repo package manager (lockfile → packageManager → npm; Plug'n'Play → guidance) | | ruff-format | 0.4.0 | `apply install-ruff` — only into a managed env the repo already uses; never creates one | | firecrawl | 0.3.0 | none — defers to the plugin's lazy-install design; reports `FIRECRAWL_API_KEY` presence without printing it | | playwright | 0.3.0 | `apply install-cli` — stated-before-running global npm install | Contract invariants everywhere: `check` reads the plugin's own hook/skill source as single source of truth and probes what it actually does (no hand-copied lists to drift); `apply` re-checks first, names every write path in the argument-hint, states it before running, re-verifies after every remediation; never writes the plugin cache, user settings, or `pluginConfigs`; non-interactive when the action is supplied; `disable-model-invocation: true`. Also backfills the undocumented `[0.3.1]` CHANGELOG entries in actionlint and powershell-format (#298's hook-utils resync, verified via `git log -S`). **Deferred for lane ownership** (per the org WIP survey): disk-hygiene (PR #286 touches its plugin.json/CHANGELOG) and guardrails (PR #305 ditto) — they join a later tranche after those PRs land. ## Verification - `validate-plugins.sh`, `validate-plugin-contracts.mjs` (28 setup skills, 1513 files), markdownlint (55 files), `typos`: all green locally. ## Related - Part of #314 - Part of #313 No linked issue: tranche 2 of #314 — the issue closes with the wave's final tranche. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Tranche 1 of wave #314 (epic #313, dim 8): the fleet's first conforming setup exemplar, on the doctrine flagship
markdown-format.The audit found no dim-8 PASS anywhere except zero-config exemptions — the uniform contract (
setupskill,disable-model-invocation: true,checkread-only +applyidempotent, non-interactive with complete arguments) had no reference implementation. This PR authors it as the template the remaining 30 plugins will follow:check— read-only probes with a PASS/FAIL/INFO table: Bash version (3.2+ floor, 5.0+ telemetry note),jq,markdownlint-cli2via the hook's two sanctioned resolution paths (PATH ornode_modules/.bin, nevernpx), which markdownlint config the repo's cascade discovers (+ the executable-config trust boundary), and the effectivemarkdown_format_enabledvalue.apply— re-checks, then resolves. For system tools and the native toggle it is guidance-only (this skill never installs system packages, never writes user settings orpluginConfigs); its only write path is an explicitly requestednpm install --save-dev markdownlint-cli2in the consumer repository.applyto write.Gate note: the contract gate's check/apply structural rule is deliberately deferred to the wave's final tranche — landing it now would fail the 19 not-yet-migrated shape-B setups. Recorded in the wave plan.
Verification
validate-plugins.sh,validate-plugin-contracts.mjs(now 19 setup skills), markdownlint: green.Related
🤖 Generated with Claude Code
No linked issue: tranche 1 of #314 — the issue closes with the wave's final tranche.