name: heuristic-error-inbox description: Manage curated HEURISTIC_SYSTEM inbox and operation-record case folders through the nils-cli heuristic-inbox primitive with judgment-first workflow guidance.
Heuristic Error Inbox
Use this skill when a curated HEURISTIC_SYSTEM workflow gap or operation-record case should move through the retained case-folder lifecycle.
Contract
Scope boundary:
- The skill body owns judgment ("should this be retained?", "what should
ENTRY.mdsay?", "promote vs archive?"). - Deterministic operations route through the brew-installed
heuristic-inboxprimitive from nils-cli (folder ops, redaction guardrail, lifecycle transitions, archive moves, evidence ingest).
Prereqs:
- Target workspace is a git work tree with
heuristic-system/error-inbox/(per-case folder layout:<slug>/ENTRY.mdplus<slug>/evidence/). - Required PATH usage:
heuristic-inboxavailable onPATHfrom nils-cli 0.10.2 or newer. Verify the actual binary withheuristic-inbox --version. - Released boundary: Homebrew nils-cli 0.10.2 (or newer) ships the
heuristic-inboxprimitive. Install or upgrade withbrew tap sympoies/tap && brew install nils-cli(orbrew upgrade nils-cli). skill-usageis available when creating entries from askill-usage.record.json; the record should already passskill-usage verify --out <record-dir> --format json.- Project preflight has passed before editing tracked inbox records.
Inputs:
- User request to create, verify, triage, route, update, or archive a curated HEURISTIC_SYSTEM error inbox entry.
- Optional observed-friction signal that has already passed judgment-first HEURISTIC_SYSTEM triage.
- Optional existing inbox case folder (or its
ENTRY.mdpath) underheuristic-system/error-inbox/. Operation-record cases underheuristic-system/operation-records/<slug>/RECORD.mdare accepted byverifyonly. - Optional redacted evidence source file for
ingest-evidence <case> --from <path>; the primitive rejects unredacted artifacts. - Optional verified skill usage record directory for
new --from-skill-usage <record-dir>. - Optional lifecycle status:
open,promoted, orwontfix. Legacy values (triaged,planned) on historical entries remain readable but cannot be re-set. - Optional severity:
low,medium, orhigh. - Optional implementation plan, issue, PR/MR, operation record, or runbook link to preserve as lifecycle evidence.
- Optional archive reason, archive date, archive root, dry-run mode, or durable outcome link for completed entries.
Outputs:
- A concise recommendation about whether the gap warrants a retained inbox entry, duplicate update, plan routing, promotion, accepted-risk closure, or archive move.
- A curated case folder (
<slug>/ENTRY.mdplus an emptyevidence/) underheuristic-system/error-inbox/when creation is appropriate. - Deterministic CLI output for list, verify, new, set-status, ingest-evidence,
and archive operations in text or JSON; JSON payloads use versioned schema
values such as
cli.heuristic-inbox.verify.v1inside a{schema_version, command, ok, result}envelope. - Validation evidence from the CLI and project checks before claiming the lifecycle update is complete.
- Automatic execution logs for each write operation under the
agent-out project --topic heuristic-inboxrun directory, includinginvocation.json,before.json, andafter.json.
Exit codes:
0: success1: validation failure, duplicate entry detected, missing required entry content, or unsafe write target2: usage error
Failure modes:
heuristic-inboxis unavailable onPATHor reports a version older than 0.10.2; install or upgrade nils-cli before running the workflow.- Requested entry would duplicate an existing slug, title, area, or evidence pointer; update the existing entry or ask the user before creating another.
- Entry lacks required sections, lifecycle status, severity, raw evidence pointer, workaround, promotion criteria, or next action.
skill-usage.record.jsonis missing, malformed, unverified, or points to raw details that should stay linked rather than copied.- Requested lifecycle status lacks a durable link or next action when the
status is
promotedorwontfix. - Requested status write is a legacy lifecycle value (
triaged,planned); useopenplus aNext Actionlink to express triage or planned work. - Archive is requested for a case that is not
promotedorwontfix, still has actionableNext Actiontext, lacks a durable outcome link, or would overwrite an existing archived case folder. ingest-evidenceis asked to write a rawskill-usage.record.json, a file matching token-like patterns, an oversize source, or content containing absolute$HOMEpaths that have not been rewritten to<workspace>.- The user is actually asking to implement the underlying bug or tool fix; route
that to
create-plan,execute-from-plan, or the provider/domain skill instead of fixing it inside this inbox workflow. - Ordinary command mistakes, single non-zero exits, or raw stderr dumps are mistakenly treated as retained inbox entries without observed-friction triage.
Workflow
Decide whether a retained inbox entry is appropriate.
- Run the canonical triage checklist in
HEURISTIC_SYSTEM.md#activation-and-triage; this skill does not restate the criteria. - Use an entry when an important delivery, release, validation, evidence, or safety workflow gap remains unresolved.
- Do not create an entry for a transient failure that was fixed immediately and covered by tests or an operation record.
- Run the canonical triage checklist in
Inspect the current inbox before writing.
Run:
heuristic-inbox listCheck for likely duplicates by slug, title, area, and evidence pointer.
Create or update one curated case.
From a verified
skill-usagerecord:heuristic-inbox new --from-skill-usage <record-dir> --slug <slug>The primitive writes
<inbox>/<slug>/ENTRY.mdand an empty<inbox>/<slug>/evidence/folder.When no
skill-usagerecord exists, hand-author the case from scratch against the canonical template below. The primitive'snewpath requires--from-skill-usage, so hand-authoring is judgment-owned and must close with theheuristic-inbox verifygate before the case is committed or routed.Create the case folder layout:
mkdir -p heuristic-system/error-inbox/<slug>/evidenceWrite
heuristic-system/error-inbox/<slug>/ENTRY.mdusing the canonical schema (replace bracketed placeholders, keep section order; lifecycle status starts atopen):# [Title] ## Status - Status: open - First observed: YYYY-MM-DD - Area: [domain or skill name] - Severity: low | medium | high ## Signal [One short paragraph describing the observed workflow gap.] ## Evidence - [Redacted artifact link or external record pointer.] ## Impact [What this gap blocks, weakens, or risks if left unresolved.] ## Current Workaround [Workaround in use today, or `None.` if none.] ## Promotion Criteria [Concrete signal that proves this gap is closed enough to promote.] ## Next Action [Single actionable next step; never leave blank.]Run the verify gate before committing or routing:
heuristic-inbox verify heuristic-system/error-inbox/<slug>/ --strictFix any issues the primitive reports (missing sections, raw
$HOMEpaths underevidence/, lifecycle inconsistencies) before the case is treated as live.
For existing cases, edit
ENTRY.mdonly as needed or useset-statusfor lifecycle status changes.Link raw records and summarize the failure; never copy raw logs, secrets, credentials, or terminal dumps into the committed case. Add redacted artifacts through
ingest-evidenceso the primitive enforces the redaction guardrail.heuristic-inbox ingest-evidence heuristic-system/error-inbox/<slug>/ \ --from <curated-excerpt.md> --label <name>
Verify before routing or reporting completion.
Run:
heuristic-inbox verify heuristic-system/error-inbox/<slug>/ --strictThe primitive accepts either the case folder or its
ENTRY.md/RECORD.mdpath, and runs the redaction guardrail against every file under<slug>/evidence/. With nils-cli 0.10.2 or newer, strict verify also fails absolute$HOMEpaths inENTRY.md/RECORD.mdbody text; non-strict verify reports those body findings as warnings for historical compatibility.For lifecycle status changes, preserve a concrete next action or durable outcome link.
Archive completed cases out of the active inbox.
Closed cases keep status
promotedorwontfix; do not add anarchivedlifecycle status.Before archiving, verify that
Next Actionstarts withNone., durable outcome evidence exists, and future follow-up has moved to a separate issue, plan, or source document.Use dry-run first when reviewing an existing case:
heuristic-inbox archive heuristic-system/error-inbox/<slug>/ --dry-run --format jsonarchivemoves the entire case folder (ENTRY.md plus any redactedevidence/). Baregit mvon a single file is discouraged because it skips the primitive's verify gate.
Route implementation work outside this skill.
- Use
create-planorexecute-from-planfor planned fixes. - Use provider-specific PR/MR/release skills for delivery failures.
- Promote fixed and validated lessons into operation records, tests, scripts,
runbooks, or skill policy before marking an entry
promoted.
- Use
Command Surface
heuristic-inbox list [--inbox-dir <dir>] [--status <csv>] [--include-archived] [--format text|json]
heuristic-inbox verify <case-folder|ENTRY.md|RECORD.md> [--inbox-dir <dir>] [--strict] [--format text|json]
heuristic-inbox new --from-skill-usage <record-dir> --slug <slug> [--out-dir <dir>] [--severity low|medium|high] [--format text|json]
heuristic-inbox set-status <case-folder|ENTRY.md> --status open|promoted|wontfix [--link <path-or-url>] [--format text|json]
heuristic-inbox ingest-evidence <case-folder|ENTRY.md> --from <path> [--label <name>] [--suffix <ext>] [--max-bytes <n>] [--force] [--format text|json]
heuristic-inbox archive <case-folder|ENTRY.md> [--link <path-or-url>] [--reason <text>] [--archive-root <dir>] [--date YYYY-MM-DD] [--dry-run] [--format text|json]
Relationship To Later Skills
heuristic-operation-recordshould be added only after promoted inbox entries prove operation-record creation is too large for this inbox primitive.heuristic-compression-reviewshould be added only after several related archived inbox or operation records exist in one workflow family.- Do not add a broad
heuristic-system-lifecycleskill until the narrower inbox, operation-record, and compression workflows are stable.