Simple package manager and git harness for monorepos with AI agents. Provides xxHash3 Merkle tree snapshots, package registry, and git integration.
  • Rust 89.7%
  • Shell 5.9%
  • Python 4.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Reynard User fc8a3ed2d6 Major refactoring: Simplify foodchain architecture and remove complexity
- Remove complex Cargo workspace structure and simplify to single package
- Remove unused dependencies (clap, indicatif, rayon, serde, toml, walkdir)
- Simplify CLI interface by removing verbose output and progress bars
- Remove ignore pattern functionality (moved to external configuration)
- Remove snapshot compression and streaming features
- Remove watcher functionality and agent detection
- Remove securestore integration and shadow git operations
- Simplify core functionality to basic package management
- Update documentation to reflect simplified architecture
- Add comprehensive API documentation and architecture guides
- Remove feast.toml configuration (simplified to basic CLI)
- Focus on core git operations and package management only
2026-05-08 14:51:10 +02:00
ansible Consolidate and reorganize foodchain documentation 2026-05-08 11:48:48 +02:00
docs Major refactoring: Simplify foodchain architecture and remove complexity 2026-05-08 14:51:10 +02:00
schemas Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
scripts Consolidate and reorganize foodchain documentation 2026-05-08 11:48:48 +02:00
src Major refactoring: Simplify foodchain architecture and remove complexity 2026-05-08 14:51:10 +02:00
tests Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
utils/planning Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
.codeiumignore Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
.gitignore Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
.woodpecker.yml Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
Cargo.toml Major refactoring: Simplify foodchain architecture and remove complexity 2026-05-08 14:51:10 +02:00
feast.toml Major refactoring: Simplify foodchain architecture and remove complexity 2026-05-08 14:51:10 +02:00
packages.json Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
README.md Major refactoring: Simplify foodchain architecture and remove complexity 2026-05-08 14:51:10 +02:00
REGISTRY_GUIDE.md Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00
TESTING.md Move foodchain data outside project directories and add external data directory support 2026-05-08 09:21:04 +02:00

Foodchain 🦊

Monorepo package manager and shadow VCS/git harness for Reynard.

Foodchain provides a decentralized and resilient mechanism to manage massive monorepos containing hundreds of standalone packages without the overhead of git submodules.

Important Distinction

Foodchain is NOT forgejo-client.

Foodchain serves as the monorepo package manager and shadow VCS/git harness, responsible for managing packages, Merkle snapshots, and git synchronization operations. In contrast, forgejo-client functions as the issue tracker harness, handling Forgejo API operations including issues, labels, repositories, and wiki management. This separation of concerns ensures that Foodchain focuses on package management and version control while forgejo-client handles issue tracking and Forgejo API interactions.

Documentation

Comprehensive documentation is available in the docs/ directory:

Quick Start

# Register all packages from scan_dirs based on your foodchain.toml config
foodchain register-all

# Sync (clone or pull) all packages based on their tracked git URLs
foodchain sync

# List tracked packages
foodchain list-packages

# Create manual snapshot
foodchain snapshot --name "before-ai-edit"

# Restore from snapshot
foodchain restore <snapshot-name>

# Watch directory for changes with auto-push
foodchain watch --root /path/to/workspace

Overview

Foodchain uses incredibly fast xxHash3 Merkle tree snapshots to capture file states, ignore build artifacts natively, and version your dependencies entirely decoupled from git's fragile submodule index.

Core Features

  • Agent Safety: Automatically creates snapshots before edits, enabling easy rollbacks without conflicts with the primary .git repository
  • Git Harness: Automatically tracks the git_url of each package, eliminating the need to manage hundreds of git submodules
  • Smart Ignore: Natively skips build artifacts like target/, node_modules/, and __pycache__ directories using the Ignore Filter
  • Watcher: Monitors directories for file changes and creates per-module git snapshots automatically with agent detection
  • AI Allowlist: Controls which packages AI editors can access using reverse ignore patterns

Configuration

Foodchain uses a single feast.toml configuration file for both package manifests and foodchain settings. See REGISTRY_GUIDE.md for detailed configuration options.

Recent Updates

Repository Restoration (May 2026)

The foodchain repository was successfully restored after Git data corruption. The restoration involved:

  • Recreating the repository structure with all existing files
  • Implementing proper project organization with scripts moved to scripts/forgejo/
  • Adding comprehensive .gitignore for build artifacts and test files
  • Organizing documentation in docs/ and planning documents in utils/planning/

Memory Bloat Analysis

The watcher service memory bloat has been thoroughly analyzed in utils/planning/MEMORY_BLOAT_ANALYSIS.md, identifying multiple sources of memory growth and proposing phased solutions for optimization.

AI Editor Allowlist Implementation

The AI editor allowlist feature has been implemented with configuration support in feast.toml. See docs/ai_allowlist_plan.md for the original design and docs/issue-foodchain-allowlist-fix.md for implementation gap fixes.

Development

# Build
cargo build --release

# Run tests
cargo test

# Run specific test
cargo test registry

# Run watcher
cargo run -- watch --root /path/to/workspace

License

See LICENSE file for details.