Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ src/
- Ports & Adapters: interfaces in `domain/ports/`, implementations in `infrastructure/adapters/`
- External libraries (clack, picocolors) only in `infrastructure/`
- Exception: valibot in `domain/schemas/` (declarative type definitions)

### Result handling

- Every `Result` from a port call must be checked (`.success` / `Result.isOk` / `Result.isErr`) before the code moves on
- A deliberately discarded `Result` is marked with `// ignored: <reason>` so review can tell intent from oversight
- Mechanical enforcement was considered and deferred: Biome 2.x GritQL has no type information, so a syntactic rule would need a hand-maintained list of ~42 port method names, and a second type-aware linter is disproportionate for a bug class with no live instances
2 changes: 2 additions & 0 deletions src/cli/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export function createCommand(container: Container) {

const cleanup = new CleanupHandle();
cleanup.register(async () => {
// ignored: best-effort rollback on an already-failing path — a failed cleanup
// has no useful handling and must not mask the original error
await git.removeWorktree(createResult.data.worktree.path, { force: true });
});

Expand Down