diff --git "a/source-snapshot.json" "b/source-snapshot.json"
new file mode 100644--- /dev/null
+++ "b/source-snapshot.json"
@@ -0,0 +1,164 @@
+{
+ "build_buy": {
+ "commit": "c8ad4067654a6777cea3b652a80f62dc6aeb21fb",
+ "files": {
+ "DATA-LICENSE.md": {
+ "content": "# Data license\n\nThe original decision-model registries in `data/` are licensed under Creative\nCommons Attribution 4.0 International (CC BY 4.0). Third-party source titles,\ntrademarks and linked works remain the property of their respective owners.\n",
+ "sha256": "sha256:6bf6af383376986dca1b4aa4c3bd9e4ce17cab8a75c18d62094cdf29be1e3840",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/DATA-LICENSE.md"
+ },
+ "LICENSE": {
+ "content": "MIT License\n\nCopyright (c) 2026 Pharos Production\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "sha256": "sha256:48463cc27a86bdc41249f2e93168615728c7860d350b4dd51c7606e5c512555e",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/LICENSE"
+ },
+ "README.md": {
+ "content": "# Build vs Buy AI Agent Scorecard\n\nDependency-free GitHub Pages decision tool for AI agent build, buy and hybrid\nsourcing. It combines a versioned 12-factor scorecard, explicit unknown and\nconstraint states, a three-year TCO model and deterministic exports.\n\nCanonical URL:\nhttps://pharosproduction.github.io/build-vs-buy-ai-agent-scorecard/\n\n## Verify locally\n\n```bash\nnpm run verify\n```\n\nUse Node.js 22 or newer. The production site is the `docs/` directory and has\nno runtime dependencies.\n\n## Model boundary\n\nThe score is an authored decision aid, not a probability, confidence score,\nbenchmark, forecast or substitute for architecture, legal, security or\nfinancial review. Bundled TCO amounts are editable examples, not prices.\n",
+ "sha256": "sha256:1e3b416b11c1bd14a0fe28f86d0ed2c4015891d0d94456ba99e8a110f87b13f3",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/README.md"
+ },
+ "data/claims.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"claims\": [\n {\n \"id\": \"CLM-METHOD-001\",\n \"statement\": \"The scorecard uses 12 criteria with total weight 31, a signed decision index from -100 to +100 and transparent thresholds at -30 and +30.\",\n \"boundary\": \"This is an authored model contract, not an externally calibrated probability, forecast or benchmark.\",\n \"sourceIds\": [\"SRC-PHAROS-BUILD-BUY\"]\n },\n {\n \"id\": \"CLM-RISK-001\",\n \"statement\": \"AI sourcing decisions still require full-lifecycle risk ownership across design, development, use, evaluation and acquisition.\",\n \"boundary\": \"NIST guidance is voluntary and does not transfer legal or operational accountability.\",\n \"sourceIds\": [\"SRC-NIST-AI-RMF\", \"SRC-NIST-GAI-PROFILE\"]\n },\n {\n \"id\": \"CLM-TCO-001\",\n \"statement\": \"Technology TCO should include acquisition, management, support, labor, downtime, training and other productivity costs across time.\",\n \"boundary\": \"The categories are broad; each organization must supply its own amounts and measurable workload units.\",\n \"sourceIds\": [\"SRC-FINOPS-TCO\"]\n },\n {\n \"id\": \"CLM-READINESS-001\",\n \"statement\": \"Workforce capability, infrastructure, context and data, security, regulatory requirements and ability to scale are relevant to an agent sourcing decision.\",\n \"boundary\": \"The cited consultancy framework is a relevance source, not independent proof of which path will succeed.\",\n \"sourceIds\": [\"SRC-KPMG-BUILD-BUY-BORROW\"]\n },\n {\n \"id\": \"CLM-FACTOR-001\",\n \"statement\": \"Cost, strategic differentiation, asset specificity, vendor lock-in, time to market, quality and compliance, and organizational capability are recurring make-or-buy determinants in the cited conceptual analysis.\",\n \"boundary\": \"The paper is conceptual and does not empirically validate this scorecard's weights or thresholds.\",\n \"sourceIds\": [\"SRC-ARXIV-MAKE-BUY\"]\n }\n ]\n}\n",
+ "sha256": "sha256:6890c6712af4550f520b44187fea89b07eb40f102e8207eebf7a1ec24e4f4e38",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/claims.json"
+ },
+ "data/criteria.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"publishedOn\": \"2026-08-25\",\n \"totalWeight\": 31,\n \"thresholds\": {\n \"buyMax\": -30,\n \"buildMin\": 30,\n \"boundaryMargin\": 7,\n \"minimumKnownWeightShare\": 0.75\n },\n \"criteria\": [\n {\n \"id\": \"strategic_differentiation\",\n \"order\": 1,\n \"label\": \"Strategic differentiation\",\n \"question\": \"How much of the agent's behavior creates a durable product or operating advantage?\",\n \"whyItMatters\": \"Commodity capability is expensive to recreate. Differentiating decision logic can be risky to surrender to a vendor roadmap.\",\n \"weight\": 3,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Useful but commodity\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The workflow is available from several credible products and is not central to competitive advantage.\", \"evidencePrompt\": \"Name the available products and the exact capability each already covers.\" },\n { \"id\": \"hybrid\", \"label\": \"Some differentiated logic\", \"value\": 0, \"blocks\": [], \"interpretation\": \"The shell is common, but domain rules or user experience contain differentiated work.\", \"evidencePrompt\": \"Separate commodity platform functions from logic that must remain yours.\" },\n { \"id\": \"build\", \"label\": \"Core proprietary capability\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The agent's behavior, feedback loop or workflow is part of the product moat.\", \"evidencePrompt\": \"Describe what a competitor could not reproduce by buying the same platform.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"The strategic role has not been agreed.\", \"evidencePrompt\": \"Get a product-owner decision before treating the score as ready.\" }\n ]\n },\n {\n \"id\": \"workflow_uniqueness\",\n \"order\": 2,\n \"label\": \"Workflow and policy uniqueness\",\n \"question\": \"Are the agent's rules, tools and exception paths standard or organization-specific?\",\n \"whyItMatters\": \"A standard workflow favors configuration. Deep policy logic and unusual exceptions increase the value of owned orchestration.\",\n \"weight\": 3,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Standard workflow\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The process follows common product patterns with limited exceptions.\", \"evidencePrompt\": \"List the required steps and map them to available vendor features.\" },\n { \"id\": \"hybrid\", \"label\": \"Standard core, custom edges\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Most steps are standard while a few rules or actions need owned extensions.\", \"evidencePrompt\": \"Mark each step as configure, extend or own.\" },\n { \"id\": \"build\", \"label\": \"Proprietary policy engine\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The process depends on organization-specific rules, exceptions or sequencing.\", \"evidencePrompt\": \"Document the exceptions that generic products cannot express safely.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"The real workflow has not been mapped.\", \"evidencePrompt\": \"Run a workflow discovery session with operators and control owners.\" }\n ]\n },\n {\n \"id\": \"data_control\",\n \"order\": 3,\n \"label\": \"Data control and residency\",\n \"question\": \"Can an approved vendor path meet data location, retention, deletion and training-use constraints?\",\n \"whyItMatters\": \"A mandatory control that the shortlist cannot meet disqualifies a pure buy decision regardless of feature fit.\",\n \"weight\": 3,\n \"gateCritical\": true,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Approved vendor path exists\", \"value\": -1, \"blocks\": [], \"interpretation\": \"A shortlisted vendor can meet documented handling and residency requirements.\", \"evidencePrompt\": \"Attach the approved data-flow, retention terms and deletion test.\" },\n { \"id\": \"hybrid\", \"label\": \"Sensitive boundary can be isolated\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Commodity services are acceptable outside a controlled data and policy boundary.\", \"evidencePrompt\": \"Draw the trust boundary and identify which fields may cross it.\" },\n { \"id\": \"build\", \"label\": \"Controlled custom path required\", \"value\": 1, \"blocks\": [\"BUY\"], \"interpretation\": \"No approved vendor route currently meets a mandatory data-control constraint.\", \"evidencePrompt\": \"Cite the binding policy, regulation or security decision and the failed vendor requirement.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"Data classification or vendor handling is unresolved.\", \"evidencePrompt\": \"Complete data classification and a vendor data-flow review.\" }\n ]\n },\n {\n \"id\": \"integration_depth\",\n \"order\": 4,\n \"label\": \"Integration depth\",\n \"question\": \"How deeply must the agent interact with systems, permissions and failure recovery?\",\n \"whyItMatters\": \"Connector count alone is weak evidence. Permission fidelity, write actions and recovery semantics drive integration ownership.\",\n \"weight\": 3,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Standard connectors and reads\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The use case relies on supported connectors and limited read-oriented access.\", \"evidencePrompt\": \"Verify the exact objects, permissions and rate limits in the vendor connector.\" },\n { \"id\": \"hybrid\", \"label\": \"Mixed connector depth\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Common systems are covered, but one or more integrations require owned adapters.\", \"evidencePrompt\": \"Identify the crown-jewel integrations and keep their contracts portable.\" },\n { \"id\": \"build\", \"label\": \"Deep custom transaction paths\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The agent needs legacy access, custom APIs, transactional writes or organization-specific recovery.\", \"evidencePrompt\": \"Map identity, authorization, idempotency, rollback and reconciliation for each action.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"The integration inventory is incomplete.\", \"evidencePrompt\": \"Inventory systems, actions, permissions, error modes and data owners.\" }\n ]\n },\n {\n \"id\": \"time_to_value\",\n \"order\": 5,\n \"label\": \"Time to validated value\",\n \"question\": \"How soon must a production-like workflow produce measurable evidence?\",\n \"whyItMatters\": \"Urgency favors a configurable baseline, while a longer decision window can support owned architecture and repeated evaluation.\",\n \"weight\": 3,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Evidence needed immediately\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The business needs a production-like baseline before a custom platform could be staffed and built.\", \"evidencePrompt\": \"Name the decision deadline and the KPI that must be measured by then.\" },\n { \"id\": \"hybrid\", \"label\": \"Phased evidence window\", \"value\": 0, \"blocks\": [], \"interpretation\": \"A vendor or open component can establish a baseline while custom boundaries are validated.\", \"evidencePrompt\": \"Define the first reversible slice and the later migration gate.\" },\n { \"id\": \"build\", \"label\": \"Longer validation horizon\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The roadmap can absorb iterative architecture, evaluation and operating-model work.\", \"evidencePrompt\": \"Confirm staffing dates, release gates and the cost of delayed learning.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"No decision deadline or measurable outcome is agreed.\", \"evidencePrompt\": \"Set a business deadline and a production-like validation target.\" }\n ]\n },\n {\n \"id\": \"team_capability\",\n \"order\": 6,\n \"label\": \"Engineering and product capability\",\n \"question\": \"Can a named internal team design, test and evolve the agent beyond a prototype?\",\n \"whyItMatters\": \"Build capacity includes product ownership, data engineering, security and evaluation, not only prompt or application code.\",\n \"weight\": 3,\n \"gateCritical\": true,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"No dedicated build team\", \"value\": -1, \"blocks\": [\"BUILD\"], \"interpretation\": \"The organization cannot assign a durable cross-functional owner team.\", \"evidencePrompt\": \"Record the unfilled roles and the opportunity cost of reallocating staff.\" },\n { \"id\": \"hybrid\", \"label\": \"Strong software team, selective gaps\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Internal engineers can own integration and domain logic while buying missing platform capability.\", \"evidencePrompt\": \"Assign owners for product, platform, data, security and evaluation.\" },\n { \"id\": \"build\", \"label\": \"Experienced agent delivery team\", \"value\": 1, \"blocks\": [], \"interpretation\": \"A durable team has relevant delivery and operating experience.\", \"evidencePrompt\": \"Name the people, allocation, prior systems and on-call plan.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"Staffing is hypothetical.\", \"evidencePrompt\": \"Replace role names with named owners and committed capacity.\" }\n ]\n },\n {\n \"id\": \"lifecycle_capacity\",\n \"order\": 7,\n \"label\": \"Lifecycle ownership\",\n \"question\": \"Who will operate evaluation, monitoring, incidents and model or vendor changes?\",\n \"whyItMatters\": \"The sourcing choice changes the work, but it never removes responsibility for outcomes and controls.\",\n \"weight\": 3,\n \"gateCritical\": true,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Need managed lifecycle coverage\", \"value\": -1, \"blocks\": [\"BUILD\"], \"interpretation\": \"The organization needs a vendor to carry much of the platform lifecycle.\", \"evidencePrompt\": \"Confirm what the vendor operates and what remains your responsibility.\" },\n { \"id\": \"hybrid\", \"label\": \"Shared operating model\", \"value\": 0, \"blocks\": [], \"interpretation\": \"The vendor runs commodity layers while the organization owns domain quality and incidents.\", \"evidencePrompt\": \"Create a RACI for monitoring, changes, incidents, data and access.\" },\n { \"id\": \"build\", \"label\": \"Full internal lifecycle team\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The organization can own releases, regressions, infrastructure and incident response.\", \"evidencePrompt\": \"Attach the evaluation cadence, on-call rota, rollback path and change policy.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"No operating owner has accepted responsibility.\", \"evidencePrompt\": \"Assign durable owners before approving a build.\" }\n ]\n },\n {\n \"id\": \"capital_shape\",\n \"order\": 8,\n \"label\": \"Budget and capital shape\",\n \"question\": \"Does the organization prefer lower initial commitment or controlled long-term investment?\",\n \"whyItMatters\": \"The same nominal budget can produce different decisions depending on cash timing and approved headcount.\",\n \"weight\": 2,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Lower initial commitment\", \"value\": -1, \"blocks\": [], \"interpretation\": \"Subscription or usage spend is easier to approve than a larger internal build.\", \"evidencePrompt\": \"Record approved setup spend, recurring spend and procurement limits.\" },\n { \"id\": \"hybrid\", \"label\": \"Balanced spend profile\", \"value\": 0, \"blocks\": [], \"interpretation\": \"The budget can fund a platform and a bounded custom layer.\", \"evidencePrompt\": \"Separate vendor, integration, internal labor and contingency budgets.\" },\n { \"id\": \"build\", \"label\": \"Front-loaded investment is approved\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The organization can fund discovery, engineering and operating capability before benefits stabilize.\", \"evidencePrompt\": \"Verify capital, headcount and contingency approvals.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"Budget shape is not approved.\", \"evidencePrompt\": \"Get separate approval ranges for one-time and recurring spend.\" }\n ]\n },\n {\n \"id\": \"scale_economics\",\n \"order\": 9,\n \"label\": \"Scale and unit economics\",\n \"question\": \"Are demand, workload units and marginal costs measurable enough to compare paths?\",\n \"whyItMatters\": \"A low pilot price says little about per-user, per-task or per-action economics at production scale.\",\n \"weight\": 2,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Demand is uncertain or modest\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The organization benefits from avoiding fixed platform investment while demand is unproven.\", \"evidencePrompt\": \"Define the unit of work and a bounded adoption range.\" },\n { \"id\": \"hybrid\", \"label\": \"Scale is measurable, crossover unclear\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Usage can be measured, but the economic crossover requires a live baseline.\", \"evidencePrompt\": \"Track cost per successful task, active user, action and exception.\" },\n { \"id\": \"build\", \"label\": \"High predictable scale\", \"value\": 1, \"blocks\": [], \"interpretation\": \"Stable high volume can justify owned cost controls and reusable platform work.\", \"evidencePrompt\": \"Show demand, peak shape, growth assumptions and cost per successful outcome.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"No unit or demand model exists.\", \"evidencePrompt\": \"Define a measurable unit and collect a baseline.\" }\n ]\n },\n {\n \"id\": \"portability_tolerance\",\n \"order\": 10,\n \"label\": \"Portability and vendor dependency\",\n \"question\": \"What must remain movable if the model, platform or commercial terms change?\",\n \"whyItMatters\": \"Code ownership is incomplete when prompts, evals, state, logs or deployment cannot leave the vendor runtime.\",\n \"weight\": 2,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Contractual dependency is acceptable\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The organization accepts a managed platform dependency with bounded exit terms.\", \"evidencePrompt\": \"Record renewal, export, termination assistance and deletion terms.\" },\n { \"id\": \"hybrid\", \"label\": \"Portable core, managed shell\", \"value\": 0, \"blocks\": [], \"interpretation\": \"Domain logic, data and evals remain portable while replaceable services are bought.\", \"evidencePrompt\": \"Run an export and redeploy test for the assets that must remain yours.\" },\n { \"id\": \"build\", \"label\": \"High portability requirement\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The organization needs control over runtime boundaries and migration paths.\", \"evidencePrompt\": \"List every asset needed to operate after vendor account termination.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"Exit requirements are undefined.\", \"evidencePrompt\": \"Write an exit scenario before vendor selection or platform build.\" }\n ]\n },\n {\n \"id\": \"evaluation_control\",\n \"order\": 11,\n \"label\": \"Evaluation and observability control\",\n \"question\": \"Can a bought product expose the evidence needed to test domain quality and actions?\",\n \"whyItMatters\": \"A system cannot be governed from a demo score. Teams need test sets, traces, failure labels and release gates tied to their own workflow.\",\n \"weight\": 2,\n \"gateCritical\": false,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Vendor evidence is sufficient\", \"value\": -1, \"blocks\": [], \"interpretation\": \"The platform exposes the required traces, eval hooks, exports and release controls.\", \"evidencePrompt\": \"Verify each required artifact in a production-like trial.\" },\n { \"id\": \"hybrid\", \"label\": \"Own evals around a bought runtime\", \"value\": 0, \"blocks\": [], \"interpretation\": \"The platform can be wrapped by an organization-owned test and observability layer.\", \"evidencePrompt\": \"Keep test data, metrics and release criteria outside the vendor-only surface.\" },\n { \"id\": \"build\", \"label\": \"Domain-specific evidence is central\", \"value\": 1, \"blocks\": [], \"interpretation\": \"The use case needs custom evaluation, traces or action-level controls unavailable from products.\", \"evidencePrompt\": \"Name the failure taxonomy, test set, trace fields and stop conditions.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"The evidence contract is not defined.\", \"evidencePrompt\": \"Define what must be observable before comparing vendors or architectures.\" }\n ]\n },\n {\n \"id\": \"compliance_path\",\n \"order\": 12,\n \"label\": \"Compliance and third-party path\",\n \"question\": \"Which sourcing path can produce the required approvals, records and accountability?\",\n \"whyItMatters\": \"A vendor certification does not transfer accountability. A custom build also creates documentation and control obligations.\",\n \"weight\": 2,\n \"gateCritical\": true,\n \"options\": [\n { \"id\": \"buy\", \"label\": \"Approved vendor controls fit\", \"value\": -1, \"blocks\": [], \"interpretation\": \"A vendor route can satisfy documented procurement, security and compliance gates.\", \"evidencePrompt\": \"Attach the approved control matrix, contracts and residual-risk owner.\" },\n { \"id\": \"hybrid\", \"label\": \"Control boundary must be shared\", \"value\": 0, \"blocks\": [], \"interpretation\": \"The path needs vendor evidence plus organization-owned controls and records.\", \"evidencePrompt\": \"Map each obligation to the vendor, internal owner or shared process.\" },\n { \"id\": \"build\", \"label\": \"Custom controlled path required\", \"value\": 1, \"blocks\": [\"BUY\"], \"interpretation\": \"A mandatory approval or control cannot be met by the current vendor shortlist.\", \"evidencePrompt\": \"Cite the failed gate and the evidence a controlled build must produce.\" },\n { \"id\": \"unknown\", \"label\": \"Unknown\", \"value\": null, \"blocks\": [], \"interpretation\": \"The applicable obligations or approval route are unresolved.\", \"evidencePrompt\": \"Get legal, security and risk owners to classify the use case.\" }\n ]\n }\n ]\n}\n",
+ "sha256": "sha256:baa562980cf07255e2bf4fa1fded945dadaffcb7726abf7f7d07313d2d506cbd",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/criteria.json"
+ },
+ "data/methodology.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"publishedOn\": \"2026-08-25\",\n \"lastVerifiedOn\": \"2026-08-25\",\n \"exportSchemaVersion\": \"1.0.0\",\n \"formula\": \"round-half-away-from-zero(100 * signed known points / known weight)\",\n \"scoringScale\": {\n \"buy\": -1,\n \"hybrid\": 0,\n \"build\": 1,\n \"unknown\": null\n },\n \"outcomeIds\": [\"BUY\", \"HYBRID\", \"BUILD\", \"UNRESOLVED\"],\n \"statusIds\": [\"DECISION_READY\", \"INSUFFICIENT_DECISION_EVIDENCE\", \"CONSTRAINT_REVIEW_REQUIRED\"],\n \"procedure\": [\n \"Choose one evidence-backed answer for each criterion.\",\n \"Multiply each known answer value by its criterion weight and sum signed points.\",\n \"Normalize signed points only across known weight so unknown answers never act as neutral evidence.\",\n \"Apply BUY at -30 or lower, BUILD at +30 or higher and HYBRID between those thresholds.\",\n \"Withhold a decision when known-weight coverage is below 75 percent or any gate-critical criterion is unknown.\",\n \"Show a decision-boundary warning when the index is within seven points of either outcome threshold.\",\n \"If a selected constraint blocks the numeric outcome, require constraint review and return HYBRID as the working architecture boundary.\",\n \"Compare the result with editable three-year TCO assumptions and record both artifacts together.\"\n ],\n \"boundaries\": [\n \"The decision index is an authored decision-support model, not a probability, benchmark, forecast or confidence score.\",\n \"Thresholds are transparent editorial defaults and have not been statistically calibrated against project outcomes.\",\n \"TCO values are editable scenario assumptions, not Pharos pricing and not market averages.\",\n \"A low-cost path can still fail a mandatory data, security, legal or operating constraint.\",\n \"The tool does not replace architecture discovery, procurement, security review, legal advice or financial analysis.\"\n ],\n \"registryVersions\": {\n \"criteria\": \"1.0.0\",\n \"tco\": \"1.0.0\",\n \"sources\": \"1.0.0\",\n \"claims\": \"1.0.0\"\n }\n}\n",
+ "sha256": "sha256:f5eeacd9f42d14adfa004ac0b23d82dab77cf341de08623c7eb35d1c36f315f0",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/methodology.json"
+ },
+ "data/profiles.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"profiles\": [\n {\n \"id\": \"blank\",\n \"label\": \"Start blank\",\n \"description\": \"Every answer remains unknown until evidence is supplied.\",\n \"answers\": {\n \"strategic_differentiation\": \"unknown\",\n \"workflow_uniqueness\": \"unknown\",\n \"data_control\": \"unknown\",\n \"integration_depth\": \"unknown\",\n \"time_to_value\": \"unknown\",\n \"team_capability\": \"unknown\",\n \"lifecycle_capacity\": \"unknown\",\n \"capital_shape\": \"unknown\",\n \"scale_economics\": \"unknown\",\n \"portability_tolerance\": \"unknown\",\n \"evaluation_control\": \"unknown\",\n \"compliance_path\": \"unknown\"\n }\n },\n {\n \"id\": \"commodity-internal\",\n \"label\": \"Commodity internal workflow\",\n \"description\": \"Common workflow, modest scale, approved vendor route and urgent baseline.\",\n \"answers\": {\n \"strategic_differentiation\": \"buy\",\n \"workflow_uniqueness\": \"buy\",\n \"data_control\": \"buy\",\n \"integration_depth\": \"buy\",\n \"time_to_value\": \"buy\",\n \"team_capability\": \"hybrid\",\n \"lifecycle_capacity\": \"buy\",\n \"capital_shape\": \"buy\",\n \"scale_economics\": \"buy\",\n \"portability_tolerance\": \"buy\",\n \"evaluation_control\": \"hybrid\",\n \"compliance_path\": \"buy\"\n }\n },\n {\n \"id\": \"controlled-core\",\n \"label\": \"Differentiated controlled system\",\n \"description\": \"Proprietary workflow with deep integrations, controlled data path and durable internal ownership.\",\n \"answers\": {\n \"strategic_differentiation\": \"build\",\n \"workflow_uniqueness\": \"build\",\n \"data_control\": \"build\",\n \"integration_depth\": \"build\",\n \"time_to_value\": \"hybrid\",\n \"team_capability\": \"build\",\n \"lifecycle_capacity\": \"build\",\n \"capital_shape\": \"build\",\n \"scale_economics\": \"build\",\n \"portability_tolerance\": \"build\",\n \"evaluation_control\": \"build\",\n \"compliance_path\": \"build\"\n }\n },\n {\n \"id\": \"hybrid-transition\",\n \"label\": \"Hybrid transition\",\n \"description\": \"Buy commodity infrastructure while retaining domain logic, critical adapters and evaluation assets.\",\n \"answers\": {\n \"strategic_differentiation\": \"hybrid\",\n \"workflow_uniqueness\": \"hybrid\",\n \"data_control\": \"hybrid\",\n \"integration_depth\": \"build\",\n \"time_to_value\": \"hybrid\",\n \"team_capability\": \"hybrid\",\n \"lifecycle_capacity\": \"hybrid\",\n \"capital_shape\": \"hybrid\",\n \"scale_economics\": \"hybrid\",\n \"portability_tolerance\": \"hybrid\",\n \"evaluation_control\": \"hybrid\",\n \"compliance_path\": \"hybrid\"\n }\n }\n ]\n}\n",
+ "sha256": "sha256:bf2a0aae34c6c776da5bd0d69d3913f8922be6cfd7f88131f447dfa6d5722291",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/profiles.json"
+ },
+ "data/sources.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"verifiedOn\": \"2026-08-25\",\n \"sources\": [\n {\n \"id\": \"SRC-PHAROS-BUILD-BUY\",\n \"title\": \"Build vs Buy AI Agent: 2026 Decision Framework\",\n \"url\": \"https://pharosproduction.com/insights/engineering/build-vs-buy-ai-agent/\",\n \"publisher\": \"Pharos Production\",\n \"sourceType\": \"first-party\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"Used to seed the topic vocabulary and six-factor starting point. Its engagement examples, universal ranges and commercial conclusions are not treated as independent validation of this tool's thresholds.\"\n },\n {\n \"id\": \"SRC-NIST-AI-RMF\",\n \"title\": \"AI Risk Management Framework\",\n \"url\": \"https://www.nist.gov/itl/ai-risk-management-framework\",\n \"publisher\": \"National Institute of Standards and Technology\",\n \"sourceType\": \"primary-standard\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"Voluntary risk-management guidance. NIST states that AI RMF 1.0 is being revised; it does not prescribe build, buy or hybrid thresholds.\"\n },\n {\n \"id\": \"SRC-NIST-GAI-PROFILE\",\n \"title\": \"Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile\",\n \"url\": \"https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf\",\n \"publisher\": \"National Institute of Standards and Technology\",\n \"sourceType\": \"primary-standard\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"A cross-sectoral companion profile for generative AI risk management. It informs lifecycle and acquisition questions but does not validate economic weights or sourcing outcomes.\"\n },\n {\n \"id\": \"SRC-FINOPS-TCO\",\n \"title\": \"FinOps Terminology: Total Cost of Ownership and Unit Economics\",\n \"url\": \"https://framework.finops.org/assets/terminology/\",\n \"publisher\": \"FinOps Foundation\",\n \"sourceType\": \"primary-framework\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"Defines broad TCO and unit-economics concepts for technology costs. It supplies no AI-agent price ranges and does not validate this scenario's illustrative amounts.\"\n },\n {\n \"id\": \"SRC-KPMG-BUILD-BUY-BORROW\",\n \"title\": \"Agentic AI Untangled: Navigating the Build, Buy, or Borrow Decision\",\n \"url\": \"https://assets.kpmg.com/content/dam/kpmgsites/ie/pdf/insights/ai-artificial-intelligence/ie-agentic-ai-build-buy-borrow.pdf.coredownload.inline.pdf\",\n \"publisher\": \"KPMG Ireland\",\n \"sourceType\": \"first-party-research\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"A consultancy-authored framework with commercial interests. It supports the relevance of readiness, infrastructure, data, security, compliance and scale dimensions, not this tool's score formula.\"\n },\n {\n \"id\": \"SRC-ARXIV-MAKE-BUY\",\n \"title\": \"The Buy-or-Build Decision, Revisited: How Agentic AI Changes the Economics of Enterprise Software\",\n \"url\": \"https://arxiv.org/abs/2604.26482\",\n \"publisher\": \"arXiv\",\n \"sourceType\": \"conceptual-preprint\",\n \"verifiedOn\": \"2026-08-25\",\n \"limitations\": \"A conceptual preprint rather than an empirical calibration study. Its factor taxonomy informs coverage but cannot establish universal sourcing thresholds or expected outcomes.\"\n }\n ]\n}\n",
+ "sha256": "sha256:69781b0a45d9690d9c3537eb59e9c43704bea92da77d06318af1528b411c0783",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/sources.json"
+ },
+ "data/tco.json": {
+ "content": "{\n \"version\": \"1.0.0\",\n \"currency\": \"USD\",\n \"horizonYears\": 3,\n \"paths\": [\"build\", \"buy\", \"hybrid\"],\n \"categories\": [\n { \"id\": \"discovery_design\", \"label\": \"Discovery and architecture\", \"cadence\": \"one_time\", \"description\": \"Workflow, data, risk, product and architecture discovery before implementation.\" },\n { \"id\": \"implementation_integration\", \"label\": \"Implementation and integration\", \"cadence\": \"one_time\", \"description\": \"Configuration or development, integrations, environments, testing and release preparation.\" },\n { \"id\": \"data_migration\", \"label\": \"Data preparation and migration\", \"cadence\": \"one_time\", \"description\": \"Data cleanup, permissions, migration, indexing and initial evaluation-set preparation.\" },\n { \"id\": \"licenses_model_infrastructure\", \"label\": \"Licenses, models and infrastructure\", \"cadence\": \"annual\", \"description\": \"Platform subscription, model usage, cloud resources, storage, networking and observability services.\" },\n { \"id\": \"internal_operations\", \"label\": \"Internal product and operations team\", \"cadence\": \"annual\", \"description\": \"Product ownership, engineering, data, platform operations and incident coverage retained internally.\" },\n { \"id\": \"evaluation_security_compliance\", \"label\": \"Evaluation, security and compliance\", \"cadence\": \"annual\", \"description\": \"Test-set maintenance, red teaming, security review, audit evidence and control operation.\" },\n { \"id\": \"change_support\", \"label\": \"Change, training and support\", \"cadence\": \"annual\", \"description\": \"User enablement, support, workflow change, model or vendor updates and business-process maintenance.\" },\n { \"id\": \"exit_switching_reserve\", \"label\": \"Exit and switching reserve\", \"cadence\": \"exit\", \"description\": \"Export, migration, contract exit, redeployment, retraining and parallel-run allowance at the horizon.\" }\n ],\n \"defaultScenario\": {\n \"label\": \"Editable illustrative scenario\",\n \"boundary\": \"These figures are not Pharos pricing, vendor quotes or market benchmarks. Replace every amount with organization-specific evidence.\",\n \"values\": {\n \"build\": {\n \"discovery_design\": 90000,\n \"implementation_integration\": 300000,\n \"data_migration\": 80000,\n \"licenses_model_infrastructure\": 120000,\n \"internal_operations\": 260000,\n \"evaluation_security_compliance\": 90000,\n \"change_support\": 60000,\n \"exit_switching_reserve\": 40000\n },\n \"buy\": {\n \"discovery_design\": 40000,\n \"implementation_integration\": 120000,\n \"data_migration\": 50000,\n \"licenses_model_infrastructure\": 300000,\n \"internal_operations\": 100000,\n \"evaluation_security_compliance\": 70000,\n \"change_support\": 50000,\n \"exit_switching_reserve\": 220000\n },\n \"hybrid\": {\n \"discovery_design\": 70000,\n \"implementation_integration\": 210000,\n \"data_migration\": 60000,\n \"licenses_model_infrastructure\": 160000,\n \"internal_operations\": 190000,\n \"evaluation_security_compliance\": 80000,\n \"change_support\": 60000,\n \"exit_switching_reserve\": 130000\n }\n }\n }\n}\n",
+ "sha256": "sha256:d7896962e88b1c544877528d0d620761fdcab903f54d43b9dbf74a8006381398",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/data/tco.json"
+ },
+ "docs/assets/decision-scorecard.js": {
+ "content": "const REQUIRED_REGISTRIES = [\"criteria\", \"methodology\", \"tco\", \"sources\", \"claims\"];\nconst OPTION_IDS = [\"buy\", \"hybrid\", \"build\", \"unknown\"];\nconst OUTCOME_IDS = new Set([\"BUY\", \"HYBRID\", \"BUILD\", \"UNRESOLVED\"]);\n\nexport class DecisionModelError extends Error {\n constructor(code, message) {\n super(message);\n this.name = \"DecisionModelError\";\n this.code = code;\n }\n}\n\nfunction fail(code, message) {\n throw new DecisionModelError(code, message);\n}\n\nfunction isObject(value) {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction clone(value) {\n return structuredClone(value);\n}\n\nfunction deepFreeze(value, seen = new Set()) {\n if (value === null || typeof value !== \"object\" || seen.has(value)) return value;\n seen.add(value);\n for (const child of Object.values(value)) deepFreeze(child, seen);\n return Object.freeze(value);\n}\n\nfunction assertNonEmptyString(value, label) {\n if (typeof value !== \"string\" || value.trim() === \"\") fail(\"INVALID_REGISTRY\", `${label} must be a non-empty string`);\n}\n\nfunction assertVersion(value, label) {\n assertNonEmptyString(value, label);\n if (!/^\\d+\\.\\d+\\.\\d+$/.test(value)) fail(\"INVALID_REGISTRY\", `${label} must use semantic versioning`);\n}\n\nfunction roundHalfAwayFromZero(value) {\n if (!Number.isFinite(value)) fail(\"INVALID_SCORE\", \"Decision index is not finite\");\n return Math.sign(value) * Math.floor(Math.abs(value) + 0.5);\n}\n\nfunction normalizedShare(numerator, denominator) {\n if (denominator === 0) return 0;\n return Number((numerator / denominator).toFixed(4));\n}\n\nfunction optionMap(criterion) {\n return new Map(criterion.options.map((option) => [option.id, option]));\n}\n\nfunction validateCriteria(registry) {\n assertVersion(registry?.version, \"criteria.version\");\n if (!Array.isArray(registry.criteria) || registry.criteria.length !== 12) fail(\"INVALID_REGISTRY\", \"criteria registry must contain exactly 12 criteria\");\n const ids = new Set();\n let totalWeight = 0;\n for (const [index, criterion] of registry.criteria.entries()) {\n assertNonEmptyString(criterion?.id, `criteria[${index}].id`);\n if (ids.has(criterion.id)) fail(\"INVALID_REGISTRY\", `duplicate criterion ${criterion.id}`);\n ids.add(criterion.id);\n if (!Number.isInteger(criterion.order) || criterion.order !== index + 1) fail(\"INVALID_REGISTRY\", `${criterion.id} has invalid order`);\n if (![2, 3].includes(criterion.weight)) fail(\"INVALID_REGISTRY\", `${criterion.id} weight must be 2 or 3`);\n if (typeof criterion.gateCritical !== \"boolean\") fail(\"INVALID_REGISTRY\", `${criterion.id} gateCritical must be boolean`);\n for (const key of [\"label\", \"question\", \"whyItMatters\"]) assertNonEmptyString(criterion[key], `${criterion.id}.${key}`);\n if (!Array.isArray(criterion.options) || criterion.options.length !== OPTION_IDS.length) fail(\"INVALID_REGISTRY\", `${criterion.id} must expose four options`);\n const options = optionMap(criterion);\n if (OPTION_IDS.some((id) => !options.has(id))) fail(\"INVALID_REGISTRY\", `${criterion.id} option set is incomplete`);\n for (const [id, expectedValue] of [[\"buy\", -1], [\"hybrid\", 0], [\"build\", 1], [\"unknown\", null]]) {\n const option = options.get(id);\n if (option.value !== expectedValue) fail(\"INVALID_REGISTRY\", `${criterion.id}.${id} has invalid value`);\n if (!Array.isArray(option.blocks) || option.blocks.some((outcome) => !OUTCOME_IDS.has(outcome) || outcome === \"UNRESOLVED\")) fail(\"INVALID_REGISTRY\", `${criterion.id}.${id} has invalid blocks`);\n assertNonEmptyString(option.label, `${criterion.id}.${id}.label`);\n }\n totalWeight += criterion.weight;\n }\n if (totalWeight !== 31 || registry.totalWeight !== totalWeight) fail(\"INVALID_REGISTRY\", \"criteria total weight must equal 31\");\n const thresholds = registry.thresholds;\n if (!isObject(thresholds) || thresholds.buyMax !== -30 || thresholds.buildMin !== 30 || thresholds.boundaryMargin !== 7 || thresholds.minimumKnownWeightShare !== 0.75) {\n fail(\"INVALID_REGISTRY\", \"score thresholds do not match the 1.0.0 public contract\");\n }\n}\n\nfunction validateTco(registry) {\n assertVersion(registry?.version, \"tco.version\");\n if (registry.horizonYears !== 3) fail(\"INVALID_REGISTRY\", \"TCO horizon must equal three years\");\n if (!Array.isArray(registry.paths) || registry.paths.join(\",\") !== \"build,buy,hybrid\") fail(\"INVALID_REGISTRY\", \"TCO paths must be build, buy, hybrid\");\n if (!Array.isArray(registry.categories) || registry.categories.length < 3) fail(\"INVALID_REGISTRY\", \"TCO categories are incomplete\");\n const categoryIds = new Set();\n for (const category of registry.categories) {\n assertNonEmptyString(category.id, \"tco category id\");\n if (categoryIds.has(category.id)) fail(\"INVALID_REGISTRY\", `duplicate TCO category ${category.id}`);\n categoryIds.add(category.id);\n if (![\"one_time\", \"annual\", \"exit\"].includes(category.cadence)) fail(\"INVALID_REGISTRY\", `${category.id} has invalid cadence`);\n }\n for (const cadence of [\"one_time\", \"annual\", \"exit\"]) {\n if (!registry.categories.some((category) => category.cadence === cadence)) fail(\"INVALID_REGISTRY\", `TCO registry has no ${cadence} category`);\n }\n}\n\nfunction validateEvidence(registries) {\n assertVersion(registries.sources?.version, \"sources.version\");\n assertVersion(registries.claims?.version, \"claims.version\");\n if (!Array.isArray(registries.sources.sources) || registries.sources.sources.length === 0) fail(\"INVALID_REGISTRY\", \"source registry is empty\");\n const sourceIds = new Set();\n for (const source of registries.sources.sources) {\n assertNonEmptyString(source.id, \"source id\");\n if (sourceIds.has(source.id)) fail(\"INVALID_REGISTRY\", `duplicate source ${source.id}`);\n sourceIds.add(source.id);\n for (const key of [\"title\", \"url\", \"publisher\", \"sourceType\", \"verifiedOn\", \"limitations\"]) assertNonEmptyString(source[key], `${source.id}.${key}`);\n if (!source.url.startsWith(\"https://\")) fail(\"INVALID_REGISTRY\", `${source.id} URL must use HTTPS`);\n }\n if (!Array.isArray(registries.claims.claims) || registries.claims.claims.length === 0) fail(\"INVALID_REGISTRY\", \"claim registry is empty\");\n for (const claim of registries.claims.claims) {\n for (const key of [\"id\", \"statement\", \"boundary\"]) assertNonEmptyString(claim[key], `claim.${key}`);\n if (!Array.isArray(claim.sourceIds) || claim.sourceIds.length === 0) fail(\"INVALID_REGISTRY\", `${claim.id} has no sources`);\n for (const sourceId of claim.sourceIds) if (!sourceIds.has(sourceId)) fail(\"INVALID_REGISTRY\", `${claim.id} references missing source ${sourceId}`);\n }\n}\n\nexport function validateRegistries(input) {\n if (!isObject(input)) fail(\"INVALID_REGISTRY\", \"registries must be an object\");\n for (const name of REQUIRED_REGISTRIES) if (!isObject(input[name])) fail(\"INVALID_REGISTRY\", `missing ${name} registry`);\n const registries = clone(input);\n validateCriteria(registries.criteria);\n validateTco(registries.tco);\n validateEvidence(registries);\n assertVersion(registries.methodology?.version, \"methodology.version\");\n assertVersion(registries.methodology?.exportSchemaVersion, \"methodology.exportSchemaVersion\");\n const expectedVersions = registries.methodology.registryVersions;\n if (!isObject(expectedVersions)) fail(\"INVALID_REGISTRY\", \"methodology.registryVersions is missing\");\n for (const name of [\"criteria\", \"tco\", \"sources\", \"claims\"]) {\n if (expectedVersions[name] !== registries[name].version) fail(\"INVALID_REGISTRY\", `${name} version drifts from methodology`);\n }\n if (!Array.isArray(registries.methodology.outcomeIds) || !Array.isArray(registries.methodology.statusIds)) fail(\"INVALID_REGISTRY\", \"methodology vocabularies are missing\");\n return deepFreeze(registries);\n}\n\nfunction validateAnswers(registries, answers) {\n if (!isObject(answers)) fail(\"INVALID_ANSWERS\", \"answers must be an object\");\n const criteria = registries.criteria.criteria;\n const criterionIds = new Set(criteria.map((criterion) => criterion.id));\n for (const id of Object.keys(answers)) if (!criterionIds.has(id)) fail(\"UNKNOWN_CRITERION\", `unknown criterion ${id}`);\n for (const criterion of criteria) {\n if (!(criterion.id in answers)) fail(\"MISSING_CRITERION\", `missing criterion ${criterion.id}`);\n if (!optionMap(criterion).has(answers[criterion.id])) fail(\"INVALID_ANSWER\", `${criterion.id} has unsupported answer ${answers[criterion.id]}`);\n }\n}\n\nfunction classifyIndex(index, thresholds) {\n if (index <= thresholds.buyMax) return \"BUY\";\n if (index >= thresholds.buildMin) return \"BUILD\";\n return \"HYBRID\";\n}\n\nfunction boundaryDistance(index, thresholds) {\n return Math.min(Math.abs(index - thresholds.buyMax), Math.abs(index - thresholds.buildMin));\n}\n\nexport function scoreDecision({ registries, answers, generatedAt }) {\n if (!registries || !Object.isFrozen(registries)) fail(\"INVALID_REGISTRY\", \"registries must be validated first\");\n validateAnswers(registries, answers);\n assertNonEmptyString(generatedAt, \"generatedAt\");\n if (Number.isNaN(Date.parse(generatedAt))) fail(\"INVALID_TIMESTAMP\", \"generatedAt must be an ISO timestamp\");\n\n let rawPoints = 0;\n let knownWeight = 0;\n const unresolvedInputs = [];\n const selectedCriteria = [];\n for (const criterion of registries.criteria.criteria) {\n const option = optionMap(criterion).get(answers[criterion.id]);\n const points = option.value === null ? null : option.value * criterion.weight;\n if (points === null) unresolvedInputs.push(criterion.id);\n else {\n rawPoints += points;\n knownWeight += criterion.weight;\n }\n selectedCriteria.push({\n id: criterion.id,\n label: criterion.label,\n weight: criterion.weight,\n gateCritical: criterion.gateCritical,\n answerId: option.id,\n answerLabel: option.label,\n value: option.value,\n points,\n optionBlocks: [...option.blocks],\n interpretation: option.interpretation ?? \"\",\n evidencePrompt: option.evidencePrompt ?? \"\",\n });\n }\n\n const totalWeight = registries.criteria.totalWeight;\n const knownWeightShare = normalizedShare(knownWeight, totalWeight);\n const decisionIndex = knownWeight === 0 ? 0 : roundHalfAwayFromZero(100 * rawPoints / knownWeight);\n const provisionalOutcomeId = classifyIndex(decisionIndex, registries.criteria.thresholds);\n const criticalUnknowns = selectedCriteria.filter((criterion) => criterion.gateCritical && criterion.answerId === \"unknown\").map((criterion) => criterion.id);\n const insufficient = knownWeightShare < registries.criteria.thresholds.minimumKnownWeightShare || criticalUnknowns.length > 0;\n const blockingConstraints = selectedCriteria\n .filter((criterion) => criterion.optionBlocks.includes(provisionalOutcomeId))\n .map((criterion) => ({ criterionId: criterion.id, criterionLabel: criterion.label, answerId: criterion.answerId, answerLabel: criterion.answerLabel, optionBlocks: criterion.optionBlocks, evidencePrompt: criterion.evidencePrompt }));\n\n let statusId = \"DECISION_READY\";\n let outcomeId = provisionalOutcomeId;\n if (insufficient) {\n statusId = \"INSUFFICIENT_DECISION_EVIDENCE\";\n outcomeId = \"UNRESOLVED\";\n } else if (blockingConstraints.length > 0) {\n statusId = \"CONSTRAINT_REVIEW_REQUIRED\";\n outcomeId = \"HYBRID\";\n }\n\n const distanceToNearestBoundary = boundaryDistance(decisionIndex, registries.criteria.thresholds);\n const boundaries = Array.isArray(registries.methodology.boundaries) && registries.methodology.boundaries.length > 0\n ? [...registries.methodology.boundaries]\n : registries.claims.claims.map((claim) => claim.boundary);\n return deepFreeze({\n schemaVersion: registries.methodology.exportSchemaVersion,\n methodologyVersion: registries.methodology.version,\n generatedAt,\n statusId,\n outcomeId,\n provisionalOutcomeId,\n provisional: statusId !== \"DECISION_READY\",\n decisionIndex,\n rawPoints,\n knownWeight,\n totalWeight,\n knownWeightShare,\n unresolvedInputs,\n criticalUnknowns,\n blockingConstraints,\n boundaryWarning: distanceToNearestBoundary <= registries.criteria.thresholds.boundaryMargin,\n distanceToNearestBoundary,\n selectedCriteria,\n formulaTrace: {\n formula: registries.methodology.formula,\n rawPoints,\n knownWeight,\n totalWeight,\n knownWeightShare,\n buyMax: registries.criteria.thresholds.buyMax,\n buildMin: registries.criteria.thresholds.buildMin,\n boundaryMargin: registries.criteria.thresholds.boundaryMargin,\n minimumKnownWeightShare: registries.criteria.thresholds.minimumKnownWeightShare,\n },\n boundaries,\n claimSnapshots: registries.claims.claims.map((claim) => ({ ...claim })),\n sourceSnapshots: registries.sources.sources.map((source) => ({ ...source })),\n });\n}\n\nfunction numericTcoValue(value, path, categoryId) {\n const number = typeof value === \"string\" && value.trim() !== \"\" ? Number(value) : value;\n if (!Number.isFinite(number) || number < 0) fail(\"INVALID_TCO_VALUE\", `${path}.${categoryId} must be a non-negative finite number`);\n return number;\n}\n\nexport function calculateTco({ registries, values }) {\n if (!registries || !Object.isFrozen(registries)) fail(\"INVALID_REGISTRY\", \"registries must be validated first\");\n if (!isObject(values)) fail(\"INVALID_TCO_VALUES\", \"TCO values must be an object\");\n const pathRecords = {};\n for (const path of registries.tco.paths) {\n if (!isObject(values[path])) fail(\"INVALID_TCO_VALUES\", `TCO path ${path} is missing`);\n const categories = {};\n let oneTimeTotal = 0;\n let annualTotal = 0;\n let exitTotal = 0;\n for (const category of registries.tco.categories) {\n const amount = numericTcoValue(values[path][category.id], path, category.id);\n categories[category.id] = amount;\n if (category.cadence === \"one_time\") oneTimeTotal += amount;\n if (category.cadence === \"annual\") annualTotal += amount;\n if (category.cadence === \"exit\") exitTotal += amount;\n }\n const recurringThreeYearTotal = annualTotal * registries.tco.horizonYears;\n pathRecords[path] = {\n categories,\n oneTimeTotal,\n annualTotal,\n recurringThreeYearTotal,\n exitTotal,\n threeYearTco: oneTimeTotal + recurringThreeYearTotal + exitTotal,\n };\n }\n const pathOrder = new Map(registries.tco.paths.map((path, index) => [path, index]));\n const rankOrder = [...registries.tco.paths].sort((a, b) => pathRecords[a].threeYearTco - pathRecords[b].threeYearTco || pathOrder.get(a) - pathOrder.get(b));\n return deepFreeze({\n schemaVersion: registries.methodology.exportSchemaVersion,\n modelVersion: registries.tco.version,\n currency: registries.tco.currency ?? \"USD\",\n horizonYears: registries.tco.horizonYears,\n paths: pathRecords,\n rankOrder,\n boundary: registries.tco.defaultScenario?.boundary ?? \"Scenario values must be replaced with organization-specific evidence.\",\n });\n}\n\nfunction csvEscape(value) {\n const text = typeof value === \"string\" ? value : JSON.stringify(value);\n return `\"${text.replaceAll('\"', '\"\"')}\"`;\n}\n\nexport function exportDecisionJSON({ decision, tco }) {\n return `${JSON.stringify({ schemaVersion: decision.schemaVersion, decision, tco }, null, 2)}\\n`;\n}\n\nexport function exportDecisionCSV({ decision, tco }) {\n const rows = [[\"recordType\", \"id\", \"metric\", \"value\"]];\n const decisionMetrics = {\n methodologyVersion: decision.methodologyVersion,\n statusId: decision.statusId,\n outcomeId: decision.outcomeId,\n provisionalOutcomeId: decision.provisionalOutcomeId,\n decisionIndex: decision.decisionIndex,\n rawPoints: decision.rawPoints,\n knownWeight: decision.knownWeight,\n totalWeight: decision.totalWeight,\n knownWeightShare: decision.knownWeightShare,\n unresolvedInputs: decision.unresolvedInputs,\n blockingConstraints: decision.blockingConstraints.map((constraint) => constraint.criterionId),\n };\n for (const [metric, value] of Object.entries(decisionMetrics)) rows.push([\"decision\", \"scorecard\", metric, value]);\n for (const criterion of decision.selectedCriteria) {\n rows.push([\"criterion\", criterion.id, \"answerId\", criterion.answerId]);\n rows.push([\"criterion\", criterion.id, \"points\", criterion.points]);\n }\n for (const [path, record] of Object.entries(tco.paths)) {\n rows.push([\"tco\", path, \"oneTimeTotal\", record.oneTimeTotal]);\n rows.push([\"tco\", path, \"annualTotal\", record.annualTotal]);\n rows.push([\"tco\", path, \"exitTotal\", record.exitTotal]);\n rows.push([\"tco\", path, \"threeYearTco\", record.threeYearTco]);\n }\n return `${rows.map((row) => row.map(csvEscape).join(\",\")).join(\"\\n\")}\\n`;\n}\n\nexport function exportDecisionMarkdown({ decision, tco }) {\n const unresolved = decision.unresolvedInputs.length ? decision.unresolvedInputs.join(\", \") : \"none\";\n const lines = [\n \"# Build vs Buy AI Agent Decision Record\",\n \"\",\n `Generated: ${decision.generatedAt}`,\n `Decision evidence status: ${decision.statusId}`,\n `Outcome: ${decision.outcomeId}`,\n `Decision index: ${decision.decisionIndex}`,\n `Known-weight coverage: ${(decision.knownWeightShare * 100).toFixed(1)}%`,\n `Unknown inputs: ${unresolved}`,\n \"\",\n \"## Formula trace\",\n \"\",\n `- Methodology version: ${decision.methodologyVersion}`,\n `- Signed points: ${decision.rawPoints}`,\n `- Known weight: ${decision.knownWeight}`,\n `- Total weight: ${decision.formulaTrace.totalWeight}`,\n `- Formula: ${decision.formulaTrace.formula}`,\n \"\",\n \"## Three-year TCO\",\n \"\",\n \"| Path | One-time | Annual | Exit | Three-year TCO |\",\n \"|---|---:|---:|---:|---:|\",\n ];\n for (const [path, record] of Object.entries(tco.paths)) lines.push(`| ${path} | ${record.oneTimeTotal} | ${record.annualTotal} | ${record.exitTotal} | ${record.threeYearTco} |`);\n lines.push(\"\", \"## Boundaries\", \"\");\n for (const boundary of decision.boundaries) lines.push(`- ${boundary}`);\n lines.push(\"\");\n return lines.join(\"\\n\");\n}\n",
+ "sha256": "sha256:40e5682cda7cea69e453c70047f2a1cf93a9d5525905dc4df0389a78d3be75eb",
+ "url": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard/blob/c8ad4067654a6777cea3b652a80f62dc6aeb21fb/docs/assets/decision-scorecard.js"
+ }
+ },
+ "independent_human_review": "NOT_REVIEWED",
+ "pages": "https://pharosproduction.github.io/build-vs-buy-ai-agent-scorecard/",
+ "repo": "https://github.com/PharosProduction/build-vs-buy-ai-agent-scorecard",
+ "snapshot_at": "2026-09-17T06:17:24Z"
+ },
+ "framework": {
+ "commit": "b1213f374722edde01ca74a7ccac68e835070705",
+ "files": {
+ "DATA-LICENSE.md": {
+ "content": "# Editorial text and data license\n\nThe original editorial text, framework comparison dataset, claim ledger and source annotations in this repository are licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).\n\nAttribution: **Pharos Production Engineering Editorial, “Top 5 AI Agent Frameworks for Enterprise Workflows,” research cutoff 28 August 2026.**\n\nThe license does not apply to third-party names, trademarks, source documentation or quoted facts, which remain subject to their respective rights. The comparison is engineering decision support, not legal advice, a security certification or a vendor endorsement.\n",
+ "sha256": "sha256:5fb13b5e4854905d6ba554da4a0eae8e97f7c87e9d362f1f9e23bf9e4b3fe52a",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/DATA-LICENSE.md"
+ },
+ "LICENSE": {
+ "content": "MIT License\n\nCopyright (c) 2026 Pharos Production\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "sha256": "sha256:48463cc27a86bdc41249f2e93168615728c7860d350b4dd51c7606e5c512555e",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/LICENSE"
+ },
+ "README.md": {
+ "content": "# Enterprise AI Agent Frameworks\n\nAn evidence-bounded GitHub Pages comparison of LangGraph, Microsoft Agent Framework, CrewAI, OpenAI Agents SDK and Google ADK for enterprise workflows.\n\nThe public artifact compares five operating controls: state, human approval, observability, recovery and deployment. It includes an interactive constraint selector, explicit disqualifiers, official-source records, a claim ledger and JSON/CSV downloads. It does not assign a universal maturity score.\n\n## Local verification\n\nRequires Node.js 22 or newer.\n\n```sh\nnpm run verify\n```\n\nServe the `docs/` directory with any static HTTP server to test the selector.\n\n## Evidence boundary\n\nResearch cutoff: 2026-08-28. Capability claims are tied to official documentation or release records in `data/sources.json`. The method and known limitations are published in `docs/methodology.html`.\n\nCode is MIT licensed. Editorial text and the public comparison dataset are CC BY 4.0; see `DATA-LICENSE.md`.\n",
+ "sha256": "sha256:301038df41f7926d19a41d411aa818e5aef3e299ce2c8ada91c92bd81e93bb40",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/README.md"
+ },
+ "data/claims.json": {
+ "content": "{\n \"schemaVersion\": \"1.0.0\",\n \"evidenceCutoff\": \"2026-08-28\",\n \"claimEvidence\": \"Named official documentation, repositories, and release records in data/sources.json\",\n \"claims\": [\n {\"id\":\"CLM-001\",\"role\":\"PRIMARY\",\"statement\":\"The comparison contains five maintained, permissively licensed code-first frameworks with documented paths for state, approval, observability, recovery, and deployment.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"LG-REL\",\"MAF-REL\",\"CR-REL\",\"OA-REL\",\"GA-REL\"],\"boundary\":\"Inclusion is an editorial shortlist boundary, not a universal market ranking.\"},\n {\"id\":\"CLM-002\",\"role\":\"PRIMARY\",\"statement\":\"LangGraph provides native checkpointed state, interrupts, and durable execution primitives for explicit state-graph workflows.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"LG-PERSIST\",\"LG-HITL\",\"LG-SERVER\"],\"boundary\":\"Production durability depends on a persistent checkpointer and replay-safe node design.\"},\n {\"id\":\"CLM-003\",\"role\":\"PRIMARY\",\"statement\":\"Microsoft Agent Framework workflows provide checkpoint managers and request-based human approval with pending requests preserved across restore.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"MAF-CHECKPOINT\",\"MAF-HITL\"],\"boundary\":\"Language and UI integration parity must be verified for the selected client surface.\"},\n {\"id\":\"CLM-004\",\"role\":\"PRIMARY\",\"statement\":\"CrewAI Flows provide persisted state and human-feedback routing, while CrewAI AMP adds a managed deployment and observability path.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"CR-FLOWS\",\"CR-AMP\"],\"boundary\":\"Managed AMP capabilities are distinct from the open-source Python runtime.\"},\n {\"id\":\"CLM-005\",\"role\":\"PRIMARY\",\"statement\":\"OpenAI Agents SDK provides sessions, serialized approval state, and built-in tracing; process-restart durability uses documented external workflow integrations.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"OA-RUN\",\"OA-HITL\",\"OA-TRACE\"],\"boundary\":\"The Python SDK does not itself operate an external durable workflow runtime.\"},\n {\"id\":\"CLM-006\",\"role\":\"PRIMARY\",\"statement\":\"Google ADK persists state through durable session services, supports human input and resume in workflows, exports telemetry, and documents several Google Cloud deployment targets.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"GA-STATE\",\"GA-HITL\",\"GA-RESUME\",\"GA-OBS\",\"GA-DEPLOY\"],\"boundary\":\"In-memory sessions are non-durable and cross-language feature parity is not assumed.\"},\n {\"id\":\"CLM-007\",\"role\":\"SUPPORTING\",\"statement\":\"A framework primitive is not by itself an enterprise control: identity, authorization, policy, audit retention, side-effect idempotency, and incident procedures remain application and operations work.\",\"status\":\"OBSERVED\",\"disposition\":\"KEEP\",\"sourceIds\":[\"LG-HITL\",\"MAF-HITL\",\"CR-FLOWS\",\"OA-HITL\",\"GA-HITL\"],\"boundary\":\"This is a method conclusion drawn from the documented mechanism boundaries, not a vendor performance claim.\"}\n ]\n}\n",
+ "sha256": "sha256:417c6630921a5e1cb39b05fa6759810431572de63a11818ec05c582dc2078628",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/data/claims.json"
+ },
+ "data/frameworks.json": {
+ "content": "{\n \"schemaVersion\": \"1.0.0\",\n \"methodVersion\": \"1.0.0\",\n \"evidenceCutoff\": \"2026-08-28\",\n \"comparisonBoundary\": \"Maintained, permissively licensed, code-first agent frameworks with documented state, human-approval, observability, recovery, and deployment paths for enterprise workflows.\",\n \"frameworks\": [\n {\n \"id\": \"langgraph\",\n \"name\": \"LangGraph\",\n \"release\": {\"track\": \"Python core\", \"version\": \"1.2.11\", \"publishedAt\": \"2026-08-11\", \"sourceId\": \"LG-REL\"},\n \"license\": \"MIT\",\n \"languages\": [\"python\", \"typescript\"],\n \"orchestrationModel\": \"Explicit state graph with nodes, edges, conditional routing, cycles, and checkpointed execution.\",\n \"modelStrategy\": [\"agnostic\"],\n \"deploymentControl\": [\"self-host\", \"managed\"],\n \"priorities\": [\"durable-recovery\", \"approval\", \"observability\", \"explicit-control\"],\n \"bestFor\": \"Long-running or failure-sensitive workflows where teams need explicit control over state transitions, pause/resume behavior, and replay boundaries.\",\n \"constraints\": \"The graph model exposes control but increases design and testing work. Production persistence needs a durable checkpointer or Agent Server rather than the in-memory example backend.\",\n \"tradeoffs\": [\"High control and inspectable state\", \"More orchestration code and a steeper graph mental model\", \"LangSmith is an integrated product, not a requirement of the open-source runtime\"],\n \"disqualifiers\": [\"A short, deterministic tool call sequence is simpler in ordinary application code\", \"The team cannot own explicit graph topology and checkpoint migration\"],\n \"capabilities\": {\n \"state\": {\"status\": \"native\", \"detail\": \"A checkpointer stores graph state as snapshots organized into threads at graph steps; persistent backends replace InMemorySaver for production.\", \"sourceIds\": [\"LG-PERSIST\"]},\n \"approval\": {\"status\": \"native\", \"detail\": \"The interrupt primitive pauses execution, exposes approval context, and resumes the same thread after an external decision.\", \"sourceIds\": [\"LG-HITL\"]},\n \"observability\": {\"status\": \"integrated\", \"detail\": \"Execution paths and state transitions can be traced through LangSmith; tracing can be disabled or conditioned for data-sensitive runs.\", \"sourceIds\": [\"LG-OVERVIEW\", \"LG-PRIVACY\"]},\n \"recovery\": {\"status\": \"native\", \"detail\": \"Durable execution resumes from checkpoints after interruption or worker failure; node boundaries determine how much work may repeat.\", \"sourceIds\": [\"LG-PERSIST\", \"LG-SERVER\"]},\n \"deployment\": {\"status\": \"self-host-or-managed\", \"detail\": \"The open-source runtime can run in application infrastructure, while Agent Server packages graphs with persistence and a durable task queue for self-hosted or managed deployment.\", \"sourceIds\": [\"LG-SERVER\"]}\n }\n },\n {\n \"id\": \"microsoft-agent-framework\",\n \"name\": \"Microsoft Agent Framework\",\n \"release\": {\"track\": \"Python\", \"version\": \"1.16.0\", \"publishedAt\": \"2026-08-28\", \"sourceId\": \"MAF-REL\"},\n \"license\": \"MIT\",\n \"languages\": [\"python\", \"dotnet\", \"go\"],\n \"orchestrationModel\": \"Agent abstractions plus graph workflows, orchestrations, request ports, middleware, and checkpoint managers.\",\n \"modelStrategy\": [\"agnostic\", \"microsoft\"],\n \"deploymentControl\": [\"self-host\", \"managed\"],\n \"priorities\": [\"durable-recovery\", \"approval\", \"observability\", \"microsoft-stack\", \"multi-language\"],\n \"bestFor\": \"Enterprises standardizing on .NET, Python, Go, Azure identity, or Microsoft operations while retaining explicit multi-agent workflow control.\",\n \"constraints\": \"Feature parity varies by language and integration. Teams must verify the exact client surface because some UI workflow lifecycle events and resume controls are not mapped in the .NET AG-UI integration.\",\n \"tradeoffs\": [\"Typed enterprise integration and multi-language workflow support\", \"Fast-moving APIs require pinned versions and migration tests\", \"Azure alignment is strongest, although the framework supports multiple providers\"],\n \"disqualifiers\": [\"The team requires identical workflow lifecycle behavior across every language client\", \"The deployment platform must avoid Microsoft-specific operational dependencies\"],\n \"capabilities\": {\n \"state\": {\"status\": \"native\", \"detail\": \"Checkpoint managers capture executor state, pending messages, requests, responses, and shared state at superstep boundaries.\", \"sourceIds\": [\"MAF-CHECKPOINT\"]},\n \"approval\": {\"status\": \"native\", \"detail\": \"RequestPort and tool-approval requests pause workflows; pending requests are included in checkpoints and re-emitted after restore.\", \"sourceIds\": [\"MAF-HITL\"]},\n \"observability\": {\"status\": \"native\", \"detail\": \"The agent capability surface exports traces, metrics, and logs and supports shared interception hooks for operational controls.\", \"sourceIds\": [\"MAF-CAPABILITIES\"]},\n \"recovery\": {\"status\": \"native\", \"detail\": \"Workflows resume or rehydrate from a checkpoint, including pending request state; durable storage must replace in-memory checkpoint storage.\", \"sourceIds\": [\"MAF-CHECKPOINT\", \"MAF-HITL\"]},\n \"deployment\": {\"status\": \"self-host-or-managed\", \"detail\": \"Agents and workflows run in-process or behind application services and integrate with Microsoft and Azure agent services; deployment architecture remains an application decision.\", \"sourceIds\": [\"MAF-OVERVIEW\"]}\n }\n },\n {\n \"id\": \"crewai\",\n \"name\": \"CrewAI\",\n \"release\": {\"track\": \"Python\", \"version\": \"1.15.18\", \"publishedAt\": \"2026-08-27\", \"sourceId\": \"CR-REL\"},\n \"license\": \"MIT\",\n \"languages\": [\"python\"],\n \"orchestrationModel\": \"Role-based crews for agent collaboration plus event-driven Flows for routing, persistence, and approval points.\",\n \"modelStrategy\": [\"agnostic\"],\n \"deploymentControl\": [\"self-host\", \"managed\"],\n \"priorities\": [\"multi-agent\", \"approval\", \"rapid-composition\", \"managed-cloud\"],\n \"bestFor\": \"Python teams composing role-oriented multi-agent business processes that benefit from a concise crew abstraction and Flow-based approval routing.\",\n \"constraints\": \"Crews and Flows are different orchestration layers. Durable production behavior depends on configuring persistence and the surrounding runtime rather than assuming a crew definition is automatically recoverable.\",\n \"tradeoffs\": [\"Concise role and task composition\", \"Flows add operational control but create a second mental model\", \"Managed deployment and full observability are concentrated in CrewAI AMP\"],\n \"disqualifiers\": [\"The core application stack is TypeScript or .NET with no Python service boundary\", \"The workflow requires graph-level checkpoint semantics to be the primary programming model\"],\n \"capabilities\": {\n \"state\": {\"status\": \"native\", \"detail\": \"The persist decorator stores Flow state, uses SQLite by default, and supports resuming or forking a persisted flow by state identifier.\", \"sourceIds\": [\"CR-FLOWS\"]},\n \"approval\": {\"status\": \"native\", \"detail\": \"The human_feedback decorator pauses a Flow for review and can route approved, rejected, or revision outcomes to distinct listeners.\", \"sourceIds\": [\"CR-FLOWS\"]},\n \"observability\": {\"status\": \"integrated\", \"detail\": \"CrewAI exposes execution tracing, while the managed AMP platform adds detailed traces, logs, team controls, and production monitoring.\", \"sourceIds\": [\"CR-DOCS\", \"CR-AMP\"]},\n \"recovery\": {\"status\": \"configured\", \"detail\": \"Persisted Flow state survives restarts and can resume by ID, but the deployment must supply durable storage and idempotent side-effect handling.\", \"sourceIds\": [\"CR-FLOWS\", \"CR-PROD\"]},\n \"deployment\": {\"status\": \"self-host-or-managed\", \"detail\": \"Python services can self-host crews and Flows; AMP offers GitHub-, CLI-, or Studio-driven managed deployments with generated API access.\", \"sourceIds\": [\"CR-AMP\", \"CR-PROD\"]}\n }\n },\n {\n \"id\": \"openai-agents-sdk\",\n \"name\": \"OpenAI Agents SDK\",\n \"release\": {\"track\": \"Python\", \"version\": \"0.22.0\", \"publishedAt\": \"2026-08-19\", \"sourceId\": \"OA-REL\"},\n \"license\": \"MIT\",\n \"languages\": [\"python\"],\n \"orchestrationModel\": \"A compact runner with agents, tools, handoffs, guardrails, sessions, interruptions, and tracing.\",\n \"modelStrategy\": [\"openai\", \"agnostic-with-adapters\"],\n \"deploymentControl\": [\"self-host\", \"managed\"],\n \"priorities\": [\"approval\", \"observability\", \"minimal-sdk\", \"openai-stack\"],\n \"bestFor\": \"Python products centered on OpenAI models that need a small orchestration surface, built-in tracing, sessions, guardrails, and tool approval.\",\n \"constraints\": \"The SDK manages the agent loop, but durable long-running recovery comes through Dapr, Temporal, Restate, DBOS, or application infrastructure rather than a built-in workflow server.\",\n \"tradeoffs\": [\"Small API surface and first-party OpenAI integrations\", \"Provider adapters exist but the default path is OpenAI-first\", \"Durability adds an external orchestration dependency\"],\n \"disqualifiers\": [\"Provider neutrality is a hard procurement requirement\", \"The system needs a built-in graph runtime and checkpoint manager without external workflow infrastructure\"],\n \"capabilities\": {\n \"state\": {\"status\": \"native\", \"detail\": \"Sessions store conversation history through SQLite, Redis, SQLAlchemy, Dapr, encrypted, file-backed, or OpenAI-managed implementations.\", \"sourceIds\": [\"OA-RUN\"]},\n \"approval\": {\"status\": \"native\", \"detail\": \"Tools can require approval, paused RunState can be serialized, and unresolved interruptions remain pending until approved or rejected.\", \"sourceIds\": [\"OA-HITL\"]},\n \"observability\": {\"status\": \"native\", \"detail\": \"Built-in tracing records model generations, tool calls, handoffs, guardrails, and custom events with controls for sensitive trace content.\", \"sourceIds\": [\"OA-TRACE\"]},\n \"recovery\": {\"status\": \"external-runtime\", \"detail\": \"Serialized run state supports approval pause/resume; process-restart durability and automatic recovery use documented Dapr, Temporal, Restate, or DBOS integrations.\", \"sourceIds\": [\"OA-HITL\", \"OA-RUN\"]},\n \"deployment\": {\"status\": \"application-owned\", \"detail\": \"The SDK runs inside a Python application; teams choose their hosting and add a durable orchestrator when workflows span long waits or process restarts.\", \"sourceIds\": [\"OA-RUN\"]}\n }\n },\n {\n \"id\": \"google-adk\",\n \"name\": \"Google ADK\",\n \"release\": {\"track\": \"Python\", \"version\": \"2.8.0\", \"publishedAt\": \"2026-08-26\", \"sourceId\": \"GA-REL\"},\n \"license\": \"Apache-2.0\",\n \"languages\": [\"python\", \"typescript\", \"go\", \"java\", \"kotlin\"],\n \"orchestrationModel\": \"LLM agents, deterministic sequential/parallel/loop agents, and graph workflows backed by sessions and events.\",\n \"modelStrategy\": [\"google\", \"agnostic\"],\n \"deploymentControl\": [\"self-host\", \"managed\"],\n \"priorities\": [\"multi-language\", \"managed-cloud\", \"observability\", \"google-stack\", \"multi-agent\"],\n \"bestFor\": \"Multi-language teams using Gemini or Google Cloud that want one agent toolkit across local development, Agent Runtime, Cloud Run, and GKE.\",\n \"constraints\": \"Session persistence depends on the selected SessionService, and operational features differ across SDK languages and deployment targets. In-memory sessions do not survive a restart.\",\n \"tradeoffs\": [\"Broad language coverage and Google Cloud deployment paths\", \"Strongest operational path assumes Google Cloud\", \"Teams must verify feature parity for their chosen language\"],\n \"disqualifiers\": [\"The organization requires a cloud-neutral operations plane\", \"The chosen language needs a feature that exists only in another ADK SDK\"],\n \"capabilities\": {\n \"state\": {\"status\": \"native\", \"detail\": \"Serializable session state is persisted by DatabaseSessionService or VertexAiSessionService; InMemorySessionService loses state on restart.\", \"sourceIds\": [\"GA-STATE\"]},\n \"approval\": {\"status\": \"native\", \"detail\": \"Graph workflows can request external human input and resume through the workflow runtime rather than hiding approval inside prompt text.\", \"sourceIds\": [\"GA-HITL\", \"GA-RESUME\"]},\n \"observability\": {\"status\": \"integrated\", \"detail\": \"OpenTelemetry instrumentation exports agent and tool traces; Google tooling connects traces to Cloud Trace and optional BigQuery analytics.\", \"sourceIds\": [\"GA-OBS\"]},\n \"recovery\": {\"status\": \"native\", \"detail\": \"Resumable workflow sessions persist execution progress and continue graph work after interruption when backed by a persistent session service.\", \"sourceIds\": [\"GA-RESUME\", \"GA-STATE\"]},\n \"deployment\": {\"status\": \"self-host-or-managed\", \"detail\": \"Documented targets include Agent Runtime, Cloud Run, and GKE, with CLI support for CI/CD, service identity, secrets, scaling, and observability.\", \"sourceIds\": [\"GA-DEPLOY\"]}\n }\n }\n ]\n}\n",
+ "sha256": "sha256:42ad1d6f7dae557ab024be640e13271ce9f8b19f81ffe808880de3bef3b5cd8b",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/data/frameworks.json"
+ },
+ "data/sources.json": {
+ "content": "{\n \"schemaVersion\": \"1.0.0\",\n \"evidenceCutoff\": \"2026-08-28\",\n \"sources\": [\n {\"id\":\"LG-REL\",\"framework\":\"langgraph\",\"title\":\"LangGraph 1.2.11 release\",\"publisher\":\"LangChain\",\"url\":\"https://github.com/langchain-ai/langgraph/releases/tag/1.2.11\",\"sourceType\":\"official-release\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"release\",\"license\"],\"limitations\":\"The repository publishes several packages; this record identifies the Python langgraph core release rather than the separately versioned SDK or checkpoint packages.\"},\n {\"id\":\"LG-OVERVIEW\",\"framework\":\"langgraph\",\"title\":\"LangGraph overview\",\"publisher\":\"LangChain\",\"url\":\"https://docs.langchain.com/oss/python/langgraph/overview\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"orchestration\",\"observability\",\"deployment\"],\"limitations\":\"Product overview language is used only for documented mechanisms; it is not evidence of comparative superiority, adoption, or outcome quality.\"},\n {\"id\":\"LG-PERSIST\",\"framework\":\"langgraph\",\"title\":\"LangGraph persistence\",\"publisher\":\"LangChain\",\"url\":\"https://docs.langchain.com/oss/python/langgraph/persistence\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"state\",\"recovery\"],\"limitations\":\"InMemorySaver examples are development fixtures. Production durability depends on selecting and operating a persistent checkpointer backend.\"},\n {\"id\":\"LG-HITL\",\"framework\":\"langgraph\",\"title\":\"LangGraph interrupts\",\"publisher\":\"LangChain\",\"url\":\"https://docs.langchain.com/oss/python/langgraph/interrupts\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"approval\",\"recovery\"],\"limitations\":\"An interrupt supplies a pause/resume primitive. Approval policy, identity, authorization, timeout, and escalation remain application responsibilities.\"},\n {\"id\":\"LG-SERVER\",\"framework\":\"langgraph\",\"title\":\"LangGraph Agent Server\",\"publisher\":\"LangChain\",\"url\":\"https://docs.langchain.com/langsmith/agent-server\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"recovery\",\"deployment\"],\"limitations\":\"Agent Server is a deployment runtime with infrastructure and licensing considerations separate from the open-source graph library.\"},\n {\"id\":\"LG-PRIVACY\",\"framework\":\"langgraph\",\"title\":\"LangSmith data storage and privacy\",\"publisher\":\"LangChain\",\"url\":\"https://docs.langchain.com/langsmith/data-storage-and-privacy\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"observability\",\"state\"],\"limitations\":\"Storage and trace behavior depends on runtime configuration. Teams must verify telemetry, retention, encryption, and regional requirements for their deployment.\"},\n {\"id\":\"MAF-REL\",\"framework\":\"microsoft-agent-framework\",\"title\":\"Microsoft Agent Framework Python 1.16.0 release\",\"publisher\":\"Microsoft\",\"url\":\"https://github.com/microsoft/agent-framework/releases/tag/python-1.16.0\",\"sourceType\":\"official-release\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"release\",\"license\"],\"limitations\":\"The repository versions language packages independently. This comparison stamps the Python track and does not imply identical version numbers across .NET and Go.\"},\n {\"id\":\"MAF-OVERVIEW\",\"framework\":\"microsoft-agent-framework\",\"title\":\"Microsoft Agent Framework overview\",\"publisher\":\"Microsoft Learn\",\"url\":\"https://learn.microsoft.com/en-us/agent-framework/overview/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"orchestration\",\"deployment\",\"positioning\"],\"limitations\":\"The overview identifies product scope and succession from AutoGen and Semantic Kernel; it does not prove compatibility with every predecessor application.\"},\n {\"id\":\"MAF-CHECKPOINT\",\"framework\":\"microsoft-agent-framework\",\"title\":\"Agent Framework workflow checkpoints\",\"publisher\":\"Microsoft Learn\",\"url\":\"https://learn.microsoft.com/en-us/agent-framework/workflows/checkpoints\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"state\",\"recovery\"],\"limitations\":\"Checkpoint availability does not make external side effects idempotent. Durable storage, schema migration, and replay-safe tool design remain deployment work.\"},\n {\"id\":\"MAF-HITL\",\"framework\":\"microsoft-agent-framework\",\"title\":\"Agent Framework workflow human-in-the-loop\",\"publisher\":\"Microsoft Learn\",\"url\":\"https://learn.microsoft.com/en-us/agent-framework/workflows/human-in-the-loop\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"approval\",\"recovery\"],\"limitations\":\"Request and approval primitives do not define the enterprise approver identity, authorization policy, response deadline, or separation-of-duties rules.\"},\n {\"id\":\"MAF-CAPABILITIES\",\"framework\":\"microsoft-agent-framework\",\"title\":\"Agent capabilities\",\"publisher\":\"Microsoft Learn\",\"url\":\"https://learn.microsoft.com/en-us/agent-framework/agents/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"observability\",\"governance\"],\"limitations\":\"A capability catalog confirms supported surfaces, not their readiness for a particular workload, language binding, compliance regime, or operations team.\"},\n {\"id\":\"CR-REL\",\"framework\":\"crewai\",\"title\":\"CrewAI 1.15.18 release\",\"publisher\":\"CrewAI\",\"url\":\"https://github.com/crewAIInc/crewAI/releases/tag/1.15.18\",\"sourceType\":\"official-release\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"release\",\"license\"],\"limitations\":\"The release tag stamps the Python package. Managed AMP capabilities have a separate service lifecycle and are not versioned by this tag.\"},\n {\"id\":\"CR-DOCS\",\"framework\":\"crewai\",\"title\":\"CrewAI documentation\",\"publisher\":\"CrewAI\",\"url\":\"https://docs.crewai.com/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"orchestration\",\"observability\"],\"limitations\":\"The documentation landing page describes the combined open-source and enterprise journey; individual deployment entitlements require separate verification.\"},\n {\"id\":\"CR-FLOWS\",\"framework\":\"crewai\",\"title\":\"CrewAI Flows\",\"publisher\":\"CrewAI\",\"url\":\"https://docs.crewai.com/en/concepts/flows\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"state\",\"approval\",\"recovery\"],\"limitations\":\"SQLite persistence is a default mechanism, not a production architecture. The application must select durable storage and define idempotent effects and approval delivery.\"},\n {\"id\":\"CR-AMP\",\"framework\":\"crewai\",\"title\":\"CrewAI AMP introduction\",\"publisher\":\"CrewAI\",\"url\":\"https://docs.crewai.com/enterprise/introduction\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"observability\",\"deployment\"],\"limitations\":\"AMP is a managed commercial platform. Its presence does not mean the open-source package includes every managed monitoring, access, or scaling function.\"},\n {\"id\":\"CR-PROD\",\"framework\":\"crewai\",\"title\":\"CrewAI production architecture\",\"publisher\":\"CrewAI\",\"url\":\"https://github.com/crewAIInc/crewAI/blob/main/docs/v1.12.2/en/concepts/production-architecture.mdx\",\"sourceType\":\"official-repository-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"recovery\",\"deployment\"],\"limitations\":\"This versioned repository document predates the comparison cutoff release. It supports the architectural boundary only; current commands must be checked against live docs.\"},\n {\"id\":\"OA-REL\",\"framework\":\"openai-agents-sdk\",\"title\":\"OpenAI Agents SDK Python 0.22.0 release\",\"publisher\":\"OpenAI\",\"url\":\"https://github.com/openai/openai-agents-python/releases/tag/v0.22.0\",\"sourceType\":\"official-release\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"release\",\"license\"],\"limitations\":\"This tag covers the Python SDK. Other OpenAI agent products and language SDKs have distinct release surfaces and are outside this version stamp.\"},\n {\"id\":\"OA-RUN\",\"framework\":\"openai-agents-sdk\",\"title\":\"Running agents\",\"publisher\":\"OpenAI\",\"url\":\"https://openai.github.io/openai-agents-python/running_agents/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"state\",\"recovery\",\"deployment\"],\"limitations\":\"Durable execution integrations add separate runtimes and operating models. The SDK alone does not operate their queues, storage, retries, or worker lifecycle.\"},\n {\"id\":\"OA-HITL\",\"framework\":\"openai-agents-sdk\",\"title\":\"Human-in-the-loop\",\"publisher\":\"OpenAI\",\"url\":\"https://openai.github.io/openai-agents-python/human_in_the_loop/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"approval\",\"state\"],\"limitations\":\"Tool approval is a mechanism, not a complete governance policy. Identity, authorization, separation of duties, escalation, and audit retention remain application concerns.\"},\n {\"id\":\"OA-TRACE\",\"framework\":\"openai-agents-sdk\",\"title\":\"Tracing\",\"publisher\":\"OpenAI\",\"url\":\"https://openai.github.io/openai-agents-python/tracing/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"observability\"],\"limitations\":\"Trace content can include sensitive data depending on configuration. Enterprises must set capture, export, retention, and access policies before production use.\"},\n {\"id\":\"GA-REL\",\"framework\":\"google-adk\",\"title\":\"Google ADK Python 2.8.0 release\",\"publisher\":\"Google\",\"url\":\"https://github.com/google/adk-python/releases/tag/v2.8.0\",\"sourceType\":\"official-release\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"release\",\"license\"],\"limitations\":\"This tag stamps the Python SDK. TypeScript, Go, Java, and Kotlin bindings are separate packages and may expose different features or release numbers.\"},\n {\"id\":\"GA-STATE\",\"framework\":\"google-adk\",\"title\":\"ADK session state\",\"publisher\":\"Google\",\"url\":\"https://google.github.io/adk-docs/sessions/state/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"state\",\"recovery\"],\"limitations\":\"Persistence depends on SessionService. In-memory state is explicitly non-durable and cannot support process-restart recovery.\"},\n {\"id\":\"GA-HITL\",\"framework\":\"google-adk\",\"title\":\"ADK graph human input\",\"publisher\":\"Google\",\"url\":\"https://google.github.io/adk-docs/graphs/human-input/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"approval\"],\"limitations\":\"Human input primitives need application-specific identity, authorization, UI, timeout, and escalation handling to become an enterprise approval control.\"},\n {\"id\":\"GA-RESUME\",\"framework\":\"google-adk\",\"title\":\"ADK runtime resume\",\"publisher\":\"Google\",\"url\":\"https://google.github.io/adk-docs/runtime/resume/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"approval\",\"recovery\"],\"limitations\":\"Resume behavior depends on a resumable workflow and persistent session implementation. Teams must test replay behavior around external side effects.\"},\n {\"id\":\"GA-OBS\",\"framework\":\"google-adk\",\"title\":\"ADK observability\",\"publisher\":\"Google\",\"url\":\"https://google.github.io/adk-docs/observability/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"observability\"],\"limitations\":\"Cloud Trace and analytics behavior depends on deployment and capture configuration. Full prompt-response logging has additional privacy and storage implications.\"},\n {\"id\":\"GA-DEPLOY\",\"framework\":\"google-adk\",\"title\":\"ADK deployment options\",\"publisher\":\"Google\",\"url\":\"https://google.github.io/adk-docs/deploy/\",\"sourceType\":\"official-docs\",\"verifiedOn\":\"2026-08-28\",\"supports\":[\"deployment\"],\"limitations\":\"Agent Runtime, Cloud Run, and GKE have different cost, identity, networking, scaling, and operational boundaries; listing them is not a recommendation.\"}\n ]\n}\n",
+ "sha256": "sha256:9af0efc358c2e78c33eeaa5d834f38aba63f076081e37e884795154031354893",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/data/sources.json"
+ },
+ "docs/assets/framework-selector.js": {
+ "content": "const allowed = {\n language: [\"any\", \"python\", \"typescript\", \"dotnet\", \"go\", \"java\", \"kotlin\"],\n priority: [\"any\", \"durable-recovery\", \"approval\", \"observability\", \"multi-agent\", \"multi-language\", \"managed-cloud\", \"minimal-sdk\"],\n modelStrategy: [\"any\", \"agnostic\", \"openai\", \"google\", \"microsoft\"],\n deploymentControl: [\"either\", \"self-host\", \"managed\"],\n};\n\nfunction fail(code, message) {\n const error = new Error(message);\n error.code = code;\n throw error;\n}\n\nexport function validateRegistry(input) {\n if (!input || input.schemaVersion !== \"1.0.0\" || input.methodVersion !== \"1.0.0\") fail(\"INVALID_REGISTRY\", \"Unsupported registry version.\");\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(input.evidenceCutoff ?? \"\")) fail(\"INVALID_REGISTRY\", \"Evidence cutoff is missing.\");\n const expected = [\"langgraph\", \"microsoft-agent-framework\", \"crewai\", \"openai-agents-sdk\", \"google-adk\"];\n if (!Array.isArray(input.frameworks) || input.frameworks.length !== 5 || input.frameworks.some((item, index) => item.id !== expected[index])) fail(\"INVALID_REGISTRY\", \"The five-framework boundary changed.\");\n for (const item of input.frameworks) {\n if (!item.release?.version || !item.license || !Array.isArray(item.disqualifiers) || item.disqualifiers.length === 0) fail(\"INVALID_REGISTRY\", `Incomplete framework: ${item.id}`);\n for (const key of [\"state\", \"approval\", \"observability\", \"recovery\", \"deployment\"]) {\n const capability = item.capabilities?.[key];\n if (!capability?.status || !capability?.detail || !Array.isArray(capability.sourceIds) || capability.sourceIds.length === 0) fail(\"INVALID_REGISTRY\", `Incomplete capability: ${item.id}.${key}`);\n }\n }\n return Object.freeze(structuredClone(input));\n}\n\nfunction normalizedFilters(filters) {\n const value = {\n language: filters?.language ?? \"any\",\n priority: filters?.priority ?? \"any\",\n modelStrategy: filters?.modelStrategy ?? \"any\",\n deploymentControl: filters?.deploymentControl ?? \"either\",\n };\n for (const [key, options] of Object.entries(allowed)) {\n if (!options.includes(value[key])) fail(\"INVALID_FILTER\", `Unsupported ${key}: ${value[key]}`);\n }\n return value;\n}\n\nfunction modelMatch(framework, modelStrategy) {\n if (modelStrategy === \"any\") return true;\n if (modelStrategy === \"agnostic\") return framework.modelStrategy.includes(\"agnostic\");\n return framework.modelStrategy.includes(modelStrategy);\n}\n\nexport function selectFrameworks(registry, filters) {\n const value = normalizedFilters(filters);\n const candidates = registry.frameworks.filter((framework) => {\n const languageFits = value.language === \"any\" || framework.languages.includes(value.language);\n const deploymentFits = value.deploymentControl === \"either\" || framework.deploymentControl.includes(value.deploymentControl);\n return languageFits && deploymentFits;\n });\n\n const matches = candidates.map((framework, order) => {\n const matchedConstraints = [];\n let preferenceMatches = 0;\n if (value.language !== \"any\") matchedConstraints.push(`language:${value.language}`);\n if (value.deploymentControl !== \"either\") matchedConstraints.push(`deployment:${value.deploymentControl}`);\n if (value.priority !== \"any\" && framework.priorities.includes(value.priority)) {\n matchedConstraints.push(`priority:${value.priority}`);\n preferenceMatches += 2;\n }\n if (value.modelStrategy !== \"any\" && modelMatch(framework, value.modelStrategy)) {\n matchedConstraints.push(`model:${value.modelStrategy}`);\n preferenceMatches += 1;\n }\n return { ...framework, order, preferenceMatches, matchedConstraints };\n }).sort((a, b) => b.preferenceMatches - a.preferenceMatches || a.order - b.order)\n .map(({ order, preferenceMatches, ...framework }) => framework);\n\n return {\n schemaVersion: \"1.0.0\",\n methodVersion: registry.methodVersion,\n evidenceCutoff: registry.evidenceCutoff,\n filters: value,\n universalWinner: false,\n explanation: matches.length === 0\n ? \"No framework satisfies the stated hard constraints. Revisit the language or deployment boundary.\"\n : `${matches.length} framework${matches.length === 1 ? \"\" : \"s\"} satisfy the stated constraints. Ordering reflects only the selected operating preferences, not universal quality.`,\n matches,\n };\n}\n\nexport function exportShortlistJSON(result) {\n return JSON.stringify(result, null, 2);\n}\n\nfunction csvCell(value) {\n const text = Array.isArray(value) ? value.join(\" | \") : String(value ?? \"\");\n return `\"${text.replaceAll('\"', '\"\"')}\"`;\n}\n\nexport function exportShortlistCSV(result) {\n const headers = [\"framework_id\", \"framework_name\", \"version\", \"license\", \"state_status\", \"approval_status\", \"observability_status\", \"recovery_status\", \"deployment_status\", \"best_for\", \"disqualifiers\", \"evidence_cutoff\"];\n const rows = result.matches.map((framework) => [\n framework.id, framework.name, framework.release.version, framework.license,\n framework.capabilities.state.status, framework.capabilities.approval.status,\n framework.capabilities.observability.status, framework.capabilities.recovery.status,\n framework.capabilities.deployment.status, framework.bestFor, framework.disqualifiers,\n result.evidenceCutoff,\n ]);\n return [headers.join(\",\"), ...rows.map((row) => row.map(csvCell).join(\",\"))].join(\"\\n\");\n}\n",
+ "sha256": "sha256:65679649e6e58d1d0633f8c09649e42d27c8838da1189bf260a08f9e3120fb24",
+ "url": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks/blob/b1213f374722edde01ca74a7ccac68e835070705/docs/assets/framework-selector.js"
+ }
+ },
+ "independent_human_review": "NOT_REVIEWED",
+ "pages": "https://pharosproduction.github.io/enterprise-ai-agent-frameworks/",
+ "repo": "https://github.com/PharosProduction/enterprise-ai-agent-frameworks",
+ "snapshot_at": "2026-09-17T06:17:24Z"
+ },
+ "rag": {
+ "commit": "6ea24ef75c3ad09a3bb76d1c20a173bfab592559",
+ "files": {
+ "DATA-LICENSE.md": {
+ "content": "# Data license\n\nThe original structured data in `data/` and its byte-identical public mirror\nin `docs/data/` are licensed under the Creative Commons Attribution 4.0\nInternational license (CC BY 4.0).\n\nAttribution: **Pharos Production, “RAG vs Fine-Tuning Decision Matrix,” 2026**.\n\nThe license text and terms are available at\n.\n\nThis license covers the original selection, organization, annotations, rules,\nand scenarios in those directories. It does not relicense third-party source\nmaterial referenced by URL. Each source remains subject to its publisher's\nterms. Pharos Production names and marks are not licensed for use as trademarks.\n",
+ "sha256": "sha256:48b1fe8b6c6ad19bb0fe6aeb55a897bcd121fe85bab135674a51fddd46341678",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/DATA-LICENSE.md"
+ },
+ "LICENSE": {
+ "content": "MIT License\n\nCopyright (c) 2026 Pharos Production\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
+ "sha256": "sha256:48463cc27a86bdc41249f2e93168615728c7860d350b4dd51c7606e5c512555e",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/LICENSE"
+ },
+ "README.md": {
+ "content": "# RAG vs Fine-Tuning Decision Matrix\n\nA dependency-free, evidence-linked decision aid for choosing among retrieval-\naugmented generation, fine-tuning, a hybrid architecture, or a baseline-first\npath. It is designed for engineering discovery, not as a performance guarantee.\n\nThe public site is built from `docs/` and is intended for GitHub Pages at:\n\n\n\n## What is in the repository\n\n- `docs/` — the deployable, progressively enhanced static site.\n- `data/` — canonical evidence, criteria, decision rules, scenarios, and\n methodology registries.\n- `docs/data/` — byte-identical public mirrors of the canonical registries.\n- `test/` — Node test-runner coverage for the decision engine and public\n contract.\n- `scripts/` — deterministic data and release gates plus a bounded,\n non-semantic source reachability reporter.\n\n## Local verification\n\nNode.js 22 or newer is required. The project has no runtime or development\ndependencies.\n\n```sh\nnpm test\nnpm run check:data\nnpm run check:release\n```\n\n`npm run check:sources` performs live network requests. It reports transport\nstatus only; it does not decide whether a claim is true and does not edit any\nregistry. Because publisher availability can change independently of the\nrelease, it is deliberately separate from the deterministic release gate.\n\nServe `docs/` with any static HTTP server to exercise the browser experience.\nOpening the page without JavaScript still exposes the core comparison,\nmethodology, sources, and limitations.\n\n## Evidence and review boundary\n\nEvery decision rule links to claim and source identifiers. The release gate\nchecks those references and the exact public data mirrors. It does not claim\nthat an independent human reviewed the site, and no named human reviewer is a\ndeployment requirement. The public methodology states that boundary directly.\n\nThe matrix is an aid to planning an evaluation. Teams still need to test their\nown corpus, tasks, permissions, latency, quality, and operational constraints.\n\n## Licensing\n\nCode is available under the [MIT License](LICENSE). Original structured data is\navailable under [CC BY 4.0](DATA-LICENSE.md). Third-party sources retain their\nown terms.\n",
+ "sha256": "sha256:f7ec44a5cf624b436395d051f4ad667184fe72439e6a3878803131f578be1e46",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/README.md"
+ },
+ "data/claims.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"claims\": [\n {\n \"id\": \"CLAIM-RAG-RUNTIME-RETRIEVAL\",\n \"statement\": \"RAG supplies retrieved external information to a generator at inference time instead of encoding every changing fact in model parameters.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-RAG-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"]\n },\n {\n \"id\": \"CLAIM-RAG-FRESHNESS-FIT\",\n \"statement\": \"A retrieval path is a suitable candidate when the required knowledge changes independently of the model and the corpus can be maintained.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-PHAROS-GUIDE\"]\n },\n {\n \"id\": \"CLAIM-RAG-PROVENANCE\",\n \"statement\": \"Retrieved passages can provide provenance for an answer, but the application must still test whether each citation supports the generated claim.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-RAG-PAPER\", \"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"]\n },\n {\n \"id\": \"CLAIM-FINE-TUNING-BEHAVIOR\",\n \"statement\": \"Fine-tuning is an optimization path for task behavior, format, or specialization; it is not a dependable mechanism for continuously changing facts.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-OPENAI-MODEL-OPTIMIZATION\"]\n },\n {\n \"id\": \"CLAIM-EXAMPLES-REQUIRED\",\n \"statement\": \"A fine-tuning decision needs representative examples and an evaluation set that reflects the intended task.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\", \"SOURCE-MICROSOFT-RAG-VS-FT\"]\n },\n {\n \"id\": \"CLAIM-EVAL-FIRST\",\n \"statement\": \"Prompting, retrieval, and training changes should be compared against a defined evaluation baseline rather than selected from an architecture label alone.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\", \"SOURCE-PHAROS-GUIDE\"]\n },\n {\n \"id\": \"CLAIM-LEXICAL-SEMANTIC\",\n \"statement\": \"Lexical retrieval such as BM25 and embedding retrieval recover different signals and can be combined when exact terms and semantic similarity both matter.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"]\n },\n {\n \"id\": \"CLAIM-RERANKING\",\n \"statement\": \"A reranker can reorder an initial retrieval candidate set before context is passed to the model.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"]\n },\n {\n \"id\": \"CLAIM-CORPUS-QUALITY\",\n \"statement\": \"A RAG recommendation presumes an authoritative, permissioned corpus and an operating path for indexing and updates.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-PHAROS-GUIDE\"]\n },\n {\n \"id\": \"CLAIM-LORA-METHOD\",\n \"statement\": \"LoRA is a parameter-efficient adaptation method that freezes pretrained weights and learns low-rank update matrices.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-LORA-PAPER\"]\n },\n {\n \"id\": \"CLAIM-HYBRID-PATTERN\",\n \"statement\": \"Retrieval and parameter adaptation can be combined when a workload separately requires external domain evidence and specialized model behavior.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"]\n },\n {\n \"id\": \"CLAIM-RAFT-SCOPE\",\n \"statement\": \"RAFT is one retrieval-aware fine-tuning method that trains with relevant documents and distractor documents for domain-specific RAG settings.\",\n \"status\": \"VERIFIED\",\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\"]\n },\n {\n \"id\": \"CLAIM-DUAL-OPERATIONS\",\n \"statement\": \"A hybrid design creates both retrieval-index and model-version lifecycle work, so both operating capabilities must be assessed.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\", \"SOURCE-PHAROS-GUIDE\"]\n },\n {\n \"id\": \"CLAIM-PRIVACY-TOPOLOGY\",\n \"statement\": \"Privacy and retention properties depend on the selected provider, endpoint, storage path, deployment topology, and configuration; neither architecture has one universal data boundary.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-OPENAI-DATA-CONTROLS\", \"SOURCE-MICROSOFT-RAG-VS-FT\"]\n },\n {\n \"id\": \"CLAIM-RUNTIME-MEASUREMENT\",\n \"statement\": \"Latency, quality, and cost tradeoffs must be measured on the target workload and deployment rather than inferred from RAG or fine-tuning labels.\",\n \"status\": \"BOUNDED\",\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-OPENAI-MODEL-OPTIMIZATION\"]\n }\n ]\n}\n",
+ "sha256": "sha256:148501946fd5fba96bedff868fed95baab092d48e921977d8f672e8d6996ec8c",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/claims.json"
+ },
+ "data/criteria.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"answerSemantics\": {\n \"yes\": \"Evidence supports the condition for the target workload.\",\n \"no\": \"Evidence contradicts the condition for the target workload.\",\n \"unknown\": \"The condition has not been verified; the engine will not infer an answer.\"\n },\n \"criteria\": [\n {\n \"id\": \"fresh_facts\",\n \"label\": \"Changing knowledge\",\n \"question\": \"Must answers use facts that change independently of the model release?\",\n \"dimension\": \"knowledge\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-RAG-FRESHNESS-FIT\"]\n },\n {\n \"id\": \"source_citations\",\n \"label\": \"Passage-level evidence\",\n \"question\": \"Must users inspect source passages behind material answer claims?\",\n \"dimension\": \"knowledge\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-RAG-PAPER\"],\n \"claimIds\": [\"CLAIM-RAG-PROVENANCE\"]\n },\n {\n \"id\": \"behavior_change\",\n \"label\": \"Behavior specialization\",\n \"question\": \"Is the primary gap consistent task behavior, style, format, classification, or extraction?\",\n \"dimension\": \"behavior\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-FINE-TUNING-BEHAVIOR\"]\n },\n {\n \"id\": \"representative_examples\",\n \"label\": \"Representative examples\",\n \"question\": \"Are representative, permitted examples available for training and held-out evaluation?\",\n \"dimension\": \"data\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EXAMPLES-REQUIRED\"]\n },\n {\n \"id\": \"evaluation_set\",\n \"label\": \"Evaluation set\",\n \"question\": \"Is there a versioned evaluation set with acceptance criteria for this workload?\",\n \"dimension\": \"evaluation\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"authoritative_corpus\",\n \"label\": \"Authoritative corpus\",\n \"question\": \"Is an authoritative, permissioned, maintainable corpus available for retrieval?\",\n \"dimension\": \"data\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-CORPUS-QUALITY\"]\n },\n {\n \"id\": \"exact_term_retrieval\",\n \"label\": \"Exact-term retrieval\",\n \"question\": \"Do identifiers, codes, names, or exact phrases materially affect retrieval quality?\",\n \"dimension\": \"retrieval\",\n \"core\": false,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"],\n \"claimIds\": [\"CLAIM-LEXICAL-SEMANTIC\"]\n },\n {\n \"id\": \"strict_runtime_budget\",\n \"label\": \"Strict runtime budget\",\n \"question\": \"Does the workload have a strict measured latency or per-request cost budget?\",\n \"dimension\": \"operations\",\n \"core\": false,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-RUNTIME-MEASUREMENT\"]\n },\n {\n \"id\": \"privacy_topology\",\n \"label\": \"Verified privacy topology\",\n \"question\": \"Have storage, retrieval, training, retention, and provider data paths been mapped?\",\n \"dimension\": \"governance\",\n \"core\": false,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-OPENAI-DATA-CONTROLS\"],\n \"claimIds\": [\"CLAIM-PRIVACY-TOPOLOGY\"]\n },\n {\n \"id\": \"retrieval_operations\",\n \"label\": \"Retrieval operations\",\n \"question\": \"Can the team own corpus ingestion, index updates, retrieval evaluation, and rollback?\",\n \"dimension\": \"operations\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-CORPUS-QUALITY\"]\n },\n {\n \"id\": \"training_operations\",\n \"label\": \"Training operations\",\n \"question\": \"Can the team own training data, model versions, regression evaluation, and rollback?\",\n \"dimension\": \"operations\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EXAMPLES-REQUIRED\", \"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"stable_narrow_task\",\n \"label\": \"Stable narrow task\",\n \"question\": \"Is the target behavior narrow enough and stable enough to maintain as a trained model contract?\",\n \"dimension\": \"behavior\",\n \"core\": true,\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-FINE-TUNING-BEHAVIOR\"]\n }\n ]\n}\n",
+ "sha256": "sha256:2ee709871a6fe387d392de77f2346c013df988e16fe82c9f2fb27b4547397004",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/criteria.json"
+ },
+ "data/methodology.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"name\": \"Evidence-bound RAG versus fine-tuning decision method\",\n \"publishedOn\": \"2026-08-18\",\n \"publisher\": \"Pharos Production\",\n \"purpose\": \"Classify the next architecture experiment without converting qualitative evidence into a probability or universal score.\",\n \"allowedAnswers\": [\"yes\", \"no\", \"unknown\"],\n \"priorityDirection\": \"ascending\",\n \"outcomes\": [\n {\n \"id\": \"RAG\",\n \"label\": \"RAG candidate\",\n \"meaning\": \"Test a retrieval-grounded baseline because changing or traceable knowledge is required and the corpus and retrieval operating path exist.\"\n },\n {\n \"id\": \"FINE_TUNING\",\n \"label\": \"Fine-tuning candidate\",\n \"meaning\": \"Test parameter adaptation because the primary need is stable task behavior and representative examples and training operations exist.\"\n },\n {\n \"id\": \"HYBRID\",\n \"label\": \"Hybrid candidate\",\n \"meaning\": \"Test retrieval plus behavior adaptation because both needs and both operational paths are independently evidenced.\"\n },\n {\n \"id\": \"BASELINE_FIRST\",\n \"label\": \"Baseline first\",\n \"meaning\": \"Establish or improve a prompting/evaluation baseline before adding retrieval or training complexity.\"\n },\n {\n \"id\": \"BLOCKED\",\n \"label\": \"Blocked\",\n \"meaning\": \"A required data or operating dependency is absent; a plausible architecture label cannot remove that blocker.\"\n },\n {\n \"id\": \"INSUFFICIENT_EVIDENCE\",\n \"label\": \"Insufficient evidence\",\n \"meaning\": \"A core input or evaluation contract is unresolved, so the method declines to select a winner.\"\n }\n ],\n \"decisionProcedure\": [\n \"Validate that every registered criterion has exactly one allowed answer and reject unknown criterion IDs.\",\n \"Evaluate decision rules in ascending unique priority and select the first matching outcome.\",\n \"Evaluate advisory rules independently and attach their tests, risks, and provenance without changing the outcome.\",\n \"Export the answers, winning rule, triggered advisories, blockers, unresolved inputs, source IDs, claim IDs, and registry versions.\"\n ],\n \"evaluationContract\": {\n \"requiredBeforeWinner\": true,\n \"minimumJobs\": [\n \"Define representative tasks and failure classes.\",\n \"Record a prompt-only or current-system baseline.\",\n \"For retrieval, test retrieval relevance and claim-to-passage support separately from final-answer quality.\",\n \"For tuning, test target behavior and regression on capabilities that must be preserved.\",\n \"Measure latency, cost, privacy paths, and operational recovery in the intended topology.\"\n ]\n },\n \"limitations\": [\n \"The outcome is a candidate for a bounded experiment, not an implementation guarantee.\",\n \"The method contains no universal dataset-size, accuracy, latency, document-count, or cost threshold.\",\n \"Provider features and data controls can change after the dated source verification.\",\n \"Independent human technical review of this microsite is not claimed.\"\n ],\n \"disclosure\": \"Research synthesis and implementation were AI-assisted; claims are bounded to the listed sources and verification date.\"\n}\n",
+ "sha256": "sha256:bed80ed497a8d4c41219339ee3667800979c50100f3cc83db92255ae4db1320c",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/methodology.json"
+ },
+ "data/rules.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"rules\": [\n {\n \"id\": \"RULE-BLOCKED-NO-CORPUS\",\n \"kind\": \"decision\",\n \"priority\": 10,\n \"outcomeId\": \"BLOCKED\",\n \"when\": {\n \"all\": [{\"criterionId\": \"authoritative_corpus\", \"operator\": \"equals\", \"value\": \"no\"}],\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"disqualifiers\": [\"NO_AUTHORITATIVE_CORPUS\"],\n \"rejectedOutcomes\": [\"RAG\", \"HYBRID\", \"FINE_TUNING\"],\n \"nextSteps\": [\"Identify an authoritative, permissioned corpus and an owner for updates before selecting a knowledge architecture.\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-RAG-PAPER\"],\n \"claimIds\": [\"CLAIM-RAG-FRESHNESS-FIT\", \"CLAIM-CORPUS-QUALITY\"]\n },\n {\n \"id\": \"RULE-INSUFFICIENT-UNKNOWN-CORE\",\n \"kind\": \"decision\",\n \"priority\": 20,\n \"outcomeId\": \"INSUFFICIENT_EVIDENCE\",\n \"when\": {\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"representative_examples\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"evaluation_set\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"authoritative_corpus\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"retrieval_operations\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"training_operations\", \"operator\": \"equals\", \"value\": \"unknown\"},\n {\"criterionId\": \"stable_narrow_task\", \"operator\": \"equals\", \"value\": \"unknown\"}\n ]\n },\n \"nextSteps\": [\"Resolve every unknown core input with a named evidence owner before forcing an architecture choice.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"RULE-INSUFFICIENT-NO-EVAL\",\n \"kind\": \"decision\",\n \"priority\": 30,\n \"outcomeId\": \"INSUFFICIENT_EVIDENCE\",\n \"when\": {\"all\": [{\"criterionId\": \"evaluation_set\", \"operator\": \"equals\", \"value\": \"no\"}]},\n \"disqualifiers\": [\"NO_EVALUATION_SET\"],\n \"nextSteps\": [\"Create a versioned task evaluation set and acceptance criteria, then compare candidates against the same baseline.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\", \"CLAIM-EXAMPLES-REQUIRED\"]\n },\n {\n \"id\": \"RULE-BASELINE-NO-EXAMPLES\",\n \"kind\": \"decision\",\n \"priority\": 40,\n \"outcomeId\": \"BASELINE_FIRST\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"representative_examples\", \"operator\": \"equals\", \"value\": \"no\"}\n ]\n },\n \"rejectedOutcomes\": [\"FINE_TUNING\", \"HYBRID\"],\n \"nextSteps\": [\"Establish a prompt baseline and collect permitted, representative failure and success examples before training.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EXAMPLES-REQUIRED\", \"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"RULE-BLOCKED-NO-RETRIEVAL-OPS\",\n \"kind\": \"decision\",\n \"priority\": 50,\n \"outcomeId\": \"BLOCKED\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"authoritative_corpus\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"retrieval_operations\", \"operator\": \"equals\", \"value\": \"no\"}\n ],\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"disqualifiers\": [\"NO_RETRIEVAL_OPERATING_PATH\"],\n \"rejectedOutcomes\": [\"RAG\", \"HYBRID\"],\n \"nextSteps\": [\"Assign ownership for ingestion, index freshness, retrieval evaluation, rollback, and access control.\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-CORPUS-QUALITY\"]\n },\n {\n \"id\": \"RULE-BLOCKED-NO-TRAINING-OPS\",\n \"kind\": \"decision\",\n \"priority\": 60,\n \"outcomeId\": \"BLOCKED\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"representative_examples\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"training_operations\", \"operator\": \"equals\", \"value\": \"no\"}\n ]\n },\n \"disqualifiers\": [\"NO_TRAINING_OPERATING_PATH\"],\n \"rejectedOutcomes\": [\"FINE_TUNING\", \"HYBRID\"],\n \"nextSteps\": [\"Assign ownership for datasets, model versions, regression evaluation, rollback, and provider lifecycle.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EXAMPLES-REQUIRED\", \"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"RULE-HYBRID-CANDIDATE\",\n \"kind\": \"decision\",\n \"priority\": 70,\n \"outcomeId\": \"HYBRID\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"representative_examples\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"authoritative_corpus\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"retrieval_operations\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"training_operations\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"stable_narrow_task\", \"operator\": \"equals\", \"value\": \"yes\"}\n ],\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"nextSteps\": [\"Test retrieval and behavior adaptation separately before testing the combined system; retain both rollback paths.\"],\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-HYBRID-PATTERN\", \"CLAIM-DUAL-OPERATIONS\", \"CLAIM-RAFT-SCOPE\"]\n },\n {\n \"id\": \"RULE-RAG-CANDIDATE\",\n \"kind\": \"decision\",\n \"priority\": 80,\n \"outcomeId\": \"RAG\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"authoritative_corpus\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"retrieval_operations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ],\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"nextSteps\": [\"Build a retrieval baseline and evaluate passage relevance, claim support, answer quality, freshness, and recovery from stale indexes.\"],\n \"sourceIds\": [\"SOURCE-RAG-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-RAG-RUNTIME-RETRIEVAL\", \"CLAIM-RAG-FRESHNESS-FIT\", \"CLAIM-RAG-PROVENANCE\"]\n },\n {\n \"id\": \"RULE-FINE-TUNING-CANDIDATE\",\n \"kind\": \"decision\",\n \"priority\": 90,\n \"outcomeId\": \"FINE_TUNING\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"representative_examples\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"training_operations\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"stable_narrow_task\", \"operator\": \"equals\", \"value\": \"yes\"}\n ],\n \"none\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"nextSteps\": [\"Compare prompt-only and fine-tuned candidates on target behavior, held-out examples, regressions, and rollback readiness.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\", \"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-LORA-PAPER\"],\n \"claimIds\": [\"CLAIM-FINE-TUNING-BEHAVIOR\", \"CLAIM-EXAMPLES-REQUIRED\", \"CLAIM-LORA-METHOD\"]\n },\n {\n \"id\": \"RULE-BASELINE-NO-PRIMARY-GAP\",\n \"kind\": \"decision\",\n \"priority\": 100,\n \"outcomeId\": \"BASELINE_FIRST\",\n \"when\": {\n \"all\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"no\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"no\"},\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"no\"}\n ]\n },\n \"nextSteps\": [\"Measure the current prompt or workflow baseline and document a specific failure class before adding architecture.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"RULE-INSUFFICIENT-FALLBACK\",\n \"kind\": \"decision\",\n \"priority\": 110,\n \"outcomeId\": \"INSUFFICIENT_EVIDENCE\",\n \"when\": {\"all\": [{\"criterionId\": \"fresh_facts\", \"operator\": \"not_equals\", \"value\": \"unknown\"}]},\n \"nextSteps\": [\"Document which requirement, data asset, or operating capability prevents the available evidence from matching a candidate rule.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\", \"SOURCE-PHAROS-GUIDE\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\"]\n },\n {\n \"id\": \"ADVISORY-LEXICAL-RETRIEVAL\",\n \"kind\": \"advisory\",\n \"priority\": 200,\n \"when\": {\"all\": [{\"criterionId\": \"exact_term_retrieval\", \"operator\": \"equals\", \"value\": \"yes\"}]},\n \"nextSteps\": [\"Benchmark BM25 or another lexical path alongside embeddings, then evaluate fusion and reranking on exact-term failures.\"],\n \"sourceIds\": [\"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"],\n \"claimIds\": [\"CLAIM-LEXICAL-SEMANTIC\", \"CLAIM-RERANKING\"]\n },\n {\n \"id\": \"ADVISORY-CITATION-FAITHFULNESS\",\n \"kind\": \"advisory\",\n \"priority\": 210,\n \"when\": {\"all\": [{\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}]},\n \"nextSteps\": [\"Evaluate whether each material generated claim is supported by its cited passage; do not treat citation presence as faithfulness.\"],\n \"sourceIds\": [\"SOURCE-RAG-PAPER\", \"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\"],\n \"claimIds\": [\"CLAIM-RAG-PROVENANCE\"]\n },\n {\n \"id\": \"ADVISORY-RUNTIME-BENCHMARK\",\n \"kind\": \"advisory\",\n \"priority\": 220,\n \"when\": {\"all\": [{\"criterionId\": \"strict_runtime_budget\", \"operator\": \"equals\", \"value\": \"yes\"}]},\n \"nextSteps\": [\"Benchmark end-to-end latency and cost on the intended provider, corpus, traffic shape, and quality target.\"],\n \"sourceIds\": [\"SOURCE-MICROSOFT-RAG-VS-FT\", \"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-RUNTIME-MEASUREMENT\"]\n },\n {\n \"id\": \"ADVISORY-PRIVACY-TOPOLOGY\",\n \"kind\": \"advisory\",\n \"priority\": 230,\n \"when\": {\"all\": [{\"criterionId\": \"privacy_topology\", \"operator\": \"equals\", \"value\": \"yes\"}]},\n \"nextSteps\": [\"Retain the verified data-flow map and recheck provider retention, training, access, and deletion controls before release.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-DATA-CONTROLS\"],\n \"claimIds\": [\"CLAIM-PRIVACY-TOPOLOGY\"]\n },\n {\n \"id\": \"ADVISORY-PRIVACY-UNRESOLVED\",\n \"kind\": \"advisory\",\n \"priority\": 240,\n \"when\": {\n \"any\": [\n {\"criterionId\": \"privacy_topology\", \"operator\": \"equals\", \"value\": \"no\"},\n {\"criterionId\": \"privacy_topology\", \"operator\": \"equals\", \"value\": \"unknown\"}\n ]\n },\n \"nextSteps\": [\"Map storage, retrieval, training, retention, access, and deletion paths; architecture labels alone do not establish privacy.\"],\n \"sourceIds\": [\"SOURCE-OPENAI-DATA-CONTROLS\", \"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-PRIVACY-TOPOLOGY\"]\n },\n {\n \"id\": \"ADVISORY-HYBRID-OPERATIONS\",\n \"kind\": \"advisory\",\n \"priority\": 250,\n \"when\": {\n \"all\": [\n {\"criterionId\": \"retrieval_operations\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"training_operations\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"behavior_change\", \"operator\": \"equals\", \"value\": \"yes\"}\n ],\n \"any\": [\n {\"criterionId\": \"fresh_facts\", \"operator\": \"equals\", \"value\": \"yes\"},\n {\"criterionId\": \"source_citations\", \"operator\": \"equals\", \"value\": \"yes\"}\n ]\n },\n \"nextSteps\": [\"Version the corpus, index, training dataset, base model, adapter or tuned model, and evaluation suite as separate release inputs.\"],\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\"],\n \"claimIds\": [\"CLAIM-HYBRID-PATTERN\", \"CLAIM-DUAL-OPERATIONS\"]\n }\n ]\n}\n",
+ "sha256": "sha256:2e7e1cc3602086eccdced9d531ae327fc9d17f1d7e09e9b7f431c918e6627d83",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/rules.json"
+ },
+ "data/scenarios.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"scenarios\": [\n {\n \"id\": \"SCENARIO-CHANGING-KNOWLEDGE-BASE\",\n \"title\": \"Changing support knowledge base\",\n \"situation\": \"Support answers must reflect maintained policies and link the user to the passages used.\",\n \"evidencePattern\": [\"fresh_facts=yes\", \"source_citations=yes\", \"authoritative_corpus=yes\", \"retrieval_operations=yes\", \"evaluation_set=yes\"],\n \"candidateOutcome\": \"RAG\",\n \"why\": \"The primary gap is a maintained knowledge path with traceability, not a new behavioral contract.\",\n \"firstExperiment\": \"Compare a prompt-only baseline with retrieval and score passage relevance, claim support, answer quality, and stale-index failures.\",\n \"sourceIds\": [\"SOURCE-RAG-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-RAG-FRESHNESS-FIT\", \"CLAIM-RAG-PROVENANCE\"]\n },\n {\n \"id\": \"SCENARIO-STABLE-STRUCTURED-TASK\",\n \"title\": \"Stable structured extraction task\",\n \"situation\": \"A stable input class must produce a consistent schema, and representative permitted examples already exist.\",\n \"evidencePattern\": [\"behavior_change=yes\", \"representative_examples=yes\", \"training_operations=yes\", \"stable_narrow_task=yes\", \"evaluation_set=yes\"],\n \"candidateOutcome\": \"FINE_TUNING\",\n \"why\": \"The target is repeatable task behavior rather than changing external facts.\",\n \"firstExperiment\": \"Compare prompt-only and tuned candidates on held-out schema validity, task errors, regressions, and operational rollback.\",\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\", \"SOURCE-LORA-PAPER\"],\n \"claimIds\": [\"CLAIM-FINE-TUNING-BEHAVIOR\", \"CLAIM-EXAMPLES-REQUIRED\", \"CLAIM-LORA-METHOD\"]\n },\n {\n \"id\": \"SCENARIO-DOMAIN-ASSISTANT\",\n \"title\": \"Domain assistant with specialized behavior\",\n \"situation\": \"The assistant must use a changing domain corpus and also follow a stable response or reasoning contract represented in examples.\",\n \"evidencePattern\": [\"fresh_facts=yes\", \"behavior_change=yes\", \"representative_examples=yes\", \"authoritative_corpus=yes\", \"retrieval_operations=yes\", \"training_operations=yes\", \"stable_narrow_task=yes\", \"evaluation_set=yes\"],\n \"candidateOutcome\": \"HYBRID\",\n \"why\": \"The knowledge and behavior gaps are independent and both lifecycle capabilities are present.\",\n \"firstExperiment\": \"Test retrieval and behavior adaptation separately; combine them only if each produces a measured improvement without unacceptable regressions.\",\n \"sourceIds\": [\"SOURCE-RAFT-PAPER\", \"SOURCE-MICROSOFT-RAG-VS-FT\"],\n \"claimIds\": [\"CLAIM-HYBRID-PATTERN\", \"CLAIM-DUAL-OPERATIONS\"]\n },\n {\n \"id\": \"SCENARIO-NO-EVALUATION\",\n \"title\": \"Architecture request without an evaluation set\",\n \"situation\": \"Stakeholders request RAG or tuning, but no versioned tasks or acceptance criteria distinguish a real improvement from a demo.\",\n \"evidencePattern\": [\"evaluation_set=no\"],\n \"candidateOutcome\": \"INSUFFICIENT_EVIDENCE\",\n \"why\": \"The tool declines to choose when alternatives cannot be measured against the same workload contract.\",\n \"firstExperiment\": \"Create the evaluation set and baseline before implementing either architecture.\",\n \"sourceIds\": [\"SOURCE-OPENAI-MODEL-OPTIMIZATION\"],\n \"claimIds\": [\"CLAIM-EVAL-FIRST\"]\n }\n ]\n}\n",
+ "sha256": "sha256:081c6dd447997048338e0e027e78f10e43ca4cdcc89dc8135bdf57484006e6ae",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/scenarios.json"
+ },
+ "data/sources.json": {
+ "content": "{\n \"version\": \"2026-08-18.1\",\n \"verifiedOn\": \"2026-08-18\",\n \"sources\": [\n {\n \"id\": \"SOURCE-PHAROS-GUIDE\",\n \"title\": \"RAG vs Fine-Tuning: When to Use Each for AI Projects\",\n \"publisher\": \"Pharos Production\",\n \"type\": \"practitioner-guide\",\n \"url\": \"https://pharosproduction.com/insights/engineering/rag-vs-fine-tuning/\",\n \"published\": \"2026-03-30\",\n \"updated\": \"2026-06-29\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Practitioner framing only; quantitative claims are not reused without primary support.\"\n },\n {\n \"id\": \"SOURCE-RAG-PAPER\",\n \"title\": \"Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks\",\n \"publisher\": \"arXiv\",\n \"type\": \"research-paper\",\n \"url\": \"https://arxiv.org/abs/2005.11401\",\n \"published\": \"2020-05-22\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports the RAG architecture definition and provenance-oriented claims, not universal production outcomes.\"\n },\n {\n \"id\": \"SOURCE-MICROSOFT-RAG-VS-FT\",\n \"title\": \"Augment language models with RAG or fine-tuning\",\n \"publisher\": \"Microsoft Learn\",\n \"type\": \"official-documentation\",\n \"url\": \"https://learn.microsoft.com/en-us/azure/developer/ai/augment-llm-rag-fine-tuning\",\n \"updated\": \"2026-01-30\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports qualitative selection factors; vendor examples are not universal thresholds.\"\n },\n {\n \"id\": \"SOURCE-ANTHROPIC-CONTEXTUAL-RETRIEVAL\",\n \"title\": \"Introducing Contextual Retrieval\",\n \"publisher\": \"Anthropic\",\n \"type\": \"official-engineering-article\",\n \"url\": \"https://www.anthropic.com/engineering/contextual-retrieval\",\n \"published\": \"2024-09-19\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports hybrid lexical-semantic retrieval and reranking patterns; reported experiments remain provider-specific.\"\n },\n {\n \"id\": \"SOURCE-OPENAI-MODEL-OPTIMIZATION\",\n \"title\": \"Model optimization\",\n \"publisher\": \"OpenAI\",\n \"type\": \"official-documentation\",\n \"url\": \"https://developers.openai.com/api/docs/guides/model-optimization\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports an eval-first optimization loop and fine-tuning with representative examples; product availability can change.\"\n },\n {\n \"id\": \"SOURCE-LORA-PAPER\",\n \"title\": \"LoRA: Low-Rank Adaptation of Large Language Models\",\n \"publisher\": \"arXiv\",\n \"type\": \"research-paper\",\n \"url\": \"https://arxiv.org/abs/2106.09685\",\n \"published\": \"2021-06-17\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports the LoRA method definition; benchmark results are not generalized to every model or workload.\"\n },\n {\n \"id\": \"SOURCE-RAFT-PAPER\",\n \"title\": \"RAFT: Adapting Language Model to Domain Specific RAG\",\n \"publisher\": \"arXiv\",\n \"type\": \"research-paper\",\n \"url\": \"https://arxiv.org/abs/2403.10131\",\n \"published\": \"2024-03-15\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Supports a specific retrieval-aware fine-tuning pattern, not a universal claim that hybrid systems outperform.\"\n },\n {\n \"id\": \"SOURCE-OPENAI-DATA-CONTROLS\",\n \"title\": \"Data controls in the OpenAI platform\",\n \"publisher\": \"OpenAI\",\n \"type\": \"official-documentation\",\n \"url\": \"https://developers.openai.com/api/docs/guides/your-data#default-usage-policies-by-endpoint\",\n \"verificationStatus\": \"VERIFIED\",\n \"verifiedOn\": \"2026-08-18\",\n \"useBoundary\": \"Used only to show that retention and training treatment depend on service and endpoint configuration.\"\n }\n ]\n}\n",
+ "sha256": "sha256:7bcabfde4cf9568ed097dba26b4393f708771695f2913e43a6252d7f1afe1ac7",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/data/sources.json"
+ },
+ "docs/assets/decision-engine.js": {
+ "content": "const ANSWERS = new Set(['yes', 'no', 'unknown']);\nconst RULE_KINDS = new Set(['decision', 'advisory']);\nconst OUTCOMES = new Set([\n 'RAG',\n 'FINE_TUNING',\n 'HYBRID',\n 'BASELINE_FIRST',\n 'BLOCKED',\n 'INSUFFICIENT_EVIDENCE',\n]);\n\nclass DecisionEngineError extends Error {\n constructor(code, message) {\n super(message);\n this.name = 'DecisionEngineError';\n this.code = code;\n }\n}\n\nconst fail = (code, message) => {\n throw new DecisionEngineError(code, message);\n};\n\nconst isObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);\n\nconst stringArray = (value, field, ruleId) => {\n if (value === undefined) return [];\n if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || item.length === 0)) {\n fail('INVALID_REGISTRY', `${field} must be an array of non-empty strings on ${ruleId}`);\n }\n return [...value];\n};\n\nconst validateCondition = (condition, criterionIds, ruleId) => {\n if (!isObject(condition) || !criterionIds.has(condition.criterionId)) {\n fail('INVALID_REGISTRY', `Unknown criterion in conditions for ${ruleId}`);\n }\n if (!['equals', 'not_equals'].includes(condition.operator) || !ANSWERS.has(condition.value)) {\n fail('INVALID_REGISTRY', `Invalid condition on ${ruleId}`);\n }\n return Object.freeze({\n criterionId: condition.criterionId,\n operator: condition.operator,\n value: condition.value,\n });\n};\n\nconst validateWhen = (when, criterionIds, ruleId) => {\n if (!isObject(when)) fail('INVALID_REGISTRY', `Missing conditions for ${ruleId}`);\n const supported = new Set(['all', 'any', 'none']);\n if (Object.keys(when).some((key) => !supported.has(key))) {\n fail('INVALID_REGISTRY', `Unsupported condition group on ${ruleId}`);\n }\n\n const normalized = {};\n for (const group of supported) {\n const conditions = when[group] ?? [];\n if (!Array.isArray(conditions)) {\n fail('INVALID_REGISTRY', `${group} must be an array on ${ruleId}`);\n }\n normalized[group] = Object.freeze(\n conditions.map((condition) => validateCondition(condition, criterionIds, ruleId)),\n );\n }\n if (normalized.all.length + normalized.any.length + normalized.none.length === 0) {\n fail('INVALID_REGISTRY', `Rule ${ruleId} must contain at least one condition`);\n }\n return Object.freeze(normalized);\n};\n\nconst conditionMatches = (condition, answers) => {\n const matches = answers[condition.criterionId] === condition.value;\n return condition.operator === 'equals' ? matches : !matches;\n};\n\nconst ruleMatches = (rule, answers) => {\n const { all, any, none } = rule.when;\n return all.every((condition) => conditionMatches(condition, answers))\n && (any.length === 0 || any.some((condition) => conditionMatches(condition, answers)))\n && none.every((condition) => !conditionMatches(condition, answers));\n};\n\nconst unique = (items) => [...new Set(items)];\n\nconst normalizeRegistry = ({ criteria, rules, methodology }) => {\n if (!isObject(criteria) || !Array.isArray(criteria.criteria) || criteria.criteria.length === 0) {\n fail('INVALID_REGISTRY', 'The criteria registry is missing or empty');\n }\n if (!isObject(rules) || !Array.isArray(rules.rules) || rules.rules.length === 0) {\n fail('INVALID_REGISTRY', 'The rules registry is missing or empty');\n }\n if (!isObject(methodology) || typeof methodology.version !== 'string' || methodology.version.length === 0) {\n fail('INVALID_REGISTRY', 'The methodology version is required');\n }\n\n const criterionIds = new Set();\n const normalizedCriteria = criteria.criteria.map((criterion) => {\n if (!isObject(criterion) || typeof criterion.id !== 'string' || criterion.id.length === 0) {\n fail('INVALID_REGISTRY', 'Every criterion requires a non-empty id');\n }\n if (criterionIds.has(criterion.id)) fail('INVALID_REGISTRY', `Duplicate criterion ${criterion.id}`);\n criterionIds.add(criterion.id);\n const allowedAnswers = criterion.allowedAnswers ?? ['yes', 'no', 'unknown'];\n if (!Array.isArray(allowedAnswers)\n || allowedAnswers.length !== ANSWERS.size\n || allowedAnswers.some((answer) => !ANSWERS.has(answer))) {\n fail('INVALID_REGISTRY', `Criterion ${criterion.id} must allow yes, no, and unknown`);\n }\n return Object.freeze({ id: criterion.id, allowedAnswers: Object.freeze([...allowedAnswers]) });\n });\n\n const ruleIds = new Set();\n const priorities = new Set();\n const normalizedRules = rules.rules.map((rule) => {\n if (!isObject(rule) || typeof rule.id !== 'string' || rule.id.length === 0 || ruleIds.has(rule.id)) {\n fail('INVALID_REGISTRY', 'Rule IDs must be non-empty and unique');\n }\n ruleIds.add(rule.id);\n if (!Number.isInteger(rule.priority) || priorities.has(rule.priority)) {\n fail('INVALID_REGISTRY', 'Rule priorities must be unique integers');\n }\n priorities.add(rule.priority);\n if (!RULE_KINDS.has(rule.kind)) fail('INVALID_REGISTRY', `Invalid rule kind on ${rule.id}`);\n if (rule.kind === 'decision' && !OUTCOMES.has(rule.outcomeId)) {\n fail('INVALID_REGISTRY', `Invalid outcome on ${rule.id}`);\n }\n if (rule.kind === 'advisory' && rule.outcomeId !== undefined) {\n fail('INVALID_REGISTRY', `Advisory ${rule.id} cannot declare an outcome`);\n }\n\n return Object.freeze({\n id: rule.id,\n kind: rule.kind,\n priority: rule.priority,\n outcomeId: rule.outcomeId,\n when: validateWhen(rule.when, criterionIds, rule.id),\n sourceIds: Object.freeze(stringArray(rule.sourceIds, 'sourceIds', rule.id)),\n claimIds: Object.freeze(stringArray(rule.claimIds, 'claimIds', rule.id)),\n disqualifiers: Object.freeze(stringArray(rule.disqualifiers, 'disqualifiers', rule.id)),\n rejectedOutcomes: Object.freeze(stringArray(rule.rejectedOutcomes, 'rejectedOutcomes', rule.id)),\n unresolvedInputs: Object.freeze(stringArray(rule.unresolvedInputs, 'unresolvedInputs', rule.id)),\n nextSteps: Object.freeze(stringArray(rule.nextSteps, 'nextSteps', rule.id)),\n });\n }).sort((left, right) => left.priority - right.priority);\n\n if (!normalizedRules.some((rule) => rule.kind === 'decision')) {\n fail('INVALID_REGISTRY', 'At least one decision rule is required');\n }\n\n return Object.freeze({\n criteria: Object.freeze(normalizedCriteria),\n criterionIds,\n rules: Object.freeze(normalizedRules),\n methodologyVersion: methodology.version,\n criteriaVersion: typeof criteria.version === 'string' ? criteria.version : null,\n rulesVersion: typeof rules.version === 'string' ? rules.version : null,\n });\n};\n\nconst validateAnswers = (answers, registry) => {\n if (!isObject(answers)) fail('INVALID_ANSWERS', 'Answers must be an object');\n for (const id of Object.keys(answers)) {\n if (!registry.criterionIds.has(id)) fail('UNKNOWN_CRITERION', `Unknown criterion: ${id}`);\n }\n for (const criterion of registry.criteria) {\n if (!Object.hasOwn(answers, criterion.id)) fail('MISSING_CRITERION', `Missing criterion: ${criterion.id}`);\n if (!criterion.allowedAnswers.includes(answers[criterion.id])) {\n fail('INVALID_ANSWER', `Invalid answer for ${criterion.id}`);\n }\n }\n};\n\nexport const createDecisionEngine = (registries) => {\n const registry = normalizeRegistry(registries ?? {});\n\n return Object.freeze({\n evaluateDecision(answers) {\n validateAnswers(answers, registry);\n const matching = registry.rules.filter((rule) => ruleMatches(rule, answers));\n const decision = matching.find((rule) => rule.kind === 'decision');\n if (!decision) fail('NO_MATCHING_RULE', 'No decision rule matches these answers');\n const advisories = matching.filter((rule) => rule.kind === 'advisory');\n const unresolvedAnswers = registry.criteria\n .filter((criterion) => answers[criterion.id] === 'unknown')\n .map((criterion) => criterion.id);\n\n return Object.freeze({\n outcomeId: decision.outcomeId,\n ruleId: decision.id,\n triggeredRuleIds: Object.freeze([decision.id, ...advisories.map((rule) => rule.id)]),\n advisoryRuleIds: Object.freeze(advisories.map((rule) => rule.id)),\n disqualifiers: Object.freeze(unique(decision.disqualifiers)),\n rejectedOutcomes: Object.freeze(unique(decision.rejectedOutcomes)),\n unresolvedInputs: Object.freeze(unique([...decision.unresolvedInputs, ...unresolvedAnswers])),\n sourceIds: Object.freeze(unique([\n ...decision.sourceIds,\n ...advisories.flatMap((rule) => rule.sourceIds),\n ])),\n claimIds: Object.freeze(unique([\n ...decision.claimIds,\n ...advisories.flatMap((rule) => rule.claimIds),\n ])),\n nextSteps: Object.freeze(unique([\n ...decision.nextSteps,\n ...advisories.flatMap((rule) => rule.nextSteps),\n ])),\n methodologyVersion: registry.methodologyVersion,\n registryVersions: Object.freeze({\n criteria: registry.criteriaVersion,\n rules: registry.rulesVersion,\n }),\n });\n },\n });\n};\n\nconst sortedAnswers = (answers) => Object.fromEntries(\n Object.entries(answers).sort(([left], [right]) => left.localeCompare(right)),\n);\n\nconst validateExport = ({ answers, result } = {}) => {\n if (!isObject(answers) || !isObject(result) || typeof result.methodologyVersion !== 'string') {\n fail('INVALID_EXPORT', 'A completed decision and its answers are required');\n }\n};\n\nexport const exportDecisionJson = (record) => {\n validateExport(record);\n const { answers, result } = record;\n return `${JSON.stringify({\n methodologyVersion: result.methodologyVersion,\n registryVersions: result.registryVersions ?? {},\n answers: sortedAnswers(answers),\n decision: {\n outcomeId: result.outcomeId,\n ruleId: result.ruleId,\n triggeredRuleIds: result.triggeredRuleIds ?? [result.ruleId],\n advisoryRuleIds: result.advisoryRuleIds ?? [],\n disqualifiers: result.disqualifiers ?? [],\n rejectedOutcomes: result.rejectedOutcomes ?? [],\n unresolvedInputs: result.unresolvedInputs ?? [],\n sourceIds: result.sourceIds ?? [],\n claimIds: result.claimIds ?? [],\n nextSteps: result.nextSteps ?? [],\n },\n }, null, 2)}\\n`;\n};\n\nconst csvCell = (value) => {\n const text = String(value ?? '');\n return /[\",\\r\\n]/.test(text) ? `\"${text.replaceAll('\"', '\"\"')}\"` : text;\n};\n\nexport const exportDecisionCsv = (record) => {\n validateExport(record);\n const { answers, result } = record;\n const rows = [\n ['section', 'key', 'value'],\n ['version', 'methodology', result.methodologyVersion],\n ...Object.entries(sortedAnswers(answers)).map(([key, value]) => ['answer', key, value]),\n ['decision', 'outcome_id', result.outcomeId],\n ['decision', 'rule_id', result.ruleId],\n ...(result.triggeredRuleIds ?? [result.ruleId]).map((id) => ['trace', 'rule_id', id]),\n ...(result.advisoryRuleIds ?? []).map((id) => ['advisory', 'rule_id', id]),\n ...(result.disqualifiers ?? []).map((code) => ['disqualifier', 'code', code]),\n ...(result.rejectedOutcomes ?? []).map((id) => ['rejected_outcome', 'outcome_id', id]),\n ...(result.unresolvedInputs ?? []).map((id) => ['unresolved_input', 'criterion_id', id]),\n ...(result.sourceIds ?? []).map((id) => ['source', 'source_id', id]),\n ...(result.claimIds ?? []).map((id) => ['claim', 'claim_id', id]),\n ...(result.nextSteps ?? []).map((step, index) => ['next_step', String(index + 1), step]),\n ];\n return `${rows.map((row) => row.map(csvCell).join(',')).join('\\n')}\\n`;\n};\n\nexport { DecisionEngineError };\n",
+ "sha256": "sha256:7236040b1894e67cb560abb6433e0c35afe5da83b846adb9ab31c5d8c2b286fb",
+ "url": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix/blob/6ea24ef75c3ad09a3bb76d1c20a173bfab592559/docs/assets/decision-engine.js"
+ }
+ },
+ "independent_human_review": "NOT_REVIEWED",
+ "pages": "https://pharosproduction.github.io/rag-vs-fine-tuning-matrix/",
+ "repo": "https://github.com/PharosProduction/rag-vs-fine-tuning-matrix",
+ "snapshot_at": "2026-09-17T06:17:24Z"
+ }
+}