feat(rai): add article errata path (#211)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Juan Manuel Servera committed May 25, 2026 at 23:29 UTC eae6220973ebcf6bf8000c118bcfbeaeb78817f3
5 files changed +80 -3
.squad/decisions/inbox/amy-errata-schema.md new
+21
@@ -0,0 +1,21 @@
1 +# Article errata schema
2 +
3 +**Date:** 2026-05-25
4 +**Author:** Amy
5 +**Status:** Proposed
6 +
7 +## Decision
8 +
9 +Articles declare corrections in front-matter using `errata: [{date, note}]`; the article footer renders those entries at the end of the article.
10 +
11 +## Schema example
12 +
13 +```yaml
14 +errata:
15 + - date: 2026-05-26
16 + note: "Corrected the company name in the EU AI Act section (was 'Mistral.ai', now 'Mistral AI')."
17 +```
18 +
19 +## Rationale
20 +
21 +Keeping corrections in front-matter makes the article-level errata path data-driven, reviewable in Git, and visible to readers without requiring silent edits to published analysis.
assets/css/extended/squadscope.css
+36
@@ -459,6 +459,7 @@ summary:focus-visible,
459 .article-meta,
460 .article-footer__prompt,
461 .article-footer__updated,
462 +.article-errata,
463 .repo-card__stats {
464 color: var(--color-text-muted);
465 font-size: var(--text-sm);
@@ -704,6 +705,41 @@ summary:focus-visible,
705 margin: 0;
706 }
707
708 +.article-errata {
709 + display: grid;
710 + gap: var(--space-2);
711 + padding: var(--space-3);
712 + border: var(--size-border-thin) solid var(--color-border);
713 + border-radius: var(--radius-md);
714 + background: var(--color-surface);
715 + font-style: italic;
716 +}
717 +
718 +.article-errata__title {
719 + margin: 0;
720 + color: var(--color-text);
721 + font-size: var(--text-base);
722 + font-style: normal;
723 +}
724 +
725 +.article-errata__list {
726 + display: grid;
727 + gap: var(--space-2);
728 + margin: 0;
729 + padding-inline-start: var(--space-4);
730 +}
731 +
732 +.article-errata time {
733 + color: var(--color-text);
734 + font-weight: 700;
735 +}
736 +
737 +.article-errata time::after {
738 + content: " — ";
739 + color: var(--color-text-muted);
740 + font-weight: 400;
741 +}
742 +
743 .article-week-nav {
744 align-items: stretch;
745 }
layouts/partials/ai-disclosure.html
+1 -1
@@ -8,7 +8,7 @@
8 Read more about <a href="{{ "about/" | absLangURL }}">how we work</a>.
9 </p>
10 <p>
11 - Spot an error? <a href="https://github.com/jmservera/SquadScope/issues/new" target="_blank" rel="noopener">Open an issue on GitHub</a>.
11 + Spot an error? <a href="https://github.com/jmservera/SquadScope/issues" target="_blank" rel="noopener">Report it on GitHub</a>.
12 </p>
13 </div>
14 </section>
layouts/partials/article-footer.html
+14
@@ -35,4 +35,18 @@
35 </div>
36
37 <p class="article-footer__updated">Last updated <time datetime="{{ $page.Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ $page.Lastmod.Format "Jan 2, 2006" }}</time></p>
38 +
39 + {{- with $page.Params.errata }}
40 + <section class="article-errata" aria-label="Article corrections">
41 + <h2 class="article-errata__title">Errata</h2>
42 + <ul class="article-errata__list">
43 + {{- range . }}
44 + <li>
45 + {{- with .date }}<time datetime="{{ time.Format "2006-01-02" . }}">{{ time.Format "Jan 2, 2006" . }}</time>{{ end -}}
46 + {{- with .note }}<span>{{ . | markdownify }}</span>{{ end -}}
47 + </li>
48 + {{- end }}
49 + </ul>
50 + </section>
51 + {{- end }}
52 </footer>
layouts/partials/article-meta.html
+8 -2
@@ -15,8 +15,10 @@
15 {{- with $page.Params.top_repo -}}
16 {{- $meta = $meta | append (printf "Top repo: %s" .) -}}
17 {{- end -}}
18 -{{- $showAIBadge := or (eq $page.Section "weekly") (eq $page.Section "topics") -}}
19 -{{- if or (gt (len $meta) 0) $showAIBadge -}}
18 +{{- $showArticleMetaActions := or (eq $page.Section "weekly") (eq $page.Section "topics") -}}
19 +{{- $showAIBadge := $showArticleMetaActions -}}
20 +{{- $reportIssueURL := printf "https://github.com/jmservera/SquadScope/issues/new?title=Errata%%3A%%20%s&labels=errata&body=Article%%3A%%20%s%%0A%%0AThe%%20issue%%20I%%20noticed%%3A%%0A%%0A" ($page.Title | urlquery) ($page.Permalink | urlquery) -}}
21 +{{- if or (gt (len $meta) 0) $showAIBadge $showArticleMetaActions -}}
22 <p class="article-meta" aria-label="Report metadata">
23 {{- if gt (len $meta) 0 -}}
24 {{ delimit $meta " <span aria-hidden=\"true\">·</span> " | safeHTML }}
@@ -25,5 +27,9 @@
27 {{- if $showAIBadge -}}
28 <span class="article-ai-badge" title="This analysis was written by an AI model using public GitHub + press data. Editorial structure and source curation by the SquadScope maintainer." aria-label="AI-generated analysis. This analysis was written by an AI model using public GitHub and press data. Editorial structure and source curation by the SquadScope maintainer.">✨ AI-generated analysis</span>
29 {{- end -}}
30 + {{- if and (or (gt (len $meta) 0) $showAIBadge) $showArticleMetaActions }} <span aria-hidden="true">·</span> {{ end -}}
31 + {{- if $showArticleMetaActions -}}
32 + <a class="article-report-link" href="{{ $reportIssueURL }}" target="_blank" rel="noopener">Report an issue with this article</a>
33 + {{- end -}}
34 </p>
35 {{- end -}}