Skip to content

Commit a9b0305

Browse files
authored
Merge pull request #46 from aridyckovsky/feat/json-checkpoints
feat(core,cli): time-series checkpoint persistence with delta computation
2 parents c53c9b5 + a009f13 commit a9b0305

34 files changed

Lines changed: 4424 additions & 1478 deletions

.changeset/checkpoint-cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect-migrate/cli": minor
3+
---
4+
5+
Add checkpoints command for audit history navigation. New subcommands: list (show history with deltas), latest (show most recent), show (display specific checkpoint), and diff (compare two checkpoints). Supports --json flag for machine-readable output.

.changeset/checkpoint-core.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect-migrate/core": minor
3+
---
4+
5+
Add time-series checkpoint persistence with Time and ProcessInfo services. New checkpoint manager provides automatic thread linking via AMP_CURRENT_THREAD_ID, delta computation between audits, and manifest-based history navigation. Checkpoints use normalized FindingsGroup schema for 40-70% size reduction. New services enable testable date/time and environment variable access.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@
7474

7575
// Insert final newline
7676
"files.insertFinalNewline": true
77-
}
77+
}

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ It's co-authored by maintainers and [Amp](https://ampcode.com): the tool surface
3333
- 🔍 **Pattern Detection** — Identify legacy `async`/`await`, `Promise`, and error handling patterns
3434
- 🏗️ **Boundary Enforcement** — Maintain clean separation between Effect and legacy code
3535
- 🤖 **Amp Context Generation** — Writes `index.json`, `audit.json`, `threads.json` for agent ingestion
36+
- 📊 **Time-Series Checkpoints** — Track migration progress with automatic snapshots and delta computation
3637
- 🔗 **Thread Continuity** — Track relevant Amp threads with `thread add` to resume work with `read-thread`
3738
- 📎 **@-mentions First** — Reference `@.amp/effect-migrate/index.json` to load the whole context
3839
- 🔧 **TypeScript SDK Friendly** — Drive programmatic workflows via Amp's TypeScript SDK
@@ -205,7 +206,8 @@ effect-migrate audit --amp-out .amp/effect-migrate
205206
**Generated files:**
206207

207208
- `index.json` — Entry point referencing all context files
208-
- `audit.json` — Detailed violations per file with rule documentation
209+
- `audit.json` — Latest audit snapshot (symlink to checkpoint)
210+
- `checkpoints/` — Time-series audit history with deltas
209211
- `threads.json` — Tracked Amp threads for migration history
210212
- `metrics.json` — Metrics for the migration process
211213

@@ -222,7 +224,20 @@ effect-migrate thread add \
222224
effect-migrate thread list
223225
```
224226

225-
### 5. Use Context in Amp
227+
### 5. View Checkpoint History
228+
229+
```bash
230+
# List audit checkpoints with deltas
231+
effect-migrate checkpoints list
232+
233+
# Show latest checkpoint
234+
effect-migrate checkpoints latest
235+
236+
# Compare two checkpoints
237+
effect-migrate checkpoints diff 2025-11-08T10-00-00Z 2025-11-08T11-30-00Z
238+
```
239+
240+
### 6. Use Context in Amp
226241

227242
In your Amp thread:
228243

@@ -435,6 +450,8 @@ See [Amp TypeScript SDK documentation](https://ampcode.com/docs/sdk) for more ex
435450
- Audit command with console and JSON output
436451
- Amp context generation (`index.json`, `audit.json`, `threads.json`)
437452
- Thread tracking (`thread add`, `thread list`)
453+
- Checkpoint system with time-series audit history
454+
- Delta computation between consecutive audits
438455
- Preset loading and rule merging
439456
- Metrics command for migration progress tracking
440457

@@ -446,9 +463,9 @@ See [Amp TypeScript SDK documentation](https://ampcode.com/docs/sdk) for more ex
446463

447464
**Near-term:**
448465

466+
- [x] Migration context checkpoints with time-series history and delta computation
449467
- [ ] Documentation validation (`docs` command)
450468
- [ ] Expanded preset coverage (more pattern and boundary rules)
451-
- [ ] Migration context checkpoints with compression and revision history
452469
- [ ] Simple metrics monitoring/analytics for migration progress
453470

454471
**Medium-term:**

0 commit comments

Comments
 (0)