4.7 KiB
Jj Default Installation and Usage
This repository installs the gitea-issue-devops-agent skill first, then attempts to install jj by default.
jj is the internal execution layer for agent reliability. Git branches, PRs, CI/CD pipelines, and merge approvals remain the external system of record.
Default Install Strategy
The one-command installers now behave like this:
- Install the skill into the target Codex directory.
- Check whether
jjis already available. - If not, try OS-specific install methods.
- If all methods fail, keep the skill installed and print manual fallback instructions.
OS-Specific Attempt Order
Linux
brew install jjcargo binstall --strategies crate-meta-data jj-clicargo install --locked --bin jj jj-cli
For prerelease:
cargo install --git https://github.com/jj-vcs/jj.git --locked --bin jj jj-cli
macOS
brew install jjcargo binstall --strategies crate-meta-data jj-clicargo install --locked --bin jj jj-cli
For prerelease:
cargo install --git https://github.com/jj-vcs/jj.git --locked --bin jj jj-cli
Windows
winget install jj-vcs.jjscoop install main/jjcargo install --locked --bin jj jj-cli
For prerelease:
cargo install --git https://github.com/jj-vcs/jj.git --locked --bin jj jj-cli
Installer Controls
Bash installers
INSTALL_JJ=0: skipjjinstallationJJ_INSTALL_METHOD=auto|brew|binstall|cargoJJ_CHANNEL=release|prerelease
Example:
INSTALL_JJ=0 curl -fsSL https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.sh | bash
JJ_INSTALL_METHOD=cargo JJ_CHANNEL=prerelease curl -fsSL https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.sh | bash
PowerShell installers
With the one-liner, prefer environment variables:
$env:INSTALL_JJ='0'$env:JJ_INSTALL_METHOD='auto'|'winget'|'scoop'|'cargo'$env:JJ_CHANNEL='release'|'prerelease'
Example:
$env:JJ_INSTALL_METHOD='winget'
iwr -useb https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.ps1 | iex
$env:INSTALL_JJ='0'
iwr -useb https://fun-md.com/Fun_MD/devops-skills/raw/branch/main/install/install.ps1 | iex
If you save the script locally first, you can also use the -SkipJj, -JjInstallMethod, and -JjChannel parameters directly.
Verification
After installation:
jj --version
Set identity:
jj config set --user user.name "Your Name"
jj config set --user user.email "you@example.com"
Optional shell completion:
source <(jj util completion bash)
PowerShell completion:
jj util completion power-shell | Out-String | Invoke-Expression
Working Model
Use jj as an internal operator tool:
- issue selection, branch naming, PR creation, CI, and merge stay Git/Gitea-native
jjhandles local history rewrites, workspace isolation, and recovery- each issue branch can map to one
jjbookmark
Scenario Examples
1) First-Time Team Setup
- Run the one-command installer.
- Verify
jj --version. - Configure
user.nameanduser.email. - Start with one fixed issue in
manualorsemi-automaticmode.
Recommended when a team is new to AI-assisted delivery and wants controlled adoption.
2) Initial AI PR for a Bug
- Human selects issue
#48. - MajorAgent creates the plan.
- Issue branch and draft PR are created.
- SubAgent changes only the planned paths.
- TestAgent validates build, targeted tests, and issue e2e.
- Engineer reviews and refines before merge approval.
Recommended default flow for day-to-day bug fixing.
3) Semi-Automatic Review Flow
- AI produces the initial draft PR.
- Reviewer inspects the plan, diff scope, and evidence.
- Engineer uses the AI coding tool for follow-up edits if needed.
- Only after review approval does the branch enter preview-slot testing.
Recommended when engineering review must happen before environment allocation.
4) Human + TestAgent Parallel Verification with Workspaces
- SubAgent works in the main issue workspace.
- TestAgent creates a separate
jj workspacefor validation. - Human reviewer can create another workspace for white-box adjustments.
- All three flows remain tied to the same issue branch and plan.
Recommended for larger issues where testing and code refinement happen in parallel.
5) Recovery After AI Drift
- AI rewrites the change incorrectly or edits too broadly.
- Engineer inspects
jj op log. - Engineer uses
jj undo,jj op revert, orjj op restore. - The issue branch and PR remain intact while local execution history is repaired.
Recommended when AI behavior is fast but unreliable and quick recovery matters.