Skip to content

plan: HINTS-STRUCTURED — machine-parseable next-action objects#207

Merged
HumanBean17 merged 2 commits into
masterfrom
plan/hints-structured
May 23, 2026
Merged

plan: HINTS-STRUCTURED — machine-parseable next-action objects#207
HumanBean17 merged 2 commits into
masterfrom
plan/hints-structured

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

Scope

Deliverable File
Plan plans/PLAN-HINTS-STRUCTURED.md
Agent prompts plans/AGENT-PROMPTS-HINTS-STRUCTURED.md

Key decisions

  • Single generate_hints returning (list[str], list[StructuredHint]) — unified trigger logic, no parallel generators.
  • Lightweight internal hint type in mcp_hints.py (avoids circular import with mcp_v2.py).
  • actionable: bool flag distinguishes direct tool calls (True) from advisory/partial hints (False).
  • Backward compatible: hints: list[str] unchanged; hints_structured is additive.
  • No ontology bump, no re-index.

Links

🤖 Generated with Claude Code

Plan for issue #195 item 7 — machine-parseable `hints_structured` field
alongside existing `hints: list[str]` road signs on all five MCP outputs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Owner Author

@HumanBean17 HumanBean17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan Review

Overall this is a well-structured plan. One correctness issue and a few suggestions:

Correctness: frozenset(args.items()) will break on nested dicts

The plan specifies dedup key as (tool, frozenset(args.items())). This fails when args contains nested dicts — and the plan already includes such cases (e.g. args={"filter": {"path_prefix": seed}} from resolve → find route, args={"filter": {"role": "SERVICE"}} from search weak-score). frozenset on a dict value raises TypeError.

Suggest using json.dumps(args, sort_keys=True) as the dedup key instead, or flattening args before hashing.

Suggestions

  1. Neighbors empty structural hints — the mapping is flagged as medium-severity in the risk table but doesn't include a concrete args shape. Adding 1-2 examples would remove ambiguity during implementation.

  2. resolve_v2 model_copy pattern — this call site is called out as special (uses model_copy(update=...) instead of direct construction) but the plan doesn't show the before/after. A one-liner (model_copy(update={"hints": str_hints, "hints_structured": struct_hints})) in the plan would prevent confusion.

  3. Proposal lifecycle — the plan status says "active (planning)" while the agent prompt's definition of done says "Proposal — locked." Clarify whether locking happens when the plan merges or when implementation starts.

Otherwise looks good — backward compatibility, circular import prevention, parity invariant, and test coverage are all solid.

…model_copy, proposal lifecycle

- Fix dedup key from frozenset(args.items()) to json.dumps(args, sort_keys=True)
  — handles nested dicts like {"filter": {"path_prefix": ...}}
- Add concrete args examples for neighbors empty structural hints (v3)
- Show explicit before/after for resolve_v2 model_copy call site
- Clarify proposal lock timing: locks when plan PR merges, not during implementation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 11aa187 into master May 23, 2026
1 check passed
@HumanBean17 HumanBean17 deleted the plan/hints-structured branch May 24, 2026 12:08
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