ccjk 7.0.0 → 7.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/dist/chunks/package.mjs +1 -1
- package/package.json +61 -68
- package/.claude/hooks/ccjk-diagnose-hook.sh +0 -106
- package/.claude/hooks/eslint-hook.ts +0 -122
- package/.claude-plugin/plugin.json +0 -9
- package/README-INTERNAL.md +0 -305
- package/agents/agent-router.md +0 -135
- package/agents/agents.json +0 -6
- package/agents/cache-manager.ts +0 -265
- package/agents/doc-researcher.md +0 -202
- package/agents/mcp-researcher.md +0 -285
- package/agents/npm-researcher.md +0 -383
- package/agents/version-checker.md +0 -332
- package/hooks/hooks.json +0 -15
- package/skills/ccjk/SKILL.md +0 -224
- package/skills/ccjk/references/ccjk-defaults.md +0 -265
- package/skills/ccjk/references/coding-standards.md +0 -198
- package/skills/ccjk/references/error-patterns.md +0 -353
- package/skills/ccjk/references/platform-conventions.md +0 -307
- package/skills/ccjk-config/SKILL.md +0 -301
- package/skills/ccjk-init/SKILL.md +0 -201
- package/skills/ccjk-mcp/SKILL.md +0 -249
- package/skills/ccjk-sync/SKILL.md +0 -328
- package/skills/coding-guidelines.md +0 -262
- package/skills/config-router/SKILL.md +0 -233
- package/skills/domain-cli.md +0 -228
- package/skills/domain-cloud.md +0 -246
- package/skills/domain-desktop.md +0 -272
- package/skills/domain-web.md +0 -229
- package/skills/layer1-api.md +0 -160
- package/skills/layer1-mcp.md +0 -305
- package/skills/layer1-workflow.md +0 -144
- package/skills/layer2-best-practices.md +0 -155
- package/skills/layer2-design-patterns.md +0 -107
package/dist/chunks/package.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.2",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "Claude Code JinKu - Advanced AI-powered development assistant with skills, agents, and LLM-driven audit",
|
|
7
7
|
"author": {
|
|
@@ -88,15 +88,8 @@
|
|
|
88
88
|
"ccjk": "bin/ccjk.mjs"
|
|
89
89
|
},
|
|
90
90
|
"files": [
|
|
91
|
-
".claude-plugin",
|
|
92
|
-
".claude/hooks",
|
|
93
|
-
"LICENSE",
|
|
94
|
-
"README*.md",
|
|
95
|
-
"agents",
|
|
96
91
|
"bin",
|
|
97
92
|
"dist",
|
|
98
|
-
"hooks",
|
|
99
|
-
"skills",
|
|
100
93
|
"templates"
|
|
101
94
|
],
|
|
102
95
|
"engines": {
|
|
@@ -128,68 +121,68 @@
|
|
|
128
121
|
"docs:preview": "pnpm -F @ccjk/docs preview"
|
|
129
122
|
},
|
|
130
123
|
"dependencies": {
|
|
131
|
-
"@anthropic-ai/sdk": "
|
|
132
|
-
"@clack/prompts": "
|
|
133
|
-
"@iarna/toml": "
|
|
134
|
-
"@types/semver": "
|
|
135
|
-
"@types/tar": "
|
|
136
|
-
"ansis": "
|
|
137
|
-
"cac": "
|
|
138
|
-
"chalk": "
|
|
139
|
-
"chokidar": "
|
|
140
|
-
"commander": "
|
|
141
|
-
"dayjs": "
|
|
142
|
-
"express": "
|
|
143
|
-
"find-up-simple": "
|
|
144
|
-
"fs-extra": "
|
|
145
|
-
"gray-matter": "
|
|
146
|
-
"i18next": "
|
|
147
|
-
"i18next-fs-backend": "
|
|
148
|
-
"ink": "
|
|
149
|
-
"ink-select-input": "
|
|
150
|
-
"ink-spinner": "
|
|
151
|
-
"inquirer": "
|
|
152
|
-
"inquirer-toggle": "
|
|
153
|
-
"nanoid": "
|
|
154
|
-
"node-telegram-bot-api": "
|
|
155
|
-
"nodemailer": "
|
|
156
|
-
"ora": "
|
|
157
|
-
"pathe": "
|
|
158
|
-
"picocolors": "
|
|
159
|
-
"react": "
|
|
160
|
-
"semver": "
|
|
161
|
-
"smol-toml": "
|
|
162
|
-
"socket.io": "
|
|
163
|
-
"socket.io-client": "
|
|
164
|
-
"tar": "
|
|
165
|
-
"tinyexec": "
|
|
166
|
-
"trash": "
|
|
167
|
-
"zx": "
|
|
124
|
+
"@anthropic-ai/sdk": "^0.52.0",
|
|
125
|
+
"@clack/prompts": "^0.7.0",
|
|
126
|
+
"@iarna/toml": "^2.2.5",
|
|
127
|
+
"@types/semver": "^7.7.1",
|
|
128
|
+
"@types/tar": "^6.1.13",
|
|
129
|
+
"ansis": "^4.1.0",
|
|
130
|
+
"cac": "^6.7.14",
|
|
131
|
+
"chalk": "^5.6.2",
|
|
132
|
+
"chokidar": "^4.0.3",
|
|
133
|
+
"commander": "^14.0.2",
|
|
134
|
+
"dayjs": "^1.11.18",
|
|
135
|
+
"express": "^4.18.2",
|
|
136
|
+
"find-up-simple": "^1.0.1",
|
|
137
|
+
"fs-extra": "^11.3.2",
|
|
138
|
+
"gray-matter": "^4.0.3",
|
|
139
|
+
"i18next": "^25.5.2",
|
|
140
|
+
"i18next-fs-backend": "^2.6.0",
|
|
141
|
+
"ink": "^5.0.1",
|
|
142
|
+
"ink-select-input": "^6.0.0",
|
|
143
|
+
"ink-spinner": "^5.0.0",
|
|
144
|
+
"inquirer": "^12.9.6",
|
|
145
|
+
"inquirer-toggle": "^1.0.1",
|
|
146
|
+
"nanoid": "^5.1.6",
|
|
147
|
+
"node-telegram-bot-api": "^0.66.0",
|
|
148
|
+
"nodemailer": "^6.9.8",
|
|
149
|
+
"ora": "^9.0.0",
|
|
150
|
+
"pathe": "^2.0.3",
|
|
151
|
+
"picocolors": "^1.1.1",
|
|
152
|
+
"react": "^18.2.0",
|
|
153
|
+
"semver": "^7.7.2",
|
|
154
|
+
"smol-toml": "^1.4.2",
|
|
155
|
+
"socket.io": "^4.7.4",
|
|
156
|
+
"socket.io-client": "^4.7.4",
|
|
157
|
+
"tar": "^7.5.2",
|
|
158
|
+
"tinyexec": "^1.0.1",
|
|
159
|
+
"trash": "^10.0.0",
|
|
160
|
+
"zx": "^8.1.0"
|
|
168
161
|
},
|
|
169
162
|
"devDependencies": {
|
|
170
|
-
"@antfu/eslint-config": "
|
|
171
|
-
"@changesets/cli": "
|
|
172
|
-
"@commitlint/cli": "
|
|
173
|
-
"@commitlint/config-conventional": "
|
|
174
|
-
"@commitlint/types": "
|
|
175
|
-
"@types/express": "
|
|
176
|
-
"@types/fs-extra": "
|
|
177
|
-
"@types/inquirer": "
|
|
178
|
-
"@types/node": "
|
|
179
|
-
"@types/node-telegram-bot-api": "
|
|
180
|
-
"@types/nodemailer": "
|
|
181
|
-
"@types/react": "
|
|
182
|
-
"@vitest/coverage-v8": "
|
|
183
|
-
"@vitest/ui": "
|
|
184
|
-
"eslint": "
|
|
185
|
-
"eslint-plugin-format": "
|
|
186
|
-
"glob": "
|
|
187
|
-
"husky": "
|
|
188
|
-
"lint-staged": "
|
|
189
|
-
"tsx": "
|
|
190
|
-
"typescript": "
|
|
191
|
-
"unbuild": "
|
|
192
|
-
"vitest": "
|
|
163
|
+
"@antfu/eslint-config": "^5.4.1",
|
|
164
|
+
"@changesets/cli": "^2.29.7",
|
|
165
|
+
"@commitlint/cli": "^19.8.1",
|
|
166
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
167
|
+
"@commitlint/types": "^19.8.1",
|
|
168
|
+
"@types/express": "^4.17.21",
|
|
169
|
+
"@types/fs-extra": "^11.0.4",
|
|
170
|
+
"@types/inquirer": "^9.0.9",
|
|
171
|
+
"@types/node": "^22.10.6",
|
|
172
|
+
"@types/node-telegram-bot-api": "^0.64.7",
|
|
173
|
+
"@types/nodemailer": "^6.4.14",
|
|
174
|
+
"@types/react": "^19.2.8",
|
|
175
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
176
|
+
"@vitest/ui": "^3.2.4",
|
|
177
|
+
"eslint": "^9.36.0",
|
|
178
|
+
"eslint-plugin-format": "^1.0.2",
|
|
179
|
+
"glob": "^11.0.3",
|
|
180
|
+
"husky": "^9.1.7",
|
|
181
|
+
"lint-staged": "^16.2.0",
|
|
182
|
+
"tsx": "^4.19.2",
|
|
183
|
+
"typescript": "^5.7.2",
|
|
184
|
+
"unbuild": "^3.3.1",
|
|
185
|
+
"vitest": "^3.1.1"
|
|
193
186
|
},
|
|
194
187
|
"lint-staged": {
|
|
195
188
|
"*": [
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# CCJK Diagnosis Hook
|
|
4
|
-
# This script injects mandatory meta-cognition framework for CCJK configuration problems
|
|
5
|
-
|
|
6
|
-
cat << 'EOF'
|
|
7
|
-
|
|
8
|
-
=== 🚨 MANDATORY: CCJK META-COGNITION DIAGNOSIS ===
|
|
9
|
-
|
|
10
|
-
CRITICAL: You MUST follow the COMPLETE CCJK diagnosis framework. Do NOT skip any steps.
|
|
11
|
-
|
|
12
|
-
## 📋 STEP 1: IDENTIFY PROBLEM LAYER + DOMAIN
|
|
13
|
-
|
|
14
|
-
First, classify the user's problem:
|
|
15
|
-
|
|
16
|
-
| Keywords in Question | Problem Layer | Domain Skill to Load |
|
|
17
|
-
|---------------------|---------------|---------------------|
|
|
18
|
-
| MCP not working, MCP config, mcp.json | Layer 1: Configuration | layer1-mcp |
|
|
19
|
-
| Workflow not found, .claude/rules | Layer 1: Configuration | layer1-workflow |
|
|
20
|
-
| API provider, 302.ai, glm, kimi | Layer 1: Configuration | layer1-api |
|
|
21
|
-
| Best practice, how to structure | Layer 2: Design | layer2-design-patterns |
|
|
22
|
-
| CLI tool, terminal, command line | Layer 3: Domain | domain-cli |
|
|
23
|
-
| Cloud service, sync, remote | Layer 3: Domain | domain-cloud |
|
|
24
|
-
| Web development, vite, next.js | Layer 3: Domain | domain-web |
|
|
25
|
-
| Desktop app, tauri, electron | Layer 3: Domain | domain-desktop |
|
|
26
|
-
|
|
27
|
-
**CRITICAL**: If domain keywords are present, load BOTH Layer 1 and Layer 3 skills.
|
|
28
|
-
|
|
29
|
-
## 🔍 STEP 2: EXECUTE THREE-LAYER TRACING (MANDATORY)
|
|
30
|
-
|
|
31
|
-
You MUST trace the problem in this order:
|
|
32
|
-
|
|
33
|
-
1. **Layer 1 (Surface)**: What is the immediate error or symptom?
|
|
34
|
-
2. **Layer 3 (Constraints)**: What domain constraints apply?
|
|
35
|
-
3. **Layer 2 (Design)**: What design decision satisfies the constraints?
|
|
36
|
-
|
|
37
|
-
NEVER jump to Layer 2 without understanding Layer 3 constraints.
|
|
38
|
-
|
|
39
|
-
Example:
|
|
40
|
-
```
|
|
41
|
-
L1: "MCP server not connecting" (surface)
|
|
42
|
-
↑
|
|
43
|
-
L3: "User is on corporate network with proxy" (constraint)
|
|
44
|
-
↓
|
|
45
|
-
L2: "Configure MCP to use HTTP_PROXY environment variable" (design)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## 📊 STEP 3: MANDATORY OUTPUT FORMAT
|
|
49
|
-
|
|
50
|
-
Your response MUST include ALL of these sections:
|
|
51
|
-
|
|
52
|
-
### 🔗 Reasoning Chain
|
|
53
|
-
```
|
|
54
|
-
+-- Layer 1: [specific error/symptom]
|
|
55
|
-
| ^
|
|
56
|
-
+-- Layer 3: [domain constraint]
|
|
57
|
-
| v
|
|
58
|
-
+-- Layer 2: [design decision]
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 🎯 Domain Constraints Analysis
|
|
62
|
-
- MUST reference specific rules from domain-xxx skill
|
|
63
|
-
- SHOULD explain why the constraint exists
|
|
64
|
-
- MUST NOT violate domain principles
|
|
65
|
-
|
|
66
|
-
### ✅ Recommended Solution
|
|
67
|
-
- MUST address the root cause (Layer 1/3), not just symptoms
|
|
68
|
-
- MUST follow domain best practices
|
|
69
|
-
- MUST include code/config examples
|
|
70
|
-
- SHOULD explain trade-offs if multiple options exist
|
|
71
|
-
|
|
72
|
-
### 📚 Related References
|
|
73
|
-
- MUST link to relevant CCJK documentation
|
|
74
|
-
- MUST reference related skills
|
|
75
|
-
- SHOULD provide external resources if applicable
|
|
76
|
-
|
|
77
|
-
## ⚠️ COMMON MISTAKES TO AVOID
|
|
78
|
-
|
|
79
|
-
❌ **NEVER**:
|
|
80
|
-
- Give a solution without tracing through all three layers
|
|
81
|
-
- Ignore domain constraints
|
|
82
|
-
- Copy-paste solutions without understanding context
|
|
83
|
-
- Skip the reasoning chain
|
|
84
|
-
|
|
85
|
-
✅ **ALWAYS**:
|
|
86
|
-
- Start with Layer 1 identification
|
|
87
|
-
- Trace UP to Layer 3 constraints
|
|
88
|
-
- Trace DOWN to Layer 2 design
|
|
89
|
-
- Show the complete reasoning process
|
|
90
|
-
- Reference domain-specific rules
|
|
91
|
-
|
|
92
|
-
## 🎯 EXECUTION CHECKLIST
|
|
93
|
-
|
|
94
|
-
Before responding, verify:
|
|
95
|
-
- [ ] Problem layer identified (L1/L2/L3)
|
|
96
|
-
- [ ] Domain detected and skill loaded
|
|
97
|
-
- [ ] Three-layer tracing completed
|
|
98
|
-
- [ ] Reasoning chain shown
|
|
99
|
-
- [ ] Domain constraints analyzed
|
|
100
|
-
- [ ] Solution addresses root cause
|
|
101
|
-
- [ ] References provided
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
**Remember**: CCJK Skills are Cognitive Protocols that shape HOW you think about configuration problems, not WHAT you know. Follow the protocol rigorously.
|
|
105
|
-
|
|
106
|
-
EOF
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
|
|
3
|
-
import type { Buffer } from 'node:buffer'
|
|
4
|
-
import { execSync } from 'node:child_process'
|
|
5
|
-
import { existsSync } from 'node:fs'
|
|
6
|
-
import process from 'node:process'
|
|
7
|
-
/**
|
|
8
|
-
* Cross-platform ESLint hook for Claude Code
|
|
9
|
-
* Reads tool input from stdin and runs ESLint fix on the edited file
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// TypeScript interfaces for type safety
|
|
13
|
-
interface ToolInput {
|
|
14
|
-
file_path?: string
|
|
15
|
-
[key: string]: unknown
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface HookData {
|
|
19
|
-
tool_input?: ToolInput
|
|
20
|
-
file_path?: string
|
|
21
|
-
[key: string]: unknown
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Debug mode - set DEBUG_ESLINT_HOOK=1 to enable logging
|
|
25
|
-
const DEBUG = process.env.DEBUG_ESLINT_HOOK === '1'
|
|
26
|
-
function log(msg: string): void {
|
|
27
|
-
if (DEBUG) {
|
|
28
|
-
console.error(`[eslint-hook] ${msg}`)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Read from stdin with optimized handling
|
|
33
|
-
let inputData = ''
|
|
34
|
-
let processCompleted = false
|
|
35
|
-
|
|
36
|
-
function cleanup(): void {
|
|
37
|
-
if (!processCompleted) {
|
|
38
|
-
processCompleted = true
|
|
39
|
-
process.exit(0)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function processInput(): void {
|
|
44
|
-
if (processCompleted)
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
// Parse JSON input with type assertion
|
|
49
|
-
const data = JSON.parse(inputData) as HookData
|
|
50
|
-
log(`Received data: ${JSON.stringify(data)}`)
|
|
51
|
-
|
|
52
|
-
// Extract file path from tool_input
|
|
53
|
-
const filePath = data.tool_input?.file_path ?? data.file_path
|
|
54
|
-
|
|
55
|
-
if (!filePath) {
|
|
56
|
-
log('No file path found in input')
|
|
57
|
-
cleanup()
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Verify file exists (optional check)
|
|
62
|
-
if (!existsSync(filePath)) {
|
|
63
|
-
log(`File does not exist: ${filePath}`)
|
|
64
|
-
cleanup()
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Get project root
|
|
69
|
-
const projectRoot = execSync('git rev-parse --show-toplevel', {
|
|
70
|
-
encoding: 'utf8',
|
|
71
|
-
stdio: ['pipe', 'pipe', 'ignore'],
|
|
72
|
-
}).trim()
|
|
73
|
-
|
|
74
|
-
log(`Project root: ${projectRoot}`)
|
|
75
|
-
log(`Processing file: ${filePath}`)
|
|
76
|
-
|
|
77
|
-
// Run ESLint fix
|
|
78
|
-
// The eslint.hook.config.ts will handle which files to process/ignore
|
|
79
|
-
try {
|
|
80
|
-
execSync(
|
|
81
|
-
`pnpm eslint --rule "unused-imports/no-unused-imports: off" --rule "unused-imports/no-unused-vars: warn" --fix "${filePath}"`,
|
|
82
|
-
{
|
|
83
|
-
cwd: projectRoot,
|
|
84
|
-
stdio: DEBUG ? 'inherit' : 'ignore',
|
|
85
|
-
},
|
|
86
|
-
)
|
|
87
|
-
log('ESLint completed successfully')
|
|
88
|
-
}
|
|
89
|
-
catch (eslintError) {
|
|
90
|
-
// ESLint might exit with non-zero for various reasons
|
|
91
|
-
// We ignore errors to not disrupt the editing flow
|
|
92
|
-
if (eslintError instanceof Error) {
|
|
93
|
-
log(`ESLint error (ignored): ${eslintError.message}`)
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
// Silently ignore all errors to avoid disrupting Claude Code
|
|
99
|
-
// Common errors: JSON parse error, git not found, etc.
|
|
100
|
-
if (error instanceof Error) {
|
|
101
|
-
log(`General error (ignored): ${error.message}`)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
cleanup()
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Set up stdin handling
|
|
109
|
-
process.stdin.on('data', (chunk: Buffer) => {
|
|
110
|
-
inputData += chunk.toString()
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
process.stdin.on('end', processInput)
|
|
114
|
-
|
|
115
|
-
// Safety timeout - only needed if stdin doesn't close properly
|
|
116
|
-
// In normal operation, 'end' event will fire immediately when Claude Code finishes sending data
|
|
117
|
-
// This is just a fallback to prevent hanging if something goes wrong
|
|
118
|
-
const SAFETY_TIMEOUT = 1000 // 1 second is plenty for a safety net
|
|
119
|
-
setTimeout(() => {
|
|
120
|
-
log('Safety timeout reached, exiting')
|
|
121
|
-
cleanup()
|
|
122
|
-
}, SAFETY_TIMEOUT)
|
package/README-INTERNAL.md
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
# CCJK Internal - MiroCore Edition
|
|
2
|
-
|
|
3
|
-
**版本**: 4.0.0-mirocore
|
|
4
|
-
**类型**: 🔐 内部私密版本
|
|
5
|
-
**代号**: MiroCore
|
|
6
|
-
**状态**: Private
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## ⚠️ 重要声明
|
|
11
|
-
|
|
12
|
-
此版本为 **CCJK 内部版本**,包含强大的上下文管理能力。
|
|
13
|
-
|
|
14
|
-
**请勿**:
|
|
15
|
-
- ❌ 公开分享
|
|
16
|
-
- ❌ 上传到公共仓库
|
|
17
|
-
- ❌ 在公开场合讨论
|
|
18
|
-
- ❌ 发布到 npm 公共仓库
|
|
19
|
-
|
|
20
|
-
**仅供**:
|
|
21
|
-
- ✅ 内部团队使用
|
|
22
|
-
- ✅ 授权开发者使用
|
|
23
|
-
- ✅ 私密项目使用
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 🚀 快速安装
|
|
28
|
-
|
|
29
|
-
### 方式 1: GitHub (推荐)
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# 一次性使用
|
|
33
|
-
npx github:miounet11/ccjk-internal
|
|
34
|
-
|
|
35
|
-
# 全局安装
|
|
36
|
-
npm install -g github:miounet11/ccjk-internal
|
|
37
|
-
|
|
38
|
-
# 项目安装
|
|
39
|
-
npm install github:miounet11/ccjk-internal
|
|
40
|
-
|
|
41
|
-
# 指定版本
|
|
42
|
-
npm install -g github:miounet11/ccjk-internal#v4.0.0-mirocore
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### 方式 2: 本地安装
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# 克隆仓库
|
|
49
|
-
git clone git@github.com:miounet11/ccjk-internal.git
|
|
50
|
-
|
|
51
|
-
# 安装依赖
|
|
52
|
-
cd ccjk-internal
|
|
53
|
-
pnpm install
|
|
54
|
-
|
|
55
|
-
# 构建
|
|
56
|
-
pnpm build
|
|
57
|
-
|
|
58
|
-
# 全局安装
|
|
59
|
-
npm install -g .
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 方式 3: 使用安装脚本
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# 一键安装
|
|
66
|
-
curl -fsSL https://raw.githubusercontent.com/miounet11/ccjk-internal/main/install.sh | bash
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## 🎯 核心能力
|
|
72
|
-
|
|
73
|
-
### 1. 自动上下文管理 ✅
|
|
74
|
-
- 实时监控 `~/.claude/history.jsonl`
|
|
75
|
-
- 自动压缩(100K tokens → 30K tokens)
|
|
76
|
-
- 70-90% 压缩率
|
|
77
|
-
- MiroThinker "去肉留骨" 策略
|
|
78
|
-
|
|
79
|
-
### 2. 计划接受集成 ✅
|
|
80
|
-
- 自动检测 `~/.claude/plans/` 新文件
|
|
81
|
-
- 自动刷新上下文
|
|
82
|
-
- 注入计划 + 压缩摘要
|
|
83
|
-
- 10分钟速率限制
|
|
84
|
-
|
|
85
|
-
### 3. 线程化交互 ✅
|
|
86
|
-
- 5K tokens/线程
|
|
87
|
-
- 自动关闭和压缩
|
|
88
|
-
- 线程链管理
|
|
89
|
-
- 保留上下文连续性
|
|
90
|
-
|
|
91
|
-
### 4. 智能监控 ✅
|
|
92
|
-
- 对话历史监控
|
|
93
|
-
- 计划文件监控
|
|
94
|
-
- 系统状态监控
|
|
95
|
-
- 实时统计
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## 📖 使用方式
|
|
100
|
-
|
|
101
|
-
### 零配置使用(自动生效)
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# 正常使用 Claude CLI
|
|
105
|
-
claude "帮我实现用户认证功能"
|
|
106
|
-
|
|
107
|
-
# CCJK 自动在后台工作:
|
|
108
|
-
✅ 监控对话历史
|
|
109
|
-
✅ 计算 token 使用
|
|
110
|
-
✅ 自动压缩(100K tokens 触发)
|
|
111
|
-
✅ 检测 plan acceptance
|
|
112
|
-
✅ 压缩并刷新上下文
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 手动控制命令
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# 查看详细统计
|
|
119
|
-
claude context stats
|
|
120
|
-
|
|
121
|
-
# 查看系统状态
|
|
122
|
-
claude context status
|
|
123
|
-
|
|
124
|
-
# 手动触发压缩
|
|
125
|
-
claude context compress
|
|
126
|
-
|
|
127
|
-
# 重置上下文
|
|
128
|
-
claude context reset
|
|
129
|
-
|
|
130
|
-
# 查看帮助
|
|
131
|
-
claude context help
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## 📊 预期效果
|
|
137
|
-
|
|
138
|
-
| 指标 | 改善 | 说明 |
|
|
139
|
-
|------|------|------|
|
|
140
|
-
| **上下文效率** | ↑ 70% | 100K → 30K tokens |
|
|
141
|
-
| **计划遵循度** | ↑ 90% | 自动刷新上下文 |
|
|
142
|
-
| **注意力质量** | ↑ 80% | 线程化管理 |
|
|
143
|
-
| **错误率** | ↓ 80% | 降至 3-5% |
|
|
144
|
-
| **Token 使用** | ↓ 76% | 30K → 7.2K |
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 🎯 实际场景
|
|
149
|
-
|
|
150
|
-
### 场景 1: 长对话开发
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
用户进行 50 条消息的对话(30K tokens)
|
|
154
|
-
|
|
155
|
-
传统方式:
|
|
156
|
-
├── 注意力质量: 40-60%
|
|
157
|
-
├── 错误率: 15-25%
|
|
158
|
-
└── 计划遵循度: 60%
|
|
159
|
-
|
|
160
|
-
CCJK MiroCore:
|
|
161
|
-
├── 自动分成 5 个线程
|
|
162
|
-
├── 每个线程 5K → 500-600 tokens
|
|
163
|
-
├── 总上下文: 7.2K tokens (↓ 76%)
|
|
164
|
-
├── 注意力质量: 80-95% (↑ 58%)
|
|
165
|
-
├── 错误率: 3-5% (↓ 80%)
|
|
166
|
-
└── 计划遵循度: 90%+ (↑ 50%)
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### 场景 2: Plan Acceptance
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
用户接受一个开发计划
|
|
173
|
-
|
|
174
|
-
传统方式:
|
|
175
|
-
├── 上下文继续累积
|
|
176
|
-
├── 旧信息干扰新任务
|
|
177
|
-
└── 计划遵循度下降
|
|
178
|
-
|
|
179
|
-
CCJK MiroCore:
|
|
180
|
-
├── 自动压缩上下文(如果 ≥10分钟)
|
|
181
|
-
├── 清除旧上下文
|
|
182
|
-
├── 注入 plan + 压缩摘要
|
|
183
|
-
├── 全新的上下文窗口
|
|
184
|
-
└── 计划遵循度 90%+
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## 🏗️ 架构概览
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
用户输入
|
|
193
|
-
↓
|
|
194
|
-
CCJK Enhanced Wrapper
|
|
195
|
-
├── ClaudeHistoryMonitor (监控对话)
|
|
196
|
-
├── ClaudePlansMonitor (监控计划)
|
|
197
|
-
└── Context Management Layer
|
|
198
|
-
├── ThreadManager (线程管理)
|
|
199
|
-
├── AutoSummarizeManager (自动摘要)
|
|
200
|
-
└── PlanAcceptanceManager (计划接受)
|
|
201
|
-
↓
|
|
202
|
-
MiroThinker Compression (70-90% 压缩)
|
|
203
|
-
↓
|
|
204
|
-
Claude Code CLI (原生执行)
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## 📈 统计信息
|
|
210
|
-
|
|
211
|
-
### 代码统计
|
|
212
|
-
- **总代码行数**: 2,255+
|
|
213
|
-
- **组件数量**: 8
|
|
214
|
-
- **功能数量**: 87+
|
|
215
|
-
- **事件类型**: 40
|
|
216
|
-
|
|
217
|
-
### Phase 1: Context Management Core
|
|
218
|
-
- ThreadManager: 450 lines
|
|
219
|
-
- PlanAcceptanceManager: 350 lines
|
|
220
|
-
- AutoSummarizeManager: 370 lines
|
|
221
|
-
- Integration: 250 lines
|
|
222
|
-
|
|
223
|
-
### Phase 2: Claude Code Integration
|
|
224
|
-
- ClaudeHistoryMonitor: 220 lines
|
|
225
|
-
- ClaudePlansMonitor: 200 lines
|
|
226
|
-
- EnhancedClaudeWrapper: 350 lines
|
|
227
|
-
- CLI Integration: 65 lines
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## 🔐 访问控制
|
|
232
|
-
|
|
233
|
-
此版本通过 **GitHub 私有仓库** 分发。
|
|
234
|
-
|
|
235
|
-
### 获取访问权限
|
|
236
|
-
|
|
237
|
-
1. 联系项目负责人
|
|
238
|
-
2. 添加到 GitHub 组织/仓库
|
|
239
|
-
3. 配置 SSH key 或 Personal Access Token
|
|
240
|
-
4. 使用上述安装命令
|
|
241
|
-
|
|
242
|
-
### 权限管理
|
|
243
|
-
|
|
244
|
-
- 仅授权用户可访问
|
|
245
|
-
- 定期审查访问权限
|
|
246
|
-
- 监控使用情况
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## 🛠️ 开发者信息
|
|
251
|
-
|
|
252
|
-
### 环境要求
|
|
253
|
-
- Node.js >= 18.0.0
|
|
254
|
-
- pnpm >= 10.0.0
|
|
255
|
-
- Git
|
|
256
|
-
|
|
257
|
-
### 本地开发
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
# 克隆仓库
|
|
261
|
-
git clone git@github.com:miounet11/ccjk-internal.git
|
|
262
|
-
|
|
263
|
-
# 安装依赖
|
|
264
|
-
pnpm install
|
|
265
|
-
|
|
266
|
-
# 开发模式
|
|
267
|
-
pnpm dev
|
|
268
|
-
|
|
269
|
-
# 构建
|
|
270
|
-
pnpm build
|
|
271
|
-
|
|
272
|
-
# 测试
|
|
273
|
-
pnpm test
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## 📞 支持
|
|
279
|
-
|
|
280
|
-
**内部支持**: 仅限内部团队
|
|
281
|
-
**问题反馈**: 通过内部渠道
|
|
282
|
-
**紧急联系**: 项目负责人
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## 📝 更新日志
|
|
287
|
-
|
|
288
|
-
查看 [CHANGELOG-INTERNAL.md](./CHANGELOG-INTERNAL.md) 了解详细更新历史。
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## ⚖️ 许可证
|
|
293
|
-
|
|
294
|
-
**UNLICENSED** - 内部私有,保留所有权利
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
**版本**: 4.0.0-mirocore
|
|
299
|
-
**代号**: MiroCore
|
|
300
|
-
**发布日期**: 2026-01-18
|
|
301
|
-
**类型**: 🔐 Internal Private Release
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
|
-
**能力过于强大,仅供内部使用** 🚀
|