Skip to content

[Agentic DX] g: low-to-high lift CLI contract and module layout roadmap #49

@tony

Description

@tony

Context

Review focused on src/g/__init__.py (parser + runtime bundled), packaging metadata, and CLI behavior.

Goal

Keep g minimal while making it more automatable and standards-aligned.

Low-lift ideas

  • Move CLI runtime from g.__init__ into dedicated modules (cli.py, runner.py).
  • Add --json mode to report detected VCS, executed command, and exit code.
  • Document exit code semantics for no-repo / command-failure paths.

Medium-lift ideas

  • Add --dry-run to show what would execute without side effects.
  • Add pluggable VCS marker detection (beyond .git/.hg/.svn) behind a strategy abstraction.
  • Add contract tests for parser and machine-output behavior.

High-lift ideas

  • Add g capabilities --json for environment and detector introspection.
  • Publish a tiny machine-readable command contract in docs.

Done when

  • Human and machine output are both first-class.
  • Runtime structure is modular.
  • Behavior is explicit and testable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions