1.9 KiB
clawd_code
- Claude Code source code is at /Users/imbenji/StudioProjects/clawd_code/old_repo
- "Claude Code" refers to the original TypeScript source in /old_repo
- "the Agency" refers to the Dart/Flutter project (lib/, pubspec.yaml, etc.)
lib/src/→ Core logic that must have parity with Claude Codelib/ui/→ Flutter UI layer with creative freedom
Parity rule
lib/src/ must always have parity with Claude Code. Before implementing any feature or behaviour in lib/src/, check how Claude Code does it in /old_repo first. If something in lib/src/ diverges from how Claude Code works, treat that as a bug and fix it to match.
Always assume any implementation should achieve full parity with Claude Code — never a simplified version. If the Claude Code implementation is complex, implement it with the same complexity. Do not simplify unless the user explicitly says to.
lib/ui/ should have some parity with the Claude Code UI (ink components), but not full 1:1 parity — creative freedom is allowed for the Flutter implementation.
- After writing Flutter code, always run
flutter analyze 2>&1 | grep -E "^\s*(error)"before wrapping up.
Known parity gaps in lib/src/
When a file in lib/src/ strays from Claude Code behaviour, mark it with a // PARITY GAP: comment at the diverging code. Also list it here:
lib/src/chat/tool_loop_service.dart— Skips image resize/downsample (maybeResizeAndDownsampleImageBlock) and does not store pasted images to disk (storeImages). Claude Code does both inprocessUserInput.ts.lib/ui/providers/chat_provider.dart(UI layer) — Images sent as OpenAI-formatimage_urldata URLs (OpenRouter requirement) instead of Anthropic-format base64 blocks. Uses a flat attachment list instead of Claude Code'sPastedContentID-ref system. Non-image files embedded as plain text rather than document blocks. SeehandlePromptSubmit.ts+processUserInput.ts.