architec 0.2.11__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 (251) hide show
  1. architec-0.2.11/LICENSE +21 -0
  2. architec-0.2.11/MANIFEST.in +6 -0
  3. architec-0.2.11/PKG-INFO +322 -0
  4. architec-0.2.11/README.md +293 -0
  5. architec-0.2.11/README.zh-CN.md +252 -0
  6. architec-0.2.11/config/config.default.yaml +38 -0
  7. architec-0.2.11/config/config.example.yaml +38 -0
  8. architec-0.2.11/config/rubric.json +76 -0
  9. architec-0.2.11/config/scoring-policy.json +86 -0
  10. architec-0.2.11/prompts/analyze.md +82 -0
  11. architec-0.2.11/prompts/codex-repair.md +36 -0
  12. architec-0.2.11/prompts/component-qa.md +10 -0
  13. architec-0.2.11/prompts/component-scoring.md +17 -0
  14. architec-0.2.11/prompts/feature-architecture.md +13 -0
  15. architec-0.2.11/prompts/folder-naming-judge.md +129 -0
  16. architec-0.2.11/prompts/full-report.md +14 -0
  17. architec-0.2.11/prompts/history-remediation.md +13 -0
  18. architec-0.2.11/prompts/orchestrator-program.md +14 -0
  19. architec-0.2.11/prompts/review-diff.md +40 -0
  20. architec-0.2.11/prompts/semantic-judge.md +69 -0
  21. architec-0.2.11/prompts/split-expert.md +30 -0
  22. architec-0.2.11/prompts/summary.md +14 -0
  23. architec-0.2.11/prompts/system.md +60 -0
  24. architec-0.2.11/prompts/tool-orchestrator.md +65 -0
  25. architec-0.2.11/prompts/topology-review-judge.md +106 -0
  26. architec-0.2.11/pyproject.toml +68 -0
  27. architec-0.2.11/setup.cfg +4 -0
  28. architec-0.2.11/src/architec/__init__.py +52 -0
  29. architec-0.2.11/src/architec/__main__.py +4 -0
  30. architec-0.2.11/src/architec/_compat_reexport.py +20 -0
  31. architec-0.2.11/src/architec/_version.py +4 -0
  32. architec-0.2.11/src/architec/advice_feedback.py +263 -0
  33. architec-0.2.11/src/architec/analysis/__init__.py +5 -0
  34. architec-0.2.11/src/architec/analysis/analysis_cache.py +76 -0
  35. architec-0.2.11/src/architec/analysis/analysis_runner_flow.py +208 -0
  36. architec-0.2.11/src/architec/analysis/analysis_runner_llm.py +47 -0
  37. architec-0.2.11/src/architec/analysis/analysis_runner_recommendations.py +104 -0
  38. architec-0.2.11/src/architec/analysis/analysis_runner_report.py +174 -0
  39. architec-0.2.11/src/architec/analysis/analysis_runner_report_support.py +104 -0
  40. architec-0.2.11/src/architec/analysis/analysis_runner_report_views.py +188 -0
  41. architec-0.2.11/src/architec/analysis/governance_dimensions.py +195 -0
  42. architec-0.2.11/src/architec/analysis/history_analyzer.py +198 -0
  43. architec-0.2.11/src/architec/analysis/history_analyzer_report.py +96 -0
  44. architec-0.2.11/src/architec/analysis/hotspot_digest.py +62 -0
  45. architec-0.2.11/src/architec/analysis/hotspot_digest_rank.py +150 -0
  46. architec-0.2.11/src/architec/analysis/hotspot_digest_sources.py +156 -0
  47. architec-0.2.11/src/architec/analysis/public.py +234 -0
  48. architec-0.2.11/src/architec/analysis/repo_topology.py +235 -0
  49. architec-0.2.11/src/architec/analysis/repo_topology_findings.py +151 -0
  50. architec-0.2.11/src/architec/analysis/repo_topology_group_terms.py +199 -0
  51. architec-0.2.11/src/architec/analysis/repo_topology_groups.py +168 -0
  52. architec-0.2.11/src/architec/analysis/repo_topology_llm.py +192 -0
  53. architec-0.2.11/src/architec/analysis/repo_topology_migration.py +266 -0
  54. architec-0.2.11/src/architec/analysis/repo_topology_migration_helpers.py +247 -0
  55. architec-0.2.11/src/architec/analysis/repo_topology_paths.py +123 -0
  56. architec-0.2.11/src/architec/analysis/repo_topology_review_helpers.py +204 -0
  57. architec-0.2.11/src/architec/analysis/repo_topology_rule_data.py +121 -0
  58. architec-0.2.11/src/architec/analysis/repo_topology_rules.py +119 -0
  59. architec-0.2.11/src/architec/analysis_runner.py +3 -0
  60. architec-0.2.11/src/architec/auth/__init__.py +21 -0
  61. architec-0.2.11/src/architec/auth/client.py +149 -0
  62. architec-0.2.11/src/architec/auth/commands.py +658 -0
  63. architec-0.2.11/src/architec/auth/device.py +36 -0
  64. architec-0.2.11/src/architec/auth/guard.py +65 -0
  65. architec-0.2.11/src/architec/auth/lease.py +77 -0
  66. architec-0.2.11/src/architec/auth/store.py +78 -0
  67. architec-0.2.11/src/architec/backend_llm/__init__.py +177 -0
  68. architec-0.2.11/src/architec/backend_llm/cache.py +143 -0
  69. architec-0.2.11/src/architec/backend_llm/config.py +370 -0
  70. architec-0.2.11/src/architec/backend_llm/errors.py +20 -0
  71. architec-0.2.11/src/architec/backend_llm/failover.py +158 -0
  72. architec-0.2.11/src/architec/backend_llm/flow.py +401 -0
  73. architec-0.2.11/src/architec/backend_llm/gateway.py +160 -0
  74. architec-0.2.11/src/architec/backend_llm/parse.py +144 -0
  75. architec-0.2.11/src/architec/baseline/__init__.py +11 -0
  76. architec-0.2.11/src/architec/baseline/report.py +227 -0
  77. architec-0.2.11/src/architec/cleanup/__init__.py +67 -0
  78. architec-0.2.11/src/architec/cleanup/archive.py +205 -0
  79. architec-0.2.11/src/architec/cleanup/autofix.py +258 -0
  80. architec-0.2.11/src/architec/cleanup/inventory.py +229 -0
  81. architec-0.2.11/src/architec/cleanup/metadata.py +46 -0
  82. architec-0.2.11/src/architec/cleanup/report.py +119 -0
  83. architec-0.2.11/src/architec/cleanup/retire_plan.py +380 -0
  84. architec-0.2.11/src/architec/cleanup/scope.py +134 -0
  85. architec-0.2.11/src/architec/cleanup/semantic_judge.py +451 -0
  86. architec-0.2.11/src/architec/cli.py +973 -0
  87. architec-0.2.11/src/architec/code_review/__init__.py +9 -0
  88. architec-0.2.11/src/architec/code_review/architecture_contracts.py +190 -0
  89. architec-0.2.11/src/architec/code_review/near_duplicate.py +700 -0
  90. architec-0.2.11/src/architec/code_review/plan_diff_consistency.py +1201 -0
  91. architec-0.2.11/src/architec/code_review/public.py +2156 -0
  92. architec-0.2.11/src/architec/code_review/python_imports.py +96 -0
  93. architec-0.2.11/src/architec/code_review/risk_context.py +376 -0
  94. architec-0.2.11/src/architec/code_review/scan_cache.py +112 -0
  95. architec-0.2.11/src/architec/code_review/shadow_implementation.py +1261 -0
  96. architec-0.2.11/src/architec/component_descriptors.py +3 -0
  97. architec-0.2.11/src/architec/descriptors/__init__.py +17 -0
  98. architec-0.2.11/src/architec/descriptors/component_descriptors_builder.py +104 -0
  99. architec-0.2.11/src/architec/descriptors/component_descriptors_semantics.py +19 -0
  100. architec-0.2.11/src/architec/descriptors/component_descriptors_semantics_roles.py +75 -0
  101. architec-0.2.11/src/architec/descriptors/component_descriptors_semantics_terms.py +95 -0
  102. architec-0.2.11/src/architec/descriptors/component_descriptors_symbols.py +82 -0
  103. architec-0.2.11/src/architec/descriptors/component_graph.py +108 -0
  104. architec-0.2.11/src/architec/descriptors/public.py +15 -0
  105. architec-0.2.11/src/architec/events/__init__.py +3 -0
  106. architec-0.2.11/src/architec/events/public.py +132 -0
  107. architec-0.2.11/src/architec/feature/__init__.py +5 -0
  108. architec-0.2.11/src/architec/feature/feature_advisor.py +130 -0
  109. architec-0.2.11/src/architec/feature/feature_advisor_llm.py +55 -0
  110. architec-0.2.11/src/architec/feature/feature_advisor_ranking.py +88 -0
  111. architec-0.2.11/src/architec/feature/feature_advisor_ranking_output.py +55 -0
  112. architec-0.2.11/src/architec/feature/feature_advisor_ranking_phase1.py +95 -0
  113. architec-0.2.11/src/architec/feature/feature_advisor_ranking_phase2.py +91 -0
  114. architec-0.2.11/src/architec/feature/feature_advisor_targets.py +159 -0
  115. architec-0.2.11/src/architec/feature/feature_query.py +128 -0
  116. architec-0.2.11/src/architec/feature/feature_query_scoring.py +120 -0
  117. architec-0.2.11/src/architec/fix_advice/__init__.py +3 -0
  118. architec-0.2.11/src/architec/fix_advice/public.py +518 -0
  119. architec-0.2.11/src/architec/gate/__init__.py +13 -0
  120. architec-0.2.11/src/architec/gate/report.py +265 -0
  121. architec-0.2.11/src/architec/integration/__init__.py +1 -0
  122. architec-0.2.11/src/architec/integration/bundle_loader.py +287 -0
  123. architec-0.2.11/src/architec/integration/hippo_adapter.py +181 -0
  124. architec-0.2.11/src/architec/integration/hippo_adapter_paths.py +177 -0
  125. architec-0.2.11/src/architec/integration/hippo_adapter_snapshot.py +27 -0
  126. architec-0.2.11/src/architec/integration/hippo_bridge.py +101 -0
  127. architec-0.2.11/src/architec/integration/paths.py +35 -0
  128. architec-0.2.11/src/architec/integration/resource_paths.py +131 -0
  129. architec-0.2.11/src/architec/orchestrator/__init__.py +194 -0
  130. architec-0.2.11/src/architec/orchestrator/component_qa.py +189 -0
  131. architec-0.2.11/src/architec/orchestrator/component_qa_selection.py +180 -0
  132. architec-0.2.11/src/architec/orchestrator/orchestrator_batch_builders.py +168 -0
  133. architec-0.2.11/src/architec/orchestrator/orchestrator_batch_helpers.py +135 -0
  134. architec-0.2.11/src/architec/orchestrator/orchestrator_batches.py +119 -0
  135. architec-0.2.11/src/architec/orchestrator/orchestrator_flow.py +152 -0
  136. architec-0.2.11/src/architec/orchestrator/orchestrator_llm.py +39 -0
  137. architec-0.2.11/src/architec/orchestrator/orchestrator_report.py +105 -0
  138. architec-0.2.11/src/architec/orchestrator/orchestrator_test_plan.py +495 -0
  139. architec-0.2.11/src/architec/orchestrator/orchestrator_timing.py +11 -0
  140. architec-0.2.11/src/architec/plan_review/__init__.py +7 -0
  141. architec-0.2.11/src/architec/plan_review/public.py +160 -0
  142. architec-0.2.11/src/architec/project_status/__init__.py +3 -0
  143. architec-0.2.11/src/architec/project_status/public.py +117 -0
  144. architec-0.2.11/src/architec/reporting/__init__.py +1 -0
  145. architec-0.2.11/src/architec/reporting/architecture_report_compaction.py +172 -0
  146. architec-0.2.11/src/architec/reporting/architecture_report_md.py +160 -0
  147. architec-0.2.11/src/architec/reporting/architecture_report_sections.py +181 -0
  148. architec-0.2.11/src/architec/reporting/report_markdown.py +360 -0
  149. architec-0.2.11/src/architec/reporting/viz_generator.py +157 -0
  150. architec-0.2.11/src/architec/reporting/viz_generator_cards.py +59 -0
  151. architec-0.2.11/src/architec/reporting/viz_generator_sections.py +43 -0
  152. architec-0.2.11/src/architec/reporting/viz_generator_view.py +288 -0
  153. architec-0.2.11/src/architec/scoring/__init__.py +19 -0
  154. architec-0.2.11/src/architec/scoring/component_scoring.py +136 -0
  155. architec-0.2.11/src/architec/scoring/component_scoring_git.py +75 -0
  156. architec-0.2.11/src/architec/scoring/component_scoring_llm.py +35 -0
  157. architec-0.2.11/src/architec/scoring/component_scoring_payload.py +44 -0
  158. architec-0.2.11/src/architec/scoring/component_scoring_registry.py +93 -0
  159. architec-0.2.11/src/architec/scoring/component_scoring_runtime.py +182 -0
  160. architec-0.2.11/src/architec/scoring/component_scoring_scope.py +50 -0
  161. architec-0.2.11/src/architec/scoring/component_selection_policy.py +58 -0
  162. architec-0.2.11/src/architec/scoring/contract_engine.py +142 -0
  163. architec-0.2.11/src/architec/scoring/public.py +50 -0
  164. architec-0.2.11/src/architec/scoring/scoring_policy_common.py +68 -0
  165. architec-0.2.11/src/architec/scoring/scoring_policy_defaults.py +76 -0
  166. architec-0.2.11/src/architec/scoring/scoring_policy_full_eval.py +208 -0
  167. architec-0.2.11/src/architec/scoring/scoring_policy_incremental_eval.py +103 -0
  168. architec-0.2.11/src/architec/scoring/scoring_policy_incremental_helpers.py +79 -0
  169. architec-0.2.11/src/architec/scoring/scoring_policy_incremental_reasoning.py +73 -0
  170. architec-0.2.11/src/architec/scoring/scoring_policy_overall_eval.py +146 -0
  171. architec-0.2.11/src/architec/scoring_policy.py +3 -0
  172. architec-0.2.11/src/architec/self_manage.py +296 -0
  173. architec-0.2.11/src/architec/support/__init__.py +1 -0
  174. architec-0.2.11/src/architec/support/architecture_rules.py +376 -0
  175. architec-0.2.11/src/architec/support/io_utils.py +45 -0
  176. architec-0.2.11/src/architec/support/llm_guard.py +88 -0
  177. architec-0.2.11/src/architec/support/llm_preflight.py +128 -0
  178. architec-0.2.11/src/architec/support/path_policy.py +326 -0
  179. architec-0.2.11/src/architec/support/refresh_decider.py +241 -0
  180. architec-0.2.11/src/architec/support/refresh_decider_git.py +105 -0
  181. architec-0.2.11/src/architec/support/tls.py +42 -0
  182. architec-0.2.11/src/architec/version.py +44 -0
  183. architec-0.2.11/src/architec.egg-info/PKG-INFO +322 -0
  184. architec-0.2.11/src/architec.egg-info/SOURCES.txt +249 -0
  185. architec-0.2.11/src/architec.egg-info/dependency_links.txt +1 -0
  186. architec-0.2.11/src/architec.egg-info/entry_points.txt +2 -0
  187. architec-0.2.11/src/architec.egg-info/requires.txt +5 -0
  188. architec-0.2.11/src/architec.egg-info/top_level.txt +1 -0
  189. architec-0.2.11/tests/test_analysis_runner.py +273 -0
  190. architec-0.2.11/tests/test_analysis_runner_flow.py +130 -0
  191. architec-0.2.11/tests/test_analysis_runner_report.py +20 -0
  192. architec-0.2.11/tests/test_architecture_contracts.py +204 -0
  193. architec-0.2.11/tests/test_architecture_report_compaction.py +47 -0
  194. architec-0.2.11/tests/test_architecture_report_md.py +113 -0
  195. architec-0.2.11/tests/test_architecture_report_sections.py +58 -0
  196. architec-0.2.11/tests/test_architecture_rules.py +113 -0
  197. architec-0.2.11/tests/test_auth_client_commands.py +621 -0
  198. architec-0.2.11/tests/test_auth_store.py +33 -0
  199. architec-0.2.11/tests/test_backend_llm_architect_config.py +253 -0
  200. architec-0.2.11/tests/test_backend_llm_failover.py +44 -0
  201. architec-0.2.11/tests/test_backend_llm_json_paths.py +357 -0
  202. architec-0.2.11/tests/test_baseline_public.py +118 -0
  203. architec-0.2.11/tests/test_bundle_loader.py +236 -0
  204. architec-0.2.11/tests/test_cleanup_archive.py +53 -0
  205. architec-0.2.11/tests/test_cleanup_autofix.py +98 -0
  206. architec-0.2.11/tests/test_cleanup_inventory.py +116 -0
  207. architec-0.2.11/tests/test_cleanup_public.py +66 -0
  208. architec-0.2.11/tests/test_cleanup_scope.py +50 -0
  209. architec-0.2.11/tests/test_cleanup_semantic_judge.py +165 -0
  210. architec-0.2.11/tests/test_cli_main.py +1484 -0
  211. architec-0.2.11/tests/test_code_review.py +3838 -0
  212. architec-0.2.11/tests/test_collect_repo_metrics_helpers.py +166 -0
  213. architec-0.2.11/tests/test_component_descriptors.py +197 -0
  214. architec-0.2.11/tests/test_component_scoring_git.py +35 -0
  215. architec-0.2.11/tests/test_component_scoring_runtime.py +73 -0
  216. architec-0.2.11/tests/test_dual_scoring_contract.py +144 -0
  217. architec-0.2.11/tests/test_events.py +97 -0
  218. architec-0.2.11/tests/test_feature_advisor.py +211 -0
  219. architec-0.2.11/tests/test_feature_query.py +53 -0
  220. architec-0.2.11/tests/test_fix_advice.py +641 -0
  221. architec-0.2.11/tests/test_gate_public.py +169 -0
  222. architec-0.2.11/tests/test_hippo_adapter.py +71 -0
  223. architec-0.2.11/tests/test_hippo_bridge.py +119 -0
  224. architec-0.2.11/tests/test_hotspot_digest.py +138 -0
  225. architec-0.2.11/tests/test_llm_guard.py +31 -0
  226. architec-0.2.11/tests/test_llm_preflight.py +129 -0
  227. architec-0.2.11/tests/test_near_duplicate.py +942 -0
  228. architec-0.2.11/tests/test_orchestrator.py +596 -0
  229. architec-0.2.11/tests/test_orchestrator_batches.py +58 -0
  230. architec-0.2.11/tests/test_path_policy.py +26 -0
  231. architec-0.2.11/tests/test_plan_review.py +192 -0
  232. architec-0.2.11/tests/test_project_status.py +167 -0
  233. architec-0.2.11/tests/test_refresh_decider.py +129 -0
  234. architec-0.2.11/tests/test_repo_topology.py +188 -0
  235. architec-0.2.11/tests/test_report_markdown_cleanup.py +102 -0
  236. architec-0.2.11/tests/test_resource_paths.py +87 -0
  237. architec-0.2.11/tests/test_scoring_policy.py +256 -0
  238. architec-0.2.11/tests/test_self_manage.py +152 -0
  239. architec-0.2.11/tests/test_shadow_implementation.py +1527 -0
  240. architec-0.2.11/tests/test_tls_support.py +53 -0
  241. architec-0.2.11/tests/test_version.py +25 -0
  242. architec-0.2.11/tools/archi_entry.py +12 -0
  243. architec-0.2.11/tools/build_architect_prompt.py +223 -0
  244. architec-0.2.11/tools/collect_repo_metrics.py +282 -0
  245. architec-0.2.11/tools/collect_repo_metrics_python.py +187 -0
  246. architec-0.2.11/tools/collect_repo_metrics_rules.py +26 -0
  247. architec-0.2.11/tools/collect_repo_metrics_runtime.py +92 -0
  248. architec-0.2.11/tools/collect_repo_metrics_scan.py +141 -0
  249. architec-0.2.11/tools/prod_browser_auth_smoke.sh +390 -0
  250. architec-0.2.11/tools/refresh_architect_context.sh +16 -0
  251. architec-0.2.11/tools/run_archi_via_auth_tunnel.sh +141 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SeemSeam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include LICENSE
2
+ include README.md
3
+ include README.zh-CN.md
4
+ recursive-include config *.yaml *.json
5
+ recursive-include prompts *.md
6
+ recursive-include tools *.py *.sh
@@ -0,0 +1,322 @@
1
+ Metadata-Version: 2.4
2
+ Name: architec
3
+ Version: 0.2.11
4
+ Summary: Architecture analysis CLI powered by Hippos bundles and backend LLMs.
5
+ Author: SeemSeam
6
+ Maintainer: SeemSeam
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/SeemSeam/architec
9
+ Project-URL: Repository, https://github.com/SeemSeam/architec
10
+ Project-URL: Issues, https://github.com/SeemSeam/architec/issues
11
+ Keywords: architecture,architecture-review,cli,code-analysis,llm
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: certifi>=2024.0.0
24
+ Requires-Dist: PyYAML>=6.0
25
+ Requires-Dist: seemseam_llmgateway>=0.1.2
26
+ Requires-Dist: seemseam_hippos>=0.1.7
27
+ Requires-Dist: cryptography>=43
28
+ Dynamic: license-file
29
+
30
+ # Architec
31
+
32
+ **Incremental architecture review for AI-assisted codebases.**
33
+
34
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
35
+ [![CLI](https://img.shields.io/badge/CLI-archi-222222)](#quick-start)
36
+ [![Login](https://img.shields.io/badge/login-not_required-green)](#no-login-required)
37
+
38
+ [English](README.md) | [中文](README.zh-CN.md)
39
+
40
+ Architec is an advisory architecture analysis CLI. It helps answer one
41
+ practical question:
42
+
43
+ > Will this change make the codebase harder to maintain?
44
+
45
+ It reviews current changes by default, asks an LLM to interpret compact
46
+ selected-scope evidence, and reports architecture risks such as duplicated
47
+ logic, shadow implementations, unclear boundaries, stale structure, topology
48
+ pressure, and risky hotspots.
49
+
50
+ Architec does not make merge decisions and does not edit code. It gives
51
+ structured advice for humans and coding agents to review.
52
+
53
+ ## Why Architec
54
+
55
+ LLM-assisted development can move quickly, but architecture can drift quietly.
56
+ Architec is designed to catch the kinds of issues that accumulate over time:
57
+
58
+ - repeated implementations and "same idea twice" code;
59
+ - compatibility paths that blur into canonical implementations;
60
+ - changed files crossing intended module boundaries;
61
+ - stale cleanup/archive candidates;
62
+ - high-risk work landing in churn-heavy areas;
63
+ - full-project topology pressure that is easy to miss during local edits.
64
+
65
+ The default workflow is incremental-first:
66
+
67
+ ```bash
68
+ archi
69
+ ```
70
+
71
+ Use full review when you want the whole-project baseline:
72
+
73
+ ```bash
74
+ archi --full
75
+ ```
76
+
77
+ ## How It Fits Together
78
+
79
+ Architec is the review layer. It uses two companion components:
80
+
81
+ | Component | Command / package | Role |
82
+ | --- | --- | --- |
83
+ | **Architec** | `archi` / `architec` | Runs architecture review, calls the LLM through llmgateway, writes advisory results under `.architec/`. |
84
+ | **Hippos** | `hippos` / `seemseam-hippos` | Builds structural project snapshots under `.hippos/`: file manifests, code signatures, repository indexes, structure prompts, and metrics. |
85
+ | **llmgateway** | `llmgateway` | Owns provider credentials, base URLs, API style, model names, and strong/weak model routing. |
86
+
87
+ ```text
88
+ source tree + git changes
89
+ |
90
+ v
91
+ Hippos structural snapshot -> .hippos/
92
+ |
93
+ v
94
+ Architec evidence builder -> selected-scope or full-project context
95
+ |
96
+ v
97
+ llmgateway LLM call -> strong / weak model tiers
98
+ |
99
+ v
100
+ Architec review output -> .architec/
101
+ ```
102
+
103
+ Day-to-day `archi` runs still use the LLM, but they avoid refreshing the whole
104
+ Hippos snapshot unless requested. `archi --full` uses the Hippos snapshot more
105
+ heavily, and `archi --refresh-from-hippos --full` refreshes it before review.
106
+
107
+ ## How It Works
108
+
109
+ Architec combines deterministic code signals with LLM interpretation. The
110
+ deterministic layer keeps the review grounded in concrete evidence; the LLM
111
+ layer turns that evidence into readable architecture advice.
112
+
113
+ 1. **Select scope**
114
+ - `archi` reads the current git changes and focuses on changed files.
115
+ - `archi --full` reviews the whole project.
116
+
117
+ 2. **Read structural context**
118
+ - Hippos produces `.hippos/` snapshots: file manifests, code signatures,
119
+ repository indexes, metrics, and structure prompts.
120
+ - Architec checks whether that snapshot is present, stale, or unknown.
121
+
122
+ 3. **Build architecture evidence**
123
+ - Architec runs static scanners for duplicated logic, shadow
124
+ implementations, import-boundary pressure, cleanup/archive candidates,
125
+ hotspots, topology pressure, and snapshot freshness.
126
+ - Incremental review keeps selected-change concerns separate from broader
127
+ project context so small diffs are not drowned by global noise.
128
+
129
+ 4. **Ask the LLM for interpretation**
130
+ - Architec sends compact evidence to llmgateway.
131
+ - llmgateway chooses the configured strong or weak model tier and owns all
132
+ provider credentials.
133
+
134
+ 5. **Write advisory output**
135
+ - Architec ranks concerns, keeps raw artifacts for inspection, and writes
136
+ human-readable plus machine-readable output under `.architec/`.
137
+ - The result is advice, not an automatic merge decision or proof of runtime
138
+ correctness.
139
+
140
+ ## Install
141
+
142
+ Architec requires Python 3.11+.
143
+
144
+ Recommended install from PyPI:
145
+
146
+ ```bash
147
+ python3 -m pip install --user architec
148
+ ```
149
+
150
+ This installs:
151
+
152
+ - `archi`, the Architec CLI;
153
+ - `seemseam-llmgateway`, the package that provides the LLM provider gateway;
154
+ - `seemseam-hippos`, the package that provides Hippos structural snapshots.
155
+
156
+ The runtime imports remain `llmgateway` and `hippos`; no separate package index
157
+ setup is required.
158
+
159
+ Local development from this repository:
160
+
161
+ ```bash
162
+ python3 -m pip install -e .
163
+ ```
164
+
165
+ ## Configure LLM Access
166
+
167
+ Architec gets all LLM access through **llmgateway**. Configure provider
168
+ credentials and model tiers in:
169
+
170
+ ```text
171
+ ~/.llmgateway/config.yaml
172
+ ```
173
+
174
+ Minimal example:
175
+
176
+ ```yaml
177
+ version: 1
178
+ provider:
179
+ provider_type: openai
180
+ api_style: openai_responses
181
+ base_url: https://your-llm-endpoint/v1
182
+ api_key: sk-...
183
+ settings:
184
+ strong_model: your-strong-model
185
+ weak_model: your-fast-model
186
+ ```
187
+
188
+ Architec consumes the configured `strong_model` and `weak_model` tiers. It does
189
+ not store model-provider credentials itself.
190
+
191
+ Check the installation and LLM route:
192
+
193
+ ```bash
194
+ archi --check .
195
+ ```
196
+
197
+ If the check reports missing LLM configuration, update
198
+ `~/.llmgateway/config.yaml`.
199
+
200
+ ## Quick Start
201
+
202
+ Review the current selected changes:
203
+
204
+ ```bash
205
+ archi
206
+ ```
207
+
208
+ Run whole-project architecture review:
209
+
210
+ ```bash
211
+ archi --full
212
+ ```
213
+
214
+ Save JSON output:
215
+
216
+ ```bash
217
+ archi --out review.json
218
+ archi --full --out full-review.json
219
+ ```
220
+
221
+ Refresh Hippos inputs before full review:
222
+
223
+ ```bash
224
+ archi --refresh-from-hippos --full
225
+ ```
226
+
227
+ ## Command Summary
228
+
229
+ | Command | Purpose |
230
+ | --- | --- |
231
+ | `archi` | Incremental LLM architecture review for current selected changes. |
232
+ | `archi --full` | Full-project LLM architecture review. |
233
+ | `archi --out review.json` | Save incremental review JSON. |
234
+ | `archi --full --out full-review.json` | Save full-review JSON. |
235
+ | `archi --refresh-from-hippos --full` | Refresh Hippos structural inputs, then run full review. |
236
+ | `archi --check .` | Validate Hippos bundle state and llmgateway configuration. |
237
+
238
+ Advanced compatibility flags and older subcommands may still be accepted for
239
+ existing automation, but new usage should prefer the commands above.
240
+
241
+ ## What Architec Reports
242
+
243
+ Architec reports advisory concerns and signals, including:
244
+
245
+ - **Duplication**: repeated logic and suspicious near-duplicates.
246
+ - **Shadow implementations**: second implementations of similar behavior.
247
+ - **Architecture contracts**: import-boundary or dependency-direction pressure.
248
+ - **Cleanup/archive candidates**: stale or legacy-looking code and docs.
249
+ - **Hotspots**: churn-heavy or structurally risky areas.
250
+ - **Topology pressure**: flat or confusing project structure.
251
+ - **Snapshot freshness**: missing, stale, or unknown Hippos context.
252
+ - **Risk context**: optional external facts attached to existing concerns.
253
+
254
+ The output is advisory. It is not a pass/fail result and is not proof of
255
+ runtime correctness.
256
+
257
+ ## Outputs
258
+
259
+ Architec writes generated files under `.architec/`:
260
+
261
+ ```text
262
+ .architec/
263
+ architec-analysis.json
264
+ architec-summary.md
265
+ architec-viz.html
266
+ code-review-concerns.json
267
+ code-review-discovery.json
268
+ review-events.jsonl
269
+ cache/
270
+ ```
271
+
272
+ Hippos writes structural inputs under `.hippos/`.
273
+
274
+ Start with `.architec/architec-summary.md` for the human-readable report, then
275
+ open `.architec/architec-analysis.json` for exact scores, concerns, signals,
276
+ and artifact paths.
277
+
278
+ ## Agent Command Compatibility
279
+
280
+ The commands above describe the current public workflow. Some older installed
281
+ `archi` binaries may still show the previous command shape, where full review
282
+ is `archi .` and incremental review is `archi --diff .`.
283
+
284
+ Agents and automation should inspect the local binary before choosing commands:
285
+
286
+ ```bash
287
+ archi --help
288
+ ```
289
+
290
+ | Help output | Incremental review | Full review |
291
+ | --- | --- | --- |
292
+ | Includes `--full` | `archi` | `archi --full` |
293
+ | Lacks `--full` but includes `--diff` | `archi --diff .` | `archi .` |
294
+
295
+ ## No Login Required
296
+
297
+ Architecture analysis does not require `archi login`.
298
+
299
+ Account commands such as `archi login`, `archi whoami --json`, and
300
+ `archi devices --json` may exist for diagnostics, but they are not part of
301
+ normal Architec analysis.
302
+
303
+ ## Development
304
+
305
+ Run tests:
306
+
307
+ ```bash
308
+ PYTHONPATH=src python3 -m pytest -q
309
+ ```
310
+
311
+ Run Architec from this checkout:
312
+
313
+ ```bash
314
+ PYTHONPATH=src python3 -m architec
315
+ PYTHONPATH=src python3 -m architec --full
316
+ ```
317
+
318
+ ## More Documentation
319
+
320
+ - [Usage manual](docs/usage-manual.md)
321
+ - [Architecture stability notes](docs/advisory-review/topics/architecture-stability.md)
322
+ - [Evidence model](docs/advisory-review/topics/evidence-model.md)
@@ -0,0 +1,293 @@
1
+ # Architec
2
+
3
+ **Incremental architecture review for AI-assisted codebases.**
4
+
5
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
6
+ [![CLI](https://img.shields.io/badge/CLI-archi-222222)](#quick-start)
7
+ [![Login](https://img.shields.io/badge/login-not_required-green)](#no-login-required)
8
+
9
+ [English](README.md) | [中文](README.zh-CN.md)
10
+
11
+ Architec is an advisory architecture analysis CLI. It helps answer one
12
+ practical question:
13
+
14
+ > Will this change make the codebase harder to maintain?
15
+
16
+ It reviews current changes by default, asks an LLM to interpret compact
17
+ selected-scope evidence, and reports architecture risks such as duplicated
18
+ logic, shadow implementations, unclear boundaries, stale structure, topology
19
+ pressure, and risky hotspots.
20
+
21
+ Architec does not make merge decisions and does not edit code. It gives
22
+ structured advice for humans and coding agents to review.
23
+
24
+ ## Why Architec
25
+
26
+ LLM-assisted development can move quickly, but architecture can drift quietly.
27
+ Architec is designed to catch the kinds of issues that accumulate over time:
28
+
29
+ - repeated implementations and "same idea twice" code;
30
+ - compatibility paths that blur into canonical implementations;
31
+ - changed files crossing intended module boundaries;
32
+ - stale cleanup/archive candidates;
33
+ - high-risk work landing in churn-heavy areas;
34
+ - full-project topology pressure that is easy to miss during local edits.
35
+
36
+ The default workflow is incremental-first:
37
+
38
+ ```bash
39
+ archi
40
+ ```
41
+
42
+ Use full review when you want the whole-project baseline:
43
+
44
+ ```bash
45
+ archi --full
46
+ ```
47
+
48
+ ## How It Fits Together
49
+
50
+ Architec is the review layer. It uses two companion components:
51
+
52
+ | Component | Command / package | Role |
53
+ | --- | --- | --- |
54
+ | **Architec** | `archi` / `architec` | Runs architecture review, calls the LLM through llmgateway, writes advisory results under `.architec/`. |
55
+ | **Hippos** | `hippos` / `seemseam-hippos` | Builds structural project snapshots under `.hippos/`: file manifests, code signatures, repository indexes, structure prompts, and metrics. |
56
+ | **llmgateway** | `llmgateway` | Owns provider credentials, base URLs, API style, model names, and strong/weak model routing. |
57
+
58
+ ```text
59
+ source tree + git changes
60
+ |
61
+ v
62
+ Hippos structural snapshot -> .hippos/
63
+ |
64
+ v
65
+ Architec evidence builder -> selected-scope or full-project context
66
+ |
67
+ v
68
+ llmgateway LLM call -> strong / weak model tiers
69
+ |
70
+ v
71
+ Architec review output -> .architec/
72
+ ```
73
+
74
+ Day-to-day `archi` runs still use the LLM, but they avoid refreshing the whole
75
+ Hippos snapshot unless requested. `archi --full` uses the Hippos snapshot more
76
+ heavily, and `archi --refresh-from-hippos --full` refreshes it before review.
77
+
78
+ ## How It Works
79
+
80
+ Architec combines deterministic code signals with LLM interpretation. The
81
+ deterministic layer keeps the review grounded in concrete evidence; the LLM
82
+ layer turns that evidence into readable architecture advice.
83
+
84
+ 1. **Select scope**
85
+ - `archi` reads the current git changes and focuses on changed files.
86
+ - `archi --full` reviews the whole project.
87
+
88
+ 2. **Read structural context**
89
+ - Hippos produces `.hippos/` snapshots: file manifests, code signatures,
90
+ repository indexes, metrics, and structure prompts.
91
+ - Architec checks whether that snapshot is present, stale, or unknown.
92
+
93
+ 3. **Build architecture evidence**
94
+ - Architec runs static scanners for duplicated logic, shadow
95
+ implementations, import-boundary pressure, cleanup/archive candidates,
96
+ hotspots, topology pressure, and snapshot freshness.
97
+ - Incremental review keeps selected-change concerns separate from broader
98
+ project context so small diffs are not drowned by global noise.
99
+
100
+ 4. **Ask the LLM for interpretation**
101
+ - Architec sends compact evidence to llmgateway.
102
+ - llmgateway chooses the configured strong or weak model tier and owns all
103
+ provider credentials.
104
+
105
+ 5. **Write advisory output**
106
+ - Architec ranks concerns, keeps raw artifacts for inspection, and writes
107
+ human-readable plus machine-readable output under `.architec/`.
108
+ - The result is advice, not an automatic merge decision or proof of runtime
109
+ correctness.
110
+
111
+ ## Install
112
+
113
+ Architec requires Python 3.11+.
114
+
115
+ Recommended install from PyPI:
116
+
117
+ ```bash
118
+ python3 -m pip install --user architec
119
+ ```
120
+
121
+ This installs:
122
+
123
+ - `archi`, the Architec CLI;
124
+ - `seemseam-llmgateway`, the package that provides the LLM provider gateway;
125
+ - `seemseam-hippos`, the package that provides Hippos structural snapshots.
126
+
127
+ The runtime imports remain `llmgateway` and `hippos`; no separate package index
128
+ setup is required.
129
+
130
+ Local development from this repository:
131
+
132
+ ```bash
133
+ python3 -m pip install -e .
134
+ ```
135
+
136
+ ## Configure LLM Access
137
+
138
+ Architec gets all LLM access through **llmgateway**. Configure provider
139
+ credentials and model tiers in:
140
+
141
+ ```text
142
+ ~/.llmgateway/config.yaml
143
+ ```
144
+
145
+ Minimal example:
146
+
147
+ ```yaml
148
+ version: 1
149
+ provider:
150
+ provider_type: openai
151
+ api_style: openai_responses
152
+ base_url: https://your-llm-endpoint/v1
153
+ api_key: sk-...
154
+ settings:
155
+ strong_model: your-strong-model
156
+ weak_model: your-fast-model
157
+ ```
158
+
159
+ Architec consumes the configured `strong_model` and `weak_model` tiers. It does
160
+ not store model-provider credentials itself.
161
+
162
+ Check the installation and LLM route:
163
+
164
+ ```bash
165
+ archi --check .
166
+ ```
167
+
168
+ If the check reports missing LLM configuration, update
169
+ `~/.llmgateway/config.yaml`.
170
+
171
+ ## Quick Start
172
+
173
+ Review the current selected changes:
174
+
175
+ ```bash
176
+ archi
177
+ ```
178
+
179
+ Run whole-project architecture review:
180
+
181
+ ```bash
182
+ archi --full
183
+ ```
184
+
185
+ Save JSON output:
186
+
187
+ ```bash
188
+ archi --out review.json
189
+ archi --full --out full-review.json
190
+ ```
191
+
192
+ Refresh Hippos inputs before full review:
193
+
194
+ ```bash
195
+ archi --refresh-from-hippos --full
196
+ ```
197
+
198
+ ## Command Summary
199
+
200
+ | Command | Purpose |
201
+ | --- | --- |
202
+ | `archi` | Incremental LLM architecture review for current selected changes. |
203
+ | `archi --full` | Full-project LLM architecture review. |
204
+ | `archi --out review.json` | Save incremental review JSON. |
205
+ | `archi --full --out full-review.json` | Save full-review JSON. |
206
+ | `archi --refresh-from-hippos --full` | Refresh Hippos structural inputs, then run full review. |
207
+ | `archi --check .` | Validate Hippos bundle state and llmgateway configuration. |
208
+
209
+ Advanced compatibility flags and older subcommands may still be accepted for
210
+ existing automation, but new usage should prefer the commands above.
211
+
212
+ ## What Architec Reports
213
+
214
+ Architec reports advisory concerns and signals, including:
215
+
216
+ - **Duplication**: repeated logic and suspicious near-duplicates.
217
+ - **Shadow implementations**: second implementations of similar behavior.
218
+ - **Architecture contracts**: import-boundary or dependency-direction pressure.
219
+ - **Cleanup/archive candidates**: stale or legacy-looking code and docs.
220
+ - **Hotspots**: churn-heavy or structurally risky areas.
221
+ - **Topology pressure**: flat or confusing project structure.
222
+ - **Snapshot freshness**: missing, stale, or unknown Hippos context.
223
+ - **Risk context**: optional external facts attached to existing concerns.
224
+
225
+ The output is advisory. It is not a pass/fail result and is not proof of
226
+ runtime correctness.
227
+
228
+ ## Outputs
229
+
230
+ Architec writes generated files under `.architec/`:
231
+
232
+ ```text
233
+ .architec/
234
+ architec-analysis.json
235
+ architec-summary.md
236
+ architec-viz.html
237
+ code-review-concerns.json
238
+ code-review-discovery.json
239
+ review-events.jsonl
240
+ cache/
241
+ ```
242
+
243
+ Hippos writes structural inputs under `.hippos/`.
244
+
245
+ Start with `.architec/architec-summary.md` for the human-readable report, then
246
+ open `.architec/architec-analysis.json` for exact scores, concerns, signals,
247
+ and artifact paths.
248
+
249
+ ## Agent Command Compatibility
250
+
251
+ The commands above describe the current public workflow. Some older installed
252
+ `archi` binaries may still show the previous command shape, where full review
253
+ is `archi .` and incremental review is `archi --diff .`.
254
+
255
+ Agents and automation should inspect the local binary before choosing commands:
256
+
257
+ ```bash
258
+ archi --help
259
+ ```
260
+
261
+ | Help output | Incremental review | Full review |
262
+ | --- | --- | --- |
263
+ | Includes `--full` | `archi` | `archi --full` |
264
+ | Lacks `--full` but includes `--diff` | `archi --diff .` | `archi .` |
265
+
266
+ ## No Login Required
267
+
268
+ Architecture analysis does not require `archi login`.
269
+
270
+ Account commands such as `archi login`, `archi whoami --json`, and
271
+ `archi devices --json` may exist for diagnostics, but they are not part of
272
+ normal Architec analysis.
273
+
274
+ ## Development
275
+
276
+ Run tests:
277
+
278
+ ```bash
279
+ PYTHONPATH=src python3 -m pytest -q
280
+ ```
281
+
282
+ Run Architec from this checkout:
283
+
284
+ ```bash
285
+ PYTHONPATH=src python3 -m architec
286
+ PYTHONPATH=src python3 -m architec --full
287
+ ```
288
+
289
+ ## More Documentation
290
+
291
+ - [Usage manual](docs/usage-manual.md)
292
+ - [Architecture stability notes](docs/advisory-review/topics/architecture-stability.md)
293
+ - [Evidence model](docs/advisory-review/topics/evidence-model.md)