[claude] Implement Kimi delegation for heavy research via Gitea labels (#979) #1085
Reference in New Issue
Block a user
Delete Branch "claude/issue-979"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #979
What this does
Implements the full Kimi delegation pipeline for heavy research tasks:
exceeds_local_capacity()— heuristic using keyword detection + word-count threshold to decide when to delegate_build_research_template()— fills a structured markdown body for the Gitea issuecreate_kimi_research_issue()— creates a Gitea issue labelledkimi-ready(auto-creates the label if missing)poll_kimi_issue()— monitors the issue until Kimi closes it or a timeout is reachedindex_kimi_artifact()— stores Kimi's artifact into Timmy's semantic memory viastore_memory()extract_and_create_followups()— parses checkbox/numbered/Action: items and files follow-up Gitea issuesdelegate_research_to_kimi()— top-level entry point used by agentsTests
Adds
tests/unit/test_kimi_delegation.pywith 57 tests covering all pure functions and async paths (httpx, settings, and memory_system mocked).Delegation flow
exceeds_local_capacity()returns Truedelegate_research_to_kimi()fills templatecreate_kimi_research_issue()createskimi-readyissuepoll_kimi_issue()detects closed stateindex_kimi_artifact()stores to semantic memoryextract_and_create_followups()creates next steps