mapples 0.2.0-beta.6 → 0.2.0-beta.8
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/README.md +26 -14
- package/dist/api/agent.d.ts +2 -1
- package/dist/api/agent.js.map +1 -1
- package/dist/api/errors.js +4 -2
- package/dist/api/errors.js.map +1 -1
- package/dist/commands/agent.js +4 -3
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/create.js +1 -1
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/impl/agentImpl.js +11 -8
- package/dist/commands/impl/agentImpl.js.map +1 -1
- package/dist/commands/impl/createImpl.js +6 -6
- package/dist/commands/impl/createImpl.js.map +1 -1
- package/dist/commands/impl/initImpl.js +6 -6
- package/dist/commands/impl/initImpl.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/project/agentState.js +1 -1
- package/dist/project/agentState.js.map +1 -1
- package/dist/services/agentInstall.d.ts +45 -10
- package/dist/services/agentInstall.js +169 -63
- package/dist/services/agentInstall.js.map +1 -1
- package/dist/services/scaffold.js +1 -1
- package/dist/services/scaffold.js.map +1 -1
- package/dist/style/theme.js +17 -1
- package/dist/style/theme.js.map +1 -1
- package/package.json +1 -1
- package/templates/agent/agents-md/AGENTS.md +8 -0
- package/templates/{claude → agent/claude}/CLAUDE.md +1 -1
- package/templates/agent/codex/config.toml +6 -0
- package/templates/agent/cursor/mcp.json +10 -0
- package/templates/{claude → agent}/mapples.md +12 -12
- package/templates/{claude → agent}/skills/mapples-conventions/SKILL.md +5 -5
- package/templates/{claude → agent}/skills/mapples-design/SKILL.md +24 -24
- package/templates/{claude → agent}/skills/mapples-design/reference/component-library.md +2 -2
- package/templates/{claude → agent}/skills/mapples-design/reference/design-tokens.md +4 -4
- package/templates/{claude → agent}/skills/mapples-design/reference/layout-contract.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/lint-checklist.md +3 -3
- package/templates/{claude → agent}/skills/mapples-design/reference/plan.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/empty-states.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/forms-and-auth.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/home-dashboard.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/list-and-detail.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/microcopy.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/navigation-chrome.md +2 -2
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/onboarding-flow.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/screen-flow-wiring.md +2 -2
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/settings-profile.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/stats-and-progress.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/visual-hierarchy.md +1 -1
- package/templates/{claude → agent}/skills/mapples-design/reference/style-guides.md +1 -1
- package/templates/{claude → agent}/skills/mapples-sync/SKILL.md +12 -11
- package/templates/app.json +0 -1
- package/templates/package.json +11 -10
- /package/templates/{claude → agent/claude}/mcp.json +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mapples-design
|
|
3
|
-
description: Build a Mapples-linked Expo app from a product brief the way the Creator's in-app AI does — design tokens, an implementation plan, one screen per phase from the design playbooks, wiring and a review — writing route files and mapples/theme.ts and pushing each phase with `mapples sync` while holding the project's agent lease. Use when the user asks to design, generate or build the app, its screens or its design system.
|
|
3
|
+
description: Build a Mapples-linked Expo app from a product brief the way the Creator's in-app AI does — design tokens, an implementation plan, one screen per phase from the design playbooks, wiring and a review — writing route files and mapples/theme.ts and pushing each phase with `npx -y mapples@__CLI_VERSION__ sync` while holding the project's agent lease. Use when the user asks to design, generate or build the app, its screens or its design system.
|
|
4
4
|
argument-hint: "<product brief> [--scope single|minimal|basic|advanced]"
|
|
5
5
|
---
|
|
6
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
7
|
-
#
|
|
6
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
7
|
+
# mapples-design — build the app from a brief
|
|
8
8
|
|
|
9
9
|
You are the product designer and builder for this app. Your bar is a finished screen a
|
|
10
10
|
designer would ship — not a wireframe. Everything you make is a file in this repo; every phase
|
|
11
|
-
ends with `mapples sync --yes --json`, which pushes it to Creator where the user watches it land.
|
|
11
|
+
ends with `npx -y mapples@__CLI_VERSION__ sync --yes --json`, which pushes it to Creator where the user watches it land.
|
|
12
12
|
|
|
13
|
-
Read
|
|
13
|
+
Read `__CONVENTIONS_PATH__` and the `mapples-conventions` and `mapples-sync` skills before the
|
|
14
14
|
first file. Reference material for this skill lives next to it:
|
|
15
15
|
|
|
16
16
|
- `reference/style-guides.md` — art directions and style guides (phase 1)
|
|
@@ -24,11 +24,11 @@ first file. Reference material for this skill lives next to it:
|
|
|
24
24
|
## Preconditions
|
|
25
25
|
|
|
26
26
|
1. `.mapples/config.json` must exist (the app is linked). If not: stop and ask the user to run
|
|
27
|
-
`npx mapples init --secret <key> --agent
|
|
28
|
-
2. `mapples agent status --json`. If `session` is non-null with `status: "active"` and
|
|
27
|
+
`npx -y mapples@__CLI_VERSION__ init --secret <key> --agent __AGENT_FLAG__` — never run it yourself.
|
|
28
|
+
2. `npx -y mapples@__CLI_VERSION__ agent status --json`. If `session` is non-null with `status: "active"` and
|
|
29
29
|
`holdsLease` is false, another agent is working on this project: stop and ask whether to take
|
|
30
30
|
over (`--takeover` disconnects it). Never take over silently.
|
|
31
|
-
3. `mapples sync --yes --json` — be current before designing. Exit 2 here means the repo already
|
|
31
|
+
3. `npx -y mapples@__CLI_VERSION__ sync --yes --json` — be current before designing. Exit 2 here means the repo already
|
|
32
32
|
had conflicts: resolve them (see `mapples-sync`) before going on.
|
|
33
33
|
4. Read `mapples/design.md` if it exists: a previous run's brief, chosen style and plan. Resume
|
|
34
34
|
from the first phase whose output is missing rather than redoing everything.
|
|
@@ -46,17 +46,17 @@ progress log:
|
|
|
46
46
|
Start the session as soon as the brief and scope are known, pre-declaring every step title:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
mapples agent start --label "
|
|
49
|
+
npx -y mapples@__CLI_VERSION__ agent start --agent __AGENT_ID__ --label "__AGENT_LABEL__" --steps "Brief,Style guides,Design tokens,Plan,Scaffold navigation & screens" --json
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Exit 4 = busy (see precondition 2). After the plan exists (phase 3), the remaining titles are
|
|
53
|
-
declared as they run: `mapples agent step --index 5 --title "Build the Home screen" --status running`
|
|
53
|
+
declared as they run: `npx -y mapples@__CLI_VERSION__ agent step --index 5 --title "Build the Home screen" --status running`
|
|
54
54
|
creates the step. Wrap **every** phase:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
mapples agent step --index <i> --title "<title>" --status running --json
|
|
57
|
+
npx -y mapples@__CLI_VERSION__ agent step --index <i> --title "<title>" --status running --json
|
|
58
58
|
# … the work …
|
|
59
|
-
mapples agent step --index <i> --title "<title>" --status done --detail "<one line>" --json
|
|
59
|
+
npx -y mapples@__CLI_VERSION__ agent step --index <i> --title "<title>" --status done --detail "<one line>" --json
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Exit 3 from any `agent` or `sync` command = the lease is gone (Creator disconnected you or the
|
|
@@ -65,8 +65,8 @@ lease expired). Stop immediately, do not sync again, and tell the user what was
|
|
|
65
65
|
Always end the run — success or not:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
mapples agent stop --status done --json
|
|
69
|
-
mapples agent stop --status failed --error "<what blocked the run>" --json
|
|
68
|
+
npx -y mapples@__CLI_VERSION__ agent stop --status done --json
|
|
69
|
+
npx -y mapples@__CLI_VERSION__ agent stop --status failed --error "<what blocked the run>" --json
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
A phase's syncs are labelled with the running step in Creator's history automatically.
|
|
@@ -75,7 +75,7 @@ A phase's syncs are labelled with the running step in Creator's history automati
|
|
|
75
75
|
|
|
76
76
|
Input: `$ARGUMENTS` (the brief, optionally `--scope single|minimal|basic|advanced`). If the
|
|
77
77
|
brief is missing or too thin to name the audience, the core value and the mood, ask **one**
|
|
78
|
-
round of questions (
|
|
78
|
+
round of questions (with your multiple-choice question tool, when you have one) — audience, the one thing the app must do well, the
|
|
79
79
|
feeling it should have, and the scope if absent (default `basic`). Then write
|
|
80
80
|
`mapples/design.md`:
|
|
81
81
|
|
|
@@ -102,7 +102,7 @@ Follow `reference/design-tokens.md` exactly: write `mapples/theme.ts` (create it
|
|
|
102
102
|
file and an empty project is a no-op, so the file is what pushes the tokens). Then
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
mapples sync --yes --json
|
|
105
|
+
npx -y mapples@__CLI_VERSION__ sync --yes --json
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
Assert: `exitCode` 0, `pushedOps` ≥ 3 (Theme, Typography, Sizing updates) and no
|
|
@@ -116,10 +116,10 @@ Follow `reference/plan.md`: decisions, navigation (sections → screens), entry
|
|
|
116
116
|
build steps. Append it to `design.md` under `## Plan` **and** declare the remaining steps:
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
mapples agent step --index 5 --title "<plan step 1 title>" --status pending --json
|
|
119
|
+
npx -y mapples@__CLI_VERSION__ agent step --index 5 --title "<plan step 1 title>" --status pending --json
|
|
120
120
|
…
|
|
121
|
-
mapples agent step --index <N-1> --title "Wiring" --status pending --json
|
|
122
|
-
mapples agent step --index <N> --title "Review" --status pending --json
|
|
121
|
+
npx -y mapples@__CLI_VERSION__ agent step --index <N-1> --title "Wiring" --status pending --json
|
|
122
|
+
npx -y mapples@__CLI_VERSION__ agent step --index <N> --title "Review" --status pending --json
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
Show the plan to the user in 6–10 lines; continue unless they object.
|
|
@@ -142,7 +142,7 @@ navigation:
|
|
|
142
142
|
`pagesDir`.
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
mapples sync --yes --json
|
|
145
|
+
npx -y mapples@__CLI_VERSION__ sync --yes --json
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
Assert no conflicts, then read `.mapples/pages.json`: every scaffolded file must be a value's
|
|
@@ -167,7 +167,7 @@ For each plan step, in order:
|
|
|
167
167
|
every existing `$sid` on the element it is on, add none. Obey `reference/layout-contract.md`
|
|
168
168
|
and the chosen style guide's instructions (they outrank the contract where they differ).
|
|
169
169
|
Real copy from the brief; picsum photos in every hero/featured/thumb slot.
|
|
170
|
-
4. `mapples sync --yes --json`. Assert `exitCode` 0; read `warnings` and fix what is yours
|
|
170
|
+
4. `npx -y mapples@__CLI_VERSION__ sync --yes --json`. Assert `exitCode` 0; read `warnings` and fix what is yours
|
|
171
171
|
(NON_LITERAL_PROP on a value you can make literal, UNKNOWN_ELEMENT). Exit 2 → resolve per
|
|
172
172
|
`mapples-sync`, sync again.
|
|
173
173
|
5. Re-read the file (it now carries `$sid`s), run it through `reference/lint-checklist.md`
|
|
@@ -199,10 +199,10 @@ path from the entry screen; every screen reachable, every flow with an exit. Syn
|
|
|
199
199
|
## Phase N — Review
|
|
200
200
|
|
|
201
201
|
Load `reference/lint-checklist.md`. For every screen: re-read the file, check each item, fix.
|
|
202
|
-
Then `mapples doctor --json` (no `duplicate`/`missing` issues; `drift` is fine before the final
|
|
203
|
-
sync) and a final `mapples sync --yes --json` with exit 0. Update `design.md` with a `## Status`
|
|
202
|
+
Then `npx -y mapples@__CLI_VERSION__ doctor --json` (no `duplicate`/`missing` issues; `drift` is fine before the final
|
|
203
|
+
sync) and a final `npx -y mapples@__CLI_VERSION__ sync --yes --json` with exit 0. Update `design.md` with a `## Status`
|
|
204
204
|
line (screens built, what was cut, the one decision the user may want to change). Then
|
|
205
|
-
`mapples agent stop --status done`.
|
|
205
|
+
`npx -y mapples@__CLI_VERSION__ agent stop --status done`.
|
|
206
206
|
|
|
207
207
|
Reply to the user in 3–5 lines: what was built, where to look in Creator, the one decision to
|
|
208
208
|
revisit. No headings.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Component library — what to reach for
|
|
3
3
|
|
|
4
4
|
Two packages, one canvas. Everything below is a registered canvas type: Creator renders it,
|
|
5
|
-
its style panel edits it, and `mapples sync` round-trips it. Import primitives from
|
|
5
|
+
its style panel edits it, and `npx -y mapples@__CLI_VERSION__ sync` round-trips it. Import primitives from
|
|
6
6
|
`@mapples/ui`, the themed library from `@mapples/components`. Anything else you import is an
|
|
7
7
|
opaque `Custom` node (allowed, but Creator cannot design inside it).
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Design tokens (phase 2) — `mapples/theme.ts`
|
|
3
3
|
|
|
4
4
|
Ported from the Creator's full-variant generation (`generate.ts` `variantSystem` +
|
|
5
5
|
`schemas.ts` `designVariantSchema`). The output is a file, not a JSON reply: `mapples/theme.ts`
|
|
6
|
-
exports three **literal** objects — `theme`, `typography`, `sizing` — and `mapples sync` pushes
|
|
6
|
+
exports three **literal** objects — `theme`, `typography`, `sizing` — and `npx -y mapples@__CLI_VERSION__ sync` pushes
|
|
7
7
|
them as the project's Theme, Typography and Sizing documents.
|
|
8
8
|
|
|
9
9
|
## Rules
|
|
@@ -53,7 +53,7 @@ colors are anchors to build around), same fonts, same shape language, same iconF
|
|
|
53
53
|
## The file — copy this shape exactly, fill every value
|
|
54
54
|
|
|
55
55
|
```ts
|
|
56
|
-
// mapples/theme.ts — design tokens, synced with Creator by `mapples sync`.
|
|
56
|
+
// mapples/theme.ts — design tokens, synced with Creator by `npx -y mapples@__CLI_VERSION__ sync`.
|
|
57
57
|
// Edit values freely; keys you add here are pushed to the canvas style config.
|
|
58
58
|
|
|
59
59
|
export const theme = {
|
|
@@ -120,7 +120,7 @@ unreadable and the sync reports `NON_LITERAL_PROP … local style edits ignored`
|
|
|
120
120
|
## After writing
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
mapples sync --yes --json
|
|
123
|
+
npx -y mapples@__CLI_VERSION__ sync --yes --json
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Expect `pushedOps` ≥ 3 and `exitCode` 0. The tokens are now the project's; every style token
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Layout contract — every screen
|
|
3
3
|
|
|
4
4
|
Ported from the Creator agent's system prompt (`agent/prompt.ts`: `LAYOUT_CONTRACT`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Review checklist — the layout lint, by hand
|
|
3
3
|
|
|
4
4
|
Ported from the Creator's `designLint.ts`, which runs on every AI-authored tree before it is
|
|
@@ -43,8 +43,8 @@ photos (the scrim gradient is there), an emoji anywhere, placeholder copy ("Item
|
|
|
43
43
|
The squint test: if you blur the screen you should still see WHERE to look first and WHAT is
|
|
44
44
|
tappable. If everything is even grey noise, raise the focal point and quiet the rest.
|
|
45
45
|
|
|
46
|
-
Finally, `mapples doctor --json` must show no `duplicate` or `missing` issues, and the last
|
|
47
|
-
`mapples sync --yes --json` must exit 0 with no `warnings` of kind `UNKNOWN_ELEMENT_WITH_SID`.
|
|
46
|
+
Finally, `npx -y mapples@__CLI_VERSION__ doctor --json` must show no `duplicate` or `missing` issues, and the last
|
|
47
|
+
`npx -y mapples@__CLI_VERSION__ sync --yes --json` must exit 0 with no `warnings` of kind `UNKNOWN_ELEMENT_WITH_SID`.
|
|
48
48
|
|
|
49
49
|
> Not ported (Creator-only): `strictProps` per-schematic hint lists, the icon-glyph set and
|
|
50
50
|
> token set validation (both live in the Creator's registry), `aiLint` hints (`selfSpaced`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Implementation plan (phase 3)
|
|
3
3
|
|
|
4
4
|
Ported from `generate.ts` `generatePlan` and `schemas.ts` `implementationPlanSchema`. Act as a
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/empty-states.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Empty states
|
|
3
3
|
|
|
4
4
|
First-run and no-content screens: icon, copy formula, one clear action.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/forms-and-auth.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Forms and auth
|
|
3
3
|
|
|
4
4
|
Sign in/up and any input form: field anatomy, grouping, validation, CTA.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/home-dashboard.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Home / dashboard
|
|
3
3
|
|
|
4
4
|
Home screens: greeting header, search, featured card, rails and lists.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/list-and-detail.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Lists and detail screens
|
|
3
3
|
|
|
4
4
|
List rows, cards, detail screens with hero, meta pills and sticky CTA.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Microcopy
|
|
3
3
|
|
|
4
4
|
Copy that sells: verbs on buttons, benefit headlines, product voice, error tone.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/navigation-chrome.md
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Navigation chrome
|
|
3
3
|
|
|
4
4
|
Headers, tab bars, chips, badges and breadcrumbs: navigator options vs content-sized elements.
|
|
5
5
|
|
|
6
6
|
Two kinds of chrome, two mechanisms — never mix them up:
|
|
7
|
-
- Stack headers and tab bars belong to the NAVIGATOR. In this version they are set in Creator (navigator options: header visible/title/colors/back, tab bar colors/labels; route options: title, tab label, tab icon asset) and land in the CLI-owned `_layout.tsx` on the next sync — you cannot set them from code, and you must not edit the layouts. Describe the intended chrome per section in `design.md` under `## Navigation chrome` (which sections hide the header, tab labels and icon concepts, modal routes) so the user applies it. A hand-built header row on a screen whose stack also shows a header gives two headers: design for one — the default root layout hides headers (`headerShown: false`), so in-content `TopAppBar` is the norm for apps born from `mapples create`.
|
|
7
|
+
- Stack headers and tab bars belong to the NAVIGATOR. In this version they are set in Creator (navigator options: header visible/title/colors/back, tab bar colors/labels; route options: title, tab label, tab icon asset) and land in the CLI-owned `_layout.tsx` on the next sync — you cannot set them from code, and you must not edit the layouts. Describe the intended chrome per section in `design.md` under `## Navigation chrome` (which sections hide the header, tab labels and icon concepts, modal routes) so the user applies it. A hand-built header row on a screen whose stack also shows a header gives two headers: design for one — the default root layout hides headers (`headerShown: false`), so in-content `TopAppBar` is the norm for apps born from `npx -y mapples@__CLI_VERSION__ create`.
|
|
8
8
|
- Tab icons require an icon ASSET in Creator; an `Icon` element or a glyph name does nothing there. Note the icon concept per tab in `design.md`; keep tab labels short and distinct — never fake a tab bar from a row of buttons on the page.
|
|
9
9
|
- Everything inside the content area (chips, pills, badges, breadcrumbs, in-content title rows) is a CONTENT-SIZED library element: never width 100% inside a row or a horizontal scroll; never a `Button` where a `Chip` is meant.
|
|
10
10
|
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/onboarding-flow.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Onboarding flow
|
|
3
3
|
|
|
4
4
|
Welcome/intro flows: 2–3 value-prop screens with hero, dots and CTA arc.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/screen-flow-wiring.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Screen flow wiring
|
|
3
3
|
|
|
4
4
|
Wiring flows: every CTA connected, entries set, a walkable prototype.
|
|
@@ -30,7 +30,7 @@ The contract:
|
|
|
30
30
|
- Entries: the app must open on the value, not on a settings screen. The initial section/route is a navigator option set in Creator — state the intended entry in `design.md` under `## Navigation chrome` (the scaffold's `index.tsx` of the initial section is the natural default).
|
|
31
31
|
- Presentation: multi-screen interruptions and create-flows present as modal ROUTES (a navigator option — describe them in `design.md`); browsing pushes. Confirmations, pickers and quick details stay on the screen as `Dialog` / `BottomSheet` / `ActionSheet` with `visible={false}`, or bound through `$data={{ visible: { key: 'vars.<name>', active: true } }}` when the project has the variable — an overlay nobody can open or close is a dead end.
|
|
32
32
|
|
|
33
|
-
Verify like a user: after wiring, walk the golden path mentally from the entry screen — first open → core value → primary action → done. Name the connection chain; every hop must exist. Then `mapples sync --yes --json` and check that `pushedOps` covers every `$actions` you added (an action on an element without a `$sid` yet lands on the sync after the element is tagged).
|
|
33
|
+
Verify like a user: after wiring, walk the golden path mentally from the entry screen — first open → core value → primary action → done. Name the connection chain; every hop must exist. Then `npx -y mapples@__CLI_VERSION__ sync --yes --json` and check that `pushedOps` covers every `$actions` you added (an action on an element without a `$sid` yet lands on the sync after the element is tagged).
|
|
34
34
|
|
|
35
35
|
Pitfalls: wiring only the happy screen and leaving detail pages orphaned; two buttons navigating to the same place with different labels; a tab bar plus in-content navigation to the same sections.
|
|
36
36
|
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/settings-profile.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Settings and profile
|
|
3
3
|
|
|
4
4
|
Settings and profile screens: grouped cards, icon rows, switches, sign out.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/stats-and-progress.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Stats and progress
|
|
3
3
|
|
|
4
4
|
Numbers, balances, goals: stat cards, progress bars, streaks — no fake charts.
|
package/templates/{claude → agent}/skills/mapples-design/reference/playbooks/visual-hierarchy.md
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Visual hierarchy
|
|
3
3
|
|
|
4
4
|
Cross-screen craft: one focal point, the type ladder, grouping, squint-test review.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
1
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
2
2
|
# Style guides (phase 1)
|
|
3
3
|
|
|
4
4
|
Ported from the Creator's design setup (`service--mapples-ai` `design/generate.ts`): first art
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mapples-sync
|
|
3
|
-
description: Running `mapples sync` from an agent — the --yes --json invocation, the JSON report fields, exit codes 0/1/2/3/4, and what to do on conflicts, deprecated files, NON_LITERAL_PROP warnings, read-scoped keys and offline runs. Use before and after every sync in a Mapples-linked app.
|
|
3
|
+
description: Running `npx -y mapples@__CLI_VERSION__ sync` from an agent — the --yes --json invocation, the JSON report fields, exit codes 0/1/2/3/4, and what to do on conflicts, deprecated files, NON_LITERAL_PROP warnings, read-scoped keys and offline runs. Use before and after every sync in a Mapples-linked app.
|
|
4
4
|
---
|
|
5
|
-
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run mapples agent install --force to refresh -->
|
|
6
|
-
# mapples sync
|
|
5
|
+
<!-- GENERATED by Mapples __CLI_VERSION__ — re-run npx -y mapples@__CLI_VERSION__ agent install --force to refresh -->
|
|
6
|
+
# npx -y mapples@__CLI_VERSION__ sync
|
|
7
7
|
|
|
8
|
-
`mapples sync` is the only way changes reach Creator. Run it from the app root as
|
|
8
|
+
`npx -y mapples@__CLI_VERSION__ sync` is the only way changes reach Creator. Run it from the app root as
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
mapples sync --yes --json
|
|
11
|
+
npx -y mapples@__CLI_VERSION__ sync --yes --json
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
- `--yes` accepts every adoption proposal (new route files, pages, components) without a prompt —
|
|
@@ -16,8 +16,9 @@ mapples sync --yes --json
|
|
|
16
16
|
leave new files untouched (e.g. a helper you do not want on the canvas yet).
|
|
17
17
|
- `--json` prints one JSON report and nothing else. Always parse it; never rely on the exit
|
|
18
18
|
code alone.
|
|
19
|
-
-
|
|
20
|
-
bare
|
|
19
|
+
- Always run the CLI exactly as written here, pinned to the version that generated these skills:
|
|
20
|
+
`npx -y mapples@__CLI_VERSION__ …`. Never a bare `mapples` and never an unpinned `npx mapples` — npm's
|
|
21
|
+
`latest` tag can be an older CLI without these commands, and a fallback silently runs it.
|
|
21
22
|
|
|
22
23
|
## What one run does
|
|
23
24
|
|
|
@@ -61,8 +62,8 @@ mapples sync --yes --json
|
|
|
61
62
|
| 0 | synced | read `pushedOps`, `files`, `warnings` |
|
|
62
63
|
| 1 | error (bad key, malformed file, server refusal) | read stderr; fix the cause; never retry blindly |
|
|
63
64
|
| 2 | synced **with conflicts** | for every `conflicts[]` entry: diff `deprecatedTo` against the regenerated file, re-apply your intent onto the new file, sync again |
|
|
64
|
-
| 3 | agent lease gone (from `mapples agent …`) | stop working, tell the user Creator disconnected the agent |
|
|
65
|
-
| 4 | project busy (from `mapples agent start`) | another agent session holds the project — ask before `--takeover` |
|
|
65
|
+
| 3 | agent lease gone (from `npx -y mapples@__CLI_VERSION__ agent …`) | stop working, tell the user Creator disconnected the agent |
|
|
66
|
+
| 4 | project busy (from `npx -y mapples@__CLI_VERSION__ agent start`) | another agent session holds the project — ask before `--takeover` |
|
|
66
67
|
|
|
67
68
|
## After a sync
|
|
68
69
|
|
|
@@ -81,9 +82,9 @@ mapples sync --yes --json
|
|
|
81
82
|
|
|
82
83
|
- `push rejected: API key is read-scoped …` — the `MAPPLES_SECRET` / `.mapples/secret` key can
|
|
83
84
|
only read. Ask the user for a read & write key (Creator → Project → Settings → API keys) and
|
|
84
|
-
to restart with `
|
|
85
|
+
to restart with `__AGENT_RESTART__`; do not edit `.mapples/secret` yourself.
|
|
85
86
|
- `no .mapples/config.json` — you are not in the app root, or the app is not linked; do not run
|
|
86
|
-
`mapples init` on your own — ask.
|
|
87
|
+
`npx -y mapples@__CLI_VERSION__ init` on your own — ask.
|
|
87
88
|
- `HEAD_MISMATCH … could not be committed after 5 rebases` — Creator is being edited at the same
|
|
88
89
|
time; wait a moment and sync again.
|
|
89
90
|
|
package/templates/app.json
CHANGED
package/templates/package.json
CHANGED
|
@@ -35,16 +35,17 @@
|
|
|
35
35
|
"@react-native-vector-icons/octicons": "^21.1.0",
|
|
36
36
|
"@react-native-vector-icons/simple-line-icons": "^13.1.0",
|
|
37
37
|
"@react-native-vector-icons/zocial": "^13.1.0",
|
|
38
|
-
"expo": "~57.0.
|
|
39
|
-
"expo-constants": "~57.0.
|
|
40
|
-
"expo-font": "~57.0.
|
|
41
|
-
"expo-
|
|
42
|
-
"expo-
|
|
43
|
-
"expo-
|
|
44
|
-
"expo-
|
|
38
|
+
"expo": "~57.0.23",
|
|
39
|
+
"expo-constants": "~57.0.18",
|
|
40
|
+
"expo-font": "~57.0.4",
|
|
41
|
+
"expo-image": "~57.0.5",
|
|
42
|
+
"expo-linear-gradient": "~57.0.2",
|
|
43
|
+
"expo-linking": "~57.0.10",
|
|
44
|
+
"expo-router": "~57.0.21",
|
|
45
|
+
"expo-splash-screen": "~57.0.9",
|
|
45
46
|
"expo-status-bar": "~57.0.1",
|
|
46
|
-
"expo-system-ui": "~57.0.
|
|
47
|
-
"expo-web-browser": "~57.0.
|
|
47
|
+
"expo-system-ui": "~57.0.4",
|
|
48
|
+
"expo-web-browser": "~57.0.3",
|
|
48
49
|
"jsbarcode": "^3.12.3",
|
|
49
50
|
"react": "19.2.3",
|
|
50
51
|
"react-dom": "19.2.3",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"react-native-reanimated": "4.5.1",
|
|
55
56
|
"react-native-safe-area-context": "~5.7.0",
|
|
56
57
|
"react-native-screens": "~4.26.0",
|
|
57
|
-
"react-native-svg": "15.15.
|
|
58
|
+
"react-native-svg": "15.15.4",
|
|
58
59
|
"react-native-web": "~0.21.0",
|
|
59
60
|
"react-native-worklets": "0.10.1"
|
|
60
61
|
},
|
|
File without changes
|