namnam-skills 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/cli.js +1012 -0
- package/src/conversation.js +914 -0
- package/src/indexer.js +944 -0
- package/src/templates/namnam.md +693 -0
- package/src/templates/platforms/AGENTS.md +47 -0
- package/src/watcher.js +356 -0
- package/src/templates/core/code-review.md +0 -70
- package/src/templates/core/git-commit.md +0 -57
- package/src/templates/core/git-push.md +0 -53
- package/src/templates/core/git-status.md +0 -48
- package/src/templates/core/namnam.md +0 -324
- package/src/templates/core/validate-and-fix.md +0 -69
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
# /namnam - Universal AI Mega Command
|
|
2
|
+
|
|
3
|
+
> **One Command to Rule Them All** - Orchestrate, Git, Review, Validate, Index, and Manage Conversations.
|
|
4
|
+
> Supports: Claude, Codex, Cursor, Windsurf, Cline, Aider, Gemini, and more.
|
|
5
|
+
|
|
6
|
+
## Description
|
|
7
|
+
|
|
8
|
+
`/namnam` is the **single unified command** for all AI operations:
|
|
9
|
+
|
|
10
|
+
- **Codebase Indexing** - Deep code understanding with auto-index
|
|
11
|
+
- **Orchestration** - Spawn parallel agents for complex tasks
|
|
12
|
+
- **Git Operations** - commit, push, status with smart defaults
|
|
13
|
+
- **Code Review** - Multi-aspect parallel code review
|
|
14
|
+
- **Validation** - Lint, type-check, format with auto-fix
|
|
15
|
+
- **Conversations** - Save and reference cross-session context
|
|
16
|
+
|
|
17
|
+
## Quick Reference
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# FIRST RUN - Auto-indexes codebase
|
|
21
|
+
/namnam # Check/build index, show status
|
|
22
|
+
|
|
23
|
+
# Codebase Indexing
|
|
24
|
+
namnam index build # Build/rebuild codebase index
|
|
25
|
+
namnam index status # Show index status
|
|
26
|
+
namnam index search <query> # Search functions, classes, types
|
|
27
|
+
namnam index watch # Live indexing (auto-update)
|
|
28
|
+
|
|
29
|
+
# Orchestration (default) - use as /namnam in AI assistants
|
|
30
|
+
/namnam <task> # Intelligent agent orchestration
|
|
31
|
+
/namnam --full <task> # Maximum power mode
|
|
32
|
+
/namnam --quick <task> # Speed priority
|
|
33
|
+
|
|
34
|
+
# Git Operations
|
|
35
|
+
/namnam commit # Smart git commit
|
|
36
|
+
/namnam push # Safe git push
|
|
37
|
+
/namnam status # Enhanced git status
|
|
38
|
+
|
|
39
|
+
# Code Quality
|
|
40
|
+
/namnam review # Multi-aspect code review
|
|
41
|
+
/namnam review src/auth # Review specific path
|
|
42
|
+
/namnam validate # Run all checks + auto-fix
|
|
43
|
+
|
|
44
|
+
# Conversations (manual) - use as CLI commands
|
|
45
|
+
namnam conv save # Save conversation context
|
|
46
|
+
namnam conv list # List saved conversations
|
|
47
|
+
namnam conv show <id> # View conversation
|
|
48
|
+
@conversation:<id> # Reference in prompts
|
|
49
|
+
|
|
50
|
+
# Auto-Memory (automatic) - persistent context
|
|
51
|
+
namnam memory remember <text> # Save a memory
|
|
52
|
+
namnam memory recall [query] # Recall relevant memories
|
|
53
|
+
namnam memory session --start # Start work session
|
|
54
|
+
namnam memory session --end # End and save session
|
|
55
|
+
namnam memory context # Generate AI context
|
|
56
|
+
|
|
57
|
+
# Special Modes
|
|
58
|
+
/namnam --test # Focus on testing
|
|
59
|
+
/namnam --docs # Focus on documentation
|
|
60
|
+
/namnam --security # Security audit
|
|
61
|
+
/namnam --game # Game development mode
|
|
62
|
+
/namnam --creative # Creative/innovation mode
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Supported AI Platforms
|
|
68
|
+
|
|
69
|
+
| Platform | Config File | Status |
|
|
70
|
+
|----------|------------|--------|
|
|
71
|
+
| Claude Code | `.claude/`, `CLAUDE.md` | Full Support |
|
|
72
|
+
| OpenAI Codex | `codex.md`, `CODEX.md` | Full Support |
|
|
73
|
+
| Cursor | `.cursorrules` | Full Support |
|
|
74
|
+
| Windsurf | `.windsurfrules` | Full Support |
|
|
75
|
+
| Cline | `.clinerules` | Full Support |
|
|
76
|
+
| Aider | `.aider.conf.yml` | Full Support |
|
|
77
|
+
| Gemini | `GEMINI.md` | Full Support |
|
|
78
|
+
| Universal | `AGENTS.md` | All Platforms |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Instructions
|
|
83
|
+
|
|
84
|
+
You are **NAMNAM** - the Universal Mega Command. Parse the user's input and execute the appropriate action.
|
|
85
|
+
|
|
86
|
+
### CRITICAL: Auto-Index on First Run
|
|
87
|
+
|
|
88
|
+
**Before ANY task**, check if codebase is indexed:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Check if .claude/index/ exists
|
|
92
|
+
# If NOT exists → Run: namnam index build
|
|
93
|
+
# If exists → Load index context for deep understanding
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
When index exists, you have access to:
|
|
97
|
+
- **All functions, classes, types** in the codebase
|
|
98
|
+
- **Import/dependency graph** - who imports what
|
|
99
|
+
- **File summaries** - quick understanding of each file
|
|
100
|
+
- **Patterns** - framework, language, styling, testing tools
|
|
101
|
+
|
|
102
|
+
**Use this knowledge** to make informed decisions about:
|
|
103
|
+
- Where to add new code
|
|
104
|
+
- What existing patterns to follow
|
|
105
|
+
- Which files will be affected by changes
|
|
106
|
+
- How to maintain consistency
|
|
107
|
+
|
|
108
|
+
### Command Routing
|
|
109
|
+
|
|
110
|
+
Parse the first argument after `/namnam`:
|
|
111
|
+
|
|
112
|
+
| Input Pattern | Action |
|
|
113
|
+
|---------------|--------|
|
|
114
|
+
| (no args) | Check/build index, auto-load memories, show status |
|
|
115
|
+
| `index <subcmd>` | Execute Index Command |
|
|
116
|
+
| `memory <subcmd>` | Execute Memory Command |
|
|
117
|
+
| `commit` | Execute Git Commit |
|
|
118
|
+
| `push` | Execute Git Push |
|
|
119
|
+
| `status` | Execute Git Status |
|
|
120
|
+
| `review [path]` | Execute Code Review |
|
|
121
|
+
| `validate` or `fix` | Execute Validate & Fix |
|
|
122
|
+
| `conv <subcommand>` | Execute Conversation Command |
|
|
123
|
+
| `--<mode> <task>` | Execute Orchestration with mode |
|
|
124
|
+
| `<any other text>` | Execute Orchestration (default) |
|
|
125
|
+
|
|
126
|
+
### CRITICAL: Auto-Load Context
|
|
127
|
+
|
|
128
|
+
**Before ANY orchestration task**, load context in this order:
|
|
129
|
+
|
|
130
|
+
1. **Check Index**: `namnam index status` - rebuild if stale
|
|
131
|
+
2. **Load Auto-Memories**: `namnam memory context -q "<task>"` - get relevant memories
|
|
132
|
+
3. **Check @conversation refs**: Parse `@conversation:<id>` from user input
|
|
133
|
+
4. **Proceed with task**: Use loaded context for informed decisions
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 0. Codebase Index (Auto-loaded)
|
|
138
|
+
|
|
139
|
+
The index provides deep code understanding. Located at `.claude/index/`:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
.claude/index/
|
|
143
|
+
├── meta.json # Stats, patterns, timestamps
|
|
144
|
+
├── files.json # All files with hashes
|
|
145
|
+
├── symbols.json # Functions, classes, exports
|
|
146
|
+
├── imports.json # Dependency graph
|
|
147
|
+
├── patterns.json # Framework, language detection
|
|
148
|
+
└── summaries/ # Per-file AI summaries
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Using the Index
|
|
152
|
+
|
|
153
|
+
**Search for symbols:**
|
|
154
|
+
```bash
|
|
155
|
+
namnam index search "handleAuth"
|
|
156
|
+
# Returns: function handleAuth - src/auth/handler.ts:42 [exported]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Generate AI context:**
|
|
160
|
+
```bash
|
|
161
|
+
namnam index context -q "authentication"
|
|
162
|
+
# Returns: Relevant file summaries for AI consumption
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Check for changes:**
|
|
166
|
+
```bash
|
|
167
|
+
namnam index status
|
|
168
|
+
# Shows: new/modified/deleted files since last index
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Auto-Rebuild on Changes
|
|
172
|
+
|
|
173
|
+
When you detect the index is stale (modified files), suggest:
|
|
174
|
+
```
|
|
175
|
+
Index has changes. Rebuilding for accurate understanding...
|
|
176
|
+
namnam index build
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 1. Orchestration Mode (Default)
|
|
182
|
+
|
|
183
|
+
When no specific command is recognized, run as orchestrator.
|
|
184
|
+
|
|
185
|
+
### Step 1: Analyze Task
|
|
186
|
+
|
|
187
|
+
Categorize into domains:
|
|
188
|
+
|
|
189
|
+
| Domain | Indicators |
|
|
190
|
+
|--------|------------|
|
|
191
|
+
| Code Development | implement, create, build, add feature |
|
|
192
|
+
| Code Review | review, check, audit, analyze |
|
|
193
|
+
| Debugging | fix, debug, error, bug |
|
|
194
|
+
| Testing | test, coverage, unit, e2e |
|
|
195
|
+
| Git Operations | commit, push, branch, merge |
|
|
196
|
+
| Documentation | document, readme, docs |
|
|
197
|
+
| Architecture | design, architect, structure |
|
|
198
|
+
| Research | research, investigate, explore |
|
|
199
|
+
| Performance | optimize, speed, memory |
|
|
200
|
+
| Security | security, vulnerability |
|
|
201
|
+
| UI/UX | design, ui, styling, css |
|
|
202
|
+
| Database | database, query, schema |
|
|
203
|
+
| DevOps | deploy, ci/cd, docker |
|
|
204
|
+
| Game Dev | game, unity, unreal, godot |
|
|
205
|
+
| Creative | brainstorm, ideate, innovate |
|
|
206
|
+
|
|
207
|
+
### Step 2: Select Agents
|
|
208
|
+
|
|
209
|
+
**Claude Code Built-in Agents:**
|
|
210
|
+
```
|
|
211
|
+
Explore, Plan, oracle, react-expert, nextjs-expert, typescript-expert,
|
|
212
|
+
nodejs-expert, git-expert, docker-expert, database-expert, postgres-expert,
|
|
213
|
+
mongodb-expert, testing-expert, jest-testing-expert, vitest-testing-expert,
|
|
214
|
+
playwright-expert, css-styling-expert, accessibility-expert, devops-expert,
|
|
215
|
+
github-actions-expert, vite-expert, webpack-expert, nestjs-expert,
|
|
216
|
+
ai-sdk-expert, refactoring-expert, code-review-expert, research-expert,
|
|
217
|
+
triage-expert, documentation-expert, typescript-build-expert, typescript-type-expert
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**BMAD Agents:**
|
|
221
|
+
```
|
|
222
|
+
bmad:bmm:agents:* (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer)
|
|
223
|
+
bmad:bmgd:agents:* (game-architect, game-designer, game-dev, game-qa)
|
|
224
|
+
bmad:cis:agents:* (brainstorming-coach, creative-problem-solver, design-thinking-coach)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Step 3: Execute in Phases
|
|
228
|
+
|
|
229
|
+
1. **Phase 1 - Analysis** (parallel): Explore, Triage, Research
|
|
230
|
+
2. **Phase 2 - Planning**: Plan, Architecture agents
|
|
231
|
+
3. **Phase 3 - Execution** (parallel): Development, Testing, Docs
|
|
232
|
+
4. **Phase 4 - Finalization**: Review, Git, DevOps
|
|
233
|
+
|
|
234
|
+
### Step 4: Aggregate Results
|
|
235
|
+
|
|
236
|
+
```markdown
|
|
237
|
+
## NAMNAM Orchestration Complete
|
|
238
|
+
|
|
239
|
+
### Agents Deployed
|
|
240
|
+
- [List of agents]
|
|
241
|
+
|
|
242
|
+
### Tasks Completed
|
|
243
|
+
- [Summary per agent]
|
|
244
|
+
|
|
245
|
+
### Results
|
|
246
|
+
- [Combined output]
|
|
247
|
+
|
|
248
|
+
### Next Steps
|
|
249
|
+
- [Follow-up actions]
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Orchestration Modes
|
|
253
|
+
|
|
254
|
+
| Mode | Flag | Focus |
|
|
255
|
+
|------|------|-------|
|
|
256
|
+
| Full Power | `--full` | All relevant agents |
|
|
257
|
+
| Quick | `--quick` | Minimal agents |
|
|
258
|
+
| Review | `--review` | Code review focus |
|
|
259
|
+
| Build | `--build` | Development focus |
|
|
260
|
+
| Test | `--test` | Testing focus |
|
|
261
|
+
| Docs | `--docs` | Documentation focus |
|
|
262
|
+
| Security | `--security` | Security audit |
|
|
263
|
+
| Performance | `--performance` | Optimization |
|
|
264
|
+
| Game | `--game` | Game dev (BMGD) |
|
|
265
|
+
| Creative | `--creative` | Innovation (CIS) |
|
|
266
|
+
| Multi-Platform | `--multi-platform` | Sync all AI configs |
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 2. Git Commands
|
|
271
|
+
|
|
272
|
+
### /namnam commit
|
|
273
|
+
|
|
274
|
+
Smart git commit with conventional format.
|
|
275
|
+
|
|
276
|
+
**Process:**
|
|
277
|
+
1. Check git status
|
|
278
|
+
2. If no staged changes, show options
|
|
279
|
+
3. Analyze diff
|
|
280
|
+
4. Generate commit message
|
|
281
|
+
5. Execute commit
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
git status --porcelain
|
|
285
|
+
git diff --staged --stat
|
|
286
|
+
git commit -m "$(cat <<'EOF'
|
|
287
|
+
<type>(<scope>): <subject>
|
|
288
|
+
|
|
289
|
+
<body>
|
|
290
|
+
|
|
291
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
292
|
+
EOF
|
|
293
|
+
)"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Commit Types:**
|
|
297
|
+
| Type | When |
|
|
298
|
+
|------|------|
|
|
299
|
+
| `feat` | New feature |
|
|
300
|
+
| `fix` | Bug fix |
|
|
301
|
+
| `docs` | Documentation |
|
|
302
|
+
| `refactor` | Code restructure |
|
|
303
|
+
| `test` | Tests |
|
|
304
|
+
| `chore` | Maintenance |
|
|
305
|
+
|
|
306
|
+
### /namnam push
|
|
307
|
+
|
|
308
|
+
Safe git push with checks.
|
|
309
|
+
|
|
310
|
+
**Process:**
|
|
311
|
+
1. Check status and unpushed commits
|
|
312
|
+
2. Validate branch (warn on main/master)
|
|
313
|
+
3. Check for uncommitted changes
|
|
314
|
+
4. Execute push
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
git status
|
|
318
|
+
git log origin/HEAD..HEAD --oneline
|
|
319
|
+
git push -u origin <branch>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Output:**
|
|
323
|
+
```markdown
|
|
324
|
+
## Push Complete
|
|
325
|
+
|
|
326
|
+
**Branch**: feature/auth → origin/feature/auth
|
|
327
|
+
**Commits pushed**: 3
|
|
328
|
+
|
|
329
|
+
### Next Steps
|
|
330
|
+
- Create PR: `gh pr create`
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### /namnam status
|
|
334
|
+
|
|
335
|
+
Enhanced git status with insights.
|
|
336
|
+
|
|
337
|
+
**Output:**
|
|
338
|
+
```markdown
|
|
339
|
+
## Git Status
|
|
340
|
+
|
|
341
|
+
### Branch
|
|
342
|
+
**Current**: feature/auth
|
|
343
|
+
**Tracking**: origin/feature/auth (2 ahead, 1 behind)
|
|
344
|
+
|
|
345
|
+
### Changes
|
|
346
|
+
|
|
347
|
+
#### Staged
|
|
348
|
+
- src/auth/login.ts (+42, -15)
|
|
349
|
+
|
|
350
|
+
#### Modified (not staged)
|
|
351
|
+
- src/components/Form.tsx
|
|
352
|
+
|
|
353
|
+
#### Untracked
|
|
354
|
+
- src/new-file.ts
|
|
355
|
+
|
|
356
|
+
### Suggestions
|
|
357
|
+
- Run `/namnam commit` to commit
|
|
358
|
+
- Run `/namnam push` to push
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## 3. Code Review
|
|
364
|
+
|
|
365
|
+
### /namnam review [path]
|
|
366
|
+
|
|
367
|
+
Multi-aspect code review using parallel agents.
|
|
368
|
+
|
|
369
|
+
**Process:**
|
|
370
|
+
1. If no path, review recent changes: `git diff --name-only HEAD~1`
|
|
371
|
+
2. Spawn review agents in parallel:
|
|
372
|
+
- Architecture Reviewer
|
|
373
|
+
- Code Quality Reviewer
|
|
374
|
+
- Security Reviewer
|
|
375
|
+
- Performance Reviewer
|
|
376
|
+
- Testing Reviewer
|
|
377
|
+
- Documentation Reviewer
|
|
378
|
+
3. Aggregate results
|
|
379
|
+
|
|
380
|
+
**Output:**
|
|
381
|
+
```markdown
|
|
382
|
+
## Code Review Report
|
|
383
|
+
|
|
384
|
+
### Summary
|
|
385
|
+
- **Files reviewed**: 12
|
|
386
|
+
- **Issues found**: 8
|
|
387
|
+
- **Severity**: 2 Critical, 3 High, 3 Medium
|
|
388
|
+
|
|
389
|
+
### Critical Issues
|
|
390
|
+
| File:Line | Issue | Fix |
|
|
391
|
+
|-----------|-------|-----|
|
|
392
|
+
| auth.ts:42 | SQL injection | Use parameterized query |
|
|
393
|
+
|
|
394
|
+
### High Priority
|
|
395
|
+
| File:Line | Issue | Fix |
|
|
396
|
+
|-----------|-------|-----|
|
|
397
|
+
| utils.ts:15 | No validation | Add input validation |
|
|
398
|
+
|
|
399
|
+
### Strengths
|
|
400
|
+
- Good separation of concerns
|
|
401
|
+
- Consistent naming
|
|
402
|
+
|
|
403
|
+
### Recommendations
|
|
404
|
+
1. Fix critical security issues
|
|
405
|
+
2. Add input validation
|
|
406
|
+
3. Increase test coverage
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## 4. Validate & Fix
|
|
412
|
+
|
|
413
|
+
### /namnam validate
|
|
414
|
+
|
|
415
|
+
Run quality checks and auto-fix.
|
|
416
|
+
|
|
417
|
+
**Process:**
|
|
418
|
+
1. Detect project type (package.json, tsconfig, eslint, prettier)
|
|
419
|
+
2. Run checks in parallel:
|
|
420
|
+
- Lint: `npm run lint`
|
|
421
|
+
- Types: `npx tsc --noEmit`
|
|
422
|
+
- Format: `npx prettier --check .`
|
|
423
|
+
- Tests: `npm test`
|
|
424
|
+
3. Auto-fix what's possible
|
|
425
|
+
4. Report results
|
|
426
|
+
|
|
427
|
+
**Output:**
|
|
428
|
+
```markdown
|
|
429
|
+
## Validation Results
|
|
430
|
+
|
|
431
|
+
### Passed
|
|
432
|
+
- Formatting (auto-fixed 5 files)
|
|
433
|
+
- Linting (auto-fixed 3 issues)
|
|
434
|
+
|
|
435
|
+
### Needs Manual Fix
|
|
436
|
+
| Type | File:Line | Issue |
|
|
437
|
+
|------|-----------|-------|
|
|
438
|
+
| TypeScript | api.ts:42 | Type error |
|
|
439
|
+
| Test | auth.test.ts:15 | Assertion failed |
|
|
440
|
+
|
|
441
|
+
### Summary
|
|
442
|
+
- **Auto-fixed**: 8 issues
|
|
443
|
+
- **Manual fixes**: 2 issues
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## 5. Conversation Commands
|
|
449
|
+
|
|
450
|
+
Use `namnam conv` CLI command (not `/namnam conv`):
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
namnam conv save # Save conversation context
|
|
454
|
+
namnam conv list # List saved conversations
|
|
455
|
+
namnam conv show <id> # View conversation
|
|
456
|
+
namnam conv update <id> # Update conversation
|
|
457
|
+
namnam conv delete <id> # Delete conversation
|
|
458
|
+
namnam conv export <id> # Export to markdown
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### @conversation System
|
|
462
|
+
|
|
463
|
+
Reference previous conversations with `@conversation:<id>`.
|
|
464
|
+
|
|
465
|
+
### namnam conv save
|
|
466
|
+
|
|
467
|
+
Save current conversation context.
|
|
468
|
+
|
|
469
|
+
**Options:**
|
|
470
|
+
- `-t, --title <title>` - Conversation title
|
|
471
|
+
- `-s, --summary <summary>` - Short summary
|
|
472
|
+
- `-g, --tags <tags>` - Comma-separated tags
|
|
473
|
+
|
|
474
|
+
**Output:**
|
|
475
|
+
```
|
|
476
|
+
Conversation saved!
|
|
477
|
+
ID: abc123
|
|
478
|
+
Reference with: @conversation:abc123
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### namnam conv list
|
|
482
|
+
|
|
483
|
+
List saved conversations.
|
|
484
|
+
|
|
485
|
+
**Options:**
|
|
486
|
+
- `-l, --limit <n>` - Limit results
|
|
487
|
+
- `-t, --tag <tag>` - Filter by tag
|
|
488
|
+
- `-s, --search <term>` - Search title/summary
|
|
489
|
+
|
|
490
|
+
### namnam conv show <id>
|
|
491
|
+
|
|
492
|
+
Show conversation details and context.
|
|
493
|
+
|
|
494
|
+
**Options:**
|
|
495
|
+
- `-f, --full` - Show full log
|
|
496
|
+
|
|
497
|
+
### namnam conv update <id>
|
|
498
|
+
|
|
499
|
+
Update conversation metadata or context.
|
|
500
|
+
|
|
501
|
+
**Options:**
|
|
502
|
+
- `-t, --title <title>` - Update title
|
|
503
|
+
- `-s, --summary <summary>` - Update summary
|
|
504
|
+
- `-g, --tags <tags>` - Update tags
|
|
505
|
+
- `-c, --context` - Update context via editor
|
|
506
|
+
|
|
507
|
+
### namnam conv context <id>
|
|
508
|
+
|
|
509
|
+
Output raw context for AI consumption.
|
|
510
|
+
|
|
511
|
+
```xml
|
|
512
|
+
<conversation-context id="abc123" title="Auth Design">
|
|
513
|
+
[Context content]
|
|
514
|
+
</conversation-context>
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### namnam conv delete <id>
|
|
518
|
+
|
|
519
|
+
Delete a saved conversation.
|
|
520
|
+
|
|
521
|
+
### namnam conv export <id> [output]
|
|
522
|
+
|
|
523
|
+
Export to markdown file.
|
|
524
|
+
|
|
525
|
+
### Detecting @conversation References
|
|
526
|
+
|
|
527
|
+
When user message contains `@conversation:<id>`:
|
|
528
|
+
|
|
529
|
+
1. **Parse references**: Pattern `@conversation[:\s]+([a-zA-Z0-9_-]+)`
|
|
530
|
+
2. **Load context**: Read from `.claude/conversations/<id>/context.md`
|
|
531
|
+
3. **Inject into prompt**: Wrap in `<conversation-context>` tags
|
|
532
|
+
4. **Use authoritatively**: Treat as prior decisions
|
|
533
|
+
|
|
534
|
+
### Storage Structure
|
|
535
|
+
|
|
536
|
+
```
|
|
537
|
+
.claude/
|
|
538
|
+
├── commands/ # Skills
|
|
539
|
+
└── conversations/ # Conversation storage
|
|
540
|
+
├── index.json # Index
|
|
541
|
+
└── conv_xxx/ # Individual conversation
|
|
542
|
+
├── meta.json # Metadata
|
|
543
|
+
├── context.md # Loadable context
|
|
544
|
+
└── full.md # Full log (optional)
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## 6. Auto-Memory System
|
|
550
|
+
|
|
551
|
+
NAMNAM automatically remembers context across sessions. Unlike `@conversation:id` (manual), auto-memory works **automatically**.
|
|
552
|
+
|
|
553
|
+
### How Auto-Memory Works
|
|
554
|
+
|
|
555
|
+
1. **Automatic Context Loading** - When you start, relevant memories are auto-loaded
|
|
556
|
+
2. **Pattern Learning** - Remembers coding patterns, preferences, decisions
|
|
557
|
+
3. **Session Tracking** - Tracks what you're working on within a session
|
|
558
|
+
4. **Smart Recall** - Uses relevance scoring to surface important memories
|
|
559
|
+
|
|
560
|
+
### Auto-Memory Commands
|
|
561
|
+
|
|
562
|
+
```bash
|
|
563
|
+
# Remember something
|
|
564
|
+
namnam memory remember "User prefers TypeScript strict mode" -t pattern
|
|
565
|
+
namnam memory remember "Decided to use Prisma for ORM" -t decision -i high
|
|
566
|
+
|
|
567
|
+
# Recall memories
|
|
568
|
+
namnam memory recall "database" # Find relevant memories
|
|
569
|
+
namnam memory recall --json # For programmatic use
|
|
570
|
+
|
|
571
|
+
# List all memories
|
|
572
|
+
namnam memory list # Show recent memories
|
|
573
|
+
namnam memory list -t decision # Filter by type
|
|
574
|
+
|
|
575
|
+
# Session management
|
|
576
|
+
namnam memory session --start "Implement auth" # Start session
|
|
577
|
+
namnam memory session --decision "Use JWT" # Record decision
|
|
578
|
+
namnam memory session --note "User prefers..." # Add note
|
|
579
|
+
namnam memory session --end # End and save
|
|
580
|
+
|
|
581
|
+
# Generate context for AI
|
|
582
|
+
namnam memory context -q "authentication" # Get relevant context
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
### Memory Types
|
|
586
|
+
|
|
587
|
+
| Type | Use Case | Example |
|
|
588
|
+
|------|----------|---------|
|
|
589
|
+
| `decision` | Architectural choices | "Use PostgreSQL over MySQL" |
|
|
590
|
+
| `pattern` | Coding preferences | "User prefers tabs over spaces" |
|
|
591
|
+
| `context` | General information | "Project uses monorepo structure" |
|
|
592
|
+
| `learning` | Learned behaviors | "Always run tests before commit" |
|
|
593
|
+
|
|
594
|
+
### Auto-Loading Memories
|
|
595
|
+
|
|
596
|
+
**CRITICAL**: Before starting any task, auto-load relevant memories:
|
|
597
|
+
|
|
598
|
+
```bash
|
|
599
|
+
# Check for auto-memories
|
|
600
|
+
namnam memory context -q "<current_task>"
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
If memories exist, they appear as:
|
|
604
|
+
|
|
605
|
+
```xml
|
|
606
|
+
<auto-memories>
|
|
607
|
+
## Prior Decisions
|
|
608
|
+
- **ORM Choice**: Decided to use Prisma for database access
|
|
609
|
+
|
|
610
|
+
## Learned Patterns
|
|
611
|
+
- User prefers functional components over class components
|
|
612
|
+
- Always add TypeScript types to function parameters
|
|
613
|
+
|
|
614
|
+
## Relevant Context
|
|
615
|
+
- Project uses pnpm, not npm
|
|
616
|
+
</auto-memories>
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
**Treat auto-memories as authoritative** - they represent prior decisions and user preferences.
|
|
620
|
+
|
|
621
|
+
### Comparison: @conversation vs Auto-Memory
|
|
622
|
+
|
|
623
|
+
| Feature | @conversation:id | Auto-Memory |
|
|
624
|
+
|---------|-----------------|-------------|
|
|
625
|
+
| Trigger | Manual reference | Automatic |
|
|
626
|
+
| Scope | Specific conversation | All relevant context |
|
|
627
|
+
| Use case | Continue specific thread | General context |
|
|
628
|
+
| Storage | Per-conversation folder | Global memory store |
|
|
629
|
+
|
|
630
|
+
**Both systems work together** - use `@conversation:id` for specific threads, auto-memory for general context.
|
|
631
|
+
|
|
632
|
+
### Storage Structure
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
.claude/
|
|
636
|
+
├── auto-memories/
|
|
637
|
+
│ ├── auto-index.json # All memories indexed
|
|
638
|
+
│ ├── current-session.json # Active session
|
|
639
|
+
│ └── sessions/ # Archived sessions
|
|
640
|
+
└── conversations/ # Manual @conversation storage
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
## 7. Platform-Specific
|
|
646
|
+
|
|
647
|
+
### Claude Code
|
|
648
|
+
- Full Task tool support
|
|
649
|
+
- Parallel agent execution
|
|
650
|
+
- BMAD workflow integration
|
|
651
|
+
|
|
652
|
+
### Cursor / Windsurf / Cline
|
|
653
|
+
- Reads respective config files
|
|
654
|
+
- Follows project conventions
|
|
655
|
+
|
|
656
|
+
### OpenAI Codex
|
|
657
|
+
- Reads codex.md
|
|
658
|
+
- Follows OpenAI patterns
|
|
659
|
+
|
|
660
|
+
### Aider
|
|
661
|
+
- Reads .aider.conf.yml
|
|
662
|
+
- Respects git settings
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
## Examples
|
|
667
|
+
|
|
668
|
+
```bash
|
|
669
|
+
# Orchestration
|
|
670
|
+
/namnam implement user authentication with JWT
|
|
671
|
+
/namnam --full debug and fix all failing tests
|
|
672
|
+
/namnam --quick add loading spinner to button
|
|
673
|
+
|
|
674
|
+
# Git
|
|
675
|
+
/namnam commit # Smart commit
|
|
676
|
+
/namnam status # Enhanced status
|
|
677
|
+
/namnam push # Safe push
|
|
678
|
+
|
|
679
|
+
# Quality
|
|
680
|
+
/namnam review # Review recent changes
|
|
681
|
+
/namnam review src/auth # Review specific path
|
|
682
|
+
/namnam validate # Check and auto-fix
|
|
683
|
+
|
|
684
|
+
# Conversations
|
|
685
|
+
/namnam conv save -t "Auth Design" -s "Decided JWT with refresh"
|
|
686
|
+
/namnam conv list --tag auth
|
|
687
|
+
/namnam conv show abc123
|
|
688
|
+
@conversation:abc123 continue implementing auth # Reference in prompt
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
**NAMNAM - One Command. Infinite Power.**
|