Skip to content

refactor(cmd): thin list.go; move logic to internal/listing (#1502 partial)#1522

Merged
nextlevelshit merged 2 commits into
mainfrom
refactor/1502-thin-list-go
Apr 28, 2026
Merged

refactor(cmd): thin list.go; move logic to internal/listing (#1502 partial)#1522
nextlevelshit merged 2 commits into
mainfrom
refactor/1502-thin-list-go

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • New internal/listing package owns runs/workspaces/pipelines/personas/adapters/contracts/skills/compositions listing domain logic, filter/sort, JSON output schemas
  • cmd/wave/commands/list.go reduced 1630 → 324 LOC (cobra wiring + flag plumbing + JSON envelope + dispatch)
  • Table renderers extracted into cmd/wave/commands/list_render.go (319 LOC; depends only on internal/display, kept in cmd)
  • CLI behaviour, flags, command names, output schemas all unchanged — wave list --help byte-identical

Public API of internal/listing

Types: PipelineInfo, PersonaInfo, AdapterInfo, RunInfo, ContractInfo, ContractUsage, SkillInfo, CompositionInfo, Output, RunsOptions, Manifest, ManifestPersona, ManifestAdapter, PipelineSkillConfig

Functions: LoadManifest, FormatDuration, ListPipelines, ExtractPipelineName, ListPersonas, ListAdapters, ListRuns, ListContracts, CollectSkillsFromPipelines, CollectSkillPipelineUsage, ListSkills, ListCompositions

Cmd-package types kept as type aliases → existing cmd/wave/commands/list_test.go compiles unchanged.

Validation

  • go build ./... + go vet ./... clean
  • go test -race ./internal/listing/... 21 sub-tests pass (2.0s)
  • go test -race ./cmd/wave/commands/... pass
  • go test -race ./... all green
  • wave list --help diff vs main: byte-identical

Out of scope (deferred)

Test plan

  • CI green
  • wave list runs --json schema unchanged
  • wave list pipelines/personas/adapters/contracts/skills/compositions all unchanged

Partial of #1502 (list.go portion). Parent: #1494.

- New internal/listing package owns runs/workspaces/pipelines/personas
  /adapters/contracts/skills/compositions listing domain logic, filter,
  sort, and JSON output schemas.
- cmd/wave/commands/list.go reduced from 1630 LOC to 324 LOC; the new
  list_render.go owns table rendering. CLI behaviour, flag names,
  command names, and JSON output schemas are unchanged.
- skills.go now imports internal/listing for CollectSkillPipelineUsage.

Partial of #1502 (list.go portion). init.go/run.go/compose.go thin
deferred to follow-up PRs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant