-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When setting up Cortex in a new project, cortex init outputs the hooks JSON but does not create the required .claude/rules/ files. This leaves a manual gap that's easy to miss:
.claude/rules/cortex-memory-instructions.md— Instructs Claude to use[MEMORY:]tags.claude/rules/cortex-briefing.md— Empty file that Cortex populates with extracted memories
Without these files, Layer 3 extraction (self-reporting via [MEMORY:] tags) doesn't work because Claude doesn't know to use the tags.
Current Setup Flow (with gap)
cortex init # ✅ Creates project hash, outputs hooks JSON
# User manually adds hooks to .claude/settings.local.json ✅
# User manually creates .claude/rules/ directory ❌ Easy to miss
# User manually copies template file ❌ Easy to miss
# User manually creates empty briefing file ❌ Easy to missProposed Solution
Enhance cortex init to handle full Claude Code integration:
Option A: New --setup flag
cortex init # Current behavior (backward compatible)
cortex init --setup # Creates .claude/rules/ with both filesOption B: Interactive prompt
$ cortex init
Created project hash: 9c50fee522dcb7a2
Set up Claude Code integration? [Y/n] Y
Created: .claude/rules/cortex-memory-instructions.md
Created: .claude/rules/cortex-briefing.md
Add the following to .claude/settings.local.json:
{
"hooks": {
"Stop": [...],
"PreCompact": [...],
"SessionStart": [...]
}
}
Option C: Single command does everything
cortex init # Always creates rules files if .claude/ existsFiles to Create
.claude/rules/cortex-memory-instructions.md
Copy from templates/cortex-memory-instructions.md (already exists in repo)
.claude/rules/cortex-briefing.md
<!-- Cortex briefing - auto-populated by cortex session-start -->Acceptance Criteria
-
cortex init(or--setupvariant) creates.claude/rules/directory - Copies
cortex-memory-instructions.mdtemplate to rules directory - Creates empty
cortex-briefing.mdfile - Outputs clear instructions for adding hooks to settings
- Doesn't overwrite existing files without
--forceflag - Update README with complete setup flow
Context
Discovered while setting up klockthingy project — hooks were configured and working, but Layer 3 extraction wasn't happening because the rules files were missing.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request