askrobots / dbbasic-compiler
Public
Describe what you want in an intent file; the compiler uses Claude to write the code.
danq9
Add context files - the header files of intent compilation
114b162
1 year, 1 month ago
History
pattern-1957.compressed.json · 1.2 KB · 51 lines
| 1 | { |
| 2 | "pattern_id": "pattern-1957", |
| 3 | "intent_ref": "customer_transactions.intent.md", |
| 4 | "operations": [ |
| 5 | { |
| 6 | "type": "filter", |
| 7 | "description": "Filter transactions older than 90 days" |
| 8 | }, |
| 9 | { |
| 10 | "type": "aggregate", |
| 11 | "description": "Group transactions by customer_id" |
| 12 | }, |
| 13 | { |
| 14 | "type": "aggregate", |
| 15 | "description": "Calculate total spending per customer" |
| 16 | }, |
| 17 | { |
| 18 | "type": "aggregate", |
| 19 | "description": "Calculate average transaction amount per customer" |
| 20 | }, |
| 21 | { |
| 22 | "type": "aggregate", |
| 23 | "description": "Identify most frequent product category per customer" |
| 24 | }, |
| 25 | { |
| 26 | "type": "aggregate", |
| 27 | "description": "Count number of transactions per customer" |
| 28 | }, |
| 29 | { |
| 30 | "type": "flag", |
| 31 | "description": "Flag customers with total spending > $1000 as high_value" |
| 32 | }, |
| 33 | { |
| 34 | "type": "flag", |
| 35 | "description": "Flag customers with no purchases in 30 days as at_risk" |
| 36 | } |
| 37 | ], |
| 38 | "metadata": { |
| 39 | "context": [ |
| 40 | "financial", |
| 41 | "customer-analytics", |
| 42 | "data-processing" |
| 43 | ], |
| 44 | "patterns": [ |
| 45 | "etl", |
| 46 | "aggregation", |
| 47 | "filtering" |
| 48 | ], |
| 49 | "requirement_count": 12 |
| 50 | } |
| 51 | } |