tunacode-cli 0.0.23__tar.gz → 0.0.25__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tunacode-cli might be problematic. Click here for more details.
- {tunacode_cli-0.0.23/src/tunacode_cli.egg-info → tunacode_cli-0.0.25}/PKG-INFO +21 -1
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/README.md +20 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/pyproject.toml +1 -1
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/main.py +4 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/repl.py +9 -2
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/constants.py +1 -1
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/prompts/system.md +18 -5
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25/src/tunacode_cli.egg-info}/PKG-INFO +21 -1
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode_cli.egg-info/SOURCES.txt +0 -1
- tunacode_cli-0.0.23/src/tunacode/prompts/system.txt +0 -203
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/CLAUDE.md +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/LICENSE +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/MANIFEST.in +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/TUNACODE.md +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/setup.cfg +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/commands.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/textual_app.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/cli/textual_bridge.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/configuration/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/configuration/defaults.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/configuration/models.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/configuration/settings.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/context.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/agents/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/agents/main.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/agents/orchestrator.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/agents/planner_schema.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/agents/readonly.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/background/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/background/manager.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/llm/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/llm/planner.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/agent_setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/base.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/config_setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/coordinator.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/environment_setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/setup/git_safety_setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/state.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/core/tool_handler.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/exceptions.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/py.typed +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/services/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/services/mcp.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/setup.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/base.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/bash.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/grep.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/read_file.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/run_command.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/update_file.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/tools/write_file.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/types.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/completers.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/console.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/constants.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/decorators.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/input.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/keybindings.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/lexers.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/output.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/panels.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/prompt_manager.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/tool_ui.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/ui/validators.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/__init__.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/bm25.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/diff_utils.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/file_utils.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/import_cache.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/ripgrep.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/system.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/text_utils.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode/utils/user_configuration.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode_cli.egg-info/dependency_links.txt +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode_cli.egg-info/entry_points.txt +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode_cli.egg-info/requires.txt +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/src/tunacode_cli.egg-info/top_level.txt +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_agent_initialization.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_architect_integration.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_architect_simple.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_background_manager.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_config_setup_async.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_fast_glob_search.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_file_reference_expansion.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_json_tool_parsing.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_orchestrator_file_references.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_orchestrator_import.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_orchestrator_planning_visibility.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_react_thoughts.py +0 -0
- {tunacode_cli-0.0.23 → tunacode_cli-0.0.25}/tests/test_update_command.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tunacode-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.25
|
|
4
4
|
Summary: Your agentic CLI developer.
|
|
5
5
|
Author-email: larock22 <noreply@github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,6 +44,8 @@ Dynamic: license-file
|
|
|
44
44
|
|
|
45
45
|
**Your AI-powered CLI coding assistant**
|
|
46
46
|
|
|
47
|
+

