codeflash-internal/django/aiservice
Kevin Turcios 752e2504e4
Restructure and improve refinement prompt (#2379)
## Summary
- Restructure the refinement system prompt into clear numbered sections
(Preserve Behavior, Minimize Diff, Revert Anti-Patterns, Maintain
Readability) with an explicit 6-step refinement process
- Extract inline prompt strings into separate markdown files
(`refinement_system_prompt.md`, `refinement_user_prompt.md`), matching
the convention used by other optimizer prompts
- Add `AuthenticatedRequest` type hint to `refine()` endpoint and fix
grammar in tool use section

## Test plan
- [ ] Verify refinement endpoint still works end-to-end with a test
optimization candidate
- [ ] Confirm prompt content is loaded correctly from markdown files at
startup

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-02-08 02:10:20 -05:00
..
adaptive_optimizer use AsyncAzureOpenAI (#2253) 2026-01-17 22:44:12 -05:00
aiservice fix: merge prompt extension fixes and LLM client improvements 2026-01-31 02:32:58 +00:00
authapp Fix Prevent log code for paid org in the optimization feature "AI service " (#2325) 2026-01-29 19:28:30 +00:00
code_repair cleanup 2026-01-28 22:19:40 +02:00
explanations refactor: consolidate shared utilities (#2289) 2026-01-25 00:49:48 -05:00
jit_rewrite Merge branch 'main' into multi-language 2026-01-26 23:59:03 -05:00
languages Revert "CF-1041 observability v2 " need more changes and testing (#2375) 2026-02-06 01:18:17 +05:30
log_features Store instrumented performance tests in feature logging (#2330) 2026-01-29 03:09:47 -05:00
optimization_review merge: resolve conflicts with main 2026-01-25 01:00:56 -05:00
optimizer Restructure and improve refinement prompt (#2379) 2026-02-08 02:10:20 -05:00
ranker 0-index finally 2026-01-30 14:42:28 -08:00
testgen Reintroduce enriched obs_context for testgen LLM calls (#2377) 2026-02-07 10:33:13 -05:00
tests observability v2 toggle (#2378) 2026-02-07 15:50:12 -05:00
workflow_gen use AsyncAzureOpenAI (#2253) 2026-01-17 22:44:12 -05:00
.env.example add claude 2025-12-22 03:34:07 -05:00
.pre-commit-config.yaml feat: add ty type checker to pre-k hooks (#2213) 2026-01-09 22:36:53 -05:00
AGENTS.md not just for claude code 2026-01-06 22:21:32 -05:00
deploy Make aiservice deployment use Python 3.12 2024-03-06 18:22:51 -08:00
gunicorn.conf.py Refactor out aiservice manage.py and associated settings to the correct top-level dir so tests can run. Fix ellipsis in AST; allow ellipsis if they are in type annotations. 2024-05-31 16:51:43 -07:00
manage.py ruff check fixes 2025-08-07 14:35:21 -07:00
mypy_allowlist.txt refactor: remove profanity filtering from optimization pipeline (#2288) 2026-01-24 23:46:03 -05:00
pyproject.toml use treesitter for validating js & ts code syntax 2026-01-28 23:15:30 +02:00
pytest.ini Further fix django folder structure so pytest also works 2024-05-31 20:01:51 -07:00
README.md Move codeflash python code base to cli/ 2023-12-29 18:37:49 -08:00
runtests.py Sort imports for generated tests too, also try adding some tests to test this, but spent an hour trying to get the django test runner to work and couldn't get it to find the tests, so punting for now 2024-03-05 16:33:50 -08:00
start_gunicorn.sh let's download at import time instead 2024-09-09 19:59:29 -05:00
uv.lock use treesitter for validating js & ts code syntax 2026-01-28 23:15:30 +02:00
uvicorn_worker.py ruff check fixes 2025-08-07 14:36:23 -07:00

This is django-ninja project for the ai service. https://django-ninja.dev