@defai.digital/cli 13.4.3 → 13.4.5

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 (91) hide show
  1. package/bundled/agents/aerospace-scientist.json +114 -0
  2. package/bundled/agents/architecture.json +96 -0
  3. package/bundled/agents/backend.json +125 -0
  4. package/bundled/agents/blockchain-developer.json +114 -0
  5. package/bundled/agents/ceo.json +113 -0
  6. package/bundled/agents/creative-marketer.json +114 -0
  7. package/bundled/agents/cto.json +96 -0
  8. package/bundled/agents/data-scientist.json +96 -0
  9. package/bundled/agents/devops.json +98 -0
  10. package/bundled/agents/frontend.json +118 -0
  11. package/bundled/agents/fullstack.json +99 -0
  12. package/bundled/agents/ml-engineer.json +114 -0
  13. package/bundled/agents/mlops-engineer.json +102 -0
  14. package/bundled/agents/mobile.json +96 -0
  15. package/bundled/agents/product.json +96 -0
  16. package/bundled/agents/quality.json +95 -0
  17. package/bundled/agents/quantum-engineer.json +114 -0
  18. package/bundled/agents/researcher.json +123 -0
  19. package/bundled/agents/reviewer.json +107 -0
  20. package/bundled/agents/security.json +79 -0
  21. package/bundled/agents/standard.json +82 -0
  22. package/bundled/agents/writer.json +78 -0
  23. package/bundled/templates/monorepo/contract-index.ts.hbs +7 -0
  24. package/bundled/templates/monorepo/contract-test.ts.hbs +130 -0
  25. package/bundled/templates/monorepo/contracts-package.json.hbs +29 -0
  26. package/bundled/templates/monorepo/domain-index.ts.hbs +115 -0
  27. package/bundled/templates/monorepo/domain-package.json.hbs +27 -0
  28. package/bundled/templates/monorepo/gitignore.hbs +32 -0
  29. package/bundled/templates/monorepo/invariants.md.hbs +43 -0
  30. package/bundled/templates/monorepo/package.json.hbs +28 -0
  31. package/bundled/templates/monorepo/pnpm-workspace.yaml.hbs +5 -0
  32. package/bundled/templates/monorepo/schema.ts.hbs +82 -0
  33. package/bundled/templates/monorepo/template.json +106 -0
  34. package/bundled/templates/monorepo/tsconfig.json.hbs +22 -0
  35. package/bundled/templates/standalone/contract-index.ts.hbs +5 -0
  36. package/bundled/templates/standalone/contract-test.ts.hbs +95 -0
  37. package/bundled/templates/standalone/contracts-root-index.ts.hbs +7 -0
  38. package/bundled/templates/standalone/domain-index.ts.hbs +6 -0
  39. package/bundled/templates/standalone/domain-repository.ts.hbs +44 -0
  40. package/bundled/templates/standalone/domain-service.ts.hbs +102 -0
  41. package/bundled/templates/standalone/gitignore.hbs +27 -0
  42. package/bundled/templates/standalone/invariants.md.hbs +35 -0
  43. package/bundled/templates/standalone/package.json.hbs +41 -0
  44. package/bundled/templates/standalone/schema.ts.hbs +61 -0
  45. package/bundled/templates/standalone/src-index.ts.hbs +11 -0
  46. package/bundled/templates/standalone/template.json +91 -0
  47. package/bundled/templates/standalone/tsconfig.json.hbs +20 -0
  48. package/bundled/templates/standalone/vitest.config.ts.hbs +8 -0
  49. package/bundled/workflows/adversarial-debate.yaml +222 -0
  50. package/bundled/workflows/analyst.yaml +115 -0
  51. package/bundled/workflows/assistant.yaml +74 -0
  52. package/bundled/workflows/code-review-discussion.yaml +166 -0
  53. package/bundled/workflows/code-reviewer.yaml +94 -0
  54. package/bundled/workflows/contract-first-project.yaml +356 -0
  55. package/bundled/workflows/debugger.yaml +107 -0
  56. package/bundled/workflows/designer.yaml +113 -0
  57. package/bundled/workflows/developer.yaml +105 -0
  58. package/bundled/workflows/discuss-step-examples.yaml +153 -0
  59. package/bundled/workflows/infrastructure-automation.yaml +283 -0
  60. package/bundled/workflows/ml-ab-testing.yaml +311 -0
  61. package/bundled/workflows/ml-experiment-tracker.yaml +150 -0
  62. package/bundled/workflows/ml-feature-engineering.yaml +242 -0
  63. package/bundled/workflows/ml-model-evaluation.yaml +234 -0
  64. package/bundled/workflows/ml-model-monitoring.yaml +227 -0
  65. package/bundled/workflows/ml-model-registry.yaml +232 -0
  66. package/bundled/workflows/mlops-deployment.yaml +267 -0
  67. package/bundled/workflows/mobile-development.yaml +312 -0
  68. package/bundled/workflows/multi-model-discussion.yaml +243 -0
  69. package/bundled/workflows/product-discovery.yaml +295 -0
  70. package/bundled/workflows/qa-specialist.yaml +116 -0
  71. package/bundled/workflows/refactoring.yaml +105 -0
  72. package/bundled/workflows/security-audit.yaml +135 -0
  73. package/bundled/workflows/std/analysis.yaml +190 -0
  74. package/bundled/workflows/std/code-review.yaml +117 -0
  75. package/bundled/workflows/std/debugging.yaml +155 -0
  76. package/bundled/workflows/std/documentation.yaml +180 -0
  77. package/bundled/workflows/std/implementation.yaml +197 -0
  78. package/bundled/workflows/std/refactoring.yaml +180 -0
  79. package/bundled/workflows/std/testing.yaml +200 -0
  80. package/bundled/workflows/strategic-planning.yaml +235 -0
  81. package/bundled/workflows/technology-research.yaml +239 -0
  82. package/dist/commands/agent.d.ts.map +1 -1
  83. package/dist/commands/agent.js +8 -2
  84. package/dist/commands/agent.js.map +1 -1
  85. package/dist/commands/scaffold.d.ts.map +1 -1
  86. package/dist/commands/scaffold.js +6 -3
  87. package/dist/commands/scaffold.js.map +1 -1
  88. package/dist/web/api.d.ts.map +1 -1
  89. package/dist/web/api.js +13 -6
  90. package/dist/web/api.js.map +1 -1
  91. package/package.json +23 -22
