feat(incident): add --title alias for incident list (fix doc-vs-code drift)#40
Closed
ysyneu wants to merge 1 commit into
Closed
feat(incident): add --title alias for incident list (fix doc-vs-code drift)#40ysyneu wants to merge 1 commit into
ysyneu wants to merge 1 commit into
Conversation
…de drift The skill reference flashduty-incident-list.md documented and exemplified a `--title` flag on `incident list` that did not exist on the command — only `--query` did. An agent following the skill types `incident list --title "..."`, cobra rejects it (`unknown flag: --title`), and falls back to dumping the full incident list then grepping (a 61K / ~1900-line TOON dump for a one-incident lookup). Make the documented command real: add a `--title` flag that writes to the same `query` backend field as `--query` (an alias). `--query` stays authoritative when both are set, so existing behavior is unchanged. Reconcile the skill doc to list both flags and note the alias relationship.
Contributor
Author
|
Superseded. Corrected approach per maintainer: the right fix is to remove the non-existent |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds a
--titleflag tofduty incident list. It is a convenience alias for the existing--queryflag — both write to the samequery(full-text search) field ofListIncidentsRequest.--querystays authoritative when both are passed, so this is fully non-breaking. The skill reference doc is reconciled to list both flags and explain the alias relationship.Root cause
The skill reference
skills/flashduty-incident/references/flashduty-incident-list.mddocumented (line 18) and exemplified (line 35:--title "database") a--titleflag that did not exist on theincident listcommand — only--querydid (internal/cli/incident.go). An agent that follows the skill typesfduty incident list --title "...", cobra rejects it withunknown flag: --title, and the agent falls back to dumping the full incident list and grepping client-side.Note the audit proposal's original premise ("no server-side filter, so it dumps-then-greps") was inaccurate: a server-side title/content filter already exists via
--query. The real, contained bug is the doc-vs-code drift on the flag name — fixed here by making the documented--titlereal rather than removing it from the docs (so existing skill text and any muscle-memory keep working).Evidence
audit-2026-06-11sess_JUm6ZDTmUmdUGE2bH4nFLz—incident list --since 24hreturned 61778 chars / 1918 lines for a one-incident-by-title lookup (the dump-then-grep fallback after the missing flag).sess_a77jGy9XzY2GQLDnUcd3xf— the--tool-specprobing half of the proposal is already shipped on main (cli#34, commit 8cad69d:--tool-specdropped,--data/stdin only, heredoc example inmonit_agent.goLong help). That transcript is from a runner on an old CLI; no code change here addresses it.Verification