Skip to content

Commit 58ffe72

Browse files
Frank Guoclaude
andcommitted
fix: rename module and URLs from rekal-dev/cli to rekal-dev/rekal-cli
Update Go module path, GitHub API URLs, install script, README, docs, goreleaser, and release workflow to match the renamed repo. Also fix LFS checkout in release workflow for macOS runners. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c17707c commit 58ffe72

26 files changed

Lines changed: 135 additions & 41 deletions

.claude/skills/rekal/SKILL.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
name: rekal
3+
description: |
4+
Use this skill when working in a repo with Rekal initialized (.rekal/ exists).
5+
Rekal gives you memory of prior AI sessions — who changed what, why, and when.
6+
Start with `rekal "keyword"` to search, then drill into sessions with
7+
`rekal query --session <id>`. Run `rekal <command> --help` for full details.
8+
---
9+
10+
# Rekal — Session Memory
11+
12+
Rekal captures AI coding sessions (conversation turns, tool calls, file changes) and stores them in a local DuckDB database. Use it to understand prior context before modifying code.
13+
14+
## When to Use
15+
16+
- Before modifying a file — check what prior sessions touched it
17+
- When you need context about why code looks the way it does
18+
- When the user asks about prior session history
19+
- When working on files that were recently changed by AI agents
20+
21+
## Workflow
22+
23+
### 1. Search — find relevant sessions
24+
25+
```bash
26+
rekal "JWT expiry" # keyword search (BM25 + LSA hybrid)
27+
rekal --file src/auth/ "token refresh" # filter by file path (regex)
28+
rekal --actor agent "migration" # filter by actor type
29+
rekal --author alice@co.com "billing" # filter by author
30+
rekal -n 5 "error handling" # limit results
31+
```
32+
33+
Output is scored JSON with session IDs, snippets, and metadata.
34+
35+
### 2. Drill down — progressive context loading
36+
37+
Always start small to minimize token cost, then load more only when needed.
38+
39+
```bash
40+
# Step 1: Start with human turns only — understand the intent cheaply
41+
rekal query --session 01JNQX... --role human
42+
43+
# Step 2: If you need more detail, fetch a small page around a relevant turn
44+
# (search results include turn indices — use them as offset)
45+
rekal query --session 01JNQX... --offset 5 --limit 5
46+
47+
# Step 3: Only fetch full output when you actually need tool calls and files
48+
rekal query --session 01JNQX... --full
49+
```
50+
51+
Output includes `total_turns`, `offset`, `limit`, and `has_more` for navigation.
52+
53+
Do NOT load all turns or use `--full` by default. The search results from step 1 give you
54+
enough context to decide what slice to load next.
55+
56+
### 3. Raw SQL — for edge cases
57+
58+
```bash
59+
rekal query "SELECT id, user_email, branch FROM sessions ORDER BY captured_at DESC LIMIT 5"
60+
rekal query --index "SELECT * FROM file_cooccurrence WHERE file_a LIKE '%auth%' ORDER BY count DESC"
61+
```
62+
63+
Run `rekal query --help` for the full data DB and index DB schemas.
64+
65+
## Filters (root command)
66+
67+
| Flag | Description |
68+
|------|-------------|
69+
| `--file <regex>` | Filter by file path (regex, git-root-relative) |
70+
| `--commit <sha>` | Filter by git commit SHA |
71+
| `--author <email>` | Filter by author email |
72+
| `--actor <human\|agent>` | Filter by actor type |
73+
| `-n`, `--limit <n>` | Max results (default: 20, 0 = no limit) |
74+
75+
## Self-Service
76+
77+
Run `rekal <command> --help` for detailed help on any command, including
78+
the full DB schemas (`rekal query --help`).
79+
80+
## Guidelines
81+
82+
- Search before modifying files that have prior session history
83+
- Start with `rekal "keyword"` — only drop to raw SQL when the search workflow doesn't cover your need
84+
- Human turns contain the intent; assistant turns contain the reasoning
85+
- `actor_type` distinguishes human-initiated sessions from automated agent sessions
86+
- Join `turns` with `tool_calls` via `session_id` to get context around file changes

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ jobs:
4747
- uses: actions/checkout@v4
4848
with:
4949
fetch-depth: 0
50-
lfs: true
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Fetch LFS objects
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
run: |
56+
git lfs install
57+
git lfs fetch origin "${{ github.ref }}"
58+
git lfs checkout
5159
5260
- uses: jdx/mise-action@v3
5361

