devflow-kit 1.0.0 → 1.2.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +35 -11
  3. package/dist/cli.js +5 -1
  4. package/dist/commands/ambient.d.ts +18 -0
  5. package/dist/commands/ambient.js +136 -0
  6. package/dist/commands/init.d.ts +2 -0
  7. package/dist/commands/init.js +97 -10
  8. package/dist/commands/memory.d.ts +22 -0
  9. package/dist/commands/memory.js +175 -0
  10. package/dist/commands/uninstall.js +72 -5
  11. package/dist/plugins.js +74 -3
  12. package/dist/utils/post-install.d.ts +12 -0
  13. package/dist/utils/post-install.js +82 -1
  14. package/dist/utils/safe-delete-install.d.ts +7 -0
  15. package/dist/utils/safe-delete-install.js +40 -5
  16. package/package.json +2 -1
  17. package/plugins/devflow-accessibility/.claude-plugin/plugin.json +15 -0
  18. package/plugins/devflow-ambient/.claude-plugin/plugin.json +7 -0
  19. package/plugins/devflow-ambient/README.md +49 -0
  20. package/plugins/devflow-ambient/commands/ambient.md +110 -0
  21. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +89 -0
  22. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +68 -0
  23. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +1 -1
  24. package/plugins/devflow-code-review/.claude-plugin/plugin.json +1 -4
  25. package/plugins/devflow-code-review/agents/reviewer.md +8 -0
  26. package/plugins/devflow-code-review/commands/code-review-teams.md +11 -1
  27. package/plugins/devflow-code-review/commands/code-review.md +12 -2
  28. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +3 -6
  29. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +10 -6
  30. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +139 -0
  31. package/plugins/devflow-core-skills/skills/test-driven-development/references/rationalization-prevention.md +111 -0
  32. package/plugins/devflow-debug/.claude-plugin/plugin.json +1 -1
  33. package/plugins/devflow-frontend-design/.claude-plugin/plugin.json +15 -0
  34. package/plugins/devflow-go/.claude-plugin/plugin.json +15 -0
  35. package/plugins/devflow-go/skills/go/SKILL.md +187 -0
  36. package/plugins/devflow-go/skills/go/references/concurrency.md +312 -0
  37. package/plugins/devflow-go/skills/go/references/detection.md +129 -0
  38. package/plugins/devflow-go/skills/go/references/patterns.md +232 -0
  39. package/plugins/devflow-go/skills/go/references/violations.md +205 -0
  40. package/plugins/devflow-implement/.claude-plugin/plugin.json +1 -3
  41. package/plugins/devflow-implement/agents/coder.md +11 -6
  42. package/plugins/devflow-java/.claude-plugin/plugin.json +15 -0
  43. package/plugins/devflow-java/skills/java/SKILL.md +183 -0
  44. package/plugins/devflow-java/skills/java/references/detection.md +120 -0
  45. package/plugins/devflow-java/skills/java/references/modern-java.md +270 -0
  46. package/plugins/devflow-java/skills/java/references/patterns.md +235 -0
  47. package/plugins/devflow-java/skills/java/references/violations.md +213 -0
  48. package/plugins/devflow-python/.claude-plugin/plugin.json +15 -0
  49. package/plugins/devflow-python/skills/python/SKILL.md +188 -0
  50. package/plugins/devflow-python/skills/python/references/async.md +220 -0
  51. package/plugins/devflow-python/skills/python/references/detection.md +128 -0
  52. package/plugins/devflow-python/skills/python/references/patterns.md +226 -0
  53. package/plugins/devflow-python/skills/python/references/violations.md +204 -0
  54. package/plugins/devflow-react/.claude-plugin/plugin.json +15 -0
  55. package/plugins/{devflow-core-skills → devflow-react}/skills/react/SKILL.md +1 -1
  56. package/plugins/{devflow-core-skills → devflow-react}/skills/react/references/patterns.md +3 -3
  57. package/plugins/devflow-resolve/.claude-plugin/plugin.json +1 -1
  58. package/plugins/devflow-rust/.claude-plugin/plugin.json +15 -0
  59. package/plugins/devflow-rust/skills/rust/SKILL.md +193 -0
  60. package/plugins/devflow-rust/skills/rust/references/detection.md +131 -0
  61. package/plugins/devflow-rust/skills/rust/references/ownership.md +242 -0
  62. package/plugins/devflow-rust/skills/rust/references/patterns.md +210 -0
  63. package/plugins/devflow-rust/skills/rust/references/violations.md +191 -0
  64. package/plugins/devflow-self-review/.claude-plugin/plugin.json +1 -1
  65. package/plugins/devflow-specify/.claude-plugin/plugin.json +1 -1
  66. package/plugins/devflow-typescript/.claude-plugin/plugin.json +15 -0
  67. package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/references/patterns.md +3 -3
  68. package/scripts/hooks/ambient-prompt.sh +48 -0
  69. package/scripts/hooks/background-memory-update.sh +49 -8
  70. package/scripts/hooks/ensure-memory-gitignore.sh +17 -0
  71. package/scripts/hooks/pre-compact-memory.sh +12 -6
  72. package/scripts/hooks/session-start-memory.sh +50 -8
  73. package/scripts/hooks/stop-update-memory.sh +10 -6
  74. package/shared/agents/coder.md +11 -6
  75. package/shared/agents/reviewer.md +8 -0
  76. package/shared/skills/ambient-router/SKILL.md +89 -0
  77. package/shared/skills/ambient-router/references/skill-catalog.md +68 -0
  78. package/shared/skills/docs-framework/SKILL.md +10 -6
  79. package/shared/skills/go/SKILL.md +187 -0
  80. package/shared/skills/go/references/concurrency.md +312 -0
  81. package/shared/skills/go/references/detection.md +129 -0
  82. package/shared/skills/go/references/patterns.md +232 -0
  83. package/shared/skills/go/references/violations.md +205 -0
  84. package/shared/skills/java/SKILL.md +183 -0
  85. package/shared/skills/java/references/detection.md +120 -0
  86. package/shared/skills/java/references/modern-java.md +270 -0
  87. package/shared/skills/java/references/patterns.md +235 -0
  88. package/shared/skills/java/references/violations.md +213 -0
  89. package/shared/skills/python/SKILL.md +188 -0
  90. package/shared/skills/python/references/async.md +220 -0
  91. package/shared/skills/python/references/detection.md +128 -0
  92. package/shared/skills/python/references/patterns.md +226 -0
  93. package/shared/skills/python/references/violations.md +204 -0
  94. package/shared/skills/react/SKILL.md +1 -1
  95. package/shared/skills/react/references/patterns.md +3 -3
  96. package/shared/skills/rust/SKILL.md +193 -0
  97. package/shared/skills/rust/references/detection.md +131 -0
  98. package/shared/skills/rust/references/ownership.md +242 -0
  99. package/shared/skills/rust/references/patterns.md +210 -0
  100. package/shared/skills/rust/references/violations.md +191 -0
  101. package/shared/skills/test-driven-development/SKILL.md +139 -0
  102. package/shared/skills/test-driven-development/references/rationalization-prevention.md +111 -0
  103. package/shared/skills/typescript/references/patterns.md +3 -3
  104. package/src/templates/managed-settings.json +14 -0
  105. package/plugins/devflow-code-review/skills/react/SKILL.md +0 -276
  106. package/plugins/devflow-code-review/skills/react/references/patterns.md +0 -1331
  107. package/plugins/devflow-core-skills/skills/accessibility/SKILL.md +0 -229
  108. package/plugins/devflow-core-skills/skills/accessibility/references/detection.md +0 -171
  109. package/plugins/devflow-core-skills/skills/accessibility/references/patterns.md +0 -670
  110. package/plugins/devflow-core-skills/skills/accessibility/references/violations.md +0 -419
  111. package/plugins/devflow-core-skills/skills/frontend-design/SKILL.md +0 -254
  112. package/plugins/devflow-core-skills/skills/frontend-design/references/detection.md +0 -184
  113. package/plugins/devflow-core-skills/skills/frontend-design/references/patterns.md +0 -511
  114. package/plugins/devflow-core-skills/skills/frontend-design/references/violations.md +0 -453
  115. package/plugins/devflow-core-skills/skills/react/references/violations.md +0 -565
  116. package/plugins/devflow-implement/skills/accessibility/SKILL.md +0 -229
  117. package/plugins/devflow-implement/skills/accessibility/references/detection.md +0 -171
  118. package/plugins/devflow-implement/skills/accessibility/references/patterns.md +0 -670
  119. package/plugins/devflow-implement/skills/accessibility/references/violations.md +0 -419
  120. package/plugins/devflow-implement/skills/frontend-design/SKILL.md +0 -254
  121. package/plugins/devflow-implement/skills/frontend-design/references/detection.md +0 -184
  122. package/plugins/devflow-implement/skills/frontend-design/references/patterns.md +0 -511
  123. package/plugins/devflow-implement/skills/frontend-design/references/violations.md +0 -453
  124. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/SKILL.md +0 -0
  125. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/detection.md +0 -0
  126. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/patterns.md +0 -0
  127. /package/plugins/{devflow-code-review → devflow-accessibility}/skills/accessibility/references/violations.md +0 -0
  128. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/SKILL.md +0 -0
  129. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/detection.md +0 -0
  130. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/patterns.md +0 -0
  131. /package/plugins/{devflow-code-review → devflow-frontend-design}/skills/frontend-design/references/violations.md +0 -0
  132. /package/plugins/{devflow-code-review → devflow-react}/skills/react/references/violations.md +0 -0
  133. /package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/SKILL.md +0 -0
  134. /package/plugins/{devflow-core-skills → devflow-typescript}/skills/typescript/references/violations.md +0 -0
@@ -0,0 +1,129 @@
1
+ # Go Issue Detection
2
+
3
+ Grep and regex patterns for finding common Go issues. Reference from main SKILL.md.
4
+
5
+ ## Error Handling Detection
6
+
7
+ ### Unchecked Errors
8
+
9
+ ```bash
10
+ # Find ignored error returns (blank identifier)
11
+ grep -rn ', _ := ' --include='*.go' .
12
+ grep -rn ', _ = ' --include='*.go' .
13
+
14
+ # Find bare error returns without wrapping
15
+ grep -rn 'return.*err$' --include='*.go' . | grep -v 'fmt.Errorf' | grep -v ':= err'
16
+
17
+ # Find deferred calls that return errors (Close, Flush, Sync)
18
+ grep -rn 'defer.*\.Close()' --include='*.go' .
19
+ grep -rn 'defer.*\.Flush()' --include='*.go' .
20
+ ```
21
+
22
+ ### Missing Error Context
23
+
24
+ ```bash
25
+ # Find raw error returns (no wrapping)
26
+ grep -rn 'return nil, err$' --include='*.go' .
27
+ grep -rn 'return err$' --include='*.go' .
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Concurrency Detection
33
+
34
+ ### Goroutine Without Context
35
+
36
+ ```bash
37
+ # Find goroutines that don't reference ctx
38
+ grep -rn 'go func()' --include='*.go' .
39
+
40
+ # Find goroutines without done/cancel/ctx
41
+ grep -B5 -A10 'go func' --include='*.go' . | grep -L 'ctx\|done\|cancel\|errgroup'
42
+ ```
43
+
44
+ ### Potential Goroutine Leaks
45
+
46
+ ```bash
47
+ # Find unbuffered channel creation followed by goroutine
48
+ grep -rn 'make(chan ' --include='*.go' . | grep -v ', [0-9]'
49
+
50
+ # Find goroutines with infinite loops
51
+ grep -A5 'go func' --include='*.go' . | grep 'for {'
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Interface Detection
57
+
58
+ ### Empty Interface Usage
59
+
60
+ ```bash
61
+ # Find empty interface (pre-1.18 style)
62
+ grep -rn 'interface{}' --include='*.go' .
63
+
64
+ # Find any type (1.18+ style) - may be intentional, review context
65
+ grep -rn '\bany\b' --include='*.go' . | grep -v '_test.go' | grep -v 'vendor/'
66
+ ```
67
+
68
+ ### Large Interfaces
69
+
70
+ ```bash
71
+ # Find interface declarations and count methods (interfaces > 5 methods)
72
+ grep -B1 -A20 'type.*interface {' --include='*.go' .
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Panic Detection
78
+
79
+ ### Panic in Library Code
80
+
81
+ ```bash
82
+ # Find panic calls outside main/test
83
+ grep -rn 'panic(' --include='*.go' . | grep -v '_test.go' | grep -v 'main.go'
84
+
85
+ # Find log.Fatal (calls os.Exit) in library code
86
+ grep -rn 'log.Fatal' --include='*.go' . | grep -v 'main.go' | grep -v '_test.go'
87
+
88
+ # Find os.Exit in library code
89
+ grep -rn 'os.Exit' --include='*.go' . | grep -v 'main.go' | grep -v '_test.go'
90
+ ```
91
+
92
+ ---
93
+
94
+ ## init() Detection
95
+
96
+ ```bash
97
+ # Find all init functions
98
+ grep -rn '^func init()' --include='*.go' .
99
+
100
+ # Find init functions with side effects (network, file, global state)
101
+ grep -A10 '^func init()' --include='*.go' . | grep -E 'http\.|sql\.|os\.|Open|Dial|Connect'
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Mutex and Race Detection
107
+
108
+ ```bash
109
+ # Find mutex passed by value (function params with Mutex, not pointer)
110
+ grep -rn 'func.*sync\.Mutex[^*]' --include='*.go' .
111
+
112
+ # Find Lock without corresponding Unlock
113
+ grep -rn '\.Lock()' --include='*.go' . | grep -v 'defer.*Unlock'
114
+
115
+ # Find RLock without RUnlock
116
+ grep -rn '\.RLock()' --include='*.go' . | grep -v 'defer.*RUnlock'
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Map and Slice Safety
122
+
123
+ ```bash
124
+ # Find uninitialized map declarations (potential nil map panic)
125
+ grep -rn 'var.*map\[' --include='*.go' . | grep -v 'make\|:='
126
+
127
+ # Find slice append without pre-allocation hint
128
+ grep -rn 'append(' --include='*.go' . | head -20
129
+ ```
@@ -0,0 +1,232 @@
1
+ # Go Correct Patterns
2
+
3
+ Extended correct patterns for Go development. Reference from main SKILL.md.
4
+
5
+ ## Table-Driven Tests
6
+
7
+ ```go
8
+ func TestAdd(t *testing.T) {
9
+ tests := []struct {
10
+ name string
11
+ a, b int
12
+ expected int
13
+ }{
14
+ {"positive numbers", 2, 3, 5},
15
+ {"negative numbers", -1, -2, -3},
16
+ {"zero", 0, 0, 0},
17
+ {"mixed signs", -1, 3, 2},
18
+ }
19
+
20
+ for _, tt := range tests {
21
+ t.Run(tt.name, func(t *testing.T) {
22
+ result := Add(tt.a, tt.b)
23
+ if result != tt.expected {
24
+ t.Errorf("Add(%d, %d) = %d, want %d", tt.a, tt.b, result, tt.expected)
25
+ }
26
+ })
27
+ }
28
+ }
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Functional Options
34
+
35
+ ```go
36
+ type Server struct {
37
+ addr string
38
+ timeout time.Duration
39
+ logger *slog.Logger
40
+ }
41
+
42
+ type Option func(*Server)
43
+
44
+ func WithAddr(addr string) Option {
45
+ return func(s *Server) { s.addr = addr }
46
+ }
47
+
48
+ func WithTimeout(d time.Duration) Option {
49
+ return func(s *Server) { s.timeout = d }
50
+ }
51
+
52
+ func WithLogger(l *slog.Logger) Option {
53
+ return func(s *Server) { s.logger = l }
54
+ }
55
+
56
+ func NewServer(opts ...Option) *Server {
57
+ s := &Server{
58
+ addr: ":8080", // sensible default
59
+ timeout: 30 * time.Second, // sensible default
60
+ logger: slog.Default(),
61
+ }
62
+ for _, opt := range opts {
63
+ opt(s)
64
+ }
65
+ return s
66
+ }
67
+
68
+ // Usage
69
+ srv := NewServer(
70
+ WithAddr(":9090"),
71
+ WithTimeout(60 * time.Second),
72
+ )
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Custom Error Types
78
+
79
+ ```go
80
+ type ValidationError struct {
81
+ Field string
82
+ Message string
83
+ }
84
+
85
+ func (e *ValidationError) Error() string {
86
+ return fmt.Sprintf("validation failed on %s: %s", e.Field, e.Message)
87
+ }
88
+
89
+ type NotFoundError struct {
90
+ Resource string
91
+ ID string
92
+ }
93
+
94
+ func (e *NotFoundError) Error() string {
95
+ return fmt.Sprintf("%s %s not found", e.Resource, e.ID)
96
+ }
97
+
98
+ // Usage with errors.As
99
+ func handleErr(err error) {
100
+ var validErr *ValidationError
101
+ if errors.As(err, &validErr) {
102
+ log.Printf("bad input: field=%s msg=%s", validErr.Field, validErr.Message)
103
+ return
104
+ }
105
+ var notFound *NotFoundError
106
+ if errors.As(err, &notFound) {
107
+ log.Printf("missing: %s/%s", notFound.Resource, notFound.ID)
108
+ return
109
+ }
110
+ log.Printf("unexpected: %v", err)
111
+ }
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Middleware Pattern
117
+
118
+ ```go
119
+ type Middleware func(http.Handler) http.Handler
120
+
121
+ func Logging(logger *slog.Logger) Middleware {
122
+ return func(next http.Handler) http.Handler {
123
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
124
+ start := time.Now()
125
+ next.ServeHTTP(w, r)
126
+ logger.Info("request",
127
+ "method", r.Method,
128
+ "path", r.URL.Path,
129
+ "duration", time.Since(start),
130
+ )
131
+ })
132
+ }
133
+ }
134
+
135
+ func Recovery() Middleware {
136
+ return func(next http.Handler) http.Handler {
137
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
138
+ defer func() {
139
+ if err := recover(); err != nil {
140
+ w.WriteHeader(http.StatusInternalServerError)
141
+ slog.Error("panic recovered", "error", err)
142
+ }
143
+ }()
144
+ next.ServeHTTP(w, r)
145
+ })
146
+ }
147
+ }
148
+
149
+ // Chain composes middleware in order
150
+ func Chain(handler http.Handler, middlewares ...Middleware) http.Handler {
151
+ for i := len(middlewares) - 1; i >= 0; i-- {
152
+ handler = middlewares[i](handler)
153
+ }
154
+ return handler
155
+ }
156
+
157
+ // Usage
158
+ mux := http.NewServeMux()
159
+ mux.HandleFunc("/api/users", handleUsers)
160
+ handler := Chain(mux, Recovery(), Logging(logger))
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Graceful Shutdown
166
+
167
+ ```go
168
+ func main() {
169
+ srv := &http.Server{Addr: ":8080", Handler: mux}
170
+
171
+ go func() {
172
+ if err := srv.ListenAndServe(); err != http.ErrServerClosed {
173
+ slog.Error("server error", "error", err)
174
+ }
175
+ }()
176
+
177
+ quit := make(chan os.Signal, 1)
178
+ signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
179
+ <-quit
180
+
181
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
182
+ defer cancel()
183
+
184
+ if err := srv.Shutdown(ctx); err != nil {
185
+ slog.Error("shutdown error", "error", err)
186
+ }
187
+ slog.Info("server stopped")
188
+ }
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Constructor Pattern
194
+
195
+ ```go
196
+ // Validate at construction - enforce invariants
197
+ func NewUser(name, email string) (*User, error) {
198
+ if name == "" {
199
+ return nil, &ValidationError{Field: "name", Message: "required"}
200
+ }
201
+ if !strings.Contains(email, "@") {
202
+ return nil, &ValidationError{Field: "email", Message: "invalid format"}
203
+ }
204
+ return &User{
205
+ ID: uuid.New().String(),
206
+ Name: name,
207
+ Email: email,
208
+ CreatedAt: time.Now(),
209
+ }, nil
210
+ }
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Structured Logging with slog
216
+
217
+ ```go
218
+ func ProcessOrder(ctx context.Context, orderID string) error {
219
+ logger := slog.With("order_id", orderID, "trace_id", traceID(ctx))
220
+
221
+ logger.Info("processing order")
222
+
223
+ items, err := fetchItems(ctx, orderID)
224
+ if err != nil {
225
+ logger.Error("failed to fetch items", "error", err)
226
+ return fmt.Errorf("fetching items for order %s: %w", orderID, err)
227
+ }
228
+
229
+ logger.Info("items fetched", "count", len(items))
230
+ return nil
231
+ }
232
+ ```
@@ -0,0 +1,205 @@
1
+ # Go Violation Examples
2
+
3
+ Extended violation patterns for Go reviews. Reference from main SKILL.md.
4
+
5
+ ## Error Handling Violations
6
+
7
+ ### Ignored Errors
8
+
9
+ ```go
10
+ // VIOLATION: Silently discarding error
11
+ data, _ := json.Marshal(user)
12
+ w.Write(data)
13
+
14
+ // VIOLATION: Error ignored in deferred call
15
+ defer file.Close() // Close() returns error
16
+
17
+ // VIOLATION: Swallowing error with log
18
+ if err != nil {
19
+ log.Println("something failed") // Error details lost
20
+ return nil
21
+ }
22
+ ```
23
+
24
+ ### Unwrapped Errors
25
+
26
+ ```go
27
+ // VIOLATION: No context on error
28
+ func LoadConfig(path string) (*Config, error) {
29
+ data, err := os.ReadFile(path)
30
+ if err != nil {
31
+ return nil, err // Caller has no idea what failed
32
+ }
33
+ var cfg Config
34
+ if err := json.Unmarshal(data, &cfg); err != nil {
35
+ return nil, err // Which unmarshal? What file?
36
+ }
37
+ return &cfg, nil
38
+ }
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Goroutine Leak Violations
44
+
45
+ ### Fire-and-Forget Goroutine
46
+
47
+ ```go
48
+ // VIOLATION: No way to stop or wait for this goroutine
49
+ func StartPoller() {
50
+ go func() {
51
+ for {
52
+ poll()
53
+ time.Sleep(10 * time.Second)
54
+ }
55
+ }()
56
+ }
57
+
58
+ // VIOLATION: Goroutine blocks forever on channel nobody reads
59
+ func process(items []Item) {
60
+ ch := make(chan Result)
61
+ for _, item := range items {
62
+ go func(i Item) {
63
+ ch <- compute(i) // Blocks if nobody reads
64
+ }(item)
65
+ }
66
+ // Only reads first result - rest leak
67
+ result := <-ch
68
+ _ = result
69
+ }
70
+ ```
71
+
72
+ ### Missing Context Cancellation
73
+
74
+ ```go
75
+ // VIOLATION: Goroutine ignores context
76
+ func Fetch(ctx context.Context, url string) ([]byte, error) {
77
+ ch := make(chan []byte, 1)
78
+ go func() {
79
+ resp, _ := http.Get(url) // Ignores ctx cancellation
80
+ body, _ := io.ReadAll(resp.Body)
81
+ ch <- body
82
+ }()
83
+ return <-ch, nil
84
+ }
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Interface Pollution Violations
90
+
91
+ ### Premature Interface Definition
92
+
93
+ ```go
94
+ // VIOLATION: Interface defined at producer, not consumer
95
+ package user
96
+
97
+ type UserStore interface { // Only one implementation exists
98
+ Get(id string) (*User, error)
99
+ Save(u *User) error
100
+ Delete(id string) error
101
+ List() ([]*User, error)
102
+ Count() (int, error)
103
+ }
104
+
105
+ type PostgresStore struct{ db *sql.DB }
106
+
107
+ func (s *PostgresStore) Get(id string) (*User, error) { ... }
108
+ // ... implements all 5 methods
109
+ ```
110
+
111
+ ### God Interface
112
+
113
+ ```go
114
+ // VIOLATION: Interface too large - impossible to mock cleanly
115
+ type Service interface {
116
+ CreateUser(ctx context.Context, u *User) error
117
+ GetUser(ctx context.Context, id string) (*User, error)
118
+ UpdateUser(ctx context.Context, u *User) error
119
+ DeleteUser(ctx context.Context, id string) error
120
+ ListUsers(ctx context.Context) ([]*User, error)
121
+ SendEmail(ctx context.Context, to string, body string) error
122
+ GenerateReport(ctx context.Context) ([]byte, error)
123
+ ProcessPayment(ctx context.Context, amt int) error
124
+ }
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Naked Return Violations
130
+
131
+ ```go
132
+ // VIOLATION: Naked returns obscure what's being returned
133
+ func divide(a, b float64) (result float64, err error) {
134
+ if b == 0 {
135
+ err = errors.New("division by zero")
136
+ return // What is result here? Zero - but not obvious
137
+ }
138
+ result = a / b
139
+ return // Have to trace back to find return values
140
+ }
141
+ ```
142
+
143
+ ---
144
+
145
+ ## init() Abuse Violations
146
+
147
+ ```go
148
+ // VIOLATION: Side effects in init - runs on import
149
+ func init() {
150
+ db, err := sql.Open("postgres", os.Getenv("DATABASE_URL"))
151
+ if err != nil {
152
+ log.Fatal(err) // Crashes on import
153
+ }
154
+ globalDB = db
155
+ }
156
+
157
+ // VIOLATION: Registration magic in init
158
+ func init() {
159
+ http.HandleFunc("/health", healthCheck) // Hidden route registration
160
+ prometheus.MustRegister(requestCounter) // Panics if called twice
161
+ }
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Mutex Violations
167
+
168
+ ```go
169
+ // VIOLATION: Copying mutex (passes by value)
170
+ type Cache struct {
171
+ mu sync.Mutex
172
+ data map[string]string
173
+ }
174
+
175
+ func process(c Cache) { // c is a COPY - mutex is copied too
176
+ c.mu.Lock()
177
+ defer c.mu.Unlock()
178
+ c.data["key"] = "val"
179
+ }
180
+
181
+ // VIOLATION: Forgetting to unlock
182
+ func (c *Cache) Get(key string) string {
183
+ c.mu.Lock()
184
+ if val, ok := c.data[key]; ok {
185
+ return val // Mutex never unlocked!
186
+ }
187
+ c.mu.Unlock()
188
+ return ""
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Slice and Map Violations
195
+
196
+ ```go
197
+ // VIOLATION: Nil map write (runtime panic)
198
+ var m map[string]int
199
+ m["key"] = 1 // panic: assignment to entry in nil map
200
+
201
+ // VIOLATION: Sharing slice backing array
202
+ func getFirstThree(s []int) []int {
203
+ return s[:3] // Shares backing array - mutations leak
204
+ }
205
+ ```
@@ -5,16 +5,14 @@
5
5
  "name": "DevFlow Contributors",
6
6
  "email": "dean@keren.dev"
7
7
  },
