Skip to content

Commit 7b95502

Browse files
refactor(docs): code analysis engine
stats: lines: "+21936/-21997 (net -61)" files: 14 complexity: "Stable complexity"
1 parent 0586424 commit 7b95502

18 files changed

Lines changed: 21959 additions & 22000 deletions

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,26 @@ fix(goal): code analysis engine
133133
- **refactor(cli):** Usunięto zduplikowany kod ujednolicając funkcje analizy dysku do wspólnego helpera `_run_disk_analysis`.
134134
- **refactor(ui):** Usunięto ikony Unicode z CLI i sformatowano wyjście `stderr` oraz standardowego logowania na czysty kod Markdown dla poprawy czytelności w oknach terminalowych.
135135

136+
## [2.1.31] - 2026-03-15
137+
138+
### Docs
139+
- Update docs/README.md
140+
- Update docs/api-changelog.md
141+
- Update docs/architecture.md
142+
- Update project/context.md
143+
144+
### Other
145+
- Update project/analysis.toon
146+
- Update project/analysis.yaml
147+
- Update project/calls.mmd
148+
- Update project/calls.png
149+
- Update project/dashboard.html
150+
- Update project/flow.mmd
151+
- Update project/flow.png
152+
- Update project/flow.toon
153+
- Update project/map.toon
154+
- Update project/project.yaml
155+
136156
## [2.1.30] - 2026-03-15
137157

138158
### Docs

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.30
1+
2.1.31

docs/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
146146

147147
```
148148
fixOS/
149-
├── setup ├── cli/ ├── platform_utils ├── system_checks├── fixos/ ├── watch ├── anonymizer ├── llm_shell ├── diagnostics/ ├── system_checks ├── disk_analyzer ├── service_cleanup ├── service_details ├── hitl ├── autonomous ├── agent/ ├── config ├── flatpak_analyzer ├── catalog ├── hitl_session ├── service_scanner ├── features/ ├── renderer ├── profiles ├── autonomous_session ├── profile_cmd ├── installer ├── quickfix_cmd ├── auditor ├── scan_cmd ├── orchestrate_cmd ├── report_cmd ├── rollback_cmd ├── ask_cmd ├── history_cmd ├── cleanup_cmd ├── watch_cmd ├── main ├── token_cmd ├── features_cmd ├── config_cmd ├── provider_cmd ├── fix_cmd ├── plugins/ ├── registry ├── llm ├── llm_analyzer ├── providers/ ├── utils/ ├── base ├── timeout ├── anonymizer ├── web_search ├── fixes/ ├── orchestrator/ ├── terminal ├── executor ├── orchestrator ├── shared ├── graph ├── interactive/ ├── profiles/ ├── cleanup_planner ├── resources ├── audio ├── builtin/ ├── hardware ├── security ├── rollback ├── quickstart ├── disk ├── advanced_usage├── project ├── thumbnails ├── schemas```
149+
├── setup ├── cli/ ├── watch├── fixos/ ├── platform_utils ├── anonymizer ├── system_checks ├── llm_shell ├── diagnostics/ ├── system_checks ├── disk_analyzer ├── service_cleanup ├── service_details ├── hitl ├── autonomous ├── agent/ ├── config ├── hitl_session ├── flatpak_analyzer ├── service_scanner ├── catalog ├── renderer ├── autonomous_session ├── profiles ├── profile_cmd ├── features/ ├── quickfix_cmd ├── installer ├── auditor ├── scan_cmd ├── orchestrate_cmd ├── report_cmd ├── rollback_cmd ├── ask_cmd ├── history_cmd ├── cleanup_cmd ├── watch_cmd ├── fix_cmd ├── token_cmd ├── main ├── config_cmd ├── features_cmd ├── registry ├── plugins/ ├── provider_cmd ├── llm ├── llm_analyzer ├── providers/ ├── utils/ ├── base ├── timeout ├── anonymizer ├── web_search ├── fixes/ ├── orchestrator/ ├── terminal ├── executor ├── shared ├── orchestrator ├── graph ├── interactive/ ├── cleanup_planner ├── profiles/ ├── audio ├── resources ├── builtin/ ├── hardware ├── security ├── disk ├── quickstart ├── advanced_usage├── project ├── thumbnails ├── rollback ├── schemas```
150150
151151
## API Overview
152152
@@ -157,24 +157,24 @@ fixOS/
157157
- **`ServiceCleaner`** — Plans and executes cleanup of service data.
158158
- **`ServiceDetailsProvider`** — Provides detailed information about service data.
159159
- **`FixOsConfig`** — —
160+
- **`CmdResult`** — —
161+
- **`HITLSession`** — Interactive Human-in-the-Loop diagnostic and repair session.
160162
- **`FlatpakItemType`** — —
161163
- **`FlatpakItemInfo`** — Detailed info about a Flatpak item (app, runtime, or data)
162164
- **`FlatpakAnalyzer`** — Advanced analyzer for Flatpak cleanup decisions
163-
- **`PackageInfo`** — Information about a single package.
164-
- **`PackageCategory`** — A category of packages (e.g., core_utils, dev_tools).
165-
- **`PackageCatalog`** — Manages the package database.
166-
- **`CmdResult`** — —
167-
- **`HITLSession`** — Interactive Human-in-the-Loop diagnostic and repair session.
168165
- **`ServiceType`** — Service types that can be scanned and cleaned.
169166
- **`ServiceDataInfo`** — Information about service data.
170167
- **`ServiceDataScanner`** — Scans for large service data directories and allows cleanup.
171-
- **`SystemInfo`** — Complete system information snapshot.
172-
- **`SystemDetector`** — Detects system parameters.
168+
- **`PackageInfo`** — Information about a single package.
169+
- **`PackageCategory`** — A category of packages (e.g., core_utils, dev_tools).
170+
- **`PackageCatalog`** — Manages the package database.
173171
- **`FeatureRenderer`** — Renders audit results for terminal display.
174-
- **`UserProfile`** — A user profile defining what packages/features they want.
175172
- **`FixAction`** — —
176173
- **`AgentReport`** — —
177174
- **`AutonomousSession`** — Self-directed autonomous diagnostic and repair session.
175+
- **`UserProfile`** — A user profile defining what packages/features they want.
176+
- **`SystemInfo`** — Complete system information snapshot.
177+
- **`SystemDetector`** — Detects system parameters.
178178
- **`FeatureInstaller`** — Safely installs packages using native package manager or other backends.
179179
- **`AuditResult`** — Result of feature audit - what's installed, what's missing.
180180
- **`FeatureAuditor`** — Compares installed packages with profile requirements.
@@ -194,23 +194,23 @@ fixOS/
194194
- **`CommandTimeoutError`** — —
195195
- **`ExecutionResult`** — —
196196
- **`CommandExecutor`** — Bezpieczny executor komend z:
197-
- **`FixOrchestrator`** — Orkiestrator napraw systemowych.
198197
- **`NaturalLanguageGroup`** — Click group that routes unknown commands to 'ask' command.
198+
- **`FixOrchestrator`** — Orkiestrator napraw systemowych.
199199
- **`Problem`** — —
200200
- **`ProblemGraph`** — DAG problemów systemowych z topological sort do wyznaczania kolejności napraw.
201-
- **`Profile`** — Profil diagnostyczny z zestawem modułów i progów.
202201
- **`Priority`** — —
203202
- **`CleanupType`** — —
204203
- **`CleanupAction`** — Represents a cleanup action
205204
- **`CleanupPlanner`** — Interactive cleanup planning and grouping system
205+
- **`Profile`** — Profil diagnostyczny z zestawem modułów i progów.
206206
- **`Plugin`** — —
207207
- **`Plugin`** — —
208208
- **`Plugin`** — —
209209
- **`Plugin`** — —
210-
- **`RollbackEntry`** — Single recorded operation with its rollback command.
211-
- **`RollbackSession`** — A session of recorded operations that can be rolled back.
212210
- **`Plugin`** — —
213211
- **`Plugin`** — —
212+
- **`RollbackEntry`** — Single recorded operation with its rollback command.
213+
- **`RollbackSession`** — A session of recorded operations that can be rolled back.
214214
- **`RiskLevel`** — —
215215
- **`FixSuggestion`** — Pojedyncza sugestia naprawy od LLM.
216216
- **`LLMDiagnosticResponse`** — Strukturalna odpowiedź LLM na dane diagnostyczne.
@@ -228,6 +228,8 @@ fixOS/
228228
- `install_package_cmd(package)` — Returns the install command for the detected package manager.
229229
- `setup_signal_timeout(seconds, handler)` — Sets up a timeout signal. Returns True if supported (POSIX only).
230230
- `cancel_signal_timeout()` — Cancels the timeout signal (POSIX only).
231+
- `get_sensitive_values()` — Zbiera aktualne wrażliwe wartości systemowe do zamaskowania.
232+
- `anonymize(data_str)` — Anonimizuje wrażliwe dane w stringu.
231233
- `run_cmd(cmd, timeout)` — Uruchamia komendę shell i zwraca output. Bezpieczny fallback przy błędzie.
232234
- `get_cpu_info()` — Metryki CPU.
233235
- `get_memory_info()` — Metryki RAM i SWAP.
@@ -236,8 +238,6 @@ fixOS/
236238
- `get_top_processes(n)` — Lista TOP N procesów według zużycia CPU.
237239
- `get_fedora_specific()` — Komendy specyficzne dla system: dnf, journalctl, systemctl.
238240
- `get_full_diagnostics()` — Zbiera kompletne dane diagnostyczne systemu system.
239-
- `get_sensitive_values()` — Zbiera aktualne wrażliwe wartości systemowe do zamaskowania.
240-
- `anonymize(data_str)` — Anonimizuje wrażliwe dane w stringu.
241241
- `format_time(seconds)` — —
242242
- `execute_command(cmd)` — Wykonuje komendę systemową z potwierdzeniem użytkownika.
243243
- `run_llm_shell(diagnostics_data, token, model, timeout)` — Uruchamia interaktywny shell LLM z przekazanymi danymi diagnostycznymi.
@@ -254,8 +254,8 @@ fixOS/
254254
- `detect_provider_from_key(key)` — Wykrywa provider na podstawie prefiksu klucza API.
255255
- `interactive_provider_setup()` — Interaktywny wybór providera gdy brak konfiguracji.
256256
- `get_providers_list()` — Zwraca listę providerów jako listę słowników.
257-
- `analyze_flatpak_for_cleanup()` — Convenience function to run full Flatpak analysis
258257
- `run_hitl_session(diagnostics, config, show_data)` — Run interactive HITL session (backward compatible wrapper).
258+
- `analyze_flatpak_for_cleanup()` — Convenience function to run full Flatpak analysis
259259
- `main()` — Test the service data scanner.
260260
- `run_autonomous_session(diagnostics, config, show_data, max_fixes)` — Run autonomous session (backward compatible wrapper).
261261
- `profile()` — Zarządzanie profilami diagnostycznymi.
@@ -273,28 +273,28 @@ fixOS/
273273
- `history(limit, json_output)` — Historia napraw fixOS.
274274
- `cleanup_services(threshold, services, json_output, cleanup)` — Skanuje i czyści dane usług przekraczające próg.
275275
- `watch(interval, modules, alert_on, max_iterations)` — Monitorowanie systemu w tle z powiadomieniami.
276-
- `cli(ctx, dry_run, version)` — fixos – AI-powered diagnostyka i naprawa Linux, Windows, macOS.
277-
- `main()` — Entry point for fixOS CLI.
276+
- `fix(provider, token, model, no_banner)` — Przeprowadza pełną diagnostykę i uruchamia sesję naprawczą z LLM.
277+
- `handle_disk_cleanup_mode(disk_analysis, cfg, dry_run, interactive)` — Handle disk cleanup mode with interactive planning
278+
- `execute_cleanup_actions(actions, cfg, llm_fallback)` — Execute cleanup actions with safety checks
279+
- `try_llm_fallback_for_failures(failed_actions, cfg)` — Try to fix failed actions using LLM
278280
- `token()` — Zarządzanie tokenem API.
279281
- `token_set(key, provider, env_file)` — Zapisz token API do pliku .env.
280282
- `token_show()` — Pokaż obecny token (masked).
281283
- `token_clear(env_file)` — Usuń token z pliku .env.
284+
- `cli(ctx, dry_run, version)` — fixos – AI-powered diagnostyka i naprawa Linux, Windows, macOS.
285+
- `main()` — Entry point for fixOS CLI.
286+
- `config()` — Zarządzanie konfiguracją fixOS.
287+
- `config_show()` — Pokaż aktualną konfigurację.
288+
- `config_init(force)` — Zainicjalizuj plik konfiguracyjny .env.
289+
- `config_set(key, value)` — Ustaw wartość konfiguracyjną w .env.
282290
- `features()` — Zarządzanie pakietami komfortu systemu.
283291
- `features_audit(profile, json_output)` — Sprawdź brakujące pakiety dla profilu.
284292
- `features_install(profile, dry_run, yes, category)` — Zainstaluj brakujące pakiety dla profilu.
285293
- `features_profiles()` — Lista dostępnych profili.
286294
- `features_system()` — Pokaż wykryty system.
287-
- `config()` — Zarządzanie konfiguracją fixOS.
288-
- `config_show()` — Pokaż aktualną konfigurację.
289-
- `config_init(force)` — Zainicjalizuj plik konfiguracyjny .env.
290-
- `config_set(key, value)` — Ustaw wartość konfiguracyjną w .env.
291295
- `llm_providers(free)` — Lista dostępnych providerów LLM.
292296
- `providers()` — Lista providerów LLM z oznaczeniem FREE/PAID.
293297
- `test_llm(provider, token, model, no_banner)` — Test połączenia z LLM.
294-
- `fix(provider, token, model, no_banner)` — Przeprowadza pełną diagnostykę i uruchamia sesję naprawczą z LLM.
295-
- `handle_disk_cleanup_mode(disk_analysis, cfg, dry_run, interactive)` — Handle disk cleanup mode with interactive planning
296-
- `execute_cleanup_actions(actions, cfg, llm_fallback)` — Execute cleanup actions with safety checks
297-
- `try_llm_fallback_for_failures(failed_actions, cfg)` — Try to fix failed actions using LLM
298298
- `main()` — Test the LLM analyzer
299299
- `timeout_handler(signum, frame)` — Signal handler dla SIGALRM — rzuca SessionTimeout.
300300
- `anonymize(data_str)` — Anonimizuje wrażliwe dane.

docs/api-changelog.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
11
# fixOS — API Changelog
22

3-
> 33 change(s) detected
4-
5-
## Added
6-
7-
- 🆕 **function** `features()`
8-
- 🆕 **function** `features_audit(profile, json_output)`
9-
- 🆕 **function** `features_install(profile, dry_run, yes, category)`
10-
- 🆕 **function** `features_profiles()`
11-
- 🆕 **function** `features_system()`
12-
- 🆕 **class** `fixos.features.SystemDetector`
13-
- 🆕 **method** `detect(self)`
14-
- 🆕 **class** `fixos.features.SystemInfo`
15-
- 🆕 **class** `fixos.features.auditor.AuditResult`
16-
- 🆕 **method** `to_dict(self)`
17-
- 🆕 **class** `fixos.features.auditor.FeatureAuditor`
18-
- 🆕 **method** `audit(self, profile)`
19-
- 🆕 **class** `fixos.features.catalog.PackageCatalog`
20-
- 🆕 **method** `get_package(self, pkg_id)`
21-
- 🆕 **method** `get_packages_by_category(self, category)`
22-
- 🆕 **method** `list_categories(self)`
23-
- 🆕 **method** `load(cls, data_dir)`
24-
- 🆕 **class** `fixos.features.catalog.PackageCategory`
25-
- 🆕 **class** `fixos.features.catalog.PackageInfo`
26-
- 🆕 **method** `get_distro_name(self, distro)`
27-
- 🆕 **method** `is_available_on(self, distro)`
28-
- 🆕 **class** `fixos.features.installer.FeatureInstaller`
29-
- 🆕 **method** `get_rollback_commands(self, installed_packages)`
30-
- 🆕 **method** `install(self, packages)`
31-
- 🆕 **class** `fixos.features.profiles.UserProfile`
32-
- 🆕 **method** `list_available(cls, data_dir)`
33-
- 🆕 **method** `load(cls, profile_name, data_dir)`
34-
- 🆕 **method** `resolve_packages(self, catalog, system_info)`
35-
- 🆕 **method** `to_dict(self)`
36-
- 🆕 **class** `fixos.features.renderer.FeatureRenderer`
37-
- 🆕 **method** `render_audit(result)`
38-
- 🆕 **method** `render_package_list(packages, title)`
39-
- 🆕 **method** `render_system_info(system)`
3+
**No API changes detected since last snapshot.**

docs/architecture.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ classDiagram
331331
- `fixos.diagnostics.system_checks.get_full_diagnostics` — Zbiera diagnostykę z wybranych modułów.
332332
- `fixos.diagnostics.disk_analyzer.main` — Test the disk analyzer
333333
- `fixos.config.get_providers_list` — Zwraca listę providerów jako listę słowników.
334-
- `fixos.diagnostics.flatpak_analyzer.analyze_flatpak_for_cleanup` — Convenience function to run full Flatpak analysis
335334
- `fixos.agent.hitl_session.run_hitl_session` — Run interactive HITL session (backward compatible wrapper).
335+
- `fixos.diagnostics.flatpak_analyzer.analyze_flatpak_for_cleanup` — Convenience function to run full Flatpak analysis
336336
- `fixos.diagnostics.service_scanner.main` — Test the service data scanner.
337337
- `fixos.agent.autonomous_session.run_autonomous_session` — Run autonomous session (backward compatible wrapper).
338338
- `fixos.cli.profile_cmd.profile` — Zarządzanie profilami diagnostycznymi.
@@ -350,24 +350,24 @@ classDiagram
350350
- `fixos.cli.history_cmd.history` — Historia napraw fixOS.
351351
- `fixos.cli.cleanup_cmd.cleanup_services` — Skanuje i czyści dane usług przekraczające próg.
352352
- `fixos.cli.watch_cmd.watch` — Monitorowanie systemu w tle z powiadomieniami.
353-
- `fixos.cli.main.main`Entry point for fixOS CLI.
353+
- `fixos.cli.fix_cmd.fix`Przeprowadza pełną diagnostykę i uruchamia sesję naprawczą z LLM.
354354
- `fixos.cli.token_cmd.token` — Zarządzanie tokenem API.
355355
- `fixos.cli.token_cmd.token_set` — Zapisz token API do pliku .env.
356356
- `fixos.cli.token_cmd.token_show` — Pokaż obecny token (masked).
357357
- `fixos.cli.token_cmd.token_clear` — Usuń token z pliku .env.
358+
- `fixos.cli.main.main` — Entry point for fixOS CLI.
359+
- `fixos.cli.config_cmd.config` — Zarządzanie konfiguracją fixOS.
360+
- `fixos.cli.config_cmd.config_show` — Pokaż aktualną konfigurację.
361+
- `fixos.cli.config_cmd.config_init` — Zainicjalizuj plik konfiguracyjny .env.
362+
- `fixos.cli.config_cmd.config_set` — Ustaw wartość konfiguracyjną w .env.
358363
- `fixos.cli.features_cmd.features` — Zarządzanie pakietami komfortu systemu.
359364
- `fixos.cli.features_cmd.features_audit` — Sprawdź brakujące pakiety dla profilu.
360365
- `fixos.cli.features_cmd.features_install` — Zainstaluj brakujące pakiety dla profilu.
361366
- `fixos.cli.features_cmd.features_profiles` — Lista dostępnych profili.
362367
- `fixos.cli.features_cmd.features_system` — Pokaż wykryty system.
363-
- `fixos.cli.config_cmd.config` — Zarządzanie konfiguracją fixOS.
364-
- `fixos.cli.config_cmd.config_show` — Pokaż aktualną konfigurację.
365-
- `fixos.cli.config_cmd.config_init` — Zainicjalizuj plik konfiguracyjny .env.
366-
- `fixos.cli.config_cmd.config_set` — Ustaw wartość konfiguracyjną w .env.
367368
- `fixos.cli.provider_cmd.llm_providers` — Lista dostępnych providerów LLM.
368369
- `fixos.cli.provider_cmd.providers` — Lista providerów LLM z oznaczeniem FREE/PAID.
369370
- `fixos.cli.provider_cmd.test_llm` — Test połączenia z LLM.
370-
- `fixos.cli.fix_cmd.fix` — Przeprowadza pełną diagnostykę i uruchamia sesję naprawczą z LLM.
371371
- `fixos.providers.llm_analyzer.main` — Test the LLM analyzer
372372
- `fixos.utils.timeout.timeout_handler` — Signal handler dla SIGALRM — rzuca SessionTimeout.
373373
- `fixos.utils.anonymizer.anonymize` — Anonimizuje wrażliwe dane.
@@ -388,4 +388,4 @@ classDiagram
388388
| CFG Nodes | 2363 |
389389
| Patterns | 1 |
390390
| Avg Complexity | 5.0 |
391-
| Analysis Time | 4.13s |
391+
| Analysis Time | 4.09s |

fixos/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""fixos – AI-powered Linux/Windows diagnostics and repair."""
2-
__version__ = "2.1.30"
2+
__version__ = "2.1.31"

0 commit comments

Comments
 (0)