refacil-sdd-ai 4.5.2 → 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/package.json
CHANGED
|
@@ -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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
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/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
|