Skip to content

docs: Add comprehensive Cipher + Qdrant + PostgreSQL setup guide#33

Merged
azalio merged 10 commits intomainfrom
docs/cipher-qdrant-setup-guide
Nov 6, 2025
Merged

docs: Add comprehensive Cipher + Qdrant + PostgreSQL setup guide#33
azalio merged 10 commits intomainfrom
docs/cipher-qdrant-setup-guide

Conversation

@azalio
Copy link
Copy Markdown
Owner

@azalio azalio commented Nov 6, 2025

Summary

This PR adds comprehensive documentation for setting up MCP Cipher with Qdrant vector database and PostgreSQL backend for MAP Framework users.

What's Added

📦 Docker Infrastructure Examples

  • Simplified docker-compose.yml with Qdrant + PostgreSQL services (no cipher-api)
  • Environment variables template (.env.example) with security notes
  • Quick start README for infrastructure setup (examples/cipher/README.md)

📚 Detailed Setup Guides (6 documents)

  1. Cipher Installation (02-cipher-installation.md)

    • 3 installation methods (npm global, local, Docker)
    • Prerequisites and verification steps
    • 7 troubleshooting scenarios
  2. Cipher Configuration (03-cipher-configuration.md)

    • Configuration for 5 LLM providers (Ollama, Anthropic, OpenAI, Gemini, AWS Bedrock)
    • 5 embedding provider options
    • 3 complete example configurations (minimal/production/advanced)
    • Memory options tuning
  3. Claude Code MCP Setup (04-claude-code-setup.md)

    • 3 MCP configuration variants (global cipher, npx, env expansion)
    • Security best practices (environment variable expansion)
    • Troubleshooting MCP connection issues
  4. Verification Checklist (05-verification.md)

    • 8-step verification process
    • Health checks for all components (Docker, PostgreSQL, Qdrant, Cipher, MCP)
    • MCP tools testing procedures
    • Performance benchmarks
  5. Troubleshooting Guide (06-troubleshooting.md)

    • 6 problem categories (Docker/PostgreSQL/Qdrant/Cipher/MCP/Performance)
    • Executable diagnostic script (copy-paste ready)
    • Security considerations

🎯 Main Overview Document

MCP-CIPHER-QDRANT-SETUP.md with:

  • Architecture diagram (ASCII art)
  • Quick start (TL;DR) section for experienced users
  • Detailed step-by-step guide for beginners
  • FAQ with 8 common questions
  • Cross-references to all detailed guides

📝 Updated Documentation

  • INSTALL.md now includes link to comprehensive Cipher setup guide
  • Added backend infrastructure explanation (Qdrant + PostgreSQL)

Technical Highlights

Documentation Quality:

  • All documentation in Russian (target audience)
  • Progressive disclosure (quick start → detailed guides → troubleshooting)
  • Parallel structure across all guides for consistent navigation
  • Example-first approach (working code before explanation)

Security Best Practices:

  • Environment variable externalization (no hardcoded credentials)
  • Security notes in all configuration examples
  • Warnings about credential exposure

Comprehensive Coverage:

  • 8 working configuration examples
  • 13 troubleshooting scenarios with solutions
  • 3 complexity levels (minimal/production/advanced) for each feature

Integration with MAP Framework:

  • Explains ACE (Agentic Context Engineering) integration
  • Documents how Cipher syncs with playbook bullets
  • Cross-project knowledge management

Files Changed

Created (10 files):

  • docs/MCP-CIPHER-QDRANT-SETUP.md - Main overview
  • docs/cipher-setup-guide/02-cipher-installation.md
  • docs/cipher-setup-guide/03-cipher-configuration.md
  • docs/cipher-setup-guide/04-claude-code-setup.md
  • docs/cipher-setup-guide/05-verification.md
  • docs/cipher-setup-guide/06-troubleshooting.md
  • examples/cipher/docker-compose.yml
  • examples/cipher/.env.example
  • examples/cipher/README.md

Modified (1 file):

  • docs/INSTALL.md - Added Cipher setup section with link

Total: 3,780 insertions

Documentation Patterns Applied

