Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .claude/skills/lp-enhance/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ Read CLAUDE.md and the project's codebase, then update CLAUDE.md to fill in miss
## Phase 1: Research

1. Read CLAUDE.md (if it exists)
2. Read .claude/settings.json (hooks, permissions, MCP)
3. Read .claude/rules/*.md (existing rules)
4. Read .claudeignore (if it exists)
2. Read .claude/CLAUDE.md (local config, if it exists)
3. Read .claude/settings.json (hooks, permissions, MCP)
4. Read .claude/settings.local.json (local settings, if it exists)
5. Read .claude/rules/*.md (existing rules)
6. Read .claudeignore (if it exists)
5. Scan src/ directory structure (top-level dirs, key files)
6. Read package.json / go.mod / pyproject.toml for stack detection
7. Check for monorepo indicators (workspaces, nx.json, lerna.json)
Expand All @@ -35,7 +37,7 @@ Count current CLAUDE.md actionable lines. Budget is 200 lines max. Plan which se
2. **## Architecture** - 3-5 bullets describing codebase shape
3. **## Conventions** - max 8 key patterns. Overflow to .claude/rules/conventions.md
4. **## Off-Limits** - max 8 guardrails specific to this project
5. **## Memory** - ONLY if agentic-memory is configured in settings.json. Max 6 bullets.
5. **## Memory** - ONLY if agentic-memory is configured in settings.json or settings.local.json. If memory config is in settings.local.json, write ## Memory to .claude/CLAUDE.md (not root CLAUDE.md). Max 6 bullets.
6. **## Key Decisions** - only decisions that affect how Claude works in this codebase

7. **Skill Authoring** - if .claude/rules/conventions.md lacks a Skill Authoring section, plan to add one
Expand Down
7 changes: 7 additions & 0 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Maximal Marginal Relevance for injection. Prevents injecting 5 memories on the s
## [P2] Memory: Exploration Slots
Reserve 1/8 injection slots for random discovery. Memories that get searched after injection rise in rank; ones that don't fade out. Multi-armed bandit without ML training. Matters at 100+ memories.

## [P2] Refactor: Immutability Violations in Fixer and Install
Pre-existing mutation patterns in `src/commands/doctor/fixer.ts` and `src/commands/memory/subcommands/install.ts`:
- `fixer.ts:438` — `delete hooks.Stop` mutates directly, should create new object without key
- `fixer.ts:122` — `hookList.push(entry)` mutates array before spread
- `install.ts:96,102,128,150` — direct assignment to settings/hooks objects (`settings['autoMemoryEnabled'] = false`, `allowList.push(tool)`)
All violate the immutability convention. Low risk (works fine), but should be cleaned up to match project standards.

## [P1] Docs: Command Responsibility Matrix
Add a matrix table to docs showing every command and skill with what it does:
| Responsibility | `init` | `doctor --fix` | `/lp-enhance` | `eval` | `memory` |
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.15.0] — 2026-04-06

### Added
- Memory placement prompt: choose shared (CLAUDE.md + settings.json) or local (.claude/CLAUDE.md + settings.local.json) when setting up memory
- Local placement keeps memory config gitignored — co-devs never see it
- `doctor --fix` and `memory install` respect placement choice for all memory-related writes
- Quality and memory analyzers check both shared and local files
- `.claude/.gitignore` now includes `CLAUDE.md` for local config support
- Doctor and analyzers now read `.claude/CLAUDE.md` and `settings.local.json`
- `isMemoryInstalled()` checks both settings files for memory hooks

### Fixed
- `doctor --fix` injected memory guidance into CLAUDE.md on projects without agentic-memory installed — now only triggers when the MCP server is configured in project settings
- Skills (lp-migrate-memory) no longer installed when using local placement

## [0.14.2] — 2026-04-06

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ claude-launchpad memory

If memory is not installed, it runs interactive setup. If installed, it shows stats. Requires native deps first: `npm install better-sqlite3 sqlite-vec`.

During setup, you choose where memory config lives:

- **Shared** (default) — config goes to `CLAUDE.md` + `settings.json` (committed, team sees it)
- **Local** — config goes to `.claude/CLAUDE.md` + `settings.local.json` (gitignored, only you)

Use "local" when co-devs have different memory setups (e.g. you use agentic-memory, they use built-in). Your choice is persisted so `doctor --fix` won't re-ask.

Every session, Claude loads what it needs to know and stores new knowledge as it works. Stale facts fade on their own. Knowledge Claude actually uses gets reinforced. Each project has its own isolated memory, and you can sync it across machines via private GitHub Gist.

Browse everything with `--dashboard` -- a terminal UI with vim navigation, filtering, and search.
Expand Down
4 changes: 4 additions & 0 deletions TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ All planned work complete. Future features in BACKLOG.md.
- Fix: memory retrieval truncation (500 char slice), store Zod max removal, MCP server version from package.json.
- Feat: /lp-enhance eval scenario gen + .claudeignore review + skill auto-update via doctor --fix. Karpathy-inspired copy rewrite. SEO pass.
- Published v0.12.2, v0.13.0, v0.13.1, v0.14.0.
### 2026-04-06 (session 25-26)
- Fix: doctor --fix injected memory guidance into CLAUDE.md on non-memory projects (v0.14.3).
- Feat: Memory placement — interactive local vs shared config routing. Parser reads both files, analyzers check both, fixer routes writes based on placement.
- Published v0.14.3, v0.15.0.
15 changes: 15 additions & 0 deletions docs/content/docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ description: Release history for Claude Launchpad.

{/* Auto-generated from CHANGELOG.md - do not edit directly */}

