ag-cortex 0.1.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.
Files changed (162) hide show
  1. package/.agent/commands/test-browser.md +339 -0
  2. package/.agent/rules/00-constitution.md +46 -0
  3. package/.agent/rules/project-rules.md +49 -0
  4. package/.agent/skills/agent-browser/SKILL.md +223 -0
  5. package/.agent/skills/agent-native-architecture/SKILL.md +435 -0
  6. package/.agent/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  7. package/.agent/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  8. package/.agent/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  9. package/.agent/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  10. package/.agent/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  11. package/.agent/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  12. package/.agent/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  13. package/.agent/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  14. package/.agent/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  15. package/.agent/skills/agent-native-architecture/references/product-implications.md +443 -0
  16. package/.agent/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  17. package/.agent/skills/agent-native-architecture/references/self-modification.md +269 -0
  18. package/.agent/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  19. package/.agent/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  20. package/.agent/skills/agent-native-reviewer/SKILL.md +246 -0
  21. package/.agent/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  22. package/.agent/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  23. package/.agent/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  24. package/.agent/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  25. package/.agent/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  26. package/.agent/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  27. package/.agent/skills/ankane-readme-writer/SKILL.md +50 -0
  28. package/.agent/skills/architecture-strategist/SKILL.md +52 -0
  29. package/.agent/skills/best-practices-researcher/SKILL.md +100 -0
  30. package/.agent/skills/bug-reproduction-validator/SKILL.md +67 -0
  31. package/.agent/skills/code-simplicity-reviewer/SKILL.md +85 -0
  32. package/.agent/skills/coding-tutor/.claude-plugin/plugin.json +9 -0
  33. package/.agent/skills/coding-tutor/README.md +37 -0
  34. package/.agent/skills/coding-tutor/commands/quiz-me.md +1 -0
  35. package/.agent/skills/coding-tutor/commands/sync-tutorials.md +25 -0
  36. package/.agent/skills/coding-tutor/commands/teach-me.md +1 -0
  37. package/.agent/skills/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
  38. package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +202 -0
  39. package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +203 -0
  40. package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
  41. package/.agent/skills/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +132 -0
  42. package/.agent/skills/compound-docs/SKILL.md +510 -0
  43. package/.agent/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  44. package/.agent/skills/compound-docs/assets/resolution-template.md +93 -0
  45. package/.agent/skills/compound-docs/references/yaml-schema.md +65 -0
  46. package/.agent/skills/compound-docs/schema.yaml +176 -0
  47. package/.agent/skills/create-agent-skills/SKILL.md +299 -0
  48. package/.agent/skills/create-agent-skills/references/api-security.md +226 -0
  49. package/.agent/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  50. package/.agent/skills/create-agent-skills/references/best-practices.md +404 -0
  51. package/.agent/skills/create-agent-skills/references/common-patterns.md +595 -0
  52. package/.agent/skills/create-agent-skills/references/core-principles.md +437 -0
  53. package/.agent/skills/create-agent-skills/references/executable-code.md +175 -0
  54. package/.agent/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  55. package/.agent/skills/create-agent-skills/references/official-spec.md +185 -0
  56. package/.agent/skills/create-agent-skills/references/recommended-structure.md +168 -0
  57. package/.agent/skills/create-agent-skills/references/skill-structure.md +372 -0
  58. package/.agent/skills/create-agent-skills/references/using-scripts.md +113 -0
  59. package/.agent/skills/create-agent-skills/references/using-templates.md +112 -0
  60. package/.agent/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  61. package/.agent/skills/create-agent-skills/templates/router-skill.md +73 -0
  62. package/.agent/skills/create-agent-skills/templates/simple-skill.md +33 -0
  63. package/.agent/skills/create-agent-skills/workflows/add-reference.md +96 -0
  64. package/.agent/skills/create-agent-skills/workflows/add-script.md +93 -0
  65. package/.agent/skills/create-agent-skills/workflows/add-template.md +74 -0
  66. package/.agent/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  67. package/.agent/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  68. package/.agent/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  69. package/.agent/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  70. package/.agent/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  71. package/.agent/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  72. package/.agent/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  73. package/.agent/skills/data-integrity-guardian/SKILL.md +70 -0
  74. package/.agent/skills/data-migration-expert/SKILL.md +97 -0
  75. package/.agent/skills/deployment-verification-agent/SKILL.md +159 -0
  76. package/.agent/skills/design-implementation-reviewer/SKILL.md +85 -0
  77. package/.agent/skills/design-iterator/SKILL.md +197 -0
  78. package/.agent/skills/dhh-rails-reviewer/SKILL.md +45 -0
  79. package/.agent/skills/dhh-rails-style/SKILL.md +184 -0
  80. package/.agent/skills/dhh-rails-style/references/architecture.md +653 -0
  81. package/.agent/skills/dhh-rails-style/references/controllers.md +303 -0
  82. package/.agent/skills/dhh-rails-style/references/frontend.md +510 -0
  83. package/.agent/skills/dhh-rails-style/references/gems.md +266 -0
  84. package/.agent/skills/dhh-rails-style/references/models.md +359 -0
  85. package/.agent/skills/dhh-rails-style/references/testing.md +338 -0
  86. package/.agent/skills/dspy-ruby/SKILL.md +594 -0
  87. package/.agent/skills/dspy-ruby/assets/config-template.rb +359 -0
  88. package/.agent/skills/dspy-ruby/assets/module-template.rb +326 -0
  89. package/.agent/skills/dspy-ruby/assets/signature-template.rb +143 -0
  90. package/.agent/skills/dspy-ruby/references/core-concepts.md +265 -0
  91. package/.agent/skills/dspy-ruby/references/optimization.md +623 -0
  92. package/.agent/skills/dspy-ruby/references/providers.md +305 -0
  93. package/.agent/skills/every-style-editor/SKILL.md +134 -0
  94. package/.agent/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  95. package/.agent/skills/figma-design-sync/SKILL.md +166 -0
  96. package/.agent/skills/file-todos/SKILL.md +251 -0
  97. package/.agent/skills/file-todos/assets/todo-template.md +155 -0
  98. package/.agent/skills/framework-docs-researcher/SKILL.md +83 -0
  99. package/.agent/skills/frontend-design/SKILL.md +42 -0
  100. package/.agent/skills/gemini-imagegen/SKILL.md +237 -0
  101. package/.agent/skills/gemini-imagegen/requirements.txt +2 -0
  102. package/.agent/skills/gemini-imagegen/scripts/compose_images.py +168 -0
  103. package/.agent/skills/gemini-imagegen/scripts/edit_image.py +157 -0
  104. package/.agent/skills/gemini-imagegen/scripts/gemini_images.py +265 -0
  105. package/.agent/skills/gemini-imagegen/scripts/generate_image.py +147 -0
  106. package/.agent/skills/gemini-imagegen/scripts/multi_turn_chat.py +215 -0
  107. package/.agent/skills/git-history-analyzer/SKILL.md +42 -0
  108. package/.agent/skills/git-worktree/SKILL.md +302 -0
  109. package/.agent/skills/git-worktree/scripts/worktree-manager.sh +345 -0
  110. package/.agent/skills/julik-frontend-races-reviewer/SKILL.md +222 -0
  111. package/.agent/skills/kieran-python-reviewer/SKILL.md +104 -0
  112. package/.agent/skills/kieran-rails-reviewer/SKILL.md +86 -0
  113. package/.agent/skills/kieran-typescript-reviewer/SKILL.md +95 -0
  114. package/.agent/skills/lint/SKILL.md +16 -0
  115. package/.agent/skills/pattern-recognition-specialist/SKILL.md +57 -0
  116. package/.agent/skills/performance-oracle/SKILL.md +110 -0
  117. package/.agent/skills/pr-comment-resolver/SKILL.md +69 -0
  118. package/.agent/skills/rclone/SKILL.md +150 -0
  119. package/.agent/skills/rclone/scripts/check_setup.sh +60 -0
  120. package/.agent/skills/repo-research-analyst/SKILL.md +113 -0
  121. package/.agent/skills/security-sentinel/SKILL.md +93 -0
  122. package/.agent/skills/skill-creator/SKILL.md +209 -0
  123. package/.agent/skills/skill-creator/scripts/init_skill.py +304 -0
  124. package/.agent/skills/skill-creator/scripts/package_skill.py +112 -0
  125. package/.agent/skills/skill-creator/scripts/quick_validate.py +72 -0
  126. package/.agent/skills/spec-flow-analyzer/SKILL.md +113 -0
  127. package/.agent/skills/test-agent/SKILL.md +4 -0
  128. package/.agent/workflows/agent-native-audit.md +277 -0
  129. package/.agent/workflows/ask-user-question.md +21 -0
  130. package/.agent/workflows/changelog.md +137 -0
  131. package/.agent/workflows/compound.md +202 -0
  132. package/.agent/workflows/create-agent-skill.md +8 -0
  133. package/.agent/workflows/deepen-plan-research.md +334 -0
  134. package/.agent/workflows/deepen-plan-synthesis.md +182 -0
  135. package/.agent/workflows/deepen-plan.md +79 -0
  136. package/.agent/workflows/feature-video.md +342 -0
  137. package/.agent/workflows/generate-command.md +162 -0
  138. package/.agent/workflows/heal-skill.md +142 -0
  139. package/.agent/workflows/lfg.md +20 -0
  140. package/.agent/workflows/plan-analysis.md +67 -0
  141. package/.agent/workflows/plan-next-steps.md +63 -0
  142. package/.agent/workflows/plan-review.md +33 -0
  143. package/.agent/workflows/plan-synthesis.md +106 -0
  144. package/.agent/workflows/plan.md +49 -0
  145. package/.agent/workflows/report-bug.md +150 -0
  146. package/.agent/workflows/reproduce-bug.md +99 -0
  147. package/.agent/workflows/resolve-parallel.md +34 -0
  148. package/.agent/workflows/resolve-pr-parallel.md +49 -0
  149. package/.agent/workflows/resolve-todo-parallel.md +35 -0
  150. package/.agent/workflows/review-analysis.md +145 -0
  151. package/.agent/workflows/review-synthesis.md +262 -0
  152. package/.agent/workflows/review.md +64 -0
  153. package/.agent/workflows/ship.md +90 -0
  154. package/.agent/workflows/test-command.md +3 -0
  155. package/.agent/workflows/triage.md +310 -0
  156. package/.agent/workflows/work.md +157 -0
  157. package/.agent/workflows/xcode-test.md +332 -0
  158. package/LICENSE +22 -0
  159. package/README.md +49 -0
  160. package/bin/ag-cortex.js +54 -0
  161. package/lib/core.js +165 -0
  162. package/package.json +31 -0
