Files
kwcode/kaiwu/telemetry/__init__.py
Val-sss 53c08a4e28 feat: three flywheels + anonymous telemetry + prompt quantification
Flywheel system (all local):
- strategy_stats.py: error strategy effectiveness tracking per error_type
- user_pattern_memory.py: cross-project user error pattern warnings
- skill_drafter.py: auto-generate SKILL.md drafts from stats

Anonymous telemetry (opt-in, default off):
- telemetry/client.py: HMAC-signed fire-and-forget upload
- Only sends: error_type, retry_count, success, model
- Never sends: code, paths, descriptions, user identity
- onboarding asks opt-in, kwcode telemetry enable/disable

CLI commands:
- kwcode telemetry status/enable/disable
- kwcode skill review/accept/discard
- kwcode stats: enhanced with flywheel + telemetry status

Prompt quantification (CC-style):
- GENERATOR_BASE_SYSTEM: "only do what's asked" → "≤2 functions, ≤30 lines"
- RETRY_STRATEGIES hints: quantified line limits per error type
- CHAT_SYSTEM: "short friendly" → "≤100 chars, ≤3 sentences"

Server deployed: https://llmbbs.com (nginx → uvicorn:9753, 3 SQLite tables)

Tests: 19 new, 0 regression

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-06 19:39:17 +08:00

0 lines
0 B
Python