feat(describe): event-handler descriptions + whole-repo overview (kb describe, 5th & 6th slices)#31
Merged
Merged
Conversation
…describe, 5th & 6th slices) DESCRIBE_KINDS gains event_handler: the generic artifact loop now writes a grounded description per extracted handler (grounding = handler span + owner/listened-to classes, cross-file); a dedicated _EVENT_FACTS_CAP because registration payloads overflow the default facts budget. The whole-repo overview closes the last describe deferred: exactly one desc:repo description per snapshot (target_kind="repo"), grounded on the BOUNDED top-level surface - top-level plain modules plus each top package's own bounded grounding set (its __init__ + direct children, the package_targets precedent; grandchildren are covered by their own nearer package overviews). It runs last in the pass and synthesizes the just-written package overviews, cross-package imports, external deps and artifact counts as context (_repo_facts), while claims still validate against the top-level code spans. New pure store.queries.repo_target; route/entity/module/package/process prompts stay byte-identical (no PROMPT_VERSION bump). semantic_grounding_test gains three tests: event-handler cross-file provenance, exactly-one repo overview grounded on exactly the top surface, and a bounded-grounding proof (a grandchild module never grounds the repo overview). Headline HARD gates stay fifteen.
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.
What
Two additive
kb describeslices in one PR, closing BOTH remaining deferreds ofkb.extract.semantic:DESCRIBE_KINDSgainsevent_handler; the generic artifact loop picks it up (desc:event:{handler_fq}), grounded on the handler span plus its owner/listened-to classes (cross-file). A dedicated_EVENT_FACTS_CAP=2000(registration payloads overflow the default 800-byte facts budget); the cap dispatch became a small dict instead of a growing ternary.desc:repodescription per snapshot (target_kind="repo"), grounded on the bounded top-level surface: top-level plain modules plus each top package's own bounded grounding set (its__init__+ direct children — thepackage_targetsprecedent, rationale documented in the new purestore.queries.repo_target). It runs last in the pass and synthesizes the just-written package overviews, cross-package import edges, external dependencies, and artifact counts as context (_repo_facts,_REPO_FACTS_CAP=8000) while claims still validate against the top-level code spans.Route/entity/module/package/process prompts stay byte-identical — no
PROMPT_VERSIONbump, no re-describe churn.Gates
semantic_grounding_testgains three tests (headline HARD gates stay fifteen):rvw/inner/impl.py) never grounds the repo overview.Local:
ruffclean,mypy --strictclean,pytest -q→ 112 passed, 1 skipped.Next
Release v0.7.0 (kb mine + these slices); events v2 (call-form) and PR-description mining stay on the roadmap.