## [0.15.0] — 2026-04-06

### Added
- Memory placement prompt: choose shared (CLAUDE.md + settings.json) or local (.claude/CLAUDE.md + settings.local.json) when setting up memory
- Local placement keeps memory config gitignored — co-devs never see it
- `doctor --fix` and `memory install` respect placement choice for all memory-related writes
- Quality and memory analyzers check both shared and local files
- `.claude/.gitignore` now includes `CLAUDE.md` for local config support
- Doctor and analyzers now read `.claude/CLAUDE.md` and `settings.local.json`
- `isMemoryInstalled()` checks both settings files for memory hooks

### Fixed
- `doctor --fix` injected memory guidance into CLAUDE.md on projects without agentic-memory installed — now only triggers when the MCP server is configured in project settings
- Skills (lp-migrate-memory) no longer installed when using local placement

## [0.14.2] — 2026-04-06

### Fixed
Expand Down
27 changes: 24 additions & 3 deletions docs/content/docs/memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Running `claude-launchpad memory` without flags uses a smart default:
- SQLite database at `~/.agentic-memory/` (shared across projects, scoped per project internally)
- SessionStart hook that injects relevant memories at session start
- 7 MCP tools for storing, searching, and managing memories
- Memory guidance section in CLAUDE.md
- `/lp-migrate-memory` skill for porting legacy auto-memory files
- Memory guidance section in CLAUDE.md (or `.claude/CLAUDE.md` for local placement)
- `/lp-migrate-memory` skill for porting legacy auto-memory files (shared placement only)
- Global MCP server registration via `claude mcp add --scope user`

