Repository navigation
Add: hi export <ID>, one criterion with its cases and what it sits under - #23
Merged
Merged
Conversation
An agent building one criterion of a large hi/ no longer has to load the whole directory. `hi export EXPORT-7` returns that criterion, its cases, the criteria above it and its file's intent, in the unchanged export envelope (EXPORT-7, EXPORT-7.a, DECISIONS.md §40). - An id scope wins over a frontmatter-declared family of the same name - A retired case keeps the live criteria it was a case of - An id-shaped scope that is not an id is refused with the reason - hi/AGENTS.md names the habit in one sentence; the 0.8 template is kept in src/seed/ so `hi seed` upgrades an untouched copy Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
corvid-agent
approved these changes
Sep 23, 2026
corvid-agent
left a comment
Contributor
There was a problem hiding this comment.
CoS glance — APPROVE (b0e4f9dc)
HI product tip: hi export <ID> as a fourth scope. Additive, envelope still "export": 1, and EXPORT-7 / EXPORT-7.a are real captured criteria (not invented AC).
What holds
in_slicekeeps the id, descendants, and ancestors so everyparentin a clean workspace names an entry in the payload (EXPORT-7.a); orphans still name the missing parent.- Id parse wins over a frontmatter-declared family of the same name — fixes the cold-read empty export for
SEND-1. - File-vs-id and family-vs-id collisions stay impossible by casing/hyphen rules; file-scope still takes the file whole via
is_this_file || in_scope. - Malformed id-shaped scopes (
SEND-01) refuse with the parse reason once nothing matched; unknown well-formed ids take the four-thing nothing-matches path. - Retired case brings live ancestors into
criteriaand itself intoretired(EXPORT-4 + EXPORT-7.a). - Nine unit tests + CLI black-box cover the slice, orphan, precedence, retired, malformed, envelope, and unknown-id paths. Specs/REQ-out-022/HI-1/DECISIONS §40 aligned.
agents_0_8.mdseed + one-sentence habit inagent_instructionsmatch §38/§40 (habit on a frozen fact).- CI green on this tip (ubuntu/macos/windows Check, Lint, CodeQL, page-in-browser).
Nit (non-blocking): release placement (before vs after 1.0) left open in §40 — human release decision, not a code blocker.
Prefer APPROVE. Humans merge; CoS will not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hi exportaccepted a family, a file, or the whole repository. On a product with a few hundred criteria the whole repository is tens of thousands of tokens, and one family can be most of that. An agent building one criterion needs only that criterion, what it is a case of, and why the feature exists. hi's ownhi/exports at about 10,000 tokens whole and about 300 forhi export EXPORT-7.EXPORT-7). The export returns that criterion, every case beneath it, every criterion it sits under, and its file'sintent, in the same envelope as every other scope. It adds no field and moves none, so it is still"export": 1(EXPORT-3). HI-1.md adds the id to the valuesscopecan hold, plus one normative line saying what an id scope carries.EXPORT-7.a). A payload whoseparentnames something absent from it points at nothing, and a case read alone is missing its subject. Anorphan-casestill names the parent it lacks, because export reports what the files hold andhi checkis where that break gets reported.families: [SEND, SEND-1],hi checkpassed, andhi export SEND-1came back empty. Any scope that parses as an id is now read as one. No scope that selected a file or a real family before selects anything different now.retiredasEXPORT-4requires.SEND-01→ leading zero). The refusal for a scope that matches nothing now lists an id as the fourth thing a scope can be.hi/AGENTS.mdnames the habit in one sentence. Under §38's test it is a habit resting on a frozen fact, not a fact about an unfrozen format. The 0.8 template is added tosrc/seed/agents_0_8.mdso thathi seedupgrades an untouched copy and leaves an edited one alone.DECISIONS.md §40 records the reasoning and what was left out on purpose: a token budget, a reverse lookup from an id to the code that cites it, an outline mode, and several ids in one call, which would be
"export": 2.Release placement: this is additive (no new field, no new check kind, no change to the format or exit codes) and sits under
Unreleased. Whether it ships before or after the 1.0 tag is left as a release decision.Test Plan
fledge lanes run verify: all 8 steps pass (fmt + clippy, tests, view-behaves 14/14, intent, index, spec, nudge-behaves 7/7, plugin-validate)specsync check --force: 10 specs checked, 10 passed, 0 warnings; file coverage 15/15, LOC coverage 8862/8862 (100%)src/out.rs(slice contents, all parents of a case, orphan case, id-over-family precedence, retired case, malformed id refusal, retired id kept apart, envelope unchanged, unknown id refused) and 1 black-box test intests/cli.rsfor argv routinghi export EXPORT-7.areturnsEXPORT-7andEXPORT-7.awithgenerate.md's intent;hi export SEND-01exits 1 with the leading-zero reason🤖 Generated with Claude Code