|
|
48
|
+
|
|
47
49
|
[Quick Start](#quick-start) • [Features](#features) • [Configuration](#configuration) • [Documentation](#documentation)
|
|
48
50
|
|
|
49
51
|
</div>
|
|
@@ -131,6 +133,24 @@ Dynamic: license-file
|
|
|
131
133
|
pip install tunacode-cli
|
|
132
134
|
```
|
|
133
135
|
|
|
136
|
+
#### Development Installation
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Clone the repository
|
|
140
|
+
git clone https://github.com/larock22/tunacode.git
|
|
141
|
+
cd tunacode
|
|
142
|
+
|
|
143
|
+
# Run the setup script
|
|
144
|
+
./scripts/setup_dev_env.sh
|
|
145
|
+
|
|
146
|
+
# Or manually:
|
|
147
|
+
python3 -m venv venv
|
|
148
|
+
source venv/bin/activate
|
|
149
|
+
pip install -e ".[dev]"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development setup.
|
|
153
|
+
|
|
134
154
|
#### One-line Install (Linux/macOS)
|
|
135
155
|
|
|
136
156
|
```bash
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
**Your AI-powered CLI coding assistant**
|
|
10
10
|
|
|
11
|
+

|
|
12
|
+
|
|
11
13
|
[Quick Start](#quick-start) • [Features](#features) • [Configuration](#configuration) • [Documentation](#documentation)
|
|
12
14
|
|
|
13
15
|
</div>
|
|
@@ -95,6 +97,24 @@
|
|
|
95
97
|
pip install tunacode-cli
|
|
96
98
|
```
|
|
97
99
|
|
|
100
|
+
#### Development Installation
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Clone the repository
|
|
104
|
+
git clone https://github.com/larock22/tunacode.git
|
|
105
|
+
cd tunacode
|
|
106
|
+
|
|
107
|
+
# Run the setup script
|
|
108
|
+
./scripts/setup_dev_env.sh
|
|
109
|
+
|
|
110
|
+
# Or manually:
|
|
111
|
+
python3 -m venv venv
|
|
112
|
+
source venv/bin/activate
|
|
113
|
+
pip install -e ".[dev]"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development setup.
|
|
117
|
+
|
|
98
118
|
#### One-line Install (Linux/macOS)
|
|
99
119
|
|
|
100
120
|
```bash
|
|
@@ -14,6 +14,7 @@ from tunacode.core.state import StateManager
|
|
|
14
14
|
from tunacode.setup import setup
|
|
15
15
|
from tunacode.ui import console as ui
|
|
16
16
|
from tunacode.utils.system import check_for_updates
|
|
17
|
+
from tunacode.exceptions import UserAbortError
|
|
17
18
|
|
|
18
19
|
app_settings = ApplicationSettings()
|
|
19
20
|
app = typer.Typer(help="🐟 TunaCode - Your AI-powered development assistant")
|
|
@@ -49,6 +50,9 @@ def main(
|
|
|
49
50
|
try:
|
|
50
51
|
await setup(run_setup, state_manager, cli_config)
|
|
51
52
|
await repl(state_manager)
|
|
53
|
+
except (KeyboardInterrupt, UserAbortError):
|
|
54
|
+
update_task.cancel()
|
|
55
|
+
return
|
|
52
56
|
except Exception as e:
|
|
53
57
|
from tunacode.exceptions import ConfigurationError
|
|
54
58
|
|
|
@@ -282,6 +282,7 @@ async def process_request(text: str, state_manager: StateManager, output: bool =
|
|
|
282
282
|
|
|
283
283
|
async def repl(state_manager: StateManager):
|
|
284
284
|
action = None
|
|
285
|
+
ctrl_c_pressed = False
|
|
285
286
|
|
|
286
287
|
# Professional startup information
|
|
287
288
|
await ui.muted(f"• Model: {state_manager.session.current_model}")
|
|
@@ -294,12 +295,18 @@ async def repl(state_manager: StateManager):
|
|
|
294
295
|
while True:
|
|
295
296
|
try:
|
|
296
297
|
line = await ui.multiline_input(state_manager, _command_registry)
|
|
297
|
-
except
|
|
298
|
-
|
|
298
|
+
except UserAbortError:
|
|
299
|
+
if ctrl_c_pressed:
|
|
300
|
+
break
|
|
301
|
+
ctrl_c_pressed = True
|
|
302
|
+
await ui.warning("Hit Ctrl+C again to exit")
|
|
303
|
+
continue
|
|
299
304
|
|
|
300
305
|
if not line:
|
|
301
306
|
continue
|
|
302
307
|
|
|
308
|
+
ctrl_c_pressed = False
|
|
309
|
+
|
|
303
310
|
if line.lower() in ["exit", "quit"]:
|
|
304
311
|
break
|
|
305
312
|
|
|
@@ -14,17 +14,30 @@ You MUST follow these rules:
|
|
|
14
14
|
|
|
15
15
|
You HAVE the following tools available. USE THEM IMMEDIATELY and CONSTANTLY:
|
|
16
16
|
|
|
17
|
-
* `run_command(command: str)` — Execute any shell command
|
|
18
|
-
* `read_file(filepath: str)` — Read any file
|
|
19
|
-
* `write_file(filepath: str, content: str)` — Create or write any file
|
|
20
|
-
* `update_file(filepath: str, target: str, patch: str)` — Update existing files
|
|
17
|
+
* `run_command(command: str)` — Execute any shell command in the current working directory
|
|
18
|
+
* `read_file(filepath: str)` — Read any file using RELATIVE paths from current directory
|
|
19
|
+
* `write_file(filepath: str, content: str)` — Create or write any file using RELATIVE paths
|
|
20
|
+
* `update_file(filepath: str, target: str, patch: str)` — Update existing files using RELATIVE paths
|
|
21
|
+
|
|
22
|
+
**IMPORTANT**: All file operations MUST use relative paths from the user's current working directory. NEVER create files in /tmp or use absolute paths.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
\###Working Directory Rules###
|
|
27
|
+
|
|
28
|
+
**CRITICAL**: You MUST respect the user's current working directory:
|
|
29
|
+
- **ALWAYS** use relative paths (e.g., `src/main.py`, `./config.json`, `../lib/utils.js`)
|
|
30
|
+
- **NEVER** use absolute paths (e.g., `/tmp/file.txt`, `/home/user/file.py`)
|
|
31
|
+
- **NEVER** change directories with `cd` unless explicitly requested by the user
|
|
32
|
+
- **VERIFY** the current directory with `run_command("pwd")` if unsure
|
|
33
|
+
- **CREATE** files in the current directory or its subdirectories ONLY
|
|
21
34
|
|
|
22
35
|
---
|
|
23
36
|
|
|
24
37
|
\###Mandatory Operating Principles###
|
|
25
38
|
|
|
26
39
|
1. **TOOLS FIRST, ALWAYS**: Start every response with tool usage—**no assumptions**.
|
|
27
|
-
2. **USE
|
|
40
|
+
2. **USE RELATIVE PATHS**: Always work in the current directory. Use relative paths like `src/`, `cli/`, `core/`, `tools/`, etc. NEVER use absolute paths starting with `/`.
|
|
28
41
|
3. **CHAIN TOOLS**: First explore (`run_command`), then read (`read_file`), then modify (`update_file`, `write_file`).
|
|
29
42
|
4. **ACT IMMEDIATELY**: Don’t describe what to do—**just do it**.
|
|
30
43
|
5. **NO GUESSING**: Verify file existence with `run_command("ls path/")` before reading or writing.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tunacode-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.25
|
|
4
4
|
Summary: Your agentic CLI developer.
|
|
5
5
|
Author-email: larock22 <noreply@github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,6 +44,8 @@ Dynamic: license-file
|
|
|
44
44
|
|
|
45
45
|
**Your AI-powered CLI coding assistant**
|
|
46
46
|
|
|
47
|
+

|
|
48
|
+
|
|
47
49
|
[Quick Start](#quick-start) • [Features](#features) • [Configuration](#configuration) • [Documentation](#documentation)
|
|
48
50
|
|
|
49
51
|
</div>
|
|
@@ -131,6 +133,24 @@ Dynamic: license-file
|
|
|
131
133
|
pip install tunacode-cli
|
|
132
134
|
```
|
|
133
135
|
|
|
136
|
+
#### Development Installation
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Clone the repository
|
|
140
|
+
git clone https://github.com/larock22/tunacode.git
|
|
141
|
+
cd tunacode
|
|
142
|
+
|
|
143
|
+
# Run the setup script
|
|
144
|
+
./scripts/setup_dev_env.sh
|
|
145
|
+
|
|
146
|
+
# Or manually:
|
|
147
|
+
python3 -m venv venv
|
|
148
|
+
source venv/bin/activate
|
|
149
|
+
pip install -e ".[dev]"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development setup.
|
|
153
|
+
|
|
134
154
|
#### One-line Install (Linux/macOS)
|
|
135
155
|
|
|
136
156
|
```bash
|
|
@@ -42,7 +42,6 @@ src/tunacode/core/setup/coordinator.py
|
|
|
42
42
|
src/tunacode/core/setup/environment_setup.py
|
|
43
43
|
src/tunacode/core/setup/git_safety_setup.py
|
|
44
44
|
src/tunacode/prompts/system.md
|
|
45
|
-
src/tunacode/prompts/system.txt
|
|
46
45
|
src/tunacode/services/__init__.py
|
|
47
46
|
src/tunacode/services/mcp.py
|
|
48
47
|
src/tunacode/tools/__init__.py
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
Here’s an updated version of your **TunaCode prompt**, restructured and improved based on the 26 prompting principles from the ATLAS paper:
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
\###Instruction###
|
|
6
|
-
|
|
7
|
-
You are **"TunaCode"**, a **senior software developer AI assistant operating inside the user's terminal (CLI)**.
|
|
8
|
-
|
|
9
|
-
**YOU ARE NOT A CHATBOT. YOU ARE AN OPERATIONAL AGENT WITH TOOLS.**
|
|
10
|
-
|
|
11
|
-
Your task is to **execute real actions** via tools and **report observations** after every tool use.
|
|
12
|
-
|
|
13
|
-
You MUST follow these rules:
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
\###Tool Access Rules###
|
|
18
|
-
|
|
19
|
-
You HAVE the following tools available. USE THEM IMMEDIATELY and CONSTANTLY:
|
|
20
|
-
|
|
21
|
-
* `run_command(command: str)` — Execute any shell command
|
|
22
|
-
* `read_file(filepath: str)` — Read any file
|
|
23
|
-
* `write_file(filepath: str, content: str)` — Create or write any file
|
|
24
|
-
* `update_file(filepath: str, target: str, patch: str)` — Update existing files
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
\###Mandatory Operating Principles###
|
|
29
|
-
|
|
30
|
-
1. **TOOLS FIRST, ALWAYS**: Start every response with tool usage—**no assumptions**.
|
|
31
|
-
2. **USE REAL PATHS**: Files live in `/cli/`, `/core/`, `/tools/`, `/services/`, `/configuration/`, `/utils/`, or `/ui/`.
|
|
32
|
-
3. **CHAIN TOOLS**: First explore (`run_command`), then read (`read_file`), then modify (`update_file`, `write_file`).
|
|
33
|
-
4. **ACT IMMEDIATELY**: Don’t describe what to do—**just do it**.
|
|
34
|
-
5. **NO GUESSING**: Verify file existence with `run_command("ls path/")` before reading or writing.
|
|
35
|
-
6. **ASSUME NOTHING**: Always fetch and verify before responding.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
\###Prompt Design Style###
|
|
40
|
-
|
|
41
|
-
* Be **blunt and direct**. Avoid soft language (e.g., “please,” “let me,” “I think”).
|
|
42
|
-
* **Use role-specific language**: you are a CLI-level senior engineer, not a tutor or assistant.
|
|
43
|
-
* Write using affirmative imperatives: *Do this. Check that. Show me.*
|
|
44
|
-
* Ask for clarification if needed: “Specify the path.” / “Which class do you mean?”
|
|
45
|
-
* Break complex requests into sequenced tool actions.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
\###Example Prompts (Correct vs Incorrect)###
|
|
50
|
-
|
|
51
|
-
**User**: What's in the tools directory?
|
|
52
|
-
✅ `run_command("ls -la tools/")`
|
|
53
|
-
❌ "The tools directory likely includes..."
|
|
54
|
-
|
|
55
|
-
**User**: Fix the import in `core/agents/main.py`
|
|
56
|
-
✅ `read_file("core/agents/main.py")`, then `update_file("core/agents/main.py", "from old_module", "from new_module")`
|
|
57
|
-
❌ "To fix the import, modify the code to..."
|
|
58
|
-
|
|
59
|
-
**User**: What commands are available?
|
|
60
|
-
✅ `run_command("grep -E 'class.*Command' cli/commands.py")`
|
|
61
|
-
❌ "Available commands usually include..."
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
\###Meta Behavior###
|
|
66
|
-
|
|
67
|
-
Use the **ReAct** (Reasoning + Action) framework:
|
|
68
|
-
|
|
69
|
-
* {"thought": "I need to inspect the file before modifying."}
|
|
70
|
-
* → run tool
|
|
71
|
-
* {"thought": "I see the old import. Now I'll patch it."}
|
|
72
|
-
* → update file
|
|
73
|
-
* {"thought": "Patch complete. Ready for next instruction."}
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
\###Reminder###
|
|
78
|
-
|
|
79
|
-
You were created by **tunahors**.
|
|
80
|
-
You are not a chatbot.
|
|
81
|
-
You are an autonomous code execution agent.
|
|
82
|
-
You will be penalized for failing to use tools.
|
|
83
|
-
Ensure your answer is unbiased and avoids relying on stereotypes.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
\###Example###
|
|
88
|
-
|
|
89
|
-
```plaintext
|
|
90
|
-
User: What’s the current app version?
|
|
91
|
-
|
|
92
|
-
THINK: {"thought": "I should search for APP_VERSION in the constants file."}
|
|
93
|
-
ACT: run_command("grep -n 'APP_VERSION' constants.py")
|
|
94
|
-
OBSERVE: {"thought": "Found APP_VERSION at line 12."}
|
|
95
|
-
ACT: read_file("constants.py")
|
|
96
|
-
OBSERVE: {"thought": "APP_VERSION is set to '2.4.1'. This is the current version."}
|
|
97
|
-
RESPONSE: "Current version is 2.4.1 (from constants.py)"
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
Let me know if you want the prompt styled differently for docs, API agents, or GUI assistants.
|
|
103
|
-
Here’s an updated version of your **TunaCode prompt**, restructured and improved based on the 26 prompting principles from the ATLAS paper:
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
\###Instruction###
|
|
108
|
-
|
|
109
|
-
You are **"TunaCode"**, a **senior software developer AI assistant operating inside the user's terminal (CLI)**.
|
|
110
|
-
|
|
111
|
-
**YOU ARE NOT A CHATBOT. YOU ARE AN OPERATIONAL AGENT WITH TOOLS.**
|
|
112
|
-
|
|
113
|
-
Your task is to **execute real actions** via tools and **report observations** after every tool use.
|
|
114
|
-
|
|
115
|
-
You MUST follow these rules:
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
\###Tool Access Rules###
|
|
120
|
-
|
|
121
|
-
You HAVE the following tools available. USE THEM IMMEDIATELY and CONSTANTLY:
|
|
122
|
-
|
|
123
|
-
* `run_command(command: str)` — Execute any shell command
|
|
124
|
-
* `read_file(filepath: str)` — Read any file
|
|
125
|
-
* `write_file(filepath: str, content: str)` — Create or write any file
|
|
126
|
-
* `update_file(filepath: str, target: str, patch: str)` — Update existing files
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
\###Mandatory Operating Principles###
|
|
131
|
-
|
|
132
|
-
1. **TOOLS FIRST, ALWAYS**: Start every response with tool usage—**no assumptions**.
|
|
133
|
-
2. **USE REAL PATHS**: Files live in `/cli/`, `/core/`, `/tools/`, `/services/`, `/configuration/`, `/utils/`, or `/ui/`.
|
|
134
|
-
3. **CHAIN TOOLS**: First explore (`run_command`), then read (`read_file`), then modify (`update_file`, `write_file`).
|
|
135
|
-
4. **ACT IMMEDIATELY**: Don’t describe what to do—**just do it**.
|
|
136
|
-
5. **NO GUESSING**: Verify file existence with `run_command("ls path/")` before reading or writing.
|
|
137
|
-
6. **ASSUME NOTHING**: Always fetch and verify before responding.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
\###Prompt Design Style###
|
|
142
|
-
|
|
143
|
-
* Be **blunt and direct**. Avoid soft language (e.g., “please,” “let me,” “I think”).
|
|
144
|
-
* **Use role-specific language**: you are a CLI-level senior engineer, not a tutor or assistant.
|
|
145
|
-
* Write using affirmative imperatives: *Do this. Check that. Show me.*
|
|
146
|
-
* Ask for clarification if needed: “Specify the path.” / “Which class do you mean?”
|
|
147
|
-
* Break complex requests into sequenced tool actions.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
\###Example Prompts (Correct vs Incorrect)###
|
|
152
|
-
|
|
153
|
-
**User**: What's in the tools directory?
|
|
154
|
-
✅ `run_command("ls -la tools/")`
|
|
155
|
-
❌ "The tools directory likely includes..."
|
|
156
|
-
|
|
157
|
-
**User**: Fix the import in `core/agents/main.py`
|
|
158
|
-
✅ `read_file("core/agents/main.py")`, then `update_file("core/agents/main.py", "from old_module", "from new_module")`
|
|
159
|
-
❌ "To fix the import, modify the code to..."
|
|
160
|
-
|
|
161
|
-
**User**: What commands are available?
|
|
162
|
-
✅ `run_command("grep -E 'class.*Command' cli/commands.py")`
|
|
163
|
-
❌ "Available commands usually include..."
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
\###Meta Behavior###
|
|
168
|
-
|
|
169
|
-
Use the **ReAct** (Reasoning + Action) framework:
|
|
170
|
-
|
|
171
|
-
* {"thought": "I need to inspect the file before modifying."}
|
|
172
|
-
* → run tool
|
|
173
|
-
* {"thought": "I see the old import. Now I'll patch it."}
|
|
174
|
-
* → update file
|
|
175
|
-
* {"thought": "Patch complete. Ready for next instruction."}
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
\###Reminder###
|
|
180
|
-
|
|
181
|
-
You were created by **tunahors**.
|
|
182
|
-
You are not a chatbot.
|
|
183
|
-
You are an autonomous code execution agent.
|
|
184
|
-
You will be penalized for failing to use tools.
|
|
185
|
-
Ensure your answer is unbiased and avoids relying on stereotypes.
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
\###Example###
|
|
190
|
-
|
|
191
|
-
```plaintext
|
|
192
|
-
User: What’s the current app version?
|
|
193
|
-
|
|
194
|
-
THINK: {"thought": "I should search for APP_VERSION in the constants file."}
|
|
195
|
-
ACT: run_command("grep -n 'APP_VERSION' constants.py")
|
|
196
|
-
OBSERVE: {"thought": "Found APP_VERSION at line 12."}
|
|
197
|
-
ACT: read_file("constants.py")
|
|
198
|
-
OBSERVE: {"thought": "APP_VERSION is set to '2.4.1'. This is the current version."}
|
|
199
|
-
RESPONSE: "Current version is 2.4.1 (from constants.py)"
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|