@alan-ai-hq/agent-manager-linux-arm64 0.1.199 → 0.1.200
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/alan-agent.cjs +8885 -5214
- package/alan-holder.cjs +5364 -3401
- package/alan-lease.cjs +808 -200
- package/builtin-skills/agent-desktop/SKILL.md +94 -0
- package/builtin-skills/alan-artifact/SKILL.md +128 -0
- package/builtin-skills/alan-artifact/examples/interactive-diagram.md +50 -0
- package/builtin-skills/alan-artifact/examples/prototype.md +53 -0
- package/builtin-skills/alan-artifact/examples/test-report.md +55 -0
- package/builtin-skills/alan-artifact/references/design.md +39 -0
- package/builtin-skills/alan-artifact/references/diagrams.md +20 -0
- package/builtin-skills/alan-deck/SKILL.md +189 -0
- package/builtin-skills/alan-diagrams/SKILL.md +105 -0
- package/builtin-skills/alan-diagrams/references/diagram-catalogue.md +847 -0
- package/builtin-skills/alan-docs/SKILL.md +143 -0
- package/builtin-skills/alan-docs/references/administration/members-and-teams.md +48 -0
- package/builtin-skills/alan-docs/references/administration/org-dashboard.md +19 -0
- package/builtin-skills/alan-docs/references/administration/organisation-settings.md +41 -0
- package/builtin-skills/alan-docs/references/agents-and-sessions/code-context.md +60 -0
- package/builtin-skills/alan-docs/references/agents-and-sessions/coding-agents-and-models.md +78 -0
- package/builtin-skills/alan-docs/references/agents-and-sessions/session-lifecycle.md +62 -0
- package/builtin-skills/alan-docs/references/agents-and-sessions/start-a-session.md +110 -0
- package/builtin-skills/alan-docs/references/automations/automation-runs.md +69 -0
- package/builtin-skills/alan-docs/references/automations/create-an-automation.md +143 -0
- package/builtin-skills/alan-docs/references/automations/overview.md +77 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/cloud-images.md +64 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/cloud-sessions-and-execution.md +89 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/cloud-setup.md +128 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/codex-cli-connector.md +92 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/local-execution.md +213 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/runtime-recovery.md +60 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/sandboxes.md +74 -0
- package/builtin-skills/alan-docs/references/cloud-and-local/troubleshooting-and-faq.md +102 -0
- package/builtin-skills/alan-docs/references/get-started/connect-azure-devops.md +89 -0
- package/builtin-skills/alan-docs/references/get-started/connect-bitbucket.md +86 -0
- package/builtin-skills/alan-docs/references/get-started/connect-github.md +114 -0
- package/builtin-skills/alan-docs/references/get-started/join-a-team.md +114 -0
- package/builtin-skills/alan-docs/references/get-started/product-map.md +96 -0
- package/builtin-skills/alan-docs/references/get-started/quickstart.md +158 -0
- package/builtin-skills/alan-docs/references/get-started/set-up-your-team.md +200 -0
- package/builtin-skills/alan-docs/references/get-started/sign-in.md +104 -0
- package/builtin-skills/alan-docs/references/get-started/welcome.md +39 -0
- package/builtin-skills/alan-docs/references/integrations/connect-microsoft-teams.md +116 -0
- package/builtin-skills/alan-docs/references/integrations/connect-slack.md +164 -0
- package/builtin-skills/alan-docs/references/integrations/import-from-linear.md +172 -0
- package/builtin-skills/alan-docs/references/plans-and-billing/plans-and-limits.md +115 -0
- package/builtin-skills/alan-docs/references/plans-and-billing/usage-and-credits.md +47 -0
- package/builtin-skills/alan-docs/references/reference/documents-and-artifacts.md +52 -0
- package/builtin-skills/alan-docs/references/reference/faq.md +89 -0
- package/builtin-skills/alan-docs/references/reference/feature-catalog.md +89 -0
- package/builtin-skills/alan-docs/references/reference/glossary.md +96 -0
- package/builtin-skills/alan-docs/references/reference/links-and-ids.md +80 -0
- package/builtin-skills/alan-docs/references/reference/roles-and-permissions.md +64 -0
- package/builtin-skills/alan-docs/references/reference/statuses.md +86 -0
- package/builtin-skills/alan-docs/references/reviews-testing-deploys/deployments.md +28 -0
- package/builtin-skills/alan-docs/references/reviews-testing-deploys/pull-requests.md +85 -0
- package/builtin-skills/alan-docs/references/reviews-testing-deploys/review-work.md +55 -0
- package/builtin-skills/alan-docs/references/reviews-testing-deploys/testing-evidence.md +52 -0
- package/builtin-skills/alan-docs/references/skills/plugins-and-mcp.md +24 -0
- package/builtin-skills/alan-docs/references/skills/skills.md +103 -0
- package/builtin-skills/alan-docs/references/tasks/complete-a-task.md +79 -0
- package/builtin-skills/alan-docs/references/tasks/create-a-task.md +67 -0
- package/builtin-skills/alan-docs/references/tasks/subtasks-and-status.md +55 -0
- package/builtin-skills/alan-docs/references/tasks/task-artifacts.md +56 -0
- package/builtin-skills/alan-docs/references/tasks/task-detail.md +65 -0
- package/builtin-skills/alan-docs/references/teams-and-planning/cycles.md +93 -0
- package/builtin-skills/alan-docs/references/teams-and-planning/documents.md +66 -0
- package/builtin-skills/alan-docs/references/teams-and-planning/epics.md +95 -0
- package/builtin-skills/alan-docs/references/teams-and-planning/whiteboard.md +52 -0
- package/builtin-skills/alan-docs/references/troubleshooting/agent-blocked.md +38 -0
- package/builtin-skills/alan-docs/references/troubleshooting/common-problems.md +118 -0
- package/builtin-skills/alan-docs/references/troubleshooting/github-access.md +41 -0
- package/builtin-skills/alan-docs/references/troubleshooting/missing-artifact.md +47 -0
- package/builtin-skills/alan-docs/references/troubleshooting/report-an-issue.md +74 -0
- package/builtin-skills/alan-docs/references/troubleshooting/runtime-unavailable.md +49 -0
- package/builtin-skills/alan-docs/scripts/generate-references.mjs +363 -0
- package/builtin-skills/alan-environment-setup/SKILL.md +320 -0
- package/builtin-skills/alan-environment-setup/references/android.md +118 -0
- package/builtin-skills/alan-environment-setup/references/troubleshooting.md +33 -0
- package/builtin-skills/alan-skill-authoring/SKILL.md +83 -0
- package/builtin-skills/alan-tasks/SKILL.md +195 -0
- package/builtin-skills/alan-test-android/SKILL.md +224 -0
- package/builtin-skills/alan-test-android/scripts/android-up.sh +227 -0
- package/builtin-skills/alan-test-android/scripts/install-launch.sh +38 -0
- package/builtin-skills/alan-test-android/scripts/record.sh +64 -0
- package/builtin-skills/alan-test-android/scripts/ui.py +367 -0
- package/builtin-skills/alan-test-desktop/SKILL.md +107 -0
- package/builtin-skills/alan-test-desktop/references/linux-recording.md +31 -0
- package/builtin-skills/alan-test-feature/SKILL.md +243 -0
- package/builtin-skills/alan-test-mobile/SKILL.md +65 -0
- package/builtin-skills/alan-test-web/SKILL.md +113 -0
- package/builtin-skills/alan-walkthrough/SKILL.md +152 -0
- package/builtin-skills/alan-walkthrough/scripts/mark-changes.js +419 -0
- package/builtin-skills/alan-walkthrough/scripts/publish-capture.mjs +288 -0
- package/builtin-skills/alan-workflows/SKILL.md +235 -0
- package/builtin-skills/manifest.json +19 -0
- package/package.json +3 -2
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Native Android toolchain
|
|
2
|
+
|
|
3
|
+
Use this when a repository needs the Android emulator: `/alan-test-android`
|
|
4
|
+
exited 3 with missing Android prerequisites, or the user asks to test a native
|
|
5
|
+
Android app (APK, Gradle, React Native, Expo, Flutter, Kotlin Multiplatform).
|
|
6
|
+
|
|
7
|
+
## Check the machine first
|
|
8
|
+
|
|
9
|
+
Two requirements come from the environment, not the repository. Check both
|
|
10
|
+
before persisting anything:
|
|
11
|
+
|
|
12
|
+
- **`/dev/kvm` exists.** It is a provider capability. Freestyle environments
|
|
13
|
+
expose it; Daytona and E2B do not, and the emulator cannot run there. On
|
|
14
|
+
Freestyle the image grants `alan` access to the node at every boot, so there
|
|
15
|
+
is no permission step to add. If the node is missing entirely, do not add the
|
|
16
|
+
SDK to the image: report that native Android needs a Freestyle environment,
|
|
17
|
+
which an Alan admin sets for the environment or team.
|
|
18
|
+
- **At least 16 GiB of memory** (`grep MemTotal /proc/meminfo`). The emulator
|
|
19
|
+
takes about 1.7 GB and a Gradle daemon about 1.7 GB on top of the agent and
|
|
20
|
+
any started services; an 8 GiB machine dropped the agent offline. If smaller,
|
|
21
|
+
ask the user to pick **Extra large** in the environment's machine picker
|
|
22
|
+
(Freestyle's default). **2× Extra large** is available on plans with large
|
|
23
|
+
cloud machines and suits builds that run beside the emulator.
|
|
24
|
+
|
|
25
|
+
When both hold, persist the toolchain below as maintenance.
|
|
26
|
+
|
|
27
|
+
## Build setup
|
|
28
|
+
|
|
29
|
+
Add to the environment build setup's `initialize`, keeping its existing steps. Set
|
|
30
|
+
variables through `$ENVRC`, not `/etc/profile.d`: profile scripts reach login
|
|
31
|
+
shells only, so an agent's shell would see an empty `ANDROID_HOME`.
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
initialize:
|
|
35
|
+
- name: Android packages
|
|
36
|
+
run: |
|
|
37
|
+
sudo apt-get update
|
|
38
|
+
sudo apt-get install -y --no-install-recommends \
|
|
39
|
+
openjdk-17-jdk-headless unzip libpulse0 libgl1 libnss3 \
|
|
40
|
+
libxcomposite1 libxcursor1 libxi6 libxtst6 libasound2t64
|
|
41
|
+
- name: Android environment
|
|
42
|
+
run: |
|
|
43
|
+
{
|
|
44
|
+
echo "ANDROID_HOME='/opt/android-sdk'"
|
|
45
|
+
echo "ANDROID_SDK_ROOT='/opt/android-sdk'"
|
|
46
|
+
echo "JAVA_HOME='/usr/lib/jvm/java-17-openjdk-amd64'"
|
|
47
|
+
echo "FLUTTER_ROOT='/opt/flutter'"
|
|
48
|
+
} >> "$ENVRC"
|
|
49
|
+
- name: Android SDK
|
|
50
|
+
run: |
|
|
51
|
+
API=34
|
|
52
|
+
BUILD_TOOLS=34.0.0
|
|
53
|
+
ANDROID_HOME=/opt/android-sdk
|
|
54
|
+
sudo mkdir -p "$ANDROID_HOME/cmdline-tools"
|
|
55
|
+
sudo chown -R "$(id -u):$(id -g)" "$ANDROID_HOME"
|
|
56
|
+
curl -fsSL -o /tmp/cmdline-tools.zip \
|
|
57
|
+
https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
|
|
58
|
+
unzip -qo /tmp/cmdline-tools.zip -d "$ANDROID_HOME/cmdline-tools"
|
|
59
|
+
rm -rf "$ANDROID_HOME/cmdline-tools/latest"
|
|
60
|
+
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
|
|
61
|
+
rm -f /tmp/cmdline-tools.zip
|
|
62
|
+
(yes || true) | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses >/dev/null
|
|
63
|
+
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install platform-tools emulator \
|
|
64
|
+
"platforms;android-$API" "build-tools;$BUILD_TOOLS" \
|
|
65
|
+
"system-images;android-$API;google_apis;x86_64" >/dev/null
|
|
66
|
+
curl -fsSL -o /tmp/scrcpy.tgz \
|
|
67
|
+
https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-linux-x86_64-v3.3.4.tar.gz
|
|
68
|
+
sudo mkdir -p /opt/scrcpy
|
|
69
|
+
sudo tar xzf /tmp/scrcpy.tgz -C /opt/scrcpy --strip-components=1
|
|
70
|
+
sudo rm -f /opt/scrcpy/adb /tmp/scrcpy.tgz
|
|
71
|
+
printf '#!/bin/sh\nADB="${ADB:-%s/platform-tools/adb}" exec /opt/scrcpy/scrcpy "$@"\n' "$ANDROID_HOME" \
|
|
72
|
+
| sudo tee /usr/local/bin/scrcpy >/dev/null
|
|
73
|
+
sudo chmod +x /usr/local/bin/scrcpy
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Take the API level and build-tools from the app's `targetSdk` and `compileSdk`
|
|
77
|
+
(`grep -rn -E 'targetSdk|compileSdk' --include='*.gradle*' .`) and edit `API` and
|
|
78
|
+
`BUILD_TOOLS` to match. The `(yes || true)` form avoids a SIGPIPE failure once
|
|
79
|
+
`sdkmanager` stops reading.
|
|
80
|
+
|
|
81
|
+
Add this step for a Flutter app; leave it out for a plain Android, React Native
|
|
82
|
+
or Kotlin Multiplatform app:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
- name: Flutter SDK
|
|
86
|
+
run: |
|
|
87
|
+
FLUTTER_ROOT=/opt/flutter
|
|
88
|
+
releases="$(curl -fsSL https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json)"
|
|
89
|
+
hash="$(jq -r '.current_release.stable' <<<"${releases}")"
|
|
90
|
+
archive="$(jq -r --arg h "${hash}" '.releases[] | select(.hash == $h) | .archive' <<<"${releases}")"
|
|
91
|
+
sudo mkdir -p "$FLUTTER_ROOT"
|
|
92
|
+
sudo chown -R "$(id -u):$(id -g)" "$FLUTTER_ROOT"
|
|
93
|
+
curl -fsSL -o /tmp/flutter.tar.xz \
|
|
94
|
+
"https://storage.googleapis.com/flutter_infra_release/releases/${archive}"
|
|
95
|
+
tar xJf /tmp/flutter.tar.xz -C "$FLUTTER_ROOT" --strip-components=1
|
|
96
|
+
rm -f /tmp/flutter.tar.xz
|
|
97
|
+
sudo ln -sf "$FLUTTER_ROOT/bin/flutter" /usr/local/bin/flutter
|
|
98
|
+
sudo ln -sf "$FLUTTER_ROOT/bin/dart" /usr/local/bin/dart
|
|
99
|
+
flutter --version >/dev/null
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The image carries no Flutter, so this resolves the current stable SDK from
|
|
103
|
+
Google's release metadata. `/usr/local/bin` is on `PATH` for non-login shells.
|
|
104
|
+
|
|
105
|
+
The SDK, system image and JDK add about 5.8 GB to the image, Flutter about 1 GB.
|
|
106
|
+
KVM needs no step of your own: the image grants `alan` access to `/dev/kvm` at
|
|
107
|
+
boot, and the node lives in the container's own `/dev`, so it survives a memory
|
|
108
|
+
pause.
|
|
109
|
+
|
|
110
|
+
Test the draft with `test_environment_build`, then save it with
|
|
111
|
+
`update_build_setup` on the current `expectedRevision`.
|
|
112
|
+
|
|
113
|
+
## Validation
|
|
114
|
+
|
|
115
|
+
After the draft test passes and the image is built, run `/alan-test-android`'s device readiness
|
|
116
|
+
step (`scripts/android-up.sh --api <level>` from that skill's package) in a
|
|
117
|
+
session on the new image. Exit 0 with `SERIAL=` and `SCREENSHOT=` lines is a
|
|
118
|
+
pass; exit 3 lists what is still missing. A cold boot takes 30 to 110 seconds.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Environment build troubleshooting
|
|
2
|
+
|
|
3
|
+
Read the failing step and its first concrete error before a package-manager epilogue.
|
|
4
|
+
Use the live tool schema; do not pass unsupported arguments. Fix the draft, rerun
|
|
5
|
+
`test_environment_build` (its result arrives as a message), then save with `update_build_setup`.
|
|
6
|
+
|
|
7
|
+
| Error in the build failure | Usual cause |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `Unable to locate package …` | no `apt-get update` before that install |
|
|
10
|
+
| `command not found` / exit 127 | installed by hand in this sandbox but not by a step, or not on `PATH`; append the path to `$ENVRC` |
|
|
11
|
+
| a variable set in an earlier step is empty | each step is a fresh shell; append `KEY='value'` to `"$ENVRC"` |
|
|
12
|
+
| `error while loading shared libraries` | hand-installed binary missing a library apt would have pulled in |
|
|
13
|
+
| `NAME: … required` / empty variable | the variable is not saved on the environment; add it in Cloud settings (every variable reaches every step) |
|
|
14
|
+
| literal credential refused | a token or password is written in the build setup; read it from an environment variable instead |
|
|
15
|
+
| `Cannot connect to the Docker daemon` | Docker in a build step; move it to a startup task or service |
|
|
16
|
+
| `Depends: … but it is not installable` / `unmet dependencies` | a third-party apt repository for another Ubuntu release; use `$VERSION_CODENAME`, or the distribution's package |
|
|
17
|
+
| `pkgProblemResolver … held packages` / `Conflicts:` | reinstalling something the image ships (`docker.io` against Docker Engine); drop that package |
|
|
18
|
+
| `No such file or directory` for a repository file | a step ran before the repository was copied in; move it into that repository's build setup |
|
|
19
|
+
| `No such file or directory` for another repository | that repository is copied in later; move the step to its build setup, or reach only repositories listed before it |
|
|
20
|
+
| `git checkout` / `git fetch` / `pathspec … did not match` | the builder has one shallow, detached commit per repository and no credentials; never switch branches in a step, set `clone.ref` in the repository build setup |
|
|
21
|
+
| `unknown key; allowed keys are …` / `unknown step field` | a typo or an unsupported key; the message names the path |
|
|
22
|
+
| `'uses' … not supported` / `includes` / `clone.path` | not supported yet; write the command with `run`, or drop the key |
|
|
23
|
+
| `only an environment build setup can define post-build` / `only a repository build setup can set clone` | the key is in the wrong scope |
|
|
24
|
+
| `YAML anchors and aliases are not supported` | write the value out in full |
|
|
25
|
+
| stale `expectedRevision` (`build_setup_revision_conflict`) | someone saved first; read again, reapply, retest |
|
|
26
|
+
| a `post-build` check fails | a tool is missing or not on `PATH` after every repository ran; fix the step that installs it |
|
|
27
|
+
| `… is not on a supported git host` / `must be a credential-free https URL` | a repository on a self-hosted or unknown host is attached; report it as a blocker |
|
|
28
|
+
| `repository_credential_missing` / `access_denied` | neither the organization nor the member building can read the repository; follow `nextStep` (`request` op `github_connection` or `integration_connection`) |
|
|
29
|
+
| `branch_not_found` / `repository_empty` | the branch is not pushed, is misspelled, or the repository has no commits; push it or fix it with `update_environment_repository`; a GitHub 404 may also mean an empty or invisible repository |
|
|
30
|
+
| `provider_error` | the git host failed (the message carries its text); retry once, then report |
|
|
31
|
+
| `Set NAME on the environment before building` / `build_secret_missing` | a build secret is not saved; `request` op `environment_setup_actions` with the names, end the turn, then build again |
|
|
32
|
+
| a hosted build lacks a change that works in `test_environment_build` | the test uses this sandbox's working tree and the hosted build uses the pushed branch head; push first |
|
|
33
|
+
| `Setup left credentials in the image` | a step logged in or wrote a token; remove the persistent credential output and delete temporary auth files |
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: alan-skill-authoring
|
|
3
|
+
version: 1.0.3
|
|
4
|
+
description: Use in a local or cloud Alan session when the user asks to create a Skill without specifying its location, create or edit a team-owned Alan Skill, or turn a repeated procedure into a Skill. Alan platform Skills are the default. Do not use when the user explicitly requests a repository or filesystem Skill, imports a Skill, or only asks how Skills work.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill authoring
|
|
8
|
+
|
|
9
|
+
Run this workflow in an Alan session on a local computer or in a cloud sandbox.
|
|
10
|
+
Both use Alan's Skill MCP tools for platform authoring. If a required tool is
|
|
11
|
+
unavailable, keep the draft in the conversation and report the missing capability;
|
|
12
|
+
do not write a repository or filesystem Skill as a substitute.
|
|
13
|
+
|
|
14
|
+
Create and update team-owned cloud Skills through Alan's Skill MCP tools. Keep the draft in the conversation. The write tools publish immutable versions immediately, so never call them before the user approves the complete package or update diff.
|
|
15
|
+
|
|
16
|
+
## Choose the owner
|
|
17
|
+
|
|
18
|
+
- An unqualified request to create a Skill means a team-owned Alan platform Skill, even when the procedure uses repository code or the agent is working in a checkout or local session.
|
|
19
|
+
- If repeated user work suggests a Skill, explain the observed pattern and offer a team-owned platform Skill. Do not start an authoring interview or publish one until the user accepts the suggestion.
|
|
20
|
+
- Use a repository or personal filesystem Skill only when the user explicitly asks for that location. Follow that scope's authoring workflow instead of this one.
|
|
21
|
+
- If the user refers to an existing Skill, inspect its actual owner before updating it. Never move an existing Skill between owners as an incidental update.
|
|
22
|
+
|
|
23
|
+
## When not to use
|
|
24
|
+
|
|
25
|
+
- For GitHub or local runtime imports, use the Skills import flow.
|
|
26
|
+
- For explicitly requested repository or personal filesystem Skills, use the matching filesystem authoring workflow.
|
|
27
|
+
- For general questions about Skills, answer without starting an authoring interview.
|
|
28
|
+
- For Alan's repository-owned built-in Skills, change and review their source in the Alan repository instead of calling the team Skill tools.
|
|
29
|
+
- For personal filesystem Skills, use the runtime's filesystem skill workflow.
|
|
30
|
+
|
|
31
|
+
## Confirm the target
|
|
32
|
+
|
|
33
|
+
1. Use the active Alan team context. Do not ask the user for a team ID when the session already supplies one.
|
|
34
|
+
2. For an update, require the exact Skill ID supplied by the product context or returned by `skill` op `list`. Never guess an ID from a name.
|
|
35
|
+
3. Confirm that `skill` op `list`, `skill` op `get`, `skill` op `create`, and `skill` op `update` are available before promising publication. If a required tool is absent, keep the draft in chat and report the missing tool.
|
|
36
|
+
|
|
37
|
+
## Create a Skill
|
|
38
|
+
|
|
39
|
+
1. Understand the real procedure before drafting. Ask one question at a time and only for facts the user has not already supplied:
|
|
40
|
+
- what outcome the Skill should produce;
|
|
41
|
+
- three to five phrases that should trigger it;
|
|
42
|
+
- similar requests that should not trigger it;
|
|
43
|
+
- the actual ordered procedure and decision points;
|
|
44
|
+
- common failures and the concrete response to each;
|
|
45
|
+
- files, records, messages, or other artifacts that prove success.
|
|
46
|
+
2. Derive a lowercase hyphenated name and search `skill` op `list` using that name and the core purpose. If an existing Skill overlaps, show the match and ask whether to update it or create a distinct Skill. Do not silently create a duplicate.
|
|
47
|
+
3. Draft a complete `SKILL.md`. Use third-person trigger language in `description`, imperative steps, explicit branches, concrete failure handling, and a validation section. Do not leave `TODO`, `TBD`, placeholder instructions, or generic phrases such as "handle errors gracefully."
|
|
48
|
+
4. Add supporting files only when the procedure needs reusable scripts, long reference material, templates, or examples. Keep simple Skills to one `SKILL.md`.
|
|
49
|
+
5. Show the proposed name, description, and complete package contents. State that approval will publish immutable Version 1 and enable it for the team.
|
|
50
|
+
6. Ask one explicit question: "Publish this Skill?" Do not call a write tool until the user clearly approves this exact draft.
|
|
51
|
+
7. Call `skill` op `create` once with the complete package and `enabled: true`.
|
|
52
|
+
8. Call `skill` op `get` with the returned Skill ID and Version ID. Report the read-back name, version, enabled state, validation diagnostics, and any invalidation dispatch failure. Desired-state invalidation is not proof that every runtime installed the Skill.
|
|
53
|
+
|
|
54
|
+
## Update a Skill
|
|
55
|
+
|
|
56
|
+
1. Call `skill` op `get` for the exact Skill ID before proposing a change. Use its latest Version ID as the update base.
|
|
57
|
+
2. Read every package file needed to understand the requested change. Preserve untouched files and executable flags.
|
|
58
|
+
3. Ask only for missing intent, then show the exact upserted files and deleted paths. Explain the behavioral change in plain language.
|
|
59
|
+
4. Ask one explicit question: "Publish this new Skill version?" Do not call `skill` op `update` before approval.
|
|
60
|
+
5. Call `skill` op `update` once with the latest base Version ID and only the required upserts and deletions.
|
|
61
|
+
6. Read the returned version with `skill` op `get` and report the same read-back evidence as creation.
|
|
62
|
+
|
|
63
|
+
## Failure handling
|
|
64
|
+
|
|
65
|
+
- `SKILL_VERSION_CONFLICT`: call `skill` op `get` again, rebuild the proposed diff on the new latest version, show the revised diff, and request approval again. Never auto-merge or retry the stale write.
|
|
66
|
+
- Duplicate or reserved name: return to the naming step and show the conflicting Skill before proposing a new name.
|
|
67
|
+
- Validation failure: correct the draft in chat and show the corrected package. Do not describe the Skill as published.
|
|
68
|
+
- Permission failure: preserve the draft in the conversation and state which team action was refused. Do not substitute another team.
|
|
69
|
+
- Runtime invalidation failure: report the Skill version as published but rollout as unconfirmed. Do not retry publication to repair delivery.
|
|
70
|
+
|
|
71
|
+
## Validation
|
|
72
|
+
|
|
73
|
+
Success requires all of the following:
|
|
74
|
+
|
|
75
|
+
- no placeholder content remains;
|
|
76
|
+
- the description contains specific triggers and anti-triggers;
|
|
77
|
+
- procedure branches and failure actions are explicit;
|
|
78
|
+
- the user approved the exact package or diff that was written;
|
|
79
|
+
- `skill` op `get` confirms the expected immutable version after the write.
|
|
80
|
+
|
|
81
|
+
## Artifacts
|
|
82
|
+
|
|
83
|
+
The durable output is a team-owned cloud Skill and immutable Skill Version. The conversation retains the approved preview and read-back evidence.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: alan-tasks
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Use when filing, wording, moving, assigning, linking, or closing an Alan task, deciding whether a piece of work deserves a task, or coordinating that work across sessions and pilots. Covers find_records, list_tasks, create_task, update_task, create_subtask, add_task_relation, add_task_comment, add_task_decision, and list_task_suggestions. Do not use for documents or artifacts on their own, for git delivery mechanics such as branching and pull requests, or for non-Alan issue trackers.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tasks in Alan
|
|
8
|
+
|
|
9
|
+
A task is the shared record of work in a team. People read it on the board and
|
|
10
|
+
in their Assigned to me view, and sessions work from it, so leave every task you
|
|
11
|
+
touch true before your turn ends.
|
|
12
|
+
|
|
13
|
+
This is a default way of working with tasks, not a set of hard rules. The person
|
|
14
|
+
can change any part of it by asking, and an in-scope AGENTS.md or another
|
|
15
|
+
instruction wins. Team statuses and labels are shared configuration: read them,
|
|
16
|
+
and change them only when a person asks.
|
|
17
|
+
|
|
18
|
+
## When to file
|
|
19
|
+
|
|
20
|
+
- A task is a unit of work, not a session. A task can be worked by more than one
|
|
21
|
+
session, and a session belongs to one task at a time.
|
|
22
|
+
- File a task when the work outlives this turn or someone other than you must
|
|
23
|
+
act: a person's decision, approval, access, or merge, or another session's
|
|
24
|
+
work. Work that finishes in this turn needs no task.
|
|
25
|
+
- A finding or follow-up the current owner will handle is a comment on that
|
|
26
|
+
work's task. Only separate work gets a new task, with the fix and its source in
|
|
27
|
+
the description.
|
|
28
|
+
- To propose work without creating anything, use `suggest_task`: it puts the
|
|
29
|
+
idea in the session's side panel for the person to accept. Check
|
|
30
|
+
`list_task_suggestions` first so you do not repeat an open suggestion, and
|
|
31
|
+
withdraw one that no longer applies.
|
|
32
|
+
|
|
33
|
+
## Find the task before you file
|
|
34
|
+
|
|
35
|
+
- Resolve a named or referenced task with `find_records` (`kinds: ["task"]`,
|
|
36
|
+
plus `teamId` and a `limit`). It takes a readable id (`AL-5068`), a number
|
|
37
|
+
(`2980` or `#45`), a title, or a keyword, and returns ranked matches — confirm
|
|
38
|
+
the number or title before acting. `get_task` takes the readable id directly.
|
|
39
|
+
- Browse a board with `list_tasks` (`status`, `assigneeId` or `mine`, `cycleId`,
|
|
40
|
+
`epicId`, `limit`/`offset`). Never use it to locate a task you were already
|
|
41
|
+
given an identifier or title for.
|
|
42
|
+
- Read one in full with `get_task` when you need its description, comments, or
|
|
43
|
+
subtasks before acting.
|
|
44
|
+
- A task named in your first message, or already assigned to the person you work
|
|
45
|
+
for, is your record — do not file a second one.
|
|
46
|
+
- Give each write that creates or changes a record an `idempotencyKey` naming the
|
|
47
|
+
change, reusing it only for the same input, so a retry cannot duplicate it.
|
|
48
|
+
|
|
49
|
+
## Title and description
|
|
50
|
+
|
|
51
|
+
- Title by topic, a few words: "Retry backoff on webhook delivery". Keep status,
|
|
52
|
+
dates, questions, ticket codes, and PR numbers out of the title — the status
|
|
53
|
+
holds status, and the comments hold links.
|
|
54
|
+
- Write the description as the final state: the problem, what done looks like,
|
|
55
|
+
and the evidence. Rewrite it when scope changes instead of appending a status
|
|
56
|
+
log. It is Markdown shown to people, so lead with the outcome in one sentence
|
|
57
|
+
and keep commit hashes, ids, and migration numbers in a trailing References
|
|
58
|
+
list.
|
|
59
|
+
- Attach screenshots and files, and place each inline with a caption.
|
|
60
|
+
|
|
61
|
+
## Subtasks
|
|
62
|
+
|
|
63
|
+
- Subtasks are one level deep. The parent task is the outcome; each subtask is
|
|
64
|
+
one unit of work with one owner. Check `list_subtasks` before adding so you do
|
|
65
|
+
not duplicate one. Add one with `create_subtask` (parent `taskId` and a
|
|
66
|
+
`title` — a subtask carries a title only, so keep the detail in the parent
|
|
67
|
+
description); give it an owner and move it with `update_subtask`
|
|
68
|
+
(`addAssigneeIds`, `status: "todo" | "done"`).
|
|
69
|
+
- New work discovered under a subtask goes under the same parent task, as a
|
|
70
|
+
sibling subtask or a related task.
|
|
71
|
+
- When a task holds about twenty open subtasks, or the work enters a new phase,
|
|
72
|
+
file a new task and relate it to the old one.
|
|
73
|
+
- Close the parent when its last subtask closes, unless work remains on the
|
|
74
|
+
parent itself.
|
|
75
|
+
|
|
76
|
+
## Status
|
|
77
|
+
|
|
78
|
+
- Read the team's statuses with `list_teams` before you set one. Every team
|
|
79
|
+
configures its own; the built-in ids are `backlog`, `todo`, `in_progress`,
|
|
80
|
+
`running`, `waiting`, `in_review`, `done`, and `cancelled`, but a team may add,
|
|
81
|
+
rename, or repurpose them. An id is not its label: choose the status whose
|
|
82
|
+
`label` and `group` fit the change, not the id you expected — a team can label
|
|
83
|
+
its paused status `in_progress`, for example.
|
|
84
|
+
- Move the status in the same call as the change it records: you start work →
|
|
85
|
+
the team's status for started work; you open a pull request → its review
|
|
86
|
+
status, with the link in a comment; only a person can unblock → its waiting or
|
|
87
|
+
paused status (`paused: true`) with the ask below; work lands → `done`; work is
|
|
88
|
+
dropped → `cancelled` with a comment saying why. Only `done` and `cancelled`
|
|
89
|
+
are terminal by default; a team can add terminal statuses, and a `done`-group
|
|
90
|
+
status is not necessarily one, so judge by what the status means.
|
|
91
|
+
- Set it with `update_task`'s `status` (or `create_task`'s `status`); omit it on
|
|
92
|
+
`create_task` to use its default (`todo`). Never invent a status id; use one
|
|
93
|
+
`list_teams` returns.
|
|
94
|
+
- A request to close a task means a terminal status: `done` when the work
|
|
95
|
+
shipped, `cancelled` when it will not be, with a comment saying which and why.
|
|
96
|
+
|
|
97
|
+
## Priority
|
|
98
|
+
|
|
99
|
+
- `create_task` and `update_task` accept `urgent`, `high`, `medium`, `low`, or
|
|
100
|
+
`none` and normalize them to the team's codes.
|
|
101
|
+
- `urgent` blocks people now, `high` is next up, `medium` is the default, `low`
|
|
102
|
+
can wait, and `none` is unset.
|
|
103
|
+
|
|
104
|
+
## Labels
|
|
105
|
+
|
|
106
|
+
- Labels group tasks across statuses — a customer, an area, a kind of work. Pass
|
|
107
|
+
them by name; `update_task` replaces the whole set, so include the labels you
|
|
108
|
+
want to keep.
|
|
109
|
+
- Labels are shared across the team. Call `list_teams` and match its existing
|
|
110
|
+
labels, case-insensitively, before adding; add, rename, or delete a label only
|
|
111
|
+
when a person asks or no existing label fits.
|
|
112
|
+
|
|
113
|
+
## Epics and cycles
|
|
114
|
+
|
|
115
|
+
- An epic groups tasks toward one outcome. Set it with `create_task` or
|
|
116
|
+
`update_task`'s `epicId`, resolved from `list_epics`; pass `null` to detach.
|
|
117
|
+
- A cycle is the team's time bucket. Omit `cycleId` to use the current active
|
|
118
|
+
cycle, pass `null` for Backlog, or pass an id from `list_cycles`.
|
|
119
|
+
|
|
120
|
+
## Who acts next
|
|
121
|
+
|
|
122
|
+
- The assignee is whoever acts next. Set it with `create_task`'s `assigneeIds`,
|
|
123
|
+
one user resolved with `list_team_members`, or with `update_task`'s
|
|
124
|
+
`addAssigneeIds` / `removeAssigneeIds`. A new task is assigned to you unless
|
|
125
|
+
you pass `assigneeIds` explicitly (pass `[]` to leave it unassigned). Clear the
|
|
126
|
+
assignee when nobody should act.
|
|
127
|
+
- Assignees organise work; they do not decide who wakes. In Alan a session is
|
|
128
|
+
what wakes — a message, a subscription, or a returned notice — and the task is
|
|
129
|
+
the record it works from. Reassign when the next actor changes.
|
|
130
|
+
|
|
131
|
+
## Comments, events, and decisions
|
|
132
|
+
|
|
133
|
+
- `add_task_comment` carries progress and discussion for people: what changed,
|
|
134
|
+
what comes next, what blocks it, with the number or file behind each claim.
|
|
135
|
+
One comment per real change beats one per step. It is not for Agent Log events,
|
|
136
|
+
decisions, or agent memory.
|
|
137
|
+
- Record structured decisions with `add_task_decision` (`decision` plus
|
|
138
|
+
`reasoning`, including the tradeoff or the option you rejected), and general
|
|
139
|
+
checkpoints and outcomes with `add_task_event`. Supersede a decision you have
|
|
140
|
+
replaced with `supersede_task_decision` rather than appending a contradiction.
|
|
141
|
+
- When a decision needs a person, assign them, set the waiting status if the team
|
|
142
|
+
has one, and open the comment with what you need: the options, your
|
|
143
|
+
recommendation, and what happens after they answer.
|
|
144
|
+
|
|
145
|
+
## Links
|
|
146
|
+
|
|
147
|
+
- Link two tasks with `add_task_relation` (`taskId`, `relatedTaskId`); both must
|
|
148
|
+
be in the same team. On create, `relatedTaskIds` links up to five tasks as
|
|
149
|
+
`relates_to`.
|
|
150
|
+
- Cite the readable id (`AL-5068`) instead of restating the work, and record a
|
|
151
|
+
pull request's link in a comment, not in the title.
|
|
152
|
+
|
|
153
|
+
## Sessions, pilots, and orchestration
|
|
154
|
+
|
|
155
|
+
- Start the work's session only after the task exists. `start_task_session`
|
|
156
|
+
creates a session linked to the task and dispatches an agent on it with a
|
|
157
|
+
kickoff `message`.
|
|
158
|
+
`spawn_session` starts a child session below you for one unit of work, without
|
|
159
|
+
its own task, and returns immediately — the child's result arrives later as a
|
|
160
|
+
notice, so end your turn instead of polling.
|
|
161
|
+
- A batch of independent units is one task each, each with its own session; use a
|
|
162
|
+
parent task with `spawn_session` children only when the units share one outcome.
|
|
163
|
+
- Record that unit as a subtask on the parent task, and fold the child's result
|
|
164
|
+
back as one comment or event plus the status change. `list_my_sessions` shows
|
|
165
|
+
the tree and each child's activity; `message_session` nudges an idle child or
|
|
166
|
+
asks its owner a question; `stop_session_tree` stops work that is wrong or no
|
|
167
|
+
longer needed.
|
|
168
|
+
- When a child is archived or cannot finish, move the task back to the team's
|
|
169
|
+
open status, or close it with a comment saying why.
|
|
170
|
+
- A pilot is a separate agent identity with its own session tree; find who you
|
|
171
|
+
can reach with `list_pilots` and message one with `message_session`. The
|
|
172
|
+
task, not the session, is the shared record.
|
|
173
|
+
|
|
174
|
+
## Failure handling
|
|
175
|
+
|
|
176
|
+
- A status the team does not have: re-read `list_teams` and use a returned id, or
|
|
177
|
+
omit the change and ask.
|
|
178
|
+
- A task you cannot resolve: retry `find_records` with fewer kinds or a shorter
|
|
179
|
+
query, then try `list_tasks`. Never guess an id.
|
|
180
|
+
- A record that does not match the request — an id that resolves to different
|
|
181
|
+
work, or a claim the record contradicts: stop and ask which is meant. Never act
|
|
182
|
+
on the wrong record.
|
|
183
|
+
- An underspecified request: describe only what the person said and ask one
|
|
184
|
+
targeted question for the missing scope or owner. Never invent repro steps,
|
|
185
|
+
causes, or acceptance criteria to fill the gap.
|
|
186
|
+
- An ask that blocks on a person: assign them, set the waiting status if there is
|
|
187
|
+
one, comment the ask, and re-ask or close after a few days of silence.
|
|
188
|
+
- A missing Alan task tool: keep the work in the conversation and say which
|
|
189
|
+
action is unavailable. Do not invent a record or mirror the board elsewhere.
|
|
190
|
+
|
|
191
|
+
For adjacent work, follow your session's installed skills — for example
|
|
192
|
+
`alan-plan` for a plan, `alan-testing` or `alan-test-feature` for verification,
|
|
193
|
+
`alan-orchestrator` for a batch of tasks, `alan-workflow-creator` for automation.
|
|
194
|
+
If one is not installed, continue with the task tools above and say what you
|
|
195
|
+
could not do.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: alan-test-android
|
|
3
|
+
version: 0.9.0
|
|
4
|
+
description: "This skill should be used when a test charter targets a native Android app (APK, Gradle, React Native, Expo, Flutter, or Kotlin Multiplatform build) in an Alan cloud sandbox. It brings up or attaches to an Android device, builds and installs the app, drives it through ADB and the accessibility tree, records the flow, and returns observations, findings, gaps, and sandbox capture paths. Do not use it for mobile web or PWAs, iOS, publishing evidence, or writing the test report."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Run a charter on a native Android app
|
|
8
|
+
|
|
9
|
+
Run this workflow only in an Alan cloud sandbox. If the cloud session or a
|
|
10
|
+
required capability is unavailable, report the blocker; do not switch to a
|
|
11
|
+
developer machine, local container, or CI runner.
|
|
12
|
+
|
|
13
|
+
This is a surface driver. It receives one charter, runs it on a real Android
|
|
14
|
+
runtime, and returns a short result. It never calls `create_test_report`,
|
|
15
|
+
never publishes captures, and never decides the overall run status.
|
|
16
|
+
|
|
17
|
+
Scripts live next to this file in `scripts/`. Run them with `bash` or
|
|
18
|
+
`python3 -I`; each prints what it did and exits non-zero on failure.
|
|
19
|
+
|
|
20
|
+
## Input
|
|
21
|
+
|
|
22
|
+
The caller hands over a charter:
|
|
23
|
+
|
|
24
|
+
- **mission** and **app**: the repository path or a prebuilt APK, plus the
|
|
25
|
+
application id if known;
|
|
26
|
+
- **risks**, each with a one-line oracle;
|
|
27
|
+
- **backend**: the local port(s) the app calls, if any, and how to start them;
|
|
28
|
+
- **authentication**: test account or seeded state;
|
|
29
|
+
- **evidence directory**, such as `/tmp/alan-captures/<charter-slug>/`.
|
|
30
|
+
|
|
31
|
+
## Step 1 · Device readiness
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bash scripts/android-up.sh --api <level>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The script reuses an attached device first (`ANDROID_SERIAL` or the only
|
|
38
|
+
entry in `adb devices`). Otherwise it boots the Android emulator from the
|
|
39
|
+
image's SDK, using the installed system image closest to `--api`.
|
|
40
|
+
|
|
41
|
+
The environment image provides the toolchain; this skill never installs it,
|
|
42
|
+
changes device permissions, or retries variations. Exit 3 lists every missing
|
|
43
|
+
prerequisite in two groups. Return `blocked` for this charter with both lists
|
|
44
|
+
verbatim, then:
|
|
45
|
+
|
|
46
|
+
- **toolchain** items are a discovered system requirement. Persist them through
|
|
47
|
+
`/alan-environment-setup` maintenance; its android reference holds the
|
|
48
|
+
recipe. The charter can run in a session on the rebuilt image.
|
|
49
|
+
- **environment** items are not repository changes. A missing `/dev/kvm` needs
|
|
50
|
+
a Freestyle environment, set by an Alan admin. Too little memory needs stopped
|
|
51
|
+
services or Extra large in the environment's machine picker. Name the setting
|
|
52
|
+
in the result so the user can change it.
|
|
53
|
+
|
|
54
|
+
A cold-booted emulator plus a Gradle build uses about 5.5 GB of memory. An
|
|
55
|
+
emulator that exits during boot fails at once with its last log lines; quote
|
|
56
|
+
them in the result.
|
|
57
|
+
|
|
58
|
+
Pass `--api` from the app's `targetSdk` (`grep -rn targetSdk --include='*.gradle*' .`).
|
|
59
|
+
Without a Gradle project, omit it.
|
|
60
|
+
|
|
61
|
+
Exit 0 means the script verified boot, a stable `device` state, a resumed
|
|
62
|
+
launcher (not `FallbackHome`), and a non-blank screenshot. Open the
|
|
63
|
+
`SCREENSHOT=` file once yourself: it must show rendered UI at readable
|
|
64
|
+
density. The script prints `SERIAL=<serial>`. Pin it on every command:
|
|
65
|
+
`adb -s <serial> ...`. A second listed device makes unpinned commands fail.
|
|
66
|
+
When the sandbox has a streamed desktop, the script also opens a live mirror
|
|
67
|
+
(scrcpy >= 2) on `$DISPLAY` so the user can watch; a missing mirror is a
|
|
68
|
+
viewing gap, not a reason to stop.
|
|
69
|
+
|
|
70
|
+
## Step 2 · Backend
|
|
71
|
+
|
|
72
|
+
Start the backend the charter names in the background and wait for a real
|
|
73
|
+
health check. Then make it reachable from the device without changing the
|
|
74
|
+
app's configured host:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
adb -s $SERIAL reverse tcp:<port> tcp:<port>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This works for `localhost:<port>` in the app. If the app hardcodes `10.0.2.2`
|
|
81
|
+
(the emulator's host alias), reverse is not needed on the SDK emulator. Change
|
|
82
|
+
app configuration only when neither applies, and say what you changed.
|
|
83
|
+
|
|
84
|
+
Reversed traffic rides the adb connection, not the device network. Two
|
|
85
|
+
consequences: a stopped backend looks like an accepted-then-dropped
|
|
86
|
+
connection ("unexpected end of stream"), not "connection refused"; and
|
|
87
|
+
turning off wifi and data does not cut the app off (see offline below).
|
|
88
|
+
|
|
89
|
+
## Step 3 · Build and install
|
|
90
|
+
|
|
91
|
+
Build a debug APK with the repository's own command. Do not filter ABIs:
|
|
92
|
+
|
|
93
|
+
| Stack | Build |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| Gradle (Kotlin/Java, KMP) | `./gradlew assembleDebug` |
|
|
96
|
+
| React Native / Expo | bundle JS first (see gotchas), then `cd android && ./gradlew assembleDebug` |
|
|
97
|
+
| Flutter | `flutter build apk --debug` |
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
bash scripts/install-launch.sh $SERIAL <path-to.apk> [<applicationId>]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
It installs with `-r -t -g` (keeping data, granting runtime permissions),
|
|
104
|
+
resolves the launcher activity, starts it, and fails unless the process is
|
|
105
|
+
still alive 5 seconds later. Copy its whole output line into your
|
|
106
|
+
observations; the version, `apk_sha256`, and `apk_built` identify the build
|
|
107
|
+
under test. An up-to-date Gradle build reuses the existing APK; that is fine
|
|
108
|
+
when `apk_built` is after the change you are testing, otherwise rebuild with
|
|
109
|
+
`clean`.
|
|
110
|
+
|
|
111
|
+
## Step 4 · Drive the charter
|
|
112
|
+
|
|
113
|
+
Read the screen before every action. Never tap coordinates guessed from a
|
|
114
|
+
screenshot.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
python3 -I scripts/ui.py $SERIAL dump # interactive elements with ids
|
|
118
|
+
python3 -I scripts/ui.py $SERIAL tap --text "Sign in" # or --id, --desc, --index
|
|
119
|
+
python3 -I scripts/ui.py $SERIAL type --id email "a@b.co" # focuses, clears, types (spaces ok)
|
|
120
|
+
python3 -I scripts/ui.py $SERIAL wait --text '^\d+ items$' --regex # or --exact; default is substring
|
|
121
|
+
python3 -I scripts/ui.py $SERIAL state <pkg> # the app-health check, see below
|
|
122
|
+
python3 -I scripts/ui.py $SERIAL relaunch <pkg> # force-stop + cold start
|
|
123
|
+
python3 -I scripts/ui.py $SERIAL shot <evidence-dir>/<name>.png
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`tap` and `type` fail when the selector matches nothing or more than one
|
|
127
|
+
element; refine with `--index` from `dump`, never with raw coordinates.
|
|
128
|
+
`type` sends ASCII through `adb input text`; it cannot enter emoji or
|
|
129
|
+
non-Latin text, so list those inputs as unverified rather than skipping
|
|
130
|
+
them silently.
|
|
131
|
+
Use `adb -s $SERIAL shell input keyevent KEYCODE_BACK` for the system back
|
|
132
|
+
button, and `adb -s $SERIAL shell input swipe` for lists that need scrolling;
|
|
133
|
+
re-dump after each.
|
|
134
|
+
|
|
135
|
+
Record the flow, starting right before the first interaction:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
bash scripts/record.sh $SERIAL start <evidence-dir>/<charter-slug>.mp4
|
|
139
|
+
# ... interactions ...
|
|
140
|
+
bash scripts/record.sh $SERIAL stop
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
One recording is capped at 3 minutes by Android. Check `record.sh $SERIAL
|
|
144
|
+
status` before each new attempt and start a new file when less than 30 seconds
|
|
145
|
+
remain; crash-repro cycles use the time quickly.
|
|
146
|
+
`stop` fails if the file has no video stream and writes the last frame next
|
|
147
|
+
to it; open that frame and confirm it shows the app, not a black screen.
|
|
148
|
+
|
|
149
|
+
While driving:
|
|
150
|
+
|
|
151
|
+
- After each user-visible action, run `ui.py $SERIAL state <pkg>`. It is the
|
|
152
|
+
single source of truth for app health: `foreground: no` or `new_crashes`
|
|
153
|
+
above 0 is a finding, with the printed stack as its evidence. `dialog:` is
|
|
154
|
+
informational; Android often skips the crash dialog.
|
|
155
|
+
It clears the crash buffer, so each call reports only what happened since
|
|
156
|
+
the last one. Do not judge health from `pidof` or `mCurrentFocus`: a
|
|
157
|
+
crashed app can keep its pid behind the "keeps stopping" dialog, and the
|
|
158
|
+
focus line can keep a dismissed dialog.
|
|
159
|
+
- Reproduce from a fresh launch with `ui.py relaunch <pkg>`. Apps that keep
|
|
160
|
+
the session only in memory return to sign-in; that is a separate
|
|
161
|
+
observation, not a crash. Relaunching is also how to leave a crash dialog.
|
|
162
|
+
When every repro needs the same relaunch, sign-in, and wait, put those
|
|
163
|
+
`ui.py` calls in a small script in the evidence directory and reuse it.
|
|
164
|
+
- Reading the app's source to learn when a screen reloads or what a field
|
|
165
|
+
accepts is fine; findings still come from driving the app.
|
|
166
|
+
- Verify writes against the backend when it is cheap (an API read or DB row).
|
|
167
|
+
"The toast appeared" is not "it saved".
|
|
168
|
+
- Exercise Android-specific risks the change can reach: rotation
|
|
169
|
+
(`settings put system accelerometer_rotation 0` then `user_rotation 1`),
|
|
170
|
+
back from a nested screen, app restart (`ui.py relaunch`) to prove
|
|
171
|
+
persistence, and denied permissions (`pm revoke`). `android-up.sh` resets
|
|
172
|
+
network and rotation, so re-run it rather than restoring by hand.
|
|
173
|
+
- Offline: for a backend reached through `adb reverse`, the outage is
|
|
174
|
+
`adb -s $SERIAL reverse --remove tcp:<port>`; `svc wifi disable; svc data
|
|
175
|
+
disable` cuts only real network traffic (third-party APIs, the internet).
|
|
176
|
+
Either change affects new connections only, so relaunch or trigger one
|
|
177
|
+
throwaway request before judging the result.
|
|
178
|
+
- Reproduce a finding once from a known state before reporting it.
|
|
179
|
+
|
|
180
|
+
For a UI-change charter, capture the same screen on the base build and the
|
|
181
|
+
changed build at the same device size. The page overlay does not exist on a
|
|
182
|
+
native screen: return the pair with the numbered changed regions listed and
|
|
183
|
+
name the gap.
|
|
184
|
+
|
|
185
|
+
## Gotchas
|
|
186
|
+
|
|
187
|
+
- **React Native / Expo blank screen.** A debug APK expects Metro. Either
|
|
188
|
+
run Metro and `adb reverse tcp:8081 tcp:8081`, or embed the bundle:
|
|
189
|
+
`npx expo export --platform android` (or `npx react-native bundle
|
|
190
|
+
--platform android --dev false --entry-file index.js --bundle-output
|
|
191
|
+
android/app/src/main/assets/index.android.bundle`) before building.
|
|
192
|
+
- **Keyboard covers the target.** `KEYCODE_BACK` hides it; re-dump before tapping.
|
|
193
|
+
- **BACK follows the back stack.** To close a popup without leaving its
|
|
194
|
+
screen, tap outside it instead.
|
|
195
|
+
- **"System UI isn't responding" after install.** A freshly booted emulator
|
|
196
|
+
under load can raise this for `com.android.systemui`. Run
|
|
197
|
+
`ui.py $SERIAL dismiss-anr`; it taps Wait only for System UI and leaves any
|
|
198
|
+
dialog from the app under test open, because that one is a finding.
|
|
199
|
+
- **Gradle needs the SDK path.** If the build cannot find the SDK, write
|
|
200
|
+
`sdk.dir=$ANDROID_HOME` to `android/local.properties` (or the project root).
|
|
201
|
+
|
|
202
|
+
## Output
|
|
203
|
+
|
|
204
|
+
Return only this, as a short note:
|
|
205
|
+
|
|
206
|
+
- **outcome**: `completed`, `partial`, or `blocked`;
|
|
207
|
+
- **observations**: runtime (Android version, API, ABI),
|
|
208
|
+
build under test, backend wiring, and what you did in replayable sentences;
|
|
209
|
+
- **findings**: each with severity in words, screen, observed vs expected,
|
|
210
|
+
exact reproduction from a fresh launch, times reproduced out of attempts,
|
|
211
|
+
confidence, and the capture paths that support it;
|
|
212
|
+
- **unverified**: what you could not reach and why, including physical-device
|
|
213
|
+
behavior (camera, push, biometrics, real network) that this runtime cannot
|
|
214
|
+
prove;
|
|
215
|
+
- **capture paths**: recordings, screenshots, and the APK path.
|
|
216
|
+
|
|
217
|
+
Label results "Android emulator (API <n>)". Never
|
|
218
|
+
call them physical-device results.
|
|
219
|
+
|
|
220
|
+
## Cleanup
|
|
221
|
+
|
|
222
|
+
Stop only what you started: `bash scripts/record.sh $SERIAL stop` if still
|
|
223
|
+
running, `adb -s $SERIAL reverse --remove-all`, and any backend process by
|
|
224
|
+
its PID. Leave the device running for other charters; the session owns it.
|