feat(ingest,context): --type and --tag on ingest, --tag filter on context - #34
Merged
Merged
Conversation
…text pk ingest gains --type (OKF entry type; Reference stays the default) and repeatable --tag, applied through Librarian::compile_with / CompileOverrides after the model's compile result (caller tags first, de-duplicated). pk context gains repeatable --tag: an entry must carry every requested tag, filtered before scoring. This lets recall target a role, team or visibility level (role:api-dev, vis:team). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 4, 2026
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.
Replaces #33, which closed when its stacked base branch was deleted at merge; rebased onto main (contains #31).
Summary
Plan PR A3 of the team-aware learning work (skill-pack design §2, §8 U3).
pk ingest --type <T>sets the OKF entry type (Lesson,Gotcha,Decision, …). The librarian used to forceReferenceon every compiled entry. That is now only the default.pk ingest --tag <t>is repeatable and adds tags such asrole:api-devorvis:team.Librarian::compile_with(raw, CompileOverrides)after the model's compile result. Caller tags come first and duplicates are dropped.compile()delegates to it, so existing callers are unchanged.pk context --tag <t>is repeatable and all-of: an entry must carry every requested tag. The filter runs before scoring.knowledge_searchandknowledge_ingesttools are out of scope, because the hooks use the CLI.Test plan
cargo test -p pk-cli --test tags_and_typeruns the real CLI end to end against a local OpenAI-compatible endpoint that returns fixed compile results:Lesson+role:api-dev,Gotcha+role:ui-dev+vis:team, and an untyped entry that staysReference;context --tag role:api-devreturns exactly the api entry;cargo test -p pk-cli --test context_scoring(A1) still passes.🤖 Generated with Claude Code