---
name: bashy-shapeware
description: Shape bashy apps in words from any vendor agent UI (Claude, ChatGPT, Gemini, IDE agents) through the bashy gateway MCP server - wish, preview, approve, undo. Use when a user wants to change how one of their apps or tools works, asks for a change to a shared app, wants the status or diff of a wish, or wants to connect an agent UI to their bashy gateway.
license: BSD-3-Clause
compatibility: Needs an MCP client with Streamable HTTP and OAuth 2.1 (PKCE), and the HTTPS origin of a bashy gateway. No local install is required; the optional connect script needs bashy and curl.
metadata:
  lifecycle: "wish -> preview -> approve -> undo"
  shape-tools: "shape_list shape_show shape_diff shape_wish shape_verify shape_preview shape_approve shape_undo"
  mcp-endpoint: "https://<gateway-origin>/mcp"
  source: "https://github.com/qiangli/bashy"
---

# bashy-shapeware - shape your apps in words, from any agent UI

Shapeware is software its user can reshape by asking. The user says in plain
words what should be different, an agent builds the change as an isolated
candidate, bashy checks the candidate against the app's contract, and the user
approves it for themselves. Other users keep their own version, and undo is
one step. This skill teaches an agent in any vendor UI to do that through one
MCP endpoint: the bashy gateway.

## What shaping is

- **wish** - the user's request in their own words. It produces an isolated
  candidate. Nothing the user runs has changed yet.
- **verify** - bashy runs the app's contract checks against the candidate. A
  failure is a verdict the user can read, never a silent pass.
- **preview** - the candidate gets its own preview that the requesting user
  can open. The live app is untouched.
- **approve** - the user approves; bashy verifies again and activates the
  candidate for that user only.
- **undo** - one step back to the previous version, for that user, always
  available.

The verbs are the same at every front door: the app's own console, the
`bashy shape` command, a member's MCP client, and a vendor agent UI on the
gateway.

## The typed shape tools

Reads run without an approval:

| Tool | What it returns |
|---|---|
| `shape_list` | the shapeable apps the caller can see, per host |
| `shape_show` | one candidate: status, files and check results |
| `shape_diff` | the unified diff of a candidate against its base |
| `shape_preview` | the isolated preview URL of a candidate |
| `shape_verify` | the verifier's verdict on a candidate |

Actions:

| Tool | Gate |
|---|---|
| `shape_wish` | admitted against the owner's budget; the request text is required |
| `shape_approve` | raises a digest-bound approval; only the owner can settle it |
| `shape_undo` | raises a digest-bound approval; only the owner can settle it |

Each tool takes the `host` and `app` it applies to. Take both from
`shape_list` or from the `hosts` tool; never guess them. On a shared app the
caller's tier comes from their membership: a member without shape scope may
still wish, and the wish lands on the owner's queue. The gateway records
which client made each call.

If `tools/list` on a gateway shows no `shape_*` tools, that gateway predates
them. The same verbs are then reached through the generic `run` tool with the
arguments `["shape", "<verb>", ...]`, under the same gates.

## The lifecycle to run

1. Find the app. Call `shape_list` and let the user pick, unless they already
   named the app and host.
2. Send the wish with `shape_wish`, in the user's words. Report the candidate
   id you get back. Do not rewrite the wish into your own feature name.
3. When the candidate is built, call `shape_verify`, then `shape_diff`, and
   tell the user what would change and whether the checks passed.
4. Call `shape_preview` and give the user the preview URL. Say plainly that
   the live app is unchanged until they approve.
5. Only after the user says yes, call `shape_approve`. The gateway answers
   with a pending approval that carries an `approval_id` and a `digest`.
   Show the user what the digest covers, then settle it with the `approve`
   tool using that `approval_id`, that `digest` and their decision.
6. If the user does not like the result, `shape_undo` restores their previous
   version through the same approval step.

A call that answers with the state `gated` is waiting for exactly that
approval. Read it back to the user and settle it; do not retry the call.

## Rules

- Never approve on your own initiative, and never settle a digest you did not
  show the user.
- A wish is the user's request, not your plan. Carry their words through.
- Read before you write: when a candidate id exists, look at `shape_show` and
  `shape_diff` before sending another wish.
- A refusal is an answer. Tell the user what was refused and why. Do not
  retry the same change through `run` or another tool.
- Never put a token, a password or an approval digest in a wish, a file or a
  chat message that leaves the session.

## Connect an agent UI

Every vendor connects to the same URL. The differences are configuration,
never code.

- MCP endpoint: `https://<gateway-origin>/mcp` (Streamable HTTP)
- Protected resource metadata (RFC 9728):
  `https://<gateway-origin>/.well-known/oauth-protected-resource`
- Authorization server metadata (RFC 8414):
  `https://<gateway-origin>/.well-known/oauth-authorization-server`
- OAuth 2.1 with PKCE and dynamic client registration; scopes `mcp:read` and
  `mcp:write`

| Agent UI | How to add the gateway |
|---|---|
| Claude (web, desktop, mobile) | add a custom connector with the MCP endpoint as its server URL, then complete the consent |
| ChatGPT (work plans) | add a remote MCP connector with the same URL in the workspace, complete the consent, then enable it in a chat |
| Gemini (personal account) | add a custom connected app with the same URL, complete the consent, then address it by its `@` name |
| IDE agents and other MCP clients | register the URL as a remote MCP server, or install this plugin and enter the gateway origin when asked |

After connecting, ask the agent "what hosts are reachable on my gateway?".
That is a read call to the `hosts` tool and needs no approval. Vendor settings
pages change; when a click path differs from a written guide, follow the
vendor's current page.

## Check a gateway before you connect

The `connect` script in the bashy repository (`examples/vendor-gateway`)
prints the step-by-step checklist per vendor and runs the round trip:

```sh
bashy --bashsharp connect.bsh checklist claude
BASHY_GATEWAY_TOKEN=... bashy --bashsharp connect.bsh probe https://<gateway-origin>
```

The same three checks by hand:

1. `GET /.well-known/oauth-protected-resource` answers 200 with JSON that
   names `resource` and `authorization_servers`.
2. `POST /mcp` with no token answers 401 with a `WWW-Authenticate: Bearer`
   challenge.
3. `POST /mcp` with a bearer token answers `initialize`, then `tools/list`
   with the gateway tools.

If step 1 or 2 fails, the agent UI cannot discover or start the sign-in, and
adding the connector will fail the same way.
