b2176c36ea
Adds enriched_text column to chunks table that prepends document title (and section header when present) to chunk text. Embeddings and FTS now use enriched text for better search relevance. Includes schema migration with backfill for existing data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
MODIFIED Requirements
Requirement: Implicit note shorthand
The client SHALL treat bare string arguments (with no subcommand) as an implicit note only when more than one argument is provided. kb "my note" SHALL behave identically to submitting a note via POST /api/v1/jobs. All persistent flags (--format, --engine, --api-key) and the root --tags flag SHALL work with the shorthand form. A single bare word SHALL be rejected with an error message.
Scenario: Quick note via bare argument
- WHEN the user runs
kb "remember to update DNS" - THEN the client SHALL submit the text as a note via
POST /api/v1/jobsand printQueued: note
Scenario: Bare argument with tags
- WHEN the user runs
kb "server room is building 3" --tags ops - THEN the client SHALL submit the note with the specified tags
Scenario: Bare argument with JSON output
- WHEN the user runs
kb "my note" --format json - THEN the client SHALL output the raw JSON response from the engine
Scenario: Bare argument duplicate detection
- WHEN the user runs
kb "my note"and the engine returns HTTP 409 - THEN the client SHALL handle the duplicate response identically to the previous
kb add --notebehaviour
Scenario: Multiple unquoted words
- WHEN the user runs
kb remember to update dns(without quotes) - THEN the client SHALL join all arguments into a single note string and submit it
Scenario: Single bare word rejected
- WHEN the user runs
kb infow(a single unrecognized word) - THEN the client SHALL print to stderr:
Unknown command "infow". Run 'kb --help' for available commands.followed by a hint about note usage, and exit with a non-zero code
Scenario: No interference with subcommands
- WHEN the user runs
kb search "query"or any other existing subcommand - THEN the client SHALL route to the subcommand as before — the implicit note shorthand SHALL NOT interfere
Scenario: No arguments
- WHEN the user runs
kbwith no arguments - THEN the client SHALL display the help text