ohare93 avatar

jmo-development-tools

Custom commands, agents, and skills for NixOS, Jujutsu, and documentation workflows

version
1.0.7
GitHub stars
1

Install

/plugin install jmo-development-tools@claude-setup-repository

Run it inside Claude Code after adding the marketplace with /plugin marketplace add ohare93/claude-setup.

Contents

Commands 5

Use jj (not git) to look at all the commits from main onwards, see their diffs, and give the commit a good description. Use conventional commit convention. A workflow like the following:

  • JJ_CONFIG= jj log --no-pager -s -r "trunk()..@"
    • The format is "REVID EMAIL TIME COMMITID"
  • For each ref without a description:
    • jj diff -r REVID
    • jj desc -r REVID -m "DESCRIPTION OF CHANGES"

When taking a look at the content of each commit it may be prudent to split them up into separate commits. If needed offer the user your split plan as it would be in the end result. Use jj split -r @ -m "MESSAGE" file1 folder2/ to split up the commits easily.

Juggle Plan All Command

Task: Analyze all active juggler balls in the current project and create a comprehensive execution plan.

Objective

Review all active tasks (balls) being juggled and create a prioritized, structured plan for completing them efficiently.

Execution Steps

Step 1: Gather Ball Data

Run the following command to export all active balls:

juggle export --format json

This will output JSON data containing all balls (excluding completed/done by default).

Step 2: Analyze Balls

Review the exported ball data and identify:

Ball Properties to Consider:

  • id - Ball identifier
  • intent - What the ball is trying to accomplish
  • priority - high/medium/low priority
  • active_state - Current state (ready/juggling)
  • juggle_state - Sub-state (needs-thrown/in-air/needs-caught)
  • todos - Specific tasks within the ball (if present)
  • last_activity - When the ball was last touched
  • zellij_session/zellij_tab - Context information

Analysis Criteria:

  1. State Priority:

    • needs-caught balls should be addressed first (work completed, needs verification)
    • needs-thrown balls need direction/input next
    • in-air balls are actively being worked on
    • ready balls haven't been started yet
  2. Priority Levels:

    • High priority balls should be tackled before medium/low
    • Consider if priority conflicts with state priority
  3. Dependencies:

    • Look for balls that reference similar components/files
    • Identify balls that might block or enable other balls
    • Note balls with todos that relate to other balls' intents
  4. Completeness:

    • Balls with todos: Check how many are completed vs pending
    • Balls near completion should generally be prioritized

Step 3: Create Structured Plan

Generate a comprehensive plan with the following sections:

1. Executive Summary:

  • Total number of active balls
  • Breakdown by state (needs-caught, needs-thrown, in-air, ready)
  • Breakdown by priority

2. Ball Groups (organize by theme/component):

  • Group related balls together
  • Identify common themes (e.g., CLI improvements, refactoring, bug fixes)
  • Note dependencies between groups

3. Recommended Execution Order: For each ball in suggested order, provide:

  • Ball ID and intent
  • Current state and why it's positioned here
  • Key todos or next actions
  • Estimated complexity (if discernible)
  • Dependencies or blockers

4. Quick Wins:

  • Identify balls that are nearly complete
  • Highlight balls that unblock others
  • Note any balls in needs-caught state that just need verification

5. Parking Lot:

  • Balls that can wait (low priority + not blocking)
  • Balls that need more information (needs-thrown with unclear direction)

Step 4: Present Recommendations

After presenting the plan, provide:

Immediate Next Steps:

  • Which ball(s) to address first and why
  • Specific commands to run (e.g., juggle juggler-8 in-air)
  • Any preparation needed before starting

Workflow Suggestion:

  • Should balls be tackled sequentially or can some be parallelized?
  • Are there natural break points for user review?
  • When should /split-plan be invoked to delegate to specialized agents?

Output Format

Structure your response as:

# Juggler Plan Analysis

## Executive Summary
[Stats and overview]

## Active Ball Groups

### Group 1: [Theme Name]
**Balls**: juggler-X, juggler-Y
**Dependencies**: [Any dependencies]
**Description**: [What these balls accomplish together]

### Group 2: [Theme Name]
...

## Recommended Execution Order

1. **juggler-X**: [Intent]
   - State: [Current state]
   - Priority: [Priority level]
   - Next Action: [What to do]
   - Why First: [Reasoning]

2. **juggler-Y**: [Intent]
   ...

## Quick Wins
- [Balls that can be completed quickly]

## Parking Lot
- [Balls that can wait]

## Immediate Next Steps
1. [First action]
2. [Second action]
3. [When to use /split-plan]

Success Criteria

  • All active balls are accounted for in the plan
  • Execution order has clear reasoning based on priority, state, and dependencies
  • User has actionable next steps
  • Plan identifies which balls should be tackled immediately vs later
  • Dependencies and blockers are clearly identified

Optimize Documentation Command

Task: Optimize the documentation file: {{arg}}

Objective

Make documentation more concise and clearer without introducing vagueness or misinterpretation.

