@ceyhunbilir/synaphex 1.0.6 → 1.0.10
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 +49 -1
- package/dist/commands/load-config.d.ts +2 -0
- package/dist/commands/load-config.d.ts.map +1 -0
- package/dist/commands/load-config.js +139 -0
- package/dist/commands/load-config.js.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/project.d.ts.map +1 -1
- package/dist/lib/project.js +32 -7
- package/dist/lib/project.js.map +1 -1
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +251 -64
- package/dist/lib/settings.js.map +1 -1
- package/dist/types.d.ts +15 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/fix.md +15 -0
- package/skills/query.md +17 -0
- package/skills/settings.md +1 -58
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ Output (Markdown + JSON)
|
|
|
20
20
|
|
|
21
21
|
Works across **Claude.ai**, **VS Code**, **JetBrains**, and any IDE running Claude Code.
|
|
22
22
|
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- **Node.js 18+** (or higher)
|
|
26
|
+
- Check: `node --version`
|
|
27
|
+
- If using nvm: `nvm use 18` (or 20, 22, etc.)
|
|
28
|
+
|
|
23
29
|
## Installation
|
|
24
30
|
|
|
25
31
|
```bash
|
|
@@ -66,7 +72,49 @@ Asks if you want to skip the research phase.
|
|
|
66
72
|
|
|
67
73
|
## Configuration
|
|
68
74
|
|
|
69
|
-
Edit `~/.claude/projects/<project>/config.md` to change LLM provider
|
|
75
|
+
Edit `~/.claude/projects/<project>/config.md` to change LLM provider, or use:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
synaphex configure <project>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This opens an interactive CLI to configure:
|
|
82
|
+
- **LLM Provider** — Claude, OpenAI, or Gemini
|
|
83
|
+
- **Model** — Select from presets or enter custom
|
|
84
|
+
- **Agent Settings** — Customize each of the 5 agents (focus, depth, instructions)
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
### "synaphex: command not found"
|
|
89
|
+
|
|
90
|
+
You may have Node 10 as your default. Check your Node version:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node --version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If it's below 18, upgrade:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Using nvm
|
|
100
|
+
nvm use 18 # or higher (18, 20, 22, etc.)
|
|
101
|
+
|
|
102
|
+
# Then reinstall
|
|
103
|
+
npm install -g @ceyhunbilir/synaphex
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### npm errors during install
|
|
107
|
+
|
|
108
|
+
If you get permission errors, use nvm to manage Node versions instead of system-wide npm:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Set Node 20 as default
|
|
112
|
+
nvm alias default 20
|
|
113
|
+
nvm use 20
|
|
114
|
+
|
|
115
|
+
# Then install
|
|
116
|
+
npm install -g @ceyhunbilir/synaphex
|
|
117
|
+
```
|
|
70
118
|
|
|
71
119
|
## License
|
|
72
120
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/commands/load-config.ts"],"names":[],"mappings":"AA2FA,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCzE"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.handleLoadConfig = handleLoadConfig;
|
|
37
|
+
const fs = __importStar(require("fs-extra"));
|
|
38
|
+
const paths_js_1 = require("../lib/paths.js");
|
|
39
|
+
function parseConfigFile(content) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
42
|
+
if (!match) {
|
|
43
|
+
throw new Error('Invalid config file format');
|
|
44
|
+
}
|
|
45
|
+
const frontmatterText = match[1];
|
|
46
|
+
const frontmatter = {
|
|
47
|
+
project: '',
|
|
48
|
+
created_at: new Date().toISOString(),
|
|
49
|
+
};
|
|
50
|
+
const lines = frontmatterText.split('\n');
|
|
51
|
+
let inAgents = false;
|
|
52
|
+
let currentAgent = null;
|
|
53
|
+
const agents = {};
|
|
54
|
+
for (const line of lines) {
|
|
55
|
+
if (line.startsWith('agents:')) {
|
|
56
|
+
inAgents = true;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (inAgents && line.match(/^ \w+:/)) {
|
|
60
|
+
currentAgent = (_b = (_a = line.match(/^\s*(\w+):/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
|
|
61
|
+
if (currentAgent) {
|
|
62
|
+
agents[currentAgent] = {
|
|
63
|
+
provider: 'claude',
|
|
64
|
+
model: 'claude-opus-4-5',
|
|
65
|
+
focus: '',
|
|
66
|
+
depth: 'standard',
|
|
67
|
+
custom_instructions: '',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (inAgents && currentAgent && line.includes(':')) {
|
|
73
|
+
const [key, ...valueParts] = line.split(':');
|
|
74
|
+
const trimmedKey = key.trim();
|
|
75
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
76
|
+
if (trimmedKey === 'focus' || trimmedKey === 'custom_instructions' || trimmedKey === 'provider' || trimmedKey === 'model') {
|
|
77
|
+
agents[currentAgent][trimmedKey] = value;
|
|
78
|
+
}
|
|
79
|
+
else if (trimmedKey === 'depth') {
|
|
80
|
+
agents[currentAgent][trimmedKey] = value;
|
|
81
|
+
}
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (!inAgents && line.includes(':')) {
|
|
85
|
+
const [key, ...valueParts] = line.split(':');
|
|
86
|
+
const trimmedKey = key.trim();
|
|
87
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
88
|
+
if (trimmedKey === 'project')
|
|
89
|
+
frontmatter.project = value;
|
|
90
|
+
if (trimmedKey === 'created_at')
|
|
91
|
+
frontmatter.created_at = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (Object.keys(agents).length > 0) {
|
|
95
|
+
frontmatter.agents = {
|
|
96
|
+
examiner: agents.examiner || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
97
|
+
researcher: agents.researcher || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
98
|
+
coder: agents.coder || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
99
|
+
questioner: agents.questioner || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
100
|
+
reviewer: agents.reviewer || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return frontmatter;
|
|
104
|
+
}
|
|
105
|
+
async function handleLoadConfig(projectName) {
|
|
106
|
+
const configPath = paths_js_1.Paths.config(projectName);
|
|
107
|
+
if (!fs.existsSync(configPath)) {
|
|
108
|
+
console.error(`Error: Project '${projectName}' not found.`);
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
113
|
+
const config = parseConfigFile(content);
|
|
114
|
+
console.log(`=== Agent Customizations for ${projectName} ===\n`);
|
|
115
|
+
if (!config.agents || Object.keys(config.agents).length === 0) {
|
|
116
|
+
console.log('No agent customizations configured.\n');
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const agentNames = ['examiner', 'researcher', 'coder', 'questioner', 'reviewer'];
|
|
120
|
+
for (const agentName of agentNames) {
|
|
121
|
+
const agent = config.agents[agentName];
|
|
122
|
+
if (!agent)
|
|
123
|
+
continue;
|
|
124
|
+
const displayName = agentName.charAt(0).toUpperCase() + agentName.slice(1);
|
|
125
|
+
console.log(`${displayName}:`);
|
|
126
|
+
console.log(` Provider: ${agent.provider}`);
|
|
127
|
+
console.log(` Model: ${agent.model}`);
|
|
128
|
+
console.log(` Focus: ${agent.focus || '(none)'}`);
|
|
129
|
+
console.log(` Depth: ${agent.depth}`);
|
|
130
|
+
console.log(` Custom instructions: ${agent.custom_instructions ? agent.custom_instructions : '(none)'}`);
|
|
131
|
+
console.log();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
console.error(`Error reading config: ${err instanceof Error ? err.message : String(err)}`);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=load-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../src/commands/load-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,4CAwCC;AAnID,6CAA+B;AAC/B,8CAAwC;AAcxC,SAAS,eAAe,CAAC,OAAe;;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,WAAW,GAAsB;QACrC,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAC;IAEF,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,YAAY,GAAkB,IAAI,CAAC;IACvC,MAAM,MAAM,GAGR,EAAE,CAAC;IAEP,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;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C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACvC,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC3E,OAAO,CAAC,GAAG,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,IAAI,QAAQ,EAAE,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CACT,0BAA0B,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC7F,CAAC;YACF,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,yBAAyB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const save_output_1 = require("./commands/save-output");
|
|
|
7
7
|
const load_memory_1 = require("./commands/load-memory");
|
|
8
8
|
const list_outputs_1 = require("./commands/list-outputs");
|
|
9
9
|
const configure_1 = require("./commands/configure");
|
|
10
|
+
const load_config_1 = require("./commands/load-config");
|
|
10
11
|
const program = new commander_1.Command();
|
|
11
12
|
program
|
|
12
13
|
.name('synaphex')
|
|
@@ -32,6 +33,10 @@ program
|
|
|
32
33
|
.command('configure <project>')
|
|
33
34
|
.description('Interactive CLI to configure provider and model settings')
|
|
34
35
|
.action(configure_1.handleConfigure);
|
|
36
|
+
program
|
|
37
|
+
.command('load-config <project>')
|
|
38
|
+
.description('Load and output project agent customizations')
|
|
39
|
+
.action(load_config_1.handleLoadConfig);
|
|
35
40
|
program.parse(process.argv);
|
|
36
41
|
if (!process.argv.slice(2).length) {
|
|
37
42
|
program.outputHelp();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAAuC;AACvC,wDAA0D;AAC1D,wDAA0D;AAC1D,0DAA4D;AAC5D,oDAAuD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAAuC;AACvC,wDAA0D;AAC1D,wDAA0D;AAC1D,0DAA4D;AAC5D,oDAAuD;AACvD,wDAA0D;AAE1D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,wEAAwE,CAAC;KACrF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,gEAAgE,CAAC;KAC7E,MAAM,CAAC,WAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,sCAAsC,CAAC;KACnD,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO;KACJ,OAAO,CAAC,wBAAwB,CAAC;KACjC,WAAW,CAAC,yCAAyC,CAAC;KACtD,MAAM,CAAC,gCAAiB,CAAC,CAAC;AAE7B,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CAAC,0DAA0D,CAAC;KACvE,MAAM,CAAC,2BAAe,CAAC,CAAC;AAE3B,OAAO;KACJ,OAAO,CAAC,uBAAuB,CAAC;KAChC,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,8BAAgB,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/lib/project.ts"],"names":[],"mappings":"AAIA,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/lib/project.ts"],"names":[],"mappings":"AAIA,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoG1E"}
|
package/dist/lib/project.js
CHANGED
|
@@ -20,14 +20,43 @@ async function initializeProject(projectName) {
|
|
|
20
20
|
const now = new Date().toISOString();
|
|
21
21
|
const configContent = `---
|
|
22
22
|
project: ${projectName}
|
|
23
|
-
provider: claude
|
|
24
|
-
model: claude-opus-4-5
|
|
25
23
|
created_at: ${now}
|
|
24
|
+
agents:
|
|
25
|
+
examiner:
|
|
26
|
+
provider: claude
|
|
27
|
+
model: claude-opus-4-5
|
|
28
|
+
focus: ""
|
|
29
|
+
depth: standard
|
|
30
|
+
custom_instructions: ""
|
|
31
|
+
researcher:
|
|
32
|
+
provider: claude
|
|
33
|
+
model: claude-opus-4-5
|
|
34
|
+
focus: ""
|
|
35
|
+
depth: standard
|
|
36
|
+
custom_instructions: ""
|
|
37
|
+
coder:
|
|
38
|
+
provider: claude
|
|
39
|
+
model: claude-opus-4-5
|
|
40
|
+
focus: ""
|
|
41
|
+
depth: standard
|
|
42
|
+
custom_instructions: ""
|
|
43
|
+
questioner:
|
|
44
|
+
provider: claude
|
|
45
|
+
model: claude-opus-4-5
|
|
46
|
+
focus: ""
|
|
47
|
+
depth: standard
|
|
48
|
+
custom_instructions: ""
|
|
49
|
+
reviewer:
|
|
50
|
+
provider: claude
|
|
51
|
+
model: claude-opus-4-5
|
|
52
|
+
focus: ""
|
|
53
|
+
depth: standard
|
|
54
|
+
custom_instructions: ""
|
|
26
55
|
---
|
|
27
56
|
|
|
28
57
|
# Project Configuration
|
|
29
58
|
|
|
30
|
-
|
|
59
|
+
Each agent has its own independent LLM configuration. Edit the agents section above to customize provider, model, focus, depth, and instructions per agent.
|
|
31
60
|
|
|
32
61
|
## Supported Providers
|
|
33
62
|
|
|
@@ -35,10 +64,6 @@ Edit this file to change the LLM provider and model for this project.
|
|
|
35
64
|
- **openai** — OpenAI-compatible including Copilot (requires OPENAI_API_KEY)
|
|
36
65
|
- **gemini** — Google Gemini (requires GEMINI_API_KEY)
|
|
37
66
|
|
|
38
|
-
## Current Settings
|
|
39
|
-
|
|
40
|
-
Provider: claude
|
|
41
|
-
Model: claude-opus-4-5
|
|
42
67
|
Created: ${now}
|
|
43
68
|
`;
|
|
44
69
|
await fs_extra_1.default.writeFile(configPath, configContent, 'utf-8');
|
package/dist/lib/project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/lib/project.ts"],"names":[],"mappings":";;;;;AAIA,
|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EAAE,aAAa,CAAC,CAAC;IAC1D,MAAM,kBAAE,CAAC,SAAS,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAE3D,OAAO,CAAC,GAAG,CAAC,0BAA0B,WAAW,EAAE,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,gBAAgB,WAAW,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":"AAwVA,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6EvE"}
|
package/dist/lib/settings.js
CHANGED
|
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.runSettingsCLI = runSettingsCLI;
|
|
37
37
|
const fs = __importStar(require("fs-extra"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
38
|
const readline = __importStar(require("readline"));
|
|
40
39
|
const paths_js_1 = require("./paths.js");
|
|
41
40
|
const PROVIDERS = {
|
|
@@ -55,36 +54,124 @@ const PROVIDERS = {
|
|
|
55
54
|
models: ['gemini-1.5-pro', 'gemini-1.5-flash', 'gemini-pro'],
|
|
56
55
|
},
|
|
57
56
|
};
|
|
57
|
+
const AGENT_NAMES = ['examiner', 'researcher', 'coder', 'questioner', 'reviewer'];
|
|
58
58
|
function parseConfigFile(content) {
|
|
59
|
+
var _a, _b;
|
|
59
60
|
const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
60
61
|
if (!match) {
|
|
61
62
|
throw new Error('Invalid config file format');
|
|
62
63
|
}
|
|
63
64
|
const frontmatterText = match[1];
|
|
64
65
|
const body = match[2];
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
provider: frontmatter.provider || 'claude',
|
|
76
|
-
model: frontmatter.model || 'claude-opus-4-5',
|
|
77
|
-
created_at: frontmatter.created_at || new Date().toISOString(),
|
|
66
|
+
// Simple YAML parser for our specific structure
|
|
67
|
+
const frontmatter = {
|
|
68
|
+
project: '',
|
|
69
|
+
created_at: new Date().toISOString(),
|
|
70
|
+
agents: {
|
|
71
|
+
examiner: { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
72
|
+
researcher: { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
73
|
+
coder: { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
74
|
+
questioner: { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
75
|
+
reviewer: { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
78
76
|
},
|
|
79
|
-
body,
|
|
80
77
|
};
|
|
78
|
+
const lines = frontmatterText.split('\n');
|
|
79
|
+
let inAgents = false;
|
|
80
|
+
let currentAgent = null;
|
|
81
|
+
const agents = {};
|
|
82
|
+
for (const line of lines) {
|
|
83
|
+
if (line.startsWith('agents:')) {
|
|
84
|
+
inAgents = true;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (inAgents && line.match(/^ \w+:/)) {
|
|
88
|
+
currentAgent = (_b = (_a = line.match(/^\s*(\w+):/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : null;
|
|
89
|
+
if (currentAgent) {
|
|
90
|
+
agents[currentAgent] = {
|
|
91
|
+
provider: 'claude',
|
|
92
|
+
model: 'claude-opus-4-5',
|
|
93
|
+
focus: '',
|
|
94
|
+
depth: 'standard',
|
|
95
|
+
custom_instructions: '',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (inAgents && currentAgent && line.includes(':')) {
|
|
101
|
+
const [key, ...valueParts] = line.split(':');
|
|
102
|
+
const trimmedKey = key.trim();
|
|
103
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
104
|
+
if (trimmedKey === 'focus' || trimmedKey === 'custom_instructions') {
|
|
105
|
+
agents[currentAgent][trimmedKey] = value;
|
|
106
|
+
}
|
|
107
|
+
else if (trimmedKey === 'depth') {
|
|
108
|
+
agents[currentAgent][trimmedKey] = value;
|
|
109
|
+
}
|
|
110
|
+
else if (trimmedKey === 'provider') {
|
|
111
|
+
agents[currentAgent][trimmedKey] = value;
|
|
112
|
+
}
|
|
113
|
+
else if (trimmedKey === 'model') {
|
|
114
|
+
agents[currentAgent][trimmedKey] = value;
|
|
115
|
+
}
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (!inAgents && line.includes(':')) {
|
|
119
|
+
const [key, ...valueParts] = line.split(':');
|
|
120
|
+
const trimmedKey = key.trim();
|
|
121
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
122
|
+
if (trimmedKey === 'project')
|
|
123
|
+
frontmatter.project = value;
|
|
124
|
+
if (trimmedKey === 'created_at')
|
|
125
|
+
frontmatter.created_at = value;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (Object.keys(agents).length > 0) {
|
|
129
|
+
frontmatter.agents = {
|
|
130
|
+
examiner: agents.examiner || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
131
|
+
researcher: agents.researcher || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
132
|
+
coder: agents.coder || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
133
|
+
questioner: agents.questioner || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
134
|
+
reviewer: agents.reviewer || { provider: 'claude', model: 'claude-opus-4-5', focus: '', depth: 'standard', custom_instructions: '' },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return { frontmatter, body };
|
|
81
138
|
}
|
|
82
139
|
function buildConfigFile(frontmatter, body) {
|
|
140
|
+
const agentsYaml = `
|
|
141
|
+
agents:
|
|
142
|
+
examiner:
|
|
143
|
+
provider: ${frontmatter.agents.examiner.provider}
|
|
144
|
+
model: ${frontmatter.agents.examiner.model}
|
|
145
|
+
focus: "${frontmatter.agents.examiner.focus}"
|
|
146
|
+
depth: ${frontmatter.agents.examiner.depth}
|
|
147
|
+
custom_instructions: "${frontmatter.agents.examiner.custom_instructions}"
|
|
148
|
+
researcher:
|
|
149
|
+
provider: ${frontmatter.agents.researcher.provider}
|
|
150
|
+
model: ${frontmatter.agents.researcher.model}
|
|
151
|
+
focus: "${frontmatter.agents.researcher.focus}"
|
|
152
|
+
depth: ${frontmatter.agents.researcher.depth}
|
|
153
|
+
custom_instructions: "${frontmatter.agents.researcher.custom_instructions}"
|
|
154
|
+
coder:
|
|
155
|
+
provider: ${frontmatter.agents.coder.provider}
|
|
156
|
+
model: ${frontmatter.agents.coder.model}
|
|
157
|
+
focus: "${frontmatter.agents.coder.focus}"
|
|
158
|
+
depth: ${frontmatter.agents.coder.depth}
|
|
159
|
+
custom_instructions: "${frontmatter.agents.coder.custom_instructions}"
|
|
160
|
+
questioner:
|
|
161
|
+
provider: ${frontmatter.agents.questioner.provider}
|
|
162
|
+
model: ${frontmatter.agents.questioner.model}
|
|
163
|
+
focus: "${frontmatter.agents.questioner.focus}"
|
|
164
|
+
depth: ${frontmatter.agents.questioner.depth}
|
|
165
|
+
custom_instructions: "${frontmatter.agents.questioner.custom_instructions}"
|
|
166
|
+
reviewer:
|
|
167
|
+
provider: ${frontmatter.agents.reviewer.provider}
|
|
168
|
+
model: ${frontmatter.agents.reviewer.model}
|
|
169
|
+
focus: "${frontmatter.agents.reviewer.focus}"
|
|
170
|
+
depth: ${frontmatter.agents.reviewer.depth}
|
|
171
|
+
custom_instructions: "${frontmatter.agents.reviewer.custom_instructions}"`;
|
|
83
172
|
const fm = `---
|
|
84
173
|
project: ${frontmatter.project}
|
|
85
|
-
|
|
86
|
-
model: ${frontmatter.model}
|
|
87
|
-
created_at: ${frontmatter.created_at}
|
|
174
|
+
created_at: ${frontmatter.created_at}${agentsYaml}
|
|
88
175
|
---
|
|
89
176
|
|
|
90
177
|
${body}`;
|
|
@@ -97,54 +184,137 @@ function question(rl, prompt) {
|
|
|
97
184
|
});
|
|
98
185
|
});
|
|
99
186
|
}
|
|
100
|
-
|
|
101
|
-
console.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
187
|
+
function clearScreen() {
|
|
188
|
+
console.clear();
|
|
189
|
+
}
|
|
190
|
+
async function showAgentSelectionScreen(rl) {
|
|
191
|
+
clearScreen();
|
|
192
|
+
console.log('╔══════════════════════════════════════════════════════╗');
|
|
193
|
+
console.log('║ SYNAPHEX SETTINGS — Agent Selection ║');
|
|
194
|
+
console.log('╚══════════════════════════════════════════════════════╝\n');
|
|
195
|
+
const agents = [
|
|
196
|
+
' 1) EXAMINER',
|
|
197
|
+
' 2) RESEARCHER',
|
|
198
|
+
' 3) CODER',
|
|
199
|
+
' 4) QUESTIONER',
|
|
200
|
+
' 5) REVIEWER',
|
|
201
|
+
];
|
|
202
|
+
console.log(agents.join('\n'));
|
|
203
|
+
console.log(' ─────────────────────────────────────────────────────\n');
|
|
204
|
+
const answer = await question(rl, 'Select [1-5, q to exit]: ');
|
|
205
|
+
const choice = parseInt(answer, 10);
|
|
206
|
+
if (choice >= 1 && choice <= 5) {
|
|
207
|
+
return AGENT_NAMES[choice - 1];
|
|
107
208
|
}
|
|
108
|
-
|
|
209
|
+
if (answer.toLowerCase() === 'q') {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
console.log('\nInvalid option.');
|
|
213
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
214
|
+
return await showAgentSelectionScreen(rl);
|
|
215
|
+
}
|
|
216
|
+
async function selectProvider(rl, currentProvider) {
|
|
109
217
|
const providers = Object.keys(PROVIDERS);
|
|
218
|
+
const providerList = providers.map((key, idx) => {
|
|
219
|
+
const config = PROVIDERS[key];
|
|
220
|
+
return `${idx + 1}) ${config.name}`;
|
|
221
|
+
});
|
|
222
|
+
console.log(` Providers: ${providerList.join(' ')}`);
|
|
223
|
+
const answer = await question(rl, ' Select: ');
|
|
224
|
+
const idx = parseInt(answer, 10) - 1;
|
|
110
225
|
if (idx >= 0 && idx < providers.length) {
|
|
111
226
|
return providers[idx];
|
|
112
227
|
}
|
|
113
|
-
console.log('Invalid choice. Keeping current provider.');
|
|
114
228
|
return currentProvider;
|
|
115
229
|
}
|
|
116
230
|
async function selectModel(rl, provider, currentModel) {
|
|
117
|
-
console.log('\n=== Select Model ===\n');
|
|
118
231
|
const providerConfig = PROVIDERS[provider];
|
|
119
232
|
if (!providerConfig) {
|
|
120
233
|
return currentModel;
|
|
121
234
|
}
|
|
122
|
-
const modelList = providerConfig.models.map((m, idx) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const customIdx = providerConfig.models.length + 1;
|
|
127
|
-
modelList.push(` ${customIdx}) Enter custom model...`);
|
|
128
|
-
console.log(modelList.join('\n'));
|
|
129
|
-
const answer = await question(rl, `\nEnter number [1-${customIdx}] (press Enter to keep '${currentModel}'): `);
|
|
130
|
-
if (!answer) {
|
|
131
|
-
return currentModel;
|
|
132
|
-
}
|
|
235
|
+
const modelList = providerConfig.models.map((m, idx) => `${idx + 1}) ${m}`);
|
|
236
|
+
modelList.push(`${providerConfig.models.length + 1}) custom`);
|
|
237
|
+
console.log(` Models: ${modelList.join(' ')}`);
|
|
238
|
+
const answer = await question(rl, ' Select: ');
|
|
133
239
|
const idx = parseInt(answer, 10) - 1;
|
|
134
240
|
if (idx >= 0 && idx < providerConfig.models.length) {
|
|
135
241
|
return providerConfig.models[idx];
|
|
136
242
|
}
|
|
137
243
|
if (idx === providerConfig.models.length) {
|
|
138
|
-
|
|
139
|
-
const customModel = await question(rl, 'Enter custom model name: ');
|
|
244
|
+
const customModel = await question(rl, ' Enter custom model name: ');
|
|
140
245
|
if (customModel) {
|
|
141
246
|
return customModel;
|
|
142
247
|
}
|
|
143
|
-
return currentModel;
|
|
144
248
|
}
|
|
145
|
-
console.log('Invalid choice. Keeping current model.');
|
|
146
249
|
return currentModel;
|
|
147
250
|
}
|
|
251
|
+
async function selectDepth(rl, currentDepth) {
|
|
252
|
+
console.log(' Depth: 1) quick 2) standard 3) deep');
|
|
253
|
+
const answer = await question(rl, ' Select: ');
|
|
254
|
+
const idx = parseInt(answer, 10);
|
|
255
|
+
if (idx === 1)
|
|
256
|
+
return 'quick';
|
|
257
|
+
if (idx === 3)
|
|
258
|
+
return 'deep';
|
|
259
|
+
return 'standard';
|
|
260
|
+
}
|
|
261
|
+
async function showAgentSettingsScreen(rl, projectName, agentName, agentConfig) {
|
|
262
|
+
const displayName = agentName.charAt(0).toUpperCase() + agentName.slice(1).toUpperCase();
|
|
263
|
+
let config = { ...agentConfig };
|
|
264
|
+
let done = false;
|
|
265
|
+
while (!done) {
|
|
266
|
+
clearScreen();
|
|
267
|
+
console.log('╔══════════════════════════════════════════════════════╗');
|
|
268
|
+
console.log(`║ ${displayName.padEnd(48)} SETTINGS ║`);
|
|
269
|
+
console.log('╚══════════════════════════════════════════════════════╝\n');
|
|
270
|
+
console.log(` 1) Provider : ${config.provider}`);
|
|
271
|
+
console.log(` 2) Model : ${config.model}`);
|
|
272
|
+
console.log(` 3) Focus : ${config.focus || '(none)'}`);
|
|
273
|
+
console.log(` 4) Depth : ${config.depth}`);
|
|
274
|
+
console.log(` 5) Instructions : ${config.custom_instructions ? '(set)' : '(none)'}`);
|
|
275
|
+
console.log('\n ─────────────────────────────────────────────────────');
|
|
276
|
+
console.log(' s) Save & Back');
|
|
277
|
+
console.log(' q) Quit without saving\n');
|
|
278
|
+
const answer = await question(rl, 'Select [1-5, s, q]: ');
|
|
279
|
+
switch (answer.toLowerCase()) {
|
|
280
|
+
case '1': {
|
|
281
|
+
const newProvider = await selectProvider(rl, config.provider);
|
|
282
|
+
config.provider = newProvider;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case '2': {
|
|
286
|
+
const newModel = await selectModel(rl, config.provider, config.model);
|
|
287
|
+
config.model = newModel;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
case '3': {
|
|
291
|
+
const focus = await question(rl, ' Focus (Enter to clear): ');
|
|
292
|
+
config.focus = focus;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
case '4': {
|
|
296
|
+
const depth = await selectDepth(rl, config.depth);
|
|
297
|
+
config.depth = depth;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
case '5': {
|
|
301
|
+
const instructions = await question(rl, ' Instructions (Enter to clear): ');
|
|
302
|
+
config.custom_instructions = instructions;
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
case 's': {
|
|
306
|
+
return config;
|
|
307
|
+
}
|
|
308
|
+
case 'q': {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
default:
|
|
312
|
+
console.log('Invalid option.');
|
|
313
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
148
318
|
async function runSettingsCLI(projectName) {
|
|
149
319
|
const configPath = paths_js_1.Paths.config(projectName);
|
|
150
320
|
// Verify project exists
|
|
@@ -172,28 +342,45 @@ async function runSettingsCLI(projectName) {
|
|
|
172
342
|
output: process.stdout,
|
|
173
343
|
});
|
|
174
344
|
try {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
345
|
+
let selecting = true;
|
|
346
|
+
let unsavedChanges = false;
|
|
347
|
+
while (selecting) {
|
|
348
|
+
// Screen 1: Agent selection
|
|
349
|
+
const selectedAgent = await showAgentSelectionScreen(rl);
|
|
350
|
+
if (!selectedAgent) {
|
|
351
|
+
selecting = false;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
// Screen 2: Agent settings
|
|
355
|
+
const updated = await showAgentSettingsScreen(rl, projectName, selectedAgent, config.agents[selectedAgent]);
|
|
356
|
+
if (updated !== null) {
|
|
357
|
+
// User clicked "Save & Back"
|
|
358
|
+
config.agents[selectedAgent] = updated;
|
|
359
|
+
unsavedChanges = true;
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
// User clicked "Quit without saving" - exit completely
|
|
363
|
+
selecting = false;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
194
366
|
}
|
|
195
|
-
|
|
196
|
-
|
|
367
|
+
// Final save if there were unsaved changes
|
|
368
|
+
if (unsavedChanges) {
|
|
369
|
+
clearScreen();
|
|
370
|
+
console.log('╔══════════════════════════════════════════════════════╗');
|
|
371
|
+
console.log('║ SYNAPHEX SETTINGS — Save ║');
|
|
372
|
+
console.log('╚══════════════════════════════════════════════════════╝\n');
|
|
373
|
+
const confirm = await question(rl, 'Save all changes? (y/n): ');
|
|
374
|
+
if (confirm.toLowerCase() === 'y' || confirm.toLowerCase() === 'yes') {
|
|
375
|
+
const updatedContent = buildConfigFile(config, body);
|
|
376
|
+
fs.writeFileSync(configPath, updatedContent, 'utf-8');
|
|
377
|
+
clearScreen();
|
|
378
|
+
console.log('✓ Settings saved successfully!');
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
clearScreen();
|
|
382
|
+
console.log('✗ Changes discarded.');
|
|
383
|
+
}
|
|
197
384
|
}
|
|
198
385
|
}
|
|
199
386
|
finally {
|
package/dist/lib/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,wCA6DC;AAjOD,6CAA+B;AAC/B,2CAA6B;AAC7B,mDAAqC;AACrC,yCAAmC;AAQnC,MAAM,SAAS,GAAmC;IAChD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+CAA+C;QAC5D,MAAM,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;KACrE;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4CAA4C;QACzD,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC;KAC3C;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,yCAAyC;QACtD,MAAM,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,YAAY,CAAC;KAC7D;CACF,CAAC;AASF,SAAS,eAAe,CAAC,OAAe;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,KAA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C;QAED,2CAA2C;QAC3C,IAAI,cAAc,EAAE,CAAC;YACnB,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;YACxE,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;YACxE,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;YAE1E,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;YAEhE,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;gBACrE,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACrD,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;gBACtD,WAAW,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;YAChD,CAAC;iBAAM,CAAC;gBACN,WAAW,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
project: string;
|
|
1
|
+
export interface AgentConfig {
|
|
3
2
|
provider: 'claude' | 'openai' | 'gemini';
|
|
4
3
|
model: string;
|
|
4
|
+
focus: string;
|
|
5
|
+
depth: 'quick' | 'standard' | 'deep';
|
|
6
|
+
custom_instructions: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AgentsConfig {
|
|
9
|
+
examiner: AgentConfig;
|
|
10
|
+
researcher: AgentConfig;
|
|
11
|
+
coder: AgentConfig;
|
|
12
|
+
questioner: AgentConfig;
|
|
13
|
+
reviewer: AgentConfig;
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectConfig {
|
|
16
|
+
project: string;
|
|
5
17
|
created_at: string;
|
|
18
|
+
agents?: AgentsConfig;
|
|
6
19
|
}
|
|
7
20
|
export interface PipelineStages {
|
|
8
21
|
examiner?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB"}
|
package/package.json
CHANGED
package/skills/fix.md
CHANGED
|
@@ -10,6 +10,21 @@ You are running the Synaphex fix pipeline. This is tailored for targeted bug fix
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Step 0: Load Agent Customizations
|
|
14
|
+
|
|
15
|
+
Before asking about research, load any agent customizations for this project. Run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
synaphex load-config $ARGUMENTS
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Read the output. If customizations are present, apply them throughout each agent stage:
|
|
22
|
+
- **Focus** — prioritize that area
|
|
23
|
+
- **Depth** — adjust thoroughness (quick = surface-level, standard = balanced, deep = comprehensive)
|
|
24
|
+
- **Custom instructions** — follow any extra guidance provided
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
13
28
|
## Step 1: Ask About Research Phase
|
|
14
29
|
|
|
15
30
|
Before starting, I need your input on whether to include the Researcher stage:
|
package/skills/query.md
CHANGED
|
@@ -10,6 +10,23 @@ You are running the complete Synaphex multi-agent pipeline. This will take you t
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Load Agent Customizations
|
|
14
|
+
|
|
15
|
+
Before starting, I need to load any agent customizations configured for this project. Run this in your terminal:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
synaphex load-config $ARGUMENTS
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Read the output. If customizations are present, apply them throughout each agent stage below:
|
|
22
|
+
- **Focus** — prioritize that area
|
|
23
|
+
- **Depth** — adjust thoroughness (quick = surface-level, standard = balanced, deep = comprehensive)
|
|
24
|
+
- **Custom instructions** — follow any extra guidance provided
|
|
25
|
+
|
|
26
|
+
If no customizations are shown, proceed with standard agent behavior for each stage.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
13
30
|
## Stage 1: EXAMINER — Context Analysis
|
|
14
31
|
|
|
15
32
|
**Role:** You are a project context analyst. Your job is to understand the current state and what needs to be done.
|
package/skills/settings.md
CHANGED
|
@@ -2,65 +2,8 @@
|
|
|
2
2
|
description: "Configure LLM provider and model for a Synaphex project via interactive CLI"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
I'll open the interactive settings CLI for project: **$ARGUMENTS**
|
|
8
|
-
|
|
9
|
-
Run this command in your terminal:
|
|
5
|
+
I'll open the Synaphex settings interface for your project.
|
|
10
6
|
|
|
11
7
|
```bash
|
|
12
8
|
synaphex configure $ARGUMENTS
|
|
13
9
|
```
|
|
14
|
-
|
|
15
|
-
This opens an interactive prompt where you can select:
|
|
16
|
-
- **Provider** — claude, openai, or gemini
|
|
17
|
-
- **Model** — preset choices or enter a custom model name
|
|
18
|
-
|
|
19
|
-
Your settings are saved to `~/.claude/projects/$ARGUMENTS/config.md`.
|
|
20
|
-
|
|
21
|
-
## Supported Providers
|
|
22
|
-
|
|
23
|
-
### Claude (Anthropic)
|
|
24
|
-
- **Claude Opus 4.5** — Most capable, recommended for complex tasks
|
|
25
|
-
- **Claude Sonnet 4.5** — Balanced speed and capability
|
|
26
|
-
- **Claude Haiku 4.5** — Fast and efficient for simple tasks
|
|
27
|
-
|
|
28
|
-
Requires: `ANTHROPIC_API_KEY` environment variable
|
|
29
|
-
|
|
30
|
-
### OpenAI
|
|
31
|
-
- **GPT-4o** — Latest OpenAI model
|
|
32
|
-
- **GPT-4 Turbo** — High-performance reasoning
|
|
33
|
-
- **GPT-4** — Stable, widely-used model
|
|
34
|
-
|
|
35
|
-
Requires: `OPENAI_API_KEY` environment variable
|
|
36
|
-
|
|
37
|
-
### Google Gemini
|
|
38
|
-
- **Gemini 1.5 Pro** — Best performance
|
|
39
|
-
- **Gemini 1.5 Flash** — Fast responses
|
|
40
|
-
- **Gemini Pro** — Balanced capability
|
|
41
|
-
|
|
42
|
-
Requires: `GEMINI_API_KEY` environment variable
|
|
43
|
-
|
|
44
|
-
## Custom Models
|
|
45
|
-
|
|
46
|
-
If the preset models don't include your preferred model, you can enter a custom model name. This is useful if:
|
|
47
|
-
- You have access to a fine-tuned version of a model
|
|
48
|
-
- A new model was released that isn't in the presets
|
|
49
|
-
- You want to use a local model via an API-compatible service
|
|
50
|
-
|
|
51
|
-
## After Configuration
|
|
52
|
-
|
|
53
|
-
Your project is now configured with your chosen provider and model. You can now run:
|
|
54
|
-
|
|
55
|
-
- **`/synaphex/query <task>`** — Full 5-stage pipeline
|
|
56
|
-
- **`/synaphex/fix <task>`** — Fast pipeline with optional research skip
|
|
57
|
-
|
|
58
|
-
## Updating Settings
|
|
59
|
-
|
|
60
|
-
Run this command anytime to reconfigure your provider or model:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
synaphex configure <project>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The interactive CLI preserves your current settings as defaults, so you only need to enter a new value if you want to change it.
|