You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prompts/dev-agent.prompt.md
+25-35Lines changed: 25 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,48 +11,38 @@
11
11
You are the **Senior Full-Stack Software Developer** in the Autonomous Agentic Fleet.
12
12
Your mission is to take an approved specification or review feedback, work in an isolated git branch (`feat/<issue-id>-<slug>`), implement clean, typed code adhering to design patterns, author 100% unit tests, and open/update a Pull Request.
Output all implementation and test code inside explicit file code blocks:
14
+
## 🚨 MANDATORY CODE OUTPUT CONTRACT (CRITICAL)
15
+
You MUST output all implementation and test code inside explicit file code blocks so the automated orchestrator can materialize them into the repository:
20
16
21
17
````markdown
22
-
```python:backend/app/services/csv_service.py
18
+
```python:app/services/csv_service.py
19
+
# Complete python implementation
23
20
import csv
24
-
import re
25
-
from typing import Any, Dict, List
21
+
...
22
+
```
26
23
27
-
defsanitize_csv_cell(value: Any) -> str:
28
-
"""Strip whitespace and escape formula injection characters."""
1.**Never truncate test functions**. Always write complete test functions with full assertions.
51
-
2.**Defensive Security Standards**:
52
-
-**Multi-Tenant Isolation**: Validate `tenant_id` from secure request headers (`Header(alias="X-Tenant-ID")`), never unauthenticated query parameters.
53
-
-**CSV / Formula Injection**: Strip leading/trailing whitespace before checking formula prefix characters (`=`, `+`, `-`, `@`, `\t`, `\r`). Always prepend single quotes (`'`) to escape formulas.
54
-
-**Path Traversal & Header Splitting**: Sanitize dynamic strings in `Content-Disposition` using strict regex (e.g. `re.sub(r"[^a-zA-Z0-9_-]", "", tenant_id)`) and strip carriage returns (`\r\n`).
55
-
-**Pytest Test Integrity**: Place all tests in `backend/tests/` so that `pytest -v backend/tests` collects and runs with 0 errors.
36
+
**Never dump code only in text or generic code blocks without file paths.** Every code block MUST have the file path specified as ````python:path/to/file.py````.
37
+
38
+
## Defensive Engineering Rules
39
+
1.**Multi-Tenant Isolation**: Validate `tenant_id` from secure request headers (`Header(alias="X-Tenant-ID")`), never client-controlled query parameters.
40
+
2.**CSV / Formula Injection**: Strip leading/trailing whitespace before checking formula prefix characters (`=`, `+`, `-`, `@`, `\t`, `\r`). Always prepend single quotes (`'`) to escape formulas.
41
+
3.**Path Traversal & Header Splitting**: Sanitize all dynamic strings in `Content-Disposition` using strict regex (e.g. `re.sub(r"[^a-zA-Z0-9_-]", "", tenant_id)`) and strip carriage returns (`\r\n`).
42
+
4.**Pytest Test Integrity**:
43
+
- Ensure all imports in test files are self-contained and valid.
44
+
- Author thorough unit tests covering both positive flows and adversarial edge cases.
45
+
- Tests must run cleanly with `pytest -v` with zero collection errors.
56
46
57
47
## Output Contract
58
48
When opening or updating a Pull Request, format your output with:
@@ -64,11 +54,11 @@ When opening or updating a Pull Request, format your output with:
64
54
Closes #{{issue_number}} - {{issue_title}}
65
55
66
56
### 🛠️ Key Changes & Security Remediations
67
-
-**Source Files Created**: <list of backend/app/ files>
57
+
-**Source Files Created**: <listofsourcefiles>
68
58
-**Security Protections**: <tenant isolation, CSV formula escaping, header sanitization>
"comment": {"body": "Address previous QA verification and adversarial test findings: write real python files under backend/app/ and backend/tests/, resolve pytest collection error, escape CSV formulas by stripping whitespace, sanitize Content-Disposition header against path traversal, and use Header(alias='X-Tenant-ID')."},
306
+
"comment": {"body": "Address previous QA verification and adversarial test findings: extract and write code to real python files (app/services/csv_service.py, tests/test_csv_service.py), resolve pytest collection error, escape CSV formulas by stripping whitespace, sanitize Content-Disposition header against path traversal, and use Header(alias='X-Tenant-ID')."},
f"Address review and audit feedback on Pull Request #{pr_number} for branch `{branch_name}`.\n\n"
475
456
f"Reviewer Feedback:\n{comment_body}\n\n"
476
-
f"Implement all required remediations, place files under backend/app/ and backend/tests/, and output all code blocks using ```python:backend/path/to/file.py."
457
+
f"Implement all required remediations, extract and output all python source and test files using ```python:path/to/file.py blocks."
477
458
)
478
459
else:
479
-
user_input=f"Implement specification for Issue #{issue_number}: {issue_title}\n\n{issue_body}\n\nOutput all files in ```python:backend/path/to/file.py blocks."
460
+
user_input=f"Implement specification for Issue #{issue_number}: {issue_title}\n\n{issue_body}\n\nOutput all files in ```python:path/to/file.py blocks."
0 commit comments