# © 2026 Evntx FZCO, Dubai, UAE. All rights reserved.

# AANCER packs — instructions for a coding assistant

You are helping a developer build an **AANCER pack**: one signed file (`.ancpack`) with items an AANCER installation
imports. The developer never changes AANCER itself. Read this page first; the details are in the books in this folder.

## Tool

The developer has `aancer-pack` on their PATH (one program, no runtime needed). Commands:

```
aancer-pack init <kind> [dir] [--id <pack id>] [--publisher <name>]   kinds: skill, agent-blueprint, template, theme, dashboard, hook, app, bundle
aancer-pack login --target <url> [--email <address>]                 password: prompt, or AANCER_PASSWORD
aancer-pack dev [dir] --target <url> [--params <file.json>] [--watch] [--trust-key-on-target]
aancer-pack lint <pack.ancpack | manifest.json [contentDir]> [--json]
aancer-pack keygen --out <file>
aancer-pack sign <manifest.json> [contentDir] -o <out.ancpack> --key <private.pem>
aancer-pack verify <pack.ancpack> --pubkey <public.pem> [--publisher-pubkey <public.pem>]
aancer-pack inspect <pack.ancpack>
aancer-pack trust-key --print
aancer-pack telemetry status|project
aancer-pack --version
```

Exit codes: `0` ok · `2` invalid input or usage · `3` signature or verification refused · `4` not approved.

## How to work

1. Start from a scaffold: `aancer-pack init <kind>` writes the smallest pack of that kind that lints, signs and
   imports unchanged. Change it step by step; do not write a manifest from nothing.
2. After every change run `aancer-pack lint <dir>/manifest.json <dir>/content`. Each problem is printed as
   `<path>: <what to change>` — fix exactly that path. `--json` gives the same as data.
3. Try it on the developer's installation with `aancer-pack dev <dir> --target <url>` (`--watch` repeats on save).
   The installation answers errors with a code and the paths at fault; read them before changing anything else.
4. Never invent a field. When a field is not in the scaffold or in the pages below, say so and ask.

## Pack layout

```
<dir>/manifest.json        the pack: v 2, kind, id, version, title, publisher, parameters, items
<dir>/content/<file>.json  an item's spec, referenced as { "$ref": "content/<file>.json" }
<dir>/content/<asset>      woff2 / png / svg / jpg / ico only
```

A manifest:

```json
{
  "v": 2, "kind": "bundle", "id": "acme.identity", "version": "1.0.0", "title": "Acme identity",
  "publisher": { "name": "Acme GmbH", "keyId": "acme-2026" },
  "parameters": [ { "id": "target_workspace", "type": "workspace", "label": "Workspace", "required": true } ],
  "items": [
    { "kind": "theme", "schemaVersion": 1, "id": "acme-theme", "scope": "install",
      "spec": { "platformName": "Acme AI", "primaryColor": "#1f5c4d", "secondaryColor": "#1d4ed8", "defaultTheme": "light" } },
    { "kind": "link", "schemaVersion": 1, "id": "intranet-hr", "scope": "workspace", "workspace": "{{param.target_workspace}}",
      "spec": { "label": "HR intranet", "url": "https://intranet.acme.example/hr", "group": "Operations", "order": 90 } }
  ]
}
```

## Hard rules (the installation refuses a pack that breaks one)

- Pack id: `^[a-z0-9][a-z0-9._-]{2,63}$`. Version: strict semantic version (`1.2.3`, `1.2.3-rc.1`).
- Every file in the pack is named by an item (`$ref`) or listed as an asset; any other file is refused as unsigned.
- Assets: `woff2`, `png`, `svg`, `jpg`, `ico`; at most 4 MiB each, 32 MiB per pack, 256 items per pack.
- Theme image addresses are relative (the installation serves them); locale values are plain text.
- `publisher.keyId` is the key id `keygen` printed; the installation trusts the pack only when its administrator
  added that public key under Extensions → Trust keys with the same id.
- Never put a private key, a password or a secret into a pack or into the repository. `dev` keeps the developer key
  in `~/.aancer/dev-signing.key`; a publisher key from `keygen` stays with the publisher.

## Where the details are (files in this folder)

| Need | File |
|---|---|
| step by step: the setup, the development loop, the first pack, every kind of extension | `AANCER-Developer-Guide-EN.md` (German: `AANCER-Entwicklerhandbuch-DE.md`) |
| every field, limit and error code: packs, skills, workflow templates, agents, dashboards, hooks, themes, embedded apps, connectors, the API | `AANCER-Developer-Reference-EN.md` |
| the smallest working pack of every kind (made by `aancer-pack init`) | `examples/<kind>/` |
| a complete embedded app with sign-in hand-off | `examples/app-code-handover/` |

The same books as PDF are beside them, for people. Search the Markdown files; they are the same text.
