- LICENSE (Apache 2.0), NOTICE with credits (Needle 2, LiteRT-LM, Thinai), LICENSES/Thinai-MIT.txt, SPDX headers on every source file - CONTRIBUTING (fork, branch from develop, PR into develop, maintainer merges), CODE_OF_CONDUCT (Contributor Covenant 2.1), SECURITY, Gitea issue and pull-request templates - README rewritten with screenshots; the detailed guide moved to docs/USER_GUIDE.md - Personal details removed: made-up contact names in examples and tests, a placeholder for the Tailscale address, made-up web-search fixtures in place of saved third-party pages - B-43: the emulator reports Needle as unavailable instead of "init failed" - B-44: chat previews show plain text, not Markdown symbols
44 lines
3.0 KiB
Markdown
44 lines
3.0 KiB
Markdown
# Stitch — working rules
|
|
|
|
## Keep the documentation current (standing rule)
|
|
|
|
Updating the docs is part of finishing a change, not an optional extra. In the **same turn** as any feature, bug fix, or release:
|
|
|
|
1. **`DEVELOPMENT_HISTORY.md`** — update whichever of these the change touches:
|
|
- **Release history** table (version, time, trigger, content)
|
|
- **Timeline**
|
|
- **Problems, blockers and fixes** — symptom → root cause → fix → version. Record failed attempts and process mistakes too; the audit trail is the point.
|
|
- **Testing & verification audit** — what was tested, and what is still untested
|
|
- **Project metrics** — re-measure (tests, tools, eval), never estimate
|
|
- **Known limitations & open risks**
|
|
2. **`README.md`** — when setup or user-facing behaviour changes.
|
|
3. Mention the doc update in one line at the end of the report to the owner.
|
|
|
|
Keep the plain-language style: the owner is not an Android developer.
|
|
|
|
## Release checklist
|
|
|
|
```bash
|
|
export JAVA_HOME=~/.jdks/jdk-17.0.20.1+1
|
|
./gradlew testDebugUnitTest assembleRelease # tests must pass
|
|
cp app/build/outputs/apk/release/app-release.apk dist/Stitch-<version>.apk
|
|
~/Android/Sdk/build-tools/35.0.0/aapt dump badging dist/Stitch-<version>.apk | head -1 # verify version
|
|
```
|
|
|
|
- Work on `develop` (or a `feature/<name>` branch off it). For a release, branch `release/<version>` from
|
|
`develop`, bump the version there, build, test, then merge into `main` and back into `develop`.
|
|
- Tag it: `v<version>-alpha.N` (tests pass), `-beta.N` (phone checklist passed), plain `v<version>` (used
|
|
on the phone without problems). Push branches and tags, then create the Gitea release (pre-release for
|
|
alpha/beta) and attach the APK. Token: `~/.config/gitea/token`, passed per command with
|
|
`-c http.extraHeader`, never stored in the repo config; send a normal User-Agent to the Gitea API
|
|
(it rejects Python's default with a 403).
|
|
- Stitch is open source (Apache 2.0). New source files start with the SPDX header
|
|
(`// SPDX-FileCopyrightText: 2026 Mohammed Khalid` / `// SPDX-License-Identifier: Apache-2.0`); code
|
|
adapted from elsewhere is credited in `NOTICE`. Never commit personal data: real contact names or
|
|
numbers, private addresses, keys or tokens. Examples use made-up names.
|
|
- Bump `versionCode` **and** `versionName` in `app/build.gradle.kts` first.
|
|
- Never copy the APK before confirming the build succeeded (a stale copy once shipped as a new version).
|
|
- **Signing:** leave the default (debug key) so builds install over the owner's phone. `-PreleaseKey` switches to the real key at `~/.stitch-release-key/` and makes the APK refuse to install over the current app — only use it for the deliberate cutover in `docs/SIGNING.md`.
|
|
- Emulator: `./gradlew assembleDebug -Pemulator` (x86_64 Needle stub); grant `/dev/kvm` with `setfacl` and **remove it afterwards**.
|
|
- Needle eval: `python3 tools-dev/needle/run_eval.py ~/.cache/stitch-dl/needle/linux-x86_64/needle app/build/needle-tools.json 0.4` — "wrong" must stay 0.
|