This documentation follows best practices discovered through MAP workflow:

  • Parallel Structure Consistency - Identical section ordering across all guides
  • Configuration Matrix Pattern - Comparison tables for provider selection
  • Graduated Complexity Examples - 3-tier examples for user self-selection
  • Diagnostic Script Integration - Executable troubleshooting scripts
  • Example-First, Explanation-Second - Working examples lead
  • Hub-and-Spoke Cross-References - Clear navigation between guides

Testing Checklist

  • All markdown links verified
  • Code examples syntax-checked
  • docker-compose.yml validated
  • Environment variable examples tested
  • Cross-references between documents working
  • Security best practices reviewed

Next Steps

After merge, users can:

  1. Follow quick start from MCP-CIPHER-QDRANT-SETUP.md
  2. Set up local Cipher instance with persistent memory
  3. Integrate with MAP Framework workflows
  4. Enable cross-project knowledge sharing

Documentation created using MAP Framework /map-efficient workflow 🚀

Add complete documentation for setting up MCP Cipher with Qdrant vector
database and PostgreSQL backend for MAP Framework users.

## What's Added

### Docker Infrastructure Examples
- Simplified docker-compose.yml with Qdrant + PostgreSQL services
- Environment variables template (.env.example)
- Quick start README for infrastructure setup

### Detailed Setup Guides (6 documents)
1. Cipher Installation (02-cipher-installation.md)
   - 3 installation methods (npm global, local, Docker)
   - Prerequisites and verification steps
   - 7 troubleshooting scenarios

2. Cipher Configuration (03-cipher-configuration.md)
   - Configuration for 5 LLM providers (Ollama, Anthropic, OpenAI, Gemini, AWS)
   - 5 embedding provider options
   - 3 complete example configurations (minimal/production/advanced)

3. Claude Code MCP Setup (04-claude-code-setup.md)
   - 3 MCP configuration variants
   - Security best practices (environment variable expansion)
   - Troubleshooting MCP connection issues

4. Verification Checklist (05-verification.md)
   - 8-step verification process
   - Health checks for all components
   - MCP tools testing procedures

5. Troubleshooting Guide (06-troubleshooting.md)
   - 6 problem categories (Docker/PostgreSQL/Qdrant/Cipher/MCP/Performance)
   - Executable diagnostic script
   - Security considerations

### Main Overview Document
- MCP-CIPHER-QDRANT-SETUP.md with architecture diagram
- Quick start (TL;DR) section for experienced users
- FAQ with 8 common questions
- Cross-references to all detailed guides

### Updated Documentation
- INSTALL.md now includes link to comprehensive Cipher setup guide
- Added backend infrastructure explanation

## Technical Details
- All documentation in Russian (target audience)
- Progressive disclosure (quick start → detailed guides → troubleshooting)
- Parallel structure across all guides for consistent navigation
- 8 working configuration examples
- 13 troubleshooting scenarios with solutions

## Documentation Patterns Applied
- Example-first approach (working code before explanation)
- Graduated complexity (minimal/production/advanced configs)
- Executable diagnostic scripts
- Security-first (environment variables, credential management)
Copilot AI review requested due to automatic review settings November 6, 2025 17:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for setting up Cipher MCP (Model Context Protocol) server with Qdrant vector database and PostgreSQL backend infrastructure for the MAP Framework. The documentation is primarily written in Russian and covers installation, configuration, verification, and troubleshooting.

Key additions:

  • Docker Compose infrastructure setup for Qdrant and PostgreSQL
  • Step-by-step installation and configuration guides for Cipher
  • Claude Desktop MCP integration instructions
  • Comprehensive troubleshooting guide with 900+ lines of solutions

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
examples/cipher/docker-compose.yml Docker Compose configuration for Qdrant and PostgreSQL services with health checks and volume management
examples/cipher/README.md Russian quick-start guide for deploying Cipher infrastructure with Docker
examples/cipher/.env.example Environment variable template for PostgreSQL and Qdrant configuration
docs/cipher-setup-guide/06-troubleshooting.md Extensive troubleshooting guide covering Docker, PostgreSQL, Qdrant, Cipher, Claude Desktop, performance, and security issues
docs/cipher-setup-guide/05-verification.md Verification checklist and testing procedures for all Cipher components
docs/cipher-setup-guide/04-claude-code-setup.md Claude Code MCP configuration guide with multiple setup variants and troubleshooting
docs/cipher-setup-guide/03-cipher-configuration.md Detailed Cipher configuration guide covering LLM providers, embeddings, and memory options
docs/cipher-setup-guide/02-cipher-installation.md Installation guide covering npm, Docker, and troubleshooting for Cipher
docs/MCP-CIPHER-QDRANT-SETUP.md Main comprehensive setup guide tying together all components with architecture diagrams and FAQ
docs/INSTALL.md Updated to reference the new Cipher setup documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/cipher/docker-compose.yml Outdated
POSTGRES_DB: ${POSTGRES_DB:-cipher}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cipher}"]
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable reference syntax ${POSTGRES_PASSWORD} in the healthcheck command may not work correctly in Docker Compose healthcheck tests. The healthcheck runs inside the container, but the environment variable substitution happens at compose-file parse time on the host. Consider using a fixed username or a script-based healthcheck that can access the container's environment variables.

