Repository navigation
Description
Part of #5164 (child 1, the first child).
Problem or Motivation
The owner asked on 2026-11-12 for a grade of each agentic workflow from its measured success, with one action for each grade (the table is in #5164). The roadmap jobs already write one result line for each attempt to Loki (docs/roadmap/job-success.md). No command reads the lines and says how each workflow performs. A person or an agent must write LogQL to see a ratio, and the dashboard row Roadmap Job Success shows only the 80% line.
Proposed Solution & Architectural Design
Add devops roadmap eval grades. The eval group scores a job on a golden set; this command scores it on its live result lines.
- Options:
--repo(default: all),--window 6h|24h|7d(default 7d),--format table|json,--loki-url(else theloki.urlsetting),--dry-run(0 requests; returns the planned queries). - Read Loki with metric instant queries (
/loki/api/v1/query,count_over_timeandquantile_over_time ... | unwrap), not log lines, so no line limit applies. Reusek8s/logql.py(resolve_loki_url, the private egress client). - For each workflow and repository: n, successes,
pon attempts withinfra=false, the Wilson 95% interval (statsmodels.stats.proportion.proportion_confint(method="wilson")), the point grade and the grade range of the interval, the all-attempts ratio, the infrastructure share, the first-pass ratio (stage:plan_calls≤ 1,gate_returns= 0,verify_rounds≤ 1; implement:repair_rounds= 0; fix_plan:gate_returns= 0,verify_rounds≤ 1,after= 0; other jobs:n/auntil child 3), the top 3 failure classes with counts, the grade action, and a row for each version with 10 or more attempts. - Efficiency, for jobs with
tokensandseconds: median, p90 and max of tokens and seconds for each attempt; tokens and seconds for each success (sum of all attempts / successes). Show them at every grade. Mark them "optimize" at grade 80 or better, else "report only". - Grade rules:
too fewunder 30 attempts;100when every attempt is first-pass; else the floor ofp(0.90, 0.80, 0.70, 0.60, under 0.60). Put the table (floor, name, action, efficiency flag) in one module,roadmap/job_grade.py. - The docs generator writes the table into
docs/roadmap/job-success.md. The section "The 80% rule" becomes "The job grades". The held-grade rule comes with child 8. Add the term "job grade" to CONTEXT.md and say that it is not a decision-point band. --format jsonis for agents and the hourly shepherd: one object for each workflow and repository, with the fields above.
Target Subsystem
SDLC, Git & PR Governance (src/devops_cli/roadmap/, src/devops_cli/commands/roadmap_eval*.py).
Existing Tool Considered
Grafana Explore and the dashboard row show a ratio, but no grade, interval, action or efficiency, and an agent cannot read them as JSON. statsmodels (a current dependency) gives the Wilson interval; the custom code is the grade table and the report. Cost: about 300,000 tokens to build, 6 hours elapsed; keep about 20,000 tokens a month.
Acceptance Criteria
- On recorded Loki replies (fixture), the report gives n,
p, the interval, the grade, the top classes and the efficiency measures, and they equal a hand count. - 22 of 25 attempts give
p0.88, interval [0.70, 0.96], grade 80, range 70 to 90. - 29 attempts give
too few. 30 first-pass attempts of 30 give100. - An attempt with
infra=truechanges the infrastructure share and notp. --dry-runsends 0 requests and prints the queries.devops docs checkpasses with the new table injob-success.md.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both target job grades for workflows, but #5164 is the umbrella and this candidate delivers one specific command.devops-cli-service commentedon Nov 12, 2026
Released in v0.122.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.122.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 19:05 UTC