algitex 0.1.2__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.
- algitex-0.1.2/LICENSE +15 -0
- algitex-0.1.2/PKG-INFO +280 -0
- algitex-0.1.2/README.md +235 -0
- algitex-0.1.2/pyproject.toml +49 -0
- algitex-0.1.2/setup.cfg +4 -0
- algitex-0.1.2/src/algitex/__init__.py +36 -0
- algitex-0.1.2/src/algitex/algo/__init__.py +369 -0
- algitex-0.1.2/src/algitex/algo/loop.py +4 -0
- algitex-0.1.2/src/algitex/cli.py +358 -0
- algitex-0.1.2/src/algitex/config.py +169 -0
- algitex-0.1.2/src/algitex/project.py +283 -0
- algitex-0.1.2/src/algitex/propact/__init__.py +317 -0
- algitex-0.1.2/src/algitex/propact/workflow.py +2 -0
- algitex-0.1.2/src/algitex/tools/__init__.py +102 -0
- algitex-0.1.2/src/algitex/tools/analysis.py +182 -0
- algitex-0.1.2/src/algitex/tools/proxy.py +145 -0
- algitex-0.1.2/src/algitex/tools/tickets.py +246 -0
- algitex-0.1.2/src/algitex/workflows/__init__.py +90 -0
- algitex-0.1.2/src/algitex/workflows/pipeline.py +5 -0
- algitex-0.1.2/src/algitex.egg-info/PKG-INFO +280 -0
- algitex-0.1.2/src/algitex.egg-info/SOURCES.txt +26 -0
- algitex-0.1.2/src/algitex.egg-info/dependency_links.txt +1 -0
- algitex-0.1.2/src/algitex.egg-info/entry_points.txt +2 -0
- algitex-0.1.2/src/algitex.egg-info/requires.txt +32 -0
- algitex-0.1.2/src/algitex.egg-info/top_level.txt +1 -0
- algitex-0.1.2/tests/test_cli.py +157 -0
- algitex-0.1.2/tests/test_core.py +214 -0
- algitex-0.1.2/tests/test_integration.py +344 -0
algitex-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Apache License 2.0
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Tom Sapletta
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
algitex-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: algitex
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Progressive algorithmization toolchain — from LLM to deterministic code, from proxy to tickets
|
|
5
|
+
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/semcod/algitex
|
|
8
|
+
Project-URL: Repository, https://github.com/semcod/algitex
|
|
9
|
+
Keywords: llm,devtools,proxy,tickets,progressive-algorithmization,mcp,propact,code-analysis,automation,workflow
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Requires-Dist: httpx>=0.27
|
|
20
|
+
Requires-Dist: rich>=13.0
|
|
21
|
+
Requires-Dist: typer>=0.12
|
|
22
|
+
Requires-Dist: pydantic>=2.0
|
|
23
|
+
Provides-Extra: all
|
|
24
|
+
Requires-Dist: proxym; extra == "all"
|
|
25
|
+
Requires-Dist: planfile; extra == "all"
|
|
26
|
+
Requires-Dist: llx; extra == "all"
|
|
27
|
+
Requires-Dist: vallm; extra == "all"
|
|
28
|
+
Requires-Dist: code2llm; extra == "all"
|
|
29
|
+
Requires-Dist: redup; extra == "all"
|
|
30
|
+
Provides-Extra: proxy
|
|
31
|
+
Requires-Dist: proxym; extra == "proxy"
|
|
32
|
+
Provides-Extra: tickets
|
|
33
|
+
Requires-Dist: planfile; extra == "tickets"
|
|
34
|
+
Provides-Extra: analysis
|
|
35
|
+
Requires-Dist: code2llm; extra == "analysis"
|
|
36
|
+
Requires-Dist: vallm; extra == "analysis"
|
|
37
|
+
Requires-Dist: redup; extra == "analysis"
|
|
38
|
+
Provides-Extra: routing
|
|
39
|
+
Requires-Dist: llx; extra == "routing"
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: pytest; extra == "dev"
|
|
42
|
+
Requires-Dist: ruff; extra == "dev"
|
|
43
|
+
Requires-Dist: mypy; extra == "dev"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# algitex
|
|
47
|
+
|
|
48
|
+
**Progressive algorithmization toolchain — from LLM to deterministic code, from proxy to tickets.**
|
|
49
|
+
|
|
50
|
+
> The only framework that automates the path from "LLM handles everything"
|
|
51
|
+
> to "most traffic runs deterministically, LLM only for edge cases."
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
pip install algitex
|
|
55
|
+
algitex init ./my-app
|
|
56
|
+
algitex go
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Why "algitex"?
|
|
60
|
+
|
|
61
|
+
The name reflects the core cycle: **analyze → plan → execute → validate → repeat**. Each iteration makes your codebase healthier and your LLM usage cheaper. The progressive algorithmization loop gradually replaces LLM calls with deterministic rules.
|
|
62
|
+
|
|
63
|
+
## Name alternatives considered
|
|
64
|
+
|
|
65
|
+
| Name | Why it works | Why we picked algitex |
|
|
66
|
+
|------|-------------|----------------------|
|
|
67
|
+
| **algitex** | Core concept: the continuous improvement loop | Clear, memorable, tech-neutral |
|
|
68
|
+
| prollama | "progressive" + llama vibes | Ties too much to one model family |
|
|
69
|
+
| codefact | Code + factory/fact | Sounds like a trivia app |
|
|
70
|
+
| algopact | Algorithm + Propact | Hard to pronounce |
|
|
71
|
+
| loopcode | Loop + code | Reverse reads awkward |
|
|
72
|
+
| prodev | Progressive + dev | Too generic, SEO nightmare |
|
|
73
|
+
|
|
74
|
+
## Three layers, one command
|
|
75
|
+
|
|
76
|
+
### Layer 1: Code Quality Loop
|
|
77
|
+
```python
|
|
78
|
+
from algitex import Project
|
|
79
|
+
|
|
80
|
+
p = Project("./my-app")
|
|
81
|
+
p.analyze() # code2llm + vallm + redup → health report
|
|
82
|
+
p.plan() # auto-generate tickets from analysis
|
|
83
|
+
p.execute() # LLM handles tasks via proxym
|
|
84
|
+
p.status() # health + tickets + budget + cost ledger
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Layer 2: Progressive Algorithmization
|
|
88
|
+
```python
|
|
89
|
+
from algitex import Loop
|
|
90
|
+
|
|
91
|
+
loop = Loop("./my-app")
|
|
92
|
+
loop.discover() # Stage 1: collect all LLM traces
|
|
93
|
+
loop.extract() # Stage 2: find repeating patterns
|
|
94
|
+
loop.generate_rules() # Stage 3: AI writes its own replacement
|
|
95
|
+
loop.route() # Stage 4: rules vs LLM by confidence
|
|
96
|
+
loop.optimize() # Stage 5: monitor, minimize LLM usage
|
|
97
|
+
print(loop.report()) # "42% deterministic, $12.50 saved"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Layer 3: Propact Workflows
|
|
101
|
+
```python
|
|
102
|
+
from algitex import Workflow
|
|
103
|
+
|
|
104
|
+
wf = Workflow("./refactor-v1.md")
|
|
105
|
+
wf.execute() # runs propact:shell, propact:rest, propact:llm blocks
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## CLI
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Core loop
|
|
112
|
+
algitex init ./my-app # initialize project
|
|
113
|
+
algitex analyze # health check
|
|
114
|
+
algitex plan --sprints 3 # generate sprint strategy + tickets
|
|
115
|
+
algitex go # full pipeline
|
|
116
|
+
algitex status # dashboard
|
|
117
|
+
|
|
118
|
+
# Progressive algorithmization
|
|
119
|
+
algitex algo discover # start trace collection
|
|
120
|
+
algitex algo extract # find patterns in traces
|
|
121
|
+
algitex algo rules # generate deterministic replacements
|
|
122
|
+
algitex algo report # show % deterministic vs LLM
|
|
123
|
+
|
|
124
|
+
# Propact workflows
|
|
125
|
+
algitex workflow run fix.md # execute Markdown workflow
|
|
126
|
+
algitex workflow validate f.md
|
|
127
|
+
|
|
128
|
+
# Tickets
|
|
129
|
+
algitex ticket add "Fix auth" --priority high
|
|
130
|
+
algitex ticket list
|
|
131
|
+
algitex ticket board
|
|
132
|
+
algitex sync # push to GitHub/Jira
|
|
133
|
+
|
|
134
|
+
# Quick queries
|
|
135
|
+
algitex ask "Explain this race condition" --tier premium
|
|
136
|
+
algitex tools # show installed tools
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## The 5-Stage Progressive Algorithmization
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Stage 1: Discovery → LLM handles 100%, collect traces
|
|
143
|
+
Stage 2: Extraction → identify hot paths + repeating patterns
|
|
144
|
+
Stage 3: Rules → AI generates deterministic replacements
|
|
145
|
+
Stage 4: Hybrid → confidence-based: known patterns → rules, unknown → LLM
|
|
146
|
+
Stage 5: Optimization → most traffic deterministic, LLM for edge cases only
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
No existing framework automates this path. DSPy goes LLM→smaller LLM. algitex goes LLM→algorithm.
|
|
150
|
+
|
|
151
|
+
## Propact: Markdown as Workflow
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
# Fix Authentication Module
|
|
155
|
+
|
|
156
|
+
Analyze current state:
|
|
157
|
+
|
|
158
|
+
```propact:shell
|
|
159
|
+
code2llm ./src/auth -f toon --json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Ask LLM for a fix plan:
|
|
163
|
+
|
|
164
|
+
```propact:rest
|
|
165
|
+
POST http://localhost:4000/v1/chat/completions
|
|
166
|
+
{"model": "balanced", "messages": [{"role": "user", "content": "Fix auth"}]}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Validate the result:
|
|
170
|
+
|
|
171
|
+
```propact:shell
|
|
172
|
+
vallm batch ./src/auth --recursive
|
|
173
|
+
```
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Planfile-Aware Proxy Headers
|
|
177
|
+
|
|
178
|
+
Every LLM request through algitex carries context:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
X-Planfile-Ref: my-project/current/DLP-0042
|
|
182
|
+
X-Workflow-Ref: refactor-v1.md
|
|
183
|
+
X-Task-Tier: complex
|
|
184
|
+
X-Inject-Context: true
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Proxym logs cost/model/latency **per ticket**. The cost ledger shows exactly what each task costs.
|
|
188
|
+
|
|
189
|
+
## Installation
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
pip install algitex # core
|
|
193
|
+
pip install algitex[all] # + all tools
|
|
194
|
+
pip install algitex[proxy] # + proxym
|
|
195
|
+
pip install algitex[analysis] # + code2llm, vallm, redup
|
|
196
|
+
pip install algitex[tickets] # + planfile
|
|
197
|
+
pip install algitex[routing] # + llx
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Architecture
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
src/algitex/
|
|
204
|
+
├── __init__.py # Project, Loop, Workflow, Config, Pipeline
|
|
205
|
+
├── config.py # Unified config (env + YAML)
|
|
206
|
+
├── project.py # Main Project class (expanded)
|
|
207
|
+
├── cli.py # Typer CLI (all commands)
|
|
208
|
+
├── algo/ # Progressive algorithmization
|
|
209
|
+
│ ├── __init__.py # Loop, TraceEntry, Pattern, Rule, LoopState
|
|
210
|
+
│ └── loop.py # Re-export
|
|
211
|
+
├── propact/ # Markdown workflow engine
|
|
212
|
+
│ ├── __init__.py # Workflow, WorkflowStep, WorkflowResult
|
|
213
|
+
│ └── workflow.py # Re-export
|
|
214
|
+
├── tools/
|
|
215
|
+
│ ├── __init__.py # Tool discovery
|
|
216
|
+
│ ├── proxy.py # proxym wrapper + planfile headers
|
|
217
|
+
│ ├── analysis.py # code2llm + vallm + redup
|
|
218
|
+
│ └── tickets.py # planfile wrapper + cost ledger
|
|
219
|
+
└── workflows/
|
|
220
|
+
├── __init__.py # Pipeline (composable steps)
|
|
221
|
+
└── pipeline.py # Re-export
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## How it connects to the ecosystem
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
┌─────────────────────────────────────────────────────┐
|
|
228
|
+
│ algitex │
|
|
229
|
+
│ (orchestration layer) │
|
|
230
|
+
├─────────────────────────────────────────────────────┤
|
|
231
|
+
│ │
|
|
232
|
+
│ analyze() plan() execute() algo.discover() │
|
|
233
|
+
│ │ │ │ │ │
|
|
234
|
+
│ code2llm planfile proxym trace → │
|
|
235
|
+
│ vallm tickets llx patterns → │
|
|
236
|
+
│ redup strategy models rules → │
|
|
237
|
+
│ hybrid routing │
|
|
238
|
+
│ │
|
|
239
|
+
│ run_workflow("fix.md") │
|
|
240
|
+
│ │ │
|
|
241
|
+
│ propact:shell → subprocess │
|
|
242
|
+
│ propact:rest → httpx │
|
|
243
|
+
│ propact:llm → proxym │
|
|
244
|
+
│ propact:mcp → MCP tool call │
|
|
245
|
+
│ │
|
|
246
|
+
└─────────────────────────────────────────────────────┘
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Tool Roles
|
|
250
|
+
|
|
251
|
+
| Tool | What | Install |
|
|
252
|
+
|------|------|---------|
|
|
253
|
+
| **proxym** | LLM gateway, 10 providers, routing, budget | `pip install proxym` |
|
|
254
|
+
| **planfile** | Sprint planning, tickets, GitHub/Jira sync | `pip install planfile` |
|
|
255
|
+
| **llx** | Metric-driven model selection, MCP server | `pip install llx` |
|
|
256
|
+
| **code2llm** | Static analysis → .toon diagnostics | `pip install code2llm` |
|
|
257
|
+
| **vallm** | 4-tier code validation | `pip install vallm` |
|
|
258
|
+
| **redup** | Duplication detection | `pip install redup` |
|
|
259
|
+
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
Licensed under Apache-2.0.
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
Licensed under Apache-2.0.
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
Apache License 2.0
|
|
269
|
+
|
|
270
|
+
## Author
|
|
271
|
+
|
|
272
|
+
Tom Sapletta
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
Tom Sapletta
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
Created by **Tom Sapletta** — [tom@sapletta.com](mailto:tom@sapletta.com)
|
|
279
|
+
|
|
280
|
+
Part of the [semcod](https://github.com/semcod) / [wronai](https://github.com/wronai) ecosystem.
|
algitex-0.1.2/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# algitex
|
|
2
|
+
|
|
3
|
+
**Progressive algorithmization toolchain — from LLM to deterministic code, from proxy to tickets.**
|
|
4
|
+
|
|
5
|
+
> The only framework that automates the path from "LLM handles everything"
|
|
6
|
+
> to "most traffic runs deterministically, LLM only for edge cases."
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
pip install algitex
|
|
10
|
+
algitex init ./my-app
|
|
11
|
+
algitex go
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Why "algitex"?
|
|
15
|
+
|
|
16
|
+
The name reflects the core cycle: **analyze → plan → execute → validate → repeat**. Each iteration makes your codebase healthier and your LLM usage cheaper. The progressive algorithmization loop gradually replaces LLM calls with deterministic rules.
|
|
17
|
+
|
|
18
|
+
## Name alternatives considered
|
|
19
|
+
|
|
20
|
+
| Name | Why it works | Why we picked algitex |
|
|
21
|
+
|------|-------------|----------------------|
|
|
22
|
+
| **algitex** | Core concept: the continuous improvement loop | Clear, memorable, tech-neutral |
|
|
23
|
+
| prollama | "progressive" + llama vibes | Ties too much to one model family |
|
|
24
|
+
| codefact | Code + factory/fact | Sounds like a trivia app |
|
|
25
|
+
| algopact | Algorithm + Propact | Hard to pronounce |
|
|
26
|
+
| loopcode | Loop + code | Reverse reads awkward |
|
|
27
|
+
| prodev | Progressive + dev | Too generic, SEO nightmare |
|
|
28
|
+
|
|
29
|
+
## Three layers, one command
|
|
30
|
+
|
|
31
|
+
### Layer 1: Code Quality Loop
|
|
32
|
+
```python
|
|
33
|
+
from algitex import Project
|
|
34
|
+
|
|
35
|
+
p = Project("./my-app")
|
|
36
|
+
p.analyze() # code2llm + vallm + redup → health report
|
|
37
|
+
p.plan() # auto-generate tickets from analysis
|
|
38
|
+
p.execute() # LLM handles tasks via proxym
|
|
39
|
+
p.status() # health + tickets + budget + cost ledger
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Layer 2: Progressive Algorithmization
|
|
43
|
+
```python
|
|
44
|
+
from algitex import Loop
|
|
45
|
+
|
|
46
|
+
loop = Loop("./my-app")
|
|
47
|
+
loop.discover() # Stage 1: collect all LLM traces
|
|
48
|
+
loop.extract() # Stage 2: find repeating patterns
|
|
49
|
+
loop.generate_rules() # Stage 3: AI writes its own replacement
|
|
50
|
+
loop.route() # Stage 4: rules vs LLM by confidence
|
|
51
|
+
loop.optimize() # Stage 5: monitor, minimize LLM usage
|
|
52
|
+
print(loop.report()) # "42% deterministic, $12.50 saved"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Layer 3: Propact Workflows
|
|
56
|
+
```python
|
|
57
|
+
from algitex import Workflow
|
|
58
|
+
|
|
59
|
+
wf = Workflow("./refactor-v1.md")
|
|
60
|
+
wf.execute() # runs propact:shell, propact:rest, propact:llm blocks
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## CLI
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Core loop
|
|
67
|
+
algitex init ./my-app # initialize project
|
|
68
|
+
algitex analyze # health check
|
|
69
|
+
algitex plan --sprints 3 # generate sprint strategy + tickets
|
|
70
|
+
algitex go # full pipeline
|
|
71
|
+
algitex status # dashboard
|
|
72
|
+
|
|
73
|
+
# Progressive algorithmization
|
|
74
|
+
algitex algo discover # start trace collection
|
|
75
|
+
algitex algo extract # find patterns in traces
|
|
76
|
+
algitex algo rules # generate deterministic replacements
|
|
77
|
+
algitex algo report # show % deterministic vs LLM
|
|
78
|
+
|
|
79
|
+
# Propact workflows
|
|
80
|
+
algitex workflow run fix.md # execute Markdown workflow
|
|
81
|
+
algitex workflow validate f.md
|
|
82
|
+
|
|
83
|
+
# Tickets
|
|
84
|
+
algitex ticket add "Fix auth" --priority high
|
|
85
|
+
algitex ticket list
|
|
86
|
+
algitex ticket board
|
|
87
|
+
algitex sync # push to GitHub/Jira
|
|
88
|
+
|
|
89
|
+
# Quick queries
|
|
90
|
+
algitex ask "Explain this race condition" --tier premium
|
|
91
|
+
algitex tools # show installed tools
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## The 5-Stage Progressive Algorithmization
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Stage 1: Discovery → LLM handles 100%, collect traces
|
|
98
|
+
Stage 2: Extraction → identify hot paths + repeating patterns
|
|
99
|
+
Stage 3: Rules → AI generates deterministic replacements
|
|
100
|
+
Stage 4: Hybrid → confidence-based: known patterns → rules, unknown → LLM
|
|
101
|
+
Stage 5: Optimization → most traffic deterministic, LLM for edge cases only
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
No existing framework automates this path. DSPy goes LLM→smaller LLM. algitex goes LLM→algorithm.
|
|
105
|
+
|
|
106
|
+
## Propact: Markdown as Workflow
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
# Fix Authentication Module
|
|
110
|
+
|
|
111
|
+
Analyze current state:
|
|
112
|
+
|
|
113
|
+
```propact:shell
|
|
114
|
+
code2llm ./src/auth -f toon --json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Ask LLM for a fix plan:
|
|
118
|
+
|
|
119
|
+
```propact:rest
|
|
120
|
+
POST http://localhost:4000/v1/chat/completions
|
|
121
|
+
{"model": "balanced", "messages": [{"role": "user", "content": "Fix auth"}]}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Validate the result:
|
|
125
|
+
|
|
126
|
+
```propact:shell
|
|
127
|
+
vallm batch ./src/auth --recursive
|
|
128
|
+
```
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Planfile-Aware Proxy Headers
|
|
132
|
+
|
|
133
|
+
Every LLM request through algitex carries context:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
X-Planfile-Ref: my-project/current/DLP-0042
|
|
137
|
+
X-Workflow-Ref: refactor-v1.md
|
|
138
|
+
X-Task-Tier: complex
|
|
139
|
+
X-Inject-Context: true
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Proxym logs cost/model/latency **per ticket**. The cost ledger shows exactly what each task costs.
|
|
143
|
+
|
|
144
|
+
## Installation
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pip install algitex # core
|
|
148
|
+
pip install algitex[all] # + all tools
|
|
149
|
+
pip install algitex[proxy] # + proxym
|
|
150
|
+
pip install algitex[analysis] # + code2llm, vallm, redup
|
|
151
|
+
pip install algitex[tickets] # + planfile
|
|
152
|
+
pip install algitex[routing] # + llx
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Architecture
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
src/algitex/
|
|
159
|
+
├── __init__.py # Project, Loop, Workflow, Config, Pipeline
|
|
160
|
+
├── config.py # Unified config (env + YAML)
|
|
161
|
+
├── project.py # Main Project class (expanded)
|
|
162
|
+
├── cli.py # Typer CLI (all commands)
|
|
163
|
+
├── algo/ # Progressive algorithmization
|
|
164
|
+
│ ├── __init__.py # Loop, TraceEntry, Pattern, Rule, LoopState
|
|
165
|
+
│ └── loop.py # Re-export
|
|
166
|
+
├── propact/ # Markdown workflow engine
|
|
167
|
+
│ ├── __init__.py # Workflow, WorkflowStep, WorkflowResult
|
|
168
|
+
│ └── workflow.py # Re-export
|
|
169
|
+
├── tools/
|
|
170
|
+
│ ├── __init__.py # Tool discovery
|
|
171
|
+
│ ├── proxy.py # proxym wrapper + planfile headers
|
|
172
|
+
│ ├── analysis.py # code2llm + vallm + redup
|
|
173
|
+
│ └── tickets.py # planfile wrapper + cost ledger
|
|
174
|
+
└── workflows/
|
|
175
|
+
├── __init__.py # Pipeline (composable steps)
|
|
176
|
+
└── pipeline.py # Re-export
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## How it connects to the ecosystem
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
┌─────────────────────────────────────────────────────┐
|
|
183
|
+
│ algitex │
|
|
184
|
+
│ (orchestration layer) │
|
|
185
|
+
├─────────────────────────────────────────────────────┤
|
|
186
|
+
│ │
|
|
187
|
+
│ analyze() plan() execute() algo.discover() │
|
|
188
|
+
│ │ │ │ │ │
|
|
189
|
+
│ code2llm planfile proxym trace → │
|
|
190
|
+
│ vallm tickets llx patterns → │
|
|
191
|
+
│ redup strategy models rules → │
|
|
192
|
+
│ hybrid routing │
|
|
193
|
+
│ │
|
|
194
|
+
│ run_workflow("fix.md") │
|
|
195
|
+
│ │ │
|
|
196
|
+
│ propact:shell → subprocess │
|
|
197
|
+
│ propact:rest → httpx │
|
|
198
|
+
│ propact:llm → proxym │
|
|
199
|
+
│ propact:mcp → MCP tool call │
|
|
200
|
+
│ │
|
|
201
|
+
└─────────────────────────────────────────────────────┘
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Tool Roles
|
|
205
|
+
|
|
206
|
+
| Tool | What | Install |
|
|
207
|
+
|------|------|---------|
|
|
208
|
+
| **proxym** | LLM gateway, 10 providers, routing, budget | `pip install proxym` |
|
|
209
|
+
| **planfile** | Sprint planning, tickets, GitHub/Jira sync | `pip install planfile` |
|
|
210
|
+
| **llx** | Metric-driven model selection, MCP server | `pip install llx` |
|
|
211
|
+
| **code2llm** | Static analysis → .toon diagnostics | `pip install code2llm` |
|
|
212
|
+
| **vallm** | 4-tier code validation | `pip install vallm` |
|
|
213
|
+
| **redup** | Duplication detection | `pip install redup` |
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
Licensed under Apache-2.0.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
Licensed under Apache-2.0.
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
Apache License 2.0
|
|
224
|
+
|
|
225
|
+
## Author
|
|
226
|
+
|
|
227
|
+
Tom Sapletta
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
Tom Sapletta
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
Created by **Tom Sapletta** — [tom@sapletta.com](mailto:tom@sapletta.com)
|
|
234
|
+
|
|
235
|
+
Part of the [semcod](https://github.com/semcod) / [wronai](https://github.com/wronai) ecosystem.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "algitex"
|
|
7
|
+
version = "0.1.2"
|
|
8
|
+
description = "Progressive algorithmization toolchain — from LLM to deterministic code, from proxy to tickets"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "Apache-2.0"}
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{name = "Tom Sapletta", email = "tom@sapletta.com"}]
|
|
13
|
+
keywords = [
|
|
14
|
+
"llm", "devtools", "proxy", "tickets", "progressive-algorithmization",
|
|
15
|
+
"mcp", "propact", "code-analysis", "automation", "workflow",
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
dependencies = [
|
|
26
|
+
"pyyaml>=6.0",
|
|
27
|
+
"httpx>=0.27",
|
|
28
|
+
"rich>=13.0",
|
|
29
|
+
"typer>=0.12",
|
|
30
|
+
"pydantic>=2.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
all = ["proxym", "planfile", "llx", "vallm", "code2llm", "redup"]
|
|
35
|
+
proxy = ["proxym"]
|
|
36
|
+
tickets = ["planfile"]
|
|
37
|
+
analysis = ["code2llm", "vallm", "redup"]
|
|
38
|
+
routing = ["llx"]
|
|
39
|
+
dev = ["pytest", "ruff", "mypy"]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
algitex = "algitex.cli:app"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/semcod/algitex"
|
|
46
|
+
Repository = "https://github.com/semcod/algitex"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["src"]
|
algitex-0.1.2/setup.cfg
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""algitex — Progressive algorithmization toolchain.
|
|
2
|
+
|
|
3
|
+
From LLM to deterministic code. From proxy to tickets. One loop.
|
|
4
|
+
|
|
5
|
+
from algitex import Project, Loop, Workflow
|
|
6
|
+
|
|
7
|
+
# Simple: 4 methods
|
|
8
|
+
p = Project("./my-app")
|
|
9
|
+
p.analyze() # code2llm + vallm + redup
|
|
10
|
+
p.plan() # strategy → tickets
|
|
11
|
+
p.execute() # llx picks model, proxym routes
|
|
12
|
+
p.status() # health + tickets + budget + cost ledger
|
|
13
|
+
|
|
14
|
+
# Progressive: extract patterns, replace LLM with rules
|
|
15
|
+
loop = Loop("./my-app")
|
|
16
|
+
loop.discover() # LLM handles 100%, collect traces
|
|
17
|
+
loop.extract() # identify hot paths + patterns
|
|
18
|
+
loop.generate_rules() # AI writes its own replacement
|
|
19
|
+
loop.route() # confidence-based: rules vs LLM
|
|
20
|
+
loop.optimize() # monitor, detect regressions
|
|
21
|
+
|
|
22
|
+
# Workflow: Propact Markdown workflows
|
|
23
|
+
wf = Workflow("./refactor-v1.md")
|
|
24
|
+
wf.execute() # run propact:rest, propact:shell blocks
|
|
25
|
+
wf.status() # step-by-step progress
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
__version__ = "0.1.2"
|
|
29
|
+
|
|
30
|
+
from algitex.project import Project
|
|
31
|
+
from algitex.config import Config
|
|
32
|
+
from algitex.workflows.pipeline import Pipeline
|
|
33
|
+
from algitex.algo.loop import Loop
|
|
34
|
+
from algitex.propact.workflow import Workflow
|
|
35
|
+
|
|
36
|
+
__all__ = ["Project", "Config", "Pipeline", "Loop", "Workflow"]
|