Community

Stats and feedback

Two layers. The older analytics CLI rolls up role events. v3.10+ also keeps anonymous local counts in ~/.puax/usage-stats.json and optional OpenTelemetry spans. Neither stores the conversation body.

CLI from the lesson

node analytics/role-analytics.ts report 30\nnode analytics/role-analytics.ts ranking\nnode analytics/role-analytics.ts cleanup 90

Runtime

  • puax_get_usage_stats / puax_set_usage_stats_opt_out
  • PUAX_USAGE_STATS=0 turns counts off
  • PUAX_OTEL_ENABLED=1 writes telemetry.jsonl
  • puax_flush_telemetry pushes the buffer. The endpoint must be loopback.

Feedback types: role ratings, trigger false positives, feature requests, bugs.


Code sample

# 提交反馈示例

# 角色反馈
submitRoleFeedback(
  roleId="military-commander",
  ratings={
    "usefulness": 5,
    "relevance": 4,
    "quality": 5
  },
  comments="成功帮助解决了复杂问题"
)

# 触发器反馈
reportFalsePositive(
  triggerCondition="连续失败",
  actualContext="用户只是在测试不同方案"
)

# 功能请求
submitFeatureRequest(
  type="new-role",
  description="希望增加一个专注于前端性能优化的角色"
)

Quiz

Which CLI does the analytics lesson show?

Previous
Next chapter