Pre-Publish Checklist
Arguments
--skip <check>— skip a specific check by name. Can be repeated. Valid values:skill-lint,version-sync,code-review,tests,ci,docs
Process
Step 1 — Detect repo types
Scan the repo root for the following signals. Collect all matches — a repo can be multiple types simultaneously.
| Signal (file at repo root) | Repo Type |
|---|---|
SKILL.md | Agent Skill |
pyproject.toml / setup.py / setup.cfg | Python program |
package.json | Node.js program |
go.mod | Go program |
Cargo.toml | Rust program |
pom.xml / build.gradle | Java program |
build.gradle.kts / settings.gradle.kts | Kotlin program |
project.clj / deps.edn / build.clj | Clojure program |
*.sln / *.csproj (any at root) | C# program |
*.fsproj (any at root) | F# program |
CMakeLists.txt / meson.build / configure.ac | C/C++ program |
If no signals match, report "unknown repo type — cannot determine which checks to run" and stop.
Step 2 — Run checks
Run every applicable check. Skip any whose name matches a --skip argument.
Agent Skill checks (when SKILL.md detected)
- Skill lint (
--skip skill-lintto skip)
- Invoke the William-Yeh/agent-skill-linter skill: /skill-lint check - Linter errors → BLOCKING - Linter warnings only → WARNING
- Version sync (
--skip version-syncto skip)
- Run: git tag --list to check if the repo has any existing git tags. - If no tags exist, skip this check (nothing to compare against). - If tags exist, get the latest tag: git describe --tags --abbrev=0 - Parse the version field from the SKILL.md frontmatter. - Strip any leading v prefix from the git tag before comparing (e.g. v0.1.0 → 0.1.0). - Compare SKILL.md version against the latest git tag: - If SKILL.md version == latest tag → BLOCKING: "Version not bumped — SKILL.md <version> matches existing tag <tag>. Increment the version before publishing." - If SKILL.md version < latest tag → BLOCKING: "SKILL.md version <version> is older than existing tag <tag>." - If SKILL.md version > latest tag → PASS
Program source code checks (when any language build manifest detected)
- Code review (
--skip code-reviewto skip)
- Invoke the William-Yeh/common-code-reviewer skill: /common-code-reviewer - Reviewer verdict "REQUEST CHANGES" → BLOCKING - Reviewer verdict "APPROVE WITH COMMENTS" → WARNING - Reviewer verdict "APPROVE" → pass
- Local tests (
--skip teststo skip)
- Run the test command for each detected language: Repo type Test command Python uv run pytest Node.js npm test Go go test./... Rust cargo test Java ./mvnw test or ./gradlew test Kotlin ./gradlew test Clojure lein test or clojure -T:build test C# / F# dotnet test C/C++ cmake --build. --target test or make test - Any test failure → BLOCKING
- CI status (
--skip cito skip)
- Run: gh run list --branch $(git branch --show-current) --limit 1 - Latest run status is not completed with success conclusion → BLOCKING
Step 3 — Report
Output a consolidated report:
## Pre-Publish Checklist
Detected types: <comma-separated list>
### <Type>
- [x] <check name>: PASSED
- [WARNING] <check name>: <reason>
- [BLOCKING] <check name>: <reason>
---
Verdict: BLOCKED — N blocking issue(s) must be resolved before publishing.
Blocking issues:
1. <description>
Warnings (non-blocking):
1. <description>When all checks pass or only warnings remain, the verdict is:
Verdict: READY TO PUBLISHStep 4 — Document rationale (when READY TO PUBLISH) (--skip docs to skip)
Skip this step entirely if there are blocking issues or if --skip docs was passed.
Gather context from all available sources:
- The current coding-agent session dialog (decisions made, alternatives discussed, trade-offs considered)
git logand diff since the last tag or branch point- Issue/PR references mentioned in commit messages or the session
Then update or create the following documents as applicable.
4a — ADR (Architecture Decision Record)
- First, check
README.mdfor any project-specific documentation arrangement (e.g. the project may direct decision records toDESIGN.md, a wiki, or a custom path). - If no project-specific arrangement is documented, look for a
docs/adr/oradr/directory; if neither exists, createdocs/adr/. - Scan existing ADR files to determine the next sequential number (e.g.
0001,0002). - Write a new ADR only if the change involves a design or architecture decision (new dependency, changed interface contract, security trade-off, algorithm choice). Skip for pure bug fixes or trivial patches.
- Template:
# ADR-<NNNN>: <Short decision title> Date: <YYYY-MM-DD> ## Status Accepted ## Context <Why this change was needed — problem statement, constraints, background.> ## Decision <What was decided and why this option was chosen over alternatives.> ## Consequences <Trade-offs, follow-up work, risks introduced or mitigated.>
4a-ii — ADR consolidation review
After writing any new ADR (or even if none was written), read all existing ADRs and assess whether consolidation is warranted:
- Superseded decisions: if a new ADR reverses or significantly changes an older one, update the older ADR's
## StatustoSuperseded by ADR-<NNNN>and add a note explaining what changed. - Overlapping decisions: if two or more ADRs cover the same concern from different angles and have drifted out of sync, merge their content into the most recent one, mark the older ones as
Merged into ADR-<NNNN>, and update cross-references. - Stale assumptions: if context or consequences described in an old ADR are now known to be incorrect (e.g. a dependency was replaced, a constraint was lifted), annotate that ADR with an
## Amendmentsection rather than editing history in place.
Skip this sub-step if there are fewer than two existing ADRs (nothing to consolidate).
Include consolidation actions in the documentation summary:
- [ADR] docs/adr/0001-choose-httpx.md — status updated to "Superseded by ADR-0004"
- [ADR] docs/adr/0002-retry-strategy.md — Amendment section added4b — Usage / changelog notes
- Look for
CHANGELOG.md,USAGE.md, orREADME.mdat the repo root. - Append or update the relevant section to reflect: what changed, how users invoke or benefit from it, and any breaking changes or migration steps.
- Keep it concise — one to three bullet points per item.
4c — Other noteworthy items
- If the session dialog or code reveals performance characteristics, known limitations, or operational notes future maintainers should know, add a short note to the appropriate place (e.g.
NOTES.md, inline comment block, or an existing developer guide).
After completing documentation, output a summary:
## Documentation updates
- [ADR] docs/adr/0003-use-uv-for-dependency-management.md — created
- [CHANGELOG] Added entry under "Unreleased" for <feature>
- (none) — no architecture decisions or notable items to recordStep 5 — Handoff
- No blocking issues: Offer to invoke
commit-commands:commit-push-prto complete the publish step. - Blocking issues remain: Display them clearly. Do not proceed.