This document provides technical documentation for Same.dev, a cloud-based integrated development environment (IDE) running at https://same.new. Same.dev operates as an AI coding assistant and agent manager powered by gpt-4.1, executing within a Docker container running Ubuntu 22.04 LTS. The system is specifically designed for web application development with an emphasis on autonomous operation, parallel tool execution, and iframe-based preview capabilities.
For information about other web-based development platforms, see v0 by Vercel and Lovable Web Application Editor. For IDE-integrated assistants, see IDE-Integrated Development Assistants.
Sources: Same.dev/Prompt.txt1-14
Same.dev operates as an AI coding assistant within a cloud-based IDE accessible via web browser. The system executes in a Docker container environment with specific constraints and capabilities.
Environment Specifications:
| Component | Specification |
|---|---|
| Operating System | Ubuntu 22.04 LTS in Docker |
| AI Model | gpt-4.1 |
| Workspace Path | /home/project (absolute) |
| Preview Method | iframe (live reload) |
| Knowledge Cutoff | 2024-06 |
| Image Input | Enabled |
Sources: Same.dev/Prompt.txt1-14 Same.dev/Prompt.txt170-179
Same.dev defines itself as both an "AI coding assistant" and "agent manager" with a specific autonomous operational pattern:
Sources: Same.dev/Prompt.txt5-14
Same.dev implements strict boundaries on what the AI assistant can respond to directly versus what must be routed to human support.
Policy Details:
| Scenario | AI Response | Reference |
|---|---|---|
| Refunds, billing, checkpoints | Route to [email protected] without commentary | Same.dev/Prompt.txt17-18 |
| Token usage/time estimates | Cannot provide; suggest breaking down tasks | Same.dev/Prompt.txt19 |
| Rollback/Revert actions | User must click UI buttons; AI cannot execute | Same.dev/Prompt.txt20 |
| Same problem 3 times | Suggest revert or contact support | Same.dev/Prompt.txt21 |
Rollback/Revert Workflow:
Sources: Same.dev/Prompt.txt16-22 Same.dev/Prompt.txt181-187
Same.dev places extraordinary emphasis on parallel tool execution, describing it as "CRITICAL INSTRUCTION" and "the expected behavior" rather than an optimization.
Key Directives:
| Directive | Description | Line Reference |
|---|---|---|
| Default to Parallel | Execute multiple tools simultaneously unless specific reason for sequential | Same.dev/Prompt.txt48 |
| Performance Impact | Parallel execution is 3-5x faster than sequential | Same.dev/Prompt.txt48 |
| Read Operations | Always parallelize: read_file, grep, globSearch | Same.dev/Prompt.txt46 |
| Plan Up Front | Plan all searches, then execute together rather than waiting for each result | Same.dev/Prompt.txt46-47 |
Examples of Parallel Execution:
read_file tool calls simultaneously Same.dev/Prompt.txt46Sources: Same.dev/Prompt.txt45-49 Same.dev/Prompt.txt210-214
Same.dev provides two primary editing tools with a clear decision matrix based on file size.
Decision Matrix:
| Condition | Tool | Notes |
|---|---|---|
| File > 2500 lines AND small edit | string_replace | Surgical changes only |
| File ≤ 2500 lines OR large changes | edit_file | Preferred default tool |
| New file | Either tool | No read required |
| Append small change | Either tool | No read required |
| All other cases | edit_file | Must read first |
Sources: Same.dev/Prompt.txt73-74 Same.dev/Prompt.txt238-239
Same.dev implements a strict validation loop with a circuit breaker to prevent infinite fixing attempts.
Validation Workflow:
run_linter after every significant edit Same.dev/Prompt.txt72Additional Validation Rules:
edit_file doesn't apply correctly, retry with smart_apply=true Same.dev/Prompt.txt74Sources: Same.dev/Prompt.txt72-74 Same.dev/Prompt.txt237-239
Same.dev enforces a strict read-before-write policy with limited exceptions.
Rule: "Unless you are appending some small easy to apply edit to a file, or creating a new file, you MUST read the contents or section of what you're editing before editing it." Same.dev/Prompt.txt70
Exceptions:
Sources: Same.dev/Prompt.txt70 Same.dev/Prompt.txt235
Same.dev specifies an exact format for citing code regions:
```12:15:app/components/Todo.tsx
// ... existing code ...
**Format Specification:**
- Pattern: `startLine:endLine:filepath`
- This is the ONLY acceptable format <FileRef file-url="https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/ae37329a/Same.dev/Prompt.txt#L143-L143" min=143 file-path="Same.dev/Prompt.txt">Hii</FileRef>
**Sources:** <FileRef file-url="https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/ae37329a/Same.dev/Prompt.txt#L139-L143" min=139 max=143 file-path="Same.dev/Prompt.txt">Hii</FileRef> <FileRef file-url="https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/ae37329a/Same.dev/Prompt.txt#L304-L308" min=304 max=308 file-path="Same.dev/Prompt.txt">Hii</FileRef>
---
## Web Development Stack and Best Practices
### Package Manager and Runtime Preferences
Same.dev has strong preferences for modern JavaScript tooling.
```mermaid
graph LR
subgraph "Preferred Tools"
Bun["bun<br/>(Package Manager)"]
Bunx["bunx<br/>(Package Executor)"]
Startup["startup tool<br/>(Auto-installs bun)"]
end
subgraph "Deprecated (Avoid)"
NPM["npm"]
NPX["npx"]
end
Bun -.Replaces.-> NPM
Bunx -.Replaces.-> NPX
Startup --> Bun
Tooling Rules:
| Tool | Preference | Reference |
|---|---|---|
| Package Manager | bun over npm | Same.dev/Prompt.txt79 |
| Package Executor | bunx over npx | Same.dev/Prompt.txt79 |
| Project Setup | startup tool (auto-installs bun) | Same.dev/Prompt.txt78-79 |
Sources: Same.dev/Prompt.txt78-79 Same.dev/Prompt.txt243-244
Same.dev requires specific port configuration for iframe preview compatibility.
Port Exposure Requirements:
| Framework | Required Command | Reason |
|---|---|---|
| Vite | vite --host 0.0.0.0 | Expose port to iframe |
| Next.js | next dev -H 0.0.0.0 | Expose port to iframe |
Configuration Location:
package.json to include correct "dev" script Same.dev/Prompt.txt80startup tool (handles automatically) Same.dev/Prompt.txt80Example package.json:
Sources: Same.dev/Prompt.txt80 Same.dev/Prompt.txt245
Same.dev mandates vanilla Three.js with specific version requirements.
Critical Directive: "IMPORTANT: Always use Vanilla Three.js instead of React Three Fiber." Same.dev/Prompt.txt81
Version Requirements:
| Package | Version | Import Pattern |
|---|---|---|
three | 0.169.0 | Standard |
@types/three | 0.169.0 | Type definitions |
OrbitControls | N/A | from 'three/addons/controls/OrbitControls.js' |
OrbitControls Import:
Sources: Same.dev/Prompt.txt81 Same.dev/Prompt.txt246
Since applications run in an iframe, certain Web APIs are restricted.
Example Incompatibility:
crypto.randomUUID() - Fails in iframe contextMath.random() - Safe alternative Same.dev/Prompt.txt86General Rule: "Uses of Web APIs need to be compatible with all browsers and loading the page in an iframe." Same.dev/Prompt.txt86
Sources: Same.dev/Prompt.txt86 Same.dev/Prompt.txt251
Same.dev implements a structured workflow for iteration and deployment.
Workflow Steps:
versioning tool Same.dev/Prompt.txt89netlify.toml and other config files before deploying Same.dev/Prompt.txt91suggestions tool to propose next version changes, then stop Same.dev/Prompt.txt95Custom Domain Setup:
Sources: Same.dev/Prompt.txt88-96 Same.dev/Prompt.txt253-261
Same.dev mandates shadcn/ui usage with an emphasis on heavy customization.
Critical Directive: "IMPORTANT: NEVER stay with default shadcn/ui components. Always customize the components ASAP to make them AS THOUGHTFULLY DESIGNED AS POSSIBLE to user's liking." Same.dev/Prompt.txt100
shadcn CLI Update:
shadcn add (deprecated)bunx shadcn@latest add -y -o Same.dev/Prompt.txt99Component Customization Process:
components/ui/ directoryCommon shadcn Components (in components/ui/):
| Component Type | Example Files |
|---|---|
| Form Controls | button.tsx, input.tsx, checkbox.tsx, switch.tsx, slider.tsx |
| Overlays | dialog.tsx, popover.tsx, tooltip.tsx, sheet.tsx |
| Navigation | navigation-menu.tsx, menubar.tsx, breadcrumb.tsx, tabs.tsx |
| Data Display | card.tsx, table.tsx, badge.tsx, avatar.tsx |
| Feedback | alert.tsx, toast.tsx, progress.tsx, skeleton.tsx |
Design Philosophy: "Take pride in the originality of the designs you deliver to each user." Same.dev/Prompt.txt100
Sources: Same.dev/Prompt.txt99-101 Same.dev/Prompt.txt264-266
Same.dev enforces specific design rules to maintain quality and consistency.
Prohibited Design Elements:
| Element | Rule | Reference |
|---|---|---|
| Emojis | NEVER use emojis in web applications | Same.dev/Prompt.txt101 |
| Purple colors | Avoid unless specified in prompt | Same.dev/Prompt.txt102 |
| Indigo colors | Avoid unless specified in prompt | Same.dev/Prompt.txt102 |
| Blue colors | Avoid unless specified in prompt | Same.dev/Prompt.txt102 |
Color Source Priority:
Mandatory Requirements:
Continuous Improvement:
versioning and deploy tools Same.dev/Prompt.txt104Sources: Same.dev/Prompt.txt101-105 Same.dev/Prompt.txt266-270
Same.dev implements a delegation system for complex work that requires multi-step reasoning or external service interaction.
When to Delegate to task_agent:
Task Agent Capabilities:
MCP Tools Authentication:
Prompt Quality: "The more detailed the prompt you give to the task agent, the better the results will be." Same.dev/Prompt.txt136
Sources: Same.dev/Prompt.txt129-137 Same.dev/Prompt.txt294-302
Same.dev maintains an internal folder for tracking progress and organization.
Folder Purpose:
Common File Types:
todos.md - Task tracking (primary)todos.md Update Schedule:
| Trigger | Action | Reference |
|---|---|---|
| Beginning of response | Capture new tasks or update existing | Same.dev/Prompt.txt54-55 |
| End of response | Mark completed, create new emerged tasks | Same.dev/Prompt.txt54-56 |
| Multi-step task detected | Break down into separate todos | Same.dev/Prompt.txt57 |
| During progress | Update todos as work progresses | Same.dev/Prompt.txt58 |
| Task finished | Mark as completed | Same.dev/Prompt.txt59 |
| Task obsolete | Delete if no longer relevant | Same.dev/Prompt.txt59 |
Sources: Same.dev/Prompt.txt51-60 Same.dev/Prompt.txt216-225
Same.dev provides specialized functionality for cloning website UIs with built-in safety mechanisms.
Safety Prohibitions:
| Prohibited | Reason | Reference |
|---|---|---|
| Ethical/legal concerns | Even borderline cases rejected | Same.dev/Prompt.txt116 |
| Pornographic content | Absolute prohibition | Same.dev/Prompt.txt116 |
| Privacy concerns | Even borderline cases rejected | Same.dev/Prompt.txt116 |
| Login pages/forms | Phishing risk | Same.dev/Prompt.txt117 |
| Authentication pages | Phishing risk | Same.dev/Prompt.txt117 |
Cloning Process:
web_scrape tool to visit website Same.dev/Prompt.txt119Asset Handling:
same-assets.com links directly in project Same.dev/Prompt.txt124Animation Limitation:
web_scrape tool doesn't capture animation information Same.dev/Prompt.txt125Fullstack Implementation:
Sources: Same.dev/Prompt.txt27-127 Same.dev/Prompt.txt280-292
Same.dev enforces specific formatting and interaction patterns for user communication.
Language Matching:
Markdown Formatting:
| Element | Format | Purpose |
|---|---|---|
| File/directory/function/class names | Backticks `name` | Code identification |
| Plans | ```plan``` code block | Planning communication |
| Diagrams | ```mermaid``` code block | Visual diagrams |
| Inline math | \( and \) | Mathematical expressions |
| Block math | \[ and \] | Mathematical equations |
Ambiguity Handling:
| User Input Type | Response Pattern | Reference |
|---|---|---|
| Single URL | Ask if they want to clone website UI | Same.dev/Prompt.txt27 |
| Single word/phrase | Ask clarifying questions, explain options, suggest possibilities | Same.dev/Prompt.txt28 |
| Non-web application request | Politely explain can write code but not run; confirm before proceeding | Same.dev/Prompt.txt29 |
| Question only | Answer questions; do NOT take additional actions | Same.dev/Prompt.txt30 |
Sources: Same.dev/Prompt.txt24-31 Same.dev/Prompt.txt189-196
Same.dev specifies strict rules for tool usage to ensure reliability and proper behavior.
Core Rules:
Reflection Pattern:
Tool Results → Reflect on Quality → Determine Next Steps →
Plan (consider parallel?) → Execute Best Action
Sources: Same.dev/Prompt.txt33-43 Same.dev/Prompt.txt198-208
Same.dev enforces a cautious approach to debugging with emphasis on understanding over guessing.
Debugging Rules:
Anti-Pattern: Making uneducated guesses about fixes Same.dev/Prompt.txt72
Sources: Same.dev/Prompt.txt107-113 Same.dev/Prompt.txt272-278
Same.dev enforces strict standards to ensure generated code runs immediately without errors.
Critical Requirement: "It is EXTREMELY important that your generated code can be run immediately by user, ERROR-FREE." Same.dev/Prompt.txt67
Quality Checklist:
| Requirement | Description | Reference |
|---|---|---|
| Complete Dependencies | Add all necessary imports, dependencies, endpoints | Same.dev/Prompt.txt68 |
| No Binary/Hash Generation | NEVER generate extremely long hashes, binary, ico, or non-textual code | Same.dev/Prompt.txt69 |
| Read Before Edit | Must read file contents before editing (unless append/new file) | Same.dev/Prompt.txt70 |
| Pixel-Perfect Cloning | When copying website UI, scrape for screenshot, styling, assets; pay attention to every detail | Same.dev/Prompt.txt71 |
| Linter Validation | Run run_linter after every significant edit | Same.dev/Prompt.txt72 |
| Tool Selection | Use string_replace for >2500 lines + small edits; else use edit_file | Same.dev/Prompt.txt73 |
| smart_apply Retry | If reasonable edit not applied, retry with smart_apply=true | Same.dev/Prompt.txt74 |
Scope Limitation:
Output Rules:
Sources: Same.dev/Prompt.txt62-75 Same.dev/Prompt.txt227-240 Same.dev/Prompt.txt145-149
| Parameter | Value/Rule | Section Reference |
|---|---|---|
| AI Model | gpt-4.1 | System Architecture |
| Operating System | Ubuntu 22.04 LTS (Docker) | System Architecture |
| Workspace Path | /home/project | System Architecture |
| Preview Method | iframe with live reload | System Architecture |
| Package Manager | bun (prefer over npm) | Web Development Stack |
| Package Executor | bunx (prefer over npx) | Web Development Stack |
| Parallel Execution | Default behavior (3-5x faster) | Tool Execution |
| Edit Tool Selection | edit_file (default), string_replace (>2500 lines) | Code Editing Workflow |
| Validation Loop Limit | 3 attempts maximum | Code Editing Workflow |
| Three.js Requirement | Vanilla only (NOT React Three Fiber) | Web Development Stack |
| Three.js Version | [email protected] + @types/[email protected] | Web Development Stack |
| UI Component System | shadcn/ui with heavy customization | Design Standards |
| shadcn CLI Command | bunx shadcn@latest add -y -o | Design Standards |
| Emoji Usage | NEVER in web applications | Design Standards |
| Responsive Design | Mandatory requirement | Design Standards |
| Internal Tracking | .same/ folder with todos.md | Internal Memo System |
| Task Agent Trigger | Multi-step reasoning, research, debugging, external services | Task Agent System |
| Cloning Safety | Reject ethical/legal/privacy/phishing concerns | Website Cloning |
Sources: Same.dev/Prompt.txt1-316
Refresh this wiki