@cregis-dev/cckit 0.6.6 → 0.6.7
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/LICENSE +21 -21
- package/bin/cckit.js +3 -3
- package/package.json +53 -53
- package/registry.json +145 -145
- package/src/cli.js +79 -79
- package/src/commands/init.js +174 -174
- package/src/commands/status.js +125 -125
- package/src/commands/update.js +192 -192
- package/src/core/config.js +82 -75
- package/src/core/orchestrator.js +79 -79
- package/src/core/registry.js +60 -60
- package/src/steps/add-plugin.js +148 -116
- package/src/steps/configure-user.js +181 -181
- package/src/steps/enable-plugins.js +97 -97
- package/src/steps/install-bmad.js +85 -85
- package/src/steps/install-mcp.js +70 -70
- package/src/steps/install-rules.js +69 -69
- package/src/steps/install-skills.js +56 -56
- package/src/utils/compare-versions.js +106 -106
- package/src/utils/fs.js +33 -33
- package/src/utils/logger.js +16 -16
- package/src/utils/manifest.js +101 -101
- package/src/utils/prompt.js +41 -41
- package/templates/mcp/claude-code/.mcp.json +40 -40
- package/templates/rules/README.md +103 -103
- package/templates/rules/common/agents.md +49 -49
- package/templates/rules/common/coding-style.md +48 -48
- package/templates/rules/common/development-workflow.md +37 -37
- package/templates/rules/common/git-workflow.md +24 -24
- package/templates/rules/common/hooks.md +30 -30
- package/templates/rules/common/patterns.md +31 -31
- package/templates/rules/common/performance.md +55 -55
- package/templates/rules/common/security.md +29 -29
- package/templates/rules/common/testing.md +29 -29
- package/templates/rules/golang/coding-style.md +32 -32
- package/templates/rules/golang/hooks.md +17 -17
- package/templates/rules/golang/patterns.md +45 -45
- package/templates/rules/golang/security.md +34 -34
- package/templates/rules/golang/testing.md +31 -31
- package/templates/rules/python/coding-style.md +42 -42
- package/templates/rules/python/hooks.md +19 -19
- package/templates/rules/python/patterns.md +39 -39
- package/templates/rules/python/security.md +30 -30
- package/templates/rules/python/testing.md +38 -38
- package/templates/rules/swift/coding-style.md +47 -47
- package/templates/rules/swift/hooks.md +20 -20
- package/templates/rules/swift/patterns.md +66 -66
- package/templates/rules/swift/security.md +33 -33
- package/templates/rules/swift/testing.md +45 -45
- package/templates/rules/typescript/coding-style.md +65 -65
- package/templates/rules/typescript/hooks.md +22 -22
- package/templates/rules/typescript/patterns.md +52 -52
- package/templates/rules/typescript/security.md +28 -28
- package/templates/rules/typescript/testing.md +18 -18
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.swift"
|
|
4
|
-
- "**/Package.swift"
|
|
5
|
-
---
|
|
6
|
-
# Swift Testing
|
|
7
|
-
|
|
8
|
-
> This file extends [common/testing.md](../common/testing.md) with Swift specific content.
|
|
9
|
-
|
|
10
|
-
## Framework
|
|
11
|
-
|
|
12
|
-
Use **Swift Testing** (`import Testing`) for new tests. Use `@Test` and `#expect`:
|
|
13
|
-
|
|
14
|
-
```swift
|
|
15
|
-
@Test("User creation validates email")
|
|
16
|
-
func userCreationValidatesEmail() throws {
|
|
17
|
-
#expect(throws: ValidationError.invalidEmail) {
|
|
18
|
-
try User(email: "not-an-email")
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Test Isolation
|
|
24
|
-
|
|
25
|
-
Each test gets a fresh instance — set up in `init`, tear down in `deinit`. No shared mutable state between tests.
|
|
26
|
-
|
|
27
|
-
## Parameterized Tests
|
|
28
|
-
|
|
29
|
-
```swift
|
|
30
|
-
@Test("Validates formats", arguments: ["json", "xml", "csv"])
|
|
31
|
-
func validatesFormat(format: String) throws {
|
|
32
|
-
let parser = try Parser(format: format)
|
|
33
|
-
#expect(parser.isValid)
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Coverage
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
swift test --enable-code-coverage
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Reference
|
|
44
|
-
|
|
45
|
-
See skill: `swift-protocol-di-testing` for protocol-based dependency injection and mock patterns with Swift Testing.
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.swift"
|
|
4
|
+
- "**/Package.swift"
|
|
5
|
+
---
|
|
6
|
+
# Swift Testing
|
|
7
|
+
|
|
8
|
+
> This file extends [common/testing.md](../common/testing.md) with Swift specific content.
|
|
9
|
+
|
|
10
|
+
## Framework
|
|
11
|
+
|
|
12
|
+
Use **Swift Testing** (`import Testing`) for new tests. Use `@Test` and `#expect`:
|
|
13
|
+
|
|
14
|
+
```swift
|
|
15
|
+
@Test("User creation validates email")
|
|
16
|
+
func userCreationValidatesEmail() throws {
|
|
17
|
+
#expect(throws: ValidationError.invalidEmail) {
|
|
18
|
+
try User(email: "not-an-email")
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Test Isolation
|
|
24
|
+
|
|
25
|
+
Each test gets a fresh instance — set up in `init`, tear down in `deinit`. No shared mutable state between tests.
|
|
26
|
+
|
|
27
|
+
## Parameterized Tests
|
|
28
|
+
|
|
29
|
+
```swift
|
|
30
|
+
@Test("Validates formats", arguments: ["json", "xml", "csv"])
|
|
31
|
+
func validatesFormat(format: String) throws {
|
|
32
|
+
let parser = try Parser(format: format)
|
|
33
|
+
#expect(parser.isValid)
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Coverage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
swift test --enable-code-coverage
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Reference
|
|
44
|
+
|
|
45
|
+
See skill: `swift-protocol-di-testing` for protocol-based dependency injection and mock patterns with Swift Testing.
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Coding Style
|
|
9
|
-
|
|
10
|
-
> This file extends [common/coding-style.md](../common/coding-style.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## Immutability
|
|
13
|
-
|
|
14
|
-
Use spread operator for immutable updates:
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
// WRONG: Mutation
|
|
18
|
-
function updateUser(user, name) {
|
|
19
|
-
user.name = name // MUTATION!
|
|
20
|
-
return user
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// CORRECT: Immutability
|
|
24
|
-
function updateUser(user, name) {
|
|
25
|
-
return {
|
|
26
|
-
...user,
|
|
27
|
-
name
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Error Handling
|
|
33
|
-
|
|
34
|
-
Use async/await with try-catch:
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
try {
|
|
38
|
-
const result = await riskyOperation()
|
|
39
|
-
return result
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error('Operation failed:', error)
|
|
42
|
-
throw new Error('Detailed user-friendly message')
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Input Validation
|
|
47
|
-
|
|
48
|
-
Use Zod for schema-based validation:
|
|
49
|
-
|
|
50
|
-
```typescript
|
|
51
|
-
import { z } from 'zod'
|
|
52
|
-
|
|
53
|
-
const schema = z.object({
|
|
54
|
-
email: z.string().email(),
|
|
55
|
-
age: z.number().int().min(0).max(150)
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
const validated = schema.parse(input)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Console.log
|
|
62
|
-
|
|
63
|
-
- No `console.log` statements in production code
|
|
64
|
-
- Use proper logging libraries instead
|
|
65
|
-
- See hooks for automatic detection
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.ts"
|
|
4
|
+
- "**/*.tsx"
|
|
5
|
+
- "**/*.js"
|
|
6
|
+
- "**/*.jsx"
|
|
7
|
+
---
|
|
8
|
+
# TypeScript/JavaScript Coding Style
|
|
9
|
+
|
|
10
|
+
> This file extends [common/coding-style.md](../common/coding-style.md) with TypeScript/JavaScript specific content.
|
|
11
|
+
|
|
12
|
+
## Immutability
|
|
13
|
+
|
|
14
|
+
Use spread operator for immutable updates:
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// WRONG: Mutation
|
|
18
|
+
function updateUser(user, name) {
|
|
19
|
+
user.name = name // MUTATION!
|
|
20
|
+
return user
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// CORRECT: Immutability
|
|
24
|
+
function updateUser(user, name) {
|
|
25
|
+
return {
|
|
26
|
+
...user,
|
|
27
|
+
name
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Error Handling
|
|
33
|
+
|
|
34
|
+
Use async/await with try-catch:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
try {
|
|
38
|
+
const result = await riskyOperation()
|
|
39
|
+
return result
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error('Operation failed:', error)
|
|
42
|
+
throw new Error('Detailed user-friendly message')
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Input Validation
|
|
47
|
+
|
|
48
|
+
Use Zod for schema-based validation:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { z } from 'zod'
|
|
52
|
+
|
|
53
|
+
const schema = z.object({
|
|
54
|
+
email: z.string().email(),
|
|
55
|
+
age: z.number().int().min(0).max(150)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const validated = schema.parse(input)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Console.log
|
|
62
|
+
|
|
63
|
+
- No `console.log` statements in production code
|
|
64
|
+
- Use proper logging libraries instead
|
|
65
|
+
- See hooks for automatic detection
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Hooks
|
|
9
|
-
|
|
10
|
-
> This file extends [common/hooks.md](../common/hooks.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## PostToolUse Hooks
|
|
13
|
-
|
|
14
|
-
Configure in `~/.claude/settings.json`:
|
|
15
|
-
|
|
16
|
-
- **Prettier**: Auto-format JS/TS files after edit
|
|
17
|
-
- **TypeScript check**: Run `tsc` after editing `.ts`/`.tsx` files
|
|
18
|
-
- **console.log warning**: Warn about `console.log` in edited files
|
|
19
|
-
|
|
20
|
-
## Stop Hooks
|
|
21
|
-
|
|
22
|
-
- **console.log audit**: Check all modified files for `console.log` before session ends
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.ts"
|
|
4
|
+
- "**/*.tsx"
|
|
5
|
+
- "**/*.js"
|
|
6
|
+
- "**/*.jsx"
|
|
7
|
+
---
|
|
8
|
+
# TypeScript/JavaScript Hooks
|
|
9
|
+
|
|
10
|
+
> This file extends [common/hooks.md](../common/hooks.md) with TypeScript/JavaScript specific content.
|
|
11
|
+
|
|
12
|
+
## PostToolUse Hooks
|
|
13
|
+
|
|
14
|
+
Configure in `~/.claude/settings.json`:
|
|
15
|
+
|
|
16
|
+
- **Prettier**: Auto-format JS/TS files after edit
|
|
17
|
+
- **TypeScript check**: Run `tsc` after editing `.ts`/`.tsx` files
|
|
18
|
+
- **console.log warning**: Warn about `console.log` in edited files
|
|
19
|
+
|
|
20
|
+
## Stop Hooks
|
|
21
|
+
|
|
22
|
+
- **console.log audit**: Check all modified files for `console.log` before session ends
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Patterns
|
|
9
|
-
|
|
10
|
-
> This file extends [common/patterns.md](../common/patterns.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## API Response Format
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
interface ApiResponse<T> {
|
|
16
|
-
success: boolean
|
|
17
|
-
data?: T
|
|
18
|
-
error?: string
|
|
19
|
-
meta?: {
|
|
20
|
-
total: number
|
|
21
|
-
page: number
|
|
22
|
-
limit: number
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Custom Hooks Pattern
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
export function useDebounce<T>(value: T, delay: number): T {
|
|
31
|
-
const [debouncedValue, setDebouncedValue] = useState<T>(value)
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
const handler = setTimeout(() => setDebouncedValue(value), delay)
|
|
35
|
-
return () => clearTimeout(handler)
|
|
36
|
-
}, [value, delay])
|
|
37
|
-
|
|
38
|
-
return debouncedValue
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Repository Pattern
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
interface Repository<T> {
|
|
46
|
-
findAll(filters?: Filters): Promise<T[]>
|
|
47
|
-
findById(id: string): Promise<T | null>
|
|
48
|
-
create(data: CreateDto): Promise<T>
|
|
49
|
-
update(id: string, data: UpdateDto): Promise<T>
|
|
50
|
-
delete(id: string): Promise<void>
|
|
51
|
-
}
|
|
52
|
-
```
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.ts"
|
|
4
|
+
- "**/*.tsx"
|
|
5
|
+
- "**/*.js"
|
|
6
|
+
- "**/*.jsx"
|
|
7
|
+
---
|
|
8
|
+
# TypeScript/JavaScript Patterns
|
|
9
|
+
|
|
10
|
+
> This file extends [common/patterns.md](../common/patterns.md) with TypeScript/JavaScript specific content.
|
|
11
|
+
|
|
12
|
+
## API Response Format
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
interface ApiResponse<T> {
|
|
16
|
+
success: boolean
|
|
17
|
+
data?: T
|
|
18
|
+
error?: string
|
|
19
|
+
meta?: {
|
|
20
|
+
total: number
|
|
21
|
+
page: number
|
|
22
|
+
limit: number
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Custom Hooks Pattern
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
export function useDebounce<T>(value: T, delay: number): T {
|
|
31
|
+
const [debouncedValue, setDebouncedValue] = useState<T>(value)
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const handler = setTimeout(() => setDebouncedValue(value), delay)
|
|
35
|
+
return () => clearTimeout(handler)
|
|
36
|
+
}, [value, delay])
|
|
37
|
+
|
|
38
|
+
return debouncedValue
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Repository Pattern
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
interface Repository<T> {
|
|
46
|
+
findAll(filters?: Filters): Promise<T[]>
|
|
47
|
+
findById(id: string): Promise<T | null>
|
|
48
|
+
create(data: CreateDto): Promise<T>
|
|
49
|
+
update(id: string, data: UpdateDto): Promise<T>
|
|
50
|
+
delete(id: string): Promise<void>
|
|
51
|
+
}
|
|
52
|
+
```
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Security
|
|
9
|
-
|
|
10
|
-
> This file extends [common/security.md](../common/security.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## Secret Management
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
// NEVER: Hardcoded secrets
|
|
16
|
-
const apiKey = "sk-proj-xxxxx"
|
|
17
|
-
|
|
18
|
-
// ALWAYS: Environment variables
|
|
19
|
-
const apiKey = process.env.OPENAI_API_KEY
|
|
20
|
-
|
|
21
|
-
if (!apiKey) {
|
|
22
|
-
throw new Error('OPENAI_API_KEY not configured')
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Agent Support
|
|
27
|
-
|
|
28
|
-
- Use **security-reviewer** skill for comprehensive security audits
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.ts"
|
|
4
|
+
- "**/*.tsx"
|
|
5
|
+
- "**/*.js"
|
|
6
|
+
- "**/*.jsx"
|
|
7
|
+
---
|
|
8
|
+
# TypeScript/JavaScript Security
|
|
9
|
+
|
|
10
|
+
> This file extends [common/security.md](../common/security.md) with TypeScript/JavaScript specific content.
|
|
11
|
+
|
|
12
|
+
## Secret Management
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
// NEVER: Hardcoded secrets
|
|
16
|
+
const apiKey = "sk-proj-xxxxx"
|
|
17
|
+
|
|
18
|
+
// ALWAYS: Environment variables
|
|
19
|
+
const apiKey = process.env.OPENAI_API_KEY
|
|
20
|
+
|
|
21
|
+
if (!apiKey) {
|
|
22
|
+
throw new Error('OPENAI_API_KEY not configured')
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Agent Support
|
|
27
|
+
|
|
28
|
+
- Use **security-reviewer** skill for comprehensive security audits
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/*.ts"
|
|
4
|
-
- "**/*.tsx"
|
|
5
|
-
- "**/*.js"
|
|
6
|
-
- "**/*.jsx"
|
|
7
|
-
---
|
|
8
|
-
# TypeScript/JavaScript Testing
|
|
9
|
-
|
|
10
|
-
> This file extends [common/testing.md](../common/testing.md) with TypeScript/JavaScript specific content.
|
|
11
|
-
|
|
12
|
-
## E2E Testing
|
|
13
|
-
|
|
14
|
-
Use **Playwright** as the E2E testing framework for critical user flows.
|
|
15
|
-
|
|
16
|
-
## Agent Support
|
|
17
|
-
|
|
18
|
-
- **e2e-runner** - Playwright E2E testing specialist
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/*.ts"
|
|
4
|
+
- "**/*.tsx"
|
|
5
|
+
- "**/*.js"
|
|
6
|
+
- "**/*.jsx"
|
|
7
|
+
---
|
|
8
|
+
# TypeScript/JavaScript Testing
|
|
9
|
+
|
|
10
|
+
> This file extends [common/testing.md](../common/testing.md) with TypeScript/JavaScript specific content.
|
|
11
|
+
|
|
12
|
+
## E2E Testing
|
|
13
|
+
|
|
14
|
+
Use **Playwright** as the E2E testing framework for critical user flows.
|
|
15
|
+
|
|
16
|
+
## Agent Support
|
|
17
|
+
|
|
18
|
+
- **e2e-runner** - Playwright E2E testing specialist
|