docs: align development docs with codebase behavior

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-14 21:08:37 +00:00
1 parent f27929746e
commit 3748bbfc98
4 files changed
+89 -3

No files matched your search

+28
View File
@@ -26,10 +26,38 @@ AGENT_PLATFORM=codex npx --no-install torch-lock lock --agent docs-agent --caden
# List all active locks
npx --no-install torch-lock list
# Mark a task as completed (permanent)
AGENT_PLATFORM=codex npx --no-install torch-lock complete --agent docs-agent --cadence daily
# Initialize TORCH in a new repository
npx --no-install torch-lock init
# Update TORCH configuration and scripts
npx --no-install torch-lock update
# Run the Dashboard
npx --no-install torch-lock dashboard
```
### Memory CLI
The `torch-lock` CLI also supports memory operations:
```bash
# List memories (optional filters: --agent, --type, --tags, --pinned)
npx --no-install torch-lock list-memories --limit 5
# Inspect a specific memory
npx --no-install torch-lock inspect-memory --id <memory-id>
# Pin/Unpin a memory
npx --no-install torch-lock pin-memory --id <memory-id>
npx --no-install torch-lock unpin-memory --id <memory-id>
# Check memory stats
npx --no-install torch-lock memory-stats
```
### Configuration (`torch-config.json`)
Create a `torch-config.json` file in your project root to configure TORCH for your repository. You can use the included `torch-config.example.json` as a template.
+33
View File
@@ -0,0 +1,33 @@
# Documentation Alignment Report
**Agent:** docs-alignment-agent
**Date:** 2026-02-14
## Audit Summary
A comprehensive audit of the repository documentation (`README.md`, `src/docs/TORCH.md`) was performed against the codebase (`bin/torch-lock.mjs`, `src/lib.mjs`, `src/ops.mjs`, `src/torch-config.mjs`).
The audit revealed that while the core locking commands were documented, several administrative and new commands (init, update, complete, memory operations) were missing from the primary documentation.
## Claims Map
| Claim / Feature | Source Doc | Code Implementation | Status | Notes |
| :--- | :--- | :--- | :--- | :--- |
| `check` command | `README.md` | `bin/torch-lock.mjs` | ✅ Matches | Correctly documented. |
| `lock` command | `README.md` | `bin/torch-lock.mjs` | ✅ Matches | Correctly documented. |
| `list` command | `README.md` | `bin/torch-lock.mjs` | ✅ Matches | Correctly documented. |
| `dashboard` command | `README.md` | `bin/torch-lock.mjs` | ✅ Matches | Correctly documented. |
| `complete` command | `README.md` | `src/lib.mjs` (cmdComplete) | ⚠️ Missing | **Fixed:** Added usage example. |
| `init` command | `README.md` | `src/ops.mjs` (cmdInit) | ⚠️ Missing | **Fixed:** Added usage example. |
| `update` command | `README.md` | `src/ops.mjs` (cmdUpdate) | ⚠️ Missing | **Fixed:** Added usage example. |
| Memory CLI | `README.md` | `bin/torch-lock.mjs` | ⚠️ Missing | **Fixed:** Added `list-memories`, `inspect-memory`, etc. |
| Quick Start | `src/docs/TORCH.md` | `bin/torch-lock.mjs` | ⚠️ Outdated | **Fixed:** Updated `node src/nostr-lock.mjs` to `npx torch-lock`. |
| Configuration | `README.md` | `src/torch-config.mjs` | ✅ Matches | Config keys align with implementation. |
## Validation Notes
- **Verification Method:** Static code analysis of `bin/torch-lock.mjs` arg parsing and `src/lib.mjs` / `src/ops.mjs` function signatures compared against documentation text.
- **Updates Applied:**
- `README.md`: Added `complete`, `init`, `update` commands and Memory CLI section.
- `src/docs/TORCH.md`: Updated outdated command examples to use the `npx torch-lock` convention.
## Recommendations
- Future updates to the CLI should include a documentation update step in the PR checklist.
- Consider auto-generating the CLI usage section from the `bin/torch-lock.mjs` help text (output of `usage()`) to ensure perfect synchronization.
+3 -3
View File
@@ -6,13 +6,13 @@ TORCH is a decentralized task-locking protocol for multi-agent software developm
```bash
# Check active locks
node src/nostr-lock.mjs check --cadence daily
npx torch-lock check --cadence daily
# Claim a task
AGENT_PLATFORM=codex node src/nostr-lock.mjs lock --agent docs-agent --cadence daily
AGENT_PLATFORM=codex npx torch-lock lock --agent docs-agent --cadence daily
# List all active locks
node src/nostr-lock.mjs list
npx torch-lock list
```
## Defaults
@@ -0,0 +1,25 @@
---
agent: docs-alignment-agent
status: completed
date: 2026-02-14
---
# Docs Alignment Report
## Summary
Audited `README.md` and `src/docs/TORCH.md` against the codebase.
Identified missing documentation for:
- `complete` command
- `init` command
- `update` command
- Memory CLI commands
## Actions
- Updated `README.md` to include usage examples for the missing commands.
- Updated `src/docs/TORCH.md` to replace outdated `node src/nostr-lock.mjs` examples with `npx torch-lock`.
- Created `artifacts/docs-alignment-report.md` with a detailed claims map.
## Validation
- Verified updates by reading the files.
- Verified linting passed.
- Published completion event.