@defai.digital/cli 13.4.4 → 13.4.7
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/bundled/agents/architect.json +117 -0
- package/bundled/agents/auditor.json +114 -0
- package/bundled/agents/bug-hunter.json +128 -0
- package/bundled/agents/builder.json +128 -0
- package/bundled/agents/ceo.json +6 -1
- package/bundled/agents/executor.json +150 -0
- package/bundled/agents/fullstack.json +10 -2
- package/bundled/agents/operator.json +119 -0
- package/bundled/agents/researcher.json +42 -13
- package/bundled/agents/reviewer.json +90 -42
- package/bundled/templates/monorepo/contract-index.ts.hbs +7 -0
- package/bundled/templates/monorepo/contract-test.ts.hbs +130 -0
- package/bundled/templates/monorepo/contracts-package.json.hbs +29 -0
- package/bundled/templates/monorepo/domain-index.ts.hbs +115 -0
- package/bundled/templates/monorepo/domain-package.json.hbs +27 -0
- package/bundled/templates/monorepo/gitignore.hbs +32 -0
- package/bundled/templates/monorepo/invariants.md.hbs +43 -0
- package/bundled/templates/monorepo/package.json.hbs +28 -0
- package/bundled/templates/monorepo/pnpm-workspace.yaml.hbs +5 -0
- package/bundled/templates/monorepo/schema.ts.hbs +82 -0
- package/bundled/templates/monorepo/template.json +106 -0
- package/bundled/templates/monorepo/tsconfig.json.hbs +22 -0
- package/bundled/templates/standalone/contract-index.ts.hbs +5 -0
- package/bundled/templates/standalone/contract-test.ts.hbs +95 -0
- package/bundled/templates/standalone/contracts-root-index.ts.hbs +7 -0
- package/bundled/templates/standalone/domain-index.ts.hbs +6 -0
- package/bundled/templates/standalone/domain-repository.ts.hbs +44 -0
- package/bundled/templates/standalone/domain-service.ts.hbs +102 -0
- package/bundled/templates/standalone/gitignore.hbs +27 -0
- package/bundled/templates/standalone/invariants.md.hbs +35 -0
- package/bundled/templates/standalone/package.json.hbs +41 -0
- package/bundled/templates/standalone/schema.ts.hbs +61 -0
- package/bundled/templates/standalone/src-index.ts.hbs +11 -0
- package/bundled/templates/standalone/template.json +91 -0
- package/bundled/templates/standalone/tsconfig.json.hbs +20 -0
- package/bundled/templates/standalone/vitest.config.ts.hbs +8 -0
- package/bundled/workflows/adversarial-debate.yaml +222 -0
- package/bundled/workflows/analyst.yaml +115 -0
- package/bundled/workflows/assistant.yaml +74 -0
- package/bundled/workflows/code-review-discussion.yaml +166 -0
- package/bundled/workflows/code-reviewer.yaml +94 -0
- package/bundled/workflows/contract-first-project.yaml +356 -0
- package/bundled/workflows/debugger.yaml +107 -0
- package/bundled/workflows/designer.yaml +113 -0
- package/bundled/workflows/developer.yaml +105 -0
- package/bundled/workflows/discuss-step-examples.yaml +153 -0
- package/bundled/workflows/infrastructure-automation.yaml +283 -0
- package/bundled/workflows/ml-ab-testing.yaml +311 -0
- package/bundled/workflows/ml-experiment-tracker.yaml +150 -0
- package/bundled/workflows/ml-feature-engineering.yaml +242 -0
- package/bundled/workflows/ml-model-evaluation.yaml +234 -0
- package/bundled/workflows/ml-model-monitoring.yaml +227 -0
- package/bundled/workflows/ml-model-registry.yaml +232 -0
- package/bundled/workflows/mlops-deployment.yaml +267 -0
- package/bundled/workflows/mobile-development.yaml +312 -0
- package/bundled/workflows/multi-model-discussion.yaml +243 -0
- package/bundled/workflows/product-discovery.yaml +295 -0
- package/bundled/workflows/qa-specialist.yaml +116 -0
- package/bundled/workflows/refactoring.yaml +105 -0
- package/bundled/workflows/security-audit.yaml +135 -0
- package/bundled/workflows/std/analysis.yaml +190 -0
- package/bundled/workflows/std/code-review.yaml +117 -0
- package/bundled/workflows/std/debugging.yaml +155 -0
- package/bundled/workflows/std/documentation.yaml +180 -0
- package/bundled/workflows/std/implementation.yaml +197 -0
- package/bundled/workflows/std/refactoring.yaml +180 -0
- package/bundled/workflows/std/testing.yaml +200 -0
- package/bundled/workflows/strategic-planning.yaml +235 -0
- package/bundled/workflows/technology-research.yaml +239 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +10 -6
- package/dist/bootstrap.js.map +1 -1
- package/dist/commands/discuss.d.ts.map +1 -1
- package/dist/commands/discuss.js +4 -1
- package/dist/commands/discuss.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +65 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/monitor.d.ts.map +1 -1
- package/dist/commands/monitor.js +29 -1
- package/dist/commands/monitor.js.map +1 -1
- package/dist/commands/scaffold.d.ts.map +1 -1
- package/dist/commands/scaffold.js +6 -3
- package/dist/commands/scaffold.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +119 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status.d.ts +10 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +151 -49
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +1 -43
- package/dist/commands/update.js.map +1 -1
- package/dist/web/api.d.ts +18 -0
- package/dist/web/api.d.ts.map +1 -1
- package/dist/web/api.js +480 -39
- package/dist/web/api.js.map +1 -1
- package/dist/web/dashboard.d.ts.map +1 -1
- package/dist/web/dashboard.js +1449 -132
- package/dist/web/dashboard.js.map +1 -1
- package/package.json +21 -21
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
workflowId: contract-first-project
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
name: Contract-First Project Scaffold
|
|
4
|
+
description: Generate a complete contract-first project structure with schemas, invariants, domain packages, and guard policies
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
category: scaffold
|
|
8
|
+
tags:
|
|
9
|
+
- contract-first
|
|
10
|
+
- scaffold
|
|
11
|
+
- architecture
|
|
12
|
+
- ddd
|
|
13
|
+
- domain-modeling
|
|
14
|
+
requiredAbilities:
|
|
15
|
+
- contract-first
|
|
16
|
+
- domain-modeling
|
|
17
|
+
- invariant-writing
|
|
18
|
+
estimatedDuration: 180
|
|
19
|
+
complexity: high
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- stepId: gather-requirements
|
|
23
|
+
name: Gather Domain Requirements
|
|
24
|
+
description: Analyze input to identify bounded context, entities, and business rules
|
|
25
|
+
type: prompt
|
|
26
|
+
timeout: 120000
|
|
27
|
+
config:
|
|
28
|
+
agentId: contract-architect
|
|
29
|
+
prompt: |
|
|
30
|
+
Analyze the domain requirements and identify:
|
|
31
|
+
|
|
32
|
+
## 1. Bounded Context
|
|
33
|
+
- What is the core domain?
|
|
34
|
+
- What problem does it solve?
|
|
35
|
+
- Who are the main actors/users?
|
|
36
|
+
|
|
37
|
+
## 2. Entity Discovery
|
|
38
|
+
- What are the main entities?
|
|
39
|
+
- Which entities are **aggregate roots**?
|
|
40
|
+
- What are the entity relationships?
|
|
41
|
+
|
|
42
|
+
## 3. Value Objects
|
|
43
|
+
- What immutable value types exist?
|
|
44
|
+
- What are their validation rules?
|
|
45
|
+
|
|
46
|
+
## 4. Domain Events
|
|
47
|
+
- What state transitions occur?
|
|
48
|
+
- What events should be emitted?
|
|
49
|
+
|
|
50
|
+
## 5. Business Invariants
|
|
51
|
+
- What rules must ALWAYS hold?
|
|
52
|
+
- What constraints exist?
|
|
53
|
+
|
|
54
|
+
Input: {{input}}
|
|
55
|
+
|
|
56
|
+
- stepId: design-schemas
|
|
57
|
+
name: Design Zod Schemas
|
|
58
|
+
description: Generate complete Zod schemas for all entities and value objects
|
|
59
|
+
type: tool
|
|
60
|
+
timeout: 60000
|
|
61
|
+
dependencies:
|
|
62
|
+
- gather-requirements
|
|
63
|
+
config:
|
|
64
|
+
tool: design_schema
|
|
65
|
+
passContext: true
|
|
66
|
+
|
|
67
|
+
- stepId: enhance-schemas
|
|
68
|
+
name: Enhance Schema Design
|
|
69
|
+
description: Add validation rules, refinements, and type exports
|
|
70
|
+
type: prompt
|
|
71
|
+
timeout: 90000
|
|
72
|
+
dependencies:
|
|
73
|
+
- design-schemas
|
|
74
|
+
config:
|
|
75
|
+
agentId: contract-architect
|
|
76
|
+
prompt: |
|
|
77
|
+
Enhance the generated schemas with:
|
|
78
|
+
|
|
79
|
+
1. **Validation Rules**:
|
|
80
|
+
- String patterns (regex)
|
|
81
|
+
- Number ranges (min/max)
|
|
82
|
+
- Array constraints
|
|
83
|
+
- Custom refinements
|
|
84
|
+
|
|
85
|
+
2. **Type Exports**:
|
|
86
|
+
- Export all inferred types
|
|
87
|
+
- Create validation functions
|
|
88
|
+
- Add factory functions
|
|
89
|
+
|
|
90
|
+
3. **Documentation**:
|
|
91
|
+
- JSDoc comments for all schemas
|
|
92
|
+
- Reference invariants in comments
|
|
93
|
+
|
|
94
|
+
Base Schema:
|
|
95
|
+
{{steps.design-schemas.output}}
|
|
96
|
+
|
|
97
|
+
Requirements Context:
|
|
98
|
+
{{steps.gather-requirements.output}}
|
|
99
|
+
|
|
100
|
+
- stepId: write-invariants
|
|
101
|
+
name: Write Invariant Documentation
|
|
102
|
+
description: Create comprehensive invariants.md with all behavioral guarantees
|
|
103
|
+
type: prompt
|
|
104
|
+
timeout: 90000
|
|
105
|
+
dependencies:
|
|
106
|
+
- enhance-schemas
|
|
107
|
+
config:
|
|
108
|
+
agentId: contract-architect
|
|
109
|
+
prompt: |
|
|
110
|
+
Create a complete invariants.md file for this domain.
|
|
111
|
+
|
|
112
|
+
## Format
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
# {{domain_name}} Domain Invariants
|
|
116
|
+
|
|
117
|
+
## Schema Invariants
|
|
118
|
+
[Invariants enforced by Zod schema validation]
|
|
119
|
+
|
|
120
|
+
### INV-XXX-001: [Name]
|
|
121
|
+
[Description]
|
|
122
|
+
- **Enforcement**: schema
|
|
123
|
+
- **Test**: [Zod validation rule]
|
|
124
|
+
|
|
125
|
+
## Runtime Invariants
|
|
126
|
+
[Invariants enforced by application code]
|
|
127
|
+
|
|
128
|
+
### INV-XXX-010: [Name]
|
|
129
|
+
[Description]
|
|
130
|
+
- **Enforcement**: runtime
|
|
131
|
+
- **Test**: [Code assertion]
|
|
132
|
+
|
|
133
|
+
## Business Invariants
|
|
134
|
+
[Invariants enforced by tests and reviews]
|
|
135
|
+
|
|
136
|
+
### INV-XXX-020: [Name]
|
|
137
|
+
[Description]
|
|
138
|
+
- **Enforcement**: test
|
|
139
|
+
- **Test**: [Test case description]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Requirements:
|
|
143
|
+
{{steps.gather-requirements.output}}
|
|
144
|
+
|
|
145
|
+
Schema:
|
|
146
|
+
{{steps.enhance-schemas.output}}
|
|
147
|
+
|
|
148
|
+
- stepId: design-package-structure
|
|
149
|
+
name: Design Package Structure
|
|
150
|
+
description: Define the complete package and file structure
|
|
151
|
+
type: prompt
|
|
152
|
+
timeout: 60000
|
|
153
|
+
dependencies:
|
|
154
|
+
- write-invariants
|
|
155
|
+
config:
|
|
156
|
+
agentId: contract-architect
|
|
157
|
+
prompt: |
|
|
158
|
+
Design the complete package structure:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
packages/
|
|
162
|
+
├── contracts/src/{{domain}}/v1/
|
|
163
|
+
│ ├── schema.ts # Zod schemas
|
|
164
|
+
│ ├── invariants.md # Behavioral guarantees
|
|
165
|
+
│ └── index.ts # Public exports
|
|
166
|
+
├── core/{{domain}}-domain/
|
|
167
|
+
│ ├── src/
|
|
168
|
+
│ │ ├── index.ts # Public API
|
|
169
|
+
│ │ ├── types.ts # Internal types
|
|
170
|
+
│ │ ├── errors.ts # Domain errors
|
|
171
|
+
│ │ └── {{entity}}.ts # Entity logic
|
|
172
|
+
│ ├── package.json
|
|
173
|
+
│ └── tsconfig.json
|
|
174
|
+
└── tests/
|
|
175
|
+
├── contract/{{domain}}.test.ts
|
|
176
|
+
└── core/{{domain}}-domain.test.ts
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
For each file, provide:
|
|
180
|
+
1. Purpose
|
|
181
|
+
2. Key exports
|
|
182
|
+
3. Dependencies
|
|
183
|
+
|
|
184
|
+
- stepId: generate-guard-policy
|
|
185
|
+
name: Generate Guard Policy
|
|
186
|
+
description: Create guard policy YAML for governance
|
|
187
|
+
type: prompt
|
|
188
|
+
timeout: 30000
|
|
189
|
+
dependencies:
|
|
190
|
+
- design-package-structure
|
|
191
|
+
config:
|
|
192
|
+
agentId: contract-architect
|
|
193
|
+
prompt: |
|
|
194
|
+
Generate a guard policy YAML:
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
policy_id: {{domain}}-development
|
|
198
|
+
|
|
199
|
+
allowed_paths:
|
|
200
|
+
- packages/contracts/src/{{domain}}/**
|
|
201
|
+
- packages/core/{{domain}}-domain/**
|
|
202
|
+
- tests/contract/{{domain}}.test.ts
|
|
203
|
+
- tests/core/{{domain}}-domain.test.ts
|
|
204
|
+
|
|
205
|
+
forbidden_paths:
|
|
206
|
+
- packages/cli/**
|
|
207
|
+
- packages/mcp-server/**
|
|
208
|
+
- packages/contracts/src/*/v1/schema.ts # Other domains
|
|
209
|
+
|
|
210
|
+
required_contracts: []
|
|
211
|
+
|
|
212
|
+
gates:
|
|
213
|
+
- path_violation
|
|
214
|
+
- dependency
|
|
215
|
+
- change_radius
|
|
216
|
+
- contract_tests
|
|
217
|
+
|
|
218
|
+
change_radius_limit: 2
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Customize based on domain complexity and dependencies.
|
|
222
|
+
|
|
223
|
+
- stepId: generate-test-scaffolds
|
|
224
|
+
name: Generate Test Scaffolds
|
|
225
|
+
description: Create test file scaffolds for contracts and domain
|
|
226
|
+
type: prompt
|
|
227
|
+
timeout: 60000
|
|
228
|
+
dependencies:
|
|
229
|
+
- enhance-schemas
|
|
230
|
+
config:
|
|
231
|
+
agentId: quality
|
|
232
|
+
prompt: |
|
|
233
|
+
Generate test scaffolds for the domain:
|
|
234
|
+
|
|
235
|
+
## 1. Contract Tests (tests/contract/{{domain}}.test.ts)
|
|
236
|
+
|
|
237
|
+
```typescript
|
|
238
|
+
import { describe, it, expect } from 'vitest';
|
|
239
|
+
import { {{Schema}}Schema, validate{{Schema}} } from '@pkg/contracts';
|
|
240
|
+
|
|
241
|
+
describe('{{domain}} contracts', () => {
|
|
242
|
+
describe('{{Schema}}Schema', () => {
|
|
243
|
+
it('should validate valid input', () => {
|
|
244
|
+
// Test valid data
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
it('should reject invalid input', () => {
|
|
248
|
+
// Test invalid data
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Invariant tests
|
|
252
|
+
it('should enforce INV-XXX-001', () => {
|
|
253
|
+
// Test invariant
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## 2. Domain Tests (tests/core/{{domain}}-domain.test.ts)
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
import { describe, it, expect } from 'vitest';
|
|
263
|
+
import { {{Entity}} } from '@pkg/{{domain}}-domain';
|
|
264
|
+
|
|
265
|
+
describe('{{domain}} domain', () => {
|
|
266
|
+
describe('{{Entity}}', () => {
|
|
267
|
+
it('should create valid entity', () => {
|
|
268
|
+
// Test creation
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it('should handle state transitions', () => {
|
|
272
|
+
// Test behavior
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Schema Context:
|
|
279
|
+
{{steps.enhance-schemas.output}}
|
|
280
|
+
|
|
281
|
+
- stepId: generate-summary
|
|
282
|
+
name: Generate Implementation Summary
|
|
283
|
+
description: Create comprehensive summary with all artifacts ready to copy
|
|
284
|
+
type: prompt
|
|
285
|
+
timeout: 90000
|
|
286
|
+
dependencies:
|
|
287
|
+
- generate-guard-policy
|
|
288
|
+
- generate-test-scaffolds
|
|
289
|
+
config:
|
|
290
|
+
agentId: writer
|
|
291
|
+
prompt: |
|
|
292
|
+
Create a comprehensive implementation summary.
|
|
293
|
+
|
|
294
|
+
# {{domain}} Domain - Contract-First Scaffold
|
|
295
|
+
|
|
296
|
+
## Overview
|
|
297
|
+
[Brief description from requirements]
|
|
298
|
+
|
|
299
|
+
## Generated Artifacts
|
|
300
|
+
|
|
301
|
+
### 1. Schema (packages/contracts/src/{{domain}}/v1/schema.ts)
|
|
302
|
+
```typescript
|
|
303
|
+
[Complete schema code from enhance-schemas]
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### 2. Invariants (packages/contracts/src/{{domain}}/v1/invariants.md)
|
|
307
|
+
```markdown
|
|
308
|
+
[Complete invariants from write-invariants]
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### 3. Package Structure
|
|
312
|
+
[File tree from design-package-structure]
|
|
313
|
+
|
|
314
|
+
### 4. Guard Policy (packages/guard/policies/{{domain}}.yaml)
|
|
315
|
+
```yaml
|
|
316
|
+
[Policy from generate-guard-policy]
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### 5. Test Scaffolds
|
|
320
|
+
[Tests from generate-test-scaffolds]
|
|
321
|
+
|
|
322
|
+
## Implementation Checklist
|
|
323
|
+
|
|
324
|
+
- [ ] Create contract package directory
|
|
325
|
+
- [ ] Add schema.ts with Zod schemas
|
|
326
|
+
- [ ] Add invariants.md documentation
|
|
327
|
+
- [ ] Create domain package
|
|
328
|
+
- [ ] Implement domain logic
|
|
329
|
+
- [ ] Add guard policy
|
|
330
|
+
- [ ] Write contract tests
|
|
331
|
+
- [ ] Write domain tests
|
|
332
|
+
- [ ] Run `ax guard check --policy {{domain}}-development`
|
|
333
|
+
|
|
334
|
+
## Commands
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Verify agent is available
|
|
338
|
+
ax agent list | grep contract-architect
|
|
339
|
+
|
|
340
|
+
# Run guard check after implementation
|
|
341
|
+
ax guard check --policy {{domain}}-development --paths packages/contracts/src/{{domain}} packages/core/{{domain}}-domain
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Compile ALL outputs from previous steps into this summary.
|
|
345
|
+
|
|
346
|
+
- stepId: store-result
|
|
347
|
+
name: Store Scaffold Result
|
|
348
|
+
description: Persist the scaffold result in memory for future reference
|
|
349
|
+
type: tool
|
|
350
|
+
timeout: 10000
|
|
351
|
+
dependencies:
|
|
352
|
+
- generate-summary
|
|
353
|
+
config:
|
|
354
|
+
tool: memory_store
|
|
355
|
+
namespace: scaffold
|
|
356
|
+
key: "{{domain}}/{{timestamp}}"
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
workflowId: debugger
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
name: Bug Investigation Workflow
|
|
4
|
+
description: Systematic bug investigation and resolution
|
|
5
|
+
|
|
6
|
+
steps:
|
|
7
|
+
- stepId: gather-context
|
|
8
|
+
type: prompt
|
|
9
|
+
name: Gather Bug Context
|
|
10
|
+
timeout: 60000
|
|
11
|
+
config:
|
|
12
|
+
agentId: researcher
|
|
13
|
+
prompt: |
|
|
14
|
+
Gather information about the bug:
|
|
15
|
+
1. Error messages and stack traces
|
|
16
|
+
2. Steps to reproduce
|
|
17
|
+
3. Environment details
|
|
18
|
+
4. Recent changes that might be related
|
|
19
|
+
5. Affected user count and severity
|
|
20
|
+
|
|
21
|
+
- stepId: analyze-logs
|
|
22
|
+
type: tool
|
|
23
|
+
name: Analyze Logs
|
|
24
|
+
timeout: 60000
|
|
25
|
+
config:
|
|
26
|
+
tool: trace_analyze
|
|
27
|
+
args:
|
|
28
|
+
timeRange: 24h
|
|
29
|
+
filters:
|
|
30
|
+
level: error
|
|
31
|
+
|
|
32
|
+
- stepId: identify-root-cause
|
|
33
|
+
type: prompt
|
|
34
|
+
name: Identify Root Cause
|
|
35
|
+
timeout: 120000
|
|
36
|
+
config:
|
|
37
|
+
agentId: backend
|
|
38
|
+
prompt: |
|
|
39
|
+
Based on the evidence:
|
|
40
|
+
1. Form hypotheses about root cause
|
|
41
|
+
2. Trace code execution path
|
|
42
|
+
3. Identify the exact failure point
|
|
43
|
+
4. Determine if it's a regression
|
|
44
|
+
|
|
45
|
+
- stepId: scan-related-bugs
|
|
46
|
+
type: tool
|
|
47
|
+
name: Scan for Related Issues
|
|
48
|
+
timeout: 60000
|
|
49
|
+
config:
|
|
50
|
+
tool: bugfix_scan
|
|
51
|
+
args:
|
|
52
|
+
categories:
|
|
53
|
+
- null-reference
|
|
54
|
+
- type-error
|
|
55
|
+
- logic-error
|
|
56
|
+
- resource-leak
|
|
57
|
+
maxFiles: 50
|
|
58
|
+
|
|
59
|
+
- stepId: develop-fix
|
|
60
|
+
type: prompt
|
|
61
|
+
name: Develop Fix
|
|
62
|
+
timeout: 180000
|
|
63
|
+
config:
|
|
64
|
+
agentId: backend
|
|
65
|
+
prompt: |
|
|
66
|
+
Develop the fix:
|
|
67
|
+
1. Write the minimal fix
|
|
68
|
+
2. Add defensive checks
|
|
69
|
+
3. Write regression test
|
|
70
|
+
4. Verify fix doesn't break other tests
|
|
71
|
+
|
|
72
|
+
- stepId: verify-fix
|
|
73
|
+
type: tool
|
|
74
|
+
name: Verify Fix
|
|
75
|
+
timeout: 120000
|
|
76
|
+
retryPolicy:
|
|
77
|
+
maxAttempts: 2
|
|
78
|
+
backoffMs: 3000
|
|
79
|
+
config:
|
|
80
|
+
tool: guard_check
|
|
81
|
+
args:
|
|
82
|
+
policyId: test-pass
|
|
83
|
+
runTests: true
|
|
84
|
+
|
|
85
|
+
- stepId: document-resolution
|
|
86
|
+
type: prompt
|
|
87
|
+
name: Document Resolution
|
|
88
|
+
timeout: 30000
|
|
89
|
+
config:
|
|
90
|
+
agentId: writer
|
|
91
|
+
prompt: |
|
|
92
|
+
Document the bug resolution:
|
|
93
|
+
1. Root cause summary
|
|
94
|
+
2. Fix description
|
|
95
|
+
3. Prevention recommendations
|
|
96
|
+
4. Post-mortem notes if severe
|
|
97
|
+
|
|
98
|
+
metadata:
|
|
99
|
+
category: maintenance
|
|
100
|
+
tags:
|
|
101
|
+
- debugging
|
|
102
|
+
- bug-fix
|
|
103
|
+
- investigation
|
|
104
|
+
requiredAbilities:
|
|
105
|
+
- debugging
|
|
106
|
+
- error-handling
|
|
107
|
+
- testing-strategy
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
workflowId: designer
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
name: System Design Workflow
|
|
4
|
+
description: Technical system design and architecture planning
|
|
5
|
+
|
|
6
|
+
steps:
|
|
7
|
+
- stepId: gather-requirements
|
|
8
|
+
type: prompt
|
|
9
|
+
name: Gather Requirements
|
|
10
|
+
timeout: 60000
|
|
11
|
+
config:
|
|
12
|
+
agentId: product
|
|
13
|
+
prompt: |
|
|
14
|
+
Gather system requirements:
|
|
15
|
+
1. Functional requirements
|
|
16
|
+
2. Non-functional requirements (scale, performance, security)
|
|
17
|
+
3. Constraints and limitations
|
|
18
|
+
4. Integration needs
|
|
19
|
+
|
|
20
|
+
- stepId: analyze-scope
|
|
21
|
+
type: prompt
|
|
22
|
+
name: Analyze Scope
|
|
23
|
+
timeout: 60000
|
|
24
|
+
config:
|
|
25
|
+
agentId: architecture
|
|
26
|
+
prompt: |
|
|
27
|
+
Analyze the system scope:
|
|
28
|
+
1. Identify major components
|
|
29
|
+
2. Define system boundaries
|
|
30
|
+
3. Map external dependencies
|
|
31
|
+
4. Estimate complexity
|
|
32
|
+
|
|
33
|
+
- stepId: design-architecture
|
|
34
|
+
type: tool
|
|
35
|
+
name: Design Architecture
|
|
36
|
+
timeout: 120000
|
|
37
|
+
config:
|
|
38
|
+
tool: design_architecture
|
|
39
|
+
args:
|
|
40
|
+
style: component-diagram
|
|
41
|
+
includeInteractions: true
|
|
42
|
+
|
|
43
|
+
- stepId: design-api
|
|
44
|
+
type: tool
|
|
45
|
+
name: Design API Contracts
|
|
46
|
+
timeout: 90000
|
|
47
|
+
config:
|
|
48
|
+
tool: design_api
|
|
49
|
+
args:
|
|
50
|
+
format: openapi
|
|
51
|
+
version: "3.0"
|
|
52
|
+
|
|
53
|
+
- stepId: design-data-model
|
|
54
|
+
type: tool
|
|
55
|
+
name: Design Data Model
|
|
56
|
+
timeout: 90000
|
|
57
|
+
config:
|
|
58
|
+
tool: design_schema
|
|
59
|
+
args:
|
|
60
|
+
type: database
|
|
61
|
+
normalize: true
|
|
62
|
+
|
|
63
|
+
- stepId: security-review
|
|
64
|
+
type: prompt
|
|
65
|
+
name: Security Review
|
|
66
|
+
timeout: 60000
|
|
67
|
+
config:
|
|
68
|
+
agentId: security
|
|
69
|
+
prompt: |
|
|
70
|
+
Review security aspects:
|
|
71
|
+
1. Authentication and authorization
|
|
72
|
+
2. Data protection
|
|
73
|
+
3. Network security
|
|
74
|
+
4. Compliance requirements
|
|
75
|
+
|
|
76
|
+
- stepId: scalability-review
|
|
77
|
+
type: prompt
|
|
78
|
+
name: Scalability Review
|
|
79
|
+
timeout: 60000
|
|
80
|
+
config:
|
|
81
|
+
agentId: architecture
|
|
82
|
+
prompt: |
|
|
83
|
+
Review scalability:
|
|
84
|
+
1. Identify bottlenecks
|
|
85
|
+
2. Plan horizontal scaling
|
|
86
|
+
3. Define caching strategy
|
|
87
|
+
4. Plan for growth
|
|
88
|
+
|
|
89
|
+
- stepId: create-documentation
|
|
90
|
+
type: prompt
|
|
91
|
+
name: Create Design Documentation
|
|
92
|
+
timeout: 120000
|
|
93
|
+
config:
|
|
94
|
+
agentId: writer
|
|
95
|
+
prompt: |
|
|
96
|
+
Create design documentation:
|
|
97
|
+
1. Architecture overview
|
|
98
|
+
2. Component descriptions
|
|
99
|
+
3. API documentation
|
|
100
|
+
4. Data model documentation
|
|
101
|
+
5. Deployment guide
|
|
102
|
+
|
|
103
|
+
metadata:
|
|
104
|
+
category: architecture
|
|
105
|
+
tags:
|
|
106
|
+
- system-design
|
|
107
|
+
- architecture
|
|
108
|
+
- planning
|
|
109
|
+
requiredAbilities:
|
|
110
|
+
- system-design
|
|
111
|
+
- api-design
|
|
112
|
+
- db-modeling
|
|
113
|
+
- security
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
workflowId: developer
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
name: Feature Development Workflow
|
|
4
|
+
description: End-to-end feature development from requirements to implementation
|
|
5
|
+
|
|
6
|
+
steps:
|
|
7
|
+
- stepId: understand-requirements
|
|
8
|
+
type: prompt
|
|
9
|
+
name: Understand Requirements
|
|
10
|
+
timeout: 60000
|
|
11
|
+
config:
|
|
12
|
+
agentId: product
|
|
13
|
+
prompt: |
|
|
14
|
+
Analyze the feature request:
|
|
15
|
+
1. Identify user stories and acceptance criteria
|
|
16
|
+
2. Define success metrics
|
|
17
|
+
3. List dependencies and blockers
|
|
18
|
+
4. Estimate complexity
|
|
19
|
+
|
|
20
|
+
- stepId: design-solution
|
|
21
|
+
type: prompt
|
|
22
|
+
name: Design Solution
|
|
23
|
+
timeout: 120000
|
|
24
|
+
config:
|
|
25
|
+
agentId: architecture
|
|
26
|
+
prompt: |
|
|
27
|
+
Design the technical solution:
|
|
28
|
+
1. Propose architecture changes
|
|
29
|
+
2. Define API contracts
|
|
30
|
+
3. Identify affected components
|
|
31
|
+
4. Plan database changes
|
|
32
|
+
5. Consider security implications
|
|
33
|
+
|
|
34
|
+
- stepId: create-plan
|
|
35
|
+
type: tool
|
|
36
|
+
name: Create Implementation Plan
|
|
37
|
+
timeout: 30000
|
|
38
|
+
config:
|
|
39
|
+
tool: task_create
|
|
40
|
+
args:
|
|
41
|
+
type: implementation
|
|
42
|
+
breakdown: true
|
|
43
|
+
|
|
44
|
+
- stepId: implement-backend
|
|
45
|
+
type: prompt
|
|
46
|
+
name: Implement Backend
|
|
47
|
+
timeout: 300000
|
|
48
|
+
config:
|
|
49
|
+
agentId: backend
|
|
50
|
+
prompt: |
|
|
51
|
+
Implement the backend components:
|
|
52
|
+
1. Create/modify API endpoints
|
|
53
|
+
2. Implement business logic
|
|
54
|
+
3. Add database migrations
|
|
55
|
+
4. Write unit tests
|
|
56
|
+
|
|
57
|
+
- stepId: implement-frontend
|
|
58
|
+
type: prompt
|
|
59
|
+
name: Implement Frontend
|
|
60
|
+
timeout: 300000
|
|
61
|
+
config:
|
|
62
|
+
agentId: frontend
|
|
63
|
+
prompt: |
|
|
64
|
+
Implement the frontend components:
|
|
65
|
+
1. Create/modify UI components
|
|
66
|
+
2. Connect to API endpoints
|
|
67
|
+
3. Handle loading and error states
|
|
68
|
+
4. Write component tests
|
|
69
|
+
|
|
70
|
+
- stepId: integration-test
|
|
71
|
+
type: tool
|
|
72
|
+
name: Run Integration Tests
|
|
73
|
+
timeout: 120000
|
|
74
|
+
retryPolicy:
|
|
75
|
+
maxAttempts: 3
|
|
76
|
+
backoffMs: 5000
|
|
77
|
+
config:
|
|
78
|
+
tool: guard_check
|
|
79
|
+
args:
|
|
80
|
+
policyId: test-coverage
|
|
81
|
+
threshold: 80
|
|
82
|
+
|
|
83
|
+
- stepId: documentation
|
|
84
|
+
type: prompt
|
|
85
|
+
name: Update Documentation
|
|
86
|
+
timeout: 60000
|
|
87
|
+
config:
|
|
88
|
+
agentId: writer
|
|
89
|
+
prompt: |
|
|
90
|
+
Update documentation:
|
|
91
|
+
1. API documentation
|
|
92
|
+
2. User guide updates
|
|
93
|
+
3. Changelog entry
|
|
94
|
+
4. Architecture diagrams
|
|
95
|
+
|
|
96
|
+
metadata:
|
|
97
|
+
category: development
|
|
98
|
+
tags:
|
|
99
|
+
- feature
|
|
100
|
+
- full-stack
|
|
101
|
+
- implementation
|
|
102
|
+
requiredAbilities:
|
|
103
|
+
- code-generation
|
|
104
|
+
- api-design
|
|
105
|
+
- testing-strategy
|