This project builds a ledger for mixed project roots: plain directories, git repos, and Obsidian vaults.
The scanner is config-driven and emits:
output/projects.csvoutput/projects.jsonoutput/projects.md
These files are the operating packet for future agents:
AGENTS.mdPRD.mdARCHITECTURE.mdSCHEMA.mdROADMAP.mdBACKLOG.mdRUNBOOK.md
Your source material is not one neat repo. It is spread across working folders, imported machine backups, vaults, and nested repos. The ledger gives you one place to answer:
- What exists?
- Is it local or shared?
- Is it a git repo?
- Is it an Obsidian vault?
- When was it last touched?
- Where is the README?
- What is the remote URL or canonical location?
- What was the last session summary / next step?
python build_ledger.pyOptionally:
python build_ledger.py --config ledger_config.json --output-dir outputledger_config.json defines scan roots.
children: inspect each direct child directory and keep the ones that look project-likegit_repos: recursively find directories that contain.gitself: treat the root itself as one ledger entry
The default config scans:
- the top-level children of
Documents - nested git repos under
Documents/repos
Adjust the roots and excludes as needed for other machines, synced folders, or backup dumps.
If a directory matters but does not have enough obvious signals, add it under force_include_names for that root.
project_hash: deterministic hash used as a ledger identifierproject_key: the best stable key the scanner can findlast_touch_at: newest filesystem timestamp seen under the project treelast_push_at: not knowable reliably from local git alone; this is best filled manually in the sidecar when a session actually pusheslast_remote_ref_at: fallback based on local remote-tracking refs
If you want the same project to resolve cleanly across multiple computers, set a stable project_key once in the sidecar file.
If a project root contains .project-ledger.json, the scanner merges it into the auto-discovered metadata.
Use this for fields that the scanner cannot infer well:
- stable
project_key display_namestatustagscanonical_urlsharedlast_session_atlast_session_summarynext_steplast_push_at
See templates/project-ledger.sidecar.example.json.
Use the copy/paste prompt in prompts/session_end_prompt.md as the last instruction to an agent before it ends work in a repo/vault/project.
That prompt is designed to keep the ledger useful over time by forcing a final sidecar refresh with:
- current status
- exact next step
- session summary
- push metadata if relevant
You have two straightforward options:
- Run this project separately on each machine and merge the outputs later.
- Point
ledger_config.jsonat imported backups or synced roots from other machines.
If you use option 2, set a root label like macbook-air-backup so the ledger keeps source context.
Example:
{
"path": "../Mac",
"label": "macbook-air-backup",
"discovery": "children",
"force_include_names": ["Notes", "Ideas", "Research Vault"]
}