8
- "version": "1.0.0",
8
+ "version": "1.2.0",
9
9
  "homepage": "https://github.com/dean0x/devflow",
10
10
  "repository": "https://github.com/dean0x/devflow",
11
11
  "license": "MIT",
12
12
  "keywords": ["implementation", "coding", "workflow", "agents", "agentic", "pr"],
13
13
  "agents": ["git", "skimmer", "synthesizer", "coder", "simplifier", "scrutinizer", "shepherd", "validator"],
14
14
  "skills": [
15
- "accessibility",
16
15
  "agent-teams",
17
- "frontend-design",
18
16
  "implementation-patterns",
19
17
  "self-review"
20
18
  ]
@@ -2,7 +2,7 @@
2
2
  name: Coder
3
3
  description: Autonomous task implementation on feature branch. Implements, tests, and commits.
4
4
  model: inherit
5
- skills: core-patterns, git-safety, implementation-patterns, git-workflow, typescript, react, test-patterns, input-validation, accessibility, frontend-design
5
+ skills: core-patterns, git-safety, implementation-patterns, git-workflow, test-patterns, input-validation
6
6
  ---
7
7
 
8
8
  # Coder Agent
@@ -33,11 +33,16 @@ You receive from orchestrator:
33
33
 
34
34
  2. **Reference handoff** (if PRIOR_PHASE_SUMMARY provided): Use summary to validate your understanding of prior work, not as the sole source of truth. The actual code is authoritative.
