logicfalcon 0.1.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 (102) hide show
  1. logicfalcon-0.1.1/.gitignore +48 -0
  2. logicfalcon-0.1.1/CHANGELOG.md +37 -0
  3. logicfalcon-0.1.1/CONTRIBUTING.md +65 -0
  4. logicfalcon-0.1.1/LICENSE +202 -0
  5. logicfalcon-0.1.1/PKG-INFO +244 -0
  6. logicfalcon-0.1.1/README.md +184 -0
  7. logicfalcon-0.1.1/aegis/__init__.py +36 -0
  8. logicfalcon-0.1.1/aegis/cli.py +134 -0
  9. logicfalcon-0.1.1/logicfalcon/__init__.py +70 -0
  10. logicfalcon-0.1.1/logicfalcon/cli.py +134 -0
  11. logicfalcon-0.1.1/logicfalcon/sdk.py +166 -0
  12. logicfalcon-0.1.1/packages/__init__.py +1 -0
  13. logicfalcon-0.1.1/packages/common/__init__.py +3 -0
  14. logicfalcon-0.1.1/packages/common/storage.py +81 -0
  15. logicfalcon-0.1.1/packages/config/__init__.py +3 -0
  16. logicfalcon-0.1.1/packages/config/settings.py +137 -0
  17. logicfalcon-0.1.1/packages/intelligence/code/__init__.py +44 -0
  18. logicfalcon-0.1.1/packages/intelligence/code/impact_analysis.py +144 -0
  19. logicfalcon-0.1.1/packages/intelligence/code/indexer.py +267 -0
  20. logicfalcon-0.1.1/packages/intelligence/code/parser_base.py +187 -0
  21. logicfalcon-0.1.1/packages/intelligence/code/system_intelligence.py +237 -0
  22. logicfalcon-0.1.1/packages/intelligence/code/ts_parser.py +514 -0
  23. logicfalcon-0.1.1/packages/intelligence/debugging/__init__.py +59 -0
  24. logicfalcon-0.1.1/packages/intelligence/debugging/analyzer.py +210 -0
  25. logicfalcon-0.1.1/packages/intelligence/debugging/collector.py +206 -0
  26. logicfalcon-0.1.1/packages/intelligence/debugging/localizer.py +110 -0
  27. logicfalcon-0.1.1/packages/intelligence/debugging/models.py +222 -0
  28. logicfalcon-0.1.1/packages/intelligence/debugging/normalizer.py +80 -0
  29. logicfalcon-0.1.1/packages/intelligence/debugging/remediation_proposals.py +152 -0
  30. logicfalcon-0.1.1/packages/intelligence/debugging/service.py +197 -0
  31. logicfalcon-0.1.1/packages/intelligence/debugging/stack_parser.py +138 -0
  32. logicfalcon-0.1.1/packages/intelligence/debugging/verification.py +105 -0
  33. logicfalcon-0.1.1/packages/intelligence/embeddings/__init__.py +15 -0
  34. logicfalcon-0.1.1/packages/intelligence/embeddings/provider.py +53 -0
  35. logicfalcon-0.1.1/packages/intelligence/evidence/__init__.py +46 -0
  36. logicfalcon-0.1.1/packages/intelligence/evidence/engine.py +208 -0
  37. logicfalcon-0.1.1/packages/intelligence/evidence/graph.py +242 -0
  38. logicfalcon-0.1.1/packages/intelligence/evidence/graph_models.py +211 -0
  39. logicfalcon-0.1.1/packages/intelligence/evidence/models.py +61 -0
  40. logicfalcon-0.1.1/packages/intelligence/evidence/providers.py +441 -0
  41. logicfalcon-0.1.1/packages/intelligence/knowledge/__init__.py +17 -0
  42. logicfalcon-0.1.1/packages/intelligence/knowledge/store.py +232 -0
  43. logicfalcon-0.1.1/packages/intelligence/reasoning/context.py +131 -0
  44. logicfalcon-0.1.1/packages/intelligence/reasoning/hypotheses.py +215 -0
  45. logicfalcon-0.1.1/packages/intelligence/reasoning/prompts/investigation_system.txt +16 -0
  46. logicfalcon-0.1.1/packages/intelligence/reasoning/prompts/investigation_user.txt +40 -0
  47. logicfalcon-0.1.1/packages/intelligence/reasoning/provider.py +212 -0
  48. logicfalcon-0.1.1/packages/intelligence/reasoning/reliability.py +217 -0
  49. logicfalcon-0.1.1/packages/intelligence/reasoning/router.py +227 -0
  50. logicfalcon-0.1.1/packages/intelligence/reasoning/validator.py +100 -0
  51. logicfalcon-0.1.1/packages/intelligence/system/__init__.py +19 -0
  52. logicfalcon-0.1.1/packages/intelligence/system/context.py +65 -0
  53. logicfalcon-0.1.1/packages/intelligence/system/registry.py +145 -0
  54. logicfalcon-0.1.1/packages/llm/__init__.py +3 -0
  55. logicfalcon-0.1.1/packages/llm/boundary.py +25 -0
  56. logicfalcon-0.1.1/packages/logging/__init__.py +3 -0
  57. logicfalcon-0.1.1/packages/logging/logger.py +102 -0
  58. logicfalcon-0.1.1/packages/reliability/__init__.py +23 -0
  59. logicfalcon-0.1.1/packages/reliability/adapter.py +304 -0
  60. logicfalcon-0.1.1/packages/reliability/domain.py +99 -0
  61. logicfalcon-0.1.1/packages/review/__init__.py +45 -0
  62. logicfalcon-0.1.1/packages/review/adapters/__init__.py +13 -0
  63. logicfalcon-0.1.1/packages/review/adapters/ast_security.py +417 -0
  64. logicfalcon-0.1.1/packages/review/adapters/base.py +34 -0
  65. logicfalcon-0.1.1/packages/review/adapters/ruff_adapter.py +171 -0
  66. logicfalcon-0.1.1/packages/review/adapters/runner.py +221 -0
  67. logicfalcon-0.1.1/packages/review/adapters/typescript_stub.py +35 -0
  68. logicfalcon-0.1.1/packages/review/ai/__init__.py +16 -0
  69. logicfalcon-0.1.1/packages/review/ai/context_builder.py +158 -0
  70. logicfalcon-0.1.1/packages/review/ai/prompts.py +61 -0
  71. logicfalcon-0.1.1/packages/review/ai/reviewer.py +250 -0
  72. logicfalcon-0.1.1/packages/review/ai/schemas.py +31 -0
  73. logicfalcon-0.1.1/packages/review/analyzer/__init__.py +6 -0
  74. logicfalcon-0.1.1/packages/review/analyzer/dependency_graph.py +144 -0
  75. logicfalcon-0.1.1/packages/review/analyzer/symbol_mapper.py +90 -0
  76. logicfalcon-0.1.1/packages/review/cli.py +399 -0
  77. logicfalcon-0.1.1/packages/review/domain/__init__.py +45 -0
  78. logicfalcon-0.1.1/packages/review/domain/models.py +217 -0
  79. logicfalcon-0.1.1/packages/review/engine.py +485 -0
  80. logicfalcon-0.1.1/packages/review/fix_engine.py +335 -0
  81. logicfalcon-0.1.1/packages/review/git/__init__.py +5 -0
  82. logicfalcon-0.1.1/packages/review/git/diff_parser.py +251 -0
  83. logicfalcon-0.1.1/packages/review/github/__init__.py +15 -0
  84. logicfalcon-0.1.1/packages/review/github/client.py +98 -0
  85. logicfalcon-0.1.1/packages/review/github/publisher.py +137 -0
  86. logicfalcon-0.1.1/packages/review/github/webhook.py +91 -0
  87. logicfalcon-0.1.1/packages/review/gitlab/__init__.py +15 -0
  88. logicfalcon-0.1.1/packages/review/gitlab/client.py +105 -0
  89. logicfalcon-0.1.1/packages/review/gitlab/publisher.py +160 -0
  90. logicfalcon-0.1.1/packages/review/security/__init__.py +1 -0
  91. logicfalcon-0.1.1/packages/review/security/path_validation.py +46 -0
  92. logicfalcon-0.1.1/packages/review/validator.py +158 -0
  93. logicfalcon-0.1.1/packages/security/__init__.py +8 -0
  94. logicfalcon-0.1.1/packages/security/llm_firewall/__init__.py +21 -0
  95. logicfalcon-0.1.1/packages/security/llm_firewall/adapter.py +355 -0
  96. logicfalcon-0.1.1/packages/security/policy.py +225 -0
  97. logicfalcon-0.1.1/packages/security/rbac.py +130 -0
  98. logicfalcon-0.1.1/packages/security/tools.py +194 -0
  99. logicfalcon-0.1.1/packages/service_runtime/__init__.py +34 -0
  100. logicfalcon-0.1.1/packages/service_runtime/base.py +88 -0
  101. logicfalcon-0.1.1/packages/service_runtime/metrics.py +230 -0
  102. logicfalcon-0.1.1/pyproject.toml +155 -0
@@ -0,0 +1,48 @@
1
+ # Byte-compiled / optimized files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Virtual environments
7
+ .venv/
8
+ venv/
9
+ ENV/
10
+
11
+ # Environment files
12
+ .env
13
+ .env.local
14
+ *.env
15
+
16
+ # Testing & Coverage
17
+ .pytest_cache/
18
+ .coverage
19
+ htmlcov/
20
+ coverage.xml
21
+
22
+ # Type checking & Linters
23
+ .mypy_cache/
24
+ .ruff_cache/
25
+
26
+ # IDE & Editor
27
+ .vscode/
28
+ .idea/
29
+ *.swp
30
+ *.swo
31
+
32
+ # Docker / local data
33
+ data/
34
+ minio-data/
35
+ postgres-data/
36
+ redis-data/
37
+
38
+ # OS files
39
+ .DS_Store
40
+ Thumbs.db
41
+
42
+ # Frontend build & packages
43
+ node_modules/
44
+ dist/
45
+ dist-ssr/
46
+
47
+ # Backups & scratch
48
+ backups/
@@ -0,0 +1,37 @@
1
+ # LogicFalcon / AEGIS AI — Changelog
2
+
3
+ All notable changes to the LogicFalcon developer platform (powered by AEGIS AI) are documented in this file.
4
+
5
+ ## [0.1.0] — 2026-10-18: LogicFalcon Initial Open-Source Release
6
+
7
+ Initial public open-source release of **LogicFalcon** under the Apache License 2.0.
8
+
9
+ ### Highlights & Capabilities
10
+ - **Deterministic Static Code Review**: AST-grounded repository intelligence engine for local Git diff analysis.
11
+ - **Multi-Language AST Parsers**: Static symbol and dependency extraction for Python (`PythonASTParser`) and JavaScript/TypeScript (`JavaScriptTypeScriptParser`).
12
+ - **In-Process Security Rules**: Deterministic checks for hardcoded credentials (`SEC-003`), unsafe subprocess calls with `shell=True` (`SEC-002`), arbitrary dynamic execution via `eval`/`exec` (`SEC-001`), insecure pickle deserialization (`SEC-004`), and broad exception suppression (`QUAL-001`).
13
+ - **Reverse Dependency Traversal**: Automated discovery of test files impacted by source modifications.
14
+ - **Unified Developer CLI**: Added `logicfalcon` CLI exposing `review` and `doctor` subcommands.
15
+ - **Backwards Compatibility**: Preserved `aegis` CLI entry point as a drop-in compatibility alias.
16
+ - **Python SDK**: Exported core domain models (`LocalReviewEngine`, `ReviewConfig`, `ReviewReport`, `FindingSeverity`, `AutonomousDebuggingService`) via `logicfalcon`.
17
+ - **Open-Source Licensing**: Released under Apache License 2.0 with inbound=outbound contributor guidelines and separate trademark reservation.
18
+
19
+ ---
20
+
21
+ ## [Unreleased] — 1.0.0-rc1 (AEGIS AI Core)
22
+
23
+ ### Repository Intelligence & AI Code Review Engine
24
+ - **Unified Diff Parsing**: Added pure-Python unified Git diff parser (`packages/review/git/diff_parser.py`) tracking 1-indexed hunk line numbers, additions, deletions, renames, and binary files with bounded memory limits.
25
+ - **AST Symbol Mapping**: Added AST symbol extraction and line-range correlation (`packages/review/analyzer/symbol_mapper.py`) reusing `PythonASTParser`.
26
+ - **Dependency Graph & Affected Tests**: Added static import dependency graph and reverse dependency traversal (`packages/review/analyzer/dependency_graph.py`) to discover test suites affected by diff changes.
27
+ - **Deterministic AST Security Analyzers**: Added in-process AST security rules (`packages/review/adapters/ast_security.py`) for `eval`/`exec` (`SEC-001`), `subprocess(shell=True)` (`SEC-002`), hardcoded credentials (`SEC-003`), insecure pickle deserialization (`SEC-004`), broad exception suppression (`QUAL-001`), and syntax errors (`SEC-005`).
28
+ - **Static Analysis Runner**: Added subprocess runner (`packages/review/adapters/runner.py`) with process group isolation (`start_new_session=True`), environment scrubbing, and `SIGKILL` timeout enforcement.
29
+ - **Bounded AI Review Engine**: Added repository-aware AI reviewer (`packages/review/ai/reviewer.py`) with strict prompt bounds, defensive prompting against prompt injection, LLM Firewall screening, AI Reliability fallback handling, and Pydantic schema validation.
30
+ - **Hallucination Protection**: Validated all AI finding locations against real changed files and line ranges, rejecting fabricated findings.
31
+ - **Database Persistence**: Added `ReviewSessionEntity` and `ReviewFindingEntity` with Alembic migration `0006_code_review_engine.py` and SQLAlchemy 2.0 Async repositories.
32
+ - **Tenant-Scoped API**: Added REST endpoints under `/api/v1/reviews` with tenant isolation (`organization_id`) and RBAC permissions (`PROJECT_WRITE` / `PROJECT_READ`).
33
+ - **GitHub Webhook & PR Publisher**: Added HMAC-SHA256 webhook verifier (`packages/review/github/webhook.py`) with fail-closed production secret enforcement, delivery deduplication, stale-head commit protection, and dry-run safety.
34
+ - **Read-Only CLI**: Added `aegis review` CLI (`packages/review/cli.py`) with text and JSON formats and configurable severity threshold CI exit codes.
35
+ - **Recruiter Demonstration**: Added standalone demonstration script (`scripts/demo_review_engine.py`) for reproducible, zero-credential local evaluations.
36
+
37
+ For detailed release notes, see [`docs/release/CHANGELOG_CODE_REVIEW.md`](docs/release/CHANGELOG_CODE_REVIEW.md).
@@ -0,0 +1,65 @@
1
+ # Contributing to LogicFalcon
2
+
3
+ Thank you for your interest in contributing to **LogicFalcon** (powered by AEGIS AI)! We welcome contributions from developers, researchers, and organizations building AI-assisted software engineering intelligence.
4
+
5
+ ---
6
+
7
+ ## 1. Open Source Licensing of Contributions
8
+
9
+ LogicFalcon is licensed under the **Apache License 2.0** ([`LICENSE`](LICENSE)).
10
+
11
+ - **Inbound = Outbound Model:** By submitting a pull request or patch to this repository, you agree that your contributions will be licensed under the terms of the Apache License 2.0.
12
+ - **No Copyright Transfer:** You retain copyright in your original contributions. You are granting a non-exclusive, perpetual, worldwide license under the terms of Apache-2.0.
13
+ - **Right to Contribute:** You represent and warrant that you are the author of the submitted code or have explicit authorization from your employer or copyright owner to submit the work under Apache-2.0.
14
+
15
+ ---
16
+
17
+ ## 2. Code of Conduct & Review Standards
18
+
19
+ We expect all contributors to maintain a professional, respectful, and constructive environment.
20
+
21
+ All pull requests undergo code review focusing on:
22
+ - **Correctness and Determinism:** LogicFalcon prioritizes evidence-grounded analysis. Reasoning and code review features must be backed by verifiable AST or graph evidence.
23
+ - **Security & Privacy:** Code review rules and telemetry ingestion must treat user repository data as untrusted. Never log secrets, credentials, or private keys.
24
+ - **Architectural Separation:** Preserve the layered architecture: API routers → application services → domain models → repositories → infrastructure.
25
+
26
+ ---
27
+
28
+ ## 3. How to Submit Issues and Pull Requests
29
+
30
+ ### Reporting Issues
31
+ - Check existing GitHub issues before creating a new report to avoid duplicates.
32
+ - Include Python version, OS platform, and relevant terminal/CLI output.
33
+ - **Security Disclosures:** Do not post suspected security vulnerabilities in public issues. Please report security concerns privately to the project maintainers.
34
+
35
+ ### Pull Request Process
36
+ 1. **Fork the Repository:** Create your feature branch from `main`.
37
+ 2. **Make Changes:** Keep commits focused, well-structured, and descriptively titled.
38
+ 3. **Add Tests:** Every new feature, rule, parser, or bugfix must include unit or integration tests in `tests/`.
39
+ 4. **Run Quality Gates:**
40
+ ```bash
41
+ # 1. Run linter
42
+ uv run ruff check .
43
+
44
+ # 2. Run static type checker
45
+ uv run mypy --explicit-package-bases logicfalcon aegis apps packages tests
46
+
47
+ # 3. Run test suite
48
+ uv run pytest tests/
49
+ ```
50
+ 5. **Submit PR:** Open a Pull Request against `main`. Provide a clear summary of the problem addressed, changes introduced, and test results.
51
+
52
+ ---
53
+
54
+ ## 4. Third-Party Code & Dependencies Policy
55
+
56
+ - **License Compatibility:** Any new third-party dependency or library introduced must be compatible with Apache-2.0 (e.g., Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, ISC).
57
+ - **Prohibited Licenses:** Do not introduce copyleft dependencies (GPL, AGPL) or libraries with commercial restriction clauses without explicit maintainer approval.
58
+ - **Preserving Notices:** If you incorporate permitted third-party code snippets or files, you must preserve existing copyright notices, license headers, and disclaimers.
59
+ - **Documenting Dependencies:** All dependencies must be declared in `pyproject.toml` with pinned lower bounds.
60
+
61
+ ---
62
+
63
+ ## 5. Trademark Notice
64
+
65
+ The **LogicFalcon** name, logo, and brand marks are trademarks of the project authors and are separate from the software copyright license. The Apache-2.0 license grants software usage and modification rights but does not grant unrestricted trademark rights to use the LogicFalcon brand marks without permission.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 LogicFalcon Authors & Contributors (powered by AEGIS AI)
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.5
2
+ Name: logicfalcon
3
+ Version: 0.1.1
4
+ Summary: LogicFalcon — Fast, precise engineering intelligence. Powered by AEGIS AI.
5
+ Project-URL: Homepage, https://github.com/Livesh-L-28/logicfalcon
6
+ Project-URL: Documentation, https://github.com/Livesh-L-28/logicfalcon#readme
7
+ Project-URL: Repository, https://github.com/Livesh-L-28/logicfalcon.git
8
+ Project-URL: Issues, https://github.com/Livesh-L-28/logicfalcon/issues
9
+ Author: LogicFalcon Team (powered by AEGIS AI)
10
+ License: Apache-2.0
11
+ License-File: LICENSE
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Framework :: FastAPI
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Security
23
+ Classifier: Topic :: Software Development :: Quality Assurance
24
+ Classifier: Topic :: Software Development :: Testing
25
+ Requires-Python: >=3.12
26
+ Requires-Dist: aiobotocore>=2.13.0
27
+ Requires-Dist: aireliability>=0.1.0
28
+ Requires-Dist: alembic>=1.13.1
29
+ Requires-Dist: asyncpg>=0.29.0
30
+ Requires-Dist: fastapi>=0.111.0
31
+ Requires-Dist: greenlet>=3.0.0
32
+ Requires-Dist: httpx>=0.27.0
33
+ Requires-Dist: llmfirewall-core>=1.0.0
34
+ Requires-Dist: opentelemetry-api>=1.25.0
35
+ Requires-Dist: opentelemetry-exporter-otlp>=1.25.0
36
+ Requires-Dist: opentelemetry-instrumentation-fastapi>=0.46b0
37
+ Requires-Dist: opentelemetry-sdk>=1.25.0
38
+ Requires-Dist: pgvector>=0.2.5
39
+ Requires-Dist: prometheus-client>=0.20.0
40
+ Requires-Dist: pydantic-settings>=2.2.1
41
+ Requires-Dist: pydantic>=2.7.0
42
+ Requires-Dist: python-json-logger>=2.0.7
43
+ Requires-Dist: python-multipart>=0.0.9
44
+ Requires-Dist: redis>=5.0.4
45
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.30
46
+ Requires-Dist: structlog>=24.1.0
47
+ Requires-Dist: uvicorn[standard]>=0.30.0
48
+ Provides-Extra: dev
49
+ Requires-Dist: aiosqlite>=0.20.0; extra == 'dev'
50
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
51
+ Requires-Dist: pytest-asyncio>=0.23.6; extra == 'dev'
52
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
53
+ Requires-Dist: pytest>=8.2.0; extra == 'dev'
54
+ Requires-Dist: ruff>=0.4.4; extra == 'dev'
55
+ Requires-Dist: types-redis>=4.6.0.20240425; extra == 'dev'
56
+ Provides-Extra: packaging
57
+ Requires-Dist: build>=1.2.0; extra == 'packaging'
58
+ Requires-Dist: twine>=5.0.0; extra == 'packaging'
59
+ Description-Content-Type: text/markdown
60
+
61
+ # LogicFalcon — Fast, precise engineering intelligence.
62
+
63
+ > **LogicFalcon, powered by AEGIS AI**
64
+ > LogicFalcon is an AI-powered software engineering intelligence platform for evidence-grounded code review, repository analysis, change-impact assessment, root-cause analysis, and safe fix proposals. Powered by AEGIS AI.
65
+
66
+ ---
67
+
68
+ ## Quickstart & Installation
69
+
70
+ ### 1. Installation via pip
71
+
72
+ ```bash
73
+ pip install logicfalcon
74
+ ```
75
+
76
+ ### 2. Developer CLI Usage
77
+
78
+ ```bash
79
+ # Verify environment and AST analyzer capabilities
80
+ logicfalcon doctor
81
+
82
+ # Run deterministic code review on local git diff
83
+ logicfalcon review --repo .
84
+
85
+ # Machine-readable JSON output for CI pipelines
86
+ logicfalcon review --repo . --format json --severity-threshold ERROR
87
+ ```
88
+
89
+ ### 3. Python SDK Usage
90
+
91
+ ```python
92
+ from pathlib import Path
93
+ from logicfalcon import LocalReviewEngine, ReviewConfig
94
+
95
+ config = ReviewConfig(
96
+ max_file_size_bytes=1_000_000,
97
+ per_file_timeout_seconds=10.0,
98
+ enable_ai_review=False, # Deterministic static analysis by default
99
+ )
100
+ engine = LocalReviewEngine(repo_root=Path("."), config=config)
101
+ report = engine.review_local_git_diff()
102
+ print(f"Scanned {len(report.files_reviewed)} files. Found {len(report.findings)} issues.")
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Platform Engine (AEGIS AI Foundation)
108
+
109
+ LogicFalcon's core reasoning, multi-language AST comprehension, and autonomous reliability engines are built on the **AEGIS AI** platform architecture.
110
+
111
+ > **Engine Status: Phase 7 — Autonomous Reliability + Evaluation + Production Hardening COMPLETE (CURRENT)**
112
+
113
+ > **Phase 7 Scope Note:** Phase 7 concludes the roadmap by delivering bounded autonomous reliability under deterministic safety controls: bounded agent execution loops with strict tool and cost budgets, multi-tiered autonomy levels (`LEVEL_0` through `LEVEL_3`), emergency stop kill switches, change freeze mechanisms, autonomy circuit breakers, continuous evaluation against golden and adversarial datasets with strict release gates, SLO and error budget tracking, and operational learning from validated incidents without self-modifying code or policies.
114
+
115
+
116
+ ---
117
+
118
+ ## Unified System Model
119
+
120
+ ```text
121
+ AEGIS INTELLIGENCE
122
+ │
123
+ ┌────────────────┼────────────────┐
124
+ │ │ │
125
+ ▼ ▼ ▼
126
+ SYSTEM CODE KNOWLEDGE
127
+ INTELLIGENCE INTELLIGENCE INTELLIGENCE
128
+ │ │ │
129
+ ▼ ▼ ▼
130
+ Services Git Docs
131
+ Dependencies Files Runbooks
132
+ Environments Symbols Incidents
133
+ Deployments Commits Postmortems
134
+ Telemetry AST Architecture
135
+ │ │ │
136
+ └────────────────┼────────────────┘
137
+ ▼
138
+ UNIFIED SYSTEM MODEL
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Intelligence Capabilities
144
+ - **System Intelligence**: Runtime topology discovery, typed dependency relationships (`HTTP`, `DATABASE`, `CACHE`), machine-readable graph API (`GET /api/v1/intelligence/dependency-graph`).
145
+ - **Code Intelligence**: Static AST parsing (classes, methods, functions, signatures, docstrings, imports), SHA256 incremental indexing, secret redaction (`[REDACTED_SECRET]`), symbol search (`POST /api/v1/intelligence/code/search`).
146
+ - **Knowledge Intelligence**: Section-based document chunking, 64-dimensional unit vector embeddings, hybrid keyword + dense vector retrieval with score normalization (`POST /api/v1/intelligence/knowledge/search`).
147
+ - **Unified Context API**: Assembles full service context across topology, symbols, and operational documentation (`GET /api/v1/intelligence/services/{service}/context`).
148
+
149
+ ---
150
+
151
+ ## Public Portfolio Architecture (Render All-in-One Deployment)
152
+
153
+ ```text
154
+ GitHub Repository
155
+ │
156
+ ┌────────────────┴────────────────┐
157
+ ▼ ▼
158
+ Render Static Site Render Web Service
159
+ React 18 + Vite Frontend FastAPI Backend API
160
+ (aegis-ai-web.onrender.com) (aegis-ai-api.onrender.com)
161
+ │ │
162
+ │ (REST API & SSE stream) │
163
+ └────────────────►────────────────┤
164
+ │
165
+ ┌──────────────────┼──────────────────┐
166
+ ▼ ▼ ▼
167
+ Render Postgres Redis Object Storage
168
+ + pgvector (Upstash / Aiven) (Cloudflare R2 / S3)
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Live Demo & Documentation
174
+
175
+ ### Deployed Portfolio URLs
176
+
177
+ * **Deployment Documentation**: [`docs/deployment/public-demo.md`](docs/deployment/public-demo.md)
178
+ * **Render Blueprint**: [`render.yaml`](render.yaml) (1-Click deployment for Frontend + Backend + PostgreSQL)
179
+ * **Frontend**: Configured for Render Static Site (`apps/web`, SPA rewrite `/* -> /index.html`, `VITE_API_BASE_URL`) or Vercel
180
+ * **API**: Configured for Render Docker Web Service with dynamic `$PORT` and container health checks
181
+
182
+ ---
183
+
184
+ ## Local Quickstart (Full Docker Compose Environment)
185
+
186
+ To run the complete AEGIS ecosystem locally including Prometheus, Grafana, Loki, MinIO, and 4 simulated microservices:
187
+
188
+ ```bash
189
+ # 1. Clone repository
190
+ git clone <repository_url>
191
+ cd "AEGIS AI"
192
+
193
+ # 2. Configure environment
194
+ cp .env.example .env
195
+
196
+ # 3. Start complete local infrastructure
197
+ docker compose up --build -d
198
+
199
+ # 4. Open Command Center
200
+ open http://localhost:5173
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Interactive Recruiter Demo Scenario
206
+
207
+ Experience the complete **Observe → Reason → Propose → Approve → Sandbox Execute → Validate** autonomous reliability lifecycle:
208
+
209
+ 1. **Open Dashboard**: Navigate to the Operational Overview.
210
+ 2. **Trigger Incident (INC-001)**: Under *Canonical Fault Scenarios*, click **Inject Fault** on scenario `SCEN-001` (Redis Connection Exhaustion) or `SCEN-002` (Downstream Latency Spike).
211
+ 3. **Observe Incident**: View the newly detected incident in the *Live Incident Pipeline* with its severity and affected service.
212
+ 4. **Run AI Investigation**: Click **Investigate** to open the Incident Deep Dive. Click **Run AI Investigation** to correlate telemetry, git history, and runbooks.
213
+ 5. **Inspect Evidence & Causal Graph**: Review multi-modal evidence signals and the determined root cause.
214
+ 6. **Propose Remediation**: Click **Propose AI Remediation** to synthesize a bounded, typed action plan.
215
+ 7. **Review Risk & Blast Radius**: Inspect calculated risk levels and affected services.
216
+ 8. **Human Approval**: Click **Approve Action** to cryptographically authorize the plan.
217
+ 9. **Sandbox Execution**: Click **Execute in Sandbox** to safely apply the fix to the simulated environment.
218
+ 10. **Validate & Audit**: Inspect the automated post-flight verification check and the immutable entry recorded in the Audit log.
219
+
220
+ ---
221
+
222
+ ## Verification & Quality Gates
223
+
224
+ ```bash
225
+ # Code formatting & lint check
226
+ uv run ruff check .
227
+
228
+ # Strict static type check
229
+ uv run mypy --explicit-package-bases logicfalcon aegis apps packages tests
230
+
231
+ # Automated test suite
232
+ uv run pytest tests/ -q
233
+ ```
234
+
235
+ ---
236
+
237
+ ## License & Trademarks
238
+
239
+ - **Software License**: LogicFalcon is open-source software licensed under the **Apache License, Version 2.0**. See the authoritative license terms in [`LICENSE`](LICENSE).
240
+ - **Platform Foundation**: LogicFalcon is powered by the **AEGIS AI** engineering intelligence platform.
241
+ - **Copyright & Attribution**: Copyright 2026 LogicFalcon Authors & Contributors (powered by AEGIS AI). Third-party dependencies retain their respective permissive licenses (MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause).
242
+ - **Trademarks**: The LogicFalcon name and logo are product brand identifiers separate from the software copyright license and are not licensed for unrestricted trademark use.
243
+ - **Contributing**: Contributions are subject to the terms in [`CONTRIBUTING.md`](CONTRIBUTING.md).
244
+