From 4d1c2bf44c3a0e80d2fb46d61ee38cdf79498a7c Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Mon, 10 Aug 2026 21:19:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=BD=D0=BE=D0=BD=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=BE=D0=B2,=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=20=D0=B7=D0=B0=D0=B4=D0=B0?= =?UTF-8?q?=D1=87=20=D0=B8=20OpenSpec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs/ по канону 12: паспорт с целью проекта, архитектура сегодняшнего устройства, схема хранилища, модель угроз, конвенции кода, журнал ревью. Конвенции перенесены из jellybit; места, где код им не следует, помечены строкой «Расхождение» как объявленный долг. tasks/ с роадмапом: две достигнутые цели, две запланированные (веб и многопользовательский режим), два направления (все форматы, долгие записи) и пять задач в беклоге. openspec/config.yaml — маршрутизатор с адресами документов, спек пока нет. CLAUDE.md переписан по форме канона: инварианты с severity, семантика гейта, запреты с путями. Taskfile получил task gate. --- .claude/commands/opsx/apply.md | 155 ++++++++++ .claude/commands/opsx/archive.md | 160 ++++++++++ .claude/commands/opsx/explore.md | 174 +++++++++++ .claude/commands/opsx/propose.md | 109 +++++++ .claude/commands/opsx/sync.md | 143 +++++++++ .claude/skills/openspec-apply-change/SKILL.md | 159 ++++++++++ .../skills/openspec-archive-change/SKILL.md | 117 +++++++ .claude/skills/openspec-explore/SKILL.md | 289 ++++++++++++++++++ .claude/skills/openspec-propose/SKILL.md | 113 +++++++ .claude/skills/openspec-sync-specs/SKILL.md | 147 +++++++++ CLAUDE.md | 193 +++++++----- Taskfile.yml | 63 ++++ docs/.pm.json | 4 + docs/adr/README.md | 39 +++ docs/adr/template.md | 22 ++ docs/architecture.md | 131 ++++++++ docs/conventions/README.md | 66 ++++ docs/conventions/config.md | 124 ++++++++ docs/conventions/database.md | 56 ++++ docs/conventions/errors.md | 145 +++++++++ docs/conventions/logging.md | 248 +++++++++++++++ docs/conventions/web-ui.md | 146 +++++++++ docs/database.md | 101 ++++++ docs/passport.md | 73 +++++ docs/research/README.md | 22 ++ docs/review.md | 203 ++++++++++++ docs/security.md | 91 ++++++ openspec/config.yaml | 66 ++++ tasks/BACKLOG.md | 27 ++ tasks/REJECTED.md | 7 + tasks/ROADMAP.md | 38 +++ tasks/items/any-audio-source.md | 19 ++ tasks/items/errors-as-instead-of-typecast.md | 35 +++ tasks/items/external-call-timeouts.md | 46 +++ tasks/items/http-handler-tests-never-green.md | 57 ++++ tasks/items/long-recordings.md | 23 ++ tasks/items/multi-user.md | 21 ++ tasks/items/pocketbase-storage.md | 44 +++ tasks/items/speechkit-limits.md | 32 ++ tasks/items/web-access.md | 19 ++ 40 files changed, 3656 insertions(+), 71 deletions(-) create mode 100644 .claude/commands/opsx/apply.md create mode 100644 .claude/commands/opsx/archive.md create mode 100644 .claude/commands/opsx/explore.md create mode 100644 .claude/commands/opsx/propose.md create mode 100644 .claude/commands/opsx/sync.md create mode 100644 .claude/skills/openspec-apply-change/SKILL.md create mode 100644 .claude/skills/openspec-archive-change/SKILL.md create mode 100644 .claude/skills/openspec-explore/SKILL.md create mode 100644 .claude/skills/openspec-propose/SKILL.md create mode 100644 .claude/skills/openspec-sync-specs/SKILL.md create mode 100644 docs/.pm.json create mode 100644 docs/adr/README.md create mode 100644 docs/adr/template.md create mode 100644 docs/architecture.md create mode 100644 docs/conventions/README.md create mode 100644 docs/conventions/config.md create mode 100644 docs/conventions/database.md create mode 100644 docs/conventions/errors.md create mode 100644 docs/conventions/logging.md create mode 100644 docs/conventions/web-ui.md create mode 100644 docs/database.md create mode 100644 docs/passport.md create mode 100644 docs/research/README.md create mode 100644 docs/review.md create mode 100644 docs/security.md create mode 100644 openspec/config.yaml create mode 100644 tasks/BACKLOG.md create mode 100644 tasks/REJECTED.md create mode 100644 tasks/ROADMAP.md create mode 100644 tasks/items/any-audio-source.md create mode 100644 tasks/items/errors-as-instead-of-typecast.md create mode 100644 tasks/items/external-call-timeouts.md create mode 100644 tasks/items/http-handler-tests-never-green.md create mode 100644 tasks/items/long-recordings.md create mode 100644 tasks/items/multi-user.md create mode 100644 tasks/items/pocketbase-storage.md create mode 100644 tasks/items/speechkit-limits.md create mode 100644 tasks/items/web-access.md diff --git a/.claude/commands/opsx/apply.md b/.claude/commands/opsx/apply.md new file mode 100644 index 0000000..f540757 --- /dev/null +++ b/.claude/commands/opsx/apply.md @@ -0,0 +1,155 @@ +--- +name: "OPSX: Apply" +description: Implement tasks from an OpenSpec change (Experimental) +category: Workflow +tags: [workflow, artifacts, experimental] +--- + +Implement tasks from an OpenSpec change. + +**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store ` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root. + +**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. + +**Steps** + +1. **Select the change** + + If a name is provided, use it. Otherwise: + - Infer from conversation context if the user mentioned a change + - Auto-select if only one active change exists + - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select + + Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --json + ``` + Parse the JSON to understand: + - `schemaName`: The workflow being used (e.g., "spec-driven") + - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints + - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) + +3. **Get apply instructions** + + ```bash + openspec instructions apply --change "" --json + ``` + + This returns: + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) + - Progress (total, complete, remaining) + - Task list with status + - Dynamic instruction based on current state + + **Handle states:** + - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` + - If `state: "all_done"`: congratulate, suggest archive + - Otherwise: proceed to implementation + +4. **Read context files** + + Read every file path listed under `contextFiles` from the apply instructions output. + The files depend on the schema being used: + - **spec-driven**: proposal, specs, design, tasks + - Other schemas: follow the contextFiles from CLI output + +5. **Show current progress** + + Display: + - Schema being used + - Progress: "N/M tasks complete" + - Remaining tasks overview + - Dynamic instruction from CLI + +6. **Implement tasks (loop until done or blocked)** + + For each pending task: + - Show which task is being worked on + - Make the code changes required + - Keep changes minimal and focused + - Mark task complete in the tasks file: `- [ ]` → `- [x]` + - Continue to next task + + **Pause if:** + - Task is unclear → ask for clarification + - Implementation reveals a design issue → suggest updating artifacts + - Error or blocker encountered → report and wait for guidance + - User interrupts + +7. **On completion or pause, show status** + + Display: + - Tasks completed this session + - Overall progress: "N/M tasks complete" + - If all done: suggest archive + - If paused: explain why and wait for guidance + +**Output During Implementation** + +``` +## Implementing: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**Progress:** 7/7 tasks complete ✓ + +### Completed This Session +- [x] Task 1 +- [x] Task 2 +... + +All tasks complete! You can archive this change with `/opsx:archive`. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.