Skip to content

Refactor waza new to use shared FileWriter #58

Description

@wbreza

Architecture Context

Replace the independent file-write loop in cmd/waza/cmd_new.go:351-363 with the shared FileWriter from #48. This ensures waza new has the same always-visible inventory behavior as waza init. The existing SKILL.md malformed-detection logic (detectExistingSkillMD) should remain - it runs before the FileWriter and decides whether to include SKILL.md in the write list.

Architecture doc: docs/init-config-consolidation/architecture.md
Depends on: #48

Acceptance Criteria

  • cmd/waza/cmd_new.go uses FileWriter from internal/scaffold/ instead of its inline write loop
  • Running waza new my-skill shows created marker for new files and exists marker for existing files
  • Malformed SKILL.md detection still works - replaces invalid SKILL.md with defaults
  • Inventory is always visible (not gated behind --verbose)
  • Existing TestNewCommand_NoOverwriteSafety and TestNewCommand_IdempotentRunTwice still pass
  • go test ./... passes; golangci-lint run passes

Metadata

Metadata

Assignees

Labels

epic:go-cliE1: Go CLI FoundationgoPull requests that update go codepriority:p1This sprint

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions