council-gate 1.2.2__py3-none-any.whl
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.
- council_gate/__init__.py +15 -0
- council_gate/_assets/__init__.py +0 -0
- council_gate/_assets/analysis_review.md +18 -0
- council_gate/_assets/eng_review.md +10 -0
- council_gate/_assets/env.example +36 -0
- council_gate/_assets/escalation.md +10 -0
- council_gate/_assets/general_review.md +10 -0
- council_gate/_assets/proposal_review.md +17 -0
- council_gate/cli.py +627 -0
- council_gate/council.py +61 -0
- council_gate/escalation.py +39 -0
- council_gate/gate.py +129 -0
- council_gate/ingest.py +110 -0
- council_gate/parsing.py +50 -0
- council_gate/providers.py +159 -0
- council_gate/redaction.py +130 -0
- council_gate/types.py +24 -0
- council_gate-1.2.2.dist-info/METADATA +261 -0
- council_gate-1.2.2.dist-info/RECORD +22 -0
- council_gate-1.2.2.dist-info/WHEEL +4 -0
- council_gate-1.2.2.dist-info/entry_points.txt +2 -0
- council_gate-1.2.2.dist-info/licenses/LICENSE +21 -0
council_gate/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from council_gate.council import Council
|
|
2
|
+
from council_gate.gate import EntropyGate, GateVerdict
|
|
3
|
+
from council_gate.providers import CodexProvider, OpenRouterProvider, Provider
|
|
4
|
+
from council_gate.types import Finding, Review
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"CodexProvider",
|
|
8
|
+
"Council",
|
|
9
|
+
"EntropyGate",
|
|
10
|
+
"Finding",
|
|
11
|
+
"GateVerdict",
|
|
12
|
+
"OpenRouterProvider",
|
|
13
|
+
"Provider",
|
|
14
|
+
"Review",
|
|
15
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
You are reviewing a data analysis or research finding (notebook output, methodology section, results write-up).
|
|
2
|
+
|
|
3
|
+
Output findings in this exact line format, one per line:
|
|
4
|
+
[SEVERITY] section-or-line-ref — short description
|
|
5
|
+
|
|
6
|
+
Use severities: CRITICAL, MAJOR, MINOR, NIT.
|
|
7
|
+
|
|
8
|
+
Focus on:
|
|
9
|
+
- Sample bias — how was the data selected, and what populations does it actually represent vs claim to
|
|
10
|
+
- Confounders not controlled for
|
|
11
|
+
- Missing-data handling — exclusion, imputation, and silent drops
|
|
12
|
+
- Causal claims unsupported by the design (correlation framed as cause)
|
|
13
|
+
- Statistical pitfalls — multiple comparisons, p-hacking, look-elsewhere effect, regression to the mean
|
|
14
|
+
- Numbers without uncertainty intervals or sample sizes
|
|
15
|
+
- Plot / figure choices that distort the comparison (truncated axes, missing baselines)
|
|
16
|
+
- Reproducibility — could a stranger rerun this from the artifact alone
|
|
17
|
+
|
|
18
|
+
Do not produce a summary or commentary — only the findings list.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
You are reviewing an engineering artifact (spec, plan, PR diff, or design doc).
|
|
2
|
+
|
|
3
|
+
Output findings in this exact line format, one per line:
|
|
4
|
+
[SEVERITY] file:line — short description
|
|
5
|
+
|
|
6
|
+
Use severities: CRITICAL, MAJOR, MINOR, NIT.
|
|
7
|
+
|
|
8
|
+
Focus on: correctness, edge cases, failure modes, missing-data handling, security boundaries, silent-failure paths, untested assumptions.
|
|
9
|
+
|
|
10
|
+
Do not produce a summary or commentary — only the findings list.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# council-gate — environment configuration
|
|
2
|
+
# Lives at ~/.config/council-gate/.env (XDG-compliant). Edit any time.
|
|
3
|
+
|
|
4
|
+
# OpenRouter is the default routing layer (one key, many models).
|
|
5
|
+
# Sign up: https://openrouter.ai/keys
|
|
6
|
+
OPENROUTER_API_KEY=
|
|
7
|
+
|
|
8
|
+
# Comma-separated list of OpenRouter model IDs to seat on the council.
|
|
9
|
+
#
|
|
10
|
+
# DEFAULT is cost-conscious: smaller / cheaper variants from each provider
|
|
11
|
+
# (Haiku, GPT-mini, Gemini Flash, plus Llama / Qwen / DeepSeek which are
|
|
12
|
+
# already cheap). Six diverse providers so excluding any single one (the
|
|
13
|
+
# generator) still leaves >=4 seats.
|
|
14
|
+
#
|
|
15
|
+
# This default works on a low OpenRouter balance ($1-2 covers many runs).
|
|
16
|
+
# For higher-stakes reviews, swap in the flagship variants (see "alternatives"
|
|
17
|
+
# at the bottom of this file).
|
|
18
|
+
COUNCIL_MODELS=anthropic/claude-haiku-4.5,openai/gpt-5-mini,google/gemini-2.5-flash,meta-llama/llama-3.3-70b-instruct,qwen/qwen-2.5-72b-instruct,deepseek/deepseek-chat
|
|
19
|
+
|
|
20
|
+
# Optional: codex CLI adapter (assumes `codex` is on PATH and authenticated).
|
|
21
|
+
# Set to 0 to disable the codex seat entirely.
|
|
22
|
+
COUNCIL_INCLUDE_CODEX=1
|
|
23
|
+
|
|
24
|
+
# Disagreement threshold τ ∈ [0, 1] above which the gate fires escalation.
|
|
25
|
+
# Default 0.35; tune empirically per artifact type.
|
|
26
|
+
GATE_THRESHOLD=0.35
|
|
27
|
+
|
|
28
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
29
|
+
# Alternatives — uncomment to swap in
|
|
30
|
+
# ──────────────────────────────────────────────────────────────────────────
|
|
31
|
+
#
|
|
32
|
+
# Flagship mix (higher cost, higher quality; needs a topped-up balance):
|
|
33
|
+
# COUNCIL_MODELS=anthropic/claude-opus-4.7,openai/gpt-5,google/gemini-2.5-pro,meta-llama/llama-3.3-70b-instruct,qwen/qwen-2.5-72b-instruct,deepseek/deepseek-chat
|
|
34
|
+
#
|
|
35
|
+
# Minimum-viable cheap mix (3 seats, very low cost):
|
|
36
|
+
# COUNCIL_MODELS=meta-llama/llama-3.3-70b-instruct,qwen/qwen-2.5-72b-instruct,deepseek/deepseek-chat
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Council disagreement — needs human adjudication
|
|
2
|
+
|
|
3
|
+
Artifact: ${artifact_name}
|
|
4
|
+
Disagreement score: ${disagreement} (threshold ${threshold})
|
|
5
|
+
Reviewers: ${reviewer_summary}
|
|
6
|
+
|
|
7
|
+
Where they diverged:
|
|
8
|
+
${divergence_summary}
|
|
9
|
+
|
|
10
|
+
Recommendation: read each reviewer's findings before acting; the council does not agree.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
You are reviewing a written artifact for issues.
|
|
2
|
+
|
|
3
|
+
Output findings in this exact line format, one per line:
|
|
4
|
+
[SEVERITY] section-or-line-ref — short description
|
|
5
|
+
|
|
6
|
+
Use severities: CRITICAL, MAJOR, MINOR, NIT.
|
|
7
|
+
|
|
8
|
+
Focus on: factual errors, internal inconsistencies, unsupported claims, hidden assumptions, missing context a reader would need, and any place the argument or design fails under realistic edge cases.
|
|
9
|
+
|
|
10
|
+
Do not produce a summary or commentary — only the findings list.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
You are reviewing a written proposal (grant, strategy doc, pitch, plan, research statement).
|
|
2
|
+
|
|
3
|
+
Output findings in this exact line format, one per line:
|
|
4
|
+
[SEVERITY] section-or-line-ref — short description
|
|
5
|
+
|
|
6
|
+
Use severities: CRITICAL, MAJOR, MINOR, NIT.
|
|
7
|
+
|
|
8
|
+
Focus on:
|
|
9
|
+
- Claim/evidence asymmetry — claims made without supporting evidence or with weak evidence
|
|
10
|
+
- Hidden assumptions — premises the author treats as given but a reviewer would challenge
|
|
11
|
+
- Audience fit — places where framing would land wrong with the stated audience
|
|
12
|
+
- Logical gaps in the argument arc
|
|
13
|
+
- Numbers presented without source, denominator, or comparison
|
|
14
|
+
- Vague language ("significantly", "scalable", "robust") without operational definition
|
|
15
|
+
- Missing failure modes — what if this proposal succeeds and the work doesn't deliver
|
|
16
|
+
|
|
17
|
+
Do not produce a summary or commentary — only the findings list.
|