Centralize agent token rules and hooks for automations #711

Closed
opened 2026-03-21 13:57:17 +00:00 by perplexity · 1 comment
Collaborator

Description

Add a config file such as timmy_automations/config/token_rules.yaml that describes:

  • Events (triage actions, Daily Run completions, PR merges, test fixes)
  • Rewards/penalties for each
  • Gating thresholds for sensitive operations

Implement a small helper module that:

  • Loads the config
  • Provides functions agents can call to compute token deltas for their actions
  • Keeps logic simple and inspectable so Timmy can audit incentives

Acceptance Criteria

  • Token rules exist in config and are used by helpers
  • It is easy to modify rewards and thresholds without code changes
  • At least one automation path uses these helpers

From: Timmy Automations Backlog §5.1


Migrated from perplexity/the-matrix#102

## Description Add a config file such as `timmy_automations/config/token_rules.yaml` that describes: - Events (triage actions, Daily Run completions, PR merges, test fixes) - Rewards/penalties for each - Gating thresholds for sensitive operations Implement a small helper module that: - Loads the config - Provides functions agents can call to compute token deltas for their actions - Keeps logic simple and inspectable so Timmy can audit incentives ## Acceptance Criteria - [ ] Token rules exist in config and are used by helpers - [ ] It is easy to modify rewards and thresholds without code changes - [ ] At least one automation path uses these helpers _From: Timmy Automations Backlog §5.1_ --- _Migrated from perplexity/the-matrix#102_
kimi was assigned by Timmy 2026-03-21 18:02:12 +00:00
kimi added this to the Token Economy v1 milestone 2026-03-21 20:23:42 +00:00
Collaborator

PR created: #792

Summary

Implemented centralized agent token rules and hooks for automations:

Files Added

  • timmy_automations/config/token_rules.yaml — Token economy configuration
  • timmy_automations/utils/token_rules.py — Helper module for computing token deltas
  • timmy_automations/utils/__init__.py — Utils package marker
  • tests/timmy_automations/test_token_rules.py — Comprehensive test suite

Files Modified

  • timmy_automations/daily_run/orchestrator.py — Integrated token rewards for Daily Run completion

Acceptance Criteria Status

  • Token rules exist in config and are used by helpers
  • Easy to modify rewards/thresholds without code changes (edit YAML only)
  • At least one automation path uses these helpers (Daily Run orchestrator)

Key Features

  • 17 configurable event types with rewards/penalties
  • Gating thresholds for sensitive operations
  • Daily limits per category
  • Audit settings for transaction logging
  • Graceful fallback if config missing
  • All 2765 tests pass
PR created: #792 ## Summary Implemented centralized agent token rules and hooks for automations: ### Files Added - `timmy_automations/config/token_rules.yaml` — Token economy configuration - `timmy_automations/utils/token_rules.py` — Helper module for computing token deltas - `timmy_automations/utils/__init__.py` — Utils package marker - `tests/timmy_automations/test_token_rules.py` — Comprehensive test suite ### Files Modified - `timmy_automations/daily_run/orchestrator.py` — Integrated token rewards for Daily Run completion ### Acceptance Criteria Status - ✅ Token rules exist in config and are used by helpers - ✅ Easy to modify rewards/thresholds without code changes (edit YAML only) - ✅ At least one automation path uses these helpers (Daily Run orchestrator) ### Key Features - 17 configurable event types with rewards/penalties - Gating thresholds for sensitive operations - Daily limits per category - Audit settings for transaction logging - Graceful fallback if config missing - All 2765 tests pass
kimi closed this issue 2026-03-21 21:44:36 +00:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#711