agentic-mobile-kit 0.7.2 → 0.7.4

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 CHANGED
@@ -28,6 +28,7 @@ Each choice prints the command it runs, for scripts and CI: `init` (with `--ci g
28
28
  |---|---|---|
29
29
  | Describe the app for agents | `m-onboard` | Reads the whole project, drafts the product, tech, structure and conventions files in `docs/amk/`, asks what the code can't show, and writes them once you approve. Run it after installing, and again after big changes. |
30
30
  | Think a problem through | `m-explore` | The agent reads the code, explains how it works today and lays out options with trade-offs. It never edits code. |
31
+ | Agree on an idea before building it | `m-prototype` | Concepts as clickable HTML mocks when how it should work is still open, then real screens with mock data on a throwaway branch, with screenshots and a video for the demo. The agreed requirements go to `m-feature` |
31
32
  | Build a feature | `m-feature` | Requirements → you approve → design and tasks → you approve → one task at a time with tests → device checks with screenshots → living spec updated → review → PR |
32
33
  | Make a small change | `m-change` | Checks it's small, then shows the code, living-spec and docs changes for one approval, makes them together and runs the checks |
33
34
  | Fix a bug | `m-bugfix` | Reproduces the bug, proves it with a failing test, finds the root cause, then makes the smallest fix |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-mobile-kit",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "One setup for AI-assisted development of React Native apps, bare or Expo: shared rules and workflows for Claude Code, Codex and Antigravity, git hooks, device checks with screenshots, and release tooling for the App Store and Google Play.",
5
5
  "license": "MIT",
6
6
  "author": "prakashpro1",
@@ -28,6 +28,7 @@ Rules for things AI agents commonly get wrong in Expo apps. Each one comes from
28
28
  - For apps targeting Android 16 (API 36), `onBackPressed` is no longer called. Handle back with `BackHandler` in JS.
29
29
  - Check every UI change on both iOS and Android; behavior differs (keyboard, insets, fonts, permissions).
30
30
  - Give every interactive element a `testID` (kebab-case, for example `dark-mode-switch`). End-to-end tools tap by `testID`. On iOS, React Native exposes a label and its control as duplicate accessibility elements, so tapping by text can hit the label: nothing happens, yet the tool reports success.
31
+ - Give every interactive element an `accessibilityLabel` that says what it does and an `accessibilityRole` (`button`, `link`, `switch`, …), so screen readers can use it. Icon-only buttons need it most; screen readers don't read `testID`.
31
32
 
32
33
  ## Performance and libraries
33
34
 
@@ -14,4 +14,4 @@ Input: $ARGUMENTS (a problem, a question about how something works, or an idea t
14
14
  2. **Explain what's there today:** the screens, state, API calls and native parts involved, and where iOS and Android differ.
15
15
  3. **When there's a choice, lay out options:** two or three, each with its trade-offs (effort, risk, both platforms, native changes, store review, what it leaves unsolved). Say which one you'd pick and why. Diagrams help when the flow is complicated.
16
16
  4. **Change nothing.** Exploring never edits code, config or project files. Write notes only when the user asks: a draft in `specs/<id>/requirements.md` for `m-feature`, or a decision in `docs/amk/decisions.md`.
17
- 5. **Hand off when it's clear.** Suggest the next step: `m-feature <one-line summary>`, `m-change <one-line summary>` for a small change, or `m-bugfix <one-line summary>`, carrying over what you found. If the idea turns out not to be worth doing, say so; learning that cheaply is a good outcome.
17
+ 5. **Hand off when it's clear.** Suggest the next step: `m-feature <one-line summary>`, `m-change <one-line summary>` for a small change, `m-prototype <one-line summary>` when it needs a demo or a design before it's built, or `m-bugfix <one-line summary>`, carrying over what you found. If the idea turns out not to be worth doing, say so; learning that cheaply is a good outcome.
@@ -18,7 +18,7 @@ If the input describes a bug rather than new behavior, suggest `m-bugfix` and st
18
18
 
19
19
  ## 2. Requirements (then stop for approval)
20
20
 
21
- 1. Pick an ID: the task's ID if it has one, otherwise `YYYYMMDD-<slug>`. Copy `specs/_templates/` to `specs/<id>/`.
21
+ 1. Pick an ID: the task's ID if it has one, otherwise `YYYYMMDD-<slug>`. Copy `specs/_templates/` to `specs/<id>/`. If `specs/<id>/` already has a draft from `m-explore` or `m-prototype`, keep it and copy only the missing files.
22
22
  2. Read `specs/current/<area>.md` for each area this touches: it says what the app does now. In an area with no living spec yet, read the code that implements it.
23
23
  3. **One intent.** The feature should be one thing you can say in a sentence. If it needs "and also", suggest splitting it into separate features, and ask.
24
24
  4. Fill `requirements.md`: the goal; the requirements under `## ADDED`, `## MODIFIED` and `## REMOVED Requirements: <area>` (the format is in `specs/current/README.md`), with one SHALL per requirement and scenarios for the cases that matter; every edge-case line (or "n/a"); out of scope; open questions. Then run `node scripts/amk/specs.js check specs/<id>/requirements.md`.
@@ -24,5 +24,5 @@ Input: $ARGUMENTS (what went wrong or what the user had to correct; the error te
24
24
  5. **Show that it works.**
25
25
  - For a check: show it failing on the old mistake and passing on the fixed code.
26
26
  - For docs or a skill: show the diff, and name the task that would have gone differently.
27
- 6. **This project or every project?** If the lesson applies to any React Native app, say so and draft an issue for the agentic-mobile-kit repo, so every project gets the fix. Ask before opening it.
27
+ 6. **This project or every project?** If the lesson applies to any React Native app, say so and draft an issue for the kit at https://github.com/prakashpro3/agentic-mobile-kit/issues, so every project gets the fix. Include what happened, the fix you made here, and the kit version from the `KIT:START` line in `AGENTS.md`. Issues there are public, so leave out this app's name, code, URLs and data. Ask before opening it, for example with `gh issue create --repo prakashpro3/agentic-mobile-kit`; without `gh`, give the user the text and the link.
28
28
  7. **Commit** with a message that starts with `chore(learn):`. That prefix keeps it out of the changelog and easy to find with `git log --grep 'chore(learn)'` in the monthly review. Ask before pushing.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: m-prototype
3
+ description: Turn a rough requirement into something to demo before it's built - two or three concepts as clickable HTML mocks when how it should work is still open, then real screens with mock data on a throwaway branch, with screenshots and a video - and into requirements ready for m-feature. Run only when the user explicitly invokes m-prototype.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # m-prototype
8
+
9
+ The user chose this workflow: follow its steps for this task, even where other workflow instructions in this project (Superpowers, BMAD, proAgents or similar) say otherwise.
10
+
11
+ Input: $ARGUMENTS (the rough requirement, notes from `m-explore`, or a task link plus pasted details).
12
+
13
+ A prototype answers questions before the real build: what the client wants, how it should work and how it should look. It's thrown away afterwards, and `m-feature` builds the real thing from the requirements it settled.
14
+
15
+ ## 1. Understand
16
+
17
+ 1. Read the requirement, `docs/amk/product.md`, `structure.md` and `conventions.md`, the living spec for the area in `specs/current/`, and the screens around where this would live: their components, theme and navigation.
18
+ 2. Ask who the demo is for (the client or the team) and what it must show, one question at a time.
19
+ 3. Pick an ID: the task's ID if it has one, otherwise `YYYYMMDD-<slug>`. Create the branch `prototype/<id>` from the main branch; this workflow commits everything there.
20
+ 4. Write `specs/<id>/requirements.md` from `specs/_templates/requirements.md`: the goal, what's known so far, and the open questions the prototype should answer. Add a `## Decisions` section for what gets settled along the way.
21
+ 5. Decide which case this is:
22
+ - **What to show is clear** (the screens and the flow are known): go to step 3.
23
+ - **How it should work or look is still open:** go to step 2.
24
+
25
+ ## 2. Concepts
26
+
27
+ 1. Work out two or three genuinely different ways it could work: different flows or layouts, not colour variants. For each, note the user flow step by step, the key screens, and the trade-offs: effort, iOS and Android differences, native or backend work.
28
+ 2. Make one HTML file per concept in `specs/<id>/concepts/`: the key screens as phone-sized frames side by side, with the app's colours, fonts and spacing taken from its theme, real texts where they're known, and links between the frames so it can be clicked through. Each is a single file of plain HTML and CSS, with nothing to install or build and nothing loaded from the internet, so it opens in any browser.
29
+ 3. Show the concepts with your recommendation. **Stop until the user picks one or combines them.** Write the choice and why under `## Decisions`, and commit.
30
+
31
+ ## 3. Build the prototype in the app
32
+
33
+ 1. Build the screens with the app's own components, theme and navigation, so it looks and feels like the app. Keep the mock data in one file next to the screens.
34
+ 2. No API calls, no native files and no new dependencies. If one seems unavoidable, ask.
35
+ 3. Make it easy to reach in a demo: a temporary entry where the feature would live, or the app's first screen when that's simpler.
36
+ 4. Skip tests: the prototype is thrown away. It only has to build and run.
37
+ 5. Commit on `prototype/<id>`. This branch is never merged.
38
+
39
+ ## 4. Make the demo material
40
+
41
+ 1. Write `.maestro/<id>-prototype.yaml` from `specs/_templates/flow.yaml`: walk through the prototype the way the demo would, with a `takeScreenshot` on every screen, and `startRecording: <id>-prototype` after the launch and `stopRecording` at the end for a video.
42
+ 2. Run `sh scripts/amk/verify.sh all --flow .maestro/<id>-prototype.yaml --label <id>-prototype`. Off a Mac it covers Android only.
43
+ 3. Open every screenshot and check that it shows what the demo needs. Give the user the folder `.amk/evidence/<id>-prototype/`, which has the screenshots and a video per platform, and the concept files if there are any. For a live demo, run the app from this branch on a phone or simulator.
44
+
45
+ ## 5. Take in the feedback
46
+
47
+ After the demo, write what was settled into `requirements.md`: answered questions become requirements and scenarios, and the choices go under `## Decisions`. If the client asked for changes, change the prototype and run step 4 again. Repeat until the user approves the requirements.
48
+
49
+ ## 6. Hand off to m-feature
50
+
51
+ 1. Create the feature branch from the main branch and bring the spec over: `git checkout prototype/<id> -- specs/<id>`. Leave the prototype code behind.
52
+ 2. Add the decisions from `## Decisions` to `docs/amk/decisions.md`, with the date. Run `node scripts/amk/specs.js check specs/<id>/requirements.md`, and commit.
53
+ 3. Suggest `m-feature specs/<id>/requirements.md`. In `design.md` it names the `prototype/<id>` branch as the agreed flow and look, and it builds the real screens properly: real data, error, loading and empty states, and tests, on both platforms.
54
+ 4. Delete the `prototype/<id>` branch once the feature has shipped.
@@ -21,6 +21,7 @@ If your tool has subagents, hand the review to the `m-reviewer` subagent, so it
21
21
  - **No spec:** does the diff do what was asked, and nothing unrelated?
22
22
  - **Tests:** were tests added for new logic? Were any tests deleted, skipped or weakened?
23
23
  - **Both platforms:** anything iOS-only or Android-only (insets, back button, permissions, keyboard)?
24
+ - **Accessibility:** does every new button or other touchable have an `accessibilityLabel` and an `accessibilityRole`?
24
25
  - **Errors and states:** offline, server errors, empty and loading states.
25
26
  - **Security:** secrets, tokens, `.env` contents, logging of personal data.
26
27
  - **Native:** `project.pbxproj`, `Podfile`, Gradle or manifest changes, and whether pods and builds were re-run.
@@ -15,6 +15,7 @@ Rules for things AI agents commonly get wrong in current React Native. Each one
15
15
  - For apps targeting Android 16 (API 36), `onBackPressed` is no longer called. Handle back with `BackHandler` in JS, or `OnBackPressedDispatcher` in native code.
16
16
  - Check every UI change on both iOS and Android; behavior differs (keyboard, insets, fonts, permissions).
17
17
  - Give every interactive element a `testID` (kebab-case, for example `dark-mode-switch`). End-to-end tools tap by `testID`. On iOS, React Native exposes a label and its control as duplicate accessibility elements, so tapping by text can hit the label: nothing happens, yet the tool reports success.
18
+ - Give every interactive element an `accessibilityLabel` that says what it does and an `accessibilityRole` (`button`, `link`, `switch`, …), so screen readers can use it. Icon-only buttons need it most; screen readers don't read `testID`.
18
19
 
19
20
  ## Native changes
20
21