<h1 align="center">
<a href="https://prompts.chat">
**"Inscribe. Illuminate. Banish."**
Sign in to like and favorite skills
"Inscribe. Illuminate. Banish."
The Triangle of Art is a hardened Docker-based sandbox designed for summoning and containing LLM coding agents (Aider, Claude, Qwen, Gemini, and Codex). It provides a restricted environment where these entities can execute code, run tests, and manipulate files without escaping their tether or accessing the Magician's host filesystem.
This Grimoire exists because the Magician understands the true nature of the forces we wield.
npm is vast but treacherous. To execute its scripts directly on the host machine is to invite chaos into one's home.Unlike standard containers, the Triangle employs Recursive Containment:
Perimeter to prevent the entity from consuming the host's life-force (system resources).DOCKER_SOCK_PATH=/var/run/docker.sock in .env only if you intentionally need it.127.0.0.1 by default.dind-rootless profile and DOCKER_HOST=tcp://dind-rootless:2375 for Docker-in-Docker without mounting the host socket.
/etc/subuid + /etc/subgid entries for your user, cgroup v2, and newuidmap, newgidmap, slirp4netns, fuse-overlayfs installed.On default Ubuntu, unprivileged user namespaces are typically enabled already.
On Ubuntu 24.04 and newer, AppArmor restricts unprivileged user namespaces by default. You must disable this restriction:
Temporarily disable the restriction:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
Make it permanent:
echo "kernel.apparmor_restrict_unprivileged_userns=0" | sudo tee /etc/sysctl.d/60-apparmor-namespace.conf
To enable the remaining requirements:
sudo apt-get update sudo apt-get install -y uidmap slirp4netns fuse-overlayfs
echo "$(id -un):100000:65536" | sudo tee -a /etc/subuid /etc/subgid
Log out and back in after changing these files.
stat -fc %T /sys/fs/cgroup
If this is not
cgroup2fs, rootless Docker may not work. Enabling cgroup v2 requires a host configuration change (systemd/kernel cmdline); only do this if it matches your security policy.
cat /proc/sys/kernel/unprivileged_userns_clone command -v newuidmap newgidmap slirp4netns fuse-overlayfs
Prepare your host environment, create the cache chambers, and install the protective hooks. Requires
docker and python3; uses uv or pip to install pre-commit if needed.
./invoke consecrate
Tip: Say "Yes" when asked to add
to your PATH. This lets you run rituals from anywhere.invoke
Build the manifestation's physical form by pulling the necessary tools and layers.
./invoke inscribe
Wake the spirit and light the Triangle. This starts the manifestation.
./invoke illuminate
Engage with the entities through their specific channels.
./invoke commune ./invoke Aider ./invoke Claude ./invoke Codex ./invoke Gemini ./invoke Qwen ./invoke Serena
The Triangle hosts powerful spirits known as Model Context Protocols (MCP) servers to assist the coding agents.
Serena runs as an MCP server inside its own container. It is enabled by default when you illuminate the Triangle.
./invoke Serena
Default endpoints:
Inside the vessel, assistants connect to Serena at:
http://serena:9121/sseThe Serena container config is stored in
Pacts/Serena/serena_config.yml.
The logs are kept in .residue/serena/logs.
A documentation and knowledge retrieval spirit. Inside the vessel, assistants can connect to Context7 at:
http://context7:9122/sseA spirit that grants direct control over the repository's version history. Inside the vessel, assistants can connect to the Git server at:
http://git-mcp:9123/sseNote: The
ritual automatically configures the agents to speak with all available spirits (Serena, Context7, and Git).consecrate
Template MCP client configs are created in
Pacts/* during consecration.
If your client expects a different MCP config format, update the corresponding file.
For those practicing the Art on macOS, the path requires the Docker Desktop talisman.
The Triangle requires Docker. On macOS, install Docker Desktop (Intel or Apple Silicon as appropriate).
docker version and docker compose version.git is installed (xcode-select --install).Clone the grimoire and enter the circle:
git clone https://gitlab.com/alex.gosselin/triangle-of-art.git cd triangle-of-art chmod +x invoke
Follow the standard rituals:
./invoke consecrate - Prepares the environment../invoke inscribe - Builds the vessel.
./invoke illuminate - Starts the manifestation.
Talk to the spirits:
./invoke Claude # or Aider, Gemini, etc.
Cleanly shut down:
./invoke banish
By default, the spirits are bound to the local
./The Circle directory. To manifest the environment onto a different project folder on your host machine, use the --circle (or -c) option:
# Bind the vessel to a specific project directory ./invoke illuminate -c "/path/to/your/other/project" # Or using the long flag ./invoke illuminate --circle "/path/to/your/other/project"
What this does:
The rituals can be customized using CLI flags or by passing arguments directly to the underlying Docker commands.
If you have a customized
Perimeter file, you can specify it using the --file (or -f) option:
./invoke illuminate -f "CustomPerimeter.yml"
You can pass flags like
--no-cache or --pull directly to the inscribe ritual:
./invoke inscribe --no-cache
To enable passwordless sudo inside the container (opt-in), rebuild with:
./invoke inscribe --enable-sudo
Similarly, you can pass flags like
--force-recreate or --build to the illuminate ritual:
./invoke illuminate --force-recreate
| Component | Ritual Object | Purpose |
|---|---|---|
| Inscription | Dockerfile | The blueprints for the manifestation's body. |
| Perimeter | docker-compose | Defines the boundaries of the manifestation zone. |
| Grimoire | Makefile | The master list of executable rituals and incantations. |
| Pacts/ | Agent configs | Per-agent config folders mounted into the vessel. |
| The Circle/ | Workspace | The only physical space the Vassal is allowed to touch. |
| .residue/ | Cache store | The temporary energy left behind by manifestations. |
| .env | Secrets | API keys used by the summoned entities. |
| The Veil | pre-commit | + . |
| .gitlab-ci.yml | CI ritual | Builds the vessel in GitLab CI. |
Hidden within
Pacts/The Pact lies a template system prompt. This scroll contains instructions for the spirits, listing the available MCP tools and operational guidelines.
It is not active by default, to avoid overriding project-specific instructions.
To bind the spirits to this Pact:
ln -s Pacts/The\ Pact AGENTS.md # Or for specific spirits: ln -s Pacts/The\ Pact CLAUDE.md
Note: This creates a symbolic link in your project root. If you wish to customize the instructions, delete the link and create your own
.AGENTS.md
This Triangle is a foundation, meant to be built upon. You are encouraged to summon new spirits (MCP servers), inscribe new tools, and refine the rituals.
See CONTRIBUTING.md for instructions on how to extend the Triangle and share your discoveries.
When the work is done, you must clear the circle to ensure no residue remains. This wipes the temporary caches and destroys the manifestation.
./invoke banish
This grimoire is licensed under the JSON License.
"The Software shall be used for Good, not Evil."
By invoking these scripts and illuminating the Triangle, the Magician agrees to this pact. Those who intend to use these spirits for malice will find the wards of this repository turned against them.