Skip to content
KyaniteLabsPublic

About

Git repository archaeology framework — mine commit history, detect signals, run 6 analysis vectors, and generate engineering reports. Python CLI + AI-agent ready.

Topics

Resources

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

191 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AG4TE

TL;DR: AG4TE (formerly DevArch Framework; the command is still devarch and the package devarch-framework) — local git repository archaeology: mine commit history into SQLite, detect development signals, run analysis vectors, and generate reports. Best for engineers, researchers, and AI agents who need to understand how a codebase evolved.

GitHub release Python License: Apache-2.0 GitHub stars

Git repository archaeology framework. Mine commit history, detect development signals, run 6 analysis vectors, and generate engineering narrative reports — from any git repository. Mining and analysis run locally on your machine; the generated HTML pages load Chart.js, d3 and Google Fonts from a CDN when you open them.

git clone https://github.com/KyaniteLabs/ag4te.git && cd ag4te && pip install -e .

DevArch treats your git history as structured data. It extracts commits into a queryable SQLite database, runs heuristic signal detection (gaps, velocity shifts, author changes), executes specialized analysis vectors, and generates interactive HTML visualizations and markdown reports. Built for engineers, researchers, and AI agents that need to understand how a codebase evolved.

Just want a quick learning diagnostic? Dev Learning Archaeologist is a zero-setup ICM folder — drop it in any project, run through Claude Code, no install required.

Hermes Desktop plugin

AG4TE also ships as a Hermes plugin. It runs a dig from Hermes Desktop and draws the result as strata: the repo as a cut agate, a plain-words story of its history, commits per day by kind of work, eras, quiet gaps, signals, weekly rhythm, practice health, and authors split into people, agents and bots. It also adds /ag4te and a read-only ag4te_dig tool for agents. Install and settings: plugins/ag4te-hermes.

Evidence integrity (0.4.0)

Mining covers all locally available refs, records coverage and rejects shallow history. Fetch the authorized branches/tags/PR refs before mining when remote completeness matters. Automated vectors are keyword-based investigation leads, not verified source conclusions, productivity measurements or causal explanations. The default visualization contains measured daily activity only. See 0.4.0 release notes.

What It Does

DevArch transforms git history into structured insights through a full-featured CLI with 20+ commands. The framework supports:

  • Complete Pipeline: Initialize projects, mine git data, build SQLite databases, detect signals, analyze patterns, visualize results
  • 6 Analysis Vectors: SDLC Gap Finder, ML Pattern Mapper, Agentic Workflow Analyzer, Formal Terms Mapper, Source Archaeologist, YouTube Correlator
  • Era System: Scan commits for era transitions, cascade era labels across codebases, map era boundaries
  • Audit System: Validate outputs with severity-based checks (CRITICAL, HIGH, MEDIUM, LOW)
  • Signal Detection: 5 heuristics identify noteworthy patterns (gaps, velocity shifts, author changes, scope changes, correlations)
  • Supplementary Data: Correlate any external data (fitness, YouTube, calendar) with commits
  • Multi-Project Sync: Aggregate findings across multiple repositories
  • Demo Generation: Create demo projects for testing and documentation

Installation

# Clone the repository
git clone https://github.com/KyaniteLabs/ag4te.git
cd ag4te

# Install in editable mode
pip install -e .

# Verify installation
devarch --help

Quick Start

1. Initialize a Project

# Create a new archaeology project
devarch init my-project --description "My repo archaeology" --repo-url https://github.com/user/repo

# Or create a demo project with synthetic data
devarch demo --build-db

The demo needs no repository or network, so it is a quick end-to-end check. CI runs this block on every change, and each # expect: line must appear in the output:

cd "$(mktemp -d)"   # the demo writes ./projects/
devarch demo --build-db
# expect: Created sanitized demo project
# expect: Try: devarch build-db demo-archaeology
devarch signals demo-archaeology
# expect: Detected 0 signals, 1 clusters

2. Mine Git History

# Extract commits from a repository
devarch mine /path/to/repo --project my-project

# Build the SQLite database
devarch build-db my-project

3. Detect Signals

# Run signal detection
devarch signals my-project

# Optionally configure signal thresholds
devarch signals my-project --config custom-signals.json --min-gap-days 14

4. Run Analysis

# Run all analysis vectors
devarch analyze my-project

# Run specific vectors
devarch analyze my-project --vector sdlc-gap-finder --vector ml-pattern-mapper

# Show legacy prompt instructions (for manual LLM execution)
devarch analyze my-project --prompts

5. Visualize Results

# Generate HTML visualization
devarch visualize my-project

