From f90c23a1dfd4c32a88ab5e5f1051e11a2a6ef9d4 Mon Sep 17 00:00:00 2001 From: Maxim Starikov Date: Thu, 29 Jan 2026 15:23:53 +0100 Subject: [PATCH 1/3] Update website links to simpleditor.org --- README.md | 2 +- .../java/com/maxistar/textpad/activities/EditorActivity.java | 2 +- app/src/main/res/values-ar/strings.xml | 2 +- app/src/main/res/values-cn/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ja/strings.xml | 2 +- app/src/main/res/values-pl/strings.xml | 2 +- app/src/main/res/values-pt/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-uk/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 763870c..fe885c3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The code is open so anyone can review code, send pull requests, new features, tr Github repo: https://github.com/maxistar/TextPad. -Website: https://texteditor.maxistar.me +Website: https://simpleditor.org Any suggestions, pull requests, translations for this project are welcomed. Thank you! diff --git a/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java b/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java index 09a2e9b..c71adff 100644 --- a/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java +++ b/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java @@ -1196,7 +1196,7 @@ public void showReadOnlyDialog() { @Override public void onClick(View textView) { // Open the link in an external browser - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://texteditor.maxistar.me/faq/")); + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://simpleditor.org/faq/")); context.startActivity(browserIntent); } }; diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index d36891b..8661048 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -26,7 +26,7 @@ الإعدادات حول متابعة - هذا هو محرر النص البسيط للأندرويد. للحصول على المزيد من المعلومات ، تفضل بزيارة https://texteditor.maxistar.me. + هذا هو محرر النص البسيط للأندرويد. للحصول على المزيد من المعلومات ، تفضل بزيارة https://simpleditor.org. إختار اللغة اللغة أنقر لتغيير لغة الواجهة diff --git a/app/src/main/res/values-cn/strings.xml b/app/src/main/res/values-cn/strings.xml index 78e32c2..9393292 100644 --- a/app/src/main/res/values-cn/strings.xml +++ b/app/src/main/res/values-cn/strings.xml @@ -27,7 +27,7 @@ 设置 关于 继续 - 这是一个Android的简单文本编辑器,想获取更多信息请访问 https://texteditor.maxistar.me 。 + 这是一个Android的简单文本编辑器,想获取更多信息请访问 https://simpleditor.org 。 选择语言 语言 更换界面语言 diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 25281e0..7aa4b14 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -26,7 +26,7 @@ Einstellungen Über Fortsetzen - Dies ist der Simple Text Editor für Android. Weitere Informationen erhalten Sie unter https://texteditor.maxistar.me. + Dies ist der Simple Text Editor für Android. Weitere Informationen erhalten Sie unter https://simpleditor.org. Sprache wählen Sprache Klicken Sie auf, um die Sprache der Benutzeroberfläche zu ändern diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 39645f7..00ccd0c 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -26,7 +26,7 @@ Ajustes Acerca de Continuar - Editor de Texto Simple para Android. Para obtener más información visite https://texteditor.maxistar.me. + Editor de Texto Simple para Android. Para obtener más información visite https://simpleditor.org. Elegir idioma Idioma Pulsar para cambiar el idioma diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 38c3712..cbd983a 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -25,7 +25,7 @@ Paramètres A propos de Continuer - Ceci est l\'éditeur de texte simple pour Android. Pour obtenir plus d\'informations, visitez https://texteditor.maxistar.me. + Ceci est l\'éditeur de texte simple pour Android. Pour obtenir plus d\'informations, visitez https://simpleditor.org. Choisir la langue Langue Cliquez pour changer la langue de l\'interface. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 94bfc5e..b291d7e 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -26,7 +26,7 @@ Impostazioni Informazioni Continua - Questo è Simple Text Editor per Android. Per ulteriori informazioni, visitare https://texteditor.maxistar.me. + Questo è Simple Text Editor per Android. Per ulteriori informazioni, visitare https://simpleditor.org. Scegli la lingua Lingua fare clic per cambiare la lingua dell\'interfaccia diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 1dda443..fd304d5 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -27,7 +27,7 @@ 設定 情報 続ける - Simple Text Editor for Android. 公式サイトはこちら https://texteditor.maxistar.me + Simple Text Editor for Android. 公式サイトはこちら https://simpleditor.org 言語を選択 言語 インターフェースの言語を変更します diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 23158bc..caa7823 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -27,7 +27,7 @@ Ustawienia Informacje Kontynuuj - Oto Prosty edytor tekstu na Androida. Aby uzyskać więcej informacji, odwiedź https://texteditor.maxistar.me + Oto Prosty edytor tekstu na Androida. Aby uzyskać więcej informacji, odwiedź https://simpleditor.org Wybierz język Język Naciśnij, aby zmienić język interfejsu diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 5870d1c..91a12c9 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -26,7 +26,7 @@ Configurações Sobre Continuar - Este é um simples editor de texto para Android. Para mais informações visite https://texteditor.maxistar.me. + Este é um simples editor de texto para Android. Para mais informações visite https://simpleditor.org. Alterar idioma Idioma Toque para alterar o idioma do aplicativo diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a1ebdec..aeef1a5 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -26,7 +26,7 @@ Настройки О Программе Продолжить - Это Простой Текстовый Редактор под Android. Посетите https://texteditor.maxistar.me для более подробной информации. + Это Простой Текстовый Редактор под Android. Посетите https://simpleditor.org для более подробной информации. Выберите язык Язык нажмите чтобы сменить язык diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index c7ca6df..33a912b 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -26,7 +26,7 @@ Tercihler Hakkında Devam - Android cihazlar için metin düzenleyici uygulamadır. Daha fazla bilgi için: https://texteditor.maxistar.me. + Android cihazlar için metin düzenleyici uygulamadır. Daha fazla bilgi için: https://simpleditor.org. Dil Seçin Dil Arayüz dilini değiştirmek için tıklayın diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index f585fed..b4c1183 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -27,7 +27,7 @@ Налаштування Довідка Продовжити - Це Простий текстовий редактор для Android. Докладніше див.: https://texteditor.maxistar.me + Це Простий текстовий редактор для Android. Докладніше див.: https://simpleditor.org Обрати мову Мова змінити мову інтерфейсу diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8ddaeca..87d74d6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -27,7 +27,7 @@ Settings About Continue - This is Simple Text Editor for Android. To get more information visit https://texteditor.maxistar.me + This is Simple Text Editor for Android. To get more information visit https://simpleditor.org Choose Language Language сlick to change language of interface From 4f6e693be26b9cffb6394a3dbf32cdf76705e161 Mon Sep 17 00:00:00 2001 From: Maxim Starikov Date: Thu, 29 Jan 2026 15:25:12 +0100 Subject: [PATCH 2/3] Add medium-small font size option --- .../textpad/activities/EditorActivity.java | 3 +++ .../preferences/FontSizePreference.java | 26 +++++++++++++------ .../textpad/service/SettingsService.java | 1 + 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java b/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java index 09a2e9b..c57b521 100644 --- a/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java +++ b/app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java @@ -465,6 +465,9 @@ private void applyFontSize() { case (SettingsService.SETTING_SMALL): mText.setTextSize(16.0f); break; + case (SettingsService.SETTING_MEDIUM_SMALL): + mText.setTextSize(18.0f); + break; case (SettingsService.SETTING_LARGE): mText.setTextSize(24.0f); break; diff --git a/app/src/main/java/com/maxistar/textpad/preferences/FontSizePreference.java b/app/src/main/java/com/maxistar/textpad/preferences/FontSizePreference.java index 0b16d4e..f3f6276 100644 --- a/app/src/main/java/com/maxistar/textpad/preferences/FontSizePreference.java +++ b/app/src/main/java/com/maxistar/textpad/preferences/FontSizePreference.java @@ -41,18 +41,21 @@ public FontSizePreference(Context context, AttributeSet attrs) { case SettingsService.SETTING_SMALL: selected = 1; break; - case SettingsService.SETTING_MEDIUM: + case SettingsService.SETTING_MEDIUM_SMALL: selected = 2; break; - case SettingsService.SETTING_LARGE: + case SettingsService.SETTING_MEDIUM: selected = 3; break; - case SettingsService.SETTING_HUGE: + case SettingsService.SETTING_LARGE: selected = 4; break; - case SettingsService.SETTING_EXTRA_HUGE: + case SettingsService.SETTING_HUGE: selected = 5; break; + case SettingsService.SETTING_EXTRA_HUGE: + selected = 6; + break; } } @@ -71,15 +74,18 @@ public void onClick(DialogInterface dialog, int whichButton) { settingsService.setFontSize(SettingsService.SETTING_SMALL, getContext()); break; case 2: - settingsService.setFontSize(SettingsService.SETTING_MEDIUM, getContext()); + settingsService.setFontSize(SettingsService.SETTING_MEDIUM_SMALL, getContext()); break; case 3: + settingsService.setFontSize(SettingsService.SETTING_MEDIUM, getContext()); + break; + case 4: settingsService.setFontSize(SettingsService.SETTING_LARGE, getContext()); break; - case 4: + case 5: settingsService.setFontSize(SettingsService.SETTING_HUGE, getContext()); break; - case 5: + case 6: settingsService.setFontSize(SettingsService.SETTING_EXTRA_HUGE, getContext()); break; } @@ -93,6 +99,7 @@ public void onClick(DialogInterface dialog, int whichButton) { String[] arrayOfFonts = { SettingsService.SETTING_EXTRA_SMALL, SettingsService.SETTING_SMALL, + SettingsService.SETTING_MEDIUM_SMALL, SettingsService.SETTING_MEDIUM, SettingsService.SETTING_LARGE, SettingsService.SETTING_HUGE, @@ -143,6 +150,9 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) case SettingsService.SETTING_SMALL: tv.setTextSize(16.0f); break; + case SettingsService.SETTING_MEDIUM_SMALL: + tv.setTextSize(18.0f); + break; case SettingsService.SETTING_MEDIUM: tv.setTextSize(20.0f); break; @@ -162,4 +172,4 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) return v; } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/maxistar/textpad/service/SettingsService.java b/app/src/main/java/com/maxistar/textpad/service/SettingsService.java index dd1c633..a88d67d 100644 --- a/app/src/main/java/com/maxistar/textpad/service/SettingsService.java +++ b/app/src/main/java/com/maxistar/textpad/service/SettingsService.java @@ -36,6 +36,7 @@ public class SettingsService { public static final String SETTING_USE_SIMPLE_SCROLLING = "use_simple_scrolling"; public static final String SETTING_MEDIUM = "Medium"; + public static final String SETTING_MEDIUM_SMALL = "Medium Small"; public static final String SETTING_EXTRA_SMALL = "Extra Small"; public static final String SETTING_SMALL = "Small"; public static final String SETTING_LARGE = "Large"; From 0e4bd17083a888eb16acedcb84acf2eb1ab9344f Mon Sep 17 00:00:00 2001 From: Max Starikov Date: Thu, 29 Jan 2026 15:45:05 +0100 Subject: [PATCH 3/3] new release notes --- AGENTS.md | 18 + app/src/main/AndroidManifest.xml | 4 +- .../metadata/android/en-US/changelogs/58.txt | 2 + .../metadata/android/es-ES/changelogs/58.txt | 2 + .../metadata/android/pl-PL/changelogs/58.txt | 2 + .../metadata/android/ru-RU/changelogs/58.txt | 2 + openspec/AGENTS.md | 456 ++++++++++++++++++ openspec/project.md | 49 ++ 8 files changed, 533 insertions(+), 2 deletions(-) create mode 100644 AGENTS.md create mode 100644 fastlane/metadata/android/en-US/changelogs/58.txt create mode 100644 fastlane/metadata/android/es-ES/changelogs/58.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/58.txt create mode 100644 fastlane/metadata/android/ru-RU/changelogs/58.txt create mode 100644 openspec/AGENTS.md create mode 100644 openspec/project.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0669699 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,18 @@ + +# OpenSpec Instructions + +These instructions are for AI assistants working in this project. + +Always open `@/openspec/AGENTS.md` when the request: +- Mentions planning or proposals (words like proposal, spec, change, plan) +- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work +- Sounds ambiguous and you need the authoritative spec before coding + +Use `@/openspec/AGENTS.md` to learn: +- How to create and apply change proposals +- Spec format and conventions +- Project structure and guidelines + +Keep this managed block so 'openspec update' can refresh the instructions. + + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b82c3e2..213d70d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="58" + android:versionName="1.29.1" > diff --git a/fastlane/metadata/android/en-US/changelogs/58.txt b/fastlane/metadata/android/en-US/changelogs/58.txt new file mode 100644 index 0000000..be0287a --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/58.txt @@ -0,0 +1,2 @@ +- added a new size (thanks Christian for feature request and for donation) +- website is changed to https://simpleditor.org diff --git a/fastlane/metadata/android/es-ES/changelogs/58.txt b/fastlane/metadata/android/es-ES/changelogs/58.txt new file mode 100644 index 0000000..c2394de --- /dev/null +++ b/fastlane/metadata/android/es-ES/changelogs/58.txt @@ -0,0 +1,2 @@ +- se agregó un nuevo tamaño (gracias Christian por la solicitud de función y por la donación) +- el sitio web se cambió a https://simpleditor.org diff --git a/fastlane/metadata/android/pl-PL/changelogs/58.txt b/fastlane/metadata/android/pl-PL/changelogs/58.txt new file mode 100644 index 0000000..5afa48d --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/58.txt @@ -0,0 +1,2 @@ +- dodano nowy rozmiar (dziękujemy Christianowi za prośbę o funkcję i za darowiznę) +- strona internetowa została zmieniona na https://simpleditor.org diff --git a/fastlane/metadata/android/ru-RU/changelogs/58.txt b/fastlane/metadata/android/ru-RU/changelogs/58.txt new file mode 100644 index 0000000..1b01fac --- /dev/null +++ b/fastlane/metadata/android/ru-RU/changelogs/58.txt @@ -0,0 +1,2 @@ +- добавлен новый размер (спасибо Christian за запрос функции и за пожертвование) +- сайт изменен на https://simpleditor.org diff --git a/openspec/AGENTS.md b/openspec/AGENTS.md new file mode 100644 index 0000000..96ab0bb --- /dev/null +++ b/openspec/AGENTS.md @@ -0,0 +1,456 @@ +# OpenSpec Instructions + +Instructions for AI coding assistants using OpenSpec for spec-driven development. + +## TL;DR Quick Checklist + +- Search existing work: `openspec spec list --long`, `openspec list` (use `rg` only for full-text search) +- Decide scope: new capability vs modify existing capability +- Pick a unique `change-id`: kebab-case, verb-led (`add-`, `update-`, `remove-`, `refactor-`) +- Scaffold: `proposal.md`, `tasks.md`, `design.md` (only if needed), and delta specs per affected capability +- Write deltas: use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`; include at least one `#### Scenario:` per requirement +- Validate: `openspec validate [change-id] --strict` and fix issues +- Request approval: Do not start implementation until proposal is approved + +## Three-Stage Workflow + +### Stage 1: Creating Changes +Create proposal when you need to: +- Add features or functionality +- Make breaking changes (API, schema) +- Change architecture or patterns +- Optimize performance (changes behavior) +- Update security patterns + +Triggers (examples): +- "Help me create a change proposal" +- "Help me plan a change" +- "Help me create a proposal" +- "I want to create a spec proposal" +- "I want to create a spec" + +Loose matching guidance: +- Contains one of: `proposal`, `change`, `spec` +- With one of: `create`, `plan`, `make`, `start`, `help` + +Skip proposal for: +- Bug fixes (restore intended behavior) +- Typos, formatting, comments +- Dependency updates (non-breaking) +- Configuration changes +- Tests for existing behavior + +**Workflow** +1. Review `openspec/project.md`, `openspec list`, and `openspec list --specs` to understand current context. +2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas under `openspec/changes//`. +3. Draft spec deltas using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement. +4. Run `openspec validate --strict` and resolve any issues before sharing the proposal. + +### Stage 2: Implementing Changes +Track these steps as TODOs and complete them one by one. +1. **Read proposal.md** - Understand what's being built +2. **Read design.md** (if exists) - Review technical decisions +3. **Read tasks.md** - Get implementation checklist +4. **Implement tasks sequentially** - Complete in order +5. **Confirm completion** - Ensure every item in `tasks.md` is finished before updating statuses +6. **Update checklist** - After all work is done, set every task to `- [x]` so the list reflects reality +7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved + +### Stage 3: Archiving Changes +After deployment, create separate PR to: +- Move `changes/[name]/` → `changes/archive/YYYY-MM-DD-[name]/` +- Update `specs/` if capabilities changed +- Use `openspec archive --skip-specs --yes` for tooling-only changes (always pass the change ID explicitly) +- Run `openspec validate --strict` to confirm the archived change passes checks + +## Before Any Task + +**Context Checklist:** +- [ ] Read relevant specs in `specs/[capability]/spec.md` +- [ ] Check pending changes in `changes/` for conflicts +- [ ] Read `openspec/project.md` for conventions +- [ ] Run `openspec list` to see active changes +- [ ] Run `openspec list --specs` to see existing capabilities + +**Before Creating Specs:** +- Always check if capability already exists +- Prefer modifying existing specs over creating duplicates +- Use `openspec show [spec]` to review current state +- If request is ambiguous, ask 1–2 clarifying questions before scaffolding + +### Search Guidance +- Enumerate specs: `openspec spec list --long` (or `--json` for scripts) +- Enumerate changes: `openspec list` (or `openspec change list --json` - deprecated but available) +- Show details: + - Spec: `openspec show --type spec` (use `--json` for filters) + - Change: `openspec show --json --deltas-only` +- Full-text search (use ripgrep): `rg -n "Requirement:|Scenario:" openspec/specs` + +## Quick Start + +### CLI Commands + +```bash +# Essential commands +openspec list # List active changes +openspec list --specs # List specifications +openspec show [item] # Display change or spec +openspec validate [item] # Validate changes or specs +openspec archive [--yes|-y] # Archive after deployment (add --yes for non-interactive runs) + +# Project management +openspec init [path] # Initialize OpenSpec +openspec update [path] # Update instruction files + +# Interactive mode +openspec show # Prompts for selection +openspec validate # Bulk validation mode + +# Debugging +openspec show [change] --json --deltas-only +openspec validate [change] --strict +``` + +### Command Flags + +- `--json` - Machine-readable output +- `--type change|spec` - Disambiguate items +- `--strict` - Comprehensive validation +- `--no-interactive` - Disable prompts +- `--skip-specs` - Archive without spec updates +- `--yes`/`-y` - Skip confirmation prompts (non-interactive archive) + +## Directory Structure + +``` +openspec/ +├── project.md # Project conventions +├── specs/ # Current truth - what IS built +│ └── [capability]/ # Single focused capability +│ ├── spec.md # Requirements and scenarios +│ └── design.md # Technical patterns +├── changes/ # Proposals - what SHOULD change +│ ├── [change-name]/ +│ │ ├── proposal.md # Why, what, impact +│ │ ├── tasks.md # Implementation checklist +│ │ ├── design.md # Technical decisions (optional; see criteria) +│ │ └── specs/ # Delta changes +│ │ └── [capability]/ +│ │ └── spec.md # ADDED/MODIFIED/REMOVED +│ └── archive/ # Completed changes +``` + +## Creating Change Proposals + +### Decision Tree + +``` +New request? +├─ Bug fix restoring spec behavior? → Fix directly +├─ Typo/format/comment? → Fix directly +├─ New feature/capability? → Create proposal +├─ Breaking change? → Create proposal +├─ Architecture change? → Create proposal +└─ Unclear? → Create proposal (safer) +``` + +### Proposal Structure + +1. **Create directory:** `changes/[change-id]/` (kebab-case, verb-led, unique) + +2. **Write proposal.md:** +```markdown +# Change: [Brief description of change] + +## Why +[1-2 sentences on problem/opportunity] + +## What Changes +- [Bullet list of changes] +- [Mark breaking changes with **BREAKING**] + +## Impact +- Affected specs: [list capabilities] +- Affected code: [key files/systems] +``` + +3. **Create spec deltas:** `specs/[capability]/spec.md` +```markdown +## ADDED Requirements +### Requirement: New Feature +The system SHALL provide... + +#### Scenario: Success case +- **WHEN** user performs action +- **THEN** expected result + +## MODIFIED Requirements +### Requirement: Existing Feature +[Complete modified requirement] + +## REMOVED Requirements +### Requirement: Old Feature +**Reason**: [Why removing] +**Migration**: [How to handle] +``` +If multiple capabilities are affected, create multiple delta files under `changes/[change-id]/specs//spec.md`—one per capability. + +4. **Create tasks.md:** +```markdown +## 1. Implementation +- [ ] 1.1 Create database schema +- [ ] 1.2 Implement API endpoint +- [ ] 1.3 Add frontend component +- [ ] 1.4 Write tests +``` + +5. **Create design.md when needed:** +Create `design.md` if any of the following apply; otherwise omit it: +- Cross-cutting change (multiple services/modules) or a new architectural pattern +- New external dependency or significant data model changes +- Security, performance, or migration complexity +- Ambiguity that benefits from technical decisions before coding + +Minimal `design.md` skeleton: +```markdown +## Context +[Background, constraints, stakeholders] + +## Goals / Non-Goals +- Goals: [...] +- Non-Goals: [...] + +## Decisions +- Decision: [What and why] +- Alternatives considered: [Options + rationale] + +## Risks / Trade-offs +- [Risk] → Mitigation + +## Migration Plan +[Steps, rollback] + +## Open Questions +- [...] +``` + +## Spec File Format + +### Critical: Scenario Formatting + +**CORRECT** (use #### headers): +```markdown +#### Scenario: User login success +- **WHEN** valid credentials provided +- **THEN** return JWT token +``` + +**WRONG** (don't use bullets or bold): +```markdown +- **Scenario: User login** ❌ +**Scenario**: User login ❌ +### Scenario: User login ❌ +``` + +Every requirement MUST have at least one scenario. + +### Requirement Wording +- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative) + +### Delta Operations + +- `## ADDED Requirements` - New capabilities +- `## MODIFIED Requirements` - Changed behavior +- `## REMOVED Requirements` - Deprecated features +- `## RENAMED Requirements` - Name changes + +Headers matched with `trim(header)` - whitespace ignored. + +#### When to use ADDED vs MODIFIED +- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing requirement. +- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details. +- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name. + +Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead. + +Authoring a MODIFIED requirement correctly: +1) Locate the existing requirement in `openspec/specs//spec.md`. +2) Copy the entire requirement block (from `### Requirement: ...` through its scenarios). +3) Paste it under `## MODIFIED Requirements` and edit to reflect the new behavior. +4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one `#### Scenario:`. + +Example for RENAMED: +```markdown +## RENAMED Requirements +- FROM: `### Requirement: Login` +- TO: `### Requirement: User Authentication` +``` + +## Troubleshooting + +### Common Errors + +**"Change must have at least one delta"** +- Check `changes/[name]/specs/` exists with .md files +- Verify files have operation prefixes (## ADDED Requirements) + +**"Requirement must have at least one scenario"** +- Check scenarios use `#### Scenario:` format (4 hashtags) +- Don't use bullet points or bold for scenario headers + +**Silent scenario parsing failures** +- Exact format required: `#### Scenario: Name` +- Debug with: `openspec show [change] --json --deltas-only` + +### Validation Tips + +```bash +# Always use strict mode for comprehensive checks +openspec validate [change] --strict + +# Debug delta parsing +openspec show [change] --json | jq '.deltas' + +# Check specific requirement +openspec show [spec] --json -r 1 +``` + +## Happy Path Script + +```bash +# 1) Explore current state +openspec spec list --long +openspec list +# Optional full-text search: +# rg -n "Requirement:|Scenario:" openspec/specs +# rg -n "^#|Requirement:" openspec/changes + +# 2) Choose change id and scaffold +CHANGE=add-two-factor-auth +mkdir -p openspec/changes/$CHANGE/{specs/auth} +printf "## Why\n...\n\n## What Changes\n- ...\n\n## Impact\n- ...\n" > openspec/changes/$CHANGE/proposal.md +printf "## 1. Implementation\n- [ ] 1.1 ...\n" > openspec/changes/$CHANGE/tasks.md + +# 3) Add deltas (example) +cat > openspec/changes/$CHANGE/specs/auth/spec.md << 'EOF' +## ADDED Requirements +### Requirement: Two-Factor Authentication +Users MUST provide a second factor during login. + +#### Scenario: OTP required +- **WHEN** valid credentials are provided +- **THEN** an OTP challenge is required +EOF + +# 4) Validate +openspec validate $CHANGE --strict +``` + +## Multi-Capability Example + +``` +openspec/changes/add-2fa-notify/ +├── proposal.md +├── tasks.md +└── specs/ + ├── auth/ + │ └── spec.md # ADDED: Two-Factor Authentication + └── notifications/ + └── spec.md # ADDED: OTP email notification +``` + +auth/spec.md +```markdown +## ADDED Requirements +### Requirement: Two-Factor Authentication +... +``` + +notifications/spec.md +```markdown +## ADDED Requirements +### Requirement: OTP Email Notification +... +``` + +## Best Practices + +### Simplicity First +- Default to <100 lines of new code +- Single-file implementations until proven insufficient +- Avoid frameworks without clear justification +- Choose boring, proven patterns + +### Complexity Triggers +Only add complexity with: +- Performance data showing current solution too slow +- Concrete scale requirements (>1000 users, >100MB data) +- Multiple proven use cases requiring abstraction + +### Clear References +- Use `file.ts:42` format for code locations +- Reference specs as `specs/auth/spec.md` +- Link related changes and PRs + +### Capability Naming +- Use verb-noun: `user-auth`, `payment-capture` +- Single purpose per capability +- 10-minute understandability rule +- Split if description needs "AND" + +### Change ID Naming +- Use kebab-case, short and descriptive: `add-two-factor-auth` +- Prefer verb-led prefixes: `add-`, `update-`, `remove-`, `refactor-` +- Ensure uniqueness; if taken, append `-2`, `-3`, etc. + +## Tool Selection Guide + +| Task | Tool | Why | +|------|------|-----| +| Find files by pattern | Glob | Fast pattern matching | +| Search code content | Grep | Optimized regex search | +| Read specific files | Read | Direct file access | +| Explore unknown scope | Task | Multi-step investigation | + +## Error Recovery + +### Change Conflicts +1. Run `openspec list` to see active changes +2. Check for overlapping specs +3. Coordinate with change owners +4. Consider combining proposals + +### Validation Failures +1. Run with `--strict` flag +2. Check JSON output for details +3. Verify spec file format +4. Ensure scenarios properly formatted + +### Missing Context +1. Read project.md first +2. Check related specs +3. Review recent archives +4. Ask for clarification + +## Quick Reference + +### Stage Indicators +- `changes/` - Proposed, not yet built +- `specs/` - Built and deployed +- `archive/` - Completed changes + +### File Purposes +- `proposal.md` - Why and what +- `tasks.md` - Implementation steps +- `design.md` - Technical decisions +- `spec.md` - Requirements and behavior + +### CLI Essentials +```bash +openspec list # What's in progress? +openspec show [item] # View details +openspec validate --strict # Is it correct? +openspec archive [--yes|-y] # Mark complete (add --yes for automation) +``` + +Remember: Specs are truth. Changes are proposals. Keep them in sync. diff --git a/openspec/project.md b/openspec/project.md new file mode 100644 index 0000000..1412c0a --- /dev/null +++ b/openspec/project.md @@ -0,0 +1,49 @@ +# Project Context + +## Purpose +Simple Text Editor for Android focused on editing small plain-text files and quick notes. Keep the app lightweight, reliable, and easy to use. + +## Tech Stack +- Android app (Android SDK) +- Java (primary language) +- Gradle (Groovy) build system +- AndroidX (appcompat, test libraries) +- JUnit 5 for unit tests; Espresso and AndroidX Test for instrumentation +- fastlane metadata for Play Store/F-Droid releases + +## Project Conventions + +### Code Style +- Java packages under `com.maxistar.textpad` +- Prefer clear, explicit naming for activities/services/utils +- Resources follow Android naming conventions (`res/values-xx/strings.xml`, `drawable-*`) + +### Architecture Patterns +- Classic Android app structure with Activities + Services + utility classes +- ServiceLocator used for wiring shared services +- No dependency injection framework in use + +### Testing Strategy +- Unit tests in `app/src/test` with JUnit 5 +- Instrumentation tests via AndroidX Test + Espresso +- Lint run via `./gradlew lint` + +### Git Workflow +- GitHub repo: https://github.com/maxistar/TextPad +- Default branch and commit conventions are standard; use PRs for changes (confirm if you have a preferred branch/commit policy) + +## Domain Context +- Plain-text editor only (no rich text); small files are the primary use case +- Supports translations via Crowdin +- Distributed on Google Play and F-Droid + +## Important Constraints +- minSdkVersion 21; compile/target SDK 35 +- Keep app lightweight and fast; avoid heavy dependencies +- Offline-first: core editing should not require network + +## External Dependencies +- Android SDK/Gradle toolchain +- Crowdin project for translations +- fastlane for store metadata +- Google Play and F-Droid distribution