From 68591f6eff5345216964e153d41a753c4ccbcc78 Mon Sep 17 00:00:00 2001 From: ayushsingh82 Date: Fri, 21 Aug 2026 17:57:57 +0530 Subject: [PATCH] skills: force-load adapter-author when creating a command webcmd-usage force-loaded webcmd-browser for raw browser work but had no equivalent for authoring. Agents that discovered browser init on their own then skipped the durable authoring surfaces: they hand-wrote notes next to the adapter instead of using site-memory commands, and invented a sibling *_verify command instead of running webcmd verify / webcmd browser verify. - webcmd-usage now requires loading webcmd-adapter-author before creating, revising, or privately overriding a command, mirroring the existing browser-work requirement. - Added Do-Not lines in both skills against hand-written notes and sibling verify commands. - webcmd-adapter-author now documents that CLI flags map onto args by the declared name (e.g. args['note-id']), not a camelCase alias. Fixes #386 --- skill-src/webcmd-adapter-author/SKILL.src.md | 7 +++++++ skill-src/webcmd-usage/SKILL.src.md | 8 ++++++++ skills/webcmd-adapter-author/SKILL.md | 2 ++ skills/webcmd-usage/SKILL.md | 4 ++++ src/skills.test.ts | 4 ++++ 5 files changed, 25 insertions(+) diff --git a/skill-src/webcmd-adapter-author/SKILL.src.md b/skill-src/webcmd-adapter-author/SKILL.src.md index e6dc1df3..fe857854 100644 --- a/skill-src/webcmd-adapter-author/SKILL.src.md +++ b/skill-src/webcmd-adapter-author/SKILL.src.md @@ -257,6 +257,8 @@ Check these off step by step: - Adapters import only `@agentrhq/webcmd/registry` and `@agentrhq/webcmd/errors`; do not add third-party dependencies. - Browser-run’s Playwright-style `page` and adapter `func(page,args)` are different contracts. Preserve evidence and behavior, not syntax. Implement adapters with the existing `IPage`, pipeline, Node-fetch, or interceptor APIs. - The `columns` array and `func` return object keys must match exactly, including order. +- CLI flags map onto `args` by the declared `name`. `{ name: 'note-id' }` is `args['note-id']`, not `args.noteId`. A `type: 'boolean'` flag is `true` when passed. Do not grep the framework for camelCase aliases. +- Verification is `webcmd browser verify` / `webcmd verify`. Do not add a second command whose name ends in verify. - **Intermediate parsing object keys must not overlap any `columns` entry.** Otherwise silent-column-drop audits can misread the adapter. Use dedicated internal names and destructure with aliases when pushing rows. - **The `browser:` field determines the `func` signature:** `browser:false -> (args)`, `browser:true -> (page, args)`. If this is reversed, `args` may actually be a debug flag and all external parameters can silently fall back to defaults. - Throw the correct typed error for known failures according to [`references/typed-errors.md`](./references/typed-errors.md). **Do not** silently `return []`, **do not** silently `return [{sentinel}]`, and **do not** silently clamp external parameters with `Math.max/min`. @@ -284,4 +286,9 @@ Author-only. Stripped by litprompt, so it costs the running agent nothing. Append one dated line whenever a correction lands, or whenever an approach is tried and rejected. Record what was tried and why it failed, not just what won. + +- 2026-08-21: Agents skipped this skill, wrote notes next to the adapter, and + invented a sibling verify command. Usage now force-loads this skill for + create/revise/override. Args keys match declared `name`, not Commander camelCase (#386). --> + diff --git a/skill-src/webcmd-usage/SKILL.src.md b/skill-src/webcmd-usage/SKILL.src.md index d30ba0ac..d721e36f 100644 --- a/skill-src/webcmd-usage/SKILL.src.md +++ b/skill-src/webcmd-usage/SKILL.src.md @@ -41,6 +41,8 @@ Do not install Node.js or silently fall back to `npx`. **REQUIRED SUB-SKILL:** Before raw browser work, load `webcmd-browser`. +**REQUIRED SUB-SKILL:** Before creating, revising, or privately overriding a command, load `webcmd-adapter-author`. + ## Install ```bash @@ -282,6 +284,8 @@ Do not invoke these removed commands: - Do not assume every adapter needs a browser; check `strategy`. - Do not silently fall back from a failing adapter to hand-rolled `fetch`; use `--trace retain-on-failure` first. - Do not treat a raw 403 or challenge from a direct fetch as a browser gate; run `webcmd web fetch --url ` first. +- Do not store authoring notes in a hand-written file next to the adapter; use the site-memory commands (`webcmd site note`, `webcmd site endpoint`, `webcmd site field-map`). +- Do not invent a sibling verify command; use `webcmd verify` or `webcmd browser verify`.