diff --git a/.aida.json b/.evidtrail.json similarity index 100% rename from .aida.json rename to .evidtrail.json diff --git a/.github/workflows/aida.yml b/.github/workflows/evidtrail.yml similarity index 51% rename from .github/workflows/aida.yml rename to .github/workflows/evidtrail.yml index 0ced015..05bc635 100644 --- a/.github/workflows/aida.yml +++ b/.github/workflows/evidtrail.yml @@ -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: @@ -20,7 +21,7 @@ permissions: jobs: report: - name: aida collect · analyze · report + name: evidtrail collect · analyze · report runs-on: ubuntu-latest steps: - name: Checkout @@ -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 diff --git a/.gitignore b/.gitignore index 0f61fe3..ece3e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ coverage/ .cache/ playwright-report/ test-results/ -aida-output/ +evidtrail-output/ *.tsbuildinfo .eslintcache diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 14ac218..db0ceb4 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -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. diff --git a/package-lock.json b/package-lock.json index 4020a55..a7fe490 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "0.0.0", "license": "SEE LICENSE IN LICENSING.md", "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", @@ -28,53 +28,6 @@ "node": ">=24 <25" } }, - "node_modules/@aida-dev/cli": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@aida-dev/cli/-/cli-1.0.2.tgz", - "integrity": "sha512-mxk/V61AosUjgb9CSJ2wMl7ppqZIAAHOTsJy0vdvPqIgv7LGaRDuZ3NBzAn+74DNe+n7PznuzursRXHv3p3yNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@aida-dev/core": "1.0.1", - "@aida-dev/metrics": "1.0.2", - "commander": "^11.1.0", - "zod": "^3.22.4" - }, - "bin": { - "aida": "dist/index.js" - }, - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/@aida-dev/core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@aida-dev/core/-/core-1.0.1.tgz", - "integrity": "sha512-e7QeWna4END03jpNA7YS5gY8tl3seEHEMW4aROSAvxiecBpJCCG/CpDa3mrVcd4iCEbfNDupJiV2sUZlGv35YQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "simple-git": "^3.36.0", - "zod": "^3.22.4" - }, - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/@aida-dev/metrics": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@aida-dev/metrics/-/metrics-1.0.2.tgz", - "integrity": "sha512-DlWdnMYDinpoHFXxahZVQWzkDHIqFINcX7IPimUAmQTp1PkolEfKMzuqHMSV4FINo363uYxMws114l5p9B/HmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@aida-dev/core": "1.0.1", - "zod": "^3.22.4" - }, - "engines": { - "node": ">=22.0.0" - } - }, "node_modules/@asamuzakjp/css-color": { "version": "5.1.11", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", @@ -508,6 +461,54 @@ "node": "^20.19.0 || ^22.13.0 || >=24" } }, + "node_modules/@evidtrail/cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@evidtrail/cli/-/cli-1.2.0.tgz", + "integrity": "sha512-8v/MO+jmJ26DpIszrj98vDsk5y5GWcXNCmqYaDOFnh5DZAYylNxSsyKVeJG58LO9MEd56Ymcd/00Hx7ingdZfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@evidtrail/core": "1.1.0", + "@evidtrail/metrics": "1.1.0", + "commander": "^11.1.0", + "zod": "^3.22.4" + }, + "bin": { + "aida": "dist/index.js", + "evidtrail": "dist/index.js" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@evidtrail/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@evidtrail/core/-/core-1.1.0.tgz", + "integrity": "sha512-eKfdeHBuLQJNNtVygWMDKJxmrAMlgASrlgW3RJPj0ymXNlx+vh27RdKFoGZGqtLWVcvT9e/a/IAuhaHaOLnUBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "simple-git": "^3.36.0", + "zod": "^3.22.4" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@evidtrail/metrics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@evidtrail/metrics/-/metrics-1.1.0.tgz", + "integrity": "sha512-+sd+9BH5FcRXmWg0iPHynh2lKnWdgQHBGrlBHqdqemVBX+pIIcSmIIt4x+Q0QBM0b56Q+A1BvB8wFshIesLvBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@evidtrail/core": "1.1.0", + "zod": "^3.22.4" + }, + "engines": { + "node": ">=22.0.0" + } + }, "node_modules/@exodus/bytes": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", @@ -3344,38 +3345,6 @@ } }, "dependencies": { - "@aida-dev/cli": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@aida-dev/cli/-/cli-1.0.2.tgz", - "integrity": "sha512-mxk/V61AosUjgb9CSJ2wMl7ppqZIAAHOTsJy0vdvPqIgv7LGaRDuZ3NBzAn+74DNe+n7PznuzursRXHv3p3yNQ==", - "dev": true, - "requires": { - "@aida-dev/core": "1.0.1", - "@aida-dev/metrics": "1.0.2", - "commander": "^11.1.0", - "zod": "^3.22.4" - } - }, - "@aida-dev/core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@aida-dev/core/-/core-1.0.1.tgz", - "integrity": "sha512-e7QeWna4END03jpNA7YS5gY8tl3seEHEMW4aROSAvxiecBpJCCG/CpDa3mrVcd4iCEbfNDupJiV2sUZlGv35YQ==", - "dev": true, - "requires": { - "simple-git": "^3.36.0", - "zod": "^3.22.4" - } - }, - "@aida-dev/metrics": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@aida-dev/metrics/-/metrics-1.0.2.tgz", - "integrity": "sha512-DlWdnMYDinpoHFXxahZVQWzkDHIqFINcX7IPimUAmQTp1PkolEfKMzuqHMSV4FINo363uYxMws114l5p9B/HmQ==", - "dev": true, - "requires": { - "@aida-dev/core": "1.0.1", - "zod": "^3.22.4" - } - }, "@asamuzakjp/css-color": { "version": "5.1.11", "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", @@ -3635,6 +3604,38 @@ "levn": "^0.4.1" } }, + "@evidtrail/cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@evidtrail/cli/-/cli-1.2.0.tgz", + "integrity": "sha512-8v/MO+jmJ26DpIszrj98vDsk5y5GWcXNCmqYaDOFnh5DZAYylNxSsyKVeJG58LO9MEd56Ymcd/00Hx7ingdZfg==", + "dev": true, + "requires": { + "@evidtrail/core": "1.1.0", + "@evidtrail/metrics": "1.1.0", + "commander": "^11.1.0", + "zod": "^3.22.4" + } + }, + "@evidtrail/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@evidtrail/core/-/core-1.1.0.tgz", + "integrity": "sha512-eKfdeHBuLQJNNtVygWMDKJxmrAMlgASrlgW3RJPj0ymXNlx+vh27RdKFoGZGqtLWVcvT9e/a/IAuhaHaOLnUBQ==", + "dev": true, + "requires": { + "simple-git": "^3.36.0", + "zod": "^3.22.4" + } + }, + "@evidtrail/metrics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@evidtrail/metrics/-/metrics-1.1.0.tgz", + "integrity": "sha512-+sd+9BH5FcRXmWg0iPHynh2lKnWdgQHBGrlBHqdqemVBX+pIIcSmIIt4x+Q0QBM0b56Q+A1BvB8wFshIesLvBQ==", + "dev": true, + "requires": { + "@evidtrail/core": "1.1.0", + "zod": "^3.22.4" + } + }, "@exodus/bytes": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", diff --git a/package.json b/package.json index 01b88e5..bf0c2ad 100644 --- a/package.json +++ b/package.json @@ -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",