adr
Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as…
Pre-commit checks — lint:fix -> build -> test
$ npx -y skills add sd0xdev/sd0x-dev-flow --skill precommit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/precommitContext preview
The summary Claude sees to decide when to auto-load this skill.
Pre-commit checks — lint:fix -> build -> test
name: precommit description: "Pre-commit checks — lint:fix -> build -> test" allowed-tools: Bash(node:*), Bash(pnpm:*), Bash(yarn:*), Bash(npm:*), Bash(npx:*), Bash(python*:*), Bash(pytest:*), Bash(ruff:*), Bash(mypy:*), Bash(cargo:*), Bash(go:*), Bash(golangci-lint:*), Bash(./gradlew:*), Bash(mvn:*), Bash(bundle:*), Bash(rubocop:*), Bash(rspec:*), Bash(git:*), Read, Grep, Glob
| Step | Goal | Safety | Skip if Missing | |------|------|--------|----------------| | comment_blocks | Reject over-long comment blocks (`@rules/docs-writing.md` § Code Comments) | read-only | yes | | lint-fix | Auto-fix code style issues | read-write | yes | | build | Verify compilation succeeds | read-only | yes | | test-unit | Run full test suite | read-only | yes |
**Failure behavior**: continue-all (run all steps, report all results)
`comment_blocks` is a **policy** step, and the asymmetry is deliberate (`POLICY_STEPS` in `scripts/precommit-runner.js`): it can FAIL the run, but it never counts as "validation ran". A run where policy was the only thing that executed still reports `⚠️ NO CHECKS RUN`, so a repo whose real checks are pytest/cargo cannot bank a `✅ PASS` on a passing comment scan alone. It runs first because it is static and cheap.
Run pre-commit checks: **lint:fix -> build -> test**
Use Glob to check if `.claude/scripts/precommit-runner.js` exists in the project root.
Detect the project ecosystem to run steps manually.
**Ecosystem detection**:
| Manifest | Ecosystem | Lint-fix | Build | Test | |----------|-----------|----------|-------|------| | `package.json` | Node.js | `{pm} lint:fix` | `{pm} build` | `{pm} test:ci` / `test` / `test:fast` / `test:unit` | | `pyproject.toml` | Python | `ruff check --fix .` | — | `pytest tests/unit/` | | `Cargo.toml` | Rust | `cargo clippy --fix` | `cargo build` | `cargo test` | | `go.mod` | Go | `golangci-lint run --fix` | `go build ./...` | `go test ./...` | | `build.gradle` / `build.gradle.kts` | Java (Gradle) | `./gradlew spotlessApply` | `./gradlew build` | `./gradlew test` | | `pom.xml` | Java (Maven) | `mvn spotless:apply` | `mvn compile` | `mvn test` | | `Gemfile` | Ruby | `bundle exec rubocop -a` | — | `bundle exec rspec` |
> **How the runner executes this table** (WB2b): a **required tool** missing from the environment (ruff, pytest, cargo, go, golangci-lint, mvn, bundle, the gradle wrapper — the runner never falls back to a global `gradle`) marks that step `unavailable`, which **blocks ✅ PASS** — incomplete validation must not let a sibling check mint the receipt. A **repo-declared capability** absent is an ordinary skip, but only on **definitive non-membership evidence** — never a manifest grep, and never an ambiguous probe failure (broken build config, broken task, network-dependent resolution), which stays `unavailable`: Ruby rubocop/rspec membership is read from `Gemfile.lock` text — rspec counts `rspec` or its executable provider `rspec-core` — after `bundle check` passes (a failing `bundle check` or unreadable lockfile is `unavailable`); Gradle spotless skips only on Gradle's own `Task 'spotlessApply' not found` diagnostic from `gradlew help --task spotlessApply` (a marker-less failure is `unavailable` — Gradle realizes tasks lazily, so a configured-but-broken task fails the probe exactly like an absent one); Maven spotless skips only on the `No plugin found for prefix` marker from `mvn help:describe -Dplugin=spotless` — any other failure is `unavailable`. All probes are bounded (`PRECOMMIT_PROBE_TIMEOUT_MS`, default 120s; output capped) and logged; a probe timeout is `unavailable`, never a skip. Python tests run `pytest tests/unit/` when that directory exists, else bare `pytest` (config-driven discovery — a repo with no tests fails loudly on exit 5 instead of silently skipping). Clippy runs with `--allow-dirty --allow-staged`: precommit operates on a dirty tree by definition.
For Node.js projects, auto-detect package manager from lockfile.
| Step | package.json script | If missing | |------|---------------------|------------| | lint:fix | `lint:fix` | Skip with note | | build | `build` | Skip with note | | test | `test:ci` → `test` → `test:fast` → `test:unit` | Skip with note |
After lint:fix completes, run `git diff --name-only` to capture auto-fixed fil
Language: English | 繁體中文 | 简体中文 | 日本語 | 한국어 | Español The harness layer for Claude Code. Let the model choose the path. Keep "done" verifiable. Full control plane on Claude Code. Skills-only distribution for Codex CLI and other compatible agents.
Repo: sd0xdev/sd0x-dev-flow
Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as…
Architecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and architecture decisions. Reads…
Context-aware Q&A with auto context gathering. Use when: user has a quick question about codebase, git history, rules, docs, or skills during development. Not…
Industry best practices conformance audit with mandatory adversarial debate. Produces audit artifact: verdict (OK/WARN/FAIL) + gap roadmap + debate proof. Use…
Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore).…
Bump package and plugin version in sync. Updates package.json, .claude-plugin/plugin.json, and install-state manifest to the same version. Use when: user says…