Skip to content

Commit 3911082

Browse files
CSCSoftwareclaude
andcommitted
docs: document aidex_global_guideline in README, API reference, and setup
- README: new ## AI Guidelines section with examples and use cases - README: aidex_global_guideline added to Available Tools table - MCP-API-REFERENCE: full aidex_global_guideline entry (params, examples, returns) + TOC - setup.ts: Guidelines row in All Tools table (27→28), Question→Tool examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 08fa312 commit 3911082

3 files changed

Lines changed: 54 additions & 1 deletion

File tree

MCP-API-REFERENCE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Complete reference for all AiDex MCP tools.
3838
- [aidex_global_query](#aidex_global_query)
3939
- [aidex_global_signatures](#aidex_global_signatures)
4040
- [aidex_global_refresh](#aidex_global_refresh)
41+
- [aidex_global_guideline](#aidex_global_guideline)
4142
- [Screenshots](#screenshots)
4243
- [aidex_screenshot](#aidex_screenshot)
4344
- [aidex_windows](#aidex_windows)
@@ -856,6 +857,33 @@ Update statistics for all registered projects and remove projects whose paths no
856857

857858
---
858859

860+
### aidex_global_guideline
861+
862+
Store, retrieve, list, or delete persistent AI guidelines and coding conventions. Stored in `~/.aidex/global.db` — available across all projects without requiring `aidex_init`. Perfect for team coding conventions, review checklists, and reusable AI instructions.
863+
864+
**Parameters:**
865+
866+
| Name | Type | Required | Description |
867+
|------|------|----------|-------------|
868+
| `action` | string | Yes | `set`, `get`, `list`, or `delete` |
869+
| `key` | string | for set/get/delete | Guideline name (e.g., `"review"`, `"style"`, `"release"`) |
870+
| `value` | string | for set | The guideline content to store |
871+
| `filter` | string | No | Substring filter for `list` action |
872+
873+
**Examples:**
874+
```json
875+
{ "action": "set", "key": "review", "value": "Check: error handling, null safety, no magic strings, consistent naming" }
876+
{ "action": "set", "key": "style", "value": "PascalCase classes, camelCase methods, 4-space indent, XML docs on public APIs" }
877+
{ "action": "get", "key": "review" }
878+
{ "action": "list" }
879+
{ "action": "list", "filter": "code" }
880+
{ "action": "delete", "key": "old-rule" }
881+
```
882+
883+
**Returns:** For `get` — key, value, created/updated timestamps. For `list` — all matching guidelines. For `set`/`delete` — confirmation message.
884+
885+
---
886+
859887
## Screenshots
860888

861889
### aidex_screenshot

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ aidex_init({ path: "/path/to/your/project" })
409409
| `aidex_global_query` | Search terms across ALL registered projects |
410410
| `aidex_global_signatures` | Search methods/types by name across all projects |
411411
| `aidex_global_refresh` | Update stats and remove stale projects from global DB |
412+
| `aidex_global_guideline` | Store/retrieve AI guidelines and coding conventions (key-value, global) |
412413

413414
## Time-based Filtering
414415

@@ -531,6 +532,27 @@ aidex_global_status({ sort: "recent" }) # Most re
531532
aidex_global_refresh() # Update stats, remove stale
532533
```
533534

535+
## AI Guidelines
536+
537+
Store persistent coding conventions, review checklists, and AI instructions in a single place — shared across all projects.
538+
539+
```
540+
aidex_global_guideline({ action: "set", key: "review", value: "Always check: error handling, null safety, no hardcoded strings" })
541+
aidex_global_guideline({ action: "set", key: "style", value: "Use PascalCase for classes, camelCase for methods, 4-space indent" })
542+
aidex_global_guideline({ action: "get", key: "review" }) # Retrieve a guideline
543+
aidex_global_guideline({ action: "list" }) # Show all guidelines
544+
aidex_global_guideline({ action: "list", filter: "code" }) # Filter by name
545+
aidex_global_guideline({ action: "delete", key: "old-rule" }) # Remove a guideline
546+
```
547+
548+
**Use cases:**
549+
- **Code review checklist**: Tell your AI exactly what to look for every time
550+
- **Coding conventions**: Store team style rules once, reference them in any project
551+
- **Release checklist**: Step-by-step process for shipping
552+
- **Project-agnostic instructions**: No more pasting the same context into every session
553+
554+
Guidelines are stored in `~/.aidex/global.db` — available across all your projects without `aidex_init`. Ask your AI: *"Load the review guideline and apply it to this file."*
555+
534556
## Screenshots — LLM-Optimized
535557

536558
Take screenshots and **reduce them up to 95%** for LLM context. A typical screenshot goes from ~100 KB to ~5 KB — that's thousands of tokens saved per image.

src/commands/setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,16 @@ Do I want to search code?
102102
| "Have I ever written X?" | \`aidex_global_query term="X" mode="contains"\` |
103103
| "Which project has class Y?" | \`aidex_global_signatures term="Y" kind="class"\` |
104104
| "All indexed projects?" | \`aidex_global_status\` |
105+
| "Store coding convention" | \`aidex_global_guideline action="set"\` |
106+
| "Load review checklist" | \`aidex_global_guideline action="get"\` |
105107
106108
### Search Modes
107109
108110
- **\`exact\`** (default): Finds only the exact identifier — \`log\` won't match \`catalog\`
109111
- **\`contains\`**: Finds identifiers containing the term — \`render\` matches \`preRenderSetup\`
110112
- **\`starts_with\`**: Finds identifiers starting with the term — \`Update\` matches \`UpdatePlayer\`, \`UpdateUI\`
111113
112-
### All Tools (27)
114+
### All Tools (28)
113115
114116
| Category | Tools | Purpose |
115117
|----------|-------|---------|
@@ -118,6 +120,7 @@ Do I want to search code?
118120
| Overview | \`aidex_summary\`, \`aidex_tree\`, \`aidex_describe\`, \`aidex_files\` | Entry points, file tree, file listing by type |
119121
| Cross-Project | \`aidex_link\`, \`aidex_unlink\`, \`aidex_links\`, \`aidex_scan\` | Link dependencies, discover projects |
120122
| Global Search | \`aidex_global_init\`, \`aidex_global_query\`, \`aidex_global_signatures\`, \`aidex_global_status\`, \`aidex_global_refresh\` | Search across ALL projects |
123+
| Guidelines | \`aidex_global_guideline\` | Persistent AI instructions & conventions (key-value, global) |
121124
| Sessions | \`aidex_session\`, \`aidex_note\` | Track sessions, leave notes (with searchable history) |
122125
| Tasks | \`aidex_task\`, \`aidex_tasks\` | Built-in backlog with priorities, tags, auto-logged history |
123126
| Screenshots | \`aidex_screenshot\`, \`aidex_windows\` | Cross-platform screen capture (no index needed) |

0 commit comments

Comments
 (0)