Skip to content

feat: phases 24-25 — setup permissions bootstrap + wizard coverage gaps#117

Open
RichardHightower wants to merge 10 commits intomainfrom
v8.0/phases-24-25
Open

feat: phases 24-25 — setup permissions bootstrap + wizard coverage gaps#117
RichardHightower wants to merge 10 commits intomainfrom
v8.0/phases-24-25

Conversation

@RichardHightower
Copy link
Contributor

Summary

  • Phase 24: Eliminates Claude Code permission prompts during setup by bootstrapping .claude/settings.json via Write tool (Step 0) and consolidating environment detection into a single ab-setup-check.sh script
  • Phase 25: Closes wizard coverage gaps — GraphRAG gated behind ChromaDB, BM25/tsvector note for PostgreSQL, search mode education, cache awareness, query cache docs in SKILL.md and configuration-guide.md

Changes

  • agent-brain-plugin/templates/settings.json — 24-entry permission allowlist template
  • agent-brain-plugin/scripts/ab-setup-check.sh — JSON-outputting environment detection
  • agent-brain-plugin/commands/agent-brain-setup.md — Step 0 bootstrap + wizard gap fixes
  • agent-brain-plugin/commands/agent-brain-config.md — wired to use ab-setup-check.sh
  • agent-brain-plugin/skills/configuring-agent-brain/SKILL.md — query cache + PostgreSQL notes
  • agent-brain-plugin/skills/configuring-agent-brain/references/configuration-guide.md — query cache config docs
  • agent-brain-plugin/tests/test_plugin_wizard_spec.py — 15 regression tests
  • Planning docs for phases 24-25

Test plan

  • task before-push passes (930 server + 185 CLI tests)
  • 15 wizard regression tests validate all required sections
  • GraphRAG correctly gated behind ChromaDB selection
  • Manual: run /agent-brain-setup on fresh project, verify no permission prompts

🤖 Generated with Claude Code

RichardHightower and others added 10 commits March 15, 2026 19:22
Plans 24-01 and 24-02 eliminate Claude Code permission prompts during
Agent Brain setup by pre-writing .claude/settings.json via Write tool
and consolidating environment detection into ab-setup-check.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Research confirmed GraphRAG is hard-incompatible with PostgreSQL backend
(raises ValueError in query_service.py). Plan closes 3 wizard gaps:
- Step 4: BM25 replaced by tsvector when PostgreSQL selected
- Step 5: GraphRAG gated on ChromaDB-only (auto-disabled for PostgreSQL)
- Step 6: Cache awareness note (embedding + query caches auto-enabled)

Also adds query cache documentation to SKILL.md and configuration-guide.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… wizard

- Step 4: Add tsvector/BM25 informational note when PostgreSQL is selected
- Step 5: Gate GraphRAG on storage backend; PostgreSQL users get incompatibility message
- Step 6: Add cache awareness note (embedding cache + query cache auto-enabled)
… cache awareness

- 12 structural tests verifying wizard steps 2-7 content and config keys
- test_setup_wizard_step4_postgres_bm25_note: verifies tsvector in Step 4
- test_setup_wizard_step5_graphrag_postgres_gate: verifies ChromaDB gate in Step 5
- test_setup_wizard_step6_cache_awareness: verifies auto-enabled cache note in Step 6
- All 15 tests pass
…ap to agent-brain-setup.md

- Create agent-brain-plugin/templates/settings.json with 24-entry allowlist for all wizard operations
- Add Step 0: Bootstrap Permissions to agent-brain-setup.md before Step 1
- Step 0 instructs using Write tool (always pre-authorized) to create .claude/settings.json
- Inline full JSON permission block in the command for self-contained bootstrap
- Update Output section to show [0/10] Bootstrapping permissions progress step
- Fixes bootstrap problem: wizard no longer triggers 15+ permission prompts on fresh project
…ent, PostgreSQL BM25 note

- Rename 'Embedding Cache Tuning' section to 'Caching' with two subsections
- Add 'Query Cache' subsection: auto-enabled, TTL-based, QUERY_CACHE_TTL/MAX_SIZE vars
- Update Query Mode Selection table: 'Requires GraphRAG' -> 'Requirements' column
- graph/multi modes now show 'GraphRAG + ChromaDB backend' requirement
- Add note: graph/multi not available with PostgreSQL backend
- Add PostgreSQL + BM25 note after wizard config table (tsvector replacement)
…guration-guide.md

- Add QUERY_CACHE_TTL and QUERY_CACHE_MAX_SIZE to Environment Variables table
- Add 'BM25 and Full-Text Search with PostgreSQL' note after postgres config block
- Add 'Query Cache Configuration' section with TTL/size env vars and examples
- Document that graph/multi modes bypass query cache
- Document cache invalidation behavior (invalidated on reindex)
…o use it

- Create agent-brain-plugin/scripts/ab-setup-check.sh — single-invocation pre-flight detection
- Script outputs structured JSON: agent_brain_installed, config_file_found, ollama_running,
  docker_available, docker_compose_available, python_version, api_keys, available_postgres_port,
  large_dirs, ollama_models
- Consolidates 3-method Ollama check + port scan + find/du/wc loop into one call
- agent-brain-config.md Step 2 now runs ab-setup-check.sh and parses SETUP_STATE JSON
- agent-brain-config.md Step 6 reads large_dirs from SETUP_STATE instead of find/du/wc loop
- agent-brain-setup.md Step 1 runs ab-setup-check.sh and stores SETUP_STATE for Steps 2-12
- Both files retain fallback documentation for cases where script is not found
…cumentation

- 25-01-SUMMARY.md: wizard BM25/PostgreSQL, GraphRAG gate, cache awareness + 15 tests
- 25-02-SUMMARY.md: SKILL.md query cache section, mode table, PostgreSQL BM25 note
- STATE.md: advance to phase 25 plan 2 complete
- ROADMAP.md: mark phase 25 plans 1+2 complete (2/2)
- Add 24-01-SUMMARY.md: settings.json template + Step 0 bootstrap
- Add 24-02-SUMMARY.md: ab-setup-check.sh detection script
- Update STATE.md with Phase 24 decisions and performance metrics
- Update ROADMAP.md: mark Phase 24 plans 24-01 and 24-02 complete
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.

1 participant