Skip to content

Il a command always returns error about description even when it's been provided as argument #376

@rexsilex

Description

@rexsilex
Diagnostic Information
Property Value
CLI Version 0.5.0
Node.js Version v22.13.0
OS linux
OS Version 5.15.167.4-microsoft-standard-WSL2
Architecture x64
Capabilities web
Claude CLI Version 2.0.73 (Claude Code)

Il a command always returns error about description even when it's been provided as argument


Enhancement Request Analysis

Questions for Reporter

Question Answer
Can you provide the exact command you're typing (including the full description text)? @rexsilex, please edit this issue to answer these questions.
Are you using any special characters or quotes in your description that might need escaping?
Does the error occur with a simple test description like "This is a test issue for creating a new feature with multiple words"?
What shell are you using (bash, zsh, PowerShell, etc.)?

Problem Summary
The il a command (alias for il add-issue) is incorrectly reporting that the description doesn't meet validation requirements (>30 chars, >2 spaces) even when a valid description is provided as a command-line argument. This prevents users from creating issues via the CLI.

User Impact
Users attempting to quickly create and enhance GitHub issues using the il a shortcut command are blocked and cannot complete their workflow. This defeats the purpose of having a quick issue creation command.

Enhancement Goal
The command should correctly parse and validate the description argument, allowing users to create enhanced issues when providing valid descriptions (more than 30 characters with at least 3 words).

Next Steps

  • Reporter to answer questions above for full context
  • Investigate command-line argument parsing in the CLI framework (Commander.js)
  • Check if shell escaping or quote handling is causing the description to be truncated or misinterpreted

📋 Complete Context & Details (click to expand)

Current Behavior
The il a command accepts a description argument and validates it must be:

  • More than 30 characters in length
  • Contains more than 2 spaces (i.e., at least 3 words)

The validation occurs in src/commands/add-issue.ts:64 which calls IssueEnhancementService.validateDescription(). The validation logic in src/lib/IssueEnhancementService.ts:33-38 checks:

const trimmedDescription = description.trim()
const spaceCount = (trimmedDescription.match(/ /g) ?? []).length
return trimmedDescription.length > 30 && spaceCount > 2

Proposed Solution
The issue likely stems from one of these causes:

  1. Shell escaping issues: The description might not be properly quoted when passed, causing only the first word to be captured
  2. Commander.js parsing: The argument parser might be incorrectly handling the description string
  3. Empty/undefined argument: The description might be undefined or empty by the time it reaches validation

Debugging steps:

  1. Add logging to show the raw description received in AddIssueCommand.execute()
  2. Verify Commander.js is configured correctly in src/cli.ts:353 with proper argument handling
  3. Test with various quoting styles (single quotes, double quotes, no quotes)

Benefits
Fixing this will restore the quick issue creation workflow, allowing developers to rapidly document tasks and have them automatically enhanced by AI agents before starting work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions