flowindex 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.
- flowindex-0.1.0/.github/workflows/ci.yml +14 -0
- flowindex-0.1.0/.github/workflows/publish.yml +22 -0
- flowindex-0.1.0/.gitignore +10 -0
- flowindex-0.1.0/LICENSE +21 -0
- flowindex-0.1.0/PKG-INFO +267 -0
- flowindex-0.1.0/README.md +231 -0
- flowindex-0.1.0/docs/LAUNCH.md +64 -0
- flowindex-0.1.0/docs/PYPI.md +32 -0
- flowindex-0.1.0/docs/SHOW_HN.md +50 -0
- flowindex-0.1.0/docs/cli.md +51 -0
- flowindex-0.1.0/docs/concepts.md +55 -0
- flowindex-0.1.0/docs/demo-output.txt +66 -0
- flowindex-0.1.0/docs/examples.md +38 -0
- flowindex-0.1.0/docs/index.md +8 -0
- flowindex-0.1.0/docs/mcp.md +47 -0
- flowindex-0.1.0/examples/python_fastapi_app/main.py +66 -0
- flowindex-0.1.0/examples/python_fastapi_app/services/ledger.py +14 -0
- flowindex-0.1.0/examples/python_fastapi_app/services/payments.py +18 -0
- flowindex-0.1.0/examples/python_fastapi_app/services/refunds.py +11 -0
- flowindex-0.1.0/examples/python_fastapi_app/tests/test_payments.py +44 -0
- flowindex-0.1.0/examples/ts_express_app/routes/payments.js +21 -0
- flowindex-0.1.0/examples/ts_express_app/routes/refunds.js +10 -0
- flowindex-0.1.0/examples/ts_express_app/server.js +13 -0
- flowindex-0.1.0/examples/ts_express_app/services/events.js +5 -0
- flowindex-0.1.0/examples/ts_express_app/services/ledger.js +12 -0
- flowindex-0.1.0/examples/ts_express_app/services/payments.js +14 -0
- flowindex-0.1.0/examples/ts_express_app/services/refunds.js +5 -0
- flowindex-0.1.0/examples/ts_express_app/tests/payments.test.js +27 -0
- flowindex-0.1.0/flowindex/__init__.py +3 -0
- flowindex-0.1.0/flowindex/cli.py +198 -0
- flowindex-0.1.0/flowindex/config.py +181 -0
- flowindex-0.1.0/flowindex/db/__init__.py +12 -0
- flowindex-0.1.0/flowindex/db/migrations.py +12 -0
- flowindex-0.1.0/flowindex/db/models.py +127 -0
- flowindex-0.1.0/flowindex/db/session.py +45 -0
- flowindex-0.1.0/flowindex/frameworks/__init__.py +0 -0
- flowindex-0.1.0/flowindex/frameworks/django.py +43 -0
- flowindex-0.1.0/flowindex/frameworks/express.py +44 -0
- flowindex-0.1.0/flowindex/frameworks/fastapi.py +46 -0
- flowindex-0.1.0/flowindex/frameworks/flask.py +50 -0
- flowindex-0.1.0/flowindex/frameworks/nextjs.py +68 -0
- flowindex-0.1.0/flowindex/indexer/__init__.py +5 -0
- flowindex-0.1.0/flowindex/indexer/context_pack.py +163 -0
- flowindex-0.1.0/flowindex/indexer/entrypoints.py +12 -0
- flowindex-0.1.0/flowindex/indexer/explain.py +85 -0
- flowindex-0.1.0/flowindex/indexer/git_history.py +146 -0
- flowindex-0.1.0/flowindex/indexer/graph.py +194 -0
- flowindex-0.1.0/flowindex/indexer/impact.py +244 -0
- flowindex-0.1.0/flowindex/indexer/overview.py +44 -0
- flowindex-0.1.0/flowindex/indexer/pipeline.py +129 -0
- flowindex-0.1.0/flowindex/indexer/scanner.py +53 -0
- flowindex-0.1.0/flowindex/indexer/symbols.py +121 -0
- flowindex-0.1.0/flowindex/indexer/tests.py +90 -0
- flowindex-0.1.0/flowindex/mcp/__init__.py +1 -0
- flowindex-0.1.0/flowindex/mcp/server.py +52 -0
- flowindex-0.1.0/flowindex/mcp/tools.py +106 -0
- flowindex-0.1.0/flowindex/parsers/__init__.py +1 -0
- flowindex-0.1.0/flowindex/parsers/base.py +16 -0
- flowindex-0.1.0/flowindex/parsers/python_parser.py +160 -0
- flowindex-0.1.0/flowindex/parsers/ts_parser.py +119 -0
- flowindex-0.1.0/flowindex/render/__init__.py +0 -0
- flowindex-0.1.0/flowindex/render/markdown.py +38 -0
- flowindex-0.1.0/flowindex/render/tables.py +65 -0
- flowindex-0.1.0/flowindex/schemas.py +126 -0
- flowindex-0.1.0/pyproject.toml +82 -0
- flowindex-0.1.0/scripts/demo.tape +24 -0
- flowindex-0.1.0/scripts/record-demo.sh +20 -0
- flowindex-0.1.0/scripts/run-demo.sh +28 -0
- flowindex-0.1.0/tests/conftest.py +53 -0
- flowindex-0.1.0/tests/test_cli.py +38 -0
- flowindex-0.1.0/tests/test_context_pack.py +19 -0
- flowindex-0.1.0/tests/test_entrypoints.py +27 -0
- flowindex-0.1.0/tests/test_git_history.py +31 -0
- flowindex-0.1.0/tests/test_impact.py +28 -0
- flowindex-0.1.0/tests/test_python_parser.py +52 -0
- flowindex-0.1.0/tests/test_ts_parser.py +44 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
test:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v4
|
|
8
|
+
- uses: actions/setup-python@v5
|
|
9
|
+
with:
|
|
10
|
+
python-version: "3.11"
|
|
11
|
+
- run: pip install -e ".[dev]"
|
|
12
|
+
- run: ruff check .
|
|
13
|
+
- run: mypy flowindex
|
|
14
|
+
- run: pytest
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
- run: pip install build
|
|
21
|
+
- run: python -m build
|
|
22
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
flowindex-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FlowIndex 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.
|
flowindex-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flowindex
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Behavior-first repository indexing for AI coding agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/adu3110/flowIndex
|
|
6
|
+
Project-URL: Repository, https://github.com/adu3110/flowIndex
|
|
7
|
+
Project-URL: Documentation, https://github.com/adu3110/flowIndex/tree/main/docs
|
|
8
|
+
Project-URL: Issues, https://github.com/adu3110/flowIndex/issues
|
|
9
|
+
Author: Aditi Chatterji
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agents,ai,code-analysis,developer-tools,mcp
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: gitpython>=3.1
|
|
21
|
+
Requires-Dist: pydantic>=2.6
|
|
22
|
+
Requires-Dist: rich>=13.7
|
|
23
|
+
Requires-Dist: sqlmodel>=0.0.22
|
|
24
|
+
Requires-Dist: tomli-w>=1.0
|
|
25
|
+
Requires-Dist: tomli>=2.0; python_version < '3.11'
|
|
26
|
+
Requires-Dist: typer>=0.12
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
32
|
+
Requires-Dist: types-toml>=0.10; extra == 'dev'
|
|
33
|
+
Provides-Extra: mcp
|
|
34
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# FlowIndex
|
|
38
|
+
|
|
39
|
+
[](https://github.com/adu3110/flowIndex/actions/workflows/ci.yml)
|
|
40
|
+
[](https://pypi.org/project/flowindex/)
|
|
41
|
+
[](LICENSE)
|
|
42
|
+
|
|
43
|
+
Behavior-first repository indexing for AI coding agents.
|
|
44
|
+
|
|
45
|
+
FlowIndex maps how a codebase behaves: entrypoints, call paths, tests, runtime traces, and git history. It helps AI coding agents understand impact before editing code.
|
|
46
|
+
|
|
47
|
+
Most coding-agent tools index files, chunks, symbols, or embeddings. FlowIndex indexes behavior.
|
|
48
|
+
|
|
49
|
+
It answers questions like:
|
|
50
|
+
|
|
51
|
+
- What code path handles this feature?
|
|
52
|
+
- What will break if I change this function?
|
|
53
|
+
- Which tests should run for this patch?
|
|
54
|
+
- Which previous bug fixes touched this area?
|
|
55
|
+
- What minimal context should an agent receive before editing?
|
|
56
|
+
|
|
57
|
+
## Why behavior-first?
|
|
58
|
+
|
|
59
|
+
File trees and embedding search tell you what *exists*. They do not tell you what *runs*, what *breaks*, or what *matters* when you change a shared module.
|
|
60
|
+
|
|
61
|
+
FlowIndex builds a local, deterministic behavior graph:
|
|
62
|
+
|
|
63
|
+
- **Entrypoints** — API routes, webhooks, pages, CLI commands
|
|
64
|
+
- **Call paths** — function-to-function relationships from static analysis
|
|
65
|
+
- **Tests** — pytest, Jest/Vitest detection linked to symbols
|
|
66
|
+
- **Git history** — co-change patterns and bug-fix commit signals
|
|
67
|
+
- **Impact** — transparent risk scoring before you edit
|
|
68
|
+
|
|
69
|
+
No vector database. No LLM calls. No SaaS. Inspectable SQLite.
|
|
70
|
+
|
|
71
|
+
## How it differs
|
|
72
|
+
|
|
73
|
+
| Approach | FlowIndex |
|
|
74
|
+
|----------|-----------|
|
|
75
|
+
| Repo maps / file trees | Behavior graph with entrypoints and call edges |
|
|
76
|
+
| Embeddings / RAG | Deterministic lexical + graph ranking |
|
|
77
|
+
| Agent frameworks | Developer tool that feeds agents context |
|
|
78
|
+
| Generic static analysis | Agent-oriented impact, tests-for, context packs |
|
|
79
|
+
|
|
80
|
+
## Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install flowindex
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
MCP support for Cursor / Claude Code:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install "flowindex[mcp]"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
From source:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/adu3110/flowIndex.git
|
|
96
|
+
cd flowIndex
|
|
97
|
+
pip install -e ".[dev]"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Quickstart
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cd your-project
|
|
104
|
+
flowindex init # use --here inside nested example dirs
|
|
105
|
+
flowindex scan
|
|
106
|
+
flowindex overview
|
|
107
|
+
flowindex explain "POST /api/payments"
|
|
108
|
+
flowindex impact src/services/ledger.py
|
|
109
|
+
flowindex tests-for update_ledger
|
|
110
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Demo
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
cd examples/python_fastapi_app
|
|
117
|
+
flowindex init --here
|
|
118
|
+
flowindex scan
|
|
119
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Record a GIF locally: `brew install vhs && ./scripts/record-demo.sh`
|
|
123
|
+
|
|
124
|
+
See [docs/demo-output.txt](docs/demo-output.txt) for captured terminal output.
|
|
125
|
+
|
|
126
|
+
## CLI examples
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Initialize index in current repo
|
|
130
|
+
flowindex init
|
|
131
|
+
|
|
132
|
+
# Scan and build behavior graph
|
|
133
|
+
flowindex scan
|
|
134
|
+
|
|
135
|
+
# Explain an entrypoint flow
|
|
136
|
+
flowindex explain "POST /payments"
|
|
137
|
+
|
|
138
|
+
# Analyze change impact
|
|
139
|
+
flowindex impact services/ledger.py
|
|
140
|
+
|
|
141
|
+
# Suggest tests for a change
|
|
142
|
+
flowindex tests-for services/ledger.py
|
|
143
|
+
|
|
144
|
+
# Generate agent context pack
|
|
145
|
+
flowindex context "fix webhook retry duplicate ledger entries"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## MCP usage (Cursor)
|
|
149
|
+
|
|
150
|
+
Add to Cursor MCP settings (`~/.cursor/mcp.json` or project settings):
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"mcpServers": {
|
|
155
|
+
"flowindex": {
|
|
156
|
+
"command": "flowindex",
|
|
157
|
+
"args": ["mcp"],
|
|
158
|
+
"cwd": "/absolute/path/to/your/repo"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Run `flowindex init && flowindex scan` in that repo first.
|
|
165
|
+
|
|
166
|
+
Start the server manually:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
flowindex mcp
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Tools: `get_repo_overview`, `explain_entrypoint`, `get_change_impact`, `suggest_tests`, `make_context_pack`, and more — see [docs/mcp.md](docs/mcp.md).
|
|
173
|
+
|
|
174
|
+
## Architecture
|
|
175
|
+
|
|
176
|
+
```mermaid
|
|
177
|
+
flowchart LR
|
|
178
|
+
subgraph ingest [Ingest]
|
|
179
|
+
Scan[File Scanner]
|
|
180
|
+
Py[Python Parser]
|
|
181
|
+
TS[TS/JS Parser]
|
|
182
|
+
Git[Git Analyzer]
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
subgraph index [Local Index]
|
|
186
|
+
DB[(SQLite)]
|
|
187
|
+
Graph[Behavior Graph]
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
subgraph out [Outputs]
|
|
191
|
+
CLI[CLI Commands]
|
|
192
|
+
MCP[MCP Server]
|
|
193
|
+
Pack[Context Packs]
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
Scan --> Py
|
|
197
|
+
Scan --> TS
|
|
198
|
+
Py --> Graph
|
|
199
|
+
TS --> Graph
|
|
200
|
+
Git --> Graph
|
|
201
|
+
Graph --> DB
|
|
202
|
+
DB --> CLI
|
|
203
|
+
DB --> MCP
|
|
204
|
+
DB --> Pack
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Example context pack
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```md
|
|
214
|
+
# FlowIndex Context Pack
|
|
215
|
+
|
|
216
|
+
## Task
|
|
217
|
+
fix duplicate payments when webhook retries
|
|
218
|
+
|
|
219
|
+
## Likely Relevant Entrypoints
|
|
220
|
+
- POST /payments
|
|
221
|
+
- POST /stripe/webhook
|
|
222
|
+
|
|
223
|
+
## Likely Relevant Files
|
|
224
|
+
- main.py
|
|
225
|
+
- services/ledger.py
|
|
226
|
+
- services/payments.py
|
|
227
|
+
|
|
228
|
+
## High-Risk Symbols
|
|
229
|
+
- update_ledger()
|
|
230
|
+
- handle_stripe_webhook()
|
|
231
|
+
|
|
232
|
+
## Tests to Run
|
|
233
|
+
- tests/test_payments.py
|
|
234
|
+
|
|
235
|
+
## Caution
|
|
236
|
+
- services/ledger.py has high change risk.
|
|
237
|
+
- update_ledger() is shared by refunds and payments.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Roadmap
|
|
241
|
+
|
|
242
|
+
- [ ] Tree-sitter parsers for TS/JS and richer call resolution
|
|
243
|
+
- [ ] Runtime trace ingestion (OpenTelemetry, test coverage)
|
|
244
|
+
- [ ] Cross-repo dependency indexing
|
|
245
|
+
- [ ] Patch-aware incremental scan
|
|
246
|
+
- [ ] Language servers: Go, Rust, Java
|
|
247
|
+
|
|
248
|
+
## Research questions
|
|
249
|
+
|
|
250
|
+
- How much agent error reduction comes from behavior graphs vs embeddings?
|
|
251
|
+
- What is the minimal context pack size that preserves patch correctness?
|
|
252
|
+
- Can co-change graphs predict test selection better than import graphs alone?
|
|
253
|
+
- Which entrypoint classes correlate most with production incidents?
|
|
254
|
+
|
|
255
|
+
## Contributing
|
|
256
|
+
|
|
257
|
+
1. Fork and clone the repository
|
|
258
|
+
2. `pip install -e ".[dev]"`
|
|
259
|
+
3. Make changes with tests
|
|
260
|
+
4. `ruff check . && mypy flowindex && pytest`
|
|
261
|
+
5. Open a pull request
|
|
262
|
+
|
|
263
|
+
See [docs/](docs/) for concepts, CLI reference, and examples.
|
|
264
|
+
|
|
265
|
+
## License
|
|
266
|
+
|
|
267
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# FlowIndex
|
|
2
|
+
|
|
3
|
+
[](https://github.com/adu3110/flowIndex/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/flowindex/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
Behavior-first repository indexing for AI coding agents.
|
|
8
|
+
|
|
9
|
+
FlowIndex maps how a codebase behaves: entrypoints, call paths, tests, runtime traces, and git history. It helps AI coding agents understand impact before editing code.
|
|
10
|
+
|
|
11
|
+
Most coding-agent tools index files, chunks, symbols, or embeddings. FlowIndex indexes behavior.
|
|
12
|
+
|
|
13
|
+
It answers questions like:
|
|
14
|
+
|
|
15
|
+
- What code path handles this feature?
|
|
16
|
+
- What will break if I change this function?
|
|
17
|
+
- Which tests should run for this patch?
|
|
18
|
+
- Which previous bug fixes touched this area?
|
|
19
|
+
- What minimal context should an agent receive before editing?
|
|
20
|
+
|
|
21
|
+
## Why behavior-first?
|
|
22
|
+
|
|
23
|
+
File trees and embedding search tell you what *exists*. They do not tell you what *runs*, what *breaks*, or what *matters* when you change a shared module.
|
|
24
|
+
|
|
25
|
+
FlowIndex builds a local, deterministic behavior graph:
|
|
26
|
+
|
|
27
|
+
- **Entrypoints** — API routes, webhooks, pages, CLI commands
|
|
28
|
+
- **Call paths** — function-to-function relationships from static analysis
|
|
29
|
+
- **Tests** — pytest, Jest/Vitest detection linked to symbols
|
|
30
|
+
- **Git history** — co-change patterns and bug-fix commit signals
|
|
31
|
+
- **Impact** — transparent risk scoring before you edit
|
|
32
|
+
|
|
33
|
+
No vector database. No LLM calls. No SaaS. Inspectable SQLite.
|
|
34
|
+
|
|
35
|
+
## How it differs
|
|
36
|
+
|
|
37
|
+
| Approach | FlowIndex |
|
|
38
|
+
|----------|-----------|
|
|
39
|
+
| Repo maps / file trees | Behavior graph with entrypoints and call edges |
|
|
40
|
+
| Embeddings / RAG | Deterministic lexical + graph ranking |
|
|
41
|
+
| Agent frameworks | Developer tool that feeds agents context |
|
|
42
|
+
| Generic static analysis | Agent-oriented impact, tests-for, context packs |
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install flowindex
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
MCP support for Cursor / Claude Code:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install "flowindex[mcp]"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
From source:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/adu3110/flowIndex.git
|
|
60
|
+
cd flowIndex
|
|
61
|
+
pip install -e ".[dev]"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Quickstart
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cd your-project
|
|
68
|
+
flowindex init # use --here inside nested example dirs
|
|
69
|
+
flowindex scan
|
|
70
|
+
flowindex overview
|
|
71
|
+
flowindex explain "POST /api/payments"
|
|
72
|
+
flowindex impact src/services/ledger.py
|
|
73
|
+
flowindex tests-for update_ledger
|
|
74
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Demo
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd examples/python_fastapi_app
|
|
81
|
+
flowindex init --here
|
|
82
|
+
flowindex scan
|
|
83
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Record a GIF locally: `brew install vhs && ./scripts/record-demo.sh`
|
|
87
|
+
|
|
88
|
+
See [docs/demo-output.txt](docs/demo-output.txt) for captured terminal output.
|
|
89
|
+
|
|
90
|
+
## CLI examples
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Initialize index in current repo
|
|
94
|
+
flowindex init
|
|
95
|
+
|
|
96
|
+
# Scan and build behavior graph
|
|
97
|
+
flowindex scan
|
|
98
|
+
|
|
99
|
+
# Explain an entrypoint flow
|
|
100
|
+
flowindex explain "POST /payments"
|
|
101
|
+
|
|
102
|
+
# Analyze change impact
|
|
103
|
+
flowindex impact services/ledger.py
|
|
104
|
+
|
|
105
|
+
# Suggest tests for a change
|
|
106
|
+
flowindex tests-for services/ledger.py
|
|
107
|
+
|
|
108
|
+
# Generate agent context pack
|
|
109
|
+
flowindex context "fix webhook retry duplicate ledger entries"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## MCP usage (Cursor)
|
|
113
|
+
|
|
114
|
+
Add to Cursor MCP settings (`~/.cursor/mcp.json` or project settings):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"flowindex": {
|
|
120
|
+
"command": "flowindex",
|
|
121
|
+
"args": ["mcp"],
|
|
122
|
+
"cwd": "/absolute/path/to/your/repo"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Run `flowindex init && flowindex scan` in that repo first.
|
|
129
|
+
|
|
130
|
+
Start the server manually:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
flowindex mcp
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Tools: `get_repo_overview`, `explain_entrypoint`, `get_change_impact`, `suggest_tests`, `make_context_pack`, and more — see [docs/mcp.md](docs/mcp.md).
|
|
137
|
+
|
|
138
|
+
## Architecture
|
|
139
|
+
|
|
140
|
+
```mermaid
|
|
141
|
+
flowchart LR
|
|
142
|
+
subgraph ingest [Ingest]
|
|
143
|
+
Scan[File Scanner]
|
|
144
|
+
Py[Python Parser]
|
|
145
|
+
TS[TS/JS Parser]
|
|
146
|
+
Git[Git Analyzer]
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
subgraph index [Local Index]
|
|
150
|
+
DB[(SQLite)]
|
|
151
|
+
Graph[Behavior Graph]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
subgraph out [Outputs]
|
|
155
|
+
CLI[CLI Commands]
|
|
156
|
+
MCP[MCP Server]
|
|
157
|
+
Pack[Context Packs]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
Scan --> Py
|
|
161
|
+
Scan --> TS
|
|
162
|
+
Py --> Graph
|
|
163
|
+
TS --> Graph
|
|
164
|
+
Git --> Graph
|
|
165
|
+
Graph --> DB
|
|
166
|
+
DB --> CLI
|
|
167
|
+
DB --> MCP
|
|
168
|
+
DB --> Pack
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Example context pack
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
flowindex context "fix duplicate payments when webhook retries"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```md
|
|
178
|
+
# FlowIndex Context Pack
|
|
179
|
+
|
|
180
|
+
## Task
|
|
181
|
+
fix duplicate payments when webhook retries
|
|
182
|
+
|
|
183
|
+
## Likely Relevant Entrypoints
|
|
184
|
+
- POST /payments
|
|
185
|
+
- POST /stripe/webhook
|
|
186
|
+
|
|
187
|
+
## Likely Relevant Files
|
|
188
|
+
- main.py
|
|
189
|
+
- services/ledger.py
|
|
190
|
+
- services/payments.py
|
|
191
|
+
|
|
192
|
+
## High-Risk Symbols
|
|
193
|
+
- update_ledger()
|
|
194
|
+
- handle_stripe_webhook()
|
|
195
|
+
|
|
196
|
+
## Tests to Run
|
|
197
|
+
- tests/test_payments.py
|
|
198
|
+
|
|
199
|
+
## Caution
|
|
200
|
+
- services/ledger.py has high change risk.
|
|
201
|
+
- update_ledger() is shared by refunds and payments.
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Roadmap
|
|
205
|
+
|
|
206
|
+
- [ ] Tree-sitter parsers for TS/JS and richer call resolution
|
|
207
|
+
- [ ] Runtime trace ingestion (OpenTelemetry, test coverage)
|
|
208
|
+
- [ ] Cross-repo dependency indexing
|
|
209
|
+
- [ ] Patch-aware incremental scan
|
|
210
|
+
- [ ] Language servers: Go, Rust, Java
|
|
211
|
+
|
|
212
|
+
## Research questions
|
|
213
|
+
|
|
214
|
+
- How much agent error reduction comes from behavior graphs vs embeddings?
|
|
215
|
+
- What is the minimal context pack size that preserves patch correctness?
|
|
216
|
+
- Can co-change graphs predict test selection better than import graphs alone?
|
|
217
|
+
- Which entrypoint classes correlate most with production incidents?
|
|
218
|
+
|
|
219
|
+
## Contributing
|
|
220
|
+
|
|
221
|
+
1. Fork and clone the repository
|
|
222
|
+
2. `pip install -e ".[dev]"`
|
|
223
|
+
3. Make changes with tests
|
|
224
|
+
4. `ruff check . && mypy flowindex && pytest`
|
|
225
|
+
5. Open a pull request
|
|
226
|
+
|
|
227
|
+
See [docs/](docs/) for concepts, CLI reference, and examples.
|
|
228
|
+
|
|
229
|
+
## License
|
|
230
|
+
|
|
231
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# FlowIndex Launch Checklist
|
|
2
|
+
|
|
3
|
+
Goal: maximize GitHub Trending visibility and developer adoption — not a guaranteed "#1 repo of the day," but a structured launch.
|
|
4
|
+
|
|
5
|
+
## Before launch day
|
|
6
|
+
|
|
7
|
+
### Product polish
|
|
8
|
+
- [ ] `pip install flowindex` works from PyPI (not just editable install)
|
|
9
|
+
- [ ] README demo GIF: `init --here` → `scan` → `context`
|
|
10
|
+
- [ ] Cursor MCP config snippet copy-pasteable in README
|
|
11
|
+
- [ ] GitHub repo description + topics: `ai`, `agents`, `mcp`, `developer-tools`, `code-analysis`
|
|
12
|
+
- [ ] Pin repo on https://github.com/adu3110
|
|
13
|
+
- [ ] CI badge green on main
|
|
14
|
+
|
|
15
|
+
### Narrative
|
|
16
|
+
- [ ] One-line pitch: "Behavior-first repo indexing for AI coding agents"
|
|
17
|
+
- [ ] Show HN title drafted: "Show HN: FlowIndex – index how code behaves, not just files"
|
|
18
|
+
- [ ] 60-second demo video or terminal recording
|
|
19
|
+
- [ ] Blog post or site link from aditichatterji.com/research
|
|
20
|
+
|
|
21
|
+
### Distribution list
|
|
22
|
+
- [ ] Hacker News (Show HN)
|
|
23
|
+
- [ ] X/Twitter thread with demo GIF
|
|
24
|
+
- [ ] r/LocalLLaMA, r/programming
|
|
25
|
+
- [ ] Cursor / MCP Discord servers
|
|
26
|
+
- [ ] LinkedIn post (research-builder angle, not hype)
|
|
27
|
+
|
|
28
|
+
## Launch day (Tuesday–Thursday, 9–11am PT)
|
|
29
|
+
|
|
30
|
+
1. Publish PyPI if not already live
|
|
31
|
+
2. Post Show HN within 5 minutes of tweet
|
|
32
|
+
3. Link from personal site `/research#lab-notebooks`
|
|
33
|
+
4. Ask 5–10 peers to engage organically on HN (comments, not bot stars)
|
|
34
|
+
5. Monitor issues — respond within 1 hour
|
|
35
|
+
|
|
36
|
+
## Week 1 follow-through
|
|
37
|
+
- [ ] `v0.1.1` patch release (bug fixes from early users)
|
|
38
|
+
- [ ] Add ledger.py to context ranking (known gap)
|
|
39
|
+
- [ ] One example post: "FlowIndex on a FastAPI payments app"
|
|
40
|
+
- [ ] Thank-you comment on HN with roadmap
|
|
41
|
+
|
|
42
|
+
## What drives Trending
|
|
43
|
+
|
|
44
|
+
GitHub Trending ranks repos by **stars in a ~24h window** relative to project size. You need:
|
|
45
|
+
|
|
46
|
+
| Factor | Action |
|
|
47
|
+
|--------|--------|
|
|
48
|
+
| Spike traffic | HN front page or viral tweet |
|
|
49
|
+
| Clear value in 10s | GIF + comparison table in README |
|
|
50
|
+
| Easy install | PyPI one-liner |
|
|
51
|
+
| Shareability | MCP + Cursor angle |
|
|
52
|
+
| Credibility | Tests, CI, serious docs |
|
|
53
|
+
|
|
54
|
+
Realistic targets:
|
|
55
|
+
- **50–200 stars** — good launch with your network
|
|
56
|
+
- **500–2k stars** — HN front page or influencer RT
|
|
57
|
+
- **#1 global Trending** — rare; competes with major org releases
|
|
58
|
+
|
|
59
|
+
## Do not
|
|
60
|
+
|
|
61
|
+
- Buy stars or use star-for-star rings (GitHub detects abuse)
|
|
62
|
+
- Force-push over contributors
|
|
63
|
+
- Launch on Friday evening US time
|
|
64
|
+
- Over-promise "production-ready" — say "dev tool, alpha, local-first"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Publishing to PyPI
|
|
2
|
+
|
|
3
|
+
FlowIndex uses [PyPI trusted publishing](https://docs.pypi.org/trusted-publishers/) via GitHub Actions.
|
|
4
|
+
|
|
5
|
+
## One-time setup
|
|
6
|
+
|
|
7
|
+
1. Create an account at [pypi.org](https://pypi.org/account/register/) if needed.
|
|
8
|
+
2. On PyPI → **Your projects** → **Add new project** → name: `flowindex`
|
|
9
|
+
3. PyPI → **Account settings** → **Publishing** → **Add a new pending publisher**:
|
|
10
|
+
- PyPI project name: `flowindex`
|
|
11
|
+
- Owner: `adu3110`
|
|
12
|
+
- Repository: `flowIndex`
|
|
13
|
+
- Workflow: `publish.yml`
|
|
14
|
+
- Environment: `pypi` (optional but recommended)
|
|
15
|
+
4. On GitHub → repo **Settings** → **Environments** → create `pypi` (no secrets required for trusted publishing).
|
|
16
|
+
|
|
17
|
+
## Publish a release
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git tag v0.1.0
|
|
21
|
+
git push origin v0.1.0
|
|
22
|
+
gh release create v0.1.0 --title "v0.1.0" --notes "Initial public release."
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The `Publish to PyPI` workflow runs on release publish.
|
|
26
|
+
|
|
27
|
+
Verify:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install flowindex
|
|
31
|
+
flowindex --help
|
|
32
|
+
```
|