Skip to content

Repository files navigation

pi-arcweld logo: a Pi symbol whose crossbar is a titanium weld bead

pi-arcweld

Don't fork it. Weld it.

An auditable local workspace for the Pi coding agent:
pinned upstream source, curated extensions, bounded MCP tooling, and a reproducible runtime.

pi arcweld project site appautomaton App Automaton on GitHub pi-arcweld is MIT licensed tracks upstream Pi at earendil-works/pi Deploy landing page to GitHub Pages

What is pi-arcweld?

pi-arcweld is an auditable local workspace for the Pi coding agent. It welds a curated local layer of user extensions, global system guidance, bounded MCP tooling, and a reproducible runtime onto pinned upstream Pi source, along one visible seam. Pi Arcweld is not a fork: upstream stays upstream, and the workspace stays yours.

Why weld instead of fork?

  • Pinned upstream, no drift. pi-mono/ is a submodule locked to a known commit; moving to a newer Pi is an explicit, reviewable fast-forward.
  • One visible seam. Every local behavior, from extensions and MCP wiring to system guidance, is a plain file in this repository, so changes surface in git diff, not in hidden machine state.
  • Reproducible runtime. scripts/build-pi-agent.sh assembles and verifies the runnable Pi agent outside the upstream tree; pi-mono/ never accumulates build state.
  • Bounded tooling, guarded secrets. MCP servers run as separate stdio processes, and scripts/check-secret-boundary.sh fails any commit that would leak credentials into the repository.

Curated components

  • External runtime builder: assembles and verifies Pi without writing build state into upstream source.
  • Cache-safe plan mode: appends plan state while preserving the provider prompt-cache prefix.
  • MCP client: discovers configured servers behind a fixed, bounded model-facing tool surface.
  • Questionnaire: presents explicit, keyboard-operable clarification flows.
  • System-instruction append: refines response behavior without replacing Pi's generated system prompt.

Repository layout

Path Contents
pi-mono/ Pinned upstream Pi source, managed as a Git submodule and kept clean of local build state
extensions/ Curated user-level Pi extensions and package-backed extensions
mcp-servers/ Canonical source for local MCP servers, deployed as tested versioned releases under ~/.local/mcps/
system-instruction/ The global APPEND_SYSTEM.md source and capture notes
scripts/ Runtime build, upstream-update, and validation scripts
docs/ The pi arcweld landing page, llms.txt, and sitemap served by GitHub Pages
build/ Generated local runtime and package artifacts, intentionally untracked

Quickstart

Clone the repository with its pinned upstream submodule:

git clone --recurse-submodules https://github.com/appautomaton/pi-arcweld.git pi-arcweld
cd pi-arcweld

Build and link the local Pi runtime without writing build output into pi-mono/:

scripts/build-pi-agent.sh --link-user-bin
pi --version

The build prefers the repository's pinned native tsgo compiler when it is runnable and otherwise falls back to the pinned tsc compiler, targeting ES2024 because the TUI source uses the RegExp v flag. Compiler selection is capability-based and requires no platform-specific source branches.

Validate the repository and machine wiring:

scripts/check-workspace.sh
scripts/check-user-wiring.sh

Updating Pi

Realign the local pi-mono checkout onto upstream main and rebuild the runtime. Upstream rewrites and force-pushes main, and this checkout is a depth=1 shallow clone, so the helper falls back to resetting onto the fetched tip when a fast-forward is not possible. It re-verifies a clean pi-mono worktree before doing so, and never commits or pushes:

scripts/update-pi-mono.sh
git diff --submodule=log -- pi-mono

The helper never commits or pushes. Review the resulting submodule pointer before committing it in this repository.

User-level integration

The active Pi configuration uses explicit user-level wiring: extensions point to canonical repository source, while the Camoufox MCP runs from a tested local deployment:

  • ~/.pi/agent/extensions/plan-modeextensions/plan-mode/
  • ~/.pi/agent/extensions/questionnaire.tsextensions/questionnaire.ts
  • ~/.pi/agent/extensions/exa-search.tsextensions/exa-search.ts
  • ~/.pi/agent/extensions/codex-web-search.tsextensions/codex-web-search.ts
  • ~/.pi/agent/extensions/claude-web-searchextensions/claude-web-search/
  • ~/.pi/agent/extensions/grok-search.tsextensions/grok-search.ts (optional; not enabled on this machine)
  • ~/.pi/agent/APPEND_SYSTEM.mdsystem-instruction/APPEND_SYSTEM.md
  • ~/.pi/agent/settings.json registers extensions/mcp-extension/ as a local-path package
  • ~/.pi/agent/mcp.json runs the deployed Camoufox MCP at ~/.local/mcps/camoufox/current/bin/camoufox-mcp (optional; its browser payload is machine-local, so scripts/check-user-wiring.sh validates the deployment where it exists and reports it as absent otherwise)
  • the user pi command resolves to build/pi-agent/runtime/bin/pi

Secret boundary

Machine-local settings, credentials, and unrelated user extensions are not stored in this repository. The Exa API key stays only in ~/.pi/agent/exa-search.json, and Grok provider credentials stay in Pi's machine-local model/auth configuration. scripts/check-secret-boundary.sh fails if commit candidates include Pi credential or config files, obvious literal secrets, or an exact credential value discoverable from the active machine-local Pi configuration.

Development model

The repository intentionally has no root package.json or shared npm workspace. Each local package owns its manifest and checks, and upstream Pi retains its own build and release process. Only packages with real third-party runtime dependencies carry a lockfile; source-only extensions declare Pi packages as wildcard peer dependencies and are type-checked and tested against the live built runtime, so no local manifest pins a Pi version that could go stale on an upstream update. The root repository records the upstream URL and pinned Pi commit, not local Pi source changes. See AGENTS.md for workspace, build, and Git hygiene rules.

Links


Pi Arcweld is maintained by App Automaton. The Pi coding agent is developed upstream by earendil-works.

About

Pi Arcweld, an auditable local workspace for Pi: pinned upstream source, curated extensions, bounded MCP tooling, and a reproducible external runtime (pi-arcweld)

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages