[#181] feat: publish to npmjs.org + genericize skills + layout docs#190
[#181] feat: publish to npmjs.org + genericize skills + layout docs#190
Conversation
…s.org - publishConfig.registry → registry.npmjs.org in package.json - changeset access → public in config.json - create-registry-tgz.sh patches registry to npmjs.org Refs: #181
- scripts/publish-npm.sh: validates metadata, publishes TGZ to npmjs.org - Works locally (npm login) and in CI (NPM_TOKEN env) - Fail-fast on: missing token, private pkg, wrong scope, version conflict - --dry-run flag for testing without publishing Refs: #181
- Remove entire publish-gh-packages job (GitHub Packages) - Add publish-npm job calling scripts/publish-npm.sh - Uses NPM_TOKEN secret instead of GITHUB_TOKEN - Zero npm.pkg.github.com references remaining in workflow Refs: #181
…cli on npmjs.org - quickstart.mdx, faq.mdx, troubleshooting.mdx, first-project.mdx, cli-workflows.mdx, adopter-checklist.mdx: @pair/pair-cli → @foomakers/pair-cli in all user-facing commands - release-process.mdx: TGZ description → npmjs.org - Dev commands (pnpm --filter) unchanged — those use workspace name Refs: #181
- CP7: full rewrite — public npmjs.org (no auth, no .npmrc), priority P2→P0 - CP3: add MT-CP320 — npx @foomakers/pair-cli install from registry (no prior config) - README: remove $REGISTRY, $NPM_TOKEN variables, read:packages prerequisite, .npmrc step Refs: #181
- design-manual-tests: $scope now auto-discovered (not hardcoded enum), discovery table uses generic signals, CP pattern table is example-based heuristic (not fixed 7-CP structure) - execute-manual-tests: variables resolved from suite README (not hardcoded $REGISTRY), output format uses dynamic var names - Synced source → installed with pair- prefix
- commands.mdx: add --layout option to pair package reference - New guide: packaging.mdx — source vs target layout tutorial - CP8-packaging.md: 6 manual tests for pair package (both layouts) - release-validation README: add CP8 to critical paths table - Propagate generic skill changes via pair update
…blish-npmjs # Conflicts: # qa/release-validation/README.md
rucka
left a comment
There was a problem hiding this comment.
Code Review — PR #190
Decision: CHANGES REQUESTED (posted as COMMENT — can't request changes on own PR)
Review Information
PR: #190 — [#181] feat: publish to npmjs.org + genericize skills + layout docs
Author: rucka
Reviewer: AI pair (Claude Code)
Date: 2026-04-11
Story: #181 — Publish @foomakers/pair-cli to npmjs.org
Review Type: Feature
Files Changed: 25 files, +577/−275 lines
Review Summary
Overall Assessment: REQUEST CHANGES
Core implementation is solid — publish script, release.yml rewrite, docs updates, skill genericization, and new CP7/CP8/packaging guide are well done. However, leftover npm.pkg.github.com references in 4 files outside the PR scope contradict AC-5 and the DoD. Stale comments in create-registry-tgz.sh are misleading.
Key Changes
- npm publish: GitHub Packages → npmjs.org with standalone
publish-npm.sh - Skills genericization: Dynamic category discovery replaces hardcoded pair-specific categories
- Layout docs:
--layoutoption documented, newguides/packaging.mdx, CP8 manual tests
Business Value
Removes the #1 adoption blocker: npx @foomakers/pair-cli install now works without .npmrc or PAT setup.
Quality Gates
Quality Gate: PASS (ts:check, test, lint, prettier, mdlint — all cached)
Hygiene Check: PASS — no violations
Docs Staleness: PASS — 33 skills, 8 commands in sync
Code Review Checklist
Functionality Review
- Requirements Met — 7/8 AC fully met, AC-5 partially met
- Business Logic — Publish flow is correct: TGZ → validate → publish → verify
- Integration — release.yml, publish script, create-registry-tgz.sh work as pipeline
- Error Handling — publish-npm.sh has fail-fast, scope validation, dual auth, actionable errors
Code Quality
- Readability — Scripts are well-commented and structured
- Naming — Clear (publish-npm.sh, CP7-registry-publish.md, packaging.mdx)
- Comments —
create-registry-tgz.sh:96-97comments say "GitHub Packages" but code targets npmjs.org
Technical Standards
- Architecture — No new patterns or libraries
- Dependencies — No new deps added
- Consistency — Leftover
npm.pkg.github.comrefs in 4 non-PR files
Security Review
- Secrets Management —
NPM_TOKENvia env var (CI) or npm login session (local). No hardcoded tokens. - Scope Validation — Script validates package is scoped to
@foomakers/* - Access Control —
--access publicis explicit and intentional for npmjs.org
Testing Review
Quality Gate: PASS (all gates)
Manual Publish: VERIFIED (PUT 200 to npmjs.org)
npx Install: VERIFIED (clean machine, no .npmrc)
CP7/CP8 Execution: Not yet executed (post-merge validation)
AC Coverage
| AC | Status | Notes |
|---|---|---|
| AC-1 (npx works, no config) | ✅ | T-1, T-2, T-6 — author verified |
| AC-2 (npm install works) | ✅ | T-1, T-2, T-6 |
| AC-3 (publish script local) | ✅ | PUT 200 confirmed |
| AC-4 (release.yml tag/dispatch) | ✅ | Verified in workflow |
| AC-5 (no GitHub Packages refs) | Workflow clean, but 4 other files still have refs | |
| AC-6 (docs updated) | ✅ | 7 website files + README |
| AC-7 (CP7 rewritten) | ✅ | npmjs.org, P0, no auth |
| AC-8 (CP3 + MT-CP320) | ✅ | Verified in CP3:459 |
Detailed Review Comments
Positive Feedback ✅
scripts/publish-npm.sh— well-structured: fail-fast, clear errors, scope validation, dual authrelease.ymlpublish job: 133 lines → 22 lines — excellent simplification- Skill genericization is a real improvement — dynamic discovery replaces hardcoded categories
guides/packaging.mdxis thorough and well-organized- CP7 rewrite is clean: P0, no auth, clear preconditions
- CP8 covers both layout modes with good test progression
Major Issues 🔍 (must fix)
1. Stale npm.pkg.github.com references (AC-5 / DoD gap)
Story DoD: "No references to npm.pkg.github.com remain in codebase." These were missed:
| File | Line | Content |
|---|---|---|
qa/release-validation/CP2-cli-artifact-critical-path.md |
207 | publishConfig.registry == https://npm.pkg.github.com/ |
RELEASE.md |
129-130, 139 | .npmrc setup for GitHub Packages |
apps/website/content/docs/tutorials/enterprise-adoption.mdx |
227 | @your-org:registry=https://npm.pkg.github.com |
DEVELOPMENT.md |
199 | @foomakers:registry=https://npm.pkg.github.com/ |
Fix: Update all 4 files to replace GitHub Packages refs with npmjs.org equivalents.
2. Stale comments in create-registry-tgz.sh:96-97
# Ensure the package.json inside the extracted artifact is scoped for GitHub Packages
echo "Patching package.json for GitHub Packages registry and setting package name/version..."Code patches to registry.npmjs.org. Comments are misleading.
Fix: s/GitHub Packages/npmjs.org/ in both lines.
Minor Issues 💡 (consider fixing)
3. scripts/diagnose-install.sh:154-166,248-249 — checks for @pair/pair-cli in global installs. Published name is @foomakers/pair-cli.
4. publish-npm.sh:84 — $DRY_RUN unquoted (shellcheck SC2086). Not a bug but inconsistent with quoting elsewhere.
5. create-registry-tgz.sh:108 — o.private = !!o.private ? o.private : false; preserves private: true. If preparing for publish, o.private = false is more explicit.
Questions ❓
6. release.yml publish-npm job if: checks workflow_dispatch+publish=true and push+tags/v*, but not release: [published]. If a GitHub Release is created from an existing tag (no new push), publish-npm won't run. Intentional?
Risk Assessment
| Risk | Impact | Probability | Mitigation |
|---|---|---|---|
| Stale CP2 expects wrong registry | False test failure next release | Medium | Fix CP2:207 |
diagnose-install.sh wrong scope |
Users get "not installed" for working install | Low | Update to @foomakers/pair-cli |
Tech Debt
- ADL candidate: GitHub Packages → npmjs.org is an infrastructure decision worth recording.
DoD Assessment: 14/16
⚠️ "Nonpm.pkg.github.comreferences remain" — PARTIAL (4 files missed)- ⏳ "Code reviewed and merged" — in progress
REVIEW COMPLETE:
├── PR: #190 — publish to npmjs.org + genericize skills + layout docs
├── Story: #181 — Publish @foomakers/pair-cli to npmjs.org
├── Decision: CHANGES-REQUESTED
├── Issues: critical: 0 | major: 2 | minor: 3
├── Quality: PASS — all gates
├── DoD: 14/16 criteria met
├── Adoption: No new deps, no stack changes
├── Debt: 1 item (ADL for registry switch)
└── Report: Posted as PR review comment
Review Issues — ResolvedAll issues from the code review have been fixed in the working tree. Summary: Major Issues (fixed)
Minor Issues (fixed)
VerificationReview Question #6 (dropped)
Not a new issue — the old |
- Replace npm.pkg.github.com in CP2, RELEASE.md, DEVELOPMENT.md, enterprise-adoption.mdx - Fix diagnose-install.sh: @pair/pair-cli → @foomakers/pair-cli - Fix create-registry-tgz.sh: stale comments + simplify private logic - Fix publish-npm.sh: quote $DRY_RUN properly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
What Changed
--layoutoption documented + new packaging tutorial + CP8 manual testsWhy This Change
npx @foomakers/pair-cli installfailed with E404 (GitHub Packages requires .npmrc + PAT) — Setup & Project Management Integration #1 adoption blocker--layout source|targetwas undocumented forpair packageStory Context
User Story: As a developer wanting to use pair, I want to install
@foomakers/pair-clivianpxwithout extra configuration.Acceptance Criteria: 8/8 covered. T-6 (local publish verification) completed — PUT 200 confirmed.
Changes Made
npm Publish (T-1 → T-5)
publishConfig.registry→registry.npmjs.org+access: publicrestricted→publiccreate-registry-tgz.shpatches to npmjs.org at pack timescripts/publish-npm.sh— standalone with metadata validation, fail-fast, --dry-runrelease.yml:publish-gh-packages(133 lines) →publish-npm(22 lines)@pair/pair-cli→@foomakers/pair-cli(7 website files)$REGISTRY,$NPM_TOKEN,read:packagesSkills Genericization
design-manual-tests:$scopeauto-discovered, discovery table generic, CP pattern is example heuristicexecute-manual-tests: variables resolved from suite README (no hardcoded$REGISTRY)pair updateLayout Docs + Manual Tests
--layoutadded topair packagein commands.mdxguides/packaging.mdx(source vs target layout tutorial)pair package(both layouts, metadata, validation)Files Changed
scripts/publish-npm.sh,apps/website/content/docs/guides/packaging.mdx,qa/release-validation/CP8-packaging.mdapps/pair-cli/package.json,.changeset/config.json,scripts/workflows/release/create-registry-tgz.sh,.github/workflows/release.yml,apps/website/content/docs/reference/cli/commands.mdx,apps/website/content/docs/guides/meta.json, 7 website docs files,qa/release-validation/CP7-registry-publish.md,qa/release-validation/CP3-cli-install-update.md,qa/release-validation/README.md, 2 dataset skill files, installed skill files (via update)Testing
Test Results
Testing Strategy
scripts/publish-npm.shexecuted locally — PUT 200 to registry.npmjs.org confirmedReviewer Guide
Review Focus Areas
scripts/publish-npm.sh— error handling, auth flow, fail-fastrelease.yml—publish-npmjob trigger conditionsguides/packaging.mdx— source vs target layout accuracy@pair/pair-cliin user-facing install commandsTesting the Changes
Closes #181