1- <!-- code2docs:start --> # strategy
1+ <!-- code2docs:start --> # planfile
22
3- ![ version] ( https://img.shields.io/badge/version-0.1.0-blue ) ![ python] ( https://img.shields.io/badge/python-%3E%3D3.10-blue ) ![ coverage] ( https://img.shields.io/badge/coverage-unknown-lightgrey ) ![ functions] ( https://img.shields.io/badge/functions-90 -green )
4- > ** 90 ** functions | ** 19 ** classes | ** 22 ** files | CC̄ = 5.4
3+ ![ version] ( https://img.shields.io/badge/version-0.1.0-blue ) ![ python] ( https://img.shields.io/badge/python-%3E%3D3.10-blue ) ![ coverage] ( https://img.shields.io/badge/coverage-unknown-lightgrey ) ![ functions] ( https://img.shields.io/badge/functions-143 -green )
4+ > ** 143 ** functions | ** 27 ** classes | ** 34 ** files | CC̄ = 4.8
55
66> Auto-generated project documentation from source code analysis.
77
1414### From PyPI
1515
1616``` bash
17- pip install strategy
17+ pip install planfile
1818```
1919
2020### From Source
2121
2222``` bash
2323git clone https://github.com/semcod/strategy
24- cd strategy
24+ cd planfile
2525pip install -e .
2626```
2727
2828### Optional Extras
2929
3030``` bash
31- pip install strategy[github] # github features
32- pip install strategy[jira] # jira features
33- pip install strategy[gitlab] # gitlab features
34- pip install strategy[all] # all optional features
35- pip install strategy[dev] # development tools
31+ pip install planfile[github] # github features
32+ pip install planfile[jira] # jira features
33+ pip install planfile[gitlab] # gitlab features
34+ pip install planfile[litellm] # litellm features
35+ pip install planfile[llx] # llx features
36+ pip install planfile[all] # all optional features
37+ pip install planfile[dev] # development tools
3638```
3739
3840## Quick Start
@@ -41,25 +43,25 @@ pip install strategy[dev] # development tools
4143
4244``` bash
4345# Generate full documentation for your project
44- strategy ./my-project
46+ planfile ./my-project
4547
4648# Only regenerate README
47- strategy ./my-project --readme-only
49+ planfile ./my-project --readme-only
4850
4951# Preview what would be generated (no file writes)
50- strategy ./my-project --dry-run
52+ planfile ./my-project --dry-run
5153
5254# Check documentation health
53- strategy check ./my-project
55+ planfile check ./my-project
5456
5557# Sync — regenerate only changed modules
56- strategy sync ./my-project
58+ planfile sync ./my-project
5759```
5860
5961### Python API
6062
6163``` python
62- from strategy import generate_readme, generate_docs, Code2DocsConfig
64+ from planfile import generate_readme, generate_docs, Code2DocsConfig
6365
6466# Quick: generate README
6567generate_readme(" ./my-project" )
@@ -71,7 +73,7 @@ docs = generate_docs("./my-project", config=config)
7173
7274## Generated Output
7375
74- When you run ` strategy ` , the following files are produced:
76+ When you run ` planfile ` , the following files are produced:
7577
7678```
7779<project>/
@@ -94,7 +96,7 @@ When you run `strategy`, the following files are produced:
9496
9597## Configuration
9698
97- Create ` strategy .yaml` in your project root (or run ` strategy init` ):
99+ Create ` planfile .yaml` in your project root (or run ` planfile init` ):
98100
99101``` yaml
100102project :
@@ -135,27 +137,28 @@ sync:
135137
136138## Sync Markers
137139
138- strategy can update only specific sections of an existing README using HTML comment markers:
140+ planfile can update only specific sections of an existing README using HTML comment markers:
139141
140142` ` ` markdown
141- <!-- strategy :start -->
143+ <!-- planfile :start -->
142144# Project Title
143145... auto-generated content ...
144- <!-- strategy :end -->
146+ <!-- planfile :end -->
145147```
146148
147149Content outside the markers is preserved when regenerating. Enable this with ` sync_markers: true ` in your configuration.
148150
149151## Architecture
150152
151153```
152- strategy /
153- ├── planfile/ ├── yaml_loader ├── cli_loader ├── loaders/ ├── runner ├── auto_loop ├── cli / ├── __main__ ├── priorities ├── utils/ ├── commands ├── metrics ├── integrations/ ├── gitlab ├── jira ├── github ├── generic├── docker-entrypoint├── project ├── ci_runner ├── models ├── base```
154+ planfile /
155+ ├── planfile/ ├── llx_validator ├── summary ├── runner ├── yaml_loader ├── cli_loader ├── loaders/ ├── auto_loop ├── cli/ ├── __main__ ├── generator ├── commands ├── llm / ├── prompts ├── client ├── utils/ ├── priorities ├── metrics ├── integrations/ ├── gitlab ├── jira ├── github ├── generic ├── 02_mcp_integration ├── ci_runner ├── 03_proxy_routing├── docker-entrypoint├── project ├── validate_with_llx ├── 01_full_workflow ├── verify_planfile ├── 04_llx_integration ├── models ├── base```
154156
155157## API Overview
156158
157159### Classes
158160
161+ - **`LLXValidator`** — Use LLX to validate generated code and strategies.
159162- **`StrategyRunner`** — Main runner for applying and reviewing strategies.
160163- **`GitLabBackend`** — GitLab Issues integration backend.
161164- **`JiraBackend`** — Jira integration backend.
@@ -164,6 +167,13 @@ strategy/
164167- **`TestResult`** — Result of running tests.
165168- **`BugReport`** — Generated bug report from test failures.
166169- **`CIRunner`** — CI/CD runner with automated bug-fix loop.
170+ - **`ProxyClient`** — Client for interacting with Proxym API.
171+ - **`UserType`** — —
172+ - **`User`** — —
173+ - **`UserService`** — —
174+ - **`UserController`** — —
175+ - **`ProjectMetrics`** — Project metrics from LLX analysis.
176+ - **`LLXIntegration`** — Integration with LLX for code analysis and model selection.
167177- **`TaskType`** — Type of task in the planfile.
168178- **`ModelTier`** — Model tier for different phases of work.
169179- **`ModelHints`** — AI model hints for different phases of task execution.
@@ -178,6 +188,10 @@ strategy/
178188
179189### Functions
180190
191+ - `create_validation_script()` — Create a validation script that uses LLX.
192+ - `create_summary()` — Create a summary of all changes made.
193+ - `apply_strategy(strategy, project_path, backends, backend_name)` — Apply a strategy to create/update tickets.
194+ - `review_strategy(strategy, project_path, backends, backend_name)` — Review strategy execution by checking ticket statuses.
181195- `load_yaml(file_path)` — Load YAML file and return as dictionary.
182196- `save_yaml(data, file_path)` — Save dictionary to YAML file.
183197- `load_strategy_yaml(file_path)` — Load strategy from YAML file.
@@ -190,27 +204,53 @@ strategy/
190204- `load_strategy_from_json(file_path)` — Load strategy from JSON file.
191205- `save_strategy_to_json(strategy, file_path)` — Save strategy to JSON file.
192206- `export_results_to_markdown(results, file_path)` — Export strategy results to Markdown file.
193- - `apply_strategy(strategy, project_path, backends, backend_name)` — Apply a strategy to create/update tickets.
194- - `review_strategy(strategy, project_path, backends, backend_name)` — Review strategy execution by checking ticket statuses.
195207- `get_backend(backend_type)` — Get backend instance by type.
196208- `auto_loop(strategy, project_path, backend, max_iterations)` — Run automated CI/CD loop: test → ticket → fix → retest.
197209- `ci_status(project_path)` — Check current CI status without running tests.
198- - `calculate_task_priority(base_priority, task_type, sprint_id, weight_factors)` — Calculate task priority based on type, sprint, and base priority.
199- - `map_priority_to_system(priority, system)` — Map generic priority to system-specific priority.
200- - `get_priority_color(priority)` — Get color code for priority (for UI display).
210+ - `generate_strategy(project_path)` — Generate a complete strategy from project analysis.
201211- `get_backend(backend_type, config)` — Get backend instance by type and config.
202212- `apply_strategy_cli(strategy_path, project_path, backend, config_file)` — Apply a strategy to create tickets.
203213- `review_strategy_cli(strategy_path, project_path, backend, config_file)` — Review strategy execution and progress.
204214- `validate_strategy_cli(strategy_path, verbose)` — Validate a strategy YAML file.
215+ - `generate_strategy_cli(project_path, output, model, sprints)` — Generate strategy.yaml from project analysis + LLM.
205216- `main()` — Main CLI entry point.
217+ - `build_strategy_prompt(metrics, sprints, focus)` — Build a structured prompt for strategy generation.
218+ - `call_llm(prompt, model, temperature)` — Call LLM via LiteLLM. Falls back to llx proxy if available.
219+ - `calculate_task_priority(base_priority, task_type, sprint_id, weight_factors)` — Calculate task priority based on type, sprint, and base priority.
220+ - `map_priority_to_system(priority, system)` — Map generic priority to system-specific priority.
221+ - `get_priority_color(priority)` — Get color code for priority (for UI display).
206222- `analyze_project_metrics(project_path)` — Analyze project metrics for strategy review.
207223- `calculate_strategy_health(strategy_results)` — Calculate health metrics for a strategy execution.
224+ - `run_mcp_tool(tool_name, arguments)` — Simulate running an MCP tool.
225+ - `simulate_planfile_generate(args)` — Simulate planfile generate tool.
226+ - `simulate_planfile_apply(args)` — Simulate planfile apply tool.
227+ - `simulate_planfile_review(args)` — Simulate planfile review tool.
228+ - `example_mcp_session()` — Example of an LLM agent using planfile MCP tools.
229+ - `create_mcp_tool_definitions()` — Create MCP tool definitions for integration.
230+ - `main()` — CLI entry point.
231+ - `example_strategy_generation_with_proxy()` — Example: Generate strategy using proxy for smart model routing.
232+ - `create_proxy_config_example()` — Create example proxy configuration for planfile integration.
233+ - `example_budget_tracking()` — Example: Budget tracking with proxy.
208234- `check_env()` — —
209235- `validate_config()` — —
210236- `setup_workspace()` — —
211237- `run_command()` — —
212238- `main()` — —
213- - `main()` — CLI entry point.
239+ - `validate_file()` — —
240+ - `create_user()` — —
241+ - `get_user()` — —
242+ - `update_user()` — —
243+ - `setattr()` — —
244+ - `delete_user()` — —
245+ - `get_users_by_type()` — —
246+ - `authenticate()` — —
247+ - `export_to_json()` — —
248+ - `import_from_json()` — —
249+ - `get_statistics()` — —
250+ - `validate_planfile()` — —
251+ - `print()` — —
252+ - `example_metric_driven_planning()` — Example: Generate strategy based on actual project metrics.
253+ - `create_llx_config_example()` — Create example LLX configuration for planfile integration.
214254
215255
216256## Project Structure
@@ -221,13 +261,25 @@ strategy/
221261📦 `planfile.cli`
222262📄 `planfile.cli.__main__`
223263📄 `planfile.cli.auto_loop` (3 functions)
224- 📄 `planfile.cli.commands` (5 functions)
264+ 📄 `planfile.cli.commands` (6 functions)
265+ 📄 `planfile.examples.bash-generation.verify_planfile` (4 functions)
266+ 📄 `planfile.examples.ecosystem.01_full_workflow` (17 functions, 6 classes)
267+ 📄 `planfile.examples.ecosystem.02_mcp_integration` (6 functions)
268+ 📄 `planfile.examples.ecosystem.03_proxy_routing` (7 functions, 1 classes)
269+ 📄 `planfile.examples.ecosystem.04_llx_integration` (9 functions, 2 classes)
270+ 📄 `planfile.examples.llx_validator` (7 functions, 1 classes)
271+ 📄 `planfile.examples.summary` (1 functions)
272+ 📄 `planfile.examples.validate_with_llx` (1 functions)
225273📦 `planfile.integrations`
226274📄 `planfile.integrations.base` (9 functions, 4 classes)
227275📄 `planfile.integrations.generic` (8 functions, 1 classes)
228276📄 `planfile.integrations.github` (7 functions, 1 classes)
229277📄 `planfile.integrations.gitlab` (7 functions, 1 classes)
230278📄 `planfile.integrations.jira` (9 functions, 1 classes)
279+ 📦 `planfile.llm`
280+ 📄 `planfile.llm.client` (1 functions)
281+ 📄 `planfile.llm.generator` (5 functions)
282+ 📄 `planfile.llm.prompts` (1 functions)
231283📦 `planfile.loaders`
232284📄 `planfile.loaders.cli_loader` (5 functions)
233285📄 `planfile.loaders.yaml_loader` (7 functions)
@@ -241,7 +293,7 @@ strategy/
241293## Requirements
242294
243295- Python >= >=3.10
244- - typer >=0.12- rich >=13.0- pydantic >=2.0- pydantic-settings >=2.0- pyyaml >=6.0- requests >=2.31
296+ - typer >=0.12- rich >=13.0- pydantic >=2.0- pydantic-settings >=2.0- pyyaml >=6.0- requests >=2.31- httpx >=0.27
245297
246298## Contributing
247299
@@ -256,7 +308,7 @@ We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for gu
256308```bash
257309# Clone the repository
258310git clone https://github.com/semcod/strategy
259- cd strategy
311+ cd planfile
260312
261313# Install in development mode
262314pip install -e ".[dev]"
0 commit comments