Repository navigation
Description
Split from #5450.
Problem: The issue asks for a telemetry measurement 7 days after the release. The measurement needs a release that contains #5450 and 7 days of production data. It cannot run in the pull request that delivers #5450. Why deferred: It waits on an outside event, the release and the 7-day window. Acceptance criteria: After 7 days from the release, query devops_cli_help_requests_total for caller=agent per 1,000 commands. Compare the median help bytes of agent callers in the transcripts before and after the release. The median SHALL go down by 1.5 times or more. Record the query and the result in this issue.
Proposed design
Problem statement
Do not implement this issue in a pull request. It is a post-release measurement of the help text that agents receive. It reports the agent help rate per 1,000 commands and compares the median help bytes in the 168 hours before and after the first release that contains #5450. It waits on that release and on 7 days of production data.
Acceptance criteria
Requirement: Agent help rate after the release
The measurement SHALL report the agent help requests per 1,000 commands for the 168 hours after the first release that contains #5450.
Scenario: The per-1,000 rate query returns one row
- WHEN A person runs
uv run devops prometheus query --time <release published_at plus 7 days> '1000 * sum(increase(devops_cli_help_requests_total{caller="agent"}[7d])) / sum(increase(devops_cli_command_total[7d]))'. - THEN The command prints one row with the agent help requests per 1,000 commands for the 168 hours from the release, and prints the
No results.warning when the counter holds no series.
Requirement: Median help bytes of the two windows
The measurement SHALL compare the median help bytes of agent callers in the 168 hours before and after the release.
Scenario: The two transcript windows give a median and a count
- WHEN A person runs a
jqpipeline over the JSONL files under~/.claude/projects/<project>/for this repository and each worktree under.data/agent/worktrees/. The pipeline joins eachtool_resultto itstool_usecommand bytool_use_id, keeps the results of commands that invokedevopswith--helpor the help subcommand, and takes theutf8bytelengthof each result text for each 168-hour window. - THEN The pipeline prints the median UTF-8 byte length and the count of the kept help texts for each window.
Requirement: Help size reduction
The median help bytes of agent callers after the release MUST be at most two thirds of the median before it.
Scenario: The reduction reaches 1.5 times
- WHEN A person divides the before median by the after median.
- THEN The quotient is at least 1.5 and the criterion passes. A quotient below 1.5, or a window with no help text, fails the criterion and the record shows the count of that window.
Requirement: Pending a person after the merge
The owner SHALL record the measurement in one comment on this issue after the 168-hour window.
Scenario: The measurement is recorded
- WHEN The owner has run the query and has read both transcript windows.
- THEN One comment holds the release version, the bounds of both windows, the query, both medians with their counts, the per-1,000 rate and the threshold result.
Existing Tool Considered
No alternatives check has run. Prometheus with PromQL covers the per-1,000 rate; its increase function and devops prometheus query --time give the 7-day range. jq covers the median help bytes; it reads the JSONL transcripts, joins the tool results to the tool calls, and computes UTF-8 byte lengths and medians. Prometheus lacks byte size. jq lacks the release time, the window bounds and the transcript directory naming. devops ai agent-audit reads the transcripts but counts recurring problems, not bytes. The measurement adds no product code; the jq pipeline costs about 3,000 tokens to write, check and fix and about 30 minutes.
Key questions
- Which metric name and label does the query use?: Use
devops_cli_help_requests_total{caller="agent"}for the numerator. Usedevops_cli_command_totalfor the denominator. The repository map listsdevops_cli_help_requests_totalinsrc/devops_cli/telemetry/instruments.pyandsrc/devops_cli/telemetry/usage_errors.py. The query must match thecallervalues that feat(cli): agent callers get plain help with full descriptions #5450 ships. [sources: src/devops_cli/telemetry/instruments.py:1084, src/devops_cli/telemetry/usage_errors.py, docs/TELEMETRY.md] - Which counter gives the denominator of the per-1,000 rate?: The denominator is
sum(increase(devops_cli_command_total[7d]))with no caller filter. The counter counts every command by command and status. The item asks per 1,000 commands, not per 1,000 agent commands. (best practice) [sources: src/devops_cli/telemetry/instruments.py:1084, docs/TELEMETRY.md]- Chosen: Use the existing
devops_cli_command_total. It counts every command, it needs no new metric, and the item asks per 1,000 commands. - Rejected: Add a new counter for agent commands. It adds code and a release, and the existing counter counts the commands.
- Rejected: Use
devops_cli_usage_error_total. It counts usage errors only, not commands, so it cannot be the denominator.
- Chosen: Use the existing
- What does a reduction of 1.5 times mean for the two medians?: The before median divided by the after median is at least 1.5. The after median is at most two thirds of the before median. The project records a reduction as the old value divided by the new one. A window with no help text has no median, so the criterion fails and the record shows the count. (best practice) [sources: CHANGELOG.md, src/devops_cli/ai/inspection.py]
- Chosen: The before median divided by the after median is at least 1.5. One quotient from the two medians settles the threshold, and the project records a reduction as the old value divided by the new one.
- Rejected: The after median is at most 1.5 times the before median. It passes when the help grows, so it measures no reduction.
- Rejected: The after median is at most the before median minus 1.5 bytes. A change that small is below the noise of one help text.
- Which windows do the before and the after medians use?: The before window is the 168 hours before the release
published_at. The after window ispublished_attopublished_atplus 168 hours. The two windows are equal. The after window ends at the same instant as the Prometheus[7d]range at--timeequal topublished_atplus 7 days. (best practice) [sources: docs/commands/prometheus.md:27, src/devops_cli/commands/prometheus.py]- Chosen: 168 hours before and 168 hours after the release time. Equal windows end at the release and at the release plus 7 days, the same instant as the Prometheus
[7d]range. - Rejected: 7 full UTC calendar days before and after. A calendar boundary does not match the
[7d]range that ends at the release time plus 7 days. - Rejected: All history before the release and all history after it. Older releases and other traffic change the before median.
- Rejected: 30 days before and 7 days after. Unequal windows compare different traffic mixes.
- Chosen: 168 hours before and 168 hours after the release time. Equal windows end at the release and at the release plus 7 days, the same instant as the Prometheus
- Does
devops prometheus queryaccept--time, and does the PromQLincreasefunction give the 7-day rate?: Yes.devops prometheus querytakes--timeand-t, the evaluation timestamp of an instant query, and passes the value as the Prometheus APItimeparameter. It prints theNo results.warning when the query returns no series.tests/commands/test_prometheus.pyholds that output. The Prometheus query functions page is the reference for the range-vector functions,increaseincluded. [sources: docs/commands/prometheus.md:27, src/devops_cli/commands/prometheus.py, src/devops_cli/lang/en/messages.py, tests/commands/test_prometheus.py] - How does a person get the release time of the first release that contains feat(cli): agent callers get plain help with full descriptions #5450?: The person reads the
published_atfield of that GitHub release withdevops gh api repos/dan-petty/devops-cli/releases/tags/<tag> --jq .published_at.devops gh apipasses--jqthrough to gh. The release-publication spec uses this live check forpublished_at. The person adds 7 days to that value to get the--timeargument and the end of the after window. [sources: openspec/specs/release-publication/spec.md, CONTRIBUTING.md, docs/CLI_REFERENCE.md] - How does a person identify the help texts in the Claude Code transcripts?: A
jqpipeline reads the transcript JSONL files. It joins eachtool_resultto itstool_usecommand bytool_use_id. It keeps the results of commands that invokedevopswith--helpor the help subcommand. It takesutf8bytelengthof the result text, one text for each such result. It reads the same transcript fields thatdevops ai agent-auditreads: thetool_useblock of an assistant record, thetool_resultblock of the user record that answers it, and the timestamp. The files sit under~/.claude/projects/<project>/, where<project>is the absolute path of the repository with each character that is not a letter or a digit replaced by a hyphen, and the same for each worktree under.data/agent/worktrees/. The pipeline changes no product code. (best practice) [sources: docs/commands/ai.md, src/devops_cli/ai/agent_audit/transcript.py, src/devops_cli/ai/agent_audit/sources.py]- Chosen: A
jqpipeline over the transcript JSONL files. It is reproducible, it uses the transcript fields that the project already reads, and it adds no product code. - Rejected: Manual reading of the transcripts. It is not reproducible, and a person may miss help texts.
- Rejected: A new product metric for the help bytes. It adds code, a release and a second 7-day wait.
- Chosen: A
Fit
Fits in one pull request.
Suspected block
The first release that contains #5450, and the 168 hours of production data after its published_at.
Activity
devops-cli-service commentedon Nov 18, 2026
Both concern agent help size, but #5450 delivers the plain-help code change while this item delivers the 7-day post-release measurement that verifies it.devops-cli-service commentedon Nov 19, 2026
Owner question: Who runs the measurement, and how does the item close? (a person decides)
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence