@ceyhunbilir/synaphex 1.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 (63) hide show
  1. package/README.md +132 -0
  2. package/dist/commands/configure.d.ts +2 -0
  3. package/dist/commands/configure.d.ts.map +1 -0
  4. package/dist/commands/configure.js +15 -0
  5. package/dist/commands/configure.js.map +1 -0
  6. package/dist/commands/init.d.ts +2 -0
  7. package/dist/commands/init.d.ts.map +1 -0
  8. package/dist/commands/init.js +19 -0
  9. package/dist/commands/init.js.map +1 -0
  10. package/dist/commands/list-outputs.d.ts +2 -0
  11. package/dist/commands/list-outputs.d.ts.map +1 -0
  12. package/dist/commands/list-outputs.js +28 -0
  13. package/dist/commands/list-outputs.js.map +1 -0
  14. package/dist/commands/load-config.d.ts +2 -0
  15. package/dist/commands/load-config.d.ts.map +1 -0
  16. package/dist/commands/load-config.js +132 -0
  17. package/dist/commands/load-config.js.map +1 -0
  18. package/dist/commands/load-memory.d.ts +2 -0
  19. package/dist/commands/load-memory.d.ts.map +1 -0
  20. package/dist/commands/load-memory.js +21 -0
  21. package/dist/commands/load-memory.js.map +1 -0
  22. package/dist/commands/save-output.d.ts +2 -0
  23. package/dist/commands/save-output.d.ts.map +1 -0
  24. package/dist/commands/save-output.js +38 -0
  25. package/dist/commands/save-output.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +44 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/lib/auth.d.ts +10 -0
  31. package/dist/lib/auth.d.ts.map +1 -0
  32. package/dist/lib/auth.js +54 -0
  33. package/dist/lib/auth.js.map +1 -0
  34. package/dist/lib/memory.d.ts +3 -0
  35. package/dist/lib/memory.d.ts.map +1 -0
  36. package/dist/lib/memory.js +40 -0
  37. package/dist/lib/memory.js.map +1 -0
  38. package/dist/lib/output.d.ts +4 -0
  39. package/dist/lib/output.d.ts.map +1 -0
  40. package/dist/lib/output.js +78 -0
  41. package/dist/lib/output.js.map +1 -0
  42. package/dist/lib/paths.d.ts +11 -0
  43. package/dist/lib/paths.d.ts.map +1 -0
  44. package/dist/lib/paths.js +21 -0
  45. package/dist/lib/paths.js.map +1 -0
  46. package/dist/lib/project.d.ts +2 -0
  47. package/dist/lib/project.d.ts.map +1 -0
  48. package/dist/lib/project.js +109 -0
  49. package/dist/lib/project.js.map +1 -0
  50. package/dist/lib/settings.d.ts +2 -0
  51. package/dist/lib/settings.d.ts.map +1 -0
  52. package/dist/lib/settings.js +531 -0
  53. package/dist/lib/settings.js.map +1 -0
  54. package/dist/types.d.ts +45 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +3 -0
  57. package/dist/types.js.map +1 -0
  58. package/package.json +50 -0
  59. package/scripts/postinstall.js +43 -0
  60. package/skills/fix.md +210 -0
  61. package/skills/init.md +69 -0
  62. package/skills/query.md +217 -0
  63. package/skills/settings.md +43 -0
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@ceyhunbilir/synaphex",
3
+ "version": "1.0.0",
4
+ "description": "Multi-agent AI pipeline as a Claude Code skill — Examiner → Researcher → Coder → Questioner → Reviewer",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "synaphex": "dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "postinstall": "node scripts/postinstall.js",
12
+ "prepublishOnly": "npm run build",
13
+ "prepare": "husky install 2>/dev/null || true",
14
+ "lint:commit": "commitlint --from HEAD~1 --to HEAD"
15
+ },
16
+ "files": [
17
+ "dist/",
18
+ "skills/",
19
+ "scripts/postinstall.js"
20
+ ],
21
+ "keywords": [
22
+ "claude-code",
23
+ "ai-pipeline",
24
+ "multi-agent",
25
+ "skill",
26
+ "claude"
27
+ ],
28
+ "author": "ceyhunbilir",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/ceyhunbilir/synaphex.git"
33
+ },
34
+ "homepage": "https://github.com/ceyhunbilir/synaphex",
35
+ "dependencies": {
36
+ "commander": "^9.4.1",
37
+ "fs-extra": "^9.1.0"
38
+ },
39
+ "devDependencies": {
40
+ "@commitlint/cli": "^18.0.0",
41
+ "@commitlint/config-conventional": "^18.0.0",
42
+ "@types/fs-extra": "^11.0.4",
43
+ "@types/node": "^12.20.0",
44
+ "husky": "^8.0.0",
45
+ "typescript": "^4.9.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=10.0.0"
49
+ }
50
+ }
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const os = require('os');
7
+
8
+ const SKILLS_SRC = path.join(__dirname, '..', 'skills');
9
+ const COMMANDS_DEST = path.join(os.homedir(), '.claude', 'commands', 'synaphex');
10
+
11
+ try {
12
+ // Create destination directory
13
+ fs.mkdirSync(COMMANDS_DEST, { recursive: true });
14
+
15
+ // Find all .md files in skills directory
16
+ const files = fs.readdirSync(SKILLS_SRC).filter((f) => f.endsWith('.md'));
17
+
18
+ if (files.length === 0) {
19
+ console.warn('[synaphex] Warning: No skill files found in skills/ directory');
20
+ process.exit(0);
21
+ }
22
+
23
+ // Copy each skill file
24
+ for (const file of files) {
25
+ const src = path.join(SKILLS_SRC, file);
26
+ const dest = path.join(COMMANDS_DEST, file);
27
+ fs.copyFileSync(src, dest);
28
+ console.log(`[synaphex] ✓ Installed skill: ~/.claude/commands/synaphex/${file}`);
29
+ }
30
+
31
+ console.log('\n[synaphex] Skills installed successfully!');
32
+ console.log('[synaphex] Available commands:');
33
+ console.log(' /synaphex/init <project>');
34
+ console.log(' /synaphex/query <task>');
35
+ console.log(' /synaphex/fix <task>');
36
+ console.log('\n[synaphex] Documentation: https://github.com/ceyhunbilir/synaphex');
37
+ } catch (err) {
38
+ // Non-fatal error — postinstall script failures block npm install
39
+ console.warn('[synaphex] ⚠️ Warning: Could not auto-install skills:', err.message);
40
+ console.warn('[synaphex] You can manually copy them:');
41
+ console.warn(` cp ${SKILLS_SRC}/*.md ~/.claude/commands/synaphex/`);
42
+ process.exit(0);
43
+ }
package/skills/fix.md ADDED
@@ -0,0 +1,210 @@
1
+ ---
2
+ description: "Run Synaphex fix pipeline with optional researcher skip: Examiner → [Researcher?] → Coder → Questioner → Reviewer"
3
+ ---
4
+
5
+ # Synaphex Fix Pipeline
6
+
7
+ **Fix Request:** $ARGUMENTS
8
+
9
+ You are running the Synaphex fix pipeline. This is tailored for targeted bug fixes or code improvements where you may not need extensive research.
10
+
11
+ ---
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
+ - **Provider & Auth** — The configured LLM provider and authentication method for each agent
23
+ - `claude` + `api_key`: Use ANTHROPIC_API_KEY
24
+ - `claude` + `cli`: Use claude CLI
25
+ - `claude` + `vscode_extension`: Use Claude Code extension (native)
26
+ - `gemini` + `api_key`: Use GEMINI_API_KEY
27
+ - `copilot` + `cli`: Use gh CLI
28
+ - **Model** — The specific model to use (e.g., claude-opus-4-5, gemini-1.5-pro)
29
+ - **Focus** — prioritize that area
30
+ - **Depth** — adjust thoroughness (quick = surface-level, standard = balanced, deep = comprehensive)
31
+ - **Custom instructions** — follow any extra guidance provided
32
+
33
+ ---
34
+
35
+ ## Step 1: Ask About Research Phase
36
+
37
+ Before starting, I need your input on whether to include the Researcher stage:
38
+
39
+ > **Would you like to include the Researcher phase?**
40
+ >
41
+ > - **Yes** — Full pipeline (Examiner → Researcher → Coder → Questioner → Reviewer)
42
+ > - More thorough, researches best practices and solutions
43
+ > - Takes longer
44
+ > - Good for complex fixes or unclear requirements
45
+ >
46
+ > - **No** — Fast pipeline (Examiner → Coder → Questioner → Reviewer)
47
+ > - Skips research, goes straight to implementation
48
+ > - Faster, assumes you know what to do
49
+ > - Good for straightforward fixes or when you're confident in the approach
50
+
51
+ Please respond with **Yes** or **No**.
52
+
53
+ ---
54
+
55
+ ## Pipeline Execution (Based on Your Choice)
56
+
57
+ Based on your response above, I'll now run the appropriate pipeline.
58
+
59
+ ### Stage 1: EXAMINER — Context Analysis
60
+
61
+ **Role:** Project context analyst. Understand what needs to be fixed.
62
+
63
+ **Your Instructions:**
64
+
65
+ 1. **Analyze the fix request.** What exactly needs to be fixed or improved?
66
+
67
+ 2. **Examine the relevant code.** Read and understand:
68
+ - The code that needs fixing
69
+ - Related code that might be affected
70
+ - Existing patterns and conventions
71
+
72
+ 3. **Load project memory** (if available):
73
+ ```bash
74
+ synaphex load-memory $ARGUMENTS
75
+ ```
76
+
77
+ 4. **Identify the problem** and its context.
78
+
79
+ **Produce:** Context report with sections:
80
+ - **Problem Statement** — What's broken or needs improvement
81
+ - **Root Cause Analysis** — Why is it happening?
82
+ - **Affected Code** — Files and functions involved
83
+ - **Current Patterns** — How similar issues are handled
84
+ - **Impact Assessment** — What breaks if not fixed?
85
+ - **Fix Strategy Outline** — Initial approach
86
+
87
+ ---
88
+
89
+ ### Stage 2 (OPTIONAL): RESEARCHER — Best Practices
90
+
91
+ **⚠️ SKIP THIS STAGE IF USER CHOSE "NO"**
92
+
93
+ **Role:** Research analyst. Find the best approach to fix this.
94
+
95
+ **Your Instructions:**
96
+
97
+ 1. **Research the problem domain.**
98
+ - What are standard solutions for this type of issue?
99
+ - Are there libraries or patterns that help?
100
+
101
+ 2. **Evaluate fix approaches.**
102
+ - What are the options?
103
+ - What are trade-offs?
104
+ - What's most maintainable?
105
+
106
+ 3. **Document best practices** for this type of fix.
107
+
108
+ **Produce:** Research report with sections:
109
+ - **Recommended Fix** — Detailed approach
110
+ - **Why This Approach** — Rationale
111
+ - **Best Practices** — How to do this right
112
+ - **Potential Issues** — What to watch out for
113
+ - **Reference Examples** — Similar patterns in codebase
114
+
115
+ ---
116
+
117
+ ### Stage 3: CODER — Implementation
118
+
119
+ **Role:** Senior developer. Write the fix.
120
+
121
+ **Your Instructions:**
122
+
123
+ 1. **Implement the fix.** Based on Examiner (and Researcher if included):
124
+ - Write clean, tested code
125
+ - Follow existing patterns
126
+ - Include error handling
127
+ - Add comments where needed
128
+
129
+ 2. **Keep it focused.** This is a fix, not a refactor.
130
+ - Don't change unrelated code
131
+ - Don't add features beyond the fix
132
+ - Minimal necessary changes
133
+
134
+ 3. **Provide complete code** for all files that need changes.
135
+
136
+ **Produce:** Implementation with sections:
137
+ - **Code Changes** — Exact changes needed
138
+ - **Why This Fixes It** — Explanation of the fix
139
+ - **Side Effects** — Any other code that might be affected
140
+ - **Testing** — How to verify the fix works
141
+
142
+ ---
143
+
144
+ ### Stage 4: QUESTIONER — Critical Review
145
+
146
+ **Role:** Critical reviewer. Challenge the fix.
147
+
148
+ **Your Instructions:**
149
+
150
+ 1. **Question the implementation.**
151
+ - Does it fully fix the issue?
152
+ - Are there edge cases?
153
+ - Could it break something else?
154
+ - Is error handling sufficient?
155
+
156
+ 2. **Identify improvements** and issues.
157
+
158
+ 3. **Suggest concrete fixes** with code examples.
159
+
160
+ **Produce:** Critique with sections:
161
+ - **Does It Fix The Problem?** — Yes/no assessment
162
+ - **Edge Cases** — Scenarios not covered
163
+ - **Potential Issues** — Bugs or problems the fix could introduce
164
+ - **Improvements** — Better approaches
165
+ - **Revised Code** — Specific fixes for issues found
166
+
167
+ ---
168
+
169
+ ### Stage 5: REVIEWER — Final Decision
170
+
171
+ **Role:** Senior architect. Final quality gate.
172
+
173
+ **Your Instructions:**
174
+
175
+ 1. **Review all prior outputs.**
176
+ - Is the fix correct?
177
+ - Is it complete?
178
+ - Are all Questioner feedback incorporated?
179
+
180
+ 2. **Make final decision:** APPROVED or NEEDS REVISION
181
+
182
+ 3. **Deliver the final implementation.**
183
+
184
+ **Produce:** Final assessment with sections:
185
+ - **Final Verdict** — APPROVED or NEEDS REVISION
186
+ - **Complete Implementation** — Final fixed code
187
+ - **Quality Verification** — Checklist of concerns addressed
188
+ - **Impact Summary** — What changed and why
189
+ - **Next Steps** (if any)
190
+
191
+ ---
192
+
193
+ ## Save Pipeline Output
194
+
195
+ After all stages complete:
196
+
197
+ ```bash
198
+ synaphex save-output $ARGUMENTS '{"command":"fix","task":"$ARGUMENTS","skip_researcher":false,"timestamp":"$(date -u +%Y-%m-%dT%H:%M:%SZ)","stages":{"examiner":"...","coder":"...","questioner":"...","reviewer":"..."}}'
199
+ ```
200
+
201
+ (Set `skip_researcher` to `true` if the user chose to skip the research phase.)
202
+
203
+ ---
204
+
205
+ ## Important Notes
206
+
207
+ - **Focused fixes:** This is for targeted fixes, not full rewrites
208
+ - **Hard failure guards:** Stop immediately if any stage fails
209
+ - **Quick feedback loops:** Fix pipeline is faster than query because research is optional
210
+ - **Researcher inclusion:** Is your choice — skip for confidence, include for thorough vetting
package/skills/init.md ADDED
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: "Initialize a new Synaphex project at ~/.claude/projects/<project> with config, memory, and outputs directories"
3
+ ---
4
+
5
+ # Synaphex Init
6
+
7
+ I'll guide you through initializing a new Synaphex project. The project name is: **$ARGUMENTS**
8
+
9
+ ## Step 1: Create Project Directory
10
+
11
+ **Run this command in your terminal** (copy and paste):
12
+
13
+ ```bash
14
+ synaphex init-project $ARGUMENTS
15
+ ```
16
+
17
+ This creates `~/.claude/projects/$ARGUMENTS/` with:
18
+ - **config.md** — YAML configuration with per-agent LLM settings
19
+ - **memory/** — project memory files for context across sessions
20
+ - **outputs/** — pipeline run results
21
+
22
+ The config will have all 5 agents (Examiner, Researcher, Coder, Questioner, Reviewer) with Claude as the default provider.
23
+
24
+ ## Step 2: Configure Per-Agent LLM Providers (Optional)
25
+
26
+ Your project comes with **Claude (Anthropic)** as the default for all agents. To customize providers and authentication per agent, run:
27
+
28
+ ```bash
29
+ /synaphex:settings $ARGUMENTS
30
+ ```
31
+
32
+ Then execute the command it shows in your terminal. This opens an interactive settings CLI where you can configure each agent independently:
33
+
34
+ **Supported providers:**
35
+ - **claude** — Anthropic Claude (auth modes: api_key, cli, vscode_extension)
36
+ - Models: claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5-20251001
37
+ - API key: `ANTHROPIC_API_KEY`
38
+ - CLI: `claude` command
39
+ - VSCode: Claude Code extension (native, no API key)
40
+
41
+ - **gemini** — Google Gemini (auth mode: api_key)
42
+ - Models: gemini-2.5-pro, gemini-1.5-pro, gemini-1.5-flash
43
+ - API key: `GEMINI_API_KEY`
44
+
45
+ - **copilot** — GitHub Copilot (auth mode: cli)
46
+ - CLI: `gh` command with `gh auth login`
47
+
48
+ ## Step 3: Verify Project Creation
49
+
50
+ After running the init command, verify the project was created:
51
+
52
+ ```bash
53
+ ls -la ~/.claude/projects/$ARGUMENTS/
54
+ ```
55
+
56
+ You should see:
57
+ - `config.md` — YAML configuration with per-agent settings
58
+ - `memory/` — Directory for project memories
59
+ - `outputs/` — Directory for pipeline results
60
+
61
+ ## Step 4: Ready to Go
62
+
63
+ Once the project is created, you can use:
64
+
65
+ - **`/synaphex:query <task>`** — Run the full 5-stage pipeline (Examiner → Researcher → Coder → Questioner → Reviewer)
66
+ - **`/synaphex:fix <task>`** — Run the pipeline with optional Researcher skip
67
+ - **`/synaphex:settings $ARGUMENTS`** — Configure per-agent LLM providers and authentication
68
+
69
+ Each pipeline run will be saved to `~/.claude/projects/$ARGUMENTS/outputs/` automatically.
@@ -0,0 +1,217 @@
1
+ ---
2
+ description: "Run the full Synaphex 5-stage pipeline: Examiner → Researcher → Coder → Questioner → Reviewer"
3
+ ---
4
+
5
+ # Synaphex Query Pipeline
6
+
7
+ **Task:** $ARGUMENTS
8
+
9
+ You are running the complete Synaphex multi-agent pipeline. This will take you through 5 stages of analysis and refinement. Think deeply at each stage and produce thorough, high-quality outputs.
10
+
11
+ ---
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
+ - **Provider & Auth** — The configured LLM provider and authentication method for each agent
23
+ - `claude` + `api_key`: Use ANTHROPIC_API_KEY
24
+ - `claude` + `cli`: Use claude CLI
25
+ - `claude` + `vscode_extension`: Use Claude Code extension (native)
26
+ - `gemini` + `api_key`: Use GEMINI_API_KEY
27
+ - `copilot` + `cli`: Use gh CLI
28
+ - **Model** — The specific model to use (e.g., claude-opus-4-5, gemini-1.5-pro)
29
+ - **Focus** — prioritize that area
30
+ - **Depth** — adjust thoroughness (quick = surface-level, standard = balanced, deep = comprehensive)
31
+ - **Custom instructions** — follow any extra guidance provided
32
+
33
+ If no customizations are shown, proceed with standard agent behavior for each stage using Claude models.
34
+
35
+ ---
36
+
37
+ ## Stage 1: EXAMINER — Context Analysis
38
+
39
+ **Role:** You are a project context analyst. Your job is to understand the current state and what needs to be done.
40
+
41
+ **Your Instructions:**
42
+
43
+ 1. **Analyze the task.** What exactly is being asked? What are the success criteria?
44
+
45
+ 2. **Examine the current codebase.** Read relevant files to understand:
46
+ - Existing architecture and patterns
47
+ - Technology stack in use
48
+ - File structure and organization
49
+ - Existing implementations that are related
50
+
51
+ 3. **Identify constraints and context.**
52
+ - What patterns are already established?
53
+ - What libraries/frameworks are in use?
54
+ - What conventions should be followed?
55
+
56
+ 4. **Load project memory** (if available). Run:
57
+ ```bash
58
+ synaphex load-memory $ARGUMENTS
59
+ ```
60
+ Review the output to understand project history and context.
61
+
62
+ **Produce:** A comprehensive context report with sections:
63
+ - **Task Analysis** — What needs to be done and why
64
+ - **Current State** — Existing code, architecture, patterns
65
+ - **Technology Stack** — Languages, frameworks, libraries in use
66
+ - **Constraints & Conventions** — What to follow
67
+ - **Identified Gaps** — What's missing or needs improvement
68
+ - **Recommended Approach** — Initial strategy
69
+
70
+ ---
71
+
72
+ ## Stage 2: RESEARCHER — Best Practices & Solutions
73
+
74
+ **Role:** You are a research analyst. Based on the context from Examiner, research the best approach.
75
+
76
+ **Your Instructions:**
77
+
78
+ 1. **Research the problem domain.** What are the accepted best practices for this type of task?
79
+
80
+ 2. **Evaluate approaches.** Consider:
81
+ - Multiple solutions and their trade-offs
82
+ - Performance implications
83
+ - Security considerations
84
+ - Maintainability and readability
85
+ - Testing strategies
86
+
87
+ 3. **Check for existing solutions.** Are there libraries, patterns, or examples that directly apply?
88
+
89
+ 4. **Document findings.** Be specific about why certain approaches are better.
90
+
91
+ **Produce:** A structured research report with sections:
92
+ - **Recommended Approach** — Detailed explanation and rationale
93
+ - **Alternative Approaches** — What else could work (and why you rejected them)
94
+ - **Best Practices** — Security, performance, testing, patterns
95
+ - **Relevant Libraries/Tools** — What to use and why
96
+ - **Common Pitfalls** — What to avoid
97
+ - **Reference Implementation** — Code examples or patterns to follow
98
+
99
+ ---
100
+
101
+ ## Stage 3: CODER — Implementation
102
+
103
+ **Role:** You are a senior developer. Implement the solution based on all prior analysis.
104
+
105
+ **Your Instructions:**
106
+
107
+ 1. **Write production-ready code.** This means:
108
+ - Follow the patterns identified by the Examiner
109
+ - Use the approaches recommended by the Researcher
110
+ - Include proper error handling
111
+ - Write clear, maintainable code
112
+ - Add comments for non-obvious logic
113
+ - Include type hints/types where applicable
114
+
115
+ 2. **Comprehensive implementation.** Provide:
116
+ - All necessary file changes or new files
117
+ - Complete, runnable code (not pseudocode)
118
+ - Integration points with existing code
119
+ - Usage examples or tests
120
+
121
+ 3. **Quality standards:**
122
+ - Consistent with the existing codebase style
123
+ - No unnecessary complexity
124
+ - Proper structure and organization
125
+ - Security-conscious (validate inputs, prevent common attacks)
126
+
127
+ **Produce:** Complete implementation with sections:
128
+ - **Code Changes** — All files to create or modify
129
+ - **Key Implementation Details** — How it works, important decisions
130
+ - **Integration Points** — Where this connects to existing code
131
+ - **Usage Examples** — How to use the new code
132
+ - **Testing Suggestions** — How to verify it works
133
+
134
+ ---
135
+
136
+ ## Stage 4: QUESTIONER — Critical Review
137
+
138
+ **Role:** You are a critical code reviewer (Socratic method). Challenge every assumption.
139
+
140
+ **Your Instructions:**
141
+
142
+ 1. **Question the implementation.**
143
+ - Does it handle all edge cases?
144
+ - Are there security vulnerabilities?
145
+ - Could it be more performant?
146
+ - Is the error handling sufficient?
147
+
148
+ 2. **Identify improvements:**
149
+ - Critical issues (must fix)
150
+ - Optimization opportunities
151
+ - Better patterns or libraries
152
+ - Edge cases not handled
153
+
154
+ 3. **Suggest concrete fixes.** For each issue, provide:
155
+ - What's wrong
156
+ - Why it matters
157
+ - Specific fix with code examples
158
+
159
+ **Produce:** A structured critique with sections:
160
+ - **Strengths** — What the implementation does well
161
+ - **Critical Issues** — Things that must be fixed
162
+ - **Suggested Improvements** — Better approaches, edge cases
163
+ - **Performance Considerations** — Any bottlenecks?
164
+ - **Security Review** — Any vulnerabilities?
165
+ - **Revised Code Snippets** — Specific fixes for the most important issues
166
+
167
+ ---
168
+
169
+ ## Stage 5: REVIEWER — Final Quality Gate
170
+
171
+ **Role:** You are a senior architect doing final review. Consolidate everything and deliver the final solution.
172
+
173
+ **Your Instructions:**
174
+
175
+ 1. **Review all prior outputs holistically.**
176
+ - Does the final code address the original task?
177
+ - Have all Questioner feedback been incorporated?
178
+ - Is the solution complete and coherent?
179
+
180
+ 2. **Make a final decision:** APPROVED or NEEDS REVISION
181
+
182
+ 3. **If APPROVED:**
183
+ - Provide the complete, final implementation incorporating all improvements
184
+ - Explain what changed from Coder → final version
185
+ - Summarize the quality gates passed
186
+
187
+ 4. **If NEEDS REVISION:**
188
+ - Identify what's blocking approval
189
+ - Provide specific next steps
190
+
191
+ **Produce:** Final verdict with sections:
192
+ - **Final Verdict** — APPROVED or NEEDS REVISION (and why)
193
+ - **Complete Implementation** — The final, polished code
194
+ - **Changes Made** — Summary of improvements from Questioner feedback
195
+ - **Quality Summary** — Verification checklist
196
+ - **Next Steps** (if applicable) — What remains to be done
197
+
198
+ ---
199
+
200
+ ## Save Pipeline Output
201
+
202
+ After all 5 stages complete successfully, save the results:
203
+
204
+ ```bash
205
+ synaphex save-output <project-name> '{"command":"query","task":"$ARGUMENTS","skip_researcher":false,"timestamp":"$(date -u +%Y-%m-%dT%H:%M:%SZ)","stages":{"examiner":"...","researcher":"...","coder":"...","questioner":"...","reviewer":"..."}}'
206
+ ```
207
+
208
+ (Note: In practice, this would be a complete JSON object with all stage outputs. You can output this to a file and pipe it to the save command if the output is large.)
209
+
210
+ ---
211
+
212
+ ## Important Notes
213
+
214
+ - **Hard failure guards:** If any prior stage fails or produces no output, immediately stop the pipeline and report the failure. Do not continue.
215
+ - **Token budget awareness:** Coder stage gets the most tokens (produces the most detailed code). Reviewer stage is concise.
216
+ - **Output format:** Each stage should have clear section headers and complete thoughts.
217
+ - **Quality over speed:** Take time to do this right. Better to produce a thorough output than a rushed one.
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: "Configure LLM provider and model for a Synaphex project via interactive CLI"
3
+ ---
4
+
5
+ # Synaphex Settings
6
+
7
+ I'll show you how to configure per-agent LLM providers and authentication for your project: **$ARGUMENTS**
8
+
9
+ ## Step 1: Open Interactive Settings
10
+
11
+ **Run this command in your terminal** (copy and paste):
12
+
13
+ ```bash
14
+ synaphex configure $ARGUMENTS
15
+ ```
16
+
17
+ This opens an interactive terminal UI where you can configure each agent.
18
+
19
+ ## Step 2: Configure Each Agent
20
+
21
+ The interactive settings UI will let you configure each of the 5 agents (Examiner, Researcher, Coder, Questioner, Reviewer) independently.
22
+
23
+ For each agent, you can set:
24
+
25
+ - **Provider** — Choose from: claude, gemini, copilot
26
+ - **Auth Mode** — Depends on provider:
27
+ - claude: api_key (ANTHROPIC_API_KEY), cli (claude command), or vscode_extension (Claude Code)
28
+ - gemini: api_key (GEMINI_API_KEY)
29
+ - copilot: cli (gh command)
30
+ - **Model** — Select from available models for that provider
31
+ - **Focus** — Optional focus area (e.g., security, performance, simplicity)
32
+ - **Depth** — Thoroughness level (quick, standard, deep)
33
+ - **Custom Instructions** — Optional additional guidance
34
+
35
+ ## Step 3: Verify Configuration
36
+
37
+ After configuration, view your settings at any time:
38
+
39
+ ```bash
40
+ synaphex load-config $ARGUMENTS
41
+ ```
42
+
43
+ This displays all agents with their current provider, auth mode, model, and settings.