Commit e89407b
* feat: add FileWriter service and refactor waza init inventory #48
- Create internal/scaffold/writer.go with FileWriter type that encapsulates
the create-if-missing + skip-if-exists pattern
- FileWriter returns structured Inventory with per-entry outcomes (created/skipped)
- Inventory.Fprint() renders aligned table with emoji indicators:
➕ for created, ✅ (already exists) for skipped
- Refactor cmd/waza/cmd_init.go to use FileWriter instead of inline write loop
- Inventory is always visible (not gated behind --verbose)
- Add 8 tests in writer_test.go covering: create-if-missing, skip-if-exists,
mixed outcomes, parent directory creation, inventory output, relative paths,
empty content handling, and CreatedCount
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: update Linus history with FileWriter work (#48)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: refactor waza new to use shared FileWriter #58 (#66)
* feat: refactor waza new to use shared FileWriter #58
Replace the inline write loop in cmd_new.go with the shared FileWriter
from internal/scaffold/writer.go. Malformed SKILL.md detection still runs
before FileWriter — the file is removed so FileWriter creates it fresh.
Inventory now uses consistent ➕/✅ emoji indicators (always visible,
not gated behind --verbose), matching the waza init behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: update squad state for #58
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove .squad/ files from PR branch
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove .squad/ files from PR branch
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: improve error handling in FileWriter stat checks #48
- Directory branch: explicitly handle IsNotExist vs other stat errors
- File branch: detect directory-at-file-path type mismatch
- Both branches: return errors on permission failures instead of masking
- Add regression tests for type-mismatch error paths
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: improve error handling in FileWriter stat checks #48
- Directory branch: explicitly handle IsNotExist vs other stat errors
- File branch: detect directory-at-file-path type mismatch
- Both branches: return errors on permission failures instead of masking
- Add regression tests for type-mismatch error paths
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: improve error handling in FileWriter stat checks #48
- Directory branch: explicitly handle IsNotExist vs other stat errors
- Directory branch: error when path exists but is not a directory
- File branch: detect directory-at-file-path type mismatch
- Both branches: return errors on permission failures instead of masking
- Add regression tests for type-mismatch error paths
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: gofmt writer_test.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 91cade3 commit e89407b
6 files changed
Lines changed: 465 additions & 273 deletions
File tree
- .squad/agents/linus
- cmd/waza
- internal/scaffold
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | 490 | | |
498 | 491 | | |
499 | 492 | | |
500 | 493 | | |
501 | 494 | | |
502 | 495 | | |
503 | 496 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
511 | 504 | | |
512 | 505 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
551 | 511 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
| 512 | + | |
| 513 | + | |
558 | 514 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
| 515 | + | |
566 | 516 | | |
567 | 517 | | |
568 | 518 | | |
569 | 519 | | |
570 | 520 | | |
571 | | - | |
| 521 | + | |
572 | 522 | | |
573 | 523 | | |
574 | 524 | | |
| |||
0 commit comments