Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/dashboard-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: packages/codev
run: npm install
run: pnpm install

- name: Build package
working-directory: packages/codev
run: npm run build
run: pnpm build

- name: Install Playwright browsers
working-directory: packages/codev
run: npx playwright install chromium
run: pnpm exec playwright install chromium

- name: Run Playwright tests
working-directory: packages/codev
env:
TOWER_ARCHITECT_CMD: bash
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx playwright test --retries 3
run: pnpm exec playwright test --retries 3
13 changes: 8 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install package dependencies
working-directory: packages/codev
run: npm install
- name: Install dependencies
run: pnpm install

- name: Build package
working-directory: packages/codev
run: npm run build
run: pnpm build

- name: Run CLI integration tests
working-directory: packages/codev
run: npx vitest run --config vitest.cli.config.ts
run: pnpm exec vitest run --config vitest.cli.config.ts
44 changes: 28 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: packages/codev
run: npm install
run: pnpm install

- name: Copy skeleton for unit tests
working-directory: packages/codev
run: npm run copy-skeleton
run: pnpm copy-skeleton

- name: Run unit tests with coverage
working-directory: packages/codev
Expand All @@ -37,7 +40,7 @@ jobs:
# Vitest forks pool has a known issue where the worker process crashes
# during cleanup after all tests pass (native module teardown).
# Capture the output and check if all test files passed.
npx vitest run --coverage 2>&1 | tee /tmp/vitest-output.txt; VITEST_EXIT=$?
pnpm exec vitest run --coverage 2>&1 | tee /tmp/vitest-output.txt; VITEST_EXIT=$?
if [ $VITEST_EXIT -ne 0 ]; then
# Check if all test files actually passed despite the exit code
if grep -q "Test Files.*passed" /tmp/vitest-output.txt && ! grep -q "failed" /tmp/vitest-output.txt; then
Expand All @@ -54,22 +57,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: packages/codev
run: npm install
run: pnpm install

- name: Build package
working-directory: packages/codev
run: npm run build
run: pnpm build

- name: Run tower integration tests
working-directory: packages/codev
run: npx vitest run --config vitest.e2e.config.ts --exclude 'src/commands/porch/__tests__/e2e/**'
run: pnpm exec vitest run --config vitest.e2e.config.ts --exclude 'src/commands/porch/__tests__/e2e/**'

cli:
name: CLI Integration Tests
Expand All @@ -78,22 +84,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: packages/codev
run: npm install
run: pnpm install

- name: Build package
working-directory: packages/codev
run: npm run build
run: pnpm build

- name: Run CLI integration tests
working-directory: packages/codev
run: npx vitest run --config vitest.cli.config.ts
run: pnpm exec vitest run --config vitest.cli.config.ts

package:
name: Package Install Verification
Expand All @@ -102,22 +111,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies
working-directory: packages/codev
run: npm install
run: pnpm install

- name: Build package
working-directory: packages/codev
run: npm run build
run: pnpm build

- name: Pack tarball
working-directory: packages/codev
run: npm pack
run: pnpm pack

- name: Verify install from tarball
working-directory: packages/codev
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ worktrees/
# npm package tarballs
*.tgz

# Prevent accidental npm usage from recreating lockfile
package-lock.json

# Cleanup/maintain protocol artifacts
# .trash/ contains soft-deleted files (bulk data, not versioned)
codev/cleanup/.trash/
Expand Down
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ To test changes locally before publishing to npm:
cd packages/codev

# 1. Build and create tarball (Tower stays up during this)
npm run build
npm pack
pnpm build
pnpm pack

# 2. Install (Tower stays up — running process already loaded old code)
npm install -g ./cluesmith-codev-*.tgz
Expand All @@ -54,7 +54,7 @@ afx tower stop && afx tower start
- Do NOT stop Tower before installing — unnecessary downtime
- Do NOT delete the tarball — keep it for debugging if restart fails
- Do NOT build between stop and start
- Do NOT use `npm link` — it breaks global installs
- Do NOT use `npm link` or `pnpm link` — it breaks global installs

### Testing

Expand Down Expand Up @@ -121,7 +121,7 @@ validated: [gemini, codex, claude]
| Running tests | 10-300s | `run_in_background: true` |
| Consultations (consult) | 60-250s | `run_in_background: true` |
| E2E test suites | 60-600s | `run_in_background: true` |
| npm install/build | 5-60s | `run_in_background: true` |
| pnpm install/build | 5-60s | `run_in_background: true` |
| Quick file reads/edits | <5s | Run normally |

