@fro.bot/systematic 1.21.2 → 1.22.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.
@@ -155,7 +155,7 @@ For each relevant document, return a summary in this format:
155
155
 
156
156
  ## Frontmatter Schema Reference
157
157
 
158
- Reference the yaml-schema.md in the compound-docs skill references for the complete schema. Key enum values:
158
+ Reference the [yaml-schema.md](../../skills/compound-docs/references/yaml-schema.md) for the complete schema. Key enum values:
159
159
 
160
160
  **problem_type values:**
161
161
  - build_error, test_failure, runtime_error, performance_issue
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: ce:brainstorm
3
+ description: Explore requirements and approaches through collaborative dialogue before planning implementation
4
+ argument-hint: "[feature idea or problem to explore]"
5
+ ---
6
+
7
+ # Brainstorm a Feature or Improvement
8
+
9
+ **Note: The current year is 2026.** Use this when dating brainstorm documents.
10
+
11
+ Brainstorming helps answer **WHAT** to build through collaborative dialogue. It precedes `/ce:plan`, which answers **HOW** to build it.
12
+
13
+ **Process knowledge:** Load the `brainstorming` skill for detailed question techniques, approach exploration patterns, and YAGNI principles.
14
+
15
+ ## Feature Description
16
+
17
+ <feature_description> #$ARGUMENTS </feature_description>
18
+
19
+ **If the feature description above is empty, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
20
+
21
+ Do not proceed until you have a feature description from the user.
22
+
23
+ ## Execution Flow
24
+
25
+ ### Phase 0: Assess Requirements Clarity
26
+
27
+ Evaluate whether brainstorming is needed based on the feature description.
28
+
29
+ **Clear requirements indicators:**
30
+ - Specific acceptance criteria provided
31
+ - Referenced existing patterns to follow
32
+ - Described exact expected behavior
33
+ - Constrained, well-defined scope
34
+
35
+ **If requirements are already clear:**
36
+ Use **AskUserQuestion tool** to suggest: "Your requirements seem detailed enough to proceed directly to planning. Should I run `/ce:plan` instead, or would you like to explore the idea further?"
37
+
38
+ ### Phase 1: Understand the Idea
39
+
40
+ #### 1.1 Repository Research (Lightweight)
41
+
42
+ Run a quick repo scan to understand existing patterns:
43
+
44
+ - task repo-research-analyst("Understand existing patterns related to: <feature_description>")
45
+
46
+ Focus on: similar features, established patterns, AGENTS.md guidance.
47
+
48
+ #### 1.2 Collaborative Dialogue
49
+
50
+ Use the **AskUserQuestion tool** to ask questions **one at a time**.
51
+
52
+ **Guidelines (see `brainstorming` skill for detailed techniques):**
53
+ - Prefer multiple choice when natural options exist
54
+ - Start broad (purpose, users) then narrow (constraints, edge cases)
55
+ - Validate assumptions explicitly
56
+ - Ask about success criteria
57
+
58
+ **Exit condition:** Continue until the idea is clear OR user says "proceed"
59
+
60
+ ### Phase 2: Explore Approaches
61
+
62
+ Propose **2-3 concrete approaches** based on research and conversation.
63
+
64
+ For each approach, provide:
65
+ - Brief description (2-3 sentences)
66
+ - Pros and cons
67
+ - When it's best suited
68
+
69
+ Lead with your recommendation and explain why. Apply YAGNI—prefer simpler solutions.
70
+
71
+ Use **AskUserQuestion tool** to ask which approach the user prefers.
72
+
73
+ ### Phase 3: Capture the Design
74
+
75
+ Write a brainstorm document to `docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md`.
76
+
77
+ **Document structure:** See the `brainstorming` skill for the template format. Key sections: What We're Building, Why This Approach, Key Decisions, Open Questions.
78
+
79
+ Ensure `docs/brainstorms/` directory exists before writing.
80
+
81
+ **IMPORTANT:** Before proceeding to Phase 4, check if there are any Open Questions listed in the brainstorm document. If there are open questions, YOU MUST ask the user about each one using AskUserQuestion before offering to proceed to planning. Move resolved questions to a "Resolved Questions" section.
82
+
83
+ ### Phase 4: Handoff
84
+
85
+ Use **AskUserQuestion tool** to present next steps:
86
+
87
+ **Question:** "Brainstorm captured. What would you like to do next?"
88
+
89
+ **Options:**
90
+ 1. **Review and refine** - Improve the document through structured self-review
91
+ 2. **Proceed to planning** - Run `/ce:plan` (will auto-detect this brainstorm)
92
+ 3. **Share to Proof** - Upload to Proof for collaborative review and sharing
93
+ 4. **Ask more questions** - I have more questions to clarify before moving on
94
+ 5. **Done for now** - Return later
95
+
96
+ **If user selects "Share to Proof":**
97
+
98
+ ```bash
99
+ CONTENT=$(cat docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md)
100
+ TITLE="Brainstorm: <topic title>"
101
+ RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown \
102
+ -H "Content-Type: application/json" \
103
+ -d "$(jq -n --arg title "$TITLE" --arg markdown "$CONTENT" --arg by "ai:systematic" '{title: $title, markdown: $markdown, by: $by}')")
104
+ PROOF_URL=$(echo "$RESPONSE" | jq -r '.tokenUrl')
105
+ ```
106
+
107
+ Display the URL prominently: `View & collaborate in Proof: <PROOF_URL>`
108
+
109
+ If the curl fails, skip silently. Then return to the Phase 4 options.
110
+
111
+ **If user selects "Ask more questions":** YOU (the AI) return to Phase 1.2 (Collaborative Dialogue) and continue asking the USER questions one at a time to further refine the design. The user wants YOU to probe deeper - ask about edge cases, constraints, preferences, or areas not yet explored. Continue until the user is satisfied, then return to Phase 4.
112
+
113
+ **If user selects "Review and refine":**
114
+
115
+ Load the `document-review` skill and apply it to the brainstorm document.
116
+
117
+ When document-review returns "Review complete", present next steps:
118
+
119
+ 1. **Move to planning** - Continue to `/ce:plan` with this document
120
+ 2. **Done for now** - Brainstorming complete. To start planning later: `/ce:plan [document-path]`
121
+
122
+ ## Output Summary
123
+
124
+ When complete, display:
125
+
126
+ ```
127
+ Brainstorm complete!
128
+
129
+ Document: docs/brainstorms/YYYY-MM-DD-<topic>-brainstorm.md
130
+
131
+ Key decisions:
132
+ - [Decision 1]
133
+ - [Decision 2]
134
+
135
+ Next: Run `/ce:plan` when ready to implement.
136
+ ```
137
+
138
+ ## Important Guidelines
139
+
140
+ - **Stay focused on WHAT, not HOW** - Implementation details belong in the plan
141
+ - **Ask one question at a time** - Don't overwhelm
142
+ - **Apply YAGNI** - Prefer simpler approaches
143
+ - **Keep outputs concise** - 200-300 words per section max
144
+
145
+ NEVER CODE! Just explore and document decisions.
@@ -0,0 +1,240 @@
1
+ ---
2
+ name: ce:compound
3
+ description: Document a recently solved problem to compound your team's knowledge
4
+ argument-hint: "[optional: brief context about the fix]"
5
+ ---
6
+
7
+ # /compound
8
+
9
+ Coordinate multiple subagents working in parallel to document a recently solved problem.
10
+
11
+ ## Purpose
12
+
13
+ Captures problem solutions while context is fresh, creating structured documentation in `docs/solutions/` with YAML frontmatter for searchability and future reference. Uses parallel subagents for maximum efficiency.
14
+
15
+ **Why "compound"?** Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ /ce:compound # Document the most recent fix
21
+ /ce:compound [brief context] # Provide additional context hint
22
+ ```
23
+
24
+ ## Execution Strategy: Two-Phase Orchestration
25
+
26
+ <critical_requirement>
27
+ **Only ONE file gets written - the final documentation.**
28
+
29
+ Phase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator (Phase 2) writes the final documentation file.
30
+ </critical_requirement>
31
+
32
+ ### Phase 1: Parallel Research
33
+
34
+ <parallel_tasks>
35
+
36
+ Launch these subagents IN PARALLEL. Each returns text data to the orchestrator.
37
+
38
+ #### 1. **Context Analyzer**
39
+ - Extracts conversation history
40
+ - Identifies problem type, component, symptoms
41
+ - Validates against schema
42
+ - Returns: YAML frontmatter skeleton
43
+
44
+ #### 2. **Solution Extractor**
45
+ - Analyzes all investigation steps
46
+ - Identifies root cause
47
+ - Extracts working solution with code examples
48
+ - Returns: Solution content block
49
+
50
+ #### 3. **Related Docs Finder**
51
+ - Searches `docs/solutions/` for related documentation
52
+ - Identifies cross-references and links
53
+ - Finds related GitHub issues
54
+ - Returns: Links and relationships
55
+
56
+ #### 4. **Prevention Strategist**
57
+ - Develops prevention strategies
58
+ - Creates best practices guidance
59
+ - Generates test cases if applicable
60
+ - Returns: Prevention/testing content
61
+
62
+ #### 5. **Category Classifier**
63
+ - Determines optimal `docs/solutions/` category
64
+ - Validates category against schema
65
+ - Suggests filename based on slug
66
+ - Returns: Final path and filename
67
+
68
+ </parallel_tasks>
69
+
70
+ ### Phase 2: Assembly & Write
71
+
72
+ <sequential_tasks>
73
+
74
+ **WAIT for all Phase 1 subagents to complete before proceeding.**
75
+
76
+ The orchestrating agent (main conversation) performs these steps:
77
+
78
+ 1. Collect all text results from Phase 1 subagents
79
+ 2. Assemble complete markdown file from the collected pieces
80
+ 3. Validate YAML frontmatter against schema
81
+ 4. Create directory if needed: `mkdir -p docs/solutions/[category]/`
82
+ 5. Write the SINGLE final file: `docs/solutions/[category]/[filename].md`
83
+
84
+ </sequential_tasks>
85
+
86
+ ### Phase 3: Optional Enhancement
87
+
88
+ **WAIT for Phase 2 to complete before proceeding.**
89
+
90
+ <parallel_tasks>
91
+
92
+ Based on problem type, optionally invoke specialized agents to review the documentation:
93
+
94
+ - **performance_issue** → `performance-oracle`
95
+ - **security_issue** → `security-sentinel`
96
+ - **database_issue** → `data-integrity-guardian`
97
+ - **test_failure** → `cora-test-reviewer`
98
+ - Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`
99
+
100
+ </parallel_tasks>
101
+
102
+ ## What It Captures
103
+
104
+ - **Problem symptom**: Exact error messages, observable behavior
105
+ - **Investigation steps tried**: What didn't work and why
106
+ - **Root cause analysis**: Technical explanation
107
+ - **Working solution**: Step-by-step fix with code examples
108
+ - **Prevention strategies**: How to avoid in future
109
+ - **Cross-references**: Links to related issues and docs
110
+
111
+ ## Preconditions
112
+
113
+ <preconditions enforcement="advisory">
114
+ <check condition="problem_solved">
115
+ Problem has been solved (not in-progress)
116
+ </check>
117
+ <check condition="solution_verified">
118
+ Solution has been verified working
119
+ </check>
120
+ <check condition="non_trivial">
121
+ Non-trivial problem (not simple typo or obvious error)
122
+ </check>
123
+ </preconditions>
124
+
125
+ ## What It Creates
126
+
127
+ **Organized documentation:**
128
+
129
+ - File: `docs/solutions/[category]/[filename].md`
130
+
131
+ **Categories auto-detected from problem:**
132
+
133
+ - build-errors/
134
+ - test-failures/
135
+ - runtime-errors/
136
+ - performance-issues/
137
+ - database-issues/
138
+ - security-issues/
139
+ - ui-bugs/
140
+ - integration-issues/
141
+ - logic-errors/
142
+
143
+ ## Common Mistakes to Avoid
144
+
145
+ | ❌ Wrong | ✅ Correct |
146
+ |----------|-----------|
147
+ | Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |
148
+ | Research and assembly run in parallel | Research completes → then assembly runs |
149
+ | Multiple files created during workflow | Single file: `docs/solutions/[category]/[filename].md` |
150
+
151
+ ## Success Output
152
+
153
+ ```
154
+ ✓ Documentation complete
155
+
156
+ Subagent Results:
157
+ ✓ Context Analyzer: Identified performance_issue in brief_system
158
+ ✓ Solution Extractor: 3 code fixes
159
+ ✓ Related Docs Finder: 2 related issues
160
+ ✓ Prevention Strategist: Prevention strategies, test suggestions
161
+ ✓ Category Classifier: `performance-issues`
162
+
163
+ Specialized Agent Reviews (Auto-Triggered):
164
+ ✓ performance-oracle: Validated query optimization approach
165
+ ✓ kieran-rails-reviewer: Code examples meet Rails standards
166
+ ✓ code-simplicity-reviewer: Solution is appropriately minimal
167
+ ✓ every-style-editor: Documentation style verified
168
+
169
+ File created:
170
+ - docs/solutions/performance-issues/n-plus-one-brief-generation.md
171
+
172
+ This documentation will be searchable for future reference when similar
173
+ issues occur in the Email Processing or Brief System modules.
174
+
175
+ What's next?
176
+ 1. Continue workflow (recommended)
177
+ 2. Link related documentation
178
+ 3. Update other references
179
+ 4. View documentation
180
+ 5. Other
181
+ ```
182
+
183
+ ## The Compounding Philosophy
184
+
185
+ This creates a compounding knowledge system:
186
+
187
+ 1. First time you solve "N+1 query in brief generation" → Research (30 min)
188
+ 2. Document the solution → docs/solutions/performance-issues/n-plus-one-briefs.md (5 min)
189
+ 3. Next time similar issue occurs → Quick lookup (2 min)
190
+ 4. Knowledge compounds → Team gets smarter
191
+
192
+ The feedback loop:
193
+
194
+ ```
195
+ Build → Test → Find Issue → Research → Improve → Document → Validate → Deploy
196
+ ↑ ↓
197
+ └──────────────────────────────────────────────────────────────────────┘
198
+ ```
199
+
200
+ **Each unit of engineering work should make subsequent units of work easier—not harder.**
201
+
202
+ ## Auto-Invoke
203
+
204
+ <auto_invoke> <trigger_phrases> - "that worked" - "it's fixed" - "working now" - "problem solved" </trigger_phrases>
205
+
206
+ <manual_override> Use /ce:compound [context] to document immediately without waiting for auto-detection. </manual_override> </auto_invoke>
207
+
208
+ ## Routes To
209
+
210
+ `compound-docs` skill
211
+
212
+ ## Applicable Specialized Agents
213
+
214
+ Based on problem type, these agents can enhance documentation:
215
+
216
+ ### Code Quality & Review
217
+ - **kieran-rails-reviewer**: Reviews code examples for Rails best practices
218
+ - **code-simplicity-reviewer**: Ensures solution code is minimal and clear
219
+ - **pattern-recognition-specialist**: Identifies anti-patterns or repeating issues
220
+
221
+ ### Specific Domain Experts
222
+ - **performance-oracle**: Analyzes performance_issue category solutions
223
+ - **security-sentinel**: Reviews security_issue solutions for vulnerabilities
224
+ - **cora-test-reviewer**: Creates test cases for prevention strategies
225
+ - **data-integrity-guardian**: Reviews database_issue migrations and queries
226
+
227
+ ### Enhancement & Documentation
228
+ - **best-practices-researcher**: Enriches solution with industry best practices
229
+ - **every-style-editor**: Reviews documentation style and clarity
230
+ - **framework-docs-researcher**: Links to Rails/gem documentation references
231
+
232
+ ### When to Invoke
233
+ - **Auto-triggered** (optional): Agents can run post-documentation for enhancement
234
+ - **Manual trigger**: User can invoke agents after /ce:compound completes for deeper review
235
+ - **Customize agents**: Edit `systematic.local.md` or invoke the `setup` skill to configure which review agents are used across all workflows
236
+
237
+ ## Related Commands
238
+
239
+ - `/research [topic]` - Deep investigation (searches docs/solutions/ for patterns)
240
+ - `/ce:plan` - Planning workflow (references documented solutions)