@logicsrc/schemas 0.1.0

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.
Files changed (194) hide show
  1. package/README.md +34 -0
  2. package/fixtures/agent.yaml +20 -0
  3. package/fixtures/agentad-ad.yaml +33 -0
  4. package/fixtures/agentad-placement.yaml +21 -0
  5. package/fixtures/opencontext/conformance.json +279 -0
  6. package/fixtures/opencontext/invalid/audit-event-missing-actor.json +5 -0
  7. package/fixtures/opencontext/invalid/audit-event-unknown-event.json +9 -0
  8. package/fixtures/opencontext/invalid/bundle-bad-digest.json +11 -0
  9. package/fixtures/opencontext/invalid/bundle-bad-id.json +11 -0
  10. package/fixtures/opencontext/invalid/bundle-missing-digest.json +10 -0
  11. package/fixtures/opencontext/invalid/bundle-unknown-exclusion-reason.json +17 -0
  12. package/fixtures/opencontext/invalid/decision-bad-status.json +7 -0
  13. package/fixtures/opencontext/invalid/decision-missing-decision.json +5 -0
  14. package/fixtures/opencontext/invalid/decision-wrong-type.json +6 -0
  15. package/fixtures/opencontext/invalid/diagnostic-missing-ok.json +4 -0
  16. package/fixtures/opencontext/invalid/diagnostic-unknown-code.json +11 -0
  17. package/fixtures/opencontext/invalid/manifest-bad-authority.json +10 -0
  18. package/fixtures/opencontext/invalid/manifest-bad-extension.json +9 -0
  19. package/fixtures/opencontext/invalid/manifest-bad-id.json +4 -0
  20. package/fixtures/opencontext/invalid/manifest-bad-ttl.json +7 -0
  21. package/fixtures/opencontext/invalid/manifest-missing-version.json +3 -0
  22. package/fixtures/opencontext/invalid/manifest-role-bad-pattern.json +11 -0
  23. package/fixtures/opencontext/invalid/manifest-unknown-key.json +5 -0
  24. package/fixtures/opencontext/invalid/object-bad-digest.json +10 -0
  25. package/fixtures/opencontext/invalid/object-bad-id.json +4 -0
  26. package/fixtures/opencontext/invalid/object-bad-layer.json +5 -0
  27. package/fixtures/opencontext/invalid/object-bad-redaction-mode.json +10 -0
  28. package/fixtures/opencontext/invalid/object-bad-supersedes.json +7 -0
  29. package/fixtures/opencontext/invalid/object-confidence-out-of-range.json +5 -0
  30. package/fixtures/opencontext/invalid/object-extra-property.json +5 -0
  31. package/fixtures/opencontext/invalid/object-missing-id.json +3 -0
  32. package/fixtures/opencontext/invalid/object-missing-type.json +3 -0
  33. package/fixtures/opencontext/invalid/object-source-without-uri.json +9 -0
  34. package/fixtures/opencontext/invalid/object-unknown-authority.json +5 -0
  35. package/fixtures/opencontext/invalid/object-unknown-classification.json +5 -0
  36. package/fixtures/opencontext/invalid/object-unknown-trust.json +5 -0
  37. package/fixtures/opencontext/invalid/provenance-canonical-false.json +4 -0
  38. package/fixtures/opencontext/invalid/provenance-no-source.json +3 -0
  39. package/fixtures/opencontext/invalid/role-bad-classification.json +4 -0
  40. package/fixtures/opencontext/invalid/role-bad-include.json +6 -0
  41. package/fixtures/opencontext/invalid-manifest.json +177 -0
  42. package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds-observed.md +10 -0
  43. package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds.md +12 -0
  44. package/fixtures/opencontext/resolution/authority-conflict/expected.json +21 -0
  45. package/fixtures/opencontext/resolution/authority-conflict/opencontext.yaml +11 -0
  46. package/fixtures/opencontext/resolution/classification-ceiling/context/docs/handbook.md +11 -0
  47. package/fixtures/opencontext/resolution/classification-ceiling/context/docs/litigation.md +11 -0
  48. package/fixtures/opencontext/resolution/classification-ceiling/expected.json +32 -0
  49. package/fixtures/opencontext/resolution/classification-ceiling/opencontext.yaml +16 -0
  50. package/fixtures/opencontext/resolution/deny-overrides-allow/context/mission.md +10 -0
  51. package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/internal/margins.md +10 -0
  52. package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/refunds.md +10 -0
  53. package/fixtures/opencontext/resolution/deny-overrides-allow/expected.json +19 -0
  54. package/fixtures/opencontext/resolution/deny-overrides-allow/opencontext.yaml +17 -0
  55. package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds-rewrite.md +12 -0
  56. package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds.md +12 -0
  57. package/fixtures/opencontext/resolution/duplicate-canonical/expected.json +10 -0
  58. package/fixtures/opencontext/resolution/duplicate-canonical/opencontext.yaml +11 -0
  59. package/fixtures/opencontext/resolution/lifecycle/context/notes/current.md +11 -0
  60. package/fixtures/opencontext/resolution/lifecycle/context/notes/expired.md +12 -0
  61. package/fixtures/opencontext/resolution/lifecycle/context/notes/future.md +12 -0
  62. package/fixtures/opencontext/resolution/lifecycle/context/notes/stale.md +11 -0
  63. package/fixtures/opencontext/resolution/lifecycle/expected.json +30 -0
  64. package/fixtures/opencontext/resolution/lifecycle/opencontext.yaml +14 -0
  65. package/fixtures/opencontext/resolution/object-permissions/context/policies/payroll.md +12 -0
  66. package/fixtures/opencontext/resolution/object-permissions/context/policies/refunds.md +10 -0
  67. package/fixtures/opencontext/resolution/object-permissions/expected.json +32 -0
  68. package/fixtures/opencontext/resolution/object-permissions/opencontext.yaml +14 -0
  69. package/fixtures/opencontext/resolution/redaction/context/customers/acme.json +21 -0
  70. package/fixtures/opencontext/resolution/redaction/expected.json +28 -0
  71. package/fixtures/opencontext/resolution/redaction/opencontext.yaml +19 -0
  72. package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v1.md +12 -0
  73. package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v2.md +14 -0
  74. package/fixtures/opencontext/resolution/supersession/expected.json +33 -0
  75. package/fixtures/opencontext/resolution/supersession/opencontext.yaml +11 -0
  76. package/fixtures/opencontext/valid/audit-event.json +26 -0
  77. package/fixtures/opencontext/valid/bundle.json +67 -0
  78. package/fixtures/opencontext/valid/decision.json +51 -0
  79. package/fixtures/opencontext/valid/diagnostic.json +37 -0
  80. package/fixtures/opencontext/valid/manifest-minimal.json +4 -0
  81. package/fixtures/opencontext/valid/manifest.json +134 -0
  82. package/fixtures/opencontext/valid/object-minimal.json +4 -0
  83. package/fixtures/opencontext/valid/object-policy.json +75 -0
  84. package/fixtures/opencontext/valid/object-structured.json +34 -0
  85. package/fixtures/opencontext/valid/object-untrusted.json +19 -0
  86. package/fixtures/opencontext/valid/provenance-canonical.json +4 -0
  87. package/fixtures/opencontext/valid/provenance.json +14 -0
  88. package/fixtures/opencontext/valid/role.json +38 -0
  89. package/fixtures/openontology/conformance.json +158 -0
  90. package/fixtures/openontology/invalid/action-no-permissions.json +13 -0
  91. package/fixtures/openontology/invalid/changeset-empty-operations.json +10 -0
  92. package/fixtures/openontology/invalid/changeset-unknown-op.json +15 -0
  93. package/fixtures/openontology/invalid/claim-both-objects.json +14 -0
  94. package/fixtures/openontology/invalid/claim-confidence-out-of-range.json +14 -0
  95. package/fixtures/openontology/invalid/claim-extra-property.json +14 -0
  96. package/fixtures/openontology/invalid/claim-unknown-status.json +13 -0
  97. package/fixtures/openontology/invalid/entity-missing-canonical-name.json +8 -0
  98. package/fixtures/openontology/invalid/evidence-unknown-selector.json +10 -0
  99. package/fixtures/openontology/invalid/manifest-bad-id.json +15 -0
  100. package/fixtures/openontology/invalid/manifest-bad-version.json +15 -0
  101. package/fixtures/openontology/invalid/manifest-no-maintainer.json +11 -0
  102. package/fixtures/openontology/invalid/relationship-no-range.json +11 -0
  103. package/fixtures/openontology/valid/action.json +29 -0
  104. package/fixtures/openontology/valid/approval.json +12 -0
  105. package/fixtures/openontology/valid/changeset.json +34 -0
  106. package/fixtures/openontology/valid/claim-relationship.json +23 -0
  107. package/fixtures/openontology/valid/claim-value.json +15 -0
  108. package/fixtures/openontology/valid/constraint.json +12 -0
  109. package/fixtures/openontology/valid/entity-type.json +16 -0
  110. package/fixtures/openontology/valid/entity.json +16 -0
  111. package/fixtures/openontology/valid/event.json +17 -0
  112. package/fixtures/openontology/valid/evidence.json +12 -0
  113. package/fixtures/openontology/valid/manifest.json +21 -0
  114. package/fixtures/openontology/valid/namespace.json +7 -0
  115. package/fixtures/openontology/valid/property.json +8 -0
  116. package/fixtures/openontology/valid/query-adhoc.json +16 -0
  117. package/fixtures/openontology/valid/query.json +24 -0
  118. package/fixtures/openontology/valid/relationship-type.json +16 -0
  119. package/fixtures/openontology/valid/review.json +17 -0
  120. package/fixtures/openontology/valid/source.json +13 -0
  121. package/fixtures/openprd/conformance.json +104 -0
  122. package/fixtures/openprd/invalid/bad-filename.md +41 -0
  123. package/fixtures/openprd/invalid/bad-id-format.md +41 -0
  124. package/fixtures/openprd/invalid/bad-status.md +41 -0
  125. package/fixtures/openprd/invalid/dates-backwards.md +43 -0
  126. package/fixtures/openprd/invalid/duplicate-requirement.md +42 -0
  127. package/fixtures/openprd/invalid/id-mismatch.md +41 -0
  128. package/fixtures/openprd/invalid/missing-section.md +37 -0
  129. package/fixtures/openprd/invalid/missing-title.md +40 -0
  130. package/fixtures/openprd/invalid/no-front-matter.md +33 -0
  131. package/fixtures/openprd/invalid/out-of-order.md +41 -0
  132. package/fixtures/openprd/invalid/superseded-without-replacement.md +41 -0
  133. package/fixtures/openprd/invalid/unknown-key.md +42 -0
  134. package/fixtures/openprd/valid/bold-requirements.md +41 -0
  135. package/fixtures/openprd/valid/full.md +48 -0
  136. package/fixtures/openprd/valid/minimal.md +41 -0
  137. package/fixtures/openprd/valid/none-sections.md +41 -0
  138. package/fixtures/openprd/valid/subsections.md +47 -0
  139. package/fixtures/openprd/valid/superseded.md +42 -0
  140. package/fixtures/openprd-prd.yaml +12 -0
  141. package/fixtures/pull-request.yaml +24 -0
  142. package/fixtures/repo.yaml +27 -0
  143. package/fixtures/task.yaml +26 -0
  144. package/package.json +91 -0
  145. package/schemas/agentad-ad-request.schema.json +32 -0
  146. package/schemas/agentad-ad-response.schema.json +31 -0
  147. package/schemas/agentad-ad.schema.json +79 -0
  148. package/schemas/agentad-campaign.schema.json +40 -0
  149. package/schemas/agentad-click.schema.json +23 -0
  150. package/schemas/agentad-impression.schema.json +18 -0
  151. package/schemas/agentad-placement.schema.json +46 -0
  152. package/schemas/logicsrc-account-audit-event.schema.json +31 -0
  153. package/schemas/logicsrc-account-grant.schema.json +48 -0
  154. package/schemas/logicsrc-account-provider.schema.json +31 -0
  155. package/schemas/logicsrc-agent.schema.json +51 -0
  156. package/schemas/logicsrc-connected-account.schema.json +39 -0
  157. package/schemas/logicsrc-credential-audit-event.schema.json +32 -0
  158. package/schemas/logicsrc-credential-provider.schema.json +28 -0
  159. package/schemas/logicsrc-credential-sync-plan.schema.json +56 -0
  160. package/schemas/logicsrc-credential-sync-run.schema.json +35 -0
  161. package/schemas/logicsrc-email-message.schema.json +22 -0
  162. package/schemas/logicsrc-event.schema.json +25 -0
  163. package/schemas/logicsrc-opencontext-audit-event.schema.json +69 -0
  164. package/schemas/logicsrc-opencontext-bundle.schema.json +210 -0
  165. package/schemas/logicsrc-opencontext-decision.schema.json +229 -0
  166. package/schemas/logicsrc-opencontext-diagnostic.schema.json +123 -0
  167. package/schemas/logicsrc-opencontext-manifest.schema.json +337 -0
  168. package/schemas/logicsrc-opencontext-object.schema.json +311 -0
  169. package/schemas/logicsrc-opencontext-provenance.schema.json +76 -0
  170. package/schemas/logicsrc-opencontext-role.schema.json +93 -0
  171. package/schemas/logicsrc-openontology-action.schema.json +90 -0
  172. package/schemas/logicsrc-openontology-approval.schema.json +39 -0
  173. package/schemas/logicsrc-openontology-changeset.schema.json +168 -0
  174. package/schemas/logicsrc-openontology-claim.schema.json +148 -0
  175. package/schemas/logicsrc-openontology-constraint.schema.json +104 -0
  176. package/schemas/logicsrc-openontology-entity-type.schema.json +107 -0
  177. package/schemas/logicsrc-openontology-entity.schema.json +59 -0
  178. package/schemas/logicsrc-openontology-event.schema.json +60 -0
  179. package/schemas/logicsrc-openontology-evidence.schema.json +121 -0
  180. package/schemas/logicsrc-openontology-manifest.schema.json +148 -0
  181. package/schemas/logicsrc-openontology-namespace.schema.json +21 -0
  182. package/schemas/logicsrc-openontology-package.schema.json +73 -0
  183. package/schemas/logicsrc-openontology-property.schema.json +83 -0
  184. package/schemas/logicsrc-openontology-query.schema.json +207 -0
  185. package/schemas/logicsrc-openontology-relationship-type.schema.json +57 -0
  186. package/schemas/logicsrc-openontology-review.schema.json +37 -0
  187. package/schemas/logicsrc-openontology-source.schema.json +43 -0
  188. package/schemas/logicsrc-plugin.schema.json +35 -0
  189. package/schemas/logicsrc-pull-request.schema.json +73 -0
  190. package/schemas/logicsrc-repo.schema.json +73 -0
  191. package/schemas/logicsrc-run.schema.json +69 -0
  192. package/schemas/logicsrc-social-post.schema.json +26 -0
  193. package/schemas/logicsrc-task.schema.json +114 -0
  194. package/schemas/openprd-prd.schema.json +79 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-repo.schema.json",
4
+ "title": "LogicSRC Repo",
5
+ "type": "object",
6
+ "required": ["type", "version", "name", "slug", "owner_did", "backend", "visibility"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "type": { "const": "logicsrc.repo" },
10
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "name": { "type": "string", "minLength": 1, "maxLength": 160 },
12
+ "slug": { "type": "string", "pattern": "^[a-z0-9][a-z0-9/_-]*$" },
13
+ "description": { "type": "string" },
14
+ "owner_did": { "$ref": "#/$defs/did" },
15
+ "board": { "type": "string", "pattern": "^/[a-z0-9][a-z0-9/_-]*$" },
16
+ "visibility": {
17
+ "type": "string",
18
+ "enum": ["members_only", "private", "public"],
19
+ "default": "members_only"
20
+ },
21
+ "default_branch": { "type": "string", "minLength": 1, "default": "main" },
22
+ "backend": {
23
+ "type": "object",
24
+ "required": ["provider", "url"],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "provider": { "type": "string", "enum": ["forgejo", "github", "git"] },
28
+ "url": { "type": "string", "format": "uri" },
29
+ "external_id": { "type": "string" }
30
+ }
31
+ },
32
+ "members": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "required": ["did", "role"],
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "did": { "$ref": "#/$defs/did" },
40
+ "role": {
41
+ "type": "string",
42
+ "enum": ["maintainer", "contributor", "reviewer", "reader"]
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "merge_policy": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "min_reviews": { "type": "integer", "minimum": 0, "default": 1 },
52
+ "require_passing_checks": { "type": "boolean", "default": true },
53
+ "reviewer_reputation_min": { "type": "number", "minimum": 0, "default": 0 },
54
+ "escrow_required": { "type": "boolean", "default": false },
55
+ "allow_agent_merge": { "type": "boolean", "default": true },
56
+ "allowed_merge_methods": {
57
+ "type": "array",
58
+ "items": { "type": "string", "enum": ["merge", "squash", "rebase"] },
59
+ "uniqueItems": true,
60
+ "default": ["squash"]
61
+ }
62
+ }
63
+ },
64
+ "created_at": { "type": "string", "format": "date-time" },
65
+ "logicsrc_version": { "type": "string" }
66
+ },
67
+ "$defs": {
68
+ "did": {
69
+ "type": "string",
70
+ "pattern": "^[a-z0-9][a-z0-9._-]*\\.[a-z0-9][a-z0-9._-]*$"
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-run.schema.json",
4
+ "title": "LogicSRC Agent Run",
5
+ "type": "object",
6
+ "required": ["type", "version", "run_id", "task_id", "agent_did", "status", "started_at"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "type": { "const": "logicsrc.agent_run" },
10
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "run_id": { "type": "string", "minLength": 1 },
12
+ "task_id": { "type": "string", "minLength": 1 },
13
+ "agent_did": {
14
+ "type": "string",
15
+ "pattern": "^[a-z0-9][a-z0-9._-]*\\.[a-z0-9][a-z0-9._-]*$"
16
+ },
17
+ "status": {
18
+ "type": "string",
19
+ "enum": ["created", "authorized", "started", "running", "submitted", "completed", "failed", "cancelled", "disputed"]
20
+ },
21
+ "started_at": { "type": "string", "format": "date-time" },
22
+ "completed_at": { "type": "string", "format": "date-time" },
23
+ "logs": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "required": ["timestamp", "action", "status"],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "timestamp": { "type": "string", "format": "date-time" },
31
+ "action": { "type": "string" },
32
+ "status": { "type": "string" },
33
+ "resource": { "type": "string" },
34
+ "message": { "type": "string" }
35
+ }
36
+ }
37
+ },
38
+ "files_accessed": {
39
+ "type": "array",
40
+ "items": { "type": "string" }
41
+ },
42
+ "tools_used": {
43
+ "type": "array",
44
+ "items": { "type": "string" }
45
+ },
46
+ "deliverables": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "required": ["type", "url"],
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "type": { "type": "string" },
54
+ "url": { "type": "string", "format": "uri" }
55
+ }
56
+ }
57
+ },
58
+ "cost": {
59
+ "type": "object",
60
+ "required": ["amount", "currency"],
61
+ "additionalProperties": false,
62
+ "properties": {
63
+ "amount": { "type": "number", "minimum": 0 },
64
+ "currency": { "type": "string", "minLength": 2, "maxLength": 12 }
65
+ }
66
+ },
67
+ "payment_status": { "type": "string" }
68
+ }
69
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-social-post.schema.json",
4
+ "title": "LogicSRC Social Post",
5
+ "type": "object",
6
+ "required": ["id", "accountId", "status", "media", "metadata", "createdAt", "updatedAt"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "id": { "type": "string", "minLength": 1 },
10
+ "accountId": { "type": "string", "minLength": 1 },
11
+ "providerPostId": { "type": "string", "minLength": 1 },
12
+ "status": { "enum": ["draft", "pending_approval", "published", "deleted", "failed"] },
13
+ "text": { "type": "string" },
14
+ "media": {
15
+ "type": "array",
16
+ "items": { "type": "object" }
17
+ },
18
+ "url": { "type": "string", "format": "uri" },
19
+ "publishedAt": { "type": "string", "format": "date-time" },
20
+ "createdByPrincipalType": { "enum": ["user", "agent", "workflow", "plugin"] },
21
+ "createdByPrincipalId": { "type": "string", "minLength": 1 },
22
+ "metadata": { "type": "object" },
23
+ "createdAt": { "type": "string", "format": "date-time" },
24
+ "updatedAt": { "type": "string", "format": "date-time" }
25
+ }
26
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-task.schema.json",
4
+ "title": "LogicSRC Task",
5
+ "type": "object",
6
+ "required": ["type", "version", "title", "description", "board", "creator_did", "status"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "type": { "const": "logicsrc.task" },
10
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "title": { "type": "string", "minLength": 1, "maxLength": 160 },
12
+ "description": { "type": "string", "minLength": 1 },
13
+ "board": { "type": "string", "pattern": "^/[a-z0-9][a-z0-9/_-]*$" },
14
+ "creator_did": { "$ref": "#/$defs/did" },
15
+ "status": {
16
+ "type": "string",
17
+ "enum": [
18
+ "draft",
19
+ "open",
20
+ "funded",
21
+ "claimed",
22
+ "in_progress",
23
+ "submitted",
24
+ "approved",
25
+ "paid",
26
+ "rejected",
27
+ "disputed",
28
+ "cancelled",
29
+ "expired",
30
+ "refunded"
31
+ ]
32
+ },
33
+ "budget": { "$ref": "#/$defs/money" },
34
+ "currency": { "type": "string", "minLength": 2, "maxLength": 12 },
35
+ "deadline": { "type": "string", "format": "date-time" },
36
+ "skills": {
37
+ "type": "array",
38
+ "items": { "type": "string", "minLength": 1 },
39
+ "uniqueItems": true
40
+ },
41
+ "acceptance_criteria": {
42
+ "type": "array",
43
+ "items": { "type": "string", "minLength": 1 }
44
+ },
45
+ "attachments": {
46
+ "type": "array",
47
+ "items": { "$ref": "#/$defs/attachment" }
48
+ },
49
+ "external_links": {
50
+ "type": "array",
51
+ "items": { "type": "string", "format": "uri" }
52
+ },
53
+ "github_repo": { "type": "string" },
54
+ "github_issue": { "type": "string" },
55
+ "target_url": { "type": "string", "format": "uri" },
56
+ "permissions": {
57
+ "type": "object",
58
+ "additionalProperties": { "type": "boolean" }
59
+ },
60
+ "assignee_did": { "$ref": "#/$defs/did" },
61
+ "agent_allowed": { "type": "boolean", "default": true },
62
+ "human_allowed": { "type": "boolean", "default": true },
63
+ "escrow_required": { "type": "boolean", "default": false },
64
+ "payment": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "provider": { "type": "string" },
69
+ "escrow_id": { "type": "string" },
70
+ "status": {
71
+ "type": "string",
72
+ "enum": [
73
+ "unfunded",
74
+ "funding_pending",
75
+ "funded",
76
+ "release_pending",
77
+ "released",
78
+ "refunded",
79
+ "disputed",
80
+ "cancelled",
81
+ "failed"
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ "logicsrc_version": { "type": "string" }
87
+ },
88
+ "$defs": {
89
+ "did": {
90
+ "type": "string",
91
+ "pattern": "^[a-z0-9][a-z0-9._-]*\\.[a-z0-9][a-z0-9._-]*$"
92
+ },
93
+ "money": {
94
+ "type": "object",
95
+ "required": ["amount", "currency"],
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "amount": { "type": "number", "exclusiveMinimum": 0 },
99
+ "currency": { "type": "string", "minLength": 2, "maxLength": 12 }
100
+ }
101
+ },
102
+ "attachment": {
103
+ "type": "object",
104
+ "required": ["type", "url"],
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "type": { "type": "string" },
108
+ "name": { "type": "string" },
109
+ "url": { "type": "string", "format": "uri" },
110
+ "sha256": { "type": "string" }
111
+ }
112
+ }
113
+ }
114
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/openprd-prd.schema.json",
4
+ "title": "OpenPRD Product Requirements Document",
5
+ "description": "The front-matter manifest of an OpenPRD document. OpenPRD is a lightweight, DIP-style proposal standard: a repo publishes a numbered collection of PRDs under prd/ (prd/NNNN-slug.md), with a 0000-template.md and a README index, committed to the repo like a BIP/EIP/DIP process. This schema governs the YAML front-matter; the body is Markdown with a fixed set of sections. Optional keys MAY be present but empty (null) — the template ships them blank for authors to fill.",
6
+ "type": "object",
7
+ "required": ["openprd", "id", "title", "status"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openprd": {
11
+ "type": "string",
12
+ "pattern": "^\\d+\\.\\d+(\\.\\d+)?$",
13
+ "description": "OpenPRD standard version this document conforms to, e.g. '0.2'."
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "pattern": "^\\d{4}$",
18
+ "description": "Four-digit zero-padded number, monotonically increasing with no gaps. Matches the filename prefix: prd/<id>-<slug>.md."
19
+ },
20
+ "title": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "description": "Short imperative title — start with a verb where possible."
24
+ },
25
+ "status": {
26
+ "type": "string",
27
+ "enum": ["Draft", "Review", "Accepted", "Final", "Rejected", "Withdrawn", "Superseded"],
28
+ "description": "Lifecycle stage. Draft → Review → Accepted → Final; or Rejected/Withdrawn/Superseded."
29
+ },
30
+ "authors": {
31
+ "type": ["array", "null"],
32
+ "items": { "type": "string" },
33
+ "uniqueItems": true,
34
+ "description": "Author identities — email, handle, or DID."
35
+ },
36
+ "owner": {
37
+ "type": ["string", "null"],
38
+ "description": "Optional DID or handle of the accountable owner (e.g. a LogicSRC account/agent DID)."
39
+ },
40
+ "repo": {
41
+ "type": ["string", "null"],
42
+ "description": "Optional owner/name of the repository this PRD targets."
43
+ },
44
+ "created": {
45
+ "type": ["string", "null"],
46
+ "format": "date",
47
+ "description": "ISO date (YYYY-MM-DD) the PRD was created."
48
+ },
49
+ "updated": {
50
+ "type": ["string", "null"],
51
+ "format": "date",
52
+ "description": "ISO date (YYYY-MM-DD) of the last substantive edit."
53
+ },
54
+ "discussion": {
55
+ "type": ["string", "null"],
56
+ "description": "Optional URL to the PR/issue/thread where this PRD is discussed."
57
+ },
58
+ "implementation": {
59
+ "type": ["string", "null"],
60
+ "description": "Optional URL/reference to the implementation PR or tracking issue."
61
+ },
62
+ "tags": {
63
+ "type": ["array", "null"],
64
+ "items": { "type": "string" },
65
+ "uniqueItems": true,
66
+ "description": "Optional freeform labels for grouping PRDs."
67
+ },
68
+ "supersedes": {
69
+ "type": ["string", "null"],
70
+ "pattern": "^\\d{4}$",
71
+ "description": "Optional id of an earlier PRD this one replaces."
72
+ },
73
+ "superseded-by": {
74
+ "type": ["string", "null"],
75
+ "pattern": "^\\d{4}$",
76
+ "description": "Optional id of a later PRD that replaces this one."
77
+ }
78
+ }
79
+ }