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
@@ -7,7 +7,7 @@
7
7
  // test failing Jest tests and test files, compared with a test run of the base
8
8
  // The base: AMK_BASE, else the remote's default branch, else main or master. Its merge base is checked out once
9
9
  // into a temporary git worktree that shares node_modules, and its results are kept for the next run.
10
- // Usage: node scripts/ai/baseline.js lint|typecheck|test
10
+ // Usage: node scripts/amk/baseline.js lint|typecheck|test
11
11
  'use strict';
12
12
  const fs = require('fs');
13
13
  const os = require('os');
@@ -17,7 +17,7 @@ const { spawnSync, execFileSync } = require('child_process');
17
17
 
18
18
  const check = process.argv[2];
19
19
  if (!['lint', 'typecheck', 'test'].includes(check)) {
20
- console.error('usage: node scripts/ai/baseline.js lint|typecheck|test');
20
+ console.error('usage: node scripts/amk/baseline.js lint|typecheck|test');
21
21
  process.exit(2);
22
22
  }
23
23
  const root = process.cwd();
@@ -50,7 +50,7 @@ function runScript(dir) {
50
50
  fs.mkdirSync(scratch, { recursive: true });
51
51
  const json = path.join(scratch, `jest-${hash(dir)}.json`);
52
52
  fs.rmSync(json, { force: true });
53
- const r = spawnSync('sh', [path.join(root, 'scripts/ai/pm-run.sh'), check, ...(jest ? ['--json', `--outputFile=${json}`] : [])],
53
+ const r = spawnSync('sh', [path.join(root, 'scripts/amk/pm-run.sh'), check, ...(jest ? ['--json', `--outputFile=${json}`] : [])],
54
54
  { cwd: dir, encoding: 'utf8', env: { ...process.env, CI: 'true' }, maxBuffer: 2 ** 28 });
55
55
  return { code: r.status, out: `${r.stdout || ''}${r.stderr || ''}`, json, dir };
56
56
  }
@@ -119,8 +119,9 @@ function baseProblems(sha, extract) {
119
119
  function newLintErrors(sha) {
120
120
  const changed = [...new Set([...git('diff', '--name-only', '--diff-filter=ACMR', sha).split('\n'),
121
121
  ...git('ls-files', '--others', '--exclude-standard').split('\n')])].filter(Boolean);
122
- // the kit's own .eslintignore lines (for scripts/ai/) don't change how the app's code is checked
123
- const withoutKit = t => t.split('\n').filter(l => l.trim() !== 'scripts/ai/' && !l.startsWith('# agentic-mobile-kit')).join('\n').trim();
122
+ // the kit's own .eslintignore lines (for scripts/amk/) don't change how the app's code is checked
123
+ // (scripts/ai/ until 0.7.0)
124
+ const withoutKit = t => t.split('\n').filter(l => !/^scripts\/(amk|ai)\/$/.test(l.trim()) && !l.startsWith('# agentic-mobile-kit')).join('\n').trim();
124
125
  const setup = changed.filter(f => /(^|\/)(\.eslintrc(\.\w+)?|eslint\.config\.\w+|\.eslintignore)$/.test(f))
125
126
  .filter(f => path.basename(f) !== '.eslintignore' || withoutKit(git('show', `${sha}:${f}`)) !== withoutKit(fs.readFileSync(path.join(root, f), 'utf8')));
126
127
  if (setup.length) return { reason: `the change edits the ESLint setup (${setup.join(', ')}), so any error could be new` };
@@ -141,7 +142,7 @@ function newLintErrors(sha) {
141
142
  }
142
143
  };
143
144
  const errors = results => (results || []).flatMap(f => f.messages.filter(m => m.severity === 2).map(m => `${m.ruleId || 'parsing'}: ${m.message}`));
144
- const files = changed.filter(f => /\.(js|jsx|ts|tsx)$/.test(f) && !f.startsWith('scripts/ai/') && fs.existsSync(path.join(root, f)));
145
+ const files = changed.filter(f => /\.(js|jsx|ts|tsx)$/.test(f) && !f.startsWith('scripts/amk/') && fs.existsSync(path.join(root, f)));
145
146
  const results = files.length ? lint(files) : [];
146
147
  if (!results) return { reason: 'ESLint gave no report' };
147
148
  const fresh = [];
@@ -25,7 +25,7 @@ const destructive = /\brm\s+(-[a-z]*r[a-z]*f|-[a-z]*f[a-z]*r|-r\s+-f|-f\s+-r)\b|
25
25
  // example files (.env.example, .env.local.example, .env.sample, .env.template) aren't secrets
26
26
  const secretFile = /(^|[\s/'"=])\.env(?![\w.-]*\.(?:example|sample|template)(?=$|[\s'";|&)]))(\.[\w.-]+)?(?=$|[\s'";|&)])|\.(keystore|jks|p8|p12|mobileprovision)\b/;
27
27
 
28
- const block = reason => { process.stderr.write(`Blocked by scripts/ai/guard.js: ${reason}\n`); process.exit(2); };
28
+ const block = reason => { process.stderr.write(`Blocked by scripts/amk/guard.js: ${reason}\n`); process.exit(2); };
29
29
  for (const c of commands) {
30
30
  if (destructive.test(c)) block(`destructive command: ${c}`);
31
31
  if (secretFile.test(c)) block(`shell access to a secret file: ${c}`);
@@ -17,7 +17,7 @@ if (specs.length === 0) process.exit(0); // no spec in progress (quick change, b
17
17
 
18
18
  const changed = execSync('git status --porcelain', { encoding: 'utf8' })
19
19
  .split('\n').filter(Boolean).map(l => l.slice(3));
20
- const codeChanged = changed.some(f => !f.startsWith('specs/') && !f.startsWith('.ai/'));
20
+ const codeChanged = changed.some(f => !f.startsWith('specs/') && !f.startsWith('.amk/'));
21
21
  const handoffUpdated = changed.some(f => /^specs\/[^/]+\/progress\.md$/.test(f));
22
22
 
23
23
  if (codeChanged && !handoffUpdated) {
@@ -7,7 +7,7 @@
7
7
  set -eu
8
8
  config=${CONFIGURATION:-Debug}
9
9
  workspace=$(ls -d ios/*.xcworkspace 2>/dev/null | head -n 1)
10
- [ -n "$workspace" ] || { echo "No ios/*.xcworkspace found. Run sh scripts/ai/pod-install.sh first."; exit 1; }
10
+ [ -n "$workspace" ] || { echo "No ios/*.xcworkspace found. Run sh scripts/amk/pod-install.sh first."; exit 1; }
11
11
  scheme=${AMK_IOS_SCHEME:-$(basename "$workspace" .xcworkspace)}
12
12
  if [ "$config" = Release ]; then
13
13
  file=$(ls ios/*.xcodeproj/xcshareddata/xcschemes/"$scheme".xcscheme ios/*.xcworkspace/xcshareddata/xcschemes/"$scheme".xcscheme 2> /dev/null | head -n 1)
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
  # Runs a package.json script with the project's package manager; skips quietly if the script doesn't exist.
3
- # Usage: sh scripts/ai/pm-run.sh <script> [args…]
3
+ # Usage: sh scripts/amk/pm-run.sh <script> [args…]
4
4
  set -eu
5
5
  script=$1; shift
6
6
 
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # Installs the iOS pods. With a Gemfile (React Native's template has one), it uses the CocoaPods version pinned there,
3
3
  # so Podfile.lock doesn't change just because machines have different CocoaPods versions.
4
- # Usage: sh scripts/ai/pod-install.sh [pod install options]
4
+ # Usage: sh scripts/amk/pod-install.sh [pod install options]
5
5
  set -eu
6
6
  cd ios
7
7
  if [ -f ../Gemfile ] && command -v bundle > /dev/null && bundle check > /dev/null 2>&1; then
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # Expo apps whose ios/ and android/ aren't in git (Continuous Native Generation): generates the platform's native
3
3
  # project with `expo prebuild`, so release builds can run. Does nothing for apps that keep the folders in git.
4
- # Usage: sh scripts/ai/prebuild.sh ios|android
4
+ # Usage: sh scripts/amk/prebuild.sh ios|android
5
5
  set -eu
6
6
  platform=$1
7
7
  [ -z "$(git ls-files -- "$platform")" ] || exit 0
@@ -2,8 +2,8 @@
2
2
  # Builds signed release apps on this Mac: for apps without CI, or to check a release by hand.
3
3
  # A person runs it, because it uses the signing keys, which agents must never handle.
4
4
  #
5
- # sh scripts/ai/release-build.sh android [flavor] signed app bundle (.aab) for Google Play
6
- # sh scripts/ai/release-build.sh ios [scheme] signed .ipa for App Store Connect, or as ios/ExportOptions.plist says
5
+ # sh scripts/amk/release-build.sh android [flavor] signed app bundle (.aab) for Google Play
6
+ # sh scripts/amk/release-build.sh ios [scheme] signed .ipa for App Store Connect, or as ios/ExportOptions.plist says
7
7
  # Defaults: AMK_ANDROID_FLAVOR and AMK_IOS_SCHEME. An app with product flavors must name the one to build.
8
8
  #
9
9
  # Android signs with your upload key. Set its path in your shell, never in the repo:
@@ -17,11 +17,11 @@
17
17
  # Expo apps without native folders in git: it generates them first (expo prebuild). iOS signing then needs the
18
18
  # Apple team in app.json (expo.ios.appleTeamId).
19
19
  # Version and build numbers come from the repo, so set them first (the m-release skill does).
20
- # Output: .ai/release/
20
+ # Output: .amk/release/
21
21
  set -eu
22
22
  platform=${1:-}
23
23
  target=${2:-}
24
- out=.ai/release
24
+ out=.amk/release
25
25
  mkdir -p "$out"
26
26
 
27
27
  # secret VAR "question": read it without echo, unless it's already set
@@ -34,17 +34,17 @@ secret() {
34
34
 
35
35
  case "$platform" in
36
36
  android)
37
- sh scripts/ai/prebuild.sh android
37
+ sh scripts/amk/prebuild.sh android
38
38
  target=${target:-${AMK_ANDROID_FLAVOR:-}}
39
39
  if [ -z "$target" ]; then
40
40
  code=0
41
- flavors=$(node scripts/ai/android-flavors.js) || code=$?
41
+ flavors=$(node scripts/amk/android-flavors.js) || code=$?
42
42
  case $code in
43
43
  0) ;;
44
- 2) echo "This app has several flavor dimensions: name the variant, for example: sh scripts/ai/release-build.sh android devFree" >&2; exit 1 ;;
44
+ 2) echo "This app has several flavor dimensions: name the variant, for example: sh scripts/amk/release-build.sh android devFree" >&2; exit 1 ;;
45
45
  *) echo "Couldn't read the product flavors from build.gradle (see the error above)." >&2; exit 1 ;;
46
46
  esac
47
- [ -z "$flavors" ] || { echo "This app has product flavors ($(echo $flavors)). Name the one to build, for example: sh scripts/ai/release-build.sh android $(echo "$flavors" | head -n 1)" >&2; exit 1; }
47
+ [ -z "$flavors" ] || { echo "This app has product flavors ($(echo $flavors)). Name the one to build, for example: sh scripts/amk/release-build.sh android $(echo "$flavors" | head -n 1)" >&2; exit 1; }
48
48
  fi
49
49
  flavor=$(printf %s "$target" | awk '{ print toupper(substr($0, 1, 1)) substr($0, 2) }')
50
50
  if [ -n "${AMK_UPLOAD_KEYSTORE:-}" ]; then
@@ -71,8 +71,8 @@ android)
71
71
  done
72
72
  ;;
73
73
  ios)
74
- sh scripts/ai/prebuild.sh ios
75
- if [ ! -d ios/Pods ] || [ ios/Podfile -nt ios/Pods/Manifest.lock ]; then sh scripts/ai/pod-install.sh; fi
74
+ sh scripts/amk/prebuild.sh ios
75
+ if [ ! -d ios/Pods ] || [ ios/Podfile -nt ios/Pods/Manifest.lock ]; then sh scripts/amk/pod-install.sh; fi
76
76
  workspace=$(ls -d ios/*.xcworkspace | head -n 1)
77
77
  scheme=${target:-${AMK_IOS_SCHEME:-$(basename "$workspace" .xcworkspace)}}
78
78
  log="$out/$scheme-ios.log"
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // Release check for a bare React Native app: what App Store review, Play review or your users would catch.
3
- // Usage: node scripts/ai/release-check.js [--since <git ref>]
3
+ // Usage: node scripts/amk/release-check.js [--since <git ref>]
4
4
  // --since the previous release to compare with (default: the latest git tag)
5
5
  // Exits 1 when something would get the release rejected or broken; warnings don't fail it.
6
6
  'use strict';
@@ -41,7 +41,7 @@ function expoConfig() {
41
41
  const dir = path.dirname(require.resolve('expo/package.json', { paths: [process.cwd()] }));
42
42
  cli = path.join(dir, require(path.join(dir, 'package.json')).bin.expo);
43
43
  } catch {
44
- fail('Expo isn\'t installed, so the app config can\'t be read', 'install dependencies first: sh scripts/ai/install-deps.sh');
44
+ fail('Expo isn\'t installed, so the app config can\'t be read', 'install dependencies first: sh scripts/amk/install-deps.sh');
45
45
  return null;
46
46
  }
47
47
  const r = spawnSync(process.execPath, [cli, 'config', '--type', 'introspect', '--json'], { encoding: 'utf8', maxBuffer: 2 ** 28 });
@@ -232,7 +232,7 @@ if (/debuggable\s*=?\s*true/.test(releaseBlock)) fail('Android release build is
232
232
  if (/android\.injected\.signing/.test(codemagic)) ok('Android release signing', 'Codemagic signs with the upload key');
233
233
  else if (/signingConfig\s*=?\s*signingConfigs\.debug/.test(releaseBlock)) {
234
234
  // the kit's release-build.sh (and Codemagic) sign with the upload key, and Play rejects debug-signed uploads anyway
235
- info('build.gradle signs release builds with the debug key', 'build store releases with sh scripts/ai/release-build.sh android, which signs with your upload key');
235
+ info('build.gradle signs release builds with the debug key', 'build store releases with sh scripts/amk/release-build.sh android, which signs with your upload key');
236
236
  }
237
237
  const cleartext = expo ? ((((expoManifest || {}).application || [])[0] || {}).$ || {})['android:usesCleartextTraffic'] === 'true'
238
238
  : /android:usesCleartextTraffic="true"/.test(readNow(manifestPath) || '');
@@ -2,10 +2,10 @@
2
2
  # Sets the version users see on both platforms: iOS MARKETING_VERSION and Android versionName, or in Expo
3
3
  # apps without native folders, expo.version in app.json.
4
4
  # Build numbers are left alone (codemagic.yaml sets them at build time).
5
- # Usage: sh scripts/ai/set-version.sh 1.4.0
5
+ # Usage: sh scripts/amk/set-version.sh 1.4.0
6
6
  set -eu
7
7
  v=${1:-}
8
- echo "$v" | grep -qE '^[0-9]+\.[0-9]+(\.[0-9]+)?$' || { echo "usage: sh scripts/ai/set-version.sh <version, e.g. 1.4.0>" >&2; exit 1; }
8
+ echo "$v" | grep -qE '^[0-9]+\.[0-9]+(\.[0-9]+)?$' || { echo "usage: sh scripts/amk/set-version.sh <version, e.g. 1.4.0>" >&2; exit 1; }
9
9
 
10
10
  # Expo apps without native folders in git: the version is expo.version in the app config
11
11
  if [ -z "$(git ls-files -- ios android 2> /dev/null)" ] &&
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // Specs: check their format, fold a finished feature into the living spec, and show progress.
3
- // node scripts/ai/specs.js check [--skip-drafts] [files…] format of specs/<id>/requirements.md and specs/current/*.md
3
+ // node scripts/amk/specs.js check [--skip-drafts] [files…] format of specs/<id>/requirements.md and specs/current/*.md
4
4
  // (default: all; --skip-drafts leaves out specs whose work hasn't started)
5
- // node scripts/ai/specs.js merge <id> apply specs/<id>/requirements.md's ADDED/MODIFIED/REMOVED sections to specs/current/
6
- // node scripts/ai/specs.js status each spec's status and task progress, and the living spec's size
5
+ // node scripts/amk/specs.js merge <id> apply specs/<id>/requirements.md's ADDED/MODIFIED/REMOVED sections to specs/current/
6
+ // node scripts/amk/specs.js status each spec's status and task progress, and the living spec's size
7
7
  // A requirement is "### Requirement: <name>", a sentence with SHALL or MUST, and at least one
8
8
  // "#### Scenario: <case>" with WHEN and THEN. Changes are "## ADDED Requirements: <area>" (and MODIFIED, REMOVED),
9
9
  // where <area> names the file specs/current/<area>.md. Format: specs/current/README.md.
@@ -2,12 +2,12 @@
2
2
  # Checks the app the way a user would: lint, typecheck and tests, then release builds on the iOS simulator
3
3
  # and Android emulator, running Maestro flows and saving screenshots as evidence.
4
4
  #
5
- # Usage: sh scripts/ai/verify.sh [quick|ios|android|all] [--spec <id>] [--flow <file>] [--label <name>]
5
+ # Usage: sh scripts/amk/verify.sh [quick|ios|android|all] [--spec <id>] [--flow <file>] [--label <name>]
6
6
  # [--flavor <name>] [--scheme <name>]
7
7
  # quick lint, typecheck, tests
8
8
  # ios|android release build, install, run flows, screenshots
9
9
  # all everything (default)
10
- # --spec <id> run .maestro/<id>*.yaml and save evidence in .ai/evidence/<id>/
10
+ # --spec <id> run .maestro/<id>*.yaml and save evidence in .amk/evidence/<id>/
11
11
  # --label <n> evidence folder name (default: the spec id, or a timestamp)
12
12
  # --flavor <name> Android product flavor to check (default: the first one in build.gradle)
13
13
  # --scheme <name> iOS scheme to check (default: the one named like the workspace)
@@ -35,8 +35,8 @@ while [ $# -gt 0 ]; do
35
35
  done
36
36
 
37
37
  root=$(pwd)
38
- . scripts/ai/maestro-env.sh
39
- evidence="$root/.ai/evidence/${label:-${spec:-$(date +%Y%m%d-%H%M%S)}}"
38
+ . scripts/amk/maestro-env.sh
39
+ evidence="$root/.amk/evidence/${label:-${spec:-$(date +%Y%m%d-%H%M%S)}}"
40
40
  mkdir -p "$evidence"
41
41
  status=0
42
42
 
@@ -80,9 +80,9 @@ run_flows() { # platform device app_id
80
80
 
81
81
  quick() {
82
82
  # each one passes when the app's script passes, or when all its failures were already on the base branch
83
- if node scripts/ai/baseline.js lint > "$evidence/lint.log" 2>&1 &&
84
- node scripts/ai/baseline.js typecheck > "$evidence/typecheck.log" 2>&1 &&
85
- node scripts/ai/baseline.js test > "$evidence/test.log" 2>&1; then
83
+ if node scripts/amk/baseline.js lint > "$evidence/lint.log" 2>&1 &&
84
+ node scripts/amk/baseline.js typecheck > "$evidence/typecheck.log" 2>&1 &&
85
+ node scripts/amk/baseline.js test > "$evidence/test.log" 2>&1; then
86
86
  echo "quick: lint, typecheck and tests passed"
87
87
  # what didn't run (no such script, or an Expo app without ESLint yet), and failures the base branch already had
88
88
  cat "$evidence/lint.log" "$evidence/typecheck.log" "$evidence/test.log" |
@@ -97,20 +97,20 @@ quick() {
97
97
  ios() {
98
98
  # iOS builds need Xcode, so off a Mac "all" checks Android and says who has to check iOS
99
99
  if [ "$(uname -s)" != Darwin ]; then
100
- echo "ios: not checked here: iOS builds need a Mac with Xcode. A teammate with a Mac runs: sh scripts/ai/verify.sh ios${spec:+ --spec $spec}"
100
+ echo "ios: not checked here: iOS builds need a Mac with Xcode. A teammate with a Mac runs: sh scripts/amk/verify.sh ios${spec:+ --spec $spec}"
101
101
  [ "$mode" = ios ] && status=1
102
102
  return
103
103
  fi
104
104
  command -v maestro > /dev/null || { echo "ios: Maestro isn't installed (https://maestro.dev)"; status=1; return; }
105
105
  # Expo apps without native folders in git: generate ios/ first
106
- if ! sh scripts/ai/prebuild.sh ios > "$evidence/prebuild-ios.log" 2>&1; then
106
+ if ! sh scripts/amk/prebuild.sh ios > "$evidence/prebuild-ios.log" 2>&1; then
107
107
  echo "ios: expo prebuild FAILED, see ${evidence#"$root"/}/prebuild-ios.log"; status=1; return
108
108
  fi
109
109
  # pod install also generates React Native codegen files into ios/build/generated; a newer Podfile needs it again
110
110
  if [ ! -d ios/Pods ] || [ ! -d ios/build/generated ] || [ ios/Podfile -nt ios/Pods/Manifest.lock ]; then
111
- sh scripts/ai/pod-install.sh > "$evidence/pod-install.log" 2>&1
111
+ sh scripts/amk/pod-install.sh > "$evidence/pod-install.log" 2>&1
112
112
  fi
113
- if ! CONFIGURATION=Release sh scripts/ai/ios-build.sh > "$evidence/ios-build.log" 2>&1; then
113
+ if ! CONFIGURATION=Release sh scripts/amk/ios-build.sh > "$evidence/ios-build.log" 2>&1; then
114
114
  echo "ios: release build FAILED, see ${evidence#"$root"/}/ios-build.log"; status=1; return
115
115
  fi
116
116
  # the newest app: the scheme just built (another scheme's app may still be there from an earlier build)
@@ -141,13 +141,13 @@ android() {
141
141
  sdk=${ANDROID_HOME:-${ANDROID_SDK_ROOT:-$default_sdk}}
142
142
  adb="$sdk/platform-tools/adb"
143
143
  # Expo apps without native folders in git: generate android/ first
144
- if ! sh scripts/ai/prebuild.sh android > "$evidence/prebuild-android.log" 2>&1; then
144
+ if ! sh scripts/amk/prebuild.sh android > "$evidence/prebuild-android.log" 2>&1; then
145
145
  echo "android: expo prebuild FAILED, see ${evidence#"$root"/}/prebuild-android.log"; status=1; return
146
146
  fi
147
147
  # apps with product flavors: check one, the first in build.gradle unless --flavor names another
148
148
  if [ -z "$flavor" ]; then
149
149
  code=0
150
- flavors=$(node scripts/ai/android-flavors.js) || code=$?
150
+ flavors=$(node scripts/amk/android-flavors.js) || code=$?
151
151
  case $code in
152
152
  0) ;;
153
153
  2) echo "android: the app has several flavor dimensions; name the variant with --flavor (for example devFree)"; status=1; return ;;
@@ -2,7 +2,7 @@
2
2
 
3
3
  One file per area of the app (for example `login.md` or `tasks.md`) that describes how the app behaves today, requirement by requirement. AI tools read it before they change an area, so they don't have to work out the current behavior from the code.
4
4
 
5
- It starts empty and grows one change at a time; there's no need to describe the whole app up front. Each feature's `specs/<id>/requirements.md` lists what it adds, changes and removes, and when the feature is done, `node scripts/ai/specs.js merge <id>` applies those changes here. People can edit these files too.
5
+ It starts empty and grows one change at a time; there's no need to describe the whole app up front. Each feature's `specs/<id>/requirements.md` lists what it adds, changes and removes, and when the feature is done, `node scripts/amk/specs.js merge <id>` applies those changes here. People can edit these files too.
6
6
 
7
7
  ## Format
8
8
 
@@ -37,4 +37,4 @@ A feature's `requirements.md` groups its requirements under these headings, wher
37
37
  - `## MODIFIED Requirements: <area>`: behavior that changes. Copy the current requirement, keep its name, and edit it. Merging replaces the old one.
38
38
  - `## REMOVED Requirements: <area>`: behavior that goes away, with a line on why. Merging deletes it, and deletes the file when its last requirement goes.
39
39
 
40
- `node scripts/ai/specs.js check` checks the format; the git pre-commit hook runs it on staged specs once their work has started. `node scripts/ai/specs.js status` lists every feature's state and task progress.
40
+ `node scripts/amk/specs.js check` checks the format; the git pre-commit hook runs it on staged specs once their work has started. `node scripts/amk/specs.js status` lists every feature's state and task progress.