Replace legacy scripts with separated ots/node hooks

- Remove deprecated scripts/ directory (6 files)
- Add hooks/post-commit-ots (ots CLI version)
- Add hooks/pre-commit-ots (ots CLI backfill)
- Add hooks/post-commit-node (Node.js version, local proofs only)
- Add hooks/pre-commit-node (Node.js backfill, no upgrade)
- Update hooks/install.sh to auto-detect and install matching hooks
- Update documentation (SKILL.md, README.md, AGENTS.md)
- Add node_modules/ to .gitignore for Node.js mode

Breaking change: Scripts removed, use new hooks/ directory.
This commit is contained in:
Otto 2026-03-08 00:38:43 +01:00
parent eec64d16c6
commit b1e305d831
14 changed files with 484 additions and 616 deletions

View file

@ -13,14 +13,12 @@ Proofs are stored in `.ots/` and can be versioned alongside your code for tamper
## Quick Install
### Recommended: Self-Contained Hooks
```bash
# Clone or download this skill
git clone <repository-url>
cd git-ots-hook
# Install both hooks (single command)
# Install both hooks (auto-detects ots CLI or Node.js)
./hooks/install.sh /path/to/your/repo
# Commit the proofs
@ -31,31 +29,32 @@ git commit -m "Add OpenTimestamp proofs"
That's it! The hooks are now installed and will automatically timestamp every commit.
### Legacy: Script-Based Installation
The older `scripts/` directory is still available but deprecated. See `SKILL.md` for details.
## Manual Installation
If you prefer to install hooks manually without the installer:
### 1. Copy Hook Files
### For ots CLI (Recommended)
```bash
cp hooks/post-commit /path/to/your/repo/.git/hooks/
cp hooks/pre-commit /path/to/your/repo/.git/hooks/
chmod +x /path/to/your/repo/.git/hooks/post-commit
chmod +x /path/to/your/repo/.git/hooks/pre-commit
cp hooks/post-commit-ots .git/hooks/post-commit
cp hooks/pre-commit-ots .git/hooks/pre-commit
chmod +x .git/hooks/post-commit .git/hooks/pre-commit
```
### 2. Setup .gitignore
### For Node.js (Local proofs only)
```bash
cp hooks/post-commit-node .git/hooks/post-commit
cp hooks/pre-commit-node .git/hooks/pre-commit
chmod +x .git/hooks/post-commit .git/hooks/pre-commit
```
### Setup .gitignore
Add to your `.gitignore`:
```
.ots/.attestation-cache
node_modules/
```
### 3. Commit Initial Proofs
### Commit Initial Proofs
```bash
git add .ots/