2026-09-17 12:45:29 -04:00
2026-09-17 09:57:17 -04:00
2026-08-31 18:38:07 -04:00
2026-09-16 00:13:28 -04:00
2026-09-08 15:25:19 -04:00
2026-09-16 00:13:28 -04:00

dev

This is my monorepo, started in 2026.

Monorepo structure

dev/                    Monorepo root
├── bazel/               Bazel support files
├── configs/             Declarative configuration
│   └── nixos/           NixOS hosts, modules, guests, registry, and secrets
├── docs/                Repository documentation
├── src/                 Projects
│   └── dotfiles/        Home and system configuration
└── third_party/         External source and vendoring support
    ├── crates/          Generated Rust crate sources and Bazel targets
    └── pi/              Vendored Pi source

Rust dependencies

The repository root contains one Cargo dependency graph. Each Rust project declares its dependencies in its local Cargo.toml file. Add each Rust project to the members list in the root Cargo.toml file. Use explicit member paths because the Bazel generator does not expand workspace globs.

Update the shared lockfile after changing a project manifest:

cargo generate-lockfile

Regenerate local crate sources and Bazel targets:

bazel run //third_party:vendor_crates

Reference each dependency with an explicit local Bazel label:

deps = ["//third_party/crates:crate_name"]

Commit the generated files under third_party/crates/. Do not edit generated files manually.

Vendored Pi

Pi source lives in third_party/pi/. The directory is a linear vendor import from upstream Pi. Local fork changes are carried directly in that vendored tree.

Use the upstream tag that matches the target CLI release. The CLI version lives in packages/coding-agent/package.json.

Do not use git subtree add or git subtree pull for Pi PR branches. Those commands create a synthetic upstream root commit. Gitea rebase applies that root commit without the third_party/pi prefix. That causes add/add conflicts on repository root files.

Update the vendor tree with a linear commit:

git fetch https://github.com/earendil-works/pi.git refs/tags/v<version>
split="$(git rev-parse FETCH_HEAD)"
rm -rf third_party/pi
mkdir -p third_party/pi
git archive --format=tar "$split" | tar -C third_party/pi -xf -
git add third_party/pi
git commit \
  -m "chore(vendor): import pi <version>" \
  -m "Imported as a linear vendor commit so forge rebases do not replay the upstream root tree." \
  -m "git-subtree-dir: third_party/pi" \
  -m "git-subtree-split: $split"

Keep the vendor import or update commit separate from local edits. Do not remove the git-subtree-dir and git-subtree-split trailers. They record the upstream source commit for future updates.

After the upstream update, resolve conflicts in third_party/pi/. Keep local fork changes as ordinary commits after the vendor update. Then verify the package:

nix build .#nixosConfigurations.zeus.config.home-manager.users.alexion.programs.pi-coding-agent.package --no-link --print-out-paths
Description
No description provided
Readme AGPL-3.0 48 MiB
Languages
Nix 71.5%
Rust 11.3%
Python 6.2%
TypeScript 4.2%
Shell 3.7%
Other 3.1%