@lifeaitools/rdc-skills 0.37.9 → 0.37.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rdc",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.10",
|
|
4
4
|
"description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LIFEAI",
|
package/clauth-plugin.json
CHANGED
package/git-sha.json
CHANGED
|
@@ -385,6 +385,19 @@ async function preToolUse(raw) {
|
|
|
385
385
|
const command = raw.tool_input?.command || '';
|
|
386
386
|
if (!command.includes('git commit')) return process.exit(0);
|
|
387
387
|
|
|
388
|
+
// Scope guard (2026-10-01, Dave, direct instruction): this gate exists for
|
|
389
|
+
// the RDC/regen-root work-item contract, not for every git repo on the box.
|
|
390
|
+
// Same pattern as no-stop-open-epics.js's PROJECT_SCOPE check — a commit
|
|
391
|
+
// outside the configured scope (default 'regen-root') is none of this
|
|
392
|
+
// hook's business and must not be fail-closed into requiring an RDC work
|
|
393
|
+
// item it has no way to reference.
|
|
394
|
+
const scope = process.env.RDC_PROJECT_SCOPE || 'regen-root';
|
|
395
|
+
const cwd = (raw.cwd || process.cwd()).replace(/\\/g, '/').toLowerCase();
|
|
396
|
+
if (!cwd.includes(scope.toLowerCase())) {
|
|
397
|
+
hookLog('require-work-item', 'PreToolUse', 'pass-out-of-scope', { cwd, scope });
|
|
398
|
+
return process.exit(0);
|
|
399
|
+
}
|
|
400
|
+
|
|
388
401
|
if (!(await requiresWorkItemNow())) {
|
|
389
402
|
hookLog('require-work-item', 'PreToolUse', 'pass-flow-exempt', {});
|
|
390
403
|
return process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifeaitools/rdc-skills",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.10",
|
|
4
4
|
"description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "plugin",
|
|
20
20
|
"skills": "skills/",
|
|
21
21
|
"guides": "guides/",
|
|
22
|
-
"version": "0.37.
|
|
22
|
+
"version": "0.37.10",
|
|
23
23
|
"commands": "commands/"
|
|
24
24
|
},
|
|
25
25
|
"bin": {
|
|
@@ -163,12 +163,24 @@ function runHook(payload, extraEnv = {}) {
|
|
|
163
163
|
const flowState = join(fakeHome, 'flow.json');
|
|
164
164
|
const modeState = join(fakeHome, 'mode.json');
|
|
165
165
|
try {
|
|
166
|
-
|
|
166
|
+
// RDC_PROJECT_SCOPE pinned explicitly, not inherited: an ambient shell
|
|
167
|
+
// that has it set (e.g. a session mid-scoped to a non-regen-root project)
|
|
168
|
+
// would otherwise silently change what "in scope" means for every case
|
|
169
|
+
// below.
|
|
170
|
+
const preEnv = {
|
|
171
|
+
HOME: fakeHome, USERPROFILE: fakeHome, RDC_FLOW_STATE: flowState, RDC_MODE_STATE: modeState,
|
|
172
|
+
RDC_PROJECT_SCOPE: 'regen-root',
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// These cases exercise flow-gating, not scope — pin cwd inside the RDC
|
|
176
|
+
// scope so the scope guard below never interferes.
|
|
177
|
+
const IN_SCOPE_CWD = 'C:/Dev/regen-root.wt/fixture-lane';
|
|
167
178
|
|
|
168
179
|
// No flow declared -> fail-closed default -> requires a work item -> BLOCK.
|
|
169
180
|
const blocked = runHook({
|
|
170
181
|
hook_event_name: 'PreToolUse',
|
|
171
182
|
tool_name: 'Bash',
|
|
183
|
+
cwd: IN_SCOPE_CWD,
|
|
172
184
|
tool_input: { command: 'git commit -m "no convention and no uuid"' },
|
|
173
185
|
}, preEnv);
|
|
174
186
|
assert('pre: no-flow-declared BLOCKS (was: warn, never blocked)',
|
|
@@ -178,6 +190,7 @@ function runHook(payload, extraEnv = {}) {
|
|
|
178
190
|
const ok = runHook({
|
|
179
191
|
hook_event_name: 'PreToolUse',
|
|
180
192
|
tool_name: 'Bash',
|
|
193
|
+
cwd: IN_SCOPE_CWD,
|
|
181
194
|
tool_input: { command: 'git commit -m "feat(x): conventional"' },
|
|
182
195
|
}, preEnv);
|
|
183
196
|
assert('pre: conventional passes silently even when required', ok.status === 0 && ok.stdout.trim() === '', ok.stdout);
|
|
@@ -187,9 +200,23 @@ function runHook(payload, extraEnv = {}) {
|
|
|
187
200
|
const exempt = runHook({
|
|
188
201
|
hook_event_name: 'PreToolUse',
|
|
189
202
|
tool_name: 'Bash',
|
|
203
|
+
cwd: IN_SCOPE_CWD,
|
|
190
204
|
tool_input: { command: 'git commit -m "no convention and no uuid"' },
|
|
191
205
|
}, preEnv);
|
|
192
206
|
assert('pre: plan flow exempts silently', exempt.status === 0 && exempt.stdout.trim() === '', exempt.stdout);
|
|
207
|
+
|
|
208
|
+
// Scope guard (2026-10-01): a commit outside RDC_PROJECT_SCOPE is none of
|
|
209
|
+
// this hook's business, even with no flow declared at all — it must pass
|
|
210
|
+
// silently rather than fail-closed into demanding a work item it has no
|
|
211
|
+
// way to reference.
|
|
212
|
+
const outOfScope = runHook({
|
|
213
|
+
hook_event_name: 'PreToolUse',
|
|
214
|
+
tool_name: 'Bash',
|
|
215
|
+
cwd: 'C:/Dev/fullstack-agent',
|
|
216
|
+
tool_input: { command: 'git commit -m "no convention and no uuid"' },
|
|
217
|
+
}, preEnv);
|
|
218
|
+
assert('pre: out-of-scope cwd passes silently regardless of flow',
|
|
219
|
+
outOfScope.status === 0 && outOfScope.stdout.trim() === '', outOfScope.stdout);
|
|
193
220
|
} finally {
|
|
194
221
|
rmSync(fakeHome, { recursive: true, force: true });
|
|
195
222
|
}
|