@balpal4495/quorum 0.4.0 → 0.4.2

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 CHANGED
@@ -163,11 +163,11 @@ Nothing is indexed without your explicit sign-off.
163
163
 
164
164
  Commit `.chronicle/committed/` to git. Future sessions — and your teammates' sessions — start with that context.
165
165
 
166
- ### Every merged PR creates a Chronicle proposal automatically
166
+ ### Every merged PR can create a Chronicle proposal automatically
167
167
 
168
- A GitHub Actions workflow fires when any PR merges to main. It creates a Chronicle proposal capturing the decision, which files changed, and any explicitly deferred items from the PR description. The proposal sits in `proposals/` until you commit it — nothing is auto-indexed.
168
+ Quorum ships a GitHub Actions workflow (`chronicle-on-merge.yml`) that fires when any PR merges to main. It creates a Chronicle proposal capturing the decision, which files changed, and any explicitly deferred items from the PR description. The proposal sits in `proposals/` until you commit it — nothing is auto-indexed.
169
169
 
170
- This means the gap between "PR merged" and "Chronicle knows about it" is now zero.
170
+ To enable this in your project, copy `.github/workflows/chronicle-on-merge.yml` and `scripts/chronicle-pr.js` from the [Quorum repo](https://github.com/balpal4495/Quorum) into your own repo.
171
171
 
172
172
  ---
173
173
 
@@ -358,7 +358,7 @@ quorum sentinel coverage --json # machine-readable, for scripts
358
358
 
359
359
  **Drift** — do existing Chronicle entries still accurately describe the code, or have they gone stale? Drift detection requires an LLM; use `sentinelAssertions({ llm })` in your test suite (the CLI surfaces the message and directs you there).
360
360
 
361
- Add `sentinel-pr.yml` (included in `quorum/`) to your GitHub Actions and every PR gets a comment showing a full-project coverage table and a colour-coded heatmap. Changed modules are highlighted. Reviewers see exactly where knowledge is solid and where it goes dark.
361
+ To get a coverage comment on every PR, copy `.github/workflows/sentinel-pr.yml` from the [Quorum repo](https://github.com/balpal4495/Quorum) into your project. Every PR then gets a comment showing a full-project coverage table and a colour-coded heatmap. Changed modules are highlighted. Reviewers see exactly where knowledge is solid and where it goes dark.
362
362
 
363
363
  ---
364
364
 
package/SETUP.md CHANGED
@@ -31,7 +31,7 @@ Read these files in full before proceeding:
31
31
 
32
32
  - `quorum/modules/README.md` — module overview and quick-start
33
33
  - `quorum/modules/AGENTS.md` — file ownership and invariants
34
- - `quorum/.github/copilot-instructions.md` — workflow rules for AI agents
34
+ - `.github/copilot-instructions.md` — workflow rules for AI agents (installed at project root by init)
35
35
 
36
36
  These are your operating instructions for everything that follows.
37
37
 
@@ -80,16 +80,20 @@ If the project uses `yarn` or `pnpm`, use the appropriate installer instead.
80
80
 
81
81
  ### 4a. `.github/copilot-instructions.md`
82
82
 
83
- **If it does not exist:**
84
- Copy `quorum/.github/copilot-instructions.md` to `.github/copilot-instructions.md`.
83
+ The automated init command (`npx @balpal4495/quorum@latest init`) handles this step automatically — it creates or appends to `.github/copilot-instructions.md` at the project root.
85
84
 
86
- **If it already exists:**
87
- Append the entire contents of `quorum/.github/copilot-instructions.md` to the existing file, preceded by this separator:
85
+ **If you are completing this step manually:**
86
+
87
+ Check whether `.github/copilot-instructions.md` already exists.
88
+
89
+ **If it does not exist:** Fetch the Quorum copilot instructions from the Quorum GitHub repo (`balpal4495/Quorum`) at `.github/copilot-instructions.md` and write it to `.github/copilot-instructions.md` in the project root.
90
+
91
+ **If it already exists and does not contain `<!-- quorum -->`:** Append the Quorum instructions to the existing file, preceded by:
88
92
 
89
93
  ```markdown
90
94
  ---
91
95
 
92
- <!-- Quorum: appended by setup -->
96
+ <!-- quorum -->
93
97
  ```
94
98
 
95
99
  Do not replace or overwrite existing content.
@@ -55,6 +55,13 @@ async function copyModules(target) {
55
55
  log.created("quorum/SETUP.md")
56
56
  }
57
57
 
58
+ async function copyEvals(target) {
59
+ const src = path.join(QUORUM_ROOT, "evals")
60
+ const dest = path.join(target, "quorum", "evals")
61
+ await fs.cp(src, dest, { recursive: true })
62
+ log.created("quorum/evals/")
63
+ }
64
+
58
65
  async function mergeCopilotInstructions(target) {
59
66
  log.section("Merging AI instruction files")
60
67
  const src = path.join(QUORUM_ROOT, ".github", "copilot-instructions.md")
@@ -207,6 +214,7 @@ export async function run(PKG_VERSION) {
207
214
 
208
215
  await guardAlreadyInitialized(target)
209
216
  await copyModules(target)
217
+ await copyEvals(target)
210
218
  await mergeCopilotInstructions(target)
211
219
  await mergeAgentsMd(target)
212
220
  await mergeClaudeMd(target)
package/bin/init.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Drops Quorum into an existing Node.js project.
6
6
  * Run from the target project root:
7
7
  *
8
- * npx github:balpal4495/Quorum init
8
+ * npx @balpal4495/quorum@latest init
9
9
  *
10
10
  * Zero external dependencies — uses only Node.js built-ins.
11
11
  * Requires Node.js 18+.
@@ -104,6 +104,13 @@ async function copyModules() {
104
104
  log.created("quorum/SETUP.md")
105
105
  }
106
106
 
107
+ async function copyEvals() {
108
+ const src = path.join(QUORUM_ROOT, "evals")
109
+ const dest = path.join(TARGET, "quorum", "evals")
110
+ await fs.cp(src, dest, { recursive: true })
111
+ log.created("quorum/evals/")
112
+ }
113
+
107
114
  async function mergeCopilotInstructions() {
108
115
  log.section("Merging AI instruction files")
109
116
 
@@ -309,6 +316,7 @@ async function main() {
309
316
 
310
317
  await guardAlreadyInitialized()
311
318
  await copyModules()
319
+ await copyEvals()
312
320
  await mergeCopilotInstructions()
313
321
  await mergeAgentsMd()
314
322
  await mergeClaudeMd()
@@ -10,8 +10,6 @@ const DEFAULT_ADVISOR_COUNT = 5
10
10
  const DEFAULT_REVIEWER_COUNT = 5
11
11
  const LITE_ADVISOR_COUNT = 1
12
12
  const LITE_REVIEWER_COUNT = 2
13
- const JURY_ONLY_ADVISOR_COUNT = 1
14
- const JURY_ONLY_REVIEWER_COUNT = 1
15
13
 
16
14
  /**
17
15
  * Run the Council deliberation pipeline.
@@ -44,14 +42,26 @@ export async function deliberate(
44
42
 
45
43
  // Classify risk to determine Council mode and advisor/reviewer counts
46
44
  const risk = classifyRisk(input.outcome, input.design, input.evidence)
45
+
46
+ if (risk.council_mode === "jury-only") {
47
+ return {
48
+ satisfied: true,
49
+ verdict: "Skipped — low-risk design passed by Jury without Council review.",
50
+ blockers: [],
51
+ warnings: [],
52
+ challenges: [],
53
+ evidence_cited: [],
54
+ citation_validation: { valid_ids: [], hallucinated_ids: [] },
55
+ advisor_split: { proceed: 0, redesign: 0, "investigate-more": 0 },
56
+ recommendation: "proceed",
57
+ }
58
+ }
59
+
47
60
  let defaultAdvisors = DEFAULT_ADVISOR_COUNT
48
61
  let defaultReviewers = DEFAULT_REVIEWER_COUNT
49
62
  if (risk.council_mode === "lite") {
50
63
  defaultAdvisors = LITE_ADVISOR_COUNT
51
64
  defaultReviewers = LITE_REVIEWER_COUNT
52
- } else if (risk.council_mode === "jury-only") {
53
- defaultAdvisors = JURY_ONLY_ADVISOR_COUNT
54
- defaultReviewers = JURY_ONLY_REVIEWER_COUNT
55
65
  }
56
66
  const advisorCount = deps.advisorCount ?? defaultAdvisors
57
67
  const reviewerCount = deps.reviewerCount ?? defaultReviewers
@@ -94,7 +94,7 @@ export type RiskLevel = "low" | "medium" | "high" | "critical"
94
94
  /**
95
95
  * Determines which Council mode to use.
96
96
  * skip → Oracle query only, no LLM validation
97
- * jury-only → Jury scores, no Council fan-out
97
+ * jury-only → Jury scores, Council skipped entirely (low-risk fast path)
98
98
  * lite → Jury + 1–2 reviewers (no full advisor fan-out)
99
99
  * full → Full Council (default 5 advisors + 5 reviewers + Chairman)
100
100
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balpal4495/quorum",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Portable reasoning layer for agentic codebases — Oracle, Jury, Council, Sentinel",
5
5
  "type": "module",
6
6
  "license": "MIT",