Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Control-plane review paths. These assignments request review on pull requests;
# direct default-branch deposits remain governed by AI_ENTRYPOINT.md.
/AI_ENTRYPOINT.md @Wonderforge-Lab
/lobby/ @Wonderforge-Lab
/docs/ @Wonderforge-Lab
/.github/ @Wonderforge-Lab
/registry/schemas/ @Wonderforge-Lab
/scripts/ @Wonderforge-Lab
/templates/ @Wonderforge-Lab
/bridge_config.json @Wonderforge-Lab
/config/ @Wonderforge-Lab
/registry/tags/accepted/ @Wonderforge-Lab
8 changes: 8 additions & 0 deletions AI_ENTRYPOINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ Do not create task branches for ordinary deposits.

Use branch + PR for procedure, policy, code, structure, cleanup, risky/bulky imports, many existing-file edits, or explicit review.

## Direct-deposit boundary

Direct routine deposits are content-plane work only: their artifacts and canonical records may be written under `datadrops/`, `responses/`, `messages/`, `notifications/`, `registry/packets/`, `registry/responses/`, `registry/messages/`, `registry/notifications/`, `registry/visits/`, `registry/visitors/`, and `registry/tags/proposed/`.

Use branch + PR for any change to the control plane or its enforcement, including `AI_ENTRYPOINT.md`, `lobby/`, `docs/`, `.github/`, `registry/schemas/`, `scripts/`, `templates/`, `bridge_config.json`, `config/`, generated-view machinery, and `registry/tags/accepted/`.

Post-push validation detects direct-write violations after they land; it cannot revoke a commit. Do not make CI auto-revert changes. A write credential is therefore part of the trust perimeter.

For ordinary deposits, use `lobby/ROUTINE_DEPOSIT_QUICKSTART.md`.

## Reading Order
Expand Down
2 changes: 1 addition & 1 deletion docs/registry/FIELD_DECISION_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ This matrix records the approved v1 decisions. “Artifact” means Markdown pac
- `created_at` is the canonical RFC 3339 creation timestamp.
- A CSV `date` is derived, not a competing canonical field.
- Applicable packet, response, and message records carry tags as defined by the contract.
- Packets and responses carry provenance: creator, depositor, origin, source references, derivation, and coverage as applicable.
- Packets and responses carry provenance: creator, depositor, origin, source references, an uncertainty note when origin is unknown, derivation, and coverage as applicable.
- Notifications inherit provenance through their required message link; visits do not carry provenance by default.
- Legacy field names are migration inputs only.
6 changes: 3 additions & 3 deletions docs/registry/REGISTRY_CONTRACT_V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ Tag slugs are lowercase hyphenated slugs. IDs are validated as complete values;

## Tags, provenance, and derivatives

Packets and responses carry `created_by`, `deposited_by`, `content_origin`, `source_refs`, `derivative_of`, and `provenance_coverage` as applicable.
Packets and responses carry `created_by`, `deposited_by`, `content_origin`, `source_refs`, `source_note`, `derivative_of`, and `provenance_coverage` as applicable.

`content_origin` is a closed enum: `operator_authored`, `third_party`, `web`, `model_generated`, `mixed`, or `unknown`.

Third-party, web, and mixed material requires source references. Derivative/summarising material requires upstream references and coverage. Routine routing summaries require record-level provenance; evidence or decision synthesis requires claim-level support where practical and must preserve uncertainty.
Third-party, web, and mixed material requires source references. An `unknown` origin must include a non-empty `source_note` explaining the uncertainty; it must not be used as a substitute for available source references. Derivative/summarising material requires upstream references and coverage. Routine routing summaries require record-level provenance; evidence or decision synthesis requires claim-level support where practical and must preserve uncertainty.

AI/session-created tags begin proposed and cannot become accepted in the same change set. Operator-supplied tags may be accepted directly with `acceptance_basis: operator_supplied`. Promotion of a proposal uses `acceptance_basis: operator_approved_promotion`. Pull-request validation rejects a same-change-set promotion; push validation detects the equivalent direct-write violation for remediation, but cannot undo a commit already accepted by the remote.
AI/session-created tags begin proposed and cannot become accepted in the same change set. Operator-supplied tags may enter `accepted` directly with `acceptance_basis: operator_supplied`; this is a control-plane change and uses branch + PR. Promotion of a proposal uses `acceptance_basis: operator_approved_promotion` and also uses branch + PR. Pull-request validation rejects a same-change-set promotion; push validation detects the equivalent direct-write violation for remediation, but cannot undo a commit already accepted by the remote.

## Compatibility

Expand Down
8 changes: 4 additions & 4 deletions docs/registry/SCHEMA_AND_VALIDATOR_DESIGN_V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ IDs are validated as complete date-led values, then checked against filename and

## Conditional provenance

Packets and responses require `created_by`, `deposited_by`, `content_origin`, `source_refs`, `derivative_of`, and `provenance_coverage` according to the contract.
Packets and responses require `created_by`, `deposited_by`, `content_origin`, `source_refs`, `source_note`, `derivative_of`, and `provenance_coverage` according to the contract.

For `third_party`, `web`, and `mixed`, `source_refs` must be non-empty. For a derivative/summarising artifact, `derivative_of` and coverage must be non-empty. The schema checks field presence/shape; the validator resolves `derivative_of` entries to packet or response records in the validation set. Visitor identifiers remain routing handles and do not require a corresponding visitor-registration record.
For `third_party`, `web`, and `mixed`, `source_refs` must be non-empty. For `unknown`, `source_note` must state why origin cannot be determined. For a derivative/summarising artifact, `derivative_of` and coverage must be non-empty. The schema checks field presence/shape; the validator resolves `derivative_of` entries to packet or response records in the validation set. Visitor identifiers remain routing handles and do not require a corresponding visitor-registration record.

Messages may carry provenance when relaying source-bearing content. Notifications inherit through their required `message_id`. Visits do not require provenance.

