@fro.bot/systematic 1.18.7 → 1.19.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/agents/docs/ankane-readme-writer.md +67 -0
- package/agents/review/julik-frontend-races-reviewer.md +223 -0
- package/agents/review/kieran-python-reviewer.md +135 -0
- package/agents/review/schema-drift-detector.md +156 -0
- package/agents/workflow/every-style-editor.md +66 -0
- package/commands/agent-native-audit.md +4 -2
- package/commands/changelog.md +139 -0
- package/commands/create-agent-skill.md +5 -2
- package/commands/deepen-plan.md +50 -20
- package/commands/deploy-docs.md +120 -0
- package/commands/feature-video.md +352 -0
- package/commands/generate_command.md +164 -0
- package/commands/heal-skill.md +149 -0
- package/commands/lfg.md +14 -8
- package/commands/report-bug.md +151 -0
- package/commands/reproduce-bug.md +100 -0
- package/commands/resolve_parallel.md +36 -0
- package/commands/resolve_todo_parallel.md +37 -0
- package/commands/slfg.md +33 -0
- package/commands/test-browser.md +340 -0
- package/commands/test-xcode.md +333 -0
- package/commands/triage.md +311 -0
- package/commands/workflows/brainstorm.md +6 -1
- package/commands/workflows/compound.md +16 -13
- package/commands/workflows/plan.md +49 -1
- package/commands/workflows/review.md +28 -24
- package/commands/workflows/work.md +60 -25
- package/package.json +1 -1
- package/skills/andrew-kane-gem-writer/SKILL.md +185 -0
- package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/skills/dhh-rails-style/SKILL.md +186 -0
- package/skills/dhh-rails-style/references/architecture.md +653 -0
- package/skills/dhh-rails-style/references/controllers.md +303 -0
- package/skills/dhh-rails-style/references/frontend.md +510 -0
- package/skills/dhh-rails-style/references/gems.md +266 -0
- package/skills/dhh-rails-style/references/models.md +359 -0
- package/skills/dhh-rails-style/references/testing.md +338 -0
- package/skills/dspy-ruby/SKILL.md +738 -0
- package/skills/dspy-ruby/assets/config-template.rb +187 -0
- package/skills/dspy-ruby/assets/module-template.rb +300 -0
- package/skills/dspy-ruby/assets/signature-template.rb +221 -0
- package/skills/dspy-ruby/references/core-concepts.md +674 -0
- package/skills/dspy-ruby/references/observability.md +366 -0
- package/skills/dspy-ruby/references/optimization.md +603 -0
- package/skills/dspy-ruby/references/providers.md +418 -0
- package/skills/dspy-ruby/references/toolsets.md +502 -0
- package/skills/every-style-editor/SKILL.md +135 -0
- package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/skills/gemini-imagegen/SKILL.md +238 -0
- package/skills/gemini-imagegen/requirements.txt +2 -0
- package/skills/gemini-imagegen/scripts/compose_images.py +157 -0
- package/skills/gemini-imagegen/scripts/edit_image.py +144 -0
- package/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/skills/gemini-imagegen/scripts/generate_image.py +133 -0
- package/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/skills/rclone/SKILL.md +151 -0
- package/skills/rclone/scripts/check_setup.sh +60 -0
- package/skills/resolve-pr-parallel/SKILL.md +90 -0
- package/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
- package/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
- package/skills/setup/SKILL.md +168 -0
- package/skills/skill-creator/SKILL.md +211 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +65 -0
|
@@ -178,6 +178,7 @@ Select how comprehensive you want the issue to be, simpler is mostly better.
|
|
|
178
178
|
---
|
|
179
179
|
title: [Issue Title]
|
|
180
180
|
type: [feat|fix|refactor]
|
|
181
|
+
status: active
|
|
181
182
|
date: YYYY-MM-DD
|
|
182
183
|
---
|
|
183
184
|
|
|
@@ -230,6 +231,7 @@ end
|
|
|
230
231
|
---
|
|
231
232
|
title: [Issue Title]
|
|
232
233
|
type: [feat|fix|refactor]
|
|
234
|
+
status: active
|
|
233
235
|
date: YYYY-MM-DD
|
|
234
236
|
---
|
|
235
237
|
|
|
@@ -253,6 +255,14 @@ date: YYYY-MM-DD
|
|
|
253
255
|
- Performance implications
|
|
254
256
|
- Security considerations
|
|
255
257
|
|
|
258
|
+
## System-Wide Impact
|
|
259
|
+
|
|
260
|
+
- **Interaction graph**: [What callbacks/middleware/observers fire when this runs?]
|
|
261
|
+
- **Error propagation**: [How do errors flow across layers? Do retry strategies align?]
|
|
262
|
+
- **State lifecycle risks**: [Can partial failure leave orphaned/inconsistent state?]
|
|
263
|
+
- **API surface parity**: [What other interfaces expose similar functionality and need the same change?]
|
|
264
|
+
- **Integration test scenarios**: [Cross-layer scenarios that unit tests won't catch]
|
|
265
|
+
|
|
256
266
|
## Acceptance Criteria
|
|
257
267
|
|
|
258
268
|
- [ ] Detailed requirement 1
|
|
@@ -294,6 +304,7 @@ date: YYYY-MM-DD
|
|
|
294
304
|
---
|
|
295
305
|
title: [Issue Title]
|
|
296
306
|
type: [feat|fix|refactor]
|
|
307
|
+
status: active
|
|
297
308
|
date: YYYY-MM-DD
|
|
298
309
|
---
|
|
299
310
|
|
|
@@ -341,6 +352,28 @@ date: YYYY-MM-DD
|
|
|
341
352
|
|
|
342
353
|
[Other solutions evaluated and why rejected]
|
|
343
354
|
|
|
355
|
+
## System-Wide Impact
|
|
356
|
+
|
|
357
|
+
### Interaction Graph
|
|
358
|
+
|
|
359
|
+
[Map the chain reaction: what callbacks, middleware, observers, and event handlers fire when this code runs? Trace at least two levels deep. Document: "Action X triggers Y, which calls Z, which persists W."]
|
|
360
|
+
|
|
361
|
+
### Error & Failure Propagation
|
|
362
|
+
|
|
363
|
+
[Trace errors from lowest layer up. List specific error classes and where they're handled. Identify retry conflicts, unhandled error types, and silent failure swallowing.]
|
|
364
|
+
|
|
365
|
+
### State Lifecycle Risks
|
|
366
|
+
|
|
367
|
+
[Walk through each step that persists state. Can partial failure orphan rows, duplicate records, or leave caches stale? Document cleanup mechanisms or their absence.]
|
|
368
|
+
|
|
369
|
+
### API Surface Parity
|
|
370
|
+
|
|
371
|
+
[List all interfaces (classes, DSLs, endpoints) that expose equivalent functionality. Note which need updating and which share the code path.]
|
|
372
|
+
|
|
373
|
+
### Integration Test Scenarios
|
|
374
|
+
|
|
375
|
+
[3-5 cross-layer test scenarios that unit tests with mocks would never catch. Include expected behavior for each.]
|
|
376
|
+
|
|
344
377
|
## Acceptance Criteria
|
|
345
378
|
|
|
346
379
|
### Functional Requirements
|
|
@@ -472,6 +505,20 @@ end
|
|
|
472
505
|
- [ ] Add names of files in pseudo code examples and todo lists
|
|
473
506
|
- [ ] Add an ERD mermaid diagram if applicable for new model changes
|
|
474
507
|
|
|
508
|
+
## Write Plan File
|
|
509
|
+
|
|
510
|
+
**REQUIRED: Write the plan file to disk before presenting any options.**
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
mkdir -p docs/plans/
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Use the write tool to save the complete plan to `docs/plans/YYYY-MM-DD-<type>-<descriptive-name>-plan.md`. This step is mandatory and cannot be skipped — even when running as part of LFG/SLFG or other automated pipelines.
|
|
517
|
+
|
|
518
|
+
Confirm: "Plan written to docs/plans/[filename]"
|
|
519
|
+
|
|
520
|
+
**Pipeline mode:** If invoked from an automated workflow (LFG, SLFG, or any `disable-model-invocation` context), skip all question calls. Make decisions automatically and proceed to writing the plan without interactive prompts.
|
|
521
|
+
|
|
475
522
|
## Output Format
|
|
476
523
|
|
|
477
524
|
**Filename:** Use the date and kebab-case filename from Step 2 Title & Categorization.
|
|
@@ -501,7 +548,7 @@ After writing the plan file, use the **question tool** to present these options:
|
|
|
501
548
|
3. **Run `/technical_review`** - Technical feedback from code-focused reviewers (DHH, Kieran, Simplicity)
|
|
502
549
|
4. **Review and refine** - Improve the document through structured self-review
|
|
503
550
|
5. **Start `/workflows:work`** - Begin implementing this plan locally
|
|
504
|
-
|
|
551
|
+
7. **Create Issue** - Create issue in project tracker (GitHub/Linear)
|
|
505
552
|
|
|
506
553
|
Based on selection:
|
|
507
554
|
- **Open plan in editor** → Run `open docs/plans/<plan_filename>.md` to open the file in the user's default editor
|
|
@@ -509,6 +556,7 @@ Based on selection:
|
|
|
509
556
|
- **`/technical_review`** → Call the /technical_review command with the plan file path
|
|
510
557
|
- **Review and refine** → Load `document-review` skill.
|
|
511
558
|
- **`/workflows:work`** → Call the /workflows:work command with the plan file path
|
|
559
|
+
- **`/workflows:work` on remote** → Run `/workflows:work docs/plans/<plan_filename>.md &` to start work in background
|
|
512
560
|
- **Create Issue** → See "Issue Creation" section below
|
|
513
561
|
- **Other** (automatically provided) → Accept free text for rework or specific changes
|
|
514
562
|
|
|
@@ -31,7 +31,7 @@ argument-hint: '[PR number, GitHub URL, branch name, or latest]'
|
|
|
31
31
|
First, I need to determine the review target type and set up the code for analysis.
|
|
32
32
|
</thinking>
|
|
33
33
|
|
|
34
|
-
#### Immediate Actions
|
|
34
|
+
#### Immediate Actions:
|
|
35
35
|
|
|
36
36
|
<task_list>
|
|
37
37
|
|
|
@@ -59,45 +59,48 @@ The following paths are systematic pipeline artifacts and must never be flagged
|
|
|
59
59
|
If a review agent flags any file in these directories for cleanup or removal, discard that finding during synthesis. Do not create a todo for it.
|
|
60
60
|
</protected_artifacts>
|
|
61
61
|
|
|
62
|
-
####
|
|
62
|
+
#### Load Review Agents
|
|
63
|
+
|
|
64
|
+
Read `systematic.local.md` in the project root. If found, use `review_agents` from YAML frontmatter. If the markdown body contains review context, pass it to each agent as additional instructions.
|
|
65
|
+
|
|
66
|
+
If no settings file exists, invoke the `setup` skill to create one. Then read the newly created file and continue.
|
|
67
|
+
|
|
68
|
+
#### Parallel Agents to review the PR:
|
|
63
69
|
|
|
64
70
|
<parallel_tasks>
|
|
65
71
|
|
|
66
|
-
Run
|
|
72
|
+
Run all configured review agents in parallel using task tool. For each agent in the `review_agents` list:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Task {agent-name}(PR content + review context from settings body)
|
|
76
|
+
```
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
4. task git-history-analyzer(PR content)
|
|
72
|
-
5. task pattern-recognition-specialist(PR content)
|
|
73
|
-
6. task architecture-strategist(PR content)
|
|
74
|
-
7. task security-sentinel(PR content)
|
|
75
|
-
8. task performance-oracle(PR content)
|
|
76
|
-
9. task data-integrity-guardian(PR content)
|
|
77
|
-
10. task agent-native-reviewer(PR content) - Verify new features are agent-accessible
|
|
78
|
-
11. task code-simplicity-reviewer(PR content)
|
|
78
|
+
Additionally, always run these regardless of settings:
|
|
79
|
+
- task agent-native-reviewer(PR content) - Verify new features are agent-accessible
|
|
80
|
+
- task learnings-researcher(PR content) - Search docs/solutions/ for past issues related to this PR's modules and patterns
|
|
79
81
|
|
|
80
82
|
</parallel_tasks>
|
|
81
83
|
|
|
82
|
-
#### Conditional Agents (Run if applicable)
|
|
84
|
+
#### Conditional Agents (Run if applicable):
|
|
83
85
|
|
|
84
86
|
<conditional_agents>
|
|
85
87
|
|
|
86
88
|
These agents are run ONLY when the PR matches specific criteria. Check the PR files list to determine if they apply:
|
|
87
89
|
|
|
88
|
-
**If PR contains database migrations
|
|
90
|
+
**MIGRATIONS: If PR contains database migrations, schema.rb, or data backfills:**
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
- task schema-drift-detector(PR content) - Detects unrelated schema.rb changes by cross-referencing against included migrations (run FIRST)
|
|
93
|
+
- task data-migration-expert(PR content) - Validates ID mappings match production, checks for swapped values, verifies rollback safety
|
|
94
|
+
- task deployment-verification-agent(PR content) - Creates Go/No-Go deployment checklist with SQL verification queries
|
|
92
95
|
|
|
93
|
-
**When to run
|
|
94
|
-
- PR includes files matching `db/migrate/*.rb`
|
|
96
|
+
**When to run:**
|
|
97
|
+
- PR includes files matching `db/migrate/*.rb` or `db/schema.rb`
|
|
95
98
|
- PR modifies columns that store IDs, enums, or mappings
|
|
96
99
|
- PR includes data backfill scripts or rake tasks
|
|
97
|
-
- PR changes how data is read/written (e.g., changing from FK to string column)
|
|
98
100
|
- PR title/body mentions: migration, backfill, data transformation, ID mapping
|
|
99
101
|
|
|
100
102
|
**What these agents check:**
|
|
103
|
+
- `schema-drift-detector`: Cross-references schema.rb changes against PR migrations to catch unrelated columns/indexes from local database state
|
|
101
104
|
- `data-migration-expert`: Verifies hard-coded mappings match production reality (prevents swapped IDs), checks for orphaned associations, validates dual-write patterns
|
|
102
105
|
- `deployment-verification-agent`: Produces executable pre/post-deploy checklists with SQL queries, rollback procedures, and monitoring plans
|
|
103
106
|
|
|
@@ -216,6 +219,7 @@ Remove duplicates, prioritize by severity and impact.
|
|
|
216
219
|
<synthesis_tasks>
|
|
217
220
|
|
|
218
221
|
- [ ] Collect findings from all parallel agents
|
|
222
|
+
- [ ] Surface learnings-researcher results: if past solutions are relevant, flag them as "Known Pattern" with links to docs/solutions/ files
|
|
219
223
|
- [ ] Discard any findings that recommend deleting or gitignoring files in `docs/plans/` or `docs/solutions/` (see Protected Artifacts above)
|
|
220
224
|
- [ ] Categorize by type: security, performance, architecture, quality, etc.
|
|
221
225
|
- [ ] Assign severity levels: 🔴 CRITICAL (P1), 🟡 IMPORTANT (P2), 🔵 NICE-TO-HAVE (P3)
|
|
@@ -410,7 +414,7 @@ After creating all todo files, present comprehensive summary:
|
|
|
410
414
|
- Update Work Log as you work
|
|
411
415
|
- Commit todos: `git add todos/ && git commit -m "refactor: add code review findings"`
|
|
412
416
|
|
|
413
|
-
### Severity Breakdown
|
|
417
|
+
### Severity Breakdown:
|
|
414
418
|
|
|
415
419
|
**🔴 P1 (Critical - Blocks Merge):**
|
|
416
420
|
|
|
@@ -478,7 +482,7 @@ After presenting the Summary Report, offer appropriate testing based on project
|
|
|
478
482
|
|
|
479
483
|
</offer_testing>
|
|
480
484
|
|
|
481
|
-
#### If User Accepts Web Testing
|
|
485
|
+
#### If User Accepts Web Testing:
|
|
482
486
|
|
|
483
487
|
Spawn a subagent to run browser tests (preserves main context):
|
|
484
488
|
|
|
@@ -497,7 +501,7 @@ The subagent will:
|
|
|
497
501
|
|
|
498
502
|
**Standalone:** `/test-browser [PR number]`
|
|
499
503
|
|
|
500
|
-
#### If User Accepts iOS Testing
|
|
504
|
+
#### If User Accepts iOS Testing:
|
|
501
505
|
|
|
502
506
|
Spawn a subagent to run Xcode tests (preserves main context):
|
|
503
507
|
|
|
@@ -87,17 +87,32 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
87
87
|
|
|
88
88
|
```
|
|
89
89
|
while (tasks remain):
|
|
90
|
-
|
|
90
|
+
- Mark task as in_progress in todowrite
|
|
91
91
|
- Read any referenced files from the plan
|
|
92
92
|
- Look for similar patterns in codebase
|
|
93
93
|
- Implement following existing conventions
|
|
94
94
|
- Write tests for new functionality
|
|
95
|
+
- Run System-Wide Test Check (see below)
|
|
95
96
|
- Run tests after changes
|
|
96
|
-
|
|
97
|
+
- Mark task as completed in todowrite
|
|
97
98
|
- Mark off the corresponding checkbox in the plan file ([ ] → [x])
|
|
98
99
|
- Evaluate for incremental commit (see below)
|
|
99
100
|
```
|
|
100
101
|
|
|
102
|
+
**System-Wide Test Check** — Before marking a task done, pause and ask:
|
|
103
|
+
|
|
104
|
+
| Question | What to do |
|
|
105
|
+
|----------|------------|
|
|
106
|
+
| **What fires when this runs?** Callbacks, middleware, observers, event handlers — trace two levels out from your change. | Read the actual code (not docs) for callbacks on models you touch, middleware in the request chain, `after_*` hooks. |
|
|
107
|
+
| **Do my tests exercise the real chain?** If every dependency is mocked, the test proves your logic works *in isolation* — it says nothing about the interaction. | Write at least one integration test that uses real objects through the full callback/middleware chain. No mocks for the layers that interact. |
|
|
108
|
+
| **Can failure leave orphaned state?** If your code persists state (DB row, cache, file) before calling an external service, what happens when the service fails? Does retry create duplicates? | Trace the failure path with real objects. If state is created before the risky call, test that failure cleans up or that retry is idempotent. |
|
|
109
|
+
| **What other interfaces expose this?** Mixins, DSLs, alternative entry points (Agent vs Chat vs ChatMethods). | Grep for the method/behavior in related classes. If parity is needed, add it now — not as a follow-up. |
|
|
110
|
+
| **Do error strategies align across layers?** Retry middleware + application fallback + framework error handling — do they conflict or create double execution? | List the specific error classes at each layer. Verify your rescue list matches what the lower layer actually raises. |
|
|
111
|
+
|
|
112
|
+
**When to skip:** Leaf-node changes with no callbacks, no state persistence, no parallel interfaces. If the change is purely additive (new helper method, new view partial), the check takes 10 seconds and the answer is "nothing fires, skip."
|
|
113
|
+
|
|
114
|
+
**When this matters most:** Any change that touches models with callbacks, error handling with fallback/retry, or functionality exposed through multiple interfaces.
|
|
115
|
+
|
|
101
116
|
**IMPORTANT**: Always update the original plan document by checking off completed items. Use the edit tool to change `- [ ]` to `- [x]` for each task you finish. This keeps the plan as a living document showing progress and ensures no checkboxes are left unchecked.
|
|
102
117
|
|
|
103
118
|
2. **Incremental Commits**
|
|
@@ -134,7 +149,7 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
134
149
|
- The plan should reference similar code - read those files first
|
|
135
150
|
- Match naming conventions exactly
|
|
136
151
|
- Reuse existing components where possible
|
|
137
|
-
|
|
152
|
+
- Follow project coding standards (see AGENTS.md)
|
|
138
153
|
- When in doubt, grep for similar implementations
|
|
139
154
|
|
|
140
155
|
4. **Test Continuously**
|
|
@@ -143,6 +158,7 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
143
158
|
- Don't wait until the end to test
|
|
144
159
|
- Fix failures immediately
|
|
145
160
|
- Add new tests for new functionality
|
|
161
|
+
- **Unit tests with mocks prove logic in isolation. Integration tests with real objects prove the layers work together.** If your change touches callbacks, middleware, or error handling — you need both.
|
|
146
162
|
|
|
147
163
|
5. **Figma Design Sync** (if applicable)
|
|
148
164
|
|
|
@@ -169,28 +185,15 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
169
185
|
# Run full test suite (use project's test command)
|
|
170
186
|
# Examples: bin/rails test, npm test, pytest, go test, etc.
|
|
171
187
|
|
|
172
|
-
|
|
188
|
+
# Run linting (per project conventions)
|
|
173
189
|
# Use linting-agent before pushing to origin
|
|
174
190
|
```
|
|
175
191
|
|
|
176
192
|
2. **Consider Reviewer Agents** (Optional)
|
|
177
193
|
|
|
178
|
-
Use for complex, risky, or large changes
|
|
179
|
-
|
|
180
|
-
- **code-simplicity-reviewer**: Check for unnecessary complexity
|
|
181
|
-
- **kieran-rails-reviewer**: Verify Rails conventions (Rails projects)
|
|
182
|
-
- **performance-oracle**: Check for performance issues
|
|
183
|
-
- **security-sentinel**: Scan for security vulnerabilities
|
|
184
|
-
- **cora-test-reviewer**: Review test quality (Rails projects with comprehensive test coverage)
|
|
185
|
-
|
|
186
|
-
Run reviewers in parallel with task tool:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
task(code-simplicity-reviewer): "Review changes for simplicity"
|
|
190
|
-
task(kieran-rails-reviewer): "Check Rails conventions"
|
|
191
|
-
```
|
|
194
|
+
Use for complex, risky, or large changes. Read agents from `systematic.local.md` frontmatter (`review_agents`). If no settings file, invoke the `setup` skill to create one.
|
|
192
195
|
|
|
193
|
-
Present findings
|
|
196
|
+
Run configured agents in parallel with task tool. Present findings and address critical issues.
|
|
194
197
|
|
|
195
198
|
3. **Final Validation**
|
|
196
199
|
- All todowrite tasks marked completed
|
|
@@ -200,6 +203,16 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
200
203
|
- Figma designs match (if applicable)
|
|
201
204
|
- No console errors or warnings
|
|
202
205
|
|
|
206
|
+
4. **Prepare Operational Validation Plan** (REQUIRED)
|
|
207
|
+
- Add a `## Post-Deploy Monitoring & Validation` section to the PR description for every change.
|
|
208
|
+
- Include concrete:
|
|
209
|
+
- Log queries/search terms
|
|
210
|
+
- Metrics or dashboards to watch
|
|
211
|
+
- Expected healthy signals
|
|
212
|
+
- Failure signals and rollback/mitigation trigger
|
|
213
|
+
- Validation window and owner
|
|
214
|
+
- If there is truly no production/runtime impact, still include the section with: `No additional operational monitoring required` and a one-line reason.
|
|
215
|
+
|
|
203
216
|
### Phase 4: Ship It
|
|
204
217
|
|
|
205
218
|
1. **Create Commit**
|
|
@@ -215,9 +228,9 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
215
228
|
|
|
216
229
|
Brief explanation if needed.
|
|
217
230
|
|
|
218
|
-
|
|
231
|
+
🤖 Generated with [OpenCode](https://opencode.ai)
|
|
219
232
|
|
|
220
|
-
|
|
233
|
+
Co-Authored-By: Claude <noreply@opencode.ai>
|
|
221
234
|
EOF
|
|
222
235
|
)"
|
|
223
236
|
```
|
|
@@ -269,6 +282,22 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
269
282
|
- Tests added/modified
|
|
270
283
|
- Manual testing performed
|
|
271
284
|
|
|
285
|
+
## Post-Deploy Monitoring & Validation
|
|
286
|
+
- **What to monitor/search**
|
|
287
|
+
- Logs:
|
|
288
|
+
- Metrics/Dashboards:
|
|
289
|
+
- **Validation checks (queries/commands)**
|
|
290
|
+
- `command or query here`
|
|
291
|
+
- **Expected healthy behavior**
|
|
292
|
+
- Expected signal(s)
|
|
293
|
+
- **Failure signal(s) / rollback trigger**
|
|
294
|
+
- Trigger + immediate action
|
|
295
|
+
- **Validation window & owner**
|
|
296
|
+
- Window:
|
|
297
|
+
- Owner:
|
|
298
|
+
- **If no operational impact**
|
|
299
|
+
- `No additional operational monitoring required: <reason>`
|
|
300
|
+
|
|
272
301
|
## Before / After Screenshots
|
|
273
302
|
| Before | After |
|
|
274
303
|
|--------|-------|
|
|
@@ -279,12 +308,19 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
279
308
|
|
|
280
309
|
---
|
|
281
310
|
|
|
282
|
-
|
|
311
|
+
[](https://github.com/marcusrbrown/systematic) 🤖 Generated with [OpenCode](https://opencode.ai)
|
|
283
312
|
EOF
|
|
284
313
|
)"
|
|
285
314
|
```
|
|
286
315
|
|
|
287
|
-
4. **
|
|
316
|
+
4. **Update Plan Status**
|
|
317
|
+
|
|
318
|
+
If the input document has YAML frontmatter with a `status` field, update it to `completed`:
|
|
319
|
+
```
|
|
320
|
+
status: active → status: completed
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
5. **Notify User**
|
|
288
324
|
- Summarize what was completed
|
|
289
325
|
- Link to PR
|
|
290
326
|
- Note any follow-up work needed
|
|
@@ -294,8 +330,6 @@ This command takes a work document (plan, specification, or todo file) and execu
|
|
|
294
330
|
|
|
295
331
|
## Swarm Mode (Optional)
|
|
296
332
|
|
|
297
|
-
> **Note:** Swarm mode coordination primitives (`Teammate` API — team creation, shutdown signals, cleanup) are not yet available in OpenCode. The concepts below are aspirational. For current parallel execution, use the `task` tool with multiple background subagents, or see the `dispatching-parallel-agents` skill.
|
|
298
|
-
|
|
299
333
|
For complex plans with multiple independent workstreams, enable swarm mode for parallel execution with coordinated agents.
|
|
300
334
|
|
|
301
335
|
### When to Use Swarm Mode
|
|
@@ -409,6 +443,7 @@ Before creating PR, verify:
|
|
|
409
443
|
- [ ] Figma designs match implementation (if applicable)
|
|
410
444
|
- [ ] Before/after screenshots captured and uploaded (for UI changes)
|
|
411
445
|
- [ ] Commit messages follow conventional format
|
|
446
|
+
- [ ] PR description includes Post-Deploy Monitoring & Validation section (or explicit no-impact rationale)
|
|
412
447
|
- [ ] PR description includes summary, testing notes, and screenshots
|
|
413
448
|
- [ ] PR description includes Systematic badge
|
|
414
449
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: andrew-kane-gem-writer
|
|
3
|
+
description: This skill should be used when writing Ruby gems following Andrew Kane's proven patterns and philosophy. It applies when creating new Ruby gems, refactoring existing gems, designing gem APIs, or when clean, minimal, production-ready Ruby library code is needed. Triggers on requests like "create a gem", "write a Ruby library", "design a gem API", or mentions of Andrew Kane's style.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Andrew Kane Gem Writer
|
|
7
|
+
|
|
8
|
+
Write Ruby gems following Andrew Kane's battle-tested patterns from 100+ gems with 374M+ downloads (Searchkick, PgHero, Chartkick, Strong Migrations, Lockbox, Ahoy, Blazer, Groupdate, Neighbor, Blind Index).
|
|
9
|
+
|
|
10
|
+
## Core Philosophy
|
|
11
|
+
|
|
12
|
+
**Simplicity over cleverness.** Zero or minimal dependencies. Explicit code over metaprogramming. Rails integration without Rails coupling. Every pattern serves production use cases.
|
|
13
|
+
|
|
14
|
+
## Entry Point Structure
|
|
15
|
+
|
|
16
|
+
Every gem follows this exact pattern in `lib/gemname.rb`:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
# 1. Dependencies (stdlib preferred)
|
|
20
|
+
require "forwardable"
|
|
21
|
+
|
|
22
|
+
# 2. Internal modules
|
|
23
|
+
require_relative "gemname/model"
|
|
24
|
+
require_relative "gemname/version"
|
|
25
|
+
|
|
26
|
+
# 3. Conditional Rails (CRITICAL - never require Rails directly)
|
|
27
|
+
require_relative "gemname/railtie" if defined?(Rails)
|
|
28
|
+
|
|
29
|
+
# 4. Module with config and errors
|
|
30
|
+
module GemName
|
|
31
|
+
class Error < StandardError; end
|
|
32
|
+
class InvalidConfigError < Error; end
|
|
33
|
+
|
|
34
|
+
class << self
|
|
35
|
+
attr_accessor :timeout, :logger
|
|
36
|
+
attr_writer :client
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
self.timeout = 10 # Defaults set immediately
|
|
40
|
+
end
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Class Macro DSL Pattern
|
|
44
|
+
|
|
45
|
+
The signature Kane pattern—single method call configures everything:
|
|
46
|
+
|
|
47
|
+
```ruby
|
|
48
|
+
# Usage
|
|
49
|
+
class Product < ApplicationRecord
|
|
50
|
+
searchkick word_start: [:name]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Implementation
|
|
54
|
+
module GemName
|
|
55
|
+
module Model
|
|
56
|
+
def gemname(**options)
|
|
57
|
+
unknown = options.keys - KNOWN_KEYWORDS
|
|
58
|
+
raise ArgumentError, "unknown keywords: #{unknown.join(", ")}" if unknown.any?
|
|
59
|
+
|
|
60
|
+
mod = Module.new
|
|
61
|
+
mod.module_eval do
|
|
62
|
+
define_method :some_method do
|
|
63
|
+
# implementation
|
|
64
|
+
end unless method_defined?(:some_method)
|
|
65
|
+
end
|
|
66
|
+
include mod
|
|
67
|
+
|
|
68
|
+
class_eval do
|
|
69
|
+
cattr_reader :gemname_options, instance_reader: false
|
|
70
|
+
class_variable_set :@@gemname_options, options.dup
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Rails Integration
|
|
78
|
+
|
|
79
|
+
**Always use `ActiveSupport.on_load`—never require Rails gems directly:**
|
|
80
|
+
|
|
81
|
+
```ruby
|
|
82
|
+
# WRONG
|
|
83
|
+
require "active_record"
|
|
84
|
+
ActiveRecord::Base.include(MyGem::Model)
|
|
85
|
+
|
|
86
|
+
# CORRECT
|
|
87
|
+
ActiveSupport.on_load(:active_record) do
|
|
88
|
+
extend GemName::Model
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Use prepend for behavior modification
|
|
92
|
+
ActiveSupport.on_load(:active_record) do
|
|
93
|
+
ActiveRecord::Migration.prepend(GemName::Migration)
|
|
94
|
+
end
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Configuration Pattern
|
|
98
|
+
|
|
99
|
+
Use `class << self` with `attr_accessor`, not Configuration objects:
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
module GemName
|
|
103
|
+
class << self
|
|
104
|
+
attr_accessor :timeout, :logger
|
|
105
|
+
attr_writer :master_key
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def self.master_key
|
|
109
|
+
@master_key ||= ENV["GEMNAME_MASTER_KEY"]
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
self.timeout = 10
|
|
113
|
+
self.logger = nil
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Error Handling
|
|
118
|
+
|
|
119
|
+
Simple hierarchy with informative messages:
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
module GemName
|
|
123
|
+
class Error < StandardError; end
|
|
124
|
+
class ConfigError < Error; end
|
|
125
|
+
class ValidationError < Error; end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Validate early with ArgumentError
|
|
129
|
+
def initialize(key:)
|
|
130
|
+
raise ArgumentError, "Key must be 32 bytes" unless key&.bytesize == 32
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Testing (Minitest Only)
|
|
135
|
+
|
|
136
|
+
```ruby
|
|
137
|
+
# test/test_helper.rb
|
|
138
|
+
require "bundler/setup"
|
|
139
|
+
Bundler.require(:default)
|
|
140
|
+
require "minitest/autorun"
|
|
141
|
+
require "minitest/pride"
|
|
142
|
+
|
|
143
|
+
# test/model_test.rb
|
|
144
|
+
class ModelTest < Minitest::Test
|
|
145
|
+
def test_basic_functionality
|
|
146
|
+
assert_equal expected, actual
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Gemspec Pattern
|
|
152
|
+
|
|
153
|
+
Zero runtime dependencies when possible:
|
|
154
|
+
|
|
155
|
+
```ruby
|
|
156
|
+
Gem::Specification.new do |spec|
|
|
157
|
+
spec.name = "gemname"
|
|
158
|
+
spec.version = GemName::VERSION
|
|
159
|
+
spec.required_ruby_version = ">= 3.1"
|
|
160
|
+
spec.files = Dir["*.{md,txt}", "{lib}/**/*"]
|
|
161
|
+
spec.require_path = "lib"
|
|
162
|
+
# NO add_dependency lines - dev deps go in Gemfile
|
|
163
|
+
end
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Anti-Patterns to Avoid
|
|
167
|
+
|
|
168
|
+
- `method_missing` (use `define_method` instead)
|
|
169
|
+
- Configuration objects (use class accessors)
|
|
170
|
+
- `@@class_variables` (use `class << self`)
|
|
171
|
+
- Requiring Rails gems directly
|
|
172
|
+
- Many runtime dependencies
|
|
173
|
+
- Committing Gemfile.lock in gems
|
|
174
|
+
- RSpec (use Minitest)
|
|
175
|
+
- Heavy DSLs (prefer explicit Ruby)
|
|
176
|
+
|
|
177
|
+
## Reference Files
|
|
178
|
+
|
|
179
|
+
For deeper patterns, see:
|
|
180
|
+
- **[references/module-organization.md](references/module-organization.md)** - Directory layouts, method decomposition
|
|
181
|
+
- **[references/rails-integration.md](references/rails-integration.md)** - Railtie, Engine, on_load patterns
|
|
182
|
+
- **[references/database-adapters.md](references/database-adapters.md)** - Multi-database support patterns
|
|
183
|
+
- **[references/testing-patterns.md](references/testing-patterns.md)** - Multi-version testing, CI setup
|
|
184
|
+
- **[references/resources.md](references/resources.md)** - Links to Kane's repos and articles
|
|
185
|
+
|