@balpal4495/quorum 2.0.0 → 3.0.1
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/.github/copilot-instructions.md +29 -6
- package/README.md +69 -2
- package/bin/commands/compass.js +942 -0
- package/bin/commands/init.js +13 -7
- package/bin/commands/migrate-v2.js +136 -0
- package/bin/commands/sentinel.js +1 -1
- package/bin/commands/sync.js +97 -0
- package/bin/quorum.js +35 -0
- package/bin/templates/CLAUDE.md +101 -0
- package/modules/README.md +57 -10
- package/modules/compass/behavior.ts +161 -0
- package/modules/compass/create.ts +365 -0
- package/modules/compass/evidence/collect.ts +109 -0
- package/modules/compass/index.ts +7 -0
- package/modules/compass/prompts/index.ts +230 -0
- package/modules/compass/prompts/system.ts +24 -0
- package/modules/compass/propose.ts +152 -0
- package/modules/compass/schemas.ts +121 -0
- package/modules/compass/score.ts +77 -0
- package/modules/compass/sources/index.ts +413 -0
- package/modules/compass/types.ts +431 -0
- package/modules/setup.ts +33 -0
- package/package.json +19 -11
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Architecture
|
|
4
4
|
|
|
5
|
-
This project uses
|
|
6
|
-
They form the knowledge and
|
|
5
|
+
This project uses six portable reasoning modules: **Advisor**, **Oracle**, **Jury**, **Council**, **Sentinel**, and **Compass**.
|
|
6
|
+
They form the knowledge, validation, and product-direction layer for all agentic work in this codebase.
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
|
|
9
|
+
Advisor → plain-language Chronicle queries
|
|
10
|
+
Oracle → Jury → Council → human gate → Executor
|
|
11
|
+
Sentinel → coverage + drift
|
|
12
|
+
Compass → product-direction synthesis (behaviours, pathways, bets, scoring)
|
|
10
13
|
```
|
|
11
14
|
|
|
12
15
|
Source: `modules/` — see [modules/README.md](modules/README.md) for full API reference.
|
|
@@ -35,20 +38,23 @@ There are no auto-commits. Do not attempt to bypass this gate.
|
|
|
35
38
|
|
|
36
39
|
| Module | What it does | LLM? |
|
|
37
40
|
|---|---|---|
|
|
41
|
+
| `ask()` | Plain-language question answered from Chronicle — validates internally, retries up to 2× | Yes |
|
|
38
42
|
| `oracle.query()` | Retrieves relevant Chronicle entries by semantic + BM25 search | No |
|
|
39
43
|
| `oracle.propose()` | Stages a new entry for human review | No |
|
|
40
44
|
| `oracle.commit()` | Indexes an approved entry — human-triggered only | No |
|
|
41
45
|
| `jury.evaluate()` | Scores a design against evidence across 4 dimensions | Yes |
|
|
42
46
|
| `council.deliberate()` | Adversarial validation via advisor/reviewer fan-out | Yes |
|
|
47
|
+
| `sentinel` | Coverage reporting, drift detection, and PR coverage maps | Optional |
|
|
48
|
+
| `compass` | Product-direction synthesis — behaviours, opportunities, pathways, bets, idea scoring | Optional |
|
|
43
49
|
|
|
44
50
|
---
|
|
45
51
|
|
|
46
52
|
## Setup
|
|
47
53
|
|
|
48
54
|
```typescript
|
|
49
|
-
import { setup } from "
|
|
55
|
+
import { setup } from "@balpal4495/quorum"
|
|
50
56
|
|
|
51
|
-
const { oracle, evaluate, deliberate } = await setup({ llm: yourProvider })
|
|
57
|
+
const { oracle, evaluate, deliberate, ask, compass } = await setup({ llm: yourProvider })
|
|
52
58
|
```
|
|
53
59
|
|
|
54
60
|
`setup()` creates Chronicle directories, warms the embedder, and wires all dependencies.
|
|
@@ -87,8 +93,25 @@ After `council.deliberate()`:
|
|
|
87
93
|
|
|
88
94
|
---
|
|
89
95
|
|
|
96
|
+
## CLI quick reference
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
quorum advisor brief # full Chronicle summary, no LLM
|
|
100
|
+
quorum advisor query "topic" # keyword search, no LLM
|
|
101
|
+
quorum advisor "plain-language question" # synthesised answer via LLM
|
|
102
|
+
quorum check --outcome "..." --design "..." # instant risk triage
|
|
103
|
+
quorum commit --list # review pending proposals
|
|
104
|
+
quorum commit <id> # approve a Chronicle entry
|
|
105
|
+
quorum compass map # map current product behaviours (no LLM)
|
|
106
|
+
quorum compass brief # product-direction summary (LLM)
|
|
107
|
+
quorum compass pathways --goal "..." # generate product pathways (LLM)
|
|
108
|
+
quorum compass score "idea" # score a product idea (LLM)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
90
113
|
## Build and test
|
|
91
114
|
|
|
92
115
|
```bash
|
|
93
|
-
npx vitest run modules/
|
|
116
|
+
npx vitest run modules/ evals/
|
|
94
117
|
```
|
package/README.md
CHANGED
|
@@ -28,6 +28,23 @@ Every new session starts from zero. The same mistakes get proposed again. The sa
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
+
## Why not just use agent instructions?
|
|
32
|
+
|
|
33
|
+
Agent instructions tell the AI how to behave.
|
|
34
|
+
Quorum tells the AI what the project has already learned.
|
|
35
|
+
|
|
36
|
+
| | Agent instructions | Chronicle |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| Content | Rules and preferences | Decisions, rejections, outcomes |
|
|
39
|
+
| Growth | Static — you write them | Grows — the agent stages, you approve |
|
|
40
|
+
| Durability | Easy to overwrite or ignore | Git-backed, survives config changes |
|
|
41
|
+
| Failed approaches | Not tracked | Hard stops on refuted patterns |
|
|
42
|
+
| Human approval | Not required | Required for every indexed entry |
|
|
43
|
+
|
|
44
|
+
Instructions are a starting point. Chronicle is accumulated project knowledge.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
31
48
|
## What changes after Quorum
|
|
32
49
|
|
|
33
50
|
**Without Quorum:**
|
|
@@ -125,6 +142,10 @@ Every PR merge posts a growth comment showing what Chronicle learned. `quorum ev
|
|
|
125
142
|
| See whether memory is growing | `quorum growth` |
|
|
126
143
|
| Consolidate stale or duplicate entries | `quorum evolve` |
|
|
127
144
|
| Find undocumented areas | `quorum sentinel coverage` |
|
|
145
|
+
| Understand what the product currently does | `quorum compass map` |
|
|
146
|
+
| Generate product pathways toward a goal | `quorum compass pathways --goal "..."` |
|
|
147
|
+
| Score a product idea | `quorum compass score "add Slack integration"` |
|
|
148
|
+
| Stage a direction decision for Chronicle | `quorum compass propose --from-last` |
|
|
128
149
|
|
|
129
150
|
---
|
|
130
151
|
|
|
@@ -154,12 +175,57 @@ npx @balpal4495/quorum@latest init
|
|
|
154
175
|
npm install
|
|
155
176
|
```
|
|
156
177
|
|
|
157
|
-
Then
|
|
178
|
+
Then run Quorum from your project:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx quorum advisor brief
|
|
182
|
+
npx quorum advisor "what has the team decided about auth?"
|
|
183
|
+
npx quorum check --outcome "..." --design "..."
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Optional — install the CLI globally:**
|
|
158
187
|
|
|
159
188
|
```bash
|
|
160
189
|
npm install -g @balpal4495/quorum
|
|
190
|
+
quorum advisor brief
|
|
161
191
|
```
|
|
162
192
|
|
|
193
|
+
> **v2 architecture:** Implementation lives in the npm package (`node_modules/@balpal4495/quorum`). Project memory lives in your repo (`.chronicle/`). Agent docs bridge the two (`quorum/CLAUDE.md`, `.github/copilot-instructions.md`). Nothing is copied into your project that you need to maintain.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Upgrading from v1
|
|
198
|
+
|
|
199
|
+
If your project has a `quorum/modules/` folder (the v1 vendored pattern), migrate in one step:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
quorum migrate-v2
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
After any `npm update @balpal4495/quorum`, refresh agent instruction files:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
quorum sync
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Runtime model
|
|
214
|
+
|
|
215
|
+
The CLI works in plain Node 18+.
|
|
216
|
+
|
|
217
|
+
Programmatic imports are TypeScript-native and require a TS-aware runtime such as `tsx`, `ts-node`, Bun, or a bundler. Plain `node` will not resolve `.ts` files.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# recommended for scripts
|
|
221
|
+
npx tsx your-script.ts
|
|
222
|
+
|
|
223
|
+
# or Bun
|
|
224
|
+
bun your-script.ts
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
For most host-project use cases the CLI is sufficient and requires no loader. See [modules/README.md](modules/README.md) for the full programmatic API.
|
|
228
|
+
|
|
163
229
|
---
|
|
164
230
|
|
|
165
231
|
## Command reference
|
|
@@ -394,7 +460,7 @@ The next person touching that table has the full reasoning. They don't repeat th
|
|
|
394
460
|
|
|
395
461
|
## How it works under the hood
|
|
396
462
|
|
|
397
|
-
You do not need to understand these internals to use Quorum. They
|
|
463
|
+
You do not need to understand these internals to use Quorum. They live in `node_modules/@balpal4495/quorum` after install. The `quorum/` folder that `init` creates in your project contains agent-readable docs and Chronicle data — not module source.
|
|
398
464
|
|
|
399
465
|
| Module | What it does | LLM |
|
|
400
466
|
|---|---|---|
|
|
@@ -403,6 +469,7 @@ You do not need to understand these internals to use Quorum. They are installed
|
|
|
403
469
|
| **Jury** | Evaluates a design against Chronicle evidence. Four-dimension confidence score, deterministic preflight, hard-blocker gaps. | Yes |
|
|
404
470
|
| **Council** | Adversarial panel — advisors challenge independently, reviewers critique anonymously, Chairman gives a structured verdict. Risk-scaled fan-out. | Yes |
|
|
405
471
|
| **Sentinel** | Coverage reporting (which files Chronicle knows about), drift detection (are entries still accurate), PR coverage maps. | Optional |
|
|
472
|
+
| **Compass** | Product-direction layer — maps current behaviours from code and docs, identifies gaps and opportunities, generates pathways, strategic bets, and idea scores grounded in Chronicle evidence. All writes go through `oracle.propose()`. | Optional |
|
|
406
473
|
|
|
407
474
|
### How Jury works
|
|
408
475
|
|