@soleri/forge 9.0.1 → 9.2.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 (64) hide show
  1. package/dist/compose-claude-md.js +1 -1
  2. package/dist/compose-claude-md.js.map +1 -1
  3. package/dist/scaffold-filetree.js +8 -13
  4. package/dist/scaffold-filetree.js.map +1 -1
  5. package/dist/skills/brain-debrief/SKILL.md +16 -12
  6. package/dist/skills/brainstorming/SKILL.md +9 -5
  7. package/dist/skills/code-patrol/SKILL.md +7 -7
  8. package/dist/skills/context-resume/SKILL.md +14 -11
  9. package/dist/skills/deep-review/SKILL.md +186 -0
  10. package/dist/skills/executing-plans/SKILL.md +13 -9
  11. package/dist/skills/fix-and-learn/SKILL.md +12 -8
  12. package/dist/skills/health-check/SKILL.md +21 -17
  13. package/dist/skills/knowledge-harvest/SKILL.md +10 -6
  14. package/dist/skills/onboard-me/SKILL.md +19 -16
  15. package/dist/skills/parallel-execute/SKILL.md +277 -0
  16. package/dist/skills/retrospective/SKILL.md +18 -15
  17. package/dist/skills/second-opinion/SKILL.md +6 -6
  18. package/dist/skills/systematic-debugging/SKILL.md +12 -8
  19. package/dist/skills/test-driven-development/SKILL.md +5 -5
  20. package/dist/skills/vault-capture/SKILL.md +9 -5
  21. package/dist/skills/vault-navigator/SKILL.md +14 -10
  22. package/dist/skills/vault-smells/SKILL.md +251 -0
  23. package/dist/skills/verification-before-completion/SKILL.md +8 -5
  24. package/dist/skills/writing-plans/SKILL.md +14 -11
  25. package/dist/templates/agents-md.js +2 -2
  26. package/dist/templates/agents-md.js.map +1 -1
  27. package/dist/templates/claude-md-template.js +2 -2
  28. package/dist/templates/claude-md-template.js.map +1 -1
  29. package/dist/templates/shared-rules.js +35 -1
  30. package/dist/templates/shared-rules.js.map +1 -1
  31. package/dist/templates/skills.js +28 -6
  32. package/dist/templates/skills.js.map +1 -1
  33. package/dist/types.d.ts +1 -1
  34. package/dist/types.js +6 -2
  35. package/dist/types.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/__tests__/scaffolder.test.ts +17 -35
  38. package/src/compose-claude-md.ts +1 -1
  39. package/src/scaffold-filetree.ts +9 -13
  40. package/src/skills/brain-debrief/SKILL.md +16 -12
  41. package/src/skills/brainstorming/SKILL.md +9 -5
  42. package/src/skills/code-patrol/SKILL.md +7 -7
  43. package/src/skills/context-resume/SKILL.md +14 -11
  44. package/src/skills/deep-review/SKILL.md +186 -0
  45. package/src/skills/executing-plans/SKILL.md +13 -9
  46. package/src/skills/fix-and-learn/SKILL.md +12 -8
  47. package/src/skills/health-check/SKILL.md +21 -17
  48. package/src/skills/knowledge-harvest/SKILL.md +10 -6
  49. package/src/skills/onboard-me/SKILL.md +19 -16
  50. package/src/skills/parallel-execute/SKILL.md +277 -0
  51. package/src/skills/retrospective/SKILL.md +18 -15
  52. package/src/skills/second-opinion/SKILL.md +6 -6
  53. package/src/skills/systematic-debugging/SKILL.md +12 -8
  54. package/src/skills/test-driven-development/SKILL.md +5 -5
  55. package/src/skills/vault-capture/SKILL.md +9 -5
  56. package/src/skills/vault-navigator/SKILL.md +14 -10
  57. package/src/skills/vault-smells/SKILL.md +251 -0
  58. package/src/skills/verification-before-completion/SKILL.md +8 -5
  59. package/src/skills/writing-plans/SKILL.md +14 -11
  60. package/src/templates/agents-md.ts +2 -2
  61. package/src/templates/claude-md-template.ts +2 -2
  62. package/src/templates/shared-rules.ts +36 -1
  63. package/src/templates/skills.ts +27 -6
  64. package/src/types.ts +7 -2
