awd-skill 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +324 -3
  2. package/bin/install.js +756 -0
  3. package/commands/awd-skill-assets.md +25 -0
  4. package/commands/awd-skill-backend.md +12 -0
  5. package/commands/awd-skill-content.md +12 -0
  6. package/commands/awd-skill-deploy.md +12 -0
  7. package/commands/awd-skill-design.md +12 -0
  8. package/commands/awd-skill-frontend.md +12 -0
  9. package/commands/awd-skill-growth.md +12 -0
  10. package/commands/awd-skill-launch.md +12 -0
  11. package/commands/awd-skill-list.md +12 -0
  12. package/commands/awd-skill-mode-e.md +18 -0
  13. package/commands/awd-skill-mode-f.md +16 -0
  14. package/commands/awd-skill-motion.md +12 -0
  15. package/commands/awd-skill-qa.md +12 -0
  16. package/commands/awd-skill-research.md +12 -0
  17. package/commands/awd-skill-strategy.md +12 -0
  18. package/commands/awd-skill-taste.md +18 -0
  19. package/commands/awd-skill-template-submit.md +16 -0
  20. package/commands/awd-skill-template-use.md +15 -0
  21. package/commands/awd-skill.md +11 -0
  22. package/docs/EXAMPLES.md +124 -0
  23. package/docs/INSTALL.md +203 -0
  24. package/docs/LICENSING.md +150 -0
  25. package/docs/PRODUCTION.md +921 -0
  26. package/docs/TEMPLATES.md +105 -0
  27. package/docs/VISUAL-GATES.md +131 -0
  28. package/docs/animotion/AGENTIC-MODE.md +537 -0
  29. package/docs/animotion/API-REFERENCE.md +2457 -0
  30. package/docs/animotion/DECLARATIVE-ATTRIBUTES.md +8563 -0
  31. package/docs/animotion/EFFECTS-PLAYBOOK.md +377 -0
  32. package/docs/animotion/IMPERATIVE-API.md +9056 -0
  33. package/docs/design-editor-plan.md +259 -0
  34. package/docs/generative-ai-canvas-plan.md +144 -0
  35. package/docs/target-state-plan.md +466 -0
  36. package/package.json +68 -4
@@ -0,0 +1,203 @@
1
+ # Installing awd-skill
2
+
3
+ The skill installs into **15 AI coding agents**. The installer writes each agent's own file format (`SKILL.md`, `skill.md`, a rules file, or `CONVENTIONS.md`) with the right frontmatter, plus the department playbooks, reference playbooks and templates alongside it. For **opencode** and **Claude Code** it also installs the **slash commands** (`/awd-skill`, every `/awd-skill-<name>` and the derived `/awd-<name>` aliases, including `/awd-template-use` and `/awd-mode-f`) globally.
4
+
5
+ > **The npm package contains only the installer, slash commands and these docs** — never the skill source or the credits proxy. The installer fetches the skill payload from a *skill source* you configure (see [Skill source](#skill-source)).
6
+
7
+ ## Quick start
8
+
9
+ ```bash
10
+ # auto-detect your agent (opencode -> claude -> any detected agent)
11
+ npx awd-skill install
12
+
13
+ # target one agent by key, optionally saving your key during install
14
+ npx awd-skill install --agent=claude --license-key=YOUR_KEY
15
+
16
+ # install for every supported agent at once
17
+ npx awd-skill install --all
18
+
19
+ # see what's installed, and where
20
+ npx awd-skill detect
21
+ ```
22
+
23
+ Then **restart your AI agent** so it loads the skill.
24
+
25
+ > **License: the skill is free** — no key, no entry validation, install and run. There is **one paid plan**: **$25/month**, `id: "template"`, checkout `https://skills.animotion.click/checkout?plan=template`. It covers template use, Mode E/F, mandatory AnimotionJS motion, the editor APIs/UI, design tools/resources and **400 AI credits/month**. The Asset Builder is **free-lane only**: client brand files, hand-drawn SVG/procedural, Crucible local 3D stills, and your own agent-native AI models — no credits, no balance, no proxy. Pass `--license-key=…` (or `--admin-email` / `--admin-secret`) at install time to wire the credential up front. Details: **[LICENSING.md](LICENSING.md)**.
26
+
27
+ > **One skill, one plan, one editor account.** This npm package is the shipped **skill** — free, runs in your AI agent. With the $25/month plan you can use the **AWD Editor's** (`awd-editor/`) APIs/UI with your own account: sign in via `POST /api/auth/login` at `http://127.0.0.1:4310` (local) or `https://editor.animotion.click/` (deployed), and the origin sets the `awd_session` cookie used by editor requests. No bridge service, bearer token or second subscription. See **[target-state-plan.md](target-state-plan.md)**.
28
+
29
+ ### All flags
30
+
31
+ | Flag | Effect |
32
+ |---|---|
33
+ | `--agent=<key>` | Install for one agent (keys in the table below) |
34
+ | `--agent=all` / `--all` | Install for all 15 agents |
35
+ | `--source=<url\|path>` | Skill source: a `.tar.gz`/`.zip` URL, or a local skill folder/archive |
36
+ | `--token=<key>` | Auth token for a private source (else `AWD_TOKEN`) |
37
+ | `--license-key=<key>` | Save your $25/month plan key (`id: "template"`) to the installed skill (`animotion-config.json`, read by the one-plan gate — not needed to use the skill) |
38
+ | `--admin-email=<e>` `--admin-secret=<s>` | Admin credentials instead of a key (staff/whitelisted, unmetered — both required) |
39
+ | `--force` | Overwrite an existing install |
40
+ | `--dry-run` | Print the target paths without writing anything |
41
+ | `--dir=<path>` | Install flat into `<path>/awd-skill/` (SKILL.md layout) |
42
+ | `--home=<path>` | Use `<path>` as the home directory (for testing) |
43
+ | `--no-commands` | Skip installing the slash commands (opencode + claude) |
44
+
45
+ ## Slash commands (opencode + Claude Code)
46
+
47
+ Alongside the skill, the installer writes the command files to the agent's global command directory:
48
+
49
+ | Agent | Command directory |
50
+ |---|---|
51
+ | opencode | `~/.config/opencode/command/` (or `~/.opencode/command/`) |
52
+ | Claude Code | `~/.claude/commands/` |
53
+
54
+ Commands installed (**37 files — 19 sources**: `awd-skill.md` + 18 `/awd-skill-*` files, plus the router's `/awd-*` aliases derived by stripping the `awd-skill-` prefix):
55
+
56
+ | Command | Does |
57
+ |---|---|
58
+ | `/awd-skill` | Router — straight to Strategy (or the department named in the arguments); no entry gate |
59
+ | `/awd-skill-strategy` … `-growth` | Enter one of the 11 departments by full name |
60
+ | `/awd-strategy` … `/awd-growth` | The same 11 departments, short alias |
61
+ | `/awd-skill-taste` · `/awd-taste` | Taste training — build or refine the taste profile (works with or without a project; not a department) |
62
+ | `/awd-skill-assets` · `/awd-assets` | **Asset Builder** — image, audio, video and 3D in any mode: inventory → route → produce from a **free-lane source** (client brand file, hand-drawn SVG/procedural, Crucible local 3D still, or your own agent-native model) → ingest/QA → control-interaction brief. No credits, no balance, no top-ups |
63
+ | `/awd-skill-mode-e` · `/awd-mode-e` | **Mode E** — save the open project as a template, list the template library, or ingest a template-catalog copy-mode payload (browse signed-in/free; **using** validates the one $25/month plan first) |
64
+ | `/awd-skill-mode-e-<template-name>` · `/awd-mode-e-<template-name>` | **Mode E** — build a new project from a saved template (suffix form handled by the skill; no per-template file needed) |
65
+ | `/awd-skill-template-use` · `/awd-template-use` | **Template use** — validate the one plan before using any template, section, prompt, payload or link; `402 PLAN_REQUIRED` with `upgrade: /api/plan/checkout` when unmet |
66
+ | `/awd-skill-mode-f` · `/awd-mode-f` | **Mode F** — maintain & iterate a site this skill built (one $25/month plan) |
67
+
68
+ Departments: `strategy` · `research` · `content` · `design` · `frontend` · `backend` · `motion` · `qa` · `deploy` · `launch` · `growth` — plus the standalone taste trainer (`taste`), the Asset Builder (`assets`), Mode E (`mode-e`), template use (`template-use`), Mode F (`mode-f`) and the operator-only `template-submit`. Skip with `--no-commands`; refresh with `--force`. Agents other than opencode/claude still get the full skill — they just enter departments by asking ("use the Design department") instead of a slash command.
69
+
70
+ ## Skill source
71
+
72
+ Because the npm tarball ships no `awd-skill/` folder, the installer resolves the payload from the first available source, in this order:
73
+
74
+ 1. `--source=<url|path>` — explicit flag
75
+ 2. `AWD_SOURCE=<url|path>` — environment variable
76
+ 3. `awd-skill/` next to `bin/` — local development checkout (used automatically)
77
+ 4. `awd.source` in `package.json` — set by the package author before publishing
78
+
79
+ **URL sources** are downloaded and extracted (system `tar`; `.tar.gz` preferred, `.zip` works on Windows/macOS). The archive may be the repo root, a `awd-skill/` folder inside it, or anything containing `SKILL.md` within three levels.
80
+
81
+ **Private sources** need a token: `--token=<key>` or `AWD_TOKEN=<key>` (`GITHUB_TOKEN` is used automatically for github.com URLs):
82
+
83
+ ```bash
84
+ # private GitHub repo (tarball API)
85
+ npx awd-skill install --source=https://api.github.com/repos/YOU/private-skill/tarball/main --token=ghp_XXXX
86
+
87
+ # same, via environment (handy for CI or shell profiles)
88
+ export AWD_SOURCE=https://api.github.com/repos/YOU/private-skill/tarball/main
89
+ export AWD_TOKEN=ghp_XXXX
90
+ npx awd-skill install
91
+
92
+ # your own server / object storage
93
+ npx awd-skill install --source=https://your-server/skill.tar.gz
94
+
95
+ # local folder or archive (no network)
96
+ npx awd-skill install --source=~/backups/skill
97
+ ```
98
+
99
+ The package author normally sets `awd.source` in `package.json` once, so end users just run `npx awd-skill install` with no configuration.
100
+
101
+ ## Where each agent gets the skill
102
+
103
+ | Key | Agent | File written | Plus |
104
+ |---|---|---|---|
105
+ | `opencode` | OpenCode | `~/.config/opencode/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` + commands |
106
+ | `claude` | Claude Code | `~/.claude/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` + commands |
107
+ | `copilot` | GitHub Copilot | `%APPDATA%\github-copilot\skills\awd-skill\SKILL.md` | `references/`, `templates/`, `departments/` |
108
+ | `cursor` | Cursor | `~/.cursor/rules/awd-skill.mdc` | payload in `~/.cursor/skills/awd-skill/` |
109
+ | `windsurf` | Windsurf (Codeium) | `~/.codeium/windsurf/skills/awd-skill/skill.md` | `references/`, `templates/`, `departments/` |
110
+ | `cody` | Cody (Sourcegraph) | `~/.cody/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` |
111
+ | `codium` | Codium | `~/.codium/skills/awd-skill/skill.md` | `references/`, `templates/`, `departments/` |
112
+ | `aider` | Aider | `~/.aider/skills/CONVENTIONS.md` | payload in `~/.aider/skills/awd-skill/` |
113
+ | `continue` | Continue | `~/.continue/rules/awd-skill.md` | payload in `~/.continue/skills/awd-skill/` |
114
+ | `codex` | Codex (OpenAI) | `~/.codex/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` |
115
+ | `roo` | Roo Code | `~/.roo/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` |
116
+ | `cline` | Cline | `~/.cline/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` |
117
+ | `augment` | Augment | `~/.augment/rules/awd-skill.md` | payload in `~/.augment/skills/awd-skill/` |
118
+ | `amazonq` | Amazon Q | `~/.amazonq/rules/awd-skill.md` | payload in `~/.amazonq/skills/awd-skill/` |
119
+ | `jetbrains` | JetBrains AI | `~/.junie/skills/awd-skill/SKILL.md` | `references/`, `templates/`, `departments/` |
120
+
121
+ Notes:
122
+
123
+ - **Rules agents** (cursor, continue, augment, amazonq) receive the full skill body as a rules file with agent-specific frontmatter (`globs`, `alwaysApply`, `trigger`, …). The file starts with a pointer to the installed `references/` and `templates/` payload so the agent can read the playbooks on demand.
124
+ - **Aider** has no skill loader — it reads conventions files. The skill lands at `~/.aider/skills/CONVENTIONS.md`. Point Aider at it with `aider --read ~/.aider/skills/CONVENTIONS.md`, or copy that file into a project as `CONVENTIONS.md`. The installer never overwrites a `CONVENTIONS.md` it didn't write (unless you pass `--force`), so an existing conventions file from another skill is safe.
125
+ - Windows paths are shown with `~` for your user home; `%APPDATA%` is your Roaming app-data folder.
126
+
127
+ ## Manual install (no CLI)
128
+
129
+ Get the skill folder itself (the package doesn't contain it — take it from your configured source, or a copy someone sent you), then place the files as the table above says:
130
+
131
+ - **SKILL.md agents** — copy the `awd-skill/` folder to `<skills-dir>/awd-skill/` (it must contain `SKILL.md`, `references/`, `templates/`, `departments/`).
132
+ - **Windsurf / Codium** — same, but rename `SKILL.md` to `skill.md`.
133
+ - **Cursor** — copy `awd-skill/SKILL.md` to `~/.cursor/rules/awd-skill.mdc`, keep `references/` + `templates/` + `departments/` in `~/.cursor/skills/awd-skill/`.
134
+ - **Continue / Augment / Amazon Q** — copy `awd-skill/SKILL.md` to the agent's `rules/awd-skill.md` (paths in the table), payload alongside in `skills/awd-skill/`.
135
+ - **Aider** — copy `awd-skill/SKILL.md` (without its `---` frontmatter block) to `~/.aider/skills/CONVENTIONS.md`.
136
+ - **Slash commands (opencode + Claude Code)** — copy every file from the repo's `commands/` folder into `~/.config/opencode/command/` or `~/.claude/commands/`, then add `awd-<dept>.md` duplicates of each `awd-skill-<dept>.md` if you want the short aliases.
137
+
138
+ ## No local agent: Google AI Studio
139
+
140
+ AI Studio has no file system to install into — the skill runs there via paste + URL fetch instead:
141
+
142
+ 1. Paste the skill's `references/ai-studio-system-prompt.md` (the paste-ready contract — **not** the raw `SKILL.md`) into AI Studio's **System instructions**.
143
+ 2. Enable the **URL Context** tool — the skill uses it to fetch each reference file from `skills.animotion.click` (and to validate the one-plan key for paid uses; no env vars, no file attachments).
144
+ 3. Add your license key (or admin pair) to the System instructions — only needed for template use, Mode E/F, motion or editor tools — or paste it when a gate asks. Asset Builder sources are free and need no key.
145
+ 4. Build in **Canvas** as a single HTML file, then **Download the code** and deploy.
146
+
147
+ Step-by-step, GET license URL, reference URL patterns and session hygiene: the skill's `references/google-ai-studio.md`.
148
+
149
+ **Updates work differently here.** AI Studio is not an installer target: `npm publish` and `awd.source` update local agents only. The browser model reads whatever is deployed under `https://skills.animotion.click/api/skills/awd-skill/…`, so a release is live there only after that payload is deployed **and** the router is re-pasted. To check freshness, ask the model to fetch `references/ai-studio-system-prompt.md` and quote the `## ASSET BUILDER` heading — absent means the server still serves an older payload. Deploy procedure: [PRODUCTION.md § 3](./PRODUCTION.md).
150
+
151
+ **Asset work in AI Studio is free-lane only** — client brand files (as inputs), hand-drawn SVG/procedural art, and your own agent-native AI models. Crucible local 3D stills need a local machine (local Chrome) and are unavailable in a browser. No credits, no top-ups, no proxy. Unfilled slots are reported honestly, never substituted with a placeholder. Full limits: the skill's `references/google-ai-studio.md` → *Asset Builder in AI Studio*.
152
+
153
+ ## Asset setup (free lane) — and the editor's managed transport
154
+
155
+ The skill installs and builds with **no asset configuration at all**. Its Asset Builder uses four free sources and never spends credits: client **brand files** (inputs, never generated), **hand-drawn SVG/procedural**, **Crucible local 3D stills**, and **your own agent-native AI models**. No key, no generation proxy, no balance file.
156
+
157
+ `AWD_CREDITS_API_URL` is **not a skill setting**. It belongs only to the **AWD Editor's** internal managed generation lane: the legacy `server/credits/` proxy holds the `RENDERFUL_API_KEY` and meters the editor's managed-lane generation (admin uses the direct API lane, unmetered). The editor is covered by the **same one $25/month plan** (`id: "template"`, `https://skills.animotion.click/checkout?plan=template`), including **400 AI credits/month**, `1 credit = $0.05`, and monthly-first spend; admin/direct identities are unmetered. See [LICENSING.md](LICENSING.md) and [target-state-plan.md §7](target-state-plan.md). The skill does **not** use this proxy; editor access uses the user's own `awd_session` cookie, not a bearer token or bridge service.
158
+
159
+ Deploying/operating that proxy (Node ≥ 22.5, Stripe, Renderful, signed file URLs): `server/credits/README.md`; the full release + ops runbook is [PRODUCTION.md](./PRODUCTION.md).
160
+
161
+ ## Verify
162
+
163
+ ```bash
164
+ npx awd-skill detect
165
+ ```
166
+
167
+ `INSTALLED` next to an agent means the skill file and its payload are both in place. For opencode/claude it also shows the slash-command status (`cmds:` path, or `not installed`).
168
+
169
+ ## Uninstall
170
+
171
+ Delete what the table lists for your agent — the skill file **and** the `awd-skill/` payload folder. For opencode/claude, also delete the command files (`awd-skill*.md` and `awd-*.md`). For example:
172
+
173
+ ```bash
174
+ # opencode
175
+ rm -rf ~/.config/opencode/skills/awd-skill
176
+ rm -f ~/.config/opencode/command/awd-skill*.md ~/.config/opencode/command/awd-*.md
177
+
178
+ # claude
179
+ rm -rf ~/.claude/skills/awd-skill
180
+ rm -f ~/.claude/commands/awd-skill*.md ~/.claude/commands/awd-*.md
181
+
182
+ # cursor (rule file + payload)
183
+ rm -f ~/.cursor/rules/awd-skill.mdc
184
+ rm -rf ~/.cursor/skills/awd-skill
185
+ ```
186
+
187
+ ## Motion (built by the AnimotionJS agentic skill)
188
+
189
+ Every site built with this skill gets **all of its motion built by the AnimotionJS agentic skill** — site animation *and* 3D animation (camera paths, shader clocks, particles, ambient systems). The agent writes the motion brief and hands it over — it never writes animation code. Motion is mandatory and included in the **single $25/month plan** (`id: "template"`):
190
+
191
+ - AnimotionJS is bundled with the skill payload — no second install, no `agentic` tier command, no Studio key and no optional hand-built animation stack.
192
+ - The agent respects `prefers-reduced-motion` and the project's conversion goals on every build.
193
+ - Full toolkit and technique reference: `awd-skill/references/motion-toolkit.md`.
194
+
195
+ ## Repository vs npm package vs skill source
196
+
197
+ - **This Git repository** is docs-only (`README.md`, `docs/`). The installer (`bin/`), slash commands (`commands/`), the editor's managed-generation credits proxy (`server/credits/`) and release tooling (`scripts/`) stay on the release machine — they ship through npm and the private skill tarball, never through Git.
198
+ - **The npm package** contains the **installer** (`bin/install.js`), the slash commands (`commands/`) and the docs — never `awd-skill/` and never the credits proxy. Anything in a published tarball is publicly downloadable forever, so the private source stays out of it.
199
+ - **The skill source** lives wherever you say: [Skill source](#skill-source) (`--source`, `AWD_SOURCE`, or the author's `awd.source`).
200
+
201
+ ## Examples
202
+
203
+ Two full scenario walkthroughs — one per mode — are in [EXAMPLES.md](./EXAMPLES.md).
@@ -0,0 +1,150 @@
1
+ # Licensing — the free skill, one $25/month plan, and the AWD Editor
2
+
3
+ The **AWD skill itself is free** — no license key, no subscription, no verification before any department, mode, or stage. There is exactly **one paid plan**, and it is charged only for the features it unlocks. Its Asset Builder is **free-lane only** (no credits, no balance, no top-ups, no proxy).
4
+
5
+ > **One skill, one plan, one editor account.** This npm package is the shipped **skill** — free, runs in your own AI agent, and uses only the free-lane Asset Builder (client brand files, hand-drawn SVG/procedural, Crucible local 3D stills, and your own agent-native AI models). With the **$25/month plan** (`id: "template"`), skill users can also use the **AWD Editor's APIs/UI with their own account**: sign in with `POST /api/auth/login` at `http://127.0.0.1:4310` (local) or `https://editor.animotion.click/` (deployed); that origin sets the `awd_session` cookie. There is **no bridge service, no bearer token and no second subscription**. See [docs/target-state-plan.md](target-state-plan.md).
6
+
7
+ | What | Product | Price | When it's checked |
8
+ | --- | --- | --- | --- |
9
+ | **The skill** (all 11 departments, modes A–D) | Skill | **Free** | Never |
10
+ | **Free-lane Asset Builder** — brand files, SVG/procedural, Crucible stills, your own agent-native models | Skill | **Free** | Never — no credits, no balance, no proxy |
11
+ | Template **browsing** (catalog, item pages, copy buttons) | Editor | **Free** | Signed-in/free |
12
+ | **The one plan** — template **use** (`/awd-template-use`, Mode E, `template_project_create`, `POST /api/templates/:id/use`), Mode F, all AnimotionJS motion, editor APIs/UI, design tools/resources, anti-slop/taste resources, 400 AI credits/month | Skill + `awd-editor/` | **$25/month** (`id: "template"`) | Before any paid use; unmet → `402 PLAN_REQUIRED` with `upgrade: /api/plan/checkout` |
13
+
14
+ This guide covers the one plan, the free-lane assets, editor access, and credential setup. **Motion is mandatory and included** — all animation is the **AnimotionJS agentic skill's**; there is no optional or home-grown animation path.
15
+
16
+ ### The one plan and editor credits
17
+
18
+ The single **$25/month** plan (`id: "template"`) is bought at **https://skills.animotion.click/checkout?plan=template** (Stripe-backed). It grants **400 AI credits/month** across all editor AI tools, with `1 credit = $0.05` for generation. Monthly credits reset each billing period and **do not roll over**; optional top-ups never expire and monthly credits are spent first. `awd.design` Agent turns use `AWD_AGENT_CREDIT_USD=0.01` (5x faster, 2-credit floor) and settle against real usage. **Admin/direct identities are unmetered** and bypass both buckets.
19
+
20
+ Config names used by the editor are `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`, `STRIPE_PRICE_MONTHLY_25` (optional `AWD_PUBLIC_ORIGIN`/`APP_ORIGIN`); routes include `POST /api/plan/checkout`, wallet endpoints and the Stripe webhook. The LLM catalogue is env-driven (`AWD_LLM_MODELS`, plus `AWD_LLM_BASE_URL`/`AWD_LLM_API_KEY` for OpenAI-compatible providers or `RENDERFUL_API_KEY`/`RENDERFUL_BASE` for Renderful) — an empty catalogue fails closed. The legacy `server/credits/` proxy is the editor's internal managed transport; the skill does not use it. FreeLLMAPI is **admin-only** and is not a skill lane.
21
+
22
+ ## Paying for the one plan — $25/month
23
+
24
+ [![Get AWD — $25/month](https://img.shields.io/badge/Get_AWD-%2425%2Fmonth-6C2BD9)](https://skills.animotion.click/checkout?plan=template)
25
+
26
+ - **Mode E** (save any project as a template, build new projects from templates, or bring in items from the template catalog — any category, any copy mode) and **Mode F** (maintain an AWD-built site) require this plan.
27
+ - **`/awd-template-use`** validates the plan before using any template, section, prompt, pasted `AWD-COPY/1` payload, item link, `template_project_create` call or `POST /api/templates/:id/use` request. Browsing is signed-in/free; the gate runs **before** payload fetch, project creation, file writes or slot changes.
28
+ - If the plan is unmet, stop and return `{ "error": "Template use requires the $25/month plan (id: template).", "code": "PLAN_REQUIRED", "upgrade": "/api/plan/checkout" }` with HTTP-equivalent `402`; link `https://skills.animotion.click/checkout?plan=template`. Never improvise a free build or ask for a second product.
29
+ - The gate validates with `"plan": "template"`; a key for this one plan or admin credentials passes. **The departments are free** — never stack plans.
30
+ - Steps: enter your email → Stripe's hosted checkout (card payment) → copy `sec_live_…` from the confirmation page.
31
+
32
+ ## Motion — AnimotionJS, mandatory and included
33
+
34
+ All animation and interaction is handled strictly by the **AnimotionJS agentic skill** — hero reveals, scroll, hovers, counters, marquees, text FX, page transitions, video scrubbing, 3D animation. The agent writes the motion brief and hands it over; it never writes animation code. There is no free animation path and no build-it-yourself path: AnimotionJS is bundled with the skill and included in the **same $25/month plan**. No second install, license or stack (GSAP/Motion/Lenis hand-built by the agent) is allowed.
35
+
36
+ ## Asset Builder — free lane only
37
+
38
+ The skill's Asset Builder costs **nothing** and uses four free sources. There are no credits, no balance, no top-ups and no generation proxy in the skill.
39
+
40
+ | Source | How it works |
41
+ |---|---|
42
+ | Client **brand files** (`brand-input`) | Logo, brand photography, product shot the client owns — copied in as an **input**, never generated |
43
+ | **Hand-drawn SVG / procedural** (`svg-authored`) | Code-drawn vectors written directly |
44
+ | **Crucible** local 3D stills | Free local 3D stills (needs a local machine, unavailable in a browser) |
45
+ | **Your own agent-native AI models** | Models you already run in your own agent |
46
+
47
+ A short or unfilled slot is reported honestly — never a placeholder, a keep-demo asset or a skipped required slot. Full rules: the skill's `references/asset-builder.md`.
48
+
49
+ ### Where credits do apply — the AWD Editor on the same plan
50
+
51
+ Editor AI tools (`awd.generate`, the design agent, design tools/resources) spend from a **unified editor wallet**: the **$25/month** plan grants **400 AI credits/month** (reset each billing period, no rollover), plus optional non-expiring top-ups. Monthly credits are spent first, then top-ups; `1 credit = $0.05`, with Agent turns billed at `AWD_AGENT_CREDIT_USD=0.01` (5x faster, 2-credit floor). Admin sign-in uses the direct API lane for **all** tools and is **unmetered**, bypassing both buckets. This is documented authoritatively in [docs/target-state-plan.md](target-state-plan.md) §7.
52
+
53
+ To reach it from the skill, sign in with the user's own account via `POST /api/auth/login` on `http://127.0.0.1:4310` (local) or `https://editor.animotion.click/` (deployed); the origin sets an `awd_session` cookie that the skill sends with editor requests. No new bridge service, bearer token or second key is involved. The legacy `server/credits/` proxy is the editor's internal money transport for the managed lane; its endpoint contract and runbook live in [server/credits/README.md](../server/credits/README.md) and [docs/PRODUCTION.md](PRODUCTION.md), which must not be read as the plan/wallet rules. No plaintext admin secret is stored encrypted by the skill.
54
+
55
+ > **The Asset Builder is the only way to add assets to a project** — client brand files (`brand-input`), hand-drawn SVG (`svg-authored`), Crucible local 3D stills, and your own agent-native AI models. Never call another generator/API/MCP tool outside the Asset Builder's own stages, never use a user-supplied generation API key, and never use local Blender.
56
+
57
+ ## Install the skill files (no key needed)
58
+
59
+ The npm package ships the installer, slash commands and docs; the skill files install with **no license key** (Node 18+; opencode path shown):
60
+
61
+ ```bash
62
+ npx awd-skill install --agent=opencode
63
+
64
+ # or every detected agent at once:
65
+ npx awd-skill install --all
66
+ ```
67
+
68
+ `<your-agent>` is one of the 15 supported agents (`opencode`, `claude`, `copilot`, `cursor`, … — full list in [INSTALL.md](INSTALL.md)). The installer copies the skill payload from its configured skill source — nothing to pay for. Restart the agent afterwards so the skill loads.
69
+
70
+ > **Optional:** `--license-key=YOUR_KEY` saves your key into `animotion-config.json` at install time so the one-plan gate finds it without prompting. It does **not** unlock the skill — the skill is free, and the free-lane Asset Builder needs no key.
71
+
72
+ ## Add your license key (for the one paid plan)
73
+
74
+ Pick one — the gate looks for environment variables first, then the installer's config file, then asks you once.
75
+
76
+ **1. Install with your key (recommended — one command, everything wired)**
77
+
78
+ ```bash
79
+ npx awd-skill install --agent=<your-agent> --license-key=YOUR_KEY
80
+
81
+ # or install for every detected agent at once:
82
+ npx awd-skill install --all --license-key=YOUR_KEY
83
+ ```
84
+
85
+ With **admin credentials instead of a license key** (staff / whitelisted emails only):
86
+
87
+ ```bash
88
+ npx awd-skill install --agent=<your-agent> --admin-email=you@example.com --admin-secret=YOUR_ADMIN_SECRET
89
+ ```
90
+
91
+ **2. Environment variable**
92
+
93
+ ```bash
94
+ # bash / zsh — add to ~/.bashrc or ~/.zshrc
95
+ export AGENTIC_LICENSE_KEY="sec_live_xxxxxxxx"
96
+ ```
97
+
98
+ ```powershell
99
+ # PowerShell — persistent for your user (open a new terminal afterwards)
100
+ setx AGENTIC_LICENSE_KEY "sec_live_xxxxxxxx"
101
+ ```
102
+
103
+ `ANIMOTION_LICENSE_KEY` works as an alias for the one-plan gate.
104
+
105
+ **3. `animotion-config.json` by hand** — same file the installer writes. The gate reads it from the AWD skill directory, its parent (`~/.config/opencode/skills/` for opencode), `~/.animotion-skills/`, or the path in `AGENTIC_LICENSE_CONFIG`:
106
+
107
+ ```json
108
+ {
109
+ "tier": "template",
110
+ "requiredPlan": "template",
111
+ "plan": { "id": "template", "priceMonthlyUsd": 25, "checkout": "https://skills.animotion.click/checkout?plan=template" },
112
+ "authMethod": "license",
113
+ "licenseKey": "sec_live_xxxxxxxx"
114
+ }
115
+ ```
116
+
117
+ **4. Admin credentials via environment** (staff / whitelisted emails only) — env vars `AGENTIC_ADMIN_EMAIL` + `AGENTIC_ADMIN_SECRET`, or a config file with `"authMethod": "admin"` and `adminEmail` / `adminSecret` fields. These are plaintext; **never commit them**. Admin identities are unmetered and are not a skill lane.
118
+
119
+ **5. Ask in-session**
120
+
121
+ With nothing found, a gate asks once (via its question tool) — paste the key, it validates immediately and remembers it via the cache below.
122
+
123
+ ## What happens at runtime
124
+
125
+ - **Departments: nothing.** No key is needed for any department work — there is no entry gate.
126
+ - **Paid uses (template use, Mode E/F, motion, editor tools) — once per session, at most:** the gate calls
127
+ `POST https://skills.animotion.click/api/license/validate`
128
+ with `{ "licenseKey": "…", "skill": "awd-skill", "plan": "template" }` (or the admin-credential variant).
129
+ - Unmet plans return `402` with `code: "PLAN_REQUIRED"` and `upgrade: "/api/plan/checkout"`; no project, file or slot is changed.
130
+ - On success the verdict is cached at `~/.animotion-skills/cache/awd-skill-verdict.json` for **7 days** — later sessions in that window skip the network call.
131
+ - The server answers `valid: true` for keys on the one plan and whitelisted admins; `valid: false` carries a `reason` (invalid key, wrong plan, not whitelisted).
132
+ - **Motion:** bundled AnimotionJS agentic skill under the same plan — no second install or key.
133
+ - **Asset Builder: no key, no credits.** The four free sources need no credential, balance or top-up. Editor credits (400/month, admin/direct unmetered) belong to the same plan.
134
+
135
+ Point the gate at a local dev server with `AGENTIC_LICENSE_SERVER=http://localhost:5000` (defaults to `https://skills.animotion.click`).
136
+
137
+ ## Troubleshooting
138
+
139
+ | Symptom | Fix |
140
+ |---|---|
141
+ | A department asks for a license key | Wrong — the skill is free. There is no entry gate; only paid uses (template use, Mode E/F, motion, editor tools) need the one plan. |
142
+ | Mode E/F or template use rejected: plan below "template" | Expected — the **one $25/month plan** (`id: "template"`) is required: [upgrade at checkout](https://skills.animotion.click/checkout?plan=template). The departments themselves stay free. |
143
+ | `valid: false`, reason "Invalid license format" / "Invalid signature" | Wrong or truncated key — copy it again from the checkout confirmation page. |
144
+ | An asset slot cannot be filled | The skill has no credits or paid generation — use a free-lane source (brand file, SVG/procedural, Crucible still, or your own agent-native model). The agent reports the slot honestly rather than shipping a placeholder. Editor credit questions belong to the same one plan. |
145
+ | `valid: false`, reason "Email not whitelisted" | Admin path but the email isn't on the server whitelist — use a personal key instead. |
146
+ | `valid: false`, reason "Invalid admin secret" | `AGENTIC_ADMIN_SECRET` doesn't match the server's `ADMIN_SECRET`. |
147
+ | Gate keeps asking for the key | Verdict cache expired or unwritable — fix credentials, then run one validation; check `~/.animotion-skills/cache/` is writable. |
148
+ | "server unreachable, no cached verdict" | No network on first use — connect once; after that the 7-day cache covers offline paid work. |
149
+ | Changed or cancelled the subscription | Delete `~/.animotion-skills/cache/awd-skill-verdict.json` to force a re-check immediately. |
150
+ | Download of the skill files returns 401/403 | The skill is free — use `npx awd-skill install` (no key) instead of the license-server download URL. |