@lifeaitools/rdc-skills 0.37.9 → 0.37.11

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.9",
3
+ "version": "0.37.11",
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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": "lifeai.plugin.v1",
3
3
  "id": "rdc-skills",
4
- "version": "0.37.9",
4
+ "version": "0.37.11",
5
5
  "publisher": "LIFEAI",
6
6
  "core": false,
7
7
  "documentation": {
package/git-sha.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha": "74680b31a041d74e9c4c72e58cbc876fd5e920c3"
2
+ "sha": "a26cb2cc3a96f0b96f52c7b28c5dfef0264856e0"
3
3
  }
@@ -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.9",
3
+ "version": "0.37.11",
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.9",
22
+ "version": "0.37.11",
23
23
  "commands": "commands/"
24
24
  },
25
25
  "bin": {
@@ -93,6 +93,18 @@ shipping one verb as two documents produces.
93
93
  - **Never declare success without verifying the installed or deployed version.**
94
94
  A publish that exits 0 is not a published package — the registry can lag
95
95
  minutes behind, so check the version endpoint, not the success line.
96
+ - **npm auth: publish with the stored token until interactive login is fixed.**
97
+ Operator instruction, 2026-10-02. The `dladouceur` npm account cannot log in
98
+ interactively (2FA reset is with npm support). So `npm error need auth`, `E401`
99
+ or "needs an OTP" is NOT a blocker and is never handed back to Dave: publish with
100
+ the clauth `npm` service token, which `node $LIFEAI_ENV/sessions/work-ship.mjs
101
+ --repo <name> --lane <path> -F <msgfile> --publish` fetches and passes to npm
102
+ in-process. Never `curl .../v/npm`
103
+ into a shell, print the token, or write it into an `.npmrc` (`~/.npmrc` holds only
104
+ a GitHub Packages token). A 404 on publish means the token is package-scoped and
105
+ lacks that package; say which package, do not retry. Verify the exact version on
106
+ the registry afterwards. Delete this rule once `npm whoami` works from a plain
107
+ shell again.
96
108
 
97
109
  For a `package`-class target that already resolves through `rdc-harness` (a real
98
110
  monorepo subtree, not a standalone repo like this one),
@@ -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
- const preEnv = { HOME: fakeHome, USERPROFILE: fakeHome, RDC_FLOW_STATE: flowState, RDC_MODE_STATE: modeState };
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
  }