Skip to content

feat(describe): event-handler descriptions + whole-repo overview (kb describe, 5th & 6th slices)#31

Merged
v0ropaev merged 1 commit into
masterfrom
feat/describe-repo-events
Jul 8, 2026
Merged

feat(describe): event-handler descriptions + whole-repo overview (kb describe, 5th & 6th slices)#31
v0ropaev merged 1 commit into
masterfrom
feat/describe-repo-events

Conversation

@v0ropaev

@v0ropaev v0ropaev commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

Two additive kb describe slices in one PR, closing BOTH remaining deferreds of kb.extract.semantic:

  1. Event-handler descriptionsDESCRIBE_KINDS gains event_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.
  2. Whole-repo overview — 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, rationale documented in the new pure store.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_VERSION bump, no re-describe churn.

Gates

semantic_grounding_test gains three tests (headline HARD gates stay fifteen):

  • event-handler description with cross-file provenance == {hooks.py, db.py};
  • exactly one repo overview, provenance == exactly the top package + its direct children (set equality);
  • bounded-grounding proof: a grandchild module (rvw/inner/impl.py) never grounds the repo overview.

Local: ruff clean, mypy --strict clean, 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.

…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.
@v0ropaev v0ropaev merged commit 7df0e21 into master Jul 8, 2026
4 checks passed
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