**Critical**: Using `&` at the end of the command does NOT work - you MUST set the `run_in_background` parameter.
Expand Down Expand Up @@ -217,7 +217,8 @@ project-root/
```

## Directory Map
- npm install / npm run build / npm test → always run from `packages/codev/`
- pnpm install → always run from the repository root (installs all workspace packages)
- pnpm build / pnpm test → run from `packages/codev/` or use `pnpm --filter @cluesmith/codev build`
- E2E tests → `packages/codev/tests/e2e/`
- Unit tests → `packages/codev/tests/unit/`
- Never run npm commands from the repository root unless explicitly told to.
Expand Down
11 changes: 6 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ To test changes locally before publishing to npm:
cd packages/codev

# 1. Build and create tarball (Tower stays up during this)
npm run build
npm pack
pnpm build
pnpm pack

# 2. Install (Tower stays up — running process already loaded old code)
npm install -g ./cluesmith-codev-*.tgz
Expand All @@ -54,7 +54,7 @@ afx tower stop && afx tower start
- Do NOT stop Tower before installing — unnecessary downtime
- Do NOT delete the tarball — keep it for debugging if restart fails
- Do NOT build between stop and start
- Do NOT use `npm link` — it breaks global installs
- Do NOT use `npm link` or `pnpm link` — it breaks global installs

### Testing

Expand Down Expand Up @@ -121,7 +121,7 @@ validated: [gemini, codex, claude]
| Running tests | 10-300s | `run_in_background: true` |
| Consultations (consult) | 60-250s | `run_in_background: true` |
| E2E test suites | 60-600s | `run_in_background: true` |
| npm install/build | 5-60s | `run_in_background: true` |
| pnpm install/build | 5-60s | `run_in_background: true` |
| Quick file reads/edits | <5s | Run normally |

**Critical**: Using `&` at the end of the command does NOT work - you MUST set the `run_in_background` parameter.
Expand Down Expand Up @@ -217,7 +217,8 @@ project-root/
```

## Directory Map
- npm install / npm run build / npm test → always run from `packages/codev/`
- pnpm install → always run from the repository root (installs all workspace packages)
- pnpm build / pnpm test → run from `packages/codev/` or use `pnpm --filter @cluesmith/codev build`
- E2E tests → `packages/codev/tests/e2e/`
- Unit tests → `packages/codev/tests/unit/`
- Never run npm commands from the repository root unless explicitly told to.
Expand Down
24 changes: 12 additions & 12 deletions codev/protocols/release/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ bats tests/e2e/
cd packages/codev

# Bump version (choose one)
npm version patch --no-git-tag-version # Bug fixes only
npm version minor --no-git-tag-version # New features
npm version major --no-git-tag-version # Breaking changes
pnpm version patch --no-git-tag-version # Bug fixes only
pnpm version minor --no-git-tag-version # New features
pnpm version major --no-git-tag-version # Breaking changes

# Commit and tag
cd ../..
git add packages/codev/package.json packages/codev/package-lock.json
git add packages/codev/package.json pnpm-lock.yaml
git commit -m "Release @cluesmith/codev@X.Y.Z (Codename)"
git tag -a vX.Y.Z -m "vX.Y.Z Codename - Brief description"
git push && git push origin vX.Y.Z
Expand Down Expand Up @@ -114,7 +114,7 @@ gh release create vX.Y.Z --title "vX.Y.Z Codename" --notes-file docs/releases/vX
### 7. Publish to npm

```bash
cd packages/codev && npm publish
cd packages/codev && pnpm publish
```

### 8. Post to Discussion Forum
Expand Down Expand Up @@ -189,17 +189,17 @@ Starting with v1.7.0, minor releases use a release candidate workflow for testin
```bash
# Set version to RC
cd packages/codev
npm version 1.7.0-rc.1 --no-git-tag-version
pnpm version 1.7.0-rc.1 --no-git-tag-version

# Commit and tag
cd ../..
git add packages/codev/package.json packages/codev/package-lock.json
git add packages/codev/package.json pnpm-lock.yaml
git commit -m "v1.7.0-rc.1"
git tag -a v1.7.0-rc.1 -m "v1.7.0-rc.1 - Release candidate"
git push && git push origin v1.7.0-rc.1

# Publish to "next" channel (NOT "latest")
cd packages/codev && npm publish --tag next
cd packages/codev && pnpm publish --tag next
```

### RC → Stable Promotion
Expand All @@ -209,7 +209,7 @@ When an RC is validated and ready for stable release:
```bash
# Bump to stable version
cd packages/codev
npm version 1.7.0 --no-git-tag-version
pnpm version 1.7.0 --no-git-tag-version

# Follow standard release process (steps 4-9 above)
```
Expand Down Expand Up @@ -243,15 +243,15 @@ git cherry-pick <commit-hash>

# Bump patch version
cd packages/codev
npm version patch --no-git-tag-version
pnpm version patch --no-git-tag-version

# Commit, tag, and publish
cd ../..
git add packages/codev/package.json packages/codev/package-lock.json
git add packages/codev/package.json pnpm-lock.yaml
git commit -m "v1.6.1 - Backport: <fix description>"
git tag -a v1.6.1 -m "v1.6.1 - Backport fix"
git push origin release/1.6.x && git push origin v1.6.1
cd packages/codev && npm publish
cd packages/codev && pnpm publish
```

### When to Use RCs
Expand Down
4 changes: 2 additions & 2 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ if [[ -d "agent-farm" && -f "agent-farm/package.json" ]]; then
# Check if node_modules exists, install if needed
if [[ ! -d "agent-farm/node_modules" ]]; then
echo "Installing agent-farm dependencies..."
(cd agent-farm && npm install --silent)
(cd agent-farm && pnpm install --silent)
fi

# Run TypeScript build and tests
if ! (cd agent-farm && npm run build --silent && npm test -- --run); then
if ! (cd agent-farm && pnpm build --silent && pnpm test -- --run); then
echo "❌ agent-farm tests failed - commit aborted"
echo ""
echo "To skip this check (not recommended):"
Expand Down
Loading
Loading