agentic-mobile-kit 0.6.1 → 0.7.0

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.
Files changed (52) hide show
  1. package/README.md +9 -7
  2. package/bin/cli.js +30 -22
  3. package/lib/doctor.js +12 -7
  4. package/lib/init.js +79 -34
  5. package/lib/menu.js +149 -0
  6. package/package.json +1 -1
  7. package/stacks/react-native/expo/AGENTS.md +13 -13
  8. package/stacks/react-native/expo/docs/{ai → amk}/expo.md +1 -1
  9. package/stacks/react-native/template/.agents/skills/m-bugfix/SKILL.md +4 -4
  10. package/stacks/react-native/template/.agents/skills/m-continue/SKILL.md +1 -1
  11. package/stacks/react-native/template/.agents/skills/m-explore/SKILL.md +2 -2
  12. package/stacks/react-native/template/.agents/skills/m-feature/SKILL.md +5 -5
  13. package/stacks/react-native/template/.agents/skills/m-learn/SKILL.md +5 -5
  14. package/stacks/react-native/template/.agents/skills/m-onboard/SKILL.md +60 -0
  15. package/stacks/react-native/template/.agents/skills/m-pause/SKILL.md +2 -2
  16. package/stacks/react-native/template/.agents/skills/m-release/SKILL.md +5 -5
  17. package/stacks/react-native/template/.agents/skills/m-review/SKILL.md +1 -1
  18. package/stacks/react-native/template/.githooks/pre-commit +5 -5
  19. package/stacks/react-native/template/.githooks/pre-push +3 -3
  20. package/stacks/react-native/template/.github/workflows/ci.yml +5 -5
  21. package/stacks/react-native/template/.github/workflows/e2e.yml +5 -5
  22. package/stacks/react-native/template/.github/workflows/ios.yml +4 -4
  23. package/stacks/react-native/template/.rulesync/hooks.jsonc +2 -2
  24. package/stacks/react-native/template/AGENTS.md +15 -15
  25. package/stacks/react-native/template/codemagic.yaml +6 -6
  26. package/stacks/react-native/template/docs/{ai → amk}/codemagic.md +1 -1
  27. package/stacks/react-native/template/docs/{ai → amk}/known-issues.md +2 -2
  28. package/stacks/react-native/template/docs/{ai → amk}/react-native.md +1 -1
  29. package/stacks/react-native/template/docs/{ai → amk}/team-process.md +2 -2
  30. package/stacks/react-native/template/scripts/{ai → amk}/baseline.js +7 -6
  31. package/stacks/react-native/template/scripts/{ai → amk}/guard.js +1 -1
  32. package/stacks/react-native/template/scripts/{ai → amk}/handoff-check.js +1 -1
  33. package/stacks/react-native/template/scripts/{ai → amk}/ios-build.sh +1 -1
  34. package/stacks/react-native/template/scripts/{ai → amk}/pm-run.sh +1 -1
  35. package/stacks/react-native/template/scripts/{ai → amk}/pod-install.sh +1 -1
  36. package/stacks/react-native/template/scripts/{ai → amk}/prebuild.sh +1 -1
  37. package/stacks/react-native/template/scripts/{ai → amk}/release-build.sh +10 -10
  38. package/stacks/react-native/template/scripts/{ai → amk}/release-check.js +3 -3
  39. package/stacks/react-native/template/scripts/{ai → amk}/set-version.sh +2 -2
  40. package/stacks/react-native/template/scripts/{ai → amk}/specs.js +3 -3
  41. package/stacks/react-native/template/scripts/{ai → amk}/verify.sh +13 -13
  42. package/stacks/react-native/template/specs/current/README.md +2 -2
  43. /package/stacks/react-native/expo/docs/{ai → amk}/known-issues.md +0 -0
  44. /package/stacks/react-native/template/docs/{ai → amk}/conventions.md +0 -0
  45. /package/stacks/react-native/template/docs/{ai → amk}/decisions.md +0 -0
  46. /package/stacks/react-native/template/docs/{ai → amk}/product.md +0 -0
  47. /package/stacks/react-native/template/docs/{ai → amk}/structure.md +0 -0
  48. /package/stacks/react-native/template/docs/{ai → amk}/tech.md +0 -0
  49. /package/stacks/react-native/template/scripts/{ai → amk}/android-flavors.js +0 -0
  50. /package/stacks/react-native/template/scripts/{ai → amk}/case-check.js +0 -0
  51. /package/stacks/react-native/template/scripts/{ai → amk}/install-deps.sh +0 -0
  52. /package/stacks/react-native/template/scripts/{ai → amk}/maestro-env.sh +0 -0
