harness-everything 0.2.1 → 0.2.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/README.md +1 -1
- package/build-multi-agent-system/SKILL.md +68 -68
- package/create-agent-launcher/SKILL.md +48 -48
- package/docs/architecture.md +2 -2
- package/docs/workflows/build-multi-agent-system.md +62 -62
- package/docs/workflows/create-agent-launcher.md +62 -62
- package/docs/workflows/environment-detection.md +63 -63
- package/docs/workflows/eval-harness.md +57 -57
- package/docs/workflows/fable-discipline.md +59 -59
- package/docs/workflows/fable-mode.md +32 -32
- package/docs/workflows/git-commit.md +62 -62
- package/docs/workflows/grill-me.md +62 -62
- package/docs/workflows/grill-with-docs.md +62 -62
- package/docs/workflows/improve-codebase-architecture.md +60 -60
- package/docs/workflows/repo-docs.md +59 -59
- package/docs/workflows/rewrite-commits.md +60 -60
- package/docs/workflows/security-review.md +58 -58
- package/docs/workflows/self-evolve.md +59 -59
- package/docs/workflows/tdd.md +39 -39
- package/docs/workflows/todo-driven-workflow.md +36 -36
- package/docs/workflows/using-git-worktrees.md +63 -63
- package/docs/workflows/verification-loop.md +69 -69
- package/docs/workflows/verify-before-claim.md +60 -60
- package/docs/workflows/zoom-out.md +62 -62
- package/environment-detection/SKILL.md +77 -77
- package/eval-framework/behavioral-test.js +105 -105
- package/eval-framework/mechanism-test.js +251 -251
- package/eval-harness/SKILL.md +59 -59
- package/fable-discipline/SKILL.md +38 -38
- package/fable-mode/SKILL.md +51 -51
- package/git-commit/SKILL.md +55 -55
- package/grill-me/SKILL.md +36 -36
- package/grill-with-docs/SKILL.md +99 -99
- package/harness-everything/SKILL.md +141 -141
- package/harness-everything/examples/README.md +9 -9
- package/harness-everything/examples/todo-workflow.md +22 -22
- package/harness-everything/scripts/todo-cli.js +157 -157
- package/harness-everything/scripts/verify-gate.js +31 -31
- package/hooks/scripts/atomic-commit-check.js +68 -68
- package/hooks/scripts/context-compact.js +114 -114
- package/hooks/scripts/lib/platforms/claude.js +132 -42
- package/hooks/scripts/lib/platforms/codex.js +96 -46
- package/hooks/scripts/lib/platforms/continue.js +73 -41
- package/hooks/scripts/lib/platforms/copilot.js +91 -41
- package/hooks/scripts/lib/platforms/cursor.js +71 -41
- package/hooks/scripts/lib/platforms/hermes.js +25 -0
- package/hooks/scripts/rule-of-3.js +176 -176
- package/improve-codebase-architecture/SKILL.md +44 -44
- package/install-cognitive-os/SKILL.md +95 -95
- package/package.json +1 -1
- package/repo-docs/SKILL.md +45 -45
- package/rewrite-commits/SKILL.md +32 -32
- package/scripts/installer.js +57 -200
- package/scripts/lib/advisory-text.js +163 -163
- package/scripts/lib/claude-hooks.js +71 -71
- package/scripts/lib/manifest.js +82 -82
- package/scripts/lib/prompts.js +241 -241
- package/scripts/lib/skills.js +174 -172
- package/scripts/lib/workspace.js +28 -28
- package/security-review/SKILL.md +510 -510
- package/self-evolve/SKILL.md +54 -54
- package/skill-creator/SKILL.md +91 -91
- package/skill-creator/references/testing-workflow.md +32 -32
- package/skill-style/SKILL.md +48 -48
- package/tdd/SKILL.md +53 -53
- package/todo-driven-workflow/SKILL.md +54 -54
- package/using-git-worktrees/SKILL.md +161 -161
- package/verification-loop/SKILL.md +138 -138
- package/verify-before-claim/SKILL.md +86 -86
- package/zoom-out/SKILL.md +90 -90
|
@@ -1,41 +1,73 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
|
|
4
|
-
// Continue's own skills location (.continue/skills/) is unchanged - it
|
|
5
|
-
// already has an established home. Only bookkeeping that never had a home
|
|
6
|
-
// (runtime state, install manifest) converges into .continue/harness-everything/.
|
|
7
|
-
module.exports = {
|
|
8
|
-
name: 'continue',
|
|
9
|
-
label: 'Continue.dev',
|
|
10
|
-
getHarnessDir(workspaceRoot) {
|
|
11
|
-
return path.join(workspaceRoot, '.continue', 'harness-everything');
|
|
12
|
-
},
|
|
13
|
-
getStateDir(workspaceRoot) {
|
|
14
|
-
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
-
},
|
|
16
|
-
getSkillsDir(workspaceRoot) {
|
|
17
|
-
return path.join(workspaceRoot, '.continue', 'skills');
|
|
18
|
-
},
|
|
19
|
-
getIgnorePatterns(workspaceRoot) {
|
|
20
|
-
const patterns = ['.continue/harness-everything/'];
|
|
21
|
-
if (fs.existsSync(path.join(workspaceRoot, '.continue', 'skills'))) {
|
|
22
|
-
patterns.push('.continue/skills/');
|
|
23
|
-
}
|
|
24
|
-
return patterns;
|
|
25
|
-
},
|
|
26
|
-
isMatch(pattern, trimmedLine) {
|
|
27
|
-
if (pattern === '.continue/harness-everything/') {
|
|
28
|
-
return trimmedLine === '.continue/' ||
|
|
29
|
-
trimmedLine === '.continue' ||
|
|
30
|
-
trimmedLine === '.continue/harness-everything' ||
|
|
31
|
-
trimmedLine === '.continue/harness-everything/';
|
|
32
|
-
}
|
|
33
|
-
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
-
},
|
|
35
|
-
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
-
if (isGlobal) {
|
|
37
|
-
return fs.existsSync(path.join(userHome, '.continue', 'rules', 'harness.md'));
|
|
38
|
-
}
|
|
39
|
-
return fs.existsSync(path.join(workspaceRoot, '.continue', 'rules', 'harness.md'));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
// Continue's own skills location (.continue/skills/) is unchanged - it
|
|
5
|
+
// already has an established home. Only bookkeeping that never had a home
|
|
6
|
+
// (runtime state, install manifest) converges into .continue/harness-everything/.
|
|
7
|
+
module.exports = {
|
|
8
|
+
name: 'continue',
|
|
9
|
+
label: 'Continue.dev',
|
|
10
|
+
getHarnessDir(workspaceRoot) {
|
|
11
|
+
return path.join(workspaceRoot, '.continue', 'harness-everything');
|
|
12
|
+
},
|
|
13
|
+
getStateDir(workspaceRoot) {
|
|
14
|
+
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
+
},
|
|
16
|
+
getSkillsDir(workspaceRoot) {
|
|
17
|
+
return path.join(workspaceRoot, '.continue', 'skills');
|
|
18
|
+
},
|
|
19
|
+
getIgnorePatterns(workspaceRoot) {
|
|
20
|
+
const patterns = ['.continue/harness-everything/'];
|
|
21
|
+
if (fs.existsSync(path.join(workspaceRoot, '.continue', 'skills'))) {
|
|
22
|
+
patterns.push('.continue/skills/');
|
|
23
|
+
}
|
|
24
|
+
return patterns;
|
|
25
|
+
},
|
|
26
|
+
isMatch(pattern, trimmedLine) {
|
|
27
|
+
if (pattern === '.continue/harness-everything/') {
|
|
28
|
+
return trimmedLine === '.continue/' ||
|
|
29
|
+
trimmedLine === '.continue' ||
|
|
30
|
+
trimmedLine === '.continue/harness-everything' ||
|
|
31
|
+
trimmedLine === '.continue/harness-everything/';
|
|
32
|
+
}
|
|
33
|
+
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
+
},
|
|
35
|
+
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
+
if (isGlobal) {
|
|
37
|
+
return fs.existsSync(path.join(userHome, '.continue', 'rules', 'harness.md'));
|
|
38
|
+
}
|
|
39
|
+
return fs.existsSync(path.join(workspaceRoot, '.continue', 'rules', 'harness.md'));
|
|
40
|
+
},
|
|
41
|
+
getSkillsTarget({ workspaceRoot, userHome, isGlobal, manifest }) {
|
|
42
|
+
if (isGlobal) {
|
|
43
|
+
const globalAgentsDir = path.join(userHome, '.agents');
|
|
44
|
+
return {
|
|
45
|
+
path: path.join(globalAgentsDir, 'skills'),
|
|
46
|
+
label: '~/.agents/skills/',
|
|
47
|
+
manifestPath: manifest.getManifestPath(globalAgentsDir),
|
|
48
|
+
};
|
|
49
|
+
} else {
|
|
50
|
+
const continueDir = path.join(workspaceRoot, '.continue');
|
|
51
|
+
return {
|
|
52
|
+
path: path.join(continueDir, 'skills'),
|
|
53
|
+
label: '.continue/skills/',
|
|
54
|
+
manifestPath: manifest.getManifestPath(continueDir),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
install({ isGlobal, targetWorkspaceRoot, userHome, advisory, workspaceRoot }) {
|
|
59
|
+
const targetFile = isGlobal ? path.join(userHome, '.continue', 'rules', 'harness.md') : path.join(targetWorkspaceRoot, '.continue', 'rules', 'harness.md');
|
|
60
|
+
advisory.installContinueRule(targetFile, isGlobal ? '~/.continue/rules/harness.md' : '.continue/rules/harness.md');
|
|
61
|
+
},
|
|
62
|
+
uninstall({ removeLocal, removeGlobal, workspaceRoot, userHome, cleanEmptyDirs }) {
|
|
63
|
+
const advisory = require('../../../../scripts/lib/advisory-text');
|
|
64
|
+
if (removeLocal) {
|
|
65
|
+
advisory.removeContinueRule(path.join(workspaceRoot, '.continue', 'rules', 'harness.md'));
|
|
66
|
+
cleanEmptyDirs(path.join(workspaceRoot, '.continue', 'rules'), [workspaceRoot, userHome]);
|
|
67
|
+
}
|
|
68
|
+
if (removeGlobal) {
|
|
69
|
+
advisory.removeContinueRule(path.join(userHome, '.continue', 'rules', 'harness.md'));
|
|
70
|
+
cleanEmptyDirs(path.join(userHome, '.continue', 'rules'), [userHome]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -1,41 +1,91 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
|
|
4
|
-
// Copilot's own skills location (.github/skills/) is unchanged - it already
|
|
5
|
-
// has an established home. Only bookkeeping that never had a home (runtime
|
|
6
|
-
// state, install manifest) converges into .github/harness-everything/.
|
|
7
|
-
module.exports = {
|
|
8
|
-
name: 'copilot',
|
|
9
|
-
label: 'GitHub Copilot',
|
|
10
|
-
getHarnessDir(workspaceRoot) {
|
|
11
|
-
return path.join(workspaceRoot, '.github', 'harness-everything');
|
|
12
|
-
},
|
|
13
|
-
getStateDir(workspaceRoot) {
|
|
14
|
-
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
-
},
|
|
16
|
-
getSkillsDir(workspaceRoot) {
|
|
17
|
-
return path.join(workspaceRoot, '.github', 'skills');
|
|
18
|
-
},
|
|
19
|
-
getIgnorePatterns(workspaceRoot) {
|
|
20
|
-
const patterns = ['.github/harness-everything/'];
|
|
21
|
-
if (fs.existsSync(path.join(workspaceRoot, '.github', 'skills'))) {
|
|
22
|
-
patterns.push('.github/skills/');
|
|
23
|
-
}
|
|
24
|
-
return patterns;
|
|
25
|
-
},
|
|
26
|
-
isMatch(pattern, trimmedLine) {
|
|
27
|
-
if (pattern === '.github/harness-everything/') {
|
|
28
|
-
return trimmedLine === '.github/' ||
|
|
29
|
-
trimmedLine === '.github' ||
|
|
30
|
-
trimmedLine === '.github/harness-everything' ||
|
|
31
|
-
trimmedLine === '.github/harness-everything/';
|
|
32
|
-
}
|
|
33
|
-
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
-
},
|
|
35
|
-
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
-
if (isGlobal) {
|
|
37
|
-
return false; // Handled via global userPromptsDir check
|
|
38
|
-
}
|
|
39
|
-
return fs.existsSync(path.join(workspaceRoot, '.github', 'copilot-instructions.md'));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
// Copilot's own skills location (.github/skills/) is unchanged - it already
|
|
5
|
+
// has an established home. Only bookkeeping that never had a home (runtime
|
|
6
|
+
// state, install manifest) converges into .github/harness-everything/.
|
|
7
|
+
module.exports = {
|
|
8
|
+
name: 'copilot',
|
|
9
|
+
label: 'GitHub Copilot',
|
|
10
|
+
getHarnessDir(workspaceRoot) {
|
|
11
|
+
return path.join(workspaceRoot, '.github', 'harness-everything');
|
|
12
|
+
},
|
|
13
|
+
getStateDir(workspaceRoot) {
|
|
14
|
+
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
+
},
|
|
16
|
+
getSkillsDir(workspaceRoot) {
|
|
17
|
+
return path.join(workspaceRoot, '.github', 'skills');
|
|
18
|
+
},
|
|
19
|
+
getIgnorePatterns(workspaceRoot) {
|
|
20
|
+
const patterns = ['.github/harness-everything/'];
|
|
21
|
+
if (fs.existsSync(path.join(workspaceRoot, '.github', 'skills'))) {
|
|
22
|
+
patterns.push('.github/skills/');
|
|
23
|
+
}
|
|
24
|
+
return patterns;
|
|
25
|
+
},
|
|
26
|
+
isMatch(pattern, trimmedLine) {
|
|
27
|
+
if (pattern === '.github/harness-everything/') {
|
|
28
|
+
return trimmedLine === '.github/' ||
|
|
29
|
+
trimmedLine === '.github' ||
|
|
30
|
+
trimmedLine === '.github/harness-everything' ||
|
|
31
|
+
trimmedLine === '.github/harness-everything/';
|
|
32
|
+
}
|
|
33
|
+
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
+
},
|
|
35
|
+
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
+
if (isGlobal) {
|
|
37
|
+
return false; // Handled via global userPromptsDir check
|
|
38
|
+
}
|
|
39
|
+
return fs.existsSync(path.join(workspaceRoot, '.github', 'copilot-instructions.md'));
|
|
40
|
+
},
|
|
41
|
+
getSkillsTarget({ workspaceRoot, userHome, isGlobal, manifest }) {
|
|
42
|
+
if (isGlobal) {
|
|
43
|
+
const globalAgentsDir = path.join(userHome, '.agents');
|
|
44
|
+
return {
|
|
45
|
+
path: path.join(globalAgentsDir, 'skills'),
|
|
46
|
+
label: '~/.agents/skills/',
|
|
47
|
+
manifestPath: manifest.getManifestPath(globalAgentsDir),
|
|
48
|
+
};
|
|
49
|
+
} else {
|
|
50
|
+
const githubDir = path.join(workspaceRoot, '.github');
|
|
51
|
+
return {
|
|
52
|
+
path: path.join(githubDir, 'skills'),
|
|
53
|
+
label: '.github/skills/',
|
|
54
|
+
manifestPath: manifest.getManifestPath(githubDir),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
install({ isGlobal, targetWorkspaceRoot, getUserPromptsDir, advisory }) {
|
|
59
|
+
if (!isGlobal) {
|
|
60
|
+
const targetFile = path.join(targetWorkspaceRoot, '.github', 'copilot-instructions.md');
|
|
61
|
+
advisory.injectAdvisoryText(targetFile, '# Copilot Instructions', '.github/copilot-instructions.md');
|
|
62
|
+
} else {
|
|
63
|
+
try {
|
|
64
|
+
const promptsDir = getUserPromptsDir();
|
|
65
|
+
if (!fs.existsSync(promptsDir)) {
|
|
66
|
+
fs.mkdirSync(promptsDir, { recursive: true });
|
|
67
|
+
}
|
|
68
|
+
const vscodeInstFile = path.join(promptsDir, 'harness.instructions.md');
|
|
69
|
+
fs.writeFileSync(vscodeInstFile, advisory.buildCopilotGlobalContent(), 'utf8');
|
|
70
|
+
console.log(` ✅ Installed global Copilot instructions to VS Code: ${vscodeInstFile}`);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
console.warn(` ⚠️ Failed to write VS Code user prompts folder: ${err.message}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
uninstall({ removeLocal, removeGlobal, workspaceRoot, userHome, getUserPromptsDir, cleanEmptyDirs }) {
|
|
77
|
+
const advisory = require('../../../../scripts/lib/advisory-text');
|
|
78
|
+
if (removeLocal) {
|
|
79
|
+
advisory.removeAdvisoryText(path.join(workspaceRoot, '.github', 'copilot-instructions.md'));
|
|
80
|
+
}
|
|
81
|
+
if (removeGlobal) {
|
|
82
|
+
const promptsDir = getUserPromptsDir();
|
|
83
|
+
const vscodeInstFile = path.join(promptsDir, 'harness.instructions.md');
|
|
84
|
+
if (fs.existsSync(vscodeInstFile)) {
|
|
85
|
+
fs.unlinkSync(vscodeInstFile);
|
|
86
|
+
console.log(` ✅ Removed global Copilot instructions: ${vscodeInstFile}`);
|
|
87
|
+
}
|
|
88
|
+
cleanEmptyDirs(promptsDir, [userHome]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
@@ -1,41 +1,71 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
|
|
4
|
-
// Cursor's own skills location (.cursor/skills/) is unchanged - it already
|
|
5
|
-
// has an established home. Only bookkeeping that never had a home (runtime
|
|
6
|
-
// state, install manifest) converges into .cursor/harness-everything/.
|
|
7
|
-
module.exports = {
|
|
8
|
-
name: 'cursor',
|
|
9
|
-
label: 'Cursor',
|
|
10
|
-
getHarnessDir(workspaceRoot) {
|
|
11
|
-
return path.join(workspaceRoot, '.cursor', 'harness-everything');
|
|
12
|
-
},
|
|
13
|
-
getStateDir(workspaceRoot) {
|
|
14
|
-
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
-
},
|
|
16
|
-
getSkillsDir(workspaceRoot) {
|
|
17
|
-
return path.join(workspaceRoot, '.cursor', 'skills');
|
|
18
|
-
},
|
|
19
|
-
getIgnorePatterns(workspaceRoot) {
|
|
20
|
-
const patterns = ['.cursor/harness-everything/'];
|
|
21
|
-
if (fs.existsSync(path.join(workspaceRoot, '.cursor', 'skills'))) {
|
|
22
|
-
patterns.push('.cursor/skills/');
|
|
23
|
-
}
|
|
24
|
-
return patterns;
|
|
25
|
-
},
|
|
26
|
-
isMatch(pattern, trimmedLine) {
|
|
27
|
-
if (pattern === '.cursor/harness-everything/') {
|
|
28
|
-
return trimmedLine === '.cursor/' ||
|
|
29
|
-
trimmedLine === '.cursor' ||
|
|
30
|
-
trimmedLine === '.cursor/harness-everything' ||
|
|
31
|
-
trimmedLine === '.cursor/harness-everything/';
|
|
32
|
-
}
|
|
33
|
-
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
-
},
|
|
35
|
-
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
-
if (isGlobal) {
|
|
37
|
-
return fs.existsSync(path.join(userHome, '.cursorrules'));
|
|
38
|
-
}
|
|
39
|
-
return fs.existsSync(path.join(workspaceRoot, '.cursorrules'));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
// Cursor's own skills location (.cursor/skills/) is unchanged - it already
|
|
5
|
+
// has an established home. Only bookkeeping that never had a home (runtime
|
|
6
|
+
// state, install manifest) converges into .cursor/harness-everything/.
|
|
7
|
+
module.exports = {
|
|
8
|
+
name: 'cursor',
|
|
9
|
+
label: 'Cursor',
|
|
10
|
+
getHarnessDir(workspaceRoot) {
|
|
11
|
+
return path.join(workspaceRoot, '.cursor', 'harness-everything');
|
|
12
|
+
},
|
|
13
|
+
getStateDir(workspaceRoot) {
|
|
14
|
+
return path.join(this.getHarnessDir(workspaceRoot), 'state');
|
|
15
|
+
},
|
|
16
|
+
getSkillsDir(workspaceRoot) {
|
|
17
|
+
return path.join(workspaceRoot, '.cursor', 'skills');
|
|
18
|
+
},
|
|
19
|
+
getIgnorePatterns(workspaceRoot) {
|
|
20
|
+
const patterns = ['.cursor/harness-everything/'];
|
|
21
|
+
if (fs.existsSync(path.join(workspaceRoot, '.cursor', 'skills'))) {
|
|
22
|
+
patterns.push('.cursor/skills/');
|
|
23
|
+
}
|
|
24
|
+
return patterns;
|
|
25
|
+
},
|
|
26
|
+
isMatch(pattern, trimmedLine) {
|
|
27
|
+
if (pattern === '.cursor/harness-everything/') {
|
|
28
|
+
return trimmedLine === '.cursor/' ||
|
|
29
|
+
trimmedLine === '.cursor' ||
|
|
30
|
+
trimmedLine === '.cursor/harness-everything' ||
|
|
31
|
+
trimmedLine === '.cursor/harness-everything/';
|
|
32
|
+
}
|
|
33
|
+
return trimmedLine === pattern || trimmedLine === pattern.slice(0, -1);
|
|
34
|
+
},
|
|
35
|
+
isInstalled(workspaceRoot, userHome, isGlobal) {
|
|
36
|
+
if (isGlobal) {
|
|
37
|
+
return fs.existsSync(path.join(userHome, '.cursorrules'));
|
|
38
|
+
}
|
|
39
|
+
return fs.existsSync(path.join(workspaceRoot, '.cursorrules'));
|
|
40
|
+
},
|
|
41
|
+
getSkillsTarget({ workspaceRoot, userHome, isGlobal, manifest }) {
|
|
42
|
+
if (isGlobal) {
|
|
43
|
+
const globalAgentsDir = path.join(userHome, '.agents');
|
|
44
|
+
return {
|
|
45
|
+
path: path.join(globalAgentsDir, 'skills'),
|
|
46
|
+
label: '~/.agents/skills/',
|
|
47
|
+
manifestPath: manifest.getManifestPath(globalAgentsDir),
|
|
48
|
+
};
|
|
49
|
+
} else {
|
|
50
|
+
const cursorDir = path.join(workspaceRoot, '.cursor');
|
|
51
|
+
return {
|
|
52
|
+
path: path.join(cursorDir, 'skills'),
|
|
53
|
+
label: '.cursor/skills/',
|
|
54
|
+
manifestPath: manifest.getManifestPath(cursorDir),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
install({ isGlobal, targetWorkspaceRoot, userHome, advisory }) {
|
|
59
|
+
const targetFile = isGlobal ? path.join(userHome, '.cursorrules') : path.join(targetWorkspaceRoot, '.cursorrules');
|
|
60
|
+
advisory.injectAdvisoryText(targetFile, '# Cursor Project Rules', isGlobal ? '~/.cursorrules' : '.cursorrules');
|
|
61
|
+
},
|
|
62
|
+
uninstall({ removeLocal, removeGlobal, workspaceRoot, userHome }) {
|
|
63
|
+
const advisory = require('../../../../scripts/lib/advisory-text');
|
|
64
|
+
if (removeLocal) {
|
|
65
|
+
advisory.removeAdvisoryText(path.join(workspaceRoot, '.cursorrules'));
|
|
66
|
+
}
|
|
67
|
+
if (removeGlobal) {
|
|
68
|
+
advisory.removeAdvisoryText(path.join(userHome, '.cursorrules'));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -28,5 +28,30 @@ module.exports = {
|
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
30
|
return fs.existsSync(path.join(workspaceRoot, '.hermes.md'));
|
|
31
|
+
},
|
|
32
|
+
getSkillsTarget({ workspaceRoot, userHome, isGlobal, manifest }) {
|
|
33
|
+
if (isGlobal) {
|
|
34
|
+
const globalAgentsDir = path.join(userHome, '.agents');
|
|
35
|
+
return {
|
|
36
|
+
path: path.join(globalAgentsDir, 'skills'),
|
|
37
|
+
label: '~/.agents/skills/',
|
|
38
|
+
manifestPath: manifest.getManifestPath(globalAgentsDir),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
},
|
|
43
|
+
install({ isGlobal, targetWorkspaceRoot, advisory }) {
|
|
44
|
+
if (!isGlobal) {
|
|
45
|
+
const targetFile = path.join(targetWorkspaceRoot, '.hermes.md');
|
|
46
|
+
advisory.injectAdvisoryText(targetFile, '# .hermes.md', '.hermes.md');
|
|
47
|
+
} else {
|
|
48
|
+
console.log(` ℹ️ Hermes Agent has no documented global instructions file (it reads .hermes.md from the current project directory only) - skipping global install for --hermes.`);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
uninstall({ removeLocal, removeGlobal, workspaceRoot, userHome }) {
|
|
52
|
+
const advisory = require('../../../../scripts/lib/advisory-text');
|
|
53
|
+
if (removeLocal) {
|
|
54
|
+
advisory.removeAdvisoryText(path.join(workspaceRoot, '.hermes.md'));
|
|
55
|
+
}
|
|
31
56
|
}
|
|
32
57
|
};
|