xiaohongshu
xiaohongshu
fresh-install-cleanup
Clean up and perform a fresh install of the Orient monorepo. Use when asked to "fresh install", "clean install", "rebuild from scratch", "fix build issues", "clean node_modules", or when encountering stale build artifacts, tsbuildinfo issues, or turbo cache problems.
Full skill instructions
# Full cleanup and reinstall
rm -rf node_modules .turbo packages/*/node_modules packages/*/.turbo packages/*/dist
find packages/*/src -type f \( -name "*.js" -o -name "*.js.map" -o -name "*.d.ts" -o -name "*.d.ts.map" \) -delete
find packages -name "*.tsbuildinfo" -delete
rm -f .tsbuildinfo
pnpm install
pnpm run build:packages
Symptoms:
tsc runs without error but produces no outputCause: TypeScript's .tsbuildinfo files store incremental compilation state. When stale, tsc believes everything is up-to-date and skips compilation entirely - even when dist/ is empty.
Key indicator: The warning "no output files found" after a build means tsbuildinfo is stale.
Fix:
find packages -name "*.tsbuildinfo" -delete
rm -f .tsbuildinfo
Verification (critical step after cleaning):
# Rebuild
pnpm run build:packages
# Verify dist directories are populated BEFORE proceeding
ls packages/mcp-tools/dist/index.js
ls packages/core/dist/index.js
ls packages/agents/dist/index.js
If dist/ is still empty after rebuild, check for other issues (stray files in src/, turbo cache).
Symptom: Build errors about missing modules even though dependencies are installed.
Cause: Previous builds left .js, .d.ts, .js.map, .d.ts.map files in src/ directories instead of dist/.
Fix:
find packages/*/src -type f \( -name "*.js" -o -name "*.js.map" -o -name "*.d.ts" -o -name "*.d.ts.map" \) -delete
Symptom: Build appears cached but dist folders are empty or stale.
Fix:
rm -rf .turbo packages/*/.turbo
Symptom: Many old worktrees consuming disk space.
Check:
git worktree list
Fix:
# Remove worktree directories
rm -rf ~/claude-worktrees/orient/*
rm -rf ~/.cursor/worktrees/orient/*
# Prune git references
git worktree prune
Symptom: Multiple orient-fresh-* directories in parent folder.
Fix:
rm -rf ../orient-fresh-*
Symptom: Build fails with error TS2307: Cannot find module '@orient/mcp-tools' or similar.
Cause: Turbo's dependency graph wasn't respected because:
dist/ folder was empty or missing despite turbo showing "cache hit"Troubleshooting:
"dependsOn": ["^build"] for the build taskworkspace:* dependenciesls packages/mcp-tools/dist/index.js
Fix: Clean tsbuildinfo and turbo cache, then rebuild:
find packages -name "*.tsbuildinfo" -delete
rm -rf .turbo packages/*/.turbo packages/*/dist
pnpm run build:packages
Remove node_modules and build artifacts:
rm -rf node_modules .turbo packages/*/node_modules packages/*/.turbo packages/*/dist
Clean stray compiled files from src directories:
find packages/*/src -type f \( -name "*.js" -o -name "*.js.map" -o -name "*.d.ts" -o -name "*.d.ts.map" \) -delete
Clean tsbuildinfo files:
find packages -name "*.tsbuildinfo" -delete
rm -f .tsbuildinfo
Clean worktrees (optional):
rm -rf ~/claude-worktrees/orient/* ~/.cursor/worktrees/orient/*
git worktree prune
Fresh install:
pnpm install
Build packages:
pnpm run build:packages
Verify build completion (critical - don't skip):
# Turbo's "cache hit" can be misleading - always verify dist/ exists
ls packages/*/dist/index.js
If any package is missing dist/index.js, clean tsbuildinfo and rebuild that package.
./run.sh test # Build and start full Docker stack
./run.sh test pull # Use pre-built images from ghcr.io (requires auth)
./run.sh test status # Check container health
./run.sh test stop # Stop containers
Symptom: ./run.sh test hangs at "load metadata for docker.io/library/node:20-alpine"
Cause: Docker buildx can be slow to fetch metadata from Docker Hub on macOS.
Workaround: Use existing local images without rebuilding:
cd docker
docker compose --env-file ../.env -f docker-compose.v2.yml -f docker-compose.local.yml --profile slack up -d --no-build
Symptom: Bind for 0.0.0.0:9000 failed: port is already allocated
Cause: Dev containers (orienter--0) share ports with test containers (orienter-).
Fix: Stop dev containers first:
docker stop orienter-nginx-0 orienter-postgres-0 orienter-minio-0
docker rm orienter-nginx-0 orienter-postgres-0 orienter-minio-0
Then start test containers:
./run.sh test
Symptom: ./run.sh test pull fails with 401 Unauthorized
Cause: Private images require GitHub authentication.
Fix: Either authenticate to ghcr.io or use local builds:
# Option 1: Authenticate
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Option 2: Use local images (skip pull)
./run.sh test # builds locally
After cleanup and rebuild, verify:
# Check dist directories exist
ls packages/*/dist
# Run unit tests
pnpm run test:ci
# Run e2e tests with Docker stack
./run.sh test status # Ensure all healthy
E2E_TESTS=true pnpm vitest run tests/e2e
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience