feat(mcp): add miner planning prompts - #342
Merged
JSONbored merged 2 commits intoJun 3, 2026
Merged
Conversation
Registers 4 advisory MCP prompts covering the key miner planning workflows. Every prompt is discovery-ready, instructs the agent to present findings for human review, and contains no forbidden language (wallet, hotkey, seed phrase, private scoreability, reward estimates). Prompts added: - gittensory_select_contribution_issue: ranks open issues by lane fit, issue quality, and queue signals; uses get_issue_quality + explain_repo_decision. No GitHub writes. - gittensory_draft_contribution_pr_packet: prepares a public-safe PR packet from cached lane and decision signals; uses get_repo_context + get_decision_pack. No GitHub writes. - gittensory_preflight_contribution_branch: assesses branch readiness before opening a PR; uses get_repo_context + explain_repo_decision. No GitHub writes. - gittensory_plan_cleanup_first: identifies open PRs to address before starting new work; uses monitor_open_prs + get_decision_pack. No GitHub writes. test/unit/mcp-miner-prompts.test.ts (new, 11 tests): - Discovery: all 4 prompts listed, gittensory_ prefix, stable inventory, descriptions free of forbidden terms, unknown prompt fails safely. - Content safety: each prompt's returned messages are individually verified against FORBIDDEN_PROMPT_TERMS and FORBIDDEN_REQUEST_PATTERNS. - Advisory-only: all prompts explicitly instruct against creating issues, PRs, comments, or labels — verified by regex assertion. - No secret requests: message text must never mention wallet, hotkey, token, seed phrase, private key, or password.
JSONbored
approved these changes
Jun 3, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@web-dev0521 this is ready from the current-main diff.
A few notes:
- The miner-planning prompts are scoped to the MCP prompt surface and covered by tests.
- The main thing to watch is merge order with the adjacent MCP prompt/resource PRs.
- This can land first, and the overlapping prompt PRs should rebase after it.
No code changes requested.
Validation expected:
- Keep the MCP/unit suite green through merge.
Closed
12 tasks
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server.registerPrompt()insrc/mcp/server.tstest/unit/mcp-miner-prompts.test.ts(11 tests) with discovery fixtures and content safety assertionsScope
CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typecheck— cleannpm run test:coveragelocally — 783 pass (1 skipped); pre-existing Windows failures confirmed onmainbefore this branch; coverage stays above 97%npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run build:mcpandnpm run test:mcp-packrequire the local MCP environment; unit tests cover the server-side prompt registration and contentSafety
client.listPrompts()andclient.getPrompt()withInMemoryTransport.Notes
Prompt inventory:
gittensory_select_contribution_issueget_issue_quality,explain_repo_decisiongittensory_draft_contribution_pr_packetget_repo_context,get_decision_packgittensory_preflight_contribution_branchget_repo_context,explain_repo_decisiongittensory_plan_cleanup_firstmonitor_open_prs,get_decision_packTest structure (11 tests):
gittensory_prefix, stable inventory, descriptions forbidden-term-free, unknown prompt throwsFORBIDDEN_PROMPT_TERMSandFORBIDDEN_REQUEST_PATTERNS