Skip to content

feat: add Claude AI integration (NL task creation, subtask generation, scheduling, import) - #2523

Draft
JadeJitsu wants to merge 21 commits into
alainm23:mainfrom
JadeJitsu:worktree-claude-ai-integration
Draft

feat: add Claude AI integration (NL task creation, subtask generation, scheduling, import)#2523
JadeJitsu wants to merge 21 commits into
alainm23:mainfrom
JadeJitsu:worktree-claude-ai-integration

Conversation

@JadeJitsu

Copy link
Copy Markdown

Summary

  • Adds Claude API integration across four UI surfaces: quick-add bar (natural language task parsing), task row inline button (subtask generation), AI assistant bottom sheet (prioritize/schedule today's tasks), and import dialog (MD/JSON file → project/section/task hierarchy via Claude)
  • Implements a layered core/Services/AI/ service folder (Claude.vala HTTP client, Prompts.vala templates, TaskParser, ImportMapper with 50KB chunking, Scheduler) — all network code isolated to one file
  • Adds Claude preferences page with API key storage (libsecret + ANTHROPIC_API_KEY env var), model selector (Haiku/Sonnet/Opus), and connection status badge

Design

Full design spec and implementation plan are in docs/superpowers/specs/ and docs/superpowers/plans/.

New files

File Purpose
core/Services/AI/Claude.vala HTTP client, API key resolution
core/Services/AI/Prompts.vala Prompt templates
core/Services/AI/TaskParser.vala NL → Item; subtask generation
core/Services/AI/ImportMapper.vala File → ImportResult (chunked)
core/Services/AI/Scheduler.vala Scheduling suggestions
src/Widgets/ClaudeStatusBadge.vala 3-state status indicator
src/Views/AI/AssistantPanel.vala Adw.BottomSheet assistant
src/Dialogs/ImportDialog.vala Adw.Dialog import flow
src/Dialogs/Preferences/Pages/Claude.vala Preferences page

Test plan

  • Set ANTHROPIC_API_KEY env var — status badge turns green in Preferences → Claude AI
  • Quick-add: type "buy groceries tomorrow at 5pm high priority", click ✦ toggle + submit — fields populate with parsed date/priority
  • Task row: hover any task → ✦ button appears → click → subtask popover shows
  • Sidebar wand button → bottom sheet opens → Prioritize/Schedule → preview with reasons → Apply
  • Menu → Import Tasks… → select a .md checklist → preview tree → Import all
  • With no API key: ✦ buttons are hidden (quick-add) or dimmed (task rows); status badge is amber
  • Build: meson setup build && ninja -C build (requires GNOME build deps)

Notes

  • Build tools (meson/valac) were not available in the development environment — compilation was not verified. Code follows existing project patterns throughout.
  • Assisted by AI (Claude Sonnet 4.6 via Claude Code)

🤖 Generated with Claude Code

JadeJitsu and others added 21 commits May 29, 2026 17:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Claude AI preferences page with API key entry, model selector,
and connection test. Registers the page in PreferencesWindow and wires
it to a new row in the personalization group.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the AssistantPanel stub with a full Adw.BottomSheet implementation
wired into MainWindow — sidebar wand button opens the sheet, and the sheet
wraps the main toast overlay content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Dialogs.ImportDialog (two-page stack: file picker → preview),
registers it in meson.build, and exposes it via an "Import Tasks…"
menu item in MainWindow.build_menu_app().
…eedback, fix priority example

- ClaudeStatusBadge: track and disconnect status_changed signal handler in destructor
- AssistantPanel: track and disconnect status_changed signal handler in destructor
- QuickAddCore: show error visual feedback (red border + info icon) when AI parse fails
- Claude preferences: add show_apply_button to API key password entry
- Prompts: fix JSON example priority from 4 (urgent) to 1 (none) as default

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Translation files need updating

  • Apply translation updates

@byquanton
byquanton marked this pull request as draft June 8, 2026 18:57
@alainm23

alainm23 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Hey, thanks for the interest in contributing! This is an interesting concept, but I have a few concerns before we can move forward:

Immediate blocker:

  • CI checks are failing — please make sure the build passes before requesting review. The PR description mentions compilation was not verified, which is a requirement for any contribution.

Broader concerns:

  • This is a very large PR (9+ new files, new service layer, multiple UI surfaces) — it would be much easier to review if broken into smaller, incremental PRs.
  • Hardcoding a specific proprietary AI vendor (Claude/Anthropic) into the app raises questions about maintainability, user privacy, and alignment with the project's goals. Has this been discussed in an issue first?
  • The AI disclosure states the code was fully AI-generated and never compiled. We'd need confidence that the contributor understands and can maintain the code they're submitting.

I'd suggest:

  1. First, fix the CI failures so it at least builds
  2. Open a discussion/issue about whether AI integration is something the project wants, and if so, what shape it should take
  3. If approved, break this into smaller PRs (e.g., start with just the service layer + preferences page)

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