From accb04666e829f6e43647ce1a119ccebdaf9d6fd Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 14 Aug 2025 21:13:07 +0200 Subject: Update CLAUDE.md. --- CLAUDE.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4a470ad..7b51fc4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,12 +40,14 @@ The application uses a type-safe command architecture with Zig unions and enums: - **`OutputCapture`**: Buffers command output for redirection to files ### Modular Command Architecture -The project now uses a fully modularized command architecture where each DOS command is implemented in its own file: +The project uses a fully modularized command architecture with unified context management: - **`src/cmd/`**: Directory containing individual command implementations -- **Command Pattern**: Each command implements an `eval()` method with consistent signature +- **`CommandContext`**: Unified context struct containing allocator, I/O capture, and execution functions +- **Command Pattern**: Each command implements `eval(command, ctx: CommandContext)` with consistent signature - **Type Safety**: Commands are strongly typed Zig structs with compile-time guarantees - **Shared Types**: Common types defined in `src/cmd/lib/types.zig` for consistency +- **Clean Architecture**: All commands (Builtin, External, Redirect, Pipe) use the same modular pattern ### Implementation Status -- cgit v1.2.1