# AI use cases for Align Ledger (znxzsy/AlignLedger)

Repo: [znxzsy/AlignLedger](https://github.com/znxzsy/AlignLedger) | Use cases: 4 | Page: https://dedupedai.com/use-cases/znxzsy-alignledger/

AlignLedger is a small Python and SQLite system for auditable human-feedback annotation, review, provenance tracking, and frozen training-data export.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run a local annotation demo to see review workflow: https://dedupedai.com/use-cases/znxzsy-alignledger/run-local-annotation-demo/
- Import your own model outputs for team review: https://dedupedai.com/use-cases/znxzsy-alignledger/import-own-model-outputs-for-review/
- Run a shared annotation team with invite-bound identities: https://dedupedai.com/use-cases/znxzsy-alignledger/run-shared-annotation-team-with-invites/
- Verify a frozen export before training on it: https://dedupedai.com/use-cases/znxzsy-alignledger/verify-frozen-training-export/

## How to run a local annotation demo to see review workflow with Align Ledger

Repo: [znxzsy/AlignLedger](https://github.com/znxzsy/AlignLedger) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Start the synthetic annotation server and check completed, corrected, and unresolved records in one command.

**Who it is for:** An ML engineer or team lead who wants to see how Align Ledger handles annotation, review, and adjudication before adopting it.

**The problem:** Judging a labeling tool from its description alone does not show how versioned writes, second-pass review, and unresolved corrections behave.

**The outcome:** A running local server at http://127.0.0.1:18068 with 12 synthetic groups covering complete, partial, corrected, and unknown records.

### Steps

1. Clone the repository with `git clone https://github.com/znxzsy/AlignLedger.git`
2. Enter the folder with `cd AlignLedger`
3. Start the demo with `./scripts/run_demo.sh`
4. Open http://127.0.0.1:18068 in a browser and review the synthetic groups
5. Check that records appear in the accepted, corrected, and unresolved pools

### Prompt to paste into your agent

```text
In the AlignLedger repo (https://github.com/znxzsy/AlignLedger), clone it, run ./scripts/run_demo.sh, and confirm that http://127.0.0.1:18068 responds. Report the number of synthetic groups shown and whether unresolved records are listed separately from accepted ones.
```

### Caveat

The local demo runs with authentication disabled and uses only synthetic records, so it is not a setup for real annotator data.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/znxzsy-alignledger/run-local-annotation-demo/

## How to import your own model outputs for team review with Align Ledger

Repo: [znxzsy/AlignLedger](https://github.com/znxzsy/AlignLedger) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Load details_*.json shards into a registry and database so reviewers can correct and adjudicate them.

**Who it is for:** A data lead preparing RLHF or SFT annotation batches from their own model outputs and image references.

**The problem:** Raw model output scattered across files has no version history, reviewer identity, or record-level status, so corrections cannot be traced.

**The outcome:** An imported manifest and source registry, plus a server reading a SQLite database with an audit log for each review action.

### Steps

1. Place your details_*.json shards in a folder such as ./my-details
2. Run `python -m annotation_platform.importer --details-dir ./my-details --output-dir ./runtime/imported` (inferred, check the README)
3. Check the generated manifest in ./runtime/imported for source hashes before starting review
4. Start the server with `python -m annotation_platform.server --registry ./runtime/imported/source_groups.jsonl --db ./runtime/review.sqlite3 --audit ./runtime/audit.jsonl` (inferred, check the README)
5. Open the local server page and run random review or batch review on the imported records

### Prompt to paste into your agent

```text
Using the AlignLedger repo at <path to repo>, import the shards in <details folder> with annotation_platform.importer and then start the server on the generated source_groups.jsonl. Report how many records the importer accepted and how many it rejected, and state the reason for each rejection.
```

### Caveat

The importer rejects unsafe local image paths and invalid structure, so messy shards will need cleanup before they import.

Risk, credentials: Keep the runtime folder, audit log, and database outside Git, since the README says they must not be committed.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/znxzsy-alignledger/import-own-model-outputs-for-review/

## How to run a shared annotation team with invite-bound identities with Align Ledger

Repo: [znxzsy/AlignLedger](https://github.com/znxzsy/AlignLedger) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Enable authentication, generate one-time invite codes, and give each annotator a bound identity.

**Who it is for:** A project owner running a labeling round with several annotators who each need attributable decisions.

**The problem:** Shared labeling without identity binding makes it impossible to say who changed a label, and a stale browser can silently overwrite a newer decision.

**The outcome:** A shared server with authentication required, invite codes that bind to a name on first use, and reviewer attribution on every write.

### Steps

1. Create the folders with `mkdir -p secrets runtime`
2. Generate a session secret with `python -c 'import secrets; print(secrets.token_hex(32))' > secrets/session-secret`
3. Generate one-time invites with `python scripts/generate_invites.py --count 30`
4. Export the variables `ANNOTATION_AUTH_REQUIRED=1`, `ANNOTATION_SESSION_SECRET_FILE=secrets/session-secret`, and `ANNOTATION_COOKIE_SECURE=1`
5. Start the server with `./scripts/run_demo.sh` and send each annotator one invite from runtime/invites.txt

### Prompt to paste into your agent

```text
In the AlignLedger repo at <repo path>, follow the shared deployment section to create a session secret and 30 invite codes without printing the codes into logs. Confirm that the server requires authentication and report the number of invite codes created, not their values.
```

### Caveat

The README describes the server storing only invite hashes, but it does not describe a hosting setup, so you must provide your own secure deployment environment.

Risk, credentials: runtime/invites.txt holds plaintext invite codes and the session secret must stay private, so keep both out of Git and out of shared chats.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/znxzsy-alignledger/run-shared-annotation-team-with-invites/

## How to verify a frozen export before training on it with Align Ledger

Repo: [znxzsy/AlignLedger](https://github.com/znxzsy/AlignLedger) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Check the manifest, SHA256, and FROZEN_OK marker on a frozen export before it reaches a training pipeline.

**Who it is for:** An ML engineer who must prove that the labels used for an RLHF, SFT, or DPO run were final and unchanged.

**The problem:** A training dataset without provenance can be altered or contain unresolved corrections, which makes results hard to reproduce or defend.

**The outcome:** A confirmed frozen export whose manifest and SHA256 values match, with the FROZEN_OK marker present, and unresolved corrections kept out.

### Steps

1. Locate the frozen export folder produced by the server's export feature (inferred, check the README)
2. Open the manifest file in that folder and note the listed SHA256 values (inferred, check the README)
3. Recompute the SHA256 of each exported file with a standard tool such as `sha256sum <file>` (inferred, check the README)
4. Confirm that the FROZEN_OK marker is present in the export
5. Compare the export contents against the audit log to confirm no unresolved records were included

### Prompt to paste into your agent

```text
In the AlignLedger repo at <repo path>, locate the frozen export in <export folder>, read its manifest, and recompute the SHA256 of each listed file. Report whether every hash matches and whether FROZEN_OK is present, and flag any mismatch.
```

### Caveat

The README names the export manifest, SHA256 values, and FROZEN_OK marker but does not give the export command, so the export step must be taken from the repository code.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/znxzsy-alignledger/verify-frozen-training-export/
