@crewpilot/agent 1.0.0 → 2.0.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 (27) hide show
  1. package/README.md +131 -107
  2. package/dist-npm/cli.js +0 -0
  3. package/dist-npm/index.js +160 -127
  4. package/package.json +69 -69
  5. package/prompts/agent.md +282 -266
  6. package/prompts/catalyst.config.json +72 -72
  7. package/prompts/copilot-instructions.md +36 -36
  8. package/prompts/skills/assure-code-quality/SKILL.md +112 -112
  9. package/prompts/skills/assure-pr-intelligence/SKILL.md +148 -148
  10. package/prompts/skills/assure-review-functional/SKILL.md +114 -0
  11. package/prompts/skills/assure-review-standards/SKILL.md +106 -0
  12. package/prompts/skills/assure-threat-model/SKILL.md +182 -0
  13. package/prompts/skills/assure-vulnerability-scan/SKILL.md +146 -146
  14. package/prompts/skills/autopilot-meeting/SKILL.md +434 -407
  15. package/prompts/skills/autopilot-worker/SKILL.md +737 -623
  16. package/prompts/skills/daily-digest/SKILL.md +188 -167
  17. package/prompts/skills/deliver-change-management/SKILL.md +132 -132
  18. package/prompts/skills/deliver-deploy-guard/SKILL.md +144 -144
  19. package/prompts/skills/deliver-doc-governance/SKILL.md +130 -130
  20. package/prompts/skills/engineer-feature-builder/SKILL.md +270 -270
  21. package/prompts/skills/engineer-root-cause-analysis/SKILL.md +150 -150
  22. package/prompts/skills/engineer-test-first/SKILL.md +148 -148
  23. package/prompts/skills/insights-knowledge-base/SKILL.md +202 -181
  24. package/prompts/skills/insights-pattern-detection/SKILL.md +142 -142
  25. package/prompts/skills/strategize-architecture-planner/SKILL.md +141 -141
  26. package/prompts/skills/strategize-solution-design/SKILL.md +118 -118
  27. package/scripts/postinstall.js +108 -108
