Portal & WorkflowsWorkflows
Usage Analysis
Workflow Usage Analysis
CE8 flywheel: Track → Analyze → Optimize → Track better.
Data Source
e:\Agentic\clara\workflow-usage.jsonl — one line per invocation.
Analysis Script
# Read and parse
$data = Get-Content "e:\Agentic\clara\workflow-usage.jsonl" | ForEach-Object { $_ | ConvertFrom-Json }
# Summary: count by workflow
$data | Group-Object wf | Sort-Object Count -Descending |
Select-Object Count, Name | Format-Table
# Summary: count by workflow+mode
$data | Group-Object {"{0}/{1}" -f $_.wf, $_.mode} | Sort-Object Count -Descending |
Select-Object Count, Name | Format-Table
# Daily distribution
$data | Group-Object { $_.ts.Substring(0,10) } | Sort-Object Name |
Select-Object Name, Count | Format-Table
# Per-agent session activity
$data | Group-Object agent | Sort-Object Count -Descending |
Select-Object Count, Name | Format-Table
# Unused workflows (compare against known list)
$known = @("task","commit","log","ongoing","qm","session","wrapup","akira","kb",
"clara","vision","clarity","align","status","logarchive","skill","audy","handoff")
$used = $data | Select-Object -ExpandProperty wf -Unique
$unused = $known | Where-Object { $_ -notin $used }
Write-Host "`nUnused workflows:" ($unused -join ", ")When to Analyze
| Trigger | Scope | Who |
|---|---|---|
/hub-audit | Full analysis, flag unused/overused | Audy |
/hub-evolve | Quick counts, check for new patterns | Akira |
Weekly /clara align | Which workflows supported the week's work? | Clara |
Monthly /vision align | Workflow patterns vs life goals alignment | Agent |
What to Look For
| Pattern | Signal | Action |
|---|---|---|
| Workflow never used | Dead weight or undiscovered | Remove or promote |
| One mode dominates | Other modes may be unnecessary | Consider merging |
| High usage + high friction (from session quality) | Optimization target | Improve the hot path |
| Workflow always paired with another | Composition candidate | Merge or create compound |
| Agent-specific usage patterns | Different agents use different workflows | Standardize or specialize |
Portal Integration (Future)
When ready to graduate from local JSONL to portal:
- New D1 table:
workflow_usage (id, ts, workflow, mode, agent, session_id) - API endpoint:
POST /api/workflow-usagewith batch insert - Portal UI: New "Workflows" tab showing:
- Usage heatmap (workflow × day)
- Top workflows bar chart
- Unused workflow alerts
- Mode distribution per workflow
- Sync:
/wrapupor daily cron pushes local JSONL → D1, then clears local
ETC: ~2-3 hours for D1+API+UI. Not urgent — local JSONL is sufficient until we have enough data to make it worthwhile.