xiaohongshu
xiaohongshu
jj-workspace-experiments
Create isolated jj workspaces for testing changes, running experiments in parallel, and exploring alternative implementations. Use when testing breaking changes, comparing different approaches, or running long-running operations without blocking other work. (project)
Full skill instructions
Create isolated jj workspaces in the work/ directory to test changes, run experiments concurrently, and explore alternative implementations without affecting the main workspace. All workspaces share the same repository history, enabling seamless switching and comparison between approaches.
Use this skill when:
Create a workspace to test changes in isolation.
jj workspace add --name=<experiment-name> work/<directory-name>
Examples:
# Test a refactoring
jj workspace add --name=async-refactor work/async-refactor
# Try a different architecture
jj workspace add --name=new-db-layer work/new-db-layer
# Experiment with a breaking change
jj workspace add --name=api-v2 work/api-v2
The workspace starts from the current commit (@) by default. To start from a different commit:
jj workspace add --name=<name> -r <revision> work/<directory>
Navigate to the workspace and make changes:
cd work/<directory-name>
# Make changes, run tests, build
# Commits created here are isolated to this workspace
Changes are visible from the main workspace via jj log - all workspaces share the repository history.
After testing:
If successful: Merge the changes back to the main branch:
# From main workspace
jj rebase -s <experiment-name>@ -d @
If unsuccessful: Simply forget the workspace:
jj workspace forget <experiment-name>
rm -rf work/<directory-name>
The commits remain in the repository history but can be abandoned if needed.
Test multiple approaches simultaneously by creating multiple workspaces.
# Create first approach workspace
jj workspace add --name=approach-a work/approach-a
# Create second approach workspace
jj workspace add --name=approach-b work/approach-b
# Create third approach workspace (optional)
jj workspace add --name=approach-c work/approach-c
Each workspace starts from the same commit, creating parallel branches of development.
Work in each workspace independently:
# Terminal 1: Implement approach A
cd work/approach-a
# Make changes...
# Terminal 2: Implement approach B
cd work/approach-b
# Make changes...
# Terminal 3: Implement approach C
cd work/approach-c
# Make changes...
From the main workspace, compare implementations:
# View all workspace changes
jj log -r 'working_copies()'
# Compare approach A to approach B
jj diff -r approach-a@ -r approach-b@
# View specific workspace state
jj show approach-a@
Select the best approach and merge it:
# Merge winning approach
jj rebase -s approach-b@ -d @
# Forget the other workspaces
jj workspace forget approach-a
jj workspace forget approach-c
# Clean up directories
rm -rf work/approach-a work/approach-c
Use a workspace to run long builds/tests without blocking other work.
jj workspace add --name=test-run work/test-run
cd work/test-run
# Start long-running operation
buck2 test //... &
While the operation runs, work normally in the main workspace:
cd $REPO_ROOT # Back to main workspace
# Continue development normally
Return to the test workspace to check results:
cd work/test-run
# Check test results, build artifacts, etc.
Create workspaces from different commits to test compatibility:
# Test on current commit
jj workspace add --name=current-test work/current-test
# Test on older commit
jj workspace add --name=backport-test -r @-- work/backport-test
# Test on main branch
jj workspace add --name=main-test -r main work/main-test
Create a sparse main workspace with all real work in sub-workspaces:
# Make main workspace sparse (only work/ directory)
jj sparse set --clear --add work
# Create multiple workspaces for different tasks
jj workspace add work/feature-a
jj workspace add work/feature-b
jj workspace add work/bugfix-123
Now the main workspace is empty, but work/ contains multiple full checkouts that all share the repository history.
Create temporary workspaces for quick experiments:
# Create scratch workspace
jj workspace add --name=scratch work/scratch
cd work/scratch
# Experiment freely without concern
# When done, forget it
jj workspace forget scratch
rm -rf work/scratch
Use descriptive names that indicate purpose:
sqlite-vs-postgres, algorithm-a, refactor-v2feature-auth, feature-searchtest-integration, perf-benchmarkscratch, temp-experimentList active workspaces regularly:
jj workspace list
Keep track of workspace purposes in notes or commit messages.
Each workspace is a full working copy, consuming disk space. Clean up unused workspaces promptly.
# Create workspace from current commit
jj workspace add --name=<name> work/<dir>
# Create workspace from specific revision
jj workspace add --name=<name> -r <rev> work/<dir>
# List all workspaces
jj workspace list
# Forget workspace (keeps commits, removes workspace reference)
jj workspace forget <name>
# View all workspace commits
jj log -r 'working_copies()'
# Reference a workspace's current commit
<workspace-name>@
jj-clone-third-party - For examining external repositoriesjj-graft-third-party - For integrating third-party repository historyxiaohongshu
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