thanh-kit 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/{commands → command-archive}/ask.md +5 -5
- package/templates/{commands → command-archive}/ck-help.md +18 -2
- package/templates/command-archive/docs/init.md +38 -0
- package/templates/command-archive/docs/summarize.md +22 -0
- package/templates/command-archive/docs/update.md +76 -0
- package/templates/command-archive/journal.md +18 -0
- package/templates/{commands → command-archive}/kanban.md +5 -7
- package/templates/{commands → command-archive}/plan/archive.md +2 -2
- package/templates/command-archive/plan/red-team.md +200 -0
- package/templates/command-archive/plan/validate.md +188 -0
- package/templates/command-archive/preview.md +283 -0
- package/templates/command-archive/review/codebase/parallel.md +122 -0
- package/templates/{commands → command-archive}/test/ui.md +3 -3
- package/templates/{commands → command-archive}/use-mcp.md +6 -2
- package/templates/command-archive/worktree.md +109 -0
- package/templates/{workflows → rules}/development-rules.md +12 -53
- package/templates/rules/orchestration-protocol.md +43 -0
- package/templates/{workflows → rules}/primary-workflow.md +16 -4
- package/templates/rules/team-coordination-rules.md +90 -0
- package/templates/schemas/ck-config.schema.json +381 -0
- package/templates/commands/README.md +0 -251
- package/templates/commands/bootstrap/auto/fast.md +0 -111
- package/templates/commands/bootstrap/auto/parallel.md +0 -66
- package/templates/commands/bootstrap/auto.md +0 -115
- package/templates/commands/bootstrap.md +0 -137
- package/templates/commands/brainstorm.md +0 -74
- package/templates/commands/build.md +0 -39
- package/templates/commands/checkpoint.md +0 -156
- package/templates/commands/code/auto.md +0 -170
- package/templates/commands/code/no-test.md +0 -158
- package/templates/commands/code/parallel.md +0 -55
- package/templates/commands/code-simplifier.md +0 -71
- package/templates/commands/code.md +0 -176
- package/templates/commands/compact.md +0 -57
- package/templates/commands/content/cro.md +0 -43
- package/templates/commands/content/enhance.md +0 -14
- package/templates/commands/content/fast.md +0 -13
- package/templates/commands/content/good.md +0 -16
- package/templates/commands/context.md +0 -48
- package/templates/commands/cook/auto/fast.md +0 -26
- package/templates/commands/cook/auto/parallel.md +0 -49
- package/templates/commands/cook/auto.md +0 -15
- package/templates/commands/cook/fast.md +0 -47
- package/templates/commands/cook/hard.md +0 -80
- package/templates/commands/cook/parallel.md +0 -90
- package/templates/commands/cook.md +0 -105
- package/templates/commands/create-feature.md +0 -48
- package/templates/commands/db-migrate.md +0 -52
- package/templates/commands/debug.md +0 -13
- package/templates/commands/design/3d.md +0 -83
- package/templates/commands/design/describe.md +0 -23
- package/templates/commands/design/fast.md +0 -31
- package/templates/commands/design/good.md +0 -35
- package/templates/commands/design/screenshot.md +0 -34
- package/templates/commands/design/video.md +0 -34
- package/templates/commands/docs/init.md +0 -39
- package/templates/commands/docs/summarize.md +0 -31
- package/templates/commands/docs/update.md +0 -57
- package/templates/commands/feature.md +0 -62
- package/templates/commands/fix/ci.md +0 -17
- package/templates/commands/fix/fast.md +0 -19
- package/templates/commands/fix/hard.md +0 -39
- package/templates/commands/fix/logs.md +0 -26
- package/templates/commands/fix/parallel.md +0 -54
- package/templates/commands/fix/test.md +0 -20
- package/templates/commands/fix/types.md +0 -9
- package/templates/commands/fix/ui.md +0 -48
- package/templates/commands/fix-issue.md +0 -177
- package/templates/commands/fix.md +0 -43
- package/templates/commands/generate-dto.md +0 -67
- package/templates/commands/git/cm.md +0 -5
- package/templates/commands/git/cp.md +0 -4
- package/templates/commands/git/merge.md +0 -40
- package/templates/commands/git/pr.md +0 -48
- package/templates/commands/integrate/polar.md +0 -28
- package/templates/commands/integrate/sepay.md +0 -28
- package/templates/commands/investigate.md +0 -324
- package/templates/commands/journal.md +0 -7
- package/templates/commands/lint.md +0 -47
- package/templates/commands/migration.md +0 -111
- package/templates/commands/performance.md +0 -110
- package/templates/commands/plan/ci.md +0 -33
- package/templates/commands/plan/cro.md +0 -69
- package/templates/commands/plan/fast.md +0 -86
- package/templates/commands/plan/hard.md +0 -103
- package/templates/commands/plan/parallel.md +0 -152
- package/templates/commands/plan/preview.md +0 -40
- package/templates/commands/plan/two.md +0 -52
- package/templates/commands/plan/validate.md +0 -132
- package/templates/commands/plan.md +0 -36
- package/templates/commands/pr.md +0 -49
- package/templates/commands/preview.md +0 -87
- package/templates/commands/release-notes.md +0 -144
- package/templates/commands/review/post-task.md +0 -157
- package/templates/commands/review-changes.md +0 -46
- package/templates/commands/review.md +0 -56
- package/templates/commands/scout/ext.md +0 -35
- package/templates/commands/scout.md +0 -283
- package/templates/commands/security.md +0 -119
- package/templates/commands/skill/add.md +0 -36
- package/templates/commands/skill/create.md +0 -29
- package/templates/commands/skill/fix-logs.md +0 -22
- package/templates/commands/skill/optimize/auto.md +0 -25
- package/templates/commands/skill/optimize.md +0 -34
- package/templates/commands/skill/plan.md +0 -45
- package/templates/commands/worktree.md +0 -126
- package/templates/memory/session-log.md +0 -186
- package/templates/router/README.md +0 -294
- package/templates/router/agents-guide.md +0 -38
- package/templates/router/commands-guide.md +0 -122
- package/templates/router/decision-flow.md +0 -92
- package/templates/router/skills-guide.md +0 -127
- package/templates/router/workflows-guide.md +0 -68
- package/templates/workflows/README.md +0 -241
- package/templates/workflows/orchestration-protocol.md +0 -16
- /package/templates/{commands → command-archive}/coding-level.md +0 -0
- /package/templates/{commands → command-archive}/review/codebase.md +0 -0
- /package/templates/{commands → command-archive}/test.md +0 -0
- /package/templates/{commands → command-archive}/watzup.md +0 -0
- /package/templates/{workflows → rules}/documentation-management.md +0 -0
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
# Investigate Feature: $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Investigate and explain how an existing feature or logic works using structured knowledge model construction.
|
|
4
|
-
|
|
5
|
-
**KEY PRINCIPLE**: This is a **READ-ONLY exploration** - no code changes. Focus on understanding and explaining.
|
|
6
|
-
|
|
7
|
-
## Variables
|
|
8
|
-
|
|
9
|
-
- **FEATURE**: $ARGUMENTS (the feature/logic to investigate)
|
|
10
|
-
- **ANALYSIS_FILE**: `ai_task_analysis_notes/$ARGUMENTS-investigation.ai_task_analysis_notes_temp.md`
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## INPUT: Scout Output Integration
|
|
15
|
-
|
|
16
|
-
**If preceded by `/scout`:**
|
|
17
|
-
|
|
18
|
-
1. **Use the numbered file list** from Scout results as your analysis targets
|
|
19
|
-
2. **Prioritize in this order:**
|
|
20
|
-
- HIGH PRIORITY files (Domain Entities, Commands, Queries, Event Handlers, Controllers, Jobs, Consumers)
|
|
21
|
-
- Suggested Starting Points (if provided)
|
|
22
|
-
- MEDIUM PRIORITY files (Services, Helpers, Components)
|
|
23
|
-
3. **Skip redundant discovery** - Scout already searched the codebase
|
|
24
|
-
4. **Reference files by Scout's numbers** in your analysis (e.g., "File #3 from Scout")
|
|
25
|
-
|
|
26
|
-
**Scout Output Format Reference:**
|
|
27
|
-
```markdown
|
|
28
|
-
### HIGH PRIORITY (Analyze First)
|
|
29
|
-
| # | File | Purpose |
|
|
30
|
-
|---|------|---------|
|
|
31
|
-
| 1 | `path/Entity.cs` | Core domain entity |
|
|
32
|
-
|
|
33
|
-
### Suggested Starting Points
|
|
34
|
-
1. **[Most relevant file]** - [Why]
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**If NO Scout output available:** Proceed with Phase 1A discovery as normal.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## PHASE 1A: INITIALIZATION AND DISCOVERY
|
|
42
|
-
|
|
43
|
-
### Step 1: Initialize Analysis File
|
|
44
|
-
|
|
45
|
-
Create the analysis file at `ai_task_analysis_notes/[feature-name]-investigation.ai_task_analysis_notes_temp.md` with these required sections:
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
## Metadata
|
|
49
|
-
|
|
50
|
-
```markdown
|
|
51
|
-
**Original Prompt:** [User's investigation question]
|
|
52
|
-
**Task Description:** [What we're investigating]
|
|
53
|
-
**Source Code Structure:** See ai-prompt-context.md
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Progress
|
|
57
|
-
|
|
58
|
-
- **Phase**: 1A
|
|
59
|
-
- **Items Processed**: 0
|
|
60
|
-
- **Total Items**: 0
|
|
61
|
-
- **Current Operation**: "initialization"
|
|
62
|
-
- **Current Focus**: "[feature summary]"
|
|
63
|
-
|
|
64
|
-
## Errors
|
|
65
|
-
|
|
66
|
-
[None yet]
|
|
67
|
-
|
|
68
|
-
## Assumption Validations
|
|
69
|
-
|
|
70
|
-
| Assumption | Status | Evidence |
|
|
71
|
-
|------------|--------|----------|
|
|
72
|
-
| ... | Pending/Validated/Invalid | ... |
|
|
73
|
-
|
|
74
|
-
## File List
|
|
75
|
-
|
|
76
|
-
[Numbered list of files to analyze]
|
|
77
|
-
|
|
78
|
-
## Knowledge Graph
|
|
79
|
-
|
|
80
|
-
[Detailed analysis of each file]
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Step 2: Semantic Discovery
|
|
84
|
-
|
|
85
|
-
Search for related code using multiple patterns:
|
|
86
|
-
|
|
87
|
-
**Primary Patterns:**
|
|
88
|
-
```
|
|
89
|
-
*Command*{Feature}* # CQRS Commands
|
|
90
|
-
*Query*{Feature}* # CQRS Queries
|
|
91
|
-
*{Feature}*EventHandler* # Entity Event Handlers
|
|
92
|
-
*{Feature}*Consumer* # Message Bus Consumers
|
|
93
|
-
*{Feature}*BackgroundJob* # Background Jobs
|
|
94
|
-
*{Feature}*Controller* # API Controllers
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**Secondary Patterns:**
|
|
98
|
-
```
|
|
99
|
-
.*EventHandler.*{Feature}|{Feature}.*EventHandler
|
|
100
|
-
.*BackgroundJob.*{Feature}|{Feature}.*BackgroundJob
|
|
101
|
-
.*Consumer.*{Feature}|{Feature}.*Consumer
|
|
102
|
-
.*Service.*{Feature}|{Feature}.*Service
|
|
103
|
-
.*Helper.*{Feature}|{Feature}.*Helper
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**File Types:** `**/*.{cs,ts,html}`
|
|
107
|
-
|
|
108
|
-
### Step 3: Prioritize Files
|
|
109
|
-
|
|
110
|
-
**HIGH PRIORITY (Must Analyze):**
|
|
111
|
-
1. Domain Entities (`Domain/Entities/`)
|
|
112
|
-
2. CQRS Commands (`UseCaseCommands/`)
|
|
113
|
-
3. CQRS Queries (`UseCaseQueries/`)
|
|
114
|
-
4. Entity Event Handlers (`UseCaseEvents/`)
|
|
115
|
-
5. Controllers (`Controllers/`)
|
|
116
|
-
6. Background Jobs (`*BackgroundJob*.cs`)
|
|
117
|
-
7. Message Bus Consumers (`*Consumer.cs`)
|
|
118
|
-
8. Frontend Components (`*.component.ts`)
|
|
119
|
-
|
|
120
|
-
**MEDIUM PRIORITY:**
|
|
121
|
-
- Services, Helpers, DTOs, Repositories
|
|
122
|
-
|
|
123
|
-
Save ALL file paths as numbered list under `## File List` in analysis file.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## PHASE 1B: KNOWLEDGE GRAPH CONSTRUCTION
|
|
128
|
-
|
|
129
|
-
### Step 1: Batch Processing Setup
|
|
130
|
-
|
|
131
|
-
Count total files, split into batches of 10. Use TodoWrite to create tasks:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
- [ ] Analyze batch 1 (files 1-10)
|
|
135
|
-
- [ ] Analyze batch 2 (files 11-20)
|
|
136
|
-
...
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Step 2: File Analysis Schema
|
|
140
|
-
|
|
141
|
-
For each file, add to `## Knowledge Graph` with this structure:
|
|
142
|
-
|
|
143
|
-
```markdown
|
|
144
|
-
### [#] [FileName]
|
|
145
|
-
|
|
146
|
-
- **filePath**: Full path to file
|
|
147
|
-
- **type**: Entity | Command | Query | EventHandler | Consumer | Controller | Job | Component | Service
|
|
148
|
-
- **architecturalPattern**: CQRS | Repository | EventSourcing | MessageBus | etc.
|
|
149
|
-
- **content**: Summary of purpose and logic
|
|
150
|
-
- **symbols**: Key classes, interfaces, methods
|
|
151
|
-
- **dependencies**: Imported modules / using statements
|
|
152
|
-
- **businessContext**: How it contributes to business requirements
|
|
153
|
-
- **referenceFiles**: Other files using this file's symbols
|
|
154
|
-
- **relevanceScore**: 1-10 (10 = most relevant)
|
|
155
|
-
- **evidenceLevel**: verified | inferred
|
|
156
|
-
- **uncertainties**: Aspects you're unsure about
|
|
157
|
-
- **platformAbstractions**: Base classes used (PlatformCqrsCommand, PlatformEntity, etc.)
|
|
158
|
-
- **serviceContext**: Which microservice owns this
|
|
159
|
-
- **dependencyInjection**: DI registrations
|
|
160
|
-
- **genericTypeParameters**: Generic type relationships
|
|
161
|
-
|
|
162
|
-
#### Targeted Analysis
|
|
163
|
-
|
|
164
|
-
**For Backend:**
|
|
165
|
-
- authorizationPolicies, commands, queries, domainEntities
|
|
166
|
-
- repositoryPatterns, businessRuleImplementations
|
|
167
|
-
|
|
168
|
-
**For Consumers:**
|
|
169
|
-
- messageBusMessage: The `*BusMessage` type consumed
|
|
170
|
-
- messageBusProducers: Files that SEND this message (grep across ALL services)
|
|
171
|
-
- crossServiceIntegration: How services communicate
|
|
172
|
-
|
|
173
|
-
**For Frontend:**
|
|
174
|
-
- componentHierarchy, routeConfig, stateManagementStores
|
|
175
|
-
- dataBindingPatterns, validationStrategies
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Step 3: Cross-Service Analysis (CRITICAL for Consumers)
|
|
179
|
-
|
|
180
|
-
When analyzing `*Consumer.cs` files extending `PlatformApplicationMessageBusConsumer<T>`:
|
|
181
|
-
|
|
182
|
-
1. Identify the `*BusMessage` type
|
|
183
|
-
2. Grep search ALL services for files that **publish** this message
|
|
184
|
-
3. Document producer files and their service locations
|
|
185
|
-
4. Map the cross-service data flow
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## PHASE 2: CODE FLOW TRACING
|
|
190
|
-
|
|
191
|
-
### Step 1: Entry Points
|
|
192
|
-
|
|
193
|
-
Identify how the feature is triggered:
|
|
194
|
-
- API Endpoint → Controller → Command/Query Handler
|
|
195
|
-
- UI Action → Component → API Service → Backend
|
|
196
|
-
- Scheduled Job → BackgroundJob → Handler
|
|
197
|
-
- Message → Consumer → Handler
|
|
198
|
-
|
|
199
|
-
### Step 2: Trace Execution Path
|
|
200
|
-
|
|
201
|
-
Document in analysis file:
|
|
202
|
-
|
|
203
|
-
```markdown
|
|
204
|
-
## Data Flow
|
|
205
|
-
|
|
206
|
-
[Request] → [Controller] → [Handler] → [Repository] → [Response]
|
|
207
|
-
↓
|
|
208
|
-
[Event Handler] → [Side Effects]
|
|
209
|
-
↓
|
|
210
|
-
[Message Bus] → [Consumer in Other Service]
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Step 3: Side Effects Mapping
|
|
214
|
-
|
|
215
|
-
- Entity events raised
|
|
216
|
-
- Messages published to bus
|
|
217
|
-
- External service calls
|
|
218
|
-
- Database operations
|
|
219
|
-
- Notifications triggered
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## PHASE 3: PRESENT FINDINGS
|
|
224
|
-
|
|
225
|
-
### Output Format
|
|
226
|
-
|
|
227
|
-
```markdown
|
|
228
|
-
## Executive Summary
|
|
229
|
-
|
|
230
|
-
[1-2 paragraph direct answer to the investigation question]
|
|
231
|
-
|
|
232
|
-
## How It Works
|
|
233
|
-
|
|
234
|
-
### 1. [Entry Point]
|
|
235
|
-
[Explanation with `file:line` reference]
|
|
236
|
-
|
|
237
|
-
### 2. [Core Processing]
|
|
238
|
-
[Explanation with `file:line` reference]
|
|
239
|
-
|
|
240
|
-
### 3. [Side Effects]
|
|
241
|
-
[Explanation with `file:line` reference]
|
|
242
|
-
|
|
243
|
-
## Key Files
|
|
244
|
-
|
|
245
|
-
| File | Type | Purpose | Relevance |
|
|
246
|
-
|------|------|---------|-----------|
|
|
247
|
-
| `path/file.cs:123` | Command | [Purpose] | 10/10 |
|
|
248
|
-
|
|
249
|
-
## Data Flow Diagram
|
|
250
|
-
|
|
251
|
-
```
|
|
252
|
-
[Visual text diagram of the flow]
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
## Platform Patterns Used
|
|
256
|
-
|
|
257
|
-
- **Pattern**: How it's applied
|
|
258
|
-
- **Pattern**: How it's applied
|
|
259
|
-
|
|
260
|
-
## Cross-Service Integration
|
|
261
|
-
|
|
262
|
-
| Source Service | Message | Target Service | Consumer |
|
|
263
|
-
|----------------|---------|----------------|----------|
|
|
264
|
-
| ... | ... | ... | ... |
|
|
265
|
-
|
|
266
|
-
## Unresolved Questions
|
|
267
|
-
|
|
268
|
-
- [Question 1]
|
|
269
|
-
- [Question 2]
|
|
270
|
-
|
|
271
|
-
## Want to Know More?
|
|
272
|
-
|
|
273
|
-
- [Related topic 1]
|
|
274
|
-
- [Related topic 2]
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## Anti-Hallucination Protocol
|
|
280
|
-
|
|
281
|
-
Before ANY claim, verify:
|
|
282
|
-
|
|
283
|
-
1. "What assumptions am I making?"
|
|
284
|
-
2. "Have I verified with actual code evidence?"
|
|
285
|
-
3. "Could I be wrong about how this works?"
|
|
286
|
-
|
|
287
|
-
### Verification Checklist
|
|
288
|
-
|
|
289
|
-
- [ ] Found actual code evidence for each claim?
|
|
290
|
-
- [ ] Traced the full code path?
|
|
291
|
-
- [ ] Checked cross-service message flows?
|
|
292
|
-
- [ ] Documented ALL findings with `file:line`?
|
|
293
|
-
- [ ] Answered the original question?
|
|
294
|
-
- [ ] Listed unresolved questions?
|
|
295
|
-
|
|
296
|
-
**If ANY unchecked → DO MORE INVESTIGATION**
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Progress Tracking
|
|
301
|
-
|
|
302
|
-
Update `## Progress` section after each batch:
|
|
303
|
-
|
|
304
|
-
```markdown
|
|
305
|
-
- **Phase**: 1B
|
|
306
|
-
- **Items Processed**: 20
|
|
307
|
-
- **Total Items**: 35
|
|
308
|
-
- **Current Operation**: "analyzing batch 3"
|
|
309
|
-
- **Current Focus**: "Event Handlers"
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## Quick Reference
|
|
315
|
-
|
|
316
|
-
| Looking for... | Search in... |
|
|
317
|
-
|----------------|--------------|
|
|
318
|
-
| Entity CRUD | `UseCaseCommands/`, `UseCaseQueries/` |
|
|
319
|
-
| Business logic | `Domain/Entities/`, `*Service.cs` |
|
|
320
|
-
| Side effects | `UseCaseEvents/`, `*EventHandler.cs` |
|
|
321
|
-
| Cross-service | `*Consumer.cs`, `*BusMessage.cs` |
|
|
322
|
-
| API endpoints | `Controllers/`, `*Controller.cs` |
|
|
323
|
-
| Frontend | `libs/apps-domains/`, `*.component.ts` |
|
|
324
|
-
| Background processing | `*BackgroundJob*.cs`, `*Job.cs` |
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: ⚡ Write some journal entries.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Use the `journal-writer` subagent to explore the memories and recent code changes, and write some journal entries.
|
|
6
|
-
Journal entries should be concise and focused on the most important events, key changes, impacts, and decisions.
|
|
7
|
-
Keep journal entries in the `./docs/journals/` directory.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run linters and fix issues for backend or frontend
|
|
3
|
-
allowed-tools: Bash, Read, Edit, Glob, TodoWrite
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Run linting: $ARGUMENTS
|
|
7
|
-
|
|
8
|
-
## Instructions
|
|
9
|
-
|
|
10
|
-
1. **Parse arguments**:
|
|
11
|
-
- `backend` or `be` → Run .NET analyzers
|
|
12
|
-
- `frontend` or `fe` → Run ESLint/Prettier
|
|
13
|
-
- `fix` → Auto-fix issues where possible
|
|
14
|
-
- No argument → Run both, report only
|
|
15
|
-
|
|
16
|
-
2. **For Backend (.NET)**:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
dotnet build EasyPlatform.sln /p:TreatWarningsAsErrors=false
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
- Check for analyzer warnings (CA*, IDE*, etc.)
|
|
23
|
-
- Report code style violations
|
|
24
|
-
|
|
25
|
-
3. **For Frontend (Angular/Nx)**:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
cd src/PlatformExampleAppWeb
|
|
29
|
-
nx lint playground-text-snippet
|
|
30
|
-
nx lint platform-core
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
With auto-fix:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
nx lint playground-text-snippet --fix
|
|
37
|
-
npx prettier --write "apps/**/*.{ts,html,scss}" "libs/**/*.{ts,html,scss}"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
4. **Report format**:
|
|
41
|
-
- Group issues by severity (error, warning, info)
|
|
42
|
-
- Show file paths and line numbers
|
|
43
|
-
- Suggest fixes for common issues
|
|
44
|
-
|
|
45
|
-
5. **Auto-fix behavior**:
|
|
46
|
-
- If `fix` argument provided, apply safe auto-fixes
|
|
47
|
-
- Report what was fixed vs what needs manual attention
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Create Migration: $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Create a data or schema migration following EasyPlatform patterns.
|
|
4
|
-
|
|
5
|
-
## Phase 1: Analyze Requirements
|
|
6
|
-
|
|
7
|
-
1. **Parse migration description** from: $ARGUMENTS
|
|
8
|
-
2. **Identify migration type:**
|
|
9
|
-
- Schema migration (EF Core) - for SQL Server/PostgreSQL table changes
|
|
10
|
-
- Data migration (PlatformDataMigrationExecutor) - for data transformations
|
|
11
|
-
- MongoDB migration (PlatformMongoMigrationExecutor) - for MongoDB changes
|
|
12
|
-
|
|
13
|
-
3. **Search for existing patterns:**
|
|
14
|
-
- `src/PlatformExampleApp/*/Persistence/Migrations/` for schema migrations
|
|
15
|
-
- Search for `PlatformDataMigrationExecutor` implementations
|
|
16
|
-
|
|
17
|
-
## Phase 2: Design Migration
|
|
18
|
-
|
|
19
|
-
1. **Determine affected entities and tables**
|
|
20
|
-
2. **Plan rollback strategy if applicable**
|
|
21
|
-
3. **Consider data volume and performance:**
|
|
22
|
-
- Use paging for large datasets (PageSize: 200-500)
|
|
23
|
-
- Set `dismissSendEvent: true` if entity events not needed
|
|
24
|
-
- Use `checkDiff: false` for bulk updates
|
|
25
|
-
|
|
26
|
-
## Phase 3: Generate Migration
|
|
27
|
-
|
|
28
|
-
Follow naming convention: `YYYYMMDDHHMMSS_MigrationName`
|
|
29
|
-
|
|
30
|
-
**For EF Core Schema Migration:**
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
dotnet ef migrations add MigrationName --project src/PlatformExampleApp/{Service}/{Service}.Persistence
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**For Data Migration (SQL Server/PostgreSQL):**
|
|
37
|
-
|
|
38
|
-
```csharp
|
|
39
|
-
public class YYYYMMDDHHMMSS_MigrationName : PlatformDataMigrationExecutor<{Service}DbContext>
|
|
40
|
-
{
|
|
41
|
-
public override string Name => "YYYYMMDDHHMMSS_MigrationName";
|
|
42
|
-
public override DateTime? OnlyForDbsCreatedBeforeDate => new(YYYY, MM, DD);
|
|
43
|
-
public override bool AllowRunInBackgroundThread => true;
|
|
44
|
-
|
|
45
|
-
public override async Task Execute({Service}DbContext dbContext)
|
|
46
|
-
{
|
|
47
|
-
var queryBuilder = repository.GetQueryBuilder(q => q.Where(FilterExpr()));
|
|
48
|
-
await RootServiceProvider.ExecuteInjectScopedPagingAsync(
|
|
49
|
-
maxItemCount: await repository.CountAsync(q => queryBuilder(q)),
|
|
50
|
-
pageSize: 200,
|
|
51
|
-
ExecutePaging,
|
|
52
|
-
queryBuilder);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
private static async Task<List<Entity>> ExecutePaging(
|
|
56
|
-
int skip, int take,
|
|
57
|
-
Func<IQueryable<Entity>, IQueryable<Entity>> qb,
|
|
58
|
-
IRepo<Entity> repo,
|
|
59
|
-
IPlatformUnitOfWorkManager uow)
|
|
60
|
-
{
|
|
61
|
-
using var unitOfWork = uow.Begin();
|
|
62
|
-
var items = await repo.GetAllAsync(q => qb(q).OrderBy(e => e.Id).Skip(skip).Take(take));
|
|
63
|
-
// Apply transformations
|
|
64
|
-
await repo.UpdateManyAsync(items, dismissSendEvent: true, checkDiff: false);
|
|
65
|
-
await unitOfWork.CompleteAsync();
|
|
66
|
-
return items;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**For MongoDB Migration:**
|
|
72
|
-
|
|
73
|
-
```csharp
|
|
74
|
-
internal sealed class YYYYMMDDHHMMSS_MigrationName : PlatformMongoMigrationExecutor<{Service}DbContext>
|
|
75
|
-
{
|
|
76
|
-
public override string Name => "YYYYMMDDHHMMSS_MigrationName";
|
|
77
|
-
public override DateTime? OnlyForDbInitBeforeDate => new(YYYY, MM, DD);
|
|
78
|
-
public override DateTime? ExpirationDate => new(YYYY, MM, DD); // Optional: auto-delete after date
|
|
79
|
-
|
|
80
|
-
public override async Task Execute({Service}DbContext dbContext)
|
|
81
|
-
{
|
|
82
|
-
// Ensure indexes
|
|
83
|
-
await dbContext.EnsureInboxBusMessageCollectionIndexesAsync(true);
|
|
84
|
-
await dbContext.EnsureOutboxBusMessageCollectionIndexesAsync(true);
|
|
85
|
-
|
|
86
|
-
// Or custom index/data operations
|
|
87
|
-
var collection = dbContext.GetCollection<Entity>();
|
|
88
|
-
await collection.Indexes.CreateOneAsync(
|
|
89
|
-
new CreateIndexModel<Entity>(
|
|
90
|
-
Builders<Entity>.IndexKeys.Ascending(e => e.Field),
|
|
91
|
-
new CreateIndexOptions { Unique = true }));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Phase 4: Verify
|
|
97
|
-
|
|
98
|
-
- [ ] Migration is idempotent (safe to run multiple times)
|
|
99
|
-
- [ ] Large datasets use paging
|
|
100
|
-
- [ ] Proper error handling
|
|
101
|
-
- [ ] Unit of work for transactions
|
|
102
|
-
- [ ] `OnlyForDbsCreatedBeforeDate` set correctly
|
|
103
|
-
- [ ] Tested with sample data
|
|
104
|
-
|
|
105
|
-
## Phase 5: Wait for Approval
|
|
106
|
-
|
|
107
|
-
**CRITICAL:** Present your migration design and wait for explicit user approval before creating files.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
Use `backend-data-migration` skill for detailed guidance.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Analyze Performance: $ARGUMENTS
|
|
2
|
-
|
|
3
|
-
Analyze and optimize performance for: $ARGUMENTS
|
|
4
|
-
|
|
5
|
-
## Phase 1: Identify Bottleneck Type
|
|
6
|
-
|
|
7
|
-
1. **Database queries:**
|
|
8
|
-
- N+1 query problems
|
|
9
|
-
- Missing indexes
|
|
10
|
-
- Inefficient projections
|
|
11
|
-
- Full table scans
|
|
12
|
-
|
|
13
|
-
2. **API endpoint latency:**
|
|
14
|
-
- Serialization overhead
|
|
15
|
-
- Unnecessary data loading
|
|
16
|
-
- Missing caching
|
|
17
|
-
- Sequential operations that could be parallel
|
|
18
|
-
|
|
19
|
-
3. **Frontend rendering:**
|
|
20
|
-
- Excessive change detection
|
|
21
|
-
- Large component trees
|
|
22
|
-
- Missing OnPush strategy
|
|
23
|
-
- Unnecessary re-renders
|
|
24
|
-
|
|
25
|
-
4. **Memory issues:**
|
|
26
|
-
- Subscription leaks
|
|
27
|
-
- Large object retention
|
|
28
|
-
- Missing cleanup in ngOnDestroy
|
|
29
|
-
|
|
30
|
-
## Phase 2: Investigation
|
|
31
|
-
|
|
32
|
-
### Backend Analysis
|
|
33
|
-
|
|
34
|
-
1. **Check repository patterns:**
|
|
35
|
-
|
|
36
|
-
```csharp
|
|
37
|
-
// ✅ Eager load related entities
|
|
38
|
-
await repository.GetAllAsync(expr, ct, e => e.RelatedEntity, e => e.AnotherRelated)
|
|
39
|
-
|
|
40
|
-
// ❌ N+1 problem - separate query per item
|
|
41
|
-
foreach (item in items) { await repo.GetById(item.RelatedId) }
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
2. **Review query builders:**
|
|
45
|
-
|
|
46
|
-
```csharp
|
|
47
|
-
// ✅ Use projections to reduce data transfer
|
|
48
|
-
.Select(e => new { e.Id, e.Name, e.Status })
|
|
49
|
-
|
|
50
|
-
// ❌ Loading full entities when only IDs needed
|
|
51
|
-
.Select(e => e).ToList().Select(e => e.Id)
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
3. **Check for parallel operations:**
|
|
55
|
-
|
|
56
|
-
```csharp
|
|
57
|
-
// ✅ Parallel tuple queries
|
|
58
|
-
var (total, items, counts) = await (
|
|
59
|
-
repository.CountAsync(queryBuilder, ct),
|
|
60
|
-
repository.GetAllAsync(queryBuilder.PageBy(skip, take), ct),
|
|
61
|
-
repository.GetGroupedCountsAsync(queryBuilder, ct)
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
// ❌ Sequential when independent
|
|
65
|
-
var total = await repository.CountAsync(queryBuilder, ct);
|
|
66
|
-
var items = await repository.GetAllAsync(queryBuilder.PageBy(skip, take), ct);
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
4. **Review full-text search usage:**
|
|
70
|
-
```csharp
|
|
71
|
-
// ✅ Use IPlatformFullTextSearchPersistenceService
|
|
72
|
-
.PipeIf(searchText.IsNotNullOrEmpty(), q =>
|
|
73
|
-
searchService.Search(q, searchText, Entity.SearchColumns()))
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Frontend Analysis
|
|
77
|
-
|
|
78
|
-
1. **Check signal usage and change detection**
|
|
79
|
-
2. **Review store patterns for unnecessary emissions**
|
|
80
|
-
3. **Verify `untilDestroyed()` on all subscriptions**
|
|
81
|
-
4. **Check for `trackBy` in `@for` loops**
|
|
82
|
-
5. **Review `observerLoadingErrorState` usage**
|
|
83
|
-
|
|
84
|
-
## Phase 3: Profiling Commands
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Backend - Check EF Core query logging
|
|
88
|
-
# Enable in appsettings.Development.json:
|
|
89
|
-
# "Logging": { "LogLevel": { "Microsoft.EntityFrameworkCore.Database.Command": "Information" } }
|
|
90
|
-
|
|
91
|
-
# Frontend - Angular DevTools profiler
|
|
92
|
-
# Use Angular DevTools Chrome extension
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Phase 4: Optimization Plan
|
|
96
|
-
|
|
97
|
-
Present findings with:
|
|
98
|
-
|
|
99
|
-
- Current performance metrics (if measurable)
|
|
100
|
-
- Root cause identification with file:line references
|
|
101
|
-
- Targeted fix recommendations
|
|
102
|
-
- Expected improvement rationale
|
|
103
|
-
|
|
104
|
-
## Phase 5: Wait for Approval
|
|
105
|
-
|
|
106
|
-
**CRITICAL:** Present your findings and optimization plan. Wait for explicit user approval before making changes.
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
Use `arch-performance-optimization` skill for detailed guidance.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Analyze Github Actions logs and provide a plan to fix the issues
|
|
3
|
-
argument-hint: [github-actions-url]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Activate `planning` skill.
|
|
7
|
-
|
|
8
|
-
## Github Actions URL
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Use the `planner` subagent to read the github actions logs, analyze and find the root causes of the issues, then provide a detailed plan for implementing the fixes.
|
|
12
|
-
|
|
13
|
-
**Plan File Specification:**
|
|
14
|
-
- Every `plan.md` MUST start with YAML frontmatter:
|
|
15
|
-
```yaml
|
|
16
|
-
---
|
|
17
|
-
title: "{Brief title}"
|
|
18
|
-
description: "{One sentence for card preview}"
|
|
19
|
-
status: pending
|
|
20
|
-
priority: P1
|
|
21
|
-
effort: {estimated fix time}
|
|
22
|
-
branch: {current git branch}
|
|
23
|
-
tags: [ci, bugfix]
|
|
24
|
-
created: {YYYY-MM-DD}
|
|
25
|
-
---
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Output:**
|
|
29
|
-
Provide at least 2 implementation approaches with clear trade-offs, and explain the pros and cons of each approach, and provide a recommended approach.
|
|
30
|
-
|
|
31
|
-
**IMPORTANT:** Ask the user for confirmation before implementing.
|
|
32
|
-
**IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
|
|
33
|
-
**IMPORTANT:** Sacrifice grammar for the sake of concision when writing outputs.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create a CRO plan for the given content
|
|
3
|
-
argument-hint: [issues]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an expert in conversion optimization. Analyze the content based on the given issues:
|
|
7
|
-
<issues>$ARGUMENTS</issues>
|
|
8
|
-
|
|
9
|
-
Activate `planning` skill.
|
|
10
|
-
|
|
11
|
-
**IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
|
|
12
|
-
**IMPORTANT:** Sacrifice grammar for the sake of concision when writing outputs.
|
|
13
|
-
|
|
14
|
-
## Conversion Optimization Framework
|
|
15
|
-
|
|
16
|
-
1. Headline 4-U Formula: **Useful, Unique, Urgent, Ultra-specific** (80% won't read past this)
|
|
17
|
-
2. Above-Fold Value Proposition: Customer problem focus, no company story, zero scroll required
|
|
18
|
-
3. CTA First-Person Psychology: "Get MY Guide" vs "Get YOUR Guide" (90% more clicks)
|
|
19
|
-
4. 5-Field Form Maximum: Every field kills conversions, progressive profiling for the rest
|
|
20
|
-
5. Message Match Precision: Ad copy, landing page headline, broken promises = bounce
|
|
21
|
-
6. Social Proof Near CTAs: Testimonials with faces/names, results, placed at decision points
|
|
22
|
-
7. Cognitive Bias Stack: Loss aversion (fear), social proof (FOMO), anchoring (pricing)
|
|
23
|
-
8. PAS Copy Framework: Problem > Agitate > Solve, emotion before logic
|
|
24
|
-
9. Genuine Urgency Only: Real deadlines, actual limits, fake timers destroy trust forever
|
|
25
|
-
10. Price Anchoring Display: Show expensive option first, make real price feel like relief
|
|
26
|
-
11. Trust Signal Clustering: Security badges, guarantees, policies all visible together
|
|
27
|
-
12. Visual Hierarchy F-Pattern: Eyes scan F-shape, put conversions in the path
|
|
28
|
-
13. Lead Magnet Hierarchy: Templates > Checklists > Guides (instant > delayed gratification)
|
|
29
|
-
14. Objection Preemption: Address top 3 concerns before they think them, FAQ near CTA
|
|
30
|
-
15. Mobile Thumb Zone: CTAs where thumbs naturally rest, not stretching required
|
|
31
|
-
16. One-Variable Testing: Change one thing, measure impact, compound wins over time
|
|
32
|
-
17. Post-Conversion Momentum: Thank you page sells next step while excitement peaks
|
|
33
|
-
18. Cart Recovery Sequence: Email in 1 hour, retarget in 4 hours, incentive at 24 hours
|
|
34
|
-
19. Reading Level Grade 6: Smart people prefer simple, 11-word sentences, short paragraphs
|
|
35
|
-
20. TOFU/MOFU/BOFU Logic: Awareness content ≠ decision content, match intent precisely
|
|
36
|
-
21. White Space = Focus: Empty space makes CTAs impossible to miss, crowded = confused
|
|
37
|
-
22. Benefit-First Language: Features tell, benefits sell, transformations compel
|
|
38
|
-
23. Micro-Commitment Ladder: Small yes leads to big yes, start with email only
|
|
39
|
-
24. Performance Tracking Stack: Heatmaps show problems, recordings show why, events show what
|
|
40
|
-
25. Weekly Optimization Ritual: Review metrics Monday, test Tuesday, iterate or scale
|
|
41
|
-
|
|
42
|
-
## Workflow
|
|
43
|
-
|
|
44
|
-
- If the user provides a screenshots or videos, use `ai-multimodal` skill to describe as detailed as possible the issue, make sure copywriter can fully understand the issue easily based on the description.
|
|
45
|
-
- If the user provides a URL, use `web_fetch` tool to fetch the content of the URL and analyze the current issues.
|
|
46
|
-
- You can use screenshot capture tools along with `ai-multimodal` skill to capture screenshots of the exact parent container and analyze the current issues with the appropriate Gemini analysis skills (`ai-multimodal`, `gemini-video-understanding`, or `gemini-document-processing`).
|
|
47
|
-
- Use `/scout:ext` (preferred) or `/scout` (fallback) slash command to search the codebase for files needed to complete the task
|
|
48
|
-
- Use `planner` agent to create a comprehensive CRO plan following the progressive disclosure structure:
|
|
49
|
-
- Create a directory using naming pattern from `## Naming` section.
|
|
50
|
-
- Every `plan.md` MUST start with YAML frontmatter:
|
|
51
|
-
```yaml
|
|
52
|
-
---
|
|
53
|
-
title: "{Brief title}"
|
|
54
|
-
description: "{One sentence for card preview}"
|
|
55
|
-
status: pending
|
|
56
|
-
priority: P2
|
|
57
|
-
effort: {sum of phases, e.g., 4h}
|
|
58
|
-
branch: {current git branch}
|
|
59
|
-
tags: [cro, conversion]
|
|
60
|
-
created: {YYYY-MM-DD}
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
- Save the overview access point at `plan.md`, keep it generic, under 80 lines, and list each phase with status/progress and links.
|
|
64
|
-
- For each phase, add `phase-XX-phase-name.md` files containing sections (Context links, Overview with date/priority/statuses, Key Insights, Requirements, Architecture, Related code files, Implementation Steps, Todo list, Success Criteria, Risk Assessment, Security Considerations, Next steps).
|
|
65
|
-
- Keep every research markdown report concise (≤150 lines) while covering all requested topics and citations.
|
|
66
|
-
- Do not start implementing the CRO plan yet, wait for the user to approve the plan first.
|
|
67
|
-
|
|
68
|
-
**IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
|
|
69
|
-
**IMPORTANT:** In reports, list any unresolved questions at the end, if any.
|