repolens-ai 0.1.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.
Files changed (149) hide show
  1. repolens_ai-0.1.0/.gitattributes +2 -0
  2. repolens_ai-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  3. repolens_ai-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
  4. repolens_ai-0.1.0/.github/pull_request_template.md +24 -0
  5. repolens_ai-0.1.0/.github/workflows/ci.yml +46 -0
  6. repolens_ai-0.1.0/.github/workflows/provider-smoke.yml +45 -0
  7. repolens_ai-0.1.0/.gitignore +47 -0
  8. repolens_ai-0.1.0/CHANGELOG.md +50 -0
  9. repolens_ai-0.1.0/CONTRIBUTING.md +55 -0
  10. repolens_ai-0.1.0/LICENSE +158 -0
  11. repolens_ai-0.1.0/PKG-INFO +294 -0
  12. repolens_ai-0.1.0/README.md +261 -0
  13. repolens_ai-0.1.0/ROADMAP.md +41 -0
  14. repolens_ai-0.1.0/SECURITY.md +58 -0
  15. repolens_ai-0.1.0/docs/benchmarks/README.md +109 -0
  16. repolens_ai-0.1.0/docs/benchmarks/results/latest.json +49 -0
  17. repolens_ai-0.1.0/docs/benchmarks/results/latest.md +22 -0
  18. repolens_ai-0.1.0/docs/commands/README.md +464 -0
  19. repolens_ai-0.1.0/docs/provider-smoke.md +68 -0
  20. repolens_ai-0.1.0/docs/release-checklist.md +78 -0
  21. repolens_ai-0.1.0/docs/safety.md +146 -0
  22. repolens_ai-0.1.0/examples/repos/fullstack-lite/README.md +22 -0
  23. repolens_ai-0.1.0/examples/repos/fullstack-lite/app/__init__.py +1 -0
  24. repolens_ai-0.1.0/examples/repos/fullstack-lite/app/api.py +17 -0
  25. repolens_ai-0.1.0/examples/repos/fullstack-lite/app/auth.py +9 -0
  26. repolens_ai-0.1.0/examples/repos/fullstack-lite/app/users.py +3 -0
  27. repolens_ai-0.1.0/examples/repos/fullstack-lite/pyproject.toml +4 -0
  28. repolens_ai-0.1.0/examples/repos/fullstack-lite/tests/test_auth.py +9 -0
  29. repolens_ai-0.1.0/examples/repos/fullstack-lite/web/login.ts +3 -0
  30. repolens_ai-0.1.0/pyproject.toml +80 -0
  31. repolens_ai-0.1.0/repolens/__init__.py +3 -0
  32. repolens_ai-0.1.0/repolens/agents/__init__.py +1 -0
  33. repolens_ai-0.1.0/repolens/agents/coder.py +316 -0
  34. repolens_ai-0.1.0/repolens/agents/context_agent.py +37 -0
  35. repolens_ai-0.1.0/repolens/agents/failure_parser.py +98 -0
  36. repolens_ai-0.1.0/repolens/agents/orchestrator.py +548 -0
  37. repolens_ai-0.1.0/repolens/agents/planner.py +99 -0
  38. repolens_ai-0.1.0/repolens/agents/repair.py +145 -0
  39. repolens_ai-0.1.0/repolens/agents/reviewer.py +443 -0
  40. repolens_ai-0.1.0/repolens/agents/safety.py +50 -0
  41. repolens_ai-0.1.0/repolens/agents/test_agent.py +242 -0
  42. repolens_ai-0.1.0/repolens/analytics/__init__.py +1 -0
  43. repolens_ai-0.1.0/repolens/analytics/model_switch.py +243 -0
  44. repolens_ai-0.1.0/repolens/analytics/optimizer.py +236 -0
  45. repolens_ai-0.1.0/repolens/analytics/reports.py +42 -0
  46. repolens_ai-0.1.0/repolens/analytics/savings.py +57 -0
  47. repolens_ai-0.1.0/repolens/analytics/usage.py +147 -0
  48. repolens_ai-0.1.0/repolens/benchmarks/__init__.py +1 -0
  49. repolens_ai-0.1.0/repolens/benchmarks/capability.py +227 -0
  50. repolens_ai-0.1.0/repolens/benchmarks/runner.py +576 -0
  51. repolens_ai-0.1.0/repolens/cache/__init__.py +1 -0
  52. repolens_ai-0.1.0/repolens/cache/build_cache.py +77 -0
  53. repolens_ai-0.1.0/repolens/cache/context_cache.py +117 -0
  54. repolens_ai-0.1.0/repolens/cache/db.py +158 -0
  55. repolens_ai-0.1.0/repolens/cache/failure_cache.py +143 -0
  56. repolens_ai-0.1.0/repolens/cache/fix_cache.py +91 -0
  57. repolens_ai-0.1.0/repolens/cache/keys.py +74 -0
  58. repolens_ai-0.1.0/repolens/cache/prompt_cache.py +122 -0
  59. repolens_ai-0.1.0/repolens/cli/__init__.py +1 -0
  60. repolens_ai-0.1.0/repolens/cli/app.py +43 -0
  61. repolens_ai-0.1.0/repolens/cli/commands/__init__.py +1 -0
  62. repolens_ai-0.1.0/repolens/cli/commands/agent.py +70 -0
  63. repolens_ai-0.1.0/repolens/cli/commands/compare.py +107 -0
  64. repolens_ai-0.1.0/repolens/cli/commands/fix.py +659 -0
  65. repolens_ai-0.1.0/repolens/cli/commands/graph.py +100 -0
  66. repolens_ai-0.1.0/repolens/cli/commands/init.py +39 -0
  67. repolens_ai-0.1.0/repolens/cli/commands/memory.py +55 -0
  68. repolens_ai-0.1.0/repolens/cli/commands/optimize.py +45 -0
  69. repolens_ai-0.1.0/repolens/cli/commands/providers.py +43 -0
  70. repolens_ai-0.1.0/repolens/cli/commands/review.py +102 -0
  71. repolens_ai-0.1.0/repolens/cli/commands/skills.py +43 -0
  72. repolens_ai-0.1.0/repolens/cli/commands/stats.py +16 -0
  73. repolens_ai-0.1.0/repolens/config/__init__.py +1 -0
  74. repolens_ai-0.1.0/repolens/config/context_policy.py +140 -0
  75. repolens_ai-0.1.0/repolens/config/defaults.py +8 -0
  76. repolens_ai-0.1.0/repolens/config/providers.py +280 -0
  77. repolens_ai-0.1.0/repolens/config/settings.py +143 -0
  78. repolens_ai-0.1.0/repolens/context/__init__.py +1 -0
  79. repolens_ai-0.1.0/repolens/context/compressor.py +137 -0
  80. repolens_ai-0.1.0/repolens/context/model.py +96 -0
  81. repolens_ai-0.1.0/repolens/context/packer.py +66 -0
  82. repolens_ai-0.1.0/repolens/context/ranker.py +50 -0
  83. repolens_ai-0.1.0/repolens/context/selector.py +240 -0
  84. repolens_ai-0.1.0/repolens/graph/__init__.py +1 -0
  85. repolens_ai-0.1.0/repolens/graph/builder.py +233 -0
  86. repolens_ai-0.1.0/repolens/graph/model.py +74 -0
  87. repolens_ai-0.1.0/repolens/graph/parsers.py +251 -0
  88. repolens_ai-0.1.0/repolens/graph/queries.py +266 -0
  89. repolens_ai-0.1.0/repolens/graph/test_mapper.py +42 -0
  90. repolens_ai-0.1.0/repolens/memory/__init__.py +1 -0
  91. repolens_ai-0.1.0/repolens/memory/detector.py +195 -0
  92. repolens_ai-0.1.0/repolens/memory/store.py +90 -0
  93. repolens_ai-0.1.0/repolens/memory/summary.py +89 -0
  94. repolens_ai-0.1.0/repolens/patches/__init__.py +23 -0
  95. repolens_ai-0.1.0/repolens/patches/apply.py +146 -0
  96. repolens_ai-0.1.0/repolens/patches/engine.py +58 -0
  97. repolens_ai-0.1.0/repolens/patches/surgical.py +212 -0
  98. repolens_ai-0.1.0/repolens/patches/unified_diff.py +157 -0
  99. repolens_ai-0.1.0/repolens/providers/__init__.py +26 -0
  100. repolens_ai-0.1.0/repolens/providers/anthropic.py +104 -0
  101. repolens_ai-0.1.0/repolens/providers/base.py +69 -0
  102. repolens_ai-0.1.0/repolens/providers/cached.py +67 -0
  103. repolens_ai-0.1.0/repolens/providers/deepseek.py +75 -0
  104. repolens_ai-0.1.0/repolens/providers/google.py +121 -0
  105. repolens_ai-0.1.0/repolens/providers/ollama.py +58 -0
  106. repolens_ai-0.1.0/repolens/providers/openai.py +105 -0
  107. repolens_ai-0.1.0/repolens/providers/pricing.py +256 -0
  108. repolens_ai-0.1.0/repolens/providers/registry.py +32 -0
  109. repolens_ai-0.1.0/repolens/runtime/__init__.py +1 -0
  110. repolens_ai-0.1.0/repolens/runtime/context.py +164 -0
  111. repolens_ai-0.1.0/repolens/skills/__init__.py +5 -0
  112. repolens_ai-0.1.0/repolens/skills/catalog.py +225 -0
  113. repolens_ai-0.1.0/repolens/tokenizer/__init__.py +1 -0
  114. repolens_ai-0.1.0/repolens/tokenizer/counter.py +67 -0
  115. repolens_ai-0.1.0/repolens/utils/__init__.py +1 -0
  116. repolens_ai-0.1.0/repolens/utils/http.py +92 -0
  117. repolens_ai-0.1.0/scripts/deepseek_fullstack_dogfood.py +350 -0
  118. repolens_ai-0.1.0/scripts/deepseek_multilang_agent_dogfood.py +227 -0
  119. repolens_ai-0.1.0/scripts/provider_smoke.py +153 -0
  120. repolens_ai-0.1.0/scripts/run_benchmarks.py +76 -0
  121. repolens_ai-0.1.0/scripts/run_capability_benchmark.py +48 -0
  122. repolens_ai-0.1.0/tests/__init__.py +1 -0
  123. repolens_ai-0.1.0/tests/fixtures/.gitkeep +1 -0
  124. repolens_ai-0.1.0/tests/unit/__init__.py +1 -0
  125. repolens_ai-0.1.0/tests/unit/test_agent_gap_fixes.py +135 -0
  126. repolens_ai-0.1.0/tests/unit/test_benchmarks.py +81 -0
  127. repolens_ai-0.1.0/tests/unit/test_capability.py +83 -0
  128. repolens_ai-0.1.0/tests/unit/test_coder.py +730 -0
  129. repolens_ai-0.1.0/tests/unit/test_context.py +145 -0
  130. repolens_ai-0.1.0/tests/unit/test_deepseek_fullstack_dogfood.py +67 -0
  131. repolens_ai-0.1.0/tests/unit/test_deepseek_multilang_dogfood.py +50 -0
  132. repolens_ai-0.1.0/tests/unit/test_failure_parser.py +53 -0
  133. repolens_ai-0.1.0/tests/unit/test_graph.py +169 -0
  134. repolens_ai-0.1.0/tests/unit/test_init.py +72 -0
  135. repolens_ai-0.1.0/tests/unit/test_memory.py +106 -0
  136. repolens_ai-0.1.0/tests/unit/test_model_switch.py +122 -0
  137. repolens_ai-0.1.0/tests/unit/test_optimize.py +173 -0
  138. repolens_ai-0.1.0/tests/unit/test_orchestrator.py +246 -0
  139. repolens_ai-0.1.0/tests/unit/test_patches.py +255 -0
  140. repolens_ai-0.1.0/tests/unit/test_prompt_build_cache.py +100 -0
  141. repolens_ai-0.1.0/tests/unit/test_provider_settings.py +124 -0
  142. repolens_ai-0.1.0/tests/unit/test_provider_smoke_script.py +77 -0
  143. repolens_ai-0.1.0/tests/unit/test_provider_token_stats.py +336 -0
  144. repolens_ai-0.1.0/tests/unit/test_repair_memory.py +37 -0
  145. repolens_ai-0.1.0/tests/unit/test_review.py +236 -0
  146. repolens_ai-0.1.0/tests/unit/test_runtime_context.py +213 -0
  147. repolens_ai-0.1.0/tests/unit/test_safety.py +33 -0
  148. repolens_ai-0.1.0/tests/unit/test_skill_catalog.py +71 -0
  149. repolens_ai-0.1.0/tests/unit/test_test_agent.py +70 -0
