@mrciphersmith/keryx 0.2.72 → 0.2.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cli.js +33409 -32626
  2. package/package.json +2 -2
  3. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
  4. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
  6. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +214 -0
  7. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
  8. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
  10. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
  11. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +92 -4
  12. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +92 -4
  13. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +92 -4
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +92 -4
  15. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +1 -1
  16. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
  17. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
  18. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
  19. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
  21. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +101 -41
  22. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +101 -41
  23. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +48 -1
  24. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +70 -4
  25. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
  26. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
  27. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
  28. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
  29. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  30. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +15 -6
  31. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +15 -6
  32. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +15 -6
  33. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +15 -6
  34. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1 -1
  35. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1 -1
  36. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  37. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1 -1
  38. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1 -1
  39. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
  40. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
  41. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
  42. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
  43. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
  44. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +56 -14
  45. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
  46. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
  47. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
  48. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  49. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  50. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +169 -10
  51. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +169 -10
  52. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +1 -1
  53. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
  54. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
  55. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
  56. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
  57. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +216 -10
  58. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +216 -10
  59. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +1 -1
  60. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +169 -10
  61. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +169 -10
  62. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +1 -1
  63. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
  64. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
  65. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
  66. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
  67. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +134 -10
  68. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +134 -10
  69. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +1 -1
  70. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +146 -10
  71. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +146 -10
  72. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +1 -1
  73. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +211 -10
  74. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +211 -10
  75. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +1 -1
  76. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +162 -10
  77. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +162 -10
  78. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +1 -1
  79. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  80. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  81. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  82. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  83. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  84. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  85. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
  86. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
  87. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  88. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  89. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  90. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  91. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  92. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  93. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  94. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  95. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  96. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  97. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +15 -1
  98. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +248 -165
  99. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +15 -1
  100. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +359 -19
  101. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  102. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  103. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
  104. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
  105. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
  106. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
  107. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +299 -24
  108. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +296 -31
  109. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +309 -18
  110. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +312 -17
  111. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +29 -30
  112. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +29 -30
  113. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
  114. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
  115. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +21 -30
  116. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +21 -30
  117. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +21 -30
  118. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +21 -30
  119. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
  120. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
  121. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
  122. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
  123. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
  124. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
  125. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
  126. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
  127. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +33 -1
  128. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +217 -0
  129. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +26 -0
  130. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +320 -5
  131. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +644 -113
  132. package/src/gdskills/bundled/skills/review/review-pr-feedback/input-contract.schema.json +79 -0
  133. package/src/gdskills/bundled/skills/review/review-pr-feedback/output-contract.schema.json +375 -0
  134. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +111 -1
  135. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +25 -1
  136. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
  137. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
  138. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
  139. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
  140. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
  141. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
  142. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
  143. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
  144. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +0 -30
