@reddb-io/red-skills 4.4.1 → 4.6.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.
Files changed (78) hide show
  1. package/bin/build-info.mjs +87 -0
  2. package/bin/cli-frontdoor.mjs +14 -0
  3. package/bin/red-skills-brain.mjs +17 -22
  4. package/bin/red-skills-content.mjs +17 -0
  5. package/bin/red-skills-hook.mjs +45 -0
  6. package/bin/red-skills-memory.mjs +17 -22
  7. package/bin/red-skills-redskilled-mcp.mjs +2 -0
  8. package/bin/red-skills-resource.mjs +21 -0
  9. package/bin/runtime-compatibility.mjs +17 -0
  10. package/bin/runtime-paths.mjs +13 -0
  11. package/dist/code-nav.bundle.min.mjs +1 -1
  12. package/dist/opencode-host.bundle.min.mjs +1 -1
  13. package/dist/redskilled-mcp.bundle.min.mjs +36 -36
  14. package/dist/redskilled-web.bundle.min.mjs +311 -0
  15. package/dist/redskilled.bundle.min.mjs +306 -292
  16. package/dist/release.bundle.min.mjs +1 -1
  17. package/dist/rsp-core.bundle.min.mjs +1 -1
  18. package/dist/rsp.bundle.min.mjs +1 -1
  19. package/dist/statusline.bundle.min.mjs +1 -1
  20. package/package.json +12 -4
  21. package/runtime/hook-routes.json +125 -0
  22. package/runtime/plugins/brain/scripts/bootstrap.mjs +656 -0
  23. package/runtime/plugins/brain/scripts/structural-smoke.sh +7 -0
  24. package/runtime/plugins/dev/hooks/branch-lock-codex.sh +105 -0
  25. package/runtime/plugins/dev/hooks/code-nav-mcp.sh +63 -0
  26. package/runtime/plugins/dev/hooks/command-guard.sh +893 -0
  27. package/runtime/plugins/dev/hooks/ensure-codex-statusline.mjs +144 -0
  28. package/runtime/plugins/dev/hooks/red-fetch.mjs +38 -0
  29. package/runtime/plugins/dev/hooks/redskilled-mcp.sh +64 -0
  30. package/runtime/plugins/dev/hooks/rsp-hook.sh +343 -0
  31. package/runtime/plugins/dev/hooks/tests/command-guard.test.sh +378 -0
  32. package/runtime/plugins/dev/hooks/tests/rsp-hook.test.sh +229 -0
  33. package/runtime/plugins/dev/scripts/memory-bridge.sh +230 -0
  34. package/runtime/plugins/dev/scripts/structural-smoke.sh +7 -0
  35. package/runtime/plugins/dev/scripts/tests/memory-bridge.test.sh +555 -0
  36. package/runtime/plugins/dev/skills/engineering/afk/defaults/cargo-pre-worktree.sh +37 -0
  37. package/runtime/plugins/dev/skills/engineering/afk/defaults/envelope-post-attempt.sh +47 -0
  38. package/runtime/plugins/dev/skills/engineering/afk/defaults/gradle-pre-worktree.sh +45 -0
  39. package/runtime/plugins/dev/skills/engineering/afk/defaults/heartbeat-post-attempt.sh +43 -0
  40. package/runtime/plugins/dev/skills/engineering/afk/defaults/validation-post-merge.sh +77 -0
  41. package/runtime/plugins/dev/skills/engineering/afk/detectors/cargo.sh +27 -0
  42. package/runtime/plugins/dev/skills/engineering/afk/detectors/gradle.sh +38 -0
  43. package/runtime/plugins/dev/skills/engineering/afk/examples/only-mine.sh +32 -0
  44. package/runtime/plugins/dev/skills/engineering/afk/examples/red-afk-attempt-action.yml +53 -0
  45. package/runtime/plugins/dev/skills/engineering/afk/examples/rs-afk-attempt.yml +76 -0
  46. package/runtime/plugins/dev/skills/engineering/afk/hooks/red-cargo +38 -0
  47. package/runtime/plugins/dev/skills/engineering/afk/hooks/red-envelope +50 -0
  48. package/runtime/plugins/dev/skills/engineering/afk/hooks/red-gradle +42 -0
  49. package/runtime/plugins/dev/skills/engineering/afk/hooks/red-heartbeat +46 -0
  50. package/runtime/plugins/dev/skills/engineering/afk/hooks/red-validation +79 -0
  51. package/runtime/plugins/dev/skills/engineering/diagnose/scripts/hitl-loop.template.sh +41 -0
  52. package/runtime/plugins/dev/skills/engineering/red-setup/scripts/install-runtime-shim.sh +181 -0
  53. package/runtime/plugins/dev/skills/engineering/red-setup/workflows/red-issues-needs-triage.yml +36 -0
  54. package/runtime/plugins/dev/skills/engineering/wizard/template.sh +211 -0
  55. package/runtime/plugins/dev/skills/engineering/zoom-out/scripts/graph-mode-plumbing.sh +36 -0
  56. package/runtime/plugins/dev/skills/engineering/zoom-out/scripts/tests/contract.test.sh +168 -0
  57. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/branch-lock-hook.sh +113 -0
  58. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/branch-lock-session-start.sh +81 -0
  59. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/branch-lock.sh +68 -0
  60. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/lib/dev-config.sh +126 -0
  61. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/lib/git-command-classifier.sh +198 -0
  62. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/lib/lock-store.sh +67 -0
  63. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/lib/scope-resolver.sh +43 -0
  64. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/branch-lock-cli.test.sh +114 -0
  65. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/claude-plugin-hook.test.sh +117 -0
  66. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/codex-hook.test.sh +230 -0
  67. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/dev-config.test.sh +99 -0
  68. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/git-command-classifier.test.sh +187 -0
  69. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/lock-store.test.sh +90 -0
  70. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/scope-resolver.test.sh +63 -0
  71. package/runtime/plugins/dev/skills/misc/branch-lock/scripts/tests/session-start.test.sh +123 -0
  72. package/runtime/plugins/dev/skills/misc/git-guardrails-claude-code/scripts/block-dangerous-git.sh +231 -0
  73. package/runtime/plugins/dev/skills/misc/git-guardrails-claude-code/scripts/tests/block-dangerous-git.test.sh +143 -0
  74. package/runtime/plugins/internal/scripts/structural-smoke.sh +7 -0
  75. package/runtime/plugins/internal/skills/maintainer/create-plugin/scripts/create-plugin.sh +308 -0
  76. package/runtime/plugins/memory/scripts/bootstrap.mjs +659 -0
  77. package/runtime/plugins/memory/scripts/structural-smoke.sh +7 -0
  78. package/scripts/check-skills-boundary.mjs +32 -0
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, readdirSync, lstatSync } from 'node:fs';
3
+ import { resolve, relative, join } from 'node:path';
4
+ const root = resolve(process.argv[2] ?? '.');
5
+ const errors = [];
6
+ function visit(dir) {
7
+ for (const name of readdirSync(dir)) {
8
+ const path = join(dir, name), rel = relative(root, path);
9
+ if (['.git', 'node_modules'].includes(name) || rel.startsWith('.red/tmp') || rel.startsWith('.red/state')) continue;
10
+ const stat = lstatSync(path);
11
+ if (stat.isSymbolicLink()) { errors.push(`${rel}: symlinks are not declarative content`); continue; }
12
+ if (stat.isDirectory()) { visit(path); continue; }
13
+ if (/\.(?:[cm]?[jt]sx?|sh|bash|py|rs|go|wasm|tgz|vsix)$/.test(name) || stat.mode & 0o111) errors.push(`${rel}: executable content`);
14
+ if (['pnpm-lock.yaml','pnpm-workspace.yaml','turbo.json'].includes(name)) errors.push(`${rel}: runtime workspace configuration`);
15
+ if (name.endsWith('.json')) {
16
+ const data = JSON.parse(readFileSync(path, 'utf8'));
17
+ function inspect(value) {
18
+ if (!value || typeof value !== 'object') return;
19
+ for (const [key, item] of Object.entries(value)) {
20
+ if (key === 'command' && typeof item === 'string' && !/^red-skills-[a-z-]+(?: [a-zA-Z0-9/_-]+)*$/.test(item)) errors.push(`${rel}: non-declarative command ${item.slice(0, 80)}`);
21
+ if (key === 'scripts' && !Array.isArray(item) && item && typeof item === 'object') errors.push(`${rel}: npm scripts`);
22
+ inspect(item);
23
+ }
24
+ }
25
+ inspect(data);
26
+ }
27
+ if (rel.startsWith('.github/workflows/') && /^\s*run:/m.test(readFileSync(path,'utf8'))) errors.push(`${rel}: workflow implementation belongs in redskilled`);
28
+ }
29
+ }
30
+ visit(root);
31
+ if (errors.length) { console.error(errors.join('\n')); process.exit(1); }
32
+ console.log('Skills boundary: declarative content only');