Amphimixis-AI¶
Amphimixis-AI helps you analyze your project for migration ability — it automates this process. It provides an agent system and formal tools for Opencode:
Amphimixis— orchestrator agent, and subagents which are called by the orchestratorTools — wrappers around the
amixisCLI and other tools
Table of Contents¶
Usage¶
Bare amixis opencode opens the Opencode TUI with the amphimixis agent.
For non-interactive runs, use the run subcommand. It runs opencode non-interactively and prints only the text messages produced by the session (requires jq):
amixis opencode run "Analyze the <Name> project, identify platform-specific code, and produce a migration report for RISC-V. Use my cross-toolchain /path/to/toolchain."
To skip processing and print the raw session output, add --no-processing-output (no jq needed):
amixis opencode run --no-processing-output "Analyze the <Name> project, identify platform-specific code, and produce a migration report for RISC-V. Use my cross-toolchain /path/to/toolchain."
Note: The agent expects the current working directory to contain (or point to) the project being analyzed. Use an absolute path in the prompt for clarity.
Pipeline¶
When invoked, amphimixis runs a 7-phase pipeline:
Phase |
Worker |
Description |
|---|---|---|
1. Repository analysis |
|
Find the actual repo, clone it, scan for platform-specific macros and intrinsics, assess dependencies |
* Session of previous agent inspection |
|
Do nothing |
2. Configuration |
|
Create the |
* Session of previous agent inspection |
|
Do nothing |
3. Build & verify |
|
Build on reference and target platforms, run tests |
* Session of previous agent inspection |
|
Inspect session for errors in work |
4. Profiling |
|
Profile executables, produce a cross-platform comparison |
* Session of previous agent inspection |
|
Inspect session for errors in work |
5. Optimization |
|
Analyse bottlenecks and suggest improvements |
* Session of previous agent inspection |
|
Inspect session for errors in work |
6. Repeat pipeline |
|
Apply optimizations, rebuild, re-profile, compare before/after |
7. Final report |
|
Compile a structured report by the Report Template |
* Session of orchestrating agent inspection |
|
Inspect session for errors in work |
The agent hierarchy follows a strict delegation pattern:
amphimixis (orchestrator) mode: all
│ delegates work, never calls tools directly
│
├── amphimixis-analyzer mode: subagent
│ └── uses: amphimixis-analyze.ts, amphimixis-analyze-vectorization.ts
|
├── * amphimixis-inspect-session command (run plan agent)
│
├── amphimixis-configurator mode: subagent
│ └── uses: amphimixis-configure-platforms.ts,
│ amphimixis-configure-recipes.ts,
│ amphimixis-configure-builds.ts,
│ amphimixis-validate.ts
|
├── * amphimixis-inspect-session command (run plan agent)
│
├── amphimixis-builder mode: subagent
│ └── uses: amphimixis-build.ts
|
├── * amphimixis-inspect-session command (run plan agent)
│
├── amphimixis-profiler mode: subagent
│ └── uses: amphimixis-profile.ts,
│ amphimixis-analyze-vectorization.ts
|
├── * amphimixis-inspect-session command (run plan agent)
│
└── amphimixis-optimizer mode: subagent
| └── uses: amphimixis-analyze-vectorization.ts
|
└── * amphimixis-inspect-session command (run plan agent)
Each subagent receives structured context from its predecessor and passes results forward. The orchestrator validates completeness after each phase before proceeding.
Versioning¶
The agent system is versioned to make generated artifacts reproducible and traceable back to the methodology that produced them.
Three components carry a SemVer-like <major>.<minor>.<patch> version:
Component |
Where it lives |
|---|---|
Methodology |
|
Regeneration pipeline |
one shared version for |
Segment meanings (like SemVer): major — structural change / reorganization / full regeneration; minor — new feature / update; patch — small change, bug fix, correction, hand-made change.
Every generated agent carries an amphimixis-ai version field with three dash-separated segments:
<methodology ver.>-<regeneration-pipeline ver.>-<regen count>.<hand-made patch>
The first two segments record the fixed versions of the methodology and regeneration pipeline that generated the agent.
The last segment is the concrete agent’s own version: its first slot bumps on each regeneration, its second slot bumps on hand-made (manual, out-of-regeneration) corrections.
When the methodology or the regeneration-pipeline version changes, the last segment resets to
1.0.
Current values: methodology 0.1.0, regeneration pipeline 0.1.0, and a freshly generated agent is amphimixis-ai version: 0.1.0-0.1.0-1.0.
Tool reference¶
All tools are defined as TypeScript files using @opencode-ai/plugin.
Tool |
Action |
Purpose |
|---|---|---|
|
Run |
Detect build systems, test frameworks, CI, documentation, dependencies |
|
Run |
Scan a binary for platform-specific vector instructions (SSE, AVX, AVX-512, NEON, RVV) |
|
Run |
Build the project using a specific configuration |
|
Add platforms to |
Add machine definitions to |
|
Add recipes to |
Add build recipes (flags, toolchain, sysroot) to |
|
Add builds to |
Link platforms and recipes into executable build tasks |
|
Run |
Profile executables with |
|
Run |
Validate an |
The configure tools write YAML directly rather than calling the CLI — they manipulate input.yml programmatically.
Installation¶
Requirements¶
A working
amixisinstallation (see Usage Guide)amixismust be onPATH(tools invokeamixisas a subprocess)The Opencode CLI (
opencode) installed and available onPATHbunfor installing test/utility dependenciesjqforamixis opencode runtext-only processing (installed automatically into the Opencode config dir withamixis opencode installvia thenode-jqpackage, or install it from https://jqlang.org; skip with--no-processing-output)
Install the agents and tools¶
amixis opencode install
This copies agents, tools, commands, and plugins into the local .opencode/ directory, writes the amixis executable path into the installed tools, and installs Bun dependencies (including node-jq, which ships the jq binary used by amixis opencode run).
For a system-wide installation, pass the --global flag:
amixis opencode install --global
This installs into $XDG_CONFIG_HOME/opencode (defaults to ~/.config/opencode).
Uninstall¶
amixis opencode uninstall
amixis opencode uninstall --global
Removes only the files that were placed by install and the declared
inspector_general dependency (via bun remove, including its package.json
and bun.lock entries). Leaves the remaining package.json/bun.lock
entries, opencode.json(c), and any user-owned files untouched.
Running the tests¶
Tests use Bun’s built-in test runner (bun:test). They reside in amphimixis-integrations/opencode/__tests__/.
cd amphimixis-integrations/opencode
bun test