-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
1) Summary (EN)
Adopt a tests‑first workflow that formalizes user intent via test generation and uses test results to re‑rank code candidates. Combine TiCoder (intent formalization through tests) with TestPilot (autonomous test maintenance) to keep suites current as specs evolve.
2) Scope & Deliverables (EN)
- CLI defaults:
ae tests:suggest
becomes the standard entry after Intent. - Reranking:
ae code:rank-by-tests
sorts N candidates by pass rate and stability. - Maintenance: an optional
--autofix
mode leverages TestPilot‑style edits/pruning. - Prompts & templates: pytest / JS / Go templates with property‑based hooks.
- Docs: how‑to guide; examples with seed requirements.
3) Tasks / Checklist (EN)
- Make
ae tests:suggest
the default in the 6‑phase docs and CLI. - Implement
rank-by-tests
scoring (pass rate, flakiness penalty, runtime). - Add
--autofix
flow (fail → patch test or generate focused case → retry). - Provide starter templates for common domains (HTTP API, queue, auth, math).
- Examples and quickstart in
docs/tests-first.md
. - CI: run suggested tests in PRs and comment results.
4) Definition of Done (EN)
- On sample projects, tests‑first improves Top‑1 pass vs single‑shot by ≥ X%.
- Reranker yields stable ordering across 3 independent runs.
- Autopilot mode can prune or patch at least 2 failing cases per suite.
5) Risks & Mitigations (EN)
- Overfitting to tests → add property‑based tests; pair with formal checks.
- Flaky tests → flakiness detection and penalties in scoring.
6) References (EN)
- TiCoder (FSE 2022)
- TestPilot (ICSE 2024)
- CodeRanker (2023) — used indirectly in scoring
(日本語)テスト駆動 Intent モード:TiCoder + TestPilot
1) 概要(JP)
Intent の直後を テスト生成 にし、テスト結果で コード候補を再ランク する tests‑first ワークフローを既定化します。TiCoder による形式化、TestPilot によるテスト維持を組み合わせ、仕様変更に強い運用を目指します。
2) 対象範囲と成果物(JP)
- 既定フロー:
ae tests:suggest
を Intent 後の標準ルートに。 - 再ランキング:
ae code:rank-by-tests
を導入(通過率と安定性)。 - 自動維持:
--autofix
オプションでテストの自動修正・剪定。 - テンプレ:pytest / JS / Go の雛形(性質ベースフック付き)。
- ドキュメント:how‑to と例題を整備。
3) タスク(JP)
- 6 相ドキュメントと CLI の既定を tests‑first に更新。
-
rank-by-tests
のスコア実装(合格率・不安定ペナルティ・時間)。 -
--autofix
の失敗→修正→再実行フローを追加。 - 代表ドメインのテンプレを追加。
-
docs/tests-first.md
を作成。 - CI で提案テストを実行し結果を PR コメントへ。
4) 完了条件(JP)
- サンプル群で単発生成比 Top‑1 通過率 X%以上 改善。
- 再ランカが 3 回の独立実行で安定した順序を返す。
--autofix
が少なくとも 2 件の失敗を自動処理できる。
5) リスクと対策(JP)
- テスト過学習 → 性質ベーステストを併用、形式検査と組み合わせ。
- 不安定テスト → フレーク検出とスコア減点を実装。
6) 参考文献(JP)
- TiCoder(FSE 2022)
- TestPilot(ICSE 2024)
- CodeRanker(2023)
Metadata
Metadata
Assignees
Labels
No labels