Skip to content

v2.1: Code Archaeology Agent — reconstruct *why* every decision was made #744

Closed

Description

@AmitoVrito

Summary

An agent that fuses git log + your old .md notes + (opt-in) Slack/email archives to reconstruct why code exists in its current form. Answers "Why does this function exist?" with a causal chain across sources.

Fits the framework

Design

from synapsekit.archaeology import ArchaeologyAgent

arch = ArchaeologyAgent(
    sources=[GitHistory(\".\"), MeshSource(), SlackArchive(\"...\"), GmailArchive(\"...\")],
    causal_engine=NeuroSymbolicAgent(...),  # #733 for plausibility checks
)

result = await arch.explain(\"why does AgentRegistry exist?\")
# result.timeline -> chronological events that led to creation
# result.causes   -> PR, issue, design doc, Slack thread, meeting note
# result.evolution -> how it changed over time + why

Use cases

  • Onboarding new engineers ("explain this codebase to me as if I just joined")
  • Pre-refactor: "is this abstraction still justified?"
  • Compliance: "why did we add this audit log?"
  • Retrospectives: "how did we end up here?"

Components

  • ArchaeologyAgent
  • TimelineReconstructor — orders multi-source events
  • CausalLinker — uses NeuroSymbolicAgent to validate causation hypotheses
  • EvolutionDiff — visualizes how a function/file changed across versions
  • Cross-references: PR ↔ issue ↔ Slack ↔ meeting notes ↔ design doc
  • Output formats: markdown report, Mermaid timeline, audio brief

Risks

  • Source access (Slack/email) requires auth + scopes → wizard for safe setup
  • Hallucinated causation → require ≥2 evidence sources per causal claim
  • Stale archives → re-index policy

Acceptance

  • On a 2-year-old internal repo, produces a coherent "why" answer with ≥3 evidence sources
  • Causal claims pass NeuroSymbolicAgent plausibility check
  • Output includes citations (file:line, PR#, message URL)

Activity

  1. added this to the v2.1.0 milestone on Jun 25, 2026
  2. added
    enhancement
    retrieval
    v2.1
    on Jun 25, 2026
  3. added a commit that references this issue on Aug 22, 2026
    ccf09ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementretrievalv2.1

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions