@every-env/compound-plugin 0.2.0 → 0.5.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 (100) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/deploy-docs.yml +3 -3
  4. package/.github/workflows/publish.yml +37 -0
  5. package/README.md +12 -3
  6. package/docs/index.html +13 -13
  7. package/docs/pages/changelog.html +39 -0
  8. package/docs/plans/2026-02-08-feat-convert-local-md-settings-for-opencode-codex-plan.md +143 -0
  9. package/docs/plans/2026-02-08-feat-simplify-plugin-settings-plan.md +195 -0
  10. package/docs/plans/2026-02-08-refactor-reduce-plugin-context-token-usage-plan.md +212 -0
  11. package/docs/plans/2026-02-09-refactor-dspy-ruby-skill-update-plan.md +104 -0
  12. package/docs/plans/2026-02-12-feat-add-cursor-cli-target-provider-plan.md +306 -0
  13. package/docs/specs/cursor.md +85 -0
  14. package/package.json +1 -1
  15. package/plugins/compound-engineering/.claude-plugin/plugin.json +2 -2
  16. package/plugins/compound-engineering/CHANGELOG.md +64 -0
  17. package/plugins/compound-engineering/README.md +5 -3
  18. package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +16 -1
  19. package/plugins/compound-engineering/agents/design/design-iterator.md +28 -1
  20. package/plugins/compound-engineering/agents/design/figma-design-sync.md +19 -1
  21. package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +16 -1
  22. package/plugins/compound-engineering/agents/research/best-practices-researcher.md +16 -1
  23. package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +16 -1
  24. package/plugins/compound-engineering/agents/research/git-history-analyzer.md +16 -1
  25. package/plugins/compound-engineering/agents/research/learnings-researcher.md +22 -1
  26. package/plugins/compound-engineering/agents/research/repo-research-analyst.md +22 -1
  27. package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +16 -1
  28. package/plugins/compound-engineering/agents/review/architecture-strategist.md +16 -1
  29. package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +16 -1
  30. package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +16 -1
  31. package/plugins/compound-engineering/agents/review/data-migration-expert.md +16 -1
  32. package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +16 -1
  33. package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +22 -1
  34. package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +20 -21
  35. package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +30 -1
  36. package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +30 -1
  37. package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +30 -1
  38. package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +16 -1
  39. package/plugins/compound-engineering/agents/review/performance-oracle.md +28 -1
  40. package/plugins/compound-engineering/agents/review/schema-drift-detector.md +16 -1
  41. package/plugins/compound-engineering/agents/review/security-sentinel.md +22 -1
  42. package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +16 -1
  43. package/plugins/compound-engineering/agents/workflow/every-style-editor.md +1 -1
  44. package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +16 -1
  45. package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +22 -1
  46. package/plugins/compound-engineering/commands/agent-native-audit.md +1 -0
  47. package/plugins/compound-engineering/commands/changelog.md +1 -0
  48. package/plugins/compound-engineering/commands/create-agent-skill.md +1 -0
  49. package/plugins/compound-engineering/commands/deploy-docs.md +1 -0
  50. package/plugins/compound-engineering/commands/generate_command.md +1 -0
  51. package/plugins/compound-engineering/commands/heal-skill.md +1 -0
  52. package/plugins/compound-engineering/commands/lfg.md +1 -0
  53. package/plugins/compound-engineering/commands/report-bug.md +1 -0
  54. package/plugins/compound-engineering/commands/reproduce-bug.md +1 -0
  55. package/plugins/compound-engineering/commands/resolve_parallel.md +1 -0
  56. package/plugins/compound-engineering/commands/slfg.md +1 -0
  57. package/plugins/compound-engineering/commands/{xcode-test.md → test-xcode.md} +2 -1
  58. package/plugins/compound-engineering/commands/triage.md +1 -0
  59. package/plugins/compound-engineering/commands/workflows/brainstorm.md +6 -1
  60. package/plugins/compound-engineering/commands/workflows/compound.md +1 -0
  61. package/plugins/compound-engineering/commands/workflows/review.md +23 -21
  62. package/plugins/compound-engineering/commands/workflows/work.md +29 -15
  63. package/plugins/compound-engineering/skills/compound-docs/SKILL.md +1 -0
  64. package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +539 -396
  65. package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +159 -331
  66. package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +210 -236
  67. package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +173 -95
  68. package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +552 -143
  69. package/plugins/compound-engineering/skills/dspy-ruby/references/observability.md +366 -0
  70. package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +440 -460
  71. package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +305 -225
  72. package/plugins/compound-engineering/skills/dspy-ruby/references/toolsets.md +502 -0
  73. package/plugins/compound-engineering/skills/file-todos/SKILL.md +1 -0
  74. package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1 -0
  75. package/plugins/compound-engineering/skills/setup/SKILL.md +168 -0
  76. package/plugins/compound-engineering/skills/skill-creator/SKILL.md +1 -0
  77. package/src/commands/convert.ts +10 -5
  78. package/src/commands/install.ts +10 -5
  79. package/src/converters/claude-to-codex.ts +9 -3
  80. package/src/converters/claude-to-cursor.ts +166 -0
  81. package/src/converters/claude-to-droid.ts +174 -0
  82. package/src/converters/claude-to-opencode.ts +9 -2
  83. package/src/parsers/claude.ts +4 -0
  84. package/src/targets/cursor.ts +48 -0
  85. package/src/targets/droid.ts +50 -0
  86. package/src/targets/index.ts +18 -0
  87. package/src/types/claude.ts +2 -0
  88. package/src/types/cursor.ts +29 -0
  89. package/src/types/droid.ts +20 -0
  90. package/tests/claude-parser.test.ts +24 -2
  91. package/tests/codex-converter.test.ts +100 -0
  92. package/tests/converter.test.ts +76 -0
  93. package/tests/cursor-converter.test.ts +347 -0
  94. package/tests/cursor-writer.test.ts +137 -0
  95. package/tests/droid-converter.test.ts +277 -0
  96. package/tests/droid-writer.test.ts +100 -0
  97. package/tests/fixtures/sample-plugin/commands/disabled-command.md +7 -0
  98. package/tests/fixtures/sample-plugin/skills/disabled-skill/SKILL.md +7 -0
  99. package/plugins/compound-engineering/commands/technical_review.md +0 -7
  100. /package/{plugins/compound-engineering → .claude}/commands/release-docs.md +0 -0