If auto-registration fails, run the command manually:
Expand All @@ -62,6 +62,27 @@ If auto-registration fails, run the command manually:
claude mcp add --scope user agentic-memory -- npx claude-launchpad memory serve
```

## Shared vs local placement

During setup, you choose where memory config lives:

```
? Where should memory config go?
❯ Shared (team sees it) — CLAUDE.md + settings.json
Local (only you) — .claude/CLAUDE.md + settings.local.json
```

**Shared** (default) writes memory guidance, hooks, and tool permissions to committed project files. Your whole team sees the memory setup.

**Local** writes everything to gitignored files (`.claude/CLAUDE.md` and `.claude/settings.local.json`). Co-devs never see your memory config and can use their own setup (built-in auto-memory, a different MCP server, or nothing).

Your choice is persisted in `settings.local.json` so `doctor --fix` applies memory fixes to the correct files without re-asking.

Use local when:
- You share a repo with devs who use different memory setups
- You want to try agentic-memory without affecting the team config
- The project's shared CLAUDE.md is managed by someone else

## Memory types

Not all knowledge ages the same way. A bug you fixed last Tuesday matters less next month. Your project's architecture matters for years. Memory types reflect this:
Expand Down Expand Up @@ -172,7 +193,7 @@ When memory is detected, `doctor` adds a Memory analyzer that checks:
- CLAUDE.md guidance present
- MCP tool permissions set

`doctor --fix` auto-repairs missing permissions and auto-memory settings.
`doctor --fix` auto-repairs missing permissions and auto-memory settings. The fixer respects your placement choice, writing to the local or shared files accordingly.

## How it works under the hood

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/migrate-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: /lp-migrate-memory
description: Migrate legacy Claude Code auto-memory files into agentic-memory.
---

Skill that ports your existing `~/.claude/projects/*/memory/*.md` files into the agentic-memory system. Installed automatically when you run `claude-launchpad memory`.
Skill that ports your existing `~/.claude/projects/*/memory/*.md` files into the agentic-memory system. Installed automatically when you run `claude-launchpad memory` with shared placement. For local placement, run the skill manually with `/lp-migrate-memory` inside Claude Code.

```
/lp-migrate-memory
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-launchpad",
"version": "0.14.2",
"version": "0.15.0",
"description": "CLI toolkit for Claude Code — scaffold CLAUDE.md, diagnose config, enforce hooks, test with eval, add persistent memory",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { fileExists } from "./lib/fs-utils.js";
const program = new Command()
.name("claude-launchpad")
.description("CLI toolkit that makes Claude Code setups measurably good")
.version("0.14.2", "-v, --version")
.version("0.15.0", "-v, --version")
.action(async () => {
// Default behavior: detect existing config and route accordingly
const hasConfig = await fileExists(join(process.cwd(), "CLAUDE.md"))
Expand Down
25 changes: 14 additions & 11 deletions src/commands/doctor/analyzers/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ const MEMORY_MCP_TOOLS = [
] as const;

export function hasMemoryIndicators(config: ClaudeConfig): boolean {
const hasMcpServer = config.mcpServers.some((s) => s.name === "agentic-memory");
const hasHookRef = config.hooks.some(
(h) => h.command?.includes("memory context"),
);
return hasMcpServer || hasHookRef;
return config.mcpServers.some((s) => s.name === "agentic-memory");
}

/**
Expand Down Expand Up @@ -54,19 +50,22 @@ export async function analyzeMemory(config: ClaudeConfig): Promise<AnalyzerResul
}

// 3. autoMemoryEnabled should be false (built-in memory conflicts with agentic-memory)
const autoMemoryDisabled = config.settings?.autoMemoryEnabled === false;
const autoMemoryDisabled = config.settings?.autoMemoryEnabled === false
|| config.localSettings?.autoMemoryEnabled === false;
if (!autoMemoryDisabled) {
issues.push({
analyzer: "Memory",
severity: "medium",
message: "autoMemoryEnabled not disabled — built-in memory may conflict with agentic-memory",
fix: "Set autoMemoryEnabled: false in .claude/settings.json",
fix: "Set autoMemoryEnabled: false in settings.json or settings.local.json",
});
}

// 5. CLAUDE.md memory guidance
// 5. CLAUDE.md memory guidance (check both shared and local)
const hasMemoryGuidance = config.claudeMdContent?.includes("agentic-memory")
|| config.claudeMdContent?.includes("## Memory");
|| config.claudeMdContent?.includes("## Memory")
|| config.localClaudeMdContent?.includes("agentic-memory")
|| config.localClaudeMdContent?.includes("## Memory");
if (!hasMemoryGuidance) {
issues.push({
analyzer: "Memory",
Expand All @@ -76,9 +75,13 @@ export async function analyzeMemory(config: ClaudeConfig): Promise<AnalyzerResul
});
}

// 6. MCP tool permissions
// 6. MCP tool permissions (check both shared and local settings)
const permissions = (config.settings?.permissions as Record<string, unknown> | undefined) ?? {};
const allowList = (permissions.allow as string[] | undefined) ?? [];
const localPermissions = (config.localSettings?.permissions as Record<string, unknown> | undefined) ?? {};
const allowList = [
...((permissions.allow as string[] | undefined) ?? []),
...((localPermissions.allow as string[] | undefined) ?? []),
];
const missingTools = MEMORY_MCP_TOOLS.filter((t) => !allowList.includes(t));
if (missingTools.length > 0) {
issues.push({
Expand Down
3 changes: 2 additions & 1 deletion src/commands/doctor/analyzers/quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export async function analyzeQuality(config: ClaudeConfig): Promise<AnalyzerResu
const sections = hasMemoryIndicators(config)
? [...BASE_SECTIONS, MEMORY_SECTION]
: [...BASE_SECTIONS];
const combinedContent = [content, config.localClaudeMdContent].filter(Boolean).join("\n");
let sectionsFound = 0;
for (const section of sections) {
if (section.pattern.test(content)) {
if (section.pattern.test(combinedContent)) {
sectionsFound++;
} else {
issues.push({
Expand Down
Loading
Loading