agentic-mobile-kit 0.7.0 → 0.7.2

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
@@ -29,6 +29,7 @@ Each choice prints the command it runs, for scripts and CI: `init` (with `--ci g
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
31
  | 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
+ | 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 |
32
33
  | Fix a bug | `m-bugfix` | Reproduces the bug, proves it with a failing test, finds the root cause, then makes the smallest fix |
33
34
  | Stop, or switch tool or machine | `m-pause` | Writes a handoff in the spec, commits and pushes |
34
35
  | Carry on anywhere | `m-continue` | Reads the spec and handoff, then picks up at the next step |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-mobile-kit",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
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",
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: m-change
3
+ description: Make a small change to behavior the app already has - a text, a limit, a validation rule, a style, a small UX tweak - and update the living spec and docs/amk with it, after one approval. Run only when the user explicitly invokes m-change.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # m-change
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 change in a sentence or two, or a task link plus pasted details).
12
+
13
+ ## 1. Check that it's small
14
+
15
+ A small change adjusts behavior the app already has, in a few files: a text, a limit, a validation rule, a style, a small UX tweak. It's too big for this workflow if it needs a new screen, a new dependency, a new API call, a data migration or native files (`Info.plist`, `AndroidManifest.xml`, `build.gradle`, `Podfile`): then suggest `m-feature` and stop. If the app doesn't do what it should, it's a bug: suggest `m-bugfix`. If the change is unclear, ask one question at a time.
16
+
17
+ ## 2. Find everything it touches
18
+
19
+ - **Code:** every place the behavior lives, on both platforms, including shared constants, translations and tests.
20
+ - **Living spec:** the requirement in `specs/current/<area>.md` that describes this behavior today. Behavior the living spec doesn't cover yet becomes a new requirement there.
21
+ - **Docs:** lines in `docs/amk/` that the change makes untrue.
22
+
23
+ ## 3. One approval
24
+
25
+ Show in one message:
26
+ - each file to change, and how;
27
+ - the requirement as it is and as it will be, or the new one;
28
+ - the doc lines that change;
29
+ - how it will be checked: a test where logic changes, and the screens on both platforms for anything visible.
30
+
31
+ **Stop until the user approves.** On the main branch, suggest a new branch first.
32
+
33
+ ## 4. Make it
34
+
35
+ If no requirement changes, as with a pure style change, skip the spec files (steps 1, 5 and 6 below).
36
+
37
+ 1. Pick an ID: the task's ID if it has one, otherwise `YYYYMMDD-<slug>`. Write `specs/<id>/requirements.md` with a title, a one-line goal and only the requirements that change, under `## MODIFIED Requirements: <area>` (or ADDED or REMOVED; the format is in `specs/current/README.md`). Run `node scripts/amk/specs.js check specs/<id>/requirements.md`.
38
+ 2. Change the code, and add or update a test where logic changed.
39
+ 3. Run `sh scripts/amk/verify.sh quick` and show its output.
40
+ 4. For a visible change, write `.maestro/<id>.yaml` from `specs/_templates/flow.yaml`: open the changed screen and take a screenshot. Run `sh scripts/amk/verify.sh all --spec <id>` and open the screenshots in `.amk/evidence/<id>/`. Off a Mac it checks Android only: say that iOS still needs checking on a Mac.
41
+ 5. Run `node scripts/amk/specs.js merge <id>` to update the living spec, and change the doc lines from step 3.
42
+ 6. Copy `specs/_templates/progress.md` to `specs/<id>/progress.md`, set `Status: done`, and write down the checks and their results.
43
+
44
+ If the change turns out bigger than it looked, stop and suggest `m-feature`, carrying over what you found.
45
+
46
+ ## 5. Commit
47
+
48
+ Commit the code, `specs/<id>/`, `specs/current/` and the docs together, with a clear message ending in `Spec: specs/<id>`. Ask before pushing. Then open a pull request that starts with the requirement change and shows the evidence.
@@ -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>` 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, 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.
@@ -12,7 +12,7 @@ Input: $ARGUMENTS (the requirement text, a file path, or a task link plus pasted
12
12
 
13
13
  ## 1. Always use the full flow
14
14
 
15
- The user chose `m-feature`, so follow every step below, however small the change looks. Never skip the spec or the approval stops on your own judgment. (Tiny changes don't need this skill; the user can just ask for them directly.)
15
+ The user chose `m-feature`, so follow every step below, however small the change looks. Never skip the spec or the approval stops on your own judgment. (For a small change to behavior the app already has, suggest `m-change`. A change with nothing to record, such as fixing a typo, can just be asked for directly.)
16
16
 
17
17
  If the input describes a bug rather than new behavior, suggest `m-bugfix` and stop. If it's still a vague problem ("the checkout feels slow") or an area you'd have to learn first, suggest `m-explore` first.
18
18
 
@@ -53,10 +53,12 @@ When all tasks are done:
53
53
  1. Run `sh scripts/amk/verify.sh all --spec <id>`. Off a Mac it checks Android only: record in `progress.md` that iOS still needs `verify.sh ios --spec <id>` on a Mac, and say so in the PR. Then **open the screenshots** in `.amk/evidence/<id>/` and check each one against its scenario. Maestro can report a tap as passed when nothing happened, so the screenshots are the evidence, not the log.
54
54
  2. Go through every scenario and note its evidence: a test name, command output, or the screen checked. Where the code and the spec disagree, fix whichever is wrong, asking first if it's the spec. The spec must describe what ships.
55
55
 
56
- ## 6. Update the living spec
56
+ ## 6. Update the living spec and the docs
57
57
 
58
58
  Run `node scripts/amk/specs.js merge <id>`. It applies the ADDED, MODIFIED and REMOVED requirements to `specs/current/` and notes the source of each. If it refuses, the reason is usually that a requirement listed as ADDED already exists, or one listed as MODIFIED doesn't. Fix `requirements.md` and run it again. Commit `specs/current/` with the feature, so reviewers see the change in behavior.
59
59
 
60
+ Then update the `docs/amk/` files the feature made untrue: a new key journey in `product.md`, a new library or service in `tech.md`, a new folder or shared component in `structure.md`, a new pattern in `conventions.md`. Commit them with the feature too.
61
+
60
62
  ## 7. Review and pull request
61
63
 
62
64
  1. Run `m-review` (or ask the `m-reviewer` subagent, if your tool has subagents). Fix real problems only; skip style nits.
@@ -119,12 +119,17 @@ ios() {
119
119
  device=$(xcrun simctl list devices available -j | node -e '
120
120
  const all = Object.entries(JSON.parse(require("fs").readFileSync(0, "utf8")).devices)
121
121
  .flatMap(([rt, ds]) => ds.map(d => ({ ...d, v: (rt.match(/iOS-(\d+)-(\d+)/) || []).slice(1).map(Number) })))
122
- .filter(d => d.v.length && /iPhone/.test(d.name));
122
+ .filter(d => d.v.length);
123
123
  const want = process.env.AMK_IOS_DEVICE;
124
+ // an iPhone by its device type: a simulator can have any name, such as a separate one kept for tests
125
+ const iphones = all.filter(d => /iPhone/.test(d.deviceTypeIdentifier || d.name));
124
126
  const pick = want ? all.find(d => d.udid === want || d.name === want)
125
- : all.find(d => d.state === "Booted") || all.sort((a, b) => b.v[0] - a.v[0] || b.v[1] - a.v[1])[0];
127
+ : iphones.find(d => d.state === "Booted") || iphones.sort((a, b) => b.v[0] - a.v[0] || b.v[1] - a.v[1])[0];
126
128
  console.log(pick ? pick.udid : "");')
127
- [ -n "$device" ] || { echo "ios: no iPhone simulator found (set AMK_IOS_DEVICE)"; status=1; return; }
129
+ if [ -z "$device" ]; then
130
+ if [ -n "${AMK_IOS_DEVICE:-}" ]; then echo "ios: no simulator has the name or UDID \"$AMK_IOS_DEVICE\""; else echo "ios: no iPhone simulator found (set AMK_IOS_DEVICE)"; fi
131
+ status=1; return
132
+ fi
128
133
  xcrun simctl boot "$device" 2> /dev/null || true
129
134
  xcrun simctl bootstatus "$device" -b > /dev/null
130
135
  xcrun simctl install "$device" "$app"