pluribus-context 0.3.12 → 0.3.14
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 +13 -0
- package/README.md +1 -1
- package/docs/coordination-contract.md +160 -0
- package/docs/cursor-claude-context-handoff.md +111 -0
- package/docs/discovery-smoke.md +1 -1
- package/examples/context-handoff/pluribus.md +48 -0
- package/examples/coordination-contract/pluribus.md +136 -0
- package/package.json +1 -1
- package/src/utils/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to Pluribus are documented here.
|
|
6
6
|
|
|
7
|
+
## 0.3.14 — coordination contract demo
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add a multi-session coordination contract guide and example for teams experimenting with Claude Code event logs, `.coordination/` ledgers, MCP/A2A relays, or parallel agent worktrees.
|
|
12
|
+
- Document authority handoff topics (`authority.claimed`, `authority.delegated`, `authority.released`) so shared schemas, generated clients, release branches, and infra config have explicit owners instead of silent conflict.
|
|
13
|
+
|
|
14
|
+
## 0.3.13 — external memory docs tracking
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Track the MemoryGraph docs PR in `discovery:smoke` so adjacent MCP memory feedback is measured alongside awesome-list distribution attempts.
|
|
19
|
+
|
|
7
20
|
## 0.3.12 — MCP memory handoff demo
|
|
8
21
|
|
|
9
22
|
### Added
|
package/README.md
CHANGED
|
@@ -152,7 +152,7 @@ npx --yes pluribus-context@latest sync --dry-run
|
|
|
152
152
|
|
|
153
153
|
If the preview looks right, run `npx --yes pluribus-context@latest sync` to write the tool-specific files.
|
|
154
154
|
|
|
155
|
-
For a fuller walkthrough, see the [Quickstart](docs/quickstart.md). To enforce generated context files in pull requests, use the [CI audit example](docs/ci-audit-example.md); to catch drift before commits leave your machine, use the [Pre-commit Audit Hook](docs/pre-commit-audit.md). If your repo already has `CLAUDE.md`, `.cursorrules`, Copilot instructions, or `AGENTS.md`, run a [Context Drift Audit](docs/context-drift-audit.md) first, try the intentionally drifted [audit example](examples/context-drift-audit/), then follow [Migrate Existing AI Context Files](docs/migrate-existing-context.md). Before committing shared or generated AI instructions, use the [Context File Review Checklist](docs/context-file-review.md). If you're deciding between Pluribus and a one-way rules converter, see [When to use Pluribus](docs/when-to-use-pluribus.md). If you are debugging "context drift" after compaction or long sessions, start with the [Context Drift Taxonomy](docs/context-drift-taxonomy.md) to separate file drift from runtime precedence drift. If you use MCP memory or knowledge-graph tools, try the [MCP memory handoff demo](docs/memory-mcp-handoff.md) to keep recall/store protocols aligned across AI coding tools without turning Pluribus into a memory server. If you are reviewing Pluribus for a list, newsletter, or tool directory, use the [Community Review Packet](docs/community-review-packet.md) for directory submission fields, a one-line description, safety notes, and a disposable 60-second smoke test. Maintainers can track package/repo discovery with the [Discovery Smoke Checks](docs/discovery-smoke.md).
|
|
155
|
+
For a fuller walkthrough, see the [Quickstart](docs/quickstart.md). To enforce generated context files in pull requests, use the [CI audit example](docs/ci-audit-example.md); to catch drift before commits leave your machine, use the [Pre-commit Audit Hook](docs/pre-commit-audit.md). If your repo already has `CLAUDE.md`, `.cursorrules`, Copilot instructions, or `AGENTS.md`, run a [Context Drift Audit](docs/context-drift-audit.md) first, try the intentionally drifted [audit example](examples/context-drift-audit/), then follow [Migrate Existing AI Context Files](docs/migrate-existing-context.md). If you switch between Cursor, Claude Code, Copilot, and terminal agents, try the [Cursor ↔ Claude Code context handoff guide](docs/cursor-claude-context-handoff.md) and its [example source file](examples/context-handoff/pluribus.md). If you run multiple AI sessions on the same project, try the [Coordination Contract guide](docs/coordination-contract.md) and its [example source file](examples/coordination-contract/pluribus.md) to keep event-log/scratchpad protocol rules aligned without turning Pluribus into an orchestrator. Before committing shared or generated AI instructions, use the [Context File Review Checklist](docs/context-file-review.md). If you're deciding between Pluribus and a one-way rules converter, see [When to use Pluribus](docs/when-to-use-pluribus.md). If you are debugging "context drift" after compaction or long sessions, start with the [Context Drift Taxonomy](docs/context-drift-taxonomy.md) to separate file drift from runtime precedence drift. If you use MCP memory or knowledge-graph tools, try the [MCP memory handoff demo](docs/memory-mcp-handoff.md) to keep recall/store protocols aligned across AI coding tools without turning Pluribus into a memory server. If you are reviewing Pluribus for a list, newsletter, or tool directory, use the [Community Review Packet](docs/community-review-packet.md) for directory submission fields, a one-line description, safety notes, and a disposable 60-second smoke test. Maintainers can track package/repo discovery with the [Discovery Smoke Checks](docs/discovery-smoke.md).
|
|
156
156
|
|
|
157
157
|
### Usage
|
|
158
158
|
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Coordination contract for multi-session agents
|
|
2
|
+
|
|
3
|
+
Use this when several Claude Code, Cursor, Copilot, OpenClaw, or terminal-agent sessions work on the same project and you need them to follow the same coordination rules.
|
|
4
|
+
|
|
5
|
+
Pluribus is not an event bus, queue, memory server, or orchestrator. It can hold the **coordination contract**: the small, reviewable protocol that tells every session what shared state exists, which events matter, who owns what, and when stale context must be invalidated.
|
|
6
|
+
|
|
7
|
+
The pattern pairs well with tools that provide the runtime substrate: MCP memory servers, append-only JSONL logs, Discord/channel plugins, SQLite queues, task ledgers, dashboards, or custom schedulers. Those tools move messages; Pluribus keeps the rules for reading and writing those messages consistent across AI tools.
|
|
8
|
+
|
|
9
|
+
## Audience
|
|
10
|
+
|
|
11
|
+
This guide is for developers who:
|
|
12
|
+
|
|
13
|
+
- run multiple AI coding sessions on the same repo or related repos;
|
|
14
|
+
- use one tool for planning and other sessions for implementation;
|
|
15
|
+
- keep hitting the "human as message bus" problem;
|
|
16
|
+
- already use, or are considering, an event log, scratchpad, memory server, task ledger, or channel plugin;
|
|
17
|
+
- want every agent/session to validate the same protocol before acting.
|
|
18
|
+
|
|
19
|
+
If you need real-time wake, pub/sub delivery, session discovery, locks, or durable retrieval, use a coordination/memory tool. If you need the instruction contract for those tools to stay aligned across Claude Code, Cursor, Copilot, OpenClaw, Windsurf, Continue, and Zed, use Pluribus.
|
|
20
|
+
|
|
21
|
+
## 60-second disposable test
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mkdir coordination-contract-demo
|
|
25
|
+
cd coordination-contract-demo
|
|
26
|
+
curl -fsSL https://raw.githubusercontent.com/caioribeiroclw-pixel/pluribus/main/examples/coordination-contract/pluribus.md -o pluribus.md
|
|
27
|
+
|
|
28
|
+
npx --yes pluribus-context@latest validate
|
|
29
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The dry run previews the tool-specific instructions before writing files:
|
|
33
|
+
|
|
34
|
+
| Tool/session surface | Generated file |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Claude Code | `CLAUDE.md` |
|
|
37
|
+
| Cursor | `.cursorrules` |
|
|
38
|
+
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
39
|
+
| OpenClaw / agent runners | `AGENTS.md` |
|
|
40
|
+
|
|
41
|
+
If the preview is correct:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx --yes pluribus-context@latest sync
|
|
45
|
+
npx --yes pluribus-context@latest audit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Commit `pluribus.md` as the reviewed source of truth. Commit generated files if you want each tool to pick up the contract immediately after clone.
|
|
49
|
+
|
|
50
|
+
## What belongs in a coordination contract
|
|
51
|
+
|
|
52
|
+
A useful contract is small and operational. Keep it explicit enough that a fresh session can follow it without reading the whole project history.
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
<!-- pluribus:tools: claude,cursor,copilot,openclaw -->
|
|
56
|
+
|
|
57
|
+
# Identity
|
|
58
|
+
I am working on Acme Platform, a repo edited by multiple AI sessions.
|
|
59
|
+
|
|
60
|
+
# Context
|
|
61
|
+
The runtime coordination substrate is an append-only event log at `.coordination/events.jsonl` plus one owned status file per session under `.coordination/sessions/`.
|
|
62
|
+
|
|
63
|
+
# Workflow
|
|
64
|
+
1. Before planning, read `.coordination/events.jsonl` from your last processed offset.
|
|
65
|
+
2. Before editing files, check session status files for active ownership of the same area.
|
|
66
|
+
3. When you change a shared contract, append an event before continuing implementation.
|
|
67
|
+
4. If an event invalidates your current plan, stop and re-plan before the next tool call.
|
|
68
|
+
|
|
69
|
+
# Constraints
|
|
70
|
+
- Do not paste secrets or private chat logs into coordination files.
|
|
71
|
+
- Do not rewrite the append-only event log.
|
|
72
|
+
- Do not edit another session's owned status file.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The important point is not the exact file names. The important point is that all sessions agree on the same protocol: event schema, ownership model, invalidation rules, and safety boundaries.
|
|
76
|
+
|
|
77
|
+
## Authority is part of the contract
|
|
78
|
+
|
|
79
|
+
Multi-session workflows usually fail before the transport fails. Two sessions can both receive the same event and still drift if they disagree about who owns a shared definition.
|
|
80
|
+
|
|
81
|
+
Make authority explicit:
|
|
82
|
+
|
|
83
|
+
- which role owns each shared contract: API schema, database migration, deployment config, design token, generated client, release branch;
|
|
84
|
+
- whether ownership is exclusive, delegated, or review-only;
|
|
85
|
+
- which event transfers ownership or requests a handoff;
|
|
86
|
+
- what a session must do when it sees another active owner for the same area;
|
|
87
|
+
- how cross-repo or cross-machine sessions identify the same project/version.
|
|
88
|
+
|
|
89
|
+
For example:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{"schemaVersion":"coordination.v1","eventId":"2026-05-17T22:10:00Z-api-owner-1","topic":"authority.claimed","producer":"api-session","createdAt":"2026-05-17T22:10:00Z","projectVersion":"a1b2c3d","payload":{"domain":"api.schema","owner":"api-session","scope":["openapi.yaml","packages/client/src/generated/**"],"expiresAt":"2026-05-17T23:10:00Z"},"invalidates":["dashboard-session.plan","worker-session.plan"]}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A session that sees this event should not edit the same schema or generated client until it either receives an `authority.released` event, gets explicit delegation, or replans around a read-only dependency.
|
|
96
|
+
|
|
97
|
+
## Suggested contract fields
|
|
98
|
+
|
|
99
|
+
For an append-only project event log, define at least:
|
|
100
|
+
|
|
101
|
+
- `schemaVersion`: version of the event schema;
|
|
102
|
+
- `eventId`: stable unique id for deduplication;
|
|
103
|
+
- `topic`: machine-readable topic such as `infra.endpoint.changed`, `db.migration.completed`, or `authority.claimed`;
|
|
104
|
+
- `producer`: session id or role that emitted the event;
|
|
105
|
+
- `createdAt`: timestamp;
|
|
106
|
+
- `projectVersion`: git SHA, package version, or config revision when emitted;
|
|
107
|
+
- `payload`: structured data, excluding secrets;
|
|
108
|
+
- `invalidates`: optional list of plans, files, or roles that must re-check state.
|
|
109
|
+
|
|
110
|
+
For each session role, define:
|
|
111
|
+
|
|
112
|
+
- topics it **must read before planning**;
|
|
113
|
+
- topics it **may write**;
|
|
114
|
+
- files, domains, schemas, or contracts it owns;
|
|
115
|
+
- events that claim, delegate, release, or revoke authority;
|
|
116
|
+
- when it must pause and ask the coordinator/human;
|
|
117
|
+
- whether event delivery is `at-least-once`, `replay from offset`, or best effort;
|
|
118
|
+
- how to record the last processed offset.
|
|
119
|
+
|
|
120
|
+
## Example: migration updates an endpoint
|
|
121
|
+
|
|
122
|
+
Bad handoff:
|
|
123
|
+
|
|
124
|
+
> Session A changed the database endpoint. The user copy-pastes that fact into four other terminals.
|
|
125
|
+
|
|
126
|
+
Better handoff:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{"schemaVersion":"coordination.v1","eventId":"2026-05-17T21:10:00Z-infra-1","topic":"infra.endpoint.changed","producer":"infra-session","createdAt":"2026-05-17T21:10:00Z","projectVersion":"a1b2c3d","payload":{"service":"postgres","endpointRef":"POSTGRES_ENDPOINT"},"invalidates":["api-session.plan","worker-session.plan","dashboard-session.plan"]}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The contract then tells API, worker, and dashboard sessions: before the next plan/tool call, read events from your offset; if `infra.endpoint.changed` appears, invalidate cached assumptions about database endpoint configuration and re-check the canonical env/config source.
|
|
133
|
+
|
|
134
|
+
## Why this is separate from memory
|
|
135
|
+
|
|
136
|
+
Memory tools store facts and retrieve relevant history. Coordination tools deliver events and track state. The contract is the layer that says **how sessions are allowed to use those tools**.
|
|
137
|
+
|
|
138
|
+
Separating those layers prevents a common failure mode: five sessions use the same memory/event substrate with five subtly different conventions. The result looks like flaky coordination, but the root cause is protocol drift.
|
|
139
|
+
|
|
140
|
+
## What this deliberately does not solve
|
|
141
|
+
|
|
142
|
+
- It does not wake sleeping sessions.
|
|
143
|
+
- It does not provide pub/sub, locks, or a queue.
|
|
144
|
+
- It does not read another session's private reasoning or transcript.
|
|
145
|
+
- It does not replace MCP memory, task systems, dashboards, or event logs.
|
|
146
|
+
- It does not make multi-agent coordination safe by itself.
|
|
147
|
+
|
|
148
|
+
That boundary is intentional. Pluribus keeps the coordination protocol reviewable and synced; runtime systems execute it.
|
|
149
|
+
|
|
150
|
+
## Feedback wanted
|
|
151
|
+
|
|
152
|
+
If this breaks in a real multi-session workflow, the most useful feedback is concrete:
|
|
153
|
+
|
|
154
|
+
- which tools/sessions were involved;
|
|
155
|
+
- what runtime substrate you used: event log, memory server, channel, task ledger, or custom queue;
|
|
156
|
+
- which contract rule drifted or was ignored;
|
|
157
|
+
- whether `pluribus audit` caught stale generated instructions;
|
|
158
|
+
- what field should be added to make the contract more executable.
|
|
159
|
+
|
|
160
|
+
Open feedback here: https://github.com/caioribeiroclw-pixel/pluribus/discussions/13
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Cursor ↔ Claude Code context handoff
|
|
2
|
+
|
|
3
|
+
Use this when you switch between Cursor, Claude Code, Copilot/Codex-style assistants, and terminal agents and keep re-explaining the same project facts.
|
|
4
|
+
|
|
5
|
+
Pluribus is not a chat transcript mover and not a memory database. It is the small, reviewable layer for **intentional project context**: architecture notes, conventions, constraints, workflow rules, and safety boundaries that should survive tool switches.
|
|
6
|
+
|
|
7
|
+
## Audience
|
|
8
|
+
|
|
9
|
+
This guide is for developers who:
|
|
10
|
+
|
|
11
|
+
- use Cursor for IDE work and Claude Code or a terminal agent for larger changes;
|
|
12
|
+
- also keep Copilot instructions, `AGENTS.md`, Windsurf/Continue/Zed rules, or similar files;
|
|
13
|
+
- want a repo-local source of truth instead of manually copying context between tools;
|
|
14
|
+
- do not want a background service or MCP server just to keep instruction files aligned.
|
|
15
|
+
|
|
16
|
+
If you need semantic recall over notes, use a memory/MCP/RAG tool. If you need the same project instructions available to several tools, use a versioned context file and sync it.
|
|
17
|
+
|
|
18
|
+
## 60-second disposable test
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
mkdir ai-context-handoff-demo
|
|
22
|
+
cd ai-context-handoff-demo
|
|
23
|
+
|
|
24
|
+
npx --yes pluribus-context@latest init \
|
|
25
|
+
--name "Handoff Demo" \
|
|
26
|
+
--description "A repo used from Cursor, Claude Code, and Copilot" \
|
|
27
|
+
--tools claude,cursor,copilot,openclaw
|
|
28
|
+
|
|
29
|
+
npx --yes pluribus-context@latest validate
|
|
30
|
+
npx --yes pluribus-context@latest sync --dry-run
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The dry run shows the generated outputs before writing tool files:
|
|
34
|
+
|
|
35
|
+
| Tool | File |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| Claude Code | `CLAUDE.md` |
|
|
38
|
+
| Cursor | `.cursorrules` |
|
|
39
|
+
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
40
|
+
| OpenClaw / agent runners | `AGENTS.md` |
|
|
41
|
+
|
|
42
|
+
If the preview looks right:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx --yes pluribus-context@latest sync
|
|
46
|
+
npx --yes pluribus-context@latest audit
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Commit `pluribus.md` as the source of truth. Commit generated files if you want each tool to work immediately after clone.
|
|
50
|
+
|
|
51
|
+
## What to put in `pluribus.md`
|
|
52
|
+
|
|
53
|
+
Keep only context that should be stable enough to review in git:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
<!-- pluribus:tools: claude,cursor,copilot,openclaw -->
|
|
57
|
+
|
|
58
|
+
# Identity
|
|
59
|
+
I am building Acme Billing, a TypeScript service used by finance operators.
|
|
60
|
+
|
|
61
|
+
# Stack
|
|
62
|
+
- Node.js 22
|
|
63
|
+
- PostgreSQL
|
|
64
|
+
- Vitest
|
|
65
|
+
|
|
66
|
+
# Conventions
|
|
67
|
+
- Prefer small, reviewed changes over large rewrites.
|
|
68
|
+
- Do not change database migrations without adding a rollback note.
|
|
69
|
+
- Keep API compatibility unless an issue explicitly approves a breaking change.
|
|
70
|
+
|
|
71
|
+
# Goals
|
|
72
|
+
1. Make billing changes safe to review.
|
|
73
|
+
2. Keep AI tool behavior consistent across IDE and terminal workflows.
|
|
74
|
+
|
|
75
|
+
# Constraints
|
|
76
|
+
- Never paste secrets, customer data, tokens, or private chat logs into context files.
|
|
77
|
+
- Repository code and tests override stale generated context.
|
|
78
|
+
|
|
79
|
+
# Workflow
|
|
80
|
+
1. Read the relevant code and this project context before proposing changes.
|
|
81
|
+
2. Run the smallest meaningful test before claiming a fix.
|
|
82
|
+
3. Update `pluribus.md` when project conventions change, then run `pluribus sync`.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Handoff pattern
|
|
86
|
+
|
|
87
|
+
1. **Before switching tools:** put durable project facts in `pluribus.md`, not in a one-off chat.
|
|
88
|
+
2. **Preview:** run `pluribus sync --dry-run` to see what each tool will receive.
|
|
89
|
+
3. **Sync:** generate native files when the preview is correct.
|
|
90
|
+
4. **Audit:** run `pluribus audit` locally or in CI to catch drift when someone edits generated files directly.
|
|
91
|
+
5. **Use memory separately:** if you also run an MCP memory server, keep the recall/store protocol in `pluribus.md` and let the memory server store durable facts.
|
|
92
|
+
|
|
93
|
+
## What this deliberately does not solve
|
|
94
|
+
|
|
95
|
+
- It does not move active chat state from Cursor to Claude Code.
|
|
96
|
+
- It does not summarize your current conversation automatically.
|
|
97
|
+
- It does not store or retrieve memories.
|
|
98
|
+
- It does not replace MCP tools, RAG over notes, or agent memory.
|
|
99
|
+
|
|
100
|
+
That boundary is the point: project instructions should be boring, reviewable, and easy to diff. Runtime memory can stay specialized.
|
|
101
|
+
|
|
102
|
+
## Feedback wanted
|
|
103
|
+
|
|
104
|
+
If this fails on a real multi-tool repo, the useful feedback is specific:
|
|
105
|
+
|
|
106
|
+
- which tools you use together;
|
|
107
|
+
- which context files already existed;
|
|
108
|
+
- whether `audit` found the right missing/stale file;
|
|
109
|
+
- which generated file felt semantically wrong for that tool.
|
|
110
|
+
|
|
111
|
+
Open feedback here: https://github.com/caioribeiroclw-pixel/pluribus/discussions/13
|
package/docs/discovery-smoke.md
CHANGED
|
@@ -33,7 +33,7 @@ As of 2026-05-17 01:01 UTC, public npm is still `pluribus-context@0.3.9` while t
|
|
|
33
33
|
- `pendingNpmPublish` is expected to be `true` until npm auth/2FA allows publishing `0.3.10`; generic search results still measure the public `0.3.9` metadata, not the sharpened local `0.3.10` description/keywords.
|
|
34
34
|
- npm downloads are visible through the same smoke report (`last-day`, `last-week`, `last-month`), but current values still include likely noise from release/publish/smoke activity.
|
|
35
35
|
- GitHub adoption signals are visible in the same report: stars/forks/watchers, latest release, open issues, open pull requests, discussion activity, and recent external discussion-comment count.
|
|
36
|
-
- External distribution tracking covers the contextual `awesome-ai-coding-tools
|
|
36
|
+
- External distribution tracking covers the contextual `awesome-ai-coding-tools`, `awesome-claude-code`, and adjacent `memory-graph` PRs and records whether each remains open, mergeable, commented on, or merged.
|
|
37
37
|
- Generic npm queries still favor adjacent packages such as `sync-ai-context`, `ai-rules-sync`, `cursor2claude`, and `@intellectronica/ruler`.
|
|
38
38
|
- That means exact-name discovery works, but problem-query discovery is still weak and should be treated as a lagging adoption metric, especially while `pendingNpmPublish` is true.
|
|
39
39
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!-- pluribus:tools: claude,cursor,copilot,openclaw -->
|
|
2
|
+
|
|
3
|
+
# Identity
|
|
4
|
+
|
|
5
|
+
I am building **Acme Billing**, a TypeScript service used by finance operators to review invoices, payments, and reconciliation exceptions.
|
|
6
|
+
|
|
7
|
+
This repository is edited with Cursor for IDE work, Claude Code for larger terminal tasks, GitHub Copilot for inline assistance, and OpenClaw-style agents for automation.
|
|
8
|
+
|
|
9
|
+
# Stack
|
|
10
|
+
|
|
11
|
+
- TypeScript strict mode
|
|
12
|
+
- Node.js 22 LTS
|
|
13
|
+
- PostgreSQL
|
|
14
|
+
- Vitest for unit tests
|
|
15
|
+
- GitHub Actions for CI
|
|
16
|
+
|
|
17
|
+
# Conventions
|
|
18
|
+
|
|
19
|
+
- Prefer small, reviewable changes over broad rewrites.
|
|
20
|
+
- Keep generated AI context files in sync from `pluribus.md`; do not edit `CLAUDE.md`, `.cursorrules`, Copilot instructions, or `AGENTS.md` by hand.
|
|
21
|
+
- Add or update tests for billing logic changes.
|
|
22
|
+
- For database changes, include migration intent and rollback notes in the PR.
|
|
23
|
+
- Treat repository code, tests, and migrations as the source of truth when generated context is stale.
|
|
24
|
+
|
|
25
|
+
# Goals
|
|
26
|
+
|
|
27
|
+
1. Make AI-assisted billing changes safe to review.
|
|
28
|
+
2. Keep Cursor, Claude Code, Copilot, and terminal agents aligned on the same project boundaries.
|
|
29
|
+
3. Avoid re-explaining stable project context in every new tool session.
|
|
30
|
+
|
|
31
|
+
# Constraints
|
|
32
|
+
|
|
33
|
+
- Never place secrets, tokens, credentials, private customer data, or full chat transcripts in `pluribus.md` or generated context files.
|
|
34
|
+
- Do not let AI tools invent billing policy, pricing, legal commitments, or customer-facing promises.
|
|
35
|
+
- Do not change migrations, payment semantics, or reconciliation rules without tests and explicit review context.
|
|
36
|
+
- If tool-specific generated files drift from `pluribus.md`, update the source file first and regenerate.
|
|
37
|
+
|
|
38
|
+
# Workflow
|
|
39
|
+
|
|
40
|
+
1. Before meaningful changes, read this context and inspect the relevant code.
|
|
41
|
+
2. If a project convention changes, edit `pluribus.md` and run `npx --yes pluribus-context@latest sync --dry-run`.
|
|
42
|
+
3. When the preview looks right, run `npx --yes pluribus-context@latest sync`.
|
|
43
|
+
4. Run `npx --yes pluribus-context@latest audit` before opening a PR so generated context files do not drift.
|
|
44
|
+
5. Use memory/MCP/RAG tools only for durable recall; keep the cross-tool instruction protocol here in git.
|
|
45
|
+
|
|
46
|
+
# Context
|
|
47
|
+
|
|
48
|
+
This example demonstrates a boring but useful handoff: one reviewed project context file feeds the native instruction files used by Cursor, Claude Code, Copilot, and agent runners. It is intentionally not a memory server and not a transcript migration tool.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<!-- pluribus:tools: claude,cursor,copilot,openclaw -->
|
|
2
|
+
|
|
3
|
+
# Identity
|
|
4
|
+
|
|
5
|
+
I am working on **Acme Platform**, a TypeScript/PostgreSQL product maintained by several AI coding sessions at the same time.
|
|
6
|
+
|
|
7
|
+
This repository may be edited from Claude Code, Cursor, GitHub Copilot, and OpenClaw-style terminal agents. Each session keeps its own context window, but all sessions must follow the same coordination contract.
|
|
8
|
+
|
|
9
|
+
# Stack
|
|
10
|
+
|
|
11
|
+
- TypeScript strict mode
|
|
12
|
+
- Node.js 22 LTS
|
|
13
|
+
- PostgreSQL
|
|
14
|
+
- Vitest for unit tests
|
|
15
|
+
- GitHub Actions for CI
|
|
16
|
+
- Runtime coordination substrate: append-only JSONL event log plus per-session status files
|
|
17
|
+
|
|
18
|
+
# Context
|
|
19
|
+
|
|
20
|
+
The runtime substrate is intentionally simple and inspectable:
|
|
21
|
+
|
|
22
|
+
- `.coordination/events.jsonl` is an append-only project event log.
|
|
23
|
+
- `.coordination/sessions/<session-role>.md` is the owned status file for one session role.
|
|
24
|
+
- `.coordination/offsets/<session-role>.json` records the last processed event offset for one session role.
|
|
25
|
+
|
|
26
|
+
Pluribus does not implement the event log, queue, wake mechanism, locks, or memory server. This file is the reviewed coordination contract that every generated AI instruction file receives.
|
|
27
|
+
|
|
28
|
+
# Conventions
|
|
29
|
+
|
|
30
|
+
- Treat `pluribus.md` as the source of truth for coordination rules.
|
|
31
|
+
- Do not edit generated `CLAUDE.md`, `.cursorrules`, Copilot instructions, or `AGENTS.md` by hand.
|
|
32
|
+
- The event log is append-only. Never rewrite, reorder, truncate, or silently redact past events.
|
|
33
|
+
- Each session may update only its own `.coordination/sessions/<session-role>.md` file.
|
|
34
|
+
- Prefer typed events over prose handoffs when a change affects another session.
|
|
35
|
+
- Keep event payloads small and structured. Put detailed work notes in the owning session status file or issue/PR.
|
|
36
|
+
- Use git, tests, and code review as final authority when AI context conflicts with source code.
|
|
37
|
+
|
|
38
|
+
# Coordination Contract
|
|
39
|
+
|
|
40
|
+
## Event schema
|
|
41
|
+
|
|
42
|
+
Every event appended to `.coordination/events.jsonl` should be one JSON object per line with:
|
|
43
|
+
|
|
44
|
+
- `schemaVersion`: currently `coordination.v1`.
|
|
45
|
+
- `eventId`: unique and stable for deduplication.
|
|
46
|
+
- `topic`: machine-readable topic such as `infra.endpoint.changed`, `db.migration.completed`, `api.contract.changed`, `authority.claimed`, `authority.released`, `worker.blocked`, or `release.published`.
|
|
47
|
+
- `producer`: session role that emitted the event.
|
|
48
|
+
- `createdAt`: UTC ISO timestamp.
|
|
49
|
+
- `projectVersion`: git SHA, package version, or config revision when emitted.
|
|
50
|
+
- `payload`: structured data with no secrets.
|
|
51
|
+
- `invalidates`: optional list of roles, plans, files, or assumptions that must be re-checked.
|
|
52
|
+
|
|
53
|
+
Example:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{"schemaVersion":"coordination.v1","eventId":"2026-05-17T21:10:00Z-infra-1","topic":"infra.endpoint.changed","producer":"infra-session","createdAt":"2026-05-17T21:10:00Z","projectVersion":"a1b2c3d","payload":{"service":"postgres","endpointRef":"POSTGRES_ENDPOINT"},"invalidates":["api-session.plan","worker-session.plan","dashboard-session.plan"]}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Required read topics
|
|
60
|
+
|
|
61
|
+
Before making or continuing a plan, every session must read from its last processed offset and check these topics:
|
|
62
|
+
|
|
63
|
+
- `infra.endpoint.changed`
|
|
64
|
+
- `db.migration.completed`
|
|
65
|
+
- `api.contract.changed`
|
|
66
|
+
- `authority.claimed`
|
|
67
|
+
- `authority.delegated`
|
|
68
|
+
- `authority.released`
|
|
69
|
+
- `release.published`
|
|
70
|
+
- `security.constraint.changed`
|
|
71
|
+
- `session.blocked`
|
|
72
|
+
|
|
73
|
+
If one of those topics invalidates the current plan, stop and re-plan before the next tool call.
|
|
74
|
+
|
|
75
|
+
## Authority and ownership
|
|
76
|
+
|
|
77
|
+
Shared definitions must have an explicit owner before parallel sessions edit them:
|
|
78
|
+
|
|
79
|
+
- `api-session` owns `openapi.yaml`, generated API clients, and API compatibility notes while an `authority.claimed` event for `api.schema` is active.
|
|
80
|
+
- `db-session` owns migrations and schema docs while an `authority.claimed` event for `db.schema` is active.
|
|
81
|
+
- `infra-session` owns deployment endpoints, secrets references, and runtime config names while an `authority.claimed` event for `infra.config` is active.
|
|
82
|
+
- Consumer sessions may read those files and adapt local code, but must not rewrite the shared contract unless authority is delegated.
|
|
83
|
+
- Authority should include `domain`, `owner`, `scope`, optional `expiresAt`, and optional `handoffTo` in the event payload.
|
|
84
|
+
|
|
85
|
+
Example:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{"schemaVersion":"coordination.v1","eventId":"2026-05-17T22:10:00Z-api-owner-1","topic":"authority.claimed","producer":"api-session","createdAt":"2026-05-17T22:10:00Z","projectVersion":"a1b2c3d","payload":{"domain":"api.schema","owner":"api-session","scope":["openapi.yaml","packages/client/src/generated/**"],"expiresAt":"2026-05-17T23:10:00Z"},"invalidates":["dashboard-session.plan","worker-session.plan"]}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If two sessions claim the same authority domain, pause edits in that domain and resolve ownership before continuing.
|
|
92
|
+
|
|
93
|
+
## Allowed write topics
|
|
94
|
+
|
|
95
|
+
- `infra-session` may write `infra.*` and `release.*` topics.
|
|
96
|
+
- `db-session` may write `db.*` topics.
|
|
97
|
+
- `api-session` may write `api.*` topics.
|
|
98
|
+
- Any owner may write `authority.claimed`, `authority.delegated`, and `authority.released` for its own domain.
|
|
99
|
+
- `worker-session` may write `worker.*` topics.
|
|
100
|
+
- `dashboard-session` may write `dashboard.*` topics.
|
|
101
|
+
- Any session may write `session.blocked`, `session.unblocked`, and `session.question` for its own role.
|
|
102
|
+
|
|
103
|
+
Do not write events for another session role unless explicitly delegated in a ticket or coordinator message.
|
|
104
|
+
|
|
105
|
+
## Delivery semantics
|
|
106
|
+
|
|
107
|
+
- Treat event delivery as at-least-once.
|
|
108
|
+
- Deduplicate by `eventId`.
|
|
109
|
+
- Replay from the recorded offset when a session starts, resumes, or finishes compaction.
|
|
110
|
+
- If the offset file is missing or corrupt, replay from the start of the current day's events and summarize anything relevant before acting.
|
|
111
|
+
- If two events conflict, prefer the newer event only after checking whether both producers had authority over the topic.
|
|
112
|
+
- If two active authority claims overlap, stop editing the overlapping domain until ownership is resolved.
|
|
113
|
+
|
|
114
|
+
# Workflow
|
|
115
|
+
|
|
116
|
+
1. At session start or resume, read this contract and then read `.coordination/events.jsonl` from your recorded offset.
|
|
117
|
+
2. Before planning, process required read topics and update your session status file with current assumptions.
|
|
118
|
+
3. Before editing files, check whether another session status file claims the same area.
|
|
119
|
+
4. When you change a shared contract, endpoint, migration, API, release, or security constraint, append an event before continuing implementation.
|
|
120
|
+
5. When blocked, write `session.blocked` with a structured reason and the smallest question needed to unblock.
|
|
121
|
+
6. Before claiming completion, run the smallest meaningful test and `npx --yes pluribus-context@latest audit` if AI context files may have drifted.
|
|
122
|
+
|
|
123
|
+
# Goals
|
|
124
|
+
|
|
125
|
+
1. Remove the human as the message bus between parallel AI sessions.
|
|
126
|
+
2. Keep every session aligned on the same coordination protocol without exposing private reasoning or full transcripts.
|
|
127
|
+
3. Make stale assumptions visible before they cause conflicting edits or incorrect plans.
|
|
128
|
+
4. Keep the coordination layer boring, inspectable, and reviewable in git.
|
|
129
|
+
|
|
130
|
+
# Constraints
|
|
131
|
+
|
|
132
|
+
- Never put secrets, credentials, tokens, private customer data, or full chat transcripts in coordination files.
|
|
133
|
+
- Never paste raw chain-of-thought or private reasoning from another session.
|
|
134
|
+
- Do not use the event log as a durable memory database; store long-lived decisions in docs, issues, PRs, or an explicit memory tool.
|
|
135
|
+
- Do not continue implementation after receiving an invalidating event until the plan is refreshed.
|
|
136
|
+
- Do not assume every AI tool represents these rules identically; run `pluribus sync --dry-run` and review generated files when changing this contract.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pluribus-context",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "AI context/rules sync for CLAUDE.md, Claude Code, Cursor rules, Copilot instructions, OpenClaw, Windsurf, Continue, and Zed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/caioribeiroclw-pixel/pluribus#readme",
|
package/src/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.14'
|