kenmark-skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -0
- package/brain/CHANGELOG.md +48 -0
- package/package.json +46 -0
- package/skills/user-skills/commit-push/SKILL.md +225 -0
- package/skills/user-skills/init-brain/SKILL.md +425 -0
- package/skills/user-skills/issues-check/SKILL.md +121 -0
- package/skills/user-skills/issues-list/SKILL.md +180 -0
- package/skills/user-skills/issues-maintenance/SKILL.md +252 -0
- package/skills/user-skills/issues-scan/SKILL.md +226 -0
- package/skills/user-skills/issues-setup/SKILL.md +176 -0
- package/skills/user-skills/skill-router/SKILL.md +147 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-brain
|
|
3
|
+
description: |
|
|
4
|
+
Initialize brain/ and optionally sync project standards to agent config files
|
|
5
|
+
(CLAUDE.md, AGENTS.md, .cursorrules, .cursor/rules/, GEMINI.md) after asking
|
|
6
|
+
which targets the user wants. Use when applying workspace rules, creating/updating
|
|
7
|
+
project rules, initializing project standards, or enforcing team conventions.
|
|
8
|
+
allowed-tools:
|
|
9
|
+
- Bash
|
|
10
|
+
- Read
|
|
11
|
+
- Write
|
|
12
|
+
- Edit
|
|
13
|
+
- Grep
|
|
14
|
+
- Glob
|
|
15
|
+
- AskUserQuestion
|
|
16
|
+
triggers:
|
|
17
|
+
- init brain
|
|
18
|
+
- initialize brain
|
|
19
|
+
- apply workspace rules
|
|
20
|
+
- project standards
|
|
21
|
+
- setup cursor rules
|
|
22
|
+
- init-brain
|
|
23
|
+
- init-brain skill
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Init Brain Skill
|
|
27
|
+
|
|
28
|
+
Bootstrap the project **brain** knowledge base, then **ask the user** which agent config files to create or update. Do not create every file by default.
|
|
29
|
+
|
|
30
|
+
**Source of truth:** `brain/rules/standards.md`. Only the agent files the user selects are synced from that file.
|
|
31
|
+
|
|
32
|
+
## Optional sync targets (user picks)
|
|
33
|
+
|
|
34
|
+
| ID | Tool | File(s) | Role |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| `claude` | Claude Code | `CLAUDE.md` | Primary project instructions |
|
|
37
|
+
| `codex` | Codex / OpenAI agents | `AGENTS.md` | Harnesses that read `AGENTS.md` |
|
|
38
|
+
| `cursor-mdc` | Cursor (current) | `.cursor/rules/project-standards.mdc` | Always-on rule with frontmatter |
|
|
39
|
+
| `cursor-legacy` | Cursor (legacy) | `.cursorrules` | Root rules file in older setups |
|
|
40
|
+
| `gemini` | Gemini CLI | `GEMINI.md` | Gemini CLI project instructions |
|
|
41
|
+
|
|
42
|
+
The user may select **one, several, or none**. If they select none, stop after Step 1 (brain only).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 0 — Resolve repo root
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
50
|
+
cd "$REPO_ROOT"
|
|
51
|
+
echo "REPO_ROOT=$REPO_ROOT"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Before writing, read only the agent files the user selected (if they already exist). Preserve content **outside** the `init-brain` merge markers.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 1 — Create brain scaffold
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
mkdir -p brain/rules brain/issues/completed temp
|
|
62
|
+
touch temp/.gitkeep
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `brain/INDEX.md`
|
|
66
|
+
|
|
67
|
+
Create or refresh:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# Brain Index
|
|
71
|
+
|
|
72
|
+
Project knowledge base for humans and AI agents.
|
|
73
|
+
|
|
74
|
+
| Path | Purpose |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| [rules/standards.md](rules/standards.md) | Canonical coding & workflow standards (synced to agent files) |
|
|
77
|
+
| [CHANGELOG.md](CHANGELOG.md) | Versioned log of brain and standards changes |
|
|
78
|
+
| [issues/INDEX.md](issues/INDEX.md) | Active/completed issue tracker (optional; use `issues-setup` skill) |
|
|
79
|
+
|
|
80
|
+
## Maintenance
|
|
81
|
+
|
|
82
|
+
- Update `brain/` after every meaningful code change.
|
|
83
|
+
- After changing `brain/rules/standards.md`, re-run **init-brain** and choose which agent files to sync.
|
|
84
|
+
- Never delete the `brain/` folder.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### `brain/rules/standards.md`
|
|
88
|
+
|
|
89
|
+
Write the **full standards body** (see [Canonical standards content](#canonical-standards-content) below). This is the only place to edit rule bullets long-term.
|
|
90
|
+
|
|
91
|
+
### `brain/CHANGELOG.md`
|
|
92
|
+
|
|
93
|
+
If missing, create with a header `# CHANGELOG`. Append a new version entry (see Step 5).
|
|
94
|
+
|
|
95
|
+
### `temp/`
|
|
96
|
+
|
|
97
|
+
Ensure `temp/` exists for scratch scripts and downloads. Add to `.gitignore` if not already present:
|
|
98
|
+
|
|
99
|
+
```gitignore
|
|
100
|
+
# init-brain
|
|
101
|
+
/temp/
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Step 2 — Ask which agent files to sync (required)
|
|
107
|
+
|
|
108
|
+
**Do not create or update any agent config file until the user chooses.**
|
|
109
|
+
|
|
110
|
+
### When to skip the question
|
|
111
|
+
|
|
112
|
+
Skip only if the user already named targets in the same request, for example:
|
|
113
|
+
|
|
114
|
+
- "init brain for Claude and Cursor" → `claude` + `cursor-mdc` (add `cursor-legacy` only if they ask)
|
|
115
|
+
- "brain only" / "just the brain folder" → **none** (Step 1 only)
|
|
116
|
+
- "sync AGENTS.md" → `codex` only
|
|
117
|
+
|
|
118
|
+
### When to ask
|
|
119
|
+
|
|
120
|
+
If targets are unclear, use **AskUserQuestion** with `allow_multiple: true`:
|
|
121
|
+
|
|
122
|
+
| Option ID | Label |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| `claude` | Claude Code — `CLAUDE.md` |
|
|
125
|
+
| `codex` | Codex / agents — `AGENTS.md` |
|
|
126
|
+
| `cursor-mdc` | Cursor — `.cursor/rules/project-standards.mdc` (recommended) |
|
|
127
|
+
| `cursor-legacy` | Cursor legacy — `.cursorrules` |
|
|
128
|
+
| `gemini` | Gemini CLI — `GEMINI.md` |
|
|
129
|
+
|
|
130
|
+
If AskUserQuestion is unavailable, ask in chat with the same options and wait for a reply.
|
|
131
|
+
|
|
132
|
+
### After selection
|
|
133
|
+
|
|
134
|
+
- Record the chosen IDs (e.g. `claude`, `cursor-mdc`).
|
|
135
|
+
- If the user selects **no** agent files, skip Step 3 and go to Step 4 (verify brain only) and Step 5 (changelog).
|
|
136
|
+
- If the user selects both `claude` and `codex`, keep those two files in parity when syncing.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Step 3 — Sync selected agent files (merge markers)
|
|
141
|
+
|
|
142
|
+
**Only process targets chosen in Step 2.**
|
|
143
|
+
|
|
144
|
+
Use **identical rule prose** inside each selected file, wrapped in merge markers so re-runs are safe:
|
|
145
|
+
|
|
146
|
+
```html
|
|
147
|
+
<!-- init-brain:START -->
|
|
148
|
+
... synced standards markdown ...
|
|
149
|
+
<!-- init-brain:END -->
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If a file exists but has **no** markers, insert the block after any existing custom preamble (do not delete user content above the markers). If the user has heavily customized agent files, ask before replacing unmarked content.
|
|
153
|
+
|
|
154
|
+
### `CLAUDE.md` — if `claude` selected
|
|
155
|
+
|
|
156
|
+
Create or update. Structure:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Claude Code — Project Instructions
|
|
160
|
+
|
|
161
|
+
Standards below are synced from `brain/rules/standards.md`. Edit the brain file, then re-run **init-brain**.
|
|
162
|
+
|
|
163
|
+
- Brain index: [brain/INDEX.md](brain/INDEX.md)
|
|
164
|
+
- Changelog: [brain/CHANGELOG.md](brain/CHANGELOG.md)
|
|
165
|
+
|
|
166
|
+
<!-- init-brain:START -->
|
|
167
|
+
|
|
168
|
+
# Project Standards
|
|
169
|
+
|
|
170
|
+
(paste full content from brain/rules/standards.md)
|
|
171
|
+
|
|
172
|
+
<!-- init-brain:END -->
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### `AGENTS.md` — if `codex` selected
|
|
176
|
+
|
|
177
|
+
Create or update with the **same** `init-brain` block as `CLAUDE.md` when both are selected, plus a one-line header:
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
# Agent Instructions (Codex & compatible harnesses)
|
|
181
|
+
|
|
182
|
+
Synced from `brain/rules/standards.md`. Keep in parity with `CLAUDE.md`.
|
|
183
|
+
|
|
184
|
+
<!-- init-brain:START -->
|
|
185
|
+
(same body as CLAUDE.md block)
|
|
186
|
+
<!-- init-brain:END -->
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
When both `claude` and `codex` are selected, use the same standards body in both files.
|
|
190
|
+
|
|
191
|
+
### `.cursor/rules/project-standards.mdc` — if `cursor-mdc` selected
|
|
192
|
+
|
|
193
|
+
Create directory and file:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
---
|
|
197
|
+
description: Project standards synced from brain/rules/standards.md
|
|
198
|
+
alwaysApply: true
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
<!-- init-brain:START -->
|
|
202
|
+
|
|
203
|
+
# Project Standards
|
|
204
|
+
|
|
205
|
+
(paste full content from brain/rules/standards.md)
|
|
206
|
+
|
|
207
|
+
<!-- init-brain:END -->
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Cursor loads `.mdc` rules from `.cursor/rules/`; `alwaysApply: true` applies standards in every session.
|
|
211
|
+
|
|
212
|
+
### `.cursorrules` — if `cursor-legacy` selected
|
|
213
|
+
|
|
214
|
+
Create or update at repo root for older Cursor setups:
|
|
215
|
+
|
|
216
|
+
```markdown
|
|
217
|
+
# Cursor rules (legacy path — prefer .cursor/rules/project-standards.mdc)
|
|
218
|
+
|
|
219
|
+
Synced from brain/rules/standards.md. Re-run init-brain after editing standards.
|
|
220
|
+
|
|
221
|
+
<!-- init-brain:START -->
|
|
222
|
+
|
|
223
|
+
(paste full content from brain/rules/standards.md)
|
|
224
|
+
|
|
225
|
+
<!-- init-brain:END -->
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### `GEMINI.md` — if `gemini` selected
|
|
229
|
+
|
|
230
|
+
Mirror the same `init-brain` block with header `# Gemini CLI — Project Instructions`.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Step 4 — Verify
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Brain scaffold (always)
|
|
238
|
+
test -f brain/rules/standards.md && test -f brain/INDEX.md && echo "brain ok"
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
For each **selected** target, confirm `init-brain:START` exists in that file (e.g. `grep -l "init-brain:START" CLAUDE.md`).
|
|
242
|
+
|
|
243
|
+
Report to the user:
|
|
244
|
+
|
|
245
|
+
- Brain paths created vs updated
|
|
246
|
+
- **Which agent files were synced** (list only selected targets)
|
|
247
|
+
- Skipped targets (not chosen)
|
|
248
|
+
- Whether `brain/issues/` was left untouched or created empty
|
|
249
|
+
- Reminder: edit `brain/rules/standards.md`, re-run init-brain, and pick files to sync again
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Step 5 — Idempotency rules
|
|
254
|
+
|
|
255
|
+
- **Re-runnable:** Safe to run multiple times; only replace content between `init-brain:START` / `init-brain:END` in **selected** files.
|
|
256
|
+
- **Do not** create agent files the user did not select.
|
|
257
|
+
- **Do not** remove user sections outside markers in agent config files.
|
|
258
|
+
- **Do not** delete `brain/` or issue files under `brain/issues/`.
|
|
259
|
+
- If `brain/rules/standards.md` already exists and differs from the skill default, **keep the repo file** unless the user asks to reset standards; still re-sync only the selected agent files from disk.
|
|
260
|
+
- On re-run, **ask again** which files to sync unless the user specified targets in the request.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Step 6 — Changelog entry
|
|
265
|
+
|
|
266
|
+
Append to `brain/CHANGELOG.md`:
|
|
267
|
+
|
|
268
|
+
```markdown
|
|
269
|
+
## vYYYY.MM.DD-HHMM-init-brain
|
|
270
|
+
- Initialized or refreshed brain/ scaffold (INDEX, rules/standards.md).
|
|
271
|
+
- Synced standards to: <comma-separated list of selected files, or "none (brain only)">.
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Use local timestamp in the version id.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Canonical standards content
|
|
279
|
+
|
|
280
|
+
When creating **new** `brain/rules/standards.md` (file does not exist yet), write the following sections exactly. When the file already exists, skip this block and sync from disk.
|
|
281
|
+
|
|
282
|
+
### Model Preferences
|
|
283
|
+
|
|
284
|
+
- For "Diagnose & Fix" requests, use Sequential Thinking MCP for thorough analysis
|
|
285
|
+
- Prefer comprehensive analysis over quick fixes for complex issues
|
|
286
|
+
|
|
287
|
+
### Parallel Processing & Sub-Agents
|
|
288
|
+
|
|
289
|
+
- Use sub-agents and parallel processing whenever possible to split work and improve efficiency
|
|
290
|
+
- Break down complex tasks into independent subtasks that can be executed concurrently
|
|
291
|
+
- Leverage multiple tool calls simultaneously when tasks don't have dependencies
|
|
292
|
+
- Use parallel file operations (reading, writing, searching) to reduce overall execution time
|
|
293
|
+
- Deploy sub-agents for independent analysis, testing, and validation tasks
|
|
294
|
+
- Coordinate multiple agents for different aspects of the same project (frontend, backend, testing, documentation)
|
|
295
|
+
|
|
296
|
+
### Implementation Standards
|
|
297
|
+
|
|
298
|
+
- Always provide complete, production-ready implementations instead of mock data or placeholder code
|
|
299
|
+
- When implementing features, include proper error handling, validation, and edge cases
|
|
300
|
+
- Use real data structures and realistic examples rather than "TODO" comments or mock responses
|
|
301
|
+
- Implement full functionality with proper integration points, not just stubs
|
|
302
|
+
- Include comprehensive logging, monitoring, and debugging capabilities in implementations
|
|
303
|
+
|
|
304
|
+
### Bug Detection & Analysis
|
|
305
|
+
|
|
306
|
+
- Always perform comprehensive code analysis to identify potential bugs, security vulnerabilities, and performance issues
|
|
307
|
+
- Check for common programming pitfalls: null/undefined references, memory leaks, race conditions, and resource disposal
|
|
308
|
+
- Analyze error handling coverage and identify unhandled exception scenarios
|
|
309
|
+
- Review code for potential security issues: injection attacks, authentication bypasses, and data exposure
|
|
310
|
+
- Examine performance bottlenecks, inefficient algorithms, and resource usage patterns
|
|
311
|
+
- Validate input/output data flow and identify potential data corruption points
|
|
312
|
+
- Check for proper cleanup of resources (files, connections, memory) and disposal patterns
|
|
313
|
+
- Analyze concurrent code for thread safety and synchronization issues
|
|
314
|
+
|
|
315
|
+
### Project Structure
|
|
316
|
+
|
|
317
|
+
- New project files should reside in the root directory, not in a subfolder named 'app'
|
|
318
|
+
- All code edits must pull previous data to avoid data loss
|
|
319
|
+
- Create a `/temp` folder for temporary scripts, testing, downloads (ignored by git)
|
|
320
|
+
- Never delete the `/brain` folder - it contains the project knowledge base
|
|
321
|
+
- Keep `/brain` folder numbered and indexed with small, focused markdown files
|
|
322
|
+
- Update brain/ after every code change
|
|
323
|
+
|
|
324
|
+
### Development Workflow
|
|
325
|
+
|
|
326
|
+
- For tasks affecting multiple files, create a todo list before making changes
|
|
327
|
+
- When fixing specific sections/files, only make changes to that particular section
|
|
328
|
+
- Check with user before making additional changes beyond the requested scope
|
|
329
|
+
- Before running apps, check if already running and reuse the same instance
|
|
330
|
+
- If port conflicts, kill the existing process rather than using new ports
|
|
331
|
+
|
|
332
|
+
### Testing & Validation
|
|
333
|
+
|
|
334
|
+
- Use Playwright MCP screenshot utility to cross-check UI changes (for web applications)
|
|
335
|
+
- Test on Desktop, Tablet, and Mobile by default unless specified otherwise (for UI applications)
|
|
336
|
+
- Use headless browsers for testing unless specified otherwise (for web applications)
|
|
337
|
+
- Use Vision Enabled Models for compatibility with Playwright MCP Screenshot Tool
|
|
338
|
+
- For non-UI applications, focus on unit tests, integration tests, and API testing
|
|
339
|
+
|
|
340
|
+
### Package Management
|
|
341
|
+
|
|
342
|
+
- Always use pnpm over npm (for Node.js projects)
|
|
343
|
+
- For other package managers, use the appropriate tool (pip, cargo, go mod, etc.)
|
|
344
|
+
- For new frameworks/packages, get latest documentation using context 7 MCP
|
|
345
|
+
- Use curl with timeout to prevent hanging
|
|
346
|
+
|
|
347
|
+
### Data & Knowledge Management
|
|
348
|
+
|
|
349
|
+
- For "Update Brain" requests, update the knowledge base in `/brain` folder
|
|
350
|
+
- Write all planned fixes, bugs, and changelog entries to `CHANGELOG.md` in `/brain` folder
|
|
351
|
+
- Version every change in CHANGELOG.md to make them unique
|
|
352
|
+
- For web scraping tasks, use Bright Data MCP
|
|
353
|
+
|
|
354
|
+
### Documentation
|
|
355
|
+
|
|
356
|
+
- Update CHANGELOG.md in brain folder for all fixes, bugs, and changes
|
|
357
|
+
- Version each change uniquely
|
|
358
|
+
- Keep knowledge base in `/brain` folder numbered and indexed
|
|
359
|
+
|
|
360
|
+
### Performance Optimization
|
|
361
|
+
|
|
362
|
+
- Choose optimal algorithms and data structures for the specific use case
|
|
363
|
+
- Implement performance profiling and monitoring in applications
|
|
364
|
+
- Optimize database queries, API calls, and network operations
|
|
365
|
+
- Use efficient serialization/deserialization methods
|
|
366
|
+
- Implement proper indexing and search optimization
|
|
367
|
+
- Profile memory usage and optimize garbage collection patterns
|
|
368
|
+
- Use appropriate design patterns that improve both maintainability and performance
|
|
369
|
+
|
|
370
|
+
### Caching & Resource Management
|
|
371
|
+
|
|
372
|
+
- Implement smart caching strategies to avoid redundant operations and computations
|
|
373
|
+
- Use connection pooling and resource reuse patterns for databases and external services
|
|
374
|
+
- Implement lazy loading for non-critical resources and components
|
|
375
|
+
- Cache frequently accessed data, computation results, and configuration settings
|
|
376
|
+
- Optimize memory usage with proper cleanup, disposal patterns, and resource management
|
|
377
|
+
- Use appropriate caching layers (in-memory, disk, distributed) based on access patterns
|
|
378
|
+
- Implement cache invalidation strategies and TTL (Time To Live) policies
|
|
379
|
+
|
|
380
|
+
### Incremental Operations
|
|
381
|
+
|
|
382
|
+
- Only process changed files, components, and data instead of entire codebases
|
|
383
|
+
- Use diff-based updates instead of full rebuilds and redeployments
|
|
384
|
+
- Implement incremental compilation, building, and testing
|
|
385
|
+
- Track file modification times and dependencies to avoid unnecessary reprocessing
|
|
386
|
+
- Use smart dependency resolution to minimize rebuild and deployment scope
|
|
387
|
+
- Implement change detection mechanisms for efficient updates
|
|
388
|
+
- Use incremental backup and synchronization strategies
|
|
389
|
+
|
|
390
|
+
### Build & Development Optimization
|
|
391
|
+
|
|
392
|
+
- Enable hot reloading, fast refresh, and live updates where possible
|
|
393
|
+
- Use parallel compilation, building, and testing processes
|
|
394
|
+
- Implement smart dependency resolution and conflict resolution
|
|
395
|
+
- Optimize import statements, module loading, and namespace management
|
|
396
|
+
- Use incremental type checking, linting, and static analysis
|
|
397
|
+
- Implement build caching and artifact reuse
|
|
398
|
+
- Use appropriate build tools and optimizers for the target platform
|
|
399
|
+
|
|
400
|
+
### Error Recovery & Resilience
|
|
401
|
+
|
|
402
|
+
- Implement fast failure detection and recovery mechanisms
|
|
403
|
+
- Use graceful degradation patterns for non-critical functionality
|
|
404
|
+
- Implement circuit breakers for external services and dependencies
|
|
405
|
+
- Add comprehensive logging, monitoring, and alerting for performance tracking
|
|
406
|
+
- Use retry mechanisms with exponential backoff and jitter
|
|
407
|
+
- Implement health checks and self-healing capabilities
|
|
408
|
+
- Use appropriate error handling patterns for different failure scenarios
|
|
409
|
+
|
|
410
|
+
### Code Organization for Performance
|
|
411
|
+
|
|
412
|
+
- Implement modular architecture with clear separation of concerns
|
|
413
|
+
- Use dependency injection and inversion of control for better testability and performance
|
|
414
|
+
- Optimize component composition, reusability, and coupling
|
|
415
|
+
- Implement proper abstraction layers and interfaces
|
|
416
|
+
- Use design patterns that improve maintainability, scalability, and performance
|
|
417
|
+
- Organize code for optimal compilation and runtime performance
|
|
418
|
+
- Implement proper configuration management and environment-specific optimizations
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## Related skills
|
|
423
|
+
|
|
424
|
+
- `issues-setup` — bootstrap `brain/issues/` when issue tracking is needed
|
|
425
|
+
- `issues-check` / `issues-scan` — maintain issues after brain exists
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issues-check
|
|
3
|
+
preamble-tier: 2
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: |
|
|
6
|
+
Check open issues in brain/issues/ against the codebase. If an issue has been
|
|
7
|
+
fully resolved by recent work, move it to brain/issues/completed/ and update
|
|
8
|
+
INDEX.md. Use when asked to "check issues", "check if issues are done",
|
|
9
|
+
"sync issues", or "update issues index".
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- Grep
|
|
16
|
+
- Glob
|
|
17
|
+
- AskUserQuestion
|
|
18
|
+
triggers:
|
|
19
|
+
- check issues
|
|
20
|
+
- check if issues are done
|
|
21
|
+
- sync issues
|
|
22
|
+
- update issues index
|
|
23
|
+
- issues check
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Issues Check — Verify and Close Resolved Issues
|
|
27
|
+
|
|
28
|
+
## Purpose
|
|
29
|
+
|
|
30
|
+
Read all open issues in `brain/issues/`, check whether the described problem
|
|
31
|
+
has been resolved by recent code changes, and if so move the issue to
|
|
32
|
+
`brain/issues/completed/` and update `INDEX.md`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Step 1 — Find all open issues
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
ISSUES_DIR="$(git rev-parse --show-toplevel 2>/dev/null)/brain/issues"
|
|
40
|
+
echo "ISSUES_DIR=$ISSUES_DIR"
|
|
41
|
+
find "$ISSUES_DIR" -maxdepth 1 -name "*.md" -not -path "*/completed/*" -not -name "INDEX.md" | sort
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Parse each issue file to get its `id`, `title`, and `status`.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Step 2 — Check each issue against the codebase
|
|
49
|
+
|
|
50
|
+
For each open issue, search the codebase for evidence that the problem described
|
|
51
|
+
in the issue has been fixed. Use Grep to find relevant code patterns.
|
|
52
|
+
|
|
53
|
+
Key search targets per issue type:
|
|
54
|
+
|
|
55
|
+
| Issue type | What to search |
|
|
56
|
+
|------------|----------------|
|
|
57
|
+
| API routes | `apps/web/src/app/api/` for the route path |
|
|
58
|
+
| UI components | `apps/web/src/app/(app)/` for component paths |
|
|
59
|
+
| Worker package | `apps/worker/src/` for references to old model names |
|
|
60
|
+
| DSL/schema | `packages/dsl/src/` for vocabulary changes |
|
|
61
|
+
| Database | `packages/db/prisma/` for migration/model changes |
|
|
62
|
+
| Tests | `**/*.test.ts` for test coverage |
|
|
63
|
+
|
|
64
|
+
Evidence that an issue is resolved:
|
|
65
|
+
- The old/buggy code no longer exists (search returns nothing)
|
|
66
|
+
- The new/correct code exists and looks right
|
|
67
|
+
- Tests pass that previously failed or were missing
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Step 3 — Confirm before closing
|
|
72
|
+
|
|
73
|
+
For each issue that appears resolved, use AskUserQuestion:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
D<N> — Close issue #{id}?
|
|
77
|
+
Issue: {title}
|
|
78
|
+
Evidence: {what you found in the codebase}
|
|
79
|
+
ELI10: We think this bug is fixed. Confirm before archiving it so we don't
|
|
80
|
+
lose context if it isn't actually fixed.
|
|
81
|
+
Stakes if we pick wrong: A resolved-but-not-fix issue stays open — low cost.
|
|
82
|
+
A not-resolved issue that gets closed loses tracking — high cost.
|
|
83
|
+
Recommendation: A — close and archive if evidence is clear.
|
|
84
|
+
Note: options differ in kind, not coverage — no completeness score.
|
|
85
|
+
A) Close and archive (recommended)
|
|
86
|
+
B) Keep open — evidence is inconclusive
|
|
87
|
+
C) Skip — not enough context to decide
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Step 4 — Move the issue file
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ISSUES_DIR="$(git rev-parse --show-toplevel 2>/dev/null)/brain/issues"
|
|
96
|
+
COMPLETED_DIR="$ISSUES_DIR/completed"
|
|
97
|
+
mkdir -p "$COMPLETED_DIR"
|
|
98
|
+
# Move: mv "$ISSUES_DIR/{filename}" "$COMPLETED_DIR/{filename}"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Step 5 — Update INDEX.md
|
|
104
|
+
|
|
105
|
+
For each closed issue:
|
|
106
|
+
|
|
107
|
+
1. Remove it from the "Active Issues" table
|
|
108
|
+
2. Add it to the "Completed Issues" table with today's date
|
|
109
|
+
3. Update the counts
|
|
110
|
+
|
|
111
|
+
Read INDEX.md first, then edit to reflect the completed issue.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 6 — Report
|
|
116
|
+
|
|
117
|
+
Report:
|
|
118
|
+
- How many issues checked
|
|
119
|
+
- How many closed
|
|
120
|
+
- How many remain open
|
|
121
|
+
- Any issues where evidence was inconclusive (kept open)
|