evolution-engine 0.1.1__tar.gz → 0.2.1__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.
Files changed (105) hide show
  1. evolution_engine-0.2.1/LICENSE +43 -0
  2. evolution_engine-0.2.1/LICENSE-MIT +27 -0
  3. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/PKG-INFO +172 -59
  4. evolution_engine-0.2.1/README.md +413 -0
  5. evolution_engine-0.2.1/evolution/__init__.py +1 -0
  6. evolution_engine-0.2.1/evolution/accepted.py +310 -0
  7. evolution_engine-0.2.1/evolution/adapter_security.py +279 -0
  8. evolution_engine-0.2.1/evolution/adapter_versions.py +162 -0
  9. evolution_engine-0.2.1/evolution/adapters/ci/circleci_adapter.py +237 -0
  10. evolution_engine-0.2.1/evolution/adapters/ci/gitlab_pipelines_adapter.py +193 -0
  11. evolution_engine-0.2.1/evolution/adapters/deployment/gitlab_releases_adapter.py +157 -0
  12. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/git/git_history_walker.py +448 -3
  13. evolution_engine-0.2.1/evolution/adapters/gitlab_client.py +170 -0
  14. evolution_engine-0.2.1/evolution/adapters/testing/coverage_adapter.py +103 -0
  15. evolution_engine-0.2.1/evolution/cli.py +3356 -0
  16. evolution_engine-0.2.1/evolution/config.py +370 -0
  17. evolution_engine-0.2.1/evolution/data/adapter_blocklist.json +1 -0
  18. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/data/adapter_catalog.json +20 -12
  19. evolution_engine-0.2.1/evolution/data/pattern_blocklist.json +1 -0
  20. evolution_engine-0.2.1/evolution/data/pattern_index.json +1 -0
  21. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/data/universal_patterns.json +1129 -349
  22. evolution_engine-0.2.1/evolution/data/verified_adapters.json +1 -0
  23. evolution_engine-0.2.1/evolution/fixer.py +870 -0
  24. evolution_engine-0.2.1/evolution/format_comment.py +118 -0
  25. evolution_engine-0.2.1/evolution/friendly.py +543 -0
  26. evolution_engine-0.2.1/evolution/history.py +346 -0
  27. evolution_engine-0.2.1/evolution/hooks.py +431 -0
  28. evolution_engine-0.2.1/evolution/init.py +621 -0
  29. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/kb_export.py +47 -23
  30. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/kb_security.py +194 -2
  31. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/kb_sync.py +17 -16
  32. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/knowledge_store.py +37 -7
  33. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/license.py +22 -13
  34. evolution_engine-0.2.1/evolution/notifications.py +276 -0
  35. evolution_engine-0.2.1/evolution/orchestrator.py +1046 -0
  36. evolution_engine-0.2.1/evolution/pattern_registry.py +504 -0
  37. evolution_engine-0.2.1/evolution/pattern_scaffold.py +230 -0
  38. evolution_engine-0.2.1/evolution/pattern_validator.py +206 -0
  39. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase1_engine.py +12 -1
  40. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase2_engine.py +60 -1
  41. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase3_engine.py +13 -0
  42. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase4_engine.py +47 -17
  43. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase5_engine.py +254 -105
  44. evolution_engine-0.2.1/evolution/pr_comment.py +478 -0
  45. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/prescan.py +7 -0
  46. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/registry.py +212 -16
  47. evolution_engine-0.2.1/evolution/report_generator.py +2047 -0
  48. evolution_engine-0.2.1/evolution/report_server.py +201 -0
  49. evolution_engine-0.2.1/evolution/setup_ui.py +785 -0
  50. evolution_engine-0.2.1/evolution/watcher.py +396 -0
  51. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/PKG-INFO +172 -59
  52. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/SOURCES.txt +26 -0
  53. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/pyproject.toml +4 -4
  54. evolution_engine-0.2.1/setup.py +68 -0
  55. evolution_engine-0.2.1/tests/test_git_history_walker.py +627 -0
  56. evolution_engine-0.1.1/README.md +0 -303
  57. evolution_engine-0.1.1/evolution/__init__.py +0 -1
  58. evolution_engine-0.1.1/evolution/cli.py +0 -1162
  59. evolution_engine-0.1.1/evolution/config.py +0 -161
  60. evolution_engine-0.1.1/evolution/fixer.py +0 -439
  61. evolution_engine-0.1.1/evolution/friendly.py +0 -200
  62. evolution_engine-0.1.1/evolution/orchestrator.py +0 -421
  63. evolution_engine-0.1.1/evolution/pr_comment.py +0 -242
  64. evolution_engine-0.1.1/evolution/report_generator.py +0 -901
  65. evolution_engine-0.1.1/tests/test_git_history_walker.py +0 -139
  66. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/MANIFEST.in +0 -0
  67. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapter_scaffold.py +0 -0
  68. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapter_validator.py +0 -0
  69. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/__init__.py +0 -0
  70. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/ci/__init__.py +0 -0
  71. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/ci/github_actions_adapter.py +0 -0
  72. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/config/__init__.py +0 -0
  73. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/config/terraform_adapter.py +0 -0
  74. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/dependency/__init__.py +0 -0
  75. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/dependency/pip_adapter.py +0 -0
  76. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/deployment/__init__.py +0 -0
  77. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/deployment/github_releases_adapter.py +0 -0
  78. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/git/__init__.py +0 -0
  79. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/git/git_adapter.py +0 -0
  80. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/github_client.py +0 -0
  81. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/schema/__init__.py +0 -0
  82. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/schema/openapi_adapter.py +0 -0
  83. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/security/__init__.py +0 -0
  84. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/security/github_security_adapter.py +0 -0
  85. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/security/trivy_adapter.py +0 -0
  86. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/testing/__init__.py +0 -0
  87. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/adapters/testing/junit_adapter.py +0 -0
  88. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/agents/__init__.py +0 -0
  89. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/agents/anthropic_agent.py +0 -0
  90. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/agents/base.py +0 -0
  91. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/agents/cli_agent.py +0 -0
  92. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/data/sdk_fingerprints.json +0 -0
  93. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/fp_validation.py +0 -0
  94. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/inline_suggestions.py +0 -0
  95. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/investigator.py +0 -0
  96. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/llm_anthropic.py +0 -0
  97. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/llm_openrouter.py +0 -0
  98. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/phase3_1_renderer.py +0 -0
  99. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/telemetry.py +0 -0
  100. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution/validation_gate.py +0 -0
  101. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/dependency_links.txt +0 -0
  102. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/entry_points.txt +0 -0
  103. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/requires.txt +0 -0
  104. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/evolution_engine.egg-info/top_level.txt +0 -0
  105. {evolution_engine-0.1.1 → evolution_engine-0.2.1}/setup.cfg +0 -0
@@ -0,0 +1,43 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: CodeQual LLC
6
+
7
+ Licensed Work: Evolution Engine Core Analysis Engine v0.2.0 (and all subsequent versions)
8
+
9
+ Additional Use Grant: You may use the Licensed Work in non-production environments for internal testing and development without a commercial license. Production use requires a valid Pro subscription.
10
+
11
+ Change Date: 2029-02-20
12
+
13
+ Change License: MIT
14
+
15
+ Terms
16
+
17
+ The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
18
+
19
+ Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
20
+
21
+ If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
22
+
23
+ All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
24
+
25
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
26
+
27
+ Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
28
+
29
+ This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License).
30
+
31
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
32
+ MariaDB hereby grants you permission to use this License's text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below.
33
+
34
+ Covenants of Licensor
35
+
36
+ In consideration of the right to use this License's text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
37
+
38
+ To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
39
+ To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None" to specify a Change Date. Not to modify this License in any other way.
40
+
41
+ Notice
42
+
43
+ The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
@@ -0,0 +1,27 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 CodeQual LLC
4
+
5
+ This license applies to the following components of Evolution Engine:
6
+ - Command-line interface wrapper (evolution/cli.py)
7
+ - Adapter framework (evolution/adapters/)
8
+ - Plugin interfaces
9
+ - GitHub Action wrapper (action/)
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of the above-listed components and associated documentation files (the
13
+ "Software"), to deal in the Software without restriction, including without
14
+ limitation the rights to use, copy, modify, merge, publish, distribute,
15
+ sublicense, and/or sell copies of the Software, and to permit persons to whom
16
+ the Software is furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evolution-engine
3
- Version: 0.1.1
3
+ Version: 0.2.1
4
4
  Summary: Git-native codebase evolution indexer
5
5
  Author: Slava
6
- License: MIT
6
+ License: BSL-1.1
7
7
  Project-URL: Homepage, https://codequal.dev
8
8
  Project-URL: Repository, https://github.com/alpsla/evolution_monitor
9
9
  Project-URL: Bug Tracker, https://github.com/alpsla/evolution_monitor/issues
@@ -17,10 +17,12 @@ Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
- Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: License :: Other/Proprietary License
21
21
  Classifier: Operating System :: OS Independent
22
22
  Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ License-File: LICENSE-MIT
24
26
  Requires-Dist: GitPython>=3.1
25
27
  Requires-Dist: click>=8.0
26
28
  Requires-Dist: requests>=2.25
@@ -32,83 +34,108 @@ Requires-Dist: pytest>=7.0; extra == "dev"
32
34
  Requires-Dist: pytest-cov>=4.0; extra == "dev"
33
35
  Requires-Dist: python-dotenv>=0.19; extra == "dev"
34
36
  Requires-Dist: stripe>=7.0; extra == "dev"
37
+ Dynamic: license-file
35
38
 
36
39
  # Evolution Engine
37
40
 
38
- **Development Process Intelligence a local-first CLI tool that observes how software evolves, learns what is structurally normal, and surfaces unexpected change with evidence to act.**
41
+ **AI coding tools write correct code that silently breaks your architecture. Evolution Engine detects the drift, shows you the exact commit, and lets your AI fix it — with evidence.**
42
+
43
+ Calibrated on 90+ open-source repos. 6.18M signals analyzed. Your code never leaves your machine.
39
44
 
40
45
  ---
41
46
 
42
- ## What It Does
47
+ ## The Problem
48
+
49
+ AI coding assistants (Cursor, Copilot, Claude Code, Codex) generate code that passes tests and looks correct in isolation. But over time, they introduce **architectural drift** — scattered file changes, unexpected dependency growth, broken structural patterns — that no single tool catches.
50
+
51
+ Evolution Engine is a **drift detector for AI-assisted development**. It learns what is structurally normal for *your* repository, flags when development patterns shift, identifies the exact commit where drift started, and hands evidence to your AI agent to fix it.
52
+
53
+ ### The Loop: Detect → Evidence → Fix → Verify
43
54
 
44
- Run `evo analyze .` on any git repository. The Evolution Engine detects adapters automatically, builds per-repo baselines, and reports when your development process deviates from its own historical norms — across commits, CI, dependencies, deployments, and more.
55
+ ```
56
+ evo analyze . What changed? Is it unusual for THIS repo?
57
+ |
58
+ evo investigate . AI identifies the root cause commit + drift pattern
59
+ |
60
+ evo fix . AI proposes a fix based on evidence, not guesswork
61
+ |
62
+ evo verify . Did the fix resolve the drift? Or did it make it worse?
63
+ |
64
+ evo accept . 1 2 Expected change? Accept it. Move on.
65
+ ```
45
66
 
46
- No data leaves your machine. No configuration required. No accounts to create.
67
+ This is the full cycle no other tool offers: detect drift, provide evidence, let AI fix it, verify the fix worked, and let humans decide what's intentional.
47
68
 
48
- ### The Pipeline
69
+ ### How It Works (5-Phase Pipeline)
49
70
 
50
71
  ```
51
- Sources → Phase 1 (Record) → Phase 2 (Measure) Phase 3 (Explain)
52
- │ │
53
- └──── Phase 4 (Learn) ←──┘
54
-
55
- Phase 5 (Inform)
56
-
57
- HTML Report
58
-
59
- HUMAN / AI
72
+ Your Repo → Phase 1 (Record events) → Phase 2 (Detect deviation from YOUR baseline)
73
+ |
74
+ Phase 5 (Advisory) ← Phase 4 (Match known patterns) ← Phase 3 (Explain)
75
+ |
76
+ HTML Report + PR/MR Comments
77
+ |
78
+ HUMAN decides: investigate / fix / accept
60
79
  ```
61
80
 
62
81
  | Phase | What It Does |
63
82
  |-------|-------------|
64
- | **Phase 1** | Records immutable events from truth sources |
65
- | **Phase 2** | Computes baselines and deviation signals (MAD/IQR robust statistics) |
66
- | **Phase 3** | Explains signals in human language (template + optional LLM) |
67
- | **Phase 4** | Discovers cross-source patterns (correlation, lift, presence-based) |
68
- | **Phase 5** | Advisory reports with evidence packages |
83
+ | **Phase 1** | Records immutable events commits, builds, deps, releases |
84
+ | **Phase 2** | Computes per-repo baselines, flags statistical deviation (MAD/IQR) |
85
+ | **Phase 3** | Explains signals in human language PM-friendly, evidence-backed |
86
+ | **Phase 4** | Matches against 44 validated patterns from 90+ repos |
87
+ | **Phase 5** | Prioritized advisory with severity, evidence, and action items |
69
88
 
70
89
  ---
71
90
 
72
91
  ## Quick Start
73
92
 
74
93
  ```bash
75
- # Install
76
94
  pip install evolution-engine
77
-
78
- # Analyze any git repository
79
95
  evo analyze .
96
+ ```
80
97
 
81
- # With a GitHub token (unlocks CI, deployment, security data)
82
- evo analyze . --token ghp_xxx
83
-
84
- # Generate an HTML report
85
- evo report .
98
+ ### Three Integration Paths
86
99
 
87
- # See what adapters were detected
88
- evo status
89
- ```
100
+ | Path | Command | When to use |
101
+ |------|---------|-------------|
102
+ | **CLI Explorer** | `evo analyze .` | Start here -- manual analysis, reports, investigation |
103
+ | **Git Hooks** | `evo init . --path hooks` | Automate locally -- analyze on every commit or push |
104
+ | **GitHub Action** | `evo init . --path action` | Automate in CI -- PR comments with risk badges |
90
105
 
91
- ### From Source
106
+ Start with the CLI. Graduate to hooks when you trust the output. Add the GitHub Action for team-wide coverage. See [QUICKSTART.md](QUICKSTART.md) for the full walkthrough.
92
107
 
93
108
  ```bash
94
- git clone <repo-url>
95
- cd evolution-engine
96
- python -m venv .venv
97
- source .venv/bin/activate
98
- pip install -e .
109
+ # Path 1: CLI Explorer (start here)
110
+ evo analyze . # Run the full pipeline
111
+ evo report . --open # Visual HTML report
112
+ evo status # Detected adapters and run info
113
+
114
+ # Path 2: Git Hooks (automate locally)
115
+ evo init . --path hooks # Install post-commit hook
116
+ evo watch . # Or poll for commits continuously
99
117
 
100
- # Run the test suite (246 tests)
101
- python -m pytest tests/ -v
118
+ # Path 3: GitHub Action (CI)
119
+ evo init . --path action # Generate workflow file, then push
120
+
121
+ # All paths at once
122
+ evo init . --path all
102
123
  ```
103
124
 
125
+ Free tier covers Path 1 (CLI). Pro unlocks Path 2 (hooks) and Path 3 (CI integration), plus AI investigation, AI fix loop, and inline PR review comments.
126
+
127
+ ### Founding Member Program
128
+
129
+ We're looking for 50 developers who use AI coding tools daily. In exchange for monthly feedback, you get founding member pricing: **$9.50/month for 3 months** (regular: $19/month). Use code `FOUNDING50` at checkout.
130
+
104
131
  ### Environment Variables
105
132
 
106
133
  ```bash
