ai-flow-dev 2.8.1 → 2.9.0
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 +16 -14
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-0.md +0 -2
- package/prompts/backend/flow-build-phase-8.md +140 -18
- package/prompts/backend/flow-check.md +73 -39
- package/prompts/backend/flow-finish.md +424 -89
- package/prompts/desktop/flow-build-phase-8.md +72 -3
- package/prompts/desktop/flow-finish.md +430 -89
- package/prompts/frontend/flow-build-phase-0.md +39 -5
- package/prompts/frontend/flow-build-phase-8.md +100 -17
- package/prompts/frontend/flow-finish.md +426 -89
- package/prompts/frontend/flow-work-api.md +6 -4
- package/prompts/frontend/flow-work.md +16 -4
- package/prompts/mobile/flow-build-phase-0.md +39 -5
- package/prompts/mobile/flow-build-phase-8.md +114 -14
- package/prompts/mobile/flow-finish.md +430 -89
- package/prompts/mobile/flow-work-api.md +6 -4
- package/prompts/mobile/flow-work.md +16 -4
- package/prompts/shared/flow-report.md +636 -0
- package/templates/pr-description.template.md +298 -0
|
@@ -147,41 +147,56 @@ fi
|
|
|
147
147
|
**Detect and run test command:**
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
# Node.js/JavaScript
|
|
150
|
+
# Node.js/JavaScript - JSON output preferred
|
|
151
151
|
npm test -- --coverage --json > .ai-flow/cache/test-results.json 2>&1
|
|
152
152
|
|
|
153
|
-
# Python
|
|
153
|
+
# Python - JSON output preferred
|
|
154
154
|
pytest --cov --json-report --json-report-file=.ai-flow/cache/test-results.json
|
|
155
155
|
|
|
156
|
-
# Go
|
|
157
|
-
go test -v -coverprofile=.ai-flow/cache/coverage.out ./... 2>&1
|
|
156
|
+
# Go - Coverage file only (needed for reports), output to terminal
|
|
157
|
+
go test -v -coverprofile=.ai-flow/cache/coverage.out ./... 2>&1
|
|
158
158
|
|
|
159
|
-
# Java (Maven)
|
|
160
|
-
mvn test -q
|
|
159
|
+
# Java (Maven) - Output to terminal, parse summary
|
|
160
|
+
mvn test -q 2>&1
|
|
161
161
|
|
|
162
|
-
# Java (Gradle)
|
|
163
|
-
gradle test --quiet
|
|
162
|
+
# Java (Gradle) - Output to terminal, parse summary
|
|
163
|
+
gradle test --quiet 2>&1
|
|
164
164
|
|
|
165
|
-
# Ruby (RSpec)
|
|
165
|
+
# Ruby (RSpec) - JSON output preferred
|
|
166
166
|
rspec --format json --out .ai-flow/cache/test-results.json
|
|
167
167
|
|
|
168
|
-
# PHP (PHPUnit)
|
|
168
|
+
# PHP (PHPUnit) - XML/JSON output preferred
|
|
169
169
|
phpunit --log-junit .ai-flow/cache/test-results.xml
|
|
170
170
|
|
|
171
|
-
# Rust (Cargo)
|
|
172
|
-
cargo test --quiet
|
|
171
|
+
# Rust (Cargo) - Output to terminal, parse summary
|
|
172
|
+
cargo test --quiet 2>&1
|
|
173
173
|
|
|
174
|
-
# C# (.NET)
|
|
175
|
-
dotnet test --
|
|
174
|
+
# C# (.NET) - Output to terminal, parse summary
|
|
175
|
+
dotnet test --verbosity quiet 2>&1
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
**Cache Strategy:**
|
|
179
|
+
|
|
180
|
+
- **Save to file:** Only JSON/XML formats that are parseable and structured
|
|
181
|
+
- **Terminal output:** Plain text results - parse on the fly, don't save
|
|
182
|
+
- **Why:** Avoids creating large, unparseable .txt files that consume tokens unnecessarily
|
|
183
|
+
|
|
178
184
|
**Parse results:**
|
|
179
185
|
|
|
180
186
|
- Total tests executed
|
|
181
187
|
- Tests passed / failed
|
|
182
|
-
- Test coverage percentage
|
|
188
|
+
- Test coverage percentage (from coverage file if available)
|
|
183
189
|
- Failed test details (name, error, file)
|
|
184
190
|
|
|
191
|
+
**Parsing Strategy:**
|
|
192
|
+
|
|
193
|
+
- **JSON/XML available**: Read from cached file, extract structured data
|
|
194
|
+
- **Plain text only**: Parse terminal output directly using regex patterns:
|
|
195
|
+
- Look for patterns like "X tests, Y passed, Z failed"
|
|
196
|
+
- Extract coverage percentage from output
|
|
197
|
+
- Capture failed test names and files
|
|
198
|
+
- **Store parsed summary**: Always save to `status.json`, regardless of cache format
|
|
199
|
+
|
|
185
200
|
**Handle failures:**
|
|
186
201
|
|
|
187
202
|
- If tests fail: Continue workflow, mark as ⛔ BLOCKED
|
|
@@ -246,6 +261,12 @@ dotnet format --verify-no-changes --report .ai-flow/cache/lint-results.json
|
|
|
246
261
|
- Group by rule/category
|
|
247
262
|
- Top 5 most frequent issues
|
|
248
263
|
|
|
264
|
+
**Parsing Strategy:**
|
|
265
|
+
|
|
266
|
+
- **JSON available**: Read from cached file `.ai-flow/cache/lint-results.json`
|
|
267
|
+
- **Plain text only**: Parse terminal output for error/warning counts
|
|
268
|
+
- **Store summary**: Always save aggregated metrics to `status.json`
|
|
269
|
+
|
|
249
270
|
**Update status.json:**
|
|
250
271
|
|
|
251
272
|
```json
|
|
@@ -270,36 +291,48 @@ dotnet format --verify-no-changes --report .ai-flow/cache/lint-results.json
|
|
|
270
291
|
**Run type checker:**
|
|
271
292
|
|
|
272
293
|
```bash
|
|
273
|
-
# JavaScript/TypeScript
|
|
274
|
-
tsc --noEmit --pretty false
|
|
294
|
+
# JavaScript/TypeScript - Output to terminal, parse summary
|
|
295
|
+
tsc --noEmit --pretty false 2>&1
|
|
275
296
|
|
|
276
|
-
# Python (mypy)
|
|
297
|
+
# Python (mypy) - JSON output preferred
|
|
277
298
|
mypy src/ --json-report .ai-flow/cache/
|
|
278
299
|
|
|
279
|
-
# Go (built-in)
|
|
300
|
+
# Go (built-in) - Output to terminal
|
|
280
301
|
go build -o /dev/null ./... 2>&1
|
|
281
302
|
|
|
282
|
-
# Java (javac - usually via build tool)
|
|
283
|
-
mvn compile -q
|
|
303
|
+
# Java (javac - usually via build tool) - Output to terminal
|
|
304
|
+
mvn compile -q 2>&1
|
|
284
305
|
|
|
285
|
-
# Ruby (Sorbet)
|
|
286
|
-
srb tc --lsp-disable-diagnostics
|
|
306
|
+
# Ruby (Sorbet) - Output to terminal
|
|
307
|
+
srb tc --lsp-disable-diagnostics 2>&1
|
|
287
308
|
|
|
288
|
-
# PHP (Psalm)
|
|
309
|
+
# PHP (Psalm) - JSON output preferred
|
|
289
310
|
psalm --output-format=json > .ai-flow/cache/type-results.json
|
|
290
311
|
|
|
291
|
-
# Rust (cargo check)
|
|
312
|
+
# Rust (cargo check) - JSON output preferred
|
|
292
313
|
cargo check --message-format=json > .ai-flow/cache/type-results.json 2>&1
|
|
293
314
|
|
|
294
|
-
# C# (dotnet build)
|
|
295
|
-
dotnet build --no-incremental
|
|
315
|
+
# C# (dotnet build) - Output to terminal
|
|
316
|
+
dotnet build --no-incremental --verbosity quiet 2>&1
|
|
296
317
|
```
|
|
297
318
|
|
|
319
|
+
**Cache Strategy:**
|
|
320
|
+
|
|
321
|
+
- **Save to file:** Only JSON formats that provide structured error data
|
|
322
|
+
- **Terminal output:** Plain text results - parse immediately, extract error count
|
|
323
|
+
- **Why:** Type errors are typically few and specific; full output not needed in cache
|
|
324
|
+
|
|
298
325
|
**Parse results:**
|
|
299
326
|
|
|
300
327
|
- Type errors count
|
|
301
|
-
- Error locations
|
|
302
|
-
- Error categories
|
|
328
|
+
- Error locations (if available in structured format)
|
|
329
|
+
- Error categories (if available)
|
|
330
|
+
|
|
331
|
+
**Parsing Strategy:**
|
|
332
|
+
|
|
333
|
+
- **JSON available**: Read from `.ai-flow/cache/type-results.json` for detailed error data
|
|
334
|
+
- **Plain text only**: Parse terminal output for error count (e.g., "Found 5 errors")
|
|
335
|
+
- **Store summary**: Always save error count and pass/fail status to `status.json`
|
|
303
336
|
|
|
304
337
|
**Update status.json:**
|
|
305
338
|
|
|
@@ -658,28 +691,29 @@ stmt.executeQuery();
|
|
|
658
691
|
### Test Execution Errors
|
|
659
692
|
|
|
660
693
|
- **Command not found**: Skip tests, note in report as "Not configured"
|
|
661
|
-
- **Tests fail**: Continue workflow, include failures in report
|
|
662
|
-
- **Timeout**: Stop after 5 minutes, report partial results
|
|
663
|
-
- **Parse error**:
|
|
694
|
+
- **Tests fail**: Continue workflow, include failures in report with parsed summary
|
|
695
|
+
- **Timeout**: Stop after 5 minutes, report partial results from what was captured
|
|
696
|
+
- **Parse error**: If JSON/XML unavailable, parse terminal output for summary metrics
|
|
664
697
|
|
|
665
698
|
### Linting Errors
|
|
666
699
|
|
|
667
700
|
- **Command not found**: Skip linting, note in report
|
|
668
|
-
- **Configuration error**: Show error, continue workflow
|
|
669
|
-
- **Parse error**:
|
|
701
|
+
- **Configuration error**: Show error summary, continue workflow
|
|
702
|
+
- **Parse error**: Extract key metrics from terminal output (error count, warning count)
|
|
670
703
|
|
|
671
704
|
### Type Check Errors
|
|
672
705
|
|
|
673
706
|
- **Command not found**: Skip, note in report
|
|
674
|
-
- **Configuration error**: Show error, continue
|
|
707
|
+
- **Configuration error**: Show error summary, continue
|
|
708
|
+
- **Parse error**: Extract error count from terminal output
|
|
675
709
|
|
|
676
710
|
### File System Errors
|
|
677
711
|
|
|
678
|
-
- **Cannot create
|
|
679
|
-
- **Cannot read status.json**: Create new one
|
|
680
|
-
- **Cannot write status.json**: Show error,
|
|
712
|
+
- **Cannot create cache directory**: Continue without caching (parse from terminal output directly)
|
|
713
|
+
- **Cannot read status.json**: Create new one with empty structure
|
|
714
|
+
- **Cannot write status.json**: Show error, provide results in terminal only
|
|
681
715
|
|
|
682
|
-
**General rule:** Always complete full workflow.
|
|
716
|
+
**General rule:** Always complete full workflow. Parsed summaries are sufficient; full output caching is optional and only done for structured formats (JSON/XML).
|
|
683
717
|
|
|
684
718
|
---
|
|
685
719
|
|