refacil-sdd-ai 4.5.4 → 4.5.7
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 +2 -2
- package/lib/installer.js +3 -1
- package/package.json +1 -1
- package/skills/archive/SKILL.md +28 -16
- package/skills/prereqs/METHODOLOGY-CONTRACT.md +2 -0
- package/skills/up-code/SKILL.md +8 -6
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ All invoked as `/refacil:<name>` in Claude Code, Cursor, or OpenCode.
|
|
|
153
153
|
| `/refacil:test` | Generate unit tests from the artifacts |
|
|
154
154
|
| `/refacil:verify` | Validate implementation vs specs (with optional autofix) |
|
|
155
155
|
| `/refacil:review` | Quality checklist, emits `.review-passed` if approved |
|
|
156
|
-
| `/refacil:archive` | Archive the completed change + sync specs (requests
|
|
156
|
+
| `/refacil:archive` | Archive the completed change + sync specs (requests task references) |
|
|
157
157
|
| `/refacil:up-code` | Commit + push + PR (runs review if missing) |
|
|
158
158
|
| `/refacil:bug` | Full bugfix flow with regression tests |
|
|
159
159
|
| `/refacil:update` | Detect and apply pending methodology migrations to the current repo |
|
|
@@ -259,7 +259,7 @@ From there, the full cycle is:
|
|
|
259
259
|
- For features/improvements: the CLI moves artifacts to `archive/` and extracts `.review-passed` fields to `review.yaml` inside each affected spec.
|
|
260
260
|
- For bugs: manual archiving, creates `refacil-sdd/specs/fix-*/spec.md` in standard format + `review.yaml`.
|
|
261
261
|
- A single branch can accumulate multiple bugs, each in its own independent `fix-*/` folder.
|
|
262
|
-
- `/refacil:archive` always requests one or more **
|
|
262
|
+
- `/refacil:archive` always requests one or more **task references** associated with the change before proceeding. Accepted formats: URL, ticket/issue identifier, or task name. References are stored in `review.yaml` under the `taskReferences` field (YAML list). This field is mandatory — archiving does not proceed until the user provides at least one reference.
|
|
263
263
|
|
|
264
264
|
---
|
|
265
265
|
|
package/lib/installer.js
CHANGED
|
@@ -141,7 +141,9 @@ function transformFrontmatterForCursor(content) {
|
|
|
141
141
|
}
|
|
142
142
|
if (line.startsWith('model:')) {
|
|
143
143
|
const value = line.slice('model:'.length).trim();
|
|
144
|
-
|
|
144
|
+
// Claude Code short aliases (and plan-mode alias) → Cursor always inherits session model
|
|
145
|
+
const ccAlias = value.toLowerCase();
|
|
146
|
+
if (ccAlias === 'sonnet' || ccAlias === 'opus' || ccAlias === 'haiku' || ccAlias === 'opusplan') {
|
|
145
147
|
out.push('model: inherit');
|
|
146
148
|
} else {
|
|
147
149
|
out.push(line);
|
package/package.json
CHANGED
package/skills/archive/SKILL.md
CHANGED
|
@@ -34,23 +34,33 @@ Verify the change is truly complete:
|
|
|
34
34
|
If any of checks 1-3 fail, inform the user but allow them to decide whether to continue.
|
|
35
35
|
If check 4 fails, archiving cannot continue.
|
|
36
36
|
|
|
37
|
-
### Step 1.5: Request
|
|
37
|
+
### Step 1.5: Request task reference(s) (traceability — mandatory)
|
|
38
38
|
|
|
39
|
-
Before proceeding to archiving, ask the user for the
|
|
39
|
+
Before proceeding to archiving, ask the user for the task reference(s) associated with the change (URL, issue/ticket number, or short task name):
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
-
|
|
42
|
+
Task reference(s) associated with this change (URL, ticket number, or task name; if multiple, separate with commas):
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
**Rules:**
|
|
46
|
-
- The user may enter one or multiple
|
|
47
|
-
-
|
|
46
|
+
- The user may enter one or multiple references separated by commas in a single message.
|
|
47
|
+
- Accepted formats: URL (`https://tracker.company.com/TASK-123`), identifier (`TASK-123`, `INC-9001`), or short descriptive name (`ajuste checkout`).
|
|
48
|
+
- Minimum validation rule for each reference (operational and mandatory):
|
|
49
|
+
- `URL`: starts with `http://` or `https://` and has at least one non-space character after the protocol.
|
|
50
|
+
- `identifier`: matches `^[A-Za-z][A-Za-z0-9_-]*-\d+$` (examples: `BP-4610`, `INC-9001`).
|
|
51
|
+
- `short name`: 3-80 characters, includes at least one letter, and is not only symbols/spaces.
|
|
52
|
+
- If the user provides no reference (answers empty, "n", "no", "none", blank Enter), **block the archiving** and ask again:
|
|
48
53
|
```
|
|
49
|
-
Cannot archive without at least one
|
|
50
|
-
Provide the
|
|
54
|
+
Cannot archive without at least one task reference.
|
|
55
|
+
Provide the task URL, identifier, or name that originated this change to continue.
|
|
51
56
|
```
|
|
52
|
-
-
|
|
53
|
-
|
|
57
|
+
- If the user provides a non-empty but invalid value (for example: `---`, `???`, `123`, `_`), **reject it** and ask again:
|
|
58
|
+
```
|
|
59
|
+
Invalid task reference format.
|
|
60
|
+
Use one of: URL (https://...), identifier (ABC-123), or short task name (3-80 chars, includes letters).
|
|
61
|
+
```
|
|
62
|
+
- Repeat until at least one valid reference is received.
|
|
63
|
+
- Save the references in `taskReferences` to use when writing `review.yaml` in the following steps.
|
|
54
64
|
|
|
55
65
|
### Step 2: Determine change type
|
|
56
66
|
|
|
@@ -75,7 +85,7 @@ Bug fixes only contain `summary.md` (and optionally `.review-passed`). The CLI `
|
|
|
75
85
|
|
|
76
86
|
2. **Document in specs**: using the content read in step 0, create an individual spec at `$(git rev-parse --show-toplevel)/refacil-sdd/specs/[descriptive-name]/spec.md`.
|
|
77
87
|
|
|
78
|
-
**Spec folder name**: Use a short, clear kebab-case description of the bug (e.g. `fix-session-timeout-redis`, `fix-null-pointer-payment-callback`). **Do NOT use ticket IDs** (REF-123,
|
|
88
|
+
**Spec folder name**: Use a short, clear kebab-case description of the bug (e.g. `fix-session-timeout-redis`, `fix-null-pointer-payment-callback`). **Do NOT use ticket IDs** (REF-123, TASK-456, etc.) — the name must be descriptive so `/refacil:explore` can find and understand the fix without external context.
|
|
79
89
|
|
|
80
90
|
Content of `spec.md` (Refacil SDD spec layout):
|
|
81
91
|
```markdown
|
|
@@ -97,7 +107,7 @@ Bug fixes only contain `summary.md` (and optionally `.review-passed`). The CLI `
|
|
|
97
107
|
- **THEN** the system SHALL [normal behavior without regression]
|
|
98
108
|
```
|
|
99
109
|
|
|
100
|
-
3. **Persist review metadata separately**: create `$(git rev-parse --show-toplevel)/refacil-sdd/specs/[descriptive-name]/review.yaml` with the fields from `.review-passed` plus the
|
|
110
|
+
3. **Persist review metadata separately**: create `$(git rev-parse --show-toplevel)/refacil-sdd/specs/[descriptive-name]/review.yaml` with the fields from `.review-passed` plus the task references from Step 1.5:
|
|
101
111
|
```yaml
|
|
102
112
|
verdict: APROBADO|APROBADO CON OBSERVACIONES
|
|
103
113
|
date: 2026-04-10T00:00:00.000Z
|
|
@@ -105,8 +115,9 @@ Bug fixes only contain `summary.md` (and optionally `.review-passed`). The CLI `
|
|
|
105
115
|
summary: "..."
|
|
106
116
|
failCount: 0
|
|
107
117
|
blockers: false
|
|
108
|
-
|
|
109
|
-
- https://
|
|
118
|
+
taskReferences:
|
|
119
|
+
- https://tracker.company.com/TASK-123
|
|
120
|
+
- TASK-123
|
|
110
121
|
```
|
|
111
122
|
|
|
112
123
|
4. Continue to **Step 3**.
|
|
@@ -123,7 +134,7 @@ The spec and review evidence are written **before** running the CLI archive comm
|
|
|
123
134
|
|
|
124
135
|
2. **Persist review evidence (before archiving)**:
|
|
125
136
|
- Read `refacil-sdd/changes/<changeName>/.review-passed` (dotfile — use `ls -la` or read by explicit path, not directory listing).
|
|
126
|
-
- Create/update `refacil-sdd/specs/<specName>/review.yaml` with its fields plus `
|
|
137
|
+
- Create/update `refacil-sdd/specs/<specName>/review.yaml` with its fields plus `taskReferences` from Step 1.5:
|
|
127
138
|
```yaml
|
|
128
139
|
verdict: APROBADO|APROBADO CON OBSERVACIONES
|
|
129
140
|
date: 2026-04-10T00:00:00.000Z
|
|
@@ -131,8 +142,9 @@ The spec and review evidence are written **before** running the CLI archive comm
|
|
|
131
142
|
summary: "..."
|
|
132
143
|
failCount: 0
|
|
133
144
|
blockers: false
|
|
134
|
-
|
|
135
|
-
- https://
|
|
145
|
+
taskReferences:
|
|
146
|
+
- https://tracker.company.com/TASK-123
|
|
147
|
+
- TASK-123
|
|
136
148
|
```
|
|
137
149
|
- If `review.yaml` already exists, update only the fields that changed without removing others.
|
|
138
150
|
|
|
@@ -127,6 +127,8 @@ If the user does not request detail, use concise mode.
|
|
|
127
127
|
|
|
128
128
|
- `archive` requires `.review-passed` as a blocking precondition (verify existence according to **§8**).
|
|
129
129
|
- When archiving regular changes (proposal-driven flow), the `.review-passed` metadata must be persisted in `refacil-sdd/specs/`.
|
|
130
|
+
- `archive` must request and persist at least one task reference for traceability. Accepted formats: URL, ticket/issue identifier, or short task name.
|
|
131
|
+
- The recommended field in `review.yaml` is `taskReferences` (YAML list). Do not enforce provider-specific fields such as `jiraTasks`.
|
|
130
132
|
- The recommended format is `review.yaml` inside each affected spec folder.
|
|
131
133
|
- If it cannot be reliably mapped to specific specs, record the evidence in `refacil-sdd/specs/review-metadata.yaml`.
|
|
132
134
|
|
package/skills/up-code/SKILL.md
CHANGED
|
@@ -83,15 +83,17 @@ Run `git push -u origin [current-branch]` to push the changes.
|
|
|
83
83
|
Which branch do you want to create the PR to? (recommended: testing)
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
If the user indicates a different branch than `testing`, verify it exists on the remote by inspecting `git branch -r` output before generating the link. If it does not exist, inform the user and ask them to confirm or correct the name.
|
|
87
87
|
|
|
88
|
-
3. Get the remote repository URL with `git remote get-url origin` and
|
|
88
|
+
3. Get the remote repository URL with `git remote get-url origin` and detect the VCS hosting used by this repository to generate the correct PR/MR link:
|
|
89
89
|
- **GitHub** (url contains `github.com`): `https://github.com/[owner]/[repo]/compare/[target-branch]...[current-branch]?expand=1`
|
|
90
|
-
- **Bitbucket** (url contains `bitbucket.org`): `https://bitbucket.org/[workspace]/[repo]/pull-requests/new?source=[current-branch]&dest=[target-branch]`
|
|
91
|
-
-
|
|
92
|
-
-
|
|
90
|
+
- **Bitbucket Cloud** (url contains `bitbucket.org`): `https://bitbucket.org/[workspace]/[repo]/pull-requests/new?source=[current-branch]&dest=[target-branch]`
|
|
91
|
+
- **GitLab** (url contains `gitlab.` or `gitlab.com`): `https://[gitlab-host]/[group]/[repo]/-/merge_requests/new?merge_request[source_branch]=[current-branch]&merge_request[target_branch]=[target-branch]`
|
|
92
|
+
- **Azure DevOps** (url contains `dev.azure.com` or `visualstudio.com`): build the "create PR" URL for the detected project/repo using source and target branches.
|
|
93
|
+
- For SSH remotes (`git@host:group/repo.git`), extract host/namespace/repo from the segment after `:`.
|
|
94
|
+
- If hosting cannot be determined, do not assume a provider: show the detected remote URL and ask the user which platform is used before generating the final PR/MR link.
|
|
93
95
|
|
|
94
|
-
4. Show the link to the user and recommend PR to `testing`:
|
|
96
|
+
4. Show the generated link (provider-specific) to the user and recommend PR to `testing`:
|
|
95
97
|
```
|
|
96
98
|
Create your PR here: [link]
|
|
97
99
|
|