@@ -1,108 +1,108 @@
1
- /**
2
- * postinstall.js — Runs after `npm install @crewpilot/agent`
3
- *
4
- * Creates .github/ files in the user's project so @Catalyst agent
5
- * appears in Copilot Chat dropdown automatically.
6
- *
7
- * Uses INIT_CWD (set by npm to the directory where `npm install` was run).
8
- * Silently exits on global installs or npx (no project root).
9
- */
10
-
11
- import fs from 'fs';
12
- import path from 'path';
13
- import { fileURLToPath } from 'url';
14
-
15
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
16
-
17
- // INIT_CWD is the directory where the user ran `npm install`
18
- const projectRoot = process.env.INIT_CWD;
19
-
20
- // Skip if no project root (global install, npx, CI, etc.)
21
- if (!projectRoot) {
22
- process.exit(0);
23
- }
24
-
25
- // Skip if installing as a dependency of this package itself (dev scenario)
26
- const ownPackageDir = path.join(__dirname, '..');
27
- if (path.resolve(projectRoot) === path.resolve(ownPackageDir)) {
28
- process.exit(0);
29
- }
30
-
31
- // Skip if no package.json in project root (not a real project)
32
- if (!fs.existsSync(path.join(projectRoot, 'package.json'))) {
33
- process.exit(0);
34
- }
35
-
36
- const githubDir = path.join(projectRoot, '.github');
37
- const promptsDir = path.join(__dirname, '..', 'prompts');
38
-
39
- // If prompts aren't bundled, silently exit
40
- if (!fs.existsSync(promptsDir)) {
41
- process.exit(0);
42
- }
43
-
44
- let created = 0;
45
- let skipped = 0;
46
-
47
- /**
48
- * Copy a file from prompts/ to .github/ — never overwrites existing files
49
- */
50
- function syncFile(srcName, destRelative) {
51
- const src = path.join(promptsDir, srcName);
52
- const dest = path.join(githubDir, destRelative);
53
-
54
- if (!fs.existsSync(src)) return;
55
-
56
- if (fs.existsSync(dest)) {
57
- skipped++;
58
- return;
59
- }
60
-
61
- fs.mkdirSync(path.dirname(dest), { recursive: true });
62
- fs.copyFileSync(src, dest);
63
- created++;
64
- }
65
-
66
- /**
67
- * Copy all skills from prompts/skills/ to .github/skills/
68
- */
69
- function syncSkills() {
70
- const skillsDir = path.join(promptsDir, 'skills');
71
- if (!fs.existsSync(skillsDir)) return;
72
-
73
- const skillDirs = fs.readdirSync(skillsDir).filter(d =>
74
- fs.statSync(path.join(skillsDir, d)).isDirectory()
75
- );
76
-
77
- for (const name of skillDirs) {
78
- const src = path.join(skillsDir, name, 'SKILL.md');
79
- if (!fs.existsSync(src)) continue;
80
-
81
- const dest = path.join(githubDir, 'skills', name, 'SKILL.md');
82
- if (fs.existsSync(dest)) {
83
- skipped++;
84
- continue;
85
- }
86
-
87
- fs.mkdirSync(path.dirname(dest), { recursive: true });
88
- fs.copyFileSync(src, dest);
89
- created++;
90
- }
91
- }
92
-
93
- // --- Run ---
94
- try {
95
- fs.mkdirSync(githubDir, { recursive: true });
96
-
97
- syncFile('agent.md', path.join('agents', 'catalyst.md'));
98
- syncFile('copilot-instructions.md', 'copilot-instructions.md');
99
- syncFile('catalyst.config.json', 'catalyst.config.json');
100
- syncSkills();
101
-
102
- if (created > 0) {
103
- console.log(`\n ⚡ CrewPilot: Created ${created} file(s) in .github/ (${skipped} already existed)`);
104
- console.log(' ⚡ Open Copilot Chat and select @Catalyst from the agent dropdown\n');
105
- }
106
- } catch {
107
- // Silently fail — postinstall should never break npm install
108
- }
1
+ /**
2
+ * postinstall.js — Runs after `npm install @crewpilot/agent`
3
+ *
4
+ * Creates .github/ files in the user's project so @Catalyst agent
5
+ * appears in Copilot Chat dropdown automatically.
6
+ *
7
+ * Uses INIT_CWD (set by npm to the directory where `npm install` was run).
8
+ * Silently exits on global installs or npx (no project root).
9
+ */
10
+
11
+ import fs from 'fs';
12
+ import path from 'path';
13
+ import { fileURLToPath } from 'url';
14
+
15
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
16
+
17
+ // INIT_CWD is the directory where the user ran `npm install`
18
+ const projectRoot = process.env.INIT_CWD;
19
+
20
+ // Skip if no project root (global install, npx, CI, etc.)
21
+ if (!projectRoot) {
22
+ process.exit(0);
23
+ }
24
+
25
+ // Skip if installing as a dependency of this package itself (dev scenario)
26
+ const ownPackageDir = path.join(__dirname, '..');
27
+ if (path.resolve(projectRoot) === path.resolve(ownPackageDir)) {
28
+ process.exit(0);
29
+ }
30
+
31
+ // Skip if no package.json in project root (not a real project)
32
+ if (!fs.existsSync(path.join(projectRoot, 'package.json'))) {
33
+ process.exit(0);
34
+ }
35
+
36
+ const githubDir = path.join(projectRoot, '.github');
37
+ const promptsDir = path.join(__dirname, '..', 'prompts');
38
+
39
+ // If prompts aren't bundled, silently exit
40
+ if (!fs.existsSync(promptsDir)) {
41
+ process.exit(0);
42
+ }
43
+
44
+ let created = 0;
45
+ let skipped = 0;
46
+
47
+ /**
48
+ * Copy a file from prompts/ to .github/ — never overwrites existing files
49
+ */
50
+ function syncFile(srcName, destRelative) {
51
+ const src = path.join(promptsDir, srcName);
52
+ const dest = path.join(githubDir, destRelative);
53
+
54
+ if (!fs.existsSync(src)) return;
55
+
56
+ if (fs.existsSync(dest)) {
57
+ skipped++;
58
+ return;
59
+ }
60
+
61
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
62
+ fs.copyFileSync(src, dest);
63
+ created++;
64
+ }
65
+
66
+ /**
67
+ * Copy all skills from prompts/skills/ to .github/skills/
68
+ */
69
+ function syncSkills() {
70
+ const skillsDir = path.join(promptsDir, 'skills');
71
+ if (!fs.existsSync(skillsDir)) return;
72
+
73
+ const skillDirs = fs.readdirSync(skillsDir).filter(d =>
74
+ fs.statSync(path.join(skillsDir, d)).isDirectory()
75
+ );
76
+
77
+ for (const name of skillDirs) {
78
+ const src = path.join(skillsDir, name, 'SKILL.md');
79
+ if (!fs.existsSync(src)) continue;
80
+
81
+ const dest = path.join(githubDir, 'skills', name, 'SKILL.md');
82
+ if (fs.existsSync(dest)) {
83
+ skipped++;
84
+ continue;
85
+ }
86
+
87
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
88
+ fs.copyFileSync(src, dest);
89
+ created++;
90
+ }
91
+ }
92
+
93
+ // --- Run ---
94
+ try {
95
+ fs.mkdirSync(githubDir, { recursive: true });
96
+
97
+ syncFile('agent.md', path.join('agents', 'catalyst.md'));
98
+ syncFile('copilot-instructions.md', 'copilot-instructions.md');
99
+ syncFile('catalyst.config.json', 'catalyst.config.json');
100
+ syncSkills();
101
+
102
+ if (created > 0) {
103
+ console.log(`\n ⚡ CrewPilot: Created ${created} file(s) in .github/ (${skipped} already existed)`);
104
+ console.log(' ⚡ Open Copilot Chat and select @Catalyst from the agent dropdown\n');
105
+ }
106
+ } catch {
107
+ // Silently fail — postinstall should never break npm install
108
+ }