pluribus-context 0.3.0 → 0.3.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.
- package/CHANGELOG.md +94 -2
- package/README.md +102 -30
- package/bin/pluribus.js +48 -2
- package/docs/ci-audit-example.md +80 -0
- package/docs/context-drift-audit.md +78 -12
- package/docs/context-drift-taxonomy.md +83 -0
- package/docs/context-file-review.md +3 -3
- package/docs/migrate-existing-context.md +21 -11
- package/docs/pre-commit-audit.md +67 -0
- package/docs/quickstart.md +51 -12
- package/docs/release-checklist.md +36 -6
- package/docs/when-to-use-pluribus.md +36 -0
- package/examples/context-drift-audit/.cursorrules +30 -0
- package/examples/context-drift-audit/.github/copilot-instructions.md +28 -0
- package/examples/context-drift-audit/CLAUDE.md +55 -0
- package/examples/context-drift-audit/README.md +31 -0
- package/examples/context-drift-audit/pluribus.md +35 -0
- package/examples/git-hooks/pre-commit +11 -0
- package/examples/github-actions/pluribus-audit.yml +26 -0
- package/package.json +26 -11
- package/schemas/audit-result.schema.json +119 -0
- package/src/commands/audit.js +162 -36
- package/src/commands/init.js +20 -4
- package/src/utils/version.js +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Context Drift Taxonomy
|
|
2
|
+
|
|
3
|
+
"Context drift" is overloaded. Different teams use the same phrase for different failure modes, so the fix depends on which layer is drifting.
|
|
4
|
+
|
|
5
|
+
Pluribus is intentionally focused on one layer: keeping generated AI context files aligned with an intentional source of truth. It can help you see and prevent file-level drift, but it cannot prove that a model will prioritize a correct file at runtime.
|
|
6
|
+
|
|
7
|
+
## 1. Output drift: generated files no longer match the source
|
|
8
|
+
|
|
9
|
+
**Symptom:** `pluribus.md` says one thing, but `CLAUDE.md`, `.cursorrules`, Copilot instructions, `AGENTS.md`, Windsurf, Continue, or Zed outputs are missing or stale.
|
|
10
|
+
|
|
11
|
+
**Common cause:** someone edited a generated file directly, changed the source without regenerating outputs, or forgot to commit a generated file.
|
|
12
|
+
|
|
13
|
+
**Best check:**
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx --yes pluribus-context@latest audit --strict
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Best fix:** regenerate outputs from the reviewed source:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
23
|
+
npx --yes pluribus-context@latest sync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This is Pluribus' core job.
|
|
27
|
+
|
|
28
|
+
## 2. Source-of-truth drift: the canonical file is wrong
|
|
29
|
+
|
|
30
|
+
**Symptom:** all generated files match `pluribus.md`, but the shared instructions are outdated: stale test commands, dead paths, old architecture notes, or constraints that no longer match the codebase.
|
|
31
|
+
|
|
32
|
+
**Common cause:** the team treats AI context as documentation, but does not review it when code or process changes.
|
|
33
|
+
|
|
34
|
+
**Best check:** repo-specific review, tests, docs review, or a dedicated context linter that can detect dead paths, stale commands, token bloat, unsafe instructions, and conflicting guidance.
|
|
35
|
+
|
|
36
|
+
**Best fix:** update `pluribus.md` in the same PR as the code/process change, then run `pluribus audit --strict` after syncing.
|
|
37
|
+
|
|
38
|
+
Pluribus can make the canonical context reviewable, but it cannot know whether every statement is semantically true for your repo.
|
|
39
|
+
|
|
40
|
+
## 3. Runtime loading drift: the file exists, but the tool does not load or prioritize it
|
|
41
|
+
|
|
42
|
+
**Symptom:** `CLAUDE.md` or another generated file is correct on disk, but the model behaves as if older, summarized, or lower-priority instructions are more authoritative. This often appears after compaction, summarization, long sessions, or subagent handoffs.
|
|
43
|
+
|
|
44
|
+
**Common cause:** runtime load order, context-window ordering, summary precedence, missing diagnostics, or a tool-specific rule about when files are read.
|
|
45
|
+
|
|
46
|
+
**Best check:** tool-specific diagnostics, hooks, load traces, or a fresh-session sanity check:
|
|
47
|
+
|
|
48
|
+
1. Open a fresh session in the target tool.
|
|
49
|
+
2. Ask it to summarize the project rules or list the instruction files it loaded.
|
|
50
|
+
3. If available, inspect hook output or context-load traces.
|
|
51
|
+
|
|
52
|
+
A lightweight canary near the top of a generated file can show that the file was noticed, but it does not prove priority after compaction or summarization.
|
|
53
|
+
|
|
54
|
+
**Best fix:** tool-specific load-order or hook configuration. Pluribus can keep the file aligned; the tool must prove that it loaded and prioritized the file.
|
|
55
|
+
|
|
56
|
+
## 4. Behavioral drift: the model changes behavior across turns despite correct files
|
|
57
|
+
|
|
58
|
+
**Symptom:** the same instructions are loaded, but compliance degrades across long sessions or repeated tasks.
|
|
59
|
+
|
|
60
|
+
**Common cause:** accumulated conversation state, ambiguous instructions, too many soft preferences, or summaries that preserve the spirit of a rule while losing exact constraints.
|
|
61
|
+
|
|
62
|
+
**Best check:** reproduce in a fresh session versus a long/resumed session. If fresh sessions comply and long sessions drift, the issue is runtime/session behavior, not file sync.
|
|
63
|
+
|
|
64
|
+
**Best fix:** tighten critical rules into explicit constraints, split large instruction files, use tool-specific hooks where available, and keep hard requirements near the top of the runtime-loaded context.
|
|
65
|
+
|
|
66
|
+
## Decision table
|
|
67
|
+
|
|
68
|
+
| Drift type | Fastest check | Pluribus role |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| Generated files stale or missing | `pluribus audit --strict` | Core fit |
|
|
71
|
+
| Canonical context outdated | repo/context linter + review | Makes source reviewable, but does not validate truth |
|
|
72
|
+
| Correct file ignored after compaction | tool diagnostics/hooks/load trace | Boundary: Pluribus cannot control runtime priority |
|
|
73
|
+
| Long-session behavior degrades | fresh-session repro + runtime checks | Boundary: sync can help, but runtime must enforce priority |
|
|
74
|
+
|
|
75
|
+
## Practical adoption path
|
|
76
|
+
|
|
77
|
+
1. Run `npx --yes pluribus-context@latest audit` to learn which files exist and whether generated outputs are current.
|
|
78
|
+
2. If multiple tools share the same facts, move those stable facts into `pluribus.md`.
|
|
79
|
+
3. Run `npx --yes pluribus-context@latest sync --dry-run` and review the generated files.
|
|
80
|
+
4. Add `npx --yes pluribus-context@latest audit --strict` to CI or pre-commit if generated files should stay current.
|
|
81
|
+
5. Separately verify that each AI tool actually loads and prioritizes its generated file at runtime.
|
|
82
|
+
|
|
83
|
+
That separation keeps the promise honest: Pluribus prevents file-level context drift. It complements, rather than replaces, runtime diagnostics and context linters.
|
|
@@ -56,8 +56,8 @@ If someone edits a generated file directly, expect drift.
|
|
|
56
56
|
Preview generated outputs before changing a real repo:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
npx pluribus-context validate
|
|
60
|
-
npx pluribus-context sync --dry-run
|
|
59
|
+
npx --yes pluribus-context@latest validate
|
|
60
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Read the preview like a PR diff. Confirm that shared facts appear where they should and that private or tool-specific details did not get flattened into every output.
|
|
@@ -67,7 +67,7 @@ Read the preview like a PR diff. Confirm that shared facts appear where they sho
|
|
|
67
67
|
For repos that commit generated AI context files, add a lightweight check:
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
npx pluribus-context sync
|
|
70
|
+
npx --yes pluribus-context@latest sync
|
|
71
71
|
git diff --exit-code -- \
|
|
72
72
|
CLAUDE.md \
|
|
73
73
|
.cursorrules \
|
|
@@ -49,10 +49,21 @@ Read the files and separate three kinds of content:
|
|
|
49
49
|
|
|
50
50
|
Move project facts and shared conventions into `pluribus.md`. Keep tool-specific quirks as adapter feedback or custom skill work, not as duplicated generic context.
|
|
51
51
|
|
|
52
|
-
## 2.
|
|
52
|
+
## 2. Preview and scaffold `pluribus.md`
|
|
53
|
+
|
|
54
|
+
Preview the scaffold before writing a new source file. `init --dry-run` is prepared for `pluribus-context@0.3.3`; until that patch is published, use the GitHub tag install command for the preview:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx --yes --package github:caioribeiroclw-pixel/pluribus#v0.3.3 pluribus init --dry-run \
|
|
58
|
+
--name "Your project" \
|
|
59
|
+
--description "What this repo does" \
|
|
60
|
+
--tools claude,cursor,copilot,openclaw
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
When the preview looks right, create `pluribus.md` from the published npm package:
|
|
53
64
|
|
|
54
65
|
```bash
|
|
55
|
-
npx pluribus-context init \
|
|
66
|
+
npx --yes pluribus-context@latest init \
|
|
56
67
|
--name "Your project" \
|
|
57
68
|
--description "What this repo does" \
|
|
58
69
|
--tools claude,cursor,copilot,openclaw
|
|
@@ -89,8 +100,8 @@ I am working on <project>. The goal is <goal>.
|
|
|
89
100
|
Run a dry-run first:
|
|
90
101
|
|
|
91
102
|
```bash
|
|
92
|
-
npx pluribus-context validate
|
|
93
|
-
npx pluribus-context sync --dry-run
|
|
103
|
+
npx --yes pluribus-context@latest validate
|
|
104
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
94
105
|
```
|
|
95
106
|
|
|
96
107
|
Check the preview for each target tool. If the generated files would lose important instructions, move that missing context into `pluribus.md` and run the dry-run again.
|
|
@@ -100,7 +111,7 @@ Check the preview for each target tool. If the generated files would lose import
|
|
|
100
111
|
When the preview looks right:
|
|
101
112
|
|
|
102
113
|
```bash
|
|
103
|
-
npx pluribus-context sync
|
|
114
|
+
npx --yes pluribus-context@latest sync
|
|
104
115
|
```
|
|
105
116
|
|
|
106
117
|
Review the diff carefully:
|
|
@@ -120,17 +131,16 @@ Recommended commit shape:
|
|
|
120
131
|
For local work:
|
|
121
132
|
|
|
122
133
|
```bash
|
|
123
|
-
npx pluribus-context watch
|
|
134
|
+
npx --yes pluribus-context@latest watch
|
|
124
135
|
```
|
|
125
136
|
|
|
126
|
-
For CI or pre-commit flows, use
|
|
137
|
+
For CI or pre-commit flows, use the read-only audit command in strict mode:
|
|
127
138
|
|
|
128
139
|
```bash
|
|
129
|
-
npx pluribus-context
|
|
130
|
-
git diff --exit-code -- CLAUDE.md .cursorrules .github/copilot-instructions.md AGENTS.md
|
|
140
|
+
npx --yes pluribus-context@latest audit --strict
|
|
131
141
|
```
|
|
132
142
|
|
|
133
|
-
If this fails, someone edited a generated file directly or changed `pluribus.md` without regenerating outputs.
|
|
143
|
+
If this fails, someone edited a generated file directly or changed `pluribus.md` without regenerating outputs. Use `npx --yes pluribus-context@latest sync --dry-run` to preview the fix before writing files.
|
|
134
144
|
|
|
135
145
|
## 6. Use imports for team/org context
|
|
136
146
|
|
|
@@ -153,7 +163,7 @@ For cross-repo shared context, use explicit remote imports and pin them with `--
|
|
|
153
163
|
Then:
|
|
154
164
|
|
|
155
165
|
```bash
|
|
156
|
-
npx pluribus-context sync --update-imports
|
|
166
|
+
npx --yes pluribus-context@latest sync --update-imports
|
|
157
167
|
```
|
|
158
168
|
|
|
159
169
|
Commit `pluribus.lock.json` so future syncs are deterministic. Do not commit `.pluribus/cache/remote/`; it is a local regenerable cache.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Pre-commit Audit Hook
|
|
2
|
+
|
|
3
|
+
Use this when you want a local guard before CI, but do not want Pluribus to write files automatically.
|
|
4
|
+
|
|
5
|
+
The hook runs `pluribus audit --strict` and fails the commit when generated context files are missing or drifted from `pluribus.md`.
|
|
6
|
+
|
|
7
|
+
## Copy-paste hook
|
|
8
|
+
|
|
9
|
+
From your project root:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mkdir -p .git/hooks
|
|
13
|
+
cat > .git/hooks/pre-commit <<'EOF'
|
|
14
|
+
#!/usr/bin/env sh
|
|
15
|
+
set -eu
|
|
16
|
+
|
|
17
|
+
# Keep generated AI context files aligned with pluribus.md before committing.
|
|
18
|
+
# Install by copying this file to .git/hooks/pre-commit and running chmod +x.
|
|
19
|
+
|
|
20
|
+
if [ ! -f pluribus.md ]; then
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
npx --yes pluribus-context@latest audit --strict
|
|
25
|
+
EOF
|
|
26
|
+
chmod +x .git/hooks/pre-commit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Now commits fail if `CLAUDE.md`, `.cursorrules`, Copilot instructions, `AGENTS.md`, or other generated outputs are stale.
|
|
30
|
+
|
|
31
|
+
To fix drift:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
35
|
+
npx --yes pluribus-context@latest sync
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Review the generated files, then commit `pluribus.md` and the regenerated outputs together.
|
|
39
|
+
|
|
40
|
+
## With Husky
|
|
41
|
+
|
|
42
|
+
If your repo already uses Husky:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx husky init
|
|
46
|
+
cat > .husky/pre-commit <<'EOF'
|
|
47
|
+
#!/usr/bin/env sh
|
|
48
|
+
set -eu
|
|
49
|
+
|
|
50
|
+
if [ ! -f pluribus.md ]; then
|
|
51
|
+
exit 0
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
npx --yes pluribus-context@latest audit --strict
|
|
55
|
+
EOF
|
|
56
|
+
chmod +x .husky/pre-commit
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## When not to use this
|
|
60
|
+
|
|
61
|
+
Do not add the hook before the team agrees that generated context files should be kept in sync. For early evaluation, run the read-only command manually first:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx --yes pluribus-context@latest audit
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If your team prefers server-side enforcement only, use the [CI audit example](ci-audit-example.md) instead.
|
package/docs/quickstart.md
CHANGED
|
@@ -4,7 +4,19 @@ Use this when you want to try Pluribus without touching a real project yet.
|
|
|
4
4
|
|
|
5
5
|
Pluribus takes one intentional context file (`pluribus.md`) and generates the tool-specific files your AI tools expect: `CLAUDE.md`, `.cursorrules`, Copilot instructions, `AGENTS.md`, Windsurf/Continue rules, and Zed `.rules`.
|
|
6
6
|
|
|
7
|
-
Already have one or more of those files?
|
|
7
|
+
Already have one or more of those files? Start with a read-only inventory before replacing anything:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx --yes pluribus-context@latest audit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Without `pluribus.md`, audit lists existing AI context surfaces so you can decide what to migrate. Then see [Migrate Existing AI Context Files](migrate-existing-context.md).
|
|
14
|
+
|
|
15
|
+
## What Pluribus writes
|
|
16
|
+
|
|
17
|
+
The safest path is audit → validate → `sync --dry-run` → `sync`. The first three steps are read-only. `init` writes only `pluribus.md`, and `sync` writes only generated AI context files for the tools you selected (`CLAUDE.md`, `.cursorrules`, Copilot instructions, `AGENTS.md`, Windsurf/Continue rules, or Zed `.rules`). Generated files include a `Generated by Pluribus ... do not edit manually` header, so direct edits show up as drift in `pluribus audit`.
|
|
18
|
+
|
|
19
|
+
Remote imports do not refresh silently; Pluribus writes `pluribus.lock.json` and `.pluribus/cache/remote/` only when you explicitly pass `--update-imports`.
|
|
8
20
|
|
|
9
21
|
## 1. Create a disposable demo project
|
|
10
22
|
|
|
@@ -13,21 +25,46 @@ mkdir pluribus-demo
|
|
|
13
25
|
cd pluribus-demo
|
|
14
26
|
```
|
|
15
27
|
|
|
16
|
-
## 2.
|
|
28
|
+
## 2. Preview and scaffold context
|
|
29
|
+
|
|
30
|
+
Start read-only so you can see the template before writing a file. `init --dry-run` is prepared for `pluribus-context@0.3.3`; until that patch is published, use the GitHub tag install command for the preview:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx --yes --package github:caioribeiroclw-pixel/pluribus#v0.3.3 pluribus init --dry-run \
|
|
34
|
+
--name "Ana" \
|
|
35
|
+
--description "A Node.js service" \
|
|
36
|
+
--tools claude,cursor,copilot
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
When the scaffold looks right, create it from the published npm package:
|
|
17
40
|
|
|
18
41
|
```bash
|
|
19
|
-
npx pluribus-context init \
|
|
42
|
+
npx --yes pluribus-context@latest init \
|
|
20
43
|
--name "Ana" \
|
|
21
44
|
--description "A Node.js service" \
|
|
22
45
|
--tools claude,cursor,copilot
|
|
23
46
|
```
|
|
24
47
|
|
|
25
|
-
This creates `pluribus.md
|
|
48
|
+
This creates `pluribus.md`, the single source-of-truth file Pluribus reads. Open it and replace the scaffolded notes with real project context when you are ready. If you later need team/org reuse, keep the local project sections in `pluribus.md` and import shared Markdown with `# @import ./shared/team-context.md`.
|
|
49
|
+
|
|
50
|
+
Choose the comma-separated `--tools` list that matches your repo. The built-in adapters are:
|
|
51
|
+
|
|
52
|
+
| Tool id | Generated file |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `claude` | `CLAUDE.md` |
|
|
55
|
+
| `cursor` | `.cursorrules` |
|
|
56
|
+
| `copilot` | `.github/copilot-instructions.md` |
|
|
57
|
+
| `openclaw` | `AGENTS.md` |
|
|
58
|
+
| `windsurf` | `.windsurf/rules/pluribus.md` |
|
|
59
|
+
| `continue` | `.continue/rules/pluribus.md` |
|
|
60
|
+
| `zed` | `.rules` |
|
|
61
|
+
|
|
62
|
+
You can also run `npx --yes pluribus-context@latest --help` to see the current supported tool ids from the CLI itself.
|
|
26
63
|
|
|
27
64
|
## 3. Validate before writing generated files
|
|
28
65
|
|
|
29
66
|
```bash
|
|
30
|
-
npx pluribus-context validate
|
|
67
|
+
npx --yes pluribus-context@latest validate
|
|
31
68
|
```
|
|
32
69
|
|
|
33
70
|
Validation checks for missing required sections, duplicate top-level sections, broken imports, and unsupported tool names.
|
|
@@ -35,7 +72,7 @@ Validation checks for missing required sections, duplicate top-level sections, b
|
|
|
35
72
|
## 4. Preview generated outputs
|
|
36
73
|
|
|
37
74
|
```bash
|
|
38
|
-
npx pluribus-context sync --dry-run
|
|
75
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
39
76
|
```
|
|
40
77
|
|
|
41
78
|
You should see previews for the selected tools. For the command above, Pluribus targets:
|
|
@@ -49,7 +86,7 @@ You should see previews for the selected tools. For the command above, Pluribus
|
|
|
49
86
|
## 5. Audit before writing or in CI
|
|
50
87
|
|
|
51
88
|
```bash
|
|
52
|
-
npx pluribus-context audit
|
|
89
|
+
npx --yes pluribus-context@latest audit
|
|
53
90
|
```
|
|
54
91
|
|
|
55
92
|
Before generated files exist, audit reports them as missing. After sync, it becomes a read-only drift check. Use `--strict` in CI when you want missing or drifted generated files to fail the build.
|
|
@@ -57,7 +94,7 @@ Before generated files exist, audit reports them as missing. After sync, it beco
|
|
|
57
94
|
## 6. Write the files when the preview looks right
|
|
58
95
|
|
|
59
96
|
```bash
|
|
60
|
-
npx pluribus-context sync
|
|
97
|
+
npx --yes pluribus-context@latest sync
|
|
61
98
|
```
|
|
62
99
|
|
|
63
100
|
Commit `pluribus.md` as the source of truth. Commit generated files if your team wants each tool to work immediately after clone; otherwise regenerate them in local setup/CI.
|
|
@@ -65,7 +102,7 @@ Commit `pluribus.md` as the source of truth. Commit generated files if your team
|
|
|
65
102
|
## 7. Keep files fresh while editing
|
|
66
103
|
|
|
67
104
|
```bash
|
|
68
|
-
npx pluribus-context watch
|
|
105
|
+
npx --yes pluribus-context@latest watch
|
|
69
106
|
```
|
|
70
107
|
|
|
71
108
|
`watch` re-runs `sync` after edits to `pluribus.md` with a small debounce, so tool-specific files do not drift during normal work.
|
|
@@ -86,17 +123,19 @@ Local sections apply after imports, so project-specific context can override sha
|
|
|
86
123
|
|
|
87
124
|
## Common friction
|
|
88
125
|
|
|
89
|
-
- **`pluribus` command not found after `npx`:** use `npx pluribus-context ...` for one-off runs, or install globally with `npm install -g pluribus-context` and then run `pluribus ...`.
|
|
90
|
-
- **Remote imports fail without `--update-imports`:** network refresh is explicit. Run `npx pluribus-context sync --update-imports` to refresh and pin remote content, then normal `sync` uses the lock/cache offline.
|
|
126
|
+
- **`pluribus` command not found after `npx`:** use `npx --yes pluribus-context@latest ...` for one-off runs, or install globally with `npm install -g pluribus-context@latest` and then run `pluribus ...`.
|
|
127
|
+
- **Remote imports fail without `--update-imports`:** network refresh is explicit. Run `npx --yes pluribus-context@latest sync --update-imports` to refresh and pin remote content, then normal `sync` uses the lock/cache offline.
|
|
91
128
|
- **Private GitHub imports fail:** set `GH_TOKEN`/`GITHUB_TOKEN` or log in with `gh auth login`. Pluribus never writes tokens to `pluribus.lock.json` or cache files.
|
|
92
129
|
- **Generated files look wrong:** edit `pluribus.md`, run `validate`, then use `audit` and `sync --dry-run` before writing files.
|
|
93
130
|
|
|
94
131
|
## Feedback wanted
|
|
95
132
|
|
|
96
|
-
If the quickstart fails or the generated files do not match how your team actually uses AI tools, open
|
|
133
|
+
If the quickstart fails or the generated files do not match how your team actually uses AI tools, open a [quickstart feedback issue](https://github.com/caioribeiroclw-pixel/pluribus/issues/new?template=quickstart-feedback.yml) with:
|
|
97
134
|
|
|
98
135
|
1. the command you ran;
|
|
99
136
|
2. which tool file felt wrong;
|
|
100
137
|
3. what you expected Pluribus to generate instead.
|
|
101
138
|
|
|
139
|
+
If the read-only audit was the confusing step, open an [audit feedback issue](https://github.com/caioribeiroclw-pixel/pluribus/issues/new?template=audit-feedback.yml) instead and summarize what it missed, flagged, or made unclear.
|
|
140
|
+
|
|
102
141
|
That feedback is more useful than generic feature requests because it shows where the context format or adapters are not matching real workflows.
|
|
@@ -17,13 +17,23 @@ This checklist keeps Pluribus releases reproducible and avoids accidentally publ
|
|
|
17
17
|
- Update `CHANGELOG.md` with user-facing changes, migration notes, and verification commands.
|
|
18
18
|
- Confirm README install commands use the package name `pluribus-context` and that the binary remains `pluribus`.
|
|
19
19
|
|
|
20
|
-
## 2. Local
|
|
20
|
+
## 2. Local release gate
|
|
21
21
|
|
|
22
|
-
Run from the repo root:
|
|
22
|
+
Run the consolidated release gate from the repo root:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
+
npm run release:verify
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The verifier requires a clean `main...origin/main` checkout, reports the local package version versus npm latest, classifies the npm auth state from `npm whoami` (logged in, missing auth, or invalid/stale token), smokes the currently published npm package when one exists, then runs `npm test`, `git diff --check`, `npm run release:smoke`, `npm pack --dry-run`, and `npm publish --dry-run`. If npm auth is missing or stale, the verifier still proves the package is technically ready and names the auth/2FA action left before publish.
|
|
29
|
+
|
|
30
|
+
If you need to debug an individual step, run it directly:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run published:smoke
|
|
25
34
|
npm test
|
|
26
35
|
git diff --check
|
|
36
|
+
npm run release:smoke
|
|
27
37
|
npm pack --dry-run
|
|
28
38
|
npm publish --dry-run
|
|
29
39
|
```
|
|
@@ -59,18 +69,38 @@ Expected results:
|
|
|
59
69
|
|
|
60
70
|
## 4. Publish
|
|
61
71
|
|
|
62
|
-
Only publish after npm auth is active and the dry run is clean:
|
|
72
|
+
Only publish after npm auth is active and the dry run is clean. If `npm run release:verify` reports an invalid/stale token, clear it with `npm logout` before logging in again or using a fresh temporary publish token; do not paste tokens into the repo, docs, logs, or shell history.
|
|
73
|
+
|
|
74
|
+
Use the guarded publish command so the same release gate runs immediately before publishing, then the published npm smoke runs immediately after:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm run release:publish
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
For a no-publish rehearsal, run:
|
|
63
81
|
|
|
64
82
|
```bash
|
|
65
|
-
npm publish --
|
|
83
|
+
npm run release:publish -- --dry-run
|
|
66
84
|
```
|
|
67
85
|
|
|
86
|
+
This rehearsal runs the full release verifier and confirms `HEAD` matches the local Git tag `v<package.json version>` before the OTP window. Use it before asking for or entering a live OTP so tag drift is caught without touching npm.
|
|
87
|
+
|
|
88
|
+
If npm asks for OTP, use a short live OTP window and pass it through npm's normal `--otp` flag; do not paste tokens into the repo, docs, logs, or shell history. Avoid raw `_authToken`/token arguments — the guarded script refuses credential-like CLI arguments.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm run release:publish -- --otp <one-time-code>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If a GitHub release or tag was created before npm publish succeeds, pause distribution. If `HEAD` still matches `v<package.json version>`, finish the npm publish with OTP/token and verify that npm `latest` matches the tagged version before posting publicly. If commits landed after the GitHub release/tag while npm was blocked, do **not** publish the same version from the newer commit. Reconcile first by publishing from the tagged commit, cutting a new patch version/tag, or intentionally updating the GitHub release/tag, then rerun the guarded publish.
|
|
95
|
+
|
|
96
|
+
Before any real npm publish, `release:publish` verifies that `HEAD` matches `v<package.json version>`; the dry-run rehearsal verifies the same alignment without publishing.
|
|
97
|
+
|
|
68
98
|
Then verify the registry entry and the install path users will see:
|
|
69
99
|
|
|
70
100
|
```bash
|
|
71
101
|
npm view pluribus-context version dist.tarball
|
|
72
|
-
npm view pluribus-context readme | grep -E 'npx pluribus-context|60-second smoke test|Published to npm'
|
|
73
|
-
|
|
102
|
+
npm view pluribus-context readme | grep -E 'npx --yes pluribus-context|60-second smoke test|Published to npm'
|
|
103
|
+
npm run published:smoke
|
|
74
104
|
```
|
|
75
105
|
|
|
76
106
|
The npm README is captured at publish time. If the GitHub README changed after the previous publish, confirm the npm package page no longer contains stale pre-release markers such as `once published` before starting distribution.
|
|
@@ -28,6 +28,21 @@ The core bet is simple: if multiple AI tools need the same project facts, conven
|
|
|
28
28
|
- You need chat memory, retrieval, vector search, or agent orchestration.
|
|
29
29
|
- You want a one-time migration and do not plan to keep files synchronized.
|
|
30
30
|
|
|
31
|
+
## Pluribus vs rules sync tools
|
|
32
|
+
|
|
33
|
+
There are useful adjacent tools for applying or managing AI rules across editors and agents. If you are comparing packages such as Ruler, vibe-rules, or ai-rules-sync, start with the workflow you want rather than the package name.
|
|
34
|
+
|
|
35
|
+
Pluribus is a good fit when the source of truth should be reviewed as project context in git, regenerated into several tool-native files, and audited later for drift. It is less useful when you only need to push prompts into one tool's own rules format.
|
|
36
|
+
|
|
37
|
+
| Need | Better fit |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Apply the same simple rules to several coding agents with minimal ceremony | A rules sync tool may be enough |
|
|
40
|
+
| Manage Cursor/Windsurf prompt snippets without adopting a shared source file | A tool-native rules manager may be enough |
|
|
41
|
+
| Keep Claude, Cursor, Copilot, OpenClaw, Windsurf, Continue, Zed, and AGENTS-style context aligned over time | Pluribus |
|
|
42
|
+
| Review shared project context in PRs and regenerate generated files | Pluribus |
|
|
43
|
+
| Share org/team conventions across repos with pinned imports and a lockfile | Pluribus |
|
|
44
|
+
| Fail CI when generated context files drift from the reviewed source | Pluribus `audit --strict` |
|
|
45
|
+
|
|
31
46
|
## Pluribus vs one-way converters
|
|
32
47
|
|
|
33
48
|
A one-way converter is useful when you want to translate one tool's rule format into another tool's file once.
|
|
@@ -42,6 +57,23 @@ Pluribus is different: it treats `pluribus.md` as the source of truth and regene
|
|
|
42
57
|
| Review shared project context in PRs and regenerate generated files | Pluribus |
|
|
43
58
|
| Share org/team conventions across repos with pinned imports | Pluribus |
|
|
44
59
|
|
|
60
|
+
## Pluribus vs context linters and drift auditors
|
|
61
|
+
|
|
62
|
+
A context linter or drift auditor is useful when you want to inspect existing files and catch stale paths, dead commands, oversized instructions, risky content, or conflicting guidance.
|
|
63
|
+
|
|
64
|
+
Pluribus now includes a small read-only `pluribus audit` command, but its main job is not to be the deepest possible linter. Its main job is to prevent one specific class of drift: generated AI context files no longer matching the intentional source in `pluribus.md`.
|
|
65
|
+
|
|
66
|
+
Use both layers when they help:
|
|
67
|
+
|
|
68
|
+
| Need | Better fit |
|
|
69
|
+
|---|---|
|
|
70
|
+
| Find dead file references, stale commands, token bloat, or unsafe instructions inside context files | Dedicated context linter |
|
|
71
|
+
| Check whether `CLAUDE.md`, `.cursorrules`, Copilot instructions, and `AGENTS.md` match the same source of truth | `pluribus audit` |
|
|
72
|
+
| Auto-slim or rewrite arbitrary existing context files | Dedicated linter/fixer |
|
|
73
|
+
| Diagnose why a correct `CLAUDE.md` is ignored after compaction or summarization | Tool-specific runtime diagnostics/hooks |
|
|
74
|
+
| Generate aligned context files after review | `pluribus sync` |
|
|
75
|
+
| Enforce “generated files are up to date” in CI | `pluribus audit --strict` |
|
|
76
|
+
|
|
45
77
|
## Recommended migration path
|
|
46
78
|
|
|
47
79
|
1. Inventory your existing context files.
|
|
@@ -57,3 +89,7 @@ For the step-by-step version, see [Migrate Existing AI Context Files](migrate-ex
|
|
|
57
89
|
Pluribus is not trying to make every AI tool identical.
|
|
58
90
|
|
|
59
91
|
It is trying to keep the stable, intentional parts of your project context from drifting while still letting each tool keep its own interface and strengths.
|
|
92
|
+
|
|
93
|
+
That means Pluribus handles file-level alignment. Runtime precedence problems — for example, a tool loading a compacted summary above a correct context file — are real, but they belong in the tool's load-order, hooks, or context-priority settings rather than in Pluribus' sync layer.
|
|
94
|
+
|
|
95
|
+
For a sharper split of the overloaded term "context drift", see the [Context Drift Taxonomy](context-drift-taxonomy.md).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Cursor Rules — generated by Pluribus 0.3.3 on 2026-05-13
|
|
2
|
+
# Source: pluribus.md
|
|
3
|
+
# Do not edit manually.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Project
|
|
7
|
+
I am Mina, maintaining **RelayKit** — a small TypeScript SDK for webhook delivery.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Stack
|
|
12
|
+
- TypeScript 5.4
|
|
13
|
+
- Node.js 22 LTS
|
|
14
|
+
- Node's built-in test runner
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Conventions
|
|
18
|
+
- Prefer explicit return types for exported SDK functions
|
|
19
|
+
- Keep public API examples copy-pasteable
|
|
20
|
+
- Use small modules with clear error boundaries
|
|
21
|
+
|
|
22
|
+
## Goals
|
|
23
|
+
1. Keep webhook retries deterministic
|
|
24
|
+
2. Preserve backwards compatibility for public SDK APIs
|
|
25
|
+
3. Make production failure modes visible in logs and tests
|
|
26
|
+
|
|
27
|
+
## Constraints
|
|
28
|
+
- Do not add external queue infrastructure
|
|
29
|
+
- Do not break existing webhook payload shapes
|
|
30
|
+
- Do not hide delivery failures behind silent retries
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Generated by Pluribus 0.3.3 on 2026-05-13 — do not edit manually -->
|
|
2
|
+
<!-- Source: pluribus.md -->
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Project
|
|
6
|
+
I am Mina, maintaining **RelayKit** — a small TypeScript SDK for webhook delivery.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Stack
|
|
10
|
+
- TypeScript 5.4
|
|
11
|
+
- Node.js 22 LTS
|
|
12
|
+
- Node's built-in test runner
|
|
13
|
+
|
|
14
|
+
## Conventions
|
|
15
|
+
- Prefer explicit return types for exported SDK functions
|
|
16
|
+
- Keep public API examples copy-pasteable
|
|
17
|
+
- Use small modules with clear error boundaries
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
- Do not add external queue infrastructure
|
|
21
|
+
- Do not break existing webhook payload shapes
|
|
22
|
+
- Do not hide delivery failures behind silent retries
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Goals
|
|
26
|
+
1. Keep webhook retries deterministic
|
|
27
|
+
2. Preserve backwards compatibility for public SDK APIs
|
|
28
|
+
3. Make production failure modes visible in logs and tests
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!-- Generated by Pluribus 0.3.3 on 2026-05-13 — do not edit manually -->
|
|
2
|
+
<!-- Source: pluribus.md -->
|
|
3
|
+
|
|
4
|
+
# Project Context for Claude
|
|
5
|
+
|
|
6
|
+
## Identity
|
|
7
|
+
|
|
8
|
+
I am Mina, maintaining **RelayKit** — a small TypeScript SDK for webhook delivery.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Tech Stack
|
|
13
|
+
|
|
14
|
+
- TypeScript 5.4
|
|
15
|
+
- Node.js 20 LTS
|
|
16
|
+
- Node's built-in test runner
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Conventions
|
|
21
|
+
|
|
22
|
+
- Prefer explicit return types for exported SDK functions
|
|
23
|
+
- Keep public API examples copy-pasteable
|
|
24
|
+
- Use small modules with clear error boundaries
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Goals
|
|
29
|
+
|
|
30
|
+
1. Keep webhook retries deterministic
|
|
31
|
+
2. Preserve backwards compatibility for public SDK APIs
|
|
32
|
+
3. Make production failure modes visible in logs and tests
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Constraints
|
|
37
|
+
|
|
38
|
+
> These are non-negotiable. Do not deviate from these under any circumstances.
|
|
39
|
+
|
|
40
|
+
- Do not add external queue infrastructure
|
|
41
|
+
- Do not break existing webhook payload shapes
|
|
42
|
+
- Do not hide delivery failures behind silent retries
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
|
|
53
|
+
- Run `npm test` before committing
|
|
54
|
+
- Keep generated AI context files in sync with `pluribus.md`
|
|
55
|
+
- Review context changes like code changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Context drift audit example
|
|
2
|
+
|
|
3
|
+
This fixture shows the safest first Pluribus workflow for an existing repo: audit generated AI context before writing anything.
|
|
4
|
+
|
|
5
|
+
`pluribus.md` is the source of truth. `CLAUDE.md` is intentionally drifted: it says `Node.js 20 LTS` while `pluribus.md` says `Node.js 22 LTS`. Cursor and Copilot outputs are current.
|
|
6
|
+
|
|
7
|
+
Run from this directory:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx --yes --package ../.. pluribus audit --strict
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Expected result:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
⚠️ [claude] CLAUDE.md differs from generated output
|
|
17
|
+
✅ [cursor] .cursorrules is current
|
|
18
|
+
✅ [copilot] .github/copilot-instructions.md is current
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Preview the fix without writing files:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx --yes --package ../.. pluribus sync --dry-run
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then apply it when the diff is acceptable:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx --yes --package ../.. pluribus sync
|
|
31
|
+
```
|