Metadata-Version: 2.4
Name: jig-build
Version: 2026.6.28
Summary: Operator knowledge compiler for agentic systems
License-Expression: LicenseRef-Proprietary
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: keyring>=24.0
Requires-Dist: watchdog>=4.0
Description-Content-Type: text/markdown

# jig-build

Sync client for [Jig](https://jig.build) — watches how you work with Claude Code, learns your patterns, and feeds them back into your harness as rules, corrections, and memory.

## Install

**Homebrew (macOS):**

```bash
brew tap peanut-butter-tucker/tap
brew install jig-build
```

**pip:**

```bash
pip install jig-build
```

Requires Python 3.11+.

## Quickstart

### 1. Initialize

```bash
jig-build init
```

This opens your browser to authenticate, installs session hooks into Claude Code, and runs the first sync. You'll see a summary of what was set up.

### 2. Use Claude Code normally

Work as you usually do. jig-build records your sessions locally — prompts, tool calls, and timestamps are saved as JSONL files on your machine.

### 3. Review insights

After a few sessions, jig analyzes your patterns and surfaces insight candidates:

```bash
jig-build insights
```

You'll see corrections (things you repeatedly fix) and patterns (consistent behaviors) that jig detected.

### 4. Promote or dismiss

Accept an insight to add it to your harness:

```bash
jig-build promote jig-rules/always-run-tests
```

Or dismiss one you don't want:

```bash
jig-build dismiss jig-patterns/verbose-logging
```

### 5. Check health

```bash
jig-build status
```

Shows hook installation state, session count, pending insights, and server connectivity.

## Privacy

**What stays on your machine:**
- Session recordings (JSONL files)
- Analysis database

Raw session data never leaves your machine.

**What syncs to the server:**
- Harness snapshots (your `~/.claude/` structure)
- Insight candidates (patterns and corrections found in your sessions)

## Commands

| Command | Description |
|---------|-------------|
| `init` | Authenticate, install hooks, first sync |
| `push` | Upload harness changes to the server |
| `pull` | Fetch server profile and apply locally |
| `status` | Show sync health and activity |
| `daemon` | Background watcher + auto-sync |
| `analyze` | Run cross-session pattern analysis |
| `insights` | List insight candidates for review |
| `promote <path>` | Accept an insight into your harness |
| `dismiss <path>` | Reject an insight candidate |

## Troubleshooting

**Hooks not installed:** Re-run `jig-build init` — it reinstalls hooks idempotently.

**Authentication expired:** Re-run `jig-build init` to re-authenticate.

**Server unreachable:** Check `jig-build status`. If the server is down, your sessions are still recorded locally; harness changes and insights will be pushed when it's back.

**No insights after many sessions:** Run `jig-build analyze` manually to trigger analysis outside the automatic 5-session cycle.
