agentic-jujutsu
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination
What this skill does
# 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
```bash
npx agentic-jujutsu
```
### Basic Usage
```javascript
const { JjWrapper } = require('agentic-jujutsu');
const jj = new JjWrapper();
// Basic operations
await jj.status();
await jj.newCommit('Add feature');
await jj.log(10);
// Self-learning trajectory
const id = jj.startTrajectory('Implement authentication');
await jj.branchCreate('feature/auth');
await jj.newCommit('Add auth');
jj.addToTrajectory();
jj.finalizeTrajectory(0.9, 'Clean implementation');
// Get AI suggestions
const suggestion = JSON.parse(jj.getSuggestion('Add logout feature'));
console.log(`Confidence: ${suggestion.confidence}`);
```
## Core Capabilities
### 1. Self-Learning with ReasoningBank
Track operations, learn patterns, and get intelligent suggestions:
```javascript
// Start learning trajectory
const trajectoryId = jj.startTrajectory('Deploy to production');
// Perform operations (automatically tracked)
await jj.execute(['git', 'push', 'origin', 'main']);
await jj.branchCreate('release/v1.0');
await jj.newCommit('Release v1.0');
// Record operations to trajectory
jj.addToTrajectory();
// Finalize with success score (0.0-1.0) and critique
jj.finalizeTrajectory(0.95, 'Deployment successful, no issues');
// Later: Get AI-powered suggestions for similar tasks
const suggestion = JSON.parse(jj.getSuggestion('Deploy to staging'));
console.log('AI Recommendation:', suggestion.reasoning);
console.log('Confidence:', (suggestion.confidence * 100).toFixed(1) + '%');
console.log('Expected Success:', (suggestion.expectedSuccessRate * 100).toFixed(1) + '%');
```
**Validation (v2.3.1)**:
- ✅ Tasks must be non-empty (max 10KB)
- ✅ Success scores must be 0.0-1.0
- ✅ Must have operations before finalizing
- ✅ Contexts cannot be empty
### 2. Pattern Discovery
Automatically identify successful operation sequences:
```javascript
// Get discovered patterns
const patterns = JSON.parse(jj.getPatterns());
patterns.forEach(pattern => {
console.log(`Pattern: ${pattern.name}`);
console.log(` Success rate: ${(pattern.successRate * 100).toFixed(1)}%`);
console.log(` Used ${pattern.observationCount} times`);
console.log(` Operations: ${pattern.operationSequence.join(' → ')}`);
console.log(` Confidence: ${(pattern.confidence * 100).toFixed(1)}%`);
});
```
### 3. Learning Statistics
Track improvement over time:
```javascript
const stats = JSON.parse(jj.getLearningStats());
console.log('Learning Progress:');
console.log(` Total trajectories: ${stats.totalTrajectories}`);
console.log(` Patterns discovered: ${stats.totalPatterns}`);
console.log(` Average success: ${(stats.avgSuccessRate * 100).toFixed(1)}%`);
console.log(` Improvement rate: ${(stats.improvementRate * 100).toFixed(1)}%`);
console.log(` Prediction accuracy: ${(stats.predictionAccuracy * 100).toFixed(1)}%`);
```
### 4. Multi-Agent Coordination
Multiple agents work concurrently without conflicts:
```javascript
// Agent 1: Developer
const dev = new JjWrapper();
dev.startTrajectory('Implement feature');
await dev.newCommit('Add feature X');
dev.addToTrajectory();
dev.finalizeTrajectory(0.85);
// Agent 2: Reviewer (learns from Agent 1)
const reviewer = new JjWrapper();
const suggestion = JSON.parse(reviewer.getSuggestion('Review feature X'));
if (suggestion.confidence > 0.7) {
console.log('High confidence approach:', suggestion.reasoning);
}
// Agent 3: Tester (benefits from both)
const tester = new JjWrapper();
const similar = JSON.parse(tester.queryTrajectories('test feature', 5));
console.log(`Found ${similar.length} similar test approaches`);
```
### 5. Quantum-Resistant Security (v2.3.0+)
Fast integrity verification with quantum-resistant cryptography:
```javascript
const { generateQuantumFingerprint, verifyQuantumFingerprint } = require('agentic-jujutsu');
// Generate SHA3-512 fingerprint (NIST FIPS 202)
const data = Buffer.from('commit-data');
const fingerprint = generateQuantumFingerprint(data);
console.log('Fingerprint:', fingerprint.toString('hex'));
// Verify integrity (<1ms)
const isValid = verifyQuantumFingerprint(data, fingerprint);
console.log('Valid:', isValid);
// HQC-128 encryption for trajectories
const crypto = require('crypto');
const key = crypto.randomBytes(32).toString('base64');
jj.enableEncryption(key);
```
### 6. Operation Tracking with AgentDB
Automatic tracking of all operations:
```javascript
// Operations are tracked automatically
await jj.status();
await jj.newCommit('Fix bug');
await jj.rebase('main');
// Get operation statistics
const stats = JSON.parse(jj.getStats());
console.log(`Total operations: ${stats.total_operations}`);
console.log(`Success rate: ${(stats.success_rate * 100).toFixed(1)}%`);
console.log(`Avg duration: ${stats.avg_duration_ms.toFixed(2)}ms`);
// Query recent operations
const ops = jj.getOperations(10);
ops.forEach(op => {
console.log(`${op.operationType}: ${op.command}`);
console.log(` Duration: ${op.durationMs}ms, Success: ${op.success}`);
});
// Get user operations (excludes snapshots)
const userOps = jj.getUserOperations(20);
```
## Advanced Use Cases
### Use Case 1: Adaptive Workflow Optimization
Learn and improve deployment workflows:
```javascript
async function adaptiveDeployment(jj, environment) {
// Get AI suggestion based on past deployments
const suggestion = JSON.parse(jj.getSuggestion(`Deploy to ${environment}`));
console.log(`Deploying with ${(suggestion.confidence * 100).toFixed(0)}% confidence`);
console.log(`Expected duration: ${suggestion.estimatedDurationMs}ms`);
// Start tracking
jj.startTrajectory(`Deploy to ${environment}`);
// Execute recommended operations
for (const op of suggestion.recommendedOperations) {
console.log(`Executing: ${op}`);
await executeOperation(op);
}
jj.addToTrajectory();
// Record outcome
const success = await verifyDeployment();
jj.finalizeTrajectory(
success ? 0.95 : 0.5,
success ? 'Deployment successful' : 'Issues detected'
);
}
```
### Use Case 2: Multi-Agent Code Review
Coordinate review across multiple agents:
```javascript
async function coordinatedReview(agents) {
const reviews = await Promise.all(agents.map(async (agent) => {
const jj = new JjWrapper();
// Start review trajectory
jj.startTrajectory(`Review by ${agent.name}`);
// Get AI suggestion for review approach
const suggestion = JSON.parse(jj.getSuggestion('Code review'));
// Perform review
const diff = await jj.diff('@', '@-');
const issues = await agent.analyze(diff);
jj.addToTrajectory();
jj.finalizeTrajectory(
issues.length === 0 ? 0.9 : 0.6,
`Found ${issues.length} issues`
);
return { agent: agent.name, issues, suggestion };
}));
// Aggregate learning from all agents
return reviews;
}
```
### Use Case 3: Error Pattern Detection
Learn from failures to prevent future issues:
```javascript
async function smartMerge(jj, branch) {
// Query similar merge attempts
const similar = JSON.parse(jj.queryTrajectories(`merge ${branch}`, 10));
// Analyze past failures
const failures = similar.filter(t => t.successScore < 0.5);
if (failures.length > 0) {Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.