WP-0003 Part 5: tdd-workflow metrics pilot
Add metrics frontmatter and session-close recording to tdd-workflow, document the reference implementation in wiki/AboutKaizenAgents.md, and add an e2e test covering record → show → optimize → brief.
This commit is contained in:
@@ -2,6 +2,21 @@
|
||||
name: tdd-workflow
|
||||
description: Expert guidance for the TDD8 workflow methodology, specializing in the comprehensive ISSUE-TEST-RED-GREEN-REFACTOR-DOCUMENT-REFINE-PUBLISH cycle with sophisticated sidequest management and proper test organization.
|
||||
category: development-process
|
||||
memory: enabled
|
||||
metrics:
|
||||
primary:
|
||||
name: test_pass_rate
|
||||
description: Share of acceptance-criteria tests passing at PUBLISH
|
||||
measurement: passing_tests / total_tests for the active issue workspace
|
||||
target: 1.0
|
||||
secondary:
|
||||
- name: cycle_time_s
|
||||
description: Wall-clock time from ISSUE start to PUBLISH
|
||||
measurement: Session duration in seconds (execution_time_s in ADR-004)
|
||||
collection:
|
||||
frequency: per_execution
|
||||
storage: .kaizen/metrics/tdd-workflow/
|
||||
retention: 180d
|
||||
---
|
||||
|
||||
# TDDAi Assistant Agent
|
||||
@@ -372,3 +387,20 @@ The comprehensive 8-step development methodology that transforms requirements in
|
||||
2. Update `## What Worked` and `## Watch Points` as needed.
|
||||
3. Append one line to `## Session Log`: `YYYY-MM-DD · <issue or feature> · <outcome>`.
|
||||
4. Bump `last_updated` to today and increment `session_count`.
|
||||
5. Record session metrics (ADR-004; adjust values to match outcome):
|
||||
|
||||
```bash
|
||||
# Successful PUBLISH — all acceptance tests green:
|
||||
echo '{"success": true, "execution_time_s": <seconds>, "quality_score": 0.9, "primary_metric": {"name": "test_pass_rate", "value": 1.0, "target": 1.0}, "metadata": {"issue": "<NUM>", "phase": "PUBLISH"}}' \
|
||||
| kaizen-agentic metrics record tdd-workflow --json --idempotency-key <session-id>
|
||||
|
||||
# Incomplete or failed cycle:
|
||||
echo '{"success": false, "execution_time_s": <seconds>, "quality_score": 0.4, "primary_metric": {"name": "test_pass_rate", "value": <rate>, "target": 1.0}, "metadata": {"issue": "<NUM>", "phase": "<last-phase>"}}' \
|
||||
| kaizen-agentic metrics record tdd-workflow --json --idempotency-key <session-id>
|
||||
```
|
||||
|
||||
Shorthand when only outcome and duration matter:
|
||||
|
||||
```bash
|
||||
kaizen-agentic metrics record tdd-workflow --success --time <seconds> --quality <0.0-1.0>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user