Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Commit f74575c

Browse files
committed
feat(mcp): add search server with advanced prompt engineering
closes #3 CHANGES - Implement FastMCP server with search_py_dep_manager_docs tool - Add Tantivy indexing script for documentation assets with metadata support - Create comprehensive prompt engineering design with 3-iteration evolution - Integrate progress transparency and mandatory citation requirements IMPACT - Users get continuous visibility into multi-call research progress - All responses grounded in official documentation with authoritative citations - Expert-level search assistance transforms perception from "slow tool" to "thorough research" TECHNICAL NOTES - Tantivy full-text search with fuzzy matching and package filtering - GitHub link reconstruction from metadata for developer-friendly citations - Adaptive content preview and query optimization based on user intent
1 parent 10fe26a commit f74575c

33 files changed

Lines changed: 671 additions & 31 deletions

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ urls.repository = "https://github.com/KemingHe/python-dep-manager-companion-mcp-
99
urls.issues = "https://github.com/KemingHe/python-dep-manager-companion-mcp-server/issues"
1010
dependencies = [
1111
"fastmcp>=2.10.5",
12+
"pyyaml>=6.0.2",
1213
"tantivy>=0.24.0",
1314
]

src/assets/conda/source/user-guide/configuration/settings.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Non-URL channels are interpreted as Anaconda.org user or organization
2222
names. You can change this by modifying the ``channel_alias`` as described
2323
in :ref:`set-ch-alias`. The default is just ``defaults``.
2424

25-
**Example:**
25+
**Example**:
2626

2727
.. code-block:: yaml
2828
@@ -36,7 +36,7 @@ To select channels for a single environment, put a ``.condarc``
3636
file in the root directory of that environment (or use the
3737
``--env`` option when using ``conda config``).
3838

39-
**Example:** If you have installed Miniconda with Python 3 in your
39+
**Example**: If you have installed Miniconda with Python 3 in your
4040
home directory and the environment is named "flowers", the
4141
path may be::
4242

@@ -111,7 +111,7 @@ can access, especially in enterprise or multi-user environments.
111111

112112
The denylist takes precedence over the allowlist. If a channel is in both lists, it is denied.
113113

114-
**Examples:**
114+
**Examples**:
115115

116116
An example which allows the ``defaults`` and ``conda-forge`` channels with the ``allowlist_channels``
117117
setting is:
@@ -180,7 +180,7 @@ installs a package in the root environment. When ``False``,
180180
conda updates itself only if the user manually issues a
181181
``conda update`` command. The default is ``True``.
182182

183-
**Example:**
183+
**Example**:
184184

185185
.. code-block:: yaml
186186
@@ -195,7 +195,7 @@ Choose the ``yes`` option whenever asked to proceed, such as
195195
when installing. Same as using the ``--yes`` flag at the
196196
command line. The default is ``False``.
197197

198-
**Example:**
198+
**Example**:
199199

200200
.. code-block:: yaml
201201
@@ -209,7 +209,7 @@ command line. The default is ``False``.
209209
Show channel URLs in ``conda list`` and when displaying what is
210210
going to be downloaded. The default is ``False``.
211211

212-
**Example:**
212+
**Example**:
213213

214214
.. code-block:: yaml
215215
@@ -223,7 +223,7 @@ going to be downloaded. The default is ``False``.
223223
When using ``conda activate``, change the command prompt from ``$PS1``
224224
to include the activated environment. The default is ``True``.
225225

226-
**Example:**
226+
**Example**:
227227

228228
.. code-block:: yaml
229229
@@ -238,7 +238,7 @@ Add pip, wheel, and setuptools as dependencies of Python. This
238238
ensures that pip, wheel, and setuptools are always installed any
239239
time Python is installed. The default is ``True``.
240240

241-
**Example:**
241+
**Example**:
242242

243243
.. code-block:: yaml
244244
@@ -253,7 +253,7 @@ Use pip when listing packages with ``conda list``. This does not
253253
affect any conda command or functionality other than the output
254254
of the command ``conda list``. The default is ``True``.
255255

256-
**Example:**
256+
**Example**:
257257

258258
.. code-block:: yaml
259259
@@ -348,7 +348,7 @@ which can be used to verify SSL connections:
348348
Filters out all channel URLs that do not use the ``file://``
349349
protocol. The default is ``False``.
350350

351-
**Example:**
351+
**Example**:
352352

353353
.. code-block:: yaml
354354
@@ -374,7 +374,7 @@ specifying that certain files should never be soft linked.
374374

375375
The default is ``False``.
376376

377-
**Example:**
377+
**Example**:
378378

379379
.. code-block:: yaml
380380
@@ -407,7 +407,7 @@ is the same as::
407407

408408
You can set ``channel_alias`` to your own repository.
409409

410-
**Example:** To set ``channel_alias`` to your repository at
410+
**Example**: To set ``channel_alias`` to your repository at
411411
https://your.repo.com:
412412

413413
.. code-block:: yaml
@@ -416,7 +416,7 @@ https://your.repo.com:
416416
417417
On Windows, you must include a slash ("/") at the end of the URL:
418418

419-
**Example:** https://your.repo/conda/
419+
**Example**: https://your.repo/conda/
420420

421421
When ``channel_alias`` set to your repository at
422422
https://your.repo.com::
@@ -438,7 +438,7 @@ you create. You can override this option at the command prompt
438438
with the ``--no-default-packages`` flag. The default is to not
439439
include any packages.
440440

441-
**Example:**
441+
**Example**:
442442

443443
.. code-block:: yaml
444444
@@ -456,7 +456,7 @@ Enable certain features to be tracked by default. The default is
456456
to not track any features. This is similar to adding MKL to
457457
the ``create_default_packages`` list.
458458

