| name | wiki-review-queue |
| description | Review candidate queue for wiki-pipeline Phase 1B gate — stores scored article candidates in ~/.wiki-review-queue.json with content dedup, TTL expiry, and reject cache. CLI: review-queue.mjs. |
| version | 2.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["wiki","review-queue","pipeline","candidates","phase1b"],"category":"wiki","related_skills":["wiki-pipeline","web-content-reviewer","llm-wiki"]}} |
Wiki Review Queue v2
Persistent review candidate queue for the wiki-pipeline Phase 1B. When compile --review (or pipeline --review mode) runs, scored articles are added as JSON candidates to ~/.wiki-review-queue.json instead of directly ingesting into wiki/.
Reviewers then approve or reject each candidate via the CLI.
Architecture
wiki-pipeline --review
│
├── Phase 1 (web-content-reviewer): score article
│ │
│ └── score ≥ 49 ──► add to ~/.wiki-review-queue.json
│ │ │
│ └── score < 49 ──► reject immediately (no candidate)
│ │
└────────────── Phase 2 deferred ──┘
│
user reviews candidates
│
┌─────────────┴─────────────┐
│ │
review approve review reject
│ │
write wiki/ + refresh index reject cache
+ flush source state (content_hash stored)
+ register concept deps candidate removed
Candidate JSON Schema
Each candidate is stored in ~/.wiki-review-queue.json:
{
"candidates": [
{
"id": "k3f9a2b1",
"content_hash": "a8da29aa0bfa06cd3c6bb588a6703dd8...",
"file": "raw/rss-inbox/interconnects-article.md",
"review_value": 8,
"review_confidence": 7,
"source_url": "https://...",
"sources": ["raw/rss-inbox/interconnects-article.md"],
"strategic_context": "frontier-3",
"contradicted_by": "",
"approved": undefined,
"created_at": "2026-05-18T10:00:00.000Z",
"reviewed_at": undefined
}
]
}
v2 fields:
content_hash: body-only SHA-256 — same content never re-queued
approved: true | false | undefined (pending)
created_at / reviewed_at: ISO timestamps for TTL tracking
CLI Commands
All commands are executed via node review-queue.mjs:
--list
List all candidates (auto-purges expired entries before display).
node review-queue.mjs --list
Output:
Wiki Review Queue — 3 candidate(s)
k3f9a2b1 score=56 ⏳ pending 2026/5/18 [→ frontier-3]
file=raw/rss-inbox/... url=https://...
--add
Add a candidate (with automatic dedup and reject cache check):
node review-queue.mjs --add \
--file raw/rss-inbox/interconnects-article.md \
--value 8 --confidence 7 \
--url https://interconnects.ai/... \
--sources raw/rss-inbox/interconnects-article.md \
--strategic-context frontier-3
Dedup: If content_hash already exists in pending queue → skip with log.
Reject cache: If content_hash was previously rejected → skip with log.
--approve <id>
Approve a candidate and remove from queue:
node review-queue.mjs --approve k3f9a2b1
--reject <id>
Reject a candidate, cache its content_hash to prevent future re-add:
node review-queue.mjs --reject k3f9a2b1
--pending
Show pending count (auto-purges expired):
node review-queue.mjs --pending
--purge-stale
Force-expire entries older than TTL (default 14d):
node review-queue.mjs --purge-stale
--show-rejects
List rejected content hashes:
node review-queue.mjs --show-rejects
--clear-rejects
Clear the reject cache:
node review-queue.mjs --clear-rejects
--reset
Clear the entire queue (use with caution):
node review-queue.mjs --reset
Low v×c Scanner Integration
The low-vxc-scanner.py script (~/wiki/scripts/low-vxc-scanner.py) identifies entities with low review scores and can enroll them into the review queue:
python3 scripts/low-vxc-scanner.py --threshold 49 --limit 30
python3 scripts/low-vxc-scanner.py --threshold 49 --limit 30 --enroll
python3 scripts/low-vxc-scanner.py --missing-only
python3 scripts/low-vxc-scanner.py --threshold 49 --json /tmp/low-vxc.json
Cron: wiki-low-vxc-review runs weekly Monday 8am with --threshold 49 --limit 30 (report only, no auto-enroll).
Pitfall: The review_value field may contain stray characters (e.g., 7 ^[raw/articles/xxx.md]). The scanner handles this by splitting on whitespace and ^ before parsing to float.
Phase 1B: Review Gate Integration
The review queue integrates with wiki-pipeline as Phase 1B — an optional sub-mode of Phase 1:
Phase 1 (scoring)
│
├── score ≥ 49 ──► Phase 1B decision gate:
│ │
│ ├── pipeline mode = default ──► immediate Phase 2 (standard flow)
│ │
│ └── pipeline mode = review ──► review-queue.mjs --add, skip Phase 2
│
└── score < 49 ──► Phase 1 rejection closeout (unchanged)
Trigger: When user triggers pipeline with --review flag, or when:
- Batch scoring produces borderline articles (score 45-55) where human judgment adds value
- Articles that report
contradictedBy in LLM extraction — auto-route to review queue
Reject Cache
Rejected candidates store their content_hash in ~/.wiki-review-rejects.json:
{
"hashes": [
{
"hash": "a8da29aa0bfa06cd3c6bb588a6703dd8...",
"file": "raw/rss-inbox/spam-article.md",
"rejected_at": "2026-05-18T10:00:00.000Z"
}
]
}
Auto-cleanup: Reject cache entries expire after 90 days. Expired entries are cleaned on --add operations.
TTL: Auto-Expiry
Queue entries have a 14-day TTL. When --list, --pending, or --purge-stale runs, entries older than 14 days with approved === undefined are automatically rejected and removed.
Expired entries are logged to stderr for observability:
[review-queue] Auto-expired candidate k3f9a2b1: ... (created 2026-05-04, >14d)
Integration with SHA-256 Incremental Check
The review queue uses the same body-only SHA-256 algorithm as wiki-source-hasher.mjs (sha256-body-v1). When a candidate is approved and processed through Phase 2:
- Source file gets
sha256 field written by --write-sha256
- Concept dependencies registered via
registerConcepts() (exported from hasher)
- Future inbox scans skip unchanged sources
Low v×c Scanner Integration
~/wiki/scripts/low-vxc-scanner.py automates the discovery of low-quality entities for re-review. It scans all entities with v×c < threshold (default 49) and optionally enrolls them via review-queue.mjs --add.
python3 scripts/low-vxc-scanner.py --threshold 49 --limit 30
python3 scripts/low-vxc-scanner.py --threshold 49 --enroll --limit 30
Pitfall — malformed frontmatter: Some entities have review_value: 7 ^[raw/articles/slug.md] (citation garbage appended). The scanner uses robust safe_float() extraction: float(str(field).split()[0].split('^')[0].strip()).
Cron: wiki-low-vxc-review runs weekly Mon 8am (job ID: 250040ab1a4c) to scan and report.
Lock & Concurrency
Both ~/.wiki-review-queue.json and ~/.wiki-review-rejects.json are written atomically (temp file + rename) to prevent corruption during concurrent access.
Reference
references/review-queue-workflow.md — detailed CLI workflow and troubleshooting
scripts/review-queue.mjs — actual CLI implementation