chore: cleanup obsolete artifacts after W21 rescue session (#168)

Deleted: - .github/agents/farnsworth.agent.md — orphaned standalone agent definition; both CI workflow calls use '--agent squad' and address Farnsworth via prompt text. Unique operational content (CI run protocol, analysis framework, output contract) ported to .squad/agents/farnsworth/charter.md before deletion. - .squad/decisions/decisions.md — legacy duplicate of .squad/decisions.md (canonical per squad.agent.md hierarchy). Three unique entries not present in canonical file (TechCrunch Enrichment Signal, Milestone-based workflow, Press Context Dual-Mode Rendering) were merged into .squad/decisions.md before deletion. - .squad/agents/checkpoint.txt — leftover scratch file with stale phase-1 checkpoint data, no longer referenced by any agent or workflow. Archived to .squad/_archive/: - .squad/health-2026-05-19T20:57:55Z.md — one-off diagnostic snapshot from phase-1 scribe health run; no active references. - .squad/logs/ (entire legacy plural directory, 10 files) — phase-1 diagnostic logs predating the canonical .squad/log/ (singular) session log directory. All files moved to .squad/_archive/logs/ via git mv to preserve history. No-op (verified): - .gitattributes — already has all four required merge=union entries for squad append-only state files. - data/metrics/copilot-transcript.md — intentionally committed per pipeline design; excluded from Hugo build via excludeFiles config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Juan Manuel Servera committed May 25, 2026 at 16:59 UTC 879d4bc67632a3a89f241d2d7b826dd12a2d18c3
17 files changed +56 -180
.github/agents/farnsworth.agent.md deleted
-56
@@ -1,56 +0,0 @@
1 ----
2 -name: Farnsworth
3 -description: "SquadScope's analyst agent — runs in CI to analyze weekly GitHub trends and learn from past performance."
4 ----
5 -
6 -You are **Farnsworth**, the analyst for SquadScope. You run inside the CI pipeline to produce weekly editorial summaries of GitHub trends.
7 -
8 -## Identity
9 -
10 -- **Role:** Analyst / Content Curator
11 -- **Charter:** `.squad/agents/farnsworth/charter.md`
12 -- **History:** `.squad/agents/farnsworth/history.md`
13 -
14 -## Pre-Analysis: Load Learned State
15 -
16 -Before beginning analysis, you MUST read and internalize:
17 -
18 -1. **Wisdom** — `.squad/identity/wisdom.md` — heuristics that sharpen editorial judgment
19 -2. **Skills** — all `.md` files under `.squad/skills/` — reusable patterns from past work
20 -3. **History** — `.squad/agents/farnsworth/history.md` — your prior learnings and context
21 -
22 -Treat learned state as guidance that sharpens judgment, not as permission to ignore the current week's evidence.
23 -
24 -## Post-Analysis: Write Learnings
25 -
26 -After producing the analysis output, you MUST append learnings to `.squad/agents/farnsworth/history.md` under the `## Learnings` section. Format:
27 -
28 -```markdown
29 -- **YYYY-MM-DDTHH:MM:SS+ZZ:ZZ:** <concise learning statement>
30 -```
31 -
32 -Learnings to capture:
33 -- **Patterns observed:** recurring themes, surprising correlations, or new category emergence
34 -- **Quality notes:** where your judgment was uncertain, where data was sparse, what you'd check next time
35 -- **Decisions made:** editorial calls (promoted/demoted repos, noise/signal judgment) with brief rationale
36 -- **Skill candidates:** if you notice a reusable pattern worth extracting to `.squad/skills/`
37 -
38 -Keep each learning entry to 1-3 sentences. Only write genuinely new insights — do not repeat what's already in history.
39 -
40 -## Analysis Framework
41 -
42 -- **What's hot:** Repos gaining stars fastest, new repos with rapid adoption
43 -- **What's important:** Significant projects, tools, or shifts in the ecosystem
44 -- **What's trending:** Patterns across categories over multiple weeks
45 -- **What's missing:** Gaps in the ecosystem, underserved areas, declining trends
46 -
47 -## Boundaries
48 -
49 -- You read structured data from crawling output and produce analysis markdown
50 -- You do NOT collect data, build UI, or make architectural decisions
51 -- You MAY write to `.squad/agents/farnsworth/history.md` and `.squad/skills/` for learning
52 -- You MAY NOT modify `data/raw/`, `data/analyzed/` (except the designated output file), or any workflow files
53 -
54 -## Output Contract
55 -
56 -Your analysis output must conform to `docs/analysis-spec.md`: YAML frontmatter with `quality_score`, five stable H2 sections, required Signal/Noise/Gaps subsections.
.squad/_archive/health-2026-05-19T20:57:55Z.md renamed
.squad/_archive/logs/amy-phase1.md renamed
.squad/_archive/logs/bender-phase1.md renamed
.squad/_archive/logs/bender.log renamed
.squad/_archive/logs/fry-phase1.md renamed
.squad/_archive/logs/fry.log renamed
.squad/_archive/logs/health-report-phase1.md renamed
.squad/_archive/logs/leela-phase1.md renamed
.squad/_archive/logs/phase1-completion.md renamed
.squad/_archive/logs/ralph-phase1.md renamed
.squad/_archive/logs/session.log renamed
.squad/_archive/logs/stdlib-crawler-phase1.md renamed
.squad/agents/checkpoint.txt deleted
-22
@@ -1,22 +0,0 @@
1 -SQUAD CHECKPOINT: 2026-05-18 13:00:53+02:00
2 -
3 -=== DELIVERY STATUS ===
4 -Phase 0-1: COMPLETE (9 issues)
5 -Phase 2: IN_PROGRESS (2 issues merged)
6 -Phase 3-4: PENDING (15 issues)
7 -
8 -=== KEY ARTIFACTS ===
9 -- PR review workflow established
10 -- GraphQL thread resolution pattern
11 -- EMU auth switching documented
12 -- MCP architecture ratified
13 -
14 -=== AGENT TASKS ===
15 -All agents notified of session checkpoint. Continue Phase 2-4 execution.
16 -Review conversation gates enforced on all PRs.
17 -
18 -=== NEXT ACTIONS ===
19 -1. Review remaining 15 issues
20 -2. Apply established branch→PR→review→merge pattern
21 -3. Resolve Copilot threads before merge
22 -4. Maintain MCP architecture alignment
.squad/agents/farnsworth/charter.md
+25
@@ -20,6 +20,31 @@
20 ## Boundaries
21 **I handle:** analysis content, trend framing, editorial synthesis, and taxonomy judgment
22 **I don't handle:** data collection, frontend implementation, or architecture decisions
23 +**I MAY write to:** `.squad/agents/farnsworth/history.md` and `.squad/skills/` (learning outputs only)
24 +**I MAY NOT modify:** `data/raw/`, `data/analyzed/` (except the designated output file), or workflow files
25 +
26 +## CI Run Protocol
27 +
28 +**Before analysis — load learned state:**
29 +1. `.squad/identity/wisdom.md` — editorial heuristics
30 +2. All `.md` files under `.squad/skills/` — reusable patterns
31 +3. `.squad/agents/farnsworth/history.md` — prior learnings and context
32 +
33 +**After analysis — append learnings to `.squad/agents/farnsworth/history.md`:**
34 +```
35 +- **YYYY-MM-DDTHH:MM:SS+ZZ:ZZ:** <concise learning statement>
36 +```
37 +Capture: patterns observed, quality notes, editorial decisions made, skill candidates.
38 +Only write genuinely new insights — do not repeat what is already in history.
39 +
40 +## Analysis Framework
41 +- **What's hot:** Repos gaining stars fastest, new repos with rapid adoption
42 +- **What's important:** Significant projects, tools, or shifts in the ecosystem
43 +- **What's trending:** Patterns across categories over multiple weeks
44 +- **What's missing:** Gaps in the ecosystem, underserved areas, declining trends
45 +
46 +## Output Contract
47 +Output must conform to `docs/analysis-spec.md`: YAML frontmatter with `quality_score`, five stable H2 sections, required Signal/Noise/Gaps subsections.
48
49 ## Model
50 Preferred: auto
.squad/decisions.md
+31
@@ -1077,3 +1077,34 @@ The published analysis needs to read like an editorial artifact and satisfy the
1077 ## Impact
1078
1079 Applies to future weekly summaries and any generator work that consumes `data/analyzed/*-summary.md`.
1080 +
1081 +---
1082 +
1083 +## 2026-05-19: TechCrunch RSS as Enrichment Signal (PR #55)
1084 +
1085 +- **Owner:** Bender
1086 +- **Date:** 2026-05-19
1087 +- **Decision:** TechCrunch RSS integration is an enrichment signal (not primary source) with explicit low-expectation framing (5–15% correlation hit rate). Feature degrades to zero noise when no correlations found.
1088 +- **Why:** Correlation between press articles and repos is inherently low. Value lies in the delta (hype vs traction), not article summarization. Enrichment positioning allows silent failure without degrading digest.
1089 +- **Implications:** All future `DataSource` plugins must declare "primary" or "enrichment" status. Enrichment sources require explicit failure/removal criteria. Farnsworth's analysis treats correlation data as optional context, never required input.
1090 +
1091 +## 2026-05-19: Milestone-based workflow adopted
1092 +
1093 +- **Owner:** jmservera (via Copilot)
1094 +- **Date:** 2026-05-19
1095 +- **Decision:** All future work organized into versioned milestones (v0.5, v0.6, etc.). PRDs are decomposed into issues, assigned to milestones, then moved to docs/processed/. This enables progress tracking and versioning.
1096 +- **Why:** User directive — makes work easier to follow and enables versioning.
1097 +
1098 +## 2026-05-19: Press Context Dual-Mode Rendering
1099 +
1100 +- **Owner:** Farnsworth
1101 +- **Date:** 2026-05-19T20:50:22+02:00
1102 +- **Status:** Implemented
1103 +- **Decision:** Implement dual-mode rendering in `render_press_context.py` to serve AI prompts (full data + instructions) and reader-facing fallback (clean narrative) separately via `reader_mode` parameter and post-processing.
1104 +- **Why:** The press context serves two audiences. AI prompts need full data and model instructions; reader-facing pages should not expose AI directives or 100+ repo lists.
1105 +- **Changes:**
1106 + - `render_press_context(reader_mode=False)` — new kwarg. When True, limits correlations to top 10, strips `### Instructions` block, and passes reader_mode to `format_divergences()`
1107 + - `format_correlations_list(top_n=None)` — new kwarg. Truncates display and appends "…and N more repos"
1108 + - `format_divergences(reader_mode=False)` — new kwarg. Replaces instruction bullets with reader-friendly narrative
1109 + - `analyze_fallback._strip_ai_instructions(content)` — new helper. Applied in no-AI path to post-process rendered content
1110 +- **Consequences:** AI prompt path unchanged (full instructions + list continue to model); no-AI fallback now produces clean reader output. 16 new tests cover truncation, sorting, instruction stripping, narrative injection. All 498 tests passing. PR #135 merged.
.squad/decisions/decisions.md deleted
-102
@@ -1,102 +0,0 @@
1 -# SquadScope Decisions
2 -
3 -## 2026-05-18: Hugo Frontend with PaperMod Theme (Issue #3)
4 -
5 -- **Owner:** Amy
6 -- **Date:** 2026-05-18T10:27:35Z
7 -- **Decision:** Use Hugo with the PaperMod theme as the baseline frontend for the MVP.
8 -- **Why:** PaperMod gives the project responsive blog-style layouts, taxonomies, RSS, and built-in search support without adding a Node-based frontend toolchain.
9 -- **Paths:** `hugo.toml`, `content/`, `data/`, `.github/workflows/deploy-site.yml`, `themes/PaperMod`
10 -
11 -## 2026-05-18: Hugo Built-in RSS Path (Issue #4)
12 -
13 -- **Owner:** Amy
14 -- **Date:** 2026-05-18T10:27:35Z
15 -- **Decision:** Keep SquadScope on Hugo's built-in RSS output path (`/index.xml`) rather than adding a custom `feed.xml` alias for the MVP. Build navigation, archive chronology, and weekly report presentation through Hugo layouts so generated markdown remains the primary source of truth.
16 -- **Why:** Generator and deployment work can target Hugo defaults. Future notification or feed alias work can stay optional.
17 -
18 -## 2026-05-18: Stdlib-Only Python Crawler (Issue #5)
19 -
20 -- **Owner:** Bender
21 -- **Date:** 2026-05-18T10:27:35Z
22 -- **Decision:** Use a stdlib-only Python crawler (`urllib`) that writes `data/raw/YYYY-WNN.json`, computes trending rank from the latest prior raw snapshot when available, and defaults to fetching the top 250 search results per query while still supporting pagination up to GitHub's 1,000-result search limit via `--max-results`.
23 -- **Why:**
24 - - Keeps CI setup minimal (`requirements.txt` can stay dependency-free)
25 - - Makes weekly crawls deterministic and cheap enough for local and Actions runs
26 - - Preserves a path to deeper crawls without changing the data contract
27 -- **Notes:**
28 - - Search endpoints: `created:>{date} stars:>50` and `pushed:>{date} stars:>50`
29 - - Significance filter excludes forks, repos without descriptions, repos without READMEs, and obvious tutorial/homework/template repos
30 - - Repos with org SAML-blocked README endpoints are skipped instead of failing the crawl
31 -
32 -## 2026-05-18: Branch → PR → Review → Merge Workflow
33 -
34 -- **Owner:** jmservera (Copilot directive)
35 -- **Date:** 2026-05-18T10:59:10Z
36 -- **Decision:** Follow the typical branch → PR → Review → Merge process for each issue. Do NOT commit directly to main.
37 -- **Why:** For clean and understandable GitHub history. Each issue should get its own branch, a PR, review, then merge.
38 -- **Scope:** Affects all future agent spawns.
39 -
40 -## 2026-05-18: Copilot Reviews on PRs
41 -
42 -- **Owner:** jmservera (Copilot directive)
43 -- **Date:** 2026-05-18T12:07:20Z
44 -- **Decision:** Copilot reviews are activated on PRs. All review conversations must be resolved before merging.
45 -- **Why:** User request — captured for team memory. Ensures quality and completeness of code review before merge.
46 -- **Scope:** All PR workflows must check for and resolve Copilot review comments before merging.
47 -
48 -## 2026-05-18: Crawler Hardening with Filters, Caching, and Rate Limits (Issue #6)
49 -
50 -- **Owner:** Bender
51 -- **Date:** 2026-05-18T10:59:10Z
52 -- **Decision:** Treat README lookups as a degradable signal instead of a hard-stop path. The crawler now caches API responses, saves weekly star snapshots under `data/snapshots/`, logs rate-limit state, and caps README retry delays so partial failures are recorded in metadata instead of blocking the full weekly crawl.
53 -- **Why:** Search queries are cheap, but hundreds of README checks can trigger secondary throttling. Bounded retries plus persistent cache keep Phase 1 crawls finishable and give Farnsworth usable JSON even when GitHub responses are partial.
54 -- **Implementation:** PR #26 merged with all Copilot review comments addressed (commit 779f9ef).
55 -
56 -## 2026-05-18: Hugo Version Pinning and Dry-Run Validation (Issue #7)
57 -
58 -- **Owner:** Fry
59 -- **Date:** 2026-05-18T10:59:10Z
60 -- **Decision:** Pin Hugo version across all validation runs and infrastructure.
61 -- **Key findings:**
62 - 1. Local environment defaulted to `hugo v0.123.7`, but repository theme requires `v0.146.0+`. Dry-run validation only succeeded with `hugo v0.161.1`.
63 - 2. Trending requires historical state; `data/raw/2026-W21.json` contains no usable `stars_gained` values in `trending_repos`, so current output is popularity-biased rather than momentum-based.
64 - 3. Crawler filtering still lets through off-mission content (exploits, bypasses, cheats, game-mods). Needs stronger filtering or quality gate before auto-publish.
65 - 4. Analyze/generate contract needs final alignment. PRD weekly page shape and approved analyzer quality-gate contract are close but not identical.
66 -
67 -## 2026-05-18: Analyzed Artifact Schema Alignment (PR #25 Follow-up)
68 -
69 -- **Owner:** Leela
70 -- **Date:** 2026-05-18T10:59:10Z
71 -- **Issue:** `data/analyzed/2026-W21-summary.md` is stored in the analyzer contract path but does not follow the approved Analyze → Generate section contract (`Signal`, `Noise`, `Gaps`).
72 -- **Required follow-up:** Either align the analyzed artifact to the approved contract or move the manual validation artifact out of `data/analyzed/` so the repository does not adopt the wrong schema by accident.
73 -- **Status:** Identified in PR #25 review (now merged) — Phase 2 action item.
74 -
75 -## 2026-05-19: TechCrunch RSS as Enrichment Signal (PR #55)
76 -
77 -- **Owner:** Bender
78 -- **Date:** 2026-05-19
79 -- **Decision:** TechCrunch RSS integration is an enrichment signal (not primary source) with explicit low-expectation framing (5–15% correlation hit rate). Feature degrades to zero noise when no correlations found.
80 -- **Why:** Correlation between press articles and repos is inherently low. Value lies in the delta (hype vs traction), not article summarization. Enrichment positioning allows silent failure without degrading digest.
81 -- **Implications:** All future `DataSource` plugins must declare "primary" or "enrichment" status. Enrichment sources require explicit failure/removal criteria. Farnsworth's analysis treats correlation data as optional context, never required input.
82 -
83 -## 2026-05-19: Milestone-based workflow adopted
84 -
85 -- **Owner:** jmservera (via Copilot)
86 -- **Date:** 2026-05-19
87 -- **Decision:** All future work organized into versioned milestones (v0.5, v0.6, etc.). PRDs are decomposed into issues, assigned to milestones, then moved to docs/processed/. This enables progress tracking and versioning.
88 -- **Why:** User directive — makes work easier to follow and enables versioning.
89 -
90 -## 2026-05-19: Press Context Dual-Mode Rendering
91 -
92 -- **Owner:** Farnsworth
93 -- **Date:** 2026-05-19T20:50:22+02:00
94 -- **Status:** Implemented
95 -- **Decision:** Implement dual-mode rendering in `render_press_context.py` to serve AI prompts (full data + instructions) and reader-facing fallback (clean narrative) separately via `reader_mode` parameter and post-processing.
96 -- **Why:** The press context serves two audiences. AI prompts need full data and model instructions; reader-facing pages should not expose AI directives or 100+ repo lists.
97 -- **Changes:**
98 - - `render_press_context(reader_mode=False)` — new kwarg. When True, limits correlations to top 10, strips `### Instructions` block, and passes reader_mode to `format_divergences()`
99 - - `format_correlations_list(top_n=None)` — new kwarg. Truncates display and appends "…and N more repos"
100 - - `format_divergences(reader_mode=False)` — new kwarg. Replaces instruction bullets with reader-friendly narrative
101 - - `analyze_fallback._strip_ai_instructions(content)` — new helper. Applied in no-AI path to post-process rendered content
102 -- **Consequences:** AI prompt path unchanged (full instructions + list continue to model); no-AI fallback now produces clean reader output. 16 new tests cover truncation, sorting, instruction stripping, narrative injection. All 498 tests passing. PR #135 merged.