avorelo 0.1.0 → 0.2.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 (260) hide show
  1. package/LICENSE +23 -16
  2. package/README.md +91 -51
  3. package/bin/avorelo.mjs +7 -0
  4. package/dist/avorelo.mjs +14337 -0
  5. package/package.json +106 -120
  6. package/bin/avorelo +0 -9
  7. package/scripts/README.md +0 -40
  8. package/scripts/cco-dashboard.js +0 -252
  9. package/scripts/cco-status.js +0 -430
  10. package/scripts/lib/activation/account-state.js +0 -37
  11. package/scripts/lib/activation/activation-runner.js +0 -546
  12. package/scripts/lib/activation/activation-self-healing.js +0 -480
  13. package/scripts/lib/activation/activation-state.js +0 -83
  14. package/scripts/lib/activation/activation-summary.js +0 -191
  15. package/scripts/lib/activation/adapters/claude-code.js +0 -77
  16. package/scripts/lib/activation/adapters/codex-cli.js +0 -52
  17. package/scripts/lib/activation/adapters/cursor.js +0 -37
  18. package/scripts/lib/activation/adapters/github-agent.js +0 -39
  19. package/scripts/lib/activation/adapters/terminal.js +0 -42
  20. package/scripts/lib/activation/adapters/vscode.js +0 -39
  21. package/scripts/lib/activation/adapters/windsurf.js +0 -37
  22. package/scripts/lib/activation/ai-surface-detector.js +0 -151
  23. package/scripts/lib/activation/connect-account.js +0 -145
  24. package/scripts/lib/activation/detect-environment.js +0 -75
  25. package/scripts/lib/activation/detect-hosts.js +0 -62
  26. package/scripts/lib/activation/format-activation-output.js +0 -109
  27. package/scripts/lib/activation/next-action.js +0 -43
  28. package/scripts/lib/activation/repair-engine.js +0 -219
  29. package/scripts/lib/activation-distribution-readiness.js +0 -507
  30. package/scripts/lib/adapter-conformance.js +0 -176
  31. package/scripts/lib/adapter-readiness.js +0 -417
  32. package/scripts/lib/adapter-safety-boundaries.js +0 -335
  33. package/scripts/lib/adapter-technical-readiness-gate.js +0 -205
  34. package/scripts/lib/agent-access-governance.js +0 -455
  35. package/scripts/lib/agent-enforcement.js +0 -765
  36. package/scripts/lib/agent-policy-profile.js +0 -210
  37. package/scripts/lib/agent-security/action-evaluator.js +0 -507
  38. package/scripts/lib/agent-security/adapter-registry.js +0 -98
  39. package/scripts/lib/agent-security/auto-policy.js +0 -139
  40. package/scripts/lib/agent-security/bounded-scan.js +0 -93
  41. package/scripts/lib/agent-security/enforcement-adapter.js +0 -174
  42. package/scripts/lib/agent-security/enforcement-engine.js +0 -1129
  43. package/scripts/lib/agent-security/file-write-adapter.js +0 -183
  44. package/scripts/lib/agent-security/file-write-rules.js +0 -178
  45. package/scripts/lib/agent-security/index.js +0 -3342
  46. package/scripts/lib/agent-security/instruction-risk.js +0 -181
  47. package/scripts/lib/agent-security/mcp-action-adapter.js +0 -185
  48. package/scripts/lib/agent-security/mcp-action-rules.js +0 -184
  49. package/scripts/lib/agent-security/package-action-adapter.js +0 -175
  50. package/scripts/lib/agent-security/package-action-rules.js +0 -233
  51. package/scripts/lib/agent-security/performance.js +0 -148
  52. package/scripts/lib/agent-security/permission-minimizer.js +0 -403
  53. package/scripts/lib/agent-security/scan-cache.js +0 -74
  54. package/scripts/lib/agent-security/source-trust.js +0 -146
  55. package/scripts/lib/ai-install-prompt.js +0 -288
  56. package/scripts/lib/ai-workspace-hygiene.js +0 -1499
  57. package/scripts/lib/alpha-activation.js +0 -520
  58. package/scripts/lib/alpha-feedback.js +0 -263
  59. package/scripts/lib/alpha-readiness-gate.js +0 -332
  60. package/scripts/lib/anti-gaming.js +0 -169
  61. package/scripts/lib/artifact-health.js +0 -431
  62. package/scripts/lib/attribution.js +0 -180
  63. package/scripts/lib/audit.js +0 -289
  64. package/scripts/lib/avorelo-skill-registry.js +0 -810
  65. package/scripts/lib/batch-jobs.js +0 -71
  66. package/scripts/lib/brain-pack.js +0 -578
  67. package/scripts/lib/brand-boundary.js +0 -424
  68. package/scripts/lib/brand.js +0 -74
  69. package/scripts/lib/browser-capability.js +0 -1048
  70. package/scripts/lib/browser-proof-preflight.js +0 -321
  71. package/scripts/lib/cache-readiness.js +0 -187
  72. package/scripts/lib/canonical-reentry.js +0 -162
  73. package/scripts/lib/capability-packs.js +0 -314
  74. package/scripts/lib/capability-recommender.js +0 -512
  75. package/scripts/lib/capability-registry.js +0 -1059
  76. package/scripts/lib/carry-forward-surfacing.js +0 -194
  77. package/scripts/lib/ccusage-adapter.js +0 -188
  78. package/scripts/lib/company-loop.js +0 -1149
  79. package/scripts/lib/config.js +0 -637
  80. package/scripts/lib/context-acquisition-plan.js +0 -287
  81. package/scripts/lib/context-budget-guard.js +0 -170
  82. package/scripts/lib/context-budget-scanner.js +0 -257
  83. package/scripts/lib/context-optimizer.js +0 -715
  84. package/scripts/lib/context-reduction-plan.js +0 -178
  85. package/scripts/lib/context-safety.js +0 -88
  86. package/scripts/lib/context-savings-engine.js +0 -158
  87. package/scripts/lib/cost-evidence.js +0 -254
  88. package/scripts/lib/cross-host-install-plan.js +0 -308
  89. package/scripts/lib/cross-host-install-readiness.js +0 -237
  90. package/scripts/lib/cross-host-value-flow.js +0 -268
  91. package/scripts/lib/dashboard.js +0 -900
  92. package/scripts/lib/design-partner-feedback.js +0 -346
  93. package/scripts/lib/entitlements.js +0 -100
  94. package/scripts/lib/execution-packet.js +0 -559
  95. package/scripts/lib/experimentation-events.js +0 -547
  96. package/scripts/lib/external-capability-compliance.js +0 -107
  97. package/scripts/lib/external-user-simulation.js +0 -166
  98. package/scripts/lib/failure-recovery-readiness.js +0 -81
  99. package/scripts/lib/failure-recovery.js +0 -419
  100. package/scripts/lib/feedback-intelligence.js +0 -537
  101. package/scripts/lib/feedback-signals.js +0 -205
  102. package/scripts/lib/file-integrity.js +0 -68
  103. package/scripts/lib/fsx.js +0 -127
  104. package/scripts/lib/full-readiness-gate.js +0 -451
  105. package/scripts/lib/guidance-builder.js +0 -174
  106. package/scripts/lib/hook-apply.js +0 -1019
  107. package/scripts/lib/hook-baseline.js +0 -310
  108. package/scripts/lib/hook-config-preview.js +0 -275
  109. package/scripts/lib/hook-contracts.js +0 -290
  110. package/scripts/lib/hook-safety-boundary-readiness.js +0 -80
  111. package/scripts/lib/host-capability-matrix.js +0 -351
  112. package/scripts/lib/host-support-context.js +0 -254
  113. package/scripts/lib/http-hook-action.js +0 -538
  114. package/scripts/lib/install-ai-readiness.js +0 -84
  115. package/scripts/lib/install-intake-risk.js +0 -1037
  116. package/scripts/lib/install-journey-intelligence.js +0 -329
  117. package/scripts/lib/intervention-guidance.js +0 -57
  118. package/scripts/lib/known-limitations.js +0 -115
  119. package/scripts/lib/l8-path-truth.js +0 -146
  120. package/scripts/lib/launch-hardening-gate.js +0 -436
  121. package/scripts/lib/launch-readiness.js +0 -628
  122. package/scripts/lib/learning-memory.js +0 -686
  123. package/scripts/lib/lifecycle-hooks.js +0 -802
  124. package/scripts/lib/local-package-smoke.js +0 -423
  125. package/scripts/lib/local-pricing.js +0 -299
  126. package/scripts/lib/mcp-enforcement.js +0 -311
  127. package/scripts/lib/mcp-least-privilege-policy.js +0 -303
  128. package/scripts/lib/mcp-tool-inventory.js +0 -388
  129. package/scripts/lib/mcp-tool-risk.js +0 -0
  130. package/scripts/lib/memory.js +0 -335
  131. package/scripts/lib/metrics.js +0 -699
  132. package/scripts/lib/micro-proof.js +0 -133
  133. package/scripts/lib/next-run-context.js +0 -436
  134. package/scripts/lib/operating-value.js +0 -1648
  135. package/scripts/lib/optimization-v3.js +0 -122
  136. package/scripts/lib/orchestration/adapters/_shared.js +0 -49
  137. package/scripts/lib/orchestration/adapters/aider.js +0 -18
  138. package/scripts/lib/orchestration/adapters/claude-code.js +0 -35
  139. package/scripts/lib/orchestration/adapters/codex.js +0 -35
  140. package/scripts/lib/orchestration/adapters/gemini-cli.js +0 -18
  141. package/scripts/lib/orchestration/adapters/git.js +0 -25
  142. package/scripts/lib/orchestration/adapters/index.js +0 -31
  143. package/scripts/lib/orchestration/adapters/lm-studio.js +0 -18
  144. package/scripts/lib/orchestration/adapters/ollama.js +0 -18
  145. package/scripts/lib/orchestration/adapters/opencode.js +0 -18
  146. package/scripts/lib/orchestration/adapters/openrouter.js +0 -18
  147. package/scripts/lib/orchestration/adapters/test-runner.js +0 -25
  148. package/scripts/lib/orchestration/cli.js +0 -438
  149. package/scripts/lib/orchestration/execution-manager.js +0 -279
  150. package/scripts/lib/orchestration/handoff.js +0 -314
  151. package/scripts/lib/orchestration/index.js +0 -456
  152. package/scripts/lib/orchestration/inventory.js +0 -47
  153. package/scripts/lib/orchestration/model-discovery.js +0 -498
  154. package/scripts/lib/orchestration/model-profiler.js +0 -170
  155. package/scripts/lib/orchestration/model-profiles.js +0 -252
  156. package/scripts/lib/orchestration/model-refresh-policy.js +0 -72
  157. package/scripts/lib/orchestration/proof-writer.js +0 -349
  158. package/scripts/lib/orchestration/provider-discovery/aider.js +0 -49
  159. package/scripts/lib/orchestration/provider-discovery/claude-code.js +0 -56
  160. package/scripts/lib/orchestration/provider-discovery/codex.js +0 -49
  161. package/scripts/lib/orchestration/provider-discovery/common.js +0 -186
  162. package/scripts/lib/orchestration/provider-discovery/gemini.js +0 -106
  163. package/scripts/lib/orchestration/provider-discovery/lm-studio.js +0 -118
  164. package/scripts/lib/orchestration/provider-discovery/models-dev.js +0 -12
  165. package/scripts/lib/orchestration/provider-discovery/ollama.js +0 -100
  166. package/scripts/lib/orchestration/provider-discovery/opencode.js +0 -47
  167. package/scripts/lib/orchestration/provider-discovery/openrouter.js +0 -44
  168. package/scripts/lib/orchestration/risk-classifier.js +0 -130
  169. package/scripts/lib/orchestration/routing-policy.js +0 -486
  170. package/scripts/lib/orchestration/settings.js +0 -112
  171. package/scripts/lib/orchestration/state.js +0 -165
  172. package/scripts/lib/orchestration/verification-manager.js +0 -138
  173. package/scripts/lib/output-profiles.js +0 -146
  174. package/scripts/lib/package-content-audit.js +0 -368
  175. package/scripts/lib/package-runtime.js +0 -278
  176. package/scripts/lib/plan-surface.js +0 -53
  177. package/scripts/lib/plans.js +0 -2318
  178. package/scripts/lib/policy-provider.js +0 -27
  179. package/scripts/lib/prelaunch-activation-readiness.js +0 -409
  180. package/scripts/lib/prelaunch-evidence-store.js +0 -816
  181. package/scripts/lib/prelaunch-intelligence.js +0 -869
  182. package/scripts/lib/pricing-experiment.js +0 -118
  183. package/scripts/lib/pro-moment-events.js +0 -77
  184. package/scripts/lib/pro-moment-state.js +0 -227
  185. package/scripts/lib/pro-moments.js +0 -1216
  186. package/scripts/lib/product-learning-events.js +0 -629
  187. package/scripts/lib/project-profile.js +0 -555
  188. package/scripts/lib/prompt-compiler.js +0 -280
  189. package/scripts/lib/prompt-lint.js +0 -32
  190. package/scripts/lib/prompt-suggestions.js +0 -52
  191. package/scripts/lib/proof-canonical.js +0 -398
  192. package/scripts/lib/proof-drilldown.js +0 -383
  193. package/scripts/lib/proof-events.js +0 -342
  194. package/scripts/lib/proof-history.js +0 -243
  195. package/scripts/lib/proof-metrics.js +0 -296
  196. package/scripts/lib/proof-outcome-evidence.js +0 -134
  197. package/scripts/lib/proof-receipt.js +0 -335
  198. package/scripts/lib/proof-record.js +0 -461
  199. package/scripts/lib/public-activation-distribution-gate.js +0 -258
  200. package/scripts/lib/public-cli.js +0 -3891
  201. package/scripts/lib/public-distribution-truth.js +0 -211
  202. package/scripts/lib/public-install-claim-checker.js +0 -294
  203. package/scripts/lib/publish-provenance-readiness.js +0 -283
  204. package/scripts/lib/readiness-delta.js +0 -218
  205. package/scripts/lib/readiness-evidence-closure.js +0 -196
  206. package/scripts/lib/reentry-memory-capture.js +0 -241
  207. package/scripts/lib/reentry-memory-retrieval.js +0 -302
  208. package/scripts/lib/reentry-memory-status.js +0 -146
  209. package/scripts/lib/reentry-memory-store.js +0 -178
  210. package/scripts/lib/reentry-state.js +0 -66
  211. package/scripts/lib/release-candidate-bundle.js +0 -166
  212. package/scripts/lib/remediation.js +0 -81
  213. package/scripts/lib/repo-map.js +0 -391
  214. package/scripts/lib/run-improvements-lifecycle.js +0 -330
  215. package/scripts/lib/run-improvements.js +0 -789
  216. package/scripts/lib/runtime-decision-policy.js +0 -387
  217. package/scripts/lib/safe-path-engine.js +0 -705
  218. package/scripts/lib/safe-run-controller.js +0 -887
  219. package/scripts/lib/score.js +0 -262
  220. package/scripts/lib/seamless-enforcement.js +0 -329
  221. package/scripts/lib/seamless-outcome.js +0 -689
  222. package/scripts/lib/seamless-reality-gate.js +0 -5043
  223. package/scripts/lib/security-risk-classifier.js +0 -511
  224. package/scripts/lib/security-scan.js +0 -384
  225. package/scripts/lib/session-context-optimizer.js +0 -1211
  226. package/scripts/lib/session-timing.js +0 -315
  227. package/scripts/lib/skill-hygiene.js +0 -805
  228. package/scripts/lib/skill-packs.js +0 -161
  229. package/scripts/lib/skills-operating-layer.js +0 -580
  230. package/scripts/lib/smart-work-routing.js +0 -768
  231. package/scripts/lib/source-catalog.js +0 -700
  232. package/scripts/lib/status-value-summary.js +0 -32
  233. package/scripts/lib/support-bundle.js +0 -578
  234. package/scripts/lib/task-continuation.js +0 -440
  235. package/scripts/lib/test-helpers.js +0 -15
  236. package/scripts/lib/tier.js +0 -38
  237. package/scripts/lib/token-context-quality-gate.js +0 -370
  238. package/scripts/lib/token-cost-capture.js +0 -187
  239. package/scripts/lib/token-cost-intelligence.js +0 -358
  240. package/scripts/lib/token-efficiency-evidence.js +0 -213
  241. package/scripts/lib/token-evidence.js +0 -699
  242. package/scripts/lib/tokenish.js +0 -17
  243. package/scripts/lib/tool-output-sandbox.js +0 -304
  244. package/scripts/lib/trust-audit.js +0 -136
  245. package/scripts/lib/unified-events.js +0 -396
  246. package/scripts/lib/upgrade-interruption-recovery.js +0 -407
  247. package/scripts/lib/usage-ledger.js +0 -201
  248. package/scripts/lib/value-ledger.js +0 -130
  249. package/scripts/lib/value-proof-calibration.js +0 -531
  250. package/scripts/lib/visual-qa.js +0 -231
  251. package/scripts/lib/voice-alpha.js +0 -29
  252. package/scripts/lib/work-aware-orchestration.js +0 -976
  253. package/scripts/lib/work-control-receipts.js +0 -577
  254. package/scripts/lib/work-ledger.js +0 -1123
  255. package/scripts/lib/work-panel-preview.js +0 -352
  256. package/scripts/lib/workflow-discipline.js +0 -280
  257. package/scripts/lib/workflow-signals.js +0 -419
  258. package/scripts/lib/workspace-map.js +0 -281
  259. package/scripts/lib/workspace-registry.js +0 -1367
  260. package/scripts/lib/workspace-resolver.js +0 -480
