Prompt-native workflow programming

AAPS

Prompt is All You Need.

AAPS is a project oriented and prompt-native programming language and visual studio for turning prompts into structured, verifiable pipelines.

npm install -g @lazyingart/aaps

Install Path

Install AAPS from npm

AAPS is published as a scoped npm package so one install can provide the parser, compiler/planner, CLI runner, and local Studio server. Release publishing is configured for GitHub Actions Trusted Publishing, so npm accepts the release workflow through OIDC.

  • CLI binary: `aaps`.
  • Local webapp: `aaps studio --host 127.0.0.1 --port 8796`.
  • Parser/compiler: `aaps parse`, `aaps compile`, `aaps plan`, `aaps check`, and `aaps validate`.
  • Runtime: `aaps run`, `aaps run-block`, readiness checks, and compile prompts.
  • License: Apache-2.0 for research, commercial use, and company-backed development.
  • Publisher: GitHub `lachlanchen/AAPS`, workflow `npm-publish.yml`.
npm install -g @lazyingart/aaps
aaps studio --host 127.0.0.1 --port 8796
aaps parse workflows/main.aaps --project .
aaps compile workflows/main.aaps --project . --mode check
aaps check workflows/main.aaps --project .
aaps run workflows/main.aaps --project . --json

AAPS Studio

Visual editing plus chat-directed changes

The Studio webapp is separate from this landing page. It opens on a Project tab for topic workspaces, then Blocks for reusable skills, then Programs for source editing. Projects can be created from a starter template with reusable blocks, scripts, tools, agents, environments, and a main workflow. Backend settings keep Codex as the default agentic wrapper while allowing DeepSeek v4 pro when configured locally. It now keeps chat in a fixed bottom dock available on every tab, with the transcript tucked behind a History button and colored user/AAPS messages. It supports project file actions, script browsing, block inspection, block-level chat, inline/external code editing, environment/tool/agent registry browsing, typed ports, artifacts, validations, recovery policies, human review markers, tree visualization, loops, conditions, functional blocks, block readiness, compile reports, setup prompts, and JSON IR preview.

Launch Studio

Prompt-Native

Prompts are first-class code blocks with agents, inputs, outputs, checks, and retry rules.

Resumable

Every task has a name and dependency edge, so runtimes can pause, resume, and audit work.

Routed

Choose methods explicitly with skill, action, method, guard, loop, and condition blocks.

Project-Native

Manage many block, skill, workflow, draft, archive, artifact, and run files through one manifest.

Executable

Run shell or Python actions, validate artifacts, retry, fall back, and emit repair reports.

The Language

Readable scripts for agent pipelines

AAPS abstracts the common loop from agentic app builders, writing systems, biomedical analysis tools, and report generators: inspect, route, act, verify, summarize, and publish.

  • Define agents, reusable skills, tasks, methods, guards, and actions.
  • Use `import` and `include` to connect project-root relative block and skill files.
  • Connect tasks with `after`, branch with `if`, and iterate with `for_each`.
  • Mix natural-language prompts, typed artifacts, executable actions, and QC gates.
  • Compile to JSON IR, execution plans, run logs, or Markdown runbooks.
pipeline "Ship AAPS Studio" {
  subtitle "Prompt Is All You Need"
  domain "biology"
  goal "Segment images, QC masks, and quantify objects."

  agent vision_scientist {
    role "Route between deterministic tools and vision models."
    model "gpt-5"
    tools "image_viewer, cellpose, thresholding"
  }

  skill segment_image {
    input image: image
    output mask: image
    exec python_script "scripts/threshold_segment.py"
    choose method_router {
      prompt "Choose cellpose, thresholding, or vision_mask."
    }
    guard qc_gate {
      verify "Mask boundaries and object counts are plausible."
    }
  }
}

AAPS Projects

One manifest for many workflow files

Real agentic work is rarely one script. AAPS projects use `aaps.project.json` to track reusable blocks, skills, modules, subworkflows, main programs, drafts, archives, data folders, artifact roots, run databases, variables, tools, models, agents, environment registries, and project notes.

  • Keep paths project-root relative for clean publishing and reproducible runs.
  • Mark a default main `.aaps` and an active working `.aaps`.
  • Validate manifest files, parse every indexed workflow, and resolve imports.
  • Open `.aaps`, script, environment, tool registry, and agent registry files from Studio.
{
  "schema": "aaps_project/0.1",
  "name": "Organoid Analysis Project",
  "defaultMain": "workflows/main.aaps",
  "activeFile": "workflows/main.aaps",
  "artifactRoot": "artifacts",
  "runDatabase": "runs/organoid-aaps-runs.jsonl",
  "tools": ["threshold_segmentation"],
  "agents": ["codex_repair_agent"],
  "files": {
    "blocks": ["blocks/qc_image.aaps"],
    "skills": ["skills/microscopy_qc.aaps"],
    "workflows": ["workflows/main.aaps"]
  }
}

Runtime

Readable workflows that can actually run

AAPS now separates parse, compile, plan, and execute. The compiler resolves missing blocks, scripts, tools, agents, dependencies, setup prompts, and provenance before the runtime builds an execution plan. The first runtime executes shell, Python, inline Python, Node, npm, agent-prompt, noop, and manual steps, writes stdout/stderr logs, checks artifacts, validates JSON/non-empty files and masks, retries failures, runs fallback commands or fallback blocks, and creates repair/setup prompts when recovery is needed.

  • Generate `aaps_plan/0.1` from the same parser used by Studio.
  • Run `aaps compile` in check, suggest, apply, interactive, or force mode.
  • Write `block_readiness.json`, `tool_resolution.json`, and `agent_compile_plan.json`.
  • Resolve project imports and expose missing or circular dependency diagnostics.
  • Execute `for_each list_files(...)` loops for folder-level image pipelines.
  • Record `resolved_workflow.json`, `execution_plan.json`, `run.json`, events, logs, artifacts, repair notes, and reports.
  • Run workflows, dry-runs, or selected blocks from CLI or Studio.
task qc_image {
	  environment python = "python3"
	  requires_files "scripts/qc.py"
	  compile_agent "codex_repair_agent"
	  retry 1
	  repair true
  exec python_script "scripts/qc.py"
  arg output_json = "${run.artifacts}/qc.json"
  validate exists "${run.artifacts}/qc.json"
  validate json "${run.artifacts}/qc.json"
  fallback "run: python3 scripts/basic_qc.py"
}

Organoid Demo

Generate a folder of synthetic PGM images, loop through every image, run QC, threshold masks, quantify objects, and export combined CSV/JSON/Markdown reports.

App Check

Scan a project folder, produce JSON structure metrics, and route findings into review notes.

Book Pipeline

Organize outline, draft, consistency, revision, and human approval blocks across a multi-file project.

CLI

Use `aaps parse`, `aaps plan`, `aaps check`, `aaps check-block`, `aaps run`, `aaps run-block`, and `aaps validate` outside the browser.

Deploy Target

Hosted at aaps.lazying.art

The repository ships with GitHub Pages deployment from `website/`, a custom domain file, and a Studio artifact copied to `/studio/` during deployment.