Skip to content

bug(init): avoid selecting one-character literals as the agent name #320

Description

@pengfei-threemoonslab

Summary

agents-shipgate init selected the one-character identifier t as the generated agent.name for the Strix repository, even though the same static pass also found the much more plausible candidate Strix.

This can produce a syntactically valid manifest whose declared agent identity is misleading. The user must correct it manually before relying on later reports or handoffs.

Reproduction

From a local clone of usestrix/strix:

env AGENTS_SHIPGATE_AGENT_MODE=1 \
  PYTHONPATH=/path/to/agents-shipgate/src \
  python -m agents_shipgate init \
  --workspace /path/to/strix \
  --write \
  --json

Relevant output:

{
  "auto_detected": {
    "is_agent_project": true,
    "frameworks": [
      {
        "type": "openai_agents_sdk",
        "score": 64.0,
        "confidence": "high"
      }
    ],
    "agent_name": "t",
    "agent_name_candidates": [
      { "value": "t", "source": "Agent_name_literal" },
      { "value": "Strix", "source": "Agent_name_literal" },
      { "value": "strix", "source": "workspace_dir" }
    ]
  }
}

The command successfully wrote shipgate.yaml and a managed .gitignore block. The issue is the automatic choice of t as the manifest's agent identity, not framework detection or file writing.

Actual behavior

  • The repository is correctly detected as a high-confidence OpenAI Agents SDK project.
  • The one-character literal t is ranked above Strix.
  • init --write uses t as the generated agent name.

Expected behavior

When several literals are available, a one-character, context-poor identifier should not be silently selected over a plausible project/agent identity.

Possible fail-closed behavior:

  1. Penalize or exclude very short/generic name literals unless they are the only candidate.
  2. Prefer candidates with stronger agent-definition context and meaningful names.
  3. If ambiguity remains material, write a CHANGE_ME placeholder (or emit an explicit diagnostic) rather than asserting an unreliable agent identity.

Why this matters

agent.name appears in scan output and reviewer/agent-handoff artifacts. Selecting the wrong identity makes reports harder to interpret and can lead users to trust an auto-generated manifest that needs semantic correction.

This is a static candidate-ranking problem. It does not require executing the Strix agent, calling tools, or making network requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Queued; valuable but not blockingarea:initinit / detect / manifest generationbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions