@buffcore/cli 0.8.40 → 0.8.42
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 +36 -0
- package/dist/commands/agents-file.d.ts +5 -0
- package/dist/commands/agents-file.js +30 -7
- package/dist/commands/change.d.ts +4 -0
- package/dist/commands/change.js +12 -5
- package/dist/commands/create-block.d.ts +2 -1
- package/dist/commands/create-block.js +7 -5
- package/dist/commands/create-steps.en.js +1 -1
- package/dist/commands/create-steps.js +1 -1
- package/dist/commands/create.d.ts +3 -2
- package/dist/commands/create.en.js +1 -1
- package/dist/commands/create.es.js +1 -1
- package/dist/commands/create.js +8 -6
- package/dist/commands/design/check.d.ts +2 -0
- package/dist/commands/design/check.js +6 -0
- package/dist/commands/design/journey-roles.d.ts +6 -0
- package/dist/commands/design/journey-roles.js +60 -0
- package/dist/commands/design/references.d.ts +3 -0
- package/dist/commands/design/references.js +25 -0
- package/dist/commands/design/tells-text.js +2 -2
- package/dist/commands/design/tells.d.ts +3 -1
- package/dist/commands/design/tells.en.d.ts +2 -0
- package/dist/commands/design/tells.en.js +2 -0
- package/dist/commands/design/tells.es.js +2 -0
- package/dist/commands/design/tells.js +10 -7
- package/dist/commands/dev.js +3 -0
- package/dist/commands/port-claims.d.ts +23 -0
- package/dist/commands/port-claims.js +95 -0
- package/dist/commands/prototype/browser.d.ts +9 -4
- package/dist/commands/prototype/browser.js +26 -18
- package/dist/commands/prototype/export-base.d.ts +27 -0
- package/dist/commands/prototype/export-base.js +80 -0
- package/dist/commands/prototype/export.d.ts +3 -2
- package/dist/commands/prototype/export.js +13 -6
- package/dist/commands/prototype/index.js +1 -0
- package/dist/commands/prototype/media-ready.d.ts +8 -0
- package/dist/commands/prototype/media-ready.js +36 -0
- package/dist/commands/prototype/messages.en.d.ts +6 -0
- package/dist/commands/prototype/messages.en.js +6 -0
- package/dist/commands/prototype/messages.js +6 -0
- package/dist/commands/prototype/scene.d.ts +3 -1
- package/dist/commands/prototype/scene.js +22 -6
- package/dist/commands/prototype/snapshot-inputs.js +35 -7
- package/dist/commands/prototype/snapshot-setup.d.ts +1 -1
- package/dist/commands/prototype/snapshot-setup.js +2 -1
- package/dist/commands/prototype/snapshot-themes.js +3 -1
- package/dist/commands/prototype/snapshot.d.ts +2 -0
- package/dist/commands/prototype/snapshot.js +2 -1
- package/dist/commands/ui/autopilot-records.d.ts +3 -0
- package/dist/commands/ui/chat/allow-folder-route.d.ts +9 -0
- package/dist/commands/ui/chat/allow-folder-route.js +56 -0
- package/dist/commands/ui/chat/allow-folder.d.ts +18 -0
- package/dist/commands/ui/chat/allow-folder.js +76 -0
- package/dist/commands/ui/chat/ask-person.d.ts +17 -0
- package/dist/commands/ui/chat/ask-person.en.d.ts +4 -0
- package/dist/commands/ui/chat/ask-person.en.js +4 -0
- package/dist/commands/ui/chat/ask-person.es.d.ts +4 -0
- package/dist/commands/ui/chat/ask-person.es.js +4 -0
- package/dist/commands/ui/chat/ask-person.js +60 -0
- package/dist/commands/ui/chat/claude-permissions.d.ts +21 -0
- package/dist/commands/ui/chat/claude-permissions.js +69 -0
- package/dist/commands/ui/chat/codex-idle.d.ts +1 -0
- package/dist/commands/ui/chat/codex-overrides.js +2 -1
- package/dist/commands/ui/chat/codex-permissions.d.ts +12 -0
- package/dist/commands/ui/chat/codex-permissions.js +97 -0
- package/dist/commands/ui/chat/command-parts.d.ts +33 -0
- package/dist/commands/ui/chat/command-parts.js +219 -0
- package/dist/commands/ui/chat/command-wrappers.d.ts +21 -0
- package/dist/commands/ui/chat/command-wrappers.js +100 -0
- package/dist/commands/ui/chat/design-deletes.d.ts +1 -0
- package/dist/commands/ui/chat/design-deletes.js +39 -0
- package/dist/commands/ui/chat/launch-input.d.ts +4 -2
- package/dist/commands/ui/chat/launch-input.js +16 -3
- package/dist/commands/ui/chat/limit-mentions.d.ts +5 -0
- package/dist/commands/ui/chat/limit-mentions.js +74 -0
- package/dist/commands/ui/chat/limit-patterns.d.ts +15 -0
- package/dist/commands/ui/chat/limit-patterns.js +182 -0
- package/dist/commands/ui/chat/limits-hook.d.ts +1 -0
- package/dist/commands/ui/chat/limits-hook.js +30 -0
- package/dist/commands/ui/chat/limits.d.ts +37 -0
- package/dist/commands/ui/chat/limits.en.d.ts +18 -0
- package/dist/commands/ui/chat/limits.en.js +18 -0
- package/dist/commands/ui/chat/limits.es.d.ts +2 -0
- package/dist/commands/ui/chat/limits.es.js +17 -0
- package/dist/commands/ui/chat/limits.js +224 -0
- package/dist/commands/ui/chat/local-settings.d.ts +17 -0
- package/dist/commands/ui/chat/local-settings.js +73 -0
- package/dist/commands/ui/chat/opencode-config.d.ts +22 -0
- package/dist/commands/ui/chat/opencode-config.js +83 -0
- package/dist/commands/ui/chat/parse-claude.js +18 -2
- package/dist/commands/ui/chat/permission-ask.d.ts +44 -0
- package/dist/commands/ui/chat/permission-ask.js +142 -0
- package/dist/commands/ui/chat/permission-channel.d.ts +18 -0
- package/dist/commands/ui/chat/permission-channel.js +67 -0
- package/dist/commands/ui/chat/permission-route.d.ts +10 -0
- package/dist/commands/ui/chat/permission-route.js +47 -0
- package/dist/commands/ui/chat/permission-tool.d.ts +1 -0
- package/dist/commands/ui/chat/permission-tool.js +86 -0
- package/dist/commands/ui/chat/permissions.d.ts +11 -12
- package/dist/commands/ui/chat/permissions.js +20 -102
- package/dist/commands/ui/chat/planning-limits.d.ts +12 -0
- package/dist/commands/ui/chat/planning-limits.js +31 -0
- package/dist/commands/ui/chat/process.js +4 -1
- package/dist/commands/ui/chat/prompt.d.ts +8 -1
- package/dist/commands/ui/chat/prompt.en.d.ts +4 -0
- package/dist/commands/ui/chat/prompt.en.js +4 -0
- package/dist/commands/ui/chat/prompt.es.d.ts +4 -0
- package/dist/commands/ui/chat/prompt.es.js +4 -0
- package/dist/commands/ui/chat/prompt.js +18 -50
- package/dist/commands/ui/chat/recorded-turn.js +5 -0
- package/dist/commands/ui/chat/routes.js +4 -0
- package/dist/commands/ui/chat/secret-folders.d.ts +16 -0
- package/dist/commands/ui/chat/secret-folders.js +35 -0
- package/dist/commands/ui/chat/stdin-shells.d.ts +8 -0
- package/dist/commands/ui/chat/stdin-shells.js +102 -0
- package/dist/commands/ui/chat/step-rules.d.ts +13 -0
- package/dist/commands/ui/chat/step-rules.js +47 -0
- package/dist/commands/ui/chat/store.d.ts +2 -0
- package/dist/commands/ui/chat/store.js +25 -3
- package/dist/commands/ui/chat/stream.en.d.ts +17 -0
- package/dist/commands/ui/chat/stream.en.js +18 -1
- package/dist/commands/ui/chat/stream.es.d.ts +17 -0
- package/dist/commands/ui/chat/stream.es.js +18 -1
- package/dist/commands/ui/chat/stream.js +4 -1
- package/dist/commands/ui/chat/turn-guard.d.ts +25 -0
- package/dist/commands/ui/chat/turn-guard.js +74 -0
- package/dist/commands/ui/chat/turn-input.d.ts +3 -2
- package/dist/commands/ui/chat/turn-input.js +3 -1
- package/dist/commands/ui/chat/turn-reserve.js +2 -0
- package/dist/commands/ui/chat/turn-scenes.d.ts +19 -0
- package/dist/commands/ui/chat/turn-scenes.js +44 -0
- package/dist/commands/ui/chat/turn-selection.d.ts +3 -0
- package/dist/commands/ui/chat/turn-selection.js +9 -3
- package/dist/commands/ui/chat/turn-state.d.ts +6 -0
- package/dist/commands/ui/chat/turn.js +8 -3
- package/dist/commands/ui/level-route.js +8 -3
- package/dist/commands/ui/page.d.ts +19 -1
- package/dist/commands/ui/page.js +9 -6
- package/dist/commands/ui/plan-structure.d.ts +9 -2
- package/dist/commands/ui/plan-structure.en.d.ts +1 -0
- package/dist/commands/ui/plan-structure.en.js +1 -0
- package/dist/commands/ui/plan-structure.es.d.ts +1 -0
- package/dist/commands/ui/plan-structure.es.js +1 -0
- package/dist/commands/ui/plan-structure.js +36 -10
- package/dist/commands/ui/prototype-main.d.ts +1 -0
- package/dist/commands/ui/prototype-scenes-child.js +3 -1
- package/dist/commands/ui/prototype-scenes-read.d.ts +1 -0
- package/dist/commands/ui/prototype-scenes-route.js +7 -1
- package/dist/commands/ui/save-commit.js +6 -2
- package/dist/commands/ui/server-options.js +2 -0
- package/dist/commands/ui/server.d.ts +5 -22
- package/dist/commands/ui/server.js +3 -45
- package/dist/commands/ui/snapshot-runners.d.ts +22 -0
- package/dist/commands/ui/snapshot-runners.js +45 -0
- package/dist/commands/ui/studio-routes.d.ts +1 -0
- package/dist/commands/ui/studio-routes.js +1 -0
- package/dist/commands/ui/studio-state.d.ts +4 -1
- package/dist/commands/ui/studio-state.js +1 -0
- package/dist/commands/ui/studio.en.d.ts +13 -0
- package/dist/commands/ui/studio.en.js +13 -0
- package/dist/commands/ui/studio.es.d.ts +13 -0
- package/dist/commands/ui/studio.es.js +13 -0
- package/dist/commands/ui/theme-option.d.ts +8 -0
- package/dist/commands/ui/theme-option.js +40 -0
- package/dist/commands/ui/theme-values.d.ts +5 -0
- package/dist/commands/ui/theme-values.js +113 -0
- package/dist/ui/page.js +86 -86
- package/docs/PROTOTYPE.md +4 -1
- package/docs/WORKBENCH.md +90 -26
- package/package.json +11 -11
- package/skills/ape-critique/SKILL.md +8 -4
- package/skills/ape-design-system/SKILL.md +14 -3
- package/skills/ape-plan-change/SKILL.md +9 -5
- package/skills/ape-prototype/SKILL.md +8 -1
- package/templates/example/apps/app/src/i18n/en.ts +2 -0
- package/templates/example/apps/app/src/i18n/es.json +2 -0
- package/templates/product/README.md +1 -1
- package/templates/product/apps/admin/src/fonts.ts +2 -1
- package/templates/product/apps/app/src/fonts.ts +5 -1
- package/templates/product/apps/app/src/i18n/en.ts +2 -0
- package/templates/product/apps/app/src/i18n/es.json +2 -0
- package/templates/product/prototype/journeys.ts +3 -0
package/docs/PROTOTYPE.md
CHANGED
|
@@ -152,8 +152,9 @@ Sample data is always synthetic, never copied from real users. The app's Metro c
|
|
|
152
152
|
- **`defineScenes` refuses** two scenes or flows with the same key, a flow with no steps, and a flow step whose scene does not exist.
|
|
153
153
|
- **A scene can have a translated title.** Add `prototype.<scene-key>.title` to the viewer's catalogs. The viewer uses the chosen preview language and falls back to the scene's `title`.
|
|
154
154
|
|
|
155
|
-
- **A scene has a frame:** `phone` (390 × 844), `tablet` (820 × 1180), `desktop` (
|
|
155
|
+
- **A scene has a frame:** `phone` (390 × 844), `tablet` (820 × 1180), `desktop` (1440 × 900) or `admin` (1440 × 900). The default is `phone` for an app scene and `admin` for an admin scene. The product sets its own desktop frame in `buffcore.config.ts` (`prototype: { frame: { width: 1280, height: 800 } }`, whole pixels from 320 to 3840 wide and 320 to 2400 high): the viewer, the snapshot and so the compare and the critique use it, and a new frame re-shoots the desktop scenes.
|
|
156
156
|
- **An admin scene may show the app:** a `DeviceFrame` (from `@buffcore/admin-shell/prototype`) whose `src` is an app scene page (`sceneUrl(appUrl, key, look)`). The snapshot waits for every framed `/_scene` page to draw, in the language its URL asks for.
|
|
157
|
+
- **Before each picture the snapshot waits for the page's fonts and pictures** (`document.fonts.ready` and every `<img>` loaded or failed, lazy ones loaded at once), in the page and each framed `/_scene`, for at most 10 seconds. Past that it takes the picture as the page is and adds a hint naming the scene; the scene's other looks then wait at most a second.
|
|
157
158
|
- **An app scene may set a person's scale** (`scale: 1.3`; default 1), so its snapshots show the app as that person sees it (THEMING_AND_UI.md).
|
|
158
159
|
|
|
159
160
|
## The viewer
|
|
@@ -265,6 +266,8 @@ In Studio, Run comparisons and change runs show a failed result with the generic
|
|
|
265
266
|
|
|
266
267
|
- **Built from the commit, checked out and unchanged:** it refuses another checkout. `export.json` names the commit.
|
|
267
268
|
- **Two development builds of that commit** (production builds leave the scenes and sample data out), laid out as one site served from its root: the app's scene pages (Expo's web export) at `/_scene/`, the viewer and the admin's scene pages (Vite) at `/prototype/` and `/prototype/_scene/`; `/` opens the viewer. The admin's `main.tsx` asks `isPrototypePage(location.pathname)` (from `@buffcore/admin-shell`), which knows both layouts. It goes to `dist/prototype-<commit>/` (`--out` to change it).
|
|
269
|
+
- **Served under another path** (`--base <path>`; by default the export is served from the site's root, as before): `--base /s/abc/` plays from `<origin>/s/abc/` only, and `--base ./` from any path, with the viewer's files relative to its page. The entry `index.html` stays at the export's root; the viewer's files, the app's files and the viewer's routes follow the base. Under a plain path each page knows its root from the build; only `./` finds it from the address, with leading slashes collapsed and only as a path on the page's own origin, so an address such as `//other.example/..%2Fs/abc/_scene/` never makes a page load files from elsewhere. The pages name that root (`__APE_EXPORT__`), and only then does `isPrototypePage` take a path ending in `/prototype/` that is not at the server's root: on a development server it keeps to `/prototype` and `/_scene`. The app's scene page gives the app's router `/_scene/` in the address (a rewrite with no request: Expo's router follows a base path only in production builds, and the export's are development builds); reloading that frame asks the origin's `/_scene/`, which is no copy's. A base that is not `./` or a plain path (letters, digits, `-`, `_`, `~` and dots; no scheme, `..`, quotes or shell characters) is refused. It plays inside a frame sandboxed with `allow-scripts` alone: nothing needs cookies, storage or the parent page, and storage that throws there is skipped. Such a frame's origin is opaque, so the browser fetches the viewer's module scripts and the fonts as cross-origin requests: serve the export's files with `Access-Control-Allow-Origin: *`. The console asks for its optional `console.json` under the base; only the app's development build tries its live-reload sockets at the origin's root, and goes on without an answer.
|
|
270
|
+
- **Development builds, so nothing secret in them:** an export holds the scenes' sample data, and also the builds' source maps and every `VITE_*` and `EXPO_PUBLIC_*` value inlined at build time (as any development build does). Keep secrets out of those variables and out of the source before you export or serve a copy to anyone.
|
|
268
271
|
- **No backend is needed:** a scene is a view with its sample props. The pretend backend isn't built yet; when it is, it must run in the browser (in memory, no Node or Postgres) so the export keeps working.
|
|
269
272
|
- **The app home is not in an export:** the export is a commit's scenes (the proof), not the development app; the viewer has no App view when there is no app address (`appUrl`), so it starts on the first scene.
|
|
270
273
|
|
package/docs/WORKBENCH.md
CHANGED
|
@@ -8,7 +8,7 @@ The page title, terminal help and startup address call it the studio (estudio in
|
|
|
8
8
|
|
|
9
9
|
The studio has four levels of how much the agent does before it asks (`plan/agents.md`; the Level chooser). **You drive** proposes each step and waits for you. **Review** completes one step, then asks for your approval. **Lead** drafts only when you ask. **Autopilot** lets the agent go on by itself: at the end of a turn it takes the loop's choices, saves the step, approves where the product's rule lets an agent, and merges a finished change once its checks pass. It never starts the next build by itself, and a release, deploy or money action always waits for a person.
|
|
10
10
|
|
|
11
|
-
Before the first plan, the Plan empty state, kickoff and product README explain how to merge `{"permissions":{"additionalDirectories":["../<folder>"]}}` for one sibling notes folder into the git-ignored `.claude/settings.local.json` by hand, allowing Claude Code to read and change its files; the
|
|
11
|
+
Before the first plan, the Plan empty state, kickoff and product README explain how to merge `{"permissions":{"additionalDirectories":["../<folder>"]}}` for one sibling notes folder into the git-ignored `.claude/settings.local.json` by hand, allowing Claude Code to read and change its files; after a refused read the agent panel can also add it with one click (below).
|
|
12
12
|
|
|
13
13
|
`--lang en` or `--lang es` chooses the local studio's language and its terminal
|
|
14
14
|
messages. Without it, the studio follows the browser's language; terminal messages
|
|
@@ -67,7 +67,10 @@ build time, or from source when running in the checkout.
|
|
|
67
67
|
- Structure follows Journeys, before Prototype; the other loop steps keep their names and order.
|
|
68
68
|
It asks about sections, priority, audiences and first screens, with a draft from journeys to
|
|
69
69
|
correct in planning chat. `plan/structure.md` is one table and short notes for nested screens,
|
|
70
|
-
return targets, phone and wide screens.
|
|
70
|
+
return targets, phone and wide screens. Under each question, "Your app, in plain words" shows the answer
|
|
71
|
+
drawn from the file's rows, or "Answer this in the chat". A row whose first screen a planned change adds
|
|
72
|
+
(`/billing (planned, C-020)`, listed in that change's screens) shows "planned, C-020" until the route exists.
|
|
73
|
+
Its card, save and Next gate use `step-state.ts`.
|
|
71
74
|
Missing files stay not started; malformed files name their problem without hiding the plan.
|
|
72
75
|
Structure is navigation intent, never a grant of access or invented past approval.
|
|
73
76
|
Autopilot saves it as an ordinary plan step, without an approval or signature; a reader refusal asks for help with the same words.
|
|
@@ -83,9 +86,8 @@ build time, or from source when running in the checkout.
|
|
|
83
86
|
Prototype omits secrets, scratch paths, dependencies, build output and linked paths using the save's
|
|
84
87
|
existing secret and path checks. The collapsed, scrollable list shows each proposed path's status,
|
|
85
88
|
100 files at a time, with the remaining count and buttons to reach every file and untick any of them.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
A step reads as saved only while none of its own files is unsaved; protected or secret step edits keep it unsaved, and an empty review offers Reload file list. A failed review or save keeps the selection.
|
|
89
|
+
One click saves (0.8.42): a planning step's own unsaved files, and the Prototype step's unsaved source, list themselves with the step's files ticked, and one Save sends the server's fingerprint of the list shown. A changed tick first asks the fingerprint of the new list (Save waits for it); when the files changed since, the server answers with the new list, shown as "This changed since you looked", and one more Save commits it. A check that changed the staged files hands back the old fingerprint, so the studio asks the new list's own. Brand has no unsaved-files signal in the poll, so its page asks the server for its list once when it opens, and again when its files change (a new brand fingerprint or a finished turn); a list offering none of Brand's files counts as saved. A change in its own checkout lists its files on the first Save. Other files stay outside the save. Commit subjects name the step and selected file count.
|
|
90
|
+
A step reads as saved only while none of its own files is unsaved; protected or secret step edits keep it unsaved, and an empty list offers Reload file list. A failed check or save keeps the selection.
|
|
89
91
|
Protected paths from the committed policy are omitted and refused (with no `agents.protected`, the config and the files ape writes; a list the studio cannot read refuses the save); secret and linked paths are refused. Review also binds the selected index entries. Product hooks are
|
|
90
92
|
trusted and run against an isolated index. A staged-tree change is refused before main moves;
|
|
91
93
|
working edits left outside a committed save are reported honestly. Refusals name a safe file when known and offer retry. Hosted saves use the viewer's Git identity; local saves use Git's user.
|
|
@@ -97,7 +99,7 @@ build time, or from source when running in the checkout.
|
|
|
97
99
|
and previews return HTTP 200 with `ok: false`, so the studio's action transport keeps their detail.
|
|
98
100
|
The real index follows the commit before post-commit runs, then is checked again for the reply, so new files in the temporary index no longer appear as staged deletions during slow post-commit checks. When a reply carries a commit that is not a plain save (a repository check left working files changed, or the commit could not be compared with them), the real index still moves to that commit by one rule: a path with nothing staged, or staged exactly as reviewed, follows the commit; any other staging is the person's own work and stays (also staging made while a check ran), in a product in a subfolder too, so the file list shows only what is really left; if Git cannot move the index, the detail names the `git reset HEAD --` to run, in the product's folder, and says so when it could not read the index. The page says "A commit exists, but it is not confirmed as saved"; Reload file list re-reads it, an empty list settles Brief, Plan and Journeys once their own files are clean (other steps start a fresh page, never Saved by that alone, even after a refused or failed reload), and the next step (Record, or Brand's approval) then needs its own saved reply.
|
|
99
101
|
The save's commit is the one it moved main to, or one a `post-commit` hook amended with the same parent and files. When HEAD is anything else (a hook committed on top of the save's commit, or moved HEAD), the save answers that its commit could not be confirmed; the index may already have followed the reviewed commit before that hook ran. The message names the step to finish: in the product's folder, `git reset HEAD --` with the saved paths (it changes only staging; committing from a terminal before it could undo the save), then reload the file list and save again if it still lists them. For a prototype approval, `git checkout HEAD --` with the record's path instead: if the record then shows the approval, it is saved; otherwise approve again.
|
|
100
|
-
- Prototype puts the recorded versions, check status, Compare and Approve above the app preview. Try a journey opens a picker and puts Back and Next over the app. Preview options holds Device, Data and sign-in help. Sign-in help offers Open app in new tab. Escape and choosing an action return keyboard focus to the panel's opener. Tabbing out of a popover or Compare closes it and keeps focus at the new control. A phone shows the app edge to edge. The agent's technical references are under Details. A silent app port points to Dev server. A missing home can prepare a design request for the person to send. Below the preview,
|
|
102
|
+
- Prototype puts the recorded versions, check status, Compare and Approve above the app preview. Try a journey opens a picker and puts Back and Next over the app. Preview options holds Device, Data and sign-in help. Sign-in help offers Open app in new tab. Escape and choosing an action return keyboard focus to the panel's opener. Tabbing out of a popover or Compare closes it and keeps focus at the new control. A phone shows the app edge to edge. The agent's technical references are under Details. A silent app port points to Dev server. A missing home can prepare a design request for the person to send. Below the preview, the unsaved source's file list and its one Save commit the chosen files, Take snapshot checks the saved source, and Record waits for its passing proof. The [prototype connection](PROTOTYPE.md) describes readiness and framing.
|
|
101
103
|
Long file paths and report rows wrap within the page; wide tables scroll inside their own box and previews stack when narrow.
|
|
102
104
|
Saved source refreshes after a reviewed save without a page reload. An empty source read says nothing is recorded yet; a failed read shows a fixed translated sentence, never raw errors. Slow or failed reads leave the preview open, and the controls that need the source show that it is unavailable. Polling and hiding the pane preserve the playing journey and step. The preview's heartbeat checks whether the app is still responding.
|
|
103
105
|
The chat panel renders only while shown. It opens with the latest 200 messages, and Show earlier adds another page.
|
|
@@ -347,9 +349,19 @@ reads fold together, paths are relative to the product, shell calls show their c
|
|
|
347
349
|
refusals carry a lock. Each message keeps its author. The panel follows new lines until the
|
|
348
350
|
person scrolls up, and preserves their own line breaks. The turn ends with elapsed time from
|
|
349
351
|
the studio's clock and its refused-call count, without tokens or money.
|
|
350
|
-
Only a refused Claude Code read outside the product names its absolute folder
|
|
351
|
-
|
|
352
|
-
|
|
352
|
+
Only a refused Claude Code read outside the product names its absolute folder, as a card with
|
|
353
|
+
"Allow this folder" and "Not now". Allow posts `POST /api/chats/:id/allow-folder` with only the
|
|
354
|
+
notice's place in the chat: the server reads the folder from that recorded notice, refuses one
|
|
355
|
+
that is not absolute, missing, a file, a whole disk, the home folder or one holding it, a link, or
|
|
356
|
+
inside the product, then adds it to `permissions.additionalDirectories` in the product's
|
|
357
|
+
`.claude/settings.local.json` (made if missing, other settings kept, never twice, written whole),
|
|
358
|
+
marks the notice `allowed` and records who allowed it as a chat line. The route takes the page's
|
|
359
|
+
token or the host's sign-in, its Origin and the `settings` right (without it the card keeps the
|
|
360
|
+
written steps); no MCP tool or agent command reaches it. The panel then sends the person's last
|
|
361
|
+
message again, as Try again does. "Not now" is "Continue without it". Linked BuffCore reads need no
|
|
362
|
+
notice. A refused `ape enable|disable <platform>` (matched on the recorded command) gets a
|
|
363
|
+
platforms card instead: Web (always on), iOS and Android switches from the studio's facts and
|
|
364
|
+
"Change in Setup", which opens Setup's Where it runs with each change's sheet; Setup still saves. Otherwise the turn's last refused call, Codex's
|
|
353
365
|
included, gets a notice below the transcript, until the person answers (earlier refusals in the
|
|
354
366
|
same turn only count in the turn's end line). It shows the refused call and its reason
|
|
355
367
|
from the transcript and offers two ordinary planning-chat messages sent as the person: "Ask the
|
|
@@ -390,6 +402,8 @@ The address keeps the open page (`#/plan`); without one, the studio opens the ra
|
|
|
390
402
|
|
|
391
403
|
A chat's latest turn is one fact, read from its stored record and never from a clock: running while the stored state says its run is in flight (the end line is written before autopilot's last steps, so the fact stays running until the run really ends, and a studio that lost the run repairs the state when it reads the chat), otherwise ended as finished, stopped or failed, with the studio's reason and the agent's last message. A comment never starts a turn, and a fact that says ended is never shown as Working. The panel reads the chat again on every poll, so a dropped read resumes from the record with no event shown twice, and says the studio isn't answering only after three reads in a row fail. On Work, a change whose latest turn stopped or failed shows its reason and a Retry (the panel's own send) on its card and waits under Waiting on you. Only a turn that failed before the agent started, because the studio could not identify its process, is run again by itself, once (the `retry` marker in the record); a turn that said or did anything is never run again. Claude reads each turn as one stream-json message on stdin (never plain stdin, which the CLI abandons after 3 s), so the words can be written after the turn is recorded and its process proven, however long that takes; a turn that ends with no output, call or error of the agent’s own says "Your message wasn’t sent. Send it again." (the line carries `unsent`) and the composer takes the person’s words back once.
|
|
392
404
|
|
|
405
|
+
A Prototype turn that changed scenes ends with plain links that open each in the preview (at most eight): at the turn's end the studio reads the scenes (`prototype/scenes.ts`, in its bounded child, now with each scene's named view) and keeps the scenes whose view reaches a file the turn's own edit or write calls named, the way `own-scenes.ts` follows a view's imports. The end record carries their keys and titles (`end.scenes`); a link is `#/prototype?scene=<key>`, which sets the preview's scene once. The scenes route still answers key, title and surface only. Nothing readable gives no links.
|
|
406
|
+
|
|
393
407
|
Each turn uses an installed Claude Code, Codex or OpenCode CLI on the host, with its
|
|
394
408
|
own sign-in and permissions. BuffCore never signs anyone in. Chats and raw events
|
|
395
409
|
stay in gitignored `.ape/chats/`. Coding, tests and fixes for a change share
|
|
@@ -522,7 +536,7 @@ Check the commit from your terminal with `git -C "<change worktree>" log -1 --on
|
|
|
522
536
|
|
|
523
537
|
Claude Code keeps its settings' deny rules and uses `--allowedTools` rules per work.
|
|
524
538
|
Each allowed command has the same rule for both `Bash` and `PowerShell`.
|
|
525
|
-
On an uncontained studio, only Claude Code takes planning and loop turns.
|
|
539
|
+
On an uncontained studio, only Claude Code takes planning and loop turns. Below Autopilot each start and resume pins
|
|
526
540
|
`--permission-mode dontAsk`, so the person's `permissions.defaultMode` cannot widen it,
|
|
527
541
|
and `--settings '{"disableAllHooks":true}'`, disabling user/project/plugin hooks including
|
|
528
542
|
the format hook. The [session settings merge](https://code.claude.com/docs/en/settings#settings-precedence)
|
|
@@ -533,14 +547,33 @@ deny `Edit(plan/agents.md)`, `Edit(plan/**/.claude/**)`,
|
|
|
533
547
|
Edit rules cover Write too and deny wins; `dontAsk` refuses anything that would need approval.
|
|
534
548
|
Before each turn the studio also refuses any `.claude` folder beneath `plan/`, naming
|
|
535
549
|
the folder, so skills planted by a different kind of turn cannot load.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
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` and `ape deploy`/`ape server deploy` (bare, `pnpm` and `npx`), `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
|
+
|
|
552
|
+
#### Permissions follow the level
|
|
553
|
+
|
|
554
|
+
Every Claude turn takes its mode from the level in effect (`claude-permissions.ts`); planning and loop below Autopilot keep `dontAsk` (above):
|
|
555
|
+
|
|
556
|
+
| Level | Mode | Step list | A call outside it |
|
|
557
|
+
|---|---|---|---|
|
|
558
|
+
| You drive, Review, Lead | `acceptEdits` | yes | the turn pauses on the card |
|
|
559
|
+
| Autopilot | `auto` (Claude Code's classifier) | none | the classifier decides |
|
|
560
|
+
| Autopilot with Never ask | `bypassPermissions` | none | runs |
|
|
561
|
+
|
|
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
|
+
- **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, and `git push` (and its plumbing, `git send-pack`), 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. **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`, 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
|
+
- 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
|
+
- 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
|
+
- **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.
|
|
568
|
+
- **OpenCode** on Autopilot, and Autopilot with Never ask, runs `opencode run --auto` (as a contained studio does at every level): `--auto` approves every ask and keeps explicit denies, and design turns lose their command list, so nothing outside a list is refused. Below Autopilot an uncontained turn is unchanged: no `--auto`, and design turns keep their list. At every level, contained or not, its `OPENCODE_CONFIG_CONTENT` holds the limits as its own deny rules (`opencode-config.ts`): `bash` patterns for the commands above (each `<command>` and `<command> *`, after any list, since the last matching rule wins), `read` and `edit` denies for the secret folders (`*.aws/*` and the rest; for a folder name the product is kept under, only by the product's own path, `<product>/*secrets/*`, at its top, `secrets/*`, and in the home folder) and `*.env.prod*`/`*.env.staging*`, and `webfetch: deny`; OpenCode has no hook and no card, so a download is refused rather than held for a click. **Gaps:** its patterns match the command's text, so another spelling of a limit (`git -C x push`, a script that pushes) still runs, and its shell can read any file a command names.
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
Every start and resume passes `--strict-mcp-config`, so ambient MCP servers do not start; the permission tool's server is the only one a launch adds.
|
|
539
572
|
Claude's command lists (prefix rules use a command boundary, never `pnpm ape *`):
|
|
540
573
|
|
|
541
574
|
- Every work: read-only git relies on Claude Code's own checks, without allow rules.
|
|
542
575
|
- Planning and loop: `pnpm ape change` (exact list command), `pnpm ape change new`.
|
|
543
|
-
- Design: `pnpm ape design check`, `pnpm ape i18n check`, `pnpm ape design diff`, `pnpm ape prototype snapshot`, `pnpm ape prototype data`, `pnpm ape prototype version`, `pnpm ape prototype export
|
|
576
|
+
- Design: `pnpm ape design check`, `pnpm ape i18n check`, `pnpm ape design diff`, `pnpm ape prototype snapshot`, `pnpm ape prototype data`, `pnpm ape prototype version`, `pnpm ape prototype export`, `pnpm format` (exact).
|
|
544
577
|
- Brand and Prototype (`work: design`) also allow exact `pnpm test`, `pnpm typecheck` and `pnpm lint` when the product declares those nonempty scripts in `package.json`, exact `pnpm ape size` when it declares a nonempty `ape` script or has the installed CLI binary, and the selected change's `doneWhen` invocations from the same change reader when they name nonempty `test`, `typecheck`, `check`, `verify` or `lint` package scripts or their colon variants. Only exact `pnpm <script>`, `pnpm run <script>` or `pnpm ape size` forms get grants, without appended arguments, except `pnpm run test --force` and `pnpm run typecheck --force` (Turbo's cache off; pnpm's own `pnpm test` rejects the flag), granted only when that script is exactly `turbo run <task>` and asked for when a result says cached; other declarations are reported as not run. No change selected adds no change commands. The prompts require running checks before finishing and reporting results or why they did not run in the existing chat. These are agent reports. OpenCode gives these steps a shell allow-list for design and declared checks; Codex retains its existing profile without a command allow-list.
|
|
545
578
|
- Validation: `pnpm ape design check`, `pnpm ape i18n check`, `pnpm ape prototype data`, `pnpm ape prototype snapshot`.
|
|
546
579
|
- Coding, tests and fixes, in the change's worktree: `pnpm ape manifest`, `pnpm ape i18n check`, `pnpm ape migrate` (exact), `pnpm ape migrate create`, `pnpm ape migrate down`, `pnpm ape change <id>` and `pnpm ape change <id> --check` (exact, the worktree branch's own id only), `pnpm ape change trailers`, `pnpm test`, `pnpm typecheck`, `pnpm lint`, `pnpm verify`, `pnpm coverage` and `pnpm ape coverage` (the table of each package's coverage from the last test run; run `pnpm test` first), `pnpm ape prototype data` (`--check --change <id>`: the sample data against the approved version; design and validation turns have it too), `git add`, `git commit`, `git merge main` (exact, so a conflicted catch-up's fixes chat can merge main and resolve it). A Claude coding turn's instructions name this list, and every coding turn's say that `pnpm ape add` is the person's decision: it grants what an extension reads and the hosts it calls.
|
|
@@ -554,7 +587,7 @@ For a Claude coding, tests or fixes launch, Studio sets `CLAUDE_CODE_TMPDIR` to
|
|
|
554
587
|
Monitor stays out of the allowed tools. The SDK's `sdk-tools.d.ts` declares `MonitorInput.command` as a shell command or script. Claude refusals in these turns carry a reason and an alternative in chat. Codex and OpenCode still report refusals when their CLI reports one, with the original wording.
|
|
555
588
|
|
|
556
589
|
`package.json`, `.githooks` and `node_modules` are editable in coding worktrees. The merge holds writes to paths protected on main. Ape's git commands run without the change's hooks, and the done-when checks still run the change's code on this computer (see Work, above).
|
|
557
|
-
For now, OpenCode's coding, tests and fixes turns have no command limits: its bash allow list exists only for Brand and Prototype design turns.
|
|
590
|
+
For now, OpenCode's coding, tests and fixes turns have no command list, only the limits' denies: its bash allow list exists only for Brand and Prototype design turns below Autopilot.
|
|
558
591
|
|
|
559
592
|
Claude Code runs a chained command only when every part is allowed on its own, so
|
|
560
593
|
`git merge main; git push` is refused. No other work gets a merge rule.
|
|
@@ -662,12 +695,14 @@ the studio. Unknown measurements are never shown as healthy.
|
|
|
662
695
|
`mountStudio(el, { token, parts })` takes optional `HostParts` from
|
|
663
696
|
`@buffcore/admin-shell/workbench`: `Partial<Record<DrawPlaceId, readonly HostPart[]>>`.
|
|
664
697
|
A `HostPart` has an `id`, an optional already-localized `label` (its host badge), and
|
|
665
|
-
`draw(state: StudioState, passed?: unknown): ReactNode`.
|
|
698
|
+
`draw(state: StudioState, passed?: unknown, subject?: unknown): ReactNode`. Only the three places
|
|
699
|
+
with a subject (below) pass the third argument, as plain JSON; every other place draws with two. Parts keep registration order
|
|
666
700
|
and redraw with current facts. No registration draws no elements or spacing.
|
|
667
701
|
`PlaceId`, `DrawPlaceId` and `PLACE_VERSIONS` come from `@buffcore/contracts/workbench`.
|
|
668
702
|
|
|
669
703
|
Every place starts at version **1**. Renaming, removing, moving or changing what a
|
|
670
|
-
place passes requires a new version and upgrade notes
|
|
704
|
+
place passes requires a new version and upgrade notes; `side:prototype` is at **2**, since it moved
|
|
705
|
+
beside the prototype. The nineteen place families:
|
|
671
706
|
|
|
672
707
|
| Place | Where | Passed value |
|
|
673
708
|
|---|---|---|
|
|
@@ -679,15 +714,15 @@ place passes requires a new version and upgrade notes. The nineteen place famili
|
|
|
679
714
|
| `screen` | Replaces the entire frame while registered | Nothing |
|
|
680
715
|
| `side:brief` | End of Brief's side column | Nothing |
|
|
681
716
|
| `side:release` | Beside the release's checks | Nothing |
|
|
682
|
-
| `side:prototype` |
|
|
717
|
+
| `side:prototype` | A column beside the prototype; on a phone a tab named with its first part's label (else the host's `label`) | Nothing; subject `{ change, version }` |
|
|
683
718
|
| `side:work` | Beside the Work board | Nothing |
|
|
684
719
|
| `agents.end` | End of Agents | Nothing |
|
|
685
720
|
| `setup.end` | End of Setup, after its last panel | Nothing |
|
|
686
721
|
| `issues.top` | Above the lists on Issues, under its banner; dormant in `ape ui` until Issues is served | Nothing |
|
|
687
722
|
| `chat.end` | After messages, before the composer | Nothing |
|
|
688
|
-
| `approve:<kind>` | End of the brand, prototype, release, money, data or plan approval | Its approval record when available |
|
|
723
|
+
| `approve:<kind>` | End of the brand, prototype, release, money, data or plan approval | Its approval record when available; `approve:release`'s subject is `{ release, approval? }`, and `approval` is absent today: it is filled once release approval records exist |
|
|
689
724
|
| `card:change` | End of each Work change card | The drawn change |
|
|
690
|
-
| `card:server` | End of a server card in Releases or Live's Servers tab | The drawn server |
|
|
725
|
+
| `card:server` | End of a server card in Releases or Live's Servers tab | The drawn server; the same server is its subject |
|
|
691
726
|
| `costs.end` | End of Live's running costs | Nothing |
|
|
692
727
|
| `dialog:host` | Hosted choice in Add a server | Nothing |
|
|
693
728
|
|
|
@@ -709,15 +744,27 @@ section "Host data for outside items".
|
|
|
709
744
|
|
|
710
745
|
A host may pass `hostParts: { 'top.end': '/host/machine.js', 'agents.end':
|
|
711
746
|
'/host/agents.js', 'top.below': '/host/usage.js' }` to `createUiServer`, with
|
|
712
|
-
`signIn`. The
|
|
713
|
-
`setup.end
|
|
747
|
+
`signIn`. The eight places a module can fill are `top.end`, `top.below`, `agents.end`,
|
|
748
|
+
`setup.end`, `issues.top`, `side:prototype`, `approve:release` and `card:server`; no other place
|
|
749
|
+
is accepted. `HostPartSources` and `HostSubjects` are exported from `@buffcore/contracts/workbench`.
|
|
750
|
+
The map takes two more keys:
|
|
751
|
+
|
|
752
|
+
- `rail: [{ id, label, source, icon? }]`, at most eight entries with unique ids (lowercase letters,
|
|
753
|
+
digits and dashes): rows at the rail's end, drawn like the studio's own rows; each opens its
|
|
754
|
+
module on the `page` place, in the main area. `icon` names one of the studio's icons; an unknown
|
|
755
|
+
name draws the default.
|
|
756
|
+
- `label`, the host's already-localized name (one line, up to 40 characters): the heading over its
|
|
757
|
+
rail entries and the badge on its modules at `approve:release` and `card:server`.
|
|
714
758
|
The map is programmatic host code, never product files, environment or agent inputs.
|
|
715
759
|
Only root-relative same-origin URLs are accepted; the host or proxy serves the modules.
|
|
716
760
|
BuffCore neither bundles nor proxies them. The built-in page reads escaped JSON
|
|
717
761
|
source descriptors; its public HTML and shared script carry no viewer or credentials.
|
|
718
762
|
|
|
719
|
-
Each module exports one named `mount(element, viewer)`, optionally returning a cleanup
|
|
720
|
-
function (`StudioHostPartModule` from `@buffcore/admin-shell/workbench`).
|
|
763
|
+
Each module exports one named `mount(element, viewer, subject?)`, optionally returning a cleanup
|
|
764
|
+
function (`StudioHostPartModule` from `@buffcore/admin-shell/workbench`). Only `side:prototype`,
|
|
765
|
+
`approve:release` and `card:server` pass a subject (`HostSubjects`), as plain JSON copied from
|
|
766
|
+
what the studio draws; the other places and rail pages call `mount` with two arguments. A changed
|
|
767
|
+
subject cleans up and remounts that place alone; an equal subject keeps the mount. It loads only
|
|
721
768
|
after authenticated state supplies a validated Viewer, including the exact rights and
|
|
722
769
|
optional `own`. No state, token, request, dispatcher or private settings are arguments.
|
|
723
770
|
Unchanged polls keep the mount; viewer changes, sign-out, failed state reads and
|
|
@@ -725,6 +772,23 @@ unmount clean it up. A late import for a previous viewer is discarded. Imports a
|
|
|
725
772
|
mount failures affect only their own place. With no sources there are no imports or
|
|
726
773
|
layout changes. Existing trusted React `parts` remain supported alongside modules.
|
|
727
774
|
|
|
775
|
+
### A host theme
|
|
776
|
+
|
|
777
|
+
`createUiServer({ theme })` takes the same `Theme` that `studioTheme` is. Make one with
|
|
778
|
+
`extendStudioTheme({ key, label, color: { light, dark }, … })` from
|
|
779
|
+
`@buffcore/admin-shell/workbench`: the studio's theme with the host's tokens over it, keeping the
|
|
780
|
+
studio's two set-aside checks (`extendTheme` takes starter themes only). At start every value is
|
|
781
|
+
read by its kind, then the theme runs `checkTheme`; any problem refuses to start, with every problem
|
|
782
|
+
listed. Modes are only the studio's (light, dark, contrast); colors are `#rrggbb`, `rgb()` or
|
|
783
|
+
`rgba()`; numbers and easings are finite numbers; shadows are `none` or lengths, colors and `inset`
|
|
784
|
+
separated by commas; a product token is a color, a length, a number or a shadow; token names are
|
|
785
|
+
lowercase letters, digits and dashes; font families are letters, digits, spaces, dashes and
|
|
786
|
+
underscores. A host's theme may set aside only the studio's own two checks (`allow:
|
|
787
|
+
['control-edges', 'status-words']`); any other entry is refused. `toCss` also leaves out any
|
|
788
|
+
declaration or mode name that would leave its rule, so no theme's text becomes CSS of its own. The page gets the theme as escaped JSON data; the studio's layout stays. The
|
|
789
|
+
option sets tokens only: a font the studio does not ship must already be available to the
|
|
790
|
+
browser, or the fallback draws. No `theme` serves the page as before.
|
|
791
|
+
|
|
728
792
|
**These are trusted host modules running on the host's own page, not an isolation
|
|
729
793
|
boundary.** They have the page's ordinary browser privileges. Registering a module
|
|
730
794
|
grants no API rights and changes no POST Origin or authorization checks. The host
|
|
@@ -968,9 +1032,9 @@ Contained Codex turns keep the product's deny-read profile, network-off default,
|
|
|
968
1032
|
Contained OpenCode uses `--auto`, which retains explicit read denies, and a runtime
|
|
969
1033
|
`OPENCODE_CONFIG_CONTENT` overlay disables its `ape` MCP server without replacing
|
|
970
1034
|
the product's permissions. `--auto` approves every other ask, including folders outside the
|
|
971
|
-
product and OpenCode's own `.env` ask. Outside Brand and Prototype design turns the studio sets no `bash` rule, so its shell is open:
|
|
1035
|
+
product and OpenCode's own `.env` ask. Outside Brand and Prototype design turns the studio sets no `bash` rule but the limits' denies, so its shell is otherwise open:
|
|
972
1036
|
in a contained studio the machine really is the boundary. Claude's per-work permissions, including planning's
|
|
973
|
-
dontAsk and disabled hooks, remain unchanged. User-level CLI settings still apply.
|
|
1037
|
+
dontAsk and disabled hooks below Autopilot, remain unchanged. User-level CLI settings still apply.
|
|
974
1038
|
The agents' container (`ape agents run`) can set this option in a later change;
|
|
975
1039
|
its protected implementation is unchanged here.
|
|
976
1040
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buffcore/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.42",
|
|
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/
|
|
49
|
-
"@buffcore/build-agent": "0.8.
|
|
50
|
-
"@buffcore/config": "0.8.
|
|
51
|
-
"@buffcore/
|
|
52
|
-
"@buffcore/
|
|
53
|
-
"@buffcore/server": "0.8.
|
|
54
|
-
"@buffcore/
|
|
55
|
-
"@buffcore/tokens": "0.8.
|
|
56
|
-
"@buffcore/
|
|
48
|
+
"@buffcore/contracts": "0.8.42",
|
|
49
|
+
"@buffcore/build-agent": "0.8.42",
|
|
50
|
+
"@buffcore/config": "0.8.42",
|
|
51
|
+
"@buffcore/modules": "0.8.42",
|
|
52
|
+
"@buffcore/db": "0.8.42",
|
|
53
|
+
"@buffcore/server": "0.8.42",
|
|
54
|
+
"@buffcore/i18n": "0.8.42",
|
|
55
|
+
"@buffcore/tokens": "0.8.42",
|
|
56
|
+
"@buffcore/storage": "0.8.42"
|
|
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.42"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "node ../../scripts/build-package.mjs && node scripts/bundle.mjs",
|
|
@@ -18,13 +18,17 @@ Run it when:
|
|
|
18
18
|
|
|
19
19
|
Run it as a fresh agent, never the one that drew the looks and never in the same turn that built
|
|
20
20
|
them: a new studio turn or a new session, which reads the repository and the snapshot, not the
|
|
21
|
-
drawing agent's account of them.
|
|
21
|
+
drawing agent's account of them. The agent that drew the scenes never runs this skill in its own
|
|
22
|
+
turn, even when asked to finish the prototype: it ends its turn after the passing full snapshot and
|
|
23
|
+
says the critique comes next, as a turn of its own.
|
|
22
24
|
|
|
23
25
|
## Read before you score
|
|
24
26
|
|
|
25
|
-
1. **Look first.** Open the
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
1. **Look first.** Open the desktop and 390 px screenshots from the passing snapshot (desktop scenes
|
|
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. Look for them first in
|
|
30
|
+
`design/references.md` (the reference study and its pictures' paths), then in `design/` and
|
|
31
|
+
`plan/`, including links in `plan/changes/`. Read only what locates the images. If
|
|
28
32
|
there are no references, write "no references on file" and name the best examples you know in
|
|
29
33
|
the same field to score against. Include the approved comp in the comparison whenever available.
|
|
30
34
|
2. Write two or three plain sentences about what you see: rhythm, density, contrast and whether the
|
|
@@ -7,7 +7,7 @@ description: "Keep a product's design system in design/: its written contract (D
|
|
|
7
7
|
|
|
8
8
|
A product's look and words live in one folder, `design/`, at its root (THEMING_AND_UI.md, "The design system"; PROCESS.md, stage 3). Screens draw only with it, so a change of look is a change there, seen in every scene. In BuffCore's repository, the playground's `apps/playground/design/` is the example.
|
|
9
9
|
|
|
10
|
-
**Choosing a look with a person
|
|
10
|
+
**Choosing a look with a person happens in the studio's Brand step** (`ape ui`). Without the studio, you set the design system up by hand, as below; the format and the checks are the same.
|
|
11
11
|
|
|
12
12
|
## The format
|
|
13
13
|
|
|
@@ -15,15 +15,26 @@ A product's look and words live in one folder, `design/`, at its root (THEMING_A
|
|
|
15
15
|
|---|---|
|
|
16
16
|
| `design/DESIGN.md` | The contract: direction; **voice, tone and character**; visual theme; color roles; typography; components; layout and density; motion; depth; do's and don'ts; the agent guide |
|
|
17
17
|
| `design/manifest.json` | Its identity and provenance: `schemaVersion` (`buffcore-design-system/v1`), `id` (the product's name), `name`, `source`, and the declared `DESIGN.md` and `theme.ts` |
|
|
18
|
-
| `design/theme.ts` | The product's `theme`: a starter theme (`themes.neutral`) or one made with `extendTheme`. The app, the console and the prototype take it from here |
|
|
18
|
+
| `design/theme.ts` | The product's `theme`: a starter theme (`themes.clear`, `themes.warm` or `themes.bold`, the Brand step's three; `themes.neutral` and `themes.soft` stay) or one made with `extendTheme`. The app, the console and the prototype take it from here |
|
|
19
19
|
| `design/components/` | The product's own components, one per file, named as the file (`Card.tsx` exports `Card`), built from BuffCore's and reading only tokens |
|
|
20
20
|
| `design/showcase.ts` | `showcase`: one scene per component, its view (`<Name>Showcase`) showing every state side by side; `prototype/scenes.ts` adds them to its scenes |
|
|
21
21
|
|
|
22
|
+
## Reference study
|
|
23
|
+
|
|
24
|
+
Before choosing a direction, study real products. If the person already gave a brand or a study (a folder or file they point to), read that instead and skip the capture.
|
|
25
|
+
|
|
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
|
+
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
|
+
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.
|
|
30
|
+
|
|
31
|
+
Learn patterns; copy no brand. No logo, name, color or layout is lifted from a single product.
|
|
32
|
+
|
|
22
33
|
## Choose a direction
|
|
23
34
|
|
|
24
35
|
Five original starting directions are in `references/directions/`: **Clear and calm** (tools and dashboards), **Warm and human** (people and services), **Technical and precise** (developers and operators), **Bold and playful** (creators and consumers), **Editorial and considered** (writing and taste). Each is a short `DESIGN.md` with a voice and a starting palette.
|
|
25
36
|
|
|
26
|
-
1. Read the brief
|
|
37
|
+
1. Read the brief, the journeys and `design/references.md`. With the person, choose the direction that fits the audience, the jobs and the study, or adjust one, or bring a brand.
|
|
27
38
|
2. Put the chosen direction into `design/DESIGN.md`, in the product's own words; put its values into `design/theme.ts` (the brand ramp, fonts, radius) and add the product's details. `manifest.json` names the product.
|
|
28
39
|
3. Run `pnpm ape design check`; then the snapshot; then `ape-critique` when the look changes.
|
|
29
40
|
|
|
@@ -7,7 +7,7 @@ description: "Plan a product change by change from the brief, journeys and app s
|
|
|
7
7
|
|
|
8
8
|
A product is built change by change. The plan lives in the repository: `plan/brief.md` (the idea and the jobs), `plan/journeys.md` (the paths and states), `plan/structure.md` (the sections), `plan/roadmap.md` and one file per change in `plan/changes/`. Status is never written in them: it follows from git and the checks.
|
|
9
9
|
|
|
10
|
-
Before the first plan, if idea or journey notes are in one sibling folder, ask the person to replace `../<folder>` in `{"permissions":{"additionalDirectories":["../<folder>"]}}` with that folder and merge it into the git-ignored `.claude/settings.local.json` themselves, keeping existing settings. This lets Claude Code read and change files in that folder.
|
|
10
|
+
Before the first plan, if idea or journey notes are in one sibling folder, ask the person to replace `../<folder>` in `{"permissions":{"additionalDirectories":["../<folder>"]}}` with that folder and merge it into the git-ignored `.claude/settings.local.json` themselves, keeping existing settings. This lets Claude Code read and change files in that folder. Or, after a refused read, the person presses Allow this folder in the agent panel.
|
|
11
11
|
|
|
12
12
|
## Read-back, before the plan and journeys
|
|
13
13
|
|
|
@@ -43,9 +43,13 @@ Use one table, one row per section, with this exact header:
|
|
|
43
43
|
`| Section | First screen | Who | Place | Main |`. Main is `yes` or `no`; several rows can
|
|
44
44
|
be main (the starter has Home and Settings both main). File order ranks the main sections.
|
|
45
45
|
Names must be distinct within the same place and audience; Settings in app and console is fine.
|
|
46
|
-
First screen uses an existing inventory route (`/`, `/settings`) or console screen name
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
First screen uses an existing inventory route (`/`, `/settings`) or console screen name.
|
|
47
|
+
A section a planned change adds names that change: `/billing (planned, C-020)`, where
|
|
48
|
+
C-020's file lists `'/billing'` under `touches.screens`. The studio shows it as planned until
|
|
49
|
+
the route exists, then as an ordinary row (the suffix can stay or go). Never invent a route
|
|
50
|
+
no change plans. The small CLI plan reader refuses missing or unknown first screens, a
|
|
51
|
+
planned screen its change does not list, repeated names, malformed rows and absent notes,
|
|
52
|
+
naming the offending row.
|
|
49
53
|
Nested screens go in short notes after the table: name their owning section and return target.
|
|
50
54
|
Sign-in/out and denied paths name a return or safe next destination. Add phone and wide-screen
|
|
51
55
|
notes: up to five phone places; over five, first four main sections plus More; wider, a labelled
|
|
@@ -95,7 +99,7 @@ Then the goal, the scope, the screens, what the person using it will ask and the
|
|
|
95
99
|
|
|
96
100
|
## Using it
|
|
97
101
|
|
|
98
|
-
In a studio planning or loop turn, run only `pnpm ape change` and `pnpm ape change new`: neither loads the product's code. `pnpm ape change` reports each change file's header problems. Read existing modules, screens and tables from the product's files with read tools; `pnpm ape manifest` and `pnpm ape change C-012` load product code and are unavailable in these turns. The checks in `doneWhen` run later, in a build turn or by the person.
|
|
102
|
+
In a studio planning or loop turn, run only `pnpm ape change` and `pnpm ape change new`: neither loads the product's code. `pnpm ape change` reports each change file's header problems. Read existing modules, screens and tables from the product's files with read tools; `pnpm ape manifest` and `pnpm ape change C-012` load product code and are unavailable in these turns. The checks in `doneWhen` run later, in a build turn or by the person. When a studio turn needs the person's decision, ask one short question on the turn's ask line (its instructions give the exact form), then stop: the studio shows the question on the step's page and the person answers in the chat.
|
|
99
103
|
|
|
100
104
|
- `pnpm ape change` lists the changes and reports any malformed file with the file and the field.
|
|
101
105
|
- Outside studio planning, `pnpm ape change C-012` prints the change, its branch and what it touches: each module, screen and table found in `pnpm ape manifest` (with its file), or new.
|
|
@@ -14,6 +14,11 @@ Start each prototype journey from the moment in the person's normal day describe
|
|
|
14
14
|
moment. Play the actions and branches through to the outcome, showing what takes over and what the
|
|
15
15
|
agreed brief says the person keeps using.
|
|
16
16
|
|
|
17
|
+
Give every journey a role: who it is for, one of the people in `plan/journeys.md`. Its row names
|
|
18
|
+
them in the Actor column, and its entry in `prototype/journeys.ts` has a `role` (an i18n key) the
|
|
19
|
+
studio's picker groups by. Ask the person when a journey's role is unclear. `ape design check`
|
|
20
|
+
warns, without failing, about a journey that names none.
|
|
21
|
+
|
|
17
22
|
After Journeys, use `ape-plan-change`'s Structure questions and write `plan/structure.md`:
|
|
18
23
|
one table (Section, First screen, Who, Place, Main), followed by short notes for nested
|
|
19
24
|
screens' owning sections and return targets, phone and wide screens. Offer a draft from the
|
|
@@ -26,6 +31,8 @@ grants no access. SA4 adds coverage and traversal evidence later; do not claim t
|
|
|
26
31
|
|
|
27
32
|
## The working app, and the scenes
|
|
28
33
|
|
|
34
|
+
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`.
|
|
35
|
+
|
|
29
36
|
The prototype is **one app** over a small store (PROTOTYPE.md; PROCESS.md, stage 4): `prototype/store.ts` (the records and the actions), `seeds.ts` (the named states), `journeys.ts` (the journeys from `plan/journeys.md`) and `home.tsx` (the real shell and screens, with the states and journeys panel outside them). The runtime is `PrototypeHomeRoute` from `@buffcore/app-shell/prototype`: `home.tsx` passes it the store, the states, the journeys, the product's catalogs and a `render` for its screens. The dev-only `apps/app/src/app/prototype.tsx` loads it at `/prototype` behind `__DEV__`; `_layout.tsx` keeps that path outside the app shell. The app is what a person reviews and plays; the scenes are saved states for the snapshot and approval. When a screen changes, change the view and the state that shows it; when a journey changes, update `plan/journeys.md` and the prototype's journeys. After the snapshot, `ape-critique` reviews the app; the version record holds the approval. The scenes below remain the proof the snapshot checks.
|
|
30
37
|
|
|
31
38
|
When screens disagree about people, messages, counts or amounts, fix the shared model or how the screens read it and add an invariant to the product's tests. Never patch a single screen to make its numbers agree. Check the invariant in each named state and after each journey step. Pass derived counts and amounts through `t()` placeholders formatted with `Intl`.
|
|
@@ -40,7 +47,7 @@ When screens disagree about people, messages, counts or amounts, fix the shared
|
|
|
40
47
|
|
|
41
48
|
**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.
|
|
42
49
|
|
|
43
|
-
**The critique, by a fresh agent.** After the full snapshot passes and before `ape prototype version`, an agent that did not draw the looks runs `ape-critique` on it (a studio turn of its own, or a new session), and its P0s are fixed first. 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.
|
|
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 (a studio turn of its own, or a new session), and its P0s are fixed first. 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.
|
|
44
51
|
|
|
45
52
|
**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).
|
|
46
53
|
|
|
@@ -19,6 +19,8 @@ export default {
|
|
|
19
19
|
'prototype.journey.language.one': 'Home; Settings is one tap away.',
|
|
20
20
|
'prototype.journey.language.two': 'Settings: choose Spanish and the app switches.',
|
|
21
21
|
'prototype.journey.language.three': 'Back home, in Spanish.',
|
|
22
|
+
'prototype.role.member': 'Member',
|
|
23
|
+
'prototype.role.owner': 'Owner',
|
|
22
24
|
'prototype.signIn.wrongPassword': "That email and password don't match. Try again.",
|
|
23
25
|
'prototype.themeText.title': 'Theme color',
|
|
24
26
|
'prototype.themeText.sample': 'This text uses a color from your theme.',
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"prototype.journey.language.one": "Inicio; Configuración está a un toque.",
|
|
19
19
|
"prototype.journey.language.two": "Configuración: elige español y la app cambia.",
|
|
20
20
|
"prototype.journey.language.three": "De vuelta a Inicio, en español.",
|
|
21
|
+
"prototype.role.member": "Miembro",
|
|
22
|
+
"prototype.role.owner": "Propietario",
|
|
21
23
|
"prototype.signIn.wrongPassword": "Ese correo y esa contraseña no coinciden. Inténtalo de nuevo.",
|
|
22
24
|
"prototype.themeText.title": "Color del tema",
|
|
23
25
|
"prototype.themeText.sample": "Este texto usa un color de tu tema.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A BuffCore product. Its rules and plan are in [AGENTS.md](AGENTS.md), and the skill for each kind of job is in `.claude/skills/` (start with `ape-plan-change`).
|
|
4
4
|
|
|
5
|
-
Before the first plan, if idea or journey notes are in one sibling folder, replace `../<folder>` in `{"permissions":{"additionalDirectories":["../<folder>"]}}` with that folder and merge it into the git-ignored `.claude/settings.local.json` yourself, keeping existing settings. This lets Claude Code read and change files in that folder.
|
|
5
|
+
Before the first plan, if idea or journey notes are in one sibling folder, replace `../<folder>` in `{"permissions":{"additionalDirectories":["../<folder>"]}}` with that folder and merge it into the git-ignored `.claude/settings.local.json` yourself, keeping existing settings. This lets Claude Code read and change files in that folder. Or wait: after a refused read, the agent panel offers Allow this folder.
|
|
6
6
|
|
|
7
7
|
## Run it
|
|
8
8
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// The themes' fonts, served with the admin (Fontsource, OFL): no page asks Google for them.
|
|
2
|
-
//
|
|
2
|
+
// The design system's own fonts go in design/fonts/: the console loads them by the theme's family
|
|
3
|
+
// names (THEMING_AND_UI.md, "Fonts").
|
|
3
4
|
import '@fontsource/ibm-plex-mono/400.css';
|
|
4
5
|
import '@fontsource/ibm-plex-mono/600.css';
|
|
5
6
|
import '@fontsource/nunito/400.css';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Fonts } from '@buffcore/app-shell';
|
|
2
2
|
|
|
3
|
-
// Bundled starter fonts (Fontsource, OFL). Use the theme's family names as keys.
|
|
3
|
+
// Bundled starter fonts (Fontsource, OFL). Use the theme's family names as keys. A family from
|
|
4
|
+
// the design system takes one line here, by hand: 'Family Name':
|
|
5
|
+
// require('../../../design/fonts/<file>.ttf'). Use a TTF or OTF file: phones load only those
|
|
6
|
+
// (a WOFF2 file is for the console and the web). The milestone scan refuses require.context, so
|
|
7
|
+
// the app cannot list design/fonts/ by itself.
|
|
4
8
|
export const fonts: Fonts = {
|
|
5
9
|
'Public Sans': require('../assets/fonts/PublicSans.ttf'),
|
|
6
10
|
Nunito: require('../assets/fonts/Nunito.ttf'),
|
|
@@ -18,6 +18,8 @@ export default {
|
|
|
18
18
|
'prototype.journey.language.one': 'Home; Settings is one tap away.',
|
|
19
19
|
'prototype.journey.language.two': 'Settings: choose Spanish and the app switches.',
|
|
20
20
|
'prototype.journey.language.three': 'Back home, in Spanish.',
|
|
21
|
+
'prototype.role.member': 'Member',
|
|
22
|
+
'prototype.role.owner': 'Owner',
|
|
21
23
|
'prototype.signIn.wrongPassword': "That email and password don't match. Try again.",
|
|
22
24
|
'prototype.themeText.title': 'Theme color',
|
|
23
25
|
'prototype.themeText.sample': 'This text uses a color from your theme.',
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"prototype.journey.language.one": "Inicio; Configuración está a un toque.",
|
|
18
18
|
"prototype.journey.language.two": "Configuración: elige español y la app cambia.",
|
|
19
19
|
"prototype.journey.language.three": "De vuelta a Inicio, en español.",
|
|
20
|
+
"prototype.role.member": "Miembro",
|
|
21
|
+
"prototype.role.owner": "Propietario",
|
|
20
22
|
"prototype.signIn.wrongPassword": "Ese correo y esa contraseña no coinciden. Inténtalo de nuevo.",
|
|
21
23
|
"prototype.themeText.title": "Color del tema",
|
|
22
24
|
"prototype.themeText.sample": "Este texto usa un color de tu tema."
|
|
@@ -11,6 +11,7 @@ export const journeys: readonly PrototypeJourney<State, Screen, Action>[] = [
|
|
|
11
11
|
{
|
|
12
12
|
key: 'j1',
|
|
13
13
|
title: 'prototype.journey.firstRun',
|
|
14
|
+
role: 'prototype.role.member',
|
|
14
15
|
base: 'signed-out',
|
|
15
16
|
steps: [
|
|
16
17
|
{
|
|
@@ -33,6 +34,7 @@ export const journeys: readonly PrototypeJourney<State, Screen, Action>[] = [
|
|
|
33
34
|
{
|
|
34
35
|
key: 'j2',
|
|
35
36
|
title: 'prototype.journey.language',
|
|
37
|
+
role: 'prototype.role.member',
|
|
36
38
|
base: 'home',
|
|
37
39
|
steps: [
|
|
38
40
|
{
|
|
@@ -56,6 +58,7 @@ export const journeys: readonly PrototypeJourney<State, Screen, Action>[] = [
|
|
|
56
58
|
{
|
|
57
59
|
key: 'j3',
|
|
58
60
|
title: 'prototype.journey.activity',
|
|
61
|
+
role: 'prototype.role.owner',
|
|
59
62
|
base: 'activity',
|
|
60
63
|
steps: [
|
|
61
64
|
{
|