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/verify/SKILL.md
CHANGED
|
@@ -1,132 +1,159 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refacil:verify
|
|
3
|
-
description:
|
|
4
|
-
user-invocable: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# refacil:verify — Entrypoint
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
###
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
3.
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: refacil:verify
|
|
3
|
+
description: Validate that the implementation meets the specs — builds a briefing with testCommand and CA/CR criteria, delegates to the refacil-validator sub-agent for the report, and handles corrections with user approval
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# refacil:verify — Verification Entrypoint
|
|
8
|
+
|
|
9
|
+
This skill is a **wrapper** that builds a **structured briefing** with the test command and criteria already extracted, delegates the analysis to the `refacil-validator` sub-agent, and handles the interaction with the user to apply corrections.
|
|
10
|
+
|
|
11
|
+
**Prerequisites**: `sdd` profile from `refacil-prereqs/SKILL.md` + rules from `METHODOLOGY-CONTRACT.md`.
|
|
12
|
+
|
|
13
|
+
## Flow
|
|
14
|
+
|
|
15
|
+
### Step 0: Resolve scope
|
|
16
|
+
|
|
17
|
+
Determine the scope before invoking the sub-agent. Prioritize in this order:
|
|
18
|
+
1. User argument (`$ARGUMENTS`).
|
|
19
|
+
2. Active change in `refacil-sdd/changes/`.
|
|
20
|
+
3. If there are multiple active changes and no `$ARGUMENTS`, **stop** and ask the user to explicitly select which change to validate.
|
|
21
|
+
|
|
22
|
+
Do not invoke the sub-agent with ambiguous scope.
|
|
23
|
+
|
|
24
|
+
If you already have a `changeName`, run `refacil-sdd-ai sdd status <changeName> --json` to verify that the artifacts exist (`artifacts.proposal`, `artifacts.tasks`, `artifacts.specs` = true). If critical artifacts are missing, inform the user before continuing.
|
|
25
|
+
|
|
26
|
+
### Step 0.5: Hidden files under `refacil-sdd/changes/` (avoid false negatives)
|
|
27
|
+
|
|
28
|
+
If **this session** inspects the change directory before or after delegating, apply **`refacil-prereqs/METHODOLOGY-CONTRACT.md` §8**.
|
|
29
|
+
|
|
30
|
+
### Step 0.6: Verify validator agent is installed (blocking — CA-12)
|
|
31
|
+
|
|
32
|
+
Before doing anything else, check that `.claude/agents/refacil-validator.md` exists (read by explicit path or `ls -la .claude/agents/refacil-validator.md`).
|
|
33
|
+
|
|
34
|
+
**If the file does NOT exist**, stop immediately:
|
|
35
|
+
```
|
|
36
|
+
El agente `refacil-validator` no está instalado. Ejecuta `/refacil:update` y reinicia la sesión antes de volver a correr `/refacil:verify`.
|
|
37
|
+
```
|
|
38
|
+
Do not continue and do not escalate to any other agent.
|
|
39
|
+
|
|
40
|
+
### Step 1: Build briefing for the sub-agent (reduces validator tool calls)
|
|
41
|
+
|
|
42
|
+
Before invoking the sub-agent, extract the context that the validator would otherwise calculate on its own:
|
|
43
|
+
|
|
44
|
+
1. **Test command** — read `refacil-prereqs/METHODOLOGY-CONTRACT.md` §3. Extract the exact command.
|
|
45
|
+
|
|
46
|
+
2. **CA/CR criteria** — if there is an active change, read the specification in `refacil-sdd/changes/<changeName>/`:
|
|
47
|
+
- `specs.md` if it exists, and/or files under `specs/` (recursively).
|
|
48
|
+
- Extract the list of CA-XX (acceptance criteria) and CR-XX (rejection criteria) with their descriptions.
|
|
49
|
+
- If there are no specs or the scope is `git-diff`, omit this field.
|
|
50
|
+
|
|
51
|
+
3. **Scope files** — run `git diff --name-only HEAD` to get the files modified in this change.
|
|
52
|
+
|
|
53
|
+
4. **Cross-skill memory** — if `changeName` is not null and `refacil-sdd/changes/<changeName>/memory.yaml` exists, read it and extract:
|
|
54
|
+
- `commandsRun` — the test command(s) already executed by the tester. Include in the briefing so the validator uses the same command without re-discovering it.
|
|
55
|
+
- `criteriaRun` — the CA-XX/CR-XX already tested. Include in the briefing so the validator can skip re-reading specs for those criteria.
|
|
56
|
+
If the file does not exist, omit these fields — do not block (CR-04).
|
|
57
|
+
|
|
58
|
+
Build the BRIEFING block:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
BRIEFING:
|
|
62
|
+
changeName: <name or null if scope=git-diff>
|
|
63
|
+
testCommand: <exact command>
|
|
64
|
+
criteria:
|
|
65
|
+
acceptance:
|
|
66
|
+
- CA-01: <description>
|
|
67
|
+
- CA-02: <description>
|
|
68
|
+
rejection:
|
|
69
|
+
- CR-01: <description>
|
|
70
|
+
changedFiles: [path/file-1.ts, ...]
|
|
71
|
+
mode: concise | detailed
|
|
72
|
+
commandsRun: [<command>, ...] # from memory.yaml — omit if not present
|
|
73
|
+
criteriaRun: [CA-01, CR-01, ...] # from memory.yaml — omit if not present
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 2: Delegate to the refacil-validator sub-agent
|
|
77
|
+
|
|
78
|
+
Invoke `refacil-validator` passing it the BRIEFING from the previous step.
|
|
79
|
+
|
|
80
|
+
The sub-agent:
|
|
81
|
+
- Uses `testCommand` from the briefing directly (without looking it up in METHODOLOGY-CONTRACT.md).
|
|
82
|
+
- Uses `criteria` from the briefing for verification (without re-reading specs from scratch).
|
|
83
|
+
- Uses `changedFiles` to focus the 3D verification on those files.
|
|
84
|
+
- Applies the 3D framework (Completeness/Correctness/Coherence) directly.
|
|
85
|
+
- Runs the tests and verifies coverage.
|
|
86
|
+
- Optionally consults the bus cross-repo for ambiguities.
|
|
87
|
+
- Returns combined report + JSON block fenced as ` ```refacil-verify-result `.
|
|
88
|
+
|
|
89
|
+
### Step 3: Present the report
|
|
90
|
+
|
|
91
|
+
Show the user the **combined report** (everything before the `refacil-verify-result` block). Do not show the JSON block — it is internal metadata.
|
|
92
|
+
|
|
93
|
+
**If the sub-agent failed to load** (tool error, agent type not found, or no response at all): stop immediately and do NOT escalate to any other agent:
|
|
94
|
+
```
|
|
95
|
+
The validator sub-agent could not be loaded — retry or run `/refacil:verify` again.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**If the sub-agent responded but without a `refacil-verify-result` block** (unstructured output): show the raw report and stop:
|
|
99
|
+
```
|
|
100
|
+
The validator returned an unstructured report — continue manually.
|
|
101
|
+
```
|
|
102
|
+
Do not re-invoke a different agent.
|
|
103
|
+
|
|
104
|
+
**If the sub-agent returned a scope error** (`SCOPE_ERROR: <reason>`, without JSON block): propagate to the user and ask for clarification. This is NOT the CA-01 failsafe — the agent loaded correctly but found an ambiguous scope.
|
|
105
|
+
|
|
106
|
+
### Step 4: Process the result
|
|
107
|
+
|
|
108
|
+
Parse the ` ```refacil-verify-result ` block from the sub-agent.
|
|
109
|
+
|
|
110
|
+
#### If `result` is APPROVED:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
RESULT: APPROVED
|
|
114
|
+
|
|
115
|
+
The next step is the quality review with the team checklist.
|
|
116
|
+
Do you want me to continue with `/refacil:review`?
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### If `result` is REQUIRES_CORRECTIONS:
|
|
120
|
+
|
|
121
|
+
Present the issues and ask:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
RESULT: REQUIRES_CORRECTIONS
|
|
125
|
+
|
|
126
|
+
Required corrections:
|
|
127
|
+
1. [CRITICAL/WARNING] [description] — [suggested fix]
|
|
128
|
+
2. ...
|
|
129
|
+
|
|
130
|
+
Do you want me to apply these corrections? (yes/no)
|
|
131
|
+
- Yes: I will apply the fixes and automatically re-verify
|
|
132
|
+
- No: you can fix them manually and then continue with /refacil:verify
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 5: Apply corrections (if the user accepts)
|
|
136
|
+
|
|
137
|
+
**Only apply fixes after explicit user approval.**
|
|
138
|
+
|
|
139
|
+
1. Apply ONLY the listed corrections — do not add new functionality, do not refactor unrelated code.
|
|
140
|
+
2. If there are tests that need adjustment, adjust them as well.
|
|
141
|
+
3. Show summary of modified files.
|
|
142
|
+
4. **Automatically re-run from Step 2** (re-invoke the sub-agent with the same briefing) to confirm the corrections resolved the issues.
|
|
143
|
+
5. Maximum **2 rounds** of automatic correction. If issues persist, list them for manual correction.
|
|
144
|
+
|
|
145
|
+
**If the user does not accept:** list the issues for manual correction. Suggest `/refacil:verify` again.
|
|
146
|
+
|
|
147
|
+
## Rules
|
|
148
|
+
|
|
149
|
+
- **Always build the briefing (Step 1) before delegating** — reduces the sub-agent tool calls.
|
|
150
|
+
- **Always delegate to the sub-agent** for the analysis. Do not replicate spec reading or test execution logic here.
|
|
151
|
+
- **Dotfiles in `refacil-sdd/changes/`**: never assert absence of `.review-passed` without `-a`; see §8.
|
|
152
|
+
- **Corrections are ONLY applied by this wrapper** (Step 5), after explicit approval.
|
|
153
|
+
- **Corrections must be surgical**: only what is necessary to resolve the reported issues.
|
|
154
|
+
- Maximum 2 rounds of automatic correction before escalating to manual.
|
|
155
|
+
- **Sub-agent failsafe (CA-01)**: if the validator fails to load (tool error) or returns no response — stop and inform the user. Do NOT escalate to any other agent.
|
|
156
|
+
- **Unstructured output (CA-02)**: if the validator responds but without a `refacil-verify-result` block — show the raw report and stop. Do NOT re-invoke another agent.
|
|
157
|
+
- **SCOPE_ERROR (CR-03)**: if the validator returns `SCOPE_ERROR: <reason>` — propagate and ask for clarification. CA-01 does NOT apply here.
|
|
158
|
+
- **Agent missing (CA-12)**: checked in Step 0.6 — stop before delegating if `.claude/agents/refacil-validator.md` is absent.
|
|
159
|
+
- **Flow continuity**: if the result is APPROVED and the user confirms affirmatively, immediately invoke the **Skill tool** with `skill: "refacil:review"`. (See `METHODOLOGY-CONTRACT.md §5`.)
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<!-- AUTO-
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
**
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
**Git (via Bash)**
|
|
20
|
-
-
|
|
21
|
-
- Diffs:
|
|
22
|
-
- Status: `git status -s` (short format).
|
|
23
|
-
- Show: `git show --stat`
|
|
24
|
-
|
|
25
|
-
**Tests**
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
**Logs
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
**Build
|
|
36
|
-
- `tsc`, `eslint`, `biome`:
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
**Docker
|
|
41
|
-
- `docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"`.
|
|
42
|
-
- `docker logs --tail 100`
|
|
43
|
-
|
|
44
|
-
**
|
|
45
|
-
|
|
1
|
+
<!-- AUTO-GENERATED by refacil-sdd-ai. Do not edit between markers; content is refreshed every session. -->
|
|
2
|
+
|
|
3
|
+
## Token efficiency
|
|
4
|
+
|
|
5
|
+
Rules to minimize context consumption when working in this repository.
|
|
6
|
+
|
|
7
|
+
**File reading**
|
|
8
|
+
- Use `Read` with `offset` and `limit` when you know the relevant area of the file.
|
|
9
|
+
- Do not read files longer than 500 lines in full; segment by range.
|
|
10
|
+
- To discover repo structure: use `Glob` instead of `ls -R` or `find`.
|
|
11
|
+
- Do not re-read the entire file if you already read the relevant block; continue from that context.
|
|
12
|
+
- Before reading a long file, locate symbols with search and then read only candidate ranges.
|
|
13
|
+
|
|
14
|
+
**Search**
|
|
15
|
+
- Use `Grep` with `head_limit` instead of raw dumps.
|
|
16
|
+
- When you only need locations, use `output_mode: "files_with_matches"`.
|
|
17
|
+
- Always narrow with `glob` or `type` to avoid over-scanning.
|
|
18
|
+
|
|
19
|
+
**Git (via Bash)**
|
|
20
|
+
- History: `git log --oneline -20` by default; expand only if insufficient.
|
|
21
|
+
- Diffs: start with `git diff --stat`; request the full diff only for the file you are about to touch.
|
|
22
|
+
- Status: `git status -s` (short format).
|
|
23
|
+
- Show: `git show --stat` before the full show.
|
|
24
|
+
|
|
25
|
+
**Tests**
|
|
26
|
+
- Report only failures; do not enumerate passes in visible output.
|
|
27
|
+
- If the runner has a silent or summary mode (`jest --silent --reporters=summary`, `pytest -q`), use it.
|
|
28
|
+
- If the runner is verbose by default, redirect: `2>&1 | tail -80`.
|
|
29
|
+
|
|
30
|
+
**Logs and errors**
|
|
31
|
+
- Do not paste full stack traces; extract only the relevant frame with the message.
|
|
32
|
+
- Summarize repeated logs: "(N occurrences of <message>)".
|
|
33
|
+
- For log files: `tail -100` or filter by ERROR/WARN level.
|
|
34
|
+
|
|
35
|
+
**Build and lint**
|
|
36
|
+
- `tsc`, `eslint`, `biome`: group errors by file or by rule; do not enumerate line by line.
|
|
37
|
+
- Successful build: confirm with a single line, do not paste the full output.
|
|
38
|
+
- If there are many similar errors: show one example and the count.
|
|
39
|
+
|
|
40
|
+
**Docker and containers**
|
|
41
|
+
- `docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"`.
|
|
42
|
+
- `docker logs --tail 100` always; never full logs.
|
|
43
|
+
|
|
44
|
+
**General rule**
|
|
45
|
+
When in doubt between verbosity and conciseness, choose conciseness. The user can request detail on demand.
|
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
Full project instructions: see `AGENTS.md`. If missing, run `/refacil:setup`.
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## SDD-AI Methodology
|
|
4
4
|
|
|
5
|
-
Skills
|
|
5
|
+
Skills are identical in `.claude/skills/refacil-*/` (Claude Code) and `.cursor/skills/refacil-*/` (Cursor). Installed by `refacil-sdd-ai init`.
|
|
6
6
|
|
|
7
|
-
|
|
|
7
|
+
| Command | Description |
|
|
8
8
|
|---------|-------------|
|
|
9
|
-
| `/refacil:setup` |
|
|
10
|
-
| `/refacil:guide` |
|
|
11
|
-
| `/refacil:explore` |
|
|
12
|
-
| `/refacil:propose` |
|
|
13
|
-
| `/refacil:apply` |
|
|
14
|
-
| `/refacil:test` |
|
|
15
|
-
| `/refacil:verify` |
|
|
16
|
-
| `/refacil:review` |
|
|
17
|
-
| `/refacil:archive` |
|
|
18
|
-
| `/refacil:up-code` |
|
|
19
|
-
| `/refacil:bug` |
|
|
20
|
-
| `/refacil:update` |
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
| `/refacil:setup` | Generate `AGENTS.md`, `.agents/`, `refacil-sdd/changes/`, and IDE index files for the project |
|
|
10
|
+
| `/refacil:guide` | Interactive guide — which command to use |
|
|
11
|
+
| `/refacil:explore` | Explore the codebase without changes |
|
|
12
|
+
| `/refacil:propose` | Create a change proposal |
|
|
13
|
+
| `/refacil:apply` | Implement change tasks |
|
|
14
|
+
| `/refacil:test` | Generate unit tests |
|
|
15
|
+
| `/refacil:verify` | Validate implementation vs specs |
|
|
16
|
+
| `/refacil:review` | Quality checklist review |
|
|
17
|
+
| `/refacil:archive` | Archive a completed change |
|
|
18
|
+
| `/refacil:up-code` | Push code and create PR |
|
|
19
|
+
| `/refacil:bug` | Guided bugfix flow |
|
|
20
|
+
| `/refacil:update` | Apply pending **methodology** migrations (same engine as `notify-update`; e.g. `AGENTS.md` → `.agents/` index pattern) |
|
|
21
|
+
|
|
22
|
+
**Typical feature flow:** `setup` → `explore` (optional) → `propose` → `apply` → `test` → `verify` → `review` → `archive` → `up-code`.
|
|
23
|
+
|
|
24
|
+
**Bug flow:** `bug` replaces `propose`/`apply` for the fix path; then `test` / `review` / `archive` / `up-code` as appropriate (see skill `refacil:bug`).
|
|
25
|
+
|
|
26
|
+
**Legacy layout:** if the repo still has **`openspec/changes/`**, run any **`refacil-sdd-ai sdd …`** command or open a session ( **`check-update`** ) to migrate into **`refacil-sdd/`**; then remove **`openspec/`** when no longer referenced. Optional OpenSpec CLI (**`opsx:*`**) may coexist; SDD-AI uses **`refacil-sdd/`** and **`/refacil:*`** as the primary interface.
|
|
27
|
+
|
|
28
|
+
## Inter-agent bus (refacil-bus)
|
|
29
|
+
|
|
30
|
+
Local plain-text channel between Claude Code / Cursor sessions running in different repos. Prevents the developer from manually transcribing context between their own agents.
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
29
33
|
|---------|-------------|
|
|
30
|
-
| `/refacil:join <
|
|
31
|
-
| `/refacil:say "..."` |
|
|
32
|
-
| `/refacil:ask @
|
|
33
|
-
| `/refacil:reply "..."` |
|
|
34
|
-
| `/refacil:attend` |
|
|
35
|
-
| `/refacil:inbox` |
|
|
34
|
+
| `/refacil:join <room>` | Create or join a room. First time generates an introduction block in `AGENTS.md`. |
|
|
35
|
+
| `/refacil:say "..."` | Broadcast to the entire room. |
|
|
36
|
+
| `/refacil:ask @name "..." [--wait N]` | Directed question; `@all` (or `*`) asks everyone in the room. `--wait N` blocks until the first response or N sec. |
|
|
37
|
+
| `/refacil:reply "..."` | Reply to the last directed question (auto-fills `correlationId`). |
|
|
38
|
+
| `/refacil:attend` | Active listen mode: receives questions and the LLM answers them, then re-invokes to keep listening. |
|
|
39
|
+
| `/refacil:inbox` | View new messages since the last read. |
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
Typical usage: before starting a task that may require context from other repos, the developer puts the agent in each other repo into `/refacil:attend`. Then, in their working repo, the LLM can request context with `/refacil:ask @<repo> "..." --wait` and receive the response automatically without the developer switching between windows.
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
If changes affecting a repo are agreed upon in the room, the SDD-AI flow (`/refacil:propose`, etc.) is followed in that repo and the implementer **notifies via the bus** when done (details in `refacil-prereqs/BUS-CROSS-REPO.md` in the package). **`ask` requests that involve work** in another repo must include **clear scope**; the destination uses **`/refacil:propose`** by convention. See skill `/refacil:ask`.
|
|
40
44
|
|
|
41
|
-
CLI
|
|
45
|
+
Useful CLI for the developer: `refacil-sdd-ai bus view` (opens web UI in browser), `bus watch <session>` (terminal panel), `bus status`, `bus rooms`. These do not consume tokens.
|
|
42
46
|
|
|
43
|
-
##
|
|
47
|
+
## Project documentation structure
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
`AGENTS.md`
|
|
47
|
-
`CLAUDE.md`
|
|
49
|
+
Project detail lives in `.agents/` — one `.md` file per area (summary, architecture, stack, testing, commands...).
|
|
50
|
+
`AGENTS.md` is the index: one line per file indicating what it contains and when to read it.
|
|
51
|
+
`CLAUDE.md` and `.cursorrules` are minimal indices that only point to `AGENTS.md` — they contain no project detail.
|
|
48
52
|
|
|
49
|
-
##
|
|
53
|
+
## Token efficiency (automatic)
|
|
50
54
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
+
- The `check-update` hook at `SessionStart` syncs the `compact-guidance` block in `AGENTS.md`.
|
|
56
|
+
- The block defines compact output rules (range reads, bounded searches, summarized test/log output).
|
|
57
|
+
- If `AGENTS.md` does not exist yet, the sync is skipped without error.
|
|
58
|
+
- Do not manually edit content between the `compact-guidance` markers; it is overwritten automatically.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# OpenSpec Configuration Template — Equipo Refacil
|
|
2
|
-
# Copiar a openspec/config.yaml despues de ejecutar openspec init
|
|
3
|
-
|
|
4
|
-
# Idioma: español para artefactos, terminos tecnicos en ingles
|
|
5
|
-
language: spanish
|
|
6
|
-
|
|
7
|
-
# Las skills refacil:* usan la estructura de OpenSpec por debajo
|
|
8
|
-
# No es necesario modificar el schema default (spec-driven)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Deltas Refacil sobre OpenSpec
|
|
2
|
-
|
|
3
|
-
Lee este archivo **ademas** de la skill `openspec-*` que indique el comando `refacil:*`. No sustituye a OpenSpec; solo fija convenciones del equipo.
|
|
4
|
-
|
|
5
|
-
**Ubicacion en el repo:** mismo directorio que `SKILL.md` de `refacil-prereqs` (`.claude/skills/refacil-prereqs/` o `.cursor/skills/refacil-prereqs/`).
|
|
6
|
-
|
|
7
|
-
## Idioma (todas las delegaciones)
|
|
8
|
-
|
|
9
|
-
- Respuestas al usuario y artefactos bajo `openspec/`: **español**; terminos tecnicos (API, REST, nombres de tipos, etc.) en **ingles**.
|
|
10
|
-
|
|
11
|
-
## propose — `openspec-propose`
|
|
12
|
-
|
|
13
|
-
- **Nombre de carpeta del cambio** (`openspec/changes/<nombre>/`): cumplir **`METHODOLOGY-CONTRACT.md` §9** — el primer caracter **debe** ser letra ASCII; **prohibido** crear el cambio con nombre que empiece por digito (incluye prefijos tipo `YYYY-MM-DD-...`). El CLI OpenSpec falla con esos nombres (`openspec status --change`, etc.). Fijar o validar el slug **antes** de generar artefactos.
|
|
14
|
-
- Criterios de aceptacion: formato **Dado / Cuando / Entonces**.
|
|
15
|
-
- Incluir **criterios de rechazo** (edge cases) en specs.
|
|
16
|
-
- Tasks con estimacion de esfuerzo **S / M / L**.
|
|
17
|
-
- Design alineado a **patrones existentes** del repo (desde `AGENTS.md` o exploracion acotada).
|
|
18
|
-
|
|
19
|
-
### Specs: archivo unico vs arbol `specs/` (compatibilidad Refacil)
|
|
20
|
-
|
|
21
|
-
OpenSpec puede indicar `specs/**/*.md` y crear **un archivo por capability** (ej. `specs/product-amount-percentile/spec.md`). Los comandos **refacil:*** deben soportar **ambas** formas:
|
|
22
|
-
|
|
23
|
-
| Forma | Validacion |
|
|
24
|
-
|-------|------------|
|
|
25
|
-
| **A** | `specs.md` en la raiz del cambio (`openspec/changes/<id>/specs.md`) |
|
|
26
|
-
| **B** | Sin `specs.md`, pero existe al menos un `.md` bajo `openspec/changes/<id>/specs/` (recursivo) |
|
|
27
|
-
|
|
28
|
-
- **Si OpenSpec solo genera B:** no es error. **No hace falta** duplicar obligatoriamente en `specs.md` salvo que el equipo quiera un indice unico para humanos.
|
|
29
|
-
- **Si coexisten A y B:** lee **ambos**; si hay contradiccion clara entre `specs.md` y los fragmentos, **pregunta al usuario** cual manda antes de `apply`.
|
|
30
|
-
- Al cerrar **propose**, en el resumen de revision lista **todas** las rutas de spec (archivo raiz y/o cada `specs/**.md`).
|
|
31
|
-
|
|
32
|
-
## apply — `openspec-apply-change`
|
|
33
|
-
|
|
34
|
-
- Respetar **estrictamente** `AGENTS.md`.
|
|
35
|
-
- No agregar funcionalidad fuera del alcance de las specs aprobadas.
|
|
36
|
-
- No refactorizar codigo no relacionado con el cambio.
|
|
37
|
-
- Si una task es ambigua, **preguntar** antes de implementar.
|
|
38
|
-
- **Especificacion**: aplica la tabla del Paso 0 de `refacil:apply` (`specs.md` y/o `specs/**/*.md`); no asumas que solo existe `specs.md` en la raiz.
|
|
39
|
-
|
|
40
|
-
## archive — `openspec-archive-change`
|
|
41
|
-
|
|
42
|
-
- Si OpenSpec pregunta si sincronizar specs delta a `openspec/specs/`: responder **SI**. La sincronizacion es **obligatoria** en esta metodologia.
|
|
43
|
-
|
|
44
|
-
## explore — `openspec-explore`
|
|
45
|
-
|
|
46
|
-
- Solo lectura; no modificar archivos ni generar codigo.
|
|
47
|
-
- Enriquecer el informe con puntos de `AGENTS.md` relevantes al tema explorado (ya indicado en la skill `refacil:explore`).
|
|
48
|
-
|
|
49
|
-
## verify — `openspec-verify-change`
|
|
50
|
-
|
|
51
|
-
- Sin reglas extra sobre OpenSpec: aplica solo el bloque **Idioma** de arriba a informes y mensajes al usuario.
|