refacil-sdd-ai 4.2.4 → 4.4.0
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 +239 -214
- package/agents/auditor.md +189 -184
- package/agents/debugger.md +201 -204
- package/agents/implementer.md +150 -149
- package/agents/investigator.md +80 -89
- package/agents/proposer.md +219 -124
- package/agents/tester.md +140 -144
- package/agents/validator.md +153 -145
- package/bin/cli.js +158 -116
- package/lib/bus/askFulfillment.js +17 -17
- package/lib/bus/broker.js +599 -599
- package/lib/bus/ui/app.js +318 -318
- package/lib/commands/sdd.js +447 -0
- package/lib/hooks.js +236 -236
- package/lib/installer.js +58 -2
- package/lib/methodology-migration-pending.js +101 -136
- package/package.json +4 -6
- package/skills/apply/SKILL.md +139 -120
- package/skills/archive/SKILL.md +105 -107
- package/skills/ask/SKILL.md +78 -78
- package/skills/attend/SKILL.md +70 -70
- package/skills/bug/SKILL.md +121 -128
- package/skills/explore/SKILL.md +73 -63
- package/skills/guide/SKILL.md +79 -79
- package/skills/inbox/SKILL.md +43 -43
- package/skills/join/SKILL.md +82 -82
- package/skills/prereqs/BUS-CROSS-REPO.md +55 -55
- package/skills/prereqs/METHODOLOGY-CONTRACT.md +122 -115
- package/skills/prereqs/SKILL.md +30 -37
- package/skills/propose/SKILL.md +103 -102
- package/skills/reply/SKILL.md +44 -44
- package/skills/review/SKILL.md +163 -126
- package/skills/review/checklist-back.md +92 -92
- package/skills/review/checklist-front.md +72 -72
- package/skills/review/checklist.md +114 -114
- package/skills/say/SKILL.md +38 -38
- package/skills/setup/SKILL.md +85 -141
- package/skills/setup/troubleshooting.md +38 -35
- package/skills/test/SKILL.md +104 -94
- package/skills/test/testing-patterns.md +63 -63
- package/skills/up-code/SKILL.md +108 -108
- package/skills/update/SKILL.md +109 -132
- package/skills/verify/SKILL.md +159 -132
- package/templates/compact-guidance.md +45 -45
- package/templates/methodology-guide.md +46 -42
- package/config/openspec-config.yaml +0 -8
- package/skills/prereqs/OPENSPEC-DELTAS.md +0 -51
package/skills/archive/SKILL.md
CHANGED
|
@@ -1,106 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: refacil:archive
|
|
3
|
-
description:
|
|
3
|
+
description: Archive a completed change — move artifacts to archive and sync specs
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# refacil:archive —
|
|
7
|
+
# refacil:archive — Archive Completed Change
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This command archives completed SDD changes (bug fixes manually, regular changes via `refacil-sdd-ai sdd archive`), syncs `refacil-sdd/specs/`, and enforces team pre-verification checks.
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**Prerequisites**: `sdd` profile from `refacil-prereqs/SKILL.md` + rules from `METHODOLOGY-CONTRACT.md`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Instructions
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Step 1: Pre-verification checks
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Before archiving, run `refacil-sdd-ai sdd status <changeName> --json` and parse the JSON to get the change status.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Verify the change is truly complete:
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
1. **Tasks completed**: Use the `tasksProgress` (or `tasks`) field from the JSON — verify that `tasks.pending === 0`. If there are incomplete tasks, inform the user and ask if they want to continue anyway.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
2. **Tests pass**: Resolve and run the test command according to `refacil-prereqs/METHODOLOGY-CONTRACT.md`. If there are failing tests, inform and ask if they want to continue.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
3. **No pending files**: Run `git status` and verify if there are uncommitted changes related to the feature. If there are, suggest committing before archiving.
|
|
26
|
+
|
|
27
|
+
4. **Review approved (blocking)**: Verify that the `.review-passed` file exists in the change folder (`refacil-sdd/changes/[change-name]/.review-passed`) following **`METHODOLOGY-CONTRACT.md` §8** (dotfile; do not conclude by listings without dotfiles). If it does NOT exist, **stop the archiving** and inform the user:
|
|
26
28
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
Cannot archive: the change does not have an approved review.
|
|
30
|
+
Run /refacil:review first.
|
|
29
31
|
```
|
|
30
|
-
|
|
32
|
+
This verification is **mandatory and blocking** — it cannot be skipped.
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
If any of checks 1-3 fail, inform the user but allow them to decide whether to continue.
|
|
35
|
+
If check 4 fails, archiving cannot continue.
|
|
34
36
|
|
|
35
|
-
###
|
|
37
|
+
### Step 1.5: Request Jira links (traceability — mandatory)
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
Before proceeding to archiving, ask the user for the Jira links associated with the change:
|
|
38
40
|
|
|
39
41
|
```
|
|
40
|
-
|
|
42
|
+
Jira link(s) associated with this change (if multiple, separate with commas):
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
**
|
|
44
|
-
-
|
|
45
|
-
-
|
|
45
|
+
**Rules:**
|
|
46
|
+
- The user may enter one or multiple links separated by commas in a single message.
|
|
47
|
+
- If the user provides no link (answers empty, "n", "no", "none", blank Enter), **block the archiving** and ask again:
|
|
46
48
|
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
Cannot archive without at least one Jira link.
|
|
50
|
+
Provide the link to the task that originated this change to continue.
|
|
49
51
|
```
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
+
- Repeat until at least one valid URL is received.
|
|
53
|
+
- Save the links in `jiraTasks` to use when writing `review.yaml` in the following steps.
|
|
54
|
+
|
|
55
|
+
### Step 2: Determine change type
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
Inspect the change folder in `refacil-sdd/changes/`:
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
- **It is a bug fix** if the folder name starts with `fix-` (created by `refacil:bug`).
|
|
60
|
+
- **It is a regular change** in any other case (created by `refacil:propose`).
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
- **Es un cambio regular** en cualquier otro caso (creado por `refacil:propose`).
|
|
62
|
+
Depending on the type, follow the corresponding step:
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
### Step 2A: Bug fix → Manual archiving (no `sdd archive` CLI)
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
Bug fixes only contain `summary.md` (and optionally `.review-passed`); they are not full proposal/spec/design/task trees. Archive them with **git mv** / **mv** per the steps below — **do not** use `refacil-sdd-ai sdd archive` for these folders.
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
0. **Delete memory.yaml if present** (CA-18): run `rm -f "refacil-sdd/changes/[fix-name]/memory.yaml"` before moving the folder.
|
|
65
69
|
|
|
66
|
-
1. **
|
|
70
|
+
1. **Move to archive (move operation, not copy)**: transfer the full fix folder from `refacil-sdd/changes/[fix-name]/` to `refacil-sdd/changes/archive/[ISO-date]-[fix-name]/`. The source folder **must be eliminated** when done.
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
1.
|
|
70
|
-
2.
|
|
71
|
-
3.
|
|
72
|
-
- Linux/macOS: `mv "
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- `
|
|
76
|
-
|
|
77
|
-
5. Si la verificacion falla (la carpeta de origen sobrevivio), eliminarla explicitamente con `rm -rf "openspec/changes/[nombre-fix]"` y re-verificar. No continuar al paso 2 hasta que el estado sea consistente.
|
|
72
|
+
Recommended execution order (deterministic and cross-platform):
|
|
73
|
+
1. Ensure the `refacil-sdd/changes/archive/` directory exists (create if not present).
|
|
74
|
+
2. Prefer an **atomic move** with `git mv "refacil-sdd/changes/[fix-name]" "refacil-sdd/changes/archive/[ISO-date]-[fix-name]"` when the fix is already under git control (moves and stages at once).
|
|
75
|
+
3. If `git mv` does not apply (untracked files or error), use instead:
|
|
76
|
+
- Linux/macOS/Windows: `mv "refacil-sdd/changes/[fix-name]" "refacil-sdd/changes/archive/[ISO-date]-[fix-name]"`. Always use `mv` (not `cp -r`) — verify source no longer exists after the move.
|
|
77
|
+
4. **Mandatory post-move verification**: run a listing/existence test to confirm:
|
|
78
|
+
- `refacil-sdd/changes/[fix-name]/` **no longer exists**.
|
|
79
|
+
- `refacil-sdd/changes/archive/[ISO-date]-[fix-name]/` **does exist** and contains `summary.md` (+ `.review-passed` if it existed).
|
|
80
|
+
5. If the verification fails (source folder survived), explicitly delete it with `rm -rf "refacil-sdd/changes/[fix-name]"` and re-verify. Do not continue to step 2 until the state is consistent.
|
|
78
81
|
|
|
79
|
-
2. **
|
|
82
|
+
2. **Document in specs**: Read the `summary.md` and `.review-passed` from the fix (from the **archived** path at `refacil-sdd/changes/archive/[ISO-date]-[fix-name]/`, no longer from the original path), and create an individual spec for the bug at `refacil-sdd/specs/[descriptive-name]/spec.md`.
|
|
80
83
|
|
|
81
|
-
**
|
|
84
|
+
**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, JIRA-456, etc.) — the name must be descriptive so `/refacil:explore` can find and understand the fix without external context.
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
Content of `spec.md` (Refacil SDD spec layout):
|
|
84
87
|
```markdown
|
|
85
|
-
# [
|
|
88
|
+
# [descriptive-name] Specification
|
|
86
89
|
|
|
87
90
|
## Purpose
|
|
88
|
-
|
|
91
|
+
Fix [clear bug description] to restore expected behavior without introducing regressions.
|
|
89
92
|
|
|
90
93
|
## Requirements
|
|
91
|
-
### Requirement: [
|
|
92
|
-
|
|
94
|
+
### Requirement: [main expected behavior]
|
|
95
|
+
The system SHALL [correct behavior after the fix].
|
|
93
96
|
|
|
94
|
-
#### Scenario: Bug
|
|
95
|
-
- **WHEN** [
|
|
96
|
-
- **THEN**
|
|
97
|
+
#### Scenario: Bug fixed in original condition
|
|
98
|
+
- **WHEN** [condition that previously failed]
|
|
99
|
+
- **THEN** the system SHALL [expected result]
|
|
97
100
|
|
|
98
|
-
#### Scenario:
|
|
99
|
-
- **WHEN** [
|
|
100
|
-
- **THEN**
|
|
101
|
+
#### Scenario: Normal flow remains stable
|
|
102
|
+
- **WHEN** [normal condition]
|
|
103
|
+
- **THEN** the system SHALL [normal behavior without regression]
|
|
101
104
|
```
|
|
102
105
|
|
|
103
|
-
3. **
|
|
106
|
+
3. **Persist review metadata separately**: create `refacil-sdd/specs/[descriptive-name]/review.yaml` with the fields from `.review-passed` plus the Jira links from Step 1.5:
|
|
104
107
|
```yaml
|
|
105
108
|
verdict: APROBADO|APROBADO CON OBSERVACIONES
|
|
106
109
|
date: 2026-04-10T00:00:00.000Z
|
|
@@ -109,83 +112,78 @@ Los bug fixes solo contienen `summary.md` (y opcionalmente `.review-passed`), no
|
|
|
109
112
|
failCount: 0
|
|
110
113
|
blockers: false
|
|
111
114
|
jiraTasks:
|
|
112
|
-
- https://
|
|
115
|
+
- https://your-company.atlassian.net/browse/REF-123
|
|
113
116
|
```
|
|
114
117
|
|
|
115
|
-
4.
|
|
118
|
+
4. Continue to **Step 3**.
|
|
116
119
|
|
|
117
|
-
###
|
|
120
|
+
### Step 2B: Regular change → Archive with native CLI
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
2. Lee `OPENSPEC-DELTAS.md` en `refacil-prereqs` (seccion **archive**).
|
|
121
|
-
3. Sigue OpenSpec con argumento **$ARGUMENTS** (sync de specs segun deltas).
|
|
122
|
+
The spec and review evidence are written **before** running the CLI archive command, while the artifacts are still at their original paths. The CLI only moves the folder — it never syncs specs.
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- Si existe, integra los cambios (ADDED → agregar, MODIFIED → actualizar, REMOVED → eliminar)
|
|
129
|
-
- Si NO existe, crea un spec principal nuevo con nombre descriptivo
|
|
124
|
+
1. **Sync spec to `refacil-sdd/specs/` (before archiving)**:
|
|
125
|
+
- Read `refacil-sdd/changes/<changeName>/specs.md` (and all `.md` under `specs/` if that subfolder exists).
|
|
126
|
+
- Determine the spec folder name: use `<changeName>` unless a more descriptive name is clearly better.
|
|
127
|
+
- If `refacil-sdd/specs/<specName>/spec.md` already exists, integrate the changes (ADDED → add, MODIFIED → update, REMOVED → delete sections).
|
|
128
|
+
- If it does NOT exist, create `refacil-sdd/specs/<specName>/spec.md` with the content derived from `specs.md` (convert acceptance/rejection criteria into Requirements + Scenarios format).
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
- Crea/actualiza `review.yaml` en cada carpeta de spec afectada (`openspec/specs/<spec-name>/review.yaml`).
|
|
135
|
-
- Formato de `review.yaml` (incluye `jiraTasks` del Paso 1.5):
|
|
130
|
+
2. **Persist review evidence (before archiving)**:
|
|
131
|
+
- Read `refacil-sdd/changes/<changeName>/.review-passed` (dotfile — use `ls -la` or read by explicit path, not directory listing).
|
|
132
|
+
- Create/update `refacil-sdd/specs/<specName>/review.yaml` with its fields plus `jiraTasks` from Step 1.5:
|
|
136
133
|
```yaml
|
|
137
134
|
verdict: APROBADO|APROBADO CON OBSERVACIONES
|
|
138
135
|
date: 2026-04-10T00:00:00.000Z
|
|
139
|
-
changeName:
|
|
136
|
+
changeName: change-name
|
|
140
137
|
summary: "..."
|
|
141
138
|
failCount: 0
|
|
142
139
|
blockers: false
|
|
143
140
|
jiraTasks:
|
|
144
|
-
- https://
|
|
145
|
-
- https://tu-empresa.atlassian.net/browse/REF-124
|
|
141
|
+
- https://your-company.atlassian.net/browse/REF-123
|
|
146
142
|
```
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
- If `review.yaml` already exists, update only the fields that changed without removing others.
|
|
144
|
+
|
|
145
|
+
3. **Delete memory.yaml if present** (CA-18): before running the CLI archive, delete `refacil-sdd/changes/<changeName>/memory.yaml` if it exists — run `rm -f "refacil-sdd/changes/<changeName>/memory.yaml"`. This is part of the archive cleanup.
|
|
146
|
+
|
|
147
|
+
4. **Run the CLI archive**: `refacil-sdd-ai sdd archive <changeName>` — this moves the change to `refacil-sdd/changes/archive/<date>-<changeName>/`.
|
|
148
|
+
5. Verify the command completed successfully (exit 0) and the original folder no longer exists.
|
|
150
149
|
|
|
151
|
-
6.
|
|
150
|
+
6. Continue to **Step 3**.
|
|
152
151
|
|
|
153
|
-
|
|
152
|
+
The goal is for `refacil-sdd/specs/` to document how the system works TODAY.
|
|
154
153
|
|
|
155
|
-
###
|
|
154
|
+
### Step 3: Confirm
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
Before showing the summary, run a **final cleanup verification** (applies to both bug fixes and regular changes):
|
|
158
157
|
|
|
159
|
-
- `
|
|
160
|
-
-
|
|
158
|
+
- `refacil-sdd/changes/[original-name]/` **must NOT exist** (only the archived version must survive in `refacil-sdd/changes/archive/...`).
|
|
159
|
+
- If the source folder survived for any reason (failed move, partial copy, interrupted move), explicitly delete it with `rm -rf "refacil-sdd/changes/[original-name]"` before confirming to the user.
|
|
161
160
|
|
|
162
161
|
```
|
|
163
|
-
===
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
Specs
|
|
162
|
+
=== Change archived ===
|
|
163
|
+
Change: [name]
|
|
164
|
+
Type: [Bug fix | Regular change]
|
|
165
|
+
Location: refacil-sdd/changes/archive/[date]-[name]/
|
|
166
|
+
Original folder deleted: YES
|
|
167
|
+
Specs synced: YES
|
|
169
168
|
Tests: PASS
|
|
170
169
|
|
|
171
|
-
|
|
170
|
+
The change has been completed and archived successfully.
|
|
172
171
|
```
|
|
173
172
|
|
|
174
|
-
###
|
|
173
|
+
### Step 4: Recommend pushing the code
|
|
175
174
|
|
|
176
|
-
|
|
175
|
+
After confirming the archiving, recommend the user push the changes to the remote:
|
|
177
176
|
|
|
178
177
|
```
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
The next step is to push the change and create the PR.
|
|
179
|
+
Do you want me to continue with /refacil:up-code?
|
|
181
180
|
```
|
|
182
181
|
|
|
183
|
-
##
|
|
182
|
+
## Rules
|
|
184
183
|
|
|
185
|
-
-
|
|
186
|
-
- **
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
- **
|
|
191
|
-
- Usa modo de salida **conciso** por defecto y **detallado** solo si el usuario lo pide (ver `METHODOLOGY-CONTRACT.md`)
|
|
184
|
+
- Always verify completeness before archiving
|
|
185
|
+
- **Flow continuity**: if the user confirms affirmatively ("yes", "ok", "go", "continue", etc.) the continuity question in Step 4, immediately invoke the **Skill tool** with `skill: "refacil:up-code"`. Do not describe it in text or wait for the user to type `/refacil:up-code`. (See `METHODOLOGY-CONTRACT.md §5`.)
|
|
186
|
+
- Spec synchronization is MANDATORY in the Refacil methodology
|
|
187
|
+
- The `.review-passed` metadata must be persisted separately in YAML (`review.yaml`) inside each spec folder
|
|
188
|
+
- Do not delete artifacts, only move them to archive/ for traceability
|
|
189
|
+
- **The original folder in `refacil-sdd/changes/[name]/` must NOT survive archiving** — neither for bug fixes (Step 2A) nor for regular changes (Step 2B). Use `git mv` or `mv` (not `cp -r`) and verify explicitly. If residue remains, delete it with `rm -rf` before Step 3.
|
package/skills/ask/SKILL.md
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refacil:ask
|
|
3
|
-
description:
|
|
4
|
-
user-invocable: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# refacil:ask —
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
###
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
@<
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**
|
|
27
|
-
|
|
28
|
-
###
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
###
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
**
|
|
46
|
-
```bash
|
|
47
|
-
refacil-sdd-ai bus ask --to <
|
|
48
|
-
```
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
**
|
|
55
|
-
```bash
|
|
56
|
-
refacil-sdd-ai bus ask --to <
|
|
57
|
-
```
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
###
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
###
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
##
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: refacil:ask
|
|
3
|
+
description: Ask something directed to another session on the bus. Optionally blocks waiting for the response (--wait N seconds) for automatic LLM-to-LLM flow.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# refacil:ask — Directed question to another session
|
|
8
|
+
|
|
9
|
+
Sends a directed question to a session in the room, or to **all other sessions** in the room with `@all` (aliases: `*`, `everyone`). **$ARGUMENTS** includes `@<destination>` and the text.
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
### Step 1: Identify destination and text
|
|
14
|
+
|
|
15
|
+
Expected format of $ARGUMENTS:
|
|
16
|
+
```
|
|
17
|
+
@<session-name> "question..."
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Extract:
|
|
21
|
+
- `destination`: session name without the `@`
|
|
22
|
+
- `text`: the question
|
|
23
|
+
|
|
24
|
+
If the destination is not clear, use `/refacil:rooms` (via `refacil-sdd-ai bus rooms`) to list active sessions and ask the user for clarification.
|
|
25
|
+
|
|
26
|
+
**Directed broadcast (`@all`)**: the broker emits an `ask` for each member (except the asker), same `correlationId`. Each receiver can `/refacil:reply` on their side. With `--wait`, the CLI returns **the first** response that arrives (does not wait for all).
|
|
27
|
+
|
|
28
|
+
### Step 1.5: Informational question vs. change request (in the destination repo)
|
|
29
|
+
|
|
30
|
+
Whoever is in the room arrived via **`/refacil:join`** (and the repo with Refacil methodology): **they already know SDD-AI**; **no need** to paste the guide or re-explain what `/refacil:propose` is. It is enough that the message is **clear in scope and criteria** so the other agent runs **their** flow (`propose`, `apply`, etc.) without improvising patches.
|
|
31
|
+
|
|
32
|
+
Before drafting the `--text`, classify what you are going to ask `@<destination>`:
|
|
33
|
+
|
|
34
|
+
| Type | Examples | How to draft the `ask` |
|
|
35
|
+
|------|----------|------------------------|
|
|
36
|
+
| **Information only** | "What payload does Z send?", "Where is the X handler?" | Concrete question. |
|
|
37
|
+
| **Change request** in the **destination repo** | "Add field W to the contract", "Fix the bug in the service that lives in your repo", "Align the consumer with the spec" | Describe **what** must be achieved, **where** it applies, acceptance criteria or links to spec/conversation. The recipient channels that with **`/refacil:propose`** (and what follows) in **their** repo; do not ask for "just a quick change" when the impact is versionable code, unless the **human user** explicitly orders otherwise. |
|
|
38
|
+
|
|
39
|
+
If you mix query + change, separate into two messages or make clear which part is read-only and which is versionable work in the other repo.
|
|
40
|
+
|
|
41
|
+
### Step 2: Decide whether to use `--wait`
|
|
42
|
+
|
|
43
|
+
Two modes:
|
|
44
|
+
|
|
45
|
+
**Blocking mode (recommended when you need the response to continue)**:
|
|
46
|
+
```bash
|
|
47
|
+
refacil-sdd-ai bus ask --to <destination> --text "<question>" --wait 180
|
|
48
|
+
```
|
|
49
|
+
- The CLI blocks until it receives the response or the timeout passes (default suggested: 60-180s)
|
|
50
|
+
- If the other side is in `/refacil:attend`, the response comes back automatically
|
|
51
|
+
- If the response arrives: the CLI prints it and you can continue with that info
|
|
52
|
+
- If timeout: notify the user and suggest `/refacil:inbox` later
|
|
53
|
+
|
|
54
|
+
**Fire-and-forget mode**:
|
|
55
|
+
```bash
|
|
56
|
+
refacil-sdd-ai bus ask --to <destination> --text "<question>"
|
|
57
|
+
```
|
|
58
|
+
- Does not block; returns immediately after sending
|
|
59
|
+
- Use it when you do not know if the other side is active or you do not need the response now
|
|
60
|
+
|
|
61
|
+
### Step 3: Execute
|
|
62
|
+
|
|
63
|
+
Use `Bash` with the chosen command.
|
|
64
|
+
|
|
65
|
+
### Step 4: Process result
|
|
66
|
+
|
|
67
|
+
- If `--wait` brought a response: use it as context to continue your work; do not just report the message, continue with the flow the user asked for.
|
|
68
|
+
- If `--wait` expired: inform the user and propose `/refacil:inbox` to review later.
|
|
69
|
+
- If fire-and-forget: confirm to the user that it was sent.
|
|
70
|
+
|
|
71
|
+
## Rules
|
|
72
|
+
|
|
73
|
+
- Correctly quote the question text.
|
|
74
|
+
- If the text has quotes, escape them with `\`.
|
|
75
|
+
- Never send secrets, tokens, or sensitive data — the bus persists messages 7 days on local disk.
|
|
76
|
+
- If the destination does not exist in the room, the message is stored in `inbox.jsonl` and will be delivered when they join.
|
|
77
|
+
- If you **agreed** with another session that they will change their repo, they must use **`/refacil:propose`** there and **notify you via bus** when done; if they request changes from you, you do the same here. Full convention: `refacil-prereqs/BUS-CROSS-REPO.md`.
|
|
78
|
+
- **`ask`s that are change requests** must be **substantive in scope** (Step 1.5): the recipient already uses the methodology; do not repeat the guide in the text. Do not use the bus to request opaque quick fixes when the impact requires SDD-AI.
|