| name | agentic-jujutsu |
| version | 2.3.2 |
| description | Quantum-resistant, self-learning version control for AI agents, with ReasoningBank intelligence and multi-agent coordination. Use when designing agent memory/versioning, coordinating multiple agents over shared state, or building experience-replay and learning loops into an agentic system. |
Agentic Jujutsu - AI Agent Version Control
Quantum-ready, self-learning version control designed for multiple AI agents working simultaneously without conflicts.
When to Use This Skill
Use agentic-jujutsu when you need:
- ✅ Multiple AI agents modifying code simultaneously
- ✅ Lock-free version control (23x faster than Git)
- ✅ Self-learning AI that improves from experience
- ✅ Quantum-resistant security for future-proof protection
- ✅ Automatic conflict resolution (87% success rate)
- ✅ Pattern recognition and intelligent suggestions
- ✅ Multi-agent coordination without blocking
Quick Start
Installation
npx agentic-jujutsu
Basic Usage
const { JjWrapper } = require('agentic-jujutsu');
const jj = new JjWrapper();
await jj.status();
await jj.newCommit('Add feature');
await jj.log(10);
const id = jj.startTrajectory('Implement authentication');
await jj.branchCreate('feature/auth');
await jj.newCommit('Add auth');
jj.addToTrajectory();
jj.finalizeTrajectory(0.9, 'Clean implementation');
const suggestion = JSON.parse(jj.getSuggestion('Add logout feature'));
console.log(`Confidence: ${suggestion.confidence}`);
Reference
The full detail lives in references/ and loads only when needed:
Best Practices
1. Trajectory Management
jj.startTrajectory('Implement user authentication with JWT');
jj.startTrajectory('fix stuff');
jj.finalizeTrajectory(0.7, 'Works but needs refactoring');
jj.finalizeTrajectory(1.0, 'Perfect!');
2. Pattern Recognition
for (let i = 0; i < 10; i++) {
jj.startTrajectory('Deploy feature');
await deploy();
jj.addToTrajectory();
jj.finalizeTrajectory(wasSuccessful ? 0.9 : 0.5);
}
await deploy();
3. Multi-Agent Coordination
const agents = ['agent1', 'agent2', 'agent3'];
await Promise.all(agents.map(async (agent) => {
const jj = new JjWrapper();
await jj.newCommit(`Changes by ${agent}`);
}));
for (const agent of agents) {
await agent.waitForLock();
await agent.commit();
}
4. Error Handling
try {
await jj.execute(['complex-operation']);
jj.finalizeTrajectory(0.9);
} catch (err) {
jj.finalizeTrajectory(0.3, `Failed: ${err.message}. Root cause: ...`);
}
try {
await jj.execute(['operation']);
} catch (err) {
}
Validation Rules (v2.3.1+)
Task Description
- ✅ Cannot be empty or whitespace-only
- ✅ Maximum length: 10,000 bytes
- ✅ Automatically trimmed
Success Score
- ✅ Must be finite (not NaN or Infinity)
- ✅ Must be between 0.0 and 1.0 (inclusive)
Operations
- ✅ Must have at least one operation before finalizing
Context
- ✅ Cannot be empty
- ✅ Keys cannot be empty or whitespace-only
- ✅ Keys max 1,000 bytes, values max 10,000 bytes
Troubleshooting
Issue: Low Confidence Suggestions
const suggestion = JSON.parse(jj.getSuggestion('new task'));
if (suggestion.confidence < 0.5) {
const stats = JSON.parse(jj.getLearningStats());
console.log(`Need more data. Current trajectories: ${stats.totalTrajectories}`);
}
Issue: Validation Errors
try {
jj.startTrajectory('');
} catch (err) {
if (err.message.includes('Validation error')) {
console.log('Invalid input:', err.message);
}
}
try {
jj.finalizeTrajectory(1.5);
} catch (err) {
jj.finalizeTrajectory(Math.max(0, Math.min(1, score)));
}
Issue: No Patterns Discovered
const patterns = JSON.parse(jj.getPatterns());
if (patterns.length === 0) {
}
Examples
Example 1: Simple Learning Workflow
const { JjWrapper } = require('agentic-jujutsu');
async function learnFromWork() {
const jj = new JjWrapper();
jj.startTrajectory('Add user profile feature');
await jj.branchCreate('feature/user-profile');
await jj.newCommit('Add user profile model');
await jj.newCommit('Add profile API endpoints');
await jj.newCommit('Add profile UI');
jj.addToTrajectory();
jj.finalizeTrajectory(0.85, 'Feature complete, minor styling issues remain');
const suggestion = JSON.parse(jj.getSuggestion('Add settings page'));
console.log('AI suggests:', suggestion.reasoning);
}
Example 2: Multi-Agent Swarm
async function agentSwarm(taskList) {
const agents = taskList.map((task, i) => ({
name: `agent-${i}`,
jj: new JjWrapper(),
task
}));
const results = await Promise.all(agents.map(async (agent) => {
agent.jj.startTrajectory(agent.task);
const suggestion = JSON.parse(agent.jj.getSuggestion(agent.task));
const success = await executeTask(agent, suggestion);
agent.jj.addToTrajectory();
agent.jj.finalizeTrajectory(success ? 0.9 : 0.5);
return { agent: agent.name, success };
}));
console.log('Results:', results);
}
Related Documentation
Version History
- v2.3.2 - Documentation updates
- v2.3.1 - Validation fixes for ReasoningBank
- v2.3.0 - Quantum-resistant security with @qudag/napi-core
- v2.1.0 - Self-learning AI with ReasoningBank
- v2.0.0 - Zero-dependency installation with embedded jj binary
Status: ✅ Production Ready
License: MIT
Maintained: Active