codingbuddy-rules 5.0.0 → 5.1.1

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 (53) hide show
  1. package/.ai-rules/adapters/aider.md +374 -0
  2. package/.ai-rules/adapters/windsurf.md +395 -0
  3. package/.ai-rules/agents/accessibility-specialist.json +6 -0
  4. package/.ai-rules/agents/act-mode.json +6 -0
  5. package/.ai-rules/agents/agent-architect.json +6 -0
  6. package/.ai-rules/agents/ai-ml-engineer.json +6 -0
  7. package/.ai-rules/agents/architecture-specialist.json +6 -0
  8. package/.ai-rules/agents/auto-mode.json +6 -0
  9. package/.ai-rules/agents/backend-developer.json +6 -0
  10. package/.ai-rules/agents/code-quality-specialist.json +6 -0
  11. package/.ai-rules/agents/code-reviewer.json +25 -4
  12. package/.ai-rules/agents/data-engineer.json +6 -0
  13. package/.ai-rules/agents/data-scientist.json +6 -0
  14. package/.ai-rules/agents/devops-engineer.json +6 -0
  15. package/.ai-rules/agents/documentation-specialist.json +6 -0
  16. package/.ai-rules/agents/eval-mode.json +11 -1
  17. package/.ai-rules/agents/event-architecture-specialist.json +6 -0
  18. package/.ai-rules/agents/frontend-developer.json +6 -0
  19. package/.ai-rules/agents/i18n-specialist.json +6 -0
  20. package/.ai-rules/agents/integration-specialist.json +6 -0
  21. package/.ai-rules/agents/migration-specialist.json +6 -0
  22. package/.ai-rules/agents/mobile-developer.json +7 -10
  23. package/.ai-rules/agents/observability-specialist.json +6 -0
  24. package/.ai-rules/agents/parallel-orchestrator.json +6 -0
  25. package/.ai-rules/agents/performance-specialist.json +6 -0
  26. package/.ai-rules/agents/plan-mode.json +6 -0
  27. package/.ai-rules/agents/plan-reviewer.json +7 -4
  28. package/.ai-rules/agents/platform-engineer.json +6 -0
  29. package/.ai-rules/agents/security-engineer.json +6 -0
  30. package/.ai-rules/agents/security-specialist.json +6 -0
  31. package/.ai-rules/agents/seo-specialist.json +6 -0
  32. package/.ai-rules/agents/software-engineer.json +6 -0
  33. package/.ai-rules/agents/solution-architect.json +6 -0
  34. package/.ai-rules/agents/systems-developer.json +6 -0
  35. package/.ai-rules/agents/technical-planner.json +6 -0
  36. package/.ai-rules/agents/test-engineer.json +6 -0
  37. package/.ai-rules/agents/test-strategy-specialist.json +6 -0
  38. package/.ai-rules/agents/tooling-engineer.json +6 -0
  39. package/.ai-rules/agents/ui-ux-designer.json +6 -0
  40. package/.ai-rules/schemas/agent.schema.json +38 -0
  41. package/.ai-rules/skills/README.md +6 -0
  42. package/.ai-rules/skills/agent-design/examples/agent-template.json +1 -4
  43. package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +8 -13
  44. package/.ai-rules/skills/onboard/SKILL.md +150 -0
  45. package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
  46. package/.ai-rules/skills/retrospective/SKILL.md +192 -0
  47. package/.ai-rules/skills/ship/SKILL.md +242 -0
  48. package/.ai-rules/skills/skill-creator/assets/eval_review.html +539 -260
  49. package/bin/cli.js +11 -19
  50. package/lib/init/detect-stack.js +18 -4
  51. package/lib/init/prompt.js +2 -2
  52. package/lib/init/suggest-agent.js +13 -2
  53. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -8,7 +8,8 @@ const path = require('path');
8
8
  const RULES_DIR = path.resolve(__dirname, '..', '.ai-rules');
9
9
 