@@ -1,4 +1,4 @@
1
- import { readFileSync, readdirSync } from 'node:fs';
1
+ import { readFileSync, readdirSync, existsSync, statSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import type { AgentConfig } from '../types.js';
@@ -15,12 +15,14 @@ const AGENT_SPECIFIC_SKILLS = new Set([
15
15
  'brainstorming',
16
16
  'code-patrol',
17
17
  'context-resume',
18
+ 'deep-review',
18
19
  'deliver-and-ship',
19
20
  'executing-plans',
20
21
  'fix-and-learn',
21
22
  'health-check',
22
23
  'knowledge-harvest',
23
24
  'onboard-me',
25
+ 'parallel-execute',
24
26
  'retrospective',
25
27
  'second-opinion',
26
28
  'systematic-debugging',
@@ -28,6 +30,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
28
30
  'vault-capture',
29
31
  'vault-curate',
30
32
  'vault-navigator',
33
+ 'vault-smells',
31
34
  'verification-before-completion',
32
35
  'writing-plans',
33
36
  ]);
@@ -43,10 +46,10 @@ const AGENT_SPECIFIC_SKILLS = new Set([
43
46
  */
44
47
  export function generateSkills(config: AgentConfig): Array<[string, string]> {
45
48
  const files: Array<[string, string]> = [];
46
- let skillFiles: string[];
49
+ let entries: string[];
47
50
 
48
51
  try {
49
- skillFiles = readdirSync(SKILLS_DIR).filter((f) => f.endsWith('.md'));
52
+ entries = readdirSync(SKILLS_DIR);
50
53
  } catch {
51
54
  return files;
52
55
  }
@@ -55,14 +58,32 @@ export function generateSkills(config: AgentConfig): Array<[string, string]> {
55
58
  // undefined = include all (backward compat), [] = include none.
56
59
  const allowedSkills = config.skills ? new Set(config.skills) : null; // null = include all (backward compat)
57
60
 
58
- for (const file of skillFiles) {
59
- const skillName = file.replace('.md', '');
61
+ for (const entry of entries) {
62
+ const entryPath = join(SKILLS_DIR, entry);
63
+
64
+ // Support both layouts:
65
+ // - Directory: skills/{name}/SKILL.md (current)
66
+ // - Flat file: skills/{name}.md (legacy)
67
+ let skillName: string;
68
+ let contentPath: string;
69
+
70
+ if (statSync(entryPath).isDirectory()) {
71
+ const skillMd = join(entryPath, 'SKILL.md');
72
+ if (!existsSync(skillMd)) continue;
73
+ skillName = entry;
74
+ contentPath = skillMd;
75
+ } else if (entry.endsWith('.md')) {
76
+ skillName = entry.replace('.md', '');
77
+ contentPath = entryPath;
78
+ } else {
79
+ continue;
80
+ }
60
81
 
61
82
  if (allowedSkills && !allowedSkills.has(skillName)) {
62
83
  continue;
63
84
  }
64
85
 
65
- let content = readFileSync(join(SKILLS_DIR, file), 'utf-8');
86
+ let content = readFileSync(contentPath, 'utf-8');
66
87
 
67
88
  if (AGENT_SPECIFIC_SKILLS.has(skillName)) {
68
89
  content = content.replace(/YOUR_AGENT_core/g, `${config.id}_core`);
package/src/types.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import { z } from 'zod';
2
+ import { join } from 'node:path';
3
+ import { homedir } from 'node:os';
2
4
 
3
5
  /** Communication tone for the agent persona */
4
6
  const TONES = ['precise', 'mentor', 'pragmatic'] as const;
5
7
 
8
+ /** Default parent directory for new agents: ~/.soleri/ */
9
+ const SOLERI_HOME_DEFAULT = process.env.SOLERI_HOME ?? join(homedir(), '.soleri');
10
+
6
11
  /** Where to scaffold host/client integration setup. */
7
12
  export const SETUP_TARGETS = ['claude', 'codex', 'opencode', 'both', 'all'] as const;
8
13
  export type SetupTarget = (typeof SETUP_TARGETS)[number];
@@ -39,8 +44,8 @@ export const AgentConfigSchema = z.object({
39
44
  tone: z.enum(TONES).optional().default('pragmatic'),
40
45
  /** Greeting message when agent introduces itself (auto-generated if omitted) */
41
46
  greeting: z.string().min(10).max(300).optional(),
42
- /** Output directory (parent — agent dir will be created inside, defaults to cwd) */
43
- outputDir: z.string().min(1).optional().default(process.cwd()),
47
+ /** Output directory (parent — agent dir will be created inside, defaults to ~/.soleri/) */
48
+ outputDir: z.string().min(1).optional().default(SOLERI_HOME_DEFAULT),
44
49
  /** Hook packs to install after scaffolding (optional) */
45
50
  hookPacks: z.array(z.string()).optional(),
46
51
  /** Skills to include (if omitted, all skills are included for backward compat) */