{"id":31799758,"url":"https://github.com/ceccode/aida-metrics","last_synced_at":"2026-03-01T15:00:40.619Z","repository":{"id":312426508,"uuid":"1046602698","full_name":"ceccode/AIDA-Metrics","owner":"ceccode","description":"AIDA is an open-source framework designed to measure the real impact of AI coding agents in software development.","archived":false,"fork":false,"pushed_at":"2025-12-28T11:36:47.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T23:23:35.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceccode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-28T23:57:31.000Z","updated_at":"2025-12-28T11:36:50.000Z","dependencies_parsed_at":"2025-08-30T15:25:15.989Z","dependency_job_id":"73045185-3a27-418b-b7d2-d7ee77c10a09","html_url":"https://github.com/ceccode/AIDA-Metrics","commit_stats":null,"previous_names":["ceccode/aida-metrics"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ceccode/AIDA-Metrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceccode%2FAIDA-Metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceccode%2FAIDA-Metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceccode%2FAIDA-Metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceccode%2FAIDA-Metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceccode","download_url":"https://codeload.github.com/ceccode/AIDA-Metrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceccode%2FAIDA-Metrics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T12:56:10.327Z","status":"ssl_error","status_checked_at":"2026-03-01T12:55:24.744Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T22:49:36.467Z","updated_at":"2026-03-01T15:00:40.604Z","avatar_url":"https://github.com/ceccode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AIDA Metrics\n\n**AI Development Accounting** - Track and measure AI-assisted development in your repositories.\n\nAIDA is an open-source framework to measure the real impact of AI coding agents in software development.  \n\nThe goal is to move beyond \"AI hype\" and provide **tangible, auditable metrics** to distinguish between **AI noise** (suggestions discarded, unstable code) and **AI value** (stable, production-ready contributions).\n\n📖 **[Documentation \u0026 Demo](https://ceccode.github.io/AIDA-Metrics/)**\n\n## Why AIDA?\n\nAI coding assistants (Copilot, Cursor, Windsurf, custom agents, etc.) are increasingly part of the development workflow.  \n\nAIDA provides production-ready metrics for understanding how AI tools contribute to your development workflow, including merge ratios and code persistence analysis.\n\nBut today we lack a structured way to **quantify their real contribution**.\n\n- CFOs and finance teams ask: *what part of AI costs can be capitalized as real development effort?*  \n- CTOs and engineers ask: *is AI really saving time and delivering stable code?*  \n\nAIDA wants to provide a **common language and tooling** for both worlds.\n\n## Features\n\n- **AI Detection**: Configurable heuristics to identify AI-assisted commits\n- **Merge Ratio**: Track what percentage of AI commits make it to production\n- **Persistence**: Measure how long AI-generated code survives in your codebase\n- **Fast \u0026 Deterministic**: Built for production use with stable JSON schemas\n- **CLI-First**: Simple commands for collection, analysis, and reporting\n- **GitHub Actions**: Automated analysis on every push\n\n## Installation\n\n### Global CLI (Recommended)\n\n```bash\nnpm install -g @aida-dev/cli\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/ceccode/aida-metrics.git\ncd aida-metrics\npnpm install\npnpm build\n```\n\n## Core Metrics\n\nThe first version of AIDA will focus on four key metrics:\n\n1. **Merge Ratio**  \n   Percentage of AI-generated code that actually gets merged into the main branch.\n\n2. **Persistence**  \n   How long AI-generated code survives in the codebase before being rewritten or removed.\n\n3. **Value per LOC**  \n   Share of AI code contributing to released features (requires linking commits to tickets/issues).\n\n4. **Hours Saved (estimated)**  \n   A rough productivity delta: time estimated with AI vs without AI for comparable tasks.\n\n\u003e ⚠️ These metrics are **experimental**. The goal is not perfect precision, but providing **a baseline for discussion and analysis**.\n\n## Quick Start\n\n### Using Global CLI\n\n```bash\n# Install globally\nnpm install -g @aida-dev/cli\n\n# Navigate to your Git repository\ncd /path/to/your/repo\n\n# Collect commits from last 90 days\naida collect --since 90d\n\n# Analyze the data\naida analyze\n\n# Generate reports\naida report\n```\n\n### Using from Source\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the project\npnpm build\n\n# Collect commits from last 90 days\nnode packages/cli/dist/index.js collect --since 90d\n\n# Analyze the data\nnode packages/cli/dist/index.js analyze\n\n# Generate reports\nnode packages/cli/dist/index.js report\n```\n\n## Architecture\n\nThis is a TypeScript monorepo with three main packages:\n\n- **`@aida-dev/core`** - Git collection, AI tagging, and data schemas\n- **`@aida-dev/metrics`** - Merge ratio and persistence calculations  \n- **`@aida-dev/cli`** - Command-line interface for end users\n\n## CLI Usage\n\n### Commands\n\n#### `aida collect`\n\nCollect commits and generate normalized commit stream:\n\n```bash\naida collect --since 90d --out-dir ./aida-output\n```\n\n#### `aida analyze`\n\nCalculate merge ratio and persistence metrics:\n\n```bash\naida analyze --out-dir ./aida-output\n```\n\n#### `aida report`\n\nGenerate human-readable reports:\n\n```bash\naida report --format both --out-dir ./aida-output\n```\n\n### Options\n\n#### `aida collect`\n\n- `--repo \u003cpath\u003e` - Repository path (default: current directory)\n- `--since \u003cdate\u003e` - Start date (ISO or relative like 90d)\n- `--until \u003cdate\u003e` - End date (ISO or relative)\n- `--ai-pattern \u003cpattern\u003e` - Custom AI detection pattern (repeatable)\n- `--default-branch \u003cname\u003e` - Default branch name (auto-detect if omitted)\n- `--out-dir \u003cpath\u003e` - Output directory (default: ./aida-output)\n- `--verbose` - Verbose logging\n\n#### `aida analyze`\n\n- `--out-dir \u003cpath\u003e` - Output directory (default: ./aida-output)\n- `--verbose` - Verbose logging\n\n#### `aida report`\n\n- `--out-dir \u003cpath\u003e` - Output directory (default: ./aida-output)\n- `--format \u003cformat\u003e` - Output format: json, md, both (default: both)\n- `--verbose` - Verbose logging\n\n## AI Detection\n\nAIDA uses configurable heuristics to identify AI-assisted commits:\n\n### Default Patterns\n\n- Commit messages containing: `ai`, `copilot`, `cursor`, `windsurf`, `codeium`, `claude`, `chatgpt`, `gemini`\n- AI tags: `[AI]`, `[ai]`\n- Git trailers: `AI: true`, `X-AI: true`\n- Co-authors: `Co-authored-by: *bot*`, or known AI domains (`anthropic.com`, `openai.com`, `github.com`)\n\n### Custom Patterns\n\nAdd your own detection patterns:\n\n```bash\naida collect --ai-pattern \"claude\" --ai-pattern \"chatgpt\"\n```\n\n## Metrics\n\n### Merge Ratio\n\nPercentage of AI-tagged commits that were merged into the default branch.\n\n### Persistence (MVP)\n\nFile-level proxy for how long AI-modified files survive before being changed again.\n\n- Buckets: 0-1d, 2-7d, 8-30d, 31-90d, 90d+\n- Provides average and median survival times\n\n## Output Files\n\n- `commit-stream.json` - Normalized commit data with AI tagging\n- `metrics.json` - Calculated metrics with merge ratio and persistence\n- `report.json` - JSON report (mirrors metrics.json)\n- `report.md` - Human-readable Markdown report\n\n## CI/CD Integration\n\n### GitHub Actions\n\n```yaml\n- name: Install AIDA\n  run: npm install -g @aida-dev/cli\n\n- name: Run AIDA Analysis\n  run: |\n    aida collect --since 30d\n    aida analyze\n    aida report\n\n- name: Upload Reports\n  uses: actions/upload-artifact@v4\n  with:\n    name: aida-reports\n    path: aida-output/\n```\n\n### GitLab CI\n\n```yaml\naida_analysis:\n  script:\n    - npm install -g @aida-dev/cli\n    - aida collect --since 30d \u0026\u0026 aida analyze \u0026\u0026 aida report\n  artifacts:\n    paths:\n      - aida-output/\n```\n\nThe included workflow (`.github/workflows/aida-analyze.yml`) automatically:\n\n1. Runs AIDA analysis on every push to main/master\n2. Uploads artifacts with commit stream, metrics, and reports\n3. Provides historical tracking of AI development patterns\n\n## Repository Structure\n\n```bash\n/aida-metrics\n├── packages/\n│   ├── cli/           # @aida-dev/cli\n│   ├── core/          # @aida-dev/core\n│   └── metrics/       # @aida-dev/metrics\n├── .github/workflows/ # CI/CD automation\n└── docs/             # Documentation\n```\n\n## Roadmap\n\n- **v0.1** ✅ Git-based metrics (Merge Ratio + Persistence).  \n- **v0.2** ✅ AI detection for Claude Code, ChatGPT, Gemini, Copilot, Cursor, Windsurf, Codeium.  \n- **v0.3** → Attribution classification: explicit / implicit / mention / none ([#5](https://github.com/ceccode/AIDA-Metrics/issues/5)).  \n- **v0.4** → Connect to issue trackers (GitHub Issues, Jira) for Value per LOC.  \n- **v1.0** → Dashboard / GitHub Action for continuous tracking.  \n\n## Contributing\n\nThis is just the starting point. We are looking for contributors who can help with:  \n\n- Designing robust metrics  \n- Building integrations (Copilot, Cursor, etc.)  \n- Improving analysis pipelines  \n- Validating approaches with real-world projects  \n\n### Git Workflow\n\nWe use a simple, main-branch workflow with automated publishing:\n\n1. **Create Feature Branch**\n\n   ```bash\n   git checkout -b feat/your-feature-name\n   # or\n   git checkout -b fix/bug-description\n   ```\n\n2. **Make Changes \u0026 Commit**\n\n   ```bash\n   git add .\n   git commit -m \"feat: add new feature\"\n   ```\n\n3. **Add Changeset** (for version bumps)\n\n   ```bash\n   pnpm changeset\n   # Select packages to version\n   # Choose version bump type (patch/minor/major)\n   # Add description for changelog\n   ```\n\n4. **Open Pull Request**\n   - Target: `main` branch\n   - Include changeset file if versioning needed\n   - Describe changes and testing\n\n5. **Merge \u0026 Auto-Publish**\n   - Once merged, GitHub Actions automatically publishes to NPM\n   - Feature branch gets deleted after merge\n\n### Branch Rules\n\n- **Main branch only** - no separate dev/release branches\n- **Feature branches** - `feat/xyz`, `fix/abc`, `docs/update-readme`\n- **Clean history** - squash merge preferred\n- **Auto-publish** - changesets trigger NPM releases\n\nFeel free to open an **Issue** or start a **Discussion**.\n\n## Call to Action\n\nThe future of software development is hybrid – humans and AI agents working together.  \nTo account for it properly, we need better metrics.  \n\n**Join us in building AIDA.**\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build all packages\npnpm build\n\n# Run tests\npnpm test\n\n# Format code\npnpm format\n\n# Lint code\npnpm lint\n```\n\n## Tech Stack\n\n- **Language**: TypeScript (strict mode)\n- **Package Manager**: pnpm with workspaces\n- **Build**: tsup (ESM output)\n- **Testing**: vitest with coverage\n- **Git**: simple-git for repository analysis\n- **Validation**: zod for schema validation\n- **CLI**: commander for command-line interface\n\n## Code of Conduct\n\nThis project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceccode%2Faida-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceccode%2Faida-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceccode%2Faida-metrics/lists"}