Skip to content

feat: add stances, own views, volunteer, message doing and view checks - #196

Merged
SummonShenron merged 1 commit into
mainfrom
sonic/working-changes-2026-11-27
Nov 27, 2026
Merged

SummonShenron merged 1 commit into
mainfrom
sonic/working-changes-2026-11-27

Conversation

@SummonShenron

Copy link
Copy Markdown
Owner

feat: add stances, own views, volunteer, message doing and view checks

Opened with Sonic Assistant.

Co-authored-by: Sonic Assistant <sonic-assistant@users.noreply.github.com>
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
saapp Ready Ready Preview Nov 27, 2026 11:45pm UTC

@SummonShenron

Copy link
Copy Markdown
Owner Author

Sonic Assistant PR Overview

Summary

This PR introduces a system for Sonic to hold and express personal views, stances, and adaptive behaviors based on user interaction history. It enables Sonic to answer when asked for its opinion, maintain consistency in its views, and learn which reply strategies correlate with positive user engagement.

What changed

  • View Management: Added backend/utils/view_check.py to detect when a user asks for an opinion and backend/utils/own_views.py to store and recall Sonic's previously stated views to ensure consistency.
  • Stances: Added backend/utils/stances.py and backend/components/sonic_stances.py to provide a registry of approved personal stances that Sonic can offer when a view is requested.
  • Adaptive Learning: Added backend/utils/what_lands.py to track which reply types (e.g., views, stances, low moves) lead to positive user outcomes, allowing app.py to prioritize effective strategies.
  • Integration: Updated app.py to incorporate these utilities into the prompt generation flow, including logic to record outcomes and recall stored views or stances.
  • Changelog: Updated backend/components/sonic_changelog.py to reflect these new capabilities.

Where to look

  • backend/utils/own_views.py: Review the recall and note functions to understand how view persistence is managed and scoped per user.
  • backend/utils/what_lands.py: Examine order and record to see how the system dynamically adjusts reply strategies based on user feedback.
  • app.py: Observe how the new utilities are injected into the prompt construction and how what_lands is used to influence low_moves.choose.

Risks and gaps

  • Database Indexing: backend/utils/own_views.py attempts to create MongoDB indexes on the fly; if index creation fails, it logs a warning but continues, which could lead to performance degradation over time.
  • Memory Usage: own_views.py limits storage to MAX_PER_PERSON (40) documents, but there is no explicit check for the size of the words bag beyond MAX_WORDS_KEPT.
  • Error Handling: Several utilities (e.g., what_lands.record) use broad try-except blocks that log warnings but do not propagate errors, potentially masking underlying database connectivity issues.

Not fully covered by this overview (diff cut short: app.py, backend/components/sonic_stances.py; not read: backend/utils/volunteer.py, backend/utils/top_tier.py, backend/utils/message_doing.py, backend/utils/low_moves.py, backend/utils/app_utils.py, backend/utils/support_choice.py, backend/models/models.py, backend/utils/placement.py, ...).

Updated for commit 8fd4bce

@SummonShenron
SummonShenron merged commit 36f9463 into main Nov 27, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8fd4bce3 Deployed Nov 27, 2026 by vercel[bot]
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