mosaic-companion AGENTS.md

An AGENTS.md instruction file for MosAIc Companion, an Electron desktop app built with React, TypeScript, and Vite. It explains the project's architecture and rules for AI coding assistants.

In plain words
What is it for?
Use it before modifying MosAIc Companion to understand its WASM sandbox, host-function permissions, optional Docker workloads, and project architecture documents.
Why use it?
It gives an assistant the context and safety boundaries needed before changing the app, especially the separation between trusted core code and restricted tools.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/hypercycle-development/mosaic-companion/agents-md
Clone the repo
git clone --depth 1 https://github.com/hypercycle-development/mosaic-companion

Made for: Codex, OpenCode.

Per session 2,534 This file is loaded in full into every session.
When invoked 2,534 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02534 $0.02534
Opus 5 $0.01267 $0.01267
Sonnet 5 $0.00507 $0.00507
Haiku 4.5 $0.00253 $0.00253

Measured 3d ago against content hash 65b7e8c9793d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mosaic-companion AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MosAIc Companion — AI Agent Instructions

This file provides context for AI coding assistants working on this project. Read this before making changes to the codebase.

Project Overview

MosAIc is an Electron desktop app (React + TypeScript) that serves as an AI companion with tool use, wallet integration, and secure sandboxed tool execution.

Stack: Electron (main process) + React (renderer) + TypeScript. Vite for bundling.

Architecture — MUST READ Before Modifying

The project follows a Core (trusted) vs Sandbox (untrusted) architecture for tool execution.

Full architecture docs: /docs/architecture/

Key Rules

  1. WASM is the primary runtime for sandboxed tools. Docker is optional for heavy workloads (GPU, databases). WASM tools have zero network/filesystem/OS access by default — all capabilities come through host functions.
  2. The Gatekeeper is host functions, not a container. For WASM tools, the Gatekeeper logic runs directly inside Electron as host functions gated by GatekeeperPolicy. No separate proxy or container.
  3. Tools are always low-trust. Even tools written by us get the same restrictions in the Sandbox. Trust is architectural, not reputational.
  4. Every boundary crossing must be: explicit, Core-mediated, and logged.
  5. No runtime permission escalation — tools declare permissions in their manifest upfront.
  6. GatekeeperPolicy is the base interface for filtering decisions. WASM host functions call it directly now; a future Docker proxy would call the same policy. Same rules, different plumbing.

Key Architecture Docs

Doc When to read
overview.md Before modifying any Core or Sandbox code
manifest.md Before changing tool manifests, permissions, or UI panels
gatekeeper.md Before touching outbound network filtering
container-communication.md Before changing how MosAIc talks to tools
permissions.md Before changing the permission model
data-model.md Before modifying Chronicle, Vault, or data flow
tool-lifecycle.md Before changing tool install, launch, or execution flow
tool-ui.md Before changing how tools render UI blocks
execution-plan.md For the Phase 1 implementation sequence
implementation-status.md To check what's built vs planned
glossary.md For term definitions

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 212 lines · 2,534 tokens per session scan A 65b7e8c9793d

Subscribe to this mod's changes

mosaic-companion AGENTS.md is an instructions file published in the GitHub repository hypercycle-development/mosaic-companion (16 stars, last pushed 5d ago), licensed Apache-2.0. It adds 2,534 tokens to every session, about $0.0127 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

open-codesign CLAUDE.md

Instructions for OpenCoworkAI/open-codesign, covering claude.md — open codesign, what this project is, hard constraints (do not violate), stack & conventions and frontend stack (locked).

OpenCoworkAI/open-codesign · 1,789 tokens

opencove AGENTS.md

AGENTS.md instructions for DeadWaveWave/opencove, covering system prompt: opencove project ai developer agent, 1. core directives & golden rules, 2. decision framework (small vs large), a. small change (fast feedback / 小步快反馈) and b. large change (deep thinking / 慎重对齐).

DeadWaveWave/opencove · 1,183 tokens

wesight AGENTS.md

Instructions for freestylefly/wesight, covering claude.md, build and development commands, build production bundle (typescript + vite), lint with eslint and run memory extractor tests (node.js built-in test runner).

freestylefly/wesight · 6,627 tokens

limboo CLAUDE.md

Instructions for limboo-ai/limboo, covering claude.md, 1. what is limboo?, 2. tech stack (current), 3. project structure and the three electron contexts (critical mental model).

limboo-ai/limboo · 24,748 tokens

getvect AGENTS.md

Instructions for craigjmidwinter/getvect, covering agents.md, commands (green on a clean checkout), invariants a pr must not break and process.

craigjmidwinter/getvect · 961 tokens

open-codesign AGENTS.md

Instructions for OpenCoworkAI/open-codesign, covering agents.md - open codesign, what this project is, hard constraints, ai visibility for web work and current architecture direction.

OpenCoworkAI/open-codesign · 3,343 tokens