Skip to content

Code agent should validate user-facing surface completeness for CLI features #696

Open

Description

@fullsend-ai-retro

What happened

On PR #5945, the code agent implemented server-side support for repo-level FOREIGN variables (variable fetching, authorization logic, caching, tests, ADR) but did not add a --repo flag to the existing foreign allow/list/revoke CLI commands. Without this flag, operators had no way to manage repo-level variables through the CLI — the feature was only usable via direct GitHub API calls, defeating the purpose of having CLI tooling for foreign grant management.

The human reviewer (ifireball) identified this gap in a second /fs-fix request (Aug 6, 06:27 UTC), requiring an additional fix iteration (31077376348) and subsequent re-review (31078336230). The fix agent successfully added the flag, but the extra cycle cost one fix run + one review run in token spend and ~40 minutes of wall-clock time.

What could go better

The code agent should reason about the complete user journey when implementing a new capability. When adding server-side support for a new resource scope (repo-level variables), the agent should trace the operator workflow: "How does an operator create, list, and revoke repo-level foreign grants?" This would have revealed that the existing CLI commands only target org-level variables and need a --repo flag to target repo-level ones.

The issue spec (#5833) described the need for repo-level variable support but did not explicitly mention a CLI flag. The code agent resolved this ambiguity by implementing only the backend, when a complete implementation requires both backend and CLI surface.

Confidence: high that this gap is in the code agent's planning phase, not the issue spec. The code agent modified internal/cli/foreign.go (the CLI file), showing it was aware of the CLI layer, but only updated internal logic without adding the scope-targeting flag.

Proposed change

Add guidance to the code agent's planning phase (in the code agent definition or planning skill in fullsend-ai/agents) that when implementing support for a new resource type, scope, or entity in a system that has CLI tooling, the agent should:

  1. Identify existing CLI commands that operate on the related resource type.
  2. Verify that those commands can target the new scope/entity (e.g., a new --repo flag when adding repo-level support to an org-level feature).
  3. If the CLI cannot target the new scope, implement the necessary flags/subcommands as part of the same PR.

This could be framed as a planning checklist item: "When adding a new resource scope to a backend feature, verify the CLI surface covers CRUD operations for that scope."

Validation criteria

On the next 3 code agent PRs in fullsend-ai/fullsend that add a new resource type or scope to a feature with existing CLI tooling, the code agent should include CLI surface changes in the initial PR without requiring a human-directed fix iteration. Measure by checking whether human /fs-fix comments request missing CLI operations.


Generated by retro agent from fullsend-ai/fullsend#5945

Activity

  1. fullsend-ai-prioritize commented on Aug 25, 2026

    @fullsend-ai-prioritize

    RICE Priority Score: 1.2

    Score breakdown
    Dimension Score Reasoning
    Reach 1.5 This affects the code agent's behavior across all PRs that add new resource types or scopes to features with existing CLI tooling. While not every PR triggers this pattern, the fullsend-ai/fullsend repo has CLI tooling for multiple features, and every developer using the code agent benefits from fewer missed-surface fix iterations. The improvement indirectly benefits all platform users who get more complete features shipped in fewer cycles.
    Impact 1 Each occurrence of this gap costs ~40 minutes of wall-clock time plus an extra fix run and review run in token spend, and requires a human reviewer to catch the missing CLI surface. This is a noticeable workflow improvement — it eliminates a class of avoidable rework — but it's not blocking any core functionality. The workaround (human reviewer requests a /fs-fix) exists and works.
    Confidence 0.8 High confidence. The issue is exceptionally well-described by the retro agent with a specific example (PR #5945), clear root cause analysis (code agent was aware of the CLI layer but didn't add scope-targeting flags), a concrete proposed change (planning checklist item), and measurable validation criteria. The scope of the fix is well-bounded.
    Effort 1 Medium effort. The change involves adding planning guidance or a checklist item to the code agent definition or planning skill in fullsend-ai/agents. This requires understanding how the code agent's planning phase works, identifying the right insertion point for the guidance, and writing effective instructions that generalize beyond the specific repo-level variables case. Not trivial but well-scoped.

    Formula: (1.5 x 1 x 0.8) / 1 = 1.2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions