Deep Research: Lovable, Claude Code, WindSurf - fastable-dev/fastable GitHub Wiki

Reverse Engineering: WindSurf & Claude Code

1. UX Flow

WindSurf:

  • Open repo in IDE-like UI.

  • Trigger Cascade agent via icon or shortcut.

  • Cascade edits multiple files, explains steps, runs shell commands.

  • Executes code/tests in terminal; explains results.

  • Final step: commit via built-in VCS or GitHub PR.

Claude Code:

  • CLI (claude) in repo dir.

  • REPL interface; enter instructions.

  • Claude reads/edits files, runs commands.

  • Can use slash commands (/clear, etc.).

  • Can suggest commits, diffs, PR text.

2. Context Management

WindSurf:

  • Tracks user timeline: opened files, commands, chat.

  • Supports parallel Cascades (threaded convos).

  • Codebase pre-indexed.

  • Project & global "Rules" + "Memories" persist across sessions.

Claude Code:

  • Session-based context, resumable (--continue).

  • CLAUDE.md and user memories define persistent context.

  • On-demand file reads (no pre-index).

  • Manual /clear to reset.

3. Agent/Tool Set

WindSurf (inferred):

  • File read/write/edit.

  • Terminal execution.

  • Multi-file rename/refactor.

  • Web search + image analysis.

  • Git + GitHub integration.

Claude Code:

  • Bash, Read, Edit, Write, MultiEdit, Grep, Glob, LS, WebSearch, WebFetch, Agent, TodoWrite, TodoRead.

  • Sub-agents for task delegation.

  • Tools invoked via internal chain-of-thought.

4. System Prompt

WindSurf (inferred):

  • Role: coding partner in IDE.

  • Explains actions.

  • Markdown formatting.

  • Uses project/global rules + memories.

Claude Code:

  • Tool invocation instructions.

  • Follows "constitutional AI" principles.

  • Markdown output.

  • Requests confirmation for destructive actions.

  • Supports CLAUDE.md customization.

5. Git Integration

WindSurf:

  • Auto stage + commit with message.

  • Uses git status + diff.

  • Can open PR via GitHub plugin.

  • Git-aware Cascade planning.

Claude Code:

  • Uses Bash(git *).

  • Shows diffs, creates commits, summarizes changes.

  • Slash commands allow scripted git flows.

  • Adds co-authored-by message.

6. Command Execution

Both:

  • Controlled via permission config.

  • Command output captured and fed back to LLM.

  • Tools sandboxed with time/output limits.

Claude Code:

  • --allowedTools governs what can run.

  • Timeout, output length caps.

  • Uses ReAct loop: think > act > observe > refine.

WindSurf:

  • IDE terminal integration.

  • Uses test results/output to inform next steps.

  • Can auto-run validation steps.

7. Caching / Recompute

WindSurf:

  • Pre-indexes codebase.

  • Persistent project memories.

  • Tracks user action history.

  • Likely caches git state, rules.

Claude Code:

  • CLAUDE.md and ~/.claude/* persist.

  • No repo-wide pre-index.

  • Session transcript stored (30d+).

  • CLI may cache recent file reads.

8. Planner vs Executor

WindSurf:

  • Cascade plans + acts in a cascade.

  • Tracks intent across user flow.

  • Executes in background.

Claude Code:

  • Uses TodoWrite, sub-agents.

  • Executes steps with confirmation.

  • Can plan multi-step actions, revise plans.

  • Model decides what tools to invoke and when.


Implementation Suggestion for FastAPI + React Monorepo

  • React frontend: chat UI, diff viewer, file tree.

  • FastAPI backend: tool dispatch, repo state management.

  • Background workers: indexer, shell executor.

  • Use Claude-style tool protocol (ReAct).

  • Support multi-step plans (todo queue).

  • Git integration: commit/diff/branch endpoints.

  • Add memory via .project.md and user profiles.

  • Store session/plan state in DB or file cache.

  • Use WebSockets for real-time feedback.

===

Here's the concise breakdown of lovable.dev:


1. UX Flow

  • Chat-based interface.

  • Users type goals (e.g., “Add Stripe checkout”).

  • Lovable generates a plan, executes it step-by-step.

  • Shows intermediate actions: file edits, shell commands, test runs, deploys.

  • All steps visualized; editable if needed.

2. Context Management

  • Auto-tracked: goal → plan → execution.

  • File tree + diffs shown live.

  • Sidebar displays active plan, files changed, tool outputs.

3. Tools / Agents

  • edit_code, run_shell, git_commit, run_tests, create_branch, deploy.

  • Tool calls are YAML-formatted; model emits declarative steps.

  • Output from each tool is streamed to UI.

4. Prompt Strategy

  • System prompt encourages planning in YAML first.

  • Example format:\nyaml\n- step: edit_code\n description: Add handler\n file: api.py\n

  • Model constrained to emit tool plans, not raw text edits.

5. Git Integration

  • Each plan includes create_branch, commit, push, PR.

  • Commit messages and diffs shown inline.

  • Git is surfaced as an explicit planning stage.

6. Command Execution

  • Shell commands run server-side in sandbox.

  • Stdout/stderr logged, shown in chat.

  • Model decides what to run, then user approves.

7. Caching / State

  • File tree snapshot.

  • Diff and stdout cached per step.

  • Plan stored and shown throughout task.

8. Planner vs Executor

  • Model emits full plan first.

  • System executes steps in order.

  • Feedback loop on each step before next.