@@ -1,94 +0,0 @@
1
- ---
2
- description: Critical requirements interviewer — one question at a time with options, structured output
3
- allowed-tools: Read(*), Glob(*), Bash(git log:*), Bash(git branch:*), Bash(git status:*)
4
- ---
5
-
6
- ## Your task
7
-
8
- You are a critical requirements interviewer. Your job is to ask the minimum number of focused questions to gather precise context before a complex task.
9
-
10
- **Input:** $ARGUMENTS
11
- Parse as JSON if provided by a calling skill, or treat as plain topic if entered by user.
12
-
13
- ---
14
-
15
- ### Step 1 — Establish context
16
-
17
- **If called by another skill** (JSON input with `topic`, `goal`, `context`):
18
- - Parse the provided context
19
- - Identify what's unknown or ambiguous for the stated `goal`
20
- - Skip to Step 3
21
-
22
- **If called directly by user** (plain text topic):
23
- - If no topic given, ask: "What are we working on?"
24
- - Gather basic codebase context:
25
- ```
26
- git log --oneline -10
27
- ls src/ 2>/dev/null || ls
28
- ```
29
- - If significant ambiguity, run the `context-collector` skill first
30
-
31
- ---
32
-
33
- ### Step 2 — Determine question scope
34
-
35
- Based on topic + goal, decide:
36
- - How many questions are truly needed? (aim for 2-6, max 8)
37
- - Which questions would most change the approach?
38
- - Which questions are already answered by context? → **skip those**
39
-
40
- ---
41
-
42
- ### Step 3 — Interview loop
43
-
44
- Ask questions **one at a time**. For each question:
45
-
46
- 1. Ask the question clearly
47
- 2. Provide options (A/B/C/D) when the answer space is enumerable
48
- 3. Wait for user response
49
- 4. If answer reveals more unknowns, add follow-up
50
- 5. If answer is clear and complete, proceed to next question
51
-
52
- Example format:
53
- ```
54
- **Question 2 of 4:** What is the primary constraint for this feature?
55
-
56
- A) Delivery speed (ship in < 1 week)
57
- B) Performance (must handle 10k+ req/s)
58
- C) Correctness (zero tolerance for bugs)
59
- D) Other (describe)
60
- ```
61
-
62
- ---
63
-
64
- ### Step 4 — Confirm and output
65
-
66
- After all questions, output:
67
-
68
- ```markdown
69
- ## Gathered Context
70
-
71
- **Topic:** ...
72
- **Goal:** ...
73
-
74
- **Answers:**
75
- 1. [Question] → [Answer] (confidence: certain/assumption)
76
- 2. ...
77
-
78
- **Summary:**
79
- [2-3 sentences synthesizing the key constraints and requirements]
80
-
81
- **Blockers:** [any unresolved critical unknowns, or "none"]
82
- **Ready to proceed:** yes/no
83
- ```
84
-
85
- Then ask: "Does this look correct? Should I proceed?"
86
-
87
- ---
88
-
89
- ### Rules
90
- - One question at a time — never list multiple questions
91
- - Skip questions the context already answers
92
- - Be critical — focus on questions that change the approach
93
- - Provide options when the answer space has < 5 clear choices
94
- - Max 8 questions total
@@ -1,45 +0,0 @@
1
- ---
2
- description: Generate changelog from commits between tags or releases
3
- allowed-tools: Bash(git log:*), Bash(git tag:*), Bash(git describe:*), Bash(git rev-list:*)
4
- ---
5
-
6
- ## Context
7
-
8
- - All tags (latest first): !`git tag --sort=-creatordate | head -20`
9
- - Commits since last tag: !`git log $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD --oneline 2>/dev/null | head -50`
10
- - Current branch: !`git branch --show-current`
11
-
12
- ## Your task
13
-
14
- Generate changelog for: $ARGUMENTS
15
-
16
- - No args → last tag to HEAD
17
- - One arg (tag) → that tag to HEAD
18
- - Two args (e.g. `v1.0.0 v1.1.0`) → between those tags
19
-
20
- ### Steps
21
-
22
- 1. Determine commit range from arguments
23
- 2. Get full log: `git log <from>..<to> --pretty=format:"%h %s (%an)" --no-merges`
24
- 3. Categorize by conventional commit prefix:
25
- - `feat:` → **Features**
26
- - `fix:` → **Bug Fixes**
27
- - `perf:` → **Performance**
28
- - `refactor:` → **Refactoring**
29
- - `docs:` → **Documentation**
30
- - `chore:` / `build:` / `ci:` → **Maintenance**
31
- - `test:` → **Tests**
32
- - uncategorized → **Other Changes**
33
-
34
- 4. Output:
35
- ```markdown
36
- ## [version] — YYYY-MM-DD
37
-
38
- ### Features
39
- - Description (abc1234)
40
-
41
- ### Bug Fixes
42
- - Description (abc1234)
43
- ```
44
-
45
- 5. Also output compact version for `gh release create --notes`
@@ -1,40 +0,0 @@
1
- ---
2
- description: Create and apply database migrations (Drizzle, Prisma, Knex, raw SQL)
3
- allowed-tools: Bash(*), Read(*), Write(*), Glob(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Migration tool: !`ls drizzle.config.* knexfile.* prisma/schema.prisma 2>/dev/null | head -3 || echo "none found"`
9
- - Existing migrations: !`ls migrations/ db/migrations/ prisma/migrations/ 2>/dev/null | tail -10 || echo "none"`
10
- - DB env: !`grep -E "DATABASE_URL|DB_HOST|POSTGRES" .env 2>/dev/null | sed 's/=.*/=***/' || echo "no .env"`
11
- - Migration scripts: !`cat package.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); [print(k+':',v) for k,v in d.get('scripts',{}).items() if any(x in k for x in ['migrat','drizzle','prisma'])]" 2>/dev/null || echo "none"`
12
-
13
- ## Your task
14
-
15
- Action: $ARGUMENTS (e.g. `create add_user_sessions_table`, `apply`, `status`, `rollback`)
16
-
17
- ### Detect tool
18
- - `drizzle.config.*` → Drizzle ORM
19
- - `prisma/schema.prisma` → Prisma
20
- - `knexfile.*` → Knex
21
- - `migrations/*.sql` → Raw SQL
22
-
23
- ### `create <name>`
24
- - Drizzle: `bunx drizzle-kit generate`
25
- - Prisma: `bunx prisma migrate dev --name <name>`
26
- - Knex: `npx knex migrate:make <name>`
27
- - Raw SQL: create `migrations/YYYYMMDD_HHMMSS_<name>.sql` with UP/DOWN, scaffold SQL from name
28
-
29
- ### `apply` / empty
30
- - Drizzle: `bunx drizzle-kit migrate`
31
- - Prisma: `bunx prisma migrate deploy`
32
- - Knex: `npx knex migrate:latest`
33
-
34
- ### `status`
35
- Show applied vs pending
36
-
37
- ### `rollback`
38
- Roll back last migration
39
-
40
- Always show SQL before running, confirm success after.
@@ -1,45 +0,0 @@
1
- ---
2
- description: Update dependencies with compatibility checks and test verification
3
- allowed-tools: Bash(*), Read(*), Edit(*), Write(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Package manager: !`ls bun.lockb 2>/dev/null && echo "bun" || ls yarn.lock 2>/dev/null && echo "yarn" || echo "npm"`
9
- - Outdated packages: !`bun outdated 2>/dev/null || npm outdated 2>/dev/null | head -30`
10
- - Test script: !`cat package.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('scripts',{}).get('test','none'))" 2>/dev/null`
11
-
12
- ## Your task
13
-
14
- Update dependencies: $ARGUMENTS (empty = all outdated)
15
-
16
- ### Steps
17
-
18
- 1. **Snapshot**: `cp package.json package.json.backup`
19
-
20
- 2. **Categorize** updates: patch / minor (auto) vs major (manual analysis)
21
-
22
- 3. **Apply patch + minor**:
23
- ```bash
24
- bun update 2>/dev/null || npx npm-check-updates -u --target minor && npm install
25
- ```
26
-
27
- 4. **Run tests**:
28
- ```bash
29
- bun test 2>/dev/null || npm test 2>/dev/null
30
- ```
31
- If fail → identify breaking update → rollback that package
32
-
33
- 5. **For major updates** (if in args or --major flag):
34
- - Check CHANGELOG/GitHub releases for breaking changes
35
- - Report: what needs updating in codebase
36
- - Apply only if no breaking changes affect this project
37
-
38
- 6. **Always update** packages with known CVEs regardless of version jump
39
-
40
- 7. **Restore on failure**: `cp package.json.backup package.json && bun install`
41
-
42
- ### Final report
43
- - Updated: old → new versions
44
- - Skipped: package + reason
45
- - Manual action: major changes requiring code updates
@@ -1,42 +0,0 @@
1
- ---
2
- description: Run tests, build, and deploy to target environment
3
- allowed-tools: Bash(*), Read(*), Edit(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Current branch: !`git branch --show-current`
9
- - Git status: !`git status --short`
10
- - Recent commits: !`git log --oneline -5`
11
- - Config files: !`ls -1 .env* docker-compose*.yml Dockerfile pm2* ecosystem.config.* 2>/dev/null || echo "none"`
12
- - Package scripts: !`cat package.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); [print(k+':',v) for k,v in d.get('scripts',{}).items()]" || echo "no package.json"`
13
-
14
- ## Your task
15
-
16
- Deploy to environment: $ARGUMENTS (default: production if not specified)
17
-
18
- ### Phase 1 — Pre-flight
19
- 1. Verify git status — warn if dirty, continue if user confirms
20
- 2. Check target env config exists
21
- 3. Verify required env vars set
22
-
23
- ### Phase 2 — Tests
24
- 1. Run: `bun test` / `npm test` / `jest` / `vitest` (auto-detect)
25
- 2. **STOP and report if any tests fail — do not deploy**
26
-
27
- ### Phase 3 — Build
28
- 1. Detect: `bun build` / `docker build` / `npm run build`
29
- 2. **STOP and report if build fails**
30
-
31
- ### Phase 4 — Deploy
32
- Detect method:
33
- - `docker-compose.yml` → `docker compose up -d --build`
34
- - `Dockerfile` only → build + run container
35
- - `ecosystem.config.*` → `pm2 reload`
36
- - Custom deploy script → run it
37
-
38
- ### Phase 5 — Verify
39
- 1. Check service running: `docker ps` / `pm2 status` / health endpoint
40
- 2. Show last 20 log lines
41
-
42
- Report result of each phase clearly.
@@ -1,48 +0,0 @@
1
- ---
2
- description: Performance analysis — bundle size, slow queries, memory, async patterns
3
- allowed-tools: Bash(*), Read(*), Glob(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Build output: !`du -sh dist/ build/ .next/ out/ 2>/dev/null | sort -h || echo "not built"`
9
- - Running containers: !`docker stats --no-stream 2>/dev/null | head -5 || echo "none"`
10
- - Package manager: !`ls bun.lockb 2>/dev/null && echo "bun" || echo "npm"`
11
-
12
- ## Your task
13
-
14
- Performance analysis for: $ARGUMENTS (or full analysis if empty)
15
-
16
- ### 1. Bundle size (frontend)
17
- List top 10 largest files in dist/build. Flag > 500KB uncompressed or > 150KB gzipped.
18
-
19
- ### 2. Dependency weight
20
- ```bash
21
- du -sh node_modules/*/ 2>/dev/null | sort -hr | head -20
22
- ```
23
-
24
- ### 3. Backend patterns (static analysis)
25
- Scan source files for:
26
- - `await` inside `forEach`/`map` loops → should use `Promise.all`
27
- - `SELECT *` patterns → should project columns
28
- - Missing `.limit()` on list queries
29
- - Loop with DB call (N+1 pattern)
30
-
31
- ```bash
32
- grep -rn "\.forEach\|\.map" --include="*.ts" src/ 2>/dev/null | grep -i await | head -20
33
- grep -rn "SELECT \*" --include="*.ts" --include="*.sql" . 2>/dev/null | grep -v node_modules | head -10
34
- ```
35
-
36
- ### 4. Memory (if running)
37
- ```bash
38
- docker stats --no-stream 2>/dev/null
39
- pm2 list 2>/dev/null
40
- ```
41
-
42
- ### Report
43
- Group by priority:
44
- - **Critical** (> 50% improvement possible)
45
- - **High** (significant impact)
46
- - **Medium** (worth fixing)
47
-
48
- Include file:line references.
@@ -1,40 +0,0 @@
1
- ---
2
- description: Security audit — npm/bun audit, dependency vulnerabilities, secrets scan
3
- allowed-tools: Bash(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Package manager: !`ls bun.lockb yarn.lock pnpm-lock.yaml package-lock.json 2>/dev/null | head -1 || echo "unknown"`
9
- - Bun version: !`bun --version 2>/dev/null || echo "n/a"`
10
- - Dependencies: !`cat package.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d.get('dependencies',{})), 'prod,', len(d.get('devDependencies',{})), 'dev')" 2>/dev/null || echo "unknown"`
11
-
12
- ## Your task
13
-
14
- Run a comprehensive security audit.
15
-
16
- ### Step 1 — Dependency vulnerabilities
17
- - `bun.lockb` → `bun audit`
18
- - `package-lock.json` → `npm audit --json`
19
- - `yarn.lock` → `yarn audit`
20
-
21
- Group: **critical → high → moderate → low**
22
-
23
- ### Step 2 — Outdated packages
24
- `bun outdated 2>/dev/null || npm outdated` — flag 2+ major versions behind
25
-
26
- ### Step 3 — Secrets scan
27
- ```bash
28
- git log --all --full-history -- "*.env" "*.key" "*.pem" 2>/dev/null | head -20
29
- grep -r "password\s*=\s*['\"][^'\"]\|api_key\s*=\s*['\"][^'\"]\|secret\s*=\s*['\"][^'\"]" \
30
- --include="*.ts" --include="*.js" -l . 2>/dev/null | grep -v node_modules
31
- ```
32
-
33
- ### Step 4 — Docker image scan (if Dockerfile present)
34
- `docker scout cves $(docker build -q .) 2>/dev/null || echo "Docker Scout not available"`
35
-
36
- ### Report
37
- - Total by severity
38
- - Top 3 critical/high with CVE
39
- - Immediate actions
40
- - Packages safe to ignore (dev-only)
@@ -1,30 +0,0 @@
1
- ---
2
- description: Auto-generate tests for a specified file or module
3
- allowed-tools: Bash(*), Read(*), Write(*), Glob(*)
4
- ---
5
-
6
- ## Context
7
-
8
- - Test framework: !`cat package.json 2>/dev/null | python3 -c "import json,sys; d=json.load(sys.stdin); deps={**d.get('dependencies',{}),**d.get('devDependencies',{})}; print(next((k for k in ['bun:test','vitest','jest'] if k in str(deps)), 'unknown'))" 2>/dev/null || echo "unknown"`
9
- - Existing tests: !`find . -name "*.test.ts" -not -path "*/node_modules/*" 2>/dev/null | head -5 || echo "none"`
10
- - Sample test style: !`find . -name "*.test.ts" -not -path "*/node_modules/*" 2>/dev/null | head -1 | xargs head -30 2>/dev/null || echo "none"`
11
-
12
- ## Your task
13
-
14
- Generate tests for: $ARGUMENTS
15
-
16
- 1. **Read** the target file completely
17
- 2. **Check** for existing tests (`<name>.test.ts` or `__tests__/<name>.ts`)
18
- 3. **Plan** test cases:
19
- - Happy path for each export
20
- - Edge cases: empty, null, boundary values
21
- - Error cases: invalid input, exceptions, DB errors
22
- - API routes: each method + auth + 200/400/401/404/500
23
- 4. **Write** tests matching existing style:
24
- - bun:test → `import { describe, test, expect, mock } from "bun:test"`
25
- - jest/vitest → respective imports
26
- - Mock external dependencies at correct boundary
27
- 5. **Write** test file to `<name>.test.ts` (same dir) or `__tests__/` if that's the convention
28
- 6. **Run** and fix: `bun test <file> 2>/dev/null || npx jest <file> 2>/dev/null`
29
-
30
- Report: tests generated, estimated coverage, cases needing manual work.