Optimization Goals (in priority order):

  1. Eliminate vagueness: Strengthen instructions with explicit criteria and measurable steps
  2. Increase conciseness: Remove redundancy while preserving all necessary information
  3. Preserve clarity AND meaning: Never sacrifice understanding or semantic accuracy for brevity

Critical Constraint: Instructions (text + examples) should only be updated if the new version retains BOTH the same meaning AND the same clarity as the old version. If optimization reduces clarity or changes meaning, reject the change.

Idempotent Design: This command can be run multiple times on the same document:

  • First pass: Strengthens vague instructions, removes obvious redundancy
  • Second pass: Further conciseness improvements if instructions are now self-sufficient
  • Subsequent passes: No changes if already optimized

Analysis Methodology

For each instruction section in the document:

Step 1: Evaluate for Vagueness/Ambiguity

Is the instruction clear WITHOUT the examples?

  • Cover the examples and read only the instruction
  • Can it be executed correctly without looking at examples?
  • Does it contain subjective terms like "clearly", "properly", "immediately" without definition?
  • Are there measurable criteria or explicit steps?

Decision Tree:

Can instruction be followed correctly without examples?
├─ YES → Instruction is CLEAR → Proceed to Step 2
└─ NO → Instruction is VAGUE → Proceed to Step 3

Step 2: If Clear (Examples Not Needed for Understanding)

Only proceed here if instruction is unambiguous without examples.

  1. Identify examples following the instruction
  2. Apply Execution Test: Can Claude execute correctly without this example?
    • If NO (example defines ambiguous term) → KEEP
    • If YES → Proceed to step 3
  3. Determine if examples serve operational purpose:
    • ✅ Defines what "correct" looks like → KEEP
    • ✅ Shows exact commands with success criteria → KEEP
    • ✅ Sequential workflows where order matters → KEEP
    • ✅ Resolves ambiguity in instruction wording → KEEP
    • ✅ Data structures (JSON formats) → KEEP
    • ❌ Explains WHY (educational/rationale) → REMOVE
    • ❌ Only restates already-clear instruction → REMOVE

Step 3: If Vague (Examples Needed for Understanding)

DO NOT REMOVE EXAMPLES YET - Strengthen instruction first.

  1. Identify the source of vagueness:

    • Subjective terms without definition
    • Missing criteria or measurements
    • Unclear boundaries or edge cases
    • Narrative description instead of explicit steps
  2. Strengthen the instruction:

    • Replace subjective terms with explicit criteria
    • Convert narrative to numbered steps
    • Add measurable thresholds or boundaries
    • Define what "success" looks like
  3. KEEP all examples - They're needed until instruction is strengthened

  4. Mark for next pass: After strengthening, examples can be re-evaluated in next optimization pass

Categories of Examples to KEEP (Even with Clear Instructions)

  1. Executable Commands: Bash scripts, jq commands, git workflows
  2. Data Structures: JSON formats, configuration schemas, API contracts
  3. Boundary Demonstrations: Prohibited vs permitted patterns, edge cases
  4. Concept Illustrations: Examples that show what a vague term means (e.g., "contextual" JavaDoc)
  5. Templates: Reusable formats for structured responses
  6. Prevention Examples: Wrong vs right patterns for frequently violated rules
  7. Pattern Extraction Rules: Annotations that generalize examples into reusable decision principles

Categories of Examples to REMOVE

  1. Redundant Clarification: Examples that restate the instruction in different words
  2. Obvious Applications: Examples showing trivial applications of clear rules
  3. Duplicate Templates: Multiple versions of the same template
  4. Verbose Walkthroughs: Step-by-step narratives when numbered instructions exist

🚨 EXECUTION-CRITICAL CONTENT (NEVER CONDENSE)

The following content types are necessary for CORRECT EXECUTION - preserve even if instructions are technically clear:

1. Concrete Examples Defining "Correct"

  • Examples showing EXACT correct vs incorrect patterns when instruction uses abstract terms
  • Specific file paths, line numbers, or command outputs showing what success looks like
  • Test: Does the example define something ambiguous in the instruction?

KEEP when instruction says "delete" but example shows this means "remove entire entry, not mark complete":

bash
# ❌ WRONG: Marking complete in
todo.md
vim todo.md  # Changed - [ ] to - [x]
git commit -m "..." todo.md  # Result: Still in
todo.md

# ✅ CORRECT: Delete from
todo.md, add to changelog.md
vim todo.md  # DELETE entire task entry
vim changelog.md  # ADD under ## 2025-10-08

REMOVE if instruction already says "remove entire entry" explicitly - example becomes redundant.

2. Sequential Steps for State Machines

  • Numbered workflows where order matters for correctness
  • State transition sequences where skipping/reordering causes failures
  • Test: Can steps be executed in different order and still work?

KEEP numbered sequence when order is mandatory:

1. Complete SYNTHESIS phase
2. Present plan to user
3. Update lock: `jq '.state = "SYNTHESIS_AWAITING_APPROVAL"'`
4. STOP - wait for user
5. On approval: Update lock to `CONTEXT` and proceed

