0%

Section 06: intel-query SUBSUMES Edge Synthesis

Goal: Make subsumption queryable in the same graph-first manner as existing blocked-by: chains.

Success Criteria: see frontmatter.

Implementation Sketch

CLAUDE.md §Bug-Bug Blocker Chains documents the existing :Bug -[BLOCKED_BY]-> :Bug synthesis pattern (export_json._synth_bug_blocker_edges). Subsumption follows the same architectural shape with a different edge type and a different node-pair (Plan → Bug instead of Bug → Bug).

The subcommand surface mirrors existing patterns:

  • subsumed-by <plan> — analogous to bugs-for <plan> but for subsumption rather than blocking.
  • subsumes-of <bug-id> — analogous to blocks <section-id> reverse-traversal.
  • bugs-for extension — existing subcommand emits blocking: [...]; add a parallel subsumed: [...] section.
  • blocks extension — existing subcommand traverses BLOCKED_BY transitively; subsumption claims surface as informational (NOT included in transitive blocker chains, since subsumption is consequence not prerequisite).

Implementation Items

  • §06.1 Locate export_json._synth_bug_blocker_edges in intel_repo/ (per CLAUDE.md §Bug-Bug Blocker Chains). Add a sibling synthesizer _synth_plan_subsumes_bug_edges reading every plan’s subsumes: [...] field (now a typed schema field per §05) and emitting :Plan -[SUBSUMES]-> :Bug edges. Edge attaches to the plan’s overview node (NOT the dual-twin :Plan per existing pattern).
  • §06.2 Implement scripts/intel-query.sh subsumed-by <plan-name> subcommand. Returns: list of bugs subsumed by the plan, each with id, severity, current_status, last_verification_timestamp (from §07’s completion-gate run history; null if never verified). JSON + human formats per existing subcommand convention.
  • §06.2 Implement scripts/intel-query.sh subsumes-of <bug-id> subcommand. Returns: owning plan path if subsumed_by: is set, else null. JSON + human formats.
  • §06.3 Extend bugs-for <plan-name> subcommand: existing output’s blocking: [...] section gets a parallel subsumed: [...] section. Update the subcommand’s JSON schema documentation in intelligence.md.
  • §06.3 Extend blocks <section-id> subcommand: when traversing BLOCKED_BY chains, attach a separate subsumption_annotations: [...] field listing any subsumed bugs encountered along the way (informational; NOT part of the transitive blocker chain).
  • §06.4 Update .claude/rules/intelligence.md subcommand reference table (the table at ## How to Query) with subsumed-by and subsumes-of entries. Add usage examples.
  • §06.4 Update .claude/rules/routing.md “Relevant /query-intel queries” blurb (top of file, between frontmatter and H1) to surface subsumed-by and subsumes-of for the routing rules’ consumers (per intelligence.md §Per-rules-file /query-intel blurbs).
  • §06.5 Extend intel_repo/tests/test_rules_file_query_blurbs_drift.py (or analogous drift test) to verify subsumed-by and subsumes-of are real subcommands in scripts/intel-query.sh. Verify per-rules-file blurb citations resolve.

Test Strategy

Test matrix for graph synthesis + subcommand correctness:

DimensionCases
Synthesis inputempty subsumes: across all plans (no edges), single subsumes: entry, multi-entry across multi-plans
subsumed-by queryplan with no subsumption (empty result), plan with claims (correct list), plan-not-found (graceful)
subsumes-of queryunsubsumed bug (null), subsumed bug (correct plan), bug-not-found (graceful)
bugs-for extensionplan with blocking only, plan with subsumed only, plan with both
blocks extensionchain with no subsumption (no annotations), chain crossing subsumed bug (annotation surfaces)
Drift detectionadding subcommand to script but forgetting to update intelligence.md → drift test fails

Semantic pins:

  • Positive: plan with subsumes: [BUG-XX-NNN] in frontmatter produces a :Plan -[SUBSUMES]-> :Bug edge in the graph after intel-query.sh refresh --plans. Reverting the synthesizer causes the edge to disappear.
  • Negative: subsumption claim does NOT appear in blocks transitive chains (informational annotation only). Test that subsumption is NOT counted as a blocker.
  • Drift test gate: a future subcommand citation in a rule blurb that doesn’t resolve causes the drift test to fail. Pre-commit gate.

Intelligence Reconnaissance

(2026-05-09) Section modifies intel_repo/ synthesizers (export_json._synth_* family) and scripts/intel-query.sh (Bash CLI dispatcher); adds new subcommands subsumed-by + subsumes-of; extends drift test in intel_repo/tests/test_rules_file_query_blurbs_drift.py. intel_repo/ is a gitignored sibling of wrapper-root per CLAUDE.md §Key Paths; intel_repo/ Python source is NOT covered by the wrapper’s intel graph (the graph indexes compiler_repo/ and ori source — not the graph itself). Per compose-intel-summary.md graceful-degradation, recording self-referential graph unavailability (the graph cannot index its own infrastructure). Pre-implementation reads required: intel_repo/.../export_json.py (locate _synth_bug_blocker_edges per CLAUDE.md §Bug-Bug Blocker Chains for the canonical pattern), scripts/intel-query.sh (subcommand dispatch shape), intel_repo/tests/test_rules_file_query_blurbs_drift.py (drift-test extension pattern). Cross-references verified by direct Read: CLAUDE.md §Bug-Bug Blocker Chains (canonical precedent), intelligence.md §How to Query (subcommand-table format).

Cross-References

  • §01 — routing rule defining the SUBSUMES relationship.
  • §05 — schema fields the synthesizer reads.
  • CLAUDE.md §Bug-Bug Blocker Chains — existing :Bug -[BLOCKED_BY]-> :Bug synthesis pattern this section mirrors.
  • .claude/rules/intelligence.md — host of subcommand reference + per-rules-file blurb convention.
  • scripts/intel-query.sh — CLI surface extended.
  • intel_repo/tests/test_rules_file_query_blurbs_drift.py — drift test extended.

06.1

Author SUBSUMES edge synthesis in intel_repo (parallel to BUG-BUG BLOCKED_BY)

  • (placeholder — replace with concrete work that closes subsection 06.1)

06.2

Implement subsumed-by + subsumes-of subcommands in intel-query.sh

  • (placeholder — replace with concrete work that closes subsection 06.2)

06.3

Extend bugs-for + blocks subcommands to surface subsumption

  • (placeholder — replace with concrete work that closes subsection 06.3)

06.4

Update intelligence.md subcommand reference + per-rules-file blurbs

  • (placeholder — replace with concrete work that closes subsection 06.4)

06.5

Author / extend drift tests for subcommand existence

  • (placeholder — replace with concrete work that closes subsection 06.5)

06.R

Third Party Review Findings

  • (placeholder — replace with concrete work that closes subsection 06.R)

06.N

Completion Checklist

  • (placeholder — replace with concrete work that closes subsection 06.N)