@@ -0,0 +1,2 @@
1
+ # Normalize line endings to LF in the repository
2
+ * text=auto eol=lf
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report incorrect RepoLens behavior
4
+ title: "[Bug]: "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## What happened?
10
+
11
+ Describe the bug.
12
+
13
+ ## Expected behavior
14
+
15
+ What should RepoLens have done?
16
+
17
+ ## Reproduction
18
+
19
+ ```bash
20
+ repolens ...
21
+ ```
22
+
23
+ ## Environment
24
+
25
+ - OS:
26
+ - Python version:
27
+ - RepoLens version or commit:
28
+ - Provider/model, if relevant:
29
+
30
+ ## Output
31
+
32
+ Paste relevant output. Remove provider keys, secrets, tokens, and private data.
33
+
34
+ ## Impact
35
+
36
+ - [ ] Incorrect patch
37
+ - [ ] Excessive context/tokens
38
+ - [ ] Graph impact issue
39
+ - [ ] Cache/stats issue
40
+ - [ ] Test/repair issue
41
+ - [ ] Packaging/install issue
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an RepoLens improvement
4
+ title: "[Feature]: "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem
10
+
11
+ What developer pain should this solve?
12
+
13
+ ## Proposed behavior
14
+
15
+ Describe the desired command, output, or workflow.
16
+
17
+ ## Success metric
18
+
19
+ Which measurable outcome should improve?
20
+
21
+ - [ ] Token reduction
22
+ - [ ] Cache reuse
23
+ - [ ] Files avoided
24
+ - [ ] Patch accuracy
25
+ - [ ] Cost saved
26
+ - [ ] Targeted test pass rate
27
+
28
+ ## Alternatives considered
29
+
30
+ Describe any simpler approach or workaround.
@@ -0,0 +1,24 @@
1
+ ## Summary
2
+
3
+ Describe the change and why it matters.
4
+
5
+ ## Verification
6
+
7
+ - [ ] `python -m pytest tests\unit`
8
+ - [ ] `python -m ruff check repolens tests scripts`
9
+ - [ ] `python -m compileall repolens tests scripts`
10
+ - [ ] `python scripts\run_benchmarks.py`
11
+ - [ ] `python -m build`
12
+
13
+ ## Product Impact
14
+
15
+ - [ ] Token efficiency
16
+ - [ ] Patch precision
17
+ - [ ] Code graph intelligence
18
+ - [ ] Cache/cost analytics
19
+ - [ ] Tests/repair workflow
20
+ - [ ] Documentation/release hygiene
21
+
22
+ ## Notes
23
+
24
+ Mention any tradeoffs, follow-up work, or intentionally unsupported cases.
@@ -0,0 +1,46 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Python ${{ matrix.python-version }}
12
+ runs-on: windows-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version: ["3.11", "3.12", "3.13"]
17
+
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install -e ".[dev]"
31
+ python -m pip install build
32
+
33
+ - name: Lint
34
+ run: python -m ruff check repolens tests scripts
35
+
36
+ - name: Unit tests
37
+ run: python -m pytest tests\unit
38
+
39
+ - name: Compile
40
+ run: python -m compileall repolens tests scripts
41
+
42
+ - name: Benchmarks
43
+ run: python scripts\run_benchmarks.py --output-dir docs\benchmarks\results
44
+
45
+ - name: Build package
46
+ run: python -m build
@@ -0,0 +1,45 @@
1
+ name: Provider Smoke
2
+
3
+ # Manual only: this calls real provider APIs and consumes credits, so it never
4
+ # runs automatically. Add the relevant *_API_KEY values as repository secrets;
5
+ # providers without a configured secret are skipped safely.
6
+ on:
7
+ workflow_dispatch:
8
+ inputs:
9
+ provider:
10
+ description: "Provider to smoke (all | openai | anthropic | google | deepseek | ollama)"
11
+ required: true
12
+ default: "deepseek"
13
+ model:
14
+ description: "Optional model override (blank = provider default)"
15
+ required: false
16
+ default: ""
17
+
18
+ jobs:
19
+ smoke:
20
+ name: Provider smoke (${{ inputs.provider }})
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.12"
30
+
31
+ - name: Install
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install -e .
35
+
36
+ - name: Run provider smoke
37
+ env:
38
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
40
+ GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
41
+ DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
42
+ run: |
43
+ ARGS="--provider ${{ inputs.provider }}"
44
+ if [ -n "${{ inputs.model }}" ]; then ARGS="$ARGS --model ${{ inputs.model }}"; fi
45
+ python scripts/provider_smoke.py $ARGS
@@ -0,0 +1,47 @@
1
+ # Python bytecode / caches
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+
8
+ # Virtual environments
9
+ .venv/
10
+ venv/
11
+
12
+ # Build / packaging artifacts
13
+ dist/
14
+ build/
15
+ *.egg-info/
16
+
17
+ # Secrets / environment
18
+ .env
19
+ .env.*
20
+ !.env.example
21
+
22
+ # RepoLens local runtime state (config + SQLite databases)
23
+ .repolens/
24
+ *.sqlite3
25
+
26
+ # Documentation: publish user-facing docs; keep internal/strategy docs local.
27
+ docs/implementation-plan.md
28
+ docs/harvest/
29
+ docs/architecture/
30
+ docs/adrs/
31
+ docs/dogfood/
32
+
33
+ # Local run / smoke-test scratch directories
34
+ .live-run/
35
+ .smoke-venv/
36
+ .smoke-repo/
37
+
38
+ # Vendored reference projects: local-only architecture references.
39
+ # Reference-only, excluded from the sdist, ~199MB, and each contains its own
40
+ # nested .git. Kept out of the published repo; the harvest analysis lives in docs/.
41
+ external/
42
+
43
+ # Local agent / editor tooling config (not part of the product)
44
+ .claude/
45
+
46
+ # Preserved original README before docs links were trimmed (local only)
47
+ readmeoriginal.md
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to RepoLens are documented in this file.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/), and the
5
+ project aims to follow [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [0.1.0] — Unreleased
8
+
9
+ First public release. Feature-complete MVP; 158 tests passing, ruff + compile clean.
10
+
11
+ ### Added
12
+
13
+ - **Providers** — abstraction over OpenAI, Anthropic, Google AI Studio, DeepSeek,
14
+ and Ollama. Provider, model, base URL, and pricing are resolved entirely from
15
+ the environment or repo config — no model id is hardcoded, and pricing is
16
+ user-owned (`[pricing]` in `.repolens/config.toml`). `repolens providers`
17
+ shows the effective resolution and the precedence layer that decided it.
18
+ - **Code graph** — files, imports, classes, functions, routes, and tests stored
19
+ in SQLite. `repolens graph build` / `impact` / `explain`.
20
+ - **Graph-aware context selection** — ranked, compressed, budget-packed context
21
+ with token-reduction reporting.
22
+ - **Patch engine** — surgical (AST symbol), unified diff, and full-file modes;
23
+ in-repo containment, dirty-git guard, and dry-run by default.
24
+ - **Caches (SQLite)** — deterministic prompt-response cache, context cache,
25
+ validated-fix cache, failure cache, and build-command outcome cache.
26
+ - **Agent workflow** — `repolens agent fix`: plan → context → code → review →
27
+ test → repair. Includes graph blast-radius planning, malformed-patch retry,
28
+ structured failure parsing, a bounded scope-fenced repair loop, and an optional
29
+ provider-backed patch review (`--review-provider`).
30
+ - **Review & safety** — deterministic local patch-review lint (secrets/risk) with
31
+ targeted tests as the real correctness gate; command safety classification;
32
+ documented safety policy (`docs/safety.md`).
33
+ - **Model comparison** — `repolens compare` runs one scoped task across providers
34
+ on isolated repo copies and reports tokens/cost/patch/tests/repairs.
35
+ - **Analytics & memory** — `repolens stats`, `repolens optimize`, and durable
36
+ repository memory.
37
+ - **Skills/agents catalog** — `repolens skills` lists capabilities, owners, and
38
+ implementation status (guarded by a consistency test).
39
+ - **Benchmarks** — deterministic token-reduction smoke checks, an honest
40
+ real-repo reduction measure (95.5% on RepoLens's own source), and an agent
41
+ capability benchmark (pass-rate on seeded bug fixtures).
42
+ - **CI** — lint/test/compile/build on Python 3.11–3.13, plus a manual
43
+ provider-smoke workflow.
44
+
45
+ ### Notes
46
+
47
+ - The token-reduction benchmark on fixed fixtures is a smoke check, not a
48
+ competitive benchmark; the real-repo number is the honest figure to cite.
49
+ - Non-Anthropic pricing defaults are convenience estimates; unpriced models
50
+ report cost as not set rather than guessing.
@@ -0,0 +1,55 @@
1
+ # Contributing to RepoLens
2
+
3
+ Thank you for helping build RepoLens.
4
+
5
+ RepoLens is an Agentic Coding CLI with Code Graph Intelligence. Contributions
6
+ should strengthen one of the core outcomes:
7
+
8
+ - Reduce input tokens without losing relevant context.
9
+ - Produce precise patches.
10
+ - Improve code graph intelligence.
11
+ - Improve repository memory.
12
+ - Improve cost, cache, test, or repair visibility.
13
+
14
+ ## Local Setup
15
+
16
+ ```bash
17
+ python -m venv .venv
18
+ .venv\Scripts\activate
19
+ pip install -e ".[dev]"
20
+ ```
21
+
22
+ Run checks:
23
+
24
+ ```bash
25
+ python -m pytest tests\unit
26
+ python -m ruff check repolens tests scripts
27
+ python -m compileall repolens tests scripts
28
+ python scripts\run_benchmarks.py
29
+ python -m build
30
+ ```
31
+
32
+ ## Development Rules
33
+
34
+ - Keep the MVP command surface small.
35
+ - Prefer graph-aware context over brute-force repository dumps.
36
+ - Prefer surgical patches over full-file rewrites.
37
+ - Record token/cost/cache metrics for provider-backed workflows.
38
+ - Add focused tests for every behavior change.
39
+ - Do not commit `.repolens/`, `.env`, provider keys, or local build artifacts.
40
+ - Do not vendor code from reference projects unless the license and attribution
41
+ have been reviewed.
42
+
43
+ ## Pull Request Checklist
44
+
45
+ - Tests added or updated.
46
+ - `python -m pytest tests\unit` passes.
47
+ - `python -m ruff check repolens tests scripts` passes.
48
+ - `python -m compileall repolens tests scripts` passes.
49
+ - Benchmarks still pass when the change affects graph, context, patching, cache,
50
+ tests, or repair.
51
+ - Docs updated when command behavior changes.
52
+
53
+ ## Commit Scope
54
+
55
+ Keep changes focused. Separate unrelated refactors from behavior changes.
@@ -0,0 +1,158 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
62
+ License, each Contributor hereby grants to You a perpetual, worldwide,
63
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
64
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
65
+ sublicense, and distribute the Work and such Derivative Works in Source or
66
+ Object form.
67
+
68
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
69
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
70
+ no-charge, royalty-free, irrevocable patent license to make, have made, use,
71
+ offer to sell, sell, import, and otherwise transfer the Work, where such license
72
+ applies only to those patent claims licensable by such Contributor that are
73
+ necessarily infringed by their Contribution alone or by combination of their
74
+ Contribution with the Work to which such Contribution was submitted. If You
75
+ institute patent litigation against any entity (including a cross-claim or
76
+ counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated
77
+ within the Work constitutes direct or contributory patent infringement, then any
78
+ patent licenses granted to You under this License for that Work shall terminate
79
+ as of the date such litigation is filed.
80
+
81
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
82
+ Derivative Works thereof in any medium, with or without modifications, and in
83
+ Source or Object form, provided that You meet the following conditions:
84
+
85
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
86
+ this License; and
87
+
88
+ (b) You must cause any modified files to carry prominent notices stating that
89
+ You changed the files; and
90
+
91
+ (c) You must retain, in the Source form of any Derivative Works that You
92
+ distribute, all copyright, patent, trademark, and attribution notices from the
93
+ Source form of the Work, excluding those notices that do not pertain to any part
94
+ of the Derivative Works; and
95
+
96
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
97
+ any Derivative Works that You distribute must include a readable copy of the
98
+ attribution notices contained within such NOTICE file, excluding those notices
99
+ that do not pertain to any part of the Derivative Works, in at least one of the
100
+ following places: within a NOTICE text file distributed as part of the
101
+ Derivative Works; within the Source form or documentation, if provided along
102
+ with the Derivative Works; or within a display generated by the Derivative
103
+ Works, if and wherever such third-party notices normally appear. The contents of
104
+ the NOTICE file are for informational purposes only and do not modify the
105
+ License. You may add Your own attribution notices within Derivative Works that
106
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
107
+ provided that such additional attribution notices cannot be construed as
108
+ modifying the License.
109
+
110
+ You may add Your own copyright statement to Your modifications and may provide
111
+ additional or different license terms and conditions for use, reproduction, or
112
+ distribution of Your modifications, or for any such Derivative Works as a whole,
113
+ provided Your use, reproduction, and distribution of the Work otherwise complies
114
+ with the conditions stated in this License.
115
+
116
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
117
+ Contribution intentionally submitted for inclusion in the Work by You to the
118
+ Licensor shall be under the terms and conditions of this License, without any
119
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
120
+ supersede or modify the terms of any separate license agreement you may have
121
+ executed with Licensor regarding such Contributions.
122
+
123
+ 6. Trademarks. This License does not grant permission to use the trade names,
124
+ trademarks, service marks, or product names of the Licensor, except as required
125
+ for reasonable and customary use in describing the origin of the Work and
126
+ reproducing the content of the NOTICE file.
127
+
128
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
129
+ writing, Licensor provides the Work (and each Contributor provides its
130
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
131
+ KIND, either express or implied, including, without limitation, any warranties or
132
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
133
+ PARTICULAR PURPOSE. You are solely responsible for determining the
134
+ appropriateness of using or redistributing the Work and assume any risks
135
+ associated with Your exercise of permissions under this License.
136
+
137
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
138
+ tort (including negligence), contract, or otherwise, unless required by
139
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
140
+ writing, shall any Contributor be liable to You for damages, including any
141
+ direct, indirect, special, incidental, or consequential damages of any character
142
+ arising as a result of this License or out of the use or inability to use the
143
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
144
+ computer failure or malfunction, or any and all other commercial damages or
145
+ losses), even if such Contributor has been advised of the possibility of such
146
+ damages.
147
+
148
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
149
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
150
+ acceptance of support, warranty, indemnity, or other liability obligations
151
+ and/or rights consistent with this License. However, in accepting such
152
+ obligations, You may act only on Your own behalf and on Your sole
153
+ responsibility, not on behalf of any other Contributor, and only if You agree to
154
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
155
+ by, or claims asserted against, such Contributor by reason of your accepting any
156
+ such warranty or additional liability.
157
+
158
+ END OF TERMS AND CONDITIONS