@buffcore/cli 0.8.42 → 0.8.44
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.
- package/CHANGELOG.md +26 -0
- package/dist/commands/design/references.d.ts +9 -0
- package/dist/commands/design/references.js +20 -1
- package/dist/commands/extension/places-approval.d.ts +1 -1
- package/dist/commands/prototype/comp-record.d.ts +27 -0
- package/dist/commands/prototype/comp-record.js +85 -0
- package/dist/commands/prototype/comp-words.d.ts +12 -0
- package/dist/commands/prototype/comp-words.js +24 -0
- package/dist/commands/prototype/comp.d.ts +26 -0
- package/dist/commands/prototype/comp.js +71 -0
- package/dist/commands/prototype/milestone-versions.d.ts +1 -1
- package/dist/commands/prototype/record-look-child.js +4 -1
- package/dist/commands/prototype/snapshot-command.js +1 -1
- package/dist/commands/prototype/snapshot-setup.d.ts +11 -0
- package/dist/commands/prototype/snapshot-setup.js +29 -5
- package/dist/commands/prototype/versions.d.ts +3 -3
- package/dist/commands/ui/agents-route.d.ts +2 -0
- package/dist/commands/ui/agents-route.js +8 -5
- package/dist/commands/ui/approval-authority.d.ts +1 -1
- package/dist/commands/ui/approve.js +7 -1
- package/dist/commands/ui/chat/approval-folders.d.ts +20 -0
- package/dist/commands/ui/chat/approval-folders.js +134 -0
- package/dist/commands/ui/chat/approval-text.d.ts +11 -0
- package/dist/commands/ui/chat/approval-text.js +69 -0
- package/dist/commands/ui/chat/approval-writes.d.ts +32 -0
- package/dist/commands/ui/chat/approval-writes.js +179 -0
- package/dist/commands/ui/chat/claude-permissions.d.ts +4 -4
- package/dist/commands/ui/chat/claude-permissions.js +32 -4
- package/dist/commands/ui/chat/codex-idle.d.ts +1 -0
- package/dist/commands/ui/chat/commit-limits.d.ts +36 -0
- package/dist/commands/ui/chat/commit-limits.js +164 -0
- package/dist/commands/ui/chat/fresh-critique.d.ts +28 -0
- package/dist/commands/ui/chat/fresh-critique.js +123 -0
- package/dist/commands/ui/chat/fresh-launch.d.ts +36 -0
- package/dist/commands/ui/chat/fresh-launch.js +125 -0
- package/dist/commands/ui/chat/fresh-prompts.d.ts +17 -0
- package/dist/commands/ui/chat/fresh-prompts.js +76 -0
- package/dist/commands/ui/chat/fresh-report.d.ts +8 -0
- package/dist/commands/ui/chat/fresh-report.js +36 -0
- package/dist/commands/ui/chat/fresh-routes.d.ts +3 -0
- package/dist/commands/ui/chat/fresh-routes.js +64 -0
- package/dist/commands/ui/chat/fresh-settings.d.ts +12 -0
- package/dist/commands/ui/chat/fresh-settings.js +66 -0
- package/dist/commands/ui/chat/fresh-store.d.ts +17 -0
- package/dist/commands/ui/chat/fresh-store.js +67 -0
- package/dist/commands/ui/chat/fresh.d.ts +31 -0
- package/dist/commands/ui/chat/fresh.en.d.ts +7 -0
- package/dist/commands/ui/chat/fresh.en.js +7 -0
- package/dist/commands/ui/chat/fresh.es.d.ts +7 -0
- package/dist/commands/ui/chat/fresh.es.js +7 -0
- package/dist/commands/ui/chat/fresh.js +118 -0
- package/dist/commands/ui/chat/gh-api-limits.d.ts +14 -0
- package/dist/commands/ui/chat/gh-api-limits.js +74 -0
- package/dist/commands/ui/chat/git-words.d.ts +10 -0
- package/dist/commands/ui/chat/git-words.js +26 -0
- package/dist/commands/ui/chat/host-launched.d.ts +11 -0
- package/dist/commands/ui/chat/host-launched.js +35 -0
- package/dist/commands/ui/chat/limit-mentions.d.ts +2 -2
- package/dist/commands/ui/chat/limit-mentions.js +36 -2
- package/dist/commands/ui/chat/limit-text.d.ts +15 -0
- package/dist/commands/ui/chat/limit-text.js +36 -0
- package/dist/commands/ui/chat/limits-hook.js +2 -2
- package/dist/commands/ui/chat/limits.d.ts +11 -9
- package/dist/commands/ui/chat/limits.en.d.ts +4 -0
- package/dist/commands/ui/chat/limits.en.js +4 -0
- package/dist/commands/ui/chat/limits.es.js +4 -0
- package/dist/commands/ui/chat/limits.js +67 -51
- package/dist/commands/ui/chat/parse-claude.js +7 -3
- package/dist/commands/ui/chat/permission-ask.js +3 -0
- package/dist/commands/ui/chat/planning-limits.js +26 -0
- package/dist/commands/ui/chat/publish-limits.d.ts +4 -0
- package/dist/commands/ui/chat/publish-limits.js +113 -0
- package/dist/commands/ui/chat/recorded-turn.js +3 -0
- package/dist/commands/ui/chat/stream.js +4 -1
- package/dist/commands/ui/chat/turn-guard.d.ts +10 -2
- package/dist/commands/ui/chat/turn-guard.js +20 -3
- package/dist/commands/ui/chat/turn-state.d.ts +5 -0
- package/dist/commands/ui/chat/turn.js +1 -0
- package/dist/commands/ui/comp-approval.d.ts +6 -0
- package/dist/commands/ui/comp-approval.js +42 -0
- package/dist/commands/ui/host.js +3 -0
- package/dist/commands/ui/index.d.ts +42 -0
- package/dist/commands/ui/index.js +32 -8
- package/dist/commands/ui/loop-approve.d.ts +4 -4
- package/dist/commands/ui/places-change.d.ts +1 -1
- package/dist/commands/ui/plan-structure.d.ts +3 -0
- package/dist/commands/ui/plan-structure.en.d.ts +3 -0
- package/dist/commands/ui/plan-structure.en.js +3 -0
- package/dist/commands/ui/plan-structure.es.d.ts +3 -0
- package/dist/commands/ui/plan-structure.es.js +3 -0
- package/dist/commands/ui/plan-structure.js +12 -4
- package/dist/commands/ui/prototype-comp-route.d.ts +7 -0
- package/dist/commands/ui/prototype-comp-route.js +109 -0
- package/dist/commands/ui/prototype-main.d.ts +2 -1
- package/dist/commands/ui/prototype-scenes-child.js +4 -1
- package/dist/commands/ui/prototype-snapshot-session.d.ts +1 -1
- package/dist/commands/ui/prototype-snapshot-session.js +3 -0
- package/dist/commands/ui/prototype-snapshot.d.ts +1 -1
- package/dist/commands/ui/routes.d.ts +8 -3
- package/dist/commands/ui/routes.js +3 -3
- package/dist/commands/ui/save-publish.js +3 -0
- package/dist/commands/ui/server-options.js +1 -0
- package/dist/commands/ui/server-request.js +5 -0
- package/dist/commands/ui/server.d.ts +14 -0
- package/dist/commands/ui/server.js +10 -3
- package/dist/commands/ui/structure-surface.d.ts +6 -0
- package/dist/commands/ui/structure-surface.js +94 -0
- package/dist/commands/ui/studio-routes.d.ts +1 -0
- package/dist/commands/ui/studio-routes.js +7 -1
- package/dist/commands/ui/studio-state.d.ts +7 -4
- package/dist/commands/ui/studio-versions.d.ts +3 -3
- package/dist/ui/page.js +98 -89
- package/docs/PROCESS.md +5 -0
- package/docs/PROTOTYPE.md +31 -0
- package/docs/WORKBENCH.md +11 -2
- package/package.json +11 -11
- package/skills/ape-critique/SKILL.md +9 -3
- package/skills/ape-design-system/SKILL.md +2 -1
- package/skills/ape-prototype/SKILL.md +5 -1
package/docs/PROCESS.md
CHANGED
|
@@ -70,6 +70,11 @@ notes name nested screens' owning sections and return targets, and the phone and
|
|
|
70
70
|
rules. Sign-in/out and denied paths name a return or safe next destination. The template starts
|
|
71
71
|
with Home and Settings, both main. Audience describes intent; existing access controls enforce it.
|
|
72
72
|
|
|
73
|
+
One header line before the table says which surface comes first: `Surface: desktop` or
|
|
74
|
+
`Surface: phone` (absent, desktop; Structure's **Which surface comes first?** writes it). The comp,
|
|
75
|
+
the snapshot and the critique judge that surface first: desktop at the product's frame
|
|
76
|
+
(`prototype.frame`, 1440 by 900 by default), phone at 390.
|
|
77
|
+
|
|
73
78
|
Ask again only when sections, audiences or screen ownership change. Existing products without
|
|
74
79
|
this file keep working: Structure is not started, with a draft to review before the next
|
|
75
80
|
affected prototype, never invented approval. The small plan reader validates the table;
|
package/docs/PROTOTYPE.md
CHANGED
|
@@ -101,6 +101,17 @@ window.name or sessionStorage; window heartbeat messages grant nothing. Every ne
|
|
|
101
101
|
the old proof immediately. Old, future or missing nonces and repeated or decreasing counters never renew a lease.
|
|
102
102
|
Hidden pauses heartbeats and the studio's deadlines; pagehide closes the port and clears the nonce, and unmount stops sending.
|
|
103
103
|
An expired preview offers the app's own tab while waiting for a late answer. A new studio attempt waits eleven seconds for hello.
|
|
104
|
+
In the studio's preview the studio drives the player over the same port. Before its reply the
|
|
105
|
+
home says it plays (`ape:prototype:player`); choosing a journey, Back, Next and a sample-data choice
|
|
106
|
+
then each send one `ape:prototype:show` message (the current navigation and nonce, and a journey
|
|
107
|
+
key with a step, or a data state; at most 512 characters, read strictly) to the document whose
|
|
108
|
+
hello passed, and the app replays its own journey or seed at once, with no reload. The app answers
|
|
109
|
+
with a fresh reply, from which the studio takes only the step caption. The studio keeps the latest
|
|
110
|
+
choice: when the app says hello again on the same frame (it reloaded itself after an edit), or a
|
|
111
|
+
choice was made while its port had gone stale, the new document gets that choice once it is alive.
|
|
112
|
+
An app that does not say it plays (an older app-shell) is reloaded at each choice instead. The
|
|
113
|
+
frame reloads only for a new address, language or mode, or a retry, and then opens at the
|
|
114
|
+
current choice.
|
|
104
115
|
No records, actions or credentials cross this connection; readiness grants no recording or approval right.
|
|
105
116
|
The iframe uses `allow-scripts allow-same-origin`, with no forms, popups, downloads or top navigation;
|
|
106
117
|
the app must have a different origin and authority (a scheme-only address change is refused, since
|
|
@@ -178,6 +189,26 @@ The template's Public Sans, Nunito and IBM Plex Mono fonts use the SIL Open Font
|
|
|
178
189
|
|
|
179
190
|
The person tells the agent what to change, today in Claude Code, later in the BuffApe dashboard's chat. The agent edits views, scenes, sample data or the theme, and the viewer reloads. Each round of changes is a commit.
|
|
180
191
|
|
|
192
|
+
## The comp
|
|
193
|
+
|
|
194
|
+
Before the scenes, the agent draws the comp: the three deciding screens (the ones people see most,
|
|
195
|
+
from the journeys and the structure) as scenes keyed `comp/<name>`. `ape prototype snapshot --scene
|
|
196
|
+
'comp/*'` shoots them alone, in the first surface's frame (`Surface:` in `plan/structure.md`:
|
|
197
|
+
desktop, the product's `prototype.frame`; or phone), light and dark, into
|
|
198
|
+
`prototype/snapshots/comp/<commit>/`. The comp never counts toward the scenes' totals,
|
|
199
|
+
completeness, reuse or versions: a whole snapshot leaves it out, and a selection that mixes comp
|
|
200
|
+
and other scenes is refused. The studio's Prototype page shows **The look, on three screens**
|
|
201
|
+
(each screen beside the picture `design/references.md` lists in the same place, or a neutral
|
|
202
|
+
placeholder; under a host only pictures inside the product's folder are shown, since the pictures
|
|
203
|
+
usually live outside the repository on the person's own computer) while no look is approved, and on request after. **Approve the look** is a person's,
|
|
204
|
+
at every level: the studio's `/api/approve` (`{ kind: 'comp', fingerprint }`, the comp report's
|
|
205
|
+
hash) records the approval, its commit and signer in `prototype/versions/comp.json`, saved as its
|
|
206
|
+
own commit (`prototype: approve the look`) as a version approval is, and refuses an agent. Agents'
|
|
207
|
+
file tools, coding commands and merged branches cannot write it, and a record not made by that
|
|
208
|
+
commit does not count.
|
|
209
|
+
A redrawn comp is a new look to approve. The prototype and critique skills treat the approved comp
|
|
210
|
+
as the reference the scenes must match.
|
|
211
|
+
|
|
181
212
|
## Snapshots and approval
|
|
182
213
|
|
|
183
214
|
A snapshot writes into its own Git-ignored `<commit>.run-<id>.<pid>/` folder and replaces
|
package/docs/WORKBENCH.md
CHANGED
|
@@ -547,7 +547,7 @@ deny `Edit(plan/agents.md)`, `Edit(plan/**/.claude/**)`,
|
|
|
547
547
|
Edit rules cover Write too and deny wins; `dontAsk` refuses anything that would need approval.
|
|
548
548
|
Before each turn the studio also refuses any `.claude` folder beneath `plan/`, naming
|
|
549
549
|
the folder, so skills planted by a different kind of turn cannot load.
|
|
550
|
-
With every hook off, the limits hook included, these turns' deny rules hold the limits below: `Bash(…)` and `PowerShell(…)` prefix denies for `git push`, `curl`, `wget`, `iwr`, `irm`, `Invoke-WebRequest`, `Invoke-RestMethod`, `Start-BitsTransfer
|
|
550
|
+
With every hook off, the limits hook included, these turns' deny rules hold the limits below: `Bash(…)` and `PowerShell(…)` prefix denies for `git push`, `curl`, `wget`, `iwr`, `irm`, `Invoke-WebRequest`, `Invoke-RestMethod`, `Start-BitsTransfer`, `ape deploy`/`ape server deploy` (bare, `pnpm` and `npx`), `npm publish` (and npm's shortened `npm pu` to `npm publis`), `pnpm publish`, `yarn publish`, `yarn npm publish`, `bun publish`, `lerna publish`, `changeset publish` (bare, `npx`, `pnpm`, `pnpm exec` and `yarn`) and `gh release create`/`new`/`upload`/`edit`/`delete`, `Read` and `Edit` denies for `.env.prod*` and `.env.staging*`, `WebFetch`, and the secret folders' `Read` denies (`planning-limits.ts`). `dontAsk` already refuses every command outside the two; the denies also hold against the person's own allow rules (prefix forms only: `git -C x push` is refused by `dontAsk` alone). On Autopilot, planning and loop run like any other step (next section): `auto`, or `bypassPermissions` with Never ask, with the limits hook, the card, no command list and the same edit denies; the turn's settings set `disableAllHooks: false`, so the product's own hooks run too. Their instructions say to change only files under `plan/`, and the studio's save still takes only what planning owns (`Edit(plan/**)` less the denies above), so an edit elsewhere stays unsaved.
|
|
551
551
|
|
|
552
552
|
#### Permissions follow the level
|
|
553
553
|
|
|
@@ -561,7 +561,7 @@ Every Claude turn takes its mode from the level in effect (`claude-permissions.t
|
|
|
561
561
|
|
|
562
562
|
- **Never ask** is a setting under Autopilot only, off by default, kept as `neverAsk: true` in `plan/agents.md` beside `level: auto`. It holds only when main's commit and the working copy both say so; choosing any other level clears it, and a generic save may not change it where a host controls the level. The level chip reads "Autopilot · Never ask" while it is on. A model Claude Code can't run in `auto` starts in `default` without a word, so its calls reach the card; the CLI's init event names the mode it really runs, and the chat then says "Auto mode isn't available for this model; the agent will ask instead."
|
|
563
563
|
- **The card.** Each launch passes `--permission-prompt-tool mcp__ape_permission__ask` and an `--mcp-config` file naming the one MCP server it adds (`permission-tool.ts`, plain Node); `--disallowedTools` hides that tool from the model. The tool hands each call to the studio over the launch's own local channel (a named pipe, or a socket only its owner opens, at a random name only that launch's arguments carry; not an HTTP route), which closes with the launch. The chat ends with "Your agent wants to run", the exact command and **Allow once**, **Always allow in this step** and **Refuse** (while it waits, the page's own primary button draws as secondary; an answer folds the card to one line while the turn goes on); `POST /api/chats/:id/permission` (`{ id, answer }`, the settings right and the studio Origin, like Allow this folder) answers only the card the running launch shows now. Refused, the agent hears which part and what to run alone ("`grep` is not allowed here; run `pnpm ape prototype snapshot --scene x` alone."); unanswered for 30 minutes, or when the turn ends, it hears that nothing ran. Always allow keeps the exact parts outside the list, as `Bash(<part>)` rules, in `.claude/settings.local.json` under `apeStepAllow.<work>` (Claude Code ignores that key); the studio adds them to that step's `--allowedTools` only, and the running launch reads that list again for each later call, so a command just kept does not ask twice. "This step" is the kind of work, not the rail step: Brand and Prototype both run design turns and share one list. A download, a command the limits could not vouch for (below), a file tool's call, a here-document, a command longer than the card shows, and a command with `%`, `!`, `"` or `*` (Claude Code's wildcard, as in `Bash(node *)` or `Bash(ls:*)`) are allowed once only. The card's text is cut to the chat's limits (2,000 characters for the command, 300 for each program it names, with an ellipsis); a stored card that does not fit them is dropped when the chat is read, and the chat stays.
|
|
564
|
-
- **The limits**, at every level, Never ask included: the studio's PreToolUse hook (`limits-hook.ts`, plain Node) is installed for each turn through a `--settings` file that also sets `disableAllHooks: false`, so a product's own settings can't switch it off. It refuses reading a folder of sign-ins or keys (Allow this folder's list), `ape deploy` and `ape server deploy`, `.env.production`, `.env.staging` and `.env.prod` files,
|
|
564
|
+
- **The limits**, at every level, Never ask included: the studio's PreToolUse hook (`limits-hook.ts`, plain Node) is installed for each turn through a `--settings` file that also sets `disableAllHooks: false`, so a product's own settings can't switch it off. It refuses reading a folder of sign-ins or keys (Allow this folder's list), `ape deploy` and `ape server deploy`, `.env.production`, `.env.staging` and `.env.prod` files, `git push` (and its plumbing, `git send-pack`), publishing a package (`npm publish` and every shortened name npm resolves to it, `npm pu` and up; `pnpm publish`, `yarn publish`, `yarn npm publish`, `bun publish`, `lerna publish`, `changeset publish` (`npx @changesets/cli publish` too): any of those tools named in the part, `npx npm@10 publish` included, with the value of an option each tool takes one for skipped, `npm --registry x publish`, `pnpm -C dir publish`, while `pnpm --filter publish build` runs) and publishing a release (`gh release create`, `new`, `upload`, `edit`, `delete` and `delete-asset`, `gh -R owner/repo release create` included, and a `gh api` call that creates or changes one: a method other than GET or HEAD on `repos/{owner}/{repo}/releases…`, or fields or a body with no method named, as gh then posts, `gh-api-limits.ts`); a subcommand followed only by `--help` or `-h` runs (`publish-limits.ts`), a shell write into the approval records, `prototype/versions/` (a redirect into the folder, or any program that names a path in it other than a read such as `cat`, `ls`, `grep`, `find` without `-delete` or `-exec`, `git log`/`show`/`diff`, `Get-Content`; the path read against the shell's folder, `..`, case, patterns, brace lists and `$(…)` counted; on design and validation turns, and planning and loop turns on Autopilot, a program that writes the paths it names aimed at `.` or any folder above, at `prototype` unless a single file is copied in, a patch or archive (`git apply`, `git am`, `patch`, `Expand-Archive`), and a pipe from such a folder into one (`approval-folders.ts`); and, as a text fallback, a command naming both folders that looks like a write, refused when a part is more than a read and carded otherwise, `approval-writes.ts`, `approval-text.ts`), and, on a design, validation, planning or loop turn at the Autopilot level or with no level given (the hook's command line carries the work and the level), a commit or a branch moved (`git commit`, `commit-tree`, `update-ref`, `merge`, `cherry-pick`, `revert`, `rebase`, `am`, `pull`, `hash-object`, `fast-import`, `stash` but `list`/`show`, `reset` to a commit, `branch -f`/`-M`/`-C`, `checkout -B`, `switch -C`, `fetch` into a branch, `git subtree add`/`merge`/`pull`/`split --rejoin`, configuration set anywhere in the command (refused); a subcommand that is not git's own goes to the card; text naming git and one of them, when the parse could not read every git in it, goes to the card; `commit-limits.ts`), and sends a network download (`curl`, `wget`, `wget2`, `aria2c`, `certutil -urlcache`, `Invoke-WebRequest`, `iwr`, `irm`, `Invoke-RestMethod`, `Start-BitsTransfer`, `WebFetch`) to the card for Allow once. Each part of a piped or chained command is checked, with continued lines joined first (a trailing `\` in Bash, a backtick in PowerShell) and escaped letters read as letters, and so is what a part hands to another shell (`sh -c`, `bash -lc`, `cmd /c`, `powershell -Command` or `-EncodedCommand`, `pwsh -c`, `eval`), anywhere in the part (`pnpm exec sh -c …`, `env X=1 git push`, `xargs git push`), up to four shells deep, `iex`/`Invoke-Expression` included; a `git commit` or `git tag` message after `-m` and a here-document's body are words, not commands (unless an unquoted here-document runs `$(…)`; its end word is read as Bash reads it, `E"OF"` being `EOF`), git's valued options (`--git-dir x`, `--work-tree x`, `-c a=b`) are skipped to find the subcommand, and a redirection such as `2>&1` stays with its command. The refusal names the part and its limit ("publishing a package"). On a Claude turn, when the hook's own sentence comes back as a command's result (`refusalLimit`, in either language), the chat shows that call as the limit's card, **This can't be allowed here**, with the limit's name, the command and **Copy the command**, and no Allow (recorded on the call's line as `tool.limit`; a command the chat shortened or scrubbed is not offered for copying); the permission card refuses a limit too, should one ever reach it. **The fallback** (`limit-mentions.ts`, `stdin-shells.ts`): when that check refuses and asks nothing, the hook still sends the call to the card, for Allow once only and never kept, at every level Never ask included, when the command's whole text (case ignored, continued lines joined, and read again with its quotes and escapes taken out) mentions a limit: `git` and `push` or `send-pack` anywhere in it (`git stash push` aside, so `git -c alias.p=push p` and `p=push; git $p` ask), `ape` and `deploy`, `npm`, `pnpm` or `yarn` and `publish` (or npm's shortened names) as a word of its own (not `src/publish.ts` or `publish-docs`, a known option's value, or a request for help), `gh` and `release` with `create`, `new`, `upload`, `edit` or `delete`, a secret folder's name (the turn's own folder taken out first), a production settings file, or a download program (the list above, plus `bitsadmin`, `Net.WebClient`, `DownloadString`, `DownloadFile`); and also when a shell or interpreter in a part's program place (`bash`, `sh`, `zsh`, `pwsh`, `powershell`, `cmd`, `node`, `python`, `perl`, `ruby` and the like, after `sudo`, `env`, `xargs` and other leaders) reads its script from standard input (no script or `-c`, `-s`, `-`, a here-document, a here-string or `<`: `echo … | sh`, `bash <<'EOF'`, `sh <<< '…'`), a shell pattern in a path could reach a secret folder or a production settings file (`limit-patterns.ts`: each word with `*`, `?`, `[…]` or `{a,b}` has its braces expanded, up to 256 words, and each path segment is tried as a pattern against those names, so `cat .env.*`, `cat ~/.ss*/id_rsa`, `cat ~/.[s]sh/id_rsa` and `cat .env.produc{t,}ion` ask, while a segment of wildcards only, `dist/*`, `src/**/*.ts`, `*.md` and a literal `.env.example` stay free; the card says "This command uses a pattern that could reach `.env.production`; the studio couldn't tell."), a here-document never reaches its end line, a part runs `iex`/`Invoke-Expression`, or the reading passes its budget (a command over 20,000 characters, 200,000 characters parsed in all, 50 ms, or more than 32 scripts handed on from one part; a script handed on twice is read once). The card says why ("This command mentions `git push`; the studio couldn't tell if it runs it.", from the chat's `asking.unsure`), and a refusal tells the agent the same. A commit message that mentions a limit therefore costs one Allow once click; the check answers in well under a second for any input, so the hook's 30-second timeout, which would let the call run, is never reached. Planning below Autopilot has no hook and keeps its deny rules only. A call the hook can't read, or any error in it, is refused (exit 2, with a plain reason). Deny rules for the secret folders (`Read(//**/.aws/**)` and the rest) back it up in every mode, planning included; for a folder name the product itself is kept under (a product in `~/secrets/…` or `…/.docker/…`), they cover that name inside the product (`Read(./**/secrets/**)`) and in the home folder only, as the hook counts it, so the product stays readable. Planning on Autopilot keeps the same edit denies as design turns (`.claude/**`, `.githooks/**`, `package.json` and the rest of the commands' files, and the chats). **Gaps:** the hook reads command text, so a determined agent can still get past it: under Never ask nothing stops it rewriting the hook script itself; a command name built at runtime from pieces (`g=gi; ${g}t push`, `git $'\x70ush'`, `$(printf gi)t push`, a name read from a file) is neither parsed nor mentioned; a recursive read names no limit in its text (`grep -rn KEY .`, `find ~ -name id_rsa -exec cat {} \;`), so text matching can't catch it; an encoded payload other than `-EncodedCommand` handed to something other than a shell's standard input (`node -e` decoding base64, a script file) is not read; and downloads through other programs (`node` with `fetch`, `git clone`, `pnpm add`, a script) are not caught.
|
|
565
565
|
- Below Autopilot, these turns' instructions say a command outside the list pauses for the person, and to run each command alone, without pipes, `&&`, `;` or redirects; at every level they name the limits.
|
|
566
566
|
- Design turns may run exact `pnpm format`, and delete files below `design/` or `prototype/` without asking (one delete command, alone, every path two levels down or more, never `prototype/versions`).
|
|
567
567
|
- **Codex** gets the same arguments at every level, Never ask included: `codex exec` with `approval_policy="never"` (it never asks; a call its sandbox refuses fails and the agent hears why) inside the product's `default_permissions = "ape"` profile (`:workspace` writes, deny-read rules, network off). That is already its full-auto form; the studio passes no `--sandbox`, `--full-auto`, `--approve-for-me` or bypass flag, since a sandbox flag would discard the deny-read profile and a bypass removes the sandbox. The studio installs no hook in Codex, so its limits are its sandbox's: network off stops downloads, deploys and a push to a network remote; the profile denies `.env*` and key files inside the product. **Gaps:** a folder of sign-ins outside the product (`~/.aws`, `~/.gnupg`) is readable, and `git push` to a remote on a local path is not stopped.
|
|
@@ -845,6 +845,15 @@ The host chooses how to listen or proxy the returned Node server. It fills `plan
|
|
|
845
845
|
and compare runs answer 400), and polls `stack.check()` for the dev server's state.
|
|
846
846
|
Without this adapter, the loopback, Host and run-token guards above still apply.
|
|
847
847
|
|
|
848
|
+
A host whose own trusted launcher starts the agent's turns passes `hostLaunched: true` to
|
|
849
|
+
`createUiServer` (a host that starts `ape ui` sets `APE_HOST_LAUNCHED=1`). Turns then launch
|
|
850
|
+
exactly as in 0.8.41: `acceptEdits`, or `dontAsk` with hooks off for planning, at every level,
|
|
851
|
+
with 0.8.41's allow and deny lists and no per-turn settings file, MCP config, permission prompt
|
|
852
|
+
tool or socket; fresh turns keep hooks off through the inline `--settings` JSON and load no
|
|
853
|
+
settings file of their own. The host applies the limits (the upgrade notes list them), and
|
|
854
|
+
Settings says so. The mode belongs to
|
|
855
|
+
`runner.cwd`'s product folder while the server runs (`chat/host-launched.ts`).
|
|
856
|
+
|
|
848
857
|
A host can pass `level: { source: 'host', where: 'Project console' }` to `createUiServer`.
|
|
849
858
|
The Level chooser then shows main's committed level and the commit it was read from, read-only,
|
|
850
859
|
with a fixed English or Spanish sentence naming `where`. `POST /api/level` returns HTTP 409
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buffcore/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.44",
|
|
4
4
|
"description": "The `ape` command: create, dev, migrate, seed, prototype, deploy and a local MCP server for coding agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "BuffApe",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"playwright-core": "1.63.0",
|
|
46
46
|
"yaml": "2.9.1",
|
|
47
47
|
"zod": "4.6.5",
|
|
48
|
-
"@buffcore/contracts": "0.8.
|
|
49
|
-
"@buffcore/
|
|
50
|
-
"@buffcore/
|
|
51
|
-
"@buffcore/
|
|
52
|
-
"@buffcore/db": "0.8.
|
|
53
|
-
"@buffcore/server": "0.8.
|
|
54
|
-
"@buffcore/i18n": "0.8.
|
|
55
|
-
"@buffcore/tokens": "0.8.
|
|
56
|
-
"@buffcore/
|
|
48
|
+
"@buffcore/contracts": "0.8.44",
|
|
49
|
+
"@buffcore/config": "0.8.44",
|
|
50
|
+
"@buffcore/modules": "0.8.44",
|
|
51
|
+
"@buffcore/storage": "0.8.44",
|
|
52
|
+
"@buffcore/db": "0.8.44",
|
|
53
|
+
"@buffcore/server": "0.8.44",
|
|
54
|
+
"@buffcore/i18n": "0.8.44",
|
|
55
|
+
"@buffcore/tokens": "0.8.44",
|
|
56
|
+
"@buffcore/build-agent": "0.8.44"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"marked": "18.1.3",
|
|
60
60
|
"tsx": "4.23.15",
|
|
61
|
-
"@buffcore/admin-shell": "0.8.
|
|
61
|
+
"@buffcore/admin-shell": "0.8.44"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "node ../../scripts/build-package.mjs && node scripts/bundle.mjs",
|
|
@@ -26,7 +26,10 @@ says the critique comes next, as a turn of its own.
|
|
|
26
26
|
|
|
27
27
|
1. **Look first.** Open the desktop and 390 px screenshots from the passing snapshot (desktop scenes
|
|
28
28
|
at the product's frame, `prototype.frame` in `buffcore.config.ts`, 1440 by 900 by default). View them
|
|
29
|
-
beside the reference images and approved comp the person supplied.
|
|
29
|
+
beside the reference images and approved comp the person supplied. The approved comp comes
|
|
30
|
+
first: `prototype/versions/comp.json` names its folder (`prototype/snapshots/comp/<commit>/`); score Look
|
|
31
|
+
against it before anything else, at the first surface's width (`Surface:` in
|
|
32
|
+
`plan/structure.md`, desktop when absent). Look for the references in
|
|
30
33
|
`design/references.md` (the reference study and its pictures' paths), then in `design/` and
|
|
31
34
|
`plan/`, including links in `plan/changes/`. Read only what locates the images. If
|
|
32
35
|
there are no references, write "no references on file" and name the best examples you know in
|
|
@@ -138,7 +141,9 @@ for the person using the screen, not the thinnest screen.
|
|
|
138
141
|
|
|
139
142
|
## The report
|
|
140
143
|
|
|
141
|
-
Write `design/critique.md` and keep it with the commit it reviews.
|
|
144
|
+
Write `design/critique.md` and keep it with the commit it reviews. In a fresh studio turn, which is
|
|
145
|
+
read-only, do not write the file: reply with the whole report below and nothing else, and the studio
|
|
146
|
+
writes `design/critique.md` from your reply (a reply without this shape is not recorded).
|
|
142
147
|
|
|
143
148
|
```markdown
|
|
144
149
|
# Critique · <product> · <commit>
|
|
@@ -192,7 +197,8 @@ references or write "no references on file" and name the examples. Name the appr
|
|
|
192
197
|
```
|
|
193
198
|
|
|
194
199
|
One sentence in chat before writing the file ("The review of X across seven dimensions is in
|
|
195
|
-
`design/critique.md`."), then the file. Do not paraphrase the whole report in chat.
|
|
200
|
+
`design/critique.md`."), then the file. Do not paraphrase the whole report in chat. In a fresh studio
|
|
201
|
+
turn the reply is the report itself, with no sentence before it.
|
|
196
202
|
|
|
197
203
|
## After the critique
|
|
198
204
|
|
|
@@ -26,7 +26,8 @@ Before choosing a direction, study real products. If the person already gave a b
|
|
|
26
26
|
1. **Collect pictures.** About 10 to 25 products: the ones the product's buyers already use, and modern products they admire. Take each at a computer width (1440) and a phone width (390), plus one inner page.
|
|
27
27
|
2. **Capture politely.** Read each site's `robots.txt` first and skip any page it closes. Skip any page behind a bot check or a login; never work around it. Hide cookie banners with CSS rather than clicking them. Note every skip.
|
|
28
28
|
3. **Keep the pictures private.** They stay outside the repository (a folder of the person's, never committed) and are never published.
|
|
29
|
-
4. **Write `design/references.md`** from the pictures, and keep it: what buyers expect (the patterns that repeat), what they admire, what looks dated, and the gap this product can own; then each picture's path on this computer and what it shows (`~/refs/acme/home-1440.png`: a calm dashboard, one number first; a path in backticks or as a link), never the pictures themselves. `ape-prototype` reads it before drawing and `ape-critique` looks there first for references; `ape design check` notes a listed path that no longer exists.
|
|
29
|
+
4. **Write `design/references.md`** from the pictures, and keep it: what buyers expect (the patterns that repeat), what they admire, what looks dated, and the gap this product can own; then each picture's path on this computer and what it shows (`~/refs/acme/home-1440.png`: a calm dashboard, one number first; a path in backticks or as a link), never the pictures themselves. `ape-prototype` reads it before drawing and `ape-critique` looks there first for references; `ape design check` notes a listed path that no longer exists. The studio shows its pictures beside the comp (the three deciding screens `ape-prototype` draws first), in the order listed: any path in `ape ui` on your own computer; under a host, only pictures inside the product's folder (others show a placeholder).
|
|
30
|
+
5. **The comp settles the look.** After the theme and before the scenes, `ape-prototype` draws the comp; once a person approves it, the scenes and the critique follow it. A later change to the look is a new comp to approve.
|
|
30
31
|
|
|
31
32
|
Learn patterns; copy no brand. No logo, name, color or layout is lifted from a single product.
|
|
32
33
|
|
|
@@ -29,6 +29,10 @@ review before their next affected prototype, with no invented past approval. Use
|
|
|
29
29
|
inventory routes or console screen names as first screens. The file describes intent and
|
|
30
30
|
grants no access. SA4 adds coverage and traversal evidence later; do not claim them from a table.
|
|
31
31
|
|
|
32
|
+
## The comp, before the scenes
|
|
33
|
+
|
|
34
|
+
When `prototype/versions/comp.json` holds no approved look, draw the comp first and nothing else. Pick the three deciding screens from `plan/journeys.md` and `plan/structure.md` (the ones people see most) and add them to `prototype/scenes.ts` as scenes keyed `comp/<name>`. `plan/structure.md`'s `Surface:` line says which surface comes first (absent, desktop): the snapshot shoots the comp at that width, the product's desktop frame (`prototype.frame`, 1440 by default) or the phone's 390, light and dark. Shoot it with `pnpm ape prototype snapshot --scene 'comp/*'`: it goes to `prototype/snapshots/comp/<commit>/`, apart from the scenes, and never counts toward their totals, completeness or reuse. The studio's Prototype page shows the three beside `design/references.md`'s pictures; the person asks for changes in the chat (redraw and shoot the three again) and approves the look there. Only a person approves it, at every level, Autopilot included. Once approved, the comp's screenshots are the reference every scene must match: its type, color, density and spacing. Judge the first surface first.
|
|
35
|
+
|
|
32
36
|
## The working app, and the scenes
|
|
33
37
|
|
|
34
38
|
Before drawing, read `design/references.md` (the design system's reference study and the paths of its pictures, `ape-design-system`) and look at the pictures it names, so the screens answer what the study found. Without the file, say so and draw from `design/DESIGN.md`.
|
|
@@ -47,7 +51,7 @@ When screens disagree about people, messages, counts or amounts, fix the shared
|
|
|
47
51
|
|
|
48
52
|
**The questions pass.** The checks measure the surface; a person's questions are another check. For each screen the change adds or changes, name the element on it that answers each of four questions, in the commit message or the change's file (the change's "What the person using it will ask" section holds the questions): who enters or is reached, and can they be seen by name; from what data, and how it is kept up to date; what it costs; what each control does. "Does not apply" is a fine answer, with a one-line reason. Simple is for the person using the screen: hiding who is in it or what a control does is not simple for them. A screen with an unanswered question is not ready for the critique.
|
|
49
53
|
|
|
50
|
-
**The critique, by a fresh agent, in its own turn.** After the full snapshot passes and before `ape prototype version`, an agent that did not draw the looks runs `ape-critique` on it
|
|
54
|
+
**The critique, by a fresh agent, in its own turn.** After the full snapshot passes and before `ape prototype version`, an agent that did not draw the looks runs `ape-critique` on it, and its P0s are fixed first. In the studio a passing full snapshot from the Prototype page starts it by itself, as a fresh read-only turn whose answer the studio writes to `design/critique.md`; elsewhere, run it in a new session. If you drew the scenes, never run `ape-critique` yourself, not even at the end of your turn: end the turn after the passing full snapshot and say the critique comes next. This is words for now: nothing blocks the version yet, so the agent that records a version says in its report that both were done.
|
|
51
55
|
|
|
52
56
|
**What needs a prototype.** Every screen the product writes itself, in its app or its admin console (an extension in the product's own `packages/` included), and any change of look; the screens that come with BuffCore (sign-in, sign-up, the account, settings) or with an installed extension (`@buffcore/payments`' billing, the waitlist) are already approved and wear the product's theme, so make no scenes for them and wait for no approval of them (to see one in the product's theme, list its exported view in the surface's `src/prototype/views.ts` and give it a scene).
|
|
53
57
|
|