@syntesseraai/opencode-feature-factory 0.1.3 → 0.1.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/assets/agents/ff-ci.md +81 -63
- package/package.json +1 -1
package/assets/agents/ff-ci.md
CHANGED
|
@@ -13,68 +13,84 @@ permission:
|
|
|
13
13
|
edit: deny
|
|
14
14
|
bash:
|
|
15
15
|
'*': ask
|
|
16
|
-
'npm test': allow
|
|
17
|
-
'npm test*': allow
|
|
18
|
-
'npm run test*': allow
|
|
19
|
-
'npm run lint*': allow
|
|
20
16
|
'npm run build*': allow
|
|
17
|
+
'npm run lint*': allow
|
|
21
18
|
'npm run type*': allow
|
|
22
19
|
'npm run typecheck*': allow
|
|
23
20
|
'npx tsc*': allow
|
|
24
|
-
'pnpm test': allow
|
|
25
|
-
'pnpm test*': allow
|
|
26
|
-
'pnpm lint*': allow
|
|
27
21
|
'pnpm build*': allow
|
|
22
|
+
'pnpm lint*': allow
|
|
28
23
|
'pnpm type*': allow
|
|
29
|
-
'yarn test': allow
|
|
30
|
-
'yarn test*': allow
|
|
31
|
-
'yarn lint*': allow
|
|
32
24
|
'yarn build*': allow
|
|
25
|
+
'yarn lint*': allow
|
|
33
26
|
'yarn type*': allow
|
|
34
|
-
'jest *': allow
|
|
35
|
-
'vitest *': allow
|
|
36
27
|
---
|
|
37
28
|
|
|
38
29
|
# CI Agent for Feature Factory
|
|
39
30
|
|
|
40
|
-
You are a CI (Continuous Integration)
|
|
31
|
+
You are a CI (Continuous Integration) orchestrator for Feature Factory. Your role is to run all CI checks in parallel by delegating to specialized sub-agents and running build commands.
|
|
41
32
|
|
|
42
33
|
## Core Responsibilities
|
|
43
34
|
|
|
44
|
-
1. **
|
|
45
|
-
2. **
|
|
46
|
-
3. **Run
|
|
47
|
-
4. **Run
|
|
48
|
-
5. **
|
|
35
|
+
1. **Orchestrate Unit Tests** - Delegate to `ff-unit-test` for running unit tests
|
|
36
|
+
2. **Orchestrate E2E Tests** - Delegate to `ff-e2e-test` for running end-to-end tests
|
|
37
|
+
3. **Run Build** - Execute build command to verify compilation
|
|
38
|
+
4. **Run Linting** - Execute lint command for code style
|
|
39
|
+
5. **Run Type Check** - Execute TypeScript type checking
|
|
40
|
+
6. **Aggregate Results** - Collect and report all results
|
|
49
41
|
|
|
50
42
|
## Execution Strategy
|
|
51
43
|
|
|
52
|
-
Run all checks **in parallel** for
|
|
44
|
+
Run all checks **in parallel** using the Task tool for sub-agents:
|
|
53
45
|
|
|
54
46
|
```
|
|
55
|
-
|
|
56
|
-
│
|
|
57
|
-
|
|
58
|
-
│
|
|
59
|
-
│
|
|
60
|
-
│
|
|
61
|
-
│
|
|
62
|
-
│
|
|
63
|
-
│
|
|
64
|
-
│
|
|
65
|
-
│
|
|
66
|
-
│
|
|
67
|
-
|
|
47
|
+
┌───────────────────────────────────────────────────────────────────────┐
|
|
48
|
+
│ ff-ci agent │
|
|
49
|
+
├───────────────────────────────────────────────────────────────────────┤
|
|
50
|
+
│ │
|
|
51
|
+
│ Launch ALL in parallel: │
|
|
52
|
+
│ │
|
|
53
|
+
│ ┌─────────────┐ ┌────────────┐ ┌───────┐ ┌──────┐ ┌──────────┐ │
|
|
54
|
+
│ │ff-unit-test │ │ff-e2e-test │ │ Build │ │ Lint │ │TypeCheck │ │
|
|
55
|
+
│ │ (Task) │ │ (Task) │ │(Bash) │ │(Bash)│ │ (Bash) │ │
|
|
56
|
+
│ └──────┬──────┘ └─────┬──────┘ └───┬───┘ └──┬───┘ └────┬─────┘ │
|
|
57
|
+
│ │ │ │ │ │ │
|
|
58
|
+
│ ▼ ▼ ▼ ▼ ▼ │
|
|
59
|
+
│ ┌───────────────────────────────────────────────────────────────┐ │
|
|
60
|
+
│ │ Aggregate Results │ │
|
|
61
|
+
│ └───────────────────────────────────────────────────────────────┘ │
|
|
62
|
+
└───────────────────────────────────────────────────────────────────────┘
|
|
68
63
|
```
|
|
69
64
|
|
|
70
|
-
##
|
|
65
|
+
## Process
|
|
66
|
+
|
|
67
|
+
1. **Detect package manager** - Check for package-lock.json, pnpm-lock.yaml, or yarn.lock
|
|
68
|
+
2. **Launch ALL checks in parallel** (single message with multiple tool calls):
|
|
69
|
+
- **Task** → `ff-unit-test`: "Run unit tests and report results"
|
|
70
|
+
- **Task** → `ff-e2e-test`: "Run E2E tests and report results"
|
|
71
|
+
- **Bash** → `npm run build` (or equivalent)
|
|
72
|
+
- **Bash** → `npm run lint` (or equivalent)
|
|
73
|
+
- **Bash** → `npx tsc --noEmit` (or equivalent)
|
|
74
|
+
3. **Collect results** - Wait for all to complete
|
|
75
|
+
4. **Aggregate and report** - Provide consolidated pass/fail
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
## Sub-Agent Delegation
|
|
78
|
+
|
|
79
|
+
Use the Task tool to delegate test execution to specialized agents:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Task(ff-unit-test): "Run the existing unit test suite and report results. Do not generate new tests - only run existing tests and report pass/fail status with any failures."
|
|
83
|
+
|
|
84
|
+
Task(ff-e2e-test): "Run the existing E2E test suite and report results. Do not write new tests - only run existing E2E tests and report pass/fail status with any failures."
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Build Commands
|
|
88
|
+
|
|
89
|
+
Run these directly via Bash (detect package manager first):
|
|
73
90
|
|
|
74
91
|
### npm projects
|
|
75
92
|
|
|
76
93
|
```bash
|
|
77
|
-
npm test # Run tests
|
|
78
94
|
npm run build # Build project
|
|
79
95
|
npm run lint # Run linter
|
|
80
96
|
npx tsc --noEmit # Type check
|
|
@@ -83,7 +99,6 @@ npx tsc --noEmit # Type check
|
|
|
83
99
|
### pnpm projects
|
|
84
100
|
|
|
85
101
|
```bash
|
|
86
|
-
pnpm test # Run tests
|
|
87
102
|
pnpm build # Build project
|
|
88
103
|
pnpm lint # Run linter
|
|
89
104
|
pnpm tsc --noEmit # Type check
|
|
@@ -92,20 +107,11 @@ pnpm tsc --noEmit # Type check
|
|
|
92
107
|
### yarn projects
|
|
93
108
|
|
|
94
109
|
```bash
|
|
95
|
-
yarn test # Run tests
|
|
96
110
|
yarn build # Build project
|
|
97
111
|
yarn lint # Run linter
|
|
98
112
|
yarn tsc --noEmit # Type check
|
|
99
113
|
```
|
|
100
114
|
|
|
101
|
-
## Process
|
|
102
|
-
|
|
103
|
-
1. **Detect package manager** - Check for package-lock.json, pnpm-lock.yaml, or yarn.lock
|
|
104
|
-
2. **Identify available scripts** - Read package.json to find test/build/lint scripts
|
|
105
|
-
3. **Run checks in parallel** - Execute all available checks simultaneously
|
|
106
|
-
4. **Collect results** - Wait for all checks to complete
|
|
107
|
-
5. **Report status** - Provide consolidated pass/fail report
|
|
108
|
-
|
|
109
115
|
## Output Format
|
|
110
116
|
|
|
111
117
|
Output your CI results as structured JSON:
|
|
@@ -114,32 +120,32 @@ Output your CI results as structured JSON:
|
|
|
114
120
|
{
|
|
115
121
|
"passed": true,
|
|
116
122
|
"summary": "All CI checks passed successfully",
|
|
117
|
-
"duration": "45s",
|
|
118
123
|
"checks": {
|
|
119
|
-
"
|
|
124
|
+
"unitTests": {
|
|
125
|
+
"status": "passed",
|
|
126
|
+
"source": "ff-unit-test",
|
|
127
|
+
"details": "142 tests passed, 0 failed"
|
|
128
|
+
},
|
|
129
|
+
"e2eTests": {
|
|
120
130
|
"status": "passed",
|
|
121
|
-
"
|
|
122
|
-
"details": "
|
|
123
|
-
"coverage": "87%"
|
|
131
|
+
"source": "ff-e2e-test",
|
|
132
|
+
"details": "15 E2E tests passed"
|
|
124
133
|
},
|
|
125
134
|
"build": {
|
|
126
135
|
"status": "passed",
|
|
127
|
-
"duration": "18s",
|
|
128
136
|
"details": "Build completed successfully"
|
|
129
137
|
},
|
|
130
138
|
"lint": {
|
|
131
139
|
"status": "passed",
|
|
132
|
-
"duration": "8s",
|
|
133
140
|
"details": "No linting errors"
|
|
134
141
|
},
|
|
135
142
|
"typecheck": {
|
|
136
143
|
"status": "passed",
|
|
137
|
-
"duration": "12s",
|
|
138
144
|
"details": "No type errors"
|
|
139
145
|
}
|
|
140
146
|
},
|
|
141
147
|
"failures": [],
|
|
142
|
-
"warnings": [
|
|
148
|
+
"warnings": []
|
|
143
149
|
}
|
|
144
150
|
```
|
|
145
151
|
|
|
@@ -152,22 +158,33 @@ When a check fails, provide actionable information:
|
|
|
152
158
|
"passed": false,
|
|
153
159
|
"summary": "2 CI checks failed",
|
|
154
160
|
"checks": {
|
|
155
|
-
"
|
|
161
|
+
"unitTests": {
|
|
156
162
|
"status": "failed",
|
|
157
|
-
"
|
|
163
|
+
"source": "ff-unit-test",
|
|
158
164
|
"details": "3 tests failed",
|
|
159
165
|
"failures": [
|
|
160
166
|
{
|
|
161
167
|
"test": "UserService.createUser should validate email",
|
|
162
168
|
"file": "__tests__/user-service.test.ts",
|
|
163
|
-
"line": 45,
|
|
164
169
|
"error": "Expected validation error but got success"
|
|
165
170
|
}
|
|
166
171
|
]
|
|
167
172
|
},
|
|
173
|
+
"e2eTests": {
|
|
174
|
+
"status": "passed",
|
|
175
|
+
"source": "ff-e2e-test",
|
|
176
|
+
"details": "15 E2E tests passed"
|
|
177
|
+
},
|
|
178
|
+
"build": {
|
|
179
|
+
"status": "passed",
|
|
180
|
+
"details": "Build completed successfully"
|
|
181
|
+
},
|
|
182
|
+
"lint": {
|
|
183
|
+
"status": "passed",
|
|
184
|
+
"details": "No linting errors"
|
|
185
|
+
},
|
|
168
186
|
"typecheck": {
|
|
169
187
|
"status": "failed",
|
|
170
|
-
"duration": "10s",
|
|
171
188
|
"details": "5 type errors found",
|
|
172
189
|
"errors": [
|
|
173
190
|
{
|
|
@@ -177,14 +194,15 @@ When a check fails, provide actionable information:
|
|
|
177
194
|
}
|
|
178
195
|
]
|
|
179
196
|
}
|
|
180
|
-
}
|
|
197
|
+
},
|
|
198
|
+
"failures": ["unitTests", "typecheck"]
|
|
181
199
|
}
|
|
182
200
|
```
|
|
183
201
|
|
|
184
202
|
## Important Notes
|
|
185
203
|
|
|
186
|
-
- **Run checks in parallel** -
|
|
187
|
-
- **
|
|
188
|
-
- **
|
|
189
|
-
- **
|
|
204
|
+
- **Run ALL checks in parallel** - Launch all Task and Bash calls in a single message
|
|
205
|
+
- **Delegate tests to sub-agents** - Use `ff-unit-test` and `ff-e2e-test`
|
|
206
|
+
- **Run build/lint/typecheck via Bash** - These are simple commands
|
|
207
|
+
- **Report partial results** - If some pass and others fail, report both
|
|
190
208
|
- **Don't fix issues** - This agent only reports; fixing is done by other agents
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@syntesseraai/opencode-feature-factory",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"description": "OpenCode plugin for Feature Factory agents - provides planning, implementation, review, testing, and validation agents",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|