Skip to content

feat(ingest,context): --type and --tag on ingest, --tag filter on context - #34

Merged
GQAdonis merged 1 commit into
mainfrom
feat/ingest-type-tags-context-filter
Oct 4, 2026
Merged

GQAdonis merged 1 commit into
mainfrom
feat/ingest-type-tags-context-filter

Conversation

@GQAdonis

@GQAdonis GQAdonis commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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 force Reference on every compiled entry. That is now only the default.
  • pk ingest --tag <t> is repeatable and adds tags such as role:api-dev or vis:team.
  • Both are applied through the new 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.
  • The pk-mcp knowledge_search and knowledge_ingest tools are out of scope, because the hooks use the CLI.

Test plan

  • cargo test -p pk-cli --test tags_and_type runs the real CLI end to end against a local OpenAI-compatible endpoint that returns fixed compile results:
    • three ingests produce Lesson + role:api-dev, Gotcha + role:ui-dev + vis:team, and an untyped entry that stays Reference;
    • context --tag role:api-dev returns exactly the api entry;
    • two tags match only the entry that carries both;
    • a non-matching combination returns nothing;
    • with no tags, all three come back.
  • cargo test -p pk-cli --test context_scoring (A1) still passes.

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@GQAdonis
GQAdonis merged commit 2c66c3e into main Oct 4, 2026
0 of 3 checks passed
@GQAdonis
GQAdonis deleted the feat/ingest-type-tags-context-filter branch October 4, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant