Calculate and update agentic coding KPIs to measure ZTE progression. Use after completing an ADW cycle to track metrics.
Calculate and update agentic coding KPIs to measure ZTE progression. Use after completing an ADW cycle to track metrics like attempts, streaks, and code changes.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install google-ecosystem@melodic-softwarestate-contextCalculate and update agentic coding KPIs to measure ZTE progression.
$ARGUMENTS: State context containing ADW ID, issue info, and workflow historyYou are updating the agentic KPI tracking file to measure workflow effectiveness.
Extract from arguments or current context:
adw_id: Workflow identifierissue_number: GitHub issue numberissue_class: Classification (/chore, /bug, /feature)plan_file: Path to implementation planall_adws: List of workflows run (for attempts calculation)Count only workflows that represent restarts:
attempts_incrementing = ["adw_plan_iso", "adw_patch_iso", "plan", "patch"]
attempts = count(workflow for workflow in all_adws if any(inc in workflow for inc in attempts_incrementing))
Build, test, review don't count - only full replans.
wc -l {plan_file}
Extract line count as plan_size.
git diff origin/main --shortstat
Parse output to extract:
Add new row to the KPI detail table:
| Date | ADW ID | Issue | Class | Attempts | Plan Size | Diff +/- | Files |
|---|---|---|---|---|---|---|---|
| {today} | {adw_id} | #{issue_number} | {issue_class} | {attempts} | {plan_size} | +{added}/-{removed} | {files} |
Current Streak: Count consecutive rows from bottom where Attempts <= 2
Longest Streak: Find longest consecutive sequence where Attempts <= 2
Average Presence: Mean of all attempts values
Total Plan Size: Sum of all plan_size values
Total Diff Size: Sum of (added + removed) across all runs
Write updated summary and detail tables to the KPI file (typically app_docs/agentic_kpis.md or project-specific location).
Report KPI update:
{
"success": true,
"this_run": {
"adw_id": "{adw_id}",
"issue": "{issue_number}",
"attempts": 1,
"plan_size": 45,
"diff_added": 67,
"diff_removed": 23,
"files_changed": 4
},
"summary": {
"current_streak": 6,
"longest_streak": 12,
"average_presence": 1.28,
"total_plan_size": 450,
"total_diff_size": 2340
}
}