Skip to content

Commit 286993f

Browse files
author
Your Name
committed
refactor(docs): code quality metrics with 4 supporting modules
changes: - file: task.py area: core modified: [_build_task_prompt] stats: lines: "+49/-72 (net -23)" files: 3 complexity: "-100% complexity (refactor win)"
1 parent e3ef229 commit 286993f

11 files changed

Lines changed: 66 additions & 80 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@
129129
- Update README.md with model tier configuration examples
130130
- Update examples/planfile/README.md with backend system documentation
131131

132+
## [0.1.66] - 2026-04-26
133+
134+
### Docs
135+
- Update README.md
136+
137+
### Other
138+
- Update llx/planfile/executor/task.py
139+
- Update planfile.yaml
140+
132141
## [0.1.65] - 2026-04-26
133142

134143
### Docs

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
**Intelligent LLM model router driven by real code metrics.**
44

55
[![PyPI](https://img.shields.io/pypi/v/llx)](https://pypi.org/project/llx/)
6-
[![Version](https://img.shields.io/badge/version-0.1.65-blue)](https://pypi.org/project/llx/)
6+
[![Version](https://img.shields.io/badge/version-0.1.66-blue)](https://pypi.org/project/llx/)
77
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
88
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
99

1010

1111
## AI Cost Tracking
1212

13-
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.65-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
14-
![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-31.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
13+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.66-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
14+
![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-31.9h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
1515

16-
- 🤖 **LLM usage:** $7.5000 (84 commits)
17-
- 👤 **Human dev:** ~$3168 (31.7h @ $100/h, 30min dedup)
16+
- 🤖 **LLM usage:** $7.5000 (85 commits)
17+
- 👤 **Human dev:** ~$3187 (31.9h @ $100/h, 30min dedup)
1818

1919
Generated on 2026-04-26 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
2020

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.65
1+
0.1.66

llx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
model = select_model(metrics)
1515
"""
1616

17-
__version__ = "0.1.65"
17+
__version__ = "0.1.66"
1818

1919
from llx.analysis.collector import ProjectMetrics, analyze_project
2020
from llx.llm import DEFAULT_MAX_TOKENS, LLM, LLMResponse, get_api_key, get_llm, get_llm_model

llx/orchestration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
"LLMOrchestrator",
3333
]
3434

35-
__version__ = "0.1.65"
35+
__version__ = "0.1.66"

llx/planfile/executor/task.py

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -205,34 +205,21 @@ def _build_task_prompt(task: dict, metrics: Any) -> str:
205205
206206
Description:
207207
{task.get('description', '')}
208-
209-
## Project Context
210208
"""
211209

212-
# Add metrics if available
213-
if hasattr(metrics, 'total_files'):
214-
prompt += f"- Files: {metrics.total_files}\n"
215-
prompt += f"- Lines of code: {metrics.total_lines:,}\n"
216-
prompt += f"- Average cyclomatic complexity: {metrics.avg_cc:.1f}\n"
217-
prompt += f"- Max complexity: {metrics.max_cc}\n"
218-
prompt += f"- Critical functions (CC > 10): {metrics.critical_count}\n"
219-
else:
220-
prompt += "- Metrics not available\n"
221-
222210
# Add file content if file is specified
223211
if file_path:
224212
try:
225213
from pathlib import Path
226214
file_full_path = Path(file_path)
227215
if not file_full_path.is_absolute():
228-
# Assume relative to current directory
229216
file_full_path = Path.cwd() / file_path
230217

231218
if file_full_path.exists():
232219
with open(file_full_path, "r", encoding="utf-8") as f:
233220
file_content = f.read()
234221
prompt += f"""
235-
## Current File Content
222+
## Current File Content (ONLY this file may be modified)
236223
237224
```python
238225
{file_content}
@@ -246,25 +233,20 @@ def _build_task_prompt(task: dict, metrics: Any) -> str:
246233
prompt += f"""
247234
## Instructions
248235
249-
CRITICAL: You MUST output the complete modified file content in a code block.
236+
CRITICAL RULES:
237+
1. You may ONLY modify the Target File listed above.
238+
2. Do NOT modify, create, or reference any other files.
239+
3. Do NOT output code blocks for any other file path.
250240
251-
For each file you modify, use this format:
241+
Output format (use EXACTLY this):
252242
```python:{file_path if file_path else 'path/to/file.py'}
253-
# Complete file content here
243+
<COMPLETE file content here>
254244
```
255245
256-
If modifying multiple files, use separate code blocks with file paths.
257-
258246
Requirements:
259-
1. Read and understand the current file content
260-
2. Apply the necessary changes to fix the issue
261-
3. Output the COMPLETE modified file content (not just snippets)
262-
4. Ensure the code is syntactically correct and complete
263-
5. Do not truncate or omit any parts of the file
264-
265-
If the issue does not exist or cannot be found, explicitly state: "Issue not found" or "No action needed".
266-
267-
Focus on practical, actionable changes that improve the codebase.
247+
- Output the COMPLETE modified file content (not snippets).
248+
- Ensure syntactic correctness; do not truncate or omit anything.
249+
- If the issue does not exist in the Target File, state exactly: "No action needed".
268250
"""
269251

270252
return prompt

llx/prellm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
print(result.content)
1212
"""
1313

14-
__version__ = "0.1.65"
14+
__version__ = "0.1.66"
1515

1616
# 1-function API — the primary interface (always uses v0.3 pipeline internally)
1717
from llx.prellm.core import preprocess_and_execute, preprocess_and_execute_sync

llx/pyqual_plugins/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Each module provides a specific CI/CD or quality check functionality.
55
"""
66

7-
__version__ = "0.1.65"
7+
__version__ = "0.1.66"

llx/tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
"HealthChecker"
2020
]
2121

22-
__version__ = "0.1.65"
22+
__version__ = "0.1.66"

0 commit comments

Comments
 (0)