459-
**Example:**
459+
**Example**:
460460

461461
.. code-block:: yaml
462462
@@ -480,7 +480,7 @@ set ``update_dependencies`` to ``True``.
480480

481481
The default is ``False``.
482482

483-
**Example:**
483+
**Example**:
484484

485485
.. code-block:: yaml
486486
@@ -507,7 +507,7 @@ better option may be to pin them. For more information, see
507507
Disallow the installation of certain packages. The default is to
508508
allow installation of all packages.
509509

510-
**Example:**
510+
**Example**:
511511

512512
.. code-block:: yaml
513513
@@ -528,7 +528,7 @@ automatically add the token to the channel URLs.
528528

529529
The default is ``True``.
530530

531-
**Example:**
531+
**Example**:
532532

533533
.. code-block:: yaml
534534
@@ -554,7 +554,7 @@ For each envs here, ``envs/pkgs`` is used as the pkgs cache,
554554
except for the standard ``envs`` directory in the root
555555
directory, for which the normal ``root_dir/pkgs`` is used.
556556

557-
**Example:**
557+
**Example**:
558558

559559
.. code-block:: yaml
560560
@@ -583,7 +583,7 @@ If the ``pkgs_dirs`` key is not set, then ``envs/pkgs`` is used
583583
as the pkgs cache, except for the standard ``envs`` directory in the root
584584
directory, for which the normal ``root_dir/pkgs`` is used.
585585

586-
**Example:**
586+
**Example**:
587587

588588
.. code-block:: yaml
589589
@@ -613,7 +613,7 @@ by setting the ``use_only_tar_bz2`` boolean to ``True``.
613613

614614
The default is ``False``.
615615

616-
**Example:**
616+
**Example**:
617617

618618
.. code-block:: yaml
619619
@@ -664,7 +664,7 @@ Build output root directory. You can also set this with the
664664
permissions to ``<CONDA_PREFIX>/conda-bld/``, the default is
665665
``~/conda-bld/``.
666666

667-
**Example:**
667+
**Example**:
668668

669669
.. code-block:: yaml
670670
@@ -703,7 +703,7 @@ Conda package version to create. Use ``2`` for ``.conda`` packages. If not set,
703703
Automatically upload packages built with conda-build to
704704
`Anaconda.org <http://anaconda.org>`_. The default is ``False``.
705705

706-
**Example:**
706+
**Example**:
707707

708708
.. code-block:: yaml
709709

src/assets/conda/source/user-guide/configuration/use-condarc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ file, open a terminal and enter the ``conda config`` command.
4848
The ``.condarc`` configuration file follows simple
4949
`YAML syntax <https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html>`_.
5050

51-
**Example:**
51+
**Example**:
5252

5353
.. code-block:: yaml
5454
@@ -73,7 +73,7 @@ home directory or root directory.
7373
To set configuration options, edit the ``.condarc`` file directly
7474
or use the ``conda config --set`` command.
7575

76-
**Example:**
76+
**Example**:
7777

7878
To set the ``auto_update_conda option`` to ``False``, run::
7979

src/assets/conda/source/user-guide/install/rpm-debian.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ key and add the conda repository to the sources list.
7676
# Add our Debian repo
7777
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list
7878
79-
**NB:** If you receive a Permission denied error when trying to run the above command (because `/etc/apt/sources.list.d/conda.list` is write protected), try using the following command instead:
79+
**NB**: If you receive a Permission denied error when trying to run the above command (because `/etc/apt/sources.list.d/conda.list` is write protected), try using the following command instead:
8080
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | sudo tee -a /etc/apt/sources.list.d/conda.list
8181
8282
Conda is ready to install on your Debian-based distribution.

src/assets/conda/source/user-guide/install/windows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ argument. The following optional arguments are supported:
6161

6262
All arguments are case-sensitive.
6363

64-
**Example:** The following command installs Miniconda for the
64+
**Example**: The following command installs Miniconda for the
6565
current user without registering Python as the system's default:
6666

6767
.. code-block:: bat

src/assets/pip/html/ux-research-design/research-results/pip-search.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ Some users also mentioned that they would like the search to be configurable, e.
5353

5454
When asked how they would improve pip search, users said they would improve:
5555

56-
**1. Search methods:**
56+
**1. Search methods**:
5757

5858
- fuzzy search and insensitive case should be acceptable
5959
- users should have the option to filter/sort by description, name, tag
6060

61-
**2. Search results:**
61+
**2. Search results**:
6262

6363
- relevancy: the results should show both the exact match and closest match
6464
- order/category: the result should display items in a certain order, e.g highest number of downloads (popularity), development status (last updated/latest version), etc.
6565
- there should be a limited number of search results
6666

67-
**3. User interface:**
67+
**3. User interface**:
6868

6969
- link package to pypi page
7070
- use color coding / system for better clarity

src/assets/poetry/repositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ required to set an empty password. This is supported by Poetry.
531531
poetry config http-basic.foo <TOKEN> ""
532532
```
533533

534-
**Note:** Empty usernames are discouraged. However, Poetry will honor them if a password is configured without it. This
534+
**Note**: Empty usernames are discouraged. However, Poetry will honor them if a password is configured without it. This
535535
is unfortunately commonplace practice, while not best practice, for private indices that use tokens. When a password is
536536
stored into the system keyring with an empty username, Poetry will use a literal `__poetry_source_empty_username__` as
537537
the username to circumvent [keyring#687](https://github.com/jaraco/keyring/pull/687).

0 commit comments

Comments
 (0)