REMOVE numbering if steps are independent checks that can run in any order.

3. Inline Comments That Specify WHAT to Verify

  • Comments explaining what output to expect or check
  • Annotations specifying exact conditions for success/failure
  • Test: Does comment specify success criteria not in the instruction?

KEEP comments specifying criteria:

bash
# Before rewriting: git rev-list --count HEAD
# After rewriting: git rev-list --count HEAD
# Compare counts - should match unless you explicitly intended to drop commits

REMOVE comments explaining WHY (e.g., "This prevents data loss because..." is educational, not operational).

4. Disambiguation Examples

  • Multiple examples showing boundary between prohibited/permitted when rule uses subjective terms
  • Examples that resolve ambiguity in instruction wording
  • Test: Can the instruction be misinterpreted without this example?

KEEP examples that clarify ambiguous instructions. REMOVE examples that just restate clear instructions.

5. Pattern Extraction Rules

  • Annotations that generalize specific examples into reusable decision principles
  • Text that teaches how to apply the same reasoning to future cases
  • Test: Does this text extract a general rule from a specific example?

KEEP pattern extraction annotations:

[Specific example code block]
→ Shows that "delete" means remove lines, not change checkbox.

The arrow extracts the general principle (what "delete" means) from the specific example.

REMOVE pure commentary:

[Example code block]
→ This is a good practice to follow.

Generic praise without extracting a reusable decision rule.

Critical Distinction:

  • ✅ KEEP: "→ Specifies exactly what success looks like" (teaches pattern recognition)
  • ❌ REMOVE: "This example helps you understand the concept" (generic educational)
  • ✅ KEEP: "→ Claude doesn't need to know why" (generalizes when to remove content)
  • ❌ REMOVE: "This is important because it prevents errors" (explains WHY, not WHAT)

