Skip to content

feat(persona): Profile Discovery Pipeline for bootstrap pre-fill#1

Merged
d-wwei merged 15 commits into
mainfrom
feat/profile-discovery-pipeline
Apr 11, 2026
Merged

feat(persona): Profile Discovery Pipeline for bootstrap pre-fill#1
d-wwei merged 15 commits into
mainfrom
feat/profile-discovery-pipeline

Conversation

@d-wwei
Copy link
Copy Markdown
Owner

@d-wwei d-wwei commented Apr 11, 2026

Summary

  • Add Profile Discovery Pipeline that scans 5 sources for existing user profile data before bootstrap interview
  • New GET /api/persona/discover endpoint (read-only, no side effects)
  • Bootstrap skill now has Step 0: present discovered data for user confirmation instead of asking from scratch

What it does

When a user installs agent-recall and runs /bootstrap, the system now:

  1. Scans current DB, ~/.claude/CLAUDE.md @ references, well-known paths, ~/.claude/memory/, and legacy ~/.claude-mem/ DB
  2. Presents discovered profile data grouped by confidence (high/medium/low)
  3. User confirms → fields saved → interview rounds skipped for covered fields
  4. If all required fields are covered, skip interview entirely → 30 seconds vs 5 minutes

New files

  • src/utils/claude-md-parser.ts — @ reference parser
  • src/services/persona/LegacyDbImporter.ts — read-only legacy DB import
  • src/services/persona/ProfileDiscoveryService.ts — discovery engine with conflict detection
  • tests/services/persona/profile-discovery.test.ts — 14 tests, all passing

Test plan

  • bun test tests/services/persona/profile-discovery.test.ts — 14/14 pass
  • curl http://localhost:37777/api/persona/discover — returns correct discovery results
  • npm run build-and-sync — builds and syncs to plugin directory
  • Manual: run /bootstrap in a fresh project to verify discovery pre-fill flow

🤖 Generated with Claude Code

d-wwei and others added 15 commits April 10, 2026 20:02
- Add design spec for npx agent-recall CLI (install/doctor/adapter/status)
- Update ROADMAP to reflect actual codebase state:
  - SeekDB is now default vector backend (not ChromaDB)
  - KnowledgeLint, ObservationRecord types, Markdown sync already completed
  - Revised sprint priorities

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 tasks, TDD-first, with dependency graph for parallelization.
Tasks 1-4 independent (output/platform/runtime/hooks modules),
5-7 compose them (doctor/install/adapter commands),
8-10 integrate and verify (build pipeline, INSTALL.md, integration tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements registerHooks(), isHooksRegistered(), and removeHooks() for
the new npx agent-recall CLI installer. Substitutes $AGENT_RECALL_ROOT
placeholder in hook source files (mirrors existing shell sed pattern).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements runtime-check.ts with 8 diagnostic checks (Node version,
Bun, worker health, SQLite DB, SeekDB, Chroma fallback, disk space,
viewer UI) and runAllChecks() aggregate. All checks never throw.
23 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements src/cli/installer/index.ts — the npx entry point that parses
argv, dispatches to lazy-loaded command modules, and shows help/version.
All 36 output helper + argument parsing tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three thin command wrappers that compose the existing installer lib:
- adapter.ts: list/install/remove platform hook adapters (uses PLATFORMS,
  getPlatformById, registerHooks, isHooksRegistered, removeHooks)
- status.ts: runs four runtime checks and prints pass/fail results
- uninstall.ts: stops worker, removes all registered hooks, prints data
  dir path with manual-deletion instructions

All three export async run(): Promise<void> per the CLI entry point contract.
Smoke-tested: typeof run === 'function' for all three modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements runDoctor() which aggregates runtime checks (Node, Bun, Worker,
DB, SeekDB, Chroma, Disk, Viewer) with per-platform adapter hook checks,
returning a DoctorReport with issueCount and fixableCount. Includes 13
tests covering shape, category validity, and count invariants.

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

Adds src/cli/installer/commands/install.ts with the full install flow
(npm mode + --from-source mode), plus unit tests for the two exported
utility functions. All 128 installer tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire src/cli/installer/index.ts into scripts/build-hooks.js so npm run
build produces bin/agent-recall.cjs. Add bin field to package.json so
npx agent-recall works out of the box. Fix .ts extension imports and
spurious detached option in install.ts, and fix the import.meta.url
entry-point guard to work in the compiled CJS bundle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `npx agent-recall` CLI as unified entry point for installation,
diagnostics, and platform adapter management.

Commands: install, doctor, adapter, status, uninstall
Platforms: Claude Code, Cursor, Codex CLI, Gemini CLI, OpenCode
135 tests, 0 failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two-stage LLM pipeline: knowledge synthesis + Mermaid diagram generation.
Default model: Opus 4.6, configurable. Graceful fallback to text merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tasks: prompts, parser, LLM client, wire aiMerge, Mermaid,
settings/doctor, PruneStage supersession. Tasks 1-3 parallelizable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@d-wwei d-wwei merged commit d7b3d65 into main Apr 11, 2026
0 of 2 checks passed
@d-wwei d-wwei deleted the feat/profile-discovery-pipeline branch April 11, 2026 03:57
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