summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-14 21:13:07 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2025-08-14 21:13:07 +0200
commitaccb04666e829f6e43647ce1a119ccebdaf9d6fd (patch)
tree91ee942b09c35d15c66acf0165b87726053164ef
parentfafa989a491bb3f70ab0f07784ad7087f03043d2 (diff)
Update CLAUDE.md.
-rw-r--r--CLAUDE.md6
1 files 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