@@ -1,143 +1,221 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Example DSPy Signature Template
4
- # This template demonstrates best practices for creating type-safe signatures
5
-
6
- class ExampleSignature < DSPy::Signature
7
- # Clear, specific description of what this signature does
8
- # Good: "Classify customer support emails into Technical, Billing, or General categories"
9
- # Avoid: "Classify emails"
10
- description "Describe what this signature accomplishes and what output it produces"
3
+ # =============================================================================
4
+ # DSPy.rb Signature Template v0.34.3 API
5
+ #
6
+ # Signatures define the interface between your application and LLMs.
7
+ # They specify inputs, outputs, and task descriptions using Sorbet types.
8
+ #
9
+ # Key patterns:
10
+ # - Use T::Enum classes for controlled outputs (not inline T.enum([...]))
11
+ # - Use description: kwarg on fields to guide the LLM
12
+ # - Use default values for optional fields
13
+ # - Use Date/DateTime/Time for temporal data (auto-converted)
14
+ # - Access results with result.field (not result[:field])
15
+ # - Invoke with predictor.call() (not predictor.forward())
16
+ # =============================================================================
17
+
18
+ # --- Basic Signature ---
19
+
20
+ class SentimentAnalysis < DSPy::Signature
21
+ description "Analyze sentiment of text"
22
+
23
+ class Sentiment < T::Enum
24
+ enums do
25
+ Positive = new('positive')
26
+ Negative = new('negative')
27
+ Neutral = new('neutral')
28
+ end
29
+ end
11
30
 
12
- # Input fields: Define what data the LLM receives
13
31
  input do
14
- # Basic field with description
15
- const :field_name, String, desc: "Clear description of this input field"
32
+ const :text, String
33
+ end
34
+
35
+ output do
36
+ const :sentiment, Sentiment
37
+ const :score, Float, description: "Confidence score from 0.0 to 1.0"
38
+ end
39
+ end
16
40
 
17
- # Numeric fields
18
- const :count, Integer, desc: "Number of items to process"
19
- const :score, Float, desc: "Confidence score between 0.0 and 1.0"
41
+ # Usage:
42
+ # predictor = DSPy::Predict.new(SentimentAnalysis)
43
+ # result = predictor.call(text: "This product is amazing!")
44
+ # result.sentiment # => Sentiment::Positive
45
+ # result.score # => 0.92
20
46
 
21
- # Boolean fields
22
- const :is_active, T::Boolean, desc: "Whether the item is currently active"
47
+ # --- Signature with Date/Time Types ---
23
48
 
24
- # Array fields
25
- const :tags, T::Array[String], desc: "List of tags associated with the item"
49
+ class EventScheduler < DSPy::Signature
50
+ description "Schedule events based on requirements"
26
51
 
27
- # Optional: Enum for constrained values
28
- const :priority, T.enum(["Low", "Medium", "High"]), desc: "Priority level"
52
+ input do
53
+ const :event_name, String
54
+ const :start_date, Date # ISO 8601: YYYY-MM-DD
55
+ const :end_date, T.nilable(Date) # Optional date
56
+ const :preferred_time, DateTime # ISO 8601 with timezone
57
+ const :deadline, Time # Stored as UTC
29
58
  end
30
59
 
31
- # Output fields: Define what data the LLM produces
32
60
  output do
33
- # Primary output
34
- const :result, String, desc: "The main result of the operation"
61
+ const :scheduled_date, Date # LLM returns ISO string, auto-converted
62
+ const :event_datetime, DateTime # Preserves timezone
63
+ const :created_at, Time # Converted to UTC
64
+ end
65
+ end
35
66
 
36
- # Classification result with enum
37
- const :category, T.enum(["Technical", "Billing", "General"]),
38
- desc: "Category classification - must be one of: Technical, Billing, General"
67
+ # Date/Time format handling:
68
+ # Date → ISO 8601 (YYYY-MM-DD)
69
+ # DateTime ISO 8601 with timezone (YYYY-MM-DDTHH:MM:SS+00:00)
70
+ # Time → ISO 8601, automatically converted to UTC
39
71
 
40
- # Confidence/metadata
41
- const :confidence, Float, desc: "Confidence score (0.0-1.0) for this classification"
72
+ # --- Signature with Default Values ---
42
73
 
43
- # Optional reasoning (automatically added by ChainOfThought)
44
- # const :reasoning, String, desc: "Step-by-step reasoning for the classification"
74
+ class SmartSearch < DSPy::Signature
75
+ description "Search with intelligent defaults"
76
+
77
+ input do
78
+ const :query, String
79
+ const :max_results, Integer, default: 10
80
+ const :language, String, default: "English"
81
+ const :include_metadata, T::Boolean, default: false
82
+ end
83
+
84
+ output do
85
+ const :results, T::Array[String]
86
+ const :total_found, Integer
87
+ const :search_time_ms, Float, default: 0.0 # Fallback if LLM omits
88
+ const :cached, T::Boolean, default: false
45
89
  end
46
90
  end
47
91
 
