feat: require Industry & Press Correlation section in AI analysis output (#133)

feat: require Industry & Press Correlation section in analysis output Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Juan Manuel Servera committed May 19, 2026 at 20:34 UTC 8f16ca1e90fa9dc67e139306939b2cf34480a616
3 files changed +13
.squad/agents/bender/history.md
+2
@@ -35,3 +35,5 @@
35 - **2026-05-19T19:37:45+02:00:** Issue #128 — the PR-based approach from #123 also failed because the repo setting "Allow GitHub Actions to create or approve pull requests" is disabled. Fix: PR #129 replaces all `gh pr create` + `gh pr merge --auto` steps with direct push to an unprotected `publish` branch. The main branch ruleset only protects `refs/heads/main`, so `publish` accepts pushes from `GITHUB_TOKEN`. Key learnings: (1) Can't use branch name `data` if `data/*` branches already exist (git ref namespace collision). (2) Must use `git checkout -f` when switching branches after artifact downloads modify the working tree. (3) Deploy job's `github-pages` environment only allows deploys from main — expected failure when testing from feature branches.
36
37 **TEAM UPDATE 2026-05-19T17:37:45Z:** Decisions and directives captured in `.squad/decisions.md`: (1) "Use `publish` branch for automated data commits" — approved and implemented in PR #129. (2) "Manual W21 content regeneration" — executed via PR #125. (3) Team directive "Never bypass branch protection rulesets" documented. Scribe orchestration logs created for both Bender and Hermes. All inbox decisions merged and deduplicated.
38 +
39 +- **2026-05-19T20:29:16+02:00:** PR #133 — TechCrunch press data was being appended to the AI prompt but the AI had no required output section for it. Fix: added `## Industry & Press Correlation` as a mandatory section in `prompts/analyze-weekly.md` (rule 13 required sections, rule 14 scope guidance, output template). Also updated the no-AI fallback in `scripts/analyze_fallback.py`. Key learning: appending context to an LLM prompt is NOT sufficient — you must also add explicit output format requirements or the model will ignore/merge the data into existing sections.
prompts/analyze-weekly.md
+7
@@ -96,6 +96,8 @@ Be critical, selective, and opinionated.
96
97 ## Trending This Week
98
99 +## Industry & Press Correlation
100 +
101 ## Trend Analysis
102 ### Signal
103 ### Noise
@@ -109,6 +111,7 @@ Be critical, selective, and opinionated.
111 14. Keep the section scope aligned with the spec:
112 - `## Notable New Repositories`: ~120-220 words, curating 3-7 repos.
113 - `## Trending This Week`: ~100-180 words; explain where attention moved and add the stars-gained caveat when data is missing.
114 + - `## Industry & Press Correlation`: ~100-200 words. REQUIRED even if no press data is available (state that explicitly). When press data IS provided in the prompt, you MUST: (a) highlight 2-4 key correlations between GitHub activity and TechCrunch coverage, (b) call out divergences — tech trends covered by press with no matching dev activity, AND dev activity with no press coverage, (c) label repos as press-correlated vs organic growth. If no press data section appears below, write "No industry press data was available for this week's analysis."
115 - `## Trend Analysis`: ~150-260 words total across `### Signal` and `### Noise`.
116 - `## What's Missing`: ~80-160 words with 2-4 concrete blind spots under `### Gaps`.
117 - `## Conclusion`: ~50-110 words focused on why the week matters and what to watch next.
@@ -153,6 +156,10 @@ Write 1-2 paragraphs that curate the most credible new launches. Whenever you me
156
157 Write 1 paragraph about where attention moved. If star deltas are missing, say so clearly. Whenever you mention a repo, use `[owner/repo](https://github.com/owner/repo)`.
158
159 +## Industry & Press Correlation
160 +
161 +Write 1-2 paragraphs analyzing the relationship between developer activity and industry press coverage. If press data was provided in this prompt, highlight key correlations (repos that gained stars due to press), identify divergences (press-hyped topics with no dev traction, and dev activity flying under the media radar), and label repos as 📰 Press-correlated, 🌱 Organic growth, or ⚠️ Hype risk where applicable. If no press data was provided, state: "No industry press data was available for this week's analysis."
162 +
163 ## Trend Analysis
164
165 ### Signal
scripts/analyze_fallback.py
+4
@@ -330,6 +330,10 @@ The trending set includes {len(trending_repos)} repositories that were active du
330
331 The presence of established projects alongside newer entries indicates both sustained momentum in foundational tools and growing interest in emerging categories.
332
333 +## Industry & Press Correlation
334 +
335 +No industry press data was available for this week's analysis. Future runs with TechCrunch integration enabled will provide correlation analysis between developer activity and industry coverage, highlighting press-driven hype versus organic growth patterns.
336 +
337 ## Trend Analysis
338
339 ### Signal