ai-codeindex 0.7.0__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.
- ai_codeindex-0.7.0/.claude/skills/mo-arch/SKILL.md +82 -0
- ai_codeindex-0.7.0/.claude/skills/mo-index/SKILL.md +133 -0
- ai_codeindex-0.7.0/.github/workflows/publish.yml +93 -0
- ai_codeindex-0.7.0/.gitignore +32 -0
- ai_codeindex-0.7.0/.serena/.gitignore +1 -0
- ai_codeindex-0.7.0/.serena/memories/development_workflow.md +73 -0
- ai_codeindex-0.7.0/.serena/memories/project_overview.md +93 -0
- ai_codeindex-0.7.0/.serena/memories/suggested_commands.md +74 -0
- ai_codeindex-0.7.0/.serena/project.yml +110 -0
- ai_codeindex-0.7.0/BRANCH_STATUS.md +285 -0
- ai_codeindex-0.7.0/CHANGELOG.md +421 -0
- ai_codeindex-0.7.0/CLAUDE.md +627 -0
- ai_codeindex-0.7.0/CLAUDE_CODE_INTEGRATION_UPDATE.md +165 -0
- ai_codeindex-0.7.0/DEVELOPMENT_PLAN_SUMMARY.md +364 -0
- ai_codeindex-0.7.0/DOCUMENTATION_REORGANIZATION.md +514 -0
- ai_codeindex-0.7.0/DOCUMENTATION_REVIEW.md +352 -0
- ai_codeindex-0.7.0/DOCUMENTATION_SUMMARY.md +212 -0
- ai_codeindex-0.7.0/GIT_COMMIT_GUIDE.md +265 -0
- ai_codeindex-0.7.0/IMPROVEMENT_PLAN.md +354 -0
- ai_codeindex-0.7.0/LICENSE +21 -0
- ai_codeindex-0.7.0/PACKAGE_NAMING.md +206 -0
- ai_codeindex-0.7.0/PKG-INFO +966 -0
- ai_codeindex-0.7.0/PROJECT_INDEX.json +135 -0
- ai_codeindex-0.7.0/PROJECT_INDEX.md +19 -0
- ai_codeindex-0.7.0/PROJECT_INDEX_KISS.md +19 -0
- ai_codeindex-0.7.0/PROJECT_INDEX_TEST.md +19 -0
- ai_codeindex-0.7.0/PROJECT_SYMBOLS.md +170 -0
- ai_codeindex-0.7.0/PYPI_QUICKSTART.md +237 -0
- ai_codeindex-0.7.0/README.md +932 -0
- ai_codeindex-0.7.0/README_AI.md +68 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.2.0.md +260 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.3.0.md +343 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.3.1.md +215 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.3.2.md +249 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.4.0.md +345 -0
- ai_codeindex-0.7.0/RELEASE_NOTES_v0.5.0-beta1.md +273 -0
- ai_codeindex-0.7.0/RELEASE_v0.7.0_STATUS.md +358 -0
- ai_codeindex-0.7.0/docs/DOCS_REORGANIZATION_PLAN.md +429 -0
- ai_codeindex-0.7.0/docs/README.md +117 -0
- ai_codeindex-0.7.0/docs/architecture/adr/001-use-tree-sitter-for-parsing.md +57 -0
- ai_codeindex-0.7.0/docs/architecture/adr/002-external-ai-cli-integration.md +93 -0
- ai_codeindex-0.7.0/docs/architecture/design/document-aggregation.md +184 -0
- ai_codeindex-0.7.0/docs/architecture/design/initial-design.md +761 -0
- ai_codeindex-0.7.0/docs/architecture/design/kiss-universal-description.md +465 -0
- ai_codeindex-0.7.0/docs/architecture/design/parallel-strategy.md +152 -0
- ai_codeindex-0.7.0/docs/development/git-hooks-async-mode.md +254 -0
- ai_codeindex-0.7.0/docs/development/gitflow-workflow.md +590 -0
- ai_codeindex-0.7.0/docs/development/improvements/QUICK_START.md +269 -0
- ai_codeindex-0.7.0/docs/development/improvements/README.md +101 -0
- ai_codeindex-0.7.0/docs/development/improvements/ai-enhancement-issues.md +695 -0
- ai_codeindex-0.7.0/docs/development/improvements/ai-enhancement-ultimate-solution.md +1060 -0
- ai_codeindex-0.7.0/docs/development/improvements/php-parser.md +171 -0
- ai_codeindex-0.7.0/docs/development/improvements/symbol-overload-detection.md +608 -0
- ai_codeindex-0.7.0/docs/development/improvements/tech-debt-detection.md +738 -0
- ai_codeindex-0.7.0/docs/development/improvements/tiered-ai-enhancement-strategy.md +674 -0
- ai_codeindex-0.7.0/docs/development/pypi-release-guide.md +761 -0
- ai_codeindex-0.7.0/docs/development/requirements-workflow.md +891 -0
- ai_codeindex-0.7.0/docs/development/setup.md +380 -0
- ai_codeindex-0.7.0/docs/evaluation/README.md +77 -0
- ai_codeindex-0.7.0/docs/evaluation/before-after/README.md +652 -0
- ai_codeindex-0.7.0/docs/evaluation/case-studies/php-payment-project.md +399 -0
- ai_codeindex-0.7.0/docs/evaluation/framework.md +253 -0
- ai_codeindex-0.7.0/docs/evaluation/php-project-validation.md +305 -0
- ai_codeindex-0.7.0/docs/guides/advanced-usage.md +630 -0
- ai_codeindex-0.7.0/docs/guides/claude-code-integration.md +318 -0
- ai_codeindex-0.7.0/docs/guides/configuration-changelog.md +474 -0
- ai_codeindex-0.7.0/docs/guides/configuration.md +538 -0
- ai_codeindex-0.7.0/docs/guides/contributing.md +369 -0
- ai_codeindex-0.7.0/docs/guides/docstring-extraction.md +792 -0
- ai_codeindex-0.7.0/docs/guides/getting-started.md +196 -0
- ai_codeindex-0.7.0/docs/guides/git-hooks-integration.md +603 -0
- ai_codeindex-0.7.0/docs/guides/json-output-integration.md +627 -0
- ai_codeindex-0.7.0/docs/guides/migration-v0.6.md +311 -0
- ai_codeindex-0.7.0/docs/planning/IMPLEMENTATION_GUIDE.md +621 -0
- ai_codeindex-0.7.0/docs/planning/PLANNING_COMPLETE.md +409 -0
- ai_codeindex-0.7.0/docs/planning/README.md +38 -0
- ai_codeindex-0.7.0/docs/planning/ROADMAP.md +480 -0
- ai_codeindex-0.7.0/docs/planning/active/epic-json-output.md +740 -0
- ai_codeindex-0.7.0/docs/planning/active/epic5-intelligent-branch-management.md +945 -0
- ai_codeindex-0.7.0/docs/planning/active/epic5-summary.md +440 -0
- ai_codeindex-0.7.0/docs/planning/active/epic6-multiagent-orchestrator.md +593 -0
- ai_codeindex-0.7.0/docs/planning/active/epic7-java-support.md +640 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic2-adaptive-symbols/plan.md +401 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic2-adaptive-symbols/validation-report.md +255 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic3-ai-enhancement/optimization.md +1294 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic3-ai-enhancement/refactoring-analysis.md +579 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic3-ai-enhancement/removal-notes.md +148 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic4-refactoring/plan.md +453 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic4-refactoring/story-4.3-cli-split.md +460 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic4-refactoring/story-4.4-validation.md +280 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic4-refactoring/story-4.4.5-kiss-validation.md +453 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic4-refactoring/story-4.4.5-kiss.md +388 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic6-framework-routes/git-hooks-ux.md +730 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic6-framework-routes/plan.md +782 -0
- ai_codeindex-0.7.0/docs/planning/completed/epic9-docstring-extraction/plan.md +808 -0
- ai_codeindex-0.7.0/docs/planning/completed/sprints/sprint-1/DAILY_LOG.md +417 -0
- ai_codeindex-0.7.0/docs/planning/completed/sprints/sprint-1/STARTED.txt +1 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/ROADMAP_UPDATE_v0.6.0.md +319 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/development-history-stats.md +329 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/development-roadmap-2026-q1-q2.md +575 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/improvement-plan-archive.md +354 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/improvement-proposals.md +520 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/improvement-roadmap.md +867 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/phase1-agile-plan.md +1006 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/phase1-quick-start.md +509 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/phase1-story-cards.md +549 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/phase1-story-planning-epic5.md +1146 -0
- ai_codeindex-0.7.0/docs/planning/completed/v0.1.0-v0.3.1/v0.4.0-execution-plan.md +751 -0
- ai_codeindex-0.7.0/docs/planning/executive-summary.md +270 -0
- ai_codeindex-0.7.0/docs/planning/roadmap/2025-Q1.md +46 -0
- ai_codeindex-0.7.0/docs/planning/roadmap/dependency-graph-update.md +250 -0
- ai_codeindex-0.7.0/examples/CLAUDE.md.php-project +97 -0
- ai_codeindex-0.7.0/examples/CLAUDE.md.template +420 -0
- ai_codeindex-0.7.0/examples/README.md +179 -0
- ai_codeindex-0.7.0/examples/README_AI.md +57 -0
- ai_codeindex-0.7.0/examples/ai-integration-guide.md +371 -0
- ai_codeindex-0.7.0/examples/frameworks/template/README.md +263 -0
- ai_codeindex-0.7.0/examples/frameworks/template/test_template_extractor.py +292 -0
- ai_codeindex-0.7.0/examples/frameworks/template/yourframework_extractor.py +161 -0
- ai_codeindex-0.7.0/examples/print_env.py +93 -0
- ai_codeindex-0.7.0/hierarchical_strategy.py +205 -0
- ai_codeindex-0.7.0/hooks/README.md +160 -0
- ai_codeindex-0.7.0/hooks/templates/post-commit-update-logic.sh +143 -0
- ai_codeindex-0.7.0/hooks/templates/post-commit-v4 +162 -0
- ai_codeindex-0.7.0/pyproject.toml +62 -0
- ai_codeindex-0.7.0/scripts/bump_version.sh +71 -0
- ai_codeindex-0.7.0/scripts/diagnose_ai_failures.py +387 -0
- ai_codeindex-0.7.0/scripts/release.sh +215 -0
- ai_codeindex-0.7.0/scripts/validate_php_project.py +145 -0
- ai_codeindex-0.7.0/skills/README.md +137 -0
- ai_codeindex-0.7.0/skills/create.sh +155 -0
- ai_codeindex-0.7.0/skills/install.sh +116 -0
- ai_codeindex-0.7.0/skills/src/mo-arch/SKILL.md +82 -0
- ai_codeindex-0.7.0/skills/src/mo-index/SKILL.md +133 -0
- ai_codeindex-0.7.0/src/README_AI.md +57 -0
- ai_codeindex-0.7.0/src/codeindex/README_AI.md +767 -0
- ai_codeindex-0.7.0/src/codeindex/__init__.py +11 -0
- ai_codeindex-0.7.0/src/codeindex/adaptive_config.py +83 -0
- ai_codeindex-0.7.0/src/codeindex/adaptive_selector.py +171 -0
- ai_codeindex-0.7.0/src/codeindex/ai_helper.py +48 -0
- ai_codeindex-0.7.0/src/codeindex/cli.py +40 -0
- ai_codeindex-0.7.0/src/codeindex/cli_common.py +10 -0
- ai_codeindex-0.7.0/src/codeindex/cli_config.py +97 -0
- ai_codeindex-0.7.0/src/codeindex/cli_docs.py +66 -0
- ai_codeindex-0.7.0/src/codeindex/cli_hooks.py +765 -0
- ai_codeindex-0.7.0/src/codeindex/cli_scan.py +562 -0
- ai_codeindex-0.7.0/src/codeindex/cli_symbols.py +295 -0
- ai_codeindex-0.7.0/src/codeindex/cli_tech_debt.py +238 -0
- ai_codeindex-0.7.0/src/codeindex/config.py +479 -0
- ai_codeindex-0.7.0/src/codeindex/directory_tree.py +229 -0
- ai_codeindex-0.7.0/src/codeindex/docstring_processor.py +342 -0
- ai_codeindex-0.7.0/src/codeindex/errors.py +62 -0
- ai_codeindex-0.7.0/src/codeindex/extractors/__init__.py +9 -0
- ai_codeindex-0.7.0/src/codeindex/extractors/thinkphp.py +132 -0
- ai_codeindex-0.7.0/src/codeindex/file_classifier.py +148 -0
- ai_codeindex-0.7.0/src/codeindex/framework_detect.py +323 -0
- ai_codeindex-0.7.0/src/codeindex/hierarchical.py +428 -0
- ai_codeindex-0.7.0/src/codeindex/incremental.py +278 -0
- ai_codeindex-0.7.0/src/codeindex/invoker.py +260 -0
- ai_codeindex-0.7.0/src/codeindex/parallel.py +155 -0
- ai_codeindex-0.7.0/src/codeindex/parser.py +740 -0
- ai_codeindex-0.7.0/src/codeindex/route_extractor.py +98 -0
- ai_codeindex-0.7.0/src/codeindex/route_registry.py +77 -0
- ai_codeindex-0.7.0/src/codeindex/scanner.py +167 -0
- ai_codeindex-0.7.0/src/codeindex/semantic_extractor.py +408 -0
- ai_codeindex-0.7.0/src/codeindex/smart_writer.py +737 -0
- ai_codeindex-0.7.0/src/codeindex/symbol_index.py +199 -0
- ai_codeindex-0.7.0/src/codeindex/symbol_scorer.py +283 -0
- ai_codeindex-0.7.0/src/codeindex/tech_debt.py +619 -0
- ai_codeindex-0.7.0/src/codeindex/tech_debt_formatters.py +234 -0
- ai_codeindex-0.7.0/src/codeindex/writer.py +164 -0
- ai_codeindex-0.7.0/test_adaptive_debug.py +34 -0
- ai_codeindex-0.7.0/test_current_project.py +86 -0
- ai_codeindex-0.7.0/test_hierarchical.py +85 -0
- ai_codeindex-0.7.0/test_hierarchical_src.py +132 -0
- ai_codeindex-0.7.0/test_hierarchical_test/level1/file1.py +1 -0
- ai_codeindex-0.7.0/test_hierarchical_test/level1/level2a/file2.py +1 -0
- ai_codeindex-0.7.0/test_hierarchical_test/level1/level2a/level3/file4.py +1 -0
- ai_codeindex-0.7.0/test_hierarchical_test/level1/level2b/file3.py +1 -0
- ai_codeindex-0.7.0/test_hierarchy_simple.py +69 -0
- ai_codeindex-0.7.0/test_operategoods.py +53 -0
- ai_codeindex-0.7.0/tests/README_AI.md +690 -0
- ai_codeindex-0.7.0/tests/__init__.py +1 -0
- ai_codeindex-0.7.0/tests/conftest.py +120 -0
- ai_codeindex-0.7.0/tests/extractors/__init__.py +1 -0
- ai_codeindex-0.7.0/tests/extractors/test_thinkphp.py +363 -0
- ai_codeindex-0.7.0/tests/extractors/test_thinkphp_description.py +191 -0
- ai_codeindex-0.7.0/tests/features/ai_helper.feature +39 -0
- ai_codeindex-0.7.0/tests/features/cli_module_split.feature +78 -0
- ai_codeindex-0.7.0/tests/features/file_classifier.feature +170 -0
- ai_codeindex-0.7.0/tests/features/symbol_overload_detection.feature +21 -0
- ai_codeindex-0.7.0/tests/features/tech_debt_detection.feature +53 -0
- ai_codeindex-0.7.0/tests/features/tech_debt_reporting.feature +50 -0
- ai_codeindex-0.7.0/tests/test_adaptive_config.py +191 -0
- ai_codeindex-0.7.0/tests/test_adaptive_selector.py +306 -0
- ai_codeindex-0.7.0/tests/test_ai_helper.py +129 -0
- ai_codeindex-0.7.0/tests/test_backward_compatibility.py +152 -0
- ai_codeindex-0.7.0/tests/test_cli_docstring_options.py +278 -0
- ai_codeindex-0.7.0/tests/test_cli_hooks.py +279 -0
- ai_codeindex-0.7.0/tests/test_cli_json.py +267 -0
- ai_codeindex-0.7.0/tests/test_cli_tech_debt.py +176 -0
- ai_codeindex-0.7.0/tests/test_config_adaptive.py +343 -0
- ai_codeindex-0.7.0/tests/test_directory_tree.py +181 -0
- ai_codeindex-0.7.0/tests/test_docstring_config.py +211 -0
- ai_codeindex-0.7.0/tests/test_docstring_processor.py +404 -0
- ai_codeindex-0.7.0/tests/test_error_handling.py +220 -0
- ai_codeindex-0.7.0/tests/test_file_classifier.py +251 -0
- ai_codeindex-0.7.0/tests/test_hooks_config.py +141 -0
- ai_codeindex-0.7.0/tests/test_json_output.py +294 -0
- ai_codeindex-0.7.0/tests/test_parser.py +302 -0
- ai_codeindex-0.7.0/tests/test_php_comment_extraction.py +192 -0
- ai_codeindex-0.7.0/tests/test_php_docstring_extraction.py +309 -0
- ai_codeindex-0.7.0/tests/test_project_index_semantic.py +243 -0
- ai_codeindex-0.7.0/tests/test_python_docstring_description.py +221 -0
- ai_codeindex-0.7.0/tests/test_route_extractor.py +141 -0
- ai_codeindex-0.7.0/tests/test_route_info.py +103 -0
- ai_codeindex-0.7.0/tests/test_route_registry.py +135 -0
- ai_codeindex-0.7.0/tests/test_route_table_description.py +291 -0
- ai_codeindex-0.7.0/tests/test_route_table_display.py +185 -0
- ai_codeindex-0.7.0/tests/test_semantic_extractor.py +340 -0
- ai_codeindex-0.7.0/tests/test_smart_writer.py +285 -0
- ai_codeindex-0.7.0/tests/test_smart_writer_adaptive.py +286 -0
- ai_codeindex-0.7.0/tests/test_smart_writer_docstring.py +242 -0
- ai_codeindex-0.7.0/tests/test_smart_writer_integration.py +136 -0
- ai_codeindex-0.7.0/tests/test_smart_writer_semantic.py +285 -0
- ai_codeindex-0.7.0/tests/test_story_4_4_integration.py +323 -0
- ai_codeindex-0.7.0/tests/test_symbol_overload.py +316 -0
- ai_codeindex-0.7.0/tests/test_symbol_scorer.py +537 -0
- ai_codeindex-0.7.0/tests/test_tech_debt_bdd.py +487 -0
- ai_codeindex-0.7.0/tests/test_tech_debt_detector.py +562 -0
- ai_codeindex-0.7.0/tests/test_tech_debt_formatters.py +341 -0
- ai_codeindex-0.7.0/tests/test_tech_debt_reporter.py +518 -0
- ai_codeindex-0.7.0/tests/test_thinkphp_route_extractor.py +284 -0
- ai_codeindex-0.7.0/uv.lock +659 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mo-arch
|
|
3
|
+
description: Query code architecture using README_AI.md index files. Use when user asks about project structure, where features are implemented, how modules work, or wants to understand codebase architecture. Triggered by questions like "what does this do", "where is X implemented", "how does module Y work".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mo-arch - Code Architecture Query
|
|
7
|
+
|
|
8
|
+
Query code architecture using README_AI.md index files generated by codeindex.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
### Step 1: Check Project Index
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cat PROJECT_INDEX.md 2>/dev/null
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If exists, this gives you the project overview with all modules listed.
|
|
19
|
+
|
|
20
|
+
### Step 2: Find Directory Indexes
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
find . -name "README_AI.md" -type f | head -10
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Step 3: Read Relevant Module Index
|
|
27
|
+
|
|
28
|
+
Based on user's question, locate the relevant module and read its README_AI.md:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Example: user asks about parser
|
|
32
|
+
cat src/parser/README_AI.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 4: Trace Dependencies
|
|
36
|
+
|
|
37
|
+
Check the **Consumes** and **Provides** sections in README_AI.md to understand module relationships.
|
|
38
|
+
|
|
39
|
+
### Step 5: Deep Dive (if needed)
|
|
40
|
+
|
|
41
|
+
Only read actual source files when README_AI.md doesn't have enough detail.
|
|
42
|
+
|
|
43
|
+
## Response Format
|
|
44
|
+
|
|
45
|
+
When answering architecture questions:
|
|
46
|
+
|
|
47
|
+
1. **Start with the module location** - "The parser is in `src/codeindex/parser.py`"
|
|
48
|
+
2. **Explain its purpose** - From the Purpose section
|
|
49
|
+
3. **Show relationships** - From Consumes/Provides
|
|
50
|
+
4. **Provide code reference** - Line numbers if relevant
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
|
|
54
|
+
**User**: "Where is the parser implemented?"
|
|
55
|
+
|
|
56
|
+
**Response**:
|
|
57
|
+
```
|
|
58
|
+
Based on README_AI.md, the parser is in `src/codeindex/parser.py`.
|
|
59
|
+
|
|
60
|
+
**Purpose**: Tree-sitter based Python parser that extracts Symbol
|
|
61
|
+
(classes, functions, methods) and Import statements into ParseResult.
|
|
62
|
+
|
|
63
|
+
**Key exports**:
|
|
64
|
+
- `parse_file()` - Parse a single Python file
|
|
65
|
+
- `ParseResult` - Container for parsed data
|
|
66
|
+
- `Symbol` - Represents a code symbol
|
|
67
|
+
|
|
68
|
+
**Dependencies**: tree-sitter, tree-sitter-python
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## When No Index Exists
|
|
72
|
+
|
|
73
|
+
If README_AI.md files don't exist, suggest:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
This directory is not indexed. Run:
|
|
77
|
+
codeindex scan ./path/to/dir
|
|
78
|
+
|
|
79
|
+
Or for the entire project:
|
|
80
|
+
codeindex list-dirs | xargs -P 4 -I {} codeindex scan {}
|
|
81
|
+
codeindex index
|
|
82
|
+
```
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mo-index
|
|
3
|
+
description: Generate AI-friendly code index using codeindex tool. Use when user wants to index a project, generate README_AI.md files, create code documentation, or make codebase searchable. Triggered by "index this project", "generate code index", "create documentation", "scan codebase".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mo-index - Repository Indexing
|
|
7
|
+
|
|
8
|
+
Generate AI-friendly index files (README_AI.md) for codebases using codeindex.
|
|
9
|
+
|
|
10
|
+
## Prerequisites Check
|
|
11
|
+
|
|
12
|
+
First, verify codeindex is available:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
which codeindex || echo "Not installed. Run: pip install codeindex"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Step 1: Initialize (if needed)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Check for config
|
|
24
|
+
cat .codeindex.yaml 2>/dev/null || codeindex init
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Step 2: Review Configuration
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cat .codeindex.yaml
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Key settings to verify:
|
|
34
|
+
- `ai_command` - Your AI CLI command (claude, openai, etc.)
|
|
35
|
+
- `include` - Directories to scan
|
|
36
|
+
- `exclude` - Patterns to skip
|
|
37
|
+
|
|
38
|
+
### Step 3: Preview Indexable Directories
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
codeindex list-dirs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Step 4: Index Directories
|
|
45
|
+
|
|
46
|
+
**Single directory (test first):**
|
|
47
|
+
```bash
|
|
48
|
+
codeindex scan ./src/module --dry-run # Preview
|
|
49
|
+
codeindex scan ./src/module # Execute
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**All directories (parallel):**
|
|
53
|
+
```bash
|
|
54
|
+
codeindex list-dirs | xargs -P 4 -I {} codeindex scan {}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Fallback mode (no AI):**
|
|
58
|
+
```bash
|
|
59
|
+
codeindex scan ./src/module --fallback
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Step 5: Generate Project Index
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
codeindex index
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Creates `PROJECT_INDEX.md` with module overview.
|
|
69
|
+
|
|
70
|
+
### Step 6: Verify Coverage
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
codeindex status
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Example Session
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
User: Index this project
|
|
80
|
+
|
|
81
|
+
Claude: I'll help you index this project. Let me check the setup first.
|
|
82
|
+
|
|
83
|
+
> codeindex status
|
|
84
|
+
Indexed: 0/3 (0%)
|
|
85
|
+
Not indexed: src/, tests/, examples/
|
|
86
|
+
|
|
87
|
+
> codeindex list-dirs | xargs -P 4 -I {} codeindex scan {}
|
|
88
|
+
✓ Created: src/codeindex/README_AI.md
|
|
89
|
+
✓ Created: tests/README_AI.md
|
|
90
|
+
✓ Created: examples/README_AI.md
|
|
91
|
+
|
|
92
|
+
> codeindex index
|
|
93
|
+
✓ Created: PROJECT_INDEX.md
|
|
94
|
+
|
|
95
|
+
Done! Your project is now indexed:
|
|
96
|
+
- 3 directory indexes (README_AI.md)
|
|
97
|
+
- 1 project index (PROJECT_INDEX.md)
|
|
98
|
+
- Coverage: 100%
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Configuration Reference
|
|
102
|
+
|
|
103
|
+
`.codeindex.yaml` example:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
ai_command: 'claude -p "{prompt}" --allowedTools "Read"'
|
|
107
|
+
|
|
108
|
+
include:
|
|
109
|
+
- src/
|
|
110
|
+
- lib/
|
|
111
|
+
- tests/
|
|
112
|
+
- examples/
|
|
113
|
+
|
|
114
|
+
exclude:
|
|
115
|
+
- "**/__pycache__/**"
|
|
116
|
+
- "**/node_modules/**"
|
|
117
|
+
|
|
118
|
+
output_file: README_AI.md
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Troubleshooting
|
|
122
|
+
|
|
123
|
+
| Problem | Solution |
|
|
124
|
+
|---------|----------|
|
|
125
|
+
| AI CLI timeout | `codeindex scan ./dir --timeout 180` |
|
|
126
|
+
| Skip AI entirely | `codeindex scan ./dir --fallback` |
|
|
127
|
+
| Debug prompt | `codeindex scan ./dir --dry-run` |
|
|
128
|
+
|
|
129
|
+
## Post-Indexing Recommendations
|
|
130
|
+
|
|
131
|
+
1. Commit README_AI.md files to git for team sharing
|
|
132
|
+
2. Set up git hooks for auto-updates
|
|
133
|
+
3. Add to CLAUDE.md: "Read README_AI.md before modifying code"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*' # 匹配 v0.5.1, v1.0.0 等
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Run tests
|
|
29
|
+
run: pytest -v
|
|
30
|
+
|
|
31
|
+
- name: Run linter
|
|
32
|
+
run: ruff check src/
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
needs: test
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write # For PyPI trusted publishing
|
|
39
|
+
contents: write # For creating releases
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- name: Set up Python
|
|
45
|
+
uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: '3.11'
|
|
48
|
+
|
|
49
|
+
- name: Install build tools
|
|
50
|
+
run: |
|
|
51
|
+
python -m pip install --upgrade pip
|
|
52
|
+
pip install build twine
|
|
53
|
+
|
|
54
|
+
- name: Build distribution
|
|
55
|
+
run: python -m build
|
|
56
|
+
|
|
57
|
+
- name: Check distribution
|
|
58
|
+
run: twine check dist/*
|
|
59
|
+
|
|
60
|
+
# TestPyPI step disabled - requires TEST_PYPI_API_TOKEN
|
|
61
|
+
# - name: Publish to TestPyPI
|
|
62
|
+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
63
|
+
# uses: pypa/gh-action-pypi-publish@release/v1
|
|
64
|
+
# with:
|
|
65
|
+
# repository-url: https://test.pypi.org/legacy/
|
|
66
|
+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
67
|
+
# skip-existing: true
|
|
68
|
+
|
|
69
|
+
- name: Publish to PyPI
|
|
70
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
71
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
72
|
+
with:
|
|
73
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
74
|
+
|
|
75
|
+
- name: Extract version
|
|
76
|
+
id: version
|
|
77
|
+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
78
|
+
|
|
79
|
+
- name: Extract changelog
|
|
80
|
+
id: changelog
|
|
81
|
+
run: |
|
|
82
|
+
VERSION=${{ steps.version.outputs.VERSION }}
|
|
83
|
+
sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | head -n -1 > release_notes.md
|
|
84
|
+
cat release_notes.md
|
|
85
|
+
|
|
86
|
+
- name: Create GitHub Release
|
|
87
|
+
uses: softprops/action-gh-release@v1
|
|
88
|
+
with:
|
|
89
|
+
body_path: release_notes.md
|
|
90
|
+
files: dist/*
|
|
91
|
+
draft: false
|
|
92
|
+
prerelease: false
|
|
93
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
ENV/
|
|
16
|
+
|
|
17
|
+
# Testing
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
# IDE
|
|
23
|
+
.idea/
|
|
24
|
+
.vscode/
|
|
25
|
+
*.swp
|
|
26
|
+
*.swo
|
|
27
|
+
|
|
28
|
+
# OS
|
|
29
|
+
.DS_Store
|
|
30
|
+
|
|
31
|
+
# Project specific
|
|
32
|
+
.codeindex.yaml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/cache
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# codeindex 开发指南
|
|
2
|
+
|
|
3
|
+
## 必须阅读的文件
|
|
4
|
+
1. **CLAUDE.md** - Claude Code工作流程指南
|
|
5
|
+
2. **src/codeindex/README_AI.md** - 核心模块架构
|
|
6
|
+
3. **tests/README_AI.md** - 测试结构和覆盖
|
|
7
|
+
4. **docs/planning/** - Epic/Story规划文档
|
|
8
|
+
|
|
9
|
+
## 代码导航最佳实践
|
|
10
|
+
|
|
11
|
+
### 理解架构时
|
|
12
|
+
1. 先读 README_AI.md 文件(分层结构)
|
|
13
|
+
2. 使用 PROJECT_SYMBOLS.md 查找符号位置
|
|
14
|
+
3. 使用 find_symbol 查看具体定义
|
|
15
|
+
|
|
16
|
+
### 查找代码时
|
|
17
|
+
```python
|
|
18
|
+
# 查找符号定义
|
|
19
|
+
find_symbol(name_path_pattern="AdaptiveSymbolSelector")
|
|
20
|
+
|
|
21
|
+
# 查找符号引用
|
|
22
|
+
find_referencing_symbols(name_path="calculate_limit", relative_path="src/codeindex/adaptive_selector.py")
|
|
23
|
+
|
|
24
|
+
# 获取文件概览
|
|
25
|
+
get_symbols_overview(relative_path="src/codeindex/parser.py", depth=1)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## TDD开发流程(严格)
|
|
29
|
+
1. **Red**: 写失败的测试
|
|
30
|
+
2. **Green**: 实现最小代码使测试通过
|
|
31
|
+
3. **Refactor**: 重构优化
|
|
32
|
+
|
|
33
|
+
### 测试命令
|
|
34
|
+
```bash
|
|
35
|
+
# 运行所有测试
|
|
36
|
+
pytest -v
|
|
37
|
+
|
|
38
|
+
# 运行特定测试
|
|
39
|
+
pytest tests/test_new_feature.py -v
|
|
40
|
+
|
|
41
|
+
# 测试覆盖率
|
|
42
|
+
pytest --cov=src/codeindex --cov-report=term-missing
|
|
43
|
+
|
|
44
|
+
# 要求:核心模块 ≥ 90%,整体 ≥ 80%
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 代码质量检查
|
|
48
|
+
提交前必须通过:
|
|
49
|
+
```bash
|
|
50
|
+
# 1. 测试全部通过
|
|
51
|
+
pytest -v
|
|
52
|
+
|
|
53
|
+
# 2. 代码规范检查
|
|
54
|
+
ruff check src/
|
|
55
|
+
|
|
56
|
+
# 3. 类型检查(可选)
|
|
57
|
+
mypy src/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 修改代码流程
|
|
61
|
+
1. **创建feature分支**
|
|
62
|
+
2. **TDD实现**
|
|
63
|
+
3. **更新CHANGELOG.md**
|
|
64
|
+
4. **提交到develop**
|
|
65
|
+
5. **合并到master并打tag**
|
|
66
|
+
|
|
67
|
+
## 重要提醒
|
|
68
|
+
- ❌ 不要直接修改生成的 README_AI.md
|
|
69
|
+
- ❌ 不要跳过测试写实现
|
|
70
|
+
- ❌ 不要用 Glob/Grep 搜索代码
|
|
71
|
+
- ✅ 使用 Serena MCP 的符号工具
|
|
72
|
+
- ✅ 先读 README_AI.md 理解架构
|
|
73
|
+
- ✅ 遵循 GitFlow 工作流
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# codeindex 项目概览
|
|
2
|
+
|
|
3
|
+
## 项目目的
|
|
4
|
+
codeindex 是一个 AI 原生的代码索引工具,专为大型代码库设计。它自动使用 tree-sitter 解析和外部 AI CLI 生成智能文档 (`README_AI.md`),帮助理解大型代码库、新开发者入职和维护活文档。
|
|
5
|
+
|
|
6
|
+
## 技术栈
|
|
7
|
+
- **语言**: Python 3.10+
|
|
8
|
+
- **核心依赖**:
|
|
9
|
+
- click (CLI框架)
|
|
10
|
+
- pyyaml (配置文件)
|
|
11
|
+
- rich (终端输出)
|
|
12
|
+
- tree-sitter (代码解析)
|
|
13
|
+
- tree-sitter-python, tree-sitter-php (语言支持)
|
|
14
|
+
- **开发工具**:
|
|
15
|
+
- pytest (测试)
|
|
16
|
+
- ruff (代码格式化和检查)
|
|
17
|
+
- hatchling (构建)
|
|
18
|
+
|
|
19
|
+
## 代码风格和约定
|
|
20
|
+
- **行长度**: 100字符
|
|
21
|
+
- **代码格式**: 使用 ruff format
|
|
22
|
+
- **代码检查**: ruff check
|
|
23
|
+
- **测试**: TDD (测试驱动开发)
|
|
24
|
+
- **文档字符串**: 100%覆盖
|
|
25
|
+
- **类型提示**: Python 3.10+ 支持
|
|
26
|
+
|
|
27
|
+
## 命令使用
|
|
28
|
+
```bash
|
|
29
|
+
# 开发模式安装
|
|
30
|
+
pip install -e .
|
|
31
|
+
|
|
32
|
+
# 安装开发依赖
|
|
33
|
+
pip install -e ".[dev]"
|
|
34
|
+
|
|
35
|
+
# 运行测试
|
|
36
|
+
pytest
|
|
37
|
+
|
|
38
|
+
# 运行单个测试
|
|
39
|
+
pytest tests/test_parser.py::test_parse_simple_function
|
|
40
|
+
|
|
41
|
+
# 代码检查
|
|
42
|
+
ruff check src/
|
|
43
|
+
|
|
44
|
+
# 代码格式化
|
|
45
|
+
ruff format src/
|
|
46
|
+
|
|
47
|
+
# CLI使用
|
|
48
|
+
codeindex scan-all --fallback # 生成所有索引
|
|
49
|
+
codeindex status # 查看覆盖率
|
|
50
|
+
codeindex symbols # 生成符号索引
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 项目结构
|
|
54
|
+
```
|
|
55
|
+
src/codeindex/
|
|
56
|
+
├── cli.py # CLI入口点
|
|
57
|
+
├── scanner.py # 目录扫描
|
|
58
|
+
├── parser.py # tree-sitter解析
|
|
59
|
+
├── writer.py # 格式化和写入
|
|
60
|
+
├── invoker.py # AI CLI调用
|
|
61
|
+
├── config.py # 配置管理
|
|
62
|
+
├── smart_writer.py # 智能写入(分层)
|
|
63
|
+
├── hierarchical.py # 分层处理
|
|
64
|
+
├── symbol_scorer.py # 符号重要性评分 (v0.2.0新增)
|
|
65
|
+
├── adaptive_config.py # 自适应配置 (v0.2.0新增)
|
|
66
|
+
├── adaptive_selector.py # 自适应符号选择 (v0.2.0新增)
|
|
67
|
+
└── incremental.py # 增量更新
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 关键特性
|
|
71
|
+
1. **智能符号评分** (v0.2.0): 5维度评分系统,重要符号优先
|
|
72
|
+
2. **自适应符号提取** (v0.2.0): 根据文件大小动态调整符号数量
|
|
73
|
+
3. **分层文档生成**: 三级智能索引系统
|
|
74
|
+
4. **AI增强**: 支持Claude、OpenAI等AI CLI
|
|
75
|
+
5. **并行处理**: 支持多目录并发扫描
|
|
76
|
+
|
|
77
|
+
## 配置文件
|
|
78
|
+
- `.codeindex.yaml`: 项目配置文件
|
|
79
|
+
- 支持include/exclude模式
|
|
80
|
+
- 可配置AI命令
|
|
81
|
+
- 可配置语言支持
|
|
82
|
+
|
|
83
|
+
## Git工作流
|
|
84
|
+
- GitFlow: master ← develop ← feature/*
|
|
85
|
+
- 提交格式: feat/scope, fix/scope, docs/scope等
|
|
86
|
+
- 版本标签: v0.2.0等
|
|
87
|
+
|
|
88
|
+
## 重要文件
|
|
89
|
+
- `CLAUDE.md`: Claude Code工作指南
|
|
90
|
+
- `README_AI.md`: AI生成的目录文档(每个目录)
|
|
91
|
+
- `PROJECT_INDEX.md`: 项目概览索引
|
|
92
|
+
- `PROJECT_SYMBOLS.md`: 全局符号索引
|
|
93
|
+
- `CHANGELOG.md`: 版本变更历史
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# codeindex 常用命令
|
|
2
|
+
|
|
3
|
+
## 核心命令
|
|
4
|
+
```bash
|
|
5
|
+
# 生成所有目录索引(最常用)
|
|
6
|
+
codeindex scan-all --fallback
|
|
7
|
+
|
|
8
|
+
# 查看会扫描哪些目录
|
|
9
|
+
codeindex list-dirs
|
|
10
|
+
|
|
11
|
+
# 生成全局符号索引
|
|
12
|
+
codeindex symbols
|
|
13
|
+
|
|
14
|
+
# 查看索引覆盖率
|
|
15
|
+
codeindex status
|
|
16
|
+
|
|
17
|
+
# 初始化配置
|
|
18
|
+
codeindex init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 扫描命令
|
|
22
|
+
```bash
|
|
23
|
+
# 扫描单个目录
|
|
24
|
+
codeindex scan ./src/auth
|
|
25
|
+
|
|
26
|
+
# 预览prompt(不执行)
|
|
27
|
+
codeindex scan ./src/auth --dry-run
|
|
28
|
+
|
|
29
|
+
# 不使用AI生成(fallback模式)
|
|
30
|
+
codeindex scan ./src/auth --fallback
|
|
31
|
+
|
|
32
|
+
# AI增强所有目录(高质量)
|
|
33
|
+
codeindex scan-all --ai-all
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 开发命令
|
|
37
|
+
```bash
|
|
38
|
+
# 安装(开发模式)
|
|
39
|
+
pip install -e .
|
|
40
|
+
|
|
41
|
+
# 安装开发依赖
|
|
42
|
+
pip install -e ".[dev]"
|
|
43
|
+
|
|
44
|
+
# 运行测试
|
|
45
|
+
pytest
|
|
46
|
+
|
|
47
|
+
# 代码检查
|
|
48
|
+
ruff check src/
|
|
49
|
+
|
|
50
|
+
# 代码格式化
|
|
51
|
+
ruff format src/
|
|
52
|
+
|
|
53
|
+
# 重新生成所有索引
|
|
54
|
+
codeindex scan-all --fallback
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 高级命令
|
|
58
|
+
```bash
|
|
59
|
+
# 查看符号详情
|
|
60
|
+
codeindex find-symbol --name "ClassName" --path "./src/module.py"
|
|
61
|
+
|
|
62
|
+
# 查看符号引用
|
|
63
|
+
codeindex find-references --name "method_name"
|
|
64
|
+
|
|
65
|
+
# 增量更新(只更新变更文件)
|
|
66
|
+
codeindex scan-all --incremental
|
|
67
|
+
|
|
68
|
+
# 并行处理(提高速度)
|
|
69
|
+
codeindex scan-all --workers 8
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## MCP技能(已安装)
|
|
73
|
+
- `/mo:arch` - 查询代码架构
|
|
74
|
+
- `/mo:index` - 生成项目索引
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# list of languages for which language servers are started; choose from:
|
|
2
|
+
# al bash clojure cpp csharp
|
|
3
|
+
# csharp_omnisharp dart elixir elm erlang
|
|
4
|
+
# fortran fsharp go groovy haskell
|
|
5
|
+
# java julia kotlin lua markdown
|
|
6
|
+
# matlab nix pascal perl php
|
|
7
|
+
# powershell python python_jedi r rego
|
|
8
|
+
# ruby ruby_solargraph rust scala swift
|
|
9
|
+
# terraform toml typescript typescript_vts vue
|
|
10
|
+
# yaml zig
|
|
11
|
+
# (This list may be outdated. For the current list, see values of Language enum here:
|
|
12
|
+
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
|
|
13
|
+
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
|
|
14
|
+
# Note:
|
|
15
|
+
# - For C, use cpp
|
|
16
|
+
# - For JavaScript, use typescript
|
|
17
|
+
# - For Free Pascal/Lazarus, use pascal
|
|
18
|
+
# Special requirements:
|
|
19
|
+
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
20
|
+
# - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus.
|
|
21
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
22
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
23
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
24
|
+
languages:
|
|
25
|
+
- python
|
|
26
|
+
|
|
27
|
+
# the encoding used by text files in the project
|
|
28
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
29
|
+
encoding: "utf-8"
|
|
30
|
+
|
|
31
|
+
# whether to use project's .gitignore files to ignore files
|
|
32
|
+
ignore_all_files_in_gitignore: true
|
|
33
|
+
|
|
34
|
+
# list of additional paths to ignore in all projects
|
|
35
|
+
# same syntax as gitignore, so you can use * and **
|
|
36
|
+
ignored_paths: []
|
|
37
|
+
|
|
38
|
+
# whether the project is in read-only mode
|
|
39
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
40
|
+
# Added on 2025-04-18
|
|
41
|
+
read_only: false
|
|
42
|
+
|
|
43
|
+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
44
|
+
# Below is the complete list of tools for convenience.
|
|
45
|
+
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
46
|
+
# execute `uv run scripts/print_tool_overview.py`.
|
|
47
|
+
#
|
|
48
|
+
# * `activate_project`: Activates a project by name.
|
|
49
|
+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
50
|
+
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
51
|
+
# * `delete_lines`: Deletes a range of lines within a file.
|
|
52
|
+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
53
|
+
# * `execute_shell_command`: Executes a shell command.
|
|
54
|
+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
55
|
+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
56
|
+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
57
|
+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
58
|
+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
59
|
+
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
60
|
+
# Should only be used in settings where the system prompt cannot be set,
|
|
61
|
+
# e.g. in clients you have no control over, like Claude Desktop.
|
|
62
|
+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
63
|
+
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
64
|
+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
65
|
+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
66
|
+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
67
|
+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
68
|
+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
69
|
+
# * `read_file`: Reads a file within the project directory.
|
|
70
|
+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
71
|
+
# * `remove_project`: Removes a project from the Serena configuration.
|
|
72
|
+
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
73
|
+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
74
|
+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
75
|
+
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
76
|
+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
77
|
+
# * `switch_modes`: Activates modes by providing a list of their names
|
|
78
|
+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
79
|
+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
80
|
+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
81
|
+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
82
|
+
excluded_tools: []
|
|
83
|
+
|
|
84
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
85
|
+
# (contrary to the memories, which are loaded on demand).
|
|
86
|
+
initial_prompt: ""
|
|
87
|
+
# the name by which the project can be referenced within Serena
|
|
88
|
+
project_name: "codeindex"
|
|
89
|
+
|
|
90
|
+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
|
|
91
|
+
included_optional_tools: []
|
|
92
|
+
|
|
93
|
+
# list of mode names to that are always to be included in the set of active modes
|
|
94
|
+
# The full set of modes to be activated is base_modes + default_modes.
|
|
95
|
+
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
|
|
96
|
+
# Otherwise, this setting overrides the global configuration.
|
|
97
|
+
# Set this to [] to disable base modes for this project.
|
|
98
|
+
# Set this to a list of mode names to always include the respective modes for this project.
|
|
99
|
+
base_modes:
|
|
100
|
+
|
|
101
|
+
# list of mode names that are to be activated by default.
|
|
102
|
+
# The full set of modes to be activated is base_modes + default_modes.
|
|
103
|
+
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
|
|
104
|
+
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
|
|
105
|
+
# This setting can, in turn, be overridden by CLI parameters (--mode).
|
|
106
|
+
default_modes:
|
|
107
|
+
|
|
108
|
+
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
|
109
|
+
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
|
|
110
|
+
fixed_tools: []
|