Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
33 changes: 17 additions & 16 deletions .github/workflows/aida.yml → .github/workflows/evidtrail.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: AIDA Metrics
name: evidtrail

# AI Development Accounting (ADR-038): measures how much of the repository is
# AI-built and how that code holds up. Read-only over git history; the report
# is informative, never a gate — a metrics run must not block a merge.
# evidtrail (ADR-038, renamed by ADR-061; formerly AIDA Metrics): an auditable
# evidence ledger of how much of the repository is AI-built and how that code
# holds up. Read-only over git history; the report is informative, never a
# gate — a metrics run must not block a merge.
#
# Since the 1.0 CLI (@aida-dev/cli >= 1.0.2) the workflow also covers pull
# requests: the change set is measured on its own and the report is posted as a
# comment, created once and updated in place. Author identities stay redacted.
# On pull requests the change set is measured on its own and the report is
# posted as a comment, created once and updated in place. Author identities
# stay redacted.

on:
push:
Expand All @@ -20,7 +21,7 @@ permissions:

jobs:
report:
name: aida collect · analyze · report
name: evidtrail collect · analyze · report
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -38,27 +39,27 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Generate AIDA report (default branch)
- name: Generate evidtrail report (default branch)
if: github.event_name == 'push'
run: npx aida collect --since 90d --redact-authors && npx aida analyze && npx aida report
run: npx evidtrail collect --since 90d --redact-authors && npx evidtrail analyze && npx evidtrail report

- name: Generate AIDA report (pull request)
- name: Generate evidtrail report (pull request)
if: github.event_name == 'pull_request'
run: npx aida collect --pr --redact-authors && npx aida analyze && npx aida report
run: npx evidtrail collect --pr --redact-authors && npx evidtrail analyze && npx evidtrail report

- name: Post AIDA report comment (pull request)
- name: Post evidtrail report comment (pull request)
# Fork pull requests get a read-only token and cannot comment.
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx aida comment
run: npx evidtrail comment

- name: Upload report artifact
uses: actions/upload-artifact@v7
with:
name: aida-report
path: aida-output/
name: evidtrail-report
path: evidtrail-output/
if-no-files-found: ignore
retention-days: 30
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ coverage/
.cache/
playwright-report/
test-results/
aida-output/
evidtrail-output/
*.tsbuildinfo
.eslintcache

Expand Down
14 changes: 14 additions & 0 deletions docs/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,3 +738,17 @@ Una nuova ADR può introdurre Phaser soltanto se:
- Verifica: parità esatta delle chiavi e dei segnaposto; walkthrough inglese; controlli tastiera, focus e nomi accessibili; metadata e fallback delle due route; pagine privacy/termini; build e test completi su entrambi i repository.
- Performance: il catalogo inglese è un chunk separato caricato soltanto da `/en/`; l'italiano mantiene il bundle iniziale sotto 60 KB gzip. Il budget combinato degli asset JavaScript sale consapevolmente da 60 a 80 KB per includere i circa 18 KB gzip della seconda lingua, ancora molto sotto i 150 KB documentati.
- Conseguenza: landing e gioco possono essere distribuiti su portali internazionali senza mantenere fork di codice o contenuto. Una terza lingua richiede un catalogo completo e la stessa disciplina di route, metadata, legal e test.

## ADR-061 — AIDA Metrics si chiama evidtrail: stesso strumento, stesso trailer

- Stato: **Accettata**
- Data: 4 settembre 2026
- Contesto: `@aida-dev/cli`, adottata con ADR-038, è deprecata su npm con l'avviso «Renamed to @evidtrail/cli — same tool, every old name keeps working for one release». Il nome AIDA collideva con il funnel di marketing e con un'opera, e l'espansione «AI Development Accounting» prometteva una lettura costo/valore che il contratto 1.0 dello strumento rifiuta esplicitamente. L'alias `aida` sparisce alla prossima major: restare sul vecchio nome significa un `npm ci` che stampa un avviso oggi e un workflow rotto domani.
- Decisione: rinominare tutto in una volta, seguendo la tabella di migrazione del progetto.
1. `@evidtrail/cli` **pinnata esatta** (1.2.0) al posto di `@aida-dev/cli`; script `npm run evidtrail` e `npm run evidtrail:hooks`.
2. `.aida.json` → `.evidtrail.json`, contenuto identico (`defaultMode: "agent"`); `aida-output/` → `evidtrail-output/` in `.gitignore`.
3. Il workflow diventa `.github/workflows/evidtrail.yml`, stessi tre passi (`collect --redact-authors` → `analyze` → `report`, più `comment` sulle PR); il marcatore del commento cambia, ma lo strumento trova e sostituisce i vecchi commenti invece di duplicarli.
4. Hook `prepare-commit-msg` reinstallato con `evidtrail install-hooks` nel clone locale — e, su suggerimento di `evidtrail doctor`, uno script npm `prepare` (`evidtrail install-hooks --if-git`) lo installa da solo a ogni `npm ci`. **Questo chiude il limite dichiarato in ADR-038**: l'hook non è più volontario per clone, e la copertura non degrada più in silenzio quando qualcuno clona e committa senza pensarci. `npm run evidtrail:hooks` resta per chi vuole reinstallarlo a mano.
- Ciò che **non** cambia, ed è il motivo per cui la migrazione è indolore: il trailer `AI-Mode: agent` non ha mai portato il nome dello strumento, quindi tutta la provenienza già scritta nella storia resta valida senza riscrivere un commit. Regola del progetto invariata: **ogni commit dell'agente porta `AI-Mode: agent`**.
- Verifica: `evidtrail doctor` verde sul clone (hook, config, CI, storia completa); `npm run evidtrail` produce il report locale con la stessa copertura del run precedente; `npm run check` verde.
- Conseguenza: ADR-038 resta il perché dell'adozione; questa ADR è solo il cambio di nome. I riferimenti storici ad «AIDA» nelle ADR precedenti non vengono riscritti.
161 changes: 81 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@
"test:e2e": "playwright test",
"validate": "tsc --noEmit --project tsconfig.validation.json && vitest run tests/content",
"check": "npm run format:check && npm run lint && npm run typecheck && npm run validate && npm run test -- --coverage && npm run build && npm run size && npm run test:e2e",
"aida": "aida collect --since 90d && aida analyze && aida report",
"aida:hooks": "aida install-hooks",
"dist": "node scripts/build-dist.mjs",
"marketing": "node scripts/render-brand-assets.mjs && node scripts/capture-gameplay-assets.mjs",
"size": "node scripts/check-bundle-size.mjs"
"size": "node scripts/check-bundle-size.mjs",
"evidtrail": "evidtrail collect --since 90d && evidtrail analyze && evidtrail report",
"evidtrail:hooks": "evidtrail install-hooks",
"prepare": "evidtrail install-hooks --if-git"
},
"dependencies": {},
"devDependencies": {
"@aida-dev/cli": "1.0.2",
"@axe-core/playwright": "^4.12.1",
"@eslint/js": "^10.0.1",
"@evidtrail/cli": "1.2.0",
"@playwright/test": "^1.62.1",
"@testing-library/dom": "^10.4.1",
"@types/node": "^24.13.3",
Expand Down
Loading