collective-capability-runtime 1.0.0__tar.gz
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.
- collective_capability_runtime-1.0.0/.gitignore +28 -0
- collective_capability_runtime-1.0.0/AGENTS.md +117 -0
- collective_capability_runtime-1.0.0/AUDIT.md +104 -0
- collective_capability_runtime-1.0.0/CHANGELOG.md +22 -0
- collective_capability_runtime-1.0.0/CODE_OF_CONDUCT.md +14 -0
- collective_capability_runtime-1.0.0/CONTRIBUTING.md +53 -0
- collective_capability_runtime-1.0.0/FORMAL_MODEL.md +229 -0
- collective_capability_runtime-1.0.0/GOVERNANCE.md +59 -0
- collective_capability_runtime-1.0.0/INTEROP_PIC.md +242 -0
- collective_capability_runtime-1.0.0/LICENSE +181 -0
- collective_capability_runtime-1.0.0/NOTICE +7 -0
- collective_capability_runtime-1.0.0/PKG-INFO +303 -0
- collective_capability_runtime-1.0.0/README.md +266 -0
- collective_capability_runtime-1.0.0/SECURITY.md +174 -0
- collective_capability_runtime-1.0.0/SPEC.md +207 -0
- collective_capability_runtime-1.0.0/agent-manifest.json +304 -0
- collective_capability_runtime-1.0.0/examples/minimal/packet.json +136 -0
- collective_capability_runtime-1.0.0/examples/minimal/seed.md +7 -0
- collective_capability_runtime-1.0.0/examples/minimal/task.json +83 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/README.md +68 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/baseline.json +25 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/ccr.config.json +21 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/mock_http_report.json +14 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/packets/candidate/packet.phase.duplicate.json +147 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/packets/checked/packet.phase.integrator.json +181 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/packets/checked/packet.phase.seed.json +163 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/pic_like_report.json +19 -0
- collective_capability_runtime-1.0.0/examples/phase_formation/threshold.json +16 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/README.md +52 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/packet_for_pic.json +128 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/pic_import_example.json +19 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/pic_v050_agent_check_report.json +23 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/pic_v050_collective_certificate_candidate.json +22 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/pic_v050_phase_plan_report.json +33 -0
- collective_capability_runtime-1.0.0/examples/pic_interop/pic_v050_provider_missing_report.json +23 -0
- collective_capability_runtime-1.0.0/pyproject.toml +109 -0
- collective_capability_runtime-1.0.0/schemas/agent-manifest.schema.json +55 -0
- collective_capability_runtime-1.0.0/schemas/asi-proxy-threshold.schema.json +78 -0
- collective_capability_runtime-1.0.0/schemas/audit-report.schema.json +63 -0
- collective_capability_runtime-1.0.0/schemas/baseline.schema.json +43 -0
- collective_capability_runtime-1.0.0/schemas/blackboard-event.schema.json +50 -0
- collective_capability_runtime-1.0.0/schemas/effective-graph.schema.json +91 -0
- collective_capability_runtime-1.0.0/schemas/packet.schema.json +1065 -0
- collective_capability_runtime-1.0.0/schemas/phase-certificate-candidate.schema.json +54 -0
- collective_capability_runtime-1.0.0/schemas/phase-observation.schema.json +58 -0
- collective_capability_runtime-1.0.0/schemas/phase-report.schema.json +34 -0
- collective_capability_runtime-1.0.0/schemas/phase-state.schema.json +46 -0
- collective_capability_runtime-1.0.0/schemas/provider.schema.json +43 -0
- collective_capability_runtime-1.0.0/schemas/residual.schema.json +85 -0
- collective_capability_runtime-1.0.0/schemas/task.schema.json +477 -0
- collective_capability_runtime-1.0.0/schemas/verifier-report.schema.json +43 -0
- collective_capability_runtime-1.0.0/src/ccr/__init__.py +8 -0
- collective_capability_runtime-1.0.0/src/ccr/__main__.py +9 -0
- collective_capability_runtime-1.0.0/src/ccr/adapters/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/adapters/base.py +38 -0
- collective_capability_runtime-1.0.0/src/ccr/adapters/pic.py +205 -0
- collective_capability_runtime-1.0.0/src/ccr/audit/__init__.py +10 -0
- collective_capability_runtime-1.0.0/src/ccr/audit/pic.py +384 -0
- collective_capability_runtime-1.0.0/src/ccr/audit/release.py +337 -0
- collective_capability_runtime-1.0.0/src/ccr/audit/repo.py +486 -0
- collective_capability_runtime-1.0.0/src/ccr/blackboard/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/blackboard/events.py +45 -0
- collective_capability_runtime-1.0.0/src/ccr/blackboard/replay.py +16 -0
- collective_capability_runtime-1.0.0/src/ccr/blackboard/store.py +16 -0
- collective_capability_runtime-1.0.0/src/ccr/cli.py +1564 -0
- collective_capability_runtime-1.0.0/src/ccr/constants.py +116 -0
- collective_capability_runtime-1.0.0/src/ccr/data/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/errors.py +34 -0
- collective_capability_runtime-1.0.0/src/ccr/ids.py +36 -0
- collective_capability_runtime-1.0.0/src/ccr/io.py +79 -0
- collective_capability_runtime-1.0.0/src/ccr/metrics/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/metrics/phase.py +8 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/distill.py +21 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/model.py +27 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/promotion.py +219 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/status.py +39 -0
- collective_capability_runtime-1.0.0/src/ccr/packets/store.py +83 -0
- collective_capability_runtime-1.0.0/src/ccr/paths.py +40 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/__init__.py +21 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/baseline.py +56 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/certify.py +70 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/eligibility.py +106 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/form.py +197 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/graph.py +194 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/observe.py +107 -0
- collective_capability_runtime-1.0.0/src/ccr/phase/threshold.py +93 -0
- collective_capability_runtime-1.0.0/src/ccr/providers/__init__.py +8 -0
- collective_capability_runtime-1.0.0/src/ccr/providers/base.py +45 -0
- collective_capability_runtime-1.0.0/src/ccr/providers/http.py +154 -0
- collective_capability_runtime-1.0.0/src/ccr/providers/pic.py +107 -0
- collective_capability_runtime-1.0.0/src/ccr/providers/registry.py +23 -0
- collective_capability_runtime-1.0.0/src/ccr/py.typed +1 -0
- collective_capability_runtime-1.0.0/src/ccr/reports/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/reports/json_report.py +42 -0
- collective_capability_runtime-1.0.0/src/ccr/reports/markdown.py +46 -0
- collective_capability_runtime-1.0.0/src/ccr/residuals/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/residuals/model.py +76 -0
- collective_capability_runtime-1.0.0/src/ccr/residuals/store.py +59 -0
- collective_capability_runtime-1.0.0/src/ccr/runtime/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/runtime/config.py +25 -0
- collective_capability_runtime-1.0.0/src/ccr/runtime/init.py +68 -0
- collective_capability_runtime-1.0.0/src/ccr/runtime/state.py +34 -0
- collective_capability_runtime-1.0.0/src/ccr/schemas/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/schemas/loader.py +88 -0
- collective_capability_runtime-1.0.0/src/ccr/schemas/validation.py +84 -0
- collective_capability_runtime-1.0.0/src/ccr/storage/__init__.py +24 -0
- collective_capability_runtime-1.0.0/src/ccr/storage/sqlite.py +305 -0
- collective_capability_runtime-1.0.0/src/ccr/tasks/__init__.py +4 -0
- collective_capability_runtime-1.0.0/src/ccr/tasks/lease.py +142 -0
- collective_capability_runtime-1.0.0/src/ccr/tasks/model.py +39 -0
- collective_capability_runtime-1.0.0/src/ccr/tasks/scheduler.py +29 -0
- collective_capability_runtime-1.0.0/src/ccr/tasks/store.py +66 -0
- collective_capability_runtime-1.0.0/src/ccr/time.py +71 -0
- collective_capability_runtime-1.0.0/tests/__init__.py +1 -0
- collective_capability_runtime-1.0.0/tests/conftest.py +34 -0
- collective_capability_runtime-1.0.0/tests/test_blackboard_events.py +21 -0
- collective_capability_runtime-1.0.0/tests/test_cli_phase_audit_v1.py +81 -0
- collective_capability_runtime-1.0.0/tests/test_cli_smoke.py +43 -0
- collective_capability_runtime-1.0.0/tests/test_packet_status.py +11 -0
- collective_capability_runtime-1.0.0/tests/test_phase_baseline_v1.py +24 -0
- collective_capability_runtime-1.0.0/tests/test_phase_engine_v1.py +64 -0
- collective_capability_runtime-1.0.0/tests/test_phase_report.py +10 -0
- collective_capability_runtime-1.0.0/tests/test_pic_compat_audit_v1.py +124 -0
- collective_capability_runtime-1.0.0/tests/test_pic_import_mapping.py +97 -0
- collective_capability_runtime-1.0.0/tests/test_promotion_rules.py +52 -0
- collective_capability_runtime-1.0.0/tests/test_provider_api_v1.py +117 -0
- collective_capability_runtime-1.0.0/tests/test_release_audit_v1.py +142 -0
- collective_capability_runtime-1.0.0/tests/test_release_readiness_v1.py +283 -0
- collective_capability_runtime-1.0.0/tests/test_residual_preservation.py +30 -0
- collective_capability_runtime-1.0.0/tests/test_runtime_init.py +13 -0
- collective_capability_runtime-1.0.0/tests/test_schema_validation.py +38 -0
- collective_capability_runtime-1.0.0/tests/test_storage_sqlite.py +26 -0
- collective_capability_runtime-1.0.0/tests/test_task_leasing.py +32 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.pytest_cache/
|
|
5
|
+
.ruff_cache/
|
|
6
|
+
.mypy_cache/
|
|
7
|
+
.coverage
|
|
8
|
+
htmlcov/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
|
|
13
|
+
# Local CCR runtime state at repository root
|
|
14
|
+
/ccr.config.json
|
|
15
|
+
/blackboard/
|
|
16
|
+
/tasks/
|
|
17
|
+
/packets/
|
|
18
|
+
/residuals/
|
|
19
|
+
/reports/
|
|
20
|
+
/ccr.sqlite
|
|
21
|
+
|
|
22
|
+
# Generated outputs when running the phase formation example
|
|
23
|
+
/examples/phase_formation/blackboard/
|
|
24
|
+
/examples/phase_formation/tasks/
|
|
25
|
+
/examples/phase_formation/residuals/
|
|
26
|
+
/examples/phase_formation/reports/providers/
|
|
27
|
+
/examples/phase_formation/phase/
|
|
28
|
+
/examples/phase_formation/ccr.sqlite*
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Agent Instructions for CCR
|
|
2
|
+
|
|
3
|
+
Optional PIC verifier route:
|
|
4
|
+
[kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
python -m pip install percolation-inversion-compiler
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Use CCR as a local, JSON-first coordination runtime for capability packets,
|
|
11
|
+
tasks, residuals, provider reports, and protocol-relative phase formation.
|
|
12
|
+
|
|
13
|
+
## Safe First Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ccr agent explain --json
|
|
17
|
+
ccr audit repo --json
|
|
18
|
+
ccr audit pic --pic-root <PIC_ROOT> --json
|
|
19
|
+
ccr phase report --json
|
|
20
|
+
ccr task next --role <role> --json
|
|
21
|
+
ccr provider list --json
|
|
22
|
+
ccr provider health --provider pic --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Phase Workflow
|
|
26
|
+
|
|
27
|
+
Agents advance phase formation through explicit state transitions:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ccr task next --role generator --json
|
|
31
|
+
ccr task lease <task_id> --ttl 30m --agent <agent_id> --json
|
|
32
|
+
ccr packet submit --file packet.json --json
|
|
33
|
+
ccr verify --provider pic --packet <packet_id> --profile development --json
|
|
34
|
+
ccr integrate --report reports/pic/<report>.json --json
|
|
35
|
+
ccr phase form --profile development --json
|
|
36
|
+
ccr phase certify --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`phase form` builds the effective graph, phase observation, threshold status,
|
|
40
|
+
certificate candidate, and deterministic repair tasks for failed components.
|
|
41
|
+
The certificate candidate is not real ASI proof and remains `settled=false`.
|
|
42
|
+
|
|
43
|
+
## First-time agent guide
|
|
44
|
+
|
|
45
|
+
Purpose: operate CCR as a local coordination protocol for packet work, verifier
|
|
46
|
+
reports, residual preservation, and phase diagnostics.
|
|
47
|
+
|
|
48
|
+
First commands:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
ccr agent explain --json
|
|
52
|
+
ccr audit repo --json
|
|
53
|
+
ccr provider health --provider pic --json
|
|
54
|
+
ccr task next --role generator --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Safe boundary: inspect before mutating; treat `verify` without `--execute`,
|
|
58
|
+
provider `plan`, audit, report, graph, observe, and threshold commands as the
|
|
59
|
+
safe starting surface.
|
|
60
|
+
|
|
61
|
+
Expected outputs: read `ok`, `status`, `packet_id`, `task_id`, `residual_ready`,
|
|
62
|
+
`residuals`, `task_hints`, and `settled` before deciding the next action.
|
|
63
|
+
|
|
64
|
+
Failure/residual handling: never suppress blockers; convert failures into
|
|
65
|
+
residuals or task work and keep candidate-only reasons visible.
|
|
66
|
+
|
|
67
|
+
Provider import: import provider reports only as evidence and task hints; do
|
|
68
|
+
not execute imported `safe_commands`.
|
|
69
|
+
|
|
70
|
+
Phase formation cycle: lease a task, submit or repair a packet, plan or import
|
|
71
|
+
verification, run `ccr phase form --profile development --json`, then work the
|
|
72
|
+
next generated blocker.
|
|
73
|
+
|
|
74
|
+
What not to claim: do not claim real ASI, model self-rewrite, model-weight
|
|
75
|
+
updates, hidden execution, authority grants, or settlement from PIC/provider
|
|
76
|
+
acceptance alone.
|
|
77
|
+
|
|
78
|
+
## Rules for Agents
|
|
79
|
+
|
|
80
|
+
- Do not run git operations unless the operator explicitly asks.
|
|
81
|
+
- Do not execute PIC commands automatically.
|
|
82
|
+
- Do not execute HTTP provider calls unless the operator explicitly supplies config and `--execute`.
|
|
83
|
+
- Treat safe commands as task hints, not authority.
|
|
84
|
+
- Preserve every residual, candidate-only reason, settled blocker, baseline mismatch, and authority gap.
|
|
85
|
+
- Do not claim real ASI detection, real ASI creation, model self-rewrite, or model weight updates.
|
|
86
|
+
- Prefer dry-run planning. Use `--execute` only when the operator explicitly requests that specific CCR command.
|
|
87
|
+
- `settled=false` is expected diagnostic state.
|
|
88
|
+
- `ccr task next` only inspects. Use `ccr task lease` before working a task.
|
|
89
|
+
- Mutating CCR commands write local JSON and append `blackboard/events.jsonl`.
|
|
90
|
+
|
|
91
|
+
## Role Boundaries
|
|
92
|
+
|
|
93
|
+
Role boundaries are declared in `agent-manifest.json`.
|
|
94
|
+
|
|
95
|
+
- Generators create candidate packets.
|
|
96
|
+
- Skeptics create residuals and identify overclaims.
|
|
97
|
+
- Verifiers create verifier reports.
|
|
98
|
+
- Integrators import checked or provisional state.
|
|
99
|
+
- Schedulers operate the task queue.
|
|
100
|
+
- Benchmark runners create resource-matched baseline observations.
|
|
101
|
+
|
|
102
|
+
No role may silently settle unresolved residuals. No role may treat provider
|
|
103
|
+
output, PIC acceptance, safe commands, or execution availability as authority.
|
|
104
|
+
|
|
105
|
+
## Provider Boundary
|
|
106
|
+
|
|
107
|
+
Use provider commands explicitly:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
ccr provider health --provider pic --json
|
|
111
|
+
ccr provider plan --provider pic --action verify_packet --packet <packet_id> --json
|
|
112
|
+
ccr provider import --provider http --report report.json --json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
HTTP provider execution is allowed only when the operator supplies an explicit
|
|
116
|
+
config file and `--execute`. Failure produces residual-ready JSON and must be
|
|
117
|
+
preserved.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# CCR v1 Repository Audit
|
|
2
|
+
|
|
3
|
+
Related optional PIC project:
|
|
4
|
+
[kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
python -m pip install percolation-inversion-compiler
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Date: 2026-06-30
|
|
11
|
+
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
This audit covers the repository-level v1 readiness checks exposed by:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv run ccr audit repo --json
|
|
18
|
+
uv run ccr audit pic --pic-root <PIC_ROOT> --json
|
|
19
|
+
uv run ccr provider health --provider pic --json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`<PIC_ROOT>` is a placeholder for a local PIC source checkout, such as
|
|
23
|
+
`../percolation-inversion-compiler`. Public files must not contain
|
|
24
|
+
user-specific local paths.
|
|
25
|
+
|
|
26
|
+
The audit checks README positioning, docs/security/agent guidance, required JSON
|
|
27
|
+
schemas, CLI surface, CI presence, SPDX headers, provider safety language, and
|
|
28
|
+
non-claim preservation. It also checks PyPI Trusted Publishing readiness for
|
|
29
|
+
`.github/workflows/workflow.yml` and prevents generated phase runtime artifacts
|
|
30
|
+
from being shipped as source examples.
|
|
31
|
+
|
|
32
|
+
PIC compatibility audit checks the optional PIC source root, installed package
|
|
33
|
+
and CLI availability, expected v0.5.0 commands, report fields, provider mapping,
|
|
34
|
+
safe-command handling, and the rule that PIC output never settles CCR by itself.
|
|
35
|
+
|
|
36
|
+
Public release audit checks source files and built wheel/sdist archives for
|
|
37
|
+
local path leakage, generated runtime artifacts, caches, build state, private-key
|
|
38
|
+
blocks, and assignment-like credentials:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv build
|
|
42
|
+
uv run ccr audit release --dist dist --json
|
|
43
|
+
uvx twine check dist/*
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## First-time agent guide
|
|
47
|
+
|
|
48
|
+
Purpose: run repository and PIC audits before trusting a local CCR checkout for
|
|
49
|
+
agent work or release publication.
|
|
50
|
+
|
|
51
|
+
First commands:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
ccr audit repo --json
|
|
55
|
+
ccr audit pic --pic-root <PIC_ROOT> --json
|
|
56
|
+
ccr provider health --provider pic --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Safe boundary: audits inspect files, docs, schemas, workflows, provider routes,
|
|
60
|
+
and compatibility markers; they do not execute provider safe commands.
|
|
61
|
+
|
|
62
|
+
Expected outputs: audit reports contain `ok`, finding counts, blocking flags,
|
|
63
|
+
finding ids, and `residual_ready` objects for every issue.
|
|
64
|
+
|
|
65
|
+
Failure/residual handling: a failed audit is actionable protocol state; preserve
|
|
66
|
+
the finding and repair it before release or settlement promotion.
|
|
67
|
+
|
|
68
|
+
Provider import: audit validates the import boundary but does not import or
|
|
69
|
+
execute provider reports itself.
|
|
70
|
+
|
|
71
|
+
Phase formation cycle: repository audit checks that phase formation examples,
|
|
72
|
+
schemas, docs, CI, and non-claims remain aligned before agents rely on them.
|
|
73
|
+
|
|
74
|
+
What not to claim: a passing audit means the release gates are satisfied; it is
|
|
75
|
+
not proof of real ASI, external authority, or provider execution.
|
|
76
|
+
|
|
77
|
+
## Current Findings
|
|
78
|
+
|
|
79
|
+
Blocking findings: none after the v1 implementation pass.
|
|
80
|
+
|
|
81
|
+
Non-blocking findings: none expected after SPDX header cleanup.
|
|
82
|
+
|
|
83
|
+
Residual policy: any future audit finding is emitted with a `residual_ready`
|
|
84
|
+
object so agents can preserve the issue without corrupting runtime state.
|
|
85
|
+
|
|
86
|
+
## Acceptance Commands
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
uv sync --all-extras
|
|
90
|
+
uv run ruff check .
|
|
91
|
+
uv run pytest
|
|
92
|
+
uv run ccr audit repo --json
|
|
93
|
+
uv run ccr audit pic --pic-root <PIC_ROOT> --json
|
|
94
|
+
uv run ccr --root examples/phase_formation phase form --profile development --json
|
|
95
|
+
uv build
|
|
96
|
+
uv run ccr audit release --dist dist --json
|
|
97
|
+
uvx twine check dist/*
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Non-Claims Preserved
|
|
101
|
+
|
|
102
|
+
CCR does not prove real ASI, create real ASI, self-modify models, update model
|
|
103
|
+
weights, grant execution authority, bypass safety, or convert PIC/provider
|
|
104
|
+
output into settled capability by itself.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 - 2026-06-30
|
|
4
|
+
|
|
5
|
+
- Added SQLite indexing while preserving JSON artifacts as source records.
|
|
6
|
+
- Added v1 phase formation engine: effective graph, observation, threshold,
|
|
7
|
+
baseline comparison, formation cycle, and certificate candidate generation.
|
|
8
|
+
- Added provider API with PIC and HTTP providers.
|
|
9
|
+
- Added repository audit command and v1 phase/provider/audit schemas.
|
|
10
|
+
- Added phase formation examples and v1 documentation.
|
|
11
|
+
- Added PIC route documentation for
|
|
12
|
+
[kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
|
|
13
|
+
and `python -m pip install percolation-inversion-compiler`.
|
|
14
|
+
|
|
15
|
+
## 0.1.0 - 2026-06-30
|
|
16
|
+
|
|
17
|
+
- Added initial CCR Python package and `ccr` CLI.
|
|
18
|
+
- Added local runtime initialization, task queue, task leasing, packet submission,
|
|
19
|
+
packet promotion, residual ledger, blackboard events, phase reports, and PIC
|
|
20
|
+
dry-run/execute adapter.
|
|
21
|
+
- Added normative packet and task schema usage plus additional runtime schemas.
|
|
22
|
+
- Added examples, tests, Apache-2.0 licensing, and GitHub Actions CI.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
CCR uses a neutral technical collaboration standard.
|
|
4
|
+
|
|
5
|
+
Participants should:
|
|
6
|
+
|
|
7
|
+
- focus on evidence, reproducibility, and concrete behavior
|
|
8
|
+
- separate claims from verification status
|
|
9
|
+
- preserve uncertainty and residuals rather than hiding them
|
|
10
|
+
- avoid harassment, discrimination, and personal attacks
|
|
11
|
+
- report security-sensitive issues through appropriate private channels when available
|
|
12
|
+
|
|
13
|
+
Maintainers may remove contributions or comments that undermine a safe and
|
|
14
|
+
productive technical environment.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Related optional PIC project:
|
|
4
|
+
[kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
python -m pip install percolation-inversion-compiler
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
python -m pip install collective-capability-runtime
|
|
14
|
+
uv sync
|
|
15
|
+
uv run ccr agent explain --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Tests
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv run ruff check .
|
|
22
|
+
uv run pytest
|
|
23
|
+
uv run ccr audit repo --json
|
|
24
|
+
uv build
|
|
25
|
+
uvx twine check dist/*
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Coding Style
|
|
29
|
+
|
|
30
|
+
- Use the `src/` layout.
|
|
31
|
+
- Keep JSON outputs stable and machine-readable.
|
|
32
|
+
- Keep side effects local and explicit.
|
|
33
|
+
- Preserve residuals instead of deleting uncertainty.
|
|
34
|
+
- Add SPDX headers to Python source files.
|
|
35
|
+
- Prefer standard-library implementations unless a dependency removes real risk.
|
|
36
|
+
|
|
37
|
+
## Schema Changes
|
|
38
|
+
|
|
39
|
+
Schema changes must update:
|
|
40
|
+
|
|
41
|
+
- `schemas/*.schema.json`
|
|
42
|
+
- examples
|
|
43
|
+
- tests
|
|
44
|
+
- `SPEC.md`
|
|
45
|
+
- `CHANGELOG.md`
|
|
46
|
+
|
|
47
|
+
Do not perform git operations unless the operator explicitly asks.
|
|
48
|
+
|
|
49
|
+
## Release Preparation
|
|
50
|
+
|
|
51
|
+
CCR publishes as `collective-capability-runtime` through GitHub Trusted
|
|
52
|
+
Publishing. The release workflow is `.github/workflows/workflow.yml` and must
|
|
53
|
+
not require PyPI token, username, or password secrets.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# CCR Formal Model v1
|
|
2
|
+
|
|
3
|
+
Related PIC runtime: [kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install percolation-inversion-compiler
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
PIC is an optional verifier relation. It is not a CCR settlement oracle.
|
|
10
|
+
|
|
11
|
+
CCR is a finite transition system over JSON artifacts plus a SQLite index.
|
|
12
|
+
|
|
13
|
+
## First-time agent guide
|
|
14
|
+
|
|
15
|
+
Purpose: use the formal model to understand why CCR separates admissible
|
|
16
|
+
packet work, residual debt, execution availability, provider evidence, and
|
|
17
|
+
phase-candidate status.
|
|
18
|
+
|
|
19
|
+
First commands:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
ccr agent explain --json
|
|
23
|
+
ccr phase graph --json
|
|
24
|
+
ccr phase observe --json
|
|
25
|
+
ccr phase form --profile development --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Safe boundary: every formal relation is protocol-relative and finite; execution
|
|
29
|
+
availability is a witness relation, not an execution trace.
|
|
30
|
+
|
|
31
|
+
Expected outputs: graph, observation, threshold, comparison, and certificate
|
|
32
|
+
candidate artifacts expose finite metrics, blockers, reasons, and `settled=false`.
|
|
33
|
+
|
|
34
|
+
Failure/residual handling: failed predicates become residual debt, failed
|
|
35
|
+
components, abstention reasons, or repair tasks rather than hidden state.
|
|
36
|
+
|
|
37
|
+
Provider import: provider reports enter the model as external evidence
|
|
38
|
+
relations and residual sources, not as direct settlement functions.
|
|
39
|
+
|
|
40
|
+
Phase formation cycle: repeated packet verification, residual reduction,
|
|
41
|
+
effective-edge construction, and resource-matched comparison can improve a
|
|
42
|
+
protocol-relative candidate phase.
|
|
43
|
+
|
|
44
|
+
What not to claim: the model does not assert metaphysical ASI, oracle truth,
|
|
45
|
+
physical outcome truth, autonomous authority, self-rewrite, or model-weight
|
|
46
|
+
change.
|
|
47
|
+
|
|
48
|
+
## Packet
|
|
49
|
+
|
|
50
|
+
A packet is:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
P = (id, status, claims, artifacts, scope, provenance, verifiers,
|
|
54
|
+
verifier_reports, residuals, risk, reuse, lineage, execution_availability,
|
|
55
|
+
pic_interop)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`status(P)` is an element of the packet lattice in `SPEC.md`.
|
|
59
|
+
|
|
60
|
+
Positive phase contribution is:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Positive(P) =
|
|
64
|
+
status(P) in {checked, settled}
|
|
65
|
+
AND no_open_blocking_residual(P)
|
|
66
|
+
AND authority_valid(P)
|
|
67
|
+
AND liquidity_lower_bound(P) >= 0
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Candidate-only packet volume is observed but excluded from `Positive`.
|
|
71
|
+
|
|
72
|
+
## Task
|
|
73
|
+
|
|
74
|
+
A task is:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
T = (id, status, role, priority, objective, inputs, expected_outputs,
|
|
78
|
+
constraints, lease, verifier_plan, residual_policy, pic_interop)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The scheduler returns the open task with maximal `(priority, -created_at, id)`
|
|
82
|
+
for the requested role. Leasing is a separate transition.
|
|
83
|
+
|
|
84
|
+
## Residual Ledger
|
|
85
|
+
|
|
86
|
+
A residual is:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
R = (id, status, severity, kind, description, blocking, object_ref, source)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Residual preservation invariant:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
failed_validation OR failed_promotion OR candidate_only_reason
|
|
96
|
+
OR settled_blocker OR authority_gap OR provider_failure OR baseline_mismatch
|
|
97
|
+
=> residual OR residual_ready_object
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Effective Graph
|
|
101
|
+
|
|
102
|
+
The effective graph is:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
G_eff = (V, E, eligibility, contribution)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
where `V` contains local packets and `E` contains dependency or semantic edges.
|
|
109
|
+
An edge contributes positively only when all incident packet nodes are positive
|
|
110
|
+
and edge evidence is checked or settled. Raw/candidate/rejected/quarantined mass
|
|
111
|
+
does not increase positive graph metrics.
|
|
112
|
+
|
|
113
|
+
## Execution Availability
|
|
114
|
+
|
|
115
|
+
Execution availability is a witness relation:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
ExAv(P, gate_set, side_effect_policy, rollback)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
It is not an execution trace:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
ExAv(P, ...) does not imply Executed(P)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
CCR phase observations set `executed_path_count = 0` unless an explicit future
|
|
128
|
+
schema introduces a separate execution evidence type. v1 does not introduce that
|
|
129
|
+
type.
|
|
130
|
+
|
|
131
|
+
## Observation
|
|
132
|
+
|
|
133
|
+
A phase observation is:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
O = metrics(G_eff, residual_ledger, queue_state)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
with components:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
accepted_packet_count
|
|
143
|
+
effective_edge_count
|
|
144
|
+
execution_available_path_density
|
|
145
|
+
autocatalytic_closure_score
|
|
146
|
+
verification_throughput
|
|
147
|
+
residual_debt
|
|
148
|
+
false_liquidity_load
|
|
149
|
+
salience_obstruction_load
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Threshold Predicate
|
|
153
|
+
|
|
154
|
+
An ASI-proxy threshold is a protocol-relative predicate:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
Theta(O) -> {accepted, abstain, rejected}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`Theta(O)=accepted` means the finite CCR protocol threshold is satisfied. It
|
|
161
|
+
does not assert real ASI, oracle truth, physical outcome truth, or model-weight
|
|
162
|
+
change.
|
|
163
|
+
|
|
164
|
+
## Baseline Predicate
|
|
165
|
+
|
|
166
|
+
Baseline comparison is:
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
B = (resource_envelope, comparison_class, metrics, validity_domain)
|
|
170
|
+
Compare(B, O) -> (resource_matched, deltas, residual_ready)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If `resource_envelope(B) != resource_envelope(O)`, comparison emits a blocking
|
|
174
|
+
residual-ready object. The mismatch is preserved rather than discarded.
|
|
175
|
+
|
|
176
|
+
## Certificate Candidate
|
|
177
|
+
|
|
178
|
+
A collective phase certificate candidate is:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
C = (G_eff, O, Theta(O), residual_obligations, baseline_obligations)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
`accepted(C)` requires threshold acceptance and no blocking residual obligations.
|
|
185
|
+
`settled(C)` is always false in v1. Promotion to a settled phase claim would
|
|
186
|
+
require a future verifier-controlled settlement gate beyond CCR's candidate.
|
|
187
|
+
|
|
188
|
+
## Provider Relation
|
|
189
|
+
|
|
190
|
+
A provider relation is:
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
Provider(plan | execute | normalize)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Planning is non-executing. Execution requires explicit operator authority. A
|
|
197
|
+
provider report is evidence input, not settlement authority.
|
|
198
|
+
|
|
199
|
+
## Promotion Predicate
|
|
200
|
+
|
|
201
|
+
Candidate to checked:
|
|
202
|
+
|
|
203
|
+
```text
|
|
204
|
+
schema_valid(P)
|
|
205
|
+
AND at_least_one_required_verifier_accepts(P)
|
|
206
|
+
AND residuals_preserved(P)
|
|
207
|
+
AND no_authority_bypass(P)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Checked to settled:
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
checked(P)
|
|
214
|
+
AND no_blocking_residuals(P)
|
|
215
|
+
AND settlement_target_satisfied(P)
|
|
216
|
+
AND lineage_closed(P)
|
|
217
|
+
AND scope_declared(P)
|
|
218
|
+
AND risk_in_envelope(P)
|
|
219
|
+
AND integration_policy_passed(P)
|
|
220
|
+
AND phase_baseline_residual_gates_pass_if_phase_claim(P)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
For v1, residual waivers are not implemented. Settlement fails closed.
|
|
224
|
+
|
|
225
|
+
## Non-Claims
|
|
226
|
+
|
|
227
|
+
CCR does not detect real ASI, create real ASI, update model weights, self-modify
|
|
228
|
+
models, grant execution authority, bypass safety, or convert provider output
|
|
229
|
+
into settled capability by itself.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
Related optional PIC project:
|
|
4
|
+
[kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
python -m pip install percolation-inversion-compiler
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
PIC integration is optional and cannot bypass CCR release, schema, residual, or
|
|
11
|
+
settlement policy.
|
|
12
|
+
|
|
13
|
+
## Release Policy
|
|
14
|
+
|
|
15
|
+
CCR follows semantic versioning from v1.0. Stable v1 interfaces are CLI commands
|
|
16
|
+
and JSON schemas. The Python API is semi-stable and may evolve with migration
|
|
17
|
+
notes.
|
|
18
|
+
|
|
19
|
+
PyPI releases use the project name `collective-capability-runtime` and GitHub
|
|
20
|
+
Trusted Publishing from `kadubon/collective-capability-runtime`. Publication is
|
|
21
|
+
allowed only from the release workflow `.github/workflows/workflow.yml`.
|
|
22
|
+
|
|
23
|
+
## Compatibility Policy
|
|
24
|
+
|
|
25
|
+
Local schemas are authoritative. Packaged schemas are fallbacks for installed
|
|
26
|
+
usage. A command must not silently accept an incompatible unknown schema version.
|
|
27
|
+
|
|
28
|
+
## Schema Versioning
|
|
29
|
+
|
|
30
|
+
Schema versions use the form:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
ccr.<object>.v<major>[.<minor>]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Breaking schema changes require:
|
|
37
|
+
|
|
38
|
+
- changelog entry
|
|
39
|
+
- updated examples
|
|
40
|
+
- updated tests
|
|
41
|
+
- documented migration route
|
|
42
|
+
|
|
43
|
+
New phase, baseline, provider, or audit schemas must preserve non-claim fields
|
|
44
|
+
where applicable: `protocol_relative_only=true`, `proves_real_asi=false`, and
|
|
45
|
+
`settled=false`.
|
|
46
|
+
|
|
47
|
+
## Side-Effect Changes
|
|
48
|
+
|
|
49
|
+
Any change that adds external side effects, network behavior, command execution,
|
|
50
|
+
or broader filesystem mutation requires maintainer review and an explicit
|
|
51
|
+
documentation update.
|
|
52
|
+
|
|
53
|
+
Provider additions must default to dry-run planning, expose health and
|
|
54
|
+
capabilities, require explicit execution authority, and preserve failure
|
|
55
|
+
residuals.
|
|
56
|
+
|
|
57
|
+
Publish workflow changes must keep `id-token: write`, avoid PyPI token secrets,
|
|
58
|
+
and run build, lint, tests, audit, and distribution metadata checks before
|
|
59
|
+
publishing.
|