Skip to content

docs(#206): add CLI UX design conventions to AGENTS.md - #207

Open
fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/206-cli-ux-conventions
Open

fullsend-ai-coder[bot] wants to merge 3 commits into
mainfrom
agent/206-cli-ux-conventions

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new "CLI UX Design Conventions" section to AGENTS.md encoding 6 design principles from PR feat(RHIDP-14129): add intent-based CLI commands and backstage-cli pass-through #156 human review
  • Conventions cover: entity reference format, filter/input flag syntax, plugin dependency detection, exit codes, error presentation, and help text completeness
  • Each convention references the specific source files and helpers that implement the pattern (e.g., parseEntityRef in kv.ts, handleCommandError in intent-errors.ts)

Motivation

PR #156 review revealed that the review agent had no guidance on CLI UX design quality. The human reviewer caught 6 UX issues the agent missed entirely because AGENTS.md only covered code organization, not design correctness. These conventions make the design standards explicit so the review agent can check new commands against them.

Testing

  • Documentation-only change — no code behavior is modified
  • Verified all 6 conventions against the actual codebase patterns in catalog.ts, docs.ts, template.ts, kv.ts, and intent-errors.ts
  • Prettier could not run in sandbox (tooling not installed); manual formatting verification required

Closes #206

Post-script verification

  • Branch is not main/master (agent/206-cli-ux-conventions)
  • Secret scan passed (gitleaks — 7dac1979668716aafb853607ecfc253777515467..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add a new CLI UX Design Conventions section to AGENTS.md
encoding the design principles established through PR #156
review. These conventions give the review agent concrete
patterns to check when new intent-based commands are added:

- Entity references: positional [kind:][namespace/]name
  via parseEntityRef/resolveEntityRef in kv.ts
- Filter/input flags: repeatable --flag key=value via
  collect/resolveJsonInput, not JSON string arguments
- Plugin dependencies: detect missing optional plugins
  and exit with clear error, not raw HTTP responses
- Exit codes: non-zero on not-found or failure via
  handleCommandError from intent-errors.ts
- Error presentation: use intent-errors.ts formatError
  for structured {error, reason, suggestion} output
- Help text: passthrough commands must surface the
  underlying tools flags

Note: prettier could not run (tooling not installed in
sandbox). Manual verification of formatting is required.

Closes #206

Assisted-by: claude-opus-4-6
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "docs(#206): add CLI UX design conventions to AGENTS.md". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - chore
 - docs
 - style
 - refactor
 - perf
 - test
 - revert

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "docs(#206): add CLI UX design conventions to AGENTS.md". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - chore
 - docs
 - style
 - refactor
 - perf
 - test
 - revert

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:56 PM UTC · Completed 3:13 PM UTC

Commit: 367eff7 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $3.10

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Sep 15, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

Three-file documentation-only PR from a bot adding 6 CLI UX conventions to AGENTS.md and correcting deprecated flag examples in README.md and docs/Intent-Based-CLI.md; Tier 1 signals are identical to the prior review (same small blast radius, same single protected path, bot author, no dependencies changed), Tier 2 shows normal activity levels with no doc-specific regressions, and Tier 3 issue coverage is complete — anchoring preserves the prior score of 1 (low).

Previous run

Risk Assessment: low (1/5)

Details

Three-file documentation-only PR from a bot updating AGENTS.md (additive only) and correcting deprecated flag examples in README.md and docs/Intent-Based-CLI.md; Tier 1 signals effectively unchanged from prior review (same protected-path flag, same small blast radius), Tier 2 shows normal activity levels, and Tier 3 issue coverage remains complete — anchoring preserves the prior score of 1 (low).

Previous run (2)

Risk Assessment: low (1/5)

Details

Single-file documentation-only PR authored by a bot that adds 30 lines to a protected path (AGENTS.md); the sole elevated Tier 1 signal is the protected-path flag (score 3), offset by the additive-only nature of the change and full issue acceptance criteria coverage.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review

Findings

High

  • [naming-convention] — PR title docs(#206): add CLI UX design conventions to AGENTS.md places the issue reference in the conventional-commit scope position. The # character is prohibited in scopes by AGENTS.md PR Conventions (no #, @, or other special characters) and the CI headerPattern regex in pr-semantic.yaml ([\w$.\-* ]*), which does not match — verified by running the exact regex against this title. The issue reference is already correctly present in the PR body as Closes #206. This is doubly ironic: the PR that encodes the convention itself violates it.
    Remediation: Rename the PR title to docs: add CLI UX design conventions to AGENTS.md.

Medium


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

High

  • [naming-convention] — PR title docs(#206): add CLI UX design conventions to AGENTS.md places the issue reference in the conventional-commit scope position. The # character is prohibited in scopes by AGENTS.md PR Conventions (no #, @, or other special characters) and the CI headerPattern regex in pr-semantic.yaml ([\w$.\-* ]*), which will actively fail CI on this title. The issue reference is already correctly present in the PR body as Closes #206 — the scope position adds no value and breaks CI.
    Remediation: Rename the PR title to docs: add CLI UX design conventions to AGENTS.md.

Medium

  • [correctness] AGENTS.md:25 — The "Entity references" convention claims entity refs are "parsed by parseEntityRef / resolveEntityRef in kv.ts", but resolveEntityRef is never imported or called by any command file in the codebase. All four command files (api.ts, docs.ts, template.ts, catalog.ts) resolve entity refs via resolveEntityWithAmbiguityCheck from helpers.ts, which adds catalog-based ambiguity detection on top of parseEntityRef. A developer following the convention as written would call resolveEntityRef directly (string-parsing only), bypassing ambiguity detection and producing inferior UX — no "ambiguous match" errors, no catalog-backed "not found" propagation.
    Remediation: Replace "parsed by parseEntityRef / resolveEntityRef in kv.ts" with "resolved via resolveEntityWithAmbiguityCheck from helpers.ts" (which internally calls parseEntityRef and adds catalog-based ambiguity detection). Retain parseEntityRef / resolveEntityRef only if explicitly documenting lower-level parsing primitives.

  • [protected-path] AGENTS.md — This file is listed in the protected paths (REVIEW_PROTECTED_PATHS). The PR links to issue Add CLI UX design conventions to AGENTS.md Key Conventions section #206 with detailed rationale explaining the change. Human approval is always required for protected-path changes, regardless of context.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run (2)

Review

Findings

High

  • [naming-convention] — PR title docs(#206): add CLI UX design conventions to AGENTS.md places the issue reference in the conventional-commit scope position. Verified against .github/workflows/pr-semantic.yaml: the headerPattern regex [\w$.\-* ]* does not include #, so amannn/action-semantic-pull-request will actively fail CI on this title. AGENTS.md PR Conventions also explicitly prohibit # in scopes and direct issue references to the PR body as Closes #N (already correctly present in the body).
    Remediation: Rename the PR title to docs: add CLI UX design conventions to AGENTS.md.

Medium

  • [protected-path] AGENTS.md — This file is explicitly listed in the protected paths. The PR has sufficient context: it links to issue Add CLI UX design conventions to AGENTS.md Key Conventions section #206 with a detailed rationale. Human approval is required for protected-path changes regardless of context.

  • [stale-doc] docs/Intent-Based-CLI.md:879 — Workflow 2 shows rhdh-cli api get-spec --name my-api using --name as the primary entity input. AGENTS.md now explicitly designates --name as an anti-pattern: "Do not introduce per-command flags like --name/--kind/--namespace as the primary entity input." The flag still works but this example now teaches the non-preferred pattern, directly contradicting the conventions this PR is adding.
    Remediation: rhdh-cli api get-spec my-api --output json

  • [stale-doc] docs/Intent-Based-CLI.md:889 — Workflow 3 shows rhdh-cli docs get --entity-ref component:default/my-service using --entity-ref as the primary entity input. AGENTS.md explicitly designates --entity-ref as an anti-pattern.
    Remediation: rhdh-cli docs get component:default/my-service --page-path deployment

  • [stale-doc] docs/Intent-Based-CLI.md:911 — Workflow 5 shows rhdh-cli template execute --template-ref template:default/nodejs-microservice using --template-ref as the primary entity input. AGENTS.md explicitly designates --template-ref as an anti-pattern.
    Remediation: rhdh-cli template execute template:default/nodejs-microservice

  • [stale-doc] docs/Intent-Based-CLI.md:996 — The Example Agent Workflow section uses --name (line 996) and --template-ref (line 1000) as primary entity inputs. Both are now designated anti-patterns by AGENTS.md.
    Remediation: Update to positional refs — rhdh-cli api get-spec my-api --output json and rhdh-cli template execute template:default/service.

  • [stale-doc] README.md:130 — Quick Examples shows rhdh-cli api get-spec --name my-api (line 130) and rhdh-cli template execute --template-ref template:default/nodejs-service (lines 133–134) as canonical usage. Both are now designated anti-patterns per AGENTS.md and are the highest-visibility examples for new users and agents.
    Remediation: rhdh-cli api get-spec my-api and rhdh-cli template execute template:default/nodejs-service.


Labels: PR modifies only AGENTS.md documentation to add CLI UX design conventions


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added the documentation Improvements or additions to documentation label Sep 15, 2026
@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 3:15 PM UTC · Completed 3:22 PM UTC

Commit: 367eff7 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.09

Replace deprecated flag-based entity input patterns (--name, --entity-ref,
--template-ref) with positional ref arguments in documentation examples,
aligning with the CLI UX design conventions added to AGENTS.md.

Updated examples in:
- docs/Intent-Based-CLI.md (workflows 2, 3, 5, and agent workflow)
- README.md (quick examples)

Note: PR title fix (remove # from scope) could not be applied due to
sandbox restrictions. Recommend renaming to:
  docs: add CLI UX design conventions to AGENTS.md

Addresses #207

Assisted-by: claude-sonnet-4-6
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Fixed 5 stale documentation examples across docs/Intent-Based-CLI.md and README.md to use positional entity refs instead of deprecated --name/--entity-ref/--template-ref flags, aligning examples with the CLI UX design conventions added in this PR. PR title fix could not be applied due to sandbox restrictions.

Fixed (5):

  1. [stale-doc] docs/Intent-Based-CLI.md:879 — Workflow 2 uses --name as primary entity input (docs/Intent-Based-CLI.md): Changed rhdh-cli api get-spec --name my-api --output json to rhdh-cli api get-spec my-api --output json to use positional ref
  2. [stale-doc] docs/Intent-Based-CLI.md:889 — Workflow 3 uses --entity-ref as primary entity input (docs/Intent-Based-CLI.md): Changed rhdh-cli docs get --entity-ref component:default/my-service to rhdh-cli docs get component:default/my-service to use positional ref
  3. [stale-doc] docs/Intent-Based-CLI.md:911 — Workflow 5 uses --template-ref as primary entity input (docs/Intent-Based-CLI.md): Changed rhdh-cli template execute --template-ref template:default/nodejs-microservice to rhdh-cli template execute template:default/nodejs-microservice to use positional ref
  4. [stale-doc] docs/Intent-Based-CLI.md:996 — Example Agent Workflow uses --name and --template-ref (docs/Intent-Based-CLI.md): Changed rhdh-cli api get-spec --name my-api to positional ref and rhdh-cli template execute --template-ref template:default/service to positional ref
  5. [stale-doc] README.md:130 — Quick Examples use --name and --template-ref as primary entity inputs (README.md): Changed rhdh-cli api get-spec --name my-api and rhdh-cli template execute --template-ref template:default/nodejs-service to use positional refs

Disagreed (2):

  1. [naming-convention] PR title docs(Add CLI UX design conventions to AGENTS.md Key Conventions section #206) places issue reference in scope position: Cannot fix PR title from sandbox — gh pr edit is blocked by endpoint policy. Recommend renaming to: docs: add CLI UX design conventions to AGENTS.md
  2. [protected-path] AGENTS.md is a protected path requiring human approval: Informational finding — no code change needed. AGENTS.md was already modified in the original PR commit; human approval is required regardless of this fix run.

Tests: passed

Decision points
  • Verified all CLI commands accept positional arguments before updating docs (alternatives: Update docs to positional syntax, Leave docs unchanged since commands may not support positional args; rationale: Confirmed api.ts uses get-spec <ref>, docs.ts uses get <ref>, and template.ts uses execute <ref> — all support positional refs)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:24 PM UTC · Completed 3:35 PM UTC

Commit: ed59dd8 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $2.08

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 3:36 PM UTC · Completed 3:42 PM UTC

Commit: ed59dd8 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.17

…ityCheck

Replace incorrect reference to `resolveEntityRef` in `kv.ts` with
`resolveEntityWithAmbiguityCheck` from `helpers.ts`, which is the
function actually used by all command files (api.ts, catalog.ts,
docs.ts, template.ts) for entity resolution with catalog-based
ambiguity detection.

Addresses #207

Assisted-by: claude-opus-4-6
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 2 (bot-triggered)

Fixed the entity references convention in AGENTS.md to correctly cite resolveEntityWithAmbiguityCheck from helpers.ts instead of resolveEntityRef from kv.ts. PR title fix and protected-path finding could not be addressed from sandbox.

Fixed (1):

  1. [correctness] AGENTS.md:25 — Entity references convention cites resolveEntityRef in kv.ts but commands use resolveEntityWithAmbiguityCheck from helpers.ts (AGENTS.md): Replaced 'parseEntityRef / resolveEntityRef in kv.ts' with 'parseEntityRef in kv.ts, resolved via resolveEntityWithAmbiguityCheck in helpers.ts which adds catalog-based ambiguity detection'. This accurately reflects how all four command files (api.ts, catalog.ts, docs.ts, template.ts) resolve entity references.

Disagreed (2):

  1. [naming-convention] PR title docs(Add CLI UX design conventions to AGENTS.md Key Conventions section #206) places issue reference in scope position with prohibited # character: Cannot fix PR title from sandbox — gh pr edit is blocked by endpoint policy (GraphQL POST denied). Recommend renaming to: docs: add CLI UX design conventions to AGENTS.md
  2. [protected-path] AGENTS.md is a protected path requiring human approval: Informational finding — no code change needed. AGENTS.md was already modified in the original PR commit; human approval is required regardless of this fix run.

Tests: passed

Decision points
  • Chose to retain parseEntityRef mention alongside resolveEntityWithAmbiguityCheck (alternatives: Remove parseEntityRef entirely and only mention resolveEntityWithAmbiguityCheck, Keep both parseEntityRef and resolveEntityWithAmbiguityCheck with their respective roles; rationale: parseEntityRef is the low-level parser that resolveEntityWithAmbiguityCheck calls internally; documenting both gives developers the full picture of the parsing pipeline while pointing them to the correct high-level function.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@sonarqubecloud

Copy link
Copy Markdown

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:43 PM UTC · Completed 3:55 PM UTC

Commit: d6d8f88 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $2.14

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 3:56 PM UTC · Completed 4:00 PM UTC

Commit: d6d8f88 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $0.59

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 3 (bot-triggered)

Both review findings are about PR metadata, not code. The naming-convention finding (PR title has # in scope) is correct but cannot be fixed by the fix agent due to sandbox API restrictions — a human must rename the title to docs: add CLI UX design conventions to AGENTS.md. The protected-path finding is informational. All code-level findings from previous iterations have already been addressed in commits ed59dd8 and d6d8f88.

Disagreed (2):

  1. [naming-convention] PR title docs(#206): places issue reference in scope position; # is prohibited by AGENTS.md PR Conventions and the CI headerPattern regex: Finding is correct — the PR title violates the naming convention and will fail CI. However, the fix agent cannot modify PR titles: both the GitHub GraphQL and REST PATCH endpoints are blocked by sandbox network policy. A human must rename the PR title to docs: add CLI UX design conventions to AGENTS.md. The issue reference Closes #206 is already correctly present in the PR body.
  2. [protected-path] AGENTS.md is listed in protected paths and requires human approval: This is an informational finding, not an actionable code fix. The review agent correctly notes that human approval is required for changes to protected-path files regardless of context. This is by design and does not require any code changes.

Tests: passed

Strategy change: Iteration 3 escalation: attempted direct PR title modification via GitHub REST and GraphQL APIs (new approach vs recording disagree), but sandbox policy blocks both mutation endpoints. The naming-convention finding requires human intervention.

Decision points
  • Strategy escalation at iteration 3: attempted to fix PR title directly via GitHub API (alternatives: Record as disagree (previous iterations' approach), Fix PR title via gh pr edit --title (new approach); rationale: Attempted the new approach (gh pr edit and gh api PATCH) but both were blocked by sandbox network policy. The PR title can only be fixed by a human or by a process with write access to PR metadata.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready-for-review Triggers review agent dispatch risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLI UX design conventions to AGENTS.md Key Conventions section

0 participants