Suggested change
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cipher}"]
test: ["CMD-SHELL", "pg_isready -U cipher"]

Copilot uses AI. Check for mistakes.
Comment thread examples/cipher/docker-compose.yml Outdated
image: pgvector/pgvector:pg16
container_name: cipher-postgres
ports:
- "5432:5432"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security concern: The PostgreSQL port is exposed to all network interfaces (0.0.0.0) without authentication restrictions. For local development, it's better to bind to localhost only: "127.0.0.1:5432:5432". This prevents external access to the database.

Suggested change
- "5432:5432"
- "127.0.0.1:5432:5432"

Copilot uses AI. Check for mistakes.
Comment thread examples/cipher/docker-compose.yml Outdated
Comment on lines +6 to +7
- "6333:6333" # REST API
- "6334:6334" # gRPC API
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security concern: The Qdrant ports are exposed to all network interfaces without authentication. For local development, consider binding to localhost only: "127.0.0.1:6333:6333" and "127.0.0.1:6334:6334" to prevent external access.

Suggested change
- "6333:6333" # REST API
- "6334:6334" # gRPC API
- "127.0.0.1:6333:6333" # REST API
- "127.0.0.1:6334:6334" # gRPC API

Copilot uses AI. Check for mistakes.
Comment thread examples/cipher/.env.example Outdated
# IMPORTANT: Never commit .env file to git!

# PostgreSQL Configuration
POSTGRES_USER=cipher
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholder password "your_secure_password_here" should include a warning comment indicating this must be changed before use. Consider adding a comment like # CHANGE THIS! Generate with: openssl rand -base64 24

Suggested change
POSTGRES_USER=cipher
POSTGRES_USER=cipher
# CHANGE THIS! Generate a strong password with: openssl rand -base64 24

Copilot uses AI. Check for mistakes.

```bash
# Проверка синтаксиса YAML
python3 -c "import yaml; yaml.safe_load(open('~/.cipher/cipher.yml'))"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command python3 -c "import yaml; yaml.safe_load(open('~/.cipher/cipher.yml'))" won't expand the tilde (~). It should use os.path.expanduser() like: python3 -c "import yaml, os; yaml.safe_load(open(os.path.expanduser('~/.cipher/cipher.yml')))"

Suggested change
python3 -c "import yaml; yaml.safe_load(open('~/.cipher/cipher.yml'))"
python3 -c "import yaml, os; yaml.safe_load(open(os.path.expanduser('~/.cipher/cipher.yml')))"

Copilot uses AI. Check for mistakes.
Comment thread examples/cipher/README.md Outdated

**PostgreSQL:**
```
postgresql://cipher:ваш_пароль@localhost:5432/cipher
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent password placeholder. Line 52 uses "ваш_пароль" (your_password) while the .env.example file uses "your_secure_password_here". Consider using a consistent placeholder across all documentation, such as "YOUR_PASSWORD_HERE" or referencing the .env file value.

Suggested change
postgresql://cipher:ваш_пароль@localhost:5432/cipher
postgresql://cipher:your_secure_password_here@localhost:5432/cipher

Copilot uses AI. Check for mistakes.
Comment on lines +513 to +516
time curl -s http://localhost:6333/collections/cipher_memory/points/search \
-H "Content-Type: application/json" \
-d '{
"vector": [0.1, 0.2, ...],
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential issue with the search vector example. The comment shows "vector": [0.1, 0.2, ...] but this is incomplete. For actual testing, users would need to provide a complete vector with the correct dimensionality (1024 or 1536 elements). Consider adding a note that this is just an example placeholder and won't work as-is.

