You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix stale/incorrect CLI claims in skills and AGENTS.md - #27
Live-tested all 8 claude-skills workflows, the 3 embedded setup skills (skills/embed/*.md), AGENTS.md, and the README examples against apimetrics-qc, and fixed every confirmed discrepancy between the docs and actual CLI/server behavior. Enum and command-availability claims were also cross-checked against the production spec, so the docs hold for both environments. One CLI behavior change: apimetrics onboard now prints the eight workflow skills as well as the setup guides.
Command-name / flag fixes
list-call-results doesn't exist → list-results-by-call. Its flags are --from/--time/--result-category/--cursor/--limit (default 100, one page per call), not --since/--before; list-results likewise takes --from/--time.
run-call doesn't exist → run-monitor <id> runs API, browser, and MCP monitors alike. It requires a body ({} minimum).
list-slos/get-slo/create-slo/update-slo/delete-slo don't exist. SLOs are one per project: get-project-slo / update-project-slo (creates one if none exists) / delete-project-slo, scoped via include_tags/exclude_tags. apimetrics-slo-review is rewritten around this.
The root --help example used create-monitor, which doesn't exist in either environment → a working create-call shorthand example (cli/cli.go).
On QC, list-calls/create-call/get-call/update-call/delete-call are deprecated in favour of /api/3/monitors/ commands (list-api-monitors, create-api-monitor with a flat body, …). Production's spec still lists the v2 commands and has no v3 replacements, so the docs keep the v2 commands, explain the deprecation warning, name the replacements, and prefer list-monitors/get-monitor, which exist in both.
Result and query semantics
result_category is PASS/SLOW/WARNING/FAIL (HTTP 4xx lands in WARNING, connection errors in FAIL) and is empty while a run is queued; meta.result carries QUEUED, then COMPLETE/HTTP_CLIENT_ERROR/CONNECTION_ERROR/…. Polling now waits on meta.result. --result-category silently ignores any other value and returns every category — documented wherever the flag appears.
Result rows are {id, meta, timing} (meta.call_id, meta.start_time, timing.total ms); the response_time/test/created fields the docs named don't exist.
get-result for ANALYST+ callers returns the full object by default (response headers/body, request method/URL/headers, DNS/TLS detail, timing); --mode full adds the request body, messages, and certificate detail. Below-ANALYST callers get meta and timing only.
Query metric lists completed per monitor type (API/browser/MCP differ); omitting status includes failed runs; group_by: interval requires interval; project-wide DNS diagnostics ignore group_by: monitor.
SLO period is DAY/WEEK/MONTH; get-project-slo returns platform defaults (created: null) when none is stored; get-call-passfail-total's top-level stat.total counts only uncategorised results, so sum stat.<CATEGORY>.total for the run count. Daily buckets are UTC.
Output and input
-f paths are rooted at the response envelope, so they start with body., and must be single-quoted in zsh; a non-matching path prints nothing. The README's -f and -o table examples are fixed.
CLI Shorthand values containing // must be quoted (url: '"https://…"'), and shorthand also reads stdin, so non-interactive callers need </dev/null or the command blocks.
list-schedules/list-monitors return {data, meta}.
list-auth-settings and monitor configs return credentials in clear text, so the audit and investigation workflows now project them with -f.
Monitor setup
MCP monitors need a Streamable HTTP endpoint (usually /mcp); SSE-only /sse endpoints fail with 405. Every step needs timeout_ms and wait_ms — the old example returned 422.
422 is body validation (detail[].loc names the field) and 400 is a rejected value; quota exhaustion is a separate Project is out of quota error, not 422.
create-call's meta accepts name/description/tags/workspace (domain is derived from the URL). set-call-conditions now has a working example and its source/operator vocabulary; projects carry default conditions (get-project-conditions).
Creating a project does not grant the creator access; a follow-up create-project-access is required. add-call-to-schedule rejects invalid or other-project IDs with 400.
Fixed the nonexistent --api-key flag and result.success/result.failure_reason shape in the embedded setup skills.
bulk (config-as-code)
apimetrics:/<collection> isn't a resolvable scheme; the skill uses a real host+path, and the bulk help examples are fixed (including a --match example that matched nothing).
bulk init/status/diff/pull work against /api/2/calls/, but bulk push of an unchanged checkout file fails — PUT rejects its read-only fields. The skill now reduces changed files to the writable fields (that PUT is a partial update), saves a baseline copy for rollback, and passes the same --project-id on every bulk command, because the checkout doesn't record its project.
Documented, not fixed: bulk push prints Push complete. and exits 0 when uploads fail, bulk init crashes on a one-resource list, and --match resolves top-level fields only.
onboard
AGENTS.md and the README said apimetrics onboard prints every workflow; it printed only the three setup guides. printSkills now also prints the eight SKILL.md files, and TestPrintSkillsIncludesEveryWorkflow checks every embedded file appears in its output.
Detail
How this was tested
Built apimetrics-qc from this branch and ran each workflow end to end in the contxt org's "Nick CLI test 1/2/3" projects: project creation and access grants, API/browser/MCP monitor creation (heredoc and shorthand), conditions, schedules, run-monitor on all three types, result polling and retrieval, SLO create/update/delete (restored afterwards), the query-* commands, and a full bulk init → edit → push → rollback cycle in an isolated project. Those test projects and monitors are kept for future testing. go test ./... passes.
Server-side behaviour found (not addressed here)
create-project-access sets the grantee only from account_id, which defaults to the caller; email is an informational label. A body with email alone therefore grants the caller while recording someone else's email — ported legacy behaviour, but a footgun. The bootstrap skill now says so.
get-result-content returned "Content not found" even for a result's own content_path.
get-call-passfail-total's top-level stat.total counts only uncategorised results (deliberate parity with the legacy aggregation), so the run count is the sum of the per-category totals. The skills and AGENTS.md say so.
Live-tested all 8 claude-skills workflows plus the three embedded
onboarding skills against a real apimetrics-qc account and org, and
fixed every confirmed discrepancy:
- list-call-results doesn't exist -> list-results-by-call, whose flags
are --from/--result-category/--cursor/--limit, not --since/--before
(also fixed on list-results itself).
- run-call doesn't exist -> run-monitor <id> runs API, browser, and MCP
monitors alike.
- list-slos/get-slo/create-slo/update-slo/delete-slo don't exist. SLOs
are one per project: get-project-slo/update-project-slo (creates if
none exists)/delete-project-slo, scoped by include_tags/exclude_tags
with no scope/scope_id field. Rewrote apimetrics-slo-review's model
accordingly.
- list-schedules-for-call doesn't exist -> list-schedules-by-call.
- get-result's "always a summary" claim only holds for below-ANALYST
callers; ANALYST+ (most project members) get the full
request/response/timing/DNS/TLS object back by default.
- project-bootstrap's "the CLI cannot create a project" claim was
wrong reasoning (create-project-in-org exists as a flat command
outside the `project` noun-group) even though it happened to be
right in effect for non-admin accounts. Documented the org-admin
path, and the previously-undocumented gotcha that creating a project
does not grant the creator access to it (needs a follow-up
create-project-access call).
- bulk init's apimetrics:/<collection> scheme doesn't resolve -- it's
a cosmetic example string in the CLI's own --help (bulk/commands.go)
with no actual scheme-resolution logic behind it, and fails with a
literal DNS lookup on host "apimetrics". Fixed the example in
commands.go to a resolvable placeholder host, and pointed the skill
at a real host+path instead.
- Three embedded onboarding skills (skills/embed/*.md) referenced a
nonexistent --api-key flag in their error-recovery sections, and
setup-api-monitor.md additionally had the run-call/list-call-results
bugs above plus a result.success/failure_reason shape that doesn't
exist (real field is result_category, PASS/FAIL/WARN/ERROR/TIMEOUT/
QUEUED).
performance-analytics and the shared operating-rules boilerplate were
otherwise verified correct and left alone where no bug was found.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKRzfBhwWbRrARvJsbFnaY
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
Several updated docs are internally inconsistent about result status field naming and one bulk init example contradicts its surrounding “URL/link” guidance, which could mislead users copying these workflows.
Get a fresh assessment by requesting another Copilot review.
Updates the CLI’s agent-facing documentation (AGENTS.md, installable skills, and embedded onboarding skills) to remove stale command/flag/response-shape claims and align guidance with the current observed CLI surface, plus a small help-text tweak in the hidden bulk command group.
Changes:
Fixes multiple incorrect command names/flags across skills (e.g., run-monitor vs run-call, list-results-by-call, --from/--time, per-project SLO commands).
Updates embedded onboarding skills to remove the nonexistent --api-key recovery path and to use the correct result-status field naming.
Replaces the bulk help example that previously used an unsupported apimetrics:/...-style address with a standard host/path example.
File
Description
skills/embed/setup-mcp-monitor.md
Updates polling/validation field name and removes nonexistent --api-key guidance.
skills/embed/setup-browser-monitor.md
Updates polling/validation field name and removes nonexistent --api-key guidance.
skills/embed/setup-api-monitor.md
Replaces nonexistent run-call/list-call-results usage with run-monitor/list-results-by-call and updates polling guidance.
…lk init example
- Standardize on result_category as the PASS/FAIL/WARN/ERROR/TIMEOUT/QUEUED
field everywhere (AGENTS.md, failure-investigation, incident-triage,
project-bootstrap), matching the embedded skills and the rest of this PR.
A separate result field carries a transport-completion value (e.g.
COMPLETE), which is now called out explicitly where the two could be
confused.
- config-as-code: drop the redundant/inconsistent first bulk init example
(it set url to a bare id without --url-template, contradicting the
documented url/uri/self/link-or-url-template guidance) and keep the
single --url-template form, which was confirmed working live.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKRzfBhwWbRrARvJsbFnaY
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟢 Approval recommended
The changes are documentation corrections plus one cosmetic example string; the verifiable claim (broken apimetrics:/ scheme) checks out against cli.FixAddress and the apimetrics config key, and the edits are internally consistent with prior feedback resolved.
Several fixes from the previous commits were written as a diff against
the prior (incorrect) text -- "there is no list-call-results (use
list-results-by-call)", "the apimetrics:/<collection> scheme does not
work", "there is no run-call" -- which only makes sense to someone who
saw the old version. A fresh reader (a new agent invoking the skill,
someone who never saw the prior draft) has no context for what's being
negated. Rewrote all of these to state the current CLI surface
directly and positively, and swapped the placeholder `<call-or-monitor-id>`
positional argument name for `<monitor-id>`, matching this codebase's
convention of "monitor" as the umbrella term for an API call/browser
test/MCP test.
Left alone the handful of pre-existing "there is no --api-key flag" /
"there is no --body/--data/-d flag" warnings, which predate this PR,
don't reference anything removed from these docs, and read fine
standalone as guardrails against a very plausible wrong guess.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKRzfBhwWbRrARvJsbFnaY
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The slo-review skill introduces an incorrect flag --apimetrics-project-id, whereas the CLI's actual global flag is --project-id, contradicting this PR's goal of removing inaccurate CLI claims.
Get a fresh assessment by requesting another Copilot review.
--apimetrics-project-id does exist (confirmed live in get-project-slo
and update-project-slo's own generated option schema), but it isn't
the documented, general-purpose mechanism for targeting a different
project. That's the global --project-id flag (registered in
cli/cli.go, and what cli/config.go's "no active project" error tells
users to pass), so point at that instead.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKRzfBhwWbRrARvJsbFnaY
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The updated bulk top-level help example still uses a potentially stale /monitors path and should be aligned with the repo’s other bulk init examples to avoid reintroducing misleading CLI help output.
The top-level bulk command help example uses the path /monitors, but this endpoint/path isn't referenced anywhere else in the repo (and the bulk init subcommand examples use /users). Keeping /monitors here risks reintroducing a stale or misleading hint in CLI help text; consider aligning it with the bulk init examples.
commands.go:317's example used /monitors while the bulk init subcommand's
own examples (line 346, pre-existing) use /users -- inconsistent for no
reason. Match them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKRzfBhwWbRrARvJsbFnaY
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The documentation's correctness depends on many command-name and behavioral claims that are generated at runtime from the live OpenAPI spec and cannot be independently verified from repository source, so a human familiar with the live CLI should confirm them.
- State facts directly instead of contrasting with what earlier skill
text claimed (one SLO per project, list-results flags, run-monitor,
project creation).
- Remove the --api-key references from AGENTS.md and the embedded
setup skills.
- Drop get-project-slo from the list-envelope summaries.
- slo-review: derive availability attainment from get-call-passfail-range/
get-call-passfail-total and latency from query-*-performance, keeping
list-results for drilling into violations; add the same guidance to
AGENTS.md.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcnM8iRzyY2ZEyNi6iyp28
- Drop the "not noun/verb groups" and "Do not invent --body" lines from
the shared skill preamble, and the matching "There is no --body" line
from the embedded setup skills.
- skills.go: generated agent guide states the flat-command and stdin
facts directly, matching AGENTS.md.
- weekly-health-review: take pass/warning/failure counts from
get-call-passfail-range instead of paging list-results and counting;
keep list-results for failure detail. SLO attainment points at the
slo-review method. AGENTS.md table row updated to match.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcnM8iRzyY2ZEyNi6iyp28
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
One embedded-skill "hard rule" claims list-results-by-call works across API/browser/MCP monitors, contradicting the API-call-only scoping used everywhere else in this PR.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The PR's core value is the factual accuracy of many CLI behavior, command-name, and flag claims that cannot be statically verified (the command tree is generated at runtime from a live OpenAPI spec and role-based server responses), so domain/human verification is warranted even though the two code edits are benign and internally consistent.
…lows
Verified every skill, AGENTS.md, and README example against apimetrics-qc
and fixed what the CLI and server actually do:
- result_category is PASS/SLOW/WARNING/FAIL (empty while queued; poll on
meta.result); --result-category silently ignores other values. Result
rows are {id, meta, timing}; there is no response_time/test/created.
- -f paths are rooted at the response envelope (body.), and must be quoted
for zsh; shorthand needs URLs quoted and </dev/null when non-interactive.
- MCP monitors need a Streamable HTTP endpoint and steps need wait_ms.
- SLO period is DAY/WEEK/MONTH; get-project-slo returns defaults when none
is stored; get-call-passfail-total's top-level stat.total is not a count.
- bulk: checkout does not record its project, push needs partial bodies,
and push reports success on failed uploads.
- Note deprecated v2 call commands and their v3 replacements while keeping
the commands production still lists.
- onboard now prints the eight workflow skills as well as the setup
guides, with a test; fix the root --help example's nonexistent command.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
account_id alone selects the grantee (defaulting to the caller) and email
is an informational label; the top-level stat.total counts only
uncategorised results, matching the legacy aggregation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
It is a large documentation PR whose many live-tested CLI/server behavior claims cannot be independently verified here, and it still reasserts list-results-by-call as cross-type against the command's own --help, so a human with environment access should confirm the claims before approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Live-tested all 8
claude-skillsworkflows, the 3 embedded setup skills (skills/embed/*.md),AGENTS.md, and the README examples againstapimetrics-qc, and fixed every confirmed discrepancy between the docs and actual CLI/server behavior. Enum and command-availability claims were also cross-checked against the production spec, so the docs hold for both environments. One CLI behavior change:apimetrics onboardnow prints the eight workflow skills as well as the setup guides.Command-name / flag fixes
list-call-resultsdoesn't exist →list-results-by-call. Its flags are--from/--time/--result-category/--cursor/--limit(default 100, one page per call), not--since/--before;list-resultslikewise takes--from/--time.run-calldoesn't exist →run-monitor <id>runs API, browser, and MCP monitors alike. It requires a body ({}minimum).list-slos/get-slo/create-slo/update-slo/delete-slodon't exist. SLOs are one per project:get-project-slo/update-project-slo(creates one if none exists) /delete-project-slo, scoped viainclude_tags/exclude_tags.apimetrics-slo-reviewis rewritten around this.list-schedules-for-calldoesn't exist →list-schedules-by-call.--helpexample usedcreate-monitor, which doesn't exist in either environment → a workingcreate-callshorthand example (cli/cli.go).list-calls/create-call/get-call/update-call/delete-callare deprecated in favour of/api/3/monitors/commands (list-api-monitors,create-api-monitorwith a flat body, …). Production's spec still lists the v2 commands and has no v3 replacements, so the docs keep the v2 commands, explain the deprecation warning, name the replacements, and preferlist-monitors/get-monitor, which exist in both.Result and query semantics
result_categoryisPASS/SLOW/WARNING/FAIL(HTTP 4xx lands inWARNING, connection errors inFAIL) and is empty while a run is queued;meta.resultcarriesQUEUED, thenCOMPLETE/HTTP_CLIENT_ERROR/CONNECTION_ERROR/…. Polling now waits onmeta.result.--result-categorysilently ignores any other value and returns every category — documented wherever the flag appears.{id, meta, timing}(meta.call_id,meta.start_time,timing.totalms); theresponse_time/test/createdfields the docs named don't exist.get-resultfor ANALYST+ callers returns the full object by default (response headers/body, request method/URL/headers, DNS/TLS detail,timing);--mode fulladds the request body, messages, and certificate detail. Below-ANALYST callers getmetaandtimingonly.statusincludes failed runs;group_by: intervalrequiresinterval; project-wide DNS diagnostics ignoregroup_by: monitor.periodisDAY/WEEK/MONTH;get-project-sloreturns platform defaults (created: null) when none is stored;get-call-passfail-total's top-levelstat.totalcounts only uncategorised results, so sumstat.<CATEGORY>.totalfor the run count. Daily buckets are UTC.Output and input
-fpaths are rooted at the response envelope, so they start withbody., and must be single-quoted in zsh; a non-matching path prints nothing. The README's-fand-o tableexamples are fixed.//must be quoted (url: '"https://…"'), and shorthand also reads stdin, so non-interactive callers need</dev/nullor the command blocks.list-schedules/list-monitorsreturn{data, meta}.list-auth-settingsand monitor configs return credentials in clear text, so the audit and investigation workflows now project them with-f.Monitor setup
/mcp); SSE-only/sseendpoints fail with 405. Every step needstimeout_msandwait_ms— the old example returned 422.detail[].locnames the field) and 400 is a rejected value; quota exhaustion is a separateProject is out of quotaerror, not 422.create-call'smetaacceptsname/description/tags/workspace(domainis derived from the URL).set-call-conditionsnow has a working example and its source/operator vocabulary; projects carry default conditions (get-project-conditions).create-project-accessis required.add-call-to-schedulerejects invalid or other-project IDs with 400.--api-keyflag andresult.success/result.failure_reasonshape in the embedded setup skills.bulk(config-as-code)apimetrics:/<collection>isn't a resolvable scheme; the skill uses a real host+path, and thebulkhelp examples are fixed (including a--matchexample that matched nothing).bulk init/status/diff/pullwork against/api/2/calls/, butbulk pushof an unchanged checkout file fails —PUTrejects its read-only fields. The skill now reduces changed files to the writable fields (thatPUTis a partial update), saves a baseline copy for rollback, and passes the same--project-idon everybulkcommand, because the checkout doesn't record its project.bulk pushprintsPush complete.and exits 0 when uploads fail,bulk initcrashes on a one-resource list, and--matchresolves top-level fields only.onboardAGENTS.mdand the README saidapimetrics onboardprints every workflow; it printed only the three setup guides.printSkillsnow also prints the eightSKILL.mdfiles, andTestPrintSkillsIncludesEveryWorkflowchecks every embedded file appears in its output.Detail
How this was tested
Built
apimetrics-qcfrom this branch and ran each workflow end to end in thecontxtorg's "Nick CLI test 1/2/3" projects: project creation and access grants, API/browser/MCP monitor creation (heredoc and shorthand), conditions, schedules,run-monitoron all three types, result polling and retrieval, SLO create/update/delete (restored afterwards), thequery-*commands, and a fullbulkinit → edit → push → rollback cycle in an isolated project. Those test projects and monitors are kept for future testing.go test ./...passes.Server-side behaviour found (not addressed here)
create-project-accesssets the grantee only fromaccount_id, which defaults to the caller;emailis an informational label. A body withemailalone therefore grants the caller while recording someone else's email — ported legacy behaviour, but a footgun. The bootstrap skill now says so.get-result-contentreturned "Content not found" even for a result's owncontent_path.get-call-passfail-total's top-levelstat.totalcounts only uncategorised results (deliberate parity with the legacy aggregation), so the run count is the sum of the per-category totals. The skills andAGENTS.mdsay so.🤖 Generated with Claude Code