rigjs 3.0.32 → 4.0.2
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/.claude/skills/rig-wiki/SKILL.md +104 -0
- package/.claude-plugin/plugin.json +14 -0
- package/README.md +18 -1
- package/README_CN.md +17 -1
- package/RIG_CREW_SKILL.md +274 -0
- package/RIG_WIKI_SKILL.md +104 -0
- package/bin/rig.js +0 -0
- package/built/index.js +376 -299
- package/doc/architecture/README.md +139 -0
- package/doc/architecture/agents.md +180 -0
- package/doc/architecture/fc.md +17 -0
- package/doc/architecture/wiki.md +278 -0
- package/lib/crew/ask.ts +24 -0
- package/lib/crew/board.ts +123 -0
- package/lib/crew/config.ts +109 -0
- package/lib/crew/doctor.ts +40 -0
- package/lib/crew/inbox.ts +29 -0
- package/lib/crew/index.ts +108 -0
- package/lib/crew/init.ts +113 -0
- package/lib/crew/paths.ts +13 -0
- package/lib/crew/project.ts +84 -0
- package/lib/crew/role.ts +121 -0
- package/lib/crew/roleCommand.ts +150 -0
- package/lib/crew/state.ts +19 -0
- package/lib/crew/status.ts +27 -0
- package/lib/crew/stub.ts +9 -0
- package/lib/crew/sync.ts +15 -0
- package/lib/crew/task.ts +92 -0
- package/lib/crew/vault.ts +266 -0
- package/lib/installLocal.ts +189 -0
- package/lib/rig/index.ts +26 -3
- package/lib/tag/index.ts +1 -1
- package/lib/wiki/README.md +79 -0
- package/lib/wiki/agent/claude.ts +65 -0
- package/lib/wiki/agent/codex.ts +22 -0
- package/lib/wiki/agent/index.ts +11 -0
- package/lib/wiki/agent/list.ts +27 -0
- package/lib/wiki/agent/pi.ts +21 -0
- package/lib/wiki/agent/registry.ts +16 -0
- package/lib/wiki/agent/types.ts +37 -0
- package/lib/wiki/agent/use.ts +21 -0
- package/lib/wiki/config.ts +99 -0
- package/lib/wiki/daemon/index.ts +25 -0
- package/lib/wiki/daemon/install.ts +69 -0
- package/lib/wiki/daemon/logs.ts +16 -0
- package/lib/wiki/daemon/runner.ts +42 -0
- package/lib/wiki/daemon/start.ts +20 -0
- package/lib/wiki/daemon/status.ts +23 -0
- package/lib/wiki/daemon/stop.ts +16 -0
- package/lib/wiki/daemon/uninstall.ts +17 -0
- package/lib/wiki/db.ts +71 -0
- package/lib/wiki/fetch.ts +206 -0
- package/lib/wiki/index.ts +106 -0
- package/lib/wiki/indexCmd.ts +23 -0
- package/lib/wiki/ingest.ts +271 -0
- package/lib/wiki/init.ts +125 -0
- package/lib/wiki/installSkill.ts +92 -0
- package/lib/wiki/lint.ts +252 -0
- package/lib/wiki/list.ts +69 -0
- package/lib/wiki/pathGuard.ts +87 -0
- package/lib/wiki/paths.ts +29 -0
- package/lib/wiki/platform.ts +8 -0
- package/lib/wiki/qmd.ts +205 -0
- package/lib/wiki/query.ts +144 -0
- package/lib/wiki/rebuild.ts +56 -0
- package/lib/wiki/register.ts +94 -0
- package/lib/wiki/scan.ts +0 -0
- package/lib/wiki/uninstallSkill.ts +37 -0
- package/lib/wiki/unregister.ts +16 -0
- package/package.json +36 -6
- package/scripts/postinstall.mjs +108 -0
- package/scripts/publish.mjs +93 -0
- package/scripts/sync-skill.mjs +33 -0
- package/scripts/version-code.mjs +86 -0
- package/skills.md +54 -0
- package/.github/workflows/npm-publish.yml +0 -22
- package/demo/.env.oem1 +0 -4
- package/demo/.env.oem2 +0 -4
- package/demo/babel.config.js +0 -5
- package/demo/env.rig.json5 +0 -8
- package/demo/jsconfig.json +0 -19
- package/demo/package.json +0 -59
- package/demo/package.rig.json5 +0 -78
- package/demo/public/favicon.ico +0 -0
- package/demo/public/index.html +0 -17
- package/demo/rig_dev/.gitkeep +0 -0
- package/demo/rig_helper.d.ts +0 -4
- package/demo/rig_helper.js +0 -10
- package/demo/rigs/.gitkeep +0 -0
- package/demo/src/App.vue +0 -34
- package/demo/src/assets/logo.png +0 -0
- package/demo/src/components/HelloWorld.vue +0 -58
- package/demo/src/main.js +0 -8
- package/demo/vue.config.js +0 -8
- package/demo/yarn.lock +0 -6312
- package/develop.png +0 -0
- package/jest/test.rig.json5 +0 -14
- package/jest.config.ts +0 -16
- package/production.png +0 -0
- package/tsconfig.json +0 -53
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs after `npm i -g rigjs`. Symlinks bundled rig skills into
|
|
3
|
+
// ~/.claude/skills/<skill>/SKILL.md so Claude Code sees them without the
|
|
4
|
+
// user needing to run `rig wiki install-skill` first.
|
|
5
|
+
//
|
|
6
|
+
// Guardrails (so this never breaks an `npm install`):
|
|
7
|
+
// - macOS only (defense-in-depth alongside package.json `os: ["darwin"]`)
|
|
8
|
+
// - exit 0 even when something goes wrong; print a hint instead
|
|
9
|
+
// - opt-out via env: `RIG_NO_AUTO_SKILL=1 npm i -g rigjs`
|
|
10
|
+
// - idempotent: re-running is safe
|
|
11
|
+
// - never clobber a symlink that points elsewhere (user may have
|
|
12
|
+
// `yarn link`-ed a dev copy on top of a registry install)
|
|
13
|
+
|
|
14
|
+
import { existsSync, mkdirSync, readlinkSync, statSync, symlinkSync, unlinkSync } from 'node:fs';
|
|
15
|
+
import { homedir } from 'node:os';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import path from 'node:path';
|
|
18
|
+
|
|
19
|
+
const ok = () => process.exit(0);
|
|
20
|
+
|
|
21
|
+
if (process.platform !== 'darwin') {
|
|
22
|
+
console.log('rig: postinstall skipping (rig wiki is macOS-only)');
|
|
23
|
+
ok();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (process.env.RIG_NO_AUTO_SKILL === '1') {
|
|
27
|
+
console.log('rig: postinstall skipping (RIG_NO_AUTO_SKILL=1)');
|
|
28
|
+
ok();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
32
|
+
const skills = [
|
|
33
|
+
{ name: 'rig-wiki', src: path.join(repoRoot, 'RIG_WIKI_SKILL.md') },
|
|
34
|
+
{ name: 'rig-crew', src: path.join(repoRoot, 'RIG_CREW_SKILL.md') },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
if (!skills.some(s => existsSync(s.src))) {
|
|
38
|
+
console.log(`rig: postinstall skipping (no bundled skill files found in ${repoRoot})`);
|
|
39
|
+
ok();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const claudeSkillsDir = path.join(homedir(), '.claude', 'skills');
|
|
43
|
+
if (!existsSync(claudeSkillsDir)) {
|
|
44
|
+
console.log([
|
|
45
|
+
'',
|
|
46
|
+
'rig: Claude Code skills dir not found.',
|
|
47
|
+
` Expected: ${claudeSkillsDir}`,
|
|
48
|
+
' Install Claude Code first, then run: rig wiki install-skill',
|
|
49
|
+
'',
|
|
50
|
+
].join('\n'));
|
|
51
|
+
ok();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
for (const skill of skills) {
|
|
56
|
+
if (!existsSync(skill.src)) {
|
|
57
|
+
console.log(`rig: skipping ${skill.name} skill (${skill.src} not found)`);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
linkSkill(skill.name, skill.src);
|
|
61
|
+
}
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.log(`rig: postinstall couldn't link skills (${err && err.message || err}). Run \`rig wiki install-skill\` manually.`);
|
|
64
|
+
}
|
|
65
|
+
ok();
|
|
66
|
+
|
|
67
|
+
function linkSkill(name, src) {
|
|
68
|
+
const targetDir = path.join(claudeSkillsDir, name);
|
|
69
|
+
const target = path.join(targetDir, 'SKILL.md');
|
|
70
|
+
mkdirSync(targetDir, { recursive: true });
|
|
71
|
+
|
|
72
|
+
if (existsSync(target) || isBrokenSymlink(target)) {
|
|
73
|
+
const existing = safeReadlink(target);
|
|
74
|
+
if (existing === src) {
|
|
75
|
+
console.log(`rig: skill already linked (${target})`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (existing) {
|
|
79
|
+
console.log([
|
|
80
|
+
`rig: skill link target conflicts at ${target}`,
|
|
81
|
+
` existing → ${existing}`,
|
|
82
|
+
` wanted → ${src}`,
|
|
83
|
+
' Refusing to clobber. Run `rig wiki install-skill --force` if you want to replace it.',
|
|
84
|
+
].join('\n'));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
// Regular file (not a symlink). Skip — user wrote something custom.
|
|
88
|
+
console.log(`rig: ${target} exists as a regular file; leaving it alone`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
symlinkSync(src, target);
|
|
93
|
+
console.log(`rig: linked ${name} skill -> ${target}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function safeReadlink(p) {
|
|
97
|
+
try { return readlinkSync(p); } catch { return null; }
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function isBrokenSymlink(p) {
|
|
101
|
+
try {
|
|
102
|
+
statSync(p); // follows symlinks
|
|
103
|
+
return false;
|
|
104
|
+
} catch {
|
|
105
|
+
// statSync throws if target is missing. lstat tells us if `p` itself exists as a link.
|
|
106
|
+
try { return Boolean(readlinkSync(p)); } catch { return false; }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Thin wrapper around `npm publish`:
|
|
3
|
+
// - reads NPM_TOKEN from env, or `--token <val>` from argv
|
|
4
|
+
// - fails fast with a clear hint when neither is present
|
|
5
|
+
// - writes a short-lived temp .npmrc with the token + registry, points
|
|
6
|
+
// npm at it via --userconfig (token never lives in argv → no `ps` leak,
|
|
7
|
+
// never lives in the repo, deleted on exit)
|
|
8
|
+
// - passes everything else through to npm publish
|
|
9
|
+
|
|
10
|
+
import { spawnSync } from 'node:child_process';
|
|
11
|
+
import { readFileSync, writeFileSync, mkdtempSync, rmSync } from 'node:fs';
|
|
12
|
+
import { tmpdir } from 'node:os';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
import path from 'node:path';
|
|
15
|
+
|
|
16
|
+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
17
|
+
const REGISTRY = 'https://registry.npmjs.org/';
|
|
18
|
+
|
|
19
|
+
// --- parse argv ---
|
|
20
|
+
const argv = process.argv.slice(2);
|
|
21
|
+
let token = process.env.NPM_TOKEN;
|
|
22
|
+
const passthrough = [];
|
|
23
|
+
for (let i = 0; i < argv.length; i++) {
|
|
24
|
+
if (argv[i] === '--token' && argv[i + 1]) {
|
|
25
|
+
token = argv[++i];
|
|
26
|
+
} else if (argv[i].startsWith('--token=')) {
|
|
27
|
+
token = argv[i].slice('--token='.length);
|
|
28
|
+
} else {
|
|
29
|
+
passthrough.push(argv[i]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// --- check token ---
|
|
34
|
+
if (!token) {
|
|
35
|
+
process.stderr.write([
|
|
36
|
+
'',
|
|
37
|
+
'npm publish: NPM_TOKEN not found.',
|
|
38
|
+
'',
|
|
39
|
+
'Fix one of:',
|
|
40
|
+
' 1) Set persistent env var (recommended)',
|
|
41
|
+
' echo \'export NPM_TOKEN=npm_xxx\' >> ~/.zshrc && source ~/.zshrc',
|
|
42
|
+
' 2) Pass it inline this run only',
|
|
43
|
+
' yarn deliver --token npm_xxx',
|
|
44
|
+
' 3) Export in current shell',
|
|
45
|
+
' export NPM_TOKEN=npm_xxx && yarn deliver',
|
|
46
|
+
'',
|
|
47
|
+
'Generate one at: https://www.npmjs.com/settings/<your-user>/tokens',
|
|
48
|
+
'Choose "Automation" if you have 2FA enabled.',
|
|
49
|
+
'',
|
|
50
|
+
].join('\n'));
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// --- show what's about to ship ---
|
|
55
|
+
const pkg = JSON.parse(readFileSync(path.join(repoRoot, 'package.json'), 'utf8'));
|
|
56
|
+
process.stdout.write(`\npublishing ${pkg.name}@${pkg.version} to ${REGISTRY}\n\n`);
|
|
57
|
+
|
|
58
|
+
// --- write throwaway userconfig with the real token ---
|
|
59
|
+
const tmpDir = mkdtempSync(path.join(tmpdir(), 'rigjs-publish-'));
|
|
60
|
+
const tmpRc = path.join(tmpDir, '.npmrc');
|
|
61
|
+
writeFileSync(tmpRc, [
|
|
62
|
+
`registry=${REGISTRY}`,
|
|
63
|
+
`//registry.npmjs.org/:_authToken=${token}`,
|
|
64
|
+
'always-auth=true',
|
|
65
|
+
'',
|
|
66
|
+
].join('\n'), { mode: 0o600 });
|
|
67
|
+
|
|
68
|
+
// Scrub `npm_config_*` env vars before spawning npm. yarn injects
|
|
69
|
+
// `npm_config_registry=https://registry.yarnpkg.com` when running scripts,
|
|
70
|
+
// and that env wins over the registry= line in our temp .npmrc.
|
|
71
|
+
const cleanEnv = Object.fromEntries(
|
|
72
|
+
Object.entries(process.env).filter(([k]) => !/^npm_config_/i.test(k))
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
let status = 1;
|
|
76
|
+
try {
|
|
77
|
+
// `--registry` on the CLI is the strongest override (CLI flag > env > rc).
|
|
78
|
+
// Belt-and-braces with the scrubbed env above.
|
|
79
|
+
const res = spawnSync('npm', [
|
|
80
|
+
'publish',
|
|
81
|
+
'--registry', REGISTRY,
|
|
82
|
+
`--userconfig=${tmpRc}`,
|
|
83
|
+
...passthrough,
|
|
84
|
+
], {
|
|
85
|
+
cwd: repoRoot,
|
|
86
|
+
stdio: 'inherit',
|
|
87
|
+
env: cleanEnv,
|
|
88
|
+
});
|
|
89
|
+
status = res.status ?? 1;
|
|
90
|
+
} finally {
|
|
91
|
+
rmSync(tmpDir, { recursive: true, force: true });
|
|
92
|
+
}
|
|
93
|
+
process.exit(status);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Keep Claude plugin skill copies in sync with canonical root skill files.
|
|
3
|
+
// Runs from `prepublishOnly` so the tarball always ships matching copies.
|
|
4
|
+
//
|
|
5
|
+
// We keep two real files (instead of a symlink) because npm pack does not
|
|
6
|
+
// preserve symlinks in the tarball, and the official Claude Code plugin
|
|
7
|
+
// loader expects a real file at <plugin>/.claude/skills/<name>/SKILL.md.
|
|
8
|
+
|
|
9
|
+
import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
|
|
13
|
+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
14
|
+
|
|
15
|
+
const skills = [
|
|
16
|
+
['RIG_WIKI_SKILL.md', '.claude/skills/rig-wiki/SKILL.md'],
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
for (const [srcRel, destRel] of skills) {
|
|
20
|
+
const src = path.join(repoRoot, srcRel);
|
|
21
|
+
const dest = path.join(repoRoot, destRel);
|
|
22
|
+
const srcContent = readFileSync(src, 'utf8');
|
|
23
|
+
mkdirSync(path.dirname(dest), { recursive: true });
|
|
24
|
+
let destContent = '';
|
|
25
|
+
try { destContent = readFileSync(dest, 'utf8'); } catch { /* missing is fine */ }
|
|
26
|
+
|
|
27
|
+
if (srcContent === destContent) {
|
|
28
|
+
console.log(`sync-skill: ${destRel} already in sync`);
|
|
29
|
+
} else {
|
|
30
|
+
writeFileSync(dest, srcContent, 'utf8');
|
|
31
|
+
console.log(`sync-skill: wrote ${destRel} (<- ${srcRel})`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// versionCode bumper.
|
|
3
|
+
//
|
|
4
|
+
// Format: YYMMDDNN — 6-digit local date prefix + 2-digit sequence (01-99).
|
|
5
|
+
// Caps at 99 builds per day. Same algorithm as bitterless/scripts/publish.js
|
|
6
|
+
// `updateVersionCode`, kept here so rig (and any project that imports this
|
|
7
|
+
// module) can stamp builds without depending on bitterless.
|
|
8
|
+
//
|
|
9
|
+
// Usage:
|
|
10
|
+
// node scripts/version-code.mjs # bump + write package.json + print
|
|
11
|
+
// node scripts/version-code.mjs --print # print current code, no write
|
|
12
|
+
// node scripts/version-code.mjs --peek # show what the next bump would be
|
|
13
|
+
// import { bumpVersionCode } from './scripts/version-code.mjs'
|
|
14
|
+
//
|
|
15
|
+
// All file I/O is relative to the package.json found by walking up from CWD,
|
|
16
|
+
// so the script works from any subdir of the project.
|
|
17
|
+
|
|
18
|
+
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import { fileURLToPath } from 'node:url';
|
|
21
|
+
|
|
22
|
+
const PAD2 = (n) => n.toString().padStart(2, '0');
|
|
23
|
+
|
|
24
|
+
function todayPrefix(date = new Date()) {
|
|
25
|
+
const y = date.getFullYear().toString().slice(-2);
|
|
26
|
+
return `${y}${PAD2(date.getMonth() + 1)}${PAD2(date.getDate())}`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function nextCode(currentCode, prefix = todayPrefix()) {
|
|
30
|
+
const current = currentCode != null ? String(currentCode) : '';
|
|
31
|
+
if (current.startsWith(prefix)) {
|
|
32
|
+
const n = parseInt(current.slice(6), 10);
|
|
33
|
+
if (isNaN(n)) return `${prefix}01`;
|
|
34
|
+
if (n >= 99) {
|
|
35
|
+
throw new Error(`versionCode cap reached (99 builds today for prefix ${prefix})`);
|
|
36
|
+
}
|
|
37
|
+
return `${prefix}${PAD2(n + 1)}`;
|
|
38
|
+
}
|
|
39
|
+
return `${prefix}01`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function findPackageJson(startDir = process.cwd()) {
|
|
43
|
+
let dir = path.resolve(startDir);
|
|
44
|
+
while (true) {
|
|
45
|
+
const p = path.join(dir, 'package.json');
|
|
46
|
+
if (existsSync(p)) return p;
|
|
47
|
+
const parent = path.dirname(dir);
|
|
48
|
+
if (parent === dir) throw new Error('package.json not found walking up from ' + startDir);
|
|
49
|
+
dir = parent;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function bumpVersionCode(packageJsonPath = findPackageJson()) {
|
|
54
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
55
|
+
const before = pkg.versionCode != null ? String(pkg.versionCode) : '';
|
|
56
|
+
const after = nextCode(before);
|
|
57
|
+
pkg.versionCode = parseInt(after, 10);
|
|
58
|
+
writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
59
|
+
return { before, after: pkg.versionCode, packageJsonPath };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function readVersionCode(packageJsonPath = findPackageJson()) {
|
|
63
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
64
|
+
return pkg.versionCode != null ? String(pkg.versionCode) : null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// CLI entrypoint
|
|
68
|
+
const isMain = (() => {
|
|
69
|
+
try { return path.resolve(process.argv[1]) === fileURLToPath(import.meta.url); }
|
|
70
|
+
catch { return false; }
|
|
71
|
+
})();
|
|
72
|
+
|
|
73
|
+
if (isMain) {
|
|
74
|
+
const arg = process.argv[2];
|
|
75
|
+
const pkgPath = findPackageJson();
|
|
76
|
+
if (arg === '--print') {
|
|
77
|
+
const code = readVersionCode(pkgPath);
|
|
78
|
+
process.stdout.write((code ?? '') + '\n');
|
|
79
|
+
} else if (arg === '--peek') {
|
|
80
|
+
const code = readVersionCode(pkgPath);
|
|
81
|
+
process.stdout.write(nextCode(code ?? '') + '\n');
|
|
82
|
+
} else {
|
|
83
|
+
const { before, after } = bumpVersionCode(pkgPath);
|
|
84
|
+
process.stdout.write(`versionCode: ${before || '<empty>'} -> ${after}\n`);
|
|
85
|
+
}
|
|
86
|
+
}
|
package/skills.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# rig Skills
|
|
2
|
+
|
|
3
|
+
This page is the skill index for the `rigjs` package.
|
|
4
|
+
|
|
5
|
+
Keep the root `README.md` short: it should link here and to the canonical skill files, while this page explains how the bundled skills relate to the CLI.
|
|
6
|
+
|
|
7
|
+
## Bundled Skills
|
|
8
|
+
|
|
9
|
+
| Skill | Canonical file | Plugin copy | CLI area | Purpose |
|
|
10
|
+
|---|---|---|---|---|
|
|
11
|
+
| `rig-wiki` | [`RIG_WIKI_SKILL.md`](./RIG_WIKI_SKILL.md) | [`.claude/skills/rig-wiki/SKILL.md`](./.claude/skills/rig-wiki/SKILL.md) | `rig wiki *` | Karpathy-style LLM wiki operations: scan, fetch, ingest, query, lint, and rebuild. |
|
|
12
|
+
| `rig-crew` | [`RIG_CREW_SKILL.md`](./RIG_CREW_SKILL.md) | None; use the Vault/overmind skill copy | `rig crew *` | File-backed, Leader-first multi-agent coordination over an Obsidian vault. |
|
|
13
|
+
|
|
14
|
+
`rig-crew` is intentionally not copied into `projects/rig/.claude/skills/`. In the overmind workflow, `rig` is just one project inside the Vault. The active crew instructions come from the Vault root `CLAUDE.md` / `AGENTS.md` managed block plus the overmind/user-level skill installation, so a project-local Claude skill copy would be misleading.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
Normal install:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm i -g rigjs
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The `postinstall` script links bundled skills into `~/.claude/skills/` when Claude Code is installed.
|
|
25
|
+
|
|
26
|
+
Security-conscious install:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm i -g rigjs --ignore-scripts
|
|
30
|
+
rig wiki install-skill
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`rig wiki install-skill` installs both bundled skills. The command name remains under `wiki` for backward compatibility.
|
|
34
|
+
|
|
35
|
+
## Maintenance
|
|
36
|
+
|
|
37
|
+
Canonical files live at the package root:
|
|
38
|
+
|
|
39
|
+
- [`RIG_WIKI_SKILL.md`](./RIG_WIKI_SKILL.md)
|
|
40
|
+
- [`RIG_CREW_SKILL.md`](./RIG_CREW_SKILL.md)
|
|
41
|
+
|
|
42
|
+
Plugin copies that belong to the `rig` package live under `.claude/skills/` and are synchronized by:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
node scripts/sync-skill.mjs
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`prepublishOnly` runs the sync script before packaging. Today this plugin-copy set only includes `rig-wiki`; `rig-crew` remains Vault-level guidance.
|
|
49
|
+
|
|
50
|
+
## Documentation Policy
|
|
51
|
+
|
|
52
|
+
- Put one-line skill visibility and high-level links in `README.md`.
|
|
53
|
+
- Put all skill references, maintenance notes, and plugin-copy details in this file.
|
|
54
|
+
- Keep each canonical `RIG_*_SKILL.md` self-contained so users can read exactly what they are enabling.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
tags:
|
|
9
|
-
- '*'
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
publish:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: 18
|
|
19
|
-
registry-url: https://registry.npmjs.org/
|
|
20
|
-
- run: yarn deliver
|
|
21
|
-
env:
|
|
22
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/demo/.env.oem1
DELETED
package/demo/.env.oem2
DELETED
package/demo/babel.config.js
DELETED
package/demo/env.rig.json5
DELETED
package/demo/jsconfig.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es5",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"baseUrl": "./",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"paths": {
|
|
8
|
-
"@/*": [
|
|
9
|
-
"src/*"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"lib": [
|
|
13
|
-
"esnext",
|
|
14
|
-
"dom",
|
|
15
|
-
"dom.iterable",
|
|
16
|
-
"scripthost"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
package/demo/package.json
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "demo",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"serve": "vue-cli-service serve",
|
|
7
|
-
"build:oem1": "vue-cli-service build --mode oem1",
|
|
8
|
-
"build:oem2": "vue-cli-service build --mode oem2",
|
|
9
|
-
"build": "vue-cli-service build",
|
|
10
|
-
"lint": "vue-cli-service lint",
|
|
11
|
-
"test_prei": "node ../built/index.js preinstall",
|
|
12
|
-
"test_tag": "node ../built/index.js tag",
|
|
13
|
-
"test_env": "node ../built/index.js --env dev",
|
|
14
|
-
"test_posti": "node ../built/index.js postinstall"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"core-js": "^3.8.3",
|
|
18
|
-
"cross-env": "^7.0.3",
|
|
19
|
-
"rig-test-2": "git+ssh://git@github.com:FlashHand/rig-test-2.git#1.0.1",
|
|
20
|
-
"vue": "^2.6.14",
|
|
21
|
-
"rig-test-1": "git+ssh://git@github.com:FlashHand/rig-test-1.git#1.0.1",
|
|
22
|
-
"r-foundation": "git+ssh://git@github.com:FlashHand/r-foundation.git#1.1.7"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@babel/core": "^7.12.16",
|
|
26
|
-
"@babel/eslint-parser": "^7.12.16",
|
|
27
|
-
"@vue/cli-plugin-babel": "~5.0.0",
|
|
28
|
-
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
29
|
-
"@vue/cli-service": "~5.0.0",
|
|
30
|
-
"eslint": "^7.32.0",
|
|
31
|
-
"eslint-plugin-vue": "^8.0.3",
|
|
32
|
-
"json5": "2.2.1",
|
|
33
|
-
"vue-template-compiler": "^2.6.14"
|
|
34
|
-
},
|
|
35
|
-
"eslintConfig": {
|
|
36
|
-
"root": true,
|
|
37
|
-
"env": {
|
|
38
|
-
"node": true
|
|
39
|
-
},
|
|
40
|
-
"extends": [
|
|
41
|
-
"plugin:vue/essential",
|
|
42
|
-
"eslint:recommended"
|
|
43
|
-
],
|
|
44
|
-
"parserOptions": {
|
|
45
|
-
"parser": "@babel/eslint-parser"
|
|
46
|
-
},
|
|
47
|
-
"rules": {}
|
|
48
|
-
},
|
|
49
|
-
"browserslist": [
|
|
50
|
-
"> 1%",
|
|
51
|
-
"last 2 versions",
|
|
52
|
-
"not dead"
|
|
53
|
-
],
|
|
54
|
-
"workspaces": [
|
|
55
|
-
"rigs/*",
|
|
56
|
-
"rigs_dev/*",
|
|
57
|
-
"rig_dev/*"
|
|
58
|
-
]
|
|
59
|
-
}
|
package/demo/package.rig.json5
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
dependencies: {
|
|
3
|
-
'rig-test-1': {
|
|
4
|
-
dev: true,
|
|
5
|
-
name: 'rig-test-1',
|
|
6
|
-
source: 'git@github.com:FlashHand/rig-test-1.git',
|
|
7
|
-
version: '1.0.1',
|
|
8
|
-
},
|
|
9
|
-
'rig-test-2': {
|
|
10
|
-
dev: false,
|
|
11
|
-
name: 'rig-test-2',
|
|
12
|
-
source: 'git@github.com:FlashHand/rig-test-2.git',
|
|
13
|
-
version: '1.0.1',
|
|
14
|
-
},
|
|
15
|
-
'r-foundation': {
|
|
16
|
-
name: 'r-foundation',
|
|
17
|
-
source: 'git@github.com:FlashHand/r-foundation.git',
|
|
18
|
-
version: '1.1.7',
|
|
19
|
-
dev: true,
|
|
20
|
-
},
|
|
21
|
-
'zenrtcjssdk': {
|
|
22
|
-
// dev: true,
|
|
23
|
-
name: 'zenrtcjssdk',
|
|
24
|
-
source: 'git@code.y5ops.com:zenrtc/zenrtcjssdk.git',
|
|
25
|
-
version: '1.8.16-dev.5'
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
isLegacy: false,
|
|
29
|
-
cicd: {
|
|
30
|
-
path_schema: "demo/{env}/{oem}",
|
|
31
|
-
//Your local build's path.
|
|
32
|
-
source: {
|
|
33
|
-
root_path: "dist"
|
|
34
|
-
},
|
|
35
|
-
//Entry path for your website's index.html.Default is '/'.
|
|
36
|
-
web_entry_path: '/',
|
|
37
|
-
//Your deploy target
|
|
38
|
-
target: {
|
|
39
|
-
//Only support alicould for now.
|
|
40
|
-
id: "alicloud",
|
|
41
|
-
type: "alicloud",
|
|
42
|
-
bucket: "rys-deploy",
|
|
43
|
-
region: "oss-cn-hangzhou",
|
|
44
|
-
access_key: "${ak}",
|
|
45
|
-
access_secret: "${as}",
|
|
46
|
-
//Root path in the bucket,default is '/'.
|
|
47
|
-
root_path: "/",
|
|
48
|
-
},
|
|
49
|
-
endpoints: {
|
|
50
|
-
"demo/test/oem1": {
|
|
51
|
-
build: 'yarn cross-env OUTPUT_DIR=__RIG_OUTPUT_DIR__ PUBLIC_PATH=__RIG_PUBLIC_PATH__ vue-cli-service build',
|
|
52
|
-
defines: {
|
|
53
|
-
RIG_REPLACE_GRAY: '/test-gray'
|
|
54
|
-
},
|
|
55
|
-
domains: [
|
|
56
|
-
"test-mp.domain.com"
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
groups: [
|
|
61
|
-
{
|
|
62
|
-
name: "%oem",
|
|
63
|
-
level: "oem",
|
|
64
|
-
includes: [
|
|
65
|
-
"oem1",
|
|
66
|
-
"oem2"
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
share: {
|
|
73
|
-
eslint: {
|
|
74
|
-
links: ['https://gist.githubusercontent.com/FlashHand/580a0a2f13b5ec31ccbedd368abd3bbf/raw/0638841f4f0c284d442a7ffe7bc9c8f3f2feb91e/.eslintrc.js'],
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
}
|
package/demo/public/favicon.ico
DELETED
|
Binary file
|
package/demo/public/index.html
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<noscript>
|
|
12
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
-
</noscript>
|
|
14
|
-
<div id="app"></div>
|
|
15
|
-
<!-- built files will be auto injected -->
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
package/demo/rig_dev/.gitkeep
DELETED
|
File without changes
|
package/demo/rig_helper.d.ts
DELETED
package/demo/rig_helper.js
DELETED
package/demo/rigs/.gitkeep
DELETED
|
File without changes
|
package/demo/src/App.vue
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<img alt="Vue logo" src="./assets/logo.png">
|
|
4
|
-
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
|
5
|
-
<span>test_replace:{{ test_replace}}</span>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import HelloWorld from './components/HelloWorld.vue'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: 'App',
|
|
14
|
-
data() {
|
|
15
|
-
return {
|
|
16
|
-
test_replace: 'NGINX_REPLACE_A'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
components: {
|
|
20
|
-
HelloWorld
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style>
|
|
26
|
-
#app {
|
|
27
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
28
|
-
-webkit-font-smoothing: antialiased;
|
|
29
|
-
-moz-osx-font-smoothing: grayscale;
|
|
30
|
-
text-align: center;
|
|
31
|
-
color: #2c3e50;
|
|
32
|
-
margin-top: 60px;
|
|
33
|
-
}
|
|
34
|
-
</style>
|
package/demo/src/assets/logo.png
DELETED
|
Binary file
|