Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions skill-src/webcmd-adapter-author/SKILL.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -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鈥檚 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`.
Expand Down Expand Up @@ -284,4 +286,8 @@ 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-20: 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.
-->
8 changes: 8 additions & 0 deletions skill-src/webcmd-usage/SKILL.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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
Expand Down Expand Up @@ -274,6 +276,8 @@ Do not invoke these removed commands:
- Do not emit a large unfiltered registry into a bounded output or infer absence from a truncation warning; filter at the source and narrow until the result is complete.
- 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 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`.

<!-- @
## Learnings log
Expand All @@ -282,4 +286,8 @@ 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-20: Usage force-loaded `webcmd-browser` for raw browser work but not
`webcmd-adapter-author` for create/revise/override. Agents then skipped
site-memory and invented a sibling verify command.
-->
2 changes: 2 additions & 0 deletions skills/webcmd-adapter-author/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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鈥檚 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`.
Expand Down
4 changes: 4 additions & 0 deletions skills/webcmd-usage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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
Expand Down Expand Up @@ -274,3 +276,5 @@ Do not invoke these removed commands:
- Do not emit a large unfiltered registry into a bounded output or infer absence from a truncation warning; filter at the source and narrow until the result is complete.
- 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 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`.
4 changes: 4 additions & 0 deletions src/skills.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ describe('webcmd skills content', () => {
'utf8',
);
expect(usage).toMatch(/existing adapter command first[\s\S]{0,220}load `webcmd-browser`[\s\S]{0,120}root `--session <session-id>`/i);
expect(usage).toContain('Before creating, revising, or privately overriding a command, load `webcmd-adapter-author`');
expect(usage).toContain('Do not invent a sibling verify command');
expect(author).toContain("args['note-id']");
expect(author).toContain('Do not add a second command whose name ends in verify');
expect(browser).toMatch(/`tabs`, `bind --page`, `snapshot`, and `run`/i);
expect(browser).toContain('webcmd --session <session-id> browser tabs');
expect(browser).toContain('webcmd --session <session-id> browser bind --page');
Expand Down
Loading