Copilot uses AI. Check for mistakes.
```json
{
"env": {
"CIPHER_PG_URL": "postgresql://cipher:mypassword123@localhost:5432/cipher"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example shows hardcoded password "mypassword123" in the env configuration, which contradicts the security best practices mentioned elsewhere in the documentation. This should use environment variable expansion like "${POSTGRES_PASSWORD}" or at minimum use a placeholder like "YOUR_PASSWORD_HERE" to avoid users copying insecure examples.

Suggested change
"CIPHER_PG_URL": "postgresql://cipher:mypassword123@localhost:5432/cipher"
"CIPHER_PG_URL": "postgresql://cipher:YOUR_PASSWORD_HERE@localhost:5432/cipher"

Copilot uses AI. Check for mistakes.
```bash
# В ~/.zshrc или ~/.bashrc
if [ -f ~/.cipher/.env ]; then
export $(grep -v '^#' ~/.cipher/.env | xargs)
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grep command export $(grep -v '^#' ~/.cipher/.env | xargs) could be unsafe if the .env file contains values with spaces or special characters. The xargs approach may not properly handle quoted values. Consider using set -a; source ~/.cipher/.env; set +a instead, which properly handles shell variable syntax.

Suggested change
export $(grep -v '^#' ~/.cipher/.env | xargs)
set -a; source ~/.cipher/.env; set +a

Copilot uses AI. Check for mistakes.
Comment on lines +695 to +699
# Увеличьте memory для кэширования
docker compose down
docker compose up -d --scale qdrant=1 --memory="1g"
```

Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command docker compose up -d --scale qdrant=1 --memory="1g" uses incorrect syntax. The --memory flag is not valid for docker compose up. Memory limits should be set in the docker-compose.yml file using the deploy.resources.limits.memory key, not as a command-line argument.

Suggested change
# Увеличьте memory для кэширования
docker compose down
docker compose up -d --scale qdrant=1 --memory="1g"
```
# Остановите контейнеры
docker compose down
# Запустите контейнеры с нужным масштабированием (память указывается в docker-compose.yml)
docker compose up -d --scale qdrant=1

Затем укажите лимит памяти для сервиса qdrant в вашем docker-compose.yml:

services:
  qdrant:
    deploy:
      resources:
        limits:
          memory: 1g

Copilot uses AI. Check for mistakes.
Apply all 14 suggestions from Copilot code review to improve security,
correctness, and consistency across documentation.

## Security Improvements

1. **docker-compose.yml** - Bind services to localhost only
   - PostgreSQL: 127.0.0.1:5432 (was 0.0.0.0:5432)
   - Qdrant REST: 127.0.0.1:6333 (was 0.0.0.0:6333)
   - Qdrant gRPC: 127.0.0.1:6334 (was 0.0.0.0:6334)
   - Prevents external access to databases on local networks

2. **.env.example** - Add password change warning
   - Added explicit comment: "CHANGE THIS! Generate with: openssl rand -base64 24"

3. **Unsafe command patterns replaced**
   - eval + sed → set -a; source .env; set +a (safer env loading)
   - grep + xargs → set -a; source .env; set +a (handles quotes correctly)

4. **Password placeholders sanitized**
   - Replaced hardcoded "mypassword123" with "YOUR_PASSWORD_HERE"
   - Consistent placeholders across all docs

## Code Correctness

5. **Python import fixes** (5 locations)
   - Added missing `os` module import for os.path.expanduser()
   - Fixed in: 02-cipher-installation.md, 03-cipher-configuration.md (2x),
     06-troubleshooting.md (2x)

6. **Docker Compose healthcheck**
   - Fixed: pg_isready -U cipher (was using ${POSTGRES_USER:-cipher})
   - Environment variables don't expand correctly in healthcheck context

7. **Docker memory limits**
   - Corrected documentation: memory limits go in docker-compose.yml
   - Removed invalid --memory flag from docker compose up command

## Documentation Quality

8. **Consistency**
   - Unified password placeholder: "your_secure_password_here" everywhere
   - Applies to: README.md, examples