@@ -1,34 +1,34 @@
1
1
  <!-- KIT:START agentic-mobile-kit {{KIT_VERSION}} ci={{KIT_CI}} stack={{KIT_STACK}} (edit outside these markers; the kit updates what's inside) -->
2
2
  # {{APP_NAME}}: instructions for AI agents
3
3
 
4
- Read by Claude Code (through CLAUDE.md), Codex, Cursor, OpenCode, Kiro and Antigravity. Keep it short; details live in `docs/ai/`.
4
+ Read by Claude Code (through CLAUDE.md), Codex, Cursor, OpenCode, Kiro and Antigravity. Keep it short; details live in `docs/amk/`.
5
5
 
6
6
  This project may also use other AI workflow frameworks (for example Superpowers, BMAD or proAgents). They keep working for everything else. When the user starts a task with an `m-` skill (`/m-feature`, `$m-feature`, …), follow that skill's steps for the whole task; where another framework's instructions differ, the `m-` skill wins.
7
7
 
8
8
  ## Project
9
9
 
10
- - Expo SDK {{EXPO_SDK}}, React Native {{RN_VERSION}} ({{RN_ARCH}}), React {{REACT_VERSION}}, TypeScript {{TS_VERSION}}, Node {{NODE_VERSION}}. Package manager: {{PM}}.
10
+ - Expo SDK {{EXPO_SDK}}, React Native {{RN_VERSION}} ({{RN_ARCH}}), React {{REACT_VERSION}}, {{LANGUAGE}}, Node {{NODE_VERSION}}. Package manager: {{PM}}.
11
11
  - `ios/` and `android/` are generated by `npx expo prebuild` and aren't in git (Continuous Native Generation). The kit's scripts generate them when they need them.
12
- - What the app does: `docs/ai/product.md`, and requirement by requirement, as it works now: `specs/current/`. Stack and services: `docs/ai/tech.md`. Folders and layers: `docs/ai/structure.md`. Code style: `docs/ai/conventions.md`.
12
+ - What the app does: `docs/amk/product.md`, and requirement by requirement, as it works now: `specs/current/`. Stack and services: `docs/amk/tech.md`. Folders and layers: `docs/amk/structure.md`. Code style: `docs/amk/conventions.md`.
13
13
 
14
14
  ## Commands
15
15
 
16
16
  | Task | Command |
17
17
  |---|---|
18
- | Install dependencies | `sh scripts/ai/install-deps.sh` |
18
+ | Install dependencies | `sh scripts/amk/install-deps.sh` |
19
19
  | Add a library (ask first) | `npx expo install <package>`: the version that matches the SDK |
20
- | Lint, typecheck, test (each skips what the app doesn't have yet) | `sh scripts/ai/pm-run.sh lint`, `sh scripts/ai/pm-run.sh typecheck`, `sh scripts/ai/pm-run.sh test` |
20
+ | Lint, typecheck, test (each skips what the app doesn't have yet) | `sh scripts/amk/pm-run.sh lint`, `sh scripts/amk/pm-run.sh typecheck`, `sh scripts/amk/pm-run.sh test` |
21
21
  | Check dependency versions and the app config | `npx expo install --check`, `npx expo-doctor` |
22
- | Check on devices (release builds, Maestro flows, screenshots) | `sh scripts/ai/verify.sh all --spec <id>`; another iOS scheme: `--scheme <name>` |
23
- | Specs: progress, format check, fold a finished feature into the living spec | `node scripts/ai/specs.js status`, `node scripts/ai/specs.js check`, `node scripts/ai/specs.js merge <id>` |
24
- | Check a release before tagging it (versions, permission texts, debug leftovers) | `node scripts/ai/release-check.js` |
25
- | Signed release builds (a person runs them: they use the signing keys) | `sh scripts/ai/release-build.sh android`, `sh scripts/ai/release-build.sh ios` |
22
+ | Check on devices (release builds, Maestro flows, screenshots) | `sh scripts/amk/verify.sh all --spec <id>`; another iOS scheme: `--scheme <name>` |
23
+ | Specs: progress, format check, fold a finished feature into the living spec | `node scripts/amk/specs.js status`, `node scripts/amk/specs.js check`, `node scripts/amk/specs.js merge <id>` |
24
+ | Check a release before tagging it (versions, permission texts, debug leftovers) | `node scripts/amk/release-check.js` |
25
+ | Signed release builds (a person runs them: they use the signing keys) | `sh scripts/amk/release-build.sh android`, `sh scripts/amk/release-build.sh ios` |
26
26
 
27
27
  ## Definition of done
28
28
 
29
29
  A task is done only when:
30
- 1. `sh scripts/ai/verify.sh quick` passes (lint, typecheck, tests) and you show its output from this session. In an app whose base branch already fails some of them, it passes when your change adds no new failure, and lists the old ones: leave those alone unless the task is to fix them;
31
- 2. UI changes were checked with `sh scripts/ai/verify.sh all --spec <id>` on both iOS and Android, and you looked at the screenshots. On Windows or Linux, that covers Android only: write in `progress.md` and the PR that iOS still needs checking on a Mac, and the PR isn't merged until a teammate with a Mac has done it;
30
+ 1. `sh scripts/amk/verify.sh quick` passes (lint, typecheck, tests) and you show its output from this session. In an app whose base branch already fails some of them, it passes when your change adds no new failure, and lists the old ones: leave those alone unless the task is to fix them;
31
+ 2. UI changes were checked with `sh scripts/amk/verify.sh all --spec <id>` on both iOS and Android, and you looked at the screenshots. On Windows or Linux, that covers Android only: write in `progress.md` and the PR that iOS still needs checking on a Mac, and the PR isn't merged until a teammate with a Mac has done it;
32
32
  3. the change stays inside the task's scope;
33
33
  4. `specs/<id>/progress.md` is updated, when working from a spec.
34
34
 
@@ -43,8 +43,8 @@ Never say a check passed unless you ran it in this session.
43
43
  - Never read, print or commit `.env` files, keystores or signing files. Secrets don't belong in this repo.
44
44
  - Never use `git commit --no-verify`, `git push --force`, `git reset --hard` or `rm -rf`.
45
45
  - After 2 failed attempts at the same fix, stop and report what you found.
46
- - Chat is not memory: write decisions into the spec or `docs/ai/decisions.md` straight away.
47
- - Follow `docs/ai/expo.md`. Before fixing a build error, check `docs/ai/known-issues.md`.
46
+ - Chat is not memory: write decisions into the spec or `docs/amk/decisions.md` straight away.
47
+ - Follow `docs/amk/expo.md`. Before fixing a build error, check `docs/amk/known-issues.md`.
48
48
 
49
49
  ## Skills
50
50
 
@@ -14,7 +14,7 @@ Rules for things AI agents commonly get wrong in Expo apps. Each one comes from
14
14
  - `ios/` and `android/` are generated by `npx expo prebuild` and aren't in git. Never edit them: the next prebuild overwrites the change.
15
15
  - Native settings (permissions and their texts, bundle ID, entitlements) go in `app.json` or `app.config.*`. Libraries with native setup bring a config plugin; add it to `plugins`.
16
16
  - Native code of the app's own goes in an Expo module (`expo-module` skill), not into the generated folders.
17
- - A library with native code needs a new native build: Expo Go doesn't include it. `sh scripts/ai/verify.sh` makes release builds with the current native code.
17
+ - A library with native code needs a new native build: Expo Go doesn't include it. `sh scripts/amk/verify.sh` makes release builds with the current native code.
18
18
 
19
19
  ## Architecture
20
20
 
@@ -10,7 +10,7 @@ The user chose this workflow: follow its steps for this task, even where other w
10
10
 
11
11
  Input: $ARGUMENTS (what's wrong, steps to reproduce, error text, screenshots, task link).
12
12
 
13
- 1. **Check `docs/ai/known-issues.md`** for a matching error. If there is one, apply its fix and verify.
13
+ 1. **Check `docs/amk/known-issues.md`** for a matching error. If there is one, apply its fix and verify.
14
14
  2. **Reproduce.** Write down the exact steps and the actual vs expected result. If you can't reproduce it, say so and ask for more details. Don't guess.
15
15
  3. **Write a failing test** that shows the bug, if it can be tested with Jest. Run it and show that it fails. (Native or device-only bugs: write the manual steps instead.)
16
16
  4. **Find the root cause before changing code.**
@@ -19,7 +19,7 @@ Input: $ARGUMENTS (what's wrong, steps to reproduce, error text, screenshots, ta
19
19
  - Form one hypothesis, test it, and confirm or reject it. One at a time.
20
20
  - Fix the cause, not the symptom: no try/catch that hides the error, no special case for the failing input.
21
21
  5. **Make the smallest fix.** Don't refactor or touch unrelated code.
22
- 6. **Verify.** The new test passes, and lint, typecheck and all tests pass. Paste the output. For UI or native bugs, run `sh scripts/ai/verify.sh ios` and/or `android` and look at the screenshots.
22
+ 6. **Verify.** The new test passes, and lint, typecheck and all tests pass. Paste the output. For UI or native bugs, run `sh scripts/amk/verify.sh ios` and/or `android` and look at the screenshots.
23
23
  7. **Two attempts at most.** If two fixes didn't work, stop. Report what you tried, what you learned and what you suspect next.
24
- 8. **Record it.** If this kind of error could come back, add an entry to `docs/ai/known-issues.md` (error, cause, fix, prevention). If the fix changes what the app is meant to do, not just makes it work as specified, update that requirement in `specs/current/<area>.md` in the same format, and run `node scripts/ai/specs.js check`.
25
- 9. **Commit** with a message ending in `Assisted-by: <tool>/<model>`. Ask the user before pushing, then open a PR with the evidence.
24
+ 8. **Record it.** If this kind of error could come back, add an entry to `docs/amk/known-issues.md` (error, cause, fix, prevention). If the fix changes what the app is meant to do, not just makes it work as specified, update that requirement in `specs/current/<area>.md` in the same format, and run `node scripts/amk/specs.js check`.
25
+ 9. **Commit** with a clear message. Ask the user before pushing, then open a PR with the evidence.
@@ -13,7 +13,7 @@ Input: $ARGUMENTS (a spec ID, or empty).
13
13
  1. **Check git first.** Run `git fetch` and `git status`.
14
14
  - If the branch is behind its remote, say so and ask before pulling.
15
15
  - If there are uncommitted changes, list them; they may be half-done work.
16
- 2. **Find the spec.** Use the given ID; otherwise run `node scripts/ai/specs.js status` and take the spec in progress that was updated most recently. If unsure, ask.
16
+ 2. **Find the spec.** Use the given ID; otherwise run `node scripts/amk/specs.js status` and take the spec in progress that was updated most recently. If unsure, ask.
17
17
  3. **Read** `requirements.md`, `design.md`, `tasks.md` and `progress.md` in that spec folder, plus `git log --oneline -15`.
18
18
  4. **Report back, in this order:**
19
19
  1. any open question or blocker from the handoff;
@@ -10,8 +10,8 @@ The user chose this workflow: follow its steps for this task, even where other w
10
10
 
11
11
  Input: $ARGUMENTS (a problem, a question about how something works, or an idea to check).
12
12
 
13
- 1. **Read before answering.** Start with `specs/current/` and `docs/ai/` for the area, then the code itself. Back each claim with the file and line it comes from. Don't guess; say what you couldn't find.
13
+ 1. **Read before answering.** Start with `specs/current/` and `docs/amk/` for the area, then the code itself. Back each claim with the file and line it comes from. Don't guess; say what you couldn't find.
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
- 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/ai/decisions.md`.
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
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.
@@ -21,7 +21,7 @@ If the input describes a bug rather than new behavior, suggest `m-bugfix` and st
21
21
  1. Pick an ID: the task's ID if it has one, otherwise `YYYYMMDD-<slug>`. Copy `specs/_templates/` to `specs/<id>/`.
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
- 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/ai/specs.js check specs/<id>/requirements.md`.
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`.
25
25
  5. If something is unclear, ask the user **one question at a time**. Don't fill gaps with guesses.
26
26
  6. Show the requirements and **stop until the user approves them**. Give the user these questions to check them against:
27
27
  - Is this the problem you asked me to solve, with nothing extra in scope?
@@ -30,7 +30,7 @@ If the input describes a bug rather than new behavior, suggest `m-bugfix` and st
30
30
 
31
31
  ## 3. Design and tasks (then stop for approval)
32
32
 
33
- 1. **Search the codebase before designing.** List the components, hooks, API clients and helpers you'll reuse in `design.md` under "Existing code to reuse". Read `docs/ai/structure.md` and `docs/ai/conventions.md`.
33
+ 1. **Search the codebase before designing.** List the components, hooks, API clients and helpers you'll reuse in `design.md` under "Existing code to reuse". Read `docs/amk/structure.md` and `docs/amk/conventions.md`.
34
34
  2. Fill `design.md`: approach, files to change, risks (native changes, pod install, migrations).
35
35
  3. Fill `tasks.md`: small tasks (about an hour, under ~300 changed lines each). Each task names the requirement it serves and how it's checked, and its tests are written in the same task, not left for the end. The last task writes `.maestro/<id>.yaml` (from `specs/_templates/flow.yaml`): a Maestro flow with one step and screenshot per scenario, tapping elements by `testID`.
36
36
  4. Show design and tasks and **stop until the user approves them**. Ask them to check that every task serves an approved requirement and nothing goes beyond the agreed scope.
@@ -42,7 +42,7 @@ From here the plan lives in files, so the building can also run in a fresh sessi
42
42
  For each task:
43
43
  1. Implement only that task. Write tests first for logic (state, data, utils); UI can be tested after.
44
44
  2. Run `lint`, `typecheck` and `test` (see AGENTS.md). Paste the real output. If something fails, fix it; after 2 failed attempts, stop and report.
45
- 3. Commit with a clear message ending in `Assisted-by: <tool>/<model>` and `Spec: specs/<id>`.
45
+ 3. Commit with a clear message ending in `Spec: specs/<id>`.
46
46
  4. Tick the task in `tasks.md` and update the handoff block and log in `progress.md`.
47
47
 
48
48
  If building shows the plan is wrong: when the intent is the same, update `requirements.md`, `design.md` or `tasks.md`, tell the user what changed, and ask again before going on if a requirement changed. When the intent itself changed, or the scope grew into different work, stop and suggest finishing this feature small and starting a new one.
@@ -50,12 +50,12 @@ If building shows the plan is wrong: when the intent is the same, update `requir
50
50
  ## 5. Check against the spec
51
51
 
52
52
  When all tasks are done:
53
- 1. Run `sh scripts/ai/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 `.ai/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.
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
56
  ## 6. Update the living spec
57
57
 
58
- Run `node scripts/ai/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.
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
60
  ## 7. Review and pull request
61
61
 
@@ -11,11 +11,11 @@ The user chose this workflow: follow its steps for this task, even where other w
11
11
  Input: $ARGUMENTS (what went wrong or what the user had to correct; the error text, PR comment or session transcript if there is one).
12
12
 
13
13
  1. **State the lesson in one sentence:** what happened, what should have happened, and why. The usual causes are missing context, an ignored rule, the wrong command, or a gap in the rules. Quote the evidence, and don't guess what an earlier session did. If the cause isn't clear, ask.
14
- 2. **Check whether it's already covered.** Search `AGENTS.md`, `docs/ai/` and `.agents/skills/`. If a rule exists and was ignored, writing it again won't help; enforce it instead (step 3.1).
14
+ 2. **Check whether it's already covered.** Search `AGENTS.md`, `docs/amk/` and `.agents/skills/`. If a rule exists and was ignored, writing it again won't help; enforce it instead (step 3.1).
15
15
  3. **Pick the strongest small fix**, in this order:
16
- 1. A check that runs without anyone remembering it: a lint rule, a test, a git hook, a CI step, a pattern in `scripts/ai/guard.js`, or a rule in `scripts/ai/release-check.js`.
17
- 2. A known error: add the error text, cause, fix and prevention to `docs/ai/known-issues.md`.
18
- 3. Project knowledge: one line in the right `docs/ai/` file. Use `conventions.md`, `react-native.md` or `tech.md`, or `decisions.md` with the date and the reason.
16
+ 1. A check that runs without anyone remembering it: a lint rule, a test, a git hook, a CI step, a pattern in `scripts/amk/guard.js`, or a rule in `scripts/amk/release-check.js`.
17
+ 2. A known error: add the error text, cause, fix and prevention to `docs/amk/known-issues.md`.
18
+ 3. Project knowledge: one line in the right `docs/amk/` file. Use `conventions.md`, `react-native.md` or `tech.md`, or `decisions.md` with the date and the reason.
19
19
  4. A workflow step: edit the skill that should have caught it.
20
20
  5. `AGENTS.md`: only for a rule every task needs, and keep the file under 150 lines.
21
21
 
@@ -25,4 +25,4 @@ Input: $ARGUMENTS (what went wrong or what the user had to correct; the error te
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
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.
28
- 7. **Commit** with a message that starts with `chore(learn):` and ends with `Assisted-by: <tool>/<model>`. 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.
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,60 @@
1
+ ---
2
+ name: m-onboard
3
+ description: Describe the app for AI agents - read the whole project, draft docs/amk/product.md, tech.md, structure.md and conventions.md, ask only what the code can't show, and write them once the user approves. Run it after installing the kit, and again after big changes. Run only when the user explicitly invokes m-onboard.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # m-onboard
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 (optional: which files to work on, for example `tech structure`; all four by default).
12
+
13
+ Every agent reads these four files before it works on this app, so they must be true, short and specific: facts with the files they come from, not advice. Write only what you found in the project or what the user told you.
14
+
15
+ ## 1. See what's there
16
+
17
+ Read `AGENTS.md` and the four files in `docs/amk/`. A file that holds only its heading and the `<!-- … -->` outline is empty: you'll draft it. A file with content is the team's: you'll suggest changes to it, never rewrite it.
18
+
19
+ ## 2. Read the project
20
+
21
+ Change nothing in this step. List the project's files with `git ls-files` (it leaves out `node_modules`, Pods and build output), then read in this order:
22
+
23
+ - **What the app is:** the README, `package.json` (name, scripts, dependencies), `app.json` or `app.config.*` in Expo apps, the display name and bundle IDs, and store texts if there are any (`fastlane/metadata/`, `release-notes/`).
24
+ - **Screens and journeys:** the entry point (`index.js`, `App.tsx`, or the `app/` folder with Expo Router), the navigation setup and the list of screens. The key user journeys come from these: sign-in, the main flows, payments, settings.
25
+ - **Tech:** for each dependency that matters, what the app uses it for and where it's set up: state, navigation, the API client, storage, forms, i18n, analytics, push, crash reporting, payments, maps. Also the backend APIs and where their contracts live, and the environments: config files, `.env.example`, build flavors and schemes. Never open `.env` files, keystores or signing files.
26
+ - **Structure:** the folder map, two or three levels into the app's code; where shared components, the theme and helpers live; custom native code under `ios/` and `android/` (native modules, extensions, widgets), or config plugins and local modules in Expo apps.
27
+ - **Conventions:** a few files from each layer (a screen, a component, a hook, an API call, a test) and what they have in common: naming, file layout, styling, error, loading and empty states, how tests mock the API. Also the lint and formatter configs, and `git log --oneline -30` for the style of commit messages and branch names. A convention is a pattern you saw in several files; a single file is an example, not a rule.
28
+
29
+ In a large app, sample: a few files per layer are enough. Keep a note of the files each finding comes from.
30
+
31
+ ## 3. Draft
32
+
33
+ Draft each file you're working on from its outline, and keep it short: `product.md` under 40 lines, the others under about 60.
34
+
35
+ - `product.md`: what the app does in two sentences, who uses it, the 3 to 5 key journeys, and what must never break.
36
+ - `tech.md`: what the app uses today, one line each with the library and where it's set up; the backend APIs and their contracts; the environments and how the app switches between them; third-party services. Describe what's there; don't recommend new tools.
37
+ - `structure.md`: the folder map, one line per folder; where shared UI, the theme and helpers live, so agents reuse them instead of writing new ones; custom native code.
38
+ - `conventions.md`: the patterns you found, each with a file that shows it.
39
+
40
+ Use the app's own names for screens, modules and services. Where the project doesn't answer something, write down a question for step 4 instead of guessing.
41
+
42
+ For a file that's already filled in, compare it with what you found and list what's missing, out of date or wrong, with the file that shows it. Leave what's still true alone.
43
+
44
+ ## 4. Ask what the code can't show
45
+
46
+ Ask the user in one message, usually five questions or fewer, about what you couldn't find:
47
+ - who uses the app (customers, staff, a market or age group);
48
+ - what must never break (payments, data sync, sign-in, …);
49
+ - whether the key journeys you found are right and complete;
50
+ - which of two conflicting things is current: two API clients, two styling approaches, two state libraries.
51
+
52
+ ## 5. Show, then write
53
+
54
+ Show the drafts, and the suggested changes for files that are already filled in. **Stop until the user approves them.** Then write only what they approved. A decision the user made in their answers, such as which of two libraries is current, also gets a dated line in `docs/amk/decisions.md`. Change nothing else: no code, no `AGENTS.md`, no other docs.
55
+
56
+ ## 6. Commit
57
+
58
+ On the main branch, suggest a new branch first. Commit the files with a message that starts with `docs(amk):`, which keeps it out of the changelog. Ask before pushing.
59
+
60
+ Suggest running `m-onboard` again after big changes: a new module, a new state or navigation library, a new backend. In a new app that's still close to its template, also suggest settling the stack choices the team hasn't made yet with `m-explore` before the first feature, for example `m-explore which navigation and state libraries should we use`.
@@ -9,8 +9,8 @@ disable-model-invocation: true
9
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
10
 
11
11
  1. **Update the handoff block** at the top of `specs/<id>/progress.md`: date and time, tool and model, branch, status (start the line with `not started`, `in progress — task N of M` or `done`, exactly), done, in progress (with file paths and what's half-done), the exact next step, decisions, open question, last check results, blockers, notes. Add a line to the log.
12
- 2. **Move decisions out of the chat.** Anything decided in this conversation goes into `requirements.md`, `design.md` or `docs/ai/decisions.md` now. Chat history doesn't travel to other tools.
13
- 3. **Commit the work in progress** on the feature branch (never `main`): message `wip: <id> <short summary>`, ending with `Assisted-by: <tool>/<model>` and `Spec: specs/<id>`.
12
+ 2. **Move decisions out of the chat.** Anything decided in this conversation goes into `requirements.md`, `design.md` or `docs/amk/decisions.md` now. Chat history doesn't travel to other tools.
13
+ 3. **Commit the work in progress** on the feature branch (never `main`): message `wip: <id> <short summary>`, ending with `Spec: specs/<id>`.
14
14
  - Never use `--no-verify`. If a git hook blocks the commit, fix the problem if it's quick. Otherwise say so, record it in the handoff under "Blocked", and stop.
15
15
  4. **Push the branch**: `git push -u origin <branch>`.
16
16
  5. **Tell the user** the branch name, and that they can continue anywhere with `git pull`, then `m-continue <id>`.
@@ -21,12 +21,12 @@ Input: $ARGUMENTS (the new version such as 1.4.0, or patch, minor or major; whic
21
21
  - `client.md`: for the client or product owner. Cover what's new, what's fixed, what they should test or do, and known issues.
22
22
 
23
23
  Show all three files to the user and wait for their approval.
24
- 5. **Version and build numbers:** `sh scripts/ai/set-version.sh <version>` sets the iOS and Android version names; in Expo apps without native folders, `expo.version` in `app.json`. If the script stops because the project ships several apps, or computes its config in `app.config.*`, ask the user how to set each version, and set them after they confirm.
24
+ 5. **Version and build numbers:** `sh scripts/amk/set-version.sh <version>` sets the iOS and Android version names; in Expo apps without native folders, `expo.version` in `app.json`. If the script stops because the project ships several apps, or computes its config in `app.config.*`, ask the user how to set each version, and set them after they confirm.
25
25
  - When CI, fastlane or EAS sets the build numbers at build time (`release-check.js` in step 6 says so), leave them alone.
26
26
  - Otherwise every store upload needs a higher build number. Ask before changing native files. Then raise Android's `versionCode` in `android/app/build.gradle`, and set iOS with `cd ios && agvtool new-version -all <number>`. Never edit `project.pbxproj` by hand. In Expo apps without native folders, raise `expo.ios.buildNumber` and `expo.android.versionCode` in `app.json` instead. iOS may keep its build number when the version name changes, if that's how the team works.
27
- 6. **Release check:** `node scripts/ai/release-check.js`. Show the output. Fix each ✗, asking first when the fix touches native config. List each ! for the user to decide.
28
- 7. **Release PR:** commit as `chore(release): <version>` (so the next changelog leaves it out), with `Assisted-by: <tool>/<model>`. Ask before pushing. Open a PR titled `Release <version>` with the changelog and the release-check output.
27
+ 6. **Release check:** `node scripts/amk/release-check.js`. Show the output. Fix each ✗, asking first when the fix touches native config. List each ! for the user to decide.
28
+ 7. **Release PR:** commit as `chore(release): <version>`, so the next changelog leaves it out. Ask before pushing. Open a PR titled `Release <version>` with the changelog and the release-check output.
29
29
  8. **Tag and build, after the merge.** Once the PR is merged, ask the user before tagging. Then run `git switch main && git pull && git tag v<version> && git push origin v<version>`.
30
- - With Codemagic (`codemagic.yaml`; see `docs/ai/codemagic.md`), the tag starts the signed builds.
30
+ - With Codemagic (`codemagic.yaml`; see `docs/amk/codemagic.md`), the tag starts the signed builds.
31
31
  - With the team's own release tooling (fastlane lanes in `fastlane/`, `ios/fastlane/` or `android/fastlane/`, EAS builds set up in `eas.json`, or release scripts in `package.json`), the user runs the lane, `eas build` and `eas submit`, or the script that builds and uploads the release, instead of `release-build.sh`. Tell them which one; if it isn't clear, ask.
32
- - Without CI, the user builds signed apps on their Mac, because signing keys stay with people. Tell them to run `sh scripts/ai/release-build.sh android [flavor]` and `sh scripts/ai/release-build.sh ios [scheme]`, and to upload the results from `.ai/release/` (Play Console, and Xcode's Organizer or Transporter). In Expo apps the script generates the native projects first, and iOS signing needs the Apple team in `app.json` (`expo.ios.appleTeamId`). Never run these yourself or ask for the keys.
32
+ - Without CI, the user builds signed apps on their Mac, because signing keys stay with people. Tell them to run `sh scripts/amk/release-build.sh android [flavor]` and `sh scripts/amk/release-build.sh ios [scheme]`, and to upload the results from `.amk/release/` (Play Console, and Xcode's Organizer or Transporter). In Expo apps the script generates the native projects first, and iOS signing needs the Apple team in `app.json` (`expo.ios.appleTeamId`). Never run these yourself or ask for the keys.
@@ -17,7 +17,7 @@ If your tool has subagents, hand the review to the `m-reviewer` subagent, so it
17
17
  - **Against the spec**, when there is one:
18
18
  - *Complete:* every task is ticked, every requirement is implemented, and every scenario has evidence (a test or a screenshot).
19
19
  - *Correct:* the code does what each requirement says, edge cases included, and nothing outside the agreed scope.
20
- - *Coherent:* the decisions in `design.md` show up in the code, and `specs/current/` was updated (`node scripts/ai/specs.js merge <id>`) if behavior changed.
20
+ - *Coherent:* the decisions in `design.md` show up in the code, and `specs/current/` was updated (`node scripts/amk/specs.js merge <id>`) if behavior changed.
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)?
@@ -31,7 +31,7 @@ if command -v plutil > /dev/null; then
31
31
  fi
32
32
 
33
33
  # 4. lint the staged JS/TS files with the project's own ESLint config (the kit's own scripts aren't the app's code)
34
- files=$(echo "$staged" | grep -E '\.(js|jsx|ts|tsx)$' | grep -v '^scripts/ai/' || true)
34
+ files=$(echo "$staged" | grep -E '\.(js|jsx|ts|tsx)$' | grep -v '^scripts/amk/' || true)
35
35
  if [ -n "$files" ]; then
36
36
  if [ -x node_modules/.bin/eslint ]; then
37
37
  # ponytail: file names with spaces aren't supported here; split on newlines if that ever matters
@@ -43,13 +43,13 @@ fi
43
43
 
44
44
  # 5. spec format: requirements in force need a SHALL and a scenario (format: specs/current/README.md)
45
45
  specs=$(echo "$staged" | grep -E '^specs/([^_/][^/]*/requirements|current/[^/]+)\.md$' | grep -v '^specs/current/README\.md$' || true)
46
- if [ -n "$specs" ] && [ -f scripts/ai/specs.js ]; then
47
- node scripts/ai/specs.js check --skip-drafts $specs || fail "fix the spec format above (format: specs/current/README.md)"
46
+ if [ -n "$specs" ] && [ -f scripts/amk/specs.js ]; then
47
+ node scripts/amk/specs.js check --skip-drafts $specs || fail "fix the spec format above (format: specs/current/README.md)"
48
48
  fi
49
49
 
50
50
  # 6. files renamed only in letter case on macOS or Windows: git still has the old name, so other machines can't find them
51
- if [ -f scripts/ai/case-check.js ]; then
52
- node scripts/ai/case-check.js || fail "rename them through git as shown above"
51
+ if [ -f scripts/amk/case-check.js ]; then
52
+ node scripts/amk/case-check.js || fail "rename them through git as shown above"
53
53
  fi
54
54
 
55
55
  # 7. warn about large commits (the PR size check in CI is the hard limit)
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # agentic-mobile-kit pre-push: typecheck and tests before code leaves the machine.
3
3
  set -eu
4
- [ -d node_modules ] || { echo "pre-push: dependencies aren't installed; run: sh scripts/ai/install-deps.sh" >&2; exit 1; }
4
+ [ -d node_modules ] || { echo "pre-push: dependencies aren't installed; run: sh scripts/amk/install-deps.sh" >&2; exit 1; }
5
5
  # each passes when the app's script passes, or when all its failures were already on the base branch
6
- node scripts/ai/baseline.js typecheck || { echo "pre-push: fix the new type errors above" >&2; exit 1; }
7
- node scripts/ai/baseline.js test || { echo "pre-push: fix the new test failures above" >&2; exit 1; }
6
+ node scripts/amk/baseline.js typecheck || { echo "pre-push: fix the new type errors above" >&2; exit 1; }
7
+ node scripts/amk/baseline.js test || { echo "pre-push: fix the new test failures above" >&2; exit 1; }
@@ -24,15 +24,15 @@ jobs:
24
24
  - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
25
25
  with:
26
26
  node-version: 24
27
- - run: sh scripts/ai/install-deps.sh
27
+ - run: sh scripts/amk/install-deps.sh
28
28
  # each passes when the app's script passes, or when all its failures were already on the base branch
29
29
  - name: Lint, typecheck and tests
30
30
  env:
31
31
  AMK_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }}
32
32
  run: |
33
- node scripts/ai/baseline.js lint
34
- node scripts/ai/baseline.js typecheck
35
- node scripts/ai/baseline.js test
33
+ node scripts/amk/baseline.js lint
34
+ node scripts/amk/baseline.js typecheck
35
+ node scripts/amk/baseline.js test
36
36
  - name: Tool configs match .rulesync/ (run "npx -y rulesync@27.0.0 generate" and commit if this fails)
37
37
  if: hashFiles('rulesync.jsonc') != ''
38
38
  run: npx -y rulesync@27.0.0 generate > /dev/null && git diff --exit-code -- .claude .codex .agents .antigravity
@@ -57,7 +57,7 @@ jobs:
57
57
  distribution: temurin
58
58
  java-version: 17
59
59
  cache: gradle
60
- - run: sh scripts/ai/install-deps.sh
60
+ - run: sh scripts/amk/install-deps.sh
61
61
  - name: Generate the native project (Expo apps without android/)
62
62
  if: hashFiles('android/settings.gradle', 'android/settings.gradle.kts') == ''
63
63
  run: npx expo prebuild --platform android --no-install
@@ -1,5 +1,5 @@
1
1
  # agentic-mobile-kit end-to-end check: runs the Maestro flows in .maestro/ on an Android emulator
2
- # with a release build, the same way `sh scripts/ai/verify.sh android` does locally.
2
+ # with a release build, the same way `sh scripts/amk/verify.sh android` does locally.
3
3
  # Runs nightly, on demand, and on pull requests labelled "e2e". Screenshots are uploaded as an artifact.
4
4
  name: e2e
5
5
 
@@ -36,7 +36,7 @@ jobs:
36
36
  distribution: temurin
37
37
  java-version: 17
38
38
  cache: gradle
39
- - run: sh scripts/ai/install-deps.sh
39
+ - run: sh scripts/amk/install-deps.sh
40
40
  - name: Install Maestro (pinned version, checksum verified)
41
41
  run: |
42
42
  curl -fsSL -o maestro.zip "https://github.com/mobile-dev-inc/maestro/releases/download/cli-$MAESTRO_VERSION/maestro.zip"
@@ -44,7 +44,7 @@ jobs:
44
44
  unzip -q maestro.zip -d "$HOME" && rm maestro.zip
45
45
  echo "$HOME/maestro/bin" >> "$GITHUB_PATH"
46
46
  - name: Generate the native project (Expo apps without android/ in git)
47
- run: sh scripts/ai/prebuild.sh android
47
+ run: sh scripts/amk/prebuild.sh android
48
48
  - name: Build release APK
49
49
  working-directory: android
50
50
  run: ./gradlew assembleRelease --no-daemon
@@ -64,11 +64,11 @@ jobs:
64
64
  cores: 4
65
65
  disable-animations: true
66
66
  emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
67
- script: sh scripts/ai/verify.sh android --label ci
67
+ script: sh scripts/amk/verify.sh android --label ci
68
68
  - name: Upload screenshots and logs
69
69
  if: always()
70
70
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
71
71
  with:
72
72
  name: e2e-evidence
73
- path: .ai/evidence/
73
+ path: .amk/evidence/
74
74
  if-no-files-found: ignore
@@ -32,10 +32,10 @@ jobs:
32
32
  - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
33
33
  with:
34
34
  node-version: 24
35
- - run: sh scripts/ai/install-deps.sh
35
+ - run: sh scripts/amk/install-deps.sh
36
36
  - name: Generate the native project (Expo apps without ios/ in git)
37
- run: sh scripts/ai/prebuild.sh ios
37
+ run: sh scripts/amk/prebuild.sh ios
38
38
  - name: Install pods
39
- run: sh scripts/ai/pod-install.sh
39
+ run: sh scripts/amk/pod-install.sh
40
40
  - name: Build for the simulator (no signing)
41
- run: sh scripts/ai/ios-build.sh
41
+ run: sh scripts/amk/ios-build.sh
@@ -2,7 +2,7 @@
2
2
  "version": 1,
3
3
  "hooks": {
4
4
  // no matcher: runs for every tool call; guard.js decides from the payload
5
- "preToolUse": [{ "command": "node scripts/ai/guard.js" }],
6
- "stop": [{ "command": "node scripts/ai/handoff-check.js" }]
5
+ "preToolUse": [{ "command": "node scripts/amk/guard.js" }],
6
+ "stop": [{ "command": "node scripts/amk/handoff-check.js" }]
7
7
  }
8
8
  }
@@ -1,34 +1,34 @@
1
1
  <!-- KIT:START agentic-mobile-kit {{KIT_VERSION}} ci={{KIT_CI}} stack={{KIT_STACK}} (edit outside these markers; the kit updates what's inside) -->
2
2
  # {{APP_NAME}}: instructions for AI agents
3
3
 
4
- Read by Claude Code (through CLAUDE.md), Codex, Cursor, OpenCode, Kiro and Antigravity. Keep it short; details live in `docs/ai/`.
4
+ Read by Claude Code (through CLAUDE.md), Codex, Cursor, OpenCode, Kiro and Antigravity. Keep it short; details live in `docs/amk/`.
5
5
 
6
6
  This project may also use other AI workflow frameworks (for example Superpowers, BMAD or proAgents). They keep working for everything else. When the user starts a task with an `m-` skill (`/m-feature`, `$m-feature`, …), follow that skill's steps for the whole task; where another framework's instructions differ, the `m-` skill wins.
7
7
 
8
8
  ## Project
9
9
 
10
- - Bare React Native {{RN_VERSION}} ({{RN_ARCH}}), React {{REACT_VERSION}}, TypeScript {{TS_VERSION}}, Node {{NODE_VERSION}}. Package manager: {{PM}}.
11
- - What the app does: `docs/ai/product.md`, and requirement by requirement, as it works now: `specs/current/`. Stack and services: `docs/ai/tech.md`. Folders and layers: `docs/ai/structure.md`. Code style: `docs/ai/conventions.md`.
10
+ - Bare React Native {{RN_VERSION}} ({{RN_ARCH}}), React {{REACT_VERSION}}, {{LANGUAGE}}, Node {{NODE_VERSION}}. Package manager: {{PM}}.
11
+ - What the app does: `docs/amk/product.md`, and requirement by requirement, as it works now: `specs/current/`. Stack and services: `docs/amk/tech.md`. Folders and layers: `docs/amk/structure.md`. Code style: `docs/amk/conventions.md`.
12
12
 
13
13
  ## Commands
14
14
 
15
15
  | Task | Command |
16
16
  |---|---|
17
- | Install dependencies | `sh scripts/ai/install-deps.sh` |
18
- | Lint, typecheck, test | `{{PM_RUN}} lint`, `{{PM_RUN}} typecheck`, `{{PM_RUN}} test` |
19
- | iOS pods (after native dependency changes) | `sh scripts/ai/pod-install.sh` |
20
- | iOS build (simulator, no signing) | `sh scripts/ai/ios-build.sh` |
17
+ | Install dependencies | `sh scripts/amk/install-deps.sh` |
18
+ | {{CHECK_TASKS}} | {{CHECK_COMMANDS}} |
19
+ | iOS pods (after native dependency changes) | `sh scripts/amk/pod-install.sh` |
20
+ | iOS build (simulator, no signing) | `sh scripts/amk/ios-build.sh` |
21
21
  | Android build | `cd android && ./gradlew assembleDebug` |
22
- | Check on devices (release builds, Maestro flows, screenshots) | `sh scripts/ai/verify.sh all --spec <id>`; with product flavors it checks the first unless `--flavor <name>`; another iOS scheme: `--scheme <name>` |
23
- | Specs: progress, format check, fold a finished feature into the living spec | `node scripts/ai/specs.js status`, `node scripts/ai/specs.js check`, `node scripts/ai/specs.js merge <id>` |
24
- | Check a release before tagging it (versions, permission texts, debug leftovers) | `node scripts/ai/release-check.js` |
25
- | Signed release builds (a person runs them: they use the signing keys) | `sh scripts/ai/release-build.sh android [flavor]`, `sh scripts/ai/release-build.sh ios [scheme]` |
22
+ | Check on devices (release builds, Maestro flows, screenshots) | `sh scripts/amk/verify.sh all --spec <id>`; with product flavors it checks the first unless `--flavor <name>`; another iOS scheme: `--scheme <name>` |
23
+ | Specs: progress, format check, fold a finished feature into the living spec | `node scripts/amk/specs.js status`, `node scripts/amk/specs.js check`, `node scripts/amk/specs.js merge <id>` |
24
+ | Check a release before tagging it (versions, permission texts, debug leftovers) | `node scripts/amk/release-check.js` |
25
+ | Signed release builds (a person runs them: they use the signing keys) | `sh scripts/amk/release-build.sh android [flavor]`, `sh scripts/amk/release-build.sh ios [scheme]` |
26
26
 
27
27
  ## Definition of done
28
28
 
29
29
  A task is done only when:
30
- 1. `sh scripts/ai/verify.sh quick` passes (lint, typecheck, tests) and you show its output from this session. In an app whose base branch already fails some of them, it passes when your change adds no new failure, and lists the old ones: leave those alone unless the task is to fix them;
31
- 2. UI changes were checked with `sh scripts/ai/verify.sh all --spec <id>` on both iOS and Android, and you looked at the screenshots. On Windows or Linux, that covers Android only: write in `progress.md` and the PR that iOS still needs checking on a Mac, and the PR isn't merged until a teammate with a Mac has done it;
30
+ 1. `sh scripts/amk/verify.sh quick` passes (lint, typecheck, tests) and you show its output from this session. In an app whose base branch already fails some of them, it passes when your change adds no new failure, and lists the old ones: leave those alone unless the task is to fix them;
31
+ 2. UI changes were checked with `sh scripts/amk/verify.sh all --spec <id>` on both iOS and Android, and you looked at the screenshots. On Windows or Linux, that covers Android only: write in `progress.md` and the PR that iOS still needs checking on a Mac, and the PR isn't merged until a teammate with a Mac has done it;
32
32
  3. the change stays inside the task's scope;
33
33
  4. `specs/<id>/progress.md` is updated, when working from a spec.
34
34
 
@@ -42,8 +42,8 @@ Never say a check passed unless you ran it in this session.
42
42
  - Never read, print or commit `.env` files, keystores or signing files. Secrets don't belong in this repo.
43
43
  - Never use `git commit --no-verify`, `git push --force`, `git reset --hard` or `rm -rf`.
44
44
  - After 2 failed attempts at the same fix, stop and report what you found.
45
- - Chat is not memory: write decisions into the spec or `docs/ai/decisions.md` straight away.
46
- - Follow `docs/ai/react-native.md`. Before fixing a build error, check `docs/ai/known-issues.md`.
45
+ - Chat is not memory: write decisions into the spec or `docs/amk/decisions.md` straight away.
46
+ - Follow `docs/amk/react-native.md`. Before fixing a build error, check `docs/amk/known-issues.md`.
47
47
 
48
48
  ## Skills
49
49
 
@@ -1,4 +1,4 @@
1
- # Signed release builds on Codemagic (codemagic.io). One-time setup for each app: docs/ai/codemagic.md
1
+ # Signed release builds on Codemagic (codemagic.io). One-time setup for each app: docs/amk/codemagic.md
2
2
  # Both workflows start when a version tag is pushed (git push origin v1.2.0); you can also start them in Codemagic.
3
3
  # Build numbers are set on the build machine only (one more than the store's latest), so the repo never needs a bump for them.
4
4
  workflows:
@@ -20,14 +20,14 @@ workflows:
20
20
  java: 17
21
21
  scripts:
22
22
  - name: Release check
23
- script: node scripts/ai/release-check.js
23
+ script: node scripts/amk/release-check.js
24
24
  - name: Install dependencies
25
- script: sh scripts/ai/install-deps.sh
25
+ script: sh scripts/amk/install-deps.sh
26
26
  - name: Store release notes
27
27
  script: cp "release-notes/${CM_TAG#v}/play-store.txt" release_notes.txt 2>/dev/null || true
28
28
  - name: Build the signed app bundle
29
29
  script: |
30
- sh scripts/ai/prebuild.sh android # Expo apps without android/ in git
30
+ sh scripts/amk/prebuild.sh android # Expo apps without android/ in git
31
31
  echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
32
32
  package=$(sed -n -E 's/.*applicationId( =)? "([^"]+)".*/\2/p' android/app/build.gradle* | head -1)
33
33
  if last=$(google-play get-latest-build-number --package-name "$package") && [ -n "$last" ]; then code=$((last + 1)); else code=$BUILD_NUMBER; fi
@@ -65,9 +65,9 @@ workflows:
65
65
  cocoapods: default
66
66
  scripts:
67
67
  - name: Release check
68
- script: node scripts/ai/release-check.js
68
+ script: node scripts/amk/release-check.js
69
69
  - name: Install dependencies
70
- script: sh scripts/ai/install-deps.sh && sh scripts/ai/prebuild.sh ios && sh scripts/ai/pod-install.sh
70
+ script: sh scripts/amk/install-deps.sh && sh scripts/amk/prebuild.sh ios && sh scripts/amk/pod-install.sh
71
71
  - name: Store release notes
72
72
  script: |
73
73
  notes="release-notes/${CM_TAG#v}/app-store.txt"
@@ -3,7 +3,7 @@
3
3
  `codemagic.yaml` has two workflows. `android-release` builds a signed app bundle and uploads it to Google Play's internal track. `ios-release` builds a signed ipa and uploads it to TestFlight. Both start when a version tag is pushed (`git push origin v1.2.0`), and you can start either one by hand in Codemagic.
4
4
 
5
5
  Each build:
6
- 1. runs `node scripts/ai/release-check.js` and stops if it finds a problem;
6
+ 1. runs `node scripts/amk/release-check.js` and stops if it finds a problem;
7
7
  2. sets the build number on the build machine: one more than the latest in the store, or Codemagic's build counter for a new app. Nothing is committed, so the repo keeps only the version name (for example 1.2.0), which you bump in the release PR;
8
8
  3. uses `release-notes/<version>/play-store.txt` or `app-store.txt` as the store's "What's new" or TestFlight's "What to test", when the build comes from a tag;
9
9
  4. signs with keys that Codemagic stores. The repo never holds them, and local release builds (`verify.sh`, the e2e CI) stay signed with the debug key.
@@ -13,8 +13,8 @@ Recurring errors and their fixes. Check here before debugging a build error. Rem
13
13
 
14
14
  ### iOS build fails right after a native dependency was added or removed
15
15
  - **Cause:** `ios/Pods` is out of date.
16
- - **Fix:** `sh scripts/ai/pod-install.sh`, then rebuild.
17
- - **Prevention:** run `sh scripts/ai/pod-install.sh` in the same change that edits `package.json`.
16
+ - **Fix:** `sh scripts/amk/pod-install.sh`, then rebuild.
17
+ - **Prevention:** run `sh scripts/amk/pod-install.sh` in the same change that edits `package.json`.
18
18
 
19
19
  ### `./gradlew` fails with "no main manifest attribute, in …/gradle-wrapper.jar"
20
20
  - **Cause:** a React Native upgrade updated `android/gradlew` (which now runs `java -jar gradle-wrapper.jar`) but not `android/gradle/wrapper/gradle-wrapper.jar`. The upgrade diff doesn't carry binary files.
@@ -18,7 +18,7 @@ Rules for things AI agents commonly get wrong in current React Native. Each one
18
18
 
19
19
  ## Native changes
20
20
 
21
- - After adding or removing a native dependency: `sh scripts/ai/pod-install.sh`, then rebuild both apps. Restart Metro with `--reset-cache` if the bundle looks stale.
21
+ - After adding or removing a native dependency: `sh scripts/amk/pod-install.sh`, then rebuild both apps. Restart Metro with `--reset-cache` if the bundle looks stale.
22
22
  - Don't hand-edit `project.pbxproj`. Let CocoaPods or Xcode change it.
23
23
  - Don't bump the Android Gradle Plugin, Gradle, Kotlin or the iOS deployment target one by one. Upgrade React Native as a whole with the `upgrading-react-native` skill and the React Native Upgrade Helper.
24
24
 
@@ -1,9 +1,9 @@
1
1
  # Team process for AI-assisted work
2
2
 
3
3
  - The person who opens a PR owns it and must be able to explain every change without AI.
4
- - Commits made by an agent end with `Assisted-by: <tool>/<model>` and, when there's a spec, `Spec: specs/<id>`.
4
+ - A commit made for a spec ends with `Spec: specs/<id>`.
5
5
  - Keep PRs under 600 changed lines (CI enforces it; the `large-pr` label overrides).
6
6
  - Run at most 2 or 3 agents in parallel per person.
7
7
  - Don't use "skip permissions", "YOLO" or auto-run modes in any tool.
8
8
  - Keep secrets out of the repo folder; inject them at run time.
9
- - Review the metrics and the `m-learn` changes (`git log --grep 'chore(learn)'`) once a month. Re-check `AGENTS.md` and `docs/ai/` after every React Native, Xcode or Android Gradle Plugin upgrade, and after switching AI models.
9
+ - Review the metrics and the `m-learn` changes (`git log --grep 'chore(learn)'`) once a month. Re-check `AGENTS.md` and `docs/amk/` after every React Native, Xcode or Android Gradle Plugin upgrade, and after switching AI models.