@@ -0,0 +1,115 @@
1
+ workflowId: analyst
2
+ version: "1.0.0"
3
+ name: Data Analysis Workflow
4
+ description: Comprehensive data analysis and reporting workflow
5
+
6
+ steps:
7
+ - stepId: define-questions
8
+ type: prompt
9
+ name: Define Analysis Questions
10
+ timeout: 60000
11
+ config:
12
+ agentId: data-scientist
13
+ prompt: |
14
+ Define the analysis scope:
15
+ 1. What questions are we answering?
16
+ 2. What metrics are relevant?
17
+ 3. What data sources are needed?
18
+ 4. What time period to analyze?
19
+
20
+ - stepId: gather-data
21
+ type: tool
22
+ name: Gather Data
23
+ timeout: 120000
24
+ config:
25
+ tool: memory_search
26
+ args:
27
+ namespace: analytics
28
+ includeMetadata: true
29
+
30
+ - stepId: clean-data
31
+ type: prompt
32
+ name: Data Cleaning
33
+ timeout: 60000
34
+ config:
35
+ agentId: data-scientist
36
+ prompt: |
37
+ Clean and prepare data:
38
+ 1. Handle missing values
39
+ 2. Remove outliers
40
+ 3. Normalize formats
41
+ 4. Validate data quality
42
+
43
+ - stepId: exploratory-analysis
44
+ type: prompt
45
+ name: Exploratory Analysis
46
+ timeout: 180000
47
+ config:
48
+ agentId: data-scientist
49
+ prompt: |
50
+ Perform exploratory analysis:
51
+ 1. Calculate summary statistics
52
+ 2. Identify trends and patterns
53
+ 3. Find correlations
54
+ 4. Detect anomalies
55
+
56
+ - stepId: statistical-tests
57
+ type: prompt
58
+ name: Statistical Testing
59
+ timeout: 120000
60
+ config:
61
+ agentId: data-scientist
62
+ prompt: |
63
+ Run statistical tests:
64
+ 1. Choose appropriate tests
65
+ 2. Check assumptions
66
+ 3. Calculate significance
67
+ 4. Interpret results
68
+
69
+ - stepId: generate-visualizations
70
+ type: prompt
71
+ name: Generate Visualizations
72
+ timeout: 60000
73
+ config:
74
+ agentId: data-scientist
75
+ prompt: |
76
+ Create visualizations:
77
+ 1. Charts for key metrics
78
+ 2. Trend visualizations
79
+ 3. Comparison charts
80
+ 4. Distribution plots
81
+
82
+ - stepId: write-report
83
+ type: prompt
84
+ name: Write Analysis Report
85
+ timeout: 120000
86
+ config:
87
+ agentId: writer
88
+ prompt: |
89
+ Write the analysis report:
90
+ 1. Executive summary
91
+ 2. Methodology
92
+ 3. Key findings
93
+ 4. Recommendations
94
+ 5. Appendix with details
95
+
96
+ - stepId: store-results
97
+ type: tool
98
+ name: Store Results
99
+ timeout: 30000
100
+ config:
101
+ tool: memory_store
102
+ args:
103
+ namespace: analysis-reports
104
+ ttl: 2592000
105
+
106
+ metadata:
107
+ category: analytics
108
+ tags:
109
+ - data-analysis
110
+ - reporting
111
+ - insights
112
+ requiredAbilities:
113
+ - data-analysis
114
+ - statistical-analysis
115
+ - documentation
@@ -0,0 +1,74 @@
1
+ workflowId: assistant
2
+ version: "1.0.0"
3
+ name: General Assistant Workflow
4
+ description: General-purpose assistance for various tasks
5
+
6
+ steps:
7
+ - stepId: understand-request
8
+ type: prompt
9
+ name: Understand Request
10
+ timeout: 30000
11
+ config:
12
+ agentId: standard
13
+ prompt: |
14
+ Understand the user request:
15
+ 1. Identify the type of task
16
+ 2. Determine required expertise
17
+ 3. Check for ambiguities
18
+ 4. Plan the approach
19
+
20
+ - stepId: gather-context
21
+ type: tool
22
+ name: Gather Context
23
+ timeout: 30000
24
+ config:
25
+ tool: memory_search
26
+ args:
27
+ namespace: conversation
28
+ limit: 10
29
+
30
+ - stepId: execute-task
31
+ type: prompt
32
+ name: Execute Task
33
+ timeout: 300000
34
+ config:
35
+ agentId: standard
36
+ prompt: |
37
+ Execute the requested task:
38
+ 1. Follow best practices
39
+ 2. Provide clear explanations
40
+ 3. Include examples where helpful
41
+ 4. Anticipate follow-up questions
42
+
43
+ - stepId: verify-completeness
44
+ type: prompt
45
+ name: Verify Completeness
46
+ timeout: 30000
47
+ config:
48
+ agentId: standard
49
+ prompt: |
50
+ Verify the response:
51
+ 1. Does it fully answer the question?
52
+ 2. Is it accurate and up-to-date?
53
+ 3. Is it clear and well-structured?
54
+ 4. Are there any caveats to mention?
55
+
56
+ - stepId: store-interaction
57
+ type: tool
58
+ name: Store Interaction
59
+ timeout: 10000
60
+ config:
61
+ tool: memory_store
62
+ args:
63
+ namespace: conversation
64
+ ttl: 86400
65
+
66
+ metadata:
67
+ category: general
68
+ tags:
69
+ - assistant
70
+ - general-purpose
71
+ - help
72
+ requiredAbilities:
73
+ - communication
74
+ - problem-solving
@@ -0,0 +1,166 @@
1
+ # Code Review Discussion Workflow
2
+ #
3
+ # Multiple AI models collaboratively review code using the discuss step.
4
+ # Leverages different model strengths for comprehensive review.
5
+ #
6
+ # Usage:
7
+ # ax run code-review-discussion --input '{"code": "...", "focus": "security"}'
8
+ #
9
+ # Model Roles:
10
+ # - Claude: Security and correctness analysis
11
+ # - Grok: Edge cases and real-time analysis
12
+ #
13
+ # Focus Options: security, performance, maintainability, all
14
+
15
+ workflowId: code-review-discussion
16
+ version: "1.0.0"
17
+ name: Multi-Model Code Review
18
+ description: >
19
+ Multiple AI models discuss and critique code, reaching consensus on
20
+ improvements through structured rounds of review and synthesis.
21
+
22
+ steps:
23
+ # Step 1: Initial critique from multiple perspectives
24
+ - stepId: multi-perspective-review
25
+ type: discuss
26
+ name: Multi-Perspective Code Review
27
+ timeout: 180000
28
+ config:
29
+ pattern: critique
30
+ providers:
31
+ - claude
32
+ - grok
33
+ prompt: |
34
+ Review this code for {{input.focus | default: "all"}} concerns:
35
+
36
+ ```
37
+ {{input.code}}
38
+ ```
39
+
40
+ Each reviewer should:
41
+ 1. Identify issues from your expertise area
42
+ 2. Rate severity (critical/major/minor)
43
+ 3. Suggest specific fixes with code examples
44
+ 4. Consider edge cases and failure modes
45
+
46
+ Expertise areas:
47
+ - Security vulnerabilities (OWASP top 10, injection, auth)
48
+ - Performance bottlenecks (O(n), memory, I/O)
49
+ - Maintainability issues (code smells, complexity)
50
+ - Type safety and correctness
51
+ rounds: 3
52
+ consensus:
53
+ method: synthesis
54
+ synthesizer: claude
55
+ includeDissent: true
56
+ providerTimeout: 60000
57
+ continueOnProviderFailure: true
58
+ minProviders: 2
59
+
60
+ # Step 2: Vote on priority of fixes
61
+ - stepId: prioritize-fixes
62
+ type: discuss
63
+ name: Prioritize Fixes
64
+ timeout: 120000
65
+ dependencies:
66
+ - multi-perspective-review
67
+ config:
68
+ pattern: voting
69
+ providers:
70
+ - claude
71
+ - grok
72
+ prompt: |
73
+ Based on the review synthesis:
74
+
75
+ {{steps.multi-perspective-review.output.synthesis}}
76
+
77
+ Vote on which category of issues to address FIRST:
78
+ 1. Security vulnerabilities
79
+ 2. Performance issues
80
+ 3. Maintainability improvements
81
+ 4. Type safety fixes
82
+
83
+ Consider:
84
+ - Production impact
85
+ - Fix complexity
86
+ - Technical debt
87
+ rounds: 1
88
+ consensus:
89
+ method: voting
90
+ threshold: 0.5
91
+ includeDissent: true
92
+ minProviders: 2
93
+
94
+ # Step 3: Generate refactored code
95
+ - stepId: generate-fix
96
+ type: discuss
97
+ name: Generate Fixed Code
98
+ timeout: 180000
99
+ dependencies:
100
+ - prioritize-fixes
101
+ config:
102
+ pattern: synthesis
103
+ providers:
104
+ - claude
105
+ - grok
106
+ prompt: |
107
+ Generate the improved code based on:
108
+
109
+ Priority: {{steps.prioritize-fixes.output.consensus.winner}}
110
+
111
+ Review findings:
112
+ {{steps.multi-perspective-review.output.synthesis}}
113
+
114
+ Original code:
115
+ ```
116
+ {{input.code}}
117
+ ```
118
+
119
+ Requirements:
120
+ 1. Fix the highest priority issues identified
121
+ 2. Preserve existing functionality
122
+ 3. Add inline comments explaining changes
123
+ 4. Include any necessary type annotations
124
+ 5. Follow existing code style
125
+ rounds: 2
126
+ consensus:
127
+ method: synthesis
128
+ synthesizer: claude
129
+ includeDissent: true
130
+ minProviders: 2
131
+
132
+ # Store results
133
+ - stepId: store-review
134
+ type: tool
135
+ name: Store Review Results
136
+ timeout: 10000
137
+ dependencies:
138
+ - generate-fix
139
+ config:
140
+ tool: memory_store
141
+ args:
142
+ namespace: code-reviews
143
+ key: "review-{{now | timestamp}}"
144
+ value:
145
+ originalCode: "{{input.code}}"
146
+ focus: "{{input.focus | default: 'all'}}"
147
+ reviewFindings: "{{steps.multi-perspective-review.output.synthesis}}"
148
+ prioritizedFocus: "{{steps.prioritize-fixes.output.consensus.winner}}"
149
+ improvedCode: "{{steps.generate-fix.output.synthesis}}"
150
+ timestamp: "{{now}}"
151
+
152
+ metadata:
153
+ category: code-review
154
+ tags:
155
+ - discuss-step
156
+ - code-review
157
+ - multi-model
158
+ - security
159
+ - quality
160
+ requiredAbilities:
161
+ - code-review
162
+ - security-practices
163
+ estimatedDuration: 300000
164
+ providers:
165
+ - claude
166
+ - grok
@@ -0,0 +1,94 @@
1
+ workflowId: code-reviewer
2
+ version: "1.0.0"
3
+ name: Code Review Workflow
4
+ description: Automated code review with best practices checks, security analysis, and suggestions
5
+
6
+ steps:
7
+ - stepId: analyze-changes
8
+ type: prompt
9
+ name: Analyze Code Changes
10
+ timeout: 60000
11
+ config:
12
+ agentId: quality
13
+ prompt: |
14
+ Analyze the provided code changes:
15
+ 1. Identify files changed and their types
16
+ 2. Summarize the nature of changes
17
+ 3. List affected components/modules
18
+
19
+ - stepId: check-style
20
+ type: tool
21
+ name: Style and Lint Check
22
+ timeout: 30000
23
+ retryPolicy:
24
+ maxAttempts: 2
25
+ backoffMs: 1000
26
+ config:
27
+ tool: guard_check
28
+ args:
29
+ policyId: code-style
30
+ categories:
31
+ - formatting
32
+ - naming
33
+ - imports
34
+
35
+ - stepId: security-scan
36
+ type: tool
37
+ name: Security Analysis
38
+ timeout: 60000
39
+ config:
40
+ tool: bugfix_scan
41
+ args:
42
+ categories:
43
+ - security
44
+ - injection
45
+ - authentication
46
+ minSeverity: medium
47
+
48
+ - stepId: review-logic
49
+ type: prompt
50
+ name: Logic Review
51
+ timeout: 120000
52
+ config:
53
+ agentId: backend
54
+ prompt: |
55
+ Review the code for:
56
+ 1. Logic errors and edge cases
57
+ 2. Error handling completeness
58
+ 3. Performance implications
59
+ 4. Code duplication
60
+ Provide specific line references for issues.
61
+
62
+ - stepId: suggest-improvements
63
+ type: prompt
64
+ name: Improvement Suggestions
65
+ timeout: 60000
66
+ config:
67
+ agentId: architecture
68
+ prompt: |
69
+ Based on the analysis, suggest:
70
+ 1. Refactoring opportunities
71
+ 2. Design pattern applications
72
+ 3. Test coverage improvements
73
+ 4. Documentation needs
74
+
75
+ - stepId: generate-report
76
+ type: tool
77
+ name: Generate Review Report
78
+ timeout: 30000
79
+ config:
80
+ tool: memory_store
81
+ args:
82
+ namespace: code-reviews
83
+ format: markdown
84
+
85
+ metadata:
86
+ category: quality
87
+ tags:
88
+ - code-review
89
+ - quality
90
+ - automated
91
+ requiredAbilities:
92
+ - code-review
93
+ - security
94
+ - clean-code