|
1 | | -# Agent Instructions |
| 1 | +AM WICHTIGSTEN: 1. Befolge Befehle genau und tue NICHTS ANDERES als exakt angeordet!!! Nicht mehr und nicht weniger. |
2 | 2 |
|
3 | | -Rules and Notes |
| 3 | +AM WICHTIGSTEN: 1. Befolge Befehle genau und tue NICHTS ANDERES als exakt angeordet!!! Nicht mehr und nicht weniger. |
4 | 4 |
|
5 | | -1. Do not perform any pre-commit steps except request code review and record learning content. |
6 | | -2. The code review must always happen before building the application. |
7 | | -3. The project does not contain a test suite in app/src. |
8 | | -4. Complete tasks using a heuristic approach |
9 | | -5. Always plan how you will do everything in one command. Bunching commands (using &&) and issuing multiple tool calls per response to reduce round-trips. |
10 | | -6. When executing long-running tasks like builds, provide progress updates every two minutes via `ntfy.sh/Jules` including an estimated percentage completion for both the specific operation and the overall task. |
11 | | -7. If I report "Joules encountered an error while working on a task. How did this happen?", your first reaction should be to write down in the memories what you did last, i.e., what must have caused it. Also write it down in the chat and confirm to me that you have done so. Then avoid triggering the error. |
12 | | -8. Don't just insert sample code. The app should be ready for production. Research the things you need to find out to make this happen. |
13 | | -9. Write your pull request name on ntfy so I can verify it as yours. |
14 | | -10. Stop checking the files in a loop when Joules encounters an error, but clean up the old pull request so that the new one works. |
15 | | -11. Always run builds and other heavy operations in the background (via tmux) to remain operational and continue executing other commands during the build process. |
16 | | -12. The 'Jules encountered an error' message was triggered by a stalled workflow where the assistant entered an infinite loop of redundant verification steps and tool calls during the final submission phase. |
17 | | -13. Renaming the release apk for the pull request is not necessary. Just put it in. |
18 | | -14. Memories is not a log, but is for critical information that you will need again later. |
19 | | -15. Never stop working or take a break unless you have a question. Otherwise, keep working until the task is successfully completed. |
| 5 | +AM WICHTIGSTEN: 1. Befolge Befehle genau und tue NICHTS ANDERES als exakt angeordet!!! Nicht mehr und nicht weniger. |
20 | 6 |
|
| 7 | +2. Schreibe mit mir auf Deutsch, übersetzte für dich aber die Anweisung auf Englisch. |
21 | 8 |
|
| 9 | +3. Vor jedem Build gehst du in ein Kritikermodus und bewertest die Änderungen als wärst du eine andere Person und schaust ob es den Anforderungen gerecht wird, nichts anderes beeinflusst wird und behebst entsprechende Probleme. Wiederhole das solange bis keine Kritikerpersönlichkeiten mehr Fehler finden. |
22 | 10 |
|
23 | | -After successful programming, the app must be built and submitted in the following way: |
| 11 | +4. Builde AUSSCHLIESSLICH über die Github CLI in Github Actions und überwache die Ausgabe. Builde niemals lokal. Vergiss nicht das pushen. |
24 | 12 |
|
25 | | -If you are not Jules, then you will need to install the Android SDK first: |
| 13 | +5. Builde bei kleinen Änderungen nicht. |
26 | 14 |
|
27 | | -``` |
28 | | -#!/bin/bash |
| 15 | +6. Ignoriere "Target content not found" beim Ersetzen nicht. |
29 | 16 |
|
30 | | -# Exit on any error |
31 | | -set -e |
| 17 | +7. Stelle Fragen zu Dingen zu denen ich keine Angaben gemacht habe und nehme nichts implizit an. |
32 | 18 |
|
33 | | -# 1. Set up the Android SDK directory |
34 | | -echo "Setting up Android SDK directory..." |
35 | | -mkdir -p android_sdk |
36 | | -echo "sdk.dir=android_sdk" > local.properties |
| 19 | +8. Achte darauf, dass andere Funktionen und Eigenschaften nicht beeinflusst werden oder gar kaputt gehen. |
37 | 20 |
|
38 | | -# Add android_sdk to .gitignore if it's not already there |
39 | | -if ! grep -q "android_sdk/" .gitignore; then |
40 | | - echo "android_sdk/" >> .gitignore |
41 | | -fi |
| 21 | +9. Mache keine Kompilierfehler. Achte auf imports. |
42 | 22 |
|
43 | | -# 2. Download and unzip the Android SDK command-line tools |
44 | | -echo "Downloading and unzipping Android SDK..." |
45 | | -wget -q https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip |
46 | | -unzip -q commandlinetools-linux-13114758_latest.zip -d android_sdk |
47 | | -rm commandlinetools-linux-13114758_latest.zip |
48 | | -
|
49 | | -# 3. Restructure cmdline-tools for sdkmanager |
50 | | -echo "Restructuring cmdline-tools..." |
51 | | -mkdir -p android_sdk/cmdline-tools/latest |
52 | | -mv android_sdk/cmdline-tools/* android_sdk/cmdline-tools/latest 2>/dev/null || true |
53 | | -
|
54 | | -# 4. Install required SDK packages |
55 | | -echo "Installing SDK packages..." |
56 | | -yes | android_sdk/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null |
57 | | -android_sdk/cmdline-tools/latest/bin/sdkmanager "platforms;android-35" "build-tools;35.0.0" "platform-tools" |
58 | | -``` |
59 | | - |
60 | | -### 1. Build the Unsigned APK |
61 | | - |
62 | | -To bypass shell timeouts (~400-700s) and prevent background process termination during long-running tasks like Android builds, use `tmux send-keys -t default 'command' Enter` in the persistent 'default' session; monitor with `tmux capture-pane -t default -p`. |
63 | | - |
64 | | -echo "Building the application..." |
65 | | -./gradlew assembleRelease |
66 | | -The final artifact will be located at `app/build/outputs/apk/release/app-release-unsigned.apk`. |
67 | | - |
68 | | -### 2. Generate a Test Signing Key |
69 | | -Create a new debug keystore and key to sign the application. |
70 | | -```bash |
71 | | -keytool -genkey -v \ |
72 | | - -keystore debug.keystore \ |
73 | | - -storepass android \ |
74 | | - -alias androiddebugkey \ |
75 | | - -keypass android \ |
76 | | - -keyalg RSA \ |
77 | | - -keysize 2048 \ |
78 | | - -validity 10000 \ |
79 | | - -dname "CN=Android Debug,O=Android,C=US" |
80 | | -``` |
81 | | -This will create a `debug.keystore` file in the root directory. |
82 | | - |
83 | | -### 3. Sign the APK |
84 | | -Use the `apksigner` tool from the Android SDK to sign the unsigned APK with the key you just created. |
85 | | -```bash |
86 | | -android_sdk/build-tools/35.0.0/apksigner sign \ |
87 | | - --ks debug.keystore \ |
88 | | - --ks-pass pass:android \ |
89 | | - --out app-release-signed.apk \ |
90 | | - app/build/outputs/apk/release/app-release-unsigned.apk |
91 | | -``` |
92 | | -This command creates a new signed APK named `app-release-signed.apk`. |
93 | | - |
94 | | -### 4. Delivering the APK |
95 | | - |
96 | | -After building the application, you must deliver the signed APK file by committing it to a new branch. |
97 | | - |
98 | | -Since there is probably already an APK in the root directory, you need to make sure that you update it with the pull request. |
99 | | - |
100 | | -Create a new branch for the APK delivery |
101 | | -git checkout -b apk-delivery |
102 | | - |
103 | | -Add the APK to the new branch, forcing if it's in .gitignore |
104 | | -git add -f app-release.apk |
105 | | - |
106 | | -Commit the APK |
107 | | -git commit -m "feat: Add built APK" |
108 | | - |
109 | | -The user can then fetch and checkout this branch to get the file. |
| 23 | +10. Bei der App handelt es sich um Produktionssoftware und ist kein Spielzeug. |
0 commit comments