AIFS
AIFS is the Aionis File Surface. It mirrors governed Runtime output into a
read-only .aionis/ directory so coding agents can consume Aionis through
normal file reads instead of custom tools.
Use AIFS when the host agent can reliably read project files, but you do not want to write a full SDK adapter yet.
The main product effect is simple: Aionis compiles governed context once, then the agent reads a stable file surface. This is useful for agents that already inspect project files but do not have a native Aionis plugin.
What It Writes
.aionis/
README.md
AGENT_INSTRUCTIONS.md
guide.md
current_active_path.md
inspect_before_use.md
do_not_use.md
rehydrate_needed.md
receipts/latest.json
snapshots/latest.json
manifest.jsonThese files are generated from Runtime APIs. They are not the source of truth. The source of truth remains the Aionis Runtime.
AGENT_INSTRUCTIONS.md is the first file to show to an agent. It tells the
agent to treat current_active_path.md as the active route, do_not_use.md as
blocked memory, and rehydrate_needed.md as pointer-only evidence.
Install
npx @aionis/aifs@latest init \
--base-url http://127.0.0.1:3001 \
--scope my-project
npx @aionis/aifs@latest doctor \
--base-url http://127.0.0.1:3001 \
--scope my-project
npx @aionis/aifs@latest refresh \
--base-url http://127.0.0.1:3001 \
--scope my-project \
--query "Continue the current task without repeating failed branches."init creates the local .aionis/ read surface. doctor checks Runtime
reachability and local file health. refresh writes the governed context files.
If you are installing Aionis from scratch, the installer can add the AIFS package:
npx @aionis/create@latest my-aionis --with-aifsAIFS still runs from the agent project you want to expose .aionis/ inside. The
Runtime install directory and the agent workspace can be different directories.
Execution Memory Mode
When you have a known run and task signature, ask AIFS for role-specific execution context:
npx @aionis/aifs@latest refresh \
--base-url http://127.0.0.1:3001 \
--scope my-project \
--run-id run-001 \
--task-signature checkout-migration \
--role worker \
--query "Continue from the accepted route."The generated files separate:
| File | Purpose |
|---|---|
.aionis/AGENT_INSTRUCTIONS.md | Direct read-order and safety instruction for file-reading agents. |
.aionis/guide.md | Compact guide context for the next agent turn. |
.aionis/current_active_path.md | Accepted route and current execution state. |
.aionis/inspect_before_use.md | Memory that is visible but not directly actionable yet. |
.aionis/do_not_use.md | Failed, stale, contradicted, or blocked memory. |
.aionis/rehydrate_needed.md | Pointer-only evidence that should be expanded on demand. |
.aionis/receipts/latest.json | Machine-readable memory use receipt. |
.aionis/snapshots/latest.json | Operator snapshot when available. |
Refresh Summary
By default refresh prints a human-readable summary:
Aionis AIFS refreshed
Output: /repo/.aionis
Guide trace: guide-...
Prompt chars: 4210
Snapshot: written
Surface counts:
- use_now: 2
- inspect_before_use: 1
- do_not_use: 3
- rehydrate: 1Use --json when another script needs the raw result contract.
How Agents Should Read It
Give the agent this short instruction:
Before continuing, read .aionis/AGENT_INSTRUCTIONS.md and follow the Aionis file-surface order.
Use .aionis/current_active_path.md as the active route.
Treat .aionis/do_not_use.md as blocked memory.
Rehydrate pointers in .aionis/rehydrate_needed.md before exact edits.This keeps Aionis visible through ordinary file operations while preserving the same admission contract as SDK, HTTP, MCP, and native plugins.
Options
| Option | Purpose |
|---|---|
--agent-instruction | Write .aionis/AGENT_INSTRUCTIONS.md. Enabled by default. |
--no-agent-instruction | Omit the instruction file for scripts that only want machine-readable output. |
--json | Print the refresh/init/doctor result as JSON. |
--out <dir> | Write the mirror somewhere other than .aionis. |
When To Use Another Path
| Need | Better path |
|---|---|
| You control the agent loop code. | TypeScript SDK |
| Claude Code should inject and record automatically. | Claude Code plugin |
| Cursor, Zcode, or another MCP client should call tools. | MCP |
| A service boundary needs language-neutral calls. | Raw HTTP |