10
10
  function showHelp() {
11
- console.log(`
11
+ console.log(
12
+ `
12
13
  codingbuddy - AI coding rules CLI
13
14
 
14
15
  Usage:
@@ -22,13 +23,12 @@ Commands:
22
23
  Options:
23
24
  --help, -h Show this help message
24
25
  --version, -v Show version
25
- `.trim());
26
+ `.trim(),
27
+ );
26
28
  }
27
29
 
28
30
  function showVersion() {
29
- const pkg = JSON.parse(
30
- fs.readFileSync(path.resolve(__dirname, '..', 'package.json'), 'utf8'),
31
- );
31
+ const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.json'), 'utf8'));
32
32
  console.log(pkg.version);
33
33
  }
34
34
 
@@ -41,15 +41,13 @@ function listAgents() {
41
41
 
42
42
  const files = fs
43
43
  .readdirSync(agentsDir)
44
- .filter((f) => f.endsWith('.json'))
44
+ .filter(f => f.endsWith('.json'))
45
45
  .sort();
46
46
 
47
47
  console.log(`Available agents (${files.length}):\n`);
48
48
  for (const file of files) {
49
49
  try {
50
- const agent = JSON.parse(
51
- fs.readFileSync(path.join(agentsDir, file), 'utf8'),
52
- );
50
+ const agent = JSON.parse(fs.readFileSync(path.join(agentsDir, file), 'utf8'));
53
51
  const name = agent.name || path.basename(file, '.json');
54
52
  const desc = agent.description || '';
55
53
  console.log(` ${name.padEnd(30)} ${desc}`);
@@ -71,9 +69,7 @@ function validate() {
71
69
  // Validate agents JSON
72
70
  const agentsDir = path.join(RULES_DIR, 'agents');
73
71
  if (fs.existsSync(agentsDir)) {
74
- const jsonFiles = fs
75
- .readdirSync(agentsDir)
76
- .filter((f) => f.endsWith('.json'));
72
+ const jsonFiles = fs.readdirSync(agentsDir).filter(f => f.endsWith('.json'));
77
73
  for (const file of jsonFiles) {
78
74
  try {
79
75
  JSON.parse(fs.readFileSync(path.join(agentsDir, file), 'utf8'));
@@ -88,9 +84,7 @@ function validate() {
88
84
  // Validate rules markdown files exist
89
85
  const rulesDir = path.join(RULES_DIR, 'rules');
90
86
  if (fs.existsSync(rulesDir)) {
91
- const mdFiles = fs
92
- .readdirSync(rulesDir)
93
- .filter((f) => f.endsWith('.md'));
87
+ const mdFiles = fs.readdirSync(rulesDir).filter(f => f.endsWith('.md'));
94
88
  if (mdFiles.length === 0) {
95
89
  console.error('FAIL rules/ - no markdown files found');
96
90
  errors++;
@@ -105,9 +99,7 @@ function validate() {
105
99
  // Validate schemas directory
106
100
  const schemasDir = path.join(RULES_DIR, 'schemas');
107
101
  if (fs.existsSync(schemasDir)) {
108
- const schemaFiles = fs
109
- .readdirSync(schemasDir)
110
- .filter((f) => f.endsWith('.json'));
102
+ const schemaFiles = fs.readdirSync(schemasDir).filter(f => f.endsWith('.json'));
111
103
  for (const file of schemaFiles) {
112
104
  try {
113
105
  JSON.parse(fs.readFileSync(path.join(schemasDir, file), 'utf8'));
@@ -140,7 +132,7 @@ function validate() {
140
132
 
141
133
  function init() {
142
134
  const { run } = require('../lib/init');
143
- run().catch((err) => {
135
+ run().catch(err => {
144
136
  console.error('Error:', err.message);
145
137
  process.exit(1);
146
138
  });
@@ -6,8 +6,13 @@ const path = require('node:path');
6
6
  const FRONTEND_FRAMEWORKS = ['react', 'vue', 'angular', 'svelte', 'solid-js'];
7
7
  const FULLSTACK_FRAMEWORKS = ['next', 'nuxt', 'remix', 'sveltekit', 'astro'];
8
8
  const BACKEND_FRAMEWORKS = [
9
- '@nestjs/core', 'express', 'fastify', 'koa', 'hapi',
10
- '@hono/node-server', 'hono',
9
+ '@nestjs/core',
10
+ 'express',
11
+ 'fastify',
12
+ 'koa',
13
+ 'hapi',
14
+ '@hono/node-server',
15
+ 'hono',
11
16
  ];
12
17
  const MOBILE_FRAMEWORKS = ['react-native', 'expo', '@capacitor/core', 'ionic'];
13
18
 
@@ -17,7 +22,12 @@ const MOBILE_FRAMEWORKS = ['react-native', 'expo', '@capacitor/core', 'ionic'];
17
22
  * @returns {{ runtime: string, language: string, frameworks: string[], category: string }}
18
23
  */
19
24
  function detectStack(cwd) {
20
- const result = { runtime: 'unknown', language: 'javascript', frameworks: [], category: 'unknown' };
25
+ const result = {
26
+ runtime: 'unknown',
27
+ language: 'javascript',
28
+ frameworks: [],
29
+ category: 'unknown',
30
+ };
21
31
 
22
32
  if (tryDetectNode(cwd, result)) return result;
23
33
  if (tryDetectPython(cwd, result)) return result;
@@ -79,7 +89,11 @@ function tryDetectNode(cwd, result) {
79
89
  result.category = 'fullstack';
80
90
  } else if (detected.some(f => FRONTEND_FRAMEWORKS.includes(f))) {
81
91
  result.category = 'frontend';
82
- } else if (detected.some(f => ['nestjs', ...BACKEND_FRAMEWORKS.map(b => b.startsWith('@') ? 'nestjs' : b)].includes(f))) {
92
+ } else if (
93
+ detected.some(f =>
94
+ ['nestjs', ...BACKEND_FRAMEWORKS.map(b => (b.startsWith('@') ? 'nestjs' : b))].includes(f),
95
+ )
96
+ ) {
83
97
  result.category = 'backend';
84
98
  } else {
85
99
  result.category = 'backend'; // default for Node without frameworks
@@ -12,8 +12,8 @@ function ask(question, defaultValue) {
12
12
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
13
13
  const suffix = defaultValue ? ` (${defaultValue})` : '';
14
14
 
15
- return new Promise((resolve) => {
16
- rl.question(`${question}${suffix}: `, (answer) => {
15
+ return new Promise(resolve => {
16
+ rl.question(`${question}${suffix}: `, answer => {
17
17
  rl.close();
18
18
  resolve(answer.trim() || defaultValue || '');
19
19
  });
@@ -12,7 +12,15 @@ const RUNTIME_AGENTS = {
12
12
  python: 'backend-developer',
13
13
  };
14
14
 
15
- const DATA_SCIENCE_FRAMEWORKS = ['pandas', 'numpy', 'scipy', 'jupyter', 'tensorflow', 'pytorch', 'scikit-learn'];
15
+ const DATA_SCIENCE_FRAMEWORKS = [
16
+ 'pandas',
17
+ 'numpy',
18
+ 'scipy',
19
+ 'jupyter',
20
+ 'tensorflow',
21
+ 'pytorch',
22
+ 'scikit-learn',
23
+ ];
16
24
 
17
25
  /**
18
26
  * Suggest the best primary agent based on detected tech stack.
@@ -21,7 +29,10 @@ const DATA_SCIENCE_FRAMEWORKS = ['pandas', 'numpy', 'scipy', 'jupyter', 'tensorf
21
29
  */
22
30
  function suggestAgent(stack) {
23
31
  // Data science detection for Python
24
- if (stack.runtime === 'python' && stack.frameworks.some(f => DATA_SCIENCE_FRAMEWORKS.includes(f))) {
32
+ if (
33
+ stack.runtime === 'python' &&
34
+ stack.frameworks.some(f => DATA_SCIENCE_FRAMEWORKS.includes(f))
35
+ ) {
25
36
  return 'data-scientist';
26
37
  }
27
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codingbuddy-rules",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "description": "AI coding rules for consistent practices across AI assistants",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",