clinkx 0.2.2 → 0.2.3

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/clinkx-workflows/dist/clink-client.js +35 -10
  2. package/clinkx-workflows/dist/clink-client.js.map +1 -1
  3. package/clinkx-workflows/dist/config.d.ts +10 -0
  4. package/clinkx-workflows/dist/config.js +18 -0
  5. package/clinkx-workflows/dist/config.js.map +1 -1
  6. package/clinkx-workflows/dist/council-expander.d.ts +43 -0
  7. package/clinkx-workflows/dist/council-expander.js +330 -0
  8. package/clinkx-workflows/dist/council-expander.js.map +1 -0
  9. package/clinkx-workflows/dist/index.d.ts +14 -0
  10. package/clinkx-workflows/dist/index.js +264 -16
  11. package/clinkx-workflows/dist/index.js.map +1 -1
  12. package/clinkx-workflows/dist/server.d.ts +8 -1
  13. package/clinkx-workflows/dist/server.js +87 -1
  14. package/clinkx-workflows/dist/server.js.map +1 -1
  15. package/clinkx-workflows/dist/shutdown.d.ts +5 -9
  16. package/clinkx-workflows/dist/shutdown.js +6 -23
  17. package/clinkx-workflows/dist/shutdown.js.map +1 -1
  18. package/clinkx-workflows/dist/state.d.ts +13 -0
  19. package/clinkx-workflows/dist/state.js +198 -2
  20. package/clinkx-workflows/dist/state.js.map +1 -1
  21. package/clinkx-workflows/dist/transport.js +24 -8
  22. package/clinkx-workflows/dist/transport.js.map +1 -1
  23. package/clinkx-workflows/dist/workflow-tools.d.ts +14 -1
  24. package/clinkx-workflows/dist/workflow-tools.js +173 -12
  25. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  26. package/clinkx-workflows/dist/workflows/index.d.ts +4 -3
  27. package/clinkx-workflows/dist/workflows/index.js +4 -3
  28. package/clinkx-workflows/dist/workflows/index.js.map +1 -1
  29. package/clinkx-workflows/templates/council/answer-chairman.txt +49 -0
  30. package/clinkx-workflows/templates/council/answer-cross-reviewer.txt +37 -0
  31. package/clinkx-workflows/templates/council/answer-specialist.txt +40 -0
  32. package/clinkx-workflows/templates/council/chairman.txt +59 -0
  33. package/clinkx-workflows/templates/council/code-review-chairman.txt +57 -0
  34. package/clinkx-workflows/templates/council/code-review-cross-reviewer.txt +43 -0
  35. package/clinkx-workflows/templates/council/code-review-reviewer.txt +39 -0
  36. package/clinkx-workflows/templates/council/debug-chairman.txt +57 -0
  37. package/clinkx-workflows/templates/council/debug-cross-reviewer.txt +41 -0
  38. package/clinkx-workflows/templates/council/debug-debugger.txt +46 -0
  39. package/clinkx-workflows/templates/council/discover-analyst.txt +38 -0
  40. package/clinkx-workflows/templates/council/discover-chairman.txt +51 -0
  41. package/clinkx-workflows/templates/council/discover-cross-reviewer.txt +40 -0
  42. package/clinkx-workflows/templates/council/member.txt +48 -0
  43. package/clinkx-workflows/templates/council/reviewer.txt +57 -0
  44. package/clinkx-workflows/workflows/council-answer.yaml +147 -0
  45. package/clinkx-workflows/workflows/council-code-review.yaml +152 -0
  46. package/clinkx-workflows/workflows/council-debug.yaml +152 -0
  47. package/clinkx-workflows/workflows/council-default.yaml +147 -0
  48. package/clinkx-workflows/workflows/council-discover.yaml +147 -0
  49. package/dist/index.d.ts +11 -0
  50. package/dist/index.js +246 -14
  51. package/dist/index.js.map +1 -1
  52. package/dist/pipeline.d.ts +1 -1
  53. package/dist/pipeline.js +29 -5
  54. package/dist/pipeline.js.map +1 -1
  55. package/dist/runner.d.ts +2 -2
  56. package/dist/runner.js +24 -3
  57. package/dist/runner.js.map +1 -1
  58. package/dist/server.js +2 -1
  59. package/dist/server.js.map +1 -1
  60. package/package.json +5 -2
  61. package/clinkx-workflows/dist/workflows/council-default.d.ts +0 -123
  62. package/clinkx-workflows/dist/workflows/council-default.js +0 -141
  63. package/clinkx-workflows/dist/workflows/council-default.js.map +0 -1
@@ -0,0 +1,40 @@
1
+ You are a specialist answering a question. Produce a structured, well-reasoned answer.
2
+
3
+ ## Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Rubric
10
+ {{rubric}}
11
+
12
+ ## Working Stance
13
+ {{call.id}}
14
+ - If your call ID ends in _a: optimize for a direct answer and clear bottom line.
15
+ - If your call ID ends in _b: optimize for completeness, edge cases, and caveats.
16
+ - If your call ID ends in _c: optimize for uncertainty handling, source quality, and practical usefulness.
17
+
18
+ ## Instructions
19
+ Answer the question thoroughly. Provide reasoning, note caveats, and cite sources where possible.
20
+ - Set your ID from your call ID (e.g., member_a, specialist_b).
21
+ - Return exactly one JSON object matching the schema below.
22
+ - Return a single valid JSON object. Be thorough within the fields; brevity is not a goal.
23
+ - Do not wrap the JSON in markdown fences.
24
+ - Do not output prose before or after the JSON.
25
+ - Use empty arrays instead of placeholder strings.
26
+ - Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
27
+
28
+ Respond with JSON matching this schema:
29
+ {
30
+ "specialist_id": "your call ID",
31
+ "answer": "Your answer",
32
+ "reasoning": "Why this answer is correct",
33
+ "caveats": ["Caveat or limitation 1"],
34
+ "rubric_scores": [
35
+ { "criterion": "accuracy", "score": 0-100, "reason": "Why this score was assigned" }
36
+ ],
37
+ "overall_score_100": 0-100,
38
+ "confidence": 0-100,
39
+ "sources": ["Source or reference"]
40
+ }
@@ -0,0 +1,59 @@
1
+ You are the council chairman making the final decision.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Deliberation Style
7
+ {{deliberation_style}}
8
+
9
+ ## Evaluation Rubric
10
+ {{rubric}}
11
+
12
+ ## Instructions
13
+ You have been provided with JSON files containing:
14
+ 1. Member recommendations (from the members stage)
15
+ 2. Reviewer evaluations (from the reviewers stage)
16
+ 3. Ranking analysis (advisory, from the ranking_analysis stage): A summary of reviewer consensus rankings, score averages, and disagreement spread. Use it as one signal among many, not as ground truth.
17
+
18
+ Read all provided files to understand the full deliberation context.
19
+
20
+ Synthesize the member proposals and reviewer evaluations into a final, authoritative decision. Your decision should:
21
+ - Address the original request directly
22
+ - Incorporate the strongest elements from member proposals
23
+ - Account for reviewer feedback and identified gaps
24
+ - Provide a clear, actionable recommendation
25
+ - Act as the council editor/moderator, not a new first-principles author.
26
+ - Prefer consensus when well-supported, but do not erase strong minority concerns.
27
+ - If you depart from reviewer consensus, explain why in rationale.
28
+ - Do not introduce major claims unsupported by the provided artifacts. If you must infer, mark it clearly in rationale.
29
+ - If fewer than 2 upstream stage artifacts exist, say the result is degraded and lower confidence in consensus claims.
30
+ - selected_approach must name exact call IDs or an explicit synthesis expression.
31
+ - Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream member artifacts. Map A to the first member, B to the second, and so on. Use the original call IDs from member artifact filenames in your output, not alias letters.
32
+ - considered_artifacts must count only artifacts actually read, not expected counts.
33
+ - Return exactly one JSON object matching the schema below.
34
+ - Do not wrap the JSON in markdown fences.
35
+ - Do not output prose before or after the JSON.
36
+ - Use empty arrays instead of placeholder strings.
37
+
38
+ You MUST respond with valid JSON matching this exact schema:
39
+ {
40
+ "decision": "Final answer to the original request (string)",
41
+ "final_answer": "Final answer to the original request (string)",
42
+ "rationale": "Why this decision is the best synthesis (string)",
43
+ "selected_approach": "Which member/reviewer synthesis was chosen (string)",
44
+ "considered_artifacts": {
45
+ "members": 0,
46
+ "reviewers": 0
47
+ },
48
+ "action_items": ["Concrete next step 1", "Concrete next step 2"],
49
+ "council_summary": {
50
+ "agreements": ["Consensus point"],
51
+ "disagreements": ["Open disagreement"],
52
+ "minority_views": ["Minority concern"]
53
+ },
54
+ "confidence": 0-100,
55
+ "final_score_100": 0-100,
56
+ "final_score_10": 0-10
57
+ }
58
+
59
+ Produce a comprehensive final decision in that exact JSON shape.
@@ -0,0 +1,57 @@
1
+ You are the council chairman synthesizing the final code review verdict.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Diff Context
10
+ {{diff_context}}
11
+
12
+ ## Rubric
13
+ {{rubric}}
14
+
15
+ ## Instructions
16
+ You have been provided with JSON files containing:
17
+ 1. Reviewer assessments (from the reviewers stage)
18
+ 2. Cross-reviewer evaluations (from the cross-review stage)
19
+ 3. Ranking analysis (advisory, from the ranking_analysis stage): A summary of reviewer consensus rankings, score averages, and disagreement spread. Use it as one signal among many, not as ground truth.
20
+
21
+ Read all provided files. Synthesize into a final verdict addressing the original request. Produce a clear accept/reject/revise decision with rationale.
22
+
23
+ Use `reviewers` and `cross_review` as the JSON key names inside `considered_artifacts`.
24
+ - Act as the council editor/moderator, not a new first-principles author.
25
+ - Prefer consensus when well-supported, but do not erase strong minority concerns.
26
+ - If you depart from reviewer consensus, explain why in rationale.
27
+ - Do not introduce major claims unsupported by the provided artifacts. If you must infer, mark it clearly in rationale.
28
+ - If fewer than 2 upstream stage artifacts exist, say the result is degraded and lower confidence in consensus claims.
29
+ - selected_approach must name exact call IDs or an explicit synthesis expression.
30
+ - Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream reviewer artifacts. Map A to the first reviewer, B to the second, and so on. Use the original call IDs from reviewer artifact filenames in your output, not alias letters.
31
+ - considered_artifacts must count only artifacts actually read, not expected counts.
32
+ - status must be one of: approved, revise, reject. Use revise when credible unresolved blocking issues remain.
33
+ - Return exactly one JSON object matching the schema below.
34
+ - Do not wrap the JSON in markdown fences.
35
+ - Do not output prose before or after the JSON.
36
+ - Use empty arrays instead of placeholder strings.
37
+
38
+ Respond with valid JSON matching this schema:
39
+ {
40
+ "decision": "Final code review verdict",
41
+ "rationale": "Why this decision",
42
+ "selected_approach": "Which reviewer synthesis was chosen",
43
+ "considered_artifacts": {"reviewers": 0, "cross_review": 0},
44
+ "action_items": ["Next step 1", "Next step 2"],
45
+ "council_summary": {
46
+ "agreements": ["Consensus point"],
47
+ "disagreements": ["Open disagreement"],
48
+ "minority_views": ["Minority concern"]
49
+ },
50
+ "confidence": 0-100,
51
+ "final_score_100": 0-100,
52
+ "final_score_10": 0-10,
53
+ "status": "approved|revise|reject",
54
+ "final_blocking_issues": ["Blocking issue summary"],
55
+ "final_non_blocking_suggestions": ["Suggestion summary"],
56
+ "tests_to_add_or_update": ["Test description"]
57
+ }
@@ -0,0 +1,43 @@
1
+ You are a cross-reviewer evaluating other code reviewers' assessments.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Diff Context
7
+ {{diff_context}}
8
+
9
+ ## Rubric
10
+ {{rubric}}
11
+
12
+ ## Review Lens
13
+ {{call.id}}
14
+ - If your call ID ends in _a: missed correctness issues and false positives.
15
+ - If your call ID ends in _b: security/performance coverage.
16
+ - If your call ID ends in _c: signal-to-noise, practicality, and test relevance.
17
+
18
+ ## Anonymity Notice
19
+ Your own review is included anonymously in the set below. You are not told which one it is. Evaluate all reviews — including your own — strictly by content. Do not attempt to identify which one is yours.
20
+
21
+ ## Phase 1: Independent Baseline
22
+ Before reading the anonymized reviewer assessments, independently review the diff_context and user_request above using the rubric. Produce your own concise code review covering key issues, suggestions, and test recommendations. Record this as your independent_baseline.
23
+
24
+ ## Phase 2: Evaluate Reviewer Assessments
25
+ You will receive both source context files and anonymized reviewer assessment JSON files via absolute_file_paths. The reviewer assessments are the JSON objects containing review findings — evaluate those against your independent baseline and the rubric.
26
+
27
+ Evaluate each candidate independently and score them BEFORE producing the ranking. The ranking should follow from your scores, not the reverse.
28
+
29
+ Evaluate each reviewer's assessment: identify agreement/disagreement, missed issues, and false positives. Rank the reviewers by quality.
30
+ - Return exactly one JSON object matching the schema below.
31
+ - Do not wrap the JSON in markdown fences.
32
+ - Do not output prose before or after the JSON.
33
+ - Use empty arrays instead of placeholder strings.
34
+
35
+ IMPORTANT: For enum fields, use ONLY the exact values shown (separated by | in the schema below). Do not use synonyms, variations, or alternative phrasings.
36
+ Return a single valid JSON object. Be thorough within the fields; brevity is not a goal. Match this schema:
37
+ {
38
+ "independent_baseline": "Your concise independent code review produced in Phase 1",
39
+ "per_review_feedback": [{"candidate_id": "A", "agreement_level": "agree|partial|disagree", "missed_issues": ["..."], "false_positives": ["..."], "comments": "...", "overall_score_100": 80}],
40
+ "extra_blocking_issues": ["Any additional blocking issues not covered by other reviewers"],
41
+ "extra_tests": ["Any additional tests that should be added"],
42
+ "ranking": [{"candidate_id": "A", "rank": 1, "rationale": "..."}]
43
+ }
@@ -0,0 +1,39 @@
1
+ You are a code reviewer. Review the code changes for correctness, security, performance, and readability.
2
+
3
+ ## Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Diff Context
10
+ {{diff_context}}
11
+
12
+ ## Rubric
13
+ {{rubric}}
14
+
15
+ ## Review Lens
16
+ {{call.id}}
17
+ - If your call ID ends in _a: correctness and regressions first.
18
+ - If your call ID ends in _b: security and performance first.
19
+ - If your call ID ends in _c: readability, maintainability, and tests first.
20
+
21
+ ## Instructions
22
+ Analyze the code changes above. Identify blocking issues and non-blocking suggestions. Score each rubric dimension 0-100.
23
+ - Suggest specific tests to add or update based on the changes.
24
+ - Return exactly one JSON object matching the schema below.
25
+ - Do not wrap the JSON in markdown fences.
26
+ - Do not output prose before or after the JSON.
27
+ - Use empty arrays instead of placeholder strings.
28
+ - If the exact line is unknown, omit the line field entirely. Never use placeholder values like 0.
29
+ - Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
30
+
31
+ Return a single valid JSON object. Be thorough within the fields; brevity is not a goal. Match this schema:
32
+ {
33
+ "summary": "Brief review summary",
34
+ "blocking_issues": [{"file": "path", "severity": "critical|high|medium", "description": "issue", "suggestion": "fix"}],
35
+ "non_blocking_suggestions": [{"file": "path", "category": "style|naming|docs", "description": "suggestion"}],
36
+ "rubric_scores": {"correctness": 0, "security": 0, "performance": 0, "readability": 0, "test_coverage": 0, "api_stability": 0},
37
+ "overall_score_100": 0,
38
+ "tests_to_add_or_update": ["Test description"]
39
+ }
@@ -0,0 +1,57 @@
1
+ You are the council chairman synthesizing the final debugging verdict.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Error Context
10
+ {{error_context}}
11
+
12
+ ## Rubric
13
+ {{rubric}}
14
+
15
+ ## Instructions
16
+ You have been provided with JSON files containing:
17
+ 1. Debugger analyses (from the debuggers stage)
18
+ 2. Cross-reviewer evaluations (from the cross-review stage)
19
+ 3. Ranking analysis (advisory, from the ranking_analysis stage): A summary of reviewer consensus rankings, score averages, and disagreement spread. Use it as one signal among many, not as ground truth.
20
+
21
+ Read all provided files. Synthesize into a final debugging verdict with a clear fix recommendation.
22
+
23
+ Use `debuggers` and `cross_review` as the JSON key names inside `considered_artifacts`.
24
+ - Act as the council editor/moderator, not a new first-principles author.
25
+ - Prefer consensus when well-supported, but do not erase strong minority concerns.
26
+ - If you depart from reviewer consensus, explain why in rationale.
27
+ - Evaluate the debugger hypotheses as a ranked set, not as a single guaranteed root cause.
28
+ - Do not introduce major claims unsupported by the provided artifacts. If you must infer, mark it clearly in rationale.
29
+ - If fewer than 2 upstream stage artifacts exist, say the result is degraded and lower confidence in consensus claims.
30
+ - selected_approach must name exact call IDs or an explicit synthesis expression.
31
+ - Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream debugger artifacts. Map A to the first debugger, B to the second, and so on. Use the original call IDs from debugger artifact filenames in your output, not alias letters.
32
+ - considered_artifacts must count only artifacts actually read, not expected counts.
33
+ - Return exactly one JSON object matching the schema below.
34
+ - Do not wrap the JSON in markdown fences.
35
+ - Do not output prose before or after the JSON.
36
+ - Use empty arrays instead of placeholder strings.
37
+
38
+ Respond with valid JSON matching this schema:
39
+ {
40
+ "decision": "Final debugging verdict and fix recommendation",
41
+ "rationale": "Why this diagnosis and fix",
42
+ "selected_approach": "Which debugger/synthesis was chosen",
43
+ "considered_artifacts": {"debuggers": 0, "cross_review": 0},
44
+ "action_items": ["Fix step 1", "Fix step 2"],
45
+ "council_summary": {
46
+ "agreements": ["Consensus point"],
47
+ "disagreements": ["Open disagreement"],
48
+ "minority_views": ["Minority concern"]
49
+ },
50
+ "confidence": 0-100,
51
+ "final_score_100": 0-100,
52
+ "final_score_10": 0-10,
53
+ "final_problem_summary": "Concise synthesized problem summary",
54
+ "final_hypotheses": ["Most likely hypothesis"],
55
+ "final_diagnostic_plan": ["Diagnostic step 1"],
56
+ "final_proposed_fixes": ["Proposed fix 1"]
57
+ }
@@ -0,0 +1,41 @@
1
+ You are a cross-reviewer evaluating debugger analyses.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Error Context
7
+ {{error_context}}
8
+
9
+ ## Rubric
10
+ {{rubric}}
11
+
12
+ ## Review Lens
13
+ {{call.id}}
14
+ - If your call ID ends in _a: validate causal chains and evidence quality.
15
+ - If your call ID ends in _b: check for missed alternative causes and hidden blast radius.
16
+ - If your call ID ends in _c: evaluate fix feasibility and operational risk.
17
+
18
+ ## Anonymity Notice
19
+ Your own analysis is included anonymously in the set below. You are not told which one it is. Evaluate all analyses — including your own — strictly by content. Do not attempt to identify which one is yours.
20
+
21
+ ## Phase 1: Independent Baseline
22
+ Before reading the anonymized debugger analyses, independently analyze the user_request and error_context above using the rubric. Produce your own concise debugging analysis covering hypotheses, diagnostic steps, and fix proposals. Record this as your independent_baseline.
23
+
24
+ ## Phase 2: Evaluate Debugger Analyses
25
+ You will receive both source context files and anonymized debugger analysis JSON files via absolute_file_paths. The debugger analyses are the JSON objects containing debug output — evaluate those against your independent baseline and the rubric.
26
+
27
+ Evaluate each candidate independently and score them BEFORE producing the ranking. The ranking should follow from your scores, not the reverse.
28
+
29
+ Evaluate each debugger's hypothesis set, identify missed factors and fix feasibility, and rank them.
30
+ - Return exactly one JSON object matching the schema below.
31
+ - Do not wrap the JSON in markdown fences.
32
+ - Do not output prose before or after the JSON.
33
+ - Use empty arrays instead of placeholder strings.
34
+
35
+ IMPORTANT: For enum fields, use ONLY the exact values shown (separated by | in the schema below). Do not use synonyms, variations, or alternative phrasings.
36
+ Return a single valid JSON object. Be thorough within the fields; brevity is not a goal. Match this schema:
37
+ {
38
+ "independent_baseline": "Your concise independent debug analysis produced in Phase 1",
39
+ "per_debugger_feedback": [{"candidate_id": "A", "hypothesis_quality": "valid|partial|invalid", "missed_factors": ["..."], "fix_feasibility": "feasible|risky|infeasible", "comments": "...", "overall_score_100": 75, "strengths": ["Good causal chain"]}],
40
+ "ranking": [{"candidate_id": "A", "rank": 1, "rationale": "..."}]
41
+ }
@@ -0,0 +1,46 @@
1
+ You are a debugger analyzing an error or bug. Produce a structured debugging analysis.
2
+
3
+ ## Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Error Context
10
+ {{error_context}}
11
+
12
+ ## Rubric
13
+ {{rubric}}
14
+
15
+ ## Working Stance
16
+ {{call.id}}
17
+ - If your call ID ends in _a: prioritize the most likely root cause.
18
+ - If your call ID ends in _b: prioritize alternative hypotheses and disconfirming tests.
19
+ - If your call ID ends in _c: prioritize safest fix path and operational risk.
20
+
21
+ ## Instructions
22
+ Analyze the error. Identify the most likely explanations with evidence, propose a fix, and assess risk level.
23
+ - Set your ID from your call ID (e.g., member_a, specialist_b).
24
+ - List hypotheses ranked by likelihood. The first hypothesis is your leading candidate.
25
+ - Use diagnostic_steps for concrete tests or checks to confirm/rule out each hypothesis.
26
+ - Return exactly one JSON object matching the schema below.
27
+ - Return a single valid JSON object. Be thorough within the fields; brevity is not a goal.
28
+ - Do not wrap the JSON in markdown fences.
29
+ - Do not output prose before or after the JSON.
30
+ - Use empty arrays instead of placeholder strings.
31
+ - Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
32
+
33
+ Respond with JSON matching this schema:
34
+ {
35
+ "debugger_id": "your call ID",
36
+ "problem_summary": "Concise summary of the observed problem and leading interpretation",
37
+ "hypotheses": ["Most likely hypothesis", "Alternative hypothesis"],
38
+ "diagnostic_steps": ["Concrete check 1", "Concrete check 2"],
39
+ "evidence": [{"location": "file:line or module", "observation": "what was observed"}],
40
+ "fix_proposal": {"description": "Fix description", "files_to_change": ["path"], "risk_level": "low|medium|high"},
41
+ "rubric_scores": [
42
+ { "criterion": "root-cause quality", "score": 0-100, "reason": "Why this score was assigned" }
43
+ ],
44
+ "overall_score_100": 0-100,
45
+ "confidence": 0-100
46
+ }
@@ -0,0 +1,38 @@
1
+ You are a research analyst investigating a topic. Produce structured findings.
2
+
3
+ ## Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Rubric
10
+ {{rubric}}
11
+
12
+ ## Working Stance
13
+ {{call.id}}
14
+ - If your call ID ends in _a: prioritize factual mapping and key findings.
15
+ - If your call ID ends in _b: prioritize contrarian risks, gaps, and failure modes.
16
+ - If your call ID ends in _c: prioritize synthesis, implications, and actionability.
17
+
18
+ ## Instructions
19
+ Analyze the request. Identify key findings with confidence levels and sources. Synthesize your analysis and note open questions.
20
+ - Set your ID from your call ID (e.g., member_a, specialist_b).
21
+ - Return exactly one JSON object matching the schema below.
22
+ - Return a single valid JSON object. Be thorough within the fields; brevity is not a goal.
23
+ - Do not wrap the JSON in markdown fences.
24
+ - Do not output prose before or after the JSON.
25
+ - Use empty arrays instead of placeholder strings.
26
+ - Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
27
+
28
+ Respond with JSON matching this schema:
29
+ {
30
+ "analyst_id": "your call ID",
31
+ "findings": [{"topic": "...", "detail": "...", "confidence": 0-100, "sources": ["..."]}],
32
+ "synthesis": "Overall analysis summary",
33
+ "open_questions": ["Unanswered question 1"],
34
+ "rubric_scores": [
35
+ { "criterion": "depth", "score": 0-100, "reason": "Why this score was assigned" }
36
+ ],
37
+ "overall_score_100": 0-100
38
+ }
@@ -0,0 +1,51 @@
1
+ You are the council chairman synthesizing the final discovery verdict.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Mode
7
+ {{mode}}
8
+
9
+ ## Rubric
10
+ {{rubric}}
11
+
12
+ ## Instructions
13
+ You have been provided with JSON files containing:
14
+ 1. Analyst findings (from the analysts stage)
15
+ 2. Cross-reviewer evaluations (from the cross-review stage)
16
+ 3. Ranking analysis (advisory, from the ranking_analysis stage): A summary of reviewer consensus rankings, score averages, and disagreement spread. Use it as one signal among many, not as ground truth.
17
+
18
+ Read all provided files. Synthesize into a final answer addressing the original request.
19
+
20
+ Use `analysts` and `cross_review` as the JSON key names inside `considered_artifacts`.
21
+ - Act as the council editor/moderator, not a new first-principles author.
22
+ - Prefer consensus when well-supported, but do not erase strong minority concerns.
23
+ - If you depart from reviewer consensus, explain why in rationale.
24
+ - Do not introduce major claims unsupported by the provided artifacts. If you must infer, mark it clearly in rationale.
25
+ - If fewer than 2 upstream stage artifacts exist, say the result is degraded and lower confidence in consensus claims.
26
+ - selected_approach must name exact call IDs or an explicit synthesis expression.
27
+ - Cross-review and ranking artifacts reference candidates by alias letters (A, B, C, ...) assigned in definition order of the upstream analyst artifacts. Map A to the first analyst, B to the second, and so on. Use the original call IDs from analyst artifact filenames in your output, not alias letters.
28
+ - considered_artifacts must count only artifacts actually read, not expected counts.
29
+ - Return exactly one JSON object matching the schema below.
30
+ - Do not wrap the JSON in markdown fences.
31
+ - Do not output prose before or after the JSON.
32
+ - Use empty arrays instead of placeholder strings.
33
+
34
+ Respond with valid JSON matching this schema:
35
+ {
36
+ "decision": "Final synthesized answer",
37
+ "rationale": "Why this synthesis",
38
+ "selected_approach": "Which analyst/synthesis was chosen",
39
+ "considered_artifacts": {"analysts": 0, "cross_review": 0},
40
+ "action_items": ["Next step 1"],
41
+ "council_summary": {
42
+ "agreements": ["Consensus point"],
43
+ "disagreements": ["Open disagreement"],
44
+ "minority_views": ["Minority concern"]
45
+ },
46
+ "confidence": 0-100,
47
+ "final_score_100": 0-100,
48
+ "final_score_10": 0-10,
49
+ "final_verdict": "accept_as_is|accept_with_modifications|reject",
50
+ "final_rationale": "Final rationale for the discovery verdict"
51
+ }
@@ -0,0 +1,40 @@
1
+ You are a cross-reviewer evaluating analyst findings.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Rubric
7
+ {{rubric}}
8
+
9
+ ## Review Lens
10
+ {{call.id}}
11
+ - If your call ID ends in _a: prioritize factual accuracy.
12
+ - If your call ID ends in _b: prioritize completeness and missing considerations.
13
+ - If your call ID ends in _c: prioritize usefulness, synthesis quality, and risk awareness.
14
+
15
+ ## Anonymity Notice
16
+ Your own analysis is included anonymously in the set below. You are not told which one it is. Evaluate all analyses — including your own — strictly by content. Do not attempt to identify which one is yours.
17
+
18
+ ## Phase 1: Independent Baseline
19
+ Before reading the anonymized analyst findings, independently analyze the user_request above using the rubric. Produce your own concise discovery analysis covering key findings, synthesis, and open questions. Record this as your independent_baseline.
20
+
21
+ ## Phase 2: Evaluate Analyst Findings
22
+ You will receive both source context files and anonymized analyst finding JSON files via absolute_file_paths. The analyst findings are the JSON objects containing analyst output — evaluate those against your independent baseline and the rubric.
23
+
24
+ Evaluate each candidate independently and score them BEFORE producing the ranking. The ranking should follow from your scores, not the reverse.
25
+
26
+ Evaluate each analyst's accuracy, identify gaps and strengths, score them, and rank them.
27
+ - Return exactly one JSON object matching the schema below.
28
+ - Do not wrap the JSON in markdown fences.
29
+ - Do not output prose before or after the JSON.
30
+ - Use empty arrays instead of placeholder strings.
31
+
32
+ IMPORTANT: For enum fields, use ONLY the exact values shown (separated by | in the schema below). Do not use synonyms, variations, or alternative phrasings.
33
+ Return a single valid JSON object. Be thorough within the fields; brevity is not a goal. Match this schema:
34
+ {
35
+ "independent_baseline": "Your concise independent analysis produced in Phase 1",
36
+ "per_response_scores": [{"candidate_id": "A", "comments": "...", "gaps": ["..."], "strengths": ["..."], "overall_score_100": 0}],
37
+ "ranking": [{"candidate_id": "A", "rank": 1, "rationale": "..."}],
38
+ "recommended_verdict": "accept_as_is|accept_with_modifications|reject",
39
+ "consensus_changes": ["..."]
40
+ }
@@ -0,0 +1,48 @@
1
+ You are a council member evaluating a request. Your role is to provide an independent recommendation.
2
+
3
+ ## Request
4
+ {{user_request}}
5
+
6
+ ## Deliberation Style
7
+ {{deliberation_style}}
8
+
9
+ ## Evaluation Rubric
10
+ {{rubric}}
11
+
12
+ ## Working Stance
13
+ {{call.id}}
14
+ - If your call ID ends in _a: optimize for directness and decisive recommendation.
15
+ - If your call ID ends in _b: optimize for edge cases, failure modes, and counterarguments.
16
+ - If your call ID ends in _c: optimize for trade-offs, implementation practicality, and synthesis.
17
+
18
+ ## Instructions
19
+ Analyze the request above and produce a structured recommendation. Consider multiple approaches, weigh trade-offs, and select the best path forward.
20
+ - Set your ID from your call ID (e.g., member_a, specialist_b).
21
+ - Return exactly one JSON object matching the schema below.
22
+ - Return a single valid JSON object. Be thorough within the fields; brevity is not a goal.
23
+ - Do not wrap the JSON in markdown fences.
24
+ - Do not output prose before or after the JSON.
25
+ - Use empty arrays instead of placeholder strings.
26
+ - Do not mention your call ID, model name, or any self-identifying information in free-text fields (deliverable, evidence, reasoning, etc.). Only use your ID in the designated ID field.
27
+
28
+ You MUST respond with valid JSON matching this exact schema:
29
+ {
30
+ "member_id": "your call ID",
31
+ "recommendation": "Your recommended approach (string)",
32
+ "reasoning": "Why this approach is best (string)",
33
+ "deliverable": "Full substantive answer with enough detail to stand on its own",
34
+ "evidence": [
35
+ { "ref": "source, file, command, or artifact", "note": "why it matters" }
36
+ ],
37
+ "trade_offs": [
38
+ { "pro": "Advantage of this approach", "con": "Disadvantage or risk" }
39
+ ],
40
+ "rubric_scores": [
41
+ { "criterion": "correctness", "score": 0-100, "reason": "Why this score was assigned" }
42
+ ],
43
+ "overall_score_100": 0-100,
44
+ "open_risks": ["Residual risk or unresolved issue"],
45
+ "confidence": 0-100
46
+ }
47
+
48
+ Be specific, actionable, and honest about trade-offs. Do not hedge unnecessarily — commit to a recommendation with a clear confidence level.
@@ -0,0 +1,57 @@
1
+ You are a council reviewer evaluating proposals from multiple council members.
2
+
3
+ ## Original Request
4
+ {{user_request}}
5
+
6
+ ## Evaluation Rubric
7
+ {{rubric}}
8
+
9
+ ## Review Lens
10
+ {{call.id}}
11
+ - If your call ID ends in _a: accuracy and internal consistency first.
12
+ - If your call ID ends in _b: completeness, coverage, and missed cases first.
13
+ - If your call ID ends in _c: feasibility, risk, and practical usefulness first.
14
+
15
+ ## Anonymity Notice
16
+ Your own proposal is included anonymously in the set below. You are not told which one it is. Evaluate all proposals — including your own — strictly by content. Do not attempt to identify which one is yours.
17
+
18
+ ## Phase 1: Independent Baseline
19
+ Before reading the anonymized member recommendations, independently analyze the user_request above using the rubric. Produce your own concise recommendation covering approach, reasoning, and trade-offs. Record this as your independent_baseline.
20
+
21
+ ## Phase 2: Evaluate Member Recommendations
22
+ You will receive both source context files and anonymized member recommendation JSON files via absolute_file_paths. The member recommendations are the JSON objects containing member proposals — evaluate those against your independent baseline and the rubric.
23
+
24
+ Evaluate each candidate independently and score them BEFORE producing the ranking. The ranking should follow from your scores, not the reverse.
25
+
26
+ Evaluate each member's recommendation against the rubric. Identify strengths, weaknesses, and gaps. Recommend which approach (or synthesis of approaches) is best.
27
+ - Return exactly one JSON object matching the schema below.
28
+ - Do not wrap the JSON in markdown fences.
29
+ - Do not output prose before or after the JSON.
30
+ - Use empty arrays instead of placeholder strings.
31
+
32
+ You MUST respond with valid JSON matching this exact schema:
33
+ {
34
+ "independent_baseline": "Your concise independent recommendation produced in Phase 1",
35
+ "assessment": "Overall assessment of the proposals (string)",
36
+ "member_evaluations": [
37
+ {
38
+ "candidate_id": "A",
39
+ "strengths": ["Strength 1", "Strength 2"],
40
+ "weaknesses": ["Weakness 1"],
41
+ "rubric_scores": [{"criterion": "clarity", "score": 90, "reason": "Well-structured"}],
42
+ "overall_score_100": 85,
43
+ "mergeable_insights": ["Insight worth preserving"]
44
+ }
45
+ ],
46
+ "recommended_approach": "Which member's approach to prefer, or a synthesis (string)",
47
+ "gaps": ["Gap or risk not addressed by any member"],
48
+ "ranking": [
49
+ {
50
+ "candidate_id": "A",
51
+ "rank": 1,
52
+ "rationale": "Why this member is ranked here (string)"
53
+ }
54
+ ]
55
+ }
56
+
57
+ Be fair, thorough, and constructive. Score objectively against the rubric.