@exaudeus/workrail 0.0.2 → 0.0.4
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/README.md +30 -0
- package/dist/cli.js +140 -23
- package/dist/cli.js.map +1 -1
- package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts +50 -0
- package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts.map +1 -0
- package/dist/infrastructure/storage/multi-directory-workflow-storage.js +209 -0
- package/dist/infrastructure/storage/multi-directory-workflow-storage.js.map +1 -0
- package/dist/infrastructure/storage/storage.d.ts +7 -2
- package/dist/infrastructure/storage/storage.d.ts.map +1 -1
- package/dist/infrastructure/storage/storage.js +15 -2
- package/dist/infrastructure/storage/storage.js.map +1 -1
- package/dist/utils/config.d.ts +11 -2
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +6 -3
- package/dist/utils/config.js.map +1 -1
- package/package.json +4 -2
- package/spec/examples/adaptive-ticket-creation.json +170 -0
- package/spec/examples/ai-task-prompt-workflow.json +80 -0
- package/spec/examples/coding-task-workflow.json +141 -0
- package/spec/examples/conditional-workflow-example.json +216 -0
- package/spec/examples/invalid-workflow.json +20 -0
- package/spec/examples/valid-workflow.json +118 -0
- package/spec/mcp-api-v1.0.md +714 -0
- package/spec/mcp-compliance-summary.md +211 -0
- package/spec/mcp-protocol-handshake.md +603 -0
- package/spec/workflow.schema.json +327 -0
- package/workflows/adaptive-ticket-creation.json +257 -0
- package/workflows/coding-task-workflow.json +115 -0
- package/workflows/mr-review-workflow.json +79 -0
- package/workflows/presentation-creation.json +245 -0
- package/workflows/workflow-for-workflows.json +74 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adaptive-development-workflow",
|
|
3
|
+
"name": "Adaptive Development Workflow",
|
|
4
|
+
"description": "A dynamic workflow that adapts steps based on task complexity, user expertise, and project scope",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"preconditions": [
|
|
7
|
+
"Development environment is set up",
|
|
8
|
+
"Task requirements are understood",
|
|
9
|
+
"User has provided scope and expertise level"
|
|
10
|
+
],
|
|
11
|
+
"clarificationPrompts": [
|
|
12
|
+
"What is the scope of this task? (small/medium/large)",
|
|
13
|
+
"What is your expertise level? (novice/intermediate/expert)",
|
|
14
|
+
"How complex is this task on a scale of 0.1 to 1.0?",
|
|
15
|
+
"Do you prefer detailed guidance or minimal steps?",
|
|
16
|
+
"Are there specific constraints or requirements?"
|
|
17
|
+
],
|
|
18
|
+
"steps": [
|
|
19
|
+
{
|
|
20
|
+
"id": "basic-setup",
|
|
21
|
+
"title": "Basic Project Setup",
|
|
22
|
+
"prompt": "**PREP**: Review the project structure and requirements.\n\n**IMPLEMENT**: Set up the basic project structure, dependencies, and configuration files.\n\n**VERIFY**: Confirm all basic setup is complete and ready for development.",
|
|
23
|
+
"requireConfirmation": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "detailed-analysis",
|
|
27
|
+
"title": "Detailed Requirements Analysis",
|
|
28
|
+
"prompt": "**PREP**: Gather all available documentation and requirements.\n\n**IMPLEMENT**: Perform comprehensive analysis of requirements, edge cases, and potential challenges.\n\n**VERIFY**: Document findings and confirm understanding with stakeholders.",
|
|
29
|
+
"runCondition": {
|
|
30
|
+
"or": [
|
|
31
|
+
{"var": "taskScope", "equals": "large"},
|
|
32
|
+
{"var": "complexity", "gte": 0.7}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"askForFiles": true,
|
|
36
|
+
"requireConfirmation": true,
|
|
37
|
+
"validationCriteria": [
|
|
38
|
+
{
|
|
39
|
+
"type": "contains",
|
|
40
|
+
"value": "requirements",
|
|
41
|
+
"message": "Should include requirements analysis"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "contains",
|
|
45
|
+
"value": "edge cases",
|
|
46
|
+
"condition": {
|
|
47
|
+
"var": "complexity",
|
|
48
|
+
"gte": 0.8
|
|
49
|
+
},
|
|
50
|
+
"message": "Should analyze edge cases for complex tasks"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "length",
|
|
54
|
+
"min": 200,
|
|
55
|
+
"condition": {
|
|
56
|
+
"var": "taskScope",
|
|
57
|
+
"equals": "large"
|
|
58
|
+
},
|
|
59
|
+
"message": "Large tasks require detailed analysis"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "quick-implementation",
|
|
65
|
+
"title": "Quick Implementation",
|
|
66
|
+
"prompt": "**PREP**: Review the straightforward requirements.\n\n**IMPLEMENT**: Implement the feature using standard patterns and best practices.\n\n**VERIFY**: Test the implementation and ensure it meets requirements.",
|
|
67
|
+
"runCondition": {
|
|
68
|
+
"and": [
|
|
69
|
+
{"var": "taskScope", "equals": "small"},
|
|
70
|
+
{"var": "complexity", "lt": 0.5}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "architecture-design",
|
|
76
|
+
"title": "Architecture Design",
|
|
77
|
+
"prompt": "**PREP**: Analyze the system architecture and design patterns.\n\n**IMPLEMENT**: Design the architecture for the new feature, considering scalability and maintainability.\n\n**VERIFY**: Review the design for completeness and alignment with system architecture.",
|
|
78
|
+
"runCondition": {
|
|
79
|
+
"and": [
|
|
80
|
+
{"var": "taskScope", "not_equals": "small"},
|
|
81
|
+
{"var": "userExpertise", "not_equals": "novice"}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"askForFiles": true,
|
|
85
|
+
"requireConfirmation": true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "novice-guided-implementation",
|
|
89
|
+
"title": "Step-by-Step Guided Implementation",
|
|
90
|
+
"prompt": "**PREP**: Break down the implementation into small, manageable steps.\n\n**IMPLEMENT**: Follow the detailed implementation guide with explanations for each step.\n\n**VERIFY**: Confirm each step is completed correctly before proceeding.",
|
|
91
|
+
"runCondition": {
|
|
92
|
+
"var": "userExpertise",
|
|
93
|
+
"equals": "novice"
|
|
94
|
+
},
|
|
95
|
+
"askForFiles": true,
|
|
96
|
+
"requireConfirmation": true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "expert-implementation",
|
|
100
|
+
"title": "Expert Implementation",
|
|
101
|
+
"prompt": "**PREP**: Review the requirements and architecture.\n\n**IMPLEMENT**: Implement the feature using advanced patterns and optimizations as appropriate.\n\n**VERIFY**: Ensure implementation follows best practices and is production-ready.",
|
|
102
|
+
"runCondition": {
|
|
103
|
+
"var": "userExpertise",
|
|
104
|
+
"equals": "expert"
|
|
105
|
+
},
|
|
106
|
+
"askForFiles": true,
|
|
107
|
+
"validationCriteria": [
|
|
108
|
+
{
|
|
109
|
+
"type": "regex",
|
|
110
|
+
"pattern": "\\b(pattern|design|architecture)\\b",
|
|
111
|
+
"condition": {
|
|
112
|
+
"var": "userExpertise",
|
|
113
|
+
"equals": "expert"
|
|
114
|
+
},
|
|
115
|
+
"message": "Expert implementation should use advanced patterns"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "contains",
|
|
119
|
+
"value": "optimization",
|
|
120
|
+
"condition": {
|
|
121
|
+
"var": "complexity",
|
|
122
|
+
"gte": 0.6
|
|
123
|
+
},
|
|
124
|
+
"message": "Should include optimizations for complex features"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "regex",
|
|
128
|
+
"pattern": "(?!.*TODO)",
|
|
129
|
+
"message": "Should not contain TODO items"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "comprehensive-testing",
|
|
135
|
+
"title": "Comprehensive Testing",
|
|
136
|
+
"prompt": "**PREP**: Identify all test scenarios including edge cases.\n\n**IMPLEMENT**: Create comprehensive test suite covering unit, integration, and end-to-end tests.\n\n**VERIFY**: Run all tests and ensure coverage meets quality standards.",
|
|
137
|
+
"runCondition": {
|
|
138
|
+
"or": [
|
|
139
|
+
{"var": "taskScope", "equals": "large"},
|
|
140
|
+
{"var": "userExpertise", "equals": "expert"}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"requireConfirmation": true,
|
|
144
|
+
"validationCriteria": [
|
|
145
|
+
{
|
|
146
|
+
"type": "regex",
|
|
147
|
+
"pattern": "\\b(unit test|integration test|end-to-end)\\b",
|
|
148
|
+
"message": "Should include comprehensive test types"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "regex",
|
|
152
|
+
"pattern": "\\b(describe|it|test|spec)\\b",
|
|
153
|
+
"message": "Should include proper test structure"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "contains",
|
|
157
|
+
"value": "coverage",
|
|
158
|
+
"condition": {
|
|
159
|
+
"var": "taskScope",
|
|
160
|
+
"equals": "large"
|
|
161
|
+
},
|
|
162
|
+
"message": "Large tasks should include coverage analysis"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "basic-testing",
|
|
168
|
+
"title": "Basic Testing",
|
|
169
|
+
"prompt": "**PREP**: Identify core functionality to test.\n\n**IMPLEMENT**: Create basic tests for the main functionality.\n\n**VERIFY**: Run tests and fix any issues found.",
|
|
170
|
+
"runCondition": {
|
|
171
|
+
"and": [
|
|
172
|
+
{"var": "taskScope", "not_equals": "large"},
|
|
173
|
+
{"var": "userExpertise", "not_equals": "expert"}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "performance-optimization",
|
|
179
|
+
"title": "Performance Optimization",
|
|
180
|
+
"prompt": "**PREP**: Profile the implementation and identify bottlenecks.\n\n**IMPLEMENT**: Optimize performance using appropriate techniques and patterns.\n\n**VERIFY**: Measure performance improvements and ensure they meet requirements.",
|
|
181
|
+
"runCondition": {
|
|
182
|
+
"and": [
|
|
183
|
+
{"var": "taskScope", "equals": "large"},
|
|
184
|
+
{"var": "complexity", "gte": 0.8}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"askForFiles": true,
|
|
188
|
+
"requireConfirmation": true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "documentation",
|
|
192
|
+
"title": "Documentation",
|
|
193
|
+
"prompt": "**PREP**: Review all implemented features and changes.\n\n**IMPLEMENT**: Create comprehensive documentation for the new feature.\n\n**VERIFY**: Ensure documentation is clear, complete, and helpful for future maintenance.",
|
|
194
|
+
"runCondition": {
|
|
195
|
+
"var": "taskScope",
|
|
196
|
+
"not_equals": "small"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "final-review",
|
|
201
|
+
"title": "Final Review and Cleanup",
|
|
202
|
+
"prompt": "**PREP**: Review all changes and ensure completeness.\n\n**IMPLEMENT**: Perform final cleanup, code review, and quality checks.\n\n**VERIFY**: Confirm all requirements are met and the implementation is ready for deployment.",
|
|
203
|
+
"requireConfirmation": true
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"metaGuidance": [
|
|
207
|
+
"Always follow the prep/implement/verify pattern for each step",
|
|
208
|
+
"Adapt the level of detail based on user expertise",
|
|
209
|
+
"Skip steps that don't apply to the current task scope",
|
|
210
|
+
"Focus on quality over speed for complex tasks",
|
|
211
|
+
"Provide more guidance for novice users",
|
|
212
|
+
"Allow expert users to work with minimal constraints",
|
|
213
|
+
"Test thoroughly based on the complexity and scope",
|
|
214
|
+
"Document appropriately for the task size"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "INVALID_ID_WITH_CAPS",
|
|
3
|
+
"name": "",
|
|
4
|
+
"description": "This workflow has multiple validation errors",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"preconditions": [
|
|
7
|
+
"Valid precondition",
|
|
8
|
+
""
|
|
9
|
+
],
|
|
10
|
+
"clarificationPrompts": [
|
|
11
|
+
"Valid question?",
|
|
12
|
+
"Valid question?"
|
|
13
|
+
],
|
|
14
|
+
"steps": [],
|
|
15
|
+
"metaGuidance": [
|
|
16
|
+
"This is a valid guidance",
|
|
17
|
+
"This is a valid guidance"
|
|
18
|
+
],
|
|
19
|
+
"extraField": "This field is not allowed"
|
|
20
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "simple-auth-implementation",
|
|
3
|
+
"name": "Simple Authentication Implementation",
|
|
4
|
+
"description": "Implement basic JWT authentication for a REST API with user login and token validation",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"preconditions": [
|
|
7
|
+
"User model exists in the database",
|
|
8
|
+
"JWT library is installed in the project",
|
|
9
|
+
"Environment variables for JWT_SECRET are configured"
|
|
10
|
+
],
|
|
11
|
+
"clarificationPrompts": [
|
|
12
|
+
"What is the token expiration time you want to use?",
|
|
13
|
+
"Should the authentication support refresh tokens?",
|
|
14
|
+
"Do you need role-based access control?"
|
|
15
|
+
],
|
|
16
|
+
"steps": [
|
|
17
|
+
{
|
|
18
|
+
"id": "analyze-current-auth",
|
|
19
|
+
"title": "Analyze current authentication setup",
|
|
20
|
+
"prompt": "Examine the existing authentication implementation if any. Look for: user model structure, existing auth middleware, login endpoints. Document what you find.",
|
|
21
|
+
"requireConfirmation": true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "create-auth-middleware",
|
|
25
|
+
"title": "Create authentication middleware",
|
|
26
|
+
"prompt": "Create a middleware function that extracts and validates JWT tokens from the Authorization header. Return 401 for invalid tokens.",
|
|
27
|
+
"askForFiles": true,
|
|
28
|
+
"validationCriteria": [
|
|
29
|
+
{
|
|
30
|
+
"type": "contains",
|
|
31
|
+
"value": "jwt",
|
|
32
|
+
"message": "Implementation should include JWT token handling"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "contains",
|
|
36
|
+
"value": "Authorization",
|
|
37
|
+
"message": "Should extract token from Authorization header"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "regex",
|
|
41
|
+
"pattern": "\\b(401|unauthorized)\\b",
|
|
42
|
+
"flags": "i",
|
|
43
|
+
"message": "Should return 401 status for invalid tokens"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "implement-login",
|
|
49
|
+
"title": "Implement login endpoint",
|
|
50
|
+
"prompt": "Create a POST /auth/login endpoint that accepts email and password, validates credentials against the database, and returns a JWT token on success.",
|
|
51
|
+
"validationCriteria": [
|
|
52
|
+
{
|
|
53
|
+
"type": "contains",
|
|
54
|
+
"value": "POST",
|
|
55
|
+
"message": "Should implement POST endpoint"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "regex",
|
|
59
|
+
"pattern": "/(auth/)?login",
|
|
60
|
+
"message": "Should implement login endpoint"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "contains",
|
|
64
|
+
"value": "email",
|
|
65
|
+
"message": "Should handle email authentication"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "contains",
|
|
69
|
+
"value": "password",
|
|
70
|
+
"message": "Should handle password authentication"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "contains",
|
|
74
|
+
"value": "jwt",
|
|
75
|
+
"message": "Should return JWT token"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "test-authentication",
|
|
81
|
+
"title": "Test the authentication flow",
|
|
82
|
+
"prompt": "Test the complete flow: 1) Login with valid credentials, 2) Use the token to access a protected route, 3) Verify invalid tokens are rejected",
|
|
83
|
+
"requireConfirmation": true,
|
|
84
|
+
"validationCriteria": [
|
|
85
|
+
{
|
|
86
|
+
"type": "contains",
|
|
87
|
+
"value": "valid credentials",
|
|
88
|
+
"condition": {
|
|
89
|
+
"var": "testType",
|
|
90
|
+
"equals": "comprehensive"
|
|
91
|
+
},
|
|
92
|
+
"message": "Should test login with valid credentials"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "contains",
|
|
96
|
+
"value": "protected route",
|
|
97
|
+
"message": "Should test access to protected routes"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "contains",
|
|
101
|
+
"value": "invalid tokens",
|
|
102
|
+
"message": "Should verify invalid token rejection"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "regex",
|
|
106
|
+
"pattern": "\\b(test|spec|describe|it)\\b",
|
|
107
|
+
"message": "Should include proper test structure"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"metaGuidance": [
|
|
113
|
+
"Always hash passwords using bcrypt or similar",
|
|
114
|
+
"Include proper error messages for debugging",
|
|
115
|
+
"Follow RESTful conventions for endpoints",
|
|
116
|
+
"Add rate limiting to prevent brute force attacks"
|
|
117
|
+
]
|
|
118
|
+
}
|