feat: add CreateSubHabit AI action + refactor SystemPromptBuilder#9
Merged
Conversation
Add CreateSubHabit action type enabling the AI chat to add sub-habits to existing parent habits. Previously, the AI could only create new top-level habits with inline sub-habits. Backend changes: - Add CreateSubHabit to AiActionType enum - Add dispatch case + ExecuteCreateSubHabitAsync in ProcessUserChatCommand that delegates to existing CreateSubHabitCommand via MediatR - Refactor SystemPromptBuilder: extract monolithic 560-line method into 9 section methods with a PromptContext record - Add CreateSubHabit capability, rule, example, and usage docs to AI prompt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Jul 4, 2026
This was referenced Jul 12, 2026
fix(api): apply eligible banked freeze during streak recalculation to close the hourly-job race
#383
Merged
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
CreateSubHabitaction type so the AI chat can add sub-habits to existing parent habits (previously could only create new top-level habits with inline sub-habits)SystemPromptBuilder: extract monolithic 560-line method into 9 section methods with aPromptContextrecord (no output change)ExecuteCreateSubHabitAsyncdelegates to existingCreateSubHabitCommandvia MediatR, reusing all validation (Pro check, parent ownership, depth limit, frequency inheritance)Test plan
dotnet buildsucceeds (0 warnings, 0 errors)🤖 Generated with Claude Code