@@ -0,0 +1,262 @@
1
+ ---
2
+ name: review-synthesis
3
+ description: "Internal sub-workflow for the Review Synthesis phase. Synthesizes findings and generates artifacts."
4
+ ---
5
+
6
+ # Review - Synthesis Phase
7
+
8
+ <review_target> #$ARGUMENTS </review_target>
9
+
10
+ ## Main Tasks
11
+
12
+ ### 1. Findings Synthesis and Todo Creation Using file-todos Skill
13
+
14
+ <critical_requirement> ALL findings MUST be stored in the todos/ directory using the file-todos skill. Create todo files immediately after synthesis - do NOT present findings for user approval first. Use the skill for structured todo management. </critical_requirement>
15
+
16
+ #### Step 1: Synthesize All Findings
17
+
18
+ <thinking>
19
+ Consolidate all agent reports into a categorized list of findings.
20
+ Remove duplicates, prioritize by severity and impact.
21
+ </thinking>
22
+
23
+ <synthesis_tasks>
24
+ - [ ] Collect findings from all parallel agents
25
+ - [ ] Categorize by type: security, performance, architecture, quality, etc.
26
+ - [ ] Assign severity levels: 🔴 CRITICAL (P1), 🟡 IMPORTANT (P2), 🔵 NICE-TO-HAVE (P3)
27
+ - [ ] Remove duplicate or overlapping findings
28
+ - [ ] Estimate effort for each finding (Small/Medium/Large)
29
+ </synthesis_tasks>
30
+
31
+ #### Step 2: Create Todo Files Using file-todos Skill
32
+
33
+ <critical_instruction> Use the file-todos skill to create todo files for ALL findings immediately. Do NOT present findings one-by-one asking for user approval. Create all todo files in parallel using the skill, then summarize results to user. </critical_instruction>
34
+
35
+ **Implementation Options:**
36
+
37
+ **Option A: Direct File Creation (Fast)**
38
+ - Create todo files directly using Write tool
39
+ - All findings in parallel for speed
40
+ - Use standard template from `.agent/skills/file-todos/assets/todo-template.md`
41
+ - Follow naming convention: `{issue_id}-pending-{priority}-{description}.md`
42
+
43
+ **Option B: Sub-Agents in Parallel (Recommended for Scale)** For large PRs with 15+ findings, use sub-agents to create finding files in parallel:
44
+
45
+ ```bash
46
+ # Launch multiple finding-creator agents in parallel
47
+ Task() - Create todos for first finding
48
+ Task() - Create todos for second finding
49
+ Task() - Create todos for third finding
50
+ etc. for each finding.
51
+ ```
52
+
53
+ Sub-agents can:
54
+ - Process multiple findings simultaneously
55
+ - Write detailed todo files with all sections filled
56
+ - Organize findings by severity
57
+ - Create comprehensive Proposed Solutions
58
+ - Add acceptance criteria and work logs
59
+ - Complete much faster than sequential processing
60
+
61
+ **Process (Using file-todos Skill):**
62
+
63
+ 1. For each finding:
64
+ - Determine severity (P1/P2/P3)
65
+ - Write detailed Problem Statement and Findings
66
+ - Create 2-3 Proposed Solutions with pros/cons/effort/risk
67
+ - Estimate effort (Small/Medium/Large)
68
+ - Add acceptance criteria and work log
69
+
70
+ 2. Use file-todos skill for structured todo management:
71
+ ```bash
72
+ skill: file-todos
73
+ ```
74
+ The skill provides:
75
+ - Template location: `.agent/skills/file-todos/assets/todo-template.md`
76
+ - Naming convention: `{issue_id}-{status}-{priority}-{description}.md`
77
+ - YAML frontmatter structure: status, priority, issue_id, tags, dependencies
78
+ - All required sections: Problem Statement, Findings, Solutions, etc.
79
+
80
+ 3. Create todo files in parallel:
81
+ ```bash
82
+ {next_id}-pending-{priority}-{description}.md
83
+ ```
84
+
85
+ 4. Examples:
86
+ ```
87
+ 001-pending-p1-path-traversal-vulnerability.md
88
+ 002-pending-p1-api-response-validation.md
89
+ 003-pending-p2-concurrency-limit.md
90
+ 004-pending-p3-unused-parameter.md
91
+ ```
92
+
93
+ 5. Follow template structure from file-todos skill: `.agent/skills/file-todos/assets/todo-template.md`
94
+
95
+ **Todo File Structure (from template):**
96
+
97
+ Each todo must include:
98
+ - **YAML frontmatter**: status, priority, issue_id, tags, dependencies
99
+ - **Problem Statement**: What's broken/missing, why it matters
100
+ - **Findings**: Discoveries from agents with evidence/location
101
+ - **Proposed Solutions**: 2-3 options, each with pros/cons/effort/risk
102
+ - **Recommended Action**: (Filled during triage, leave blank initially)
103
+ - **Technical Details**: Affected files, components, database changes
104
+ - **Acceptance Criteria**: Testable checklist items
105
+ - **Work Log**: Dated record with actions and learnings
106
+ - **Resources**: Links to PR, issues, documentation, similar patterns
107
+
108
+ **Status values:**
109
+ - `pending` - New findings, needs triage/decision
110
+ - `ready` - Approved by manager, ready to work
111
+ - `complete` - Work finished
112
+
113
+ **Priority values:**
114
+ - `p1` - Critical (blocks merge, security/data issues)
115
+ - `p2` - Important (should fix, architectural/performance)
116
+ - `p3` - Nice-to-have (enhancements, cleanup)
117
+
118
+ **Tagging:** Always add `code-review` tag, plus: `security`, `performance`, `architecture`, `rails`, `quality`, etc.
119
+
120
+ #### Step 3: Summary Report
121
+
122
+ After creating all todo files, present comprehensive summary:
123
+
124
+ ````markdown
125
+ ## ✅ Code Review Complete
126
+
127
+ **Review Target:** PR #XXXX - [PR Title] **Branch:** [branch-name]
128
+
129
+ ### Findings Summary:
130
+
131
+ - **Total Findings:** [X]
132
+ - **🔴 CRITICAL (P1):** [count] - BLOCKS MERGE
133
+ - **🟡 IMPORTANT (P2):** [count] - Should Fix
134
+ - **🔵 NICE-TO-HAVE (P3):** [count] - Enhancements
135
+
136
+ ### Created Todo Files:
137
+
138
+ **P1 - Critical (BLOCKS MERGE):**
139
+ - `001-pending-p1-{finding}.md` - {description}
140
+ - `002-pending-p1-{finding}.md` - {description}
141
+
142
+ **P2 - Important:**
143
+ - `003-pending-p2-{finding}.md` - {description}
144
+
145
+ **P3 - Nice-to-Have:**
146
+ - `005-pending-p3-{finding}.md` - {description}
147
+
148
+ ### Review Agents Used:
149
+ - kieran-rails-reviewer
150
+ - security-sentinel
151
+ - [other agents]
152
+
153
+ ### Next Steps:
154
+
155
+ 1. **Address P1 Findings**: CRITICAL - must be fixed before merge
156
+ - Review each P1 todo in detail
157
+ - Implement fixes or request exemption
158
+ - Verify fixes before merging PR
159
+
160
+ 2. **Triage All Todos**:
161
+ ```bash
162
+ ls todos/*-pending-*.md # View all pending todos
163
+ /triage # Use slash command for interactive triage
164
+ ```
165
+
166
+ 3. **Work on Approved Todos**:
167
+ ```bash
168
+ /resolve_todo_parallel # Fix all approved items efficiently
169
+ ```
170
+
171
+ 4. **Track Progress**:
172
+ - Rename file when status changes: pending → ready → complete
173
+ - Update Work Log as you work
174
+ - Commit todos: `git add todos/ && git commit -m "refactor: add code review findings"`
175
+ ````
176
+
177
+ ### 2. End-to-End Testing (Optional)
178
+
179
+ <detect_project_type>
180
+
181
+ **First, detect the project type from PR files:**
182
+
183
+ | Indicator | Project Type |
184
+ |-----------|--------------|
185
+ | `*.xcodeproj`, `*.xcworkspace`, `Package.swift` (iOS) | iOS/macOS |
186
+ | `Gemfile`, `package.json`, `app/views/*`, `*.html.*` | Web |
187
+ | Both iOS files AND web files | Hybrid (test both) |
188
+
189
+ </detect_project_type>
190
+
191
+ <offer_testing>
192
+
193
+ After presenting the Summary Report, offer appropriate testing based on project type:
194
+
195
+ **For Web Projects:**
196
+ ```markdown
197
+ **"Want to run agent-browser tests on the affected pages?"**
198
+ 1. Yes - run `/test-browser`
199
+ 2. No - skip
200
+ ```
201
+
202
+ **For iOS Projects:**
203
+ ```markdown
204
+ **"Want to run Xcode simulator tests on the app?"**
205
+ 1. Yes - run `/xcode-test`
206
+ 2. No - skip
207
+ ```
208
+
209
+ **For Hybrid Projects (e.g., Rails + Hotwire Native):**
210
+ ```markdown
211
+ **"Want to run end-to-end tests?"**
212
+ 1. Web only - run `/test-browser`
213
+ 2. iOS only - run `/xcode-test`
214
+ 3. Both - run both commands
215
+ 4. No - skip
216
+ ```
217
+
218
+ </offer_testing>
219
+
220
+ #### If User Accepts Web Testing:
221
+
222
+ Spawn a subagent to run agent-browser tests (preserves main context):
223
+
224
+ ```
225
+ Task general-purpose("Run /test-browser for PR #[number]. Test all affected pages, check for console errors, handle failures by creating todos and fixing.")
226
+ ```
227
+
228
+ The subagent will:
229
+ 1. Identify pages affected by the PR
230
+ 2. Navigate to each page and capture snapshots
231
+ 3. Check for console errors
232
+ 4. Test critical interactions
233
+ 5. Pause for human verification on OAuth/email/payment flows
234
+ 6. Create P1 todos for any failures
235
+ 7. Fix and retry until all tests pass
236
+
237
+ **Standalone:** `/test-browser [PR number]`
238
+
239
+ #### If User Accepts iOS Testing:
240
+
241
+ Spawn a subagent to run Xcode tests (preserves main context):
242
+
243
+ ```
244
+ Task general-purpose("Run /xcode-test for scheme [name]. Build for simulator, install, launch, take screenshots, check for crashes.")
245
+ ```
246
+
247
+ The subagent will:
248
+ 1. Verify XcodeBuildMCP is installed
249
+ 2. Discover project and schemes
250
+ 3. Build for iOS Simulator
251
+ 4. Install and launch app
252
+ 5. Take screenshots of key screens
253
+ 6. Capture console logs for errors
254
+ 7. Pause for human verification (Sign in with Apple, push, IAP)
255
+ 8. Create P1 todos for any failures
256
+ 9. Fix and retry until all tests pass
257
+
258
+ **Standalone:** `/xcode-test [scheme]`
259
+
260
+ ### 3. Important: P1 Findings Block Merge
261
+
262
+ Any **🔴 P1 (CRITICAL)** findings must be addressed before merging the PR. Present these prominently and ensure they're resolved before accepting the PR.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: review
3
+ description: Perform exhaustive code reviews using multi-agent analysis, ultra-thinking, and worktrees
4
+ argument-hint: "[PR number, GitHub URL, branch name, or latest]"
5
+ ---
6
+
7
+ # Review Command - Orchestrator
8
+
9
+ <command_purpose> Coordinator for exhaustive code reviews. Delegates analysis and synthesis to sub-workflows. </command_purpose>
10
+
11
+ ## Introduction
12
+
13
+ <role>Senior Code Review Architect</role>
14
+
15
+ ## Prerequisites
16
+
17
+ <requirements>
18
+ - Git repository with GitHub CLI (`gh`) installed
19
+ - Clean main/master branch
20
+ - Proper permissions
21
+ </requirements>
22
+
23
+ ## Main Tasks
24
+
25
+ ### 1. Determine Review Target & Setup
26
+
27
+ <review_target> #$ARGUMENTS </review_target>
28
+
29
+ <thinking>
30
+ Determine review target and ensure environment is ready.
31
+ </thinking>
32
+
33
+ #### Actions:
34
+
35
+ - [ ] **Identify Target**:
36
+ - PR number / URL / File path / Empty (current branch)
37
+ - [ ] **Check Branch**:
38
+ - If ALREADY on PR branch → proceed.
39
+ - If DIFFERENT branch → offer `skill: git-worktree` for isolation.
40
+ - [ ] **Fetch Metadata**:
41
+ - `gh pr view --json title,body,files,headRefName`
42
+ - [ ] **Checkout**:
43
+ - Ensure we are on the correct branch/worktree.
44
+
45
+ **Verification:**
46
+ Execute `git status` and `gh pr view` to confirm we are inspecting the correct code.
47
+
48
+ ### 2. Perform Comprehensive Analysis
49
+
50
+ <thinking>
51
+ Delegate deep analysis to the Analysis Sub-Workflow.
52
+ Passing arguments: #$ARGUMENTS
53
+ </thinking>
54
+
55
+ Call /review-analysis(#$ARGUMENTS)
56
+
57
+ ### 3. Synthesize and Report
58
+
59
+ <thinking>
60
+ Delegate synthesis, artifact creation, and reporting to the Synthesis Sub-Workflow.
61
+ Passing arguments: #$ARGUMENTS
62
+ </thinking>
63
+
64
+ Call /review-synthesis(#$ARGUMENTS)
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: ship
3
+ description: Securely ship code with security scans, local verification, and PR creation.
4
+ argument-hint: "None"
5
+ ---
6
+
7
+ # Ship It - Secure Delivery Workflow
8
+
9
+ This workflow handles the safe delivery of code: committing, checking for secrets, pushing, and creating a PR.
10
+
11
+ ## Workflow Steps
12
+
13
+ ### 1. Create Commit
14
+
15
+ ```bash
16
+ git add .
17
+ git status # Review what's being committed
18
+ git diff --staged # Check the changes
19
+
20
+ # Commit with conventional format
21
+ git commit -m "$(cat <<'EOF'
22
+ feat(scope): description of what and why
23
+
24
+ Brief explanation if needed.
25
+
26
+ 🤖 Generated with [Antigravity](http://antigravity.google/)
27
+
28
+ Co-Authored-By: Antigravity <noreply@antigravity.google>
29
+ EOF
30
+ )"
31
+ ```
32
+
33
+ ### 2. Prepare Review Packet & Security Scan
34
+
35
+ **Security Check (Fail Fast):**
36
+ Before asking for review, scan for common secrets to prevent accidental leaks.
37
+
38
+ ```bash
39
+ # Quick grep for obvious secrets (API keys, tokens)
40
+ if grep -rE "sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{20,}|xox[baprs]-[a-zA-Z0-9]{10,}" . --exclude-dir={.git,node_modules,vendor,tmp}; then
41
+ echo "❌ CRITICAL: Possible secrets detected! Workflow aborted."
42
+ echo "Please clean up the history/files before proceeding."
43
+ exit 1
44
+ fi
45
+ ```
46
+
47
+ **Capture Screenshots (Local Only):**
48
+ For UI changes, capture screenshots to a local directory.
49
+
50
+ ```bash
51
+ mkdir -p tmp/screenshots
52
+ # If dev server is needed: bin/dev
53
+ # agent-browser open http://localhost:3000/...
54
+ # agent-browser screenshot tmp/screenshots/after.png
55
+ echo "Screenshots saved to $(pwd)/tmp/screenshots/"
56
+ ```
57
+
58
+ ### 3. Push & PR
59
+
60
+ **Security & Verification Passed. Shipping...**
61
+
62
+
63
+ ### 4. Push & PR
64
+
65
+
66
+
67
+ ```bash
68
+ git push -u origin HEAD
69
+
70
+ gh pr create --title "Feature: [Description from commit]" --body "$(cat <<'EOF'
71
+ ## Summary
72
+ - What was built
73
+ - Why it was needed
74
+
75
+ ## Testing
76
+ - Tests added/modified
77
+
78
+ ## Verification
79
+ - Local screenshots passed verification
80
+ - Security scan passed
81
+
82
+ ---
83
+
84
+ [![Antigravity Cortex](https://img.shields.io/badge/Antigravity-Cortex-6366f1)](https://github.com/i3ringit/antigravity-cortex) 🤖 Generated with [Antigravity](http://antigravity.google/)
85
+ EOF
86
+ )"
87
+ ```
88
+
89
+ ## Success
90
+ Notify the user that the PR is live.
@@ -0,0 +1,3 @@
1
+ ---
2
+ description: A test command
3
+ ---