oh-my-customcode 0.12.1 → 0.12.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/README.md +4 -8
- package/dist/cli/index.js +137 -336
- package/dist/index.js +99 -260
- package/package.json +2 -4
- package/templates/.codex/agents/arch-documenter.md +0 -33
- package/templates/.codex/agents/arch-speckit-agent.md +0 -47
- package/templates/.codex/agents/be-express-expert.md +0 -30
- package/templates/.codex/agents/be-fastapi-expert.md +0 -43
- package/templates/.codex/agents/be-go-backend-expert.md +0 -43
- package/templates/.codex/agents/be-nestjs-expert.md +0 -28
- package/templates/.codex/agents/be-springboot-expert.md +0 -40
- package/templates/.codex/agents/db-postgres-expert.md +0 -36
- package/templates/.codex/agents/db-redis-expert.md +0 -36
- package/templates/.codex/agents/db-supabase-expert.md +0 -35
- package/templates/.codex/agents/de-airflow-expert.md +0 -34
- package/templates/.codex/agents/de-dbt-expert.md +0 -34
- package/templates/.codex/agents/de-kafka-expert.md +0 -81
- package/templates/.codex/agents/de-pipeline-expert.md +0 -32
- package/templates/.codex/agents/de-snowflake-expert.md +0 -36
- package/templates/.codex/agents/de-spark-expert.md +0 -36
- package/templates/.codex/agents/fe-svelte-agent.md +0 -29
- package/templates/.codex/agents/fe-vercel-agent.md +0 -37
- package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
- package/templates/.codex/agents/infra-aws-expert.md +0 -47
- package/templates/.codex/agents/infra-docker-expert.md +0 -47
- package/templates/.codex/agents/lang-golang-expert.md +0 -43
- package/templates/.codex/agents/lang-java21-expert.md +0 -39
- package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
- package/templates/.codex/agents/lang-python-expert.md +0 -43
- package/templates/.codex/agents/lang-rust-expert.md +0 -43
- package/templates/.codex/agents/lang-typescript-expert.md +0 -43
- package/templates/.codex/agents/mgr-claude-code-bible.md +0 -58
- package/templates/.codex/agents/mgr-creator.md +0 -39
- package/templates/.codex/agents/mgr-gitnerd.md +0 -45
- package/templates/.codex/agents/mgr-sauron.md +0 -161
- package/templates/.codex/agents/mgr-supplier.md +0 -35
- package/templates/.codex/agents/mgr-sync-checker.md +0 -38
- package/templates/.codex/agents/mgr-updater.md +0 -33
- package/templates/.codex/agents/qa-engineer.md +0 -32
- package/templates/.codex/agents/qa-planner.md +0 -73
- package/templates/.codex/agents/qa-writer.md +0 -27
- package/templates/.codex/agents/sys-memory-keeper.md +0 -43
- package/templates/.codex/agents/sys-naggy.md +0 -37
- package/templates/.codex/agents/tool-bun-expert.md +0 -26
- package/templates/.codex/agents/tool-npm-expert.md +0 -30
- package/templates/.codex/agents/tool-optimizer.md +0 -34
- package/templates/.codex/codex-native-hash.txt +0 -1
- package/templates/.codex/contexts/dev.md +0 -20
- package/templates/.codex/contexts/ecomode.md +0 -63
- package/templates/.codex/contexts/index.yaml +0 -41
- package/templates/.codex/contexts/research.md +0 -28
- package/templates/.codex/contexts/review.md +0 -23
- package/templates/.codex/hooks/hooks.json +0 -150
- package/templates/.codex/install-hooks.sh +0 -100
- package/templates/.codex/rules/MAY-optimization.md +0 -29
- package/templates/.codex/rules/MUST-agent-design.md +0 -57
- package/templates/.codex/rules/MUST-agent-identification.md +0 -29
- package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
- package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
- package/templates/.codex/rules/MUST-language-policy.md +0 -27
- package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
- package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
- package/templates/.codex/rules/MUST-permissions.md +0 -30
- package/templates/.codex/rules/MUST-safety.md +0 -23
- package/templates/.codex/rules/MUST-sync-verification.md +0 -125
- package/templates/.codex/rules/MUST-tool-identification.md +0 -82
- package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
- package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
- package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
- package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
- package/templates/.codex/rules/SHOULD-interaction.md +0 -34
- package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
- package/templates/.codex/rules/index.yaml +0 -141
- package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
- package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
- package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
- package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -100
- package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -272
- package/templates/.codex/skills/create-agent/SKILL.md +0 -91
- package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
- package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
- package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
- package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
- package/templates/.codex/skills/dev-review/SKILL.md +0 -81
- package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
- package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
- package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
- package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
- package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
- package/templates/.codex/skills/help/SKILL.md +0 -125
- package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
- package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
- package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
- package/templates/.codex/skills/lists/SKILL.md +0 -78
- package/templates/.codex/skills/memory-management/SKILL.md +0 -195
- package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
- package/templates/.codex/skills/memory-save/SKILL.md +0 -126
- package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
- package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
- package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
- package/templates/.codex/skills/npm-version/SKILL.md +0 -75
- package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
- package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
- package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
- package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
- package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
- package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
- package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
- package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
- package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
- package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
- package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
- package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
- package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
- package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
- package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
- package/templates/.codex/skills/status/SKILL.md +0 -153
- package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
- package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
- package/templates/.codex/skills/update-docs/SKILL.md +0 -140
- package/templates/.codex/skills/update-external/SKILL.md +0 -149
- package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
- package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
- package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
- package/templates/.codex/uninstall-hooks.sh +0 -52
- package/templates/AGENTS.md.en +0 -39
- package/templates/AGENTS.md.ko +0 -39
- package/templates/manifest.codex.json +0 -43
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: go-best-practices
|
|
3
|
-
description: Idiomatic Go patterns from Effective Go
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Apply idiomatic Go patterns and best practices from official Go documentation.
|
|
10
|
-
|
|
11
|
-
## Rules
|
|
12
|
-
|
|
13
|
-
### 1. Formatting
|
|
14
|
-
|
|
15
|
-
```yaml
|
|
16
|
-
rules:
|
|
17
|
-
- Use gofmt for all code formatting
|
|
18
|
-
- Indentation uses tabs, not spaces
|
|
19
|
-
- No line length limit, but break long lines sensibly
|
|
20
|
-
- Let gofmt handle alignment
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### 2. Naming Conventions
|
|
24
|
-
|
|
25
|
-
```yaml
|
|
26
|
-
package_names:
|
|
27
|
-
- Short, concise, lowercase, single-word
|
|
28
|
-
- No underscores or mixedCaps
|
|
29
|
-
- Name is basename of source directory
|
|
30
|
-
- Example: bufio, not bufIO or buf_io
|
|
31
|
-
|
|
32
|
-
getters:
|
|
33
|
-
- No "Get" prefix for getters
|
|
34
|
-
- obj.Owner() not obj.GetOwner()
|
|
35
|
-
- Setter can use "Set": obj.SetOwner(user)
|
|
36
|
-
|
|
37
|
-
interface_names:
|
|
38
|
-
- One-method interfaces: method name + "er"
|
|
39
|
-
- Reader, Writer, Formatter, CloseNotifier
|
|
40
|
-
- Avoid stealing standard names unless same signature
|
|
41
|
-
|
|
42
|
-
mixedCaps:
|
|
43
|
-
- Use MixedCaps or mixedCaps, never underscores
|
|
44
|
-
- Exported: MixedCaps (uppercase first)
|
|
45
|
-
- Unexported: mixedCaps (lowercase first)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 3. Control Structures
|
|
49
|
-
|
|
50
|
-
```yaml
|
|
51
|
-
if_statements:
|
|
52
|
-
- Accept initialization statement
|
|
53
|
-
- Prefer: if err := file.Chmod(0664); err != nil
|
|
54
|
-
- Omit else when if ends with break/continue/return
|
|
55
|
-
- Avoid unnecessary else
|
|
56
|
-
|
|
57
|
-
for_loops:
|
|
58
|
-
- Go's only loop construct
|
|
59
|
-
- for init; condition; post { } - like C for
|
|
60
|
-
- for condition { } - like C while
|
|
61
|
-
- for { } - infinite loop
|
|
62
|
-
- Use range for strings, slices, arrays, maps, channels
|
|
63
|
-
|
|
64
|
-
switch:
|
|
65
|
-
- Cases don't fall through by default
|
|
66
|
-
- Use fallthrough keyword if needed
|
|
67
|
-
- Multiple cases: case '0', '1', '2'
|
|
68
|
-
- Type switch: switch v := x.(type)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 4. Functions
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
multiple_returns:
|
|
75
|
-
- Return multiple values for result + error
|
|
76
|
-
- func (file *File) Write(b []byte) (n int, err error)
|
|
77
|
-
|
|
78
|
-
named_results:
|
|
79
|
-
- Document return values with names
|
|
80
|
-
- Can simplify code but use judiciously
|
|
81
|
-
- Unnamed returns OK for short functions
|
|
82
|
-
|
|
83
|
-
defer:
|
|
84
|
-
- Executes when function returns
|
|
85
|
-
- LIFO order for multiple defers
|
|
86
|
-
- Use for cleanup: unlock mutexes, close files
|
|
87
|
-
- Arguments evaluated when defer executes, not when called
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### 5. Data
|
|
91
|
-
|
|
92
|
-
```yaml
|
|
93
|
-
new_vs_make:
|
|
94
|
-
- new(T): allocates zeroed storage, returns *T
|
|
95
|
-
- make(T, args): creates slices, maps, channels only
|
|
96
|
-
- make returns initialized (not zeroed) value of type T
|
|
97
|
-
|
|
98
|
-
slices:
|
|
99
|
-
- Backed by arrays, can grow
|
|
100
|
-
- append() to add elements
|
|
101
|
-
- copy() for safe duplication
|
|
102
|
-
- Slice of slice shares underlying array
|
|
103
|
-
|
|
104
|
-
maps:
|
|
105
|
-
- Reference type, nil until initialized
|
|
106
|
-
- make(map[KeyType]ValueType)
|
|
107
|
-
- Comma ok idiom: val, ok := map[key]
|
|
108
|
-
- delete(map, key) to remove
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 6. Methods
|
|
112
|
-
|
|
113
|
-
```yaml
|
|
114
|
-
pointer_vs_value_receivers:
|
|
115
|
-
- Pointer receiver: can modify, no copy overhead
|
|
116
|
-
- Value receiver: safe from modification
|
|
117
|
-
- If any method needs pointer, all should use pointer
|
|
118
|
-
- Rule: values immutable, pointers mutable
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 7. Interfaces
|
|
122
|
-
|
|
123
|
-
```yaml
|
|
124
|
-
design:
|
|
125
|
-
- Interfaces define behavior, not data
|
|
126
|
-
- Small interfaces (1-3 methods) preferred
|
|
127
|
-
- Accept interfaces, return structs
|
|
128
|
-
- If type implements interface, it satisfies implicitly
|
|
129
|
-
|
|
130
|
-
common_interfaces:
|
|
131
|
-
- io.Reader: Read(p []byte) (n int, err error)
|
|
132
|
-
- io.Writer: Write(p []byte) (n int, err error)
|
|
133
|
-
- fmt.Stringer: String() string
|
|
134
|
-
- error: Error() string
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### 8. Concurrency
|
|
138
|
-
|
|
139
|
-
```yaml
|
|
140
|
-
goroutines:
|
|
141
|
-
- Lightweight, multiplexed onto OS threads
|
|
142
|
-
- go function() to start
|
|
143
|
-
- Don't communicate by sharing memory
|
|
144
|
-
- Share memory by communicating
|
|
145
|
-
|
|
146
|
-
channels:
|
|
147
|
-
- Primary synchronization mechanism
|
|
148
|
-
- ch := make(chan int) - unbuffered
|
|
149
|
-
- ch := make(chan int, 100) - buffered
|
|
150
|
-
- Send: ch <- v
|
|
151
|
-
- Receive: v := <-ch
|
|
152
|
-
- Close: close(ch)
|
|
153
|
-
|
|
154
|
-
patterns:
|
|
155
|
-
- Don't leak goroutines - ensure they exit
|
|
156
|
-
- Use context for cancellation
|
|
157
|
-
- select for multiple channel operations
|
|
158
|
-
- sync.WaitGroup for goroutine coordination
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### 9. Error Handling
|
|
162
|
-
|
|
163
|
-
```yaml
|
|
164
|
-
principles:
|
|
165
|
-
- Errors are values, handle them explicitly
|
|
166
|
-
- Check errors immediately after call
|
|
167
|
-
- Return errors, don't panic
|
|
168
|
-
- Add context when propagating: fmt.Errorf("op failed: %w", err)
|
|
169
|
-
|
|
170
|
-
panic_recover:
|
|
171
|
-
- Panic for unrecoverable errors only
|
|
172
|
-
- Library functions should return errors, not panic
|
|
173
|
-
- Recover only in deferred functions
|
|
174
|
-
- Convert internal panics to errors at package boundary
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### 10. Project Structure
|
|
178
|
-
|
|
179
|
-
```yaml
|
|
180
|
-
packages:
|
|
181
|
-
- One package per directory
|
|
182
|
-
- Package name matches directory name
|
|
183
|
-
- main package for executables
|
|
184
|
-
- Avoid circular imports
|
|
185
|
-
|
|
186
|
-
files:
|
|
187
|
-
- doc.go for package documentation
|
|
188
|
-
- _test.go suffix for test files
|
|
189
|
-
- Group related types and functions
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Application
|
|
193
|
-
|
|
194
|
-
When writing or reviewing Go code:
|
|
195
|
-
|
|
196
|
-
1. **Always** run `gofmt` or `goimports`
|
|
197
|
-
2. **Always** handle returned errors
|
|
198
|
-
3. **Prefer** composition over inheritance
|
|
199
|
-
4. **Prefer** small interfaces
|
|
200
|
-
5. **Prefer** channels for goroutine communication
|
|
201
|
-
6. **Avoid** global state
|
|
202
|
-
7. **Avoid** init() when possible
|
|
203
|
-
8. **Document** exported identifiers
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: help
|
|
3
|
-
description: Show help information for commands and system
|
|
4
|
-
argument-hint: "[command] [--agents] [--rules]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Help Skill
|
|
8
|
-
|
|
9
|
-
Show help information for commands, agents, and system rules.
|
|
10
|
-
|
|
11
|
-
## Options
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
--agents, -a List all available agents
|
|
15
|
-
--commands, -c List all commands (same as 'lists')
|
|
16
|
-
--rules, -r List all rules
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Output Format
|
|
20
|
-
|
|
21
|
-
### Default Help
|
|
22
|
-
```
|
|
23
|
-
AI Agent System - Help
|
|
24
|
-
|
|
25
|
-
Usage: {command} [arguments] [options]
|
|
26
|
-
|
|
27
|
-
Quick Start:
|
|
28
|
-
lists Show all available commands
|
|
29
|
-
status Show system status
|
|
30
|
-
help <command> Get help for a specific command
|
|
31
|
-
|
|
32
|
-
Common Commands:
|
|
33
|
-
/update-docs Sync documentation with project
|
|
34
|
-
/update-external Update external agents
|
|
35
|
-
/audit-agents Check agent dependencies
|
|
36
|
-
/create-agent Create a new agent
|
|
37
|
-
|
|
38
|
-
Use "lists" to see all available commands.
|
|
39
|
-
Use "help <command>" for detailed help.
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Command Help
|
|
43
|
-
```
|
|
44
|
-
help /update-docs
|
|
45
|
-
|
|
46
|
-
Command: /update-docs
|
|
47
|
-
|
|
48
|
-
Description:
|
|
49
|
-
Sync documentation with project structure. Ensures all
|
|
50
|
-
documentation accurately reflects the current project state.
|
|
51
|
-
|
|
52
|
-
Usage:
|
|
53
|
-
/update-docs
|
|
54
|
-
/update-docs --check
|
|
55
|
-
/update-docs --target <path>
|
|
56
|
-
|
|
57
|
-
Options:
|
|
58
|
-
--check, -c Check only, don't modify
|
|
59
|
-
--verbose, -v Show detailed changes
|
|
60
|
-
--target, -t Specific target to update
|
|
61
|
-
|
|
62
|
-
Examples:
|
|
63
|
-
/update-docs # Update all documentation
|
|
64
|
-
/update-docs --check # Check for issues
|
|
65
|
-
/update-docs --target agents # Update agents only
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Agent List
|
|
69
|
-
```
|
|
70
|
-
help --agents
|
|
71
|
-
|
|
72
|
-
Available Agents:
|
|
73
|
-
|
|
74
|
-
Orchestrator:
|
|
75
|
-
secretary Manages manager agents
|
|
76
|
-
|
|
77
|
-
Manager:
|
|
78
|
-
mgr-creator Creates new agents
|
|
79
|
-
mgr-updater Updates external sources and docs
|
|
80
|
-
mgr-supplier Validates dependencies
|
|
81
|
-
|
|
82
|
-
SW Engineer:
|
|
83
|
-
lang-golang-expert Go development (Effective Go)
|
|
84
|
-
lang-python-expert Python development (PEP 8)
|
|
85
|
-
lang-rust-expert Rust development (API Guidelines)
|
|
86
|
-
lang-kotlin-expert Kotlin development (JetBrains)
|
|
87
|
-
lang-typescript-expert TypeScript development (Google)
|
|
88
|
-
fe-vercel-agent React/Next.js (Vercel)
|
|
89
|
-
|
|
90
|
-
Backend Engineer:
|
|
91
|
-
be-fastapi-expert FastAPI (Python async)
|
|
92
|
-
be-springboot-expert Spring Boot (Java)
|
|
93
|
-
be-go-backend-expert Go backend (Uber style)
|
|
94
|
-
|
|
95
|
-
Infra Engineer:
|
|
96
|
-
infra-docker-expert Docker containerization
|
|
97
|
-
infra-aws-expert AWS architecture
|
|
98
|
-
|
|
99
|
-
Total: 15 agents
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Rules List
|
|
103
|
-
```
|
|
104
|
-
help --rules
|
|
105
|
-
|
|
106
|
-
Global Rules:
|
|
107
|
-
|
|
108
|
-
MUST (Never violate):
|
|
109
|
-
R000 Language Policy Korean I/O, English files
|
|
110
|
-
R001 Safety Rules Prohibited actions
|
|
111
|
-
R002 Permission Rules Tool tiers, file access
|
|
112
|
-
R006 Agent Design Structure, separation
|
|
113
|
-
|
|
114
|
-
SHOULD (Strongly recommended):
|
|
115
|
-
R003 Interaction Rules Response format
|
|
116
|
-
R004 Error Handling Error levels, recovery
|
|
117
|
-
R007 Agent Identification Display agent in responses
|
|
118
|
-
R008 Tool Identification Display agent when using tools
|
|
119
|
-
|
|
120
|
-
MAY (Optional):
|
|
121
|
-
R005 Optimization Efficiency guidelines
|
|
122
|
-
R009 Parallel Execution Max 4 parallel instances
|
|
123
|
-
|
|
124
|
-
Total: 10 rules
|
|
125
|
-
```
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: intent-detection
|
|
3
|
-
description: Automatically detect user intent and route to appropriate agent
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Automatically detect user intent and route to the appropriate agent with full transparency.
|
|
10
|
-
|
|
11
|
-
## Detection Algorithm
|
|
12
|
-
|
|
13
|
-
### 1. Input Analysis
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
User Input: "Go 코드 리뷰해줘"
|
|
17
|
-
│
|
|
18
|
-
▼
|
|
19
|
-
┌─────────────────────────────┐
|
|
20
|
-
│ Tokenize & Extract │
|
|
21
|
-
├─────────────────────────────┤
|
|
22
|
-
│ Keywords: ["Go"] │
|
|
23
|
-
│ Actions: ["리뷰"] │
|
|
24
|
-
│ File refs: [] │
|
|
25
|
-
│ Context: [] │
|
|
26
|
-
└─────────────────────────────┘
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### 2. Pattern Matching
|
|
30
|
-
|
|
31
|
-
Match extracted tokens against agent triggers:
|
|
32
|
-
|
|
33
|
-
```yaml
|
|
34
|
-
# For each agent in agent-triggers.yaml
|
|
35
|
-
match_score = 0
|
|
36
|
-
|
|
37
|
-
# Keyword match
|
|
38
|
-
for keyword in user_keywords:
|
|
39
|
-
if keyword in agent.keywords:
|
|
40
|
-
match_score += agent.keyword_weight (default: 40)
|
|
41
|
-
|
|
42
|
-
# Action match
|
|
43
|
-
for action in user_actions:
|
|
44
|
-
if action in agent.actions:
|
|
45
|
-
match_score += agent.action_weight (default: 40)
|
|
46
|
-
|
|
47
|
-
# File pattern match
|
|
48
|
-
for pattern in user_file_refs:
|
|
49
|
-
if matches(pattern, agent.file_patterns):
|
|
50
|
-
match_score += agent.file_weight (default: 30)
|
|
51
|
-
|
|
52
|
-
# Context bonus
|
|
53
|
-
if agent == recent_agent:
|
|
54
|
-
match_score += context_bonus (default: 10)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 3. Confidence Calculation
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
confidence = min(100, match_score)
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### 4. Decision
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
if confidence >= 90:
|
|
67
|
-
auto_execute()
|
|
68
|
-
elif confidence >= 70:
|
|
69
|
-
request_confirmation()
|
|
70
|
-
else:
|
|
71
|
-
list_options()
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Detection Patterns
|
|
75
|
-
|
|
76
|
-
### Keyword Patterns
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
# Korean keywords
|
|
80
|
-
korean:
|
|
81
|
-
- "고" → go
|
|
82
|
-
- "파이썬" → python
|
|
83
|
-
- "러스트" → rust
|
|
84
|
-
- "타입스크립트" → typescript
|
|
85
|
-
|
|
86
|
-
# Action verbs (Korean)
|
|
87
|
-
actions_kr:
|
|
88
|
-
- "리뷰" → review
|
|
89
|
-
- "분석" → analyze
|
|
90
|
-
- "수정" → fix
|
|
91
|
-
- "생성" → create
|
|
92
|
-
- "만들어" → create
|
|
93
|
-
- "확인" → check
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### File Pattern Matching
|
|
97
|
-
|
|
98
|
-
```yaml
|
|
99
|
-
patterns:
|
|
100
|
-
go: ["*.go", "go.mod", "go.sum"]
|
|
101
|
-
python: ["*.py", "requirements.txt", "pyproject.toml", "setup.py"]
|
|
102
|
-
rust: ["*.rs", "Cargo.toml"]
|
|
103
|
-
typescript: ["*.ts", "*.tsx", "tsconfig.json"]
|
|
104
|
-
kotlin: ["*.kt", "*.kts", "build.gradle.kts"]
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Output Format
|
|
108
|
-
|
|
109
|
-
### High Confidence
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
[Intent Detected]
|
|
113
|
-
├── Input: "Go 코드 리뷰해줘"
|
|
114
|
-
├── Agent: lang-golang-expert
|
|
115
|
-
├── Confidence: 95%
|
|
116
|
-
└── Reason: "Go" keyword + "리뷰" action
|
|
117
|
-
|
|
118
|
-
┌─ Agent: lang-golang-expert (sw-engineer)
|
|
119
|
-
└─ Task: Code review
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Medium Confidence
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
[Intent Detected]
|
|
126
|
-
├── Input: "백엔드 API 확인해줘"
|
|
127
|
-
├── Detected: be-go-backend-expert (?)
|
|
128
|
-
├── Confidence: 78%
|
|
129
|
-
└── Alternatives available
|
|
130
|
-
|
|
131
|
-
Select agent:
|
|
132
|
-
1. be-go-backend-expert (78%)
|
|
133
|
-
2. be-fastapi-expert (72%)
|
|
134
|
-
3. be-springboot-expert (68%)
|
|
135
|
-
|
|
136
|
-
Choice [1-3, or agent name]:
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Override
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
[Override Detected]
|
|
143
|
-
├── Input: "@lang-python-expert review api.py"
|
|
144
|
-
├── Agent: lang-python-expert (explicit)
|
|
145
|
-
└── Bypassing intent detection
|
|
146
|
-
|
|
147
|
-
┌─ Agent: lang-python-expert (sw-engineer)
|
|
148
|
-
└─ Task: Review api.py
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Integration
|
|
152
|
-
|
|
153
|
-
### With Secretary
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
Secretary uses this skill to:
|
|
157
|
-
1. Parse incoming user requests
|
|
158
|
-
2. Detect intent and select agent
|
|
159
|
-
3. Display reasoning
|
|
160
|
-
4. Handle confirmations
|
|
161
|
-
5. Route to selected agent
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### With Agent Triggers
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
Load triggers from:
|
|
168
|
-
.codex/skills/intent-detection/patterns/agent-triggers.yaml
|
|
169
|
-
|
|
170
|
-
Each agent defines:
|
|
171
|
-
- keywords (language names, tech terms)
|
|
172
|
-
- file_patterns (extensions, config files)
|
|
173
|
-
- actions (supported actions)
|
|
174
|
-
- weights (scoring factors)
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Error Handling
|
|
178
|
-
|
|
179
|
-
### No Match
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
[Intent Unclear]
|
|
183
|
-
├── Input: "도와줘"
|
|
184
|
-
├── Confidence: < 30%
|
|
185
|
-
└── Too generic to detect intent
|
|
186
|
-
|
|
187
|
-
How can I help? Please be more specific:
|
|
188
|
-
- What type of task? (review, create, fix, ...)
|
|
189
|
-
- What language/technology? (Go, Python, ...)
|
|
190
|
-
- What file or project?
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Ambiguous Match
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
[Intent Ambiguous]
|
|
197
|
-
├── Input: "코드 리뷰"
|
|
198
|
-
├── Top matches:
|
|
199
|
-
│ └── All experts: ~50% each
|
|
200
|
-
└── Need file context or language hint
|
|
201
|
-
|
|
202
|
-
Specify the language or provide a file path.
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Configuration
|
|
206
|
-
|
|
207
|
-
```yaml
|
|
208
|
-
intent_detection:
|
|
209
|
-
enabled: true
|
|
210
|
-
auto_execute_threshold: 90
|
|
211
|
-
confirm_threshold: 70
|
|
212
|
-
show_reasoning: true
|
|
213
|
-
max_alternatives: 3
|
|
214
|
-
korean_support: true
|
|
215
|
-
```
|