You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/TEMPLATES/_AI_INSTRUCTIONS.md
+75-6Lines changed: 75 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ When a user requests **"Run template [name] end to end"**, execute the complete
38
38
39
39
1.**Run scan** → Generate JSON log (Phase 1c)
40
40
2.**AI triage** → Analyze findings and update JSON (Phase 2)
41
-
3.**Generate HTML** → Create final report with AI summary (Phase 2)
41
+
3.**Generate HTML** → Create final report with AI summary (Phase 2) ⚠️ **MUST happen AFTER triage**
42
42
4.**Create GitHub issue** → Automated or manual (Phase 3)
43
43
44
44
**No manual intervention required** - the AI agent handles all phases automatically.
@@ -49,12 +49,32 @@ When a user requests **"Run template [name] end to end"**, execute the complete
49
49
- "Run gravityforms complete workflow"
50
50
- "Scan, triage, and create GitHub issue for hypercart-helper"
51
51
52
-
**AI Agent Actions:**
52
+
### ⚠️ CRITICAL: Orchestration Sequence
53
+
54
+
**The HTML report MUST be regenerated AFTER AI triage is complete.** This is the most important rule to prevent missing AI triage data in the final report.
55
+
56
+
**Correct Sequence:**
57
+
```
58
+
1. Run scan → JSON created
59
+
2. AI triage → JSON updated with ai_triage section
60
+
3. Regenerate HTML → HTML includes AI triage data
61
+
4. Create GitHub issue → Issue includes AI classifications
62
+
```
63
+
64
+
**Incorrect Sequence (DO NOT DO THIS):**
65
+
```
66
+
❌ 1. Run scan → JSON created
67
+
❌ 2. Generate HTML → HTML created WITHOUT ai_triage data
68
+
❌ 3. AI triage → JSON updated, but HTML is stale
69
+
❌ 4. Create GitHub issue → Issue missing AI classifications
70
+
```
71
+
72
+
**AI Agent Actions (Correct Order):**
53
73
1. Execute scan: `dist/bin/run [template-name]` (wait for completion)
**Prevention:** Always follow the correct sequence:
730
+
1. Run scan → JSON created
731
+
2. Perform AI triage → JSON updated with `ai_triage` section
732
+
3. Regenerate HTML → HTML includes AI summary
733
+
4. Create GitHub issue → Issue includes AI classifications
734
+
735
+
**Remember:** The HTML converter reads the JSON file at the time it runs. If you regenerate HTML before updating the JSON with AI triage data, the HTML will not include the triage information.
736
+
669
737
### Getting Help
670
738
671
739
If you encounter issues not covered here:
@@ -700,12 +768,13 @@ If you encounter issues not covered here:
0 commit comments