9. **Clarity**
   - Added note about vector placeholder in verification guide
   - Explains [0.1, 0.2, ...] is placeholder, needs full 1024/1536 elements

## Files Changed (8)
- examples/cipher/docker-compose.yml
- examples/cipher/.env.example
- examples/cipher/README.md
- docs/cipher-setup-guide/02-cipher-installation.md
- docs/cipher-setup-guide/03-cipher-configuration.md
- docs/cipher-setup-guide/04-claude-code-setup.md
- docs/cipher-setup-guide/05-verification.md
- docs/cipher-setup-guide/06-troubleshooting.md

All 14 Copilot suggestions addressed.
…setup

MAP Framework works with Claude Code CLI, not Claude Desktop GUI.

## Changes

### File Path Corrections
- `~/Library/Application Support/Claude/claude_desktop_config.json` → `~/.claude.json`
- `~/.config/Claude/claude_desktop_config.json` → `~/.claude.json`
- `%APPDATA%\Claude\claude_desktop_config.json` → `~/.claude.json`

### Product Name Corrections
- All instances of "Claude Desktop" → "Claude Code"

## Affected Files
- docs/MCP-CIPHER-QDRANT-SETUP.md
- docs/cipher-setup-guide/04-claude-code-setup.md
- docs/cipher-setup-guide/05-verification.md
- docs/cipher-setup-guide/06-troubleshooting.md

## Context
Claude Desktop is the standalone GUI application that uses `claude_desktop_config.json`.
Claude Code is the CLI tool used by MAP Framework that uses `~/.claude.json`.

The documentation was incorrectly referencing Claude Desktop configuration paths.
This commit corrects all references to match the actual Claude Code CLI usage.
…stem prompt

## Problem
All system prompts in Cipher configuration guide were narrowly focused on
programming ("AI programming assistant", "coding tasks", "software engineering"),
while MAP Framework uses Cipher for broader purposes:
- Knowledge management (semantic search, deduplication)
- Reasoning trace analysis (pattern extraction, quality scoring)
- Documentation analysis (architecture, specifications)
- Multi-domain support (not just coding)

## Solution
Created comprehensive MAP Framework-optimized system prompt that emphasizes:
- Knowledge management and reasoning (core capabilities)
- ACE pattern support (Acquire, Curate, Extract)
- Cross-session knowledge continuity
- Semantic search and deduplication principles
- Multiple knowledge domains (architecture, security, testing, etc.)
- Quality scoring and confidence assessment

## Changes
Updated system prompts in 5 locations:
1. Base example (line 41-45) - short version
2. Section "### 4. System Prompt" (line 142-188) - full detailed version
3. Example 1: Minimal config (Ollama) - short version
4. Example 2: Production config (Anthropic + Voyage) - short version
5. Example 3: Hybrid config (Ollama + OpenAI) - short version

## Impact
Users now have system prompt that:
- Reflects actual MAP Framework use cases
- Guides Cipher to extract actionable knowledge (not just code)
- Supports reasoning pattern identification
- Enables cross-project knowledge sharing
- Emphasizes semantic search and quality scoring

Addresses user feedback: "зачем мне промпт про программирование?"
## Problem
Users see "Knowledge graph is disabled in environment" warning when
starting Cipher and don't know:
- What knowledge graph is
- Whether it's an error or normal behavior
- How to enable it if needed
- When to use it vs semantic search

## Solution
Added comprehensive Knowledge Graph documentation covering:
1. What KG is (advanced relationship modeling)
2. Two implementation options (in-memory vs Neo4j)
3. Complete environment variable reference
4. MCP integration examples
5. Decision guide (when to enable vs skip)

## Changes

### 03-cipher-configuration.md
Added new section "### 5. Knowledge Graph (опционально)" with:
- Explanation that KG is disabled by default (not an error)
- Variant 1: In-Memory setup (no infrastructure)
- Variant 2: Neo4j setup (production, with Docker example)
- Complete environment variable table (8 variables)
- Claude Code MCP configuration examples
- Decision matrix (when to enable vs when to skip)

