prism

package module
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Prism

Prism logo

Prism keeps an AI editor or MCP host in charge while offloading narrow work to local or self-hosted specialist models. Every Prism binary contains the matching agents, skills, constitutions, references, scripts, and evals; a source checkout is not required at runtime.

Install and verify

Install a release binary, then inspect its compiled identity:

prism version
prism version --json
prism agent list
prism agent constitution kubectl

Release builds report the GitHub tag as both the Prism and bundle version. The bundle digest is a deterministic SHA-256 of every embedded asset. Local builds report devel+<commit>[.dirty]. Explicit --agent-dir or --skills-dir overrides are development mode and receive a digest calculated from the overridden content.

Prism uses Ollama by default at http://127.0.0.1:11434; SGLang, vLLM, and other OpenAI-compatible endpoints can be selected with PRISM_MODEL_RUNTIME_* settings.

Install into an agent host

prism install                         # interactive selection and preview
prism install --project --all --yes  # all bundled content in this project
prism install --global --all --yes  # all bundled content for every host
prism install --global --target codex --skill gh-pr-triage --specialist github-cli --yes
prism install --target copilot --skill gh-pr-triage --specialist github-cli
prism install --dry-run --all
prism install status
prism uninstall

Supported targets are Codex, VS Code/GitHub Copilot, Antigravity, Claude Code, and OpenCode. Skills are installed once into the universal .agents/skills location and linked into host-specific directories when needed; --copy disables links. Prism generates native specialist wrappers that delegate to the run_agent MCP tool, keeping the compiled constitution, model choice, tools, and policy inside Prism.

Each scope has .prism/install.json. Reinstall replaces only Prism-managed paths, removes stale managed files, preserves unrelated files, and refuses unmanaged collisions unless --force is supplied. Configuration files receive .prism-backup backups, and an adapter failure rolls back the transaction.

prism instructions install remains available as a compatibility command.

MCP

Host configurations generated by prism install invoke only:

{
  "command": "/absolute/path/to/prism",
  "args": ["mcp", "serve"]
}

prism mcp serve does not require a repository. Prism assets come from the binary. Repository-aware work selects a workspace for each call:

{
  "agent_id": "github-cli",
  "skill_names": ["gh-pr-triage"],
  "task": "Summarize PR #42 CI status",
  "workspace": {
    "root": "/absolute/path/to/repository"
  }
}

Workspace resolution order is explicit workspace.root, one root advertised by the MCP host, then server-level --root. Multiple advertised roots require an explicit selection. Operations that do not need repository access work without a workspace. Local roots are canonicalized and repository plugins receive only a filesystem rooted at the selected directory.

Core MCP tools include list_agents, run_agent, get_constitution, doctor, suggest_route, run_graph, explain_policy, list_policies, get_usage_summary, and get_skill_health. Bundle provenance is stamped automatically; clients do not send bundle IDs or versions.

Direct CLI use

prism config doctor
prism route suggest --task "Investigate deployment checkout-api in namespace staging"
echo "Summarize PR #42 CI status" | prism run github-cli --skills gh-pr-triage

Direct CLI commands use the current directory when workspace access is needed. --root is an optional workspace fallback, not the location of Prism itself.

See usage documentation, model runtime configuration, and the agent and skill authoring guides.

Built-in specialists

Specialist Focus
github-cli Pull request and Actions triage
kubectl Kubernetes diagnostics
linear Linear issue and project workflows
argo Argo CD and workflow failures
web-docs-search Documentation and release research
go-helper Small Go helpers
go-scaffold Package and test scaffolding
frontend-builder Vanilla web UI subtasks

Development

go test ./...
go build -o prism ./cmd/prism
./prism version --json

Release builds inject the tag with:

go build -ldflags "-X github.com/bryanbarton525/prism/internal/buildinfo.Version=v1.2.3" ./cmd/prism

Documentation

Overview

Package prism exposes the immutable agent bundle compiled into the Prism binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleDigest

func BundleDigest() string

BundleDigest returns a deterministic SHA-256 over every embedded file. Paths and lengths are included so different directory layouts cannot collide.

func BundleFS

func BundleFS() fs.FS

BundleFS returns the embedded filesystem rooted at the module root.

func DigestFS

func DigestFS(fsys fs.FS) string

DigestFS calculates the same deterministic identity for a development override filesystem.

func DigestParts

func DigestParts(parts map[string]fs.FS) string

DigestParts deterministically hashes named filesystem trees. Development builds use it to identify the exact agent and skill overrides in effect.

Types

type BundleFile

type BundleFile struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
}

type BundleManifest

type BundleManifest struct {
	Digest string       `json:"digest"`
	Files  []BundleFile `json:"files"`
}

func Manifest

func Manifest() BundleManifest

Manifest returns the generated inventory of the exact files compiled into this binary. It is generated from the immutable embed.FS, so it cannot drift from the release artifact it describes.

Directories

Path Synopsis
cmd
prism command
Command prism is the entry point for the Prism CLI.
Command prism is the entry point for the Prism CLI.
internal
agent
Package agent loads and validates Prism agent specifications.
Package agent loads and validates Prism agent specifications.
app
Package app provides the shared AgentRunner used by both the CLI and MCP adapters.
Package app provides the shared AgentRunner used by both the CLI and MCP adapters.
buildinfo
Package buildinfo centralizes release and VCS identity for the CLI and MCP server.
Package buildinfo centralizes release and VCS identity for the CLI and MCP server.
cli
Package cli provides Cobra command handlers for the Prism CLI.
Package cli provides Cobra command handlers for the Prism CLI.
config
Package config centralizes Prism runtime configuration.
Package config centralizes Prism runtime configuration.
github
Package github provides an fs.FS implementation backed by the GitHub Contents API, plus a URL parser for github.com repository URLs.
Package github provides an fs.FS implementation backed by the GitHub Contents API, plus a URL parser for github.com repository URLs.
llm
mcp
Package mcp provides the MCP server adapter for Prism.
Package mcp provides the MCP server adapter for Prism.
ollama
Package ollama provides a minimal Ollama REST client for Prism.
Package ollama provides a minimal Ollama REST client for Prism.
result
Package result defines the normalized output envelope for all Prism agents.
Package result defines the normalized output envelope for all Prism agents.
rootresolver
Package rootresolver resolves the --root flag value to an fs.FS and a cleanup function.
Package rootresolver resolves the --root flag value to an fs.FS and a cleanup function.
skill
Package skill loads and validates Prism Agent Skills from SKILL.md files.
Package skill loads and validates Prism Agent Skills from SKILL.md files.
textutil
Package textutil provides shared, UTF-8-safe text bounding helpers used by plugins, the downstream MCP client, and result/prompt shaping.
Package textutil provides shared, UTF-8-safe text bounding helpers used by plugins, the downstream MCP client, and result/prompt shaping.
pkg
evidence
Package evidence defines bounded runtime evidence contracts.
Package evidence defines bounded runtime evidence contracts.
graph
Package graph defines bounded Prism workflow graph contracts.
Package graph defines bounded Prism workflow graph contracts.
observe
Package observe defines stable run-event contracts for Prism integrations.
Package observe defines stable run-event contracts for Prism integrations.
policy
Package policy defines stable Prism governance contracts.
Package policy defines stable Prism governance contracts.
report
Package report exposes Prism benchmark reports for external integrations.
Package report exposes Prism benchmark reports for external integrations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL