Skip to main content

A library for extracting metadata out of a source repository.

Project description

repo-parser

This is a set of python scripts and tools for extracting metadata and structure out of a monorepo, for the purposes of generating a service registry, unified documentation, or other types of data out of the contents. It also contains some tooling designed around a new concept called "Implementation Decision Records" (idrs), designed to aid both implementation (especially where assisted by LLMs) and later code archaeology efforts.

It should be considered an experiment, rather than production software. It is inspired by my experiences in the software industry and being frustrated with current solutions being some combination of:

  • Time consuming to configure and maintain
  • Requiring the specification of redundant metadata (which is bound to get out of date)

Current assumptions:

  • The files you want to process fit into memory
  • You don't care about history (repo-parser gives a snapshot in time)

You can see a demo of a documentation site generated from this repo at:

https://repo-parser-demo.netlify.app/

[!NOTE] repo-parser is partly created with LLMs (specifically, Claude Code and ChatGPT), with heavy human curation.

Usage

Creating IDRs (Implementation Decision Records)

repo-parser includes a CLI tool (rp) for creating Implementation Decision Records (IDRs). IDRs are lightweight documents that capture both the intent and implementation details of code changes, designed to be committed alongside your code.

They are intended to be useful for both humans and computational agents (LLMs).

Why IDRs? Traditional design docs are too heavyweight for implementation. ADRs are great for decisions but lack implementation detail. IDRs bridge the gap—detailed enough to guide implementation, ephemeral enough to not become stale documentation.

Create a new IDR:

rp idr new "Your Feature Title"

This will create a new markdown file in the idrs/ directory with:

  • A UTC timestamp prefix (e.g., 202512301600)
  • A slugified version of your title
  • Pre-filled template with your git author name

Example:

rp idr new "Add last modified metadata"
# Creates: idrs/202512301600-add-last-modified-metadata.md

The IDR template includes sections for:

  • Problem Statement
  • Context
  • Goals and Non-Goals
  • Proposed Solution
  • Detailed Design
  • Implementation notes (ephemeral)

This feature was itself implemented using an IDR—see idrs/202512301631-idrs.md for more about the IDR format and philosophy.

Using repo-parser as a Library

For documentation generation and metadata extraction, see the example in example/example_parser.py.

An early version of repo-parser is available on pypi as https://pypi.org/project/repo-parser. Use at your own risk!

Local development

You can experiment with the local demo by running make example. It should live-reload as you make changes in the example/repo directory.

For other tasks, look at the (very simple) Makefile in the root directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_parser-0.0.4-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file repo_parser-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: repo_parser-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_parser-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15afbbaedd8649134da4c3a5e8d4d3744684581f1032adc9eb90a8d03412959a
MD5 e8afb01024c7983b3fe0b69ce1ad2f43
BLAKE2b-256 4624498149c72eab9c247dd2870a6a98afc2fe763583c8f245fabe5810ec13ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_parser-0.0.4-py3-none-any.whl:

Publisher: publish-to-pypi.yml on wlach/repo-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page