asicode 0.2.6__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.
- asicode-0.2.6/LICENSE +21 -0
- asicode-0.2.6/PKG-INFO +208 -0
- asicode-0.2.6/README.md +134 -0
- asicode-0.2.6/asi.py +9644 -0
- asicode-0.2.6/asicode.egg-info/PKG-INFO +208 -0
- asicode-0.2.6/asicode.egg-info/SOURCES.txt +356 -0
- asicode-0.2.6/asicode.egg-info/dependency_links.txt +1 -0
- asicode-0.2.6/asicode.egg-info/entry_points.txt +2 -0
- asicode-0.2.6/asicode.egg-info/requires.txt +58 -0
- asicode-0.2.6/asicode.egg-info/top_level.txt +11 -0
- asicode-0.2.6/common.py +86 -0
- asicode-0.2.6/config.py +162 -0
- asicode-0.2.6/context_collector.py +388 -0
- asicode-0.2.6/diff_apply.py +1549 -0
- asicode-0.2.6/external_llm/__init__.py +53 -0
- asicode-0.2.6/external_llm/agent/__init__.py +1 -0
- asicode-0.2.6/external_llm/agent/_shared_utils.py +1713 -0
- asicode-0.2.6/external_llm/agent/_thread_pool.py +13 -0
- asicode-0.2.6/external_llm/agent/_user_intent.py +233 -0
- asicode-0.2.6/external_llm/agent/agent_context_manager.py +532 -0
- asicode-0.2.6/external_llm/agent/agent_escalation_pipeline.py +161 -0
- asicode-0.2.6/external_llm/agent/agent_fast_path.py +63 -0
- asicode-0.2.6/external_llm/agent/agent_loop.py +3567 -0
- asicode-0.2.6/external_llm/agent/agent_loop_types.py +207 -0
- asicode-0.2.6/external_llm/agent/agent_phase_manager.py +352 -0
- asicode-0.2.6/external_llm/agent/agent_planner_pipeline.py +1756 -0
- asicode-0.2.6/external_llm/agent/agent_profile.py +200 -0
- asicode-0.2.6/external_llm/agent/agent_turn_pipeline.py +2592 -0
- asicode-0.2.6/external_llm/agent/alignment_scorer.py +333 -0
- asicode-0.2.6/external_llm/agent/anchor_shared.py +310 -0
- asicode-0.2.6/external_llm/agent/argument_repairer.py +119 -0
- asicode-0.2.6/external_llm/agent/ast_cache.py +148 -0
- asicode-0.2.6/external_llm/agent/ast_engine.py +1060 -0
- asicode-0.2.6/external_llm/agent/async_tool_executor.py +182 -0
- asicode-0.2.6/external_llm/agent/auto_correction.py +2268 -0
- asicode-0.2.6/external_llm/agent/background_job_manager.py +571 -0
- asicode-0.2.6/external_llm/agent/call_graph.py +516 -0
- asicode-0.2.6/external_llm/agent/checkpoint_store.py +472 -0
- asicode-0.2.6/external_llm/agent/config/__init__.py +0 -0
- asicode-0.2.6/external_llm/agent/config/thresholds.py +409 -0
- asicode-0.2.6/external_llm/agent/context_budget.py +593 -0
- asicode-0.2.6/external_llm/agent/context_contract.py +231 -0
- asicode-0.2.6/external_llm/agent/context_manager.py +1301 -0
- asicode-0.2.6/external_llm/agent/context_utils.py +29 -0
- asicode-0.2.6/external_llm/agent/design_chat_loop.py +2510 -0
- asicode-0.2.6/external_llm/agent/enums.py +48 -0
- asicode-0.2.6/external_llm/agent/execution_mode_classifier.py +323 -0
- asicode-0.2.6/external_llm/agent/execution_spec.py +355 -0
- asicode-0.2.6/external_llm/agent/execution_thresholds.py +281 -0
- asicode-0.2.6/external_llm/agent/failure_classifier.py +160 -0
- asicode-0.2.6/external_llm/agent/failure_context.py +409 -0
- asicode-0.2.6/external_llm/agent/failure_pattern_store.py +911 -0
- asicode-0.2.6/external_llm/agent/file_cache.py +144 -0
- asicode-0.2.6/external_llm/agent/fix_spec_claim_validator.py +747 -0
- asicode-0.2.6/external_llm/agent/gsg_safety.py +114 -0
- asicode-0.2.6/external_llm/agent/guard_ir.py +985 -0
- asicode-0.2.6/external_llm/agent/handoff_observer.py +327 -0
- asicode-0.2.6/external_llm/agent/insights_manager.py +1124 -0
- asicode-0.2.6/external_llm/agent/intent_models.py +250 -0
- asicode-0.2.6/external_llm/agent/intent_resolver.py +861 -0
- asicode-0.2.6/external_llm/agent/interrupt_tool_results.py +95 -0
- asicode-0.2.6/external_llm/agent/json_repair.py +283 -0
- asicode-0.2.6/external_llm/agent/language_backend.py +612 -0
- asicode-0.2.6/external_llm/agent/language_hint.py +51 -0
- asicode-0.2.6/external_llm/agent/learned_policy.py +826 -0
- asicode-0.2.6/external_llm/agent/light_repo_index.py +231 -0
- asicode-0.2.6/external_llm/agent/lint_runner.py +397 -0
- asicode-0.2.6/external_llm/agent/llm_output_utils.py +52 -0
- asicode-0.2.6/external_llm/agent/local_assistant.py +804 -0
- asicode-0.2.6/external_llm/agent/message_shapes.py +89 -0
- asicode-0.2.6/external_llm/agent/metadata_utils.py +14 -0
- asicode-0.2.6/external_llm/agent/operation_models.py +2707 -0
- asicode-0.2.6/external_llm/agent/orchestrator.py +5109 -0
- asicode-0.2.6/external_llm/agent/output_normalizer.py +415 -0
- asicode-0.2.6/external_llm/agent/performance_metrics.py +452 -0
- asicode-0.2.6/external_llm/agent/placement_contract.py +2765 -0
- asicode-0.2.6/external_llm/agent/plan_state.py +136 -0
- asicode-0.2.6/external_llm/agent/planner_lane_facade.py +67 -0
- asicode-0.2.6/external_llm/agent/rag_configs.py +168 -0
- asicode-0.2.6/external_llm/agent/rag_searcher.py +693 -0
- asicode-0.2.6/external_llm/agent/reasoning_utils.py +62 -0
- asicode-0.2.6/external_llm/agent/repair_helpers.py +475 -0
- asicode-0.2.6/external_llm/agent/request_intent_classifier.py +95 -0
- asicode-0.2.6/external_llm/agent/routing_policy.py +157 -0
- asicode-0.2.6/external_llm/agent/run_store.py +2356 -0
- asicode-0.2.6/external_llm/agent/scanner_registry.py +610 -0
- asicode-0.2.6/external_llm/agent/selector_constants.py +26 -0
- asicode-0.2.6/external_llm/agent/semantic_intent.py +163 -0
- asicode-0.2.6/external_llm/agent/semantic_lint.py +94 -0
- asicode-0.2.6/external_llm/agent/session_state.py +80 -0
- asicode-0.2.6/external_llm/agent/slash_commands.py +90 -0
- asicode-0.2.6/external_llm/agent/subagent_ipc.py +1222 -0
- asicode-0.2.6/external_llm/agent/symbol_engine.py +592 -0
- asicode-0.2.6/external_llm/agent/symbol_index.py +380 -0
- asicode-0.2.6/external_llm/agent/symbol_locator.py +117 -0
- asicode-0.2.6/external_llm/agent/symbol_modify_tool.py +1258 -0
- asicode-0.2.6/external_llm/agent/symbol_search.py +1881 -0
- asicode-0.2.6/external_llm/agent/task_router.py +751 -0
- asicode-0.2.6/external_llm/agent/terminal_coordination.py +43 -0
- asicode-0.2.6/external_llm/agent/termination_policy.py +284 -0
- asicode-0.2.6/external_llm/agent/test_impact_selector.py +411 -0
- asicode-0.2.6/external_llm/agent/test_runner.py +450 -0
- asicode-0.2.6/external_llm/agent/tool_chain.py +36 -0
- asicode-0.2.6/external_llm/agent/tool_dependency_graph.py +169 -0
- asicode-0.2.6/external_llm/agent/tool_failure_log.py +497 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/__init__.py +25 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/agent_tools.py +289 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/analysis_tools.py +1343 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/ast_op_executor.py +1233 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/browser_tools.py +325 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/constants.py +10 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/git_tools.py +1031 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/read_tools.py +530 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/shell_policy.py +17 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/test_tools.py +228 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/web_search_tools.py +769 -0
- asicode-0.2.6/external_llm/agent/tool_handlers/write_tools.py +6213 -0
- asicode-0.2.6/external_llm/agent/tool_registry.py +2268 -0
- asicode-0.2.6/external_llm/agent/tool_result_cache.py +178 -0
- asicode-0.2.6/external_llm/agent/tool_safety.py +956 -0
- asicode-0.2.6/external_llm/agent/tool_schemas.py +1176 -0
- asicode-0.2.6/external_llm/agent/vector_cache.py +614 -0
- asicode-0.2.6/external_llm/agent/weight_learning.py +2929 -0
- asicode-0.2.6/external_llm/agent/work_state_digest.py +157 -0
- asicode-0.2.6/external_llm/analysis/__init__.py +0 -0
- asicode-0.2.6/external_llm/analysis/_dead_block_shared.py +848 -0
- asicode-0.2.6/external_llm/analysis/ast_similarity_scanner.py +1128 -0
- asicode-0.2.6/external_llm/analysis/broken_contract_scanner.py +591 -0
- asicode-0.2.6/external_llm/analysis/container_reachability_scanner.py +792 -0
- asicode-0.2.6/external_llm/analysis/contradictory_logic_scanner.py +693 -0
- asicode-0.2.6/external_llm/analysis/cross_file_refs.py +430 -0
- asicode-0.2.6/external_llm/analysis/dead_block_scanner.py +97 -0
- asicode-0.2.6/external_llm/analysis/duplicate_definition_scanner.py +353 -0
- asicode-0.2.6/external_llm/analysis/parse_cache.py +110 -0
- asicode-0.2.6/external_llm/analysis/public_dead_code_scanner.py +106 -0
- asicode-0.2.6/external_llm/analysis/unused_import_scanner.py +385 -0
- asicode-0.2.6/external_llm/analysis/vulture_scanner.py +445 -0
- asicode-0.2.6/external_llm/anthropic_client.py +1235 -0
- asicode-0.2.6/external_llm/ast_rewrite.py +322 -0
- asicode-0.2.6/external_llm/client.py +485 -0
- asicode-0.2.6/external_llm/code_analyzer.py +302 -0
- asicode-0.2.6/external_llm/code_structure_utils.py +1554 -0
- asicode-0.2.6/external_llm/common/__init__.py +0 -0
- asicode-0.2.6/external_llm/common/atomic_io.py +240 -0
- asicode-0.2.6/external_llm/common/file_lock.py +134 -0
- asicode-0.2.6/external_llm/common/indent_utils.py +839 -0
- asicode-0.2.6/external_llm/context/context_packs.py +60 -0
- asicode-0.2.6/external_llm/context_builder.py +411 -0
- asicode-0.2.6/external_llm/dependency_graph.py +303 -0
- asicode-0.2.6/external_llm/design_session.py +629 -0
- asicode-0.2.6/external_llm/edit_localization/__init__.py +26 -0
- asicode-0.2.6/external_llm/edit_localization/dataflow_extractor.py +472 -0
- asicode-0.2.6/external_llm/edit_localization/graph_propagator.py +241 -0
- asicode-0.2.6/external_llm/edit_localization/relevance_scorer.py +310 -0
- asicode-0.2.6/external_llm/edit_localization/request_analyzer.py +89 -0
- asicode-0.2.6/external_llm/editor/_editor_core/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/common/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/common/import_normalizer.py +376 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/ast_rewriter.py +118 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/models.py +27 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/rollback_manager.py +41 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/verifier.py +212 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/execution_vm/vm.py +193 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/learning/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/learning/exploration_policy.py +43 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/primitives/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/primitives/executor.py +66 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/primitives/models.py +21 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/repair/__init__.py +0 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/repair/failure_classifier.py +88 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/repair/repair_planner.py +94 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/repair/repair_registry.py +42 -0
- asicode-0.2.6/external_llm/editor/_editor_core/ts_vm/repair/repair_strategies.py +113 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/__init__.py +36 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/ast_rewriter.py +99 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/classification.py +70 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/__init__.py +3 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/contract_diff.py +225 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/contract_extractor.py +271 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/contract_models.py +93 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/project_graph.py +201 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/contracts/propagation_planner.py +237 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/failure_classifier.py +390 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/models.py +28 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/repair_planner.py +91 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/repair_registry.py +34 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/repair_strategies.py +1049 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/rollback_manager.py +40 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/verifier.py +381 -0
- asicode-0.2.6/external_llm/editor/_editor_core/vm/vm.py +326 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/__init__.py +45 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/proactive_runner.py +386 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/push_manager.py +299 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/task_queue.py +225 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/trigger_engine.py +175 -0
- asicode-0.2.6/external_llm/editor/agent/autonomous/trigger_policy.py +294 -0
- asicode-0.2.6/external_llm/editor/agent/mcp/__init__.py +13 -0
- asicode-0.2.6/external_llm/editor/agent/mcp/server.py +175 -0
- asicode-0.2.6/external_llm/editor/agent/prompts/__init__.py +2 -0
- asicode-0.2.6/external_llm/editor/agent/prompts/edit_prompts.py +299 -0
- asicode-0.2.6/external_llm/editor/cross_language/__init__.py +4 -0
- asicode-0.2.6/external_llm/editor/cross_language/models.py +79 -0
- asicode-0.2.6/external_llm/editor/cross_language/strategy_abstraction.py +204 -0
- asicode-0.2.6/external_llm/editor/cross_language/transfer_engine.py +170 -0
- asicode-0.2.6/external_llm/editor/learning/__init__.py +1 -0
- asicode-0.2.6/external_llm/editor/learning/experience_store.py +343 -0
- asicode-0.2.6/external_llm/editor/learning/exploration_state.py +124 -0
- asicode-0.2.6/external_llm/editor/learning/learning_sink.py +131 -0
- asicode-0.2.6/external_llm/editor/learning/pattern_extractor.py +158 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_learning_models.py +125 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_learning_scorer.py +145 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_learning_store.py +142 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_learning_updater.py +128 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_sequence_models.py +58 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_sequence_scorer.py +117 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_sequence_store.py +115 -0
- asicode-0.2.6/external_llm/editor/learning/primitive_sequence_updater.py +74 -0
- asicode-0.2.6/external_llm/editor/learning/problem_signature.py +161 -0
- asicode-0.2.6/external_llm/editor/learning/strategy_execution_bias.py +345 -0
- asicode-0.2.6/external_llm/editor/learning/strategy_prioritizer.py +245 -0
- asicode-0.2.6/external_llm/editor/learning/strategy_state.py +128 -0
- asicode-0.2.6/external_llm/editor/learning/unified_run_record.py +118 -0
- asicode-0.2.6/external_llm/editor/learning/unified_store.py +566 -0
- asicode-0.2.6/external_llm/editor/primitives/__init__.py +2 -0
- asicode-0.2.6/external_llm/editor/primitives/code_context.py +660 -0
- asicode-0.2.6/external_llm/editor/primitives/delete_node.py +41 -0
- asicode-0.2.6/external_llm/editor/primitives/executor.py +106 -0
- asicode-0.2.6/external_llm/editor/primitives/insert_import.py +90 -0
- asicode-0.2.6/external_llm/editor/primitives/insert_statement.py +77 -0
- asicode-0.2.6/external_llm/editor/primitives/models.py +87 -0
- asicode-0.2.6/external_llm/editor/primitives/registry.py +49 -0
- asicode-0.2.6/external_llm/editor/primitives/rename_symbol.py +91 -0
- asicode-0.2.6/external_llm/editor/primitives/replace_function.py +260 -0
- asicode-0.2.6/external_llm/editor/primitives/update_call.py +76 -0
- asicode-0.2.6/external_llm/editor/semantic/__init__.py +1 -0
- asicode-0.2.6/external_llm/editor/semantic/ast_transform_utils.py +450 -0
- asicode-0.2.6/external_llm/editor/semantic/contract_replan_strategy.py +98 -0
- asicode-0.2.6/external_llm/editor/semantic/draft_parser.py +206 -0
- asicode-0.2.6/external_llm/editor/semantic/flow_synthesizer.py +165 -0
- asicode-0.2.6/external_llm/editor/semantic/fragment_generator.py +21 -0
- asicode-0.2.6/external_llm/editor/semantic/fragment_integrator.py +163 -0
- asicode-0.2.6/external_llm/editor/semantic/generation_planner.py +19 -0
- asicode-0.2.6/external_llm/editor/semantic/libcst_transform_utils.py +254 -0
- asicode-0.2.6/external_llm/editor/semantic/output_comparator.py +90 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_code_templates.py +307 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_detector.py +402 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_ir_builder.py +109 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_models.py +108 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_reconstructor.py +264 -0
- asicode-0.2.6/external_llm/editor/semantic/primitive_registry.py +328 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_contract_evaluator.py +321 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_contract_models.py +124 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_contract_registry.py +134 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_contracts.py +72 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_corrector.py +75 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_gap_analyzer.py +194 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_rewrite_models.py +62 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_rewrite_planner.py +252 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_rewriter.py +304 -0
- asicode-0.2.6/external_llm/editor/semantic/semantic_tracer.py +427 -0
- asicode-0.2.6/external_llm/editor/semantic/synthesis_planner.py +99 -0
- asicode-0.2.6/external_llm/editor/semantic/ts_ir_models.py +414 -0
- asicode-0.2.6/external_llm/editor/semantic/ts_semantic_models.py +112 -0
- asicode-0.2.6/external_llm/editor/semantic/ts_semantic_tracer.py +1302 -0
- asicode-0.2.6/external_llm/editor/simulator/dependency_traversal.py +172 -0
- asicode-0.2.6/external_llm/editor/simulator/impact_models.py +42 -0
- asicode-0.2.6/external_llm/editor/simulator/impact_simulator.py +187 -0
- asicode-0.2.6/external_llm/editor/simulator/risk_estimator.py +71 -0
- asicode-0.2.6/external_llm/editor/verification/__init__.py +7 -0
- asicode-0.2.6/external_llm/editor/verification/code_integrity.py +406 -0
- asicode-0.2.6/external_llm/editor/verification/impact_propagation.py +401 -0
- asicode-0.2.6/external_llm/editor/verification/impact_verification_mapper.py +148 -0
- asicode-0.2.6/external_llm/editor/verification/verification_set_builder.py +329 -0
- asicode-0.2.6/external_llm/graph/composite_risk.py +226 -0
- asicode-0.2.6/external_llm/graph/execution_graph_advisor.py +636 -0
- asicode-0.2.6/external_llm/graph/graph_builder.py +31 -0
- asicode-0.2.6/external_llm/graph/graph_facade.py +198 -0
- asicode-0.2.6/external_llm/graph/models.py +113 -0
- asicode-0.2.6/external_llm/graph/repository_graph.py +1061 -0
- asicode-0.2.6/external_llm/graph/run_scoped_graph_cache.py +283 -0
- asicode-0.2.6/external_llm/graph/spec_graph_enricher.py +855 -0
- asicode-0.2.6/external_llm/graph/virtual_graph.py +429 -0
- asicode-0.2.6/external_llm/hybrid_parser.py +215 -0
- asicode-0.2.6/external_llm/image_utils.py +147 -0
- asicode-0.2.6/external_llm/intelligent_service.py +2147 -0
- asicode-0.2.6/external_llm/languages/__init__.py +24 -0
- asicode-0.2.6/external_llm/languages/base.py +450 -0
- asicode-0.2.6/external_llm/languages/bash_provider.py +94 -0
- asicode-0.2.6/external_llm/languages/capabilities.py +129 -0
- asicode-0.2.6/external_llm/languages/csharp_provider.py +111 -0
- asicode-0.2.6/external_llm/languages/css_provider.py +178 -0
- asicode-0.2.6/external_llm/languages/dependency_checker.py +753 -0
- asicode-0.2.6/external_llm/languages/go_provider.py +452 -0
- asicode-0.2.6/external_llm/languages/html_provider.py +136 -0
- asicode-0.2.6/external_llm/languages/java_provider.py +485 -0
- asicode-0.2.6/external_llm/languages/javascript_provider.py +334 -0
- asicode-0.2.6/external_llm/languages/json_provider.py +113 -0
- asicode-0.2.6/external_llm/languages/kotlin_provider.py +462 -0
- asicode-0.2.6/external_llm/languages/libcst_utils.py +699 -0
- asicode-0.2.6/external_llm/languages/models.py +195 -0
- asicode-0.2.6/external_llm/languages/php_provider.py +90 -0
- asicode-0.2.6/external_llm/languages/python_provider.py +390 -0
- asicode-0.2.6/external_llm/languages/registry.py +128 -0
- asicode-0.2.6/external_llm/languages/ruby_provider.py +90 -0
- asicode-0.2.6/external_llm/languages/rust_provider.py +89 -0
- asicode-0.2.6/external_llm/languages/swift_provider.py +95 -0
- asicode-0.2.6/external_llm/languages/syntax_validator.py +357 -0
- asicode-0.2.6/external_llm/languages/tree_sitter_utils.py +2140 -0
- asicode-0.2.6/external_llm/languages/typescript_provider.py +694 -0
- asicode-0.2.6/external_llm/model_registry.py +153 -0
- asicode-0.2.6/external_llm/multi_planner.py +744 -0
- asicode-0.2.6/external_llm/ollama_api.py +126 -0
- asicode-0.2.6/external_llm/openai_client.py +1281 -0
- asicode-0.2.6/external_llm/output_modes.py +29 -0
- asicode-0.2.6/external_llm/output_parser.py +760 -0
- asicode-0.2.6/external_llm/patch_engine.py +2482 -0
- asicode-0.2.6/external_llm/patch_synthesizer.py +251 -0
- asicode-0.2.6/external_llm/project_analyzer.py +1386 -0
- asicode-0.2.6/external_llm/providers.py +2112 -0
- asicode-0.2.6/external_llm/repl/collaborate/__init__.py +46 -0
- asicode-0.2.6/external_llm/repl/collaborate/asi_mcp_adapter.py +550 -0
- asicode-0.2.6/external_llm/repl/collaborate/claude_session.py +484 -0
- asicode-0.2.6/external_llm/repl/collaborate/cli.py +257 -0
- asicode-0.2.6/external_llm/repl/collaborate/collaboration_orchestrator.py +422 -0
- asicode-0.2.6/external_llm/repl/collaborate/streaming_display.py +667 -0
- asicode-0.2.6/external_llm/repl/collaborate/verdict.py +145 -0
- asicode-0.2.6/external_llm/semantic_patch.py +190 -0
- asicode-0.2.6/external_llm/service.py +1690 -0
- asicode-0.2.6/external_llm/smart_analyzer.py +466 -0
- asicode-0.2.6/external_llm/super_context_builder.py +644 -0
- asicode-0.2.6/external_llm/testing/__init__.py +0 -0
- asicode-0.2.6/external_llm/testing/symbol_aware_test_finder.py +377 -0
- asicode-0.2.6/external_llm/testing/test_dependency_graph.py +380 -0
- asicode-0.2.6/patch_synth.py +1587 -0
- asicode-0.2.6/path_security.py +143 -0
- asicode-0.2.6/plan_compiler.py +1058 -0
- asicode-0.2.6/pyproject.toml +266 -0
- asicode-0.2.6/services/__init__.py +0 -0
- asicode-0.2.6/services/patch_helpers.py +151 -0
- asicode-0.2.6/setup.cfg +4 -0
- asicode-0.2.6/tests/test_common.py +159 -0
- asicode-0.2.6/tests/test_config.py +145 -0
- asicode-0.2.6/tests/test_context_budget.py +15 -0
- asicode-0.2.6/tests/test_embedding_singleton.py +59 -0
- asicode-0.2.6/tests/test_intent_classifier.py +297 -0
- asicode-0.2.6/tests/test_learned_policy.py +401 -0
- asicode-0.2.6/tests/test_ollama_api.py +163 -0
- asicode-0.2.6/tests/test_path_security.py +252 -0
- asicode-0.2.6/tests/test_progress_printer_inflight.py +137 -0
- asicode-0.2.6/tests/test_real_agent.py +128 -0
- asicode-0.2.6/tests/test_string_helper.py +205 -0
- asicode-0.2.6/tests/test_work_state_digest.py +148 -0
- asicode-0.2.6/tests/test_write_safety_repair_path.py +538 -0
- asicode-0.2.6/utils/__init__.py +1 -0
- asicode-0.2.6/utils/llm_utils.py +22 -0
- asicode-0.2.6/utils/string_helper.py +274 -0
asicode-0.2.6/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 asicode contributors
|
|
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.
|
asicode-0.2.6/PKG-INFO
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: asicode
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Autonomous Software Improvement — AST-precise code editing agent with verification gates (CLI + MCP server)
|
|
5
|
+
Author-email: socialherb <junddory@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/socialherb/asicode
|
|
8
|
+
Project-URL: Repository, https://github.com/socialherb/asicode
|
|
9
|
+
Project-URL: Issues, https://github.com/socialherb/asicode/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: MacOS
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Requires-Dist: requests>=2.31
|
|
28
|
+
Requires-Dist: rich>=13.7
|
|
29
|
+
Requires-Dist: libcst>=1.4
|
|
30
|
+
Requires-Dist: prompt-toolkit>=3.0
|
|
31
|
+
Requires-Dist: httpx>=0.27
|
|
32
|
+
Requires-Dist: ruff>=0.6
|
|
33
|
+
Requires-Dist: tree-sitter-language-pack>=1.10
|
|
34
|
+
Requires-Dist: networkx>=3.0
|
|
35
|
+
Requires-Dist: packaging>=21
|
|
36
|
+
Provides-Extra: webapp
|
|
37
|
+
Requires-Dist: fastapi>=0.110; extra == "webapp"
|
|
38
|
+
Requires-Dist: uvicorn>=0.27; extra == "webapp"
|
|
39
|
+
Requires-Dist: jinja2>=3.1; extra == "webapp"
|
|
40
|
+
Provides-Extra: vulture
|
|
41
|
+
Requires-Dist: vulture>=2.11; extra == "vulture"
|
|
42
|
+
Provides-Extra: collaborate
|
|
43
|
+
Requires-Dist: claude-agent-sdk>=0.2; extra == "collaborate"
|
|
44
|
+
Provides-Extra: rag
|
|
45
|
+
Requires-Dist: sentence-transformers>=3.0; extra == "rag"
|
|
46
|
+
Requires-Dist: faiss-cpu>=1.8; extra == "rag"
|
|
47
|
+
Requires-Dist: numpy>=1.24; extra == "rag"
|
|
48
|
+
Provides-Extra: vision
|
|
49
|
+
Requires-Dist: Pillow>=10.0; extra == "vision"
|
|
50
|
+
Requires-Dist: pytesseract>=0.3; extra == "vision"
|
|
51
|
+
Provides-Extra: browser
|
|
52
|
+
Requires-Dist: playwright>=1.40; extra == "browser"
|
|
53
|
+
Provides-Extra: config
|
|
54
|
+
Requires-Dist: pyyaml>=6.0; extra == "config"
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
57
|
+
Requires-Dist: pytest-xdist>=3.6; extra == "dev"
|
|
58
|
+
Requires-Dist: pre-commit>=4.0; extra == "dev"
|
|
59
|
+
Provides-Extra: lint
|
|
60
|
+
Requires-Dist: mypy>=1.10; extra == "lint"
|
|
61
|
+
Requires-Dist: pyright[nodejs]>=1.1; extra == "lint"
|
|
62
|
+
Provides-Extra: search
|
|
63
|
+
Requires-Dist: ripgrep>=15.0; extra == "search"
|
|
64
|
+
Provides-Extra: all
|
|
65
|
+
Requires-Dist: asicode[vulture]; extra == "all"
|
|
66
|
+
Requires-Dist: asicode[collaborate]; extra == "all"
|
|
67
|
+
Requires-Dist: asicode[rag]; extra == "all"
|
|
68
|
+
Requires-Dist: asicode[vision]; extra == "all"
|
|
69
|
+
Requires-Dist: asicode[browser]; extra == "all"
|
|
70
|
+
Requires-Dist: asicode[config]; extra == "all"
|
|
71
|
+
Requires-Dist: asicode[lint]; extra == "all"
|
|
72
|
+
Requires-Dist: asicode[search]; extra == "all"
|
|
73
|
+
Dynamic: license-file
|
|
74
|
+
|
|
75
|
+
# asicode
|
|
76
|
+
|
|
77
|
+
**Autonomous Software Improvement** — local safe patch runner and code editing tool: an AI-powered assistant for reading, analyzing, and modifying codebases with deterministic AST-level operations, transparent shell execution, and multi-language support.
|
|
78
|
+
|
|
79
|
+
## Features
|
|
80
|
+
|
|
81
|
+
- **Multi-language code editing**: Python, TypeScript, JavaScript, Go, Java, Kotlin, Rust, and more via tree-sitter AST parsing
|
|
82
|
+
- **AST-precise modifications**: Edit symbols by name, insert/delete lines by anchor, apply typed AST operations (Python)
|
|
83
|
+
- **Vector search & RAG**: Semantic code search with FAISS + sentence-transformers embedding
|
|
84
|
+
- **Structural analysis**: Dead code detection, duplicate finding, unused import scanning, contradictory logic detection
|
|
85
|
+
- **Interactive CLI**: Rich terminal interface with prompt-toolkit, command history, completion, and multi-line editing
|
|
86
|
+
- **Headless & automation modes**: single-shot runs (`asi -p`), JSON/NDJSON output, and multi-agent orchestration (`--orchestrate`)
|
|
87
|
+
- **Design chat**: Persistent conversation session with auto-compression and insight management
|
|
88
|
+
- **Shell shim layer**: macOS/Linux compatibility layer for BSD-style command-line tools
|
|
89
|
+
|
|
90
|
+
## Quick Start
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Recommended for CLI use: pipx installs into an isolated env and puts
|
|
94
|
+
# `asi` on your PATH, no venv activation needed
|
|
95
|
+
pipx install 'asicode @ git+https://github.com/socialherb/asicode.git'
|
|
96
|
+
|
|
97
|
+
# Or plain pip (inside a venv of your choice):
|
|
98
|
+
pip install git+https://github.com/socialherb/asicode.git
|
|
99
|
+
|
|
100
|
+
# Or with all features:
|
|
101
|
+
pip install 'asicode[all] @ git+https://github.com/socialherb/asicode.git'
|
|
102
|
+
|
|
103
|
+
# Start the interactive CLI
|
|
104
|
+
asi
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Installation Options
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Core (includes tree-sitter AST parsing — one package covers 300+ languages)
|
|
111
|
+
pip install asicode
|
|
112
|
+
|
|
113
|
+
# With RAG (vector search for code)
|
|
114
|
+
pip install 'asicode[rag]'
|
|
115
|
+
|
|
116
|
+
# With browser automation
|
|
117
|
+
pip install 'asicode[browser]'
|
|
118
|
+
|
|
119
|
+
# Development tools
|
|
120
|
+
pip install 'asicode[dev,lint]'
|
|
121
|
+
|
|
122
|
+
# Everything
|
|
123
|
+
pip install 'asicode[all]'
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Architecture
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
asicode/
|
|
130
|
+
├── asi.py # Interactive CLI (REPL)
|
|
131
|
+
├── external_llm/ # Core engine
|
|
132
|
+
│ ├── agent/ # Agent loop, tool handlers, verification
|
|
133
|
+
│ ├── languages/ # Multi-language providers (Python, TS, Go, etc.)
|
|
134
|
+
│ ├── editor/ # Code editing (AST, anchor, text, patch)
|
|
135
|
+
│ └── repl/ # Design chat session management
|
|
136
|
+
├── scripts/ # Lint/reachability guards (CI)
|
|
137
|
+
└── tests/ # Test suite (unit + integration)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Key Concepts
|
|
141
|
+
|
|
142
|
+
### Agent Tool Loop
|
|
143
|
+
Every request runs through a single LLM tool-use loop: the model reads,
|
|
144
|
+
searches, and edits the repository through typed tools, and each write is
|
|
145
|
+
followed by verification. Headless mode (`asi -p`) and orchestration mode
|
|
146
|
+
(`--orchestrate`, which decomposes a request and dispatches it to parallel
|
|
147
|
+
sub-agent workers) drive the same loop.
|
|
148
|
+
|
|
149
|
+
### Deterministic Editing
|
|
150
|
+
All code modifications are validated through multiple layers:
|
|
151
|
+
- Syntax validation (AST parse gate)
|
|
152
|
+
- Structural analysis (dependency graph, import consistency)
|
|
153
|
+
- Verification loop (edit → verify → repair if needed)
|
|
154
|
+
|
|
155
|
+
## Requirements
|
|
156
|
+
|
|
157
|
+
### Python
|
|
158
|
+
- Python 3.10+
|
|
159
|
+
- macOS or Linux (BSD shim layer for macOS)
|
|
160
|
+
|
|
161
|
+
### Bundled with the install
|
|
162
|
+
- **`ruff`** — the linter used for post-edit verification (F821 undefined-name checks). It is a
|
|
163
|
+
core dependency, so `pip install asicode` installs it automatically. No separate step needed.
|
|
164
|
+
- **tree-sitter** — powers AST-based symbol/call/import detection for precise multi-language
|
|
165
|
+
editing. The core install ships `tree-sitter-language-pack` (~2 MB) — a single package with
|
|
166
|
+
full prebuilt-wheel platform coverage that covers every supported language out of the box
|
|
167
|
+
(it also pulls in the `tree-sitter` core library automatically).
|
|
168
|
+
|
|
169
|
+
### Recommended system tools
|
|
170
|
+
asicode degrades gracefully when these are missing, but installing them improves results:
|
|
171
|
+
|
|
172
|
+
| Tool | Used for | Required when | Behavior if absent |
|
|
173
|
+
|------|----------|---------------|--------------------|
|
|
174
|
+
| `git` | Version control, diff/apply, change-impact analysis | Almost always | Core features expect git |
|
|
175
|
+
| `ripgrep` (`rg`) | Fast code search (`grep` tool) | Recommended | Falls back to system `grep` |
|
|
176
|
+
| `node` | TypeScript/JavaScript editing & validation | Only when editing JS/TS | JS/TS features disabled |
|
|
177
|
+
| `gofmt` / `golangci-lint` | Go formatting & linting | Only when editing Go | Go linting disabled |
|
|
178
|
+
| `docker` | Sandboxed web search (SearXNG) | Only for isolated web search | Web search disabled |
|
|
179
|
+
|
|
180
|
+
Install `git` and `ripgrep` on macOS:
|
|
181
|
+
```bash
|
|
182
|
+
brew install git ripgrep
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`ripgrep` can also be installed via the optional `search` extra (`pip install asicode` is unaffected if it fails — the `grep` fallback applies):
|
|
186
|
+
```bash
|
|
187
|
+
pip install 'asicode[search]'
|
|
188
|
+
```
|
|
189
|
+
> Prebuilt wheels exist for macOS-arm64 and linux-x86_64; other platforms build from source.
|
|
190
|
+
|
|
191
|
+
## Development
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Clone and install in editable mode
|
|
195
|
+
git clone <repo-url>
|
|
196
|
+
cd asicode
|
|
197
|
+
pip install -e '.[dev,lint,rag]'
|
|
198
|
+
|
|
199
|
+
# Run tests
|
|
200
|
+
pytest
|
|
201
|
+
|
|
202
|
+
# Run linting
|
|
203
|
+
ruff check
|
|
204
|
+
ruff format --check
|
|
205
|
+
|
|
206
|
+
# Run type checking
|
|
207
|
+
pyright
|
|
208
|
+
```
|
asicode-0.2.6/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# asicode
|
|
2
|
+
|
|
3
|
+
**Autonomous Software Improvement** — local safe patch runner and code editing tool: an AI-powered assistant for reading, analyzing, and modifying codebases with deterministic AST-level operations, transparent shell execution, and multi-language support.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Multi-language code editing**: Python, TypeScript, JavaScript, Go, Java, Kotlin, Rust, and more via tree-sitter AST parsing
|
|
8
|
+
- **AST-precise modifications**: Edit symbols by name, insert/delete lines by anchor, apply typed AST operations (Python)
|
|
9
|
+
- **Vector search & RAG**: Semantic code search with FAISS + sentence-transformers embedding
|
|
10
|
+
- **Structural analysis**: Dead code detection, duplicate finding, unused import scanning, contradictory logic detection
|
|
11
|
+
- **Interactive CLI**: Rich terminal interface with prompt-toolkit, command history, completion, and multi-line editing
|
|
12
|
+
- **Headless & automation modes**: single-shot runs (`asi -p`), JSON/NDJSON output, and multi-agent orchestration (`--orchestrate`)
|
|
13
|
+
- **Design chat**: Persistent conversation session with auto-compression and insight management
|
|
14
|
+
- **Shell shim layer**: macOS/Linux compatibility layer for BSD-style command-line tools
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Recommended for CLI use: pipx installs into an isolated env and puts
|
|
20
|
+
# `asi` on your PATH, no venv activation needed
|
|
21
|
+
pipx install 'asicode @ git+https://github.com/socialherb/asicode.git'
|
|
22
|
+
|
|
23
|
+
# Or plain pip (inside a venv of your choice):
|
|
24
|
+
pip install git+https://github.com/socialherb/asicode.git
|
|
25
|
+
|
|
26
|
+
# Or with all features:
|
|
27
|
+
pip install 'asicode[all] @ git+https://github.com/socialherb/asicode.git'
|
|
28
|
+
|
|
29
|
+
# Start the interactive CLI
|
|
30
|
+
asi
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Installation Options
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Core (includes tree-sitter AST parsing — one package covers 300+ languages)
|
|
37
|
+
pip install asicode
|
|
38
|
+
|
|
39
|
+
# With RAG (vector search for code)
|
|
40
|
+
pip install 'asicode[rag]'
|
|
41
|
+
|
|
42
|
+
# With browser automation
|
|
43
|
+
pip install 'asicode[browser]'
|
|
44
|
+
|
|
45
|
+
# Development tools
|
|
46
|
+
pip install 'asicode[dev,lint]'
|
|
47
|
+
|
|
48
|
+
# Everything
|
|
49
|
+
pip install 'asicode[all]'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Architecture
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
asicode/
|
|
56
|
+
├── asi.py # Interactive CLI (REPL)
|
|
57
|
+
├── external_llm/ # Core engine
|
|
58
|
+
│ ├── agent/ # Agent loop, tool handlers, verification
|
|
59
|
+
│ ├── languages/ # Multi-language providers (Python, TS, Go, etc.)
|
|
60
|
+
│ ├── editor/ # Code editing (AST, anchor, text, patch)
|
|
61
|
+
│ └── repl/ # Design chat session management
|
|
62
|
+
├── scripts/ # Lint/reachability guards (CI)
|
|
63
|
+
└── tests/ # Test suite (unit + integration)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Key Concepts
|
|
67
|
+
|
|
68
|
+
### Agent Tool Loop
|
|
69
|
+
Every request runs through a single LLM tool-use loop: the model reads,
|
|
70
|
+
searches, and edits the repository through typed tools, and each write is
|
|
71
|
+
followed by verification. Headless mode (`asi -p`) and orchestration mode
|
|
72
|
+
(`--orchestrate`, which decomposes a request and dispatches it to parallel
|
|
73
|
+
sub-agent workers) drive the same loop.
|
|
74
|
+
|
|
75
|
+
### Deterministic Editing
|
|
76
|
+
All code modifications are validated through multiple layers:
|
|
77
|
+
- Syntax validation (AST parse gate)
|
|
78
|
+
- Structural analysis (dependency graph, import consistency)
|
|
79
|
+
- Verification loop (edit → verify → repair if needed)
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
### Python
|
|
84
|
+
- Python 3.10+
|
|
85
|
+
- macOS or Linux (BSD shim layer for macOS)
|
|
86
|
+
|
|
87
|
+
### Bundled with the install
|
|
88
|
+
- **`ruff`** — the linter used for post-edit verification (F821 undefined-name checks). It is a
|
|
89
|
+
core dependency, so `pip install asicode` installs it automatically. No separate step needed.
|
|
90
|
+
- **tree-sitter** — powers AST-based symbol/call/import detection for precise multi-language
|
|
91
|
+
editing. The core install ships `tree-sitter-language-pack` (~2 MB) — a single package with
|
|
92
|
+
full prebuilt-wheel platform coverage that covers every supported language out of the box
|
|
93
|
+
(it also pulls in the `tree-sitter` core library automatically).
|
|
94
|
+
|
|
95
|
+
### Recommended system tools
|
|
96
|
+
asicode degrades gracefully when these are missing, but installing them improves results:
|
|
97
|
+
|
|
98
|
+
| Tool | Used for | Required when | Behavior if absent |
|
|
99
|
+
|------|----------|---------------|--------------------|
|
|
100
|
+
| `git` | Version control, diff/apply, change-impact analysis | Almost always | Core features expect git |
|
|
101
|
+
| `ripgrep` (`rg`) | Fast code search (`grep` tool) | Recommended | Falls back to system `grep` |
|
|
102
|
+
| `node` | TypeScript/JavaScript editing & validation | Only when editing JS/TS | JS/TS features disabled |
|
|
103
|
+
| `gofmt` / `golangci-lint` | Go formatting & linting | Only when editing Go | Go linting disabled |
|
|
104
|
+
| `docker` | Sandboxed web search (SearXNG) | Only for isolated web search | Web search disabled |
|
|
105
|
+
|
|
106
|
+
Install `git` and `ripgrep` on macOS:
|
|
107
|
+
```bash
|
|
108
|
+
brew install git ripgrep
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`ripgrep` can also be installed via the optional `search` extra (`pip install asicode` is unaffected if it fails — the `grep` fallback applies):
|
|
112
|
+
```bash
|
|
113
|
+
pip install 'asicode[search]'
|
|
114
|
+
```
|
|
115
|
+
> Prebuilt wheels exist for macOS-arm64 and linux-x86_64; other platforms build from source.
|
|
116
|
+
|
|
117
|
+
## Development
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Clone and install in editable mode
|
|
121
|
+
git clone <repo-url>
|
|
122
|
+
cd asicode
|
|
123
|
+
pip install -e '.[dev,lint,rag]'
|
|
124
|
+
|
|
125
|
+
# Run tests
|
|
126
|
+
pytest
|
|
127
|
+
|
|
128
|
+
# Run linting
|
|
129
|
+
ruff check
|
|
130
|
+
ruff format --check
|
|
131
|
+
|
|
132
|
+
# Run type checking
|
|
133
|
+
pyright
|
|
134
|
+
```
|