investigating-repository-history

Reconstruct historical code intent from git history and GitHub PR discussions.

119|10|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/CodeAlive-AI/ai-driven-development --skill investigating-repository-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigating-repository-history
Source: https://github.com/CodeAlive-AI/ai-driven-development/tree/main/skills/investigating-repository-history
Command: npx skills add https://github.com/CodeAlive-AI/ai-driven-development --skill investigating-repository-history

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This skill helps you understand why existing code behaves the way it does before you make changes that could break compatibility, security, or long-running behavior.

Core Features & Use Cases

  • Evidence-backed provenance: Reconstructs historical intent using local git history (blame/log/patch IDs), plus GitHub PR metadata and review discussion.
  • Anomaly-aware PR mapping: Handles squash/rebase/cherry-pick/renames using heuristics and a provenance “mesh,” downgrading confidence when mapping is weak or stale.
  • Decision atoms + risk calibration: Extracts explicit, evidence-backed constraints/risks/rejected approaches and produces an overall risk and confidence assessment.

Quick Start

Ask your agent to run the collector on a specific file and line range to generate a cited history note before you propose the edit.

Frequently Asked Questions about investigating-repository-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find out why specific lines of code were written before modifying them?

Understanding why code behaves a certain way before modification involves reconstructing historical intent from git blame, log patches, and GitHub PR discussions. This extracts explicit constraints and rejected approaches to prevent breaking compatibility or security invariants.

Can I trace code provenance through squash commits and rebases?

Tracing code provenance through squash commits and rebases requires anomaly-aware PR mapping using heuristics and a provenance mesh. This approach handles cherry-picks and renames while downgrading confidence scores when the commit mapping evidence is weak or stale.

Do I need local repository access and Python to investigate git history?

Investigating git history requires local repository access with git and Python 3.9+ installed. Optional authenticated GitHub access via the gh CLI can be used to pull PR metadata and review discussions, yielding a more complete provenance analysis.

What is the best way to assess code change safety for legacy logic?

Assessing code change safety for legacy logic requires extracting evidence-backed decision atoms and evaluating risk calibration. This identifies explicit compatibility constraints, security invariants, and rejected approaches before you propose risky modifications.

How does the tool handle unclear legacy logic when evidence is weak?

When evidence is weak for unclear legacy logic, the tool avoids inventing intent and returns UNKNOWN with calibrated confidence. This ensures your risk assessment and provenance notes remain strictly evidence-backed rather than speculative.