refacil-sdd-ai 4.5.1 → 4.5.3

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/README.md CHANGED
@@ -38,6 +38,18 @@ refacil-sdd-ai init
38
38
  # Generates AGENTS.md and the .agents/ directory for the project
39
39
  ```
40
40
 
41
+ ### Adding a new IDE to an existing installation
42
+
43
+ If you already have the methodology installed for Claude Code or Cursor and want to add OpenCode (or any other IDE), just run `init` again from the repo root:
44
+
45
+ ```bash
46
+ refacil-sdd-ai init
47
+ ```
48
+
49
+ The selector will pre-select the IDEs whose folders already exist (`.claude/`, `.cursor/`). Check the new IDE you want to add (e.g. OpenCode), leave the existing ones checked, and confirm — only the newly selected IDE will receive files; existing installations are refreshed in place.
50
+
51
+ > **`update` does not add new IDEs** — it only updates IDEs already installed. Use `init` to add a new one.
52
+
41
53
  ### Update
42
54
 
43
55
  ```bash
@@ -54,14 +66,6 @@ refacil-sdd-ai clean # in the repo (removes skills + SDD-AI hooks for
54
66
  npm uninstall -g refacil-sdd-ai
55
67
  ```
56
68
 
57
- ### Legacy `openspec/` directory
58
-
59
- Older repos may still have **`openspec/changes/`**. The package **migrates automatically** to **`refacil-sdd/`** the first time you run any **`refacil-sdd-ai sdd …`** subcommand or when **`check-update`** runs at session start. After you confirm the tree under **`refacil-sdd/`**, you can remove the leftover **`openspec/`** folder.
60
-
61
- Some teams still install the **OpenSpec CLI** for **`opsx:*`** commands; those can coexist with SDD-AI. The **supported** path for changes, review markers, and archiving is **`refacil-sdd/`** plus **`refacil-sdd-ai sdd`** and **`/refacil:*`** skills.
62
-
63
- ---
64
-
65
69
  ## CLI Commands
66
70
 
67
71
  ### Package management
package/bin/cli.js CHANGED
@@ -207,7 +207,8 @@ async function selectIDEs() {
207
207
  const clack = require('@clack/prompts');
208
208
  const result = await clack.multiselect({
209
209
  message: 'Select IDEs to install refacil-sdd-ai into:',
210
- options: options.map((o) => ({ label: o.label, value: o.value, selected: o.selected })),
210
+ options: options.map((o) => ({ label: o.label, value: o.value })),
211
+ initialValues: options.filter((o) => o.selected).map((o) => o.value),
211
212
  required: false,
212
213
  });
213
214
  if (clack.isCancel(result)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "refacil-sdd-ai",
3
- "version": "4.5.1",
3
+ "version": "4.5.3",
4
4
  "description": "SDD-AI: Specification-Driven Development with AI — development methodology using AI with Claude Code, Cursor and OpenCode",
5
5
  "bin": {
6
6
  "refacil-sdd-ai": "./bin/cli.js"
@@ -21,6 +21,7 @@
21
21
  "methodology",
22
22
  "claude-code",
23
23
  "cursor",
24
+ "opencode",
24
25
  "sdd",
25
26
  "specification-driven",
26
27
  "testing",
@@ -55,24 +55,48 @@ Critical rule:
55
55
 
56
56
  ### Protocol when the current branch is protected
57
57
 
58
- If the current branch is protected and code needs to be written:
59
-
60
- 1. **Ask for a task identifier first** — before any git action, ask the user:
61
- *"What is the task number or name for this branch? (e.g. SEGINF-20, REF-123, or a short descriptive name)"*
62
- Wait for the user's answer before continuing.
63
- 2. Verify clean working directory (`git status --porcelain`).
64
- 3. If there are uncommitted changes, ask for approval to `git stash push -m "auto-stash-refacil"`.
65
- 4. Detect the base branch to create a working branch from:
58
+ If the current branch is protected and code needs to be written, follow the gates below strictly. Each gate is a hard stop — do not proceed to the next gate until the user has replied in the current one.
59
+
60
+ ---
61
+
62
+ **[GATE 1 STOP AND WAIT: ask for task identifier]**
63
+
64
+ Ask the user exactly this question and then STOP. Do NOT run any git command. Do NOT propose a branch name. Do NOT continue to Gate 2 until the user replies:
65
+
66
+ > "What is the task number or identifier for this branch? (e.g. SEGINF-20, REF-123, or a short descriptive name)"
67
+
68
+ If the user says they have no ID, note that and proceed to Gate 2 with `<ID> = none`.
69
+
70
+ ---
71
+
72
+ **[GATE 2 — STOP AND WAIT: propose branch name and ask for approval]**
73
+
74
+ Only after receiving the user's reply to Gate 1:
75
+
76
+ 1. Verify clean working directory (`git status --porcelain`).
77
+ 2. If there are uncommitted changes, ask for approval to stash them (`git stash push -m "auto-stash-refacil"`). Do NOT stash without approval.
78
+ 3. Detect the base branch:
66
79
  - Prefer `develop`, then `dev`.
67
80
  - Only if neither exists (new repo), use `main` or `master` as a temporary exception.
68
- - Switch and update (`git pull origin <base>`). If none exist, stop.
69
- 5. **Propose the branch name and wait for explicit user approval before creating it:**
81
+ 4. Compose the branch name:
70
82
  - Feature: `feature/<ID>` (e.g. `feature/SEGINF-20`)
71
83
  - Bugfix: `fix/<ID>` (e.g. `fix/SEGINF-20`)
72
- - Without ID: propose a short descriptive name (e.g. `fix/project-root-consistency`) and **require explicit approval** before proceeding.
73
- Example: *"I'll create branch `fix/SEGINF-20` from `develop`. Shall I proceed?"*
74
- 6. **Only after explicit user confirmation**: create the branch and restore stash if used.
75
- 7. If the user does not approve at any point, stop.
84
+ - Without ID: propose a short descriptive name (e.g. `fix/session-timeout-redis`)
85
+ 5. Present the proposed name and ask for approval. Then STOP. Do NOT run `git checkout` or `git switch`. Do NOT create the branch yet. Wait for the user's explicit confirmation:
86
+
87
+ > "I'll create branch `<proposed-name>` from `<base-branch>`. Shall I proceed?"
88
+
89
+ ---
90
+
91
+ **[GATE 3 — execute only after explicit approval from Gate 2]**
92
+
93
+ Only after the user explicitly confirms (e.g. "yes", "go", "ok", "proceed"):
94
+
95
+ 1. Switch to the base branch and update it (`git checkout <base>` + `git pull origin <base>`).
96
+ 2. Create the working branch (`git checkout -b <branch-name>`).
97
+ 3. If a stash was approved in Gate 2, restore it (`git stash pop`).
98
+
99
+ If the user does not approve at Gate 2, stop entirely. Do not create any branch.
76
100
 
77
101
  ## §5 — Output policy (UX)
78
102