Repository navigation
feat(ai): tighten the daily summary to one ~140-char sentence - #201
Merged
Merged
Conversation
The redesigned Inicio summary card is a compact 3-line surface, but the prompt allowed up to two sentences and ~200 chars and the model kept drifting to 3-4 sentence pep talks at the full budget. Lead with one completed habit, point at a single pending one, cap at 140 chars and 120 output tokens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Clean, well-scoped prompt-tightening. The constant (200→140) and token cap (200→120) are internally consistent — at typical token densities, 120 output tokens comfortably exceeds the 140-char hard cap, so CapToSentence remains the effective ceiling and no generated text will be truncated at the token boundary before the capper runs. CapToSentence tests are parameterized with explicit limits so they remain correct and decoupled from MaxSummaryChars. No API contract, auth, or DB changes; nothing to flag.
|
thomasluizon
added a commit
that referenced
this pull request
Jun 30, 2026
#196) (#268) * feat(api): achievement-system expansion + free-tier XP earning (#196) - Append Social/Sharing/Together achievement categories - Define 10 achievements: FirstFriend, SquadGoals, Cheerleader, ShowOff, YearInReview, TeamPlayer, MissionAccomplished, BattleBuddy (defined for siblings #197-#201) + StreakImmortal/Unstoppable (wired on streak/volume) - Add idempotent IGamificationService.TryGrantAchievementsAsync grant funnel - Add POST /api/achievements/report-event (auth, whitelisted keys: card_shared->ShowOff, wrapped_viewed->YearInReview); no Pro gate - A1: free users earn habit-log + goal XP and level up (achievements stay Pro-gated) behind the gamification_free_tier flag predicate - Data-only migration enabling gamification_free_tier - Portuguese notification strings for the 10 new achievements - Inventory report-event in the agent capability catalog Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): pin Microsoft.OpenApi to patched 2.7.5 (GHSA-v5pm-xwqc-g5wc) The Dependency Scan flags a high-severity advisory: Microsoft.AspNetCore.OpenApi 10.0.9 transitively resolves the vulnerable Microsoft.OpenApi 2.0.0 ("circular schema references may terminate OpenAPI parsing"). Pin a direct reference to the patched 2.7.5. This affects main and every open branch, not just this PR; it rides on the foundation PR so it lands on main first. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Jun 30, 2026
* feat(api): 1:1 accountability buddies (#201) Adds a 1:1 accountability-buddy system on top of the #193 social foundation: invite -> accept between two accepted friends, per-user linked-habit joins, moderated check-ins that push the buddy, a Daily/Weekly cadence, multiple pairs per user up to a cap, and either-party revoke. - Domain: AccountabilityPair / AccountabilityPairHabit / AccountabilityCheckIn entities + AccountabilityPairStatus / AccountabilityCadence enums + guards. - Application: AccountabilityPairService, 6 commands + 2 queries, FluentValidation, no-N+1 pairs query. - API: AccountabilityController (7 routes) + accountability-invites / accountability-checkins rate-limit policies. - Persistence: AddAccountabilityBuddies migration (3 tables, unique (PairId,UserId,HabitId) and (PairId,UserId,Date) indexes). - Battle Buddy award wired on pair-accept via the "battle_buddy" string id; no-ops until #196 ships the achievement definition. - Registered the new controller actions in the agent catalog. - Tests: domain entity guards + handler/validator/query unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(api): integrate main, rescaffold AddAccountabilityBuddies, grant BattleBuddy now #196 ships Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.



What
MaxSummaryChars),maxOutputTokens200 -> 120.Why
The redesigned Início summary card (navy+violet redesign) is a compact 3-line surface with a "see more" expander. The previous prompt allowed ~200 chars / two sentences and the model consistently filled the whole budget with 3-4 sentence pep talks, so every summary landed clamped. Shorter generations fix this at the source instead of leaning on the UI clamp.
Paired UI change: thomasluizon/orbit-ui-mobile#164 (summary card slimming is part of the redesign PR).
Validation
dotnet test tests/Orbit.Infrastructure.Tests— 997/997 passed (full chain compiled).CapToSentencetests pass explicit char limits, so the constant change is behavior-safe.🤖 Generated with Claude Code