pluribus-context 0.3.40 → 0.3.42
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 +8 -0
- package/README.md +3 -2
- package/bin/pluribus.js +3 -1
- package/docs/.nojekyll +0 -0
- package/docs/.well-known/agent-skills/context-receipts/SKILL.md +206 -0
- package/docs/.well-known/agent-skills/index.json +19 -0
- package/docs/.well-known/agent-skills/skill-policy-receipts/SKILL.md +77 -0
- package/docs/agent-surface-proof-chain.md +176 -0
- package/docs/cursor-claude-context-handoff.md +68 -0
- package/docs/index.html +38 -0
- package/docs/receipt-playground.html +304 -0
- package/docs/session-preflight-receipts.md +77 -0
- package/examples/claude-md-read-receipts/README.md +70 -0
- package/examples/claude-md-read-receipts/check-read-receipt.mjs +119 -0
- package/examples/claude-md-read-receipts/sample-read-receipt.json +45 -0
- package/examples/claude-md-read-receipts/stale-read-receipt.json +18 -0
- package/examples/context-attention-receipts/README.md +41 -0
- package/examples/context-attention-receipts/attention-receipt-fail.json +49 -0
- package/examples/context-attention-receipts/attention-receipt-pass.json +53 -0
- package/examples/context-attention-receipts/check-attention-receipt.mjs +97 -0
- package/examples/context-sufficiency-trace/README.md +22 -0
- package/examples/context-sufficiency-trace/check-context-sufficiency.mjs +40 -0
- package/examples/context-sufficiency-trace/context-trace-pass.json +28 -0
- package/examples/context-sufficiency-trace/context-trace.json +47 -0
- package/examples/context-sufficiency-trace/ground-truth.json +13 -0
- package/examples/provider-degradation-canaries/README.md +79 -0
- package/examples/provider-degradation-canaries/check-degradation-receipt.mjs +64 -0
- package/examples/provider-degradation-canaries/healthy-decision.json +27 -0
- package/examples/provider-degradation-canaries/unsafe-write-decision.json +26 -0
- package/examples/semantic-anchor-receipts/README.md +49 -0
- package/examples/semantic-anchor-receipts/check-semantic-anchors.mjs +153 -0
- package/examples/semantic-anchor-receipts/cleaned-paste.md +17 -0
- package/examples/semantic-anchor-receipts/original-paste.md +19 -0
- package/examples/semantic-anchor-receipts/sample-receipt.json +62 -0
- package/examples/session-preflight-receipts/README.md +25 -0
- package/examples/session-preflight-receipts/session-preflight-receipt.json +39 -0
- package/examples/session-preflight-receipts/session-preflight.mdc +18 -0
- package/examples/task-scoped-mcp-config/README.md +60 -0
- package/examples/task-scoped-mcp-config/mcp-catalog.json +46 -0
- package/examples/task-scoped-mcp-config/select-mcp-config.mjs +64 -0
- package/examples/task-scoped-mcp-config/tasks/browser-debug.json +7 -0
- package/package.json +5 -2
- package/skills/context-receipts/README.md +13 -2
- package/skills/context-receipts/SKILL.md +65 -0
- package/src/commands/demo.js +81 -1
- package/src/utils/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to Pluribus are documented here.
|
|
6
6
|
|
|
7
|
+
## 0.3.42 - 2026-06-17
|
|
8
|
+
|
|
9
|
+
- Added `pluribus demo context-sufficiency-trace`, a tiny npm-runnable pass/fail demo for checking whether a compressed context bundle preserved the task's required files before editing began.
|
|
10
|
+
|
|
11
|
+
## 0.3.41 - 2026-06-10
|
|
12
|
+
|
|
13
|
+
- Added npm Agent Skills discovery keywords (`agent-skill`, `skillpm`, and `agent-skills-registry`) so `pluribus-context` can be indexed by npm-backed skill package managers while continuing to ship the existing low-authority `skills/*/SKILL.md` recipes.
|
|
14
|
+
|
|
7
15
|
## 0.3.40 - 2026-06-09
|
|
8
16
|
|
|
9
17
|
- Added `pluribus demo tool-surface-diff`, a tiny npm-runnable MCP dynamic-discovery receipt demo for proving discovered, activated, withheld, and blocked runtime tool-surface changes without logging raw schemas, prompts, or results.
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The original sync workflow is still useful: Pluribus can keep project instructio
|
|
|
14
14
|
|
|
15
15
|
It is **not** a persistent memory layer, retrieval system, agent orchestrator, enterprise ContextOps platform, or agent-merging framework. Think evidence for context boundaries: `CLAUDE.md`, `.cursorrules`, `copilot-instructions.md`, `AGENTS.md`, MCP Tool Search, Agent Skills, RAG/code-search, pruning, and compaction — with privacy-safe receipts instead of raw content dumps.
|
|
16
16
|
|
|
17
|
-
**Reviewer shortcut:** evaluating Pluribus for a list, newsletter, package roundup, or tool directory? Use the [Community Review Packet](docs/community-review-packet.md) for copy-paste directory submission fields, safety/removability notes, feedback links, and disposable 60-second smoke tests. If you only run one command for the cross-tool audit, try `npx --yes pluribus-context@latest audit --json --fidelity-report` to see native discovery surfaces, generic fallbacks, load evidence, duplicate-load selection evidence, manual activation requirements, effective context scope, and semantic differences. For the agent-observability wedge, start with [context-budget receipts](docs/context-budget-receipts.md): privacy-safe evidence for what MCP schemas, skills, memory, subagents, CLI help, retrieval chunks, pruning runs, or compaction summaries crossed an agent boundary. It now explicitly covers the "Tool Search fixed MCP bloat" objection: the receipt proves which lane stayed deferred, which tool was expanded, and whether schemas leaked through `messages`/bootstrap anyway. For a 60-second runtime-discovery proof, run `npx --yes pluribus-context@latest demo tool-surface-diff --json`; it validates a receipt for discovered → activated → withheld/blocked MCP tools without raw schemas/prompts/results. If you want the same idea as a copyable skill, use the [context-receipts Agent Skill recipe](skills/context-receipts/). npm `latest` is currently aligned with the GitHub release; the review packet also documents a GitHub-release smoke fallback for future release-lag windows.
|
|
17
|
+
**Reviewer shortcut:** evaluating Pluribus for a list, newsletter, package roundup, or tool directory? Use the [Community Review Packet](docs/community-review-packet.md) for copy-paste directory submission fields, safety/removability notes, feedback links, and disposable 60-second smoke tests. If you are comparing plugins, Skills registries, config-sync tools, MCP setups, or Claude→Codex worker flows, start with the [Agent surface proof chain](docs/agent-surface-proof-chain.md) to separate install diffs, sync manifests, apply ledgers, surface state, selection traces, context-boundary spans, and handoff envelopes. If you only run one command for the cross-tool audit, try `npx --yes pluribus-context@latest audit --json --fidelity-report` to see native discovery surfaces, generic fallbacks, load evidence, duplicate-load selection evidence, manual activation requirements, effective context scope, and semantic differences. For the agent-observability wedge, start with [context-budget receipts](docs/context-budget-receipts.md): privacy-safe evidence for what MCP schemas, skills, memory, subagents, CLI help, retrieval chunks, pruning runs, or compaction summaries crossed an agent boundary. It now explicitly covers the "Tool Search fixed MCP bloat" objection: the receipt proves which lane stayed deferred, which tool was expanded, and whether schemas leaked through `messages`/bootstrap anyway. For a 60-second runtime-discovery proof, run `npx --yes pluribus-context@latest demo tool-surface-diff --json`; it validates a receipt for discovered → activated → withheld/blocked MCP tools without raw schemas/prompts/results. If you are coming from Claude Code, GraphRAG, or memory tooling where retrieval succeeds but the agent ignores it, try the [context attention receipt example](examples/context-attention-receipts/) to prove required context was delivered, acknowledged, and cited before edits. If MCP server catalogs are burning context before the task needs them, try the [task-scoped MCP config receipt demo](examples/task-scoped-mcp-config/) to generate a minimal `--mcp-config` plus a receipt for selected vs withheld servers. If a Claude Code Skill or paste-cleaning CLI claims big token savings, try the [semantic anchor preservation receipt demo](examples/semantic-anchor-receipts/) to prove the cleaned paste kept headings, API signatures, version notes, and security constraints. If a long Claude Code session, compaction, or topic switch makes `CLAUDE.md` feel stale, try the [CLAUDE.md read receipt example](examples/claude-md-read-receipts/) to prove which index/topic files were reloaded before the next edit. If Claude Code, Codex, or an API-backed agent starts timing out, drifting on tool choice, or producing bad patch formats while the status page is unclear, try the [provider degradation canary receipt example](examples/provider-degradation-canaries/) to decide whether writes should continue, fallback, or pause. If you want the same idea as a copyable skill, use the [context-receipts Agent Skill recipe](skills/context-receipts/). npm `latest` is currently aligned with the GitHub release; the review packet also documents a GitHub-release smoke fallback for future release-lag windows.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -161,7 +161,7 @@ npx --yes pluribus-context@latest sync --dry-run
|
|
|
161
161
|
|
|
162
162
|
If the preview looks right, run `npx --yes pluribus-context@latest sync` to write the tool-specific files.
|
|
163
163
|
|
|
164
|
-
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. If you evaluate code-search, MCP retrieval, RAG-over-notes, or agent memory tools, use the [Orchestration-layer Search Receipts](docs/orchestration-search-receipts.md) sketch to measure retrieved context from the harness layer without asking retrieval tools to inspect whole transcripts. If you are adding agent observability, traces, or OpenTelemetry-style events, start with [Context Receipts for Agent Observability](docs/context-receipts-for-agent-observability.md), then use the [Context Input Evidence](docs/context-input-evidence.md) sketch and its [executable demos](examples/context-input-evidence/) to separate source bytes, canonical text, delivered hashes, post-hoc session-log receipts, skill/plugin invocation receipts, shared-memory retrieval receipts, self-remediating brain/doctor receipts, and OpenTelemetry-style SpanEvents. If you publish AI rules, skills, or instruction bundles as "portable", use the [Portability Fidelity Report](docs/portability-fidelity-report.md) and its [example source file](examples/portability-fidelity/pluribus.md) to make compatibility claims evidence-based instead of self-attested. 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 your shared-memory or knowledge-graph setup lets agents write durable facts, use [Memory write policy receipts](docs/memory-write-policy-receipts.md) and the [copyable gate](examples/memory-write-policy/) to require proposed diffs, scope, lifecycle, visibility, approval, and privacy checks before one run can teach every harness. If hooks, local gateways, or agent firewalls block risky tool calls, use [Agent firewall denial/audit receipts](docs/agent-firewall-denial-audit.md) and the [copyable checker](examples/agent-firewall-denial-audit/) to split model-visible denial from private operator audit evidence. If you are turning Claude Code/OpenClaw/Cursor into role-based “AI employee” agents with Skills and memory folders, use the [Controlled learning queue](docs/controlled-learning-queue.md) and [copyable example](examples/controlled-learning-queue/) to let agents propose durable memory changes without silently rewriting shared ICP, pricing, compliance, or process assumptions. If `PreCompact` / `PostCompact` or `SessionStart(compact)` workflows decide whether an agent may continue after summarization, use [Compaction resume receipts](docs/compaction-resume-receipts.md) and the [copyable gate](examples/compaction-resume-receipts/) to prove what was summarized, which instruction sources reloaded, what state was lost/kept, and whether `safe_to_resume` is actually true. If an MCP server is healthy but tools are missing in Claude Code/Cursor/Codex, use the [MCP tool visibility receipts](docs/mcp-tool-visibility-receipts.md) checklist to separate launch, handshake, `tools/list`, client catalog, and first invocation failures. If a Claude Code/OpenClaw-style Skill states a hard rule but the run still violates it, use the [Skill policy receipts](docs/skill-policy-receipts.md) guide and [copyable Skill recipe](skills/skill-policy-receipts/) to turn target decisions, refusals, and post-write guards into privacy-safe evidence. If a Skill, plugin resource, MCP instruction, or custom-agent file exists but disappears in ACP/Zed/CLI/chat parity tests, use [Loaded-resource boundary receipts](docs/loaded-resource-boundary.md) and the [copyable checker](examples/loaded-resource-boundary/) to prove discovered, attached, injected, readable, and skipped-resource stages. If long-lived projects keep old specs/TODOs that still match grep but are no longer authoritative, use [Temporal context receipts](docs/temporal-context-receipts.md) and the [copyable current-state example](examples/temporal-context-receipts/) to separate current authority from historical citations before an agent writes code. If AI-generated pull requests are hard to review because diff size hides operational risk, use [AI PR review receipts](docs/ai-pr-review-receipts.md), the [copyable PR template](examples/ai-pr-review-receipts/), and the [GitHub Actions receipt gate](examples/ai-pr-review-receipts/.github/workflows/ai-pr-review-receipt.yml) to review by blast radius: schema/data contracts, async paths, rollout gates, side effects, and ambiguous boundaries. If you delegate work to Codex/Claude Code/Cursor/OpenClaw-style specialist subagents, use [Subagent role receipts](docs/subagent-role-receipts.md) and the [example role definitions](examples/subagent-role-receipts/) to prove the requested role, effective role, loaded instruction source, allowed/refused capabilities, stop point, and next safe action. If you run Claude Code-style dynamic workflows, ultracode, or local LLM gateway orchestration that spawns many agents, use [Dynamic workflow run receipts](docs/dynamic-workflow-run-receipts.md) and the [copyable workflow example](examples/dynamic-workflow-run-receipts/) to prove phases, per-agent roles/models, context loaded/skipped, tool grants, token spend buckets, per-agent fuses, heartbeat, stop reasons, and known gaps. If your workflow routes Explore/Propose/Spec/Design/Tasks/Apply/Verify across OpenCode, Claude Code, Cursor, Codex, or different models, use [Phase-boundary contracts](docs/phase-boundary-contracts.md) and the [copyable Apply→Verify gate](examples/phase-boundary-contract/) to prove allowed input context, output artifact, evidence required before the next phase, dropped context, and stop conditions. If you need CI/reviewers to decide whether an agent handoff can continue, must be reviewed, or should be rejected, use the [Review primitive gate](docs/review-primitive-gate.md), its [copyable gate example](examples/review-primitive-gate/), and the [Claude Code review hook bridge](examples/claude-code-review-hook/) to validate assignment boundaries, approved scope/access changes, required checks, privacy flags, and `complete / partial / unsafe-to-resume` state from CI or Claude Code `TaskCompleted` / `PostCompact` hooks. If Claude Projects, long chats, or compaction make the last clean artifact hard to recover, use [Canonical output receipts](docs/canonical-output-receipts.md) and the [copyable index example](examples/canonical-output-receipts/) to track stable IDs, paths, versions, exact grep phrases, decisions, rejected options, and next actions. If a setup script installs MCP servers, Skills, instruction files, hooks, or plugins across multiple agents, use [Install-plan receipts](docs/install-plan-receipts.md) and the [copyable example](examples/install-plan-receipts/) to prove planned writes, backups, network behavior, and `writes_started=false` before mutation. After a Skill installer runs, use [Skill install/load receipts](docs/skill-install-receipts.md) and the [copyable checker](examples/skill-install-receipts/) to prove source ref, target agents/scopes, discovery/load status, context-cost bucket, and `safe_to_start_session` without logging raw Skill bodies. If you are pruning Skill sprawl after real sessions, use [Skill use-rate receipts](docs/skill-use-rate-receipts.md) and the [copyable checker](examples/skill-use-rate-receipts/) to separate discovered/installed/attached from invoked/acted-on and catch "installed but unused" resources. If you supervise multiple Claude Code/Cursor/Codex/OpenClaw sessions in parallel, use the [Parallel session review ledger](docs/parallel-session-review-ledger.md) and [copyable checker](examples/parallel-session-review-ledger/) to decide which sessions are complete, partial, blocked, or unsafe to resume without trusting an agent summary. 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).
|
|
164
|
+
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), its [example source file](examples/context-handoff/pluribus.md), and the copyable handoff receipt for checking stale source files, diverged tool rules, wrong memories, dead commands, and not-loaded context before another agent writes code. 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. If you evaluate code-search, MCP retrieval, RAG-over-notes, or agent memory tools, use the [Orchestration-layer Search Receipts](docs/orchestration-search-receipts.md) sketch to measure retrieved context from the harness layer without asking retrieval tools to inspect whole transcripts. If you are adding agent observability, traces, or OpenTelemetry-style events, start with [Context Receipts for Agent Observability](docs/context-receipts-for-agent-observability.md), then use the [Context Input Evidence](docs/context-input-evidence.md) sketch and its [executable demos](examples/context-input-evidence/) to separate source bytes, canonical text, delivered hashes, post-hoc session-log receipts, skill/plugin invocation receipts, shared-memory retrieval receipts, self-remediating brain/doctor receipts, and OpenTelemetry-style SpanEvents. If you publish AI rules, skills, or instruction bundles as "portable", use the [Portability Fidelity Report](docs/portability-fidelity-report.md) and its [example source file](examples/portability-fidelity/pluribus.md) to make compatibility claims evidence-based instead of self-attested. 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, then use the [CLAUDE.md read receipt example](examples/claude-md-read-receipts/) when the practical question is whether a session actually reloaded the right index/topic files before editing. 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 a provider/model may be silently degraded, use the [provider degradation canary receipt example](examples/provider-degradation-canaries/) to record transport health, capability canaries, fallback choice, and the write gate before side effects. If your shared-memory or knowledge-graph setup lets agents write durable facts, use [Memory write policy receipts](docs/memory-write-policy-receipts.md) and the [copyable gate](examples/memory-write-policy/) to require proposed diffs, scope, lifecycle, visibility, approval, and privacy checks before one run can teach every harness. If hooks, local gateways, or agent firewalls block risky tool calls, use [Agent firewall denial/audit receipts](docs/agent-firewall-denial-audit.md) and the [copyable checker](examples/agent-firewall-denial-audit/) to split model-visible denial from private operator audit evidence. If you are turning Claude Code/OpenClaw/Cursor into role-based “AI employee” agents with Skills and memory folders, use the [Controlled learning queue](docs/controlled-learning-queue.md) and [copyable example](examples/controlled-learning-queue/) to let agents propose durable memory changes without silently rewriting shared ICP, pricing, compliance, or process assumptions. If `PreCompact` / `PostCompact` or `SessionStart(compact)` workflows decide whether an agent may continue after summarization, use [Compaction resume receipts](docs/compaction-resume-receipts.md) and the [copyable gate](examples/compaction-resume-receipts/) to prove what was summarized, which instruction sources reloaded, what state was lost/kept, and whether `safe_to_resume` is actually true. If MCP tools consume context before a task needs them, use the [Task-scoped MCP config receipt demo](examples/task-scoped-mcp-config/) to generate a minimal `--mcp-config` and prove which servers were selected or withheld before startup. If an MCP server is healthy but tools are missing in Claude Code/Cursor/Codex, use the [MCP tool visibility receipts](docs/mcp-tool-visibility-receipts.md) checklist to separate launch, handshake, `tools/list`, client catalog, and first invocation failures. If a Claude Code/OpenClaw-style Skill states a hard rule but the run still violates it, use the [Skill policy receipts](docs/skill-policy-receipts.md) guide and [copyable Skill recipe](skills/skill-policy-receipts/) to turn target decisions, refusals, and post-write guards into privacy-safe evidence. If a Skill, plugin resource, MCP instruction, or custom-agent file exists but disappears in ACP/Zed/CLI/chat parity tests, use [Loaded-resource boundary receipts](docs/loaded-resource-boundary.md) and the [copyable checker](examples/loaded-resource-boundary/) to prove discovered, attached, injected, readable, and skipped-resource stages. If long-lived projects keep old specs/TODOs that still match grep but are no longer authoritative, use [Temporal context receipts](docs/temporal-context-receipts.md) and the [copyable current-state example](examples/temporal-context-receipts/) to separate current authority from historical citations before an agent writes code. If AI-generated pull requests are hard to review because diff size hides operational risk, use [AI PR review receipts](docs/ai-pr-review-receipts.md), the [copyable PR template](examples/ai-pr-review-receipts/), and the [GitHub Actions receipt gate](examples/ai-pr-review-receipts/.github/workflows/ai-pr-review-receipt.yml) to review by blast radius: schema/data contracts, async paths, rollout gates, side effects, and ambiguous boundaries. If you delegate work to Codex/Claude Code/Cursor/OpenClaw-style specialist subagents, use [Subagent role receipts](docs/subagent-role-receipts.md) and the [example role definitions](examples/subagent-role-receipts/) to prove the requested role, effective role, loaded instruction source, allowed/refused capabilities, stop point, and next safe action. If you run Claude Code-style dynamic workflows, ultracode, or local LLM gateway orchestration that spawns many agents, use [Dynamic workflow run receipts](docs/dynamic-workflow-run-receipts.md) and the [copyable workflow example](examples/dynamic-workflow-run-receipts/) to prove phases, per-agent roles/models, context loaded/skipped, tool grants, token spend buckets, per-agent fuses, heartbeat, stop reasons, and known gaps. If your workflow routes Explore/Propose/Spec/Design/Tasks/Apply/Verify across OpenCode, Claude Code, Cursor, Codex, or different models, use [Phase-boundary contracts](docs/phase-boundary-contracts.md) and the [copyable Apply→Verify gate](examples/phase-boundary-contract/) to prove allowed input context, output artifact, evidence required before the next phase, dropped context, and stop conditions. If you need CI/reviewers to decide whether an agent handoff can continue, must be reviewed, or should be rejected, use the [Review primitive gate](docs/review-primitive-gate.md), its [copyable gate example](examples/review-primitive-gate/), and the [Claude Code review hook bridge](examples/claude-code-review-hook/) to validate assignment boundaries, approved scope/access changes, required checks, privacy flags, and `complete / partial / unsafe-to-resume` state from CI or Claude Code `TaskCompleted` / `PostCompact` hooks. If Claude Projects, long chats, or compaction make the last clean artifact hard to recover, use [Canonical output receipts](docs/canonical-output-receipts.md) and the [copyable index example](examples/canonical-output-receipts/) to track stable IDs, paths, versions, exact grep phrases, decisions, rejected options, and next actions. If a setup script installs MCP servers, Skills, instruction files, hooks, or plugins across multiple agents, use [Install-plan receipts](docs/install-plan-receipts.md) and the [copyable example](examples/install-plan-receipts/) to prove planned writes, backups, network behavior, and `writes_started=false` before mutation. After a Skill installer runs, use [Skill install/load receipts](docs/skill-install-receipts.md) and the [copyable checker](examples/skill-install-receipts/) to prove source ref, target agents/scopes, discovery/load status, context-cost bucket, and `safe_to_start_session` without logging raw Skill bodies. If you are pruning Skill sprawl after real sessions, use [Skill use-rate receipts](docs/skill-use-rate-receipts.md) and the [copyable checker](examples/skill-use-rate-receipts/) to separate discovered/installed/attached from invoked/acted-on and catch "installed but unused" resources. If you supervise multiple Claude Code/Cursor/Codex/OpenClaw sessions in parallel, use the [Parallel session review ledger](docs/parallel-session-review-ledger.md) and [copyable checker](examples/parallel-session-review-ledger/) to decide which sessions are complete, partial, blocked, or unsafe to resume without trusting an agent summary. 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).
|
|
165
165
|
|
|
166
166
|
### Usage
|
|
167
167
|
|
|
@@ -407,6 +407,7 @@ If you've felt this pain, tell me about your setup. What tools do you use? How d
|
|
|
407
407
|
- [OpenClaw Integration](docs/openclaw-integration.md) — how Pluribus generates `AGENTS.md` for OpenClaw
|
|
408
408
|
- [Composable Contexts](docs/composable-contexts.md) — local/remote imports, merge behavior, and safety rules
|
|
409
409
|
- [MCP Memory Handoff](docs/memory-mcp-handoff.md) — demo for keeping memory recall/store protocols aligned across tool-specific instruction files
|
|
410
|
+
- [Task-scoped MCP Config Receipt](examples/task-scoped-mcp-config/) — generate a minimal `--mcp-config` plus selected/withheld server receipt for MCP context-bloat reviews
|
|
410
411
|
- [MCP Tool Visibility Receipts](docs/mcp-tool-visibility-receipts.md) — checklist for debugging healthy MCP servers whose tools do not appear in the agent client catalog
|
|
411
412
|
- [MCP Runtime Config Receipts](docs/mcp-runtime-config-receipts.md) — live-vs-template evidence for MCP permission/config drift review
|
|
412
413
|
- [Remote Composable Context Imports](docs/remote-composable-context-imports.md) — design notes for lockfile/cache/auth hardening
|
package/bin/pluribus.js
CHANGED
|
@@ -70,6 +70,7 @@ OPTIONS (demo)
|
|
|
70
70
|
--receipt Validate a custom demo receipt JSON file
|
|
71
71
|
--input Import a custom demo input file, such as rpc-messages.jsonl
|
|
72
72
|
--json Print machine-readable demo results
|
|
73
|
+
--pass For context-sufficiency-trace, use the bundled passing trace
|
|
73
74
|
|
|
74
75
|
EXAMPLES
|
|
75
76
|
pluribus init
|
|
@@ -96,6 +97,7 @@ EXAMPLES
|
|
|
96
97
|
pluribus demo mcp-telemetry-import --json
|
|
97
98
|
pluribus demo tool-surface-diff
|
|
98
99
|
pluribus demo tool-surface-diff --json
|
|
100
|
+
pluribus demo context-sufficiency-trace --json
|
|
99
101
|
|
|
100
102
|
DOCS
|
|
101
103
|
https://github.com/caioribeiroclw-pixel/pluribus
|
|
@@ -107,7 +109,7 @@ const COMMAND_FLAGS = {
|
|
|
107
109
|
validate: new Set(['source', 'update-imports']),
|
|
108
110
|
audit: new Set(['source', 'tools', 'update-imports', 'strict', 'ci', 'json', 'output', 'github-annotations', 'fidelity-report']),
|
|
109
111
|
watch: new Set(['source', 'tools', 'update-imports', 'dry-run', 'once', 'debounce']),
|
|
110
|
-
demo: new Set(['receipt', 'input', 'json']),
|
|
112
|
+
demo: new Set(['receipt', 'input', 'json', 'pass']),
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
function getFlagNames(argv) {
|
package/docs/.nojekyll
ADDED
|
File without changes
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-receipts
|
|
3
|
+
description: Emit privacy-safe receipts for context selection, deferral, hydration, compaction, pruning, delegation, usage attribution, and boundary handoffs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Context Receipts
|
|
7
|
+
|
|
8
|
+
Use this skill when an agent workflow claims to save context by selecting, deferring, hydrating, summarizing, compacting, pruning, delegating, attributing usage, or isolating context.
|
|
9
|
+
|
|
10
|
+
The job is not to log the private content. The job is to emit a small receipt that lets a reviewer answer:
|
|
11
|
+
|
|
12
|
+
> what crossed the context boundary, what stayed out, and what audit gap remains?
|
|
13
|
+
|
|
14
|
+
## Privacy defaults
|
|
15
|
+
|
|
16
|
+
Never include raw prompts, raw tool schemas, raw tool arguments, raw tool results, raw skill bodies, memory bodies, secrets, customer names, or full transcripts in the receipt.
|
|
17
|
+
|
|
18
|
+
Prefer:
|
|
19
|
+
|
|
20
|
+
- stable ids or hashed ids;
|
|
21
|
+
- counts and token/line buckets;
|
|
22
|
+
- categorical reasons;
|
|
23
|
+
- explicit booleans for raw content copied/not copied;
|
|
24
|
+
- before/after context budget buckets;
|
|
25
|
+
- an `audit_gap` field when the receipt proves routing but not semantic correctness.
|
|
26
|
+
|
|
27
|
+
## 60-second Tool Search smoke
|
|
28
|
+
|
|
29
|
+
For MCP Tool Search, lazy tool loading, or progressive disclosure, emit enough evidence to answer these seven checks:
|
|
30
|
+
|
|
31
|
+
1. **Index-only startup:** did the session load a compact tool/server index instead of all full schemas?
|
|
32
|
+
2. **Search/routing:** what hashed query/category or routing reason selected candidate tools?
|
|
33
|
+
3. **Hydration:** which full tool definition was loaded, why, and how many definitions stayed suppressed?
|
|
34
|
+
4. **Call:** which server/tool id was invoked, with argument/result redaction status and success/error status?
|
|
35
|
+
5. **Boundary:** if a manager subagent or child agent was used, did raw child output return to the parent?
|
|
36
|
+
6. **Budget:** what were the startup and post-hydration context-token buckets?
|
|
37
|
+
7. **Audit gap:** what is not proven, such as whether the selected tool was semantically optimal?
|
|
38
|
+
|
|
39
|
+
Minimal JSONL event names:
|
|
40
|
+
|
|
41
|
+
```jsonl
|
|
42
|
+
{"event":"mcp.tool_index.loaded","loaded_server_count":12,"loaded_tool_index_count":84,"full_schema_count":0,"suppressed_tool_count":84,"raw_schema_copied":false,"startup_token_bucket":"lt_1k"}
|
|
43
|
+
{"event":"mcp.tool_search.performed","query_hash":"sha256:...","query_category":"repo_search","candidate_tool_count":5,"selected_tool_id":"github.search_code","raw_query_copied":false}
|
|
44
|
+
{"event":"mcp.tool_definition.loaded","tool_id":"github.search_code","hydrate_reason":"selected_after_tool_search","suppressed_tool_count":83,"definition_token_bucket":"1k_2k","raw_schema_copied":false}
|
|
45
|
+
{"event":"mcp.tool_call.completed","tool_id":"github.search_code","args_hash":"sha256:...","result_token_bucket":"2k_4k","raw_args_copied":false,"raw_result_copied":false,"status":"ok"}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Skill / prompt context smoke
|
|
49
|
+
|
|
50
|
+
For skills, rules, AGENTS.md overlays, or instruction files, answer:
|
|
51
|
+
|
|
52
|
+
- which index/listing entered the session;
|
|
53
|
+
- which full skill/rule/instruction body was selected;
|
|
54
|
+
- which candidates were suppressed and why;
|
|
55
|
+
- whether the body was loaded at session start, after a search, or after an explicit command;
|
|
56
|
+
- source hash, delivered hash, and canonical form when available;
|
|
57
|
+
- whether the skill/instruction text was copied into the receipt.
|
|
58
|
+
|
|
59
|
+
Minimal event names:
|
|
60
|
+
|
|
61
|
+
- `context.skill.registry.index.loaded`
|
|
62
|
+
- `context.skill.registry.skill.read`
|
|
63
|
+
- `context.skill.registry.skill.injected`
|
|
64
|
+
- `context.input.loaded`
|
|
65
|
+
- `context.input.candidate_suppressed`
|
|
66
|
+
|
|
67
|
+
## Per-agent MCP injection smoke
|
|
68
|
+
|
|
69
|
+
For role-specific subagents or per-agent MCP configs, prove the policy boundary before debugging model quality:
|
|
70
|
+
|
|
71
|
+
- which subagent role/session requested tools;
|
|
72
|
+
- which MCP servers were available to that role;
|
|
73
|
+
- which servers were explicitly excluded before boot;
|
|
74
|
+
- whether startup loaded full schemas or only a compact index;
|
|
75
|
+
- how many tool definitions stayed deferred/suppressed; and
|
|
76
|
+
- the startup token bucket after policy was applied.
|
|
77
|
+
|
|
78
|
+
Minimal JSONL event names:
|
|
79
|
+
|
|
80
|
+
```jsonl
|
|
81
|
+
{"event":"subagent.mcp_policy.applied","subagent_role":"testing","available_server_count":2,"available_servers_hash":"sha256:...","excluded_server_count":5,"excluded_servers_hash":"sha256:...","policy_source":"role_config","raw_server_names_copied":false}
|
|
82
|
+
{"event":"subagent.context_boot.evaluated","subagent_role":"testing","loaded_tool_definition_count":0,"deferred_tool_definition_count":48,"startup_token_bucket":"50k_75k","raw_schema_copied":false,"audit_gap":"proves injection boundary, not tool relevance"}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## ToolSearch propagation smoke
|
|
86
|
+
|
|
87
|
+
For subagents that should inherit MCP through `ToolSearch`, distinguish policy, declaration, and runtime filtering:
|
|
88
|
+
|
|
89
|
+
- did the parent/orchestrator intend to expose MCP or exclude it for this subagent?
|
|
90
|
+
- was the subagent spawned immediately or after parent tool calls/orchestration work?
|
|
91
|
+
- was the `tools:` declaration wildcard, explicit include, or exclusion style?
|
|
92
|
+
- was `ToolSearch` declared and was it actually exposed in the subagent tool surface?
|
|
93
|
+
- did MCP servers/tool definitions stay deferred, or did the channel collapse to zero?
|
|
94
|
+
- was the agent registry loaded at session boot, making newly added agent files invisible until restart?
|
|
95
|
+
|
|
96
|
+
Minimal JSONL event names:
|
|
97
|
+
|
|
98
|
+
```jsonl
|
|
99
|
+
{"event":"subagent.toolsearch.propagation.evaluated","spawn_path":"Task","tools_declaration_shape":"enumerated_include","toolsearch_declared":false,"toolsearch_exposed":false,"mcp_servers_available_bucket":"0","deferred_tool_definitions_bucket":"0","filtered_by":"frontmatter_tools_policy_or_runtime_filter","raw_tool_schemas_copied":false}
|
|
100
|
+
{"event":"subagent.toolsearch.matrix.completed","tested_axis":"tools_frontmatter_shape","audit_gap":"proves ToolSearch exposure, not semantic tool relevance or runtime call success"}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Retrieval / code-search smoke
|
|
104
|
+
|
|
105
|
+
For semantic code search, repo RAG, or MCP tools such as Claude Context, separate "search returned" from "agent context loaded":
|
|
106
|
+
|
|
107
|
+
- which index snapshot/version was used, without raw local codebase paths;
|
|
108
|
+
- what query/category/filter identity selected the candidates, without raw query text;
|
|
109
|
+
- which result ids/chunk hashes were returned, with rank, score bucket, stale flag, duplicate marker, path hash/extension, and range bucket;
|
|
110
|
+
- which returned chunks were actually loaded into the agent context;
|
|
111
|
+
- which chunks were suppressed as duplicate, stale, clipped, policy-blocked, or over budget;
|
|
112
|
+
- whether raw code, raw prompts, raw paths, customer names, URLs, secrets, and ticket text stayed out of the receipt;
|
|
113
|
+
- the audit gap: this proves retrieval/loading boundaries, not semantic answer quality.
|
|
114
|
+
|
|
115
|
+
Minimal JSONL event names:
|
|
116
|
+
|
|
117
|
+
```jsonl
|
|
118
|
+
{"event":"code.index.snapshot.used","snapshot_id_hash":"sha256:...","codebase_path_hash":"sha256:...","indexed_chunk_count_bucket":"over_1k","raw_codebase_path_copied":false}
|
|
119
|
+
{"event":"code.search.performed","query_hash":"sha256:...","query_category":"auth_debug","candidate_count_bucket":"over_1k","raw_query_copied":false}
|
|
120
|
+
{"event":"code.search.result.returned","rank":1,"chunk_id_hash":"sha256:...","chunk_text_hash":"sha256:...","path_hash":"sha256:...","score_bucket":"high","stale":false,"raw_code_copied":false}
|
|
121
|
+
{"event":"context.input.loaded","kind":"retrieved_code_chunks","loaded_chunk_count":3,"suppressed_chunk_count":2,"suppression_reasons":["duplicate","stale_snapshot_chunk"],"raw_code_copied":false}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Usage attribution smoke
|
|
125
|
+
|
|
126
|
+
For `/usage`, `/context`, `/doctor`, or other context-budget breakdowns, map each displayed category to evidence that can be reviewed without exposing private content:
|
|
127
|
+
|
|
128
|
+
- what measurement window was used;
|
|
129
|
+
- which categories were attributed, such as skills, subagents, plugins, MCP servers, rules, memory, or project files;
|
|
130
|
+
- which components were loaded, deferred, hydrated, suppressed, pruned, or rolled back;
|
|
131
|
+
- before/after or current token/cost buckets by category;
|
|
132
|
+
- whether raw skill bodies, prompts, MCP schemas, tool outputs, and file paths were excluded;
|
|
133
|
+
- the remaining audit gap, such as not proving semantic usefulness of a high-cost component.
|
|
134
|
+
|
|
135
|
+
Minimal JSONL event names:
|
|
136
|
+
|
|
137
|
+
```jsonl
|
|
138
|
+
{"event":"context.usage.window.measured","window":"current_session","total_token_bucket":"100k_150k","raw_prompts_copied":false}
|
|
139
|
+
{"event":"context.usage.category.attributed","category":"mcp_server","component_hash":"sha256:...","loaded_token_bucket":"10k_25k","deferred_definition_count":42,"hydrated_definition_count":3,"raw_schema_copied":false}
|
|
140
|
+
{"event":"context.usage.breakdown.completed","categories":["skills","subagents","plugins","mcp_server"],"audit_gap":"proves attribution buckets, not whether each component was necessary"}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Pruning / compaction smoke
|
|
144
|
+
|
|
145
|
+
For context-cleaning, pruning, compaction, or doctor/guard tools, answer:
|
|
146
|
+
|
|
147
|
+
- what prescription/trigger started the run;
|
|
148
|
+
- which strategies changed context and which candidates were protected;
|
|
149
|
+
- before/after token and byte buckets;
|
|
150
|
+
- whether summaries, behavioral digests, team messages, and backups were preserved;
|
|
151
|
+
- whether private transcript text, raw tool output, file paths, secrets, and customer text were excluded from the receipt;
|
|
152
|
+
- the remaining audit gap, such as not proving semantic quality of the pruned text.
|
|
153
|
+
|
|
154
|
+
Minimal JSONL event names:
|
|
155
|
+
|
|
156
|
+
```jsonl
|
|
157
|
+
{"event":"context.prune.started","prescription":"balanced","trigger":"manual_dry_run","before_token_bucket":"150k_200k","raw_transcript_copied":false}
|
|
158
|
+
{"event":"context.prune.strategy.evaluated","strategy":"tool-output-trim","candidate_bucket":"10_25","changed_bucket":"5_10","protected_bucket":"1_5","raw_tool_output_copied":false}
|
|
159
|
+
{"event":"context.prune.completed","after_token_bucket":"75k_100k","backup_verified":true,"protected_summary_count":2,"raw_text_copied":false,"audit_gap":"proves pruning/protection counts, not semantic disposability"}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
For failed compaction, also prove transaction safety:
|
|
163
|
+
|
|
164
|
+
- did the summary call succeed, fail, or timeout;
|
|
165
|
+
- was a candidate summary validated before any swap;
|
|
166
|
+
- did the harness commit a context swap or preserve the original context;
|
|
167
|
+
- were deferred-tool registries and system-reminder queues restored on rollback;
|
|
168
|
+
- did stale system reminders/tool results replay as fresh state;
|
|
169
|
+
- was post-token metadata recorded as success even though summary failed.
|
|
170
|
+
|
|
171
|
+
Minimal JSONL event names:
|
|
172
|
+
|
|
173
|
+
```jsonl
|
|
174
|
+
{"event":"context.compaction.summary.attempted","summary_call_status":"failed_rate_limited","candidate_summary_available":false,"raw_error_copied":false}
|
|
175
|
+
{"event":"context.compaction.rollback.completed","swap_committed":false,"original_context_preserved":true,"deferred_tool_registry_restored":true,"system_reminder_queue_restored":true,"replayed_system_reminder_count":0}
|
|
176
|
+
{"event":"context.compaction.transaction.completed","status":"rolled_back","authoritative_state":"pre_compaction_context","post_tokens_recorded_as_success":false,"raw_context_copied":false}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Subagent / manager boundary smoke
|
|
180
|
+
|
|
181
|
+
For subagents, manager agents, or child workers, answer:
|
|
182
|
+
|
|
183
|
+
- what task was delegated, by category and hashed objective;
|
|
184
|
+
- what large output was captured by the child, as line/token buckets;
|
|
185
|
+
- what bounded summary returned to the parent;
|
|
186
|
+
- whether raw child output, tool results, or MCP schemas entered the parent context;
|
|
187
|
+
- the remaining audit gap.
|
|
188
|
+
|
|
189
|
+
Minimal event names:
|
|
190
|
+
|
|
191
|
+
- `subagent.delegation.requested`
|
|
192
|
+
- `subagent.tool_output.captured`
|
|
193
|
+
- `subagent.summary.returned`
|
|
194
|
+
- `parent.context_budget.evaluated`
|
|
195
|
+
|
|
196
|
+
## Good receipt test
|
|
197
|
+
|
|
198
|
+
A receipt is useful if a maintainer can debug one of these failures without seeing private content:
|
|
199
|
+
|
|
200
|
+
- the agent never found the right tool/skill;
|
|
201
|
+
- the full definition loaded too early;
|
|
202
|
+
- too many definitions stayed in context;
|
|
203
|
+
- a child/subagent saved no budget because raw output returned to the parent;
|
|
204
|
+
- compaction/pruning happened but no one can prove what was changed, protected, backed up, summarized, or dropped.
|
|
205
|
+
|
|
206
|
+
A receipt is not enough if it only says “Tool Search enabled” or “used subagent”. It must prove the boundary behavior.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json",
|
|
3
|
+
"skills": [
|
|
4
|
+
{
|
|
5
|
+
"name": "context-receipts",
|
|
6
|
+
"type": "skill-md",
|
|
7
|
+
"description": "Emit privacy-safe receipts for context selection, deferral, hydration, compaction, pruning, delegation, usage attribution, and boundary handoffs.",
|
|
8
|
+
"url": "context-receipts/SKILL.md",
|
|
9
|
+
"digest": "sha256:6d268a5ceac4afa87308ff4c79f01483e2785a8e9bb54e5d3147477e0bf724a1"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "skill-policy-receipts",
|
|
13
|
+
"type": "skill-md",
|
|
14
|
+
"description": "Use when a task must obey a hard project policy, such as \"do not generate tests for internal services\", \"do not call production APIs\", or \"do not edit generated files\". Emits a privacy-safe receipt before writes and after guard checks.",
|
|
15
|
+
"url": "skill-policy-receipts/SKILL.md",
|
|
16
|
+
"digest": "sha256:633b4da097b56da8805476a69d0498602979b7f8c03c57996f886bb9e56ccca8"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-policy-receipts
|
|
3
|
+
description: Use when a task must obey a hard project policy, such as "do not generate tests for internal services", "do not call production APIs", or "do not edit generated files". Emits a privacy-safe receipt before writes and after guard checks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Policy Receipts
|
|
7
|
+
|
|
8
|
+
This Skill turns natural-language guardrails into an inspectable policy receipt.
|
|
9
|
+
|
|
10
|
+
## Preflight: decide before writing
|
|
11
|
+
|
|
12
|
+
Before creating or editing files:
|
|
13
|
+
|
|
14
|
+
1. List intended targets using coarse paths or globs.
|
|
15
|
+
2. For each target, decide `allowed` or `refused`.
|
|
16
|
+
3. Give a short reason.
|
|
17
|
+
4. If any target is refused, stop before writing.
|
|
18
|
+
5. Emit a receipt with `write_started=false` and `stopped_at="policy_refused"`.
|
|
19
|
+
|
|
20
|
+
Receipt shape:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"receipt_type": "skill.policy.v1",
|
|
25
|
+
"skill": "skill-policy-receipts",
|
|
26
|
+
"policy_scope": "<short policy name>",
|
|
27
|
+
"targets": [
|
|
28
|
+
{
|
|
29
|
+
"target": "<coarse path or glob>",
|
|
30
|
+
"decision": "allowed|refused",
|
|
31
|
+
"reason": "<short reason>"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"write_started": false,
|
|
35
|
+
"post_write_guard": "not_run",
|
|
36
|
+
"stopped_at": "policy_refused|all_targets_allowed"
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Do not include raw prompts, code, secrets, customer data, stack traces, or full tool output.
|
|
41
|
+
|
|
42
|
+
## Write only after all targets are allowed
|
|
43
|
+
|
|
44
|
+
If every target is allowed:
|
|
45
|
+
|
|
46
|
+
1. Emit or state `stopped_at="all_targets_allowed"`.
|
|
47
|
+
2. Perform the write.
|
|
48
|
+
3. Run the configured post-write guard.
|
|
49
|
+
4. Emit whether the guard passed or failed.
|
|
50
|
+
|
|
51
|
+
Post-write receipt shape:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"receipt_type": "skill.policy.v1",
|
|
56
|
+
"skill": "skill-policy-receipts",
|
|
57
|
+
"policy_scope": "<short policy name>",
|
|
58
|
+
"write_started": true,
|
|
59
|
+
"post_write_guard": "passed|failed|not_configured",
|
|
60
|
+
"stopped_at": "guard_passed|guard_failed"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Example policy: no internal-service unit tests
|
|
65
|
+
|
|
66
|
+
Policy:
|
|
67
|
+
|
|
68
|
+
> Do not generate unit tests for internal services. If the requested test imports `internal/`, `@/internal`, or a known private service module, refuse before writing and explain the safer target.
|
|
69
|
+
|
|
70
|
+
Example guard:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
grep -R "from ['\"]\.\./\.\./internal\|from ['\"]@/internal\|require(['\"]@/internal" \
|
|
74
|
+
-- '*test.*' '*spec.*'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If the grep finds a match in generated tests, stop and report `post_write_guard="failed"`.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Agent surface proof chain
|
|
2
|
+
|
|
3
|
+
Agent setup is becoming a bundle, not a file: Skills, hooks, MCP servers, subagents, slash commands, permissions, profiles, plugins, and cross-model workers all get installed or synced together.
|
|
4
|
+
|
|
5
|
+
A single “receipt” is too vague for that surface. Use the smallest proof object for the boundary you are crossing, and do not let one green check imply the next boundary worked.
|
|
6
|
+
|
|
7
|
+
## Quick model
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
registry publishes
|
|
11
|
+
→ installer plans writes
|
|
12
|
+
→ sync applies writes
|
|
13
|
+
→ host exposes surface
|
|
14
|
+
→ task makes tools/skills eligible
|
|
15
|
+
→ runtime calls or activates them
|
|
16
|
+
→ workers hand results back
|
|
17
|
+
→ reviewer/CI promotes state
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Each arrow can fail independently.
|
|
21
|
+
|
|
22
|
+
## Boundary-specific proof objects
|
|
23
|
+
|
|
24
|
+
| Boundary | Use this proof object | Proves | Does **not** prove |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| Setup script or plugin is about to write files | **Install diff** | Planned files, permissions, hooks, MCP servers, Skills, commands, backups, network/env access, and `writes_started=false` before mutation | The host later loaded or used any installed surface |
|
|
27
|
+
| Registry sync says it succeeded | **Post-sync manifest** | Published asset version, target agents/scopes, written paths, content hashes, skipped targets, errors, and restart requirements | Runtime discovery or activation |
|
|
28
|
+
| Continuous config sync ran with `--apply` | **Post-apply ledger** | What was actually written, skipped, backed up, failed, or sent to manual review after apply | That Claude/Codex/Cursor followed the config |
|
|
29
|
+
| Host starts after install/sync | **Surface state** | What is visible/attached/discovered vs skipped/withheld: Skills, hooks, MCP tools, agents, slash commands, instruction files | That a specific task selected the right surface |
|
|
30
|
+
| Runtime task decides what to use | **Selection trace** | Available → eligible → called → enforced for tools/Skills/MCP, with privacy-safe reasons | That the output is correct |
|
|
31
|
+
| Model/provider may be silently degraded | **Degradation decision record** | Transport health, app-critical canaries, fallback choice, degradation confidence, and whether writes should continue | That the provider is globally healthy or that future turns will remain stable |
|
|
32
|
+
| Long session, compaction, or topic switch resumes work | **Read receipt / safe-to-edit gate** | Which index/topic files or summaries reloaded, active constraints, stale notes rejected, and whether editing is safe | That future turns will keep following the context |
|
|
33
|
+
| Debugger shows a chain of LLM calls | **Context-boundary span** | Which context inputs crossed into each node, hashes/paths by default, withheld inputs, replay reason, downstream invalidations | A raw prompt dump, secret-safe by itself, or full correctness |
|
|
34
|
+
| Claude delegates to Codex/Gemini/subagents | **Handoff envelope** | Task, parent-plan hash, allowed files/commands, passed context sources, output schema, timeout, and insufficient-context path | That worker output is trusted project state |
|
|
35
|
+
| Worker results are merged back | **Merge-back evidence** | What changed, evidence used, assumptions, invalidated downstream outputs, and reviewer/CI promotion decision | That the original worker had complete context |
|
|
36
|
+
|
|
37
|
+
## Minimal fields by proof object
|
|
38
|
+
|
|
39
|
+
### Install diff
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"proof_type": "install_diff",
|
|
44
|
+
"installer": "claude-code-setup",
|
|
45
|
+
"targets": ["claude-code", "codex"],
|
|
46
|
+
"planned_writes": [
|
|
47
|
+
{"path": ".claude/hooks/pretooluse.json", "kind": "hook", "backup": true},
|
|
48
|
+
{"path": ".mcp.json", "kind": "mcp_config", "backup": true}
|
|
49
|
+
],
|
|
50
|
+
"env_or_network_access": ["ANTHROPIC_API_KEY:required-not-recorded"],
|
|
51
|
+
"writes_started": false,
|
|
52
|
+
"review_required": true
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Post-sync manifest
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"proof_type": "post_sync_manifest",
|
|
61
|
+
"run_id": "skills-sync-2026-06-14T21:00Z",
|
|
62
|
+
"source": "team-skills-registry",
|
|
63
|
+
"targets": [
|
|
64
|
+
{
|
|
65
|
+
"agent": "claude-code",
|
|
66
|
+
"scope": "project",
|
|
67
|
+
"skills_dir": ".claude/skills",
|
|
68
|
+
"written": [{"name": "review-pr", "version": "1.4.2", "sha256": "..."}],
|
|
69
|
+
"skipped": []
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"restart_required": true
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Post-apply ledger
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"proof_type": "post_apply_ledger",
|
|
81
|
+
"run_id": "config-sync-123",
|
|
82
|
+
"plan_hash": "sha256:...",
|
|
83
|
+
"writes_started": true,
|
|
84
|
+
"backup_root": ".agent-sync/backups/2026-06-14T21-00Z",
|
|
85
|
+
"operations": [
|
|
86
|
+
{
|
|
87
|
+
"path": "AGENTS.md",
|
|
88
|
+
"status": "written",
|
|
89
|
+
"before_hash": "sha256:old",
|
|
90
|
+
"after_hash": "sha256:new",
|
|
91
|
+
"backup_path": ".agent-sync/backups/.../AGENTS.md"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"path": ".codex/config.toml",
|
|
95
|
+
"status": "manual_review",
|
|
96
|
+
"reason": "permission profile changed"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Selection trace
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"proof_type": "selection_trace",
|
|
107
|
+
"turn_id": "turn-42",
|
|
108
|
+
"loaded_instructions": ["CLAUDE.md", ".claude/skills/memory/SKILL.md"],
|
|
109
|
+
"mcp_tools_visible": ["memory.search", "memory.write"],
|
|
110
|
+
"task_intent": "recall prior decision before editing auth flow",
|
|
111
|
+
"expected_tools": ["memory.search"],
|
|
112
|
+
"eligible_tools": ["memory.search"],
|
|
113
|
+
"called_tools": ["memory.search"],
|
|
114
|
+
"enforced_by_hook": true
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Degradation decision record
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"proof_type": "degradation_decision_record",
|
|
123
|
+
"run_id": "agent-run-2026-06-15T20:02Z",
|
|
124
|
+
"provider": "anthropic",
|
|
125
|
+
"model": "claude-sonnet-4",
|
|
126
|
+
"region": "us-east-1",
|
|
127
|
+
"prompt_template_hash": "sha256:...",
|
|
128
|
+
"canary_suite_version": "coding-agent-smoke-2026-06-15",
|
|
129
|
+
"transport": {
|
|
130
|
+
"ttft_p95_ms": 1400,
|
|
131
|
+
"total_latency_p95_ms": 9200,
|
|
132
|
+
"timeout_rate": 0.01,
|
|
133
|
+
"error_rate": 0
|
|
134
|
+
},
|
|
135
|
+
"capability_canaries": [
|
|
136
|
+
{"name": "json_schema", "status": "pass", "severity": "write_blocking"},
|
|
137
|
+
{"name": "tool_choice", "status": "pass", "severity": "write_blocking"},
|
|
138
|
+
{"name": "patch_format", "status": "pass", "severity": "write_blocking"}
|
|
139
|
+
],
|
|
140
|
+
"confidence": "healthy",
|
|
141
|
+
"write_gate": "continue"
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Handoff envelope
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"proof_type": "handoff_envelope",
|
|
150
|
+
"from": "opus-supervisor",
|
|
151
|
+
"to": "codex-worker-2",
|
|
152
|
+
"task": "compare parser failures in imports.test.js",
|
|
153
|
+
"parent_plan_hash": "sha256:...",
|
|
154
|
+
"allowed_files": ["src/utils/imports.js", "test/imports.test.js"],
|
|
155
|
+
"allowed_commands": ["npm test -- imports"],
|
|
156
|
+
"context_sources_passed": ["spec/context-format.md#remote-imports"],
|
|
157
|
+
"expected_output_schema": "worker_result_v1",
|
|
158
|
+
"stop_condition": "one patch candidate or explicit insufficient_context"
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Practical rules
|
|
163
|
+
|
|
164
|
+
1. **Do not promote intent as outcome.** A dry-run plan is not an apply ledger.
|
|
165
|
+
2. **Do not promote visibility as use.** A visible MCP tool or Skill is not an activated/called one.
|
|
166
|
+
3. **Do not promote latency as reliability.** A low-latency provider call can still fail app-critical canaries, and a slow call may still be safe for read-only work.
|
|
167
|
+
4. **Do not promote worker output as project truth.** Merge-back needs evidence and invalidation notes.
|
|
168
|
+
5. **Keep receipts privacy-safe by default.** Prefer paths, hashes, names, versions, statuses, and reasons; expand raw bodies only under explicit local review.
|
|
169
|
+
6. **Name skipped and withheld context.** What did not load is often the failure.
|
|
170
|
+
7. **Use the product’s own vocabulary.** Say install diff for installers, ledger for sync apply, span for debuggers, envelope for delegation, degradation decision for provider/model health, and read receipt for re-grounding.
|
|
171
|
+
|
|
172
|
+
## When Pluribus fits
|
|
173
|
+
|
|
174
|
+
Use Pluribus when you need privacy-safe evidence around agent context boundaries: generated instruction files, Skills, MCP tools, memory/RAG results, compaction, pruning, provider/model degradation decisions, plugin setup, or cross-tool handoffs.
|
|
175
|
+
|
|
176
|
+
Do not use Pluribus as a registry, memory server, agent orchestrator, or replacement for Claude/Codex/Cursor runtime diagnostics. It is the evidence layer around those systems.
|