cckb 0.1.0
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/README.md +247 -0
- package/dist/bin/cckb.d.ts +1 -0
- package/dist/bin/cckb.js +89 -0
- package/dist/bin/cckb.js.map +1 -0
- package/dist/chunk-GUB5D6EN.js +197 -0
- package/dist/chunk-GUB5D6EN.js.map +1 -0
- package/dist/chunk-K4W3KOBL.js +239 -0
- package/dist/chunk-K4W3KOBL.js.map +1 -0
- package/dist/chunk-TFFLX3YY.js +131 -0
- package/dist/chunk-TFFLX3YY.js.map +1 -0
- package/dist/chunk-XAY6TTXB.js +149 -0
- package/dist/chunk-XAY6TTXB.js.map +1 -0
- package/dist/chunk-Z3CJQKTH.js +547 -0
- package/dist/chunk-Z3CJQKTH.js.map +1 -0
- package/dist/hooks/notification.d.ts +3 -0
- package/dist/hooks/notification.js +132 -0
- package/dist/hooks/notification.js.map +1 -0
- package/dist/hooks/post-tool-use.d.ts +3 -0
- package/dist/hooks/post-tool-use.js +96 -0
- package/dist/hooks/post-tool-use.js.map +1 -0
- package/dist/hooks/session-start.d.ts +3 -0
- package/dist/hooks/session-start.js +57 -0
- package/dist/hooks/session-start.js.map +1 -0
- package/dist/hooks/stop.d.ts +3 -0
- package/dist/hooks/stop.js +80 -0
- package/dist/hooks/stop.js.map +1 -0
- package/dist/hooks/user-prompt.d.ts +3 -0
- package/dist/hooks/user-prompt.js +48 -0
- package/dist/hooks/user-prompt.js.map +1 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
- package/templates/CLAUDE.md.tmpl +29 -0
- package/templates/settings.json.tmpl +44 -0
- package/templates/vault/INDEX.md +19 -0
- package/templates/vault/architecture.md +15 -0
- package/templates/vault/entities/INDEX.md +10 -0
- package/templates/vault/general-knowledge.md +15 -0
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cckb",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Claude Code Knowledge Base - Automatic project knowledge capture for Claude Code",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"cckb": "dist/bin/cckb.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup",
|
|
13
|
+
"dev": "tsup --watch",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"test": "vitest",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"templates"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"claude",
|
|
24
|
+
"claude-code",
|
|
25
|
+
"knowledge-base",
|
|
26
|
+
"ai",
|
|
27
|
+
"documentation",
|
|
28
|
+
"llm",
|
|
29
|
+
"context"
|
|
30
|
+
],
|
|
31
|
+
"author": "",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/n3m/cckb.git"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/n3m/cckb#readme",
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^22.0.0",
|
|
40
|
+
"tsup": "^8.0.0",
|
|
41
|
+
"typescript": "^5.7.0",
|
|
42
|
+
"vitest": "^2.0.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
## Project Knowledge Base (CCKB)
|
|
3
|
+
|
|
4
|
+
This project uses Claude Code Knowledge Base for persistent project context.
|
|
5
|
+
|
|
6
|
+
### Vault Location
|
|
7
|
+
`cc-knowledge-base/vault/`
|
|
8
|
+
|
|
9
|
+
### Usage Guidelines
|
|
10
|
+
|
|
11
|
+
1. **Before creating new entities/services:**
|
|
12
|
+
- Check vault INDEX.md for existing patterns
|
|
13
|
+
- Review related entity structures in `/vault/entities/`
|
|
14
|
+
- Follow established architecture in `/vault/architecture.md`
|
|
15
|
+
|
|
16
|
+
2. **When uncertain about project conventions:**
|
|
17
|
+
- Consult `/vault/general-knowledge.md`
|
|
18
|
+
- Check entity-specific INDEX.md files
|
|
19
|
+
- Ask user if not found in vault
|
|
20
|
+
|
|
21
|
+
3. **Sparse Loading:**
|
|
22
|
+
- Start with INDEX.md files only
|
|
23
|
+
- Deep-load specific files only when needed
|
|
24
|
+
- Never load entire vault at once
|
|
25
|
+
|
|
26
|
+
4. **Context from hooks:**
|
|
27
|
+
- CCKB hooks will automatically inject relevant context
|
|
28
|
+
- Trust injected context for immediate decisions
|
|
29
|
+
- Verify with vault files for complex decisions
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"type": "command",
|
|
6
|
+
"command": "npx cckb hook session-start"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"UserPromptSubmit": [
|
|
10
|
+
{
|
|
11
|
+
"type": "command",
|
|
12
|
+
"command": "npx cckb hook user-prompt"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"PostToolUse": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "Write|Edit|MultiEdit|Bash|Task",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "npx cckb hook post-tool-use"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"Stop": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "npx cckb hook stop"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"PreToolUse": [
|
|
33
|
+
{
|
|
34
|
+
"matcher": "*",
|
|
35
|
+
"hooks": [
|
|
36
|
+
{
|
|
37
|
+
"type": "command",
|
|
38
|
+
"command": "npx cckb hook notification"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Project Knowledge Base
|
|
2
|
+
|
|
3
|
+
This vault contains structured knowledge about the project, automatically captured and organized by CCKB.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
| Section | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| [architecture.md](./architecture.md) | Project patterns and architectural decisions |
|
|
10
|
+
| [general-knowledge.md](./general-knowledge.md) | Conventions, rules, and miscellaneous knowledge |
|
|
11
|
+
| [entities/](./entities/INDEX.md) | Domain entities and their documentation |
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
This knowledge base is automatically maintained. Claude will consult it when making decisions about the project.
|
|
16
|
+
|
|
17
|
+
## Last Updated
|
|
18
|
+
|
|
19
|
+
_Will be updated automatically_
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Project architectural patterns and design decisions.
|
|
4
|
+
|
|
5
|
+
## Patterns
|
|
6
|
+
|
|
7
|
+
_Patterns will be documented here as they are established._
|
|
8
|
+
|
|
9
|
+
## Conventions
|
|
10
|
+
|
|
11
|
+
_Project conventions will be captured here._
|
|
12
|
+
|
|
13
|
+
## Technology Stack
|
|
14
|
+
|
|
15
|
+
_Technologies and frameworks will be listed here._
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# General Knowledge
|
|
2
|
+
|
|
3
|
+
Miscellaneous project knowledge, conventions, and rules.
|
|
4
|
+
|
|
5
|
+
## Naming Conventions
|
|
6
|
+
|
|
7
|
+
_Naming conventions will be documented here._
|
|
8
|
+
|
|
9
|
+
## Business Rules
|
|
10
|
+
|
|
11
|
+
_Business rules and domain logic will be captured here._
|
|
12
|
+
|
|
13
|
+
## Notes
|
|
14
|
+
|
|
15
|
+
_General notes and context will be added here._
|