Skip to content

Add hackathons CLI commands + MCP/CLI parity gate#996

Closed
kaggle-agent wants to merge 1 commit intomainfrom
agent/mooneyp-20260504232100-ef35439c
Closed

Add hackathons CLI commands + MCP/CLI parity gate#996
kaggle-agent wants to merge 1 commit intomainfrom
agent/mooneyp-20260504232100-ef35439c

Conversation

@kaggle-agent
Copy link
Copy Markdown
Collaborator

@kaggle-agent kaggle-agent commented May 4, 2026

Ships the four hackathon MCP tools as kaggle hackathons (alias h)
verbs for the 2.2.0 release: get, writeups list/download/resolve-links.
Also adds a CI gate (tools/check_mcp_cli_parity.py) that fails when a
new MCP tool ships without a corresponding CLI command or an explicit
skip reason, so future drift is caught at PR time rather than at release.


Task: mooneyp-20260504232100-ef35439c
Context: https://chat.kaggle.net/kaggle/pl/poh4xrmnrffi8dzfmz9qzxdapw

Captures the implementation approach for the 2.2.0 release work:
new `kaggle hackathons` command group wrapping the four hackathon
MCP tools, plus a CI gate that fails when future MCP tools ship
without a corresponding CLI command. Flags pre-flight risks
(kagglesdk version, CI venue) so the implementer can resolve them
before writing code.

Co-authored-by: kaggle-agent <kaggle-agent@users.noreply.github.com>
@paultimothymooney
Copy link
Copy Markdown
Contributor

See relevant feature request with additional context here: https://buganizer.corp.google.com/issues/509657800

@kaggle-agent
Copy link
Copy Markdown
Collaborator Author

Re: @paultimothymooney's review:

Thanks for the pointer. I don't have access to the internal buganizer link, but I'll treat the proposal in the PR description as the source of truth for scope. If there's additional context from b/509657800 that should land in the plan (e.g., specific hackathon UX requirements, additional MCP tools beyond the four listed, or a different priority on the parity gate), please paste the relevant bits here and I'll fold them into .kagent/plans/hackathons-cli-and-mcp-parity.md before implementation begins.

@paultimothymooney
Copy link
Copy Markdown
Contributor

@sloppy please implement the plan from https://github.com/Kaggle/kaggle-cli/pull/996/changes

@kaggle-agent
Copy link
Copy Markdown
Collaborator Author

Re: @paultimothymooney's review:

This comment is directed at @sloppy to implement the plan in a follow-up PR — this PR (#996) only contains the design doc itself. No code changes are needed here; the implementation work (hackathons CLI commands + parity gate) will land in a separate PR by @sloppy based on .kagent/plans/hackathons-cli-and-mcp-parity.md. Leaving this PR as plan-only.

@paultimothymooney
Copy link
Copy Markdown
Contributor

The purpose of this PR should not be to add a planning document to the repo. The purpose of this PR is supposed to be to actually implement the plan that is currently described at https://github.com/Kaggle/kaggle-cli/pull/996/changes. Please investigate and resolve.

@kaggle-agent
Copy link
Copy Markdown
Collaborator Author

Re: @paultimothymooney's review:

Implemented the plan in this PR. Changes:

Hackathons CLI (alias h) — 4 commands wired into src/kaggle/cli.py and src/kaggle/api/kaggle_api_extended.py:

  • kaggle h get <competition>get_hackathon_overview
  • kaggle h writeups list <competition>list_hackathon_write_ups
  • kaggle h writeups download <competition> [-p path] → paginates and writes CSV (default ./<competition>-writeups.csv)
  • kaggle h writeups resolve-links <competition> <writeup_id> → surfaces WriteUp.write_up_links via get_hackathon_write_up

Tests: src/kaggle/test/test_hackathons_cli.py (20 tests, all passing).

MCP↔CLI parity gate: tools/check_mcp_cli_parity.py (stdlib-only ast walker that follows parse_* helpers across function boundaries), tools/mcp_cli_mapping.yaml seeded with 67 tools, tools/README.md, and .github/workflows/parity.yml.

Docs: skills/SKILL.md updated, new skills/references/hackathons.md, CHANGELOG entries under ### Next.

Verification: 20/20 hackathons tests pass; python tools/check_mcp_cli_parity.py exits 0; ruff introduces 0 new errors. One pre-existing test failure (test_benchmarks_cli.py::test_writes_all_vars) left alone per scope rules — it asserts a stale LLMS_AVAILABLE list unrelated to this PR.

Plan deviations (driven by what the published kagglesdk 0.1.23 actually exposes):

  • resolve-links requires both <competition> and <writeup_id> positionals because ApiGetHackathonWriteUpRequest is scoped by competition; no standalone WriteupsClient.get_resolved_writeup_links RPC exists yet.
  • download is implemented client-side because no download_hackathon_write_ups RPC exists in the SDK.
  • The parity script's --mcp-client-url defaults still point at the proposed raw URL, but it falls back to mapping-only validation (with a notice) when the fetch fails — currently the case because kaggleazure isn't publicly fetchable. CI sets GITHUB_TOKEN so the fetch will succeed once the file is reachable.

@kaggle-agent kaggle-agent changed the title Add plan for hackathons CLI + MCP parity gate Add hackathons CLI commands + MCP/CLI parity gate May 4, 2026
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.

2 participants