---
roadcrew_template_name: "pre-publish-checklist.md"
roadcrew_template_type: "command"
roadcrew_template_version: "v1.0"
roadcrew_last_updated: "2025-11-03"
roadcrew_min_version: "1.6.0"
roadcrew_license: "See LICENSE file in .roadcrew folder"
roadcrew_copyright: "Copyright (c) 2025 North Star Holdings, LLC"
spdx_license_identifier: "LicenseRef-RoadcrewLicense-1.0"
---

# /pre-publish-checklist

Pre-publication validation checklist to ensure quality and readiness for customer release.

**Tier:** STARTER  
**Pattern:** QUALITY GATES (Pre-Release Validation)  
**Related:** Epic #146, Release Process

## Quick Start

Run this checklist before publishing to public repo:

```bash
# Run full automated validation
npm run pre-publish-audit

# Then run interactive checklist
/pre-publish-checklist

# Address any failures and retry
```

## What It Does

Validates repository is production-ready by checking:

1. **Code Quality** - TypeScript compilation and linting
2. **Tests** - Unit and integration tests pass
3. **Build** - Distribution builds without errors
4. **Documentation** - Specs linked to releases
5. **GitHub** - Issues properly structured
6. **Version** - Semantic version bumped correctly

## Pre-Publication Checklist

### Phase 1: Code Quality ✓

- [ ] **No TypeScript errors**
  ```bash
  npm run lint:types
  ```
  Must show: `0 errors`

- [ ] **No ESLint violations**
  ```bash
  npm run lint
  ```
  Must show: `0 errors` (warnings are acceptable)

- [ ] **No formatting issues**
  ```bash
  npm run format:check
  ```
  Must show: all files formatted

### Phase 2: Tests ✓

- [ ] **Unit tests pass**
  ```bash
  npm run test
  ```
  Must show: `✓ All tests passed`

- [ ] **Integration tests pass**
  ```bash
  npm run test:integration
  ```
  Must show: `✓ All integration tests passed`

- [ ] **Test coverage acceptable**
  ```bash
  npm run test:coverage
  ```
  Must show: `> 80%` coverage

### Phase 3: Build ✓

- [ ] **Distribution builds**
  ```bash
  npm run build
  ```
  Must show: `✓ Build completed`

- [ ] **No missing files**
  ```bash
  ls -la dist/scripts/ | wc -l
  ```
  Must show: `> 300 files`

- [ ] **Compiled files have headers**
  ```bash
  head -5 dist/scripts/create-epic.js | grep "Pre-compiled"
  ```
  Must show: version header present

### Phase 4: Documentation ✓

- [ ] **Current release file populated**
  ```bash
  cat memory-bank/releases/current-release.md | head -20
  ```
  Must NOT be a template (should have real content)

- [ ] **Related spec exists**
  ```bash
  ls context/specs/
  ```
  Must show: at least one spec for current release

- [ ] **Epic issues linked**
  ```bash
  grep "related:" memory-bank/releases/current-release.md
  ```
  Must show: epic #numbers referenced

- [ ] **All child issues linked**
  - Go to each epic on GitHub
  - Must have all enhancement issues linked
  - No orphaned issues

### Phase 5: GitHub Structure ✓

- [ ] **Release linked to epic**
  - GitHub Release Notes reference Epic #
  - Epic has all child issues listed

- [ ] **All epics have child issues**
  - Epic #1234 has: #1235, #1236, #1237, ...
  - No empty epics

- [ ] **All issues are closed (if release is final)**
  - Check: `gh issue list --state closed | wc -l`
  - All related issues completed

- [ ] **No blocked issues**
  - Check: `gh issue list --search "is:open label:blocked"`
  - Must show: 0 results

### Phase 6: Version & Changelog ✓

- [ ] **Version bumped**
  ```bash
  cat package.json | grep version
  ```
  Must match: current release version

- [ ] **Changelog updated**
  ```bash
  head -30 CHANGELOG.md
  ```
  Must include: today's date and version

- [ ] **Git tag matches version**
  ```bash
  git describe --tags
  ```
  Must show: vX.Y.Z matching package.json

- [ ] **No uncommitted changes**
  ```bash
  git status
  ```
  Must show: `working tree clean`

## Interactive Checklist

### Start Here

```
🚀 PRE-PUBLICATION CHECKLIST v1.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Current Release: v1.6.0
Target Repo: tailwind-ai/roadcrew
Current Branch: dev

Phase 1: Code Quality
□ TypeScript compilation
□ ESLint checks
□ Prettier formatting

Phase 2: Tests
□ Unit tests
□ Integration tests
□ Coverage > 80%

Phase 3: Build
□ Distribution built
□ ~380 files in dist/
□ Version headers added

Phase 4: Documentation
□ Release file populated
□ Spec linked
□ Epic issues linked

Phase 5: GitHub
□ Epics linked to release
□ All child issues linked
□ No blocked issues

Phase 6: Version
□ Version bumped
□ Changelog updated
□ Git tag matches
□ No uncommitted changes

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ready to publish? (y/n)
```

## Manual Verification Steps

If automated checks pass but you want to double-check:

### 1. Review Release Contents

```bash
# Show release summary
cat memory-bank/releases/current-release.md

# List all closed issues
gh issue list --state closed --limit 100

# Show commits since last release
git log v1.5.0..HEAD --oneline | head -20
```

### 2. Verify Distribution Package

```bash
# Show distribution size
du -sh dist/

# List top-level files
ls -la | grep -v "^\."

# Verify commands included
ls commands/ | wc -l

# Verify templates included
ls templates/ | wc -l
```

### 3. Check GitHub Status

```bash
# Verify public repo is reachable
gh repo view tailwind-ai/roadcrew

# Check existing releases
gh release list

# Show pending PRs
gh pr list --state open
```

## Common Issues & Fixes

### "TypeScript errors found"

```bash
npm run lint:types --fix

# Review and commit
git add -A
git commit -m "chore: fix TypeScript errors"
```

### "Test coverage low"

```bash
npm run test:coverage

# Review coverage report
open coverage/lcov-report/index.html

# Add tests for uncovered code
```

### "Build missing files"

```bash
npm run build

# Check for TypeScript errors
npm run lint:types

# Rebuild
npm run build
```

### "Release file not populated"

```bash
# Edit current release
nano memory-bank/releases/current-release.md

# Or use command
/create-release-docs
```

## Success Criteria

All items must be ✓ COMPLETE:

- ✅ Code Quality: 0 errors, all lint checks pass
- ✅ Tests: 100% pass rate, > 80% coverage
- ✅ Build: Distribution built, ~380 files, version headers present
- ✅ Documentation: Release file populated, spec linked, issues linked
- ✅ GitHub: All epics/issues properly structured, no blocks
- ✅ Version: Version bumped, changelog updated, git tagged, clean tree

## Publishing Decision Tree

```
All checks pass? 
  ├─ YES → Ready to publish!
  │        Run: /publish-distribution --push
  └─ NO → Fix issues and retry
           1. Address specific failures
           2. Re-run checklist
           3. Commit fixes
           4. Try again
```

## Related Commands

- **`/publish-distribution`** - Publish to public repo after checklist passes
- **`/build-distribution`** - Build distribution locally
- **`/create-release-docs`** - Create release documentation
- **`npm run pre-publish-audit`** - Automated pre-publish validation

---

**Behavior:**
- Non-blocking: Checklist is advisory (user can override)
- Comprehensive: Covers code, tests, build, docs, GitHub, version
- Interactive: Guides user through each phase
- Repeatable: Can run multiple times before publishing