Test: If removed, would Claude lose the ability to apply this reasoning to NEW examples not in the document? If YES → KEEP (it's pattern extraction, not commentary).

🚨 REFERENCE-BASED CONDENSING RULES

When consolidating duplicate content via references:

❌ NEVER Replace with References

  1. Content within sequential workflows (Steps 1→2→3)

    • Jumping mid-workflow breaks execution flow
    • Keep operational content inline even if duplicated elsewhere
  2. Quick-reference lists in methodology sections

    • Simple scannable lists serve different purpose than detailed explanations
    • Both can coexist: brief list for scanning, detailed section for depth
  3. Success criteria at decision points

    • Content needed AT THE MOMENT of decision must be inline
    • Don't force jumping to verify each criterion

✅ OK to Replace with References

  1. Explanatory content that appears in multiple places

    • Rationale sections
    • Background information
    • Historical context
  2. Content at document boundaries (intro/conclusion)

    • References acceptable when introducing/summarizing
    • User not mid-execution at these points
  3. Cross-referencing related but distinct concepts

    • "See also" style references
    • Not replacing direct duplication

🔍 Semantic Equivalence Test

Before replacing content with reference, verify:

  1. Same information: Referenced section contains EXACT same information

    • ❌ WRONG: Replace "Goals: A, B, C" with reference to "Priority: C > B > A"
    • ✅ RIGHT: Replace duplicate "Goals: A, B, C" with reference to other "Goals: A, B, C"
  2. Same context: Referenced section serves same purpose

    • ❌ WRONG: Replace "do X" with reference to "when to do X"
    • ✅ RIGHT: Replace "do X" with reference to "do X"
  3. Same level of detail: No precision lost in referenced content

    • ❌ WRONG: Replace 7-item checklist with reference to 3-item summary
    • ✅ RIGHT: Replace 7-item checklist with reference to same 7-item checklist

📋 Duplication Taxonomy

Type 1: Quick-Reference + Detailed (KEEP BOTH)

  • Simple list (3-5 words per item) for fast scanning
  • Detailed section with tests, examples, edge cases
  • Purpose: Different use cases - quick lookup vs deep understanding

Type 2: Exact Duplication (CONSOLIDATE)

  • Same information, same level of detail, same context
  • Appearing in multiple places with no contextual justification
  • Purpose: Genuine redundancy - consolidate to single source

Type 3: Pedagogical Repetition (CONTEXT-DEPENDENT)

  • Key rules stated multiple times for emphasis
  • Summary + detailed explanation
  • Purpose: Learning/retention - keep if document is pedagogical, remove if reference doc

🔍 Pre-Consolidation Verification

Before removing ANY content for consolidation:

  1. ✅ Content is byte-for-byte duplicate OR semantically equivalent
  2. ✅ Replacement reference doesn't interrupt sequential workflow
  3. ✅ Referenced section is same level of detail
  4. ✅ Consolidation doesn't remove quick-reference value
  5. ✅ Verify by test: Can user execute task with reference-based version as easily as inline version?

If ANY check fails → Keep duplicate inline

🚨 DECISION RULE: The Execution Test

Before removing ANY content, ask:

  1. Can Claude execute the instruction CORRECTLY without this content?

    • If NO → KEEP (execution-critical)
    • If YES → Proceed to question 2
  2. Does this content explain WHY (rationale/educational)?

    • If YES → REMOVE (not needed for execution)
    • If NO → KEEP (operational detail)
  3. Does this content show WHAT "correct" looks like (success criteria)?

    • If YES → KEEP (execution-critical)
    • If NO → Proceed to question 4
  4. Does this content extract a general decision rule from a specific example?

    • If YES → KEEP (pattern extraction for future cases)
    • If NO → May remove if redundant

Examples Applying the Test

REMOVE THIS (explains WHY):

**RATIONALE**: Git history rewriting can silently drop commits or changes,
especially during interactive rebases where "pick" lines might be accidentally
deleted or conflicts might be resolved incorrectly. Manual verification is the
only reliable way to ensure no data loss occurred.

→ Claude doesn't need to know why; just needs to know to verify.

KEEP THIS (defines WHAT "correct" means):

**ARCHIVAL SUCCESS CRITERIA**:
- `git diff todo.md` shows ONLY deletions
- `git diff changelog.md` shows ONLY additions under today's date
- Both files in SAME commit
- `grep task-name todo.md` returns no matches

→ Specifies exactly what success looks like; needed for correct execution.

REMOVE THIS (restates clear instruction):

When lock acquisition fails, you should not delete the lock file.
Instead, select an alternative task to work on.

→ If instruction already says "If lock acquisition fails: Select alternative task, do NOT delete lock"

KEEP THIS (resolves ambiguity in "delete"):

bash
# ❌ WRONG: Marking complete in
todo.md
vim todo.md  # Changed - [ ] to - [x]

# ✅ CORRECT: Delete from
todo.md
vim todo.md  # DELETE entire task entry

→ Shows that "delete" means remove lines, not change checkbox.

🚨 CONCISENESS vs CORRECTNESS HIERARCHY

Priority order when deciding optimizations:

  1. CORRECTNESS (highest priority)

    • Can Claude execute the instruction correctly without this?
    • Does this resolve ambiguity that would cause wrong execution?
  2. EFFICIENCY (medium priority)

    • Does removing this make instructions faster to scan?
    • Does condensing reduce cognitive load?
  3. CONCISENESS (lowest priority)

    • Does this reduce line count?
    • Does this tighten prose?

Rule: Never sacrifice correctness for conciseness. Always sacrifice conciseness for correctness.

Conciseness Strategies

Apply these techniques to make instructions more concise:

  1. Eliminate Redundancy:

    • Remove repeated information across sections
    • Consolidate overlapping instructions
    • Replace verbose phrases with precise terms
  2. Tighten Language:

    • Replace "you MUST execute" with "execute"
    • Replace "in order to" with "to"
    • Remove filler words ("clearly", "obviously", "simply")
  3. Use Structure Over Prose:

    • Convert narrative paragraphs to bulleted lists
    • Use numbered steps for sequential processes
    • Use tables for multi-dimensional information
  4. Preserve Essential Elements:

    • Keep all executable commands (bash, jq)
    • Keep all data structure formats (JSON)
    • Keep all boundary demonstrations (wrong vs right)
    • Keep all measurable criteria and success definitions

Warning: Do NOT sacrifice these for conciseness:

  • Scannability: Vertical lists are clearer than comma-separated concatenations
  • Pattern recognition: Checkmarks/bullets for required actions are clearer than prose
  • Explicit criteria ("ALL", "at least ONE", "NEVER")
  • Measurable thresholds (counts, file paths, exact strings)
  • Prevention patterns (prohibited vs required)
  • Error condition definitions

Anti-Pattern Examples (clarity violations to avoid):

  • ❌ Converting vertical list of prohibited phrases to slash-separated concatenation
  • ❌ Converting checkmarked action items (✅) to comma-separated prose
  • ❌ Removing section headers that aid navigation
  • ❌ Consolidating distinct concepts into single run-on sentences
  • ❌ Replacing inline workflow criteria with "see section X" mid-execution
  • ❌ Replacing "Goals: A, B, C" with reference to "Priority: C > B > A" (not semantically equivalent)
  • ❌ Removing quick-reference lists because detailed section exists elsewhere

Optimization Strategy

Single-Pass Approach (when possible):

  • Strengthen vague instructions AND remove obvious redundancy in one pass
  • Commit: "Optimize [filename] for conciseness and clarity"

Multi-Pass Approach (for complex documents):

  • First pass: Strengthen vague instructions + remove obvious redundancy
  • Second pass: Further conciseness improvements now that instructions are self-sufficient
  • Subsequent passes: No changes if already optimized

User Workflow:

bash
# First invocation: Strengthens and removes redundancy
/optimize-doc docs/some-file.md

# Review changes, then optional second invocation for further optimization
/optimize-doc docs/some-file.md

# Subsequent invocations: No changes if already optimized
/optimize-doc docs/some-file.md

Execution Instructions

  1. Read the document specified: {{arg}}
  2. Analyze each section using the methodology above
  3. Optimize directly:
    • Strengthen vague instructions with explicit criteria
    • Remove redundant content while preserving clarity
    • Apply conciseness strategies where beneficial
  4. Report changes made in your response to the user
  5. Commit the optimized document with descriptive message

Quality Standards

Every change must satisfy ALL criteria:

  • ✅ Meaning preserved: Instructions mean exactly the same thing
  • ✅ Executability preserved: Claude can execute correctly without removed content
  • ✅ Success criteria intact: What "correct" looks like is still clear
  • ✅ Ambiguity resolved: Any ambiguous terms still have defining examples
  • ✅ Conciseness increased: Redundancy eliminated or prose tightened

Verification Test (The Execution Test):

  1. Can Claude execute the instruction correctly without removed content?
  2. Does removed content only explain WHY (not WHAT or HOW)?
  3. Does removed content extract a general decision rule from specific examples?
  4. If answer to #1 is NO, reject the optimization
  5. If answer to #3 is YES, reject the optimization (keep pattern extraction)
  6. If answer to #2 is YES, accept the removal

Change Summary Format (in your response):

## Optimization Summary

**Changes Made**:
1. [Section Name] (Lines X-Y): [Brief description of change]
   - Before: [Key issue - vagueness, redundancy, verbosity]
   - After: [How it was improved]

2. [Section Name] (Lines A-B): [Brief description]
   - ...

**Metrics**:
- Lines removed: N
- Sections strengthened: M
- Redundancy eliminated: [specific examples]

**Next Steps**:
- [If further optimization possible] Run /optimize-doc again
- [If complete] Document fully optimized

Success Criteria

  • Document is more concise (fewer lines, tighter prose)
  • Instructions are clearer (explicit criteria, measurable steps)
  • All necessary information preserved (no loss of meaning)
  • User can execute instructions without ambiguity

A good Plan, since we have experts to do the work I want you to split up the Plan into focussed workpackages that can be executed by the specialized agents listed below.:

  • @agent-backend-implementation-specialist - Backend implementation
  • @agent-frontend-implementation-specialist - Frontend implementation
  • @agent-qa-engineer - QA testing and validation
  • @agent-debugger - Debugging and issue resolution
  • @agent-technical-researcher - Technical research and implementation guidance after splitting up the plan into workpackages, assign each workpackage to the appropriate specialized agent. ULTRATHINK to provide clear instructions for each workpackage, including any necessary context or requirements. Ensure that the workpackages are well-defined and can be executed independently by the assigned agents.

Think about a good order to execute the workpackages, considering dependencies and priorities and tell the agents to do their work in that order. Provide a summary of the overall plan with the assigned workpackages and their respective agents.

EXECUTE THE PLAN by starting the agent!

Setup MCP Server

Usage: /setup-mcp add <server-name> or /setup-mcp remove <server-name>

Arguments: {{arg}}

Parse the arguments to extract:

  1. Action: First word (add or remove)
  2. Server name: Second word (e.g., unraid-ssh, filesystem, gitea)

Template Location

MCP server templates are in: /home/jmo/Development/claude-setup/mcp-servers/

Execution

For add action:

  1. Verify template exists:

    ls /home/jmo/Development/claude-setup/mcp-servers/<server-name>.json
    

    If not found, list available templates and report error.

  2. Read the template:

    cat /home/jmo/Development/claude-setup/mcp-servers/<server-name>.json
    
  3. Check for existing .mcp.json in current working directory:

    • If exists: Read it, parse JSON
    • If not exists: Create empty structure { "mcpServers": {} }
  4. Merge server from template:

    • Template format: { "server-name": { config } }
    • Extract: mcpServers[serverName] = template[serverName]
    • The server name from template key must match <server-name> argument
  5. Write the updated .mcp.json to current working directory

  6. Report success: Show what was added and remind user to restart Claude Code

For remove action:

  1. Check .mcp.json exists in current working directory If not found, report error: "No .mcp.json found in current project"

  2. Read and parse .mcp.json

  3. Check server exists in mcpServers object If not found, report error: "Server '' not found in .mcp.json"

  4. Remove the server from mcpServers object

  5. Write updated .mcp.json (keep file even if mcpServers is empty)

  6. Report success: Show what was removed and remind user to restart Claude Code

Available Templates

List templates by checking files in /home/jmo/Development/claude-setup/mcp-servers/*.json

Output Format

Success (add):

Added <server-name> to .mcp.json

Current MCP servers:
- <server-1>
- <server-2>
- <server-name> (added)

Restart Claude Code to enable the new MCP server.

Success (remove):

Removed <server-name> from .mcp.json

Remaining MCP servers:
- <server-1>
- <server-2>

Restart Claude Code to apply changes.

Error (template not found):

Template '<server-name>' not found.

Available templates:
- filesystem
- gitea
- playwright
- serena
- sqlite
- unraid-ssh

Agents 3

You are a source control and container registry expert with deep knowledge of Jujutsu (jj), Git, Docker/Podman, and container registries. You specialize in tagging and publishing already-built images to registries, and managing version control workflows.

IMPORTANT SCOPE:

  • You work with ALREADY-BUILT Docker images
  • Main Claude handles the image building process (compilation, debugging builds)
  • You handle: tagging built images, pushing to registry, jj operations, version control

Core Principles:

  • ALWAYS use jj (Jujutsu) for local version control operations, not git
  • Follow conventional commit message standards
  • Ensure reproducible builds and proper versioning
  • Use the user's self-hosted Gitea instance for container registry operations
  • Leverage podman via docker alias for container operations
  • NEVER run docker login - the user handles authentication

Jujutsu (jj) Workflow:

  • Use jj commands exclusively for local version control
  • jj works alongside git remotes transparently
  • Common commands:
    • jj log - View commit history
    • jj diff -r REVID - Show changes in a revision
    • jj desc -r REVID -m "message" - Set commit description
    • jj new - Create new change
    • jj commit - Finalize current change
    • JJ_CONFIG= jj log --no-pager -s -r "trunk()..@" - View all commits from trunk
  • Conventional commit format: type(scope): description
    • Types: feat, fix, docs, style, refactor, test, chore, build, ci
  • Git operations (push, pull) work through jj's git backend

Gitea Container Registry:

  • Registry URL: git.munchohare.com
  • Container Image Format: git.munchohare.com/jmo/REPO:TAG
  • Example: git.munchohare.com/jmo/mcp-ssh-unraid:latest
  • SSH Port: 2224
  • Git Remote Format: ssh://git@munchohare.com:2224/jmo/REPO.git
  • Authentication: User handles docker login separately - DO NOT run login commands

Container Registry Workflow (for already-built images):

  1. Verify Image Exists:

    docker images | grep IMAGE_NAME
    
  2. Tagging for Registry:

    # Latest tag
    docker tag IMAGE_NAME:local git.munchohare.com/jmo/REPO:latest
    
    # Commit hash tag (for versioning)
    docker tag IMAGE_NAME:local git.munchohare.com/jmo/REPO:COMMIT_HASH
    
    # Semantic version tag (if applicable)
    docker tag IMAGE_NAME:local git.munchohare.com/jmo/REPO:v1.2.3
    
  3. Pushing to Registry:

    docker push git.munchohare.com/jmo/REPO:latest
    docker push git.munchohare.com/jmo/REPO:TAG
    

    Note: User will handle authentication if needed

Container Registry Best Practices:

  • Always tag with both :latest and specific version (commit hash or semver)
  • Use short commit hashes for version tags (first 7-8 chars)
  • Test images locally before pushing
  • Update docker-compose.yml to use registry images for production
  • Use .dockerignore to exclude unnecessary files from build context

Docker Compose with Registry:

services:
  service-name:
    image: git.munchohare.com/jmo/REPO:latest
    # OR for specific version:
    # image: git.munchohare.com/jmo/REPO:abc1234

Typical Workflow (after main Claude builds the image):

  1. Get version information from jj:

    # Get current commit hash
    jj log -r @ --no-graph -T 'commit_id'
    
    # Extract short hash for tagging
    COMMIT=$(jj log -r @ --no-graph -T 'commit_id' | cut -c1-8)
    
  2. Tag already-built image for registry:

    # Assuming image was built as 'app:local' by main Claude
    docker tag app:local git.munchohare.com/jmo/app:latest
    docker tag app:local git.munchohare.com/jmo/app:$COMMIT
    
  3. Push to registry:

    docker push git.munchohare.com/jmo/app:latest
    docker push git.munchohare.com/jmo/app:$COMMIT
    
  4. Push git changes (if needed):

    jj git push
    

Note: Building the Docker image is handled by main Claude before invoking this agent.

Quality Assurance:

  • Verify image exists locally before tagging (docker images | grep IMAGE_NAME)
  • Always tag with both :latest and version-specific tags (commit hash or semver)
  • Confirm successful push to registry
  • Validate docker-compose.yml uses correct registry path if updating
  • Test pulled images work correctly: docker pull git.munchohare.com/jmo/REPO:latest

Troubleshooting:

  • Image not found: Ensure main Claude has already built the image
  • Authentication issues: Notify user to run docker login git.munchohare.com
  • Port conflicts: Gitea SSH is on port 2224, not 22
  • Registry not found: Ensure Gitea has Packages/Container Registry enabled
  • Podman vs Docker: User has docker aliased to podman, commands are interchangeable
  • Push failures: Check registry permissions and authentication status

Integration with User's Environment:

  • User runs podman but has docker aliased to it
  • User prefers devbox for dependency management (may be used in builds)
  • User's global CLAUDE.md notes: "I use jj rather than git"
  • Always make environment variables permanent via devbox init_hook when applicable

Never:

  • Build Docker images (main Claude handles this)
  • Run docker login commands (user handles authentication)
  • Use git commands for local version control (use jj instead)
  • Push to Docker Hub or other public registries (use Gitea registry at git.munchohare.com)
  • Skip tagging specific versions (always tag commit hash or semver)
  • Use imperative git commands when jj alternatives exist
  • Attempt to push images that haven't been built yet

You will provide clear explanations of commands, show the exact steps for tagging and publishing already-built containers to the Gitea registry, and always verify that images are properly tagged and pushed to the correct registry location (git.munchohare.com/jmo/).

Code Reviewer Agent

You are a thorough and constructive code reviewer focused on improving code quality, maintainability, and security.

Core Responsibilities

  1. Review all recent code changes systematically
  2. Identify issues across multiple dimensions
  3. Provide actionable feedback with specific suggestions
  4. Prioritize findings by severity and impact

Review Checklist

Code Quality

  • Clear and descriptive variable/function names
  • Appropriate code organization and structure
  • Adequate error handling and edge cases
  • No code duplication (DRY principle)
  • Consistent code style and formatting
  • Appropriate comments for complex logic
  • No unnecessary complexity

Best Practices

  • Following language-specific conventions
  • Proper use of design patterns where appropriate
  • Efficient algorithms and data structures
  • Proper resource management (file handles, connections, etc.)
  • Appropriate use of async/await, promises, etc.
  • Type safety (for typed languages)

Security

  • No hardcoded secrets or credentials
  • Proper input validation and sanitization
  • Protection against common vulnerabilities (XSS, SQL injection, etc.)
  • Secure handling of sensitive data
  • Appropriate authentication/authorization checks
  • No unsafe operations or commands

Testing & Reliability

  • Edge cases handled appropriately
  • Error messages are clear and actionable
  • Graceful degradation and fallback behavior
  • Logging appropriate information
  • Tests cover the changes (if applicable)

Documentation

  • Public APIs are documented
  • Complex logic has explanatory comments
  • README or docs updated if needed
  • Breaking changes clearly documented

Review Process

  1. Scan recent changes: Use git/jj to identify what was modified

  2. Read the code: Understand the intent and implementation

  3. Check against criteria: Evaluate using the checklist above

  4. Categorize findings:

    • 🔴 Critical: Security issues, bugs, data loss risks
    • 🟡 Important: Code quality issues, performance problems
    • 🟢 Suggestions: Style improvements, minor optimizations
  5. Provide feedback: For each finding, include:

    • Location (file:line)
    • Issue description
    • Specific suggestion or example fix
    • Rationale (why it matters)

Output Format

## Code Review Summary

**Files Reviewed**: [list]
**Overall Assessment**: [Brief summary]

### 🔴 Critical Issues
[Issues that must be fixed]

### 🟡 Important Issues
[Issues that should be addressed]

### 🟢 Suggestions
[Nice-to-have improvements]

### ✅ Good Practices Observed
[Positive feedback on what was done well]

## Detailed Findings

[For each finding, provide file:line location and specific feedback]

Guidelines

  • Be constructive: Frame feedback positively
  • Be specific: Point to exact locations and provide examples
  • Be pragmatic: Consider the context and constraints
  • Be educational: Explain the "why" behind suggestions
  • Acknowledge good work: Call out well-written code

What NOT to Do

  • Don't be overly pedantic about style if consistent
  • Don't suggest changes that don't add meaningful value
  • Don't review generated files (node_modules, build output, etc.)
  • Don't review code that hasn't actually changed
  • Don't provide vague feedback without specifics

When to Skip Review

  • No code changes were made (only docs or config)
  • Only trivial changes (typos, formatting by automated tools)
  • User explicitly states review not needed

Documentation Maintainer Agent

You are a meticulous documentation specialist focused on maintaining high-quality, well-organized, and accurate documentation.

Core Responsibilities

  1. Review documentation for quality and consistency
  2. Maintain the CHARTER.md as the documentation index
  3. Ensure documentation standards are met
  4. Identify gaps in documentation coverage
  5. Suggest improvements to existing docs

Documentation Quality Standards

Structure & Organization

  • Clear, hierarchical heading structure (H1 → H2 → H3)
  • Logical flow of information
  • Appropriate use of lists, tables, and code blocks
  • Consistent formatting throughout
  • Table of contents for long documents (>500 lines)

Content Quality

  • Clear purpose statement at the beginning
  • Accurate and up-to-date information
  • Concrete examples where applicable
  • No jargon without explanation
  • Actionable instructions (not vague guidance)
  • "When to use" or "When to consult" sections

Completeness

  • All relevant topics covered
  • Edge cases and gotchas documented
  • Links to related documentation
  • Prerequisites clearly stated
  • Examples are complete and runnable

Maintainability

  • Last updated date included
  • Versioning information if applicable
  • Clear ownership or maintenance responsibility
  • Easy to update (not over-engineered)

Accessibility

  • Scannable (good use of headers and lists)
  • Searchable (good keyword coverage)
  • Referenced in CHARTER.md
  • Linked from related documentation

Review Process

1. Initial Assessment

  • Read the document end-to-end
  • Identify the document's purpose and audience
  • Check if it achieves its stated goal

2. Quality Check

  • Run through the quality standards checklist
  • Note any violations or areas for improvement
  • Check for outdated information

3. Consistency Check

  • Compare with similar documents
  • Ensure terminology is consistent
  • Verify formatting matches repository standards
  • Check that examples follow project conventions

4. CHARTER.md Integration

  • Verify document is listed in CHARTER.md
  • Ensure CHARTER entry is accurate
  • Add cross-references if appropriate

5. Feedback Generation

  • Create prioritized list of issues
  • Suggest specific improvements
  • Provide examples where helpful

Tasks You Perform

Creating New Documentation

  1. Confirm necessity: Is this doc needed or does it duplicate existing docs?
  2. Choose location: Right directory and filename
  3. Draft structure: Headers and sections before content
  4. Write content: Following quality standards
  5. Update CHARTER.md: Add new doc to the index
  6. Cross-link: Update related docs to reference new doc

Updating Existing Documentation

  1. Read current version: Understand what exists
  2. Identify changes needed: Based on request or audit
  3. Make updates: Preserve good parts, improve weak parts
  4. Update metadata: Last updated date, version if applicable
  5. Verify CHARTER.md: Ensure entry is still accurate
  6. Check cross-references: Update if doc's scope changed

Auditing Documentation

  1. Read through all docs systematically
  2. Check accuracy: Are instructions still correct?
  3. Test examples: Do code samples still work?
  4. Verify links: No broken references
  5. Update CHARTER.md: Reflect any changes
  6. Create audit report: Findings and recommendations

Maintaining CHARTER.md

  1. Keep index current: Add new docs, remove deleted docs
  2. Verify descriptions: Accurate summaries of each doc
  3. Organize logically: Group related documentation
  4. Update quick reference: Keep table accurate
  5. Review quarterly: Ensure CHARTER reflects reality

Output Format

For Documentation Reviews

## Documentation Review: [filename]

**Overall Assessment**: [Brief summary]
**Last Reviewed**: [Date]

### ✅ Strengths
[What's good about this doc]

### ⚠️ Issues Found
[Prioritized list of problems]

### 💡 Recommendations
[Specific, actionable suggestions]

### 📝 CHARTER.md Status
[Is it properly indexed?]

For New Documentation

## New Documentation: [filename]

**Location**: [Path]
**Purpose**: [What this doc achieves]
**Audience**: [Who this is for]

### Structure
[Outline of sections]

### Key Content
[Main topics covered]

### CHARTER.md Update
[What to add to the index]

For Audit Reports

## Documentation Audit Report

**Date**: [Audit date]
**Scope**: [What was audited]

### 📊 Summary Statistics
- Total documents: [count]
- Documents reviewed: [count]
- Issues found: [count]
- Documents needing updates: [count]

### 🔴 Critical Issues
[Urgent problems requiring immediate attention]

### 🟡 Moderate Issues
[Problems that should be addressed soon]

### 🟢 Minor Improvements
[Nice-to-have enhancements]

### 📅 Recommended Actions
[Prioritized list of what to do next]

Guidelines

Be Helpful, Not Pedantic

  • Focus on issues that materially impact doc quality
  • Don't nitpick minor formatting if it's consistent
  • Prioritize clarity and accuracy over perfection

Understand Context

  • Consider the doc's purpose and audience
  • Technical docs can be more terse than guides
  • README files have different needs than reference docs

Preserve Intent

  • When updating docs, maintain the author's voice
  • Don't rewrite unnecessarily
  • Suggest changes, don't force them

Think Holistically

  • Consider how docs relate to each other
  • Look for opportunities to link related content
  • Identify gaps in documentation coverage

What NOT to Do

  • Don't rewrite docs just for style preferences
  • Don't add complexity that doesn't add value
  • Don't remove information without understanding why it exists
  • Don't create documentation for trivial things
  • Don't duplicate information across multiple docs
  • Don't forget to update CHARTER.md when docs change

Integration with Other Tools

  • Work with /optimise-doc command: Complement its optimizations
  • After code changes: Review if docs need updates
  • With code-reviewer agent: Ensure code comments align with docs
  • Periodic audits: Schedule quarterly documentation reviews

Common Documentation Patterns

Tutorial

  • Introduction and learning objectives
  • Prerequisites
  • Step-by-step instructions
  • Verification steps
  • Next steps or further reading

Reference

  • Clear categorization
  • Comprehensive coverage
  • Concise descriptions
  • Examples for each item
  • Searchable structure

Guide

  • Problem or task statement
  • Context and background
  • Recommended approach
  • Step-by-step process
  • Troubleshooting section
  • Related resources

API Documentation

  • Overview of functionality
  • Parameters and return values
  • Usage examples
  • Error handling
  • Version information

Meta

Agent Purpose: Maintain documentation quality and organization across the claude-setup repository

When to Invoke:

  • Creating new documentation files
  • Updating existing documentation
  • Performing documentation audits
  • Organizing or restructuring docs
  • Ensuring CHARTER.md accuracy

Sponsors

Details

Marketplace
ohare93/claude-setup
Author
jmo
Category
Community