@@ -1,700 +0,0 @@
1
- "use strict";
2
-
3
- const path = require("path");
4
-
5
- const VALID_SOURCE_TYPES = new Set([
6
- "repository",
7
- "documentation",
8
- "spec",
9
- "guide",
10
- "product_reference",
11
- "skill_pack",
12
- "skills_repo",
13
- "adapter_reference",
14
- ]);
15
-
16
- const VALID_SOURCE_TRUST_LEVELS = new Set(["unknown", "low", "medium", "high"]);
17
- const VALID_RISK_LEVELS = new Set(["low", "medium", "high"]);
18
- const VALID_SOURCE_REVIEW_STATUSES = new Set(["unreviewed", "reviewed", "trusted", "blocked"]);
19
- const VALID_ALLOWED_USE_MODES = new Set([
20
- "reference_only",
21
- "suggested_install",
22
- "wrapped_adapter",
23
- "adapted_internal",
24
- "vendored_with_attribution",
25
- "blocked",
26
- ]);
27
- const VALID_PRODUCT_DECISIONS = new Set([
28
- "adopt_now",
29
- "adapt_now",
30
- "reference_only",
31
- "defer",
32
- "blocked",
33
- ]);
34
-
35
- const SOURCE_CATALOG = Object.freeze([
36
- {
37
- id: "playwright-local-runner",
38
- name: "Playwright",
39
- sourceType: "documentation",
40
- sourceUrl: "https://playwright.dev",
41
- owner: "Microsoft",
42
- license: "Apache-2.0",
43
- licenseUrl: "https://github.com/microsoft/playwright/blob/main/LICENSE",
44
- attributionRequired: true,
45
- noticeRequired: true,
46
- commercialUseMetadata: "Apache-2.0 generally permits commercial use subject to license conditions. This is metadata, not legal advice.",
47
- sourceTrustLevel: "high",
48
- riskLevel: "low",
49
- sourceReviewStatus: "reviewed",
50
- lastReviewedAt: "2026-05-12",
51
- sourceSnapshot: { type: "docs_reference" },
52
- supportedAgents: ["claude-code", "codex", "cursor", "generic"],
53
- sourceCategories: ["browser_automation", "visual_qa"],
54
- usefulPatterns: ["local browser runner", "screenshot-backed verification"],
55
- adaptationCandidates: ["frontend readiness", "visual qa"],
56
- blockedPatterns: ["bundling upstream code"],
57
- knownRisks: ["User must install and configure independently."],
58
- securityNotes: ["Treat Playwright as a local runner reference only."],
59
- licenseNotes: ["Keep attribution when referenced in user-facing docs."],
60
- attributionText: "Playwright is developed and maintained by Microsoft Corporation. Licensed under Apache-2.0. See https://playwright.dev",
61
- allowedUseModes: ["reference_only", "suggested_install"],
62
- defaultUseMode: "reference_only",
63
- dogfoodStatus: "reviewed_for_runner_reference",
64
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
65
- productDecision: "reference_only",
66
- notesFile: "docs/references/source-review-notes.md",
67
- },
68
- {
69
- id: "addyosmani-agent-skills",
70
- name: "Addy Osmani Agent Skills",
71
- sourceType: "skills_repo",
72
- sourceUrl: "https://github.com/addyosmani/agent-skills",
73
- owner: "Addy Osmani",
74
- license: "MIT",
75
- licenseUrl: "https://github.com/addyosmani/agent-skills/blob/main/LICENSE",
76
- attributionRequired: true,
77
- noticeRequired: true,
78
- commercialUseMetadata: "MIT generally permits commercial use subject to license conditions. This is metadata, not legal advice.",
79
- sourceTrustLevel: "high",
80
- riskLevel: "medium",
81
- sourceReviewStatus: "reviewed",
82
- lastReviewedAt: "2026-05-12",
83
- sourceSnapshot: {
84
- type: "reviewed_subset_vendored",
85
- upstreamCommit: "3ff4b518b3cd3077ca27cf883aa21d21faf53802",
86
- localPath: "vendor/skillpacks/addyosmani-agent-skills",
87
- },
88
- supportedAgents: ["claude-code", "codex", "cursor", "generic"],
89
- sourceCategories: ["workflow_skills", "context_engineering", "verification"],
90
- usefulPatterns: [
91
- "using-agent-skills meta-skill",
92
- "SKILL.md anatomy",
93
- "incremental implementation",
94
- "verification gates",
95
- "rationalizations and red flags",
96
- "source-driven development",
97
- ],
98
- adaptationCandidates: [
99
- "reference_first_implementation",
100
- "spec_driven_development",
101
- "pr_quality_gate",
102
- "test_driven_development",
103
- ],
104
- blockedPatterns: [
105
- "blind runtime import",
106
- "auto-executing upstream scripts",
107
- "full prompt dump of vendored skills",
108
- ],
109
- knownRisks: [
110
- "Imported scripts must remain non-runnable by default.",
111
- ],
112
- securityNotes: [
113
- "Treat imported scripts as data only until explicitly reviewed.",
114
- "Run static scanning before any deeper adaptation.",
115
- ],
116
- licenseNotes: [
117
- "MIT confirmed from upstream reference.",
118
- "Preserve LICENSE and attribution when vendoring locally.",
119
- ],
120
- attributionText: "Addy Osmani Agent Skills by Addy Osmani, used with attribution under the MIT license.",
121
- allowedUseModes: ["reference_only", "adapted_internal", "vendored_with_attribution"],
122
- defaultUseMode: "vendored_with_attribution",
123
- dogfoodStatus: "reviewed_subset_vendored",
124
- dogfoodEvidencePath: "docs/dogfood/skills-operating-layer-dogfood.md",
125
- productDecision: "adopt_now",
126
- notesFile: "docs/references/source-review-notes.md",
127
- },
128
- {
129
- id: "anthropic-skills-repo",
130
- name: "Anthropic Skills repo",
131
- sourceType: "skills_repo",
132
- sourceUrl: "https://github.com/anthropics/skills",
133
- owner: "Anthropic",
134
- license: "reference_only_pending_review",
135
- licenseUrl: "https://github.com/anthropics/skills",
136
- attributionRequired: true,
137
- noticeRequired: true,
138
- commercialUseMetadata: "Mixed-license repository. Reuse requires per-skill review.",
139
- sourceTrustLevel: "high",
140
- riskLevel: "medium",
141
- sourceReviewStatus: "reviewed",
142
- lastReviewedAt: "2026-05-13",
143
- sourceSnapshot: { type: "docs_and_repo_reference_only" },
144
- supportedAgents: ["claude-code", "generic"],
145
- sourceCategories: ["skills", "browser_proof"],
146
- usefulPatterns: ["narrow task skills", "supporting assets", "task-specific packaging"],
147
- adaptationCandidates: ["skill structure", "browser proof workflow references"],
148
- blockedPatterns: ["bulk import of mixed-license content", "runtime use without per-skill review"],
149
- knownRisks: ["Not all skills share the same reuse status."],
150
- securityNotes: ["Per-skill provenance review is required before any future vendoring."],
151
- licenseNotes: ["Treat as structure and pattern source unless a specific open skill is reviewed."],
152
- attributionText: "Anthropic Skills repo reviewed for structure and workflow patterns only.",
153
- allowedUseModes: ["reference_only", "adapted_internal", "blocked"],
154
- defaultUseMode: "reference_only",
155
- dogfoodStatus: "reviewed_for_structure_only",
156
- dogfoodEvidencePath: "docs/dogfood/skills-operating-layer-dogfood.md",
157
- productDecision: "adapt_now",
158
- notesFile: "docs/references/source-review-notes.md",
159
- },
160
- {
161
- id: "anthropic-webapp-testing-skill",
162
- name: "Anthropic webapp-testing skill",
163
- sourceType: "guide",
164
- sourceUrl: "https://github.com/anthropics/skills/blob/main/skills/webapp-testing/SKILL.md",
165
- owner: "Anthropic",
166
- license: "reference_only_pending_review",
167
- licenseUrl: "https://github.com/anthropics/skills",
168
- attributionRequired: true,
169
- noticeRequired: true,
170
- commercialUseMetadata: "Workflow reference only unless a specific licensed subset is approved later.",
171
- sourceTrustLevel: "high",
172
- riskLevel: "low",
173
- sourceReviewStatus: "reviewed",
174
- lastReviewedAt: "2026-05-13",
175
- sourceSnapshot: { type: "workflow_reference_only" },
176
- supportedAgents: ["claude-code", "generic"],
177
- sourceCategories: ["browser_proof", "visual_qa"],
178
- usefulPatterns: ["local server lifecycle", "browser evidence capture", "console and network inspection"],
179
- adaptationCandidates: ["future Browser Proof capability"],
180
- blockedPatterns: ["claiming Browser Proof is shipped in this PR", "copying mixed-license bodies into adapters"],
181
- knownRisks: ["This source informs later Browser Proof work only."],
182
- securityNotes: ["Keep Browser Proof out of this PR scope."],
183
- licenseNotes: ["Reference workflow patterns only for now."],
184
- attributionText: "Anthropic webapp-testing skill reviewed as a Browser Proof workflow reference only.",
185
- allowedUseModes: ["reference_only"],
186
- defaultUseMode: "reference_only",
187
- dogfoodStatus: "reviewed_for_browser_proof_later",
188
- dogfoodEvidencePath: "docs/dogfood/skills-operating-layer-dogfood.md",
189
- productDecision: "reference_only",
190
- notesFile: "docs/references/source-review-notes.md",
191
- },
192
- {
193
- id: "openai-codex-skills-docs",
194
- name: "OpenAI Codex Skills docs",
195
- sourceType: "documentation",
196
- sourceUrl: "https://developers.openai.com/codex/skills",
197
- owner: "OpenAI",
198
- license: "docs_reference",
199
- licenseUrl: "https://openai.com/policies/",
200
- attributionRequired: true,
201
- noticeRequired: false,
202
- commercialUseMetadata: "Use as documentation reference only.",
203
- sourceTrustLevel: "high",
204
- riskLevel: "low",
205
- sourceReviewStatus: "reviewed",
206
- lastReviewedAt: "2026-05-12",
207
- sourceSnapshot: { type: "docs_reference" },
208
- supportedAgents: ["codex"],
209
- sourceCategories: ["skills", "adapter_behavior"],
210
- usefulPatterns: ["skill directory with SKILL.md", "progressive disclosure", "context-budgeted discovery"],
211
- adaptationCandidates: ["codex adapter guidance", "canonical avorelo skills", "skill registry validation"],
212
- blockedPatterns: ["copying long docs text into adapters"],
213
- knownRisks: ["Documentation can change without notice."],
214
- securityNotes: ["Use as behavior reference only."],
215
- licenseNotes: ["Do not mirror docs text wholesale."],
216
- attributionText: "Behavior aligned with OpenAI Codex Skills documentation.",
217
- allowedUseModes: ["reference_only", "adapted_internal"],
218
- defaultUseMode: "adapted_internal",
219
- dogfoodStatus: "reviewed_for_patterns",
220
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
221
- productDecision: "adapt_now",
222
- notesFile: "docs/references/source-review-notes.md",
223
- },
224
- {
225
- id: "claude-code-skills-docs",
226
- name: "Claude Code Skills docs",
227
- sourceType: "documentation",
228
- sourceUrl: "https://code.claude.com/docs/en/skills",
229
- owner: "Anthropic",
230
- license: "docs_reference",
231
- licenseUrl: "https://www.anthropic.com/legal/consumer-terms",
232
- attributionRequired: true,
233
- noticeRequired: false,
234
- commercialUseMetadata: "Use as documentation reference only.",
235
- sourceTrustLevel: "high",
236
- riskLevel: "low",
237
- sourceReviewStatus: "reviewed",
238
- lastReviewedAt: "2026-05-12",
239
- sourceSnapshot: { type: "docs_reference" },
240
- supportedAgents: ["claude-code"],
241
- sourceCategories: ["skills", "context_loading"],
242
- usefulPatterns: [
243
- "supporting files stay out of always-loaded context",
244
- "skills load only when needed",
245
- "precise invocation descriptions",
246
- ],
247
- adaptationCandidates: ["claude adapter guidance", "canonical avorelo skills"],
248
- blockedPatterns: ["manual divergent copies of skill content"],
249
- knownRisks: ["Documentation can evolve."],
250
- securityNotes: ["Keep supporting files separate from always-loaded prompts."],
251
- licenseNotes: ["Reference patterns only."],
252
- attributionText: "Behavior aligned with Claude Code Skills documentation.",
253
- allowedUseModes: ["reference_only", "adapted_internal"],
254
- defaultUseMode: "adapted_internal",
255
- dogfoodStatus: "reviewed_for_patterns",
256
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
257
- productDecision: "adapt_now",
258
- notesFile: "docs/references/source-review-notes.md",
259
- },
260
- {
261
- id: "claude-code-hooks-docs",
262
- name: "Claude Code Hooks docs",
263
- sourceType: "documentation",
264
- sourceUrl: "https://code.claude.com/docs/en/hooks",
265
- owner: "Anthropic",
266
- license: "docs_reference",
267
- licenseUrl: "https://www.anthropic.com/legal/consumer-terms",
268
- attributionRequired: true,
269
- noticeRequired: false,
270
- commercialUseMetadata: "Use as documentation reference only.",
271
- sourceTrustLevel: "high",
272
- riskLevel: "medium",
273
- sourceReviewStatus: "reviewed",
274
- lastReviewedAt: "2026-05-12",
275
- sourceSnapshot: { type: "docs_reference" },
276
- supportedAgents: ["claude-code"],
277
- sourceCategories: ["hooks", "lifecycle"],
278
- usefulPatterns: ["SessionStart", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PermissionRequest", "SessionEnd", "Stop"],
279
- adaptationCandidates: ["future deterministic enforcement-point mapping"],
280
- blockedPatterns: ["heavy new runtime hook system without safe existing infrastructure"],
281
- knownRisks: ["Hook coverage differs across hosts."],
282
- securityNotes: ["Use only for low-risk deterministic validations in v1."],
283
- licenseNotes: ["Reference patterns only."],
284
- attributionText: "Lifecycle mapping references Claude Code Hooks documentation.",
285
- allowedUseModes: ["reference_only", "adapted_internal"],
286
- defaultUseMode: "reference_only",
287
- dogfoodStatus: "reviewed_for_mapping",
288
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
289
- productDecision: "adapt_now",
290
- notesFile: "docs/references/source-review-notes.md",
291
- },
292
- {
293
- id: "agents-md",
294
- name: "AGENTS.md",
295
- sourceType: "spec",
296
- sourceUrl: "https://agents.md/",
297
- owner: "AGENTS.md",
298
- license: "spec_reference",
299
- licenseUrl: "https://agents.md/",
300
- attributionRequired: true,
301
- noticeRequired: false,
302
- commercialUseMetadata: "Use as open spec reference.",
303
- sourceTrustLevel: "high",
304
- riskLevel: "low",
305
- sourceReviewStatus: "reviewed",
306
- lastReviewedAt: "2026-05-12",
307
- sourceSnapshot: { type: "spec_reference" },
308
- supportedAgents: ["generic", "codex", "claude-code", "cursor", "gemini", "copilot"],
309
- sourceCategories: ["instructions", "adapter_guidance"],
310
- usefulPatterns: ["thin agent instruction surface"],
311
- adaptationCandidates: ["generated adapter AGENTS.md files"],
312
- blockedPatterns: ["pasting full skill bodies into AGENTS.md"],
313
- knownRisks: [],
314
- securityNotes: ["Keep generated files thin and public-safe."],
315
- licenseNotes: ["Reference the spec, do not over-copy text."],
316
- attributionText: "Adapter guidance is structured to align with AGENTS.md conventions.",
317
- allowedUseModes: ["reference_only", "adapted_internal"],
318
- defaultUseMode: "adapted_internal",
319
- dogfoodStatus: "generated_guidance",
320
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
321
- productDecision: "adapt_now",
322
- notesFile: "docs/references/source-review-notes.md",
323
- },
324
- {
325
- id: "cursor-rules-docs",
326
- name: "Cursor Rules docs",
327
- sourceType: "documentation",
328
- sourceUrl: "https://cursor.com/docs/rules",
329
- owner: "Cursor",
330
- license: "docs_reference",
331
- licenseUrl: "https://cursor.com/legal",
332
- attributionRequired: true,
333
- noticeRequired: false,
334
- commercialUseMetadata: "Use as documentation reference only.",
335
- sourceTrustLevel: "high",
336
- riskLevel: "low",
337
- sourceReviewStatus: "reviewed",
338
- lastReviewedAt: "2026-05-12",
339
- sourceSnapshot: { type: "docs_reference" },
340
- supportedAgents: ["cursor"],
341
- sourceCategories: ["rules", "adapter_behavior"],
342
- usefulPatterns: ["thin rules file"],
343
- adaptationCandidates: ["generated cursor rules file"],
344
- blockedPatterns: ["copying proprietary docs text into runtime"],
345
- knownRisks: [],
346
- securityNotes: ["Keep generated guidance thin."],
347
- licenseNotes: ["Reference patterns only."],
348
- attributionText: "Cursor adapter guidance references Cursor Rules documentation.",
349
- allowedUseModes: ["reference_only", "adapted_internal"],
350
- defaultUseMode: "adapted_internal",
351
- dogfoodStatus: "generated_guidance",
352
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
353
- productDecision: "adapt_now",
354
- notesFile: "docs/references/source-review-notes.md",
355
- },
356
- {
357
- id: "gemini-cli-gemini-md",
358
- name: "Gemini CLI GEMINI.md reference",
359
- sourceType: "guide",
360
- sourceUrl: "https://github.com/google-gemini/gemini-cli",
361
- owner: "Google",
362
- license: "reference_only_pending_review",
363
- licenseUrl: null,
364
- attributionRequired: true,
365
- noticeRequired: false,
366
- commercialUseMetadata: "Use as structural reference only until the exact document license is confirmed.",
367
- sourceTrustLevel: "medium",
368
- riskLevel: "medium",
369
- sourceReviewStatus: "reviewed",
370
- lastReviewedAt: "2026-05-12",
371
- sourceSnapshot: { type: "pattern_reference" },
372
- supportedAgents: ["gemini"],
373
- sourceCategories: ["adapter_behavior"],
374
- usefulPatterns: ["thin GEMINI.md adapter guidance"],
375
- adaptationCandidates: ["generated GEMINI.md file"],
376
- blockedPatterns: ["copying long upstream text"],
377
- knownRisks: ["Exact doc path/license not locked in this repo."],
378
- securityNotes: ["Keep guidance thin and point to core CLI."],
379
- licenseNotes: ["Pattern-level adaptation only."],
380
- attributionText: "Gemini adapter guidance uses thin-file patterns informed by Gemini CLI docs.",
381
- allowedUseModes: ["reference_only", "adapted_internal"],
382
- defaultUseMode: "adapted_internal",
383
- dogfoodStatus: "generated_guidance",
384
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
385
- productDecision: "adapt_now",
386
- notesFile: "docs/references/source-review-notes.md",
387
- },
388
- {
389
- id: "github-copilot-custom-instructions-docs",
390
- name: "GitHub Copilot custom instructions docs",
391
- sourceType: "documentation",
392
- sourceUrl: "https://docs.github.com/en/copilot/how-tos/custom-instructions/adding-repository-custom-instructions-for-github-copilot",
393
- owner: "GitHub",
394
- license: "docs_reference",
395
- licenseUrl: "https://docs.github.com/en/site-policy/github-terms/github-terms-of-service",
396
- attributionRequired: true,
397
- noticeRequired: false,
398
- commercialUseMetadata: "Use as documentation reference only.",
399
- sourceTrustLevel: "high",
400
- riskLevel: "low",
401
- sourceReviewStatus: "reviewed",
402
- lastReviewedAt: "2026-05-13",
403
- sourceSnapshot: { type: "docs_reference" },
404
- supportedAgents: ["copilot"],
405
- sourceCategories: ["instructions", "adapter_guidance"],
406
- usefulPatterns: ["repo instruction file", "path-specific instructions", "thin instruction surfaces"],
407
- adaptationCandidates: ["generated copilot guidance"],
408
- blockedPatterns: ["copying long docs text", "embedding core routing or policy logic in Copilot instructions"],
409
- knownRisks: ["Docs can evolve over time."],
410
- securityNotes: ["Keep generated files public-safe and thin."],
411
- licenseNotes: ["Reference patterns only."],
412
- attributionText: "Copilot guidance patterns align with GitHub Copilot custom instruction docs.",
413
- allowedUseModes: ["reference_only", "adapted_internal"],
414
- defaultUseMode: "adapted_internal",
415
- dogfoodStatus: "reviewed_for_adapter_generation",
416
- dogfoodEvidencePath: "docs/dogfood/skills-operating-layer-dogfood.md",
417
- productDecision: "adapt_now",
418
- notesFile: "docs/references/source-review-notes.md",
419
- },
420
- {
421
- id: "play-ai-workspace",
422
- name: "Play AI Workspace",
423
- sourceType: "product_reference",
424
- sourceUrl: "https://play.fast/",
425
- owner: "Play",
426
- license: "reference_only",
427
- licenseUrl: null,
428
- attributionRequired: true,
429
- noticeRequired: false,
430
- commercialUseMetadata: "Product-positioning reference only.",
431
- sourceTrustLevel: "medium",
432
- riskLevel: "medium",
433
- sourceReviewStatus: "reviewed",
434
- lastReviewedAt: "2026-05-12",
435
- sourceSnapshot: { type: "product_positioning_reference" },
436
- supportedAgents: ["generic"],
437
- sourceCategories: ["positioning"],
438
- usefulPatterns: ["invisible AI", "works with existing stack", "permissions as adoption enabler"],
439
- adaptationCandidates: ["website copy positioning"],
440
- blockedPatterns: ["copying text", "copying design", "copying screenshots", "copying assets"],
441
- knownRisks: ["Product pages are not reusable source material."],
442
- securityNotes: ["Reference only."],
443
- licenseNotes: ["No text or design reuse."],
444
- attributionText: "Positioning patterns informed by Play AI Workspace product references.",
445
- allowedUseModes: ["reference_only"],
446
- defaultUseMode: "reference_only",
447
- dogfoodStatus: "positioning_review_only",
448
- dogfoodEvidencePath: "docs/dogfood/operating-layer-dogfood-report.md",
449
- productDecision: "reference_only",
450
- notesFile: "docs/references/source-review-notes.md",
451
- },
452
- {
453
- id: "impeccable-systems",
454
- name: "Impeccable design skill systems",
455
- sourceType: "repository",
456
- sourceUrl: "unknown",
457
- owner: "unknown",
458
- license: "unknown",
459
- licenseUrl: null,
460
- attributionRequired: true,
461
- noticeRequired: true,
462
- commercialUseMetadata: "Exact source and license must be confirmed before reuse.",
463
- sourceTrustLevel: "low",
464
- riskLevel: "high",
465
- sourceReviewStatus: "unreviewed",
466
- lastReviewedAt: "2026-05-12",
467
- sourceSnapshot: { type: "placeholder_reference" },
468
- supportedAgents: ["claude-code", "codex"],
469
- sourceCategories: ["frontend_quality"],
470
- usefulPatterns: ["frontend anti-pattern vocabulary"],
471
- adaptationCandidates: ["frontend readiness heuristics"],
472
- blockedPatterns: ["copying code or text without confirmed source/license"],
473
- knownRisks: ["Exact upstream reference was not present in the repo."],
474
- securityNotes: ["Reference only until exact source is reviewed."],
475
- licenseNotes: ["Blocked from copying until confirmed."],
476
- attributionText: "Potential frontend-readiness patterns pending exact source confirmation.",
477
- allowedUseModes: ["reference_only", "blocked"],
478
- defaultUseMode: "reference_only",
479
- dogfoodStatus: "deferred_pending_exact_source",
480
- dogfoodEvidencePath: "docs/Capability-Sources.md",
481
- productDecision: "defer",
482
- notesFile: "docs/references/source-review-notes.md",
483
- },
484
- {
485
- id: "marketing-skills-systems",
486
- name: "Marketing skill systems",
487
- sourceType: "repository",
488
- sourceUrl: "unknown",
489
- owner: "unknown",
490
- license: "unknown",
491
- licenseUrl: null,
492
- attributionRequired: true,
493
- noticeRequired: true,
494
- commercialUseMetadata: "Exact source and license must be confirmed before reuse.",
495
- sourceTrustLevel: "low",
496
- riskLevel: "high",
497
- sourceReviewStatus: "unreviewed",
498
- lastReviewedAt: "2026-05-12",
499
- sourceSnapshot: { type: "placeholder_reference" },
500
- supportedAgents: ["claude-code", "codex"],
501
- sourceCategories: ["marketing_readiness"],
502
- usefulPatterns: ["positioning review", "SEO/CRO basics", "article outline review"],
503
- adaptationCandidates: ["marketing readiness heuristics"],
504
- blockedPatterns: ["copying code or text without confirmed source/license"],
505
- knownRisks: ["Exact upstream reference was not present in the repo."],
506
- securityNotes: ["Reference only until exact source is reviewed."],
507
- licenseNotes: ["Blocked from copying until confirmed."],
508
- attributionText: "Potential marketing-readiness patterns pending exact source confirmation.",
509
- allowedUseModes: ["reference_only", "blocked"],
510
- defaultUseMode: "reference_only",
511
- dogfoodStatus: "deferred_pending_exact_source",
512
- dogfoodEvidencePath: "docs/Capability-Sources.md",
513
- productDecision: "defer",
514
- notesFile: "docs/references/source-review-notes.md",
515
- },
516
- ]);
517
-
518
- const SOURCE_MAP = new Map(SOURCE_CATALOG.map((entry) => [entry.id, entry]));
519
-
520
- const REQUIRED_FIELDS = [
521
- "id",
522
- "name",
523
- "sourceUrl",
524
- "sourceType",
525
- "license",
526
- "sourceTrustLevel",
527
- "riskLevel",
528
- "sourceReviewStatus",
529
- "allowedUseModes",
530
- "defaultUseMode",
531
- "productDecision",
532
- "notesFile",
533
- ];
534
-
535
- function validateSource(entry) {
536
- const errors = [];
537
- for (const field of REQUIRED_FIELDS) {
538
- if (entry[field] === undefined || entry[field] === null || entry[field] === "") {
539
- errors.push(`Missing required field: ${field}`);
540
- }
541
- }
542
-
543
- if (!VALID_SOURCE_TYPES.has(entry.sourceType)) {
544
- errors.push(`Invalid sourceType: ${entry.sourceType}`);
545
- }
546
- if (!VALID_SOURCE_TRUST_LEVELS.has(entry.sourceTrustLevel)) {
547
- errors.push(`Invalid sourceTrustLevel: ${entry.sourceTrustLevel}`);
548
- }
549
- if (!VALID_RISK_LEVELS.has(entry.riskLevel)) {
550
- errors.push(`Invalid riskLevel: ${entry.riskLevel}`);
551
- }
552
- if (!VALID_SOURCE_REVIEW_STATUSES.has(entry.sourceReviewStatus)) {
553
- errors.push(`Invalid sourceReviewStatus: ${entry.sourceReviewStatus}`);
554
- }
555
- if (!VALID_PRODUCT_DECISIONS.has(entry.productDecision)) {
556
- errors.push(`Invalid productDecision: ${entry.productDecision}`);
557
- }
558
- if (!Array.isArray(entry.allowedUseModes) || entry.allowedUseModes.length === 0) {
559
- errors.push("allowedUseModes must be a non-empty array");
560
- } else {
561
- entry.allowedUseModes.forEach((mode) => {
562
- if (!VALID_ALLOWED_USE_MODES.has(mode)) {
563
- errors.push(`Invalid allowedUseMode: ${mode}`);
564
- }
565
- });
566
- }
567
- if (!VALID_ALLOWED_USE_MODES.has(entry.defaultUseMode)) {
568
- errors.push(`Invalid defaultUseMode: ${entry.defaultUseMode}`);
569
- }
570
- if (Array.isArray(entry.allowedUseModes) && !entry.allowedUseModes.includes(entry.defaultUseMode)) {
571
- errors.push("defaultUseMode must be included in allowedUseModes");
572
- }
573
- if (entry.sourceReviewStatus === "unreviewed" && entry.defaultUseMode === "vendored_with_attribution") {
574
- errors.push("Unreviewed sources cannot default to vendored_with_attribution");
575
- }
576
- if ((entry.license === "unknown" || entry.license === "reference_only_pending_review") && entry.defaultUseMode === "vendored_with_attribution") {
577
- errors.push("Sources without a confirmed reusable license cannot default to vendored_with_attribution");
578
- }
579
- return { valid: errors.length === 0, errors };
580
- }
581
-
582
- function validateSourceCatalog() {
583
- const errors = [];
584
- const seenIds = new Set();
585
-
586
- SOURCE_CATALOG.forEach((entry) => {
587
- if (seenIds.has(entry.id)) {
588
- errors.push(`Duplicate source ID: ${entry.id}`);
589
- }
590
- seenIds.add(entry.id);
591
- const result = validateSource(entry);
592
- result.errors.forEach((error) => errors.push(`[${entry.id}] ${error}`));
593
- });
594
-
595
- return { valid: errors.length === 0, errors };
596
- }
597
-
598
- function getSource(id) {
599
- return SOURCE_MAP.get(String(id || "").trim()) || null;
600
- }
601
-
602
- function listSources() {
603
- return Array.from(SOURCE_CATALOG);
604
- }
605
-
606
- function isSourceAutoRunnable(id) {
607
- const entry = getSource(id);
608
- if (!entry) return false;
609
- if (entry.sourceReviewStatus !== "trusted") return false;
610
- return entry.defaultUseMode === "wrapped_adapter" || entry.defaultUseMode === "adapted_internal";
611
- }
612
-
613
- function canVendorSource(id) {
614
- const entry = getSource(id);
615
- if (!entry) return false;
616
- if (entry.license === "unknown" || entry.license === "reference_only_pending_review") return false;
617
- return entry.allowedUseModes.includes("vendored_with_attribution");
618
- }
619
-
620
- function hasConfirmedReusableLicense(entry) {
621
- return !["unknown", "reference_only_pending_review", "docs_reference", "spec_reference", "reference_only"].includes(entry.license);
622
- }
623
-
624
- function allowsReusableDecision(entry) {
625
- return entry.productDecision === "adopt_now" || entry.productDecision === "adapt_now";
626
- }
627
-
628
- function canReuseSource(entry) {
629
- if (!allowsReusableDecision(entry)) return false;
630
- if (!hasConfirmedReusableLicense(entry)) return false;
631
- return entry.allowedUseModes.includes("vendored_with_attribution") || entry.allowedUseModes.includes("adapted_internal");
632
- }
633
-
634
- function canCopyCode(entry) {
635
- if (!allowsReusableDecision(entry)) return false;
636
- if (!hasConfirmedReusableLicense(entry)) return false;
637
- return entry.allowedUseModes.includes("vendored_with_attribution");
638
- }
639
-
640
- function canCopyText(entry) {
641
- if (!allowsReusableDecision(entry)) return false;
642
- if (!hasConfirmedReusableLicense(entry)) return false;
643
- if (entry.sourceType === "documentation" || entry.sourceType === "product_reference" || entry.sourceType === "spec" || entry.sourceType === "guide") {
644
- return false;
645
- }
646
- return false;
647
- }
648
-
649
- function canLearnPatterns(entry) {
650
- return entry.productDecision !== "blocked";
651
- }
652
-
653
- function toReferenceJsonEntry(entry) {
654
- return {
655
- id: entry.id,
656
- name: entry.name,
657
- sourceUrl: entry.sourceUrl,
658
- sourceType: entry.sourceType,
659
- license: entry.license,
660
- sourceTrustLevel: entry.sourceTrustLevel,
661
- riskLevel: entry.riskLevel,
662
- decision: entry.productDecision,
663
- reuseAllowed: canReuseSource(entry),
664
- copyCodeAllowed: canCopyCode(entry),
665
- copyTextAllowed: canCopyText(entry),
666
- learnPatternAllowed: canLearnPatterns(entry),
667
- attributionRequired: entry.attributionRequired,
668
- avoreloFit: entry.sourceCategories.join(", "),
669
- implementationArea: entry.adaptationCandidates.join(", "),
670
- notesFile: entry.notesFile,
671
- lastReviewed: entry.lastReviewedAt,
672
- };
673
- }
674
-
675
- function resolveNotesPath(cwd, entry) {
676
- return path.join(cwd, entry.notesFile);
677
- }
678
-
679
- module.exports = {
680
- SOURCE_CATALOG,
681
- VALID_SOURCE_TYPES,
682
- VALID_SOURCE_TRUST_LEVELS,
683
- VALID_RISK_LEVELS,
684
- VALID_SOURCE_REVIEW_STATUSES,
685
- VALID_ALLOWED_USE_MODES,
686
- VALID_PRODUCT_DECISIONS,
687
- validateSource,
688
- validateSourceCatalog,
689
- getSource,
690
- listSources,
691
- isSourceAutoRunnable,
692
- canVendorSource,
693
- toReferenceJsonEntry,
694
- hasConfirmedReusableLicense,
695
- canReuseSource,
696
- canCopyCode,
697
- canCopyText,
698
- canLearnPatterns,
699
- resolveNotesPath,
700
- };