Merged
Conversation
New module src/onboarding.rs providing three public entry points: - run_interactive: full first-run experience with banner, vault scan, dialoguer prompts (name/role/purpose), indexing, L1 extraction - run_detect_json: non-destructive vault inspection returning JSON - run_apply_json: non-interactive setup for agent/CI use Supports flags for partial flows (identity-only, reindex-only, quiet) and pre-filled values to skip interactive prompts.
Expose identity (compact user context at session start) and setup (detect/apply onboarding) as MCP tools in serve.rs. Updates server instructions string to advertise both tools.
Wire VaultProfile through the indexer call chain (run_index -> run_index_inner, run_index_shared) and call extract_l1_facts at the end of each index run. The profile is loaded once in run_index and passed through, eliminating redundant load_vault_profile calls for exclude patterns and people detection. In the watcher, both startup reconciliation and full rescan pass the profile from the existing Arc<Option<VaultProfile>> context.
Update CHANGELOG with v1.6.0 Onboarding + Identity entry, bump README tool/endpoint counts to 25 MCP tools and 26 HTTP endpoints, add identity endpoints to the HTTP table, check off Identity roadmap item, and document identity.rs and onboarding.rs modules in CLAUDE.md architecture section. Fix three clippy warnings (collapsible_if x2, if_same_then_else x1) and reformat source files changed by this task.
The `identity --json` path was reading L0 facts from the identity_facts table (tier=0), which is never populated. L0 data (name, role, vault_purpose) lives in config.toml. Now the JSON output mirrors the non-JSON path by reading from config.
…ount Skip files under templates and archive folders in extract_active_projects to prevent template files (e.g. 05-Templates/Project.md) from leaking into active_projects. Adds path_is_in_excluded_folder helper that strips PARA numeric prefixes before matching. Also fixes people_notes count in run_detect_json: adds a depth-2 fallback scan for People/ subfolders when the profile doesn't detect a top-level people folder (e.g. 03-Resources/People/).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
engraph init) — polished CLI with welcome banner, vault scan checkmarks, identity prompts (dialoguer), progress bars, actionable next stepsengraph init --detect --jsonfor vault inspection,--jsonfor non-interactive apply. Two-phase detect → apply for AI agents. MCPsetuptool for in-session onboarding.identityMCP tool + CLI + HTTP returns compact L0/L1 context block (~170 tokens). L1 auto-extracted during indexing: active projects, key people, current focus, OOO, blocking items.Changes
identity.rs(L1 extraction + formatting),onboarding.rs(interactive + agent CLI UX)identity,setup(25 total)GET /api/identity,POST /api/setup(26 total)identity_factsSQLite table with CRUD[identity]and[memory]config sections in config.tomlengraph index)Test plan
cargo fmt --check— cleancargo clippy -- -D warnings— cleancargo test --lib— 458 passed--detect --json— 179 files, 21 people notes, correct structure--identity --json— saves identity, returns JSONidentityCLI — L0 + L1 block renders correctlyidentity --json— JSON with L0 from config, L1 from DBidentity --refresh— re-extracts L1, shows 11 projects, 5 peopleGET /api/identity+POST /api/setup— both return dataFollow-up
2025-11-25protocol support (fixes MCP tools not surfaced in Claude Desktop Cowork/Code modes despite successful connection #20, upstream PR merged: feat: add 2025-11-25 protocol version support modelcontextprotocol/rust-sdk#802)