48
- # Example with multimodal input (vision)
49
- class VisionExampleSignature < DSPy::Signature
50
- description "Analyze an image and answer questions about its content"
92
+ # Input defaults reduce boilerplate:
93
+ # search = DSPy::Predict.new(SmartSearch)
94
+ # result = search.call(query: "Ruby programming")
95
+ # # max_results=10, language="English", include_metadata=false are applied
96
+
97
+ # --- Signature with Nested Structs and Field Descriptions ---
98
+
99
+ class EntityExtraction < DSPy::Signature
100
+ description "Extract named entities from text"
101
+
102
+ class EntityType < T::Enum
103
+ enums do
104
+ Person = new('person')
105
+ Organization = new('organization')
106
+ Location = new('location')
107
+ DateEntity = new('date')
108
+ end
109
+ end
110
+
111
+ class Entity < T::Struct
112
+ const :name, String, description: "The entity text as it appears in the source"
113
+ const :type, EntityType
114
+ const :confidence, Float, description: "Extraction confidence from 0.0 to 1.0"
115
+ const :start_offset, Integer, default: 0
116
+ end
51
117
 
52
118
  input do
53
- const :image, DSPy::Image, desc: "The image to analyze"
54
- const :question, String, desc: "Question about the image content"
119
+ const :text, String
120
+ const :entity_types, T::Array[EntityType], default: [],
121
+ description: "Filter to these entity types; empty means all types"
55
122
  end
56
123
 
57
124
  output do
58
- const :answer, String, desc: "Detailed answer to the question about the image"
59
- const :confidence, Float, desc: "Confidence in the answer (0.0-1.0)"
125
+ const :entities, T::Array[Entity]
126
+ const :total_found, Integer
60
127
  end
61
128
  end
62
129
 
63
- # Example for complex analysis task
64
- class SentimentAnalysisSignature < DSPy::Signature
65
- description "Analyze the sentiment of text with nuanced emotion detection"
130
+ # --- Signature with Union Types ---
131
+
132
+ class FlexibleClassification < DSPy::Signature
133
+ description "Classify input with flexible result type"
134
+
135
+ class Category < T::Enum
136
+ enums do
137
+ Technical = new('technical')
138
+ Business = new('business')
139
+ Personal = new('personal')
140
+ end
141
+ end
66
142
 
67
143
  input do
68
- const :text, String, desc: "The text to analyze for sentiment"
69
- const :context, String, desc: "Additional context about the text source or situation"
144
+ const :text, String
70
145
  end
71
146
 
72
147
  output do
73
- const :sentiment, T.enum(["Positive", "Negative", "Neutral", "Mixed"]),
74
- desc: "Overall sentiment - must be Positive, Negative, Neutral, or Mixed"
148
+ const :category, Category
149
+ const :result, T.any(Float, String),
150
+ description: "Numeric score or text explanation depending on classification"
151
+ const :confidence, Float
152
+ end
153
+ end
75
154
 
76
- const :emotions, T::Array[String],
77
- desc: "List of specific emotions detected (e.g., joy, anger, sadness, fear)"
155
+ # --- Signature with Recursive Types ---
78
156
 
79
- const :intensity, T.enum(["Low", "Medium", "High"]),
80
- desc: "Intensity of the detected sentiment"
157
+ class DocumentParser < DSPy::Signature
158
+ description "Parse document into tree structure"
81
159
 
82
- const :confidence, Float,
83
- desc: "Confidence in the sentiment classification (0.0-1.0)"
160
+ class NodeType < T::Enum
161
+ enums do
162
+ Heading = new('heading')
163
+ Paragraph = new('paragraph')
164
+ List = new('list')
165
+ CodeBlock = new('code_block')
166
+ end
84
167
  end
85
- end
86
168
 
87
- # Example for code generation task
88
- class CodeGenerationSignature < DSPy::Signature
89
- description "Generate Ruby code based on natural language requirements"
169
+ class TreeNode < T::Struct
170
+ const :node_type, NodeType, description: "The type of document element"
171
+ const :text, String, default: "", description: "Text content of the node"
172
+ const :level, Integer, default: 0
173
+ const :children, T::Array[TreeNode], default: [] # Self-reference → $defs in JSON Schema
174
+ end
90
175
 