### 06-troubleshooting.md
Added new subsection in "Cipher установка и конфигурация":
- "### Проблема: Knowledge graph is disabled in environment"
- Clarification that it's NOT an error
- Explanation of dual storage (Qdrant + optional KG)
- Quick enable instructions for both variants
- Cross-reference to full documentation

## Environment Variables Documented

| Variable | Default | Required | Purpose |
|----------|---------|----------|---------|
| KNOWLEDGE_GRAPH_ENABLED | false | No | Enable KG features |
| KNOWLEDGE_GRAPH_TYPE | in-memory | No | Backend type |
| KNOWLEDGE_GRAPH_HOST | localhost | For Neo4j | Server host |
| KNOWLEDGE_GRAPH_PORT | 7687 | For Neo4j | Bolt port |
| KNOWLEDGE_GRAPH_URI | - | For Neo4j | Full URI |
| KNOWLEDGE_GRAPH_USERNAME | neo4j | For Neo4j | Auth user |
| KNOWLEDGE_GRAPH_PASSWORD | - | YES (Neo4j) | Auth password |
| KNOWLEDGE_GRAPH_DATABASE | neo4j | For Neo4j | DB name |

## Impact
- Users understand KG warning is normal, not error
- Clear decision guide prevents unnecessary complexity
- Production users have Neo4j Docker example
- Simple users can use in-memory variant
- Cross-references enable deeper learning

Addresses user question: "INFO: [KG-Factory] Knowledge graph is disabled
in environment - как включить?"
## Changes

### examples/cipher/docker-compose.yml
Added neo4j service with:
- Official neo4j:latest image
- Localhost-only port bindings (7687 bolt, 7474 browser)
- Two volumes for data and logs persistence
- APOC plugin auto-installation
- Memory limits (512MB-2GB heap)
- Healthcheck with 40s start period
- Integration with cipher-network

Configuration:
```yaml
neo4j:
  image: neo4j:latest
  ports:
    - "127.0.0.1:7687:7687"  # Bolt
    - "127.0.0.1:7474:7474"  # Browser
  volumes:
    - neo4j_data:/data
    - neo4j_logs:/logs
  environment:
    NEO4J_AUTH: ${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD}
    NEO4J_PLUGINS: '["apoc"]'
    NEO4J_dbms_memory_heap_initial__size: 512m
    NEO4J_dbms_memory_heap_max__size: 2g
```

### examples/cipher/.env.example
Added Neo4j credentials:
- NEO4J_USER (default: neo4j)
- NEO4J_PASSWORD (with security warning to change)
- Password generation guidance (openssl rand -base64 24)

