Skip to content

Commit 6cca23d

Browse files
juliantellezclaude
andauthored
feat: Lifecycle hardening (#2)
* test(S-04): add install integration tests - 38 tests covering C-07 (InstallerNew), C-08 (InstallerInstall), C-12 (RunInstall) - All tests pass (brownfield — existing implementation satisfies contracts) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(S-04): mark install slice complete Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(S-05): add check integration tests - Tests for C-09 (InstallerCheck) and C-13 (RunCheck) - Uses corrected TD-4 signatures (verify bool, contentFS fs.FS) - Tests fail to compile pre-implementation (expected TDD behavior) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(S-05): implement check with SHA-256 verification (TD-4) - Update Check signature: add verify bool and contentFS fs.FS params - Update RunCheck signature: add contentFS fs.FS param - Add ParseVerifyFlag for --verify boolean flag - Add SHA-256 content hash comparison in verify mode - Update cli.go call site to pass contentFS - Fix present count: empty files count as present - 52 tests passing (31 Check + 21 RunCheck) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(S-05): mark check slice complete Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(S-06): add uninstall integration tests - Tests for C-10 (InstallerUninstall) and C-14 (RunUninstall) - Uses corrected TD-3 signature (scope parameter) - Tests fail to compile pre-implementation (expected TDD behavior) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(S-06): implement uninstall with conflict artifact removal (TD-3) - Update Uninstall signature: add scope parameter - Add asymmetric conflict artifact removal (CLAUDE_GREENLIGHT.md, CLAUDE.md.backup) - Update RunUninstall to pass scope through - Allow idempotent duplicate scope flags in ParseScope - 28 tests passing (16 Uninstall + 12 RunUninstall) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(S-06): mark uninstall slice complete Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add S-07 CLI dispatch tests (C-15) — expected compile failure Tests use corrected TD-2 signature: Run(args, contentFS, stdout io.Writer). Current code has Run(args, contentFS) — implementation will fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: implement S-07 CLI dispatch (TD-2 + FR-8.1) - cli.Run now accepts io.Writer parameter (TD-2) - main.go prints fs.Sub error to stderr before exit (FR-8.1) - Fix test to check correct asymmetric CLAUDE.md path for local scope - 22 tests passing, 0 security findings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: mark S-07 complete — all 7/7 slices done 228 tests passing, 0 failing, 0 security findings. All design decisions (TD-1 through TD-4) and FR-8.1 implemented. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: update readme --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 50aab30 commit 6cca23d

File tree

15 files changed

+4790
-26
lines changed

15 files changed

+4790
-26
lines changed

.greenlight/STATE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ Mode: yolo
1212
| S-01 | Version | complete | 7 | 0 | none |
1313
| S-02 | Flag Parsing | complete | 33 | 0 | none |
1414
| S-03 | Conflict Handling | complete | 31 | 0 | none |
15-
| S-04 | Install | pending | 0 | 0 | S-01, S-02, S-03 |
16-
| S-05 | Check | pending | 0 | 0 | S-02, S-04 |
17-
| S-06 | Uninstall | pending | 0 | 0 | S-02, S-04 |
18-
| S-07 | CLI Dispatch | pending | 0 | 0 | S-01, S-04, S-05, S-06 |
15+
| S-04 | Install | complete | 55 | 0 | S-01, S-02, S-03 |
16+
| S-05 | Check | complete | 52 | 0 | S-02, S-04 |
17+
| S-06 | Uninstall | complete | 28 | 0 | S-02, S-04 |
18+
| S-07 | CLI Dispatch | complete | 22 | 0 | S-01, S-04, S-05, S-06 |
1919

20-
Progress: [███░░░░░░░] 3/7 slices
20+
Progress: [██████████] 7/7 slices
2121

2222
## Current
2323

24-
Slice: S-03Conflict Handling
24+
Slice: S-07CLI Dispatch
2525
Step: complete
26-
Last activity: 2026-02-08 — S-03 complete (31 tests, 0 security findings)
26+
Last activity: 2026-02-08 — S-07 complete (22 tests, 0 security findings)
2727

2828
## Test Summary
2929

30-
Total: 71 passing, 0 failing, 0 security
30+
Total: 228 passing, 0 failing, 0 security
3131
Last run: 2026-02-08
3232

3333
## Decisions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
TDD-first development system for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Tests are the source of truth. Green means done. Security is built in, not bolted on.
88

9+
<img width="613" height="434" alt="Screenshot 2026-02-08 at 08 52 11" src="https://github.com/user-attachments/assets/145e1553-7b4b-48d1-a77d-a2052c60d3d1" />
10+
11+
<img width="1470" height="671" alt="Screenshot 2026-02-08 at 08 50 32" src="https://github.com/user-attachments/assets/5a33ab58-e576-4a80-8a88-614b2e45ea46" />
12+
913
## Quick Start
1014

1115
```bash

internal/cli/cli.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import (
44
"fmt"
55
"io"
66
"io/fs"
7-
"os"
87

98
"github.com/atlantic-blue/greenlight/internal/cmd"
109
)
1110

1211
// Run dispatches to the appropriate subcommand based on args.
1312
// contentFS provides the embedded source content.
14-
func Run(args []string, contentFS fs.FS) int {
15-
stdout := os.Stdout
13+
func Run(args []string, contentFS fs.FS, stdout io.Writer) int {
1614

1715
if len(args) == 0 {
1816
printUsage(stdout)
@@ -25,7 +23,7 @@ func Run(args []string, contentFS fs.FS) int {
2523
case "uninstall":
2624
return cmd.RunUninstall(args[1:], stdout)
2725
case "check":
28-
return cmd.RunCheck(args[1:], stdout)
26+
return cmd.RunCheck(args[1:], contentFS, stdout)
2927
case "version":
3028
return cmd.RunVersion(stdout)
3129
case "help", "--help", "-h":

0 commit comments

Comments
 (0)