Repository navigation
fix(index): honest empty state, and a --project filter for shared stores - #171
Merged
Merged
Conversation
nt index's empty-state body was tasks-only onboarding ("add your first
task") under a command SKILL.md presents as the whole KB catalog — three
agents mistook it for proof a store had no notes at all. It also stayed
silent in the partially-empty cases (0 notes/N tasks, N notes/0 tasks),
so a reader of the body alone couldn't tell "empty" from "not shown
here". Now index says plainly which half(es) are empty and points at
both nt note and nt add, without turning into a tutorial; --no-tasks
stays silent on task counts since that's a caller-chosen exclusion, not
the store's real state.
Also add `nt index --project foo`, matching recall's flag name but not
its semantics: recall --project only ranks (soft preference), index
--project is a hard filter — consistent with how --tag/--folder already
filter here. It matches a note's project: frontmatter and a task's
+project tag, documented in the flag's own help text.
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.
Two defects five agents hit while using nt as their memory tool across five different repos.
1. The empty state hid half the store
nt indexon an empty store printed only tasks-shaped onboarding:Three agents independently reported the same confusion — they could not tell "this store has no notes" from "index is a task view and notes live elsewhere". One wrote that it "actively lied".
Now names both halves, and handles the genuinely misleading partial cases too (0 notes + N tasks, N notes + 0 tasks, and
--no-tasks):2.
indexandrecallhad different filter vocabulariesnt index --project foo→flag provided but not defined: -project, whilerecall --projectworks. On a shared store one agent's index dumped 26 notes from ~6 unrelated projects and called the documented "start here" step "pure cost".--projectis a hard filter here (notes'project:frontmatter, tasks'+projecttag), mirroring how--tag/--folderalready behave — deliberately NOTrecall --project's soft ranking boost. The asymmetry is documented in the flag's own help text.Verified against a 29-note shared store: 29 → 4 notes for one project, 5 for another.
Verified
6 regression tests, each confirmed FAILING against the pre-fix code.
go build ./...,go vet ./...,go test ./...,golangci-lint run internal/cli/...clean, run bare.--jsonfield shapes unchanged (integrations consume them).