18 KiB
Cleanup Baseline — ai-coding-skills (M1)
Captured: 2026-05-03 · Platform: macOS (arm64, Apple Silicon) · Node 22.14.0 · pnpm 10.18.1
This document records the as-is state of every quality check at the start of
the refactor series. All pre-existing failures listed here have since been
resolved. As of M5 pnpm run check exits 0 on a clean checkout. Any
failure now represents a regression and must be fixed before merge.
Byte-equivalence assertion
Before any file was modified in M1, git status showed a clean working tree.
After all S-101 through S-107 changes were applied, git status confirms:
- Zero modifications to any nested
package.jsonunderskills/orpi-package/. - Zero modifications to any file under
skills/*/{codex,claude-code,cursor,opencode,pi}/(the generated agent-variant directories). - All changes are confined to new root-level config files, new scripts, updated
root
package.json(devDependencies + scripts), and new docs.
1. Pre-existing root scripts
pnpm run sync:pi
Synced pi package skill mirror into …/pi-package/skills.
EXIT: 0
pnpm run verify:pi
package metadata ok
pi resources verified
pi workflow skill docs verified
EXIT: 0
pnpm run verify:reviewers
reviewer support verified
EXIT: 0
pnpm run test:installer
TAP version 13
# tests 22
# pass 22
# fail 0
EXIT: 0
2. Nested package scripts
atlassian/shared/scripts — test
TAP version 13
# tests 23
# pass 23
# fail 0
EXIT: 0
atlassian/shared/scripts — typecheck
EXIT: 0
atlassian/codex/scripts — typecheck
EXIT: 0
atlassian/claude-code/scripts — typecheck
EXIT: 0
atlassian/cursor/scripts — typecheck
EXIT: 0
atlassian/opencode/scripts — typecheck
EXIT: 0
atlassian/pi/scripts — typecheck
EXIT: 0
web-automation/codex/scripts — typecheck
EXIT: 0
web-automation/codex/scripts — lint
EXIT: 0
web-automation/claude-code/scripts — typecheck
EXIT: 0
web-automation/cursor/scripts — typecheck
EXIT: 0
web-automation/opencode/scripts — typecheck
EXIT: 0
web-automation/pi/scripts — typecheck
EXIT: 0
3. reviewer-runtime tests
All three test scripts under skills/reviewer-runtime/tests/ passed:
claude-review-template-guard.sh PASS
smoke-test.sh PASS
telegram-notify-test.sh PASS
EXIT: 0 (each)
4. M1 quality tooling — baseline violations
4a. ESLint (pnpm run lint — ESLint stage)
Exit code: 1 — 2 pre-existing errors (no new errors from M1 additions).
Files with violations in the existing codebase:
| File | Line | Rule | Message |
|---|---|---|---|
scripts/lib/skill-manager-core.mjs |
282 | no-useless-assignment |
Value assigned to entries is not used |
scripts/manage-skills.mjs |
270 | no-unused-vars |
client is assigned a value but never used |
Action: Fix in a later milestone. Do not suppress with eslint-disable comments unless the code is intentionally dead.
4b. shellcheck (pnpm run lint — shellcheck stage)
Exit code: 1 — 7 files with pre-existing findings (no new violations from M1).
| File | Finding |
|---|---|
scripts/verify-pi-resources.sh |
SC2016 (info, ×3): single-quoted backtick strings; SC2251 (info, ×1): ! outside condition |
scripts/verify-pi-workflows.sh |
SC2016 (info, ×2): single-quoted backtick strings; SC2251 (info, ×1): ! outside condition |
skills/reviewer-runtime/pi/run-review.sh |
SC2329 (info): unused handle_signal; SC2034 (warning, ×2): unused variables |
skills/reviewer-runtime/run-review.sh |
SC2329 (info): unused handle_signal; SC2034 (warning, ×2): unused variables |
skills/reviewer-runtime/tests/claude-review-template-guard.sh |
SC2016 (info, ×1): single-quoted expansion |
skills/reviewer-runtime/tests/smoke-test.sh |
SC2064 (warning, ×1): trap should use single quotes |
skills/reviewer-runtime/tests/telegram-notify-test.sh |
SC2064 (warning, ×1): trap should use single quotes |
The following files pass shellcheck with EXIT 0:
scripts/install-pi-package.shscripts/manage-skills.shscripts/sync-pi-package-skills.shscripts/verify-reviewer-support.shskills/reviewer-runtime/notify-telegram.shskills/reviewer-runtime/pi/notify-telegram.shskills/web-automation/scripts/sync-variants.sh
Action: Fix SC2064 trap issues and SC2034 warnings in a later milestone.
SC2016 findings are intentional (single-quoted strings containing backticks are
used as literal grep patterns to match markdown text).
4c. markdownlint (pnpm run verify:docs)
Exit code: 1 — 1160 errors across 62 files (no new violations from M1 additions).
markdownlint-cli2 v0.22.1 scanned README.md, docs/**/*.md, and canonical
SKILL.md files (excluding node_modules and generated agent-variant
directories).
Rule breakdown (selected):
| Rule | Description |
|---|---|
| MD013 | Line length > 120 chars (majority of errors) |
| MD012 | Multiple consecutive blank lines |
| MD024 | Duplicate headings |
| MD029 | Ordered list item prefix |
| MD032 | Blanks around lists |
| MD038 | Spaces inside code span |
| MD040 | Fenced code without language |
| MD058 | Blanks around tables |
Affected files include (non-exhaustive): docs/ATLASSIAN.md,
docs/CREATE-PLAN.md, docs/DO-TASK.md, docs/IMPLEMENT-PLAN.md,
docs/INSTALLER.md, docs/PI-COMMON-REVIEWER.md, docs/PI-RESEARCH.md,
docs/PI-SUPERPOWERS.md, docs/PI.md, docs/README.md,
docs/TELEGRAM-NOTIFICATIONS.md, docs/WEB-AUTOMATION.md, README.md,
and all skills/*/*/SKILL.md variants.
Action: Bulk-fix in a dedicated doc-cleanup milestone. New docs added in M1
(docs/DEVELOPMENT.md, docs/CLEANUP-BASELINE.md) pass all enabled rules.
4d. markdown-link-check (offline, pnpm run verify:docs)
Exit code: 0 — no broken repo-relative or anchor links found.
53 markdown files scanned (offline mode: external http/https links ignored). All internal links are valid.
4e. pnpm run typecheck (workspace aggregate)
Exit code: 0.
Ran typecheck in workspace members:
skills/atlassian/shared/scripts— PASSskills/web-automation/codex/scripts— PASS
4f. pnpm run test (workspace aggregate)
Exit code: 0.
Ran:
pnpm run test:installer(22/22 tests)skills/atlassian/shared/scripts test(23/23 tests)
4g. pnpm run check aggregate (M1 transitional state)
FAIL lint (exit 1) — ESLint + shellcheck pre-existing violations (§4a, §4b)
PASS typecheck
PASS test
PASS verify:pi
PASS verify:reviewers
FAIL verify:docs (exit 1) — markdownlint pre-existing violations (§4c)
PASS verify:generated (stub)
Overall exit: 1 — expected per transitional contract; all failures are pre-existing and documented in this file.
5. Platform notes
- Tested on macOS 15 (arm64). No GNU/Linux run available at M1 capture time.
- shellcheck 0.11.0 installed via
brew install shellcheck. statvariant: BSD stat (macOS default). Thescripts/shell scripts do not callstat; this affects only M5 CI configuration.rg(ripgrep) is required byscripts/verify-pi-workflows.sh. It is present on the test machine; absent systems should install viabrew install ripgrep/apt-get install ripgrep.
This file is generated once (M1) and updated only when a subsequent milestone changes the baseline status of a check.
Post-M3 state
Captured: 2026-05-03 · Platform: macOS 15 (arm64) · Node 22.14.0 · pnpm 10.18.1
M3 resolved all remaining pre-existing lint violations (2 ESLint errors and
7 shellcheck findings). verify:generated is now a real implementation
(was a stub in M2).
pnpm run check aggregate (post-M3)
PASS lint (was FAIL in M1/M2; pre-existing violations fixed in M3)
PASS typecheck
PASS test
PASS verify:pi
PASS verify:reviewers
PASS verify:docs
PASS verify:generated (was stub in M2; real implementation in M3)
Overall exit: 0 — all checks green for the first time.
What changed in M3
scripts/generate-skills.mjsadded (generator for all 31 agent-variant roots).scripts/verify-generated.mjsadded (drift detector).- Canonical source directories created:
skills/<skill>/_source/,skills/web-automation/shared/. - All 31 generated roots now carry
.generated-manifest.jsonand file-type-aware headers. package.jsonrenames: all generated agent-variant packages renamed to@ai-coding-skills/<skill>-<agent>with"private": true.pnpm-workspace.yamlupdated: M1 negative-glob exclusions replaced by positive includes for all uniquely-named generated variants.- Pre-existing ESLint violations fixed:
skill-manager-core.mjs:282(no-useless-assignment) andmanage-skills.mjs:270(no-unused-vars). - Pre-existing shellcheck findings fixed: SC2034 and SC2329 in
reviewer-runtime/run-review.sh; SC2064 in test trap statements; SC2016 / SC2251 in verify scripts (suppress intentional patterns). pnpm run sync:pinow calls the generator instead ofsync-pi-package-skills.sh.docs/DEVELOPMENT.mdextended with generation workflow and metadata docs.CHANGELOG.mdcreated with package-metadata change callout.
Full byte-equivalence diff (M3 vs pre-M3)
See CHANGELOG.md § "Byte-equivalence diff allow-list" for the complete
documented diff between M3-generated output and the pre-M3 variants. The
only permitted diffs are headers, .generated-manifest.json, name rename,
and "private": true.
Post-M2 state
Captured: 2026-05-03 · Platform: macOS 15 (arm64) · Node 22.14.0 · pnpm 10.18.1
M2 resolved all verify:docs violations and the verify:pi portability
issue (stat -f BSD-ism in scripts/verify-pi-resources.sh).
pnpm run check aggregate (post-M2)
FAIL lint (exit 1) — same 2 ESLint + 7 shellcheck pre-existing violations (§4a, §4b)
PASS typecheck
PASS test
PASS verify:pi
PASS verify:reviewers
PASS verify:docs (was FAIL in M1; now clean)
PASS verify:generated (stub)
Overall exit: 1 — only lint still fails on pre-existing violations.
verify:docs is now green (0 markdownlint errors, offline link-check clean,
docs-flow verifier passes).
What changed in M2
scripts/lib/portable.shadded withportable_stat_permshelper.scripts/verify-pi-resources.shupdated to useportable_stat_perms(replacesstat -f '%Lp'BSD-only call).scripts/lib/run-shellcheck.mjsupdated to pass-x --source-path=SCRIPTDIRso shellcheck followssourcedirectives correctly on both platforms.skills/.markdownlint.jsoncadded to disable MD013 and MD024 for agent-facing SKILL.md files.- All 1160 M1 markdownlint violations resolved (auto-fix + targeted edits).
docs/README.mdreorganized into ordered reading flow.README.mdlayout section updated to reflect actual repo tree.docs/REVIEWERS.mdadded as canonical reviewer CLI matrix.docs/TELEGRAM-NOTIFICATIONS.mdextended with Pi section.docs/CREATE-PLAN.md,docs/IMPLEMENT-PLAN.md,docs/DO-TASK.mdupdated with REVIEWERS.md references and unique variant headings.- OpenCode reviewer branches added to
skills/create-plan/opencode/SKILL.mdandskills/implement-plan/opencode/SKILL.md. scripts/verify-docs-flow.mjsimplemented and wired intoverify:docs.pnpm run verify:docs:onlineadded for external link checks.
Ubuntu smoke note
No Docker/Ubuntu run was available at M2 capture time. The portability
fix (portable_stat_perms) replaces the only identified BSD-ism. The
Ubuntu Docker command is documented in
DEVELOPMENT.md.
Post-M4 state
Captured: 2026-05-03 · Platform: macOS 15 (arm64) · Node 22.14.0 · pnpm 10.18.1
M4 extracted reusable abstractions, consolidated shared helpers, tightened
types, and removed the legacy dead-code path. pnpm run check remains fully
green.
pnpm run check aggregate (post-M4)
PASS lint
PASS typecheck
PASS test
PASS verify:pi
PASS verify:reviewers
PASS verify:docs
PASS verify:generated
Overall exit: 0 — all checks green (no regressions from M3).
What changed in M4
-
S-401 —
scripts/lib/safe-replace-dir.mjsadded: Node.js helper that validates a target is a strict descendant of a safety root before replacing it. Thin shell wrapperscripts/lib/safe-replace-dir.shprovided for sourcing in shell scripts.scripts/sync-pi-package-skills.shupdated to usesafe_replace_dirfrom the shared helper (inlinereplace_dirremoved). -
S-402 —
removeTarget(op)extracted fromexecuteOperation()inscripts/lib/skill-manager-core.mjsand exported. The helper handles skill, helper, and symlink removal with idempotent semantics.executeOperationnow delegates toremoveTargetfor all remove branches. -
S-403 —
skills/atlassian/shared/scripts/src/command-helpers.tsadded withdryRunResponse<T>()andresolveFormat()helpers.confluence.ts,jira.ts, andraw.tsconsumedryRunResponse(8 inline objects removed).cli.tsimportsresolveFormatfromcommand-helpersinstead of defining it locally. All atlassian agent variants regenerated. -
S-404 —
skills/web-automation/shared/lib/browser.tscreated withgetProfilePath,launchBrowser, andgetPage.browse.tsimports and re-exports them.auth.ts,flow.ts, andscan-local-app.tsnow import directly fromlib/browser.js. Generator updated to includelib/directory inscriptFilesfor web-automation variants.tsconfig.jsonupdated to includelib/**/*.ts. -
S-405 —
scan-local-app.tspage: anyparameters replaced withPagefromplaywright-core. AddedGotoErrordiscriminated type to narrow thepage.goto().catch()union type safely. -
S-406 —
scripts/sync-pi-package-skills.shdeleted (retired in M3, inlinereplace_dirmigrated to shared helper as part of S-401). Comment inskill-manager-core.mjsreferencing the deleted file updated. Generator'sclearGeneratedRootfixed to preservenode_modulesat all depths (was only protected at root level, causing pnpm workspace packages insidescripts/subdirs to lose their node_modules on regeneration). -
S-407 — Tests added:
scripts/tests/safe-replace-dir.test.mjs(6 tests for S-401 helper)scripts/tests/skill-manager-core-remove.test.mjs(5 tests for S-402)skills/atlassian/shared/scripts/tests/command-helpers.test.ts(7 tests for S-403dryRunResponseandresolveFormat)
Test count (post-M4)
| Suite | Tests |
|---|---|
pnpm run test:installer (root scripts) |
80 |
atlassian/shared/scripts |
29 |
| Total | 109 |
Final state (post-M5) — CLOSED
Captured: 2026-05-03 · Platform: macOS 15 (arm64) · Node 22.14.0 · pnpm 10.18.1
M5 added CI configuration, finalised documentation, closed out this baseline
report, and locked in a permanently green pnpm run check gate. No
pre-existing failures remain open.
pnpm run check aggregate (post-M5 — macOS)
PASS lint
PASS typecheck
PASS test
PASS verify:pi
PASS verify:reviewers
PASS verify:docs
PASS verify:generated
All checks passed.
Overall exit: 0 — all checks green (no regressions from M4).
What changed in M5
- S-501 —
.github/workflows/check.ymladded: matrix overubuntu-latestandmacos-latest; installsshellcheck(apt/brew),ripgrep(apt), pnpm, and Node.js 22; runspnpm run check. - S-501 —
.github/workflows/check-online.ymladded: weekly schedule +workflow_dispatch; runsverify:docs:onlinefor full external link checking. - S-502 — Root
README.mdgained a "Contributing / Development" section namingpnpm run checkas the single quality gate and linking todocs/DEVELOPMENT.md. - S-503 —
docs/DEVELOPMENT.mdfinalised: added "Adding a new agent", "Adding a new skill", and "CI" sections; transitional contract replaced by the permanent M5 contract; baseline links updated. - S-504 — This file (
docs/CLEANUP-BASELINE.md) closed out with the "Final state" section. - S-505 — Root
package.jsonfileslist updated:docs/DEVELOPMENT.mdanddocs/REVIEWERS.mdadded. - S-506 —
CHANGELOG.mdextended with the M5 consolidated entry. - S-507 — Final
pnpm run checkrun confirmed green (output above).
Baseline status summary
Every pre-existing failure recorded in this document is now resolved. No waivers are required.
| Check | M1 status | Final status | Resolution |
|---|---|---|---|
lint (ESLint) |
FAIL — 2 errors | PASS | Fixed in M3 (S-302) |
lint (shellcheck) |
FAIL — 7 findings | PASS | Fixed in M3 (S-302) |
typecheck |
PASS | PASS | Never regressed |
test |
PASS | PASS | Never regressed |
verify:pi |
PASS | PASS | Portability hardened in M2 |
verify:reviewers |
PASS | PASS | Never regressed |
verify:docs (markdownlint) |
FAIL — 1160 errors | PASS | Fixed in M2 |
verify:docs (link-check) |
PASS | PASS | Never regressed |
verify:generated |
PASS (stub) | PASS | Real implementation in M3 |
Ubuntu smoke test
The CI workflow (.github/workflows/check.yml) runs the same pnpm run check
command on ubuntu-latest. This replaces the Docker one-liner that was the
only documented Ubuntu smoke test path in M1–M4.
For local reproduction on Linux:
# Requires Docker
docker run --rm \
-v "$PWD:/w" \
-w /w \
node:22-bookworm \
bash -lc 'apt-get update -q && apt-get install -y -q shellcheck ripgrep python3 \
&& corepack enable \
&& pnpm install --frozen-lockfile \
&& pnpm run check'
This baseline report is now closed. Future regressions must be caught by CI and fixed before merge; they should NOT reopen this document.