@mrciphersmith/keryx 0.2.71 → 0.2.73

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 (162) hide show
  1. package/dist/cli.js +4632 -2229
  2. package/package.json +2 -2
  3. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +81 -0
  4. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +2 -2
  6. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +8 -4
  7. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
  8. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
  10. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
  11. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
  12. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +94 -6
  13. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +94 -6
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +2 -2
  15. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +94 -6
  16. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +94 -6
  17. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +3 -3
  18. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
  19. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  21. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
  22. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
  23. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
  24. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +102 -42
  25. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +102 -42
  26. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +2 -2
  27. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +2 -2
  28. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
  29. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
  30. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
  31. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
  32. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  33. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +16 -7
  34. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +16 -7
  35. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +1 -1
  36. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +16 -7
  37. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +16 -7
  38. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +973 -510
  39. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +973 -510
  40. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +944 -514
  41. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +973 -510
  42. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +973 -510
  43. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +38 -28
  44. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +98 -66
  45. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +27 -5
  46. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
  47. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
  48. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
  49. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
  50. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
  51. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +57 -15
  52. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
  53. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
  54. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
  55. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  56. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  57. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +168 -9
  58. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +168 -9
  59. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
  60. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
  61. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
  62. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
  63. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +215 -9
  64. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +215 -9
  65. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +168 -9
  66. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +168 -9
  67. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
  68. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
  69. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
  70. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
  71. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +133 -9
  72. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +133 -9
  73. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +145 -9
  74. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +145 -9
  75. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +210 -9
  76. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +210 -9
  77. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +161 -9
  78. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +161 -9
  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.md +2 -2
  114. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
  115. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
  116. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +243 -0
  117. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +243 -0
  118. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +243 -0
  119. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +243 -0
  120. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +243 -0
  121. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
  122. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
  123. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +1 -1
  124. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
  125. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
  126. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
  127. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
  128. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
  129. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
  130. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
  131. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +1 -1
  132. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +1 -1
  133. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +1 -1
  134. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -1
  135. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  136. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +1 -1
  137. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  138. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -1
  139. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +2 -2
  140. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +26 -13
  141. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +1 -1
  142. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +36 -17
  143. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -1
  144. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -1
  145. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
  146. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  147. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  148. package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +0 -48
  149. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
  150. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
  151. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
  152. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
  153. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
  154. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
  155. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
  156. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
  157. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +0 -30
  158. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +0 -209
  159. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +0 -209
  160. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +0 -208
  161. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +0 -209
  162. package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +0 -209
