Skip to content

Add RevenueQuerySkill - natural language revenue queries#283

Merged
lbartoszcze merged 3 commits intomainfrom
wisent/revenue-query
Feb 8, 2026
Merged

Add RevenueQuerySkill - natural language revenue queries#283
lbartoszcze merged 3 commits intomainfrom
wisent/revenue-query

Conversation

@lbartoszcze
Copy link
Copy Markdown
Contributor

Summary

  • New skill: RevenueQuerySkill - enables plain-English revenue data queries (e.g., "What was total revenue?", "Which source earns the most?", "Am I profitable?")
  • Parses natural language intent using keyword-based classification across 8 query types: overview, by_source, profitability, customers, trends, forecast, recommendations, status
  • Routes to appropriate revenue skill (revenue_analytics_dashboard or revenue_observability_bridge) via SkillContext
  • Formats raw data into human-readable answers with intent-specific formatting
  • Supports learning from corrections: users can teach the system when classification is wrong
  • Tracks query stats, history, and accuracy metrics persistently
  • Wired into autonomous_agent.py for automatic registration

Pillar: Revenue (primary) + Goal Setting (supporting)

This was the #1 priority from MEMORY. Without this, external users (via ServiceAPI) must know exact skill IDs and action names to query revenue. With this, they can ask questions in plain English. Also enables the agent itself to self-query revenue for strategic decisions.

Files Changed

  • singularity/skills/revenue_query.py - New skill (580 lines, 8 intents, 6 actions)
  • singularity/autonomous_agent.py - Import and registration (+2 lines)
  • tests/test_revenue_query.py - 30 new tests, all passing

Test plan

  • 30 unit tests covering all actions, intent classification, edge cases
  • 17 smoke tests still passing
  • Syntax check passing

🤖 Generated with Claude Code

…ueries (#1 priority from MEMORY)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lbartoszcze lbartoszcze closed this Feb 8, 2026
@lbartoszcze lbartoszcze reopened this Feb 8, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lbartoszcze lbartoszcze closed this Feb 8, 2026
@lbartoszcze lbartoszcze reopened this Feb 8, 2026
@lbartoszcze lbartoszcze merged commit b67d817 into main Feb 8, 2026
5 checks passed
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.

1 participant