propose: hints-v3 — kind/direction-aware empty-result hints driven by EDGE_SCHEMA#154
Conversation
…s-order doc Adds propose/HINTS-V3-PROPOSE.md (draft) and docs/PROPOSES-ORDER.md. HINTS-V3 replaces the generic TPL_NEIGHBORS_EMPTY_KIND_CHECK with a family of four templates (wrong subject kind, wrong direction, type-level-requery, brownfield-resolver-absence) driven by EDGE_SCHEMA from SCHEMA-V2. Implementation = SCHEMA-V2 PR-D. This propose unblocks PR-D per SCHEMA-V2 Decision 30 by existing as a draft PR. docs/PROPOSES-ORDER.md records the lock + merge order for the in-flight SCHEMA-V2 + HINTS-V3 set (4 code PRs, A→B→C→D, sequential).
Align merge gates with SCHEMA-V2 Decision 30 (draft before PR-A, lock before PR-D). Fix structural hint evaluation order so wrong-direction cases (HV5/HV6) are reachable. Use PRIORITY_META, role-keyed typical_traversals, and §3.6 neighbors payload contract. Co-authored-by: Cursor <cursoragent@cursor.com>
HumanBean17
left a comment
There was a problem hiding this comment.
Review (addressed in ac65097)
Solid framing and HV table; the propose is the right companion to SCHEMA-V2. The first draft had several internal contradictions and one cross-doc gate mismatch — all fixed on this branch.
Blockers fixed
-
Merge gates vs SCHEMA-V2 Decision 30 — §6 and
docs/PROPOSES-ORDER.mdincorrectly required HINTS-V3 locked before PR-A. Decision 30 only requires a draft propose merged before PR-A; lock is required before PR-D. Phase 1/3 text updated accordingly. -
Structural hint algorithm (HV5/HV6) — Checking only the requested-direction endpoint made
Client+HTTP_CALLS+inhit wrong-subject instead of wrong-direction. Replaced with a fixed three-step order: alien kind (neither endpoint) → wrong direction (opposite endpoint) → type-level requery. §3.2, §3.3, Decision 3 updated. -
TPL_NEIGHBORS_TYPE_LEVEL_REQUERYvs Principle 1 — Template hardcodedDECLARES. Now uses{canonical_traversal}fromtypical_traversals["type_subject"]only; §3.5 locks role-keyed map shape for PR-A. -
member_onlycontradiction — §3.4 listed post-flip HTTP/ASYNC undermember_onlywhile §8 said Symbol-only edges. Unified:member_onlyis for type-level Symbol → method-level Symbol edges only; post-flip Client/Producer edges use row 1 (wrong subject) for method subjects. -
PRIORITY_LEAF_FOLLOWUPclaim — Shipped v1/v2 empty-neighbors hints usePRIORITY_META=1. Decision 5 and Principle 6 corrected. -
neighborshint payload — Added §3.6: PR-D must passrequested_direction,origin_id, andsubject_recordintogenerate_hints(not in payload today). Multi-id: hints useorigins[0].
Other fixes
- Removed invalid
direction='any'/ HV18; replaced with Route +DECLARES(row 1). - HV19 clarified: ∃
(edge, subject, direction)coverage per edge in CI — not “every empty query gets a hint”. - Principle 8: brownfield empty hint is an explicit exception to structural-only framing (HV13/HV14).
- Principle 4: fuzzy vs brownfield hints are branch-exclusive on one call.
- PR-D test list now includes HV9, HV11, HV12.
- Removed duplicate Appendix A template block; review traceability in Appendix A.
- Dropped “Perplexity Computer” author credit.
Verdict
Approve as draft propose PR — satisfies SCHEMA-V2 Decision 30 (draft merged unblocks PR-A). Move Status to locked after plan review, before PR-D implementation starts.
TL;DR and Decision 15 now match §6: merged to master before PR-A. HV16 uses Client + HTTP_CALLS post-flip (method Symbol cannot be non-empty on ASYNC_CALLS after the flip). Co-authored-by: Cursor <cursoragent@cursor.com>
Status: draft
Adds
propose/HINTS-V3-PROPOSE.mdanddocs/PROPOSES-ORDER.md.What this propose does
Replaces the generic
TPL_NEIGHBORS_EMPTY_KIND_CHECKinmcp_hints.pywith a family of four templates driven byEDGE_SCHEMA(introduced in SCHEMA-V2):TPL_NEIGHBORS_WRONG_SUBJECT_KIND— subject node kind isn't inEdgeSpec.src(or.dstfordirection='in').TPL_NEIGHBORS_WRONG_DIRECTION— kind matches the opposite endpoint of the requested direction.TPL_NEIGHBORS_TYPE_LEVEL_REQUERY— subject is a type-kind Symbol, edge lives on methods.TPL_NEIGHBORS_BROWNFIELD_RESOLVED_MAYBE_UNRESOLVED— requested edge hasEdgeSpec.brownfield_resolver_sourced=True(consumes the newBROWNFIELD_RESOLVER_STRATEGY_SETfrom SCHEMA-V2 Decision 28).The v2
TPL_NEIGHBORS_FUZZY_STRATEGYhint stays unchanged. Hints v3 readsBROWNFIELD_RESOLVER_STRATEGY_SETviaEdgeSpec.brownfield_resolver_sourced, not by enumerating the set directly.Why it exists as its own propose
SCHEMA-V2 Decision 30 makes PR-D (the implementation of hints v3) gated on
HINTS-V3-PROPOSE.mdexisting as a draft PR. Shipping the v2 graph shape without v3 hints leaves the wrong-subject-kind footgun (e.g. agent holds method id, asksHTTP_CALLSoutbound post-flip, gets[]with no guidance toDECLARES_CLIENT).Implementation
1 code PR = SCHEMA-V2 PR-D. Sequencing recorded in
docs/PROPOSES-ORDER.md:Use-case re-walk
20 named cases (HV1–HV20) covering structural-mismatch hits, structural-mismatch misses (HV8/HV9/HV11 — graph state, not structural), brownfield-resolver absence (HV4/HV13/HV14), and
EDGE_SCHEMAcoverage invariant (HV19).What this deliberately does NOT do
Bespoke per-edge prose; multi-hop composition planning; reasoning about graph state; dot-key edge labels in recommendations (forbidden by v2 invariant); caching; localization.
Decisions taken
14 locked decisions, including:
TPL_NEIGHBORS_EMPTY_KIND_CHECKis deleted, not extended.PRIORITY_LEAF_FOLLOWUP=2for all four new templates — same as the v1 template they replace.EDGE_SCHEMA[e].typical_traversals.EdgeSpec.member_only: boolfield (hint-engine-only; preferable to land in SCHEMA-V2 PR-A).Files
propose/HINTS-V3-PROPOSE.md— the propose.docs/PROPOSES-ORDER.md— lock + merge sequence for SCHEMA-V2 + HINTS-V3.Marking as draft per the propose-doc-author convention; will move
Statustounder reviewafter first review-round feedback.