Go to file
dimitar c9ff44298c feat: phase 3 — presentation layer (table, JSON, compact)
Replace the interim renderers with a dedicated presenter package that
formats scan results in three ways.

Presenter (internal/presenter):
- Formatter interface with Present()/For() dispatch on format name:
  table, json, compact
- TableFormatter: aligned tabwriter table with REPOSITORY / BRANCH /
  STATUS / AHEAD-BEHIND / CHANGES / STASH columns, per-repo change
  summaries like "2M 1U", error details inline, and a colored summary
  line ("N repos | N clean | N need attention | N errors")
- JSONFormatter: indented document with scanned_at, parent_dir, repos,
  and an aggregate summary for scripting; statuses render as string
  labels ("modified") instead of raw integers
- CompactFormatter: one line per repo with color-coded status symbols
  (✓ ✗ ↑ ↓ ⇄ ◉ ▢ !) plus branch, ahead/behind, and change counts
- Color handling: auto/always/never modes, TTY detection, and the
  NO_COLOR convention (explicit --color=always still wins); paths have
  $HOME collapsed to "~" in table and compact views

Domain model (pkg/status):
- JSON tags on RepoInfo/ScanResult/Summary for clean field names
- RepoStatus now marshals to its string label and unmarshals from both
  string labels and numeric values, so JSON output round-trips

Configuration (internal/config):
- New --color flag (auto/always/never) validated in Load and included in
  the config dump; keyed as "color" in viper

CLI (cmd/gitflow):
- scan now routes through presenter.Present with the resolved color mode;
  the interim renderers are removed

Testing:
- Table content (columns, change summaries, error text, summary line) and
  absence of escape codes with ColorNever
- ColorAlways emits ANSI codes even under NO_COLOR; auto stays clean on
  non-terminal writers
- JSON decodes back into the domain types (string statuses round-trip)
- Compact symbols and counts; unknown formats rejected
- RepoStatus JSON round trip covers every status

Verified: go build, go vet, go test -race, gofmt clean; manual smoke of
table / compact / forced-color / JSON output against a scratch directory.
2026-08-02 08:41:18 +02:00
.github/workflows feat: phase 0 — project scaffolding and build tooling 2026-08-02 08:30:23 +02:00
cmd/gitflow feat: phase 3 — presentation layer (table, JSON, compact) 2026-08-02 08:41:18 +02:00
internal feat: phase 3 — presentation layer (table, JSON, compact) 2026-08-02 08:41:18 +02:00
pkg/status feat: phase 3 — presentation layer (table, JSON, compact) 2026-08-02 08:41:18 +02:00
.gitignore feat: phase 0 — project scaffolding and build tooling 2026-08-02 08:30:23 +02:00
.golangci.yml feat: phase 0 — project scaffolding and build tooling 2026-08-02 08:30:23 +02:00
go.mod feat: phase 2 — CLI commands and configuration resolution 2026-08-02 08:38:55 +02:00
go.sum feat: phase 2 — CLI commands and configuration resolution 2026-08-02 08:38:55 +02:00
implementation.md docs 2026-08-02 08:25:09 +02:00
Makefile feat: phase 0 — project scaffolding and build tooling 2026-08-02 08:30:23 +02:00
readme.md docs 2026-08-02 08:25:09 +02:00

git flow is CLI app writen go.

App will explore [] all git repos leaving on our machine. it will ask for parent directory. will scan status of our repos and present it to the user. app will scan repos in set interval [and present findings, integrated ai agent will suggest next steps/actions]