35
35
 
36
- 3. **Load domain skills**: Based on DOMAIN hint, apply relevant patterns:
37
- - `backend`: typescript, implementation-patterns, input-validation
38
- - `frontend`: react, typescript, accessibility, frontend-design
39
- - `tests`: test-patterns, typescript
40
- - `fullstack`: all of the above
36
+ 3. **Load domain skills**: Based on DOMAIN hint and files in scope, dynamically load relevant language/ecosystem skills by reading their SKILL.md. Only load skills that are installed:
37
+ - `backend` (TypeScript): Read `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/input-validation/SKILL.md`
38
+ - `backend` (Go): Read `~/.claude/skills/go/SKILL.md`
39
+ - `backend` (Java): Read `~/.claude/skills/java/SKILL.md`
40
+ - `backend` (Python): Read `~/.claude/skills/python/SKILL.md`
41
+ - `backend` (Rust): Read `~/.claude/skills/rust/SKILL.md`
42
+ - `frontend`: Read `~/.claude/skills/react/SKILL.md`, `~/.claude/skills/typescript/SKILL.md`, `~/.claude/skills/accessibility/SKILL.md`, `~/.claude/skills/frontend-design/SKILL.md`
43
+ - `tests`: Read `~/.claude/skills/test-patterns/SKILL.md`, `~/.claude/skills/typescript/SKILL.md`
44
+ - `fullstack`: Combine backend + frontend skills
45
+ - If a Read fails (skill not installed), skip it silently and continue.
41
46
 
42
47
  4. **Implement the plan**: Work through execution steps systematically, creating and modifying files. Follow existing patterns. Type everything. Use Result types if codebase uses them.
43
48
 
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "devflow-java",
3
+ "description": "Java language patterns - records, sealed classes, composition, modern Java features",
4
+ "author": {
5
+ "name": "DevFlow Contributors",
6
+ "email": "dean@keren.dev"
7
+ },
8
+ "version": "1.2.0",
9
+ "homepage": "https://github.com/dean0x/devflow",
10
+ "repository": "https://github.com/dean0x/devflow",
11
+ "license": "MIT",
12
+ "keywords": ["java", "records", "sealed-classes", "composition"],
13
+ "agents": [],
14
+ "skills": ["java"]
15
+ }