docs/workable_items.db is the authoritative SQLite registry. The initial 33-item baseline was reconstructed from preserved repository evidence on 2026-10-29. Registry timestamps identify that import and later lifecycle operations; they do not claim to be original implementation dates.
The following files are generated, not independently edited:
Issues.md,Issues.html,Issues.pdfIssues_Summary.md,Issues_Summary.html,Issues_Summary.pdfFixed.md,Fixed.html,Fixed.pdfFixed_Summary.md,Fixed_Summary.html,Fixed_Summary.pdftracking/helixtrack-outbox.json
The generator enforces stable gapless HRD identifiers, the closed Type and Status vocabularies, type-aware closure wording, location consistency, comprehensive descriptions, closure evidence, reopen attribution, operator-block exhaustion details, reopen counts, and SQLite foreign keys.
Run from the repository root:
python3 scripts/workable_items.py validate
python3 scripts/workable_items.py diff
python3 scripts/workable_items.py export
python3 scripts/workable_items.py helixtrack-outboxAdd work with comprehensive fields:
python3 scripts/workable_items.py add Task High \
--title 'Short self-contained title' \
--description 'A complete description of the work and its context.' \
--scope 'Affected services, clients, and documents.' \
--reproduction 'Observable current behavior or missing capability.' \
--acceptance 'Observable conditions required for closure.'Lifecycle commands are update, start, pause, close, reopen, operator-block, unblock, and rehash. start moves Queued or Reopened to In progress; pause moves In progress back to Queued; both require --actor, --reason and --evidence (existing file(s) or directory under evidence/, ;-separated), record a Started/Paused history event, run in one transaction with the integrity hash refreshed, and refuse every other transition (closed statuses, Operator-blocked, unknown ids) with exit code 2. Closure derives Fixed, Implemented, or Completed from the item type. Reopening requires an actor, reason, and positive evidence. Operator blocking requires Attempted: exhaustion details, a concrete unblock condition, and an owner.
update also takes --created-by {AI|User} and --composes-with HRD-nnn,HRD-nnn. created_by is a closed vocabulary (AI, User, the actor set of item_history): validate reports any other value, and free-text provenance belongs in the forensic anchor. --composes-with replaces the item's composes list; every id must be an existing item, a duplicate is refused, and an empty string clears the list. Both are recorded as an Updated history event.
Hardening rules (independent reviews of the start/pause change):
- Evidence references on
start/pausemust name an existing regular file or directory strictly insideevidence/(a directory is legitimate: an evidence bundle such as a campaign folder). Absolute paths,.,..escapes, bare directories such asscriptsordocs/.., theevidenceroot itself, symlinks resolving outsideevidence/, and FIFOs/sockets/devices are refused. Stored references are normalised POSIX (./a//b/becomesa/b) and every;-separated reference is kept in the history event. - Every free-text value the tool records is refused if it contains line breaks, C0/C1/DEL controls (tab excepted), the Unicode line/paragraph separators, or invisible/bidi characters (U+00AD, U+200B-200F, U+202A-202E, U+2060, U+2066-2069, U+FEFF). That covers
add(title, description, scope, reproduction, acceptance, anchor, created-by, assigned-to),update,operator-block(what, why, unblock, who) and the actor/reason/evidence ofupdate,start,pause,close,reopen,rehash. No stored value in the live registry is multi-line, so exports stay byte-identical. As defence in depth the Markdown renderer flattens any such character,validatereports stored values that contain them, andimport-mdreads history events only from each item's**History:**section. validatereads the stored integrity hash and recomputes the content inside one read transaction, and fails on a mismatch (or a missing hash in a non-empty registry). The hash covers items, history, reopen/operator-block/obsolete details, and (when they hold rows)firebase_metadataandsync_outbox; they are keyed in only when non-empty, so a registry that does not use them keeps its existing hash and needs no migration (the live registry's hash was unchanged by this change).- Every writer (
add,update,start,pause,close,reopen,operator-block,import-md,export) verifies the stored hash against the recomputed content BEFORE writing and refuses withregistry tampered; run validate(exit 2), so a later tool write cannot launder an out-of-band edit. The one deliberate way past it isrehash --actor {AI|User} --reason TEXT: it refuses if anything other than the hash is wrong, then records actor, reason, time, previous and new hash inmeta.rehash_logand setslast_sync_direction=rehash. Raw-SQL edits to the registry therefore need a reviewedrehash. - Any refusal (
ValueError) from any command ends aserror: ...with exit code 2, and a held write lock ends as exit 2 too (otherOperationalErrors are not reported as lock errors).HELIX_WORKABLE_ITEMS_BUSY_MSshortens the 30 s lock wait. docs/tracking/helixtrack-outbox.jsoncarries a wall-clockgenerated_at; it is the only non-deterministic field.diffcompares the stored outbox with the one the registry would produce now (ignoringgenerated_at) and FAILS when it differs or is missing; regenerating it without registry changes changes only that timestamp.scripts/verify_workable_items.pyworks on a read-only backup copy ofdocs/workable_items.db(it never opens the tracked database read-write); onlyevidence/workable-items/results.jsonis rewritten.- Round 4 additions. Evidence has two tiers:
start/pause(tier 1) require an existing file or directory strictly underevidence/;close,reopenandupdate --evidence(tier 2) require a relative path that exists, is a regular file or directory, and stays inside the repository root once..and symlinks are resolved (;-separated, stored normalised). Existing registry rows are not re-checked, so legacy annotated references stay valid; only new writes andimport-mdof terminal items (confinement only, no existence check) are held to the rules. - Every writer runs inside one
BEGIN IMMEDIATEtransaction: it verifies the stored hash and records the pre-existing validation errors, writes, and beforeCOMMITre-validates; any newly introduced validation error (short description, blank title or scope, control characters, closure/reopen/block rules, a rehash-log break) rolls the whole write back.import-mdis covered the same way and additionally refuses to change an existing item unless--allow-overwriteis given (the row-level plan is printed asoverwritten;plan_importproduces it).closeof a closed item,reopenof a non-closed item andoperator-blockof a closed item are refused;closeof a blocked item removes itsoperator_block_detailsrow (the block stays in history). rehashneeds--confirm <candidate hash>(obtain it and the list of items changed since the last tool write withrehash --dry-run), refuses a no-op, an empty reason, and any registry that has other problems or contains triggers/views. Entries inmeta.rehash_logare append-only, hash-chained (prev_entry), name the changed items (from the per-item baselinemeta.item_hashes, refreshed by every tool write; absent on a registry that predates it, in which casechangedis null), and the log and baseline are covered by the integrity hash once present. The integrity hash is NOT a security boundary: anyone who can write the database file can also runrehashor recompute the hash. It is a tripwire plus audit trail; the git history of the trackeddocs/workable_items.dbis the real control, so review database diffs in git.;followed byevidence:(any case) is refused in actor/reason/evidence because the Markdown history and reopen lines are split on it when re-imported. Markdown output neutralises and the summary tables escape backslash before pipe; text without those sequences is unchanged, so existing exports are byte-identical. The invisible-character set also covers U+034F, U+061C, U+115F, U+180E, U+2061-2064, U+2800, U+3164, U+FFF9-FFFB and the tag characters U+E0000-E007F. Triggers and views makevalidatefail and every writer refuse.- Round 5 additions.
import-mdplans and gates changes toreopen_detailsandoperator_block_detailsas well as item columns;--allow-overwritenow also requires--actorand--reason, which are appended with the row-level changes tometa.import_log(covered by the integrity hash). Import also refuses duplicate ids, unrecognised history lines (instead of dropping them), and any unconfined evidence in terminal items, reopen details and the history of new items.;assigned toin created-by/assigned-to and theWHY:,UNBLOCK CONDITION:,WHO:labels in the operator-block fields are refused (they are split on when re-imported).unblock ATM --actor --reason --evidencemoves an Operator-blocked item back to Queued with a recordedUnblockedevent and removes its block details. Global validation errors name the affected ids so a worse state with the same wording is detected as new.helixtrack-outboxrefuses a tampered registry.validateanddiffopen the database read-only (no DDL, no WAL pragma) and fail with a cleanerror:and exit code 2 when the file cannot be opened. - The verifier's mutant sandboxes are seeded with the evidence files the tests reference, and each target test must pass unmutated (a recorded
mutation-control-*check) before its mutants can count as killed; a failing control reports the mutants as INVALID.
For disaster recovery, import-md reconstructs item rows, attribution, composition references, history, and conditional lifecycle details from the generated long-form Markdown:
python3 scripts/workable_items.py --db /path/to/recovered.db import-md --input docs
python3 scripts/workable_items.py --db /path/to/recovered.db export --output /path/to/recovered-docsPDF export requires ReportLab. A missing PDF dependency fails export rather than silently omitting a mandatory document. On an externally managed (PEP 668) host, install it out of tree instead of overriding the marker:
python3 -m pip install --target ~/.cache/helix-docs-deps reportlab
PYTHONPATH=~/.cache/helix-docs-deps python3 scripts/workable_items.py export --output docsdiff() compares generated Markdown and HTML; it cannot see a PDF left behind by an export that died partway. verify_workable_items.py therefore adds pdf-documents-current, which extracts the HRD identifiers from each PDF with pdftotext and requires the same set its Markdown sibling carries, plus a non-trivial byte size and page count. A PDF set that predates the current registry fails that check rather than passing the drift gate — verified against the 2026-10-28 set, which still showed HRD-032 as open.
helixtrack-outbox.json is an offline, idempotent upsert plan keyed by HRD identifier. Every record says remote_status: NOT RUN. It is not an API-compatible remote receipt and does not prove synchronization. Live bidirectional HelixTrack delivery remains HRD-029 until the exact API contract, authentication, conflict semantics, and real-instance push/pull results are available.
Run:
python3 scripts/verify_workable_items.py
python3 -m unittest -v tests.test_workable_itemsMachine results are in evidence/workable-items/results.json. The campaign covers real SQLite CRUD and lifecycle behavior, concurrent writers, a 1,000-row transaction, SIGKILL rollback, corrupt-database detection and recovery, byte-identical round trips, drift detection, and rejecting mutations. PDF visual-inspection artifacts are under evidence/workable-items/pdf-qa.
md_unescapeis lossy for text that literally contains a backslash followed by<,](or![(it is read back as the unescaped form).- The integrity hash is a tripwire, not a security boundary. Anyone able to write the database file can recompute the hash, poison the per-item baseline, or run
rehash; the git history of the trackeddocs/workable_items.dbis the real control. - Editing the last
meta.rehash_logentry is covered by the integrity hash but, with no later entry to chain to, the chain check alone cannot show it; only the hash (and git) can. rehashcannot repair a brokenrehash_logchain (validation fails first); recovery isgit restoreof the database or a reviewed manual repair.- Closure, reopen and
update --evidencereferences must exist, so an annotated reference such asfile.go(TestX)is refused on new writes (legacy rows are untouched). - An Operator-blocked item leaves that state only through
unblock(to Queued) orclose. - Edits to the history lines of EXISTING items in imported Markdown are silently ignored:
import-mdtakes history only for new items and never rewrites the stored history of an item already in the registry. - An open (non-terminal) item's Evidence field is not confined on import: confinement and existence rules apply to terminal items, reopen details and new-item history only (known limit).
- The pre-existing import-md round-trip hash issue (a rebuilt registry's recomputed hash differs from the original) remains out of scope.
python3 scripts/check_registry_references.py [--json] verifies that every evidence path stored in the registry (items, history, reopen,
obsolete tables) and every repo-relative link in the registry documents, the gap-register documents and the upstream-issue drafts
resolves in the working tree. Each missing path is classified from docs/tracking/pending_ownership.json:
OWNED-BY-PENDING-PR (another open pull request delivers it), OWNED-BY-UNDELIVERED-WORK (work without a pull request yet) or
NOWHERE (a real defect; prose shorthands such as server/core also land here and need a human read). Exit 2 means the instrument was
blind (no stored evidence path resolves), never a pass. workable_items.py diff also compares docs/tracking/helixtrack-outbox.json
with the outbox the database would produce (ignoring generated_at); regenerate it with helixtrack-outbox after any registry write.