aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

(cli): `bgagent stats` for agent contribution and quality metrics

オープン
#412 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
cli cost-finops enhancement observability
主要言語
TypeScript
スター
143
フォーク
46
平均マージ
3日 10時間
マージ済み PR(30日)
24

説明

## Component

Scripts / CLI

## Describe the feature

Add `bgagent stats` to report aggregate outcomes over a time window: tasks submitted, PRs opened, merge rate, median revision cycles, CI pass rate, cost totals—filterable by repo and user.

## Use case

Operators adopting background agents need **outcome metrics**, not task counts alone. Roadmap **Evaluation pipeline** and operator dashboard cover backend aggregation; CLI users and platform teams want a quick, scriptable view for adoption reviews and executive summaries.

## Proposed solution

1. `GET /stats` (or query Tasks table + webhook-derived merge state) returning JSON aggregates.
2. CLI: `bgagent stats [--repo] [--since 30d] [--format table|json]`.
3. Reuse PR outcome signals from roadmap **PR outcome tracking** when available; v1 can use task terminal states + GitHub API sampling with documented limitations.
4. Document proxy vs. customer-impact metrics (merge rate is proxy; optional manual tags later).

## Other information

- Complements roadmap **Validation and risk analytics** and control panel—not a duplicate if scoped to CLI/API summary.
- Auth: same Cognito constraints as `list`/`status`.

## Acknowledgements

- [ ] I may be able to implement this feature
- [ ] This might be a breaking change

## Acceptance criteria

- [ ] API endpoint documented in `API_CONTRACT.md` with stable response shape mirrored in `cli/src/types.ts`.
- [ ] CLI prints table and JSON; respects `--verbose` for query details.
- [ ] Tests in `cli/test/` with mocked API client.
- [ ] User guide explains metric definitions and limitations.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず API_CONTRACT.md の受け入れ条件と cli/src/types.ts のレスポンスタイプを確認し、次に cli/test/ 配下にある既存の CLI API クライアントテストを調査します。完了の条件は、文書化された安定した stats エンドポイント、要求されたフィルターと詳細情報に対応するテーブルおよび JSON 出力、モックを使用したテスト、ならびにメトリクスの定義と制限事項を網羅するユーザーガイドがあることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, github, typescript
領域
analytics, api, cli, documentation, testing
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。