91
176
  input do
92
- const :requirements, String,
93
- desc: "Natural language description of what the code should do"
94
-
95
- const :constraints, String,
96
- desc: "Any specific requirements or constraints (e.g., libraries to use, style preferences)"
177
+ const :html, String, description: "Raw HTML to parse"
97
178
  end
98
179
 
99
180
  output do
100
- const :code, String,
101
- desc: "Complete, working Ruby code that fulfills the requirements"
181
+ const :root, TreeNode
182
+ const :word_count, Integer
183
+ end
184
+ end
185
+
186
+ # The schema generator creates #/$defs/TreeNode references for recursive types,
187
+ # compatible with OpenAI and Gemini structured outputs.
188
+ # Use `default: []` instead of `T.nilable(T::Array[...])` for OpenAI compatibility.
102
189
 
103
- const :explanation, String,
104
- desc: "Brief explanation of how the code works and any important design decisions"
190
+ # --- Vision Signature ---
105
191
 
106
- const :dependencies, T::Array[String],
107
- desc: "List of required gems or dependencies"
192
+ class ImageAnalysis < DSPy::Signature
193
+ description "Analyze an image and answer questions about its content"
194
+
195
+ input do
196
+ const :image, DSPy::Image, description: "The image to analyze"
197
+ const :question, String, description: "Question about the image content"
198
+ end
199
+
200
+ output do
201
+ const :answer, String
202
+ const :confidence, Float, description: "Confidence in the answer (0.0-1.0)"
108
203
  end
109
204
  end
110
205
 
111
- # Usage Examples:
112
- #
113
- # Basic usage with Predict:
114
- # predictor = DSPy::Predict.new(ExampleSignature)
115
- # result = predictor.forward(
116
- # field_name: "example value",
117
- # count: 5,
118
- # score: 0.85,
119
- # is_active: true,
120
- # tags: ["tag1", "tag2"],
121
- # priority: "High"
206
+ # Vision usage:
207
+ # predictor = DSPy::Predict.new(ImageAnalysis)
208
+ # result = predictor.call(
209
+ # image: DSPy::Image.from_file("path/to/image.jpg"),
210
+ # question: "What objects are visible?"
122
211
  # )
123
- # puts result[:result]
124
- # puts result[:category]
125
- # puts result[:confidence]
212
+ # result.answer # => "The image shows..."
213
+
214
+ # --- Accessing Schemas Programmatically ---
126
215
  #
127
- # With Chain of Thought reasoning:
128
- # predictor = DSPy::ChainOfThought.new(SentimentAnalysisSignature)
129
- # result = predictor.forward(
130
- # text: "I absolutely love this product! It exceeded all my expectations.",
131
- # context: "Product review on e-commerce site"
132
- # )
133
- # puts result[:reasoning] # See the LLM's step-by-step thinking
134
- # puts result[:sentiment]
135
- # puts result[:emotions]
216
+ # SentimentAnalysis.input_json_schema # => { type: "object", properties: { ... } }
217
+ # SentimentAnalysis.output_json_schema # => { type: "object", properties: { ... } }
136
218
  #
137
- # With Vision:
138
- # predictor = DSPy::Predict.new(VisionExampleSignature)
139
- # result = predictor.forward(
140
- # image: DSPy::Image.from_file("path/to/image.jpg"),
141
- # question: "What objects are visible in this image?"
142
- # )
143
- # puts result[:answer]
219
+ # # Field descriptions propagate to JSON Schema
220
+ # Entity.field_descriptions[:name] # => "The entity text as it appears in the source"
221
+ # Entity.field_descriptions[:confidence] # => "Extraction confidence from 0.0 to 1.0"