### examples/cipher/README.md
Enhanced documentation:
- Updated service count (2 → 3 services)
- Added Neo4j connection string (bolt://localhost:7687)
- New section: "Доступ к Neo4j Browser" with credentials guide
- APOC plugin mention
- Extended troubleshooting:
  - Port conflict detection for 7474/7687
  - Neo4j container logs checking
  - Memory tuning recommendations

### docs/cipher-setup-guide/03-cipher-configuration.md
Updated Knowledge Graph section:
- Added Docker Compose setup as recommended approach (Способ 1)
- Kept standalone docker run as alternative (Способ 2)
- Cross-reference to examples/cipher/ for infrastructure

## Infrastructure Benefits

### All-in-One Stack
Single `docker compose up -d` now provides:
1. Qdrant (vector search)
2. PostgreSQL (structured metadata)
3. Neo4j (knowledge graph)

### Security
- Localhost-only binding (127.0.0.1)
- Password externalization via .env
- APOC restricted procedures configured

### Production-Ready
- Persistent volumes for all data
- Healthchecks for all services
- Memory limits to prevent OOM
- Auto-restart policies

### Developer-Friendly
- Neo4j Browser at http://localhost:7474
- APOC plugin pre-installed
- Reasonable memory defaults
- Clear troubleshooting guide

## Usage

```bash
cd examples/cipher/
cp .env.example .env
# Edit .env and set POSTGRES_PASSWORD and NEO4J_PASSWORD
docker compose up -d
```

All three databases available:
- PostgreSQL: postgresql://cipher:pass@localhost:5432/cipher
- Qdrant: http://localhost:6333
- Neo4j: bolt://localhost:7687

## Impact
- Users can enable Knowledge Graph with zero additional setup
- Infrastructure documentation now matches code examples
- Single source of truth for Cipher backend stack
- Simplified onboarding (one command vs three separate setups)
…ides

Replace verbose MCP-CIPHER-QDRANT-SETUP.md (19KB) with:
- QUICKSTART-CIPHER.md (single-page quick start)
- cipher-setup-guide/ (modular step-by-step guides)

## Changes

### Removed
- MCP-CIPHER-QDRANT-SETUP.md (19KB verbose guide)

### Added
- QUICKSTART-CIPHER.md (3.8KB single-page guide)
- cipher-setup-guide/README.md (navigation hub)
- cipher-setup-guide/01-infrastructure-setup.md (Docker setup)

### Refactored (77% size reduction: 76KB → 17KB)
- 02-cipher-installation.md: 3.6KB → 302B (91% reduction)
- 03-cipher-configuration.md: 16KB → 3.2KB (80% reduction)
- 04-claude-code-setup.md: 15KB → 1.6KB (89% reduction)
- 05-verification.md: 16KB → 2KB (87% reduction)
- 06-troubleshooting.md: 24KB → 7KB (71% reduction)

## Structure

### Quick Start Path (~15 min)
QUICKSTART-CIPHER.md - all-in-one copy-paste guide

### Detailed Path (~20 min)
cipher-setup-guide/ - modular step-by-step guides:
1. Infrastructure setup (Docker, Qdrant, PostgreSQL, Neo4j)
2. Cipher installation (npm global)
3. Configuration (cipher.yml)
4. Claude Code MCP integration
5. Verification (health checks)
6. Troubleshooting (common issues)

## Documentation Patterns Applied

- Canonical source approach: QUICKSTART as single source of truth
- Infrastructure extraction: Docker setup in dedicated file
- Troubleshooting consolidation: single dedicated reference
- Cross-reference validation: all internal links verified

## Metrics

- Total size: 76KB → 17KB (77% reduction)
- Files: 5 verbose → 7 modular
- Installation/setup guides: 85-90% reduction
- Troubleshooting: 71% reduction (needs more content)

Closes cipher setup documentation refactoring task.
Remove examples/cipher/ directory - infrastructure setup now documented in:
- docs/QUICKSTART-CIPHER.md (single-page guide)
- docs/cipher-setup-guide/01-infrastructure-setup.md (detailed guide)

Remove .claude/curator_output.json - generated file, not source

Update .gitignore to exclude docs/claude-code-prompt-improver
@azalio azalio merged commit b737caa into main Nov 6, 2025
6 checks passed
azalio added a commit that referenced this pull request Feb 13, 2026
…-35)

MEDIUM fixes:
- #8: Remove dead RETRY_LOOP phase from orchestrator STEP_PHASES
- #10: Fix plan path to branch-scoped .map/<branch>/task_plan_<branch>.md
- #11: Fix findings path to branch-scoped .map/<branch>/findings_<branch>.md
- #12: Remove references to non-existent ralph-loop-config.json
- #13/#14: Rewrite map-resume to use step_state.json instead of progress.md
- #15: Fix INIT_PLAN heading format (### ST-XXX with - **Status:** prefix)
- #16: Fix regex in step_runner to match plan format (### heading, - **Status:**)
- #17: Fix map-learn contradiction about automatic learning

LOW fixes:
- #9/#31: Document dual state file system (step_state.json vs workflow_state.json)
- #19: Document intentional Evaluator/Reflector/Curator omission in map-efficient
- #20: Fix line count reference (~150 → ~540 lines)
- #21: Standardize all AskUserQuestion to Python function call syntax
- #22: Rename Steps 2.5/2.6 to 2a/2b to avoid phase number collision
- #23/#24: Fix map-debate comparison table (map-efficient uses single Actor)
- #25: Replace cat commands with Read tool comments in map-check
- #28/#29: Replace undefined thrashing_detected()/max_redecompositions
- #30: Add - **Status:** pending field to map-plan template
- #32: Note map-fast max 3 vs map-efficient max 5 intentional difference
- #33: Remove Evaluator from map-fast skipped agents list
- #34: Move AskUserQuestion to "Built-in Tools" section in map-release
- #35: Replace parallel bash & processes with sequential && in map-release

Template sync: All .claude/ changes mirrored to src/mapify_cli/templates/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants