You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(schema): standardize dependency manifests and retrieval evidence #3
The current packet dependencies object is too shallow and author_packet.py does not reliably populate actual theorem dependencies from Proof Search. Retrieval candidates, unused retrieved lemmas, obligation dependencies, transitive depth, and verified module-item dependencies are lost.
Scope
Add a versioned DependencyManifest child record with:
declared theorem dependencies
actually used theorem dependencies
Proof Search obligation dependencies
verified module-item dependencies
transitive dependency count and depth
retrieval candidates
retrieved-but-unused candidates
kits, tactic tags, and prerequisite concepts
source of each dependency claim
Acceptance criteria
Kernel-verified formal packets generated through Proof Search must reference a dependency manifest.
Actual dependency evidence is imported from verifier-backed records, not manually guessed.
Declared, retrieved, and used dependencies remain distinct.
Dependency identifiers can resolve to Mathlib declarations, MathCorpus packets, or Proof Search verified artifacts.
Validation catches dangling, cyclic, or environment-mismatched references.
Corpus manifests can aggregate dependency frequency and depth.
Implemented (local commit bcdb683, stacked on 8c74201/7f1ac10 — not yet pushed, see notes on #1/#2):
packet.schema.json gains dependency_manifest ($defs.dependency_manifest / dependency_claim_source), mirroring MCIP's DependencyManifest from feat(schema): define MathCorpus Interchange Protocol v1 for Proof Search enrichment #1. Six distinct categories — declared, used, obligation, verified_module_item, retrieval_candidate, retrieved_unused — instead of one merged list, plus per-claim source attribution (manual / proof_search_import / verifier_export).
Declared/retrieved/used stay distinct and checkable: policy.check_dependency_manifest rejects a dependency claimed both used and retrieved_unused (direct contradiction), an environment_hash mismatch against the packet's own verification.environment_hash, and any claim_sources entry not actually present in the array its category names.
Dangling and cyclic references caught: new corpus-wide policy.check_dependency_manifest_refs resolves any dependency id shaped like a MathCorpus packet_id against the loaded corpus (Mathlib declaration names aren't resolvable this way — no local Mathlib index) and detects cycles through other packets' manifests, deduplicated by edge-set so the same cycle isn't reported once per rotation.
Corpus aggregation: tools/build_manifests.py's dependency_graph.json gains a dependency_manifest_summary — frequency per dependency id per category, plus min/max/avg transitive depth.
author_packet.py fixed: it was silently dropping theorem_deps from spec input entirely (exactly the issue's own complaint) — now populated. Added optional dependency_manifest spec support so new Proof-Search-authored packets can carry this from the start.
5 elementary algebra packets migrated with dependency evidence read directly from their actual .lean proof bodies (not fabricated).
6 failure modes smoke-tested directly: environment mismatch, used/unused contradiction, unlisted claim, dangling reference, a real 2-packet cycle, and confirming the cycle report fires once (not once per rotation).
Full corpus (355 packets) + full CI-equivalent pipeline (manifests, split, dedupe, export, redaction audit) run locally end-to-end: 0 errors.
One deliberate scope note: the acceptance criterion "kernel-verified Proof-Search packets must reference a dependency manifest" is not implemented as a hard validate_packets.py gate yet. Making it one today would fail all ~350 packets authored before this field existed, breaking CI for the whole corpus on an unrelated PR. It's deferred to the #6 corpus-wide backfill (when it becomes safe to enforce universally) and documented explicitly in schema/ENUMS.md so it isn't silently dropped from the roadmap.
Tracked in agents/github_issues/DONE.md, FEATURES.md, HANDOFF.md.
Activity
Mnehmos commentedon Jul 12, 2026
Implemented (local commit
bcdb683, stacked on8c74201/7f1ac10— not yet pushed, see notes on #1/#2):packet.schema.jsongainsdependency_manifest($defs.dependency_manifest/dependency_claim_source), mirroring MCIP'sDependencyManifestfrom feat(schema): define MathCorpus Interchange Protocol v1 for Proof Search enrichment #1. Six distinct categories —declared,used,obligation,verified_module_item,retrieval_candidate,retrieved_unused— instead of one merged list, plus per-claim source attribution (manual/proof_search_import/verifier_export).policy.check_dependency_manifestrejects a dependency claimed bothusedandretrieved_unused(direct contradiction), anenvironment_hashmismatch against the packet's ownverification.environment_hash, and anyclaim_sourcesentry not actually present in the array itscategorynames.policy.check_dependency_manifest_refsresolves any dependency id shaped like a MathCorpuspacket_idagainst the loaded corpus (Mathlib declaration names aren't resolvable this way — no local Mathlib index) and detects cycles through other packets' manifests, deduplicated by edge-set so the same cycle isn't reported once per rotation.tools/build_manifests.py'sdependency_graph.jsongains adependency_manifest_summary— frequency per dependency id per category, plus min/max/avg transitive depth.author_packet.pyfixed: it was silently droppingtheorem_depsfrom spec input entirely (exactly the issue's own complaint) — now populated. Added optionaldependency_manifestspec support so new Proof-Search-authored packets can carry this from the start..leanproof bodies (not fabricated).One deliberate scope note: the acceptance criterion "kernel-verified Proof-Search packets must reference a dependency manifest" is not implemented as a hard
validate_packets.pygate yet. Making it one today would fail all ~350 packets authored before this field existed, breaking CI for the whole corpus on an unrelated PR. It's deferred to the #6 corpus-wide backfill (when it becomes safe to enforce universally) and documented explicitly inschema/ENUMS.mdso it isn't silently dropped from the roadmap.Tracked in
agents/github_issues/DONE.md,FEATURES.md,HANDOFF.md.feat(schema): standardize dependency manifests and retrieval evidence (…
feat(metrics): add multi-model empirical difficulty and native analyt…