argImmutable arguments
Required Unicode string parameters are supplied explicitly by the caller.
arg.audience = researchersXML PROMPT PROJECT MANAGER · v1.2.1
Create a project, or discover an existing project and workspace from xmlsquish.toml; format sources, resolve locked dependencies, compile cacheable binary XSIR, optimize and link, then publish .prompt, reproducible .pack, or relocatable .sopack.
Rust 2024 · Project-level incremental builds · Human / Short / NDJSON
xs:argpersona.xmlexpand + argtasks.xmlimport + call<xs:expand ref="demo:persona">
<xs:arg name="audience" value="researchers"/>
</xs:expand>
<xs:expand ref="demo:task"/>ir/agent/site-demo/*.xsirlinked targetagent.promptagent.psdbgnew generates a canonical project in an absent directory; then declare targets in xmlsquish.toml while add / remove update dependencies transactionally.
Compile each XML module to canonical binary XSIR; the content-addressed cache reuses unchanged pure transformations.
Link the frozen module graph and instantiate the entry, atomically publishing .prompt plus .xsir and self-contained .psdbg companions selected by --emit.
v1.1.0 · AGENT SKILLS
Declare local or Git skills in the workspace-root manifest, pin their complete trees in the lockfile, and safely reconcile copies into .agents/skills. The bundled prompt-squish guide installs with one command, too.
Read the Agent Skills guidexmlsquish.toml [skills]
↓ declare
xmlsquish.lock [[skill]] + BLAKE3
↓ sync-skills
.agents/skills/ review-checks/
$ xmlsquish install-skill --projectSHOW, DON'T JUST MINIFY
Switch among the manifest, entry source, binary XSIR summary, linked target, final .prompt, and .psdbg. The example command runs from the repository root.
JavaScript is disabled: both argument sets and all sources and outputs are shown below.
arg.audience = researchers, explicitly passed by the caller.
arg.audience = everyone, explicitly passed by the caller.
manifest-version = 1
[package]
name = "site-demo"
version = "1.0.0"
source-root = "."
[target.agent]
entry = "agent.xml"<xs:entry xmlns:xs="https://xmlsquish.moesegfault.dev/ns" xmlns:demo="https://example.com/macros/demo">
<xs:import src="persona.xml"/>
<xs:import src="tasks.xml"/>
<prompt>
<xs:expand ref="demo:persona"><xs:arg name="audience" value="researchers"/></xs:expand>
<xs:expand ref="demo:task"/>
</prompt>
</xs:entry>XSIR/1 canonical binary module set
target/xmlsquish/artifacts/ir/agent/site-demo/agent.xsir 2535 bytes blake3:8571019ad9b88ee5
target/xmlsquish/artifacts/ir/agent/site-demo/persona.xsir 2425 bytes blake3:f0fb1883049c3f43
target/xmlsquish/artifacts/ir/agent/site-demo/tasks.xsir 1664 bytes blake3:2ec94ab1ea5f9300target site-demo:agent
compile 3 modules → middle-end optimize → link → instantiate → backend → publish<prompt> <Persona> <audience> researchers </audience> <voice> clear & kind </voice> </Persona> <task> Explain the trade-offs. </task> </prompt>PSDBG/1 self-contained debug companion
target/xmlsquish/artifacts/agent.psdbg 9600 bytes blake3:de19134660fcbefbmanifest-version = 1
[package]
name = "site-demo"
version = "1.0.0"
source-root = "."
[target.agent]
entry = "agent.xml"<xs:entry xmlns:xs="https://xmlsquish.moesegfault.dev/ns" xmlns:demo="https://example.com/macros/demo">
<xs:import src="persona.xml"/>
<xs:import src="tasks.xml"/>
<prompt>
<xs:expand ref="demo:persona"><xs:arg name="audience" value="everyone"/></xs:expand>
<xs:expand ref="demo:task"/>
</prompt>
</xs:entry>XSIR/1 canonical binary module set
target/xmlsquish/artifacts/ir/agent/site-demo/agent.xsir 2529 bytes blake3:fbf198aaf0936012
target/xmlsquish/artifacts/ir/agent/site-demo/persona.xsir 2425 bytes blake3:f0fb1883049c3f43
target/xmlsquish/artifacts/ir/agent/site-demo/tasks.xsir 1664 bytes blake3:2ec94ab1ea5f9300target site-demo:agent
compile 3 modules → middle-end optimize → link → instantiate → backend → publish<prompt> <Persona> <audience> everyone </audience> <voice> clear & kind </voice> </Persona> <task> Explain the trade-offs. </task> </prompt>PSDBG/1 self-contained debug companion
target/xmlsquish/artifacts/agent.psdbg 9591 bytes blake3:b85d179e2ae77002The data records the current manager artifact contract. The browser only presents it; binary XSIR is never passed off as XML.
EXPLICIT CONTEXT. LOCAL STATE.
SourceUnits are frozen by canonical URI. Every invocation creates a new expansion frame; only explicit arguments and fills cross the boundary.
xs:argExplicit argument enters a fresh frameRelative src and file.* bind to the definition site, not the caller. Arguments are never inherited; every declared parameter must be explicitly supplied.
argRequired Unicode string parameters are supplied explicitly by the caller.
arg.audience = researchersfileuri / dir / name describe the source that defines the current macro.
file.name = persona.xmlmatchNamed captures live inside an ifr block; outer bindings return when it exits.
match.head · match.tailslot / fillXML node sequences remain separate from scalar arguments, with no implicit string conversion.
<xs:slot name="body"/>SMALL LANGUAGE. USEFUL BOUNDARIES.
Modules contain macro definitions. A separate entry imports modules and constructs the prompt; expand recursively produces macro return values.
<xs:import src="persona.xml"/>
<xs:expand ref="demo:persona">
<xs:arg name="audience" value="researchers"/>
</xs:expand>ifr matches scalar strings with lexically scoped named captures. The complete source closure is loaded and validated before execution, including unselected branches.
<xs:ifr get="file.name" pattern="^tasks[.]xml$">
<task>Explain the trade-offs.</task>
</xs:ifr>insert emits arg.*, file.*, or match.* as XML-escaped text, never reinterpreting it as markup or macros.
<answer><xs:insert get="arg.text"/></answer>
<!-- arg.text is text, never markup. -->FROM SOURCE TO YOUR WORKFLOW
new, fmt, build, add, remove, and inspect share one manager and event protocol. New creates projects; build keeps independent work moving and publishes successful targets atomically.
new requires an absent destination; it is distinct from init for existing directories. Other commands discover xmlsquish.toml upward or accept --manifest-path.
Install from the current workspace source (Rust 1.88+) ↗terminal / xmlsquish# Install from the current workspace source (Rust 1.88+)
cargo install --git https://github.com/kleedaisuki/prompt-squish --locked# Create a canonical project in an absent directory
xmlsquish new hello-prompts# Format project sources; --check only reports
xmlsquish fmt --check --manifest-path hello-prompts/xmlsquish.toml# Build prompt, XSIR, and debug companion
xmlsquish build --offline --manifest-path hello-prompts/xmlsquish.toml# Add a dependency and update manifest plus lockfile
xmlsquish add prompt-kit@^1 --registry default --dry-run# Remove a direct dependency alias
xmlsquish remove prompt-kit --dry-run# Inspect typed IR, links, sources, cache, or artifacts
xmlsquish inspect link agent --manifest-path examples/site-demo/xmlsquish.toml# NDJSON events for CI and tools
xmlsquish --message-format=json build --manifest-path examples/site-demo/xmlsquish.tomlHuman offers progress and summaries; Short is line-oriented and grep-friendly; --message-format=json emits versioned, sequenced newline-delimited JSON (NDJSON). --plain is undecorated and append-only.
{"version":{"major":3,"minor":0},"sequence":0,"payload":{"type":"planning_started"}}
{"version":{"major":3,"minor":0},"sequence":1,"payload":{"type":"action_succeeded","data":{"kind":"compile","cache":"persistent"}}}
{"version":{"major":3,"minor":0},"sequence":2,"payload":{"type":"job_finished","data":{"status":"success"}}}MEASURE THE RIGHT TRANSFORMATION
The plan separates scan, compile, link, instantiate, backend, and publish. Only deterministic pure transformations enter the persistent action cache.
xmlsquish.toml*.xsiragent.promptCounts describe the demo project structure. They do not pretend binary XSIR is text or equate a cache hit with end-to-end speed; final bytes exclude BOM.
THE FINE PRINT, UP FRONT.
Build trusted sources and dependencies only: the frontend can read local and resolved package sources. Macros cannot read environment values, time, or launch subprocesses, and insert does not prevent prompt injection. --locked / --offline / --frozen control resolution; they are not a filesystem sandbox.
Read the full semantics and boundaries ↗The frontend preserves XML semantics; canonical binary XSIR is reusable across targets; the linker resolves imports and relocations; the publisher commits only a complete .prompt / .psdbg generation. Cache state is disposable, never authoritative project state.
project → resolve → XML → binary XSIR → link → .prompt + .psdbgDSL specification ↗v1.2 · DISTRIBUTION
.promptBuild compact prompts from entries. Keep the existing workflow without rewriting every entry for packaging.
For invocation →02 · PACK.packDeliver prompts, code and static assets together. Original asset bytes, reproducible ZIP products.
For delivery →03 · SOPACK.sopackShare IR, modules, macros and assets—not final products. Immutable libraries relocate across devices.
For reuse →Telemetry is off by default. Opt-in evidence stays in project metadata, outside reproducible products.