docdex 0.2.26 → 0.2.28

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 (2) hide show
  1. package/assets/agents.md +32 -3
  2. package/package.json +2 -2
package/assets/agents.md CHANGED
@@ -1,4 +1,4 @@
1
- ---- START OF DOCDEX INFO V0.2.26 ----
1
+ ---- START OF DOCDEX INFO V0.2.27 ----
2
2
  Docdex URL: http://127.0.0.1:28491
3
3
  Use this base URL for Docdex HTTP endpoints.
4
4
  Health check endpoint: `GET /healthz` (not `/v1/health`).
@@ -12,6 +12,11 @@ Health check endpoint: `GET /healthz` (not `/v1/health`).
12
12
  - Use Docdex tools intentionally: docdex_search/symbols/ast for repo truth; docdex_stats/files/repo_inspect/index for index health.
13
13
  - For folder structure, use docdex_tree instead of raw `rg --files`/`find` to avoid noisy folders.
14
14
  - When you do not know something, run docdex_web_research (force_web=true). Web research is encouraged by default for non-repo facts and external APIs.
15
+ - When a Docdex feature makes a task easier/safer, you MUST use it instead of ad-hoc inspection. Examples: `docdex_search` for context, `docdex_open`/`/v1/snippet` for file slices, `docdex_symbols`/`docdex_ast` for structure, `docdex_impact_graph`/`docdex_impact_diagnostics` for dependency safety, and `docdex_dag_export` to review session traces.
16
+ - For dependency/library docs, run `docdexd libs discover`/`docdexd libs fetch` and search with `include_libs` rather than web searching.
17
+ - For test execution, use `docdexd run-tests` (or `docdexd test run-node`) instead of ad-hoc commands when feasible.
18
+ - For staged-change validation, use `docdexd hook pre-commit`.
19
+ - For MCP client registration, use `docdexd mcp add` (or `--all`) instead of editing configs by hand.
15
20
 
16
21
  # Docdex Agent Usage Instructions
17
22
 
@@ -92,8 +97,23 @@ Use local delegation for low-complexity, code-generation-oriented tasks to reduc
92
97
  | docdex_local_completion | Delegate small tasks to a local model with strict output formats. |
93
98
  | HTTP /v1/delegate | HTTP endpoint for delegated completions with structured responses. |
94
99
 
95
- Required fields: `task_type`, `instruction`, `context`. Optional: `max_tokens`, `timeout_ms`, `mode` (`draft_only` or `draft_then_refine`), `agent` (local agent id/slug).
100
+ Required fields: `task_type`, `instruction`, `context`. Optional: `max_tokens`, `timeout_ms`, `mode` (`draft_only` or `draft_then_refine`), `agent` (local agent id/slug or `model:<name>` to force an Ollama model; raw model names from `docdexd delegation agents` are also accepted).
96
101
  Expensive model library: `docs/expensive_models.json` (match by `agent_id`, `agent_slug`, `model`, or adapter type; case-insensitive).
102
+ To choose a local target, run `docdexd delegation agents` (or `--json`) and prefer:
103
+ - `code_writer` for scaffolding/boilerplate/docstrings.
104
+ - `code_reviewer` for tests/format/refactors.
105
+ - `general_chat` for lightweight Q&A or fallback.
106
+ For mcoda agents, also consider:
107
+ - `max_complexity`: do not assign tasks above this ceiling.
108
+ - `rating`: prefer higher-rated agents for reliability.
109
+ - `cost_per_million`: USD per 1M tokens; prefer lower cost when ratings/complexity match.
110
+ - `usage`: best-fit role (for example `code_writer` or `code_reviewer`); use this for quick matching.
111
+ - `reasoning_rating`: reasoning score out of 10; prefer higher for complex reasoning tasks.
112
+ - `health_status`: only use agents marked `healthy` (treat `-` as unknown).
113
+ Table output shows `USAGE`, `COMPLEXITY`, `RATING`, `REASON`, `COST/$1M`, and `HEALTH` for mcoda agents (`-` means unknown).
114
+ - When `llm.delegation.re_evaluate = true` (default), Docdex reviews successful local mcoda runs using the primary agent when available and writes updated ratings to `~/.mcoda/mcoda.db` (disable with `DOCDEX_DELEGATION_REEVALUATE=0`).
115
+ Use `agent: model:<ollama-model>` to force a specific local model (for example, `model:phi3.5:3.8b`).
116
+ Avoid entries that only advertise `embedding` or `vision`.
97
117
 
98
118
  ### E. Index Health + File Access
99
119
 
@@ -125,6 +145,8 @@ Use these to verify index coverage, repo binding, and to read precise file slice
125
145
  - docdex_impact_graph: Mandatory before code changes to review inbound/outbound deps (use MCP/IPC if shell networking is blocked).
126
146
  - docdex_dag_export: Export dependency graph to plan change order.
127
147
  - HTTP /v1/initialize: Mount/bind a repo for HTTP daemon mode. Request JSON uses rootUri/root_uri (NOT repo_root).
148
+ - HTTP /v1/snippet: Fetch exact line-safe snippets for a doc_id returned by search.
149
+ - HTTP /v1/impact/diagnostics: Inspect unresolved/dynamic imports when impact graphs look incomplete.
128
150
 
129
151
  ## CLI Fallbacks (when MCP/IPC is unavailable)
130
152
  Use these only when MCP tools cannot be called (e.g., blocked sandbox networking). Prefer MCP/IPC otherwise.
@@ -133,11 +155,18 @@ Use these only when MCP tools cannot be called (e.g., blocked sandbox networking
133
155
  - `docdexd repo id --repo <path>`: compute repo fingerprint locally.
134
156
  - `docdexd repo status --repo <path>` / `docdexd repo dirty --exit-code`: git working tree status.
135
157
  - `docdexd impact-graph --repo <path> --file <rel>`: impact graph (HTTP/local).
136
- - `docdexd dag export --repo <path> <session_id>`: DAG export alias.
158
+ - `docdexd dag view --repo <path> <session_id>` / `docdexd dag export --repo <path> <session_id>`: DAG export/render.
137
159
  - `docdexd search --repo <path> --query "<q>"`: /search equivalent (HTTP/local).
160
+ - `docdexd delegation savings`: delegation telemetry (JSON: offloaded count, local/primary tokens & costs, savings).
161
+ - `docdexd delegation agents --json`: list local delegation targets and capabilities (mcoda agents include `max_complexity`, `rating`, `cost_per_million`, `usage`, `reasoning_rating`, `health_status`).
138
162
  - `docdexd open --repo <path> --file <rel>`: safe file slice read (head/start/end/clamp).
139
163
  - `docdexd file ensure-newline|write --repo <path> --file <rel>`: minimal file edits.
140
164
  - `docdexd test run-node --repo <path> --file <rel> --args "..."`: run Node scripts.
165
+ - `docdexd run-tests --repo <path> [--target <file|dir>]`: run repo tests (preferred for test execution).
166
+ - `docdexd hook pre-commit --repo <path>`: run semantic gatekeeper hooks against staged changes.
167
+ - `docdexd impact-diagnostics --repo <path> [--file <rel>]`: list unresolved import diagnostics.
168
+ - `docdexd libs discover|fetch --repo <path> [--sources <file>]`: dependency docs discovery/ingestion.
169
+ - `docdexd mcp add --agent <name> [--transport http|ipc] [--all]`: register Docdex MCP in supported clients.
141
170
 
142
171
  ## Docdex Usage Cookbook (Mandatory, Exact Schemas)
143
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docdex",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "mcpName": "io.github.bekirdag/docdex",
5
5
  "description": "Local-first documentation and code indexer with HTTP/MCP search, AST, and agent memory.",
6
6
  "bin": {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "homepage": "https://docdex.org",
46
46
  "license": "MIT",
47
- "author": "bekir dağ",
47
+ "author": "bekir da\u011f",
48
48
  "keywords": [
49
49
  "docdex",
50
50
  "documentation",