feat(context-pack): Phase 11 producer/consumer — exclusions + block metadata#102
Merged
Merged
Conversation
mq-agent is the producer/consumer for the Phase 11 contract mqobsidian shipped (11a negative context, 11b block metadata). This wires both ends: - Render structured `## Exclusions` (forbidden/fallback/irrelevant) instead of the flat `## Do not read first` list. `do_not_read` stays accepted and folds in as kind `irrelevant` (backward compatible); new `exclusions` param + `--exclude kind:item[:reason]` CLI option produce them directly. - Consume context-card.v1 block metadata in selection: a local-rich/ local-only card is withheld from the pack as a `forbidden` exclusion (publish boundary, machine-checked), an `archived` card drops to a `fallback` exclusion, a `stale` card is kept but flagged in Notes. Cards without metadata behave exactly as before. - Return `exclusions` + `card_metadata` in the JSON result for consumers. - Tests for old (do_not_read) and new (structured/metadata) paths; doc and worked example regenerated to the new format. mqobsidian owns the schemas; this repo owns the task->pack selection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Wires the mq-agent producer/consumer side of the Phase 11 contract that mqobsidian shipped (11a negative context
#19, 11b block metadata#20). mqobsidian owns the schemas; this PR makes mq-agent actually produce and consume them in task-pack selection.What changed
11a — structured negative context
## Exclusionswithforbidden/fallback/irrelevantkinds instead of the flat## Do not read firstlist.exclusions=param onbuild_task_pack+--exclude kind:item[:reason]CLI option.do_not_readis still accepted and folds in as kindirrelevant— backward compatible. Card Avoid reading unless needed items map the same way.11b — block metadata consumption in selection
context-card.v1carriesfreshness/scope/publishability, selection uses them:local-rich/local-only→ card withheld from the pack, recorded as aforbiddenexclusion (publish boundary, machine-checked).archived→ demoted to afallbackexclusion.stale→ kept but flagged in Notes.public-safe/current.Surface
exclusions+card_metadata.parse_frontmatterhelper added tocontext_export.py.PHASE5_TASK_PACKS.md) and worked example regenerated to the new format.Boundary
mqobsidian owns
context-pack.v1/context-card.v1and the enums; mq-agent owns task→pack selection. No schema is defined here.Tests
Full suite green (649). Added coverage for: structured exclusions + severity ordering,
do_not_readbackward compat, publishability/scope withholding, archived→fallback, stale-flagging, and--excludeCLI parse + rejection.🤖 Generated with Claude Code