@@ -69,7 +77,7 @@ jobs:
6977
GOARCH: ${{ matrix.goarch }}
7078
run: |
7179
VERSION="${GITHUB_REF_NAME#v}"
72-
go build -ldflags "-s -w -X github.com/rekal-dev/cli/cmd/rekal/cli.Version=${VERSION}" \
80+
go build -ldflags "-s -w -X github.com/rekal-dev/rekal-cli/cmd/rekal/cli.Version=${VERSION}" \
7381
-o rekal ./cmd/rekal
7482
7583
- name: Create archive

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ builds:
2020
- arm64
2121
ldflags:
2222
- -s -w
23-
- -X github.com/rekal-dev/cli/cmd/rekal/cli.Version={{.Version}}
23+
- -X github.com/rekal-dev/rekal-cli/cmd/rekal/cli.Version={{.Version}}
2424

2525
archives:
2626
- formats:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The full version: [SOUL.md](SOUL.md).
4141
Install:
4242

4343
```bash
44-
curl -fsSL https://raw.githubusercontent.com/rekal-dev/cli/main/scripts/install.sh | bash
44+
curl -fsSL https://raw.githubusercontent.com/rekal-dev/rekal-cli/main/scripts/install.sh | bash
4545
```
4646

4747
Default location: `~/.local/bin`. Override with `--target <dir>` or `REKAL_INSTALL_DIR`.
@@ -227,7 +227,7 @@ Search stays under 200ms at 14k turns.
227227
## Development
228228

229229
```bash
230-
git clone https://github.com/rekal-dev/cli.git rekal-cli
230+
git clone https://github.com/rekal-dev/rekal-cli.git rekal-cli
231231
cd rekal-cli
232232
mise install
233233
```
@@ -241,7 +241,7 @@ rekal --help
241241
rekal <command> --help
242242
```
243243

244-
Issues: [github.com/rekal-dev/cli/issues](https://github.com/rekal-dev/cli/issues)
244+
Issues: [github.com/rekal-dev/rekal-cli/issues](https://github.com/rekal-dev/rekal-cli/issues)
245245

246246
## License
247247

cmd/rekal/cli/checkpoint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"time"
1414

1515
"github.com/oklog/ulid/v2"
16-
"github.com/rekal-dev/cli/cmd/rekal/cli/db"
17-
"github.com/rekal-dev/cli/cmd/rekal/cli/session"
16+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/db"
17+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/session"
1818
"github.com/spf13/cobra"
1919
)
2020

cmd/rekal/cli/export.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"strings"
77
"time"
88

9-
"github.com/rekal-dev/cli/cmd/rekal/cli/codec"
10-
"github.com/rekal-dev/cli/cmd/rekal/cli/db"
9+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/codec"
10+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/db"
1111
)
1212

1313
// exportNewFrames reads existing wire format from the orphan branch, appends

cmd/rekal/cli/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"time"
88

99
"github.com/oklog/ulid/v2"
10-
"github.com/rekal-dev/cli/cmd/rekal/cli/codec"
11-
"github.com/rekal-dev/cli/cmd/rekal/cli/db"
10+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/codec"
11+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/db"
1212
)
1313

1414
// importBranch decodes wire format from an orphan branch and imports

cmd/rekal/cli/index_cmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"io"
77
"strconv"
88

9-
"github.com/rekal-dev/cli/cmd/rekal/cli/db"
10-
"github.com/rekal-dev/cli/cmd/rekal/cli/lsa"
11-
"github.com/rekal-dev/cli/cmd/rekal/cli/nomic"
9+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/db"
10+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/lsa"
11+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/nomic"
1212
"github.com/spf13/cobra"
1313
)
1414

cmd/rekal/cli/init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"path/filepath"
88
"strings"
99

10-
"github.com/rekal-dev/cli/cmd/rekal/cli/codec"
11-
"github.com/rekal-dev/cli/cmd/rekal/cli/db"
12-
"github.com/rekal-dev/cli/cmd/rekal/cli/skill"
10+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/codec"
11+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/db"
12+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/skill"
1313
"github.com/spf13/cobra"
1414
)
1515

cmd/rekal/cli/integration_test/checkpoint_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"strings"
1212
"testing"
1313

14-
"github.com/rekal-dev/cli/cmd/rekal/cli/codec"
15-
"github.com/rekal-dev/cli/cmd/rekal/cli/session"
14+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/codec"
15+
"github.com/rekal-dev/rekal-cli/cmd/rekal/cli/session"
1616
)
1717

1818
const testSessionJSONL = `{"type":"summary","sessionId":"test-session-001","totalCost":0.05,"totalDuration":120}

0 commit comments

Comments
 (0)