# Export report in markdown or HTML
devarch export-report my-project --format markdown
devarch export-report my-project --format html --output my-report.html

6. Audit Outputs

# Run audit checks
devarch audit my-project

# Control failure threshold
devarch audit my-project --fail-on MEDIUM

CLI Commands

Project Management

  • devarch init <name> -- Initialize a new archaeology project
  • devarch demo [--build-db] -- Create a demo project with synthetic data

Data Extraction

  • devarch mine <repo-path> --project <name> -- Extract git history
  • devarch build-db <project> -- Build SQLite database from mined data
  • devarch ingest-pipeline <project> --logs-dir <path> -- Ingest GitHub Actions logs

Signal Detection

  • devarch signals <project> [--config] [--min-gap-days] -- Run signal detection heuristics
  • devarch extract-sessions <project> --sessions-dir <path> -- Extract coding sessions recursively. By default it selects the configured repo_path; if unknown, provide --project-slug=<slug>. Use --all-projects to scan all projects, or --include-subagents to include subagent sessions. The command fails if it finds no session files. Session headers show human and agent messages and filtered harness entries; SDK and subagent prompts are not counted as human. The sdk and sdk-cli entrypoints are agent-driven; interactive, missing, and unknown entrypoints are treated as human unless the file is under subagents.

Analysis

  • devarch analyze <project> [--vector] [--prompts] -- Run analysis vectors
  • devarch benchmark <project> -- Generate an agent performance benchmark visualization
  • Legacy cascade, opportunity, dashboard and publish-static commands are disabled pending safety/evidence redesign.

Visualization & Reporting

  • devarch visualize <project> -- Generate HTML visualization
  • devarch export-report <project> [--format] [--output] -- Export report
  • devarch public-case-study <output-dir> [--project] -- Create sanitized public case study

Database & Inspection

  • devarch serve <project> [--port] [--unsafe-cors] -- Start Datasette server for database inspection

Audit & Validation

  • devarch audit <project> [--fail-on] -- Run audit checks
  • devarch validate <project> -- Validate the generated history HTML and its binding

Multi-Project Operations

  • devarch sync [--project] [--skip-mine] [--skip-signals] -- Sync multiple projects
  • devarch global-viz [--output] [--top] [--year] -- Generate global visualization
  • devarch multi-project-dashboard [--output] [--top] [--year] -- Generate a multi-project dashboard
  • devarch fetch-github <owner> [--output] -- Fetch repository metadata from GitHub

fetch-github also accepts --owner <owner> or ARCHAEOLOGY_GITHUB_OWNER instead of the positional owner. A missing owner, or a fetch that returns no repositories, exits non-zero and writes nothing; an existing github-repos.json is left untouched.

Local Pipeline

  • devarch local-pipeline <repo-name> [--pipeline-dir] [--repos-dir] [--run] -- Inspect local GitHub pipeline

Analysis Vectors

DevArch includes 6 analysis vectors:

  1. SDLC Gap Finder -- Identify gaps in software development lifecycle practices
  2. ML Pattern Mapper -- Detect machine learning patterns and practices
  3. Agentic Workflow Analyzer -- Identify AI/agent-based workflows
  4. Formal Terms Mapper -- Track formal methods and terminology usage
  5. Source Archaeologist -- Deep code archaeology and evolution tracking
  6. YouTube Correlator -- Correlate commit patterns with YouTube watch history

Era System

The era system identifies and tracks distinct phases in repository evolution:

  • Scanner: Detect era transitions based on commit patterns
  • Cascade: Propagate era labels across dependent files
  • Mapper: Map era boundaries and transitions

Multi-Project Sync

Configure multiple projects in config/profile.json:

{
  "projects": [
    {
      "name": "project-one",
      "path": "/path/to/project-one"
    },
    {
      "name": "project-two",
      "path": "/path/to/project-two"
    }
  ],
  "developer": {
    "name": "Your Name",
    "github_username": "yourusername"
  },
  "sync": {
    "run_mine": true,
    "run_signals": true,
    "run_analysis": true,
    "default_min_gap_days": 14
  }
}

The sync settings control mining, signals, analysis, and the gap threshold in days. The deprecated sync_settings keys auto_mine, auto_signals, and min_gap_days fall back to run_mine, run_signals, and default_min_gap_days, respectively. Canonical sync values take precedence; unknown settings produce a warning.

Then run sync operations:

# Sync all projects
devarch sync

# Sync specific projects
devarch sync --project project-one --project project-two

# Skip mining (use cached data)
devarch sync --skip-mine

Each project needs a name and a repository location. path (shown above) and repo_path are both accepted for the location; repo_path is the canonical key used by the shipped config/profile.json.

Author identities

Mining uses each repository's .mailmap for display names and emails; bot and agent classification uses the raw commit identity. Re-mine older extractions to retain raw identities. Mining repositories you did not create runs Git with their repository configuration, so inspect or isolate untrusted repositories first. In config/profile.json, developer.aliases lists alternate names or emails for developer.name, and developer.agent_identities lists agent names or emails. For project-specific mappings, add projects/<project>/identity_map.json:

{
  "aliases": {"Alternate Name": "Canonical Name", "[email protected]": "Canonical Name"},
  "agent_identities": ["Example Agent", "[email protected]"]
}

Author shifts use the daily primary author and wait seven days by default; author_debounce_days and optional author_debounce_commits in a JSON file passed to devarch signals --config adjust that threshold. Class changes among humans, bots and configured agents produce separate strong signals. Bot classification uses common bot name and email patterns, so identity settings may need review. Identity detection uses the workspace profile when present, otherwise the packaged profile, and project identity-map entries take precedence. For an existing project synced with a custom pipeline.sync(profile_path=...), put its aliases in identity_map.json: the detector does not receive that override.

Database Inspection

Start a Datasette server to inspect your archaeology database:

devarch serve my-project --port 8001

Visit http://localhost:8001 to explore commits, signals, and analysis results.

Supplementary Data

Add external data sources to correlate with commits:

  • Fitness tracker data (CSV/JSON)
  • YouTube watch history (JSON)
  • Calendar events (CSV/JSON)
  • Weather data (CSV)
  • Lunar phases (JSON)
  • Any data with dates

Configure supplementary sources in your project configuration or via analysis vectors.

ICM Compliance

This framework follows ICM (Interpretable Context Methodology) conventions with full 5-layer separation:

Layer File Purpose
L0 CLAUDE.md Identity, folder map, routing table, naming conventions
L1 CONTEXT.md Workspace router with 5 siloed workspaces
L2 stages/*/CONTEXT.md Stage contracts with L3/L4 loading guidance
L3 shared/, analysis-vectors/, stages/*/references/ Reference material loaded selectively
L4 stages/*/output/ Working artifacts per stage

Architecture decisions documented in docs/decisions.md.

Requirements

  • Python 3.10+
  • Git repository with commit history
  • Write permissions in workspace directory

Dependencies

  • click>=8.1 -- CLI framework
  • sqlite-utils>=3.0 -- Database utilities
  • datasette>=0.64.0 -- Database inspection server

Third-Party Acknowledgments

DevArch Framework integrates several excellent open-source libraries:

  • Click (BSD License) — Elegant CLI framework for command-line interfaces
  • SQLite (Public Domain) — Embedded SQL database engine with FTS4 full-text search
  • Chart.js (MIT License) — Responsive JavaScript charting library
  • D3.js (BSD License) — Document-driven data visualization framework
  • Google Fonts (OFL License) — Open-source typography (Inter, JetBrains Mono)

We gratefully acknowledge the work of their respective authors and maintainers.

Project Structure

archaeology/          -- Main Python package
  cli.py              -- CLI entry point (20+ commands)
  analysis_runner.py  -- Analysis vector orchestration
  audit.py            -- Audit system
  era_scanner.py      -- Era detection
  era_cascade.py      -- Era label propagation
  era_mapper.py       -- Era boundary mapping
  report.py           -- Report generation
  demo.py             -- Demo project generation
  local_pipeline.py   -- Local GitHub pipeline inspection
  db/                 -- Database utilities
  classifiers/        -- Signal classification
  extractors/         -- Data extraction
  validators/         -- Output validation
  visualization/      -- Template-based visualization
analysis-vectors/     -- Analysis vector definitions
config/               -- Configuration templates and schemas
scripts/              -- Utility scripts
setup/                -- Project setup questionnaire
shared/               -- Framework-wide reference docs
skills/               -- Bundled skill for CLI usage
stages/               -- 9-stage pipeline contracts (ICM L2)
docs/                 -- Architecture decisions
_config/              -- Developer profile templates

License

Released under Apache-2.0 since 2026-06-02 (PR #54); the initial MIT grant from 2026-04-29 remains in effect for copies obtained before that date.

Support

For issues or questions:

  1. Check CONTEXT.md for task routing
  2. Review analysis vector documentation in analysis-vectors/
  3. Run devarch validate <project> to check the generated history document
  4. Run devarch audit <project> to validate outputs
  5. Use devarch serve <project> for database inspection

FAQ

What is repository archaeology? Repository archaeology treats git history as structured evidence. Instead of reading code, you read the sequence of changes — who changed what, when, at what velocity, and in response to what signals. DevArch automates the excavation.

How is DevArch different from git log? git log produces raw output. DevArch mines commits into a queryable SQLite database, runs 5 signal-detection heuristics, executes 6 specialized analysis vectors, and produces interactive HTML visualizations and narrative reports. The output is evidence, not a log dump.

Does DevArch work with any git repository? Yes. Any local git repository with commit history works. No GitHub API key, no cloud service, no configuration beyond pointing it at a path.

Can AI agents use DevArch autonomously? Yes. The framework is ICM-compliant — it ships with structured context layers (CLAUDE.md, stage contracts, llms.txt) so Claude Code, Cursor, and other AI coding agents can understand and operate the pipeline without manual instruction. A bundled skills/ folder enables one-command usage from the Claude Code CLI.

What size repositories does DevArch handle? Tested on repositories from dozens to tens of thousands of commits. SQLite + FTS4 handles large git histories without any external infrastructure.

Is my data sent anywhere? No. Mining and analysis run locally on your machine, and DevArch sends no telemetry and calls no cloud API. One thing does use the network: the generated HTML pages load Chart.js, d3 and Google Fonts from a CDN when you open them, so the CDN sees that request. Open them offline and the charts and fonts will not load.

Related Projects

  • Dev Learning Archaeologist — Zero-setup ICM folder for Claude Code. Drop it in, ask one question, get a full HTML learning diagnostic. The lightweight version of this framework.
  • KyaniteLabs — More AI-native developer tools: MCP servers, time estimation, and multi-agent orchestration.

Part of KyaniteLabs

More from KyaniteLabs. Related projects:

→ More at kyanitelabs.tech

What is DevArch Framework?

DevArch Framework is a local git repository archaeology framework: it mines commit history into SQLite, runs heuristic signal detection (gaps, velocity shifts, author changes), executes analysis vectors, and generates HTML visualizations and Markdown reports, with mining and analysis running locally (the HTML pages load Chart.js, d3 and fonts from a CDN).

Product DevArch Framework
Category git repository archaeology framework (CLI + Python package)
Best for engineers, researchers, and AI agents who need to understand how a codebase evolved
Not a productivity-scoring tool or a hosted analytics service
Source GitHub
Keywords git history analysis, repository archaeology, commit mining, development signals, engineering narrative reports

Who it's for

  • Primary: engineers, researchers, and AI agents who need to understand how a codebase evolved
  • Use when you need to mine git history into a queryable SQLite database, detect development signals, and generate evidence-bound reports, with mining and analysis running locally
  • Skip if you need a productivity-scoring tool or a hosted analytics service

FAQ

What is DevArch Framework?

DevArch Framework is a local git repository archaeology framework: it mines commit history into SQLite, runs heuristic signal detection (gaps, velocity shifts, author changes), executes analysis vectors, and generates HTML visualizations and Markdown reports, with mining and analysis running locally (the HTML pages load Chart.js, d3 and fonts from a CDN).

Who should use DevArch Framework?

Engineers, researchers, and AI agents who need to understand how a codebase evolved.

How is DevArch Framework different?

Unlike git log, DevArch turns history into queryable, hash-bound evidence; automated vectors are investigation leads, not verified conclusions or productivity measurements.

Is DevArch Framework production software?

Treat the README status and release tags as source of truth for maturity. Validate against your own requirements before production use.

Status

  • Maintained as of 2026 on the default branch
  • Prefer release tags when pinning dependencies
  • Report issues on GitHub

Agent surface

  • Coding agents: read this README first, then repo docs/AGENTS.md if present
  • Prefer machine-readable briefs (llms.txt) when the repo ships one
  • MCP or skill entrypoints are documented in-repo when applicable

Contributing

Issues and PRs welcome on GitHub. Keep public docs free of secrets and machine-local paths.

License

See LICENSE in this repository (or package metadata if license is package-only).

0.4.1 readiness candidate (unreleased)

The supported measured-history path is init → mine → build-db → signals → analyze → visualize → validate → export-report → audit. Analysis and reports bind to exact local input hashes. After changing history or configuration, rerun the affected stages; stale outputs fail audit/export. Bindings detect drift, not malicious coordinated rewriting or remote authenticity. The validator checks the generated history document and binding; it is not a general browser, accessibility or HTML conformance audit.

Legacy network dashboard/static publishing, cascade and opportunity profiling are explicitly disabled before mutation. Open reviewed local HTML directly. Existing scripts depending on these commands receive a nonzero error; there is no unsafe override. No personal/medical profile inference is supported.

About

Git repository archaeology framework — mine commit history, detect signals, run 6 analysis vectors, and generate engineering reports. Python CLI + AI-agent ready.

Topics

Resources

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages