@botpress/adk-cli 1.19.0-beta.3 → 1.19.0-beta.5

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 (81) hide show
  1. package/assets/ui-dist/assets/{index-CSTz-oTK.js → index-B3b7PPgV.js} +4 -4
  2. package/{dist/index-DNqXHLNi-27nvpkee.js → assets/ui-dist/assets/index-BESZeTO5.js} +2 -2
  3. package/{dist/index-DAztRXeA-vr85xnxs.css → assets/ui-dist/assets/index-DIFGtVmI.css} +1 -1
  4. package/{dist/index-DfjXY3Oo-szsanhnt.js → assets/ui-dist/assets/index-a3ZL0_Jr.js} +2 -2
  5. package/assets/ui-dist/index.html +2 -2
  6. package/dist/{README-wjb7z7f0.md → README-824wa4jj.md} +1 -1
  7. package/dist/SKILL-75ym6tcj.md +257 -0
  8. package/dist/SKILL-chnwzmt1.md +548 -0
  9. package/dist/SKILL-d4bs53y3.md +244 -0
  10. package/dist/SKILL-h4b2f1n9.md +114 -0
  11. package/dist/SKILL-hbw5nt95.md +111 -0
  12. package/dist/actions-h7hxxvxr.md +823 -0
  13. package/dist/adk-build-emhwd0tg.md +39 -0
  14. package/dist/adk-debug-yrrdtpmb.md +23 -0
  15. package/dist/adk-dev-console-7z9rtjpy.md +17 -0
  16. package/dist/adk-document-ras6zzzh.md +68 -0
  17. package/dist/adk-eval-vx76dwq0.md +17 -0
  18. package/dist/adk-explain-fcsaw852.md +22 -0
  19. package/dist/adk-init-9kmxmbbe.md +30 -0
  20. package/dist/adk-ship-dybzn884.md +29 -0
  21. package/dist/adk-test-xq67savs.md +27 -0
  22. package/dist/adk-validate-1p4skv4m.md +31 -0
  23. package/dist/advanced-patterns-z86m9h1a.md +669 -0
  24. package/dist/agent-config-1aqvkrgf.md +450 -0
  25. package/dist/agent-steps-zj4c1n9t.md +115 -0
  26. package/dist/agent0-assets/skills/adk/SKILL.md +5 -5
  27. package/dist/agent0-assets/skills/adk/references/cli.md +265 -24
  28. package/dist/agent0-assets/skills/adk-debugger/SKILL.md +5 -5
  29. package/dist/agent0-assets/skills/adk-debugger/references/common-failures.md +1 -1
  30. package/dist/agent0-assets/skills/adk-debugger/references/debug-workflow.md +3 -3
  31. package/dist/agent0-assets/skills/adk-debugger/references/traces-and-logs.md +15 -7
  32. package/dist/assets-q7jt8r2q.md +237 -0
  33. package/dist/autonomous-execution-fymc12e5.md +747 -0
  34. package/dist/cli-c31e06yr.md +1334 -0
  35. package/dist/cli.js +963 -548
  36. package/dist/commands.json +24 -3
  37. package/dist/common-failures-ht29w2db.md +231 -0
  38. package/dist/component-registry-bbpw0see.md +43 -0
  39. package/dist/context-api-760cvh0h.md +461 -0
  40. package/dist/conversation-analysis-8ka4nrm4.md +420 -0
  41. package/dist/conversation-lifecycle-4seqqjc1.md +311 -0
  42. package/dist/conversations-gwfvxaee.md +1111 -0
  43. package/dist/custom-components-y5wdgpey.md +167 -0
  44. package/dist/debug-workflow-vz84q80v.md +239 -0
  45. package/dist/desk-k54ktvsd.md +852 -0
  46. package/dist/doc-standards-ck6ax2jd.md +124 -0
  47. package/dist/eval-format-7n9brja4.md +354 -0
  48. package/dist/evals-y1zcr1mc.md +11 -0
  49. package/dist/explain-config-1yaq3zzd.md +424 -0
  50. package/dist/files-dzt0wxn3.md +918 -0
  51. package/dist/{index-gqxgqnyz.html → index-3t354nbw.html} +2 -2
  52. package/dist/{index-CSTz-oTK-mdfh47r8.js → index-B3b7PPgV-zetkb01w.js} +4 -4
  53. package/{assets/ui-dist/assets/index-DNqXHLNi.js → dist/index-BESZeTO5-2rpmcefa.js} +2 -2
  54. package/{assets/ui-dist/assets/index-DAztRXeA.css → dist/index-DIFGtVmI-d4dhjg97.css} +1 -1
  55. package/{assets/ui-dist/assets/index-DfjXY3Oo.js → dist/index-a3ZL0_Jr-q145h35p.js} +2 -2
  56. package/dist/integration-actions-xang7tma.md +659 -0
  57. package/dist/integrations-k5ss07f4.md +266 -0
  58. package/dist/interfaces-6t0bpxs4.md +97 -0
  59. package/dist/knowledge-bases-20rg8p5c.md +456 -0
  60. package/dist/llm-debugging-76ng8rzm.md +209 -0
  61. package/dist/mcp-server-n1asyzhv.md +112 -0
  62. package/dist/messages-gkkg0b54.md +769 -0
  63. package/dist/model-configuration-f273kgd0.md +201 -0
  64. package/dist/multi-agent-dashboard-1mdfjdts.md +70 -0
  65. package/dist/pages-xn18xn73.md +273 -0
  66. package/dist/patterns-mistakes-5vb99dhf.md +469 -0
  67. package/dist/plugins-ttnx8f49.md +280 -0
  68. package/dist/tables-x45t36dd.md +1136 -0
  69. package/dist/tags-46td3qrg.md +516 -0
  70. package/dist/test-patterns-hj47w4nc.md +355 -0
  71. package/dist/testing-workflow-2vkp932f.md +225 -0
  72. package/dist/tools-wk7bq24z.md +581 -0
  73. package/dist/trace-summarization-hdyx1c2e.md +313 -0
  74. package/dist/traces-and-logs-f2kjfh19.md +203 -0
  75. package/dist/triggers-4j2cc86x.md +719 -0
  76. package/dist/ui-server-entry.js +977 -162
  77. package/dist/workflow-steps-mrdrf1c5.md +851 -0
  78. package/dist/workflows-gadx3s69.md +1408 -0
  79. package/dist/zai-agent-reference-e6644aad.md +454 -0
  80. package/dist/zai-complete-guide-mnna5d6f.md +1408 -0
  81. package/package.json +4 -4
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: adk-build
3
+ description: Interview the user about a new ADK primitive or feature, then build it
4
+ argument-hint: "[primitive] <description>"
5
+ ---
6
+
7
+ Load the `adk` skill, then build the requested target immediately.
8
+
9
+ The target can be a **single primitive** (one file under `src/`, e.g. an action called `calculate-discount`) or a **feature** — a piece of bot functionality that needs several primitives wired together (e.g. a checkout flow = workflow + actions + table). The user does not need to know which it is. Decide based on `$ARGUMENTS`:
10
+
11
+ - If the first token is a primitive type — `action`, `tool`, `workflow`, `convo`/`conversation`, `table`, `trigger`, `kb`/`knowledge` — and the description fits one file, build a single primitive.
12
+ - Otherwise treat the whole argument as a feature description and decompose it into the primitives needed.
13
+
14
+ If `$ARGUMENTS` is empty or only a primitive type with no description, ask what the user wants to build (in outcome terms).
15
+
16
+ ## Workflow
17
+
18
+ 1. **Read context first.** Read `agent.config.ts` for available integrations and models. Glob `src/` and skim 1–2 existing primitives in each directory you expect to touch, to match the project's naming, file structure, and import style.
19
+
20
+ **Conversation handlers — read every existing one.** Glob `src/conversations/*.ts` and read each file's `channel:` field, not just one or two of them. Build a map of `<file> → <channels>`. From that map:
21
+
22
+ - **Default rule: extend, do not add.** If any existing handler routes through a channel set that overlaps with what the new behavior needs (and `*` overlaps with everything; identical arrays overlap; arrays sharing any one channel overlap), the new behavior must be added to that existing handler — new turn, new tool wiring, new state field, whatever — *not* a new file. Two conversation handlers with overlapping channels both fire on the same message and produce ambiguous routing; this is the failure mode the user has hit before.
23
+ - **Only create a new file when channels are disjoint.** A new conversation file is justifiable when its channel set has zero overlap with every existing handler — e.g., a Slack-only handler when all existing handlers are `webchat.channel` only. State the disjointness explicitly in the plan (step 4).
24
+ - **Or when the user asked for one.** If the user explicitly requested a separate handler ("a dedicated triage conversation distinct from the main chat"), honor that — but still call out the channel overlap in the plan so they can confirm.
25
+ 2. **Interview only about *what*, never *how*.** Ask only outcome and behavior questions — what should this do, when should it happen from the user's perspective, what does success look like. Do not ask about schemas, return types, durability, retry policy, channel routing, storage shape, or *which primitives to use* — infer those from the description, existing primitives, and sensible defaults.
26
+
27
+ Examples of acceptable questions:
28
+ - "What should this do, in plain language?"
29
+ - "When should it kick in — what's the user-visible trigger?"
30
+ - "What does success look like when this is done?"
31
+ - "Should this finish on its own, or pause and wait for someone?"
32
+ - For a feature: "Is X part of this, or a separate thing?" — only when scope is genuinely ambiguous.
33
+
34
+ Ask 1–3 questions max, only when the description leaves a genuine outcome-level gap. If the description already conveys intent, skip the interview entirely.
35
+ 3. **Decompose (feature mode only).** From the outcome, identify the primitives needed and the directories they belong in (`src/workflows/`, `src/actions/`, `src/tables/`, etc.). State the decomposition explicitly in the plan — *"This needs a `checkout` workflow, a `process-payment` action, and an `orders` table because …"*.
36
+ 4. **Propose a plan.** List every file to create or modify (full path), the exports, and any dependencies (integrations to add, models needed, `agent.config.ts` edits). For features, also describe how the primitives wire together. **If the plan involves a new conversation file**, include a one-line "channel-overlap check" justifying the new file (channels disjoint from every existing handler, or explicit user request) — if you can't justify it, fold the change into an existing handler instead. Wait for approval if the plan is non-trivial or touches `agent.config.ts`.
37
+ 5. **Build it.** Write the files under the right `src/<dir>/` paths. Use `@botpress/runtime` imports. Match the conventions you read in step 1. For a feature, build the primitives in dependency order (table → action → workflow → conversation), so each file's imports resolve as it's written. For conversation behavior, edit the existing handler identified in step 1 — do not spawn a new one unless step 4's channel-overlap check explicitly justified it.
38
+ 6. **Validate — always.** Run `adk check --format json` after every build, no exceptions. If it reports errors or warnings, fix them in this same turn and re-run. Do not report the task done until the check passes.
39
+ 7. **Suggest next steps.** Offer `/adk-validate <name>` to confirm wiring (especially for a feature), `/adk-test <name>` to run it once, and `/adk-eval <name>` to pin its behavior with assertions.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: adk-debug
3
+ description: Debug ADK bot issues
4
+ argument-hint: "[error or problem description]"
5
+ ---
6
+
7
+ Load the `adk-debugger` and `adk` skills, then start debugging immediately.
8
+
9
+ If `$ARGUMENTS` is vague ("broken", "not working", "slow", "weird", or empty), don't ask "what's wrong?" — investigate first. Run `adk check --format json` and `adk logs error --format json`, then present what you found.
10
+
11
+ If `$ARGUMENTS` mentions a specific component ("the search tool", "my workflow"), go directly to traces filtered by that component.
12
+
13
+ If `$ARGUMENTS` contains a pasted error or stack trace, read the file at the referenced line number immediately.
14
+
15
+ ## Debug Workflow
16
+
17
+ 1. Run `adk check --format json` to rule out offline issues first.
18
+ 2. Reproduce with `adk chat --single "<relevant message>" --format json`.
19
+ 3. Read traces and logs: `adk logs error --format json`, `adk traces --format json`.
20
+ 4. Identify root cause using the debug workflow from the skill.
21
+ 5. Suggest a targeted fix.
22
+ 6. Verify the fix with another `adk chat` or `adk check`.
23
+ 7. Write a regression eval for the bug — load the `adk-evals` skill, generate the eval file using the reproduction message as the user turn and the verified behavior as assertions, save it to `evals/`, and run `adk evals <name>` to confirm it passes.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: adk-dev-console
3
+ description: Explain ADK Dev Console features, tabs, and UI concepts
4
+ argument-hint: "[UI concept, tab name, or question]"
5
+ ---
6
+
7
+ Load the `adk-dev-console` skill, then answer the user's question about **$ARGUMENTS** immediately.
8
+
9
+ Resolve shorthand: "agent steps" = the execution visualizer on the Chat page, "turns" = conversation exchanges in Agent Steps, "iterations" = autonomous loop steps, "traces" = the Observe > Traces page, "cp" / "panel" / "console" = the Dev Console itself.
10
+
11
+ If the user named a specific UI concept (e.g., "agent steps", "turns", "iterations"), look it up in the skill's references and explain what it is and what the user sees. A one-word or short topic is a conceptual question — give a clear definition and describe the visual, then stop.
12
+
13
+ If the user named a tab or page (e.g., "evals tab", "observe", "tables"), explain what that page shows, its layout, and key features.
14
+
15
+ If the user asks a broad question ("what is the dev console?", "what tabs are there?", or no arguments), give the quick reference from the SKILL.md — tab groups with their pages and purpose.
16
+
17
+ If the user asks "where do I find X?", name the tab group, page, and URL path.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: adk-document
3
+ description: Create, review, update, sync, or search project documentation for an ADK bot
4
+ argument-hint: "[action] [topic or doc-path]"
5
+ ---
6
+
7
+ Load the `adk-docs` skill for documentation standards and the `adk` skill for ADK context, then help with documentation immediately.
8
+
9
+ Parse `$ARGUMENTS` to determine the action. The first word is usually the action (but not always); everything after is the target.
10
+
11
+ ## Route by Action
12
+
13
+ ### create [topic]
14
+ E.g., `/adk-document create workflows`, `/adk-document create the checkout flow`
15
+
16
+ If the topic is a broad term ("workflows", "tools", "actions"), read `src/<relevant-dir>/` to enumerate the user's actual primitives first. Document *their specific implementations* — not generic concepts.
17
+
18
+ 1. **Research**: Find the user's ADK project (`agent.config.ts`), read relevant source files in `src/`, check existing docs in `./docs/` or `./guides/`.
19
+ 2. **Choose type**: Reference (400-500 lines), Conceptual (500-700), Comprehensive (600-800) — see doc-standards reference.
20
+ 3. **Write**: Every concept needs a working code example from the user's actual code. Include file paths for verification. Use clear headers for ripgrep searchability. No speculative Common Mistakes or Best Practices sections.
21
+ 4. **Save**: Ask where if unclear (common: `./docs/`, `./guides/`). Verify headers are searchable.
22
+
23
+ ### review [doc-path]
24
+ E.g., `/adk-document review docs/workflows.md`
25
+
26
+ Review the doc for technical accuracy, searchability, and completeness:
27
+ - **Code accuracy**: correct imports (`@botpress/runtime`), examples from actual code with file paths, no speculation
28
+ - **Searchability**: clear section headers, TOC present, keyword-rich section names
29
+ - **ADK-specific**: distinguishes ADK vs SDK primitives, messages vs events, channel-specific vs agnostic
30
+ - **Validation**: `Grep` for imports, check referenced files exist, flag speculative content
31
+
32
+ Report: Critical Issues → Searchability Issues → Speculative Content → Missing Verification → Recommendations.
33
+
34
+ ### update [doc-path] [what-changed]
35
+ E.g., `/adk-document update docs/workflows.md added new step type`
36
+
37
+ 1. Read the existing doc.
38
+ 2. Find what changed in the user's project code.
39
+ 3. Preserve existing structure, style, and TOC.
40
+ 4. Verify all code examples still work. Add new features with project code examples.
41
+ 5. Mark deprecations clearly. Update file path references.
42
+
43
+ ### sync [optional-doc-path]
44
+ E.g., `/adk-document sync`, `/adk-document sync docs/actions.md`
45
+
46
+ Check if docs are current with the code:
47
+ 1. Find API changes: new exports, deprecated features, changed signatures.
48
+ 2. Cross-reference: what's documented vs. what exists in `src/`.
49
+ 3. Verify: do documented code examples still match actual code?
50
+
51
+ Report: Undocumented Features → Deprecated Content → Broken Examples → Missing Patterns → Recommendations.
52
+ If gaps found, offer to fix them.
53
+
54
+ ### search [term]
55
+ E.g., `/adk-document search workflows`, `/adk-document search sendMessage`
56
+
57
+ 1. Find project docs: `Glob({ pattern: "./{docs,guides}/**/*.md" })`
58
+ 2. Search headers and content for the term.
59
+ 3. Return: which file, which section, key excerpt (not full dump), related docs.
60
+ 4. If not found in docs, search the project code, then suggest creating docs for the gap.
61
+
62
+ ## If No Action Specified
63
+
64
+ If `$ARGUMENTS` doesn't start with create/review/update/sync/search, infer the intent:
65
+ - Looks like a file path (contains `/` or `.md`) → **review** that file
66
+ - Looks like a search term → **search** for it
67
+ - Looks like a topic to document → **create** docs for it
68
+ - Looks like gibberish, ask the user a clarification question
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: adk-eval
3
+ description: Write, run, or debug evals for an ADK bot
4
+ argument-hint: "[what to test]"
5
+ ---
6
+
7
+ Load the `adk-evals` and `adk` skills, then help with evals immediately.
8
+
9
+ If `$ARGUMENTS` names a primitive or feature (e.g., "search", "checkout", "tickets"), check if evals already exist (`Glob({ pattern: "evals/**" })`). If found, ask: run them, debug them, or write a new one? If not found, search `src/` for related primitives, read the source code, and generate an eval tailored to that code with realistic assertions.
10
+
11
+ If `$ARGUMENTS` asks to run evals, run `adk evals` with appropriate flags.
12
+
13
+ If `$ARGUMENTS` mentions a failure ("failing", "broken", "wrong"), inspect the failing eval's traces and identify whether the issue is the eval's assertions or the bot's behavior.
14
+
15
+ If `$ARGUMENTS` is empty, check existing eval coverage (`Glob({ pattern: "evals/**" })`) and the user's primitives in `src/`, then suggest writing evals for untested primitives.
16
+
17
+ Follow the eval format, assertion types, and per-primitive testing patterns from the skill documentation.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: adk-explain
3
+ description: Explain an ADK bot's architecture, flow, and components
4
+ argument-hint: "[component or question about the bot]"
5
+ ---
6
+
7
+ Load the `adk` skill, then answer the user's question about **$ARGUMENTS** immediately.
8
+
9
+ Resolve shorthand first: "kbs" = knowledge bases, "convos" = conversations, "wf" = workflows, "int" = integrations, "config" = agent.config.ts.
10
+
11
+ If the user named a specific ADK concept or primitive, look it up in the `adk` skill's references and explain it. Match depth to the question — a one-word topic like "kbs" is a conceptual question: give a one-sentence explanation and a short code example from the references, then stop.
12
+
13
+ If the user is in an ADK project (check for `agent.config.ts`), also check whether their project uses the component they asked about. If it does, read the relevant source files in `src/` and explain *their specific setup* — not just the generic concept.
14
+
15
+ If the user asks a broad question ("explain my bot", "what does this do?", or no arguments):
16
+
17
+ 1. Run `adk status --format json`.
18
+ 2. Read `agent.config.ts` and relevant source files in `src/`.
19
+ 3. Identify the bot archetype (RAG assistant, support agent, ticket router, automation, etc.).
20
+ 4. Map the flow: channels → conversations → tools/actions → tables/KBs.
21
+ 5. Flag any issues (unconfigured integrations, missing models, hardcoded secrets).
22
+ 6. Follow the explanation patterns in **references/explain-config.md** from the `adk` skill.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: adk-init
3
+ description: Scaffold a new Botpress ADK project
4
+ argument-hint: "[project-name]"
5
+ ---
6
+
7
+ Help the user initialize a new Botpress ADK project.
8
+
9
+ First, load the `adk` skill for full ADK knowledge.
10
+
11
+ 1. If `$ARGUMENTS` contains a project name, use it. Otherwise ask.
12
+ 2. Ensure the user is logged in (`adk login --token "$BOTPRESS_TOKEN"` or `adk login`).
13
+ 3. Run `adk init <name> --yes --skip-link --template hello-world` to scaffold the project.
14
+ 4. Guide through linking with `adk link` and initial configuration.
15
+ 5. Verify the project starts cleanly: `adk check --format json`.
16
+
17
+ ## After Scaffolding
18
+
19
+ Don't just explain the project structure — ask what they want to build and guide next steps:
20
+
21
+ *"Your project is ready. What are you building?"*
22
+
23
+ - **Support agent** → suggest adding a conversation handler, ticket table, and relevant integrations (Slack, Linear, etc.)
24
+ - **Knowledge-base Q&A** → suggest creating a knowledge base in `src/knowledge/` and a search tool
25
+ - **Multi-channel bot** → suggest adding channel integrations (Slack, WhatsApp, Webchat) and a conversation handler
26
+ - **Automation** → suggest creating workflows and triggers
27
+
28
+ Then offer the relevant commands: `/adk-integration` to add services, `/adk-eval` to set up tests.
29
+
30
+ Follow all ADK CLI best practices from the skill documentation.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: adk-ship
3
+ description: Run pre-flight checks and deploy an ADK bot to production
4
+ ---
5
+
6
+ Load the `adk` skill, then run pre-flight checks before deploying.
7
+
8
+ This is a deploy-to-production command — treat it as destructive-by-default. Confirm with the user before running `adk deploy`, even when pre-flight is green. Never pass `--yes` to `adk deploy` unless the user has explicitly approved it in this turn.
9
+
10
+ ## Workflow
11
+
12
+ 1. **Pre-flight (run in parallel where possible):**
13
+ - `adk check --format json` — must pass with zero errors.
14
+ - `adk evals --format json` — must pass if any evals exist; if none exist, surface that as a warning and offer `/adk-eval` before shipping.
15
+ - `git status` — surface uncommitted changes; ask whether to ship the working tree as-is or commit first.
16
+ - `adk status --format json` — confirm the project is linked to the intended workspace and bot.
17
+ - Check `agent.config.ts` for unconfigured integrations (missing secrets, missing models). If any, block the ship and list them.
18
+
19
+ 2. **Summarize.** Show a tight pre-flight report: ✅ checks passed, ⚠️ warnings, ❌ blockers. Include the linked bot and a one-line diff summary if there are uncommitted changes.
20
+
21
+ 3. **Confirm.** Always ask before deploying — the original `/adk-ship` invocation is not consent. If there are blockers, stop and offer to fix each. Otherwise (warnings or fully green), ask: *"Ship to <bot>? (yes / no)"*.
22
+
23
+ 4. **Deploy.** Run `adk deploy`. Stream output. If `adk deploy` prompts for preflight approval, surface the prompt to the user — do not auto-approve.
24
+
25
+ 5. **Verify.** After deploy, run `adk status --format json` to confirm the deployed version. Report deployed version and any post-deploy warnings. Note: `adk chat` runs against the local dev bot, not the deployed one — do not use it as a production smoke test. Direct the user to the Dev Console for live verification.
26
+
27
+ 6. **Wrap up.** Link the user to the Dev Console if a URL is in the deploy output. If the ship fixed a bug, point the user at `/adk-eval` to capture a regression eval.
28
+
29
+ Always re-run pre-flight on every `/adk-ship` invocation. The filesystem may have changed between invocations (manual edits, `git pull`, codegen) and there is no reliable way to detect that from inside the conversation.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: adk-test
3
+ description: Invoke an ADK primitive end-to-end with realistic input to confirm it works
4
+ argument-hint: "[primitive name] [input]"
5
+ ---
6
+
7
+ Load the `adk` skill, then run the named primitive immediately.
8
+
9
+ This is exploratory, one-shot testing — *does it work right now?*. It is distinct from `/adk-eval`, which writes persistent assertion-based eval files. If the user wants assertions or coverage, route them there.
10
+
11
+ If `$ARGUMENTS` is empty, list the user's primitives and ask which to test.
12
+
13
+ ## Workflow
14
+
15
+ 1. **Locate and identify type.** Glob `src/**/<name>.ts`. The directory tells you the type (action / tool / workflow / conversation / table / trigger / knowledge base).
16
+ 2. **Build an invocation appropriate for the type.** If the user provided input after the primitive name, use it as-is; otherwise generate a realistic probe from the primitive's schema:
17
+ - **Tool / conversation handler / agent step:** `adk chat --single "<probe message that exercises this primitive>" --format json`. The probe should plausibly cause the LLM to call the tool / route to the handler.
18
+ - **Action:** invoke through `adk run .adk/scratch/test-<name>.ts` after writing a small disposable runner under `.adk/scratch/`, or via a chat probe that triggers a tool which calls the action. Prefer the runner when the action has a deterministic input shape.
19
+ - **Workflow:** trigger via the documented entry point (chat probe, action call, or trigger event).
20
+ - **Trigger:** simulate the source event the trigger subscribes to. If the event source is external, explain the limitation and fall back to invoking the trigger handler directly via `adk run`.
21
+ - **Table:** insert a sample row, run a representative query, then **delete the row** before reporting. Tag the test row with a recognizable marker (e.g., a `__test_<timestamp>` value in a string column) so the cleanup query is unambiguous. If the project is linked to a shared or production workspace, ask the user before inserting at all — offer to scope the test to a local dev table instead.
22
+ - **Knowledge base:** run a search query against it.
23
+ 3. **Run it and read traces.** Capture the response. Run `adk traces --format json` filtered to the most recent invocation if the response alone is not enough to judge correctness.
24
+ 4. **Report.** Show the input used, the output, latency, and any errors or surprising behavior. Be explicit if the trace shows the primitive was *not* exercised (e.g., the LLM ignored the tool).
25
+ 5. **Suggest follow-ups.** If the test surfaced something worth pinning down, offer `/adk-eval <name>` to capture it as a regression eval. If it failed, offer `/adk-debug` with the relevant context.
26
+
27
+ Clean up any disposable runner scripts under `.adk/scratch/test-*.ts` after the test unless the user asks to keep them.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: adk-validate
3
+ description: Validate an ADK primitive or a feature (a set of related primitives)
4
+ argument-hint: "[primitive or feature name]"
5
+ ---
6
+
7
+ Load the `adk` skill, then validate the named target immediately.
8
+
9
+ The target can be either a **single primitive** (one file under `src/`, e.g. a tool called `search` or a workflow called `checkout`) or a **feature** — a piece of bot functionality spread across multiple primitives (e.g. "checkout" implemented as `src/workflows/checkout.ts` + `src/actions/process-payment.ts` + `src/tables/orders.ts`). Resolve which one before validating.
10
+
11
+ This is the proactive counterpart to `/adk-debug`: nothing is necessarily broken — confirm the target is correctly defined and wired up. If `$ARGUMENTS` is empty, list the user's primitives (Glob `src/**/*.ts` excluding `utils/`) and ask which one to validate.
12
+
13
+ ## Workflow
14
+
15
+ 1. **Run baseline checks first, in parallel.** TypeScript type check (the project's `typecheck` / `type-check` script in `package.json` if defined, otherwise `tsc --noEmit`) and `adk check --format json`. Capture both outputs. If either fails project-wide for reasons unrelated to the named primitive, surface that up front — the primitive's own issues are noise until the project compiles.
16
+ 2. **Resolve the target — primitive or feature.** Try in this order:
17
+ - **Exact primitive match.** Glob `src/**/<name>.ts`. If exactly one file matches, that's the target.
18
+ - **Multiple primitive matches.** List them with their types (action / tool / workflow / etc.) and ask which one — or whether the user wants to validate the whole set as a feature.
19
+ - **No exact match — treat as a feature.** Search the codebase for the term: file names, exported symbols, string literals, and comments under `src/`. Present the candidate set ("Found these files that look like the *<name>* feature: …") and confirm with the user before proceeding. If nothing plausible turns up, suggest the closest exact filename hits and stop.
20
+ 3. **Read each file in the target set.** Identify the type of each from its directory.
21
+ 4. **Filter the baseline output.** From the type-check and `adk check` output captured in step 1, pull out diagnostics that mention any name or file path in the target set.
22
+ 5. **Static checks** (read the sources and verify):
23
+ - Imports come from `@botpress/runtime` (not the SDK).
24
+ - Each primitive is exported in the shape the ADK expects for its type (see references in the `adk` skill).
25
+ - Zod / schema definitions cover all inputs and outputs the code uses.
26
+ - Any referenced integration is installed (`adk list --format json`) and configured in `agent.config.ts`.
27
+ - Any referenced model is available in the project's model config.
28
+ - Any referenced sibling primitive (table, action, tool) actually exists in `src/`.
29
+ - **Feature-level only:** the primitives in the set actually wire together — e.g., the workflow's action calls resolve to existing actions, the table the workflow writes to matches the schema the action reads.
30
+ - No hardcoded secrets, tokens, or API keys.
31
+ 6. **Report.** Group findings as ❌ Errors → ⚠️ Warnings → ✅ Passed, with each finding tagged by file. For a feature target, also include a short "wiring" subsection that summarizes how the primitives connect. End with one line: *"Run `/adk-test <name>` to actually invoke it."* Do not apply fixes from this command — let the user decide which to take.