107
134
  # .env file (all optional)
108
135
  GITHUB_TOKEN=ghp_xxx # Unlocks CI, deployment, security adapters
109
- EVO_LICENSE_KEY=xxx # Pro/Team features (free tier works without)
110
- OPENROUTER_API_KEY=xxx # LLM-enhanced explanations (Phase 3.1)
111
- PHASE31_ENABLED=false # LLM off by default
136
+ GITLAB_TOKEN=glpat-xxx # Unlocks GitLab CI, releases adapters
137
+ EVO_LICENSE_KEY=xxx # Pro features (free tier works without)
138
+ ANTHROPIC_API_KEY=sk-ant-xxx # For evo investigate / evo fix (Pro)
112
139
  ```
113
140
 
114
141
  ---
@@ -156,25 +183,65 @@ The **Git History Walker** extracts dependency, schema, and config files from gi
156
183
  ## CLI Commands
157
184
 
158
185
  ```bash
159
- # Core
186
+ # Core Analysis
160
187
  evo analyze [path] # Detect adapters, run full pipeline
161
188
  evo analyze . --families git,ci # Override auto-detection
162
189
  evo report [path] # Generate HTML report from last run
163
190
  evo status # Show detected adapters and event counts
191
+ evo investigate [path] # AI root cause analysis (Pro)
192
+ evo fix [path] # AI fix-verify loop (Pro)
193
+ evo fix [path] --residual # Iteration-aware prompt (current vs previous)
194
+ evo verify <advisory> # Compare current state to a previous advisory
195
+
196
+ # Setup & Integration
197
+ evo init [path] # Detect environment and suggest integration path
198
+ evo init . --path hooks # Install git hooks for auto-analysis
199
+ evo init . --path action # Generate GitHub Action workflow
200
+ evo init . --path all # Set up all integration paths
201
+ evo setup [path] # Interactive configuration wizard
202
+ evo setup --ui # Browser-based settings page
203
+ evo watch [path] # Watch for commits and auto-analyze
204
+ evo watch . --daemon # Run watcher in background
205
+ evo hooks install [path] # Install git hooks
206
+ evo hooks uninstall [path] # Remove git hooks
207
+ evo hooks status [path] # Show hook status
164
208
 
165
209
  # Patterns & Knowledge Base
166
210
  evo patterns list # Show discovered patterns
211
+ evo patterns pull [path] # Fetch community patterns from registry
212
+ evo patterns push [path] # Share anonymized patterns (requires privacy_level >= 1)
167
213
  evo patterns export # Export anonymized pattern digests
168
214
  evo patterns import <file> # Import community patterns
169
- evo patterns sync # Sync universal patterns
215
+ evo patterns packages # List pattern packages + cache status
216
+ evo patterns new <name> # Scaffold a pattern package
217
+ evo patterns validate <path> # Validate a pattern package
218
+ evo patterns publish <path> # Publish pattern package to PyPI
219
+ evo patterns add <package> # Subscribe to a pattern package
220
+ evo patterns remove <package> # Unsubscribe from a pattern package
221
+ evo patterns block <name> # Block a pattern package
222
+ evo patterns unblock <name> # Unblock a pattern package
170
223
 
171
224
  # Adapter Ecosystem
172
- evo adapter list # Show detected + installed adapters
225
+ evo adapter list # Show detected adapters with trust badges
226
+ evo adapter discover [path] # Find available adapters for your tools
173
227
  evo adapter validate <class> # Run 13-check certification
228
+ evo adapter validate <class> --security # + security scan
229
+ evo adapter security-check <mod> # Standalone security scan
174
230
  evo adapter guide # How to build an adapter
175
231
  evo adapter new <name> --family ci # Scaffold a pip-installable package
176
232
  evo adapter prompt <name> --family ci # Generate AI prompt for building
177
233
  evo adapter request <description> # Request an adapter from the community
234
+ evo adapter block <name> -r "reason" # Block an adapter locally
235
+ evo adapter unblock <name> # Unblock a blocked adapter
236
+ evo adapter check-updates # Check PyPI for plugin updates
237
+ evo adapter report <name> # Report a broken/malicious adapter
238
+
239
+ # Configuration & History
240
+ evo config list # Show all settings
241
+ evo config set <key> <val> # Update a setting
242
+ evo license status # Check license tier
243
+ evo history list [path] # Show run history
244
+ evo history diff [r1 r2] # Compare two runs
178
245
  ```
179
246
 
180
247
  ---
@@ -203,7 +270,7 @@ pip install -e .
203
270
  evo adapter validate evo_jenkins.JenkinsAdapter
204
271
  ```
205
272
 
206
- Checks include: required class attributes, valid family, iter_events yields valid events, JSON serialization, attestation structure, and more.
273
+ Adapters pass 13 structural checks + security scanning before certification.
207
274
 
208
275
  ### Learn More
209
276
 
@@ -221,9 +288,38 @@ The Evolution Engine discovers cross-family patterns automatically:
221
288
  - **Lift-based co-occurrence**: deviations co-occur more than chance (lift >= 1.5)
222
289
  - **Presence-based**: metric distributions differ when events co-occur (Cohen's d >= 0.2)
223
290
 
224
- Patterns progress through scopes: **local** (this repo) -> **community** (shared anonymously) -> **confirmed** (local + community match) -> **universal** (bundled in package).
291
+ Patterns progress through scopes: **local** (this repo) -> **community** (shared anonymously) -> **confirmed** (local + community match).
225
292
 
226
- Universal patterns ship with the pip package and are recognized instantly on new repositories.
293
+ Community patterns are distributed through two redundant channels:
294
+ - **Registry** (real-time) — patterns pushed by users are immediately available via `codequal.dev/api`
295
+ - **PyPI packages** (durable) — periodic snapshots published as [`evo-patterns-community`](https://pypi.org/project/evo-patterns-community/), auto-fetched without `pip install`
296
+
297
+ If the registry is unavailable, PyPI packages still work. Both are checked automatically on `evo analyze`.
298
+
299
+ ### Pattern Distribution
300
+
301
+ ```bash
302
+ # Auto-fetch happens on every `evo analyze` — no manual install needed
303
+ evo analyze .
304
+ # Imported 25 pattern(s) from community registry
305
+ # Imported 25 pattern(s) from community packages
306
+
307
+ # Pull/push patterns from the community registry
308
+ evo patterns pull .
309
+ evo patterns push . # requires: evo config set sync.privacy_level 2
310
+
311
+ # Add a third-party pattern package to your sources
312
+ evo patterns add evo-patterns-web-security
313
+
314
+ # Block an unwanted package
315
+ evo patterns block evo-patterns-untrusted
316
+
317
+ # Build and publish your own pattern package
318
+ evo patterns new my-patterns
319
+ # ... edit patterns.json ...
320
+ evo patterns validate evo-patterns-my-patterns
321
+ evo patterns publish evo-patterns-my-patterns
322
+ ```
227
323
 
228
324
  ---
229
325
 
@@ -237,22 +333,25 @@ evolution-engine/
237
333
  │ ├── registry.py # 3-tier adapter auto-detection
238
334
  │ ├── phase1_engine.py # Phase 1: Observation
239
335
  │ ├── phase2_engine.py # Phase 2: Baselines (MAD/IQR)
240
- │ ├── phase3_engine.py # Phase 3: Explanations
241
- │ ├── phase3_1_renderer.py # Phase 3.1: LLM enhancement
336
+ │ ├── phase3_engine.py # Phase 3: Explanations (template-based)
242
337
  │ ├── phase4_engine.py # Phase 4: Pattern discovery
243
338
  │ ├── phase5_engine.py # Phase 5: Advisory
244
339
  │ ├── knowledge_store.py # SQLite knowledge base
245
340
  │ ├── kb_export.py # Anonymized pattern export/import
246
341
  │ ├── kb_security.py # Import validation (XSS, injection, traversal)
342
+ │ ├── pattern_registry.py # Auto-fetch pattern packages from PyPI
343
+ │ ├── pattern_validator.py # Pattern package validation
344
+ │ ├── pattern_scaffold.py # Pattern package scaffolding
247
345
  │ ├── report_generator.py # Standalone HTML report generator
346
+ │ ├── investigator.py # AI investigation (evo investigate, Pro)
347
+ │ ├── fixer.py # AI fix-verify loop (evo fix, Pro)
248
348
  │ ├── adapter_validator.py # 13-check adapter certification
249
349
  │ ├── adapter_scaffold.py # Package scaffolding + AI prompt gen
250
350
  │ ├── license.py # License tier gating
251
- │ ├── llm_openrouter.py # OpenRouter LLM client
252
- │ ├── llm_anthropic.py # Anthropic LLM client
253
- │ ├── validation_gate.py # LLM output validation
254
351
  │ ├── data/
255
- │ │ └── universal_patterns.json # Bundled universal patterns
352
+ │ │ ├── universal_patterns.json # Bundled universal patterns
353
+ │ │ ├── pattern_index.json # Known pattern packages
354
+ │ │ └── pattern_blocklist.json # Blocked pattern packages
256
355
  │ └── adapters/
257
356
  │ ├── git/ # Version Control (+ Git History Walker)
258
357
  │ ├── ci/ # CI / Build Pipeline (GitHub Actions)
@@ -264,7 +363,7 @@ evolution-engine/
264
363
  │ └── security/ # Security Scanning (Trivy, Dependabot)
265
364
  ├── tests/
266
365
  │ ├── conftest.py # Shared fixtures
267
- │ ├── unit/ # 200+ unit tests
366
+ │ ├── unit/ # 1500+ unit tests
268
367
  │ │ ├── test_phase2_deviation.py
269
368
  │ │ ├── test_phase4_cooccurrence.py
270
369
  │ │ ├── test_phase5_advisory.py
@@ -294,9 +393,15 @@ evolution-engine/
294
393
 
295
394
  ---
296
395
 
396
+ ## Why Now
397
+
398
+ AI coding tools are generating more code than ever. Teams ship faster — but structural quality is invisible until something breaks. EE provides the missing feedback loop: a guardrail that tells you (and your AI) when development patterns drift from what's normal for your project.
399
+
400
+ Calibrated on **90+ open-source repos**, **6.18 million SDLC signals**, and **2.1 million commits**. 44 validated cross-signal patterns. 1.6% false positive rate.
401
+
297
402
  ## Open-Core Model
298
403
 
299
- | Open Source (MIT) | Proprietary |
404
+ | Open Source (MIT) | Proprietary (BSL 1.1) |
300
405
  |-------------------|-------------|
301
406
  | All adapters | Phase 2-5 engines |
302
407
  | CLI, registry, orchestrator | Knowledge store |
@@ -335,4 +440,12 @@ Key documents:
335
440
 
336
441
  ## License
337
442
 
338
- Open-core: adapters and CLI under MIT, analysis engines proprietary.
443
+ Evolution Engine uses a dual-license model:
444
+
445
+ | Component | License | File |
446
+ |-----------|---------|------|
447
+ | CLI, adapters, plugins, GitHub Action | [MIT](LICENSE-MIT) | `LICENSE-MIT` |
448
+ | Core analysis engine (Phases 2-5) | [BSL 1.1](LICENSE) | `LICENSE` |
449
+ | Community patterns | CC0-1.0 | — |
450
+
451
+ The BSL 1.1 license permits non-production use without a commercial license. Production use requires a [Pro subscription](https://codequal.dev/#pricing). On **2029-02-20** the core engine automatically converts to MIT.