Expand All @@ -47,10 +47,10 @@ Messages may carry provenance when relaying source-bearing content. Notification
2. Validate JSON Schema.
3. Assert ID equals filename stem.
4. Assert identifier-date/`created_at` agreement and, where a canonical registry record is filed under a four-digit year directory, year-directory agreement.
5. Assert path safety, existence and artifact/registry bucket agreement.
5. Assert path safety, existence, record-type artifact-prefix and artifact/registry bucket agreement.
6. Assert uniqueness of IDs by namespace.
7. Resolve packet, response, message, notification, tag and derivative references; visitor handles remain intentionally unregistered-capable.
8. Check tag status/path agreement and proposed/accepted/deprecated lifecycle rules.
8. Check tag status/direct-child path agreement and proposed/accepted/deprecated lifecycle rules.
9. Compare a PR base/head when available to reject illegal state transitions, including AI-proposed tags accepted in the same change set. Push validation detects the same condition after a direct write; repository review rules are required if prevention is required before acceptance.
10. Validate examples as isolated fixtures.
11. Check canonical Markdown links.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"deposited_by": "example-operator",
"content_origin": "operator_authored",
"source_refs": [],
"source_note": "",
"derivative_of": [],
"provenance_coverage": "record_level",
"source_session": "assistant-session-a",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"deposited_by": "example-operator",
"content_origin": "model_generated",
"source_refs": [],
"source_note": "",
"derivative_of": [
"20260602-assistant-session-a-example-topic"
],
Expand Down
2 changes: 1 addition & 1 deletion registry/packet_registry.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
packet_id,date,created_at,created_by,deposited_by,content_origin,source_session,target_session,topic,status,path,response_expected,response_packet_id,tags,notes
packet_id,date,created_at,created_by,deposited_by,content_origin,source_note,source_session,target_session,topic,status,path,response_expected,response_packet_id,tags,notes
2 changes: 1 addition & 1 deletion registry/response_registry.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
response_id,date,created_at,created_by,deposited_by,content_origin,responding_session,source_packet_id,status,path,accepted_by,decision_at,tags,notes
response_id,date,created_at,created_by,deposited_by,content_origin,source_note,responding_session,source_packet_id,status,path,accepted_by,decision_at,tags,notes
2 changes: 1 addition & 1 deletion registry/schemas/packet.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"packet.schema.json","type":"object","additionalProperties":false,"required":["record_type","schema_version","packet_id","created_at","created_by","deposited_by","content_origin","source_refs","derivative_of","provenance_coverage","source_session","target_session","topic","status","path","response_expected","response_packet_id","tags","notes"],"properties":{"record_type":{"const":"packet"},"schema_version":{"$ref":"common.schema.json#/$defs/schema_version"},"packet_id":{"$ref":"common.schema.json#/$defs/artifact_id"},"created_at":{"$ref":"common.schema.json#/$defs/timestamp"},"created_by":{"type":"string","minLength":1},"deposited_by":{"type":"string","minLength":1},"content_origin":{"$ref":"common.schema.json#/$defs/origin"},"source_refs":{"type":"array","items":{"type":"string","minLength":1}},"derivative_of":{"type":"array","items":{"type":"string","minLength":1}},"provenance_coverage":{"$ref":"common.schema.json#/$defs/coverage"},"source_session":{"type":"string","minLength":1},"target_session":{"type":"string","minLength":1},"topic":{"$ref":"common.schema.json#/$defs/slug"},"status":{"enum":["new","in_review","answered","superseded","archived"]},"path":{"$ref":"common.schema.json#/$defs/safe_path"},"response_expected":{"type":"boolean"},"response_packet_id":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"common.schema.json#/$defs/slug"},"uniqueItems":true},"notes":{"type":"string"}},"allOf":[{"if":{"properties":{"content_origin":{"enum":["third_party","web","mixed"]}}},"then":{"properties":{"source_refs":{"minItems":1}}}},{"if":{"properties":{"content_origin":{"const":"model_generated"}}},"then":{"properties":{"derivative_of":{"minItems":1}}}}]}
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"packet.schema.json","type":"object","additionalProperties":false,"required":["record_type","schema_version","packet_id","created_at","created_by","deposited_by","content_origin","source_refs","source_note","derivative_of","provenance_coverage","source_session","target_session","topic","status","path","response_expected","response_packet_id","tags","notes"],"properties":{"record_type":{"const":"packet"},"schema_version":{"$ref":"common.schema.json#/$defs/schema_version"},"packet_id":{"$ref":"common.schema.json#/$defs/artifact_id"},"created_at":{"$ref":"common.schema.json#/$defs/timestamp"},"created_by":{"type":"string","minLength":1},"deposited_by":{"type":"string","minLength":1},"content_origin":{"$ref":"common.schema.json#/$defs/origin"},"source_refs":{"type":"array","items":{"type":"string","minLength":1}},"source_note":{"type":"string"},"derivative_of":{"type":"array","items":{"type":"string","minLength":1}},"provenance_coverage":{"$ref":"common.schema.json#/$defs/coverage"},"source_session":{"type":"string","minLength":1},"target_session":{"type":"string","minLength":1},"topic":{"$ref":"common.schema.json#/$defs/slug"},"status":{"enum":["new","in_review","answered","superseded","archived"]},"path":{"$ref":"common.schema.json#/$defs/safe_path"},"response_expected":{"type":"boolean"},"response_packet_id":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"common.schema.json#/$defs/slug"},"uniqueItems":true},"notes":{"type":"string"}},"allOf":[{"if":{"properties":{"content_origin":{"enum":["third_party","web","mixed"]}}},"then":{"properties":{"source_refs":{"minItems":1}}}},{"if":{"properties":{"content_origin":{"const":"unknown"}}},"then":{"properties":{"source_note":{"minLength":1}}}},{"if":{"properties":{"content_origin":{"const":"model_generated"}}},"then":{"properties":{"derivative_of":{"minItems":1}}}}]}
2 changes: 1 addition & 1 deletion registry/schemas/response.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"response.schema.json","type":"object","additionalProperties":false,"required":["record_type","schema_version","response_id","created_at","created_by","deposited_by","content_origin","source_refs","derivative_of","provenance_coverage","responding_session","source_packet_id","status","path","accepted_by","decision_at","tags","notes"],"properties":{"record_type":{"const":"response"},"schema_version":{"$ref":"common.schema.json#/$defs/schema_version"},"response_id":{"$ref":"common.schema.json#/$defs/artifact_id"},"created_at":{"$ref":"common.schema.json#/$defs/timestamp"},"created_by":{"type":"string","minLength":1},"deposited_by":{"type":"string","minLength":1},"content_origin":{"$ref":"common.schema.json#/$defs/origin"},"source_refs":{"type":"array","items":{"type":"string","minLength":1}},"derivative_of":{"type":"array","items":{"type":"string","minLength":1}},"provenance_coverage":{"$ref":"common.schema.json#/$defs/coverage"},"responding_session":{"type":"string","minLength":1},"source_packet_id":{"type":"string","minLength":1},"status":{"enum":["pending_review","accepted","rejected","archived"]},"path":{"$ref":"common.schema.json#/$defs/safe_path"},"accepted_by":{"type":["string","null"]},"decision_at":{"type":["string","null"],"format":"date-time"},"tags":{"type":"array","items":{"$ref":"common.schema.json#/$defs/slug"},"uniqueItems":true},"notes":{"type":"string"}},"allOf":[{"if":{"properties":{"content_origin":{"enum":["third_party","web","mixed"]}}},"then":{"properties":{"source_refs":{"minItems":1}}}},{"if":{"properties":{"content_origin":{"const":"model_generated"}}},"then":{"properties":{"derivative_of":{"minItems":1}}}}]}
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"response.schema.json","type":"object","additionalProperties":false,"required":["record_type","schema_version","response_id","created_at","created_by","deposited_by","content_origin","source_refs","source_note","derivative_of","provenance_coverage","responding_session","source_packet_id","status","path","accepted_by","decision_at","tags","notes"],"properties":{"record_type":{"const":"response"},"schema_version":{"$ref":"common.schema.json#/$defs/schema_version"},"response_id":{"$ref":"common.schema.json#/$defs/artifact_id"},"created_at":{"$ref":"common.schema.json#/$defs/timestamp"},"created_by":{"type":"string","minLength":1},"deposited_by":{"type":"string","minLength":1},"content_origin":{"$ref":"common.schema.json#/$defs/origin"},"source_refs":{"type":"array","items":{"type":"string","minLength":1}},"source_note":{"type":"string"},"derivative_of":{"type":"array","items":{"type":"string","minLength":1}},"provenance_coverage":{"$ref":"common.schema.json#/$defs/coverage"},"responding_session":{"type":"string","minLength":1},"source_packet_id":{"type":"string","minLength":1},"status":{"enum":["pending_review","accepted","rejected","archived"]},"path":{"$ref":"common.schema.json#/$defs/safe_path"},"accepted_by":{"type":["string","null"]},"decision_at":{"type":["string","null"],"format":"date-time"},"tags":{"type":"array","items":{"$ref":"common.schema.json#/$defs/slug"},"uniqueItems":true},"notes":{"type":"string"}},"allOf":[{"if":{"properties":{"content_origin":{"enum":["third_party","web","mixed"]}}},"then":{"properties":{"source_refs":{"minItems":1}}}},{"if":{"properties":{"content_origin":{"const":"unknown"}}},"then":{"properties":{"source_note":{"minLength":1}}}},{"if":{"properties":{"content_origin":{"const":"model_generated"}}},"then":{"properties":{"derivative_of":{"minItems":1}}}}]}
2 changes: 1 addition & 1 deletion scripts/check_tag_promotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def tag_slugs(paths: list[str], bucket: str) -> set[str]:
return {
PurePosixPath(path).stem
for path in paths
if PurePosixPath(path).parent == prefix and path.endswith(".json")
if path.endswith(".json") and PurePosixPath(path).is_relative_to(prefix)
}


Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_registry_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"tag": REGISTRY / "tags",
}
CSV_VIEWS = {
"packet": ("packet_registry.csv", ["packet_id", "date", "created_at", "created_by", "deposited_by", "content_origin", "source_session", "target_session", "topic", "status", "path", "response_expected", "response_packet_id", "tags", "notes"]),
"response": ("response_registry.csv", ["response_id", "date", "created_at", "created_by", "deposited_by", "content_origin", "responding_session", "source_packet_id", "status", "path", "accepted_by", "decision_at", "tags", "notes"]),
"packet": ("packet_registry.csv", ["packet_id", "date", "created_at", "created_by", "deposited_by", "content_origin", "source_note", "source_session", "target_session", "topic", "status", "path", "response_expected", "response_packet_id", "tags", "notes"]),
"response": ("response_registry.csv", ["response_id", "date", "created_at", "created_by", "deposited_by", "content_origin", "source_note", "responding_session", "source_packet_id", "status", "path", "accepted_by", "decision_at", "tags", "notes"]),
"message": ("message_registry.csv", ["message_id", "date", "created_at", "from_visitor_id", "to_visitor_id", "to_group", "status", "path", "reply_to", "reply_expected", "response_message_id", "needs_human_relay", "related_packet", "related_response", "summary", "tags", "notes"]),
"notification": ("notification_registry.csv", ["notification_id", "date", "created_at", "from_visitor_id", "to_visitor_id", "message_id", "status", "path", "needs_human_action", "summary", "notes"]),
"visit": ("visit_registry.csv", ["visit_id", "date", "created_at", "visitor_id", "session_family", "checked_messages", "answered_messages", "created_messages", "relay_needed", "signoff_path", "notes"]),
Expand Down
Loading
Loading