Skip to content

feat(mcp): route ideas through intake into a loop claim plan - #5795

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:feat/idea-claim-plan
Jul 14, 2026
Merged

feat(mcp): route ideas through intake into a loop claim plan#5795
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:feat/idea-claim-plan

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

Summary

Implements #4799 — the deterministic hand-off from idea intake (#4798) to the claim/code/submit loop. A submitted idea becomes a scored task-graph and is then dispositioned into what the loop can claim now vs defer vs skip, so intake output flows toward real execution without a manual step.

  • new buildClaimPlan(taskGraph, targetRepo) in packages/loopover-engine/src/idea-intake.ts (pure): routes each constituent issue by its already-computed feasibility verdict — goclaimable, raisedeferred (held on a prerequisite or its own quality), avoidskipped — preserving the graph's dependency-respecting order so a prerequisite is always claimed before its dependents, and carrying the target repo the loop will act on. It decides what to claim; the loop does the claiming/running (no IO). Per-issue scoring is factored into a shared scoreIssue helper reused by scoreTaskGraph (no behavior change — the existing suite is unchanged and green).
  • new loopover_plan_idea_claims MCP tool (src/mcp/server.ts): idea → task-graph → claim plan, reusing the intake input schema; a malformed/empty submission returns an actionable error list.

Closes #4799

Scope

  • Conventional Commit title (feat(mcp): …).
  • Focused: the claim-plan hand-off + its tool, building directly on the merged Idea-intake API/MCP tool #4798 bridge.
  • Follows CONTRIBUTING.md; no site//CNAME/VitePress.
  • Linked open issue: Closes #4799.

Validation

  • git diff --check
  • npm run typecheck clean
  • npm --workspace @loopover/engine run build + npm run build:mcp (compile clean)
  • npm run test:coverage on the changed code: packages/loopover-engine/src/idea-intake.ts 100% lines & branches (86/86); the new src/mcp/server.ts handler + schema + registration are fully covered (statements and both branch sides).
  • MCP tool-invariant suites pass with the new tool (mcp-output-schemas "outputSchema on EVERY tool" + "schema-valid structured content", mcp-cli-tools).
  • Tests cover the claimable/deferred/skipped split, dependency-hold ordering, carried target repo, and the malformed-input path — end-to-end through the MCP tool.

If any required check was skipped, explain why:

  • Full test:ci not run end-to-end locally (Linux-only shell/self-host steps on this Windows box); the change-relevant gates above were validated directly.

Safety

  • No secrets, wallet/hotkey/coldkey, trust scores, rewards, private rankings, or private maintainer evidence — metadata-only, source-free; the plan never mints gittensor:priority.
  • No auth/cookie/CORS/GitHub App/session change (pure function over caller-supplied data).
  • MCP behavior added + tested (output schema + schema-valid content).
  • No UI changes; no changelog edit.

Implements JSONbored#4799: the deterministic hand-off from idea intake (JSONbored#4798) to the claim/code/submit
loop. A submitted idea is turned into a scored task-graph and then dispositioned into what the loop
can claim now versus defer versus skip, so intake output flows toward real execution without a
manual step.

- new buildClaimPlan(taskGraph, targetRepo) in packages/loopover-engine/src/idea-intake.ts (pure):
  routes each constituent issue by its already-computed feasibility verdict -- go -> claimable,
  raise -> deferred (held on a prerequisite or its own quality), avoid -> skipped -- preserving the
  graph's dependency-respecting order so a prerequisite is always claimed before its dependents, and
  carrying the target repo the loop will act on. No IO, no claiming: it decides what to claim, the
  loop does the claiming/running. The per-issue scoring is factored into a shared scoreIssue helper
  reused by scoreTaskGraph (no behavior change).
- new loopover_plan_idea_claims MCP tool (src/mcp/server.ts): idea -> task-graph -> claim plan,
  reusing the intake input schema; a malformed/empty submission returns an actionable error list.
- tests cover the claimable/deferred/skipped split, the dependency-hold ordering, the carried target
  repo, and the malformed-input path, end-to-end through the MCP tool.

Closes JSONbored#4799
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.10%. Comparing base (b83d060) to head (e36b571).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5795   +/-   ##
=======================================
  Coverage   95.10%   95.10%           
=======================================
  Files         583      583           
  Lines       46399    46419   +20     
  Branches    14838    14841    +3     
=======================================
+ Hits        44128    44148   +20     
  Misses       1515     1515           
  Partials      756      756           
Flag Coverage Δ
shard-1 43.74% <8.00%> (-0.02%) ⬇️
shard-2 36.23% <68.00%> (+<0.01%) ⬆️
shard-3 32.11% <8.00%> (-0.01%) ⬇️
shard-4 32.85% <8.00%> (-0.01%) ⬇️
shard-5 31.63% <8.00%> (-0.01%) ⬇️
shard-6 44.53% <92.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-engine/src/idea-intake.ts 100.00% <100.00%> (ø)
src/mcp/server.ts 95.84% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-14 17:06:40 UTC

5 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR extracts `scoreIssue` from `scoreTaskGraph` (pure refactor, no behavior change) and adds `buildClaimPlan`, which routes a scored task-graph's issues into claimable/deferred/skipped by re-deriving each issue's verdict via the same `scoreIssue` helper — correctly avoiding a second decision surface. A new `loopover_plan_idea_claims` MCP tool wires idea validation → task-graph → claim plan, mirroring the existing `intakeIdea` handler's error-path shape. Tests cover the dependency-hold and least-favorable-verdict cases end-to-end, and the diff cleanly maps to its stated intent (closing #4799) building directly on the merged #4798 bridge.

Nits — 5 non-blocking
  • The magic-number flag on `idea-intake.ts:140` is a false positive — the `5` there is inside a doc comment referencing 'Rule 5 (spec §2)', not a numeric literal in code.
  • `buildClaimPlan` calls `scoreIssue` independently of `graph.rubric.perIssue`, which was already computed by `scoreTaskGraph` in `buildTaskGraph` — recomputing is harmless since `scoreIssue` is pure and cheap, but consider reusing `graph.rubric.perIssue` directly to avoid the redundant pass, per idea-intake.ts:255.
  • codecov/patch failed at 92% vs 99% target — worth checking which changed line/branch is uncovered before merge, likely in src/mcp/server.ts's new handler or schema.
  • packages/loopover-engine/src/idea-intake.ts:255 — index `graph.rubric.perIssue` by `issue.key` instead of re-calling `scoreIssue`, to keep buildClaimPlan as a pure router over an already-scored graph rather than a second scoring pass.
  • Confirm the codecov/patch gap (92% vs 99%) isn't hiding an untested branch in the new `planIdeaClaims` handler in src/mcp/server.ts.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4799
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 91 registered-repo PR(s), 37 merged, 39 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 91 PR(s), 39 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence. LLM value judgment: moderate — The change delivers a small, well-scoped, dependency-order-respecting hand-off from scored intake output to a loop-claimable plan, directly closing the linked issue #4799 with full test coverage on the pure logic.
Linked issue satisfaction

Partially addressed
The PR builds a claim/code/submit disposition (claimable/deferred/skipped) from the task-graph and exposes it via a new MCP tool, which is real progress toward the wiring #4799 asks for, but it only produces a plan — it does not actually run a claim/code/submit loop against the target repo, so the acceptance criterion of "a submitted idea results in a running loop" is not yet met.

Review context
  • Author: luciferlive112116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 91 PR(s), 39 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 48d2a39 into JSONbored:main Jul 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task-graph → claim → code → submit wiring

1 participant