@@ -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.
@@ -1,209 +0,0 @@
1
- ---
2
- name: code-b091-review
3
- description: "Performs strict b091-style code review following code-review-b091-profile.mdc. Reviews current branch changes from merge-base. Direct, no-fluff feedback focused on logic correctness. Use when: b091 review requested, strict validation needed."
4
- triggers:
5
- - "Review as b091"
6
- - "b091 style review"
7
- - "b091 review"
8
- metadata:
9
- author: "MrCipherSmith"
10
- version: "1.0.0"
11
- category: "review"
12
- compatible_harnesses: "cursor,codex,zed,opencode"
13
- license: "MIT"
14
- ---
15
-
16
-
17
- # Code Review as b091 (только текущая ветка)
18
-
19
- ## Workflow
20
-
21
- Copy this checklist and track progress:
22
-
23
- ```
24
- b091 Review Progress:
25
- - [ ] Step 1: Determine parent branch and calculate merge-base
26
- - [ ] Step 2: Collect git diff (committed + local changes)
27
- - [ ] Step 3: Apply b091 principles (logic in correct layer, no ducttape)
28
- - [ ] Step 4: Check types (no any, typed mocks)
29
- - [ ] Step 5: Verify conventions (currentState, I prefix, etc.)
30
- - [ ] Step 6: Challenge all assumptions
31
- - [ ] Step 7: Generate direct report with patches
32
- ```
33
-
34
- ## Обязательные правила
35
-
36
- 1) **Скоуп по умолчанию (без commit hash/range в запросе)**: ревью включает **все** изменения в текущей ветке от точки ответвления (merge-base) от родительской ветки:
37
- - закоммиченные (`BASE_SHA..HEAD`)
38
- - локальные незакоммиченные (staged/unstaged/untracked)
39
- 2) **Скоуп при явном commit hash/range**: если пользователь явно передал hash или диапазон, ревьюй только запрошенный диапазон; локальные незакоммиченные изменения не добавляй, если это отдельно не попросили.
40
- 3) **Стиль/принципы b091**: ревью строго по `.metaproject/rules/core/code-review-b091-profile.mdc` (разделы правил и промпт).
41
- 4) **Результат**: подробный отчёт по проблемам с объяснением и предложением исправлений (минимальные патчи там, где это просто).
42
-
43
- ## Определение parent ref (детерминированно, именно родитель ветки)
44
-
45
- Используй первый существующий вариант:
46
-
47
- 1. `origin/main`
48
- 2. `origin/master`
49
- 3. `main`
50
- 4. `master`
51
- 5. `@{upstream}` **только если это не текущая feature-ветка**
52
-
53
- ```bash
54
- BRANCH="$(git rev-parse --abbrev-ref HEAD)"
55
- UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
56
-
57
- PARENT=""
58
- if git rev-parse --verify -q "origin/main" >/dev/null; then
59
- PARENT="origin/main"
60
- elif git rev-parse --verify -q "origin/master" >/dev/null; then
61
- PARENT="origin/master"
62
- elif git rev-parse --verify -q "main" >/dev/null; then
63
- PARENT="main"
64
- elif git rev-parse --verify -q "master" >/dev/null; then
65
- PARENT="master"
66
- elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
67
- PARENT="@{upstream}"
68
- else
69
- echo "Cannot determine parent ref" >&2
70
- exit 1
71
- fi
72
-
73
- BASE_SHA="$(git merge-base HEAD "$PARENT")"
74
- ```
75
-
76
- ## Команды, чтобы собрать “срез” для ревью
77
-
78
- ### A) Режим по умолчанию (пользователь НЕ дал hash/range)
79
-
80
- ```bash
81
- git status
82
-
83
- # Закоммиченная часть ветки
84
- git log --oneline "${BASE_SHA}..HEAD"
85
- git diff --stat "${BASE_SHA}..HEAD"
86
- git diff --name-status "${BASE_SHA}..HEAD"
87
- git diff "${BASE_SHA}..HEAD"
88
-
89
- # Полный текущий срез от merge-base до рабочего дерева:
90
- # включает commit'ы + staged + unstaged
91
- # (untracked смотри через git status / git ls-files)
92
- git diff --stat "${BASE_SHA}"
93
- git diff --name-status "${BASE_SHA}"
94
- git diff "${BASE_SHA}"
95
- git ls-files --others --exclude-standard
96
- ```
97
-
98
- ### B) Режим с явным hash/range
99
-
100
- Если пользователь дал конкретный hash/range, используй его буквально:
101
-
102
- ```bash
103
- # Примеры:
104
- git show --stat --name-status --patch <COMMIT_SHA>
105
- git log --oneline <FROM_SHA>..<TO_SHA>
106
- git diff --stat <FROM_SHA>..<TO_SHA>
107
- git diff --name-status <FROM_SHA>..<TO_SHA>
108
- git diff <FROM_SHA>..<TO_SHA>
109
- ```
110
-
111
- ## Как ревьюить (по b091)
112
-
113
- Применяй чек-лист и промпт из `.metaproject/rules/core/code-review-b091-profile.mdc`. Ключевые акценты b091:
114
-
115
- - Логика должна жить в правильном слое (часто — в store), чтобы её можно было нормально тестировать.
116
- - Против “patch/glue/ducttape”: требуй чинить причину, а не маскировать симптомы.
117
- - В новом коде никаких `any`, `as any`, небезопасных кастов; моки — типизированные и не наследуются от реальных реализаций.
118
- - Не плодить дублирование правил/проверок: один источник правды, переиспользовать сеттеры/методы.
119
- - Конвенции проекта обязательны (например, `currentState`, `I` для интерфейсов, консистентные типы).
120
- - Магические числа / `setTimeout(0)` / "страшные" хаки — только с чётким "почему", либо перепроектировать.
121
- - **Accessibility модификаторы в сторах**: inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`) обязаны быть `private`. Публичный метод допустим только если он вызывается из React-компонента. Спросить: "Вызывается ли этот метод из JSX?" Если нет — `private`.
122
- - С MobX по умолчанию **не добавлять** `useCallback`/`useMemo` без явной необходимости.
123
- - Предложения должны проходить линт; не нитпикать автоформатирование.
124
- - Не раздувать scope: большие рефакторы “not today”, если вне задачи.
125
-
126
- ## Формат вывода (подробный отчёт + тон b091)
127
-
128
- Пиши по-русски, но допускай короткие b091-маркеры (например, `not today ;P`, “ducttape”, “broken thinking”) только по делу и без перехода на личности.
129
-
130
- Используй структуру:
131
-
132
- ```markdown
133
- ## Вердикт (b091)
134
- <OK / needs work / fundamentally wrong> + 1–3 самых важных тезиса.
135
-
136
- ## Скоуп ревью (только текущая ветка)
137
- - Ветка: `<BRANCH>`
138
- - Parent ref: `<PARENT>`
139
- - Merge-base: `<BASE_SHA>`
140
- - Режим скоупа: `<default-with-uncommitted | explicit-hash-range>`
141
- - Коммиты (merge-base..HEAD): <N>
142
- - Изменённые файлы: <список или количество>
143
-
144
- ## Находки (подробно)
145
- ### Архитектура и место логики
146
- <находки>
147
-
148
- ### Типы, касты, моки
149
- <находки>
150
-
151
- ### Корректность и семантика состояний
152
- <находки>
153
-
154
- ### Конвенции и консистентность
155
- <находки>
156
-
157
- ### Линт/формат/шум
158
- <находки>
159
-
160
- ### UX/edge cases
161
- <находки>
162
-
163
- ### Тестируемость
164
- <находки>
165
-
166
- ## Предложенные исправления (patches)
167
- <минимальные unified diff-патчи для очевидных правок>
168
- ```
169
-
170
- ### Формат каждой находки (обязательно)
171
-
172
- Для каждой находки укажи:
173
-
174
- - **Severity**: `blocker` / `major` / `minor`
175
- - **Location**: путь файла + релевантный hunk/фрагмент из diff
176
- - **Problem**: что не так
177
- - **Why it matters**: почему это важно (корректность/тестируемость/конвенции/поддерживаемость)
178
- - **Suggested fix**: что конкретно сделать (точечно, без раздувания scope)
179
- - **Optional patch**: если фикс простой — unified diff
180
-
181
- Пример блока патча:
182
-
183
- ```diff
184
- diff --git a/path/file.ts b/path/file.ts
185
- index 0000000..1111111 100644
186
- --- a/path/file.ts
187
- +++ b/path/file.ts
188
- @@ -1,3 +1,3 @@
189
- -const x = 1;
190
- +const x = 2;
191
- ```
192
-
193
- ---
194
-
195
- ## Job Context Awareness
196
-
197
- When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
198
-
199
- ```
200
- JOB_NAME: <job-name>
201
- CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
202
- ```
203
-
204
- If provided and the file exists, read the context document before starting the review. Use it to:
205
- - Understand which libraries and patterns were intentionally chosen for the implementation
206
- - Avoid flagging correct library usage as issues
207
- - Provide more accurate findings by understanding the project's architectural decisions
208
-
209
- If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.