codymaster 4.5.4 → 4.8.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/CHANGELOG.md +46 -1
- package/README.md +86 -31
- package/dist/backends/viking-backend.js +235 -0
- package/dist/backends/viking-http-client.js +176 -0
- package/dist/browse-server.js +251 -0
- package/dist/cli/command-registry.js +26 -0
- package/dist/cli/commands/agent.js +120 -0
- package/dist/cli/commands/dashboard.js +93 -0
- package/dist/cli/commands/design-studio.js +111 -0
- package/dist/cli/commands/distro.js +25 -0
- package/dist/cli/commands/engineering.js +488 -0
- package/dist/cli/commands/project.js +324 -0
- package/dist/cli/commands/skill-chain.js +269 -0
- package/dist/cli/commands/system.js +89 -0
- package/dist/cli/commands/task.js +254 -0
- package/dist/cli/update-check.js +83 -0
- package/dist/cm-config.js +110 -0
- package/dist/cm-suggest.js +77 -0
- package/dist/continuity.js +8 -0
- package/dist/distro-validate.js +54 -0
- package/dist/guardian-core.js +74 -0
- package/dist/index.js +36 -2759
- package/dist/mcp-context-server.js +60 -1
- package/dist/mcp-skills-tools.js +81 -0
- package/dist/retro-summary.js +70 -0
- package/dist/second-opinion-providers.js +79 -0
- package/dist/sprint-pipeline.js +228 -0
- package/dist/storage-backend.js +63 -0
- package/dist/utils/cli-utils.js +76 -0
- package/dist/utils/skill-utils.js +32 -0
- package/install.sh +286 -58
- package/package.json +16 -5
- package/scripts/build-skills.mjs +51 -0
- package/scripts/gate-0-repo-hygiene.js +75 -0
- package/scripts/postinstall.js +56 -1
- package/scripts/security-scan.js +1 -1
- package/scripts/validate-skills.mjs +42 -0
- package/scripts/viking-demo.ts +105 -0
- package/skills/CLAUDE.md +2 -2
- package/skills/_shared/helpers.md +10 -0
- package/skills/cm-ads-tracker/SKILL.md +3 -6
- package/skills/cm-browse/SKILL.md +28 -0
- package/skills/cm-conductor-worktrees/SKILL.md +24 -0
- package/skills/cm-content-factory/SKILL.md +1 -1
- package/skills/cm-content-factory/landing/docs/content/changelog.md +36 -0
- package/skills/cm-content-factory/landing/docs/content/deployment.md +46 -0
- package/skills/cm-content-factory/landing/docs/content/execution-flow.md +67 -0
- package/skills/cm-content-factory/landing/docs/content/openspace.md +27 -0
- package/skills/cm-content-factory/landing/docs/content/openviking.md +33 -0
- package/skills/cm-content-factory/landing/docs/content/use-cases.md +26 -0
- package/skills/cm-content-factory/landing/docs/content/v5-intro.md +28 -0
- package/skills/cm-content-factory/landing/docs/index.html +240 -0
- package/skills/cm-content-factory/landing/index.html +99 -99
- package/skills/cm-content-factory/landing/script.js +42 -0
- package/skills/cm-content-factory/landing/translations.js +400 -400
- package/skills/cm-continuity/SKILL.md +33 -6
- package/skills/cm-design-studio/SKILL.md +30 -0
- package/skills/cm-ecosystem-roadmap/SKILL.md +11 -0
- package/skills/cm-engineering-meta/SKILL.md +69 -0
- package/skills/cm-growth-hacking/SKILL.md +1 -12
- package/skills/cm-guardian-runtime/SKILL.md +22 -0
- package/skills/cm-mcp-engineering/SKILL.md +18 -0
- package/skills/cm-notebooklm/SKILL.md +1 -17
- package/skills/cm-post-deploy-canary/SKILL.md +18 -0
- package/skills/cm-qa-visual-cli/SKILL.md +18 -0
- package/skills/cm-retro-cli/SKILL.md +19 -0
- package/skills/cm-second-opinion-cli/SKILL.md +19 -0
- package/skills/cm-secret-shield/SKILL.md +2 -2
- package/skills/cm-sprint-bus/SKILL.md +29 -0
- package/skills/cm-start/SKILL.md +11 -2
- package/skills/cm-tdd/SKILL.md +61 -74
- package/skills/profiles/README.md +21 -0
- package/skills/profiles/core.txt +23 -0
- package/skills/profiles/design.txt +6 -0
- package/skills/profiles/full.txt +58 -0
- package/skills/profiles/growth.txt +10 -0
- package/skills/profiles/knowledge.txt +7 -0
- package/scripts/test-gemini.js +0 -13
- package/skills/cm-frappe-agent/SKILL.md +0 -134
- package/skills/cm-frappe-agent/agents/doctype-architect.md +0 -596
- package/skills/cm-frappe-agent/agents/erpnext-customizer.md +0 -643
- package/skills/cm-frappe-agent/agents/frappe-backend.md +0 -814
- package/skills/cm-frappe-agent/agents/frappe-custom-frontend.md +0 -557
- package/skills/cm-frappe-agent/agents/frappe-debugger.md +0 -625
- package/skills/cm-frappe-agent/agents/frappe-fixer.md +0 -275
- package/skills/cm-frappe-agent/agents/frappe-frontend.md +0 -660
- package/skills/cm-frappe-agent/agents/frappe-installer.md +0 -158
- package/skills/cm-frappe-agent/agents/frappe-performance.md +0 -307
- package/skills/cm-frappe-agent/agents/frappe-planner.md +0 -419
- package/skills/cm-frappe-agent/agents/frappe-remote-ops.md +0 -153
- package/skills/cm-frappe-agent/agents/github-workflow.md +0 -286
- package/skills/cm-frappe-agent/commands/frappe-app.md +0 -351
- package/skills/cm-frappe-agent/commands/frappe-backend.md +0 -162
- package/skills/cm-frappe-agent/commands/frappe-bench.md +0 -254
- package/skills/cm-frappe-agent/commands/frappe-debug.md +0 -263
- package/skills/cm-frappe-agent/commands/frappe-doctype-create.md +0 -272
- package/skills/cm-frappe-agent/commands/frappe-doctype-field.md +0 -310
- package/skills/cm-frappe-agent/commands/frappe-erpnext.md +0 -210
- package/skills/cm-frappe-agent/commands/frappe-fix.md +0 -59
- package/skills/cm-frappe-agent/commands/frappe-frontend.md +0 -210
- package/skills/cm-frappe-agent/commands/frappe-fullstack.md +0 -243
- package/skills/cm-frappe-agent/commands/frappe-github.md +0 -57
- package/skills/cm-frappe-agent/commands/frappe-install.md +0 -52
- package/skills/cm-frappe-agent/commands/frappe-plan.md +0 -442
- package/skills/cm-frappe-agent/commands/frappe-remote.md +0 -58
- package/skills/cm-frappe-agent/commands/frappe-test.md +0 -356
- package/skills/cm-frappe-agent/docs/README.md +0 -51
- package/skills/cm-frappe-agent/docs/agents-catalog.md +0 -113
- package/skills/cm-frappe-agent/docs/architecture.md +0 -149
- package/skills/cm-frappe-agent/docs/commands-catalog.md +0 -82
- package/skills/cm-frappe-agent/docs/resources-catalog.md +0 -66
- package/skills/cm-frappe-agent/docs/sitemap-urls.txt +0 -52
- package/skills/cm-frappe-agent/docs/sitemap.md +0 -81
- package/skills/cm-frappe-agent/docs/sop/user-guide.md +0 -178
- package/skills/cm-frappe-agent/docs/sop/vibe-coding-guide.md +0 -122
- package/skills/cm-frappe-agent/resources/7-layer-architecture.md +0 -985
- package/skills/cm-frappe-agent/resources/bench_commands.md +0 -73
- package/skills/cm-frappe-agent/resources/code-patterns-guide.md +0 -948
- package/skills/cm-frappe-agent/resources/common_pitfalls.md +0 -266
- package/skills/cm-frappe-agent/resources/doctype-registry.md +0 -158
- package/skills/cm-frappe-agent/resources/installation-guide.md +0 -289
- package/skills/cm-frappe-agent/resources/rest-api-patterns.md +0 -182
- package/skills/cm-frappe-agent/resources/scaffold_checklist.md +0 -82
- package/skills/cm-frappe-agent/resources/upgrade_patterns.md +0 -113
- package/skills/cm-frappe-agent/resources/web-form-patterns.md +0 -252
- package/skills/cm-frappe-agent/skills/bench-commands/SKILL.md +0 -621
- package/skills/cm-frappe-agent/skills/client-scripts/SKILL.md +0 -642
- package/skills/cm-frappe-agent/skills/doctype-patterns/SKILL.md +0 -576
- package/skills/cm-frappe-agent/skills/frappe-api/SKILL.md +0 -740
- package/skills/cm-frappe-agent/skills/remote-operations/SKILL.md +0 -47
- package/skills/cm-frappe-agent/skills/server-scripts/SKILL.md +0 -608
- package/skills/cm-frappe-agent/skills/web-forms/SKILL.md +0 -46
- package/skills/frappe-app-builder.zip +0 -0
package/skills/cm-tdd/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
## name: cm-tdd
|
|
3
4
|
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
4
|
-
---
|
|
5
5
|
|
|
6
6
|
# Test-Driven Development (TDD)
|
|
7
7
|
|
|
@@ -16,12 +16,14 @@ Write the test first. Watch it fail. Write minimal code to pass.
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
18
18
|
**Always:**
|
|
19
|
+
|
|
19
20
|
- New features
|
|
20
21
|
- Bug fixes
|
|
21
22
|
- Refactoring
|
|
22
23
|
- Behavior changes
|
|
23
24
|
|
|
24
25
|
**Exceptions (ask your human partner):**
|
|
26
|
+
|
|
25
27
|
- Throwaway prototypes
|
|
26
28
|
- Generated code
|
|
27
29
|
- Configuration files
|
|
@@ -37,6 +39,7 @@ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
|
37
39
|
Write code before the test? Delete it. Start over.
|
|
38
40
|
|
|
39
41
|
**No exceptions:**
|
|
42
|
+
|
|
40
43
|
- Don't keep it as "reference"
|
|
41
44
|
- Don't "adapt" it while writing tests
|
|
42
45
|
- Don't look at it
|
|
@@ -83,21 +86,14 @@ Before writing ANY test, check `.cm/CONTINUITY.md`:
|
|
|
83
86
|
|
|
84
87
|
Write one minimal test showing what should happen.
|
|
85
88
|
|
|
86
|
-
<
|
|
87
|
-
```typescript
|
|
88
|
-
test('retries failed operations 3 times', async () => {
|
|
89
|
-
let attempts = 0;
|
|
90
|
-
const operation = () => {
|
|
91
|
-
attempts++;
|
|
92
|
-
if (attempts < 3) throw new Error('fail');
|
|
93
|
-
return 'success';
|
|
94
|
-
};
|
|
89
|
+
```typescript test('retries failed operations 3 times', async () => { let attempts = 0; const operation = () => { attempts++; if (attempts < 3) throw new Error('fail'); return 'success'; };
|
|
95
90
|
|
|
96
91
|
const result = await retryOperation(operation);
|
|
97
92
|
|
|
98
93
|
expect(result).toBe('success');
|
|
99
94
|
expect(attempts).toBe(3);
|
|
100
95
|
});
|
|
96
|
+
|
|
101
97
|
```
|
|
102
98
|
Clear name, tests real behavior, one thing
|
|
103
99
|
</Good>
|
|
@@ -113,10 +109,12 @@ test('retry works', async () => {
|
|
|
113
109
|
expect(mock).toHaveBeenCalledTimes(3);
|
|
114
110
|
});
|
|
115
111
|
```
|
|
112
|
+
|
|
116
113
|
Vague name, tests mock not code
|
|
117
|
-
|
|
114
|
+
|
|
118
115
|
|
|
119
116
|
**Requirements:**
|
|
117
|
+
|
|
120
118
|
- One behavior
|
|
121
119
|
- Clear name
|
|
122
120
|
- Real code (no mocks unless unavoidable)
|
|
@@ -130,6 +128,7 @@ npm test path/to/test.test.ts
|
|
|
130
128
|
```
|
|
131
129
|
|
|
132
130
|
Confirm:
|
|
131
|
+
|
|
133
132
|
- Test fails (not errors)
|
|
134
133
|
- Failure message is expected
|
|
135
134
|
- Fails because feature missing (not typos)
|
|
@@ -142,37 +141,9 @@ Confirm:
|
|
|
142
141
|
|
|
143
142
|
Write simplest code to pass the test.
|
|
144
143
|
|
|
145
|
-
<
|
|
146
|
-
```typescript
|
|
147
|
-
async function retryOperation<T>(fn: () => Promise<T>): Promise<T> {
|
|
148
|
-
for (let i = 0; i < 3; i++) {
|
|
149
|
-
try {
|
|
150
|
-
return await fn();
|
|
151
|
-
} catch (e) {
|
|
152
|
-
if (i === 2) throw e;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
throw new Error('unreachable');
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
Just enough to pass
|
|
159
|
-
</Good>
|
|
144
|
+
```typescript async function retryOperation(fn: () => Promise): Promise { for (let i = 0; i < 3; i++) { try { return await fn(); } catch (e) { if (i === 2) throw e; } } throw new Error('unreachable'); } ``` Just enough to pass
|
|
160
145
|
|
|
161
|
-
|
|
162
|
-
```typescript
|
|
163
|
-
async function retryOperation<T>(
|
|
164
|
-
fn: () => Promise<T>,
|
|
165
|
-
options?: {
|
|
166
|
-
maxRetries?: number;
|
|
167
|
-
backoff?: 'linear' | 'exponential';
|
|
168
|
-
onRetry?: (attempt: number) => void;
|
|
169
|
-
}
|
|
170
|
-
): Promise<T> {
|
|
171
|
-
// YAGNI
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
Over-engineered
|
|
175
|
-
</Bad>
|
|
146
|
+
```typescript async function retryOperation( fn: () => Promise, options?: { maxRetries?: number; backoff?: 'linear' | 'exponential'; onRetry?: (attempt: number) => void; } ): Promise { // YAGNI } ``` Over-engineered
|
|
176
147
|
|
|
177
148
|
Don't add features, refactor other code, or "improve" beyond the test.
|
|
178
149
|
|
|
@@ -185,6 +156,7 @@ npm test path/to/test.test.ts
|
|
|
185
156
|
```
|
|
186
157
|
|
|
187
158
|
Confirm:
|
|
159
|
+
|
|
188
160
|
- Test passes
|
|
189
161
|
- Other tests still pass
|
|
190
162
|
- Output pristine (no errors, warnings)
|
|
@@ -196,6 +168,7 @@ Confirm:
|
|
|
196
168
|
### REFACTOR - Clean Up
|
|
197
169
|
|
|
198
170
|
After green only:
|
|
171
|
+
|
|
199
172
|
- Remove duplication
|
|
200
173
|
- Improve names
|
|
201
174
|
- Extract helpers
|
|
@@ -208,17 +181,20 @@ Next failing test for next feature.
|
|
|
208
181
|
|
|
209
182
|
## Good Tests
|
|
210
183
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
|
214
|
-
| **
|
|
215
|
-
| **
|
|
184
|
+
|
|
185
|
+
| Quality | Good | Bad |
|
|
186
|
+
| ---------------- | ----------------------------------- | --------------------------------------------------- |
|
|
187
|
+
| **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` |
|
|
188
|
+
| **Clear** | Name describes behavior | `test('test1')` |
|
|
189
|
+
| **Shows intent** | Demonstrates desired API | Obscures what code should do |
|
|
190
|
+
|
|
216
191
|
|
|
217
192
|
## Why Order Matters
|
|
218
193
|
|
|
219
194
|
**"I'll write tests after to verify it works"**
|
|
220
195
|
|
|
221
196
|
Tests written after code pass immediately. Passing immediately proves nothing:
|
|
197
|
+
|
|
222
198
|
- Might test wrong thing
|
|
223
199
|
- Might test implementation, not behavior
|
|
224
200
|
- Might miss edge cases you forgot
|
|
@@ -229,6 +205,7 @@ Test-first forces you to see the test fail, proving it actually tests something.
|
|
|
229
205
|
**"I already manually tested all the edge cases"**
|
|
230
206
|
|
|
231
207
|
Manual testing is ad-hoc. You think you tested everything but:
|
|
208
|
+
|
|
232
209
|
- No record of what you tested
|
|
233
210
|
- Can't re-run when code changes
|
|
234
211
|
- Easy to forget cases under pressure
|
|
@@ -239,6 +216,7 @@ Automated tests are systematic. They run the same way every time.
|
|
|
239
216
|
**"Deleting X hours of work is wasteful"**
|
|
240
217
|
|
|
241
218
|
Sunk cost fallacy. The time is already gone. Your choice now:
|
|
219
|
+
|
|
242
220
|
- Delete and rewrite with TDD (X more hours, high confidence)
|
|
243
221
|
- Keep it and add tests after (30 min, low confidence, likely bugs)
|
|
244
222
|
|
|
@@ -247,6 +225,7 @@ The "waste" is keeping code you can't trust. Working code without real tests is
|
|
|
247
225
|
**"TDD is dogmatic, being pragmatic means adapting"**
|
|
248
226
|
|
|
249
227
|
TDD IS pragmatic:
|
|
228
|
+
|
|
250
229
|
- Finds bugs before commit (faster than debugging after)
|
|
251
230
|
- Prevents regressions (tests catch breaks immediately)
|
|
252
231
|
- Documents behavior (tests show how to use code)
|
|
@@ -266,19 +245,21 @@ Tests-first force edge case discovery before implementing. Tests-after verify yo
|
|
|
266
245
|
|
|
267
246
|
## Common Rationalizations
|
|
268
247
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
|
272
|
-
| "
|
|
273
|
-
| "
|
|
274
|
-
| "
|
|
275
|
-
| "
|
|
276
|
-
| "
|
|
277
|
-
| "
|
|
278
|
-
| "
|
|
279
|
-
| "
|
|
280
|
-
| "
|
|
281
|
-
| "
|
|
248
|
+
|
|
249
|
+
| Excuse | Reality |
|
|
250
|
+
| -------------------------------------- | ----------------------------------------------------------------------- |
|
|
251
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
252
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
253
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
254
|
+
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
|
|
255
|
+
| "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
|
|
256
|
+
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
|
|
257
|
+
| "Need to explore first" | Fine. Throw away exploration, start with TDD. |
|
|
258
|
+
| "Test hard = design unclear" | Listen to test. Hard to test = hard to use. |
|
|
259
|
+
| "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
|
|
260
|
+
| "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
|
|
261
|
+
| "Existing code has no tests" | You're improving it. Add tests for existing code. |
|
|
262
|
+
|
|
282
263
|
|
|
283
264
|
## Red Flags - STOP and Start Over
|
|
284
265
|
|
|
@@ -303,6 +284,7 @@ Tests-first force edge case discovery before implementing. Tests-after verify yo
|
|
|
303
284
|
**Bug:** Empty email accepted
|
|
304
285
|
|
|
305
286
|
**RED**
|
|
287
|
+
|
|
306
288
|
```typescript
|
|
307
289
|
test('rejects empty email', async () => {
|
|
308
290
|
const result = await submitForm({ email: '' });
|
|
@@ -311,12 +293,14 @@ test('rejects empty email', async () => {
|
|
|
311
293
|
```
|
|
312
294
|
|
|
313
295
|
**Verify RED**
|
|
296
|
+
|
|
314
297
|
```bash
|
|
315
298
|
$ npm test
|
|
316
299
|
FAIL: expected 'Email required', got undefined
|
|
317
300
|
```
|
|
318
301
|
|
|
319
302
|
**GREEN**
|
|
303
|
+
|
|
320
304
|
```typescript
|
|
321
305
|
function submitForm(data: FormData) {
|
|
322
306
|
if (!data.email?.trim()) {
|
|
@@ -327,6 +311,7 @@ function submitForm(data: FormData) {
|
|
|
327
311
|
```
|
|
328
312
|
|
|
329
313
|
**Verify GREEN**
|
|
314
|
+
|
|
330
315
|
```bash
|
|
331
316
|
$ npm test
|
|
332
317
|
PASS
|
|
@@ -339,25 +324,27 @@ Extract validation for multiple fields if needed.
|
|
|
339
324
|
|
|
340
325
|
Before marking work complete:
|
|
341
326
|
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
327
|
+
- Every new function/method has a test
|
|
328
|
+
- Watched each test fail before implementing
|
|
329
|
+
- Each test failed for expected reason (feature missing, not typo)
|
|
330
|
+
- Wrote minimal code to pass each test
|
|
331
|
+
- All tests pass
|
|
332
|
+
- Output pristine (no errors, warnings)
|
|
333
|
+
- Tests use real code (mocks only if unavoidable)
|
|
334
|
+
- Edge cases and errors covered
|
|
350
335
|
|
|
351
336
|
Can't check all boxes? You skipped TDD. Start over.
|
|
352
337
|
|
|
353
338
|
## When Stuck
|
|
354
339
|
|
|
355
|
-
|
|
356
|
-
|
|
340
|
+
|
|
341
|
+
| Problem | Solution |
|
|
342
|
+
| ---------------------- | -------------------------------------------------------------------- |
|
|
357
343
|
| Don't know how to test | Write wished-for API. Write assertion first. Ask your human partner. |
|
|
358
|
-
| Test too complicated
|
|
359
|
-
| Must mock everything
|
|
360
|
-
| Test setup huge
|
|
344
|
+
| Test too complicated | Design too complicated. Simplify interface. |
|
|
345
|
+
| Must mock everything | Code too coupled. Use dependency injection. |
|
|
346
|
+
| Test setup huge | Extract helpers. Still complex? Simplify design. |
|
|
347
|
+
|
|
361
348
|
|
|
362
349
|
## Debugging Integration
|
|
363
350
|
|
|
@@ -372,4 +359,4 @@ Production code → test exists and failed first
|
|
|
372
359
|
Otherwise → not TDD
|
|
373
360
|
```
|
|
374
361
|
|
|
375
|
-
No exceptions without your human partner's permission.
|
|
362
|
+
No exceptions without your human partner's permission.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Skill install profiles (Antigravity / Windsurf / token budget)
|
|
2
|
+
|
|
3
|
+
Use with `install.sh`:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bash install.sh --gemini --profile core
|
|
7
|
+
bash install.sh --antigravity --profile core
|
|
8
|
+
bash install.sh --windsurf --profile core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- **core** — Orchestration, TDD, debugging, quality gates, deploy, secrets, identity, terminal (~21 skills). Recommended for global `~/.gemini/antigravity/skills`.
|
|
12
|
+
- **growth** — Ads tracking, CRO, content factory, forms, dashboard, etc. Add on top of core (re-run install to the same target) or install only into a workspace project folder.
|
|
13
|
+
- **design** — UX Master, design system, UI preview, JTBD, brainstorm.
|
|
14
|
+
- **knowledge** — Dockit, NotebookLM skill, deep search, code intelligence, project bootstrap, reactor.
|
|
15
|
+
- **full** — All skills (default when `--profile` is omitted). Same set as [full.txt](full.txt).
|
|
16
|
+
|
|
17
|
+
**Global vs workspace:** Keep **core** in user global skills; add **growth** / **design** / **knowledge** under the project (e.g. `.gemini/antigravity/skills` in repo) so every session does not load the full catalog.
|
|
18
|
+
|
|
19
|
+
**MCP:** Disable unused MCP servers in the IDE to avoid retry loops when a server errors; heavy external tools belong in optional profiles, not core.
|
|
20
|
+
|
|
21
|
+
**Maintainers:** When adding a new `skills/cm-*` folder, update [full.txt](full.txt) and add the skill to the appropriate optional profile (`growth`, `design`, or `knowledge`) if it is not part of `core`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# CodyMaster profile: core — Antigravity/Windsurf token budget (orchestration + quality + safety)
|
|
2
|
+
# Install: bash install.sh --gemini --profile core
|
|
3
|
+
cm-skill-index
|
|
4
|
+
cm-how-it-work
|
|
5
|
+
cm-start
|
|
6
|
+
cm-planning
|
|
7
|
+
cm-execution
|
|
8
|
+
cm-continuity
|
|
9
|
+
cm-status
|
|
10
|
+
cm-tdd
|
|
11
|
+
cm-debugging
|
|
12
|
+
cm-code-review
|
|
13
|
+
cm-clean-code
|
|
14
|
+
cm-quality-gate
|
|
15
|
+
cm-test-gate
|
|
16
|
+
cm-safe-deploy
|
|
17
|
+
cm-secret-shield
|
|
18
|
+
cm-identity-guard
|
|
19
|
+
cm-security-gate
|
|
20
|
+
cm-safe-i18n
|
|
21
|
+
cm-skill-chain
|
|
22
|
+
cm-git-worktrees
|
|
23
|
+
cm-terminal
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Complete CodyMaster skill set (same as default install when --profile full or omitted)
|
|
2
|
+
# Kept in sync with skills/cm-*/ — update when adding skills
|
|
3
|
+
cm-ads-tracker
|
|
4
|
+
cm-auto-publisher
|
|
5
|
+
cm-autopilot
|
|
6
|
+
cm-booking-calendar
|
|
7
|
+
cm-brainstorm-idea
|
|
8
|
+
cm-browse
|
|
9
|
+
cm-clean-code
|
|
10
|
+
cm-code-review
|
|
11
|
+
cm-codeintell
|
|
12
|
+
cm-conductor-worktrees
|
|
13
|
+
cm-content-factory
|
|
14
|
+
cm-continuity
|
|
15
|
+
cm-cro-methodology
|
|
16
|
+
cm-dashboard
|
|
17
|
+
cm-debugging
|
|
18
|
+
cm-deep-search
|
|
19
|
+
cm-design-studio
|
|
20
|
+
cm-design-system
|
|
21
|
+
cm-dockit
|
|
22
|
+
cm-ecosystem-roadmap
|
|
23
|
+
cm-engineering-meta
|
|
24
|
+
cm-example
|
|
25
|
+
cm-execution
|
|
26
|
+
cm-git-worktrees
|
|
27
|
+
cm-google-form
|
|
28
|
+
cm-growth-hacking
|
|
29
|
+
cm-guardian-runtime
|
|
30
|
+
cm-how-it-work
|
|
31
|
+
cm-identity-guard
|
|
32
|
+
cm-jtbd
|
|
33
|
+
cm-mcp-engineering
|
|
34
|
+
cm-notebooklm
|
|
35
|
+
cm-planning
|
|
36
|
+
cm-post-deploy-canary
|
|
37
|
+
cm-project-bootstrap
|
|
38
|
+
cm-qa-visual-cli
|
|
39
|
+
cm-quality-gate
|
|
40
|
+
cm-reactor
|
|
41
|
+
cm-readit
|
|
42
|
+
cm-retro-cli
|
|
43
|
+
cm-safe-deploy
|
|
44
|
+
cm-safe-i18n
|
|
45
|
+
cm-second-opinion-cli
|
|
46
|
+
cm-secret-shield
|
|
47
|
+
cm-security-gate
|
|
48
|
+
cm-skill-chain
|
|
49
|
+
cm-skill-index
|
|
50
|
+
cm-skill-mastery
|
|
51
|
+
cm-sprint-bus
|
|
52
|
+
cm-start
|
|
53
|
+
cm-status
|
|
54
|
+
cm-tdd
|
|
55
|
+
cm-terminal
|
|
56
|
+
cm-test-gate
|
|
57
|
+
cm-ui-preview
|
|
58
|
+
cm-ux-master
|
package/scripts/test-gemini.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const { exec, spawn } = require('child_process');
|
|
2
|
-
|
|
3
|
-
// Method 1: exec
|
|
4
|
-
exec('gemini -y -p "Hello!"', (err, stdout, stderr) => {
|
|
5
|
-
console.log('EXEC Result:', stdout || stderr);
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
// Method 2: spawn
|
|
9
|
-
const child = spawn('gemini', ['-y', '-p', 'Hello!']);
|
|
10
|
-
let out = '';
|
|
11
|
-
child.stdout.on('data', d => out += d);
|
|
12
|
-
child.stderr.on('data', d => out += d);
|
|
13
|
-
child.on('close', () => console.log('SPAWN Result:', out));
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cm-frappe-agent
|
|
3
|
-
description: |
|
|
4
|
-
Master Frappe Framework and ERPNext full-stack development. Build, upgrade,
|
|
5
|
-
and maintain production-ready Frappe custom apps using the 7-Layer Architecture
|
|
6
|
-
combined with specialized AI agents for the FULL development lifecycle:
|
|
7
|
-
development, testing, debugging, bug fixing, installation, remote operations,
|
|
8
|
-
and performance optimization.
|
|
9
|
-
|
|
10
|
-
ALWAYS trigger for: frappe app, frappe doctype, bench, erpnext, frappe hooks,
|
|
11
|
-
frappe scheduler, frappe workflow, frappe report, frappe api, frappe controller,
|
|
12
|
-
"create frappe app", "write doctype", "frappe custom app", "bench migrate",
|
|
13
|
-
"upgrade frappe", "frappe engine", "frappe webhook", "frappe client script",
|
|
14
|
-
"frappe server script", "frappe test", "improve frappe", "frappe backend",
|
|
15
|
-
"frappe frontend", "frappe remote", "remote api", "frappe cloud", "REST API",
|
|
16
|
-
"curl frappe", "install bench", "setup frappe", "create site",
|
|
17
|
-
"production setup", "fix bug", "fix error", "solve frappe error",
|
|
18
|
-
"frappe slow", "optimize query", "web form", "portal", "webform client script",
|
|
19
|
-
"frappe performance", "frappe install", "bench setup", "frappe permission",
|
|
20
|
-
"frappe fixture", "frappe workspace", "doc_events", "frappe i18n",
|
|
21
|
-
"frappe report", "frappe translation", "bench new-app"
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# Goal
|
|
25
|
-
|
|
26
|
-
To provide a **comprehensive lifecycle toolkit** for Frappe/ERPNext development — from installation and setup, through development and testing, to debugging, bug fixing, remote operations, and performance optimization. Built on the strict **7-Layer Architecture** (separating business logic from the Frappe ORM) with specialized **AI Agents** for each lifecycle stage.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
# Lifecycle Overview
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
┌─────────────────────────────────────────────────────────────────────┐
|
|
34
|
-
│ FRAPPE DEVELOPMENT LIFECYCLE │
|
|
35
|
-
│ │
|
|
36
|
-
│ 1. INSTALL → Setup bench, sites, apps [frappe-installer] │
|
|
37
|
-
│ 2. PLAN → Architecture, DocType design [frappe-planner] │
|
|
38
|
-
│ 3. BUILD → Backend, frontend, full-stack [backend/frontend]│
|
|
39
|
-
│ 4. TEST → Unit tests, integration tests [commands/test] │
|
|
40
|
-
│ 5. DEBUG → Log analysis, error investigation [frappe-debugger] │
|
|
41
|
-
│ 6. FIX → Structured bug fix loop [frappe-fixer] │
|
|
42
|
-
│ 7. OPTIMIZE → Performance tuning, caching [frappe-perf] │
|
|
43
|
-
│ 8. DEPLOY → Migrate, build, production setup [commands/bench] │
|
|
44
|
-
│ 9. OPERATE → Remote API, monitoring [frappe-remote] │
|
|
45
|
-
│ │
|
|
46
|
-
└─────────────────────────────────────────────────────────────────────┘
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
# Instructions
|
|
52
|
-
|
|
53
|
-
You are the orchestrator of the full Frappe development lifecycle. When handling a task, match it to the right lifecycle stage and invoke the appropriate agent.
|
|
54
|
-
|
|
55
|
-
## 1. Frappe Architecture Laws: The 7-Layer Pattern
|
|
56
|
-
|
|
57
|
-
Always reference the core architectural guidelines before implementing any feature:
|
|
58
|
-
*See `resources/7-layer-architecture.md` for comprehensive code examples.*
|
|
59
|
-
|
|
60
|
-
1. **DocType (Layer 1)**: Frappe manages the schema. Controllers handle `validate`, `on_submit`, etc. No heavy business logic here.
|
|
61
|
-
2. **Engines (Layer 2)**: **Crucial.** Pure Python logic. No Frappe DB calls inside pure algorithms — side-effect-free and testable.
|
|
62
|
-
3. **API (Layer 3)**: `@frappe.whitelist` endpoints using idempotent upsert patterns.
|
|
63
|
-
4. **Tasks (Layer 4)**: Scheduler events (daily, weekly) acting as wrappers around Engines.
|
|
64
|
-
5. **Setup (Layer 5)**: Idempotent install and migrate hooks (`after_install`, `after_migrate`).
|
|
65
|
-
6. **Tests (Layer 6)**: Standalone pure logic tests.
|
|
66
|
-
7. **Client JS (Layer 7)**: Shared utility namespaces (`window.myapp`) and list views.
|
|
67
|
-
|
|
68
|
-
## 2. Agent Orchestration
|
|
69
|
-
|
|
70
|
-
### Development Agents (Build)
|
|
71
|
-
* **DocType Architect (`agents/doctype-architect.md`)**: Schema, relations, workflow states.
|
|
72
|
-
* **Frappe Backend (`agents/frappe-backend.md`)**: Python APIs, controllers, and background jobs.
|
|
73
|
-
* **Frappe Frontend (`agents/frappe-frontend.md`)**: Client scripts, dialogs, custom formatters.
|
|
74
|
-
* **Frappe Custom Frontend (`agents/frappe-custom-frontend.md`)**: Custom standalone frontend pages.
|
|
75
|
-
* **ERPNext Customizer (`agents/erpnext-customizer.md`)**: Extending core ERPNext modules safely.
|
|
76
|
-
|
|
77
|
-
### Lifecycle Agents (Operate)
|
|
78
|
-
* **Frappe Installer (`agents/frappe-installer.md`)**: Bench setup, site creation, production deployment.
|
|
79
|
-
* **Frappe Planner (`agents/frappe-planner.md`)**: Feature planning and technical design.
|
|
80
|
-
* **Frappe Debugger (`agents/frappe-debugger.md`)**: Error analysis and log investigation.
|
|
81
|
-
* **Frappe Fixer (`agents/frappe-fixer.md`)**: Structured bug-fix loop (reproduce → diagnose → fix → verify).
|
|
82
|
-
* **Frappe Performance (`agents/frappe-performance.md`)**: Query optimization, profiling, caching.
|
|
83
|
-
* **Frappe Environment Doctor (`agents/frappe-doctor.md`)**: Environment health checks, user record repair, and zombie process cleanup.
|
|
84
|
-
* **Frappe Remote Ops (`agents/frappe-remote-ops.md`)**: REST API operations for remote/cloud sites.
|
|
85
|
-
* **GitHub Workflow (`agents/github-workflow.md`)**: Git operations and CI/CD.
|
|
86
|
-
|
|
87
|
-
## 3. Dedicated Sub-Skills
|
|
88
|
-
|
|
89
|
-
* `skills/doctype-patterns/SKILL.md` – Best practices for custom fields, naming rules.
|
|
90
|
-
* `skills/server-scripts/SKILL.md` – Server-side Python patterns.
|
|
91
|
-
* `skills/client-scripts/SKILL.md` – JavaScript form/list configurations.
|
|
92
|
-
* `skills/frappe-api/SKILL.md` – Frappe Framework ORM and Python API usage.
|
|
93
|
-
* `skills/bench-commands/SKILL.md` – Bench CLI reference.
|
|
94
|
-
* `skills/remote-operations/SKILL.md` – REST API patterns for remote sites.
|
|
95
|
-
* `skills/web-forms/SKILL.md` – Web Form development patterns.
|
|
96
|
-
|
|
97
|
-
## 4. Resource References
|
|
98
|
-
|
|
99
|
-
* `resources/7-layer-architecture.md` – Core architecture with code examples.
|
|
100
|
-
* `resources/code-patterns-guide.md` – **Production code patterns** (Layer 1-9 with real code, i18n, CI/CD, strict constraints).
|
|
101
|
-
* `resources/bench_commands.md` – Managing sites, building, caching.
|
|
102
|
-
* `resources/common_pitfalls.md` – Things to avoid.
|
|
103
|
-
* `resources/scaffold_checklist.md` – New app scaffolding.
|
|
104
|
-
* `resources/upgrade_patterns.md` – Version upgrade patterns.
|
|
105
|
-
* `resources/rest-api-patterns.md` – REST API curl patterns.
|
|
106
|
-
* `resources/doctype-registry.md` – DocType discovery and exploration.
|
|
107
|
-
* `resources/installation-guide.md` – Complete setup guide.
|
|
108
|
-
* `resources/web-form-patterns.md` – Web Form scripting.
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
# Best Practices
|
|
113
|
-
|
|
114
|
-
* **Never Modify Core Files**: Always use `hooks.py`, Client Scripts, or Custom Fields.
|
|
115
|
-
* **DB Security**: Always use parameterized queries to prevent SQL injection.
|
|
116
|
-
* **Naming Conventions (CRITICAL)**: **ALWAYS** use English for `fieldname` (must be `snake_case`, e.g., `violation_name`) and DocType `names` (must be `Title Case`, e.g., `Warehouse Violation`). **NEVER** use Vietnamese or other non-ASCII characters in schema (`name` or `fieldname`). Use Frappe's Translation system or Field `Label` for localized display text. Non-ASCII names cause Frappe/MariaDB query builder & Insights SQL errors.
|
|
117
|
-
* **Testable Logic**: Keep controllers focused on dispatching. Business logic in `engines/`.
|
|
118
|
-
* **Error Logging**: ALWAYS use `frappe.log_error()`, NEVER `frappe.logger`.
|
|
119
|
-
* **Bug Fixes**: Follow the structured fix loop (reproduce → diagnose → fix → verify → document).
|
|
120
|
-
* **Environment Recovery**: When site boots fail with 500 errors, use `redis-cli flushall`, `bench clear-cache`, and verify core system users (`Guest`, `Administrator`) have `enabled=1` and `user_type='System User'`.
|
|
121
|
-
* **Remote Operations**: Never expose API keys. Always confirm destructive operations.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
# Constraints
|
|
126
|
-
|
|
127
|
-
* Ensure all custom DocTypes have a Custom App module for proper export.
|
|
128
|
-
* Do not run destructive `bench` commands (like `--force` or `drop`) without explicit user consent.
|
|
129
|
-
* Avoid raw SQL unless performing complex joins the ORM cannot handle.
|
|
130
|
-
* Respect Document-level permissions unless explicitly instructed to use `ignore_permissions=True`.
|
|
131
|
-
* Never fabricate document data or fake API responses for remote operations.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<!-- Generated by Skill Creator Ultra v1.0 - Upgraded v2.0 with lifecycle agents, remote ops, bug fixing, installation, and performance -->
|