{"_id":"@ai-manifests/adp-validate","_rev":"2-f33d3b80b34a8688ae50049d80d488b6","name":"@ai-manifests/adp-validate","dist-tags":{"latest":"1.0.0"},"versions":{"0.3.0":{"name":"@ai-manifests/adp-validate","version":"0.3.0","keywords":["adp","agent-deliberation-protocol","validate","consensus","multi-agent"],"author":{"name":"David H. Friedel Jr. — MarketAlly Pte Ltd"},"license":"Apache-2.0","_id":"@ai-manifests/adp-validate@0.3.0","maintainers":[{"name":"logikonline","email":"dave@marketally.com"}],"homepage":"https://adp-manifest.dev","bugs":{"url":"https://github.com/ai-manifests/adp-validate/issues"},"bin":{"adp-validate":"bin/cli.js"},"dist":{"shasum":"b98a97b3f5355b3e73b162be77007000656fac2d","tarball":"https://registry.npmjs.org/@ai-manifests/adp-validate/-/adp-validate-0.3.0.tgz","fileCount":7,"integrity":"sha512-VssQoYjvQkeMSv2/9Gt9GGY+d8kJ8wUQLxmFgIgjD2AQqkWgvUAFvN0p5/k/sEb9TyMkKXKG6bTzMuvJqTC0/A==","signatures":[{"sig":"MEYCIQDmxywj1jkulmEQ5aKNZ0/1WD4WSWe1DlYPbfH7FWlXjwIhAMDVwcKXTxrz/Uceom80mpx7Rszl7KIKHB8rn/FZuyKc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48542},"main":"./src/index.js","type":"module","exports":{".":"./src/index.js"},"gitHead":"b7cf67a1c9e1f7f23f05f86b9478a98c679d9d20","scripts":{"test":"node --test src/*.test.js"},"_npmUser":{"name":"logikonline","email":"dave@marketally.com"},"repository":{"url":"git+https://github.com/ai-manifests/adp-validate.git","type":"git"},"_npmVersion":"10.8.2","description":"Validate ADP proposal objects and audit deliberation traces","directories":{},"_nodeVersion":"20.19.4","dependencies":{"ajv":"^8.17.0","ajv-formats":"^3.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/adp-validate_0.3.0_1777236797279_0.6704547873524298","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@ai-manifests/adp-validate","version":"1.0.0","description":"Validate ADP proposal objects and audit deliberation traces","type":"module","bin":{"adp-validate":"bin/cli.js"},"main":"./src/index.js","exports":{".":"./src/index.js"},"scripts":{"test":"node --test src/*.test.js"},"keywords":["adp","agent-deliberation-protocol","validate","consensus","multi-agent"],"author":{"name":"David H. Friedel Jr. — MarketAlly Pte Ltd"},"license":"Apache-2.0","homepage":"https://adp-manifest.dev","repository":{"type":"git","url":"git+https://github.com/ai-manifests/adp-validate.git"},"dependencies":{"ajv":"^8.17.0","ajv-formats":"^3.0.0"},"_id":"@ai-manifests/adp-validate@1.0.0","gitHead":"9fe33a257ed54395c55d5d7989872e69df334fb1","bugs":{"url":"https://github.com/ai-manifests/adp-validate/issues"},"_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-vD4UZiNdeBhpVnRo30PqzFnBdKAprYcwgTQz4RsHe4inSeagK9FuaVgLkaQgEbOH9CDbsVsid8DyHolz/rN1/Q==","shasum":"b2c8a5d7761f7b9a57349a5d9929a55d61e31e8f","tarball":"https://registry.npmjs.org/@ai-manifests/adp-validate/-/adp-validate-1.0.0.tgz","fileCount":8,"unpackedSize":60604,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGVgPrdmk2NBuZn98RebuQhd7rFq8SESvR3QqesAqJkAIgaqXUN0I35vGpF7HvmLDQdUvhS5ohdG2dzLIeLbzU5N8="}]},"_npmUser":{"name":"logikonline","email":"dave@marketally.com"},"directories":{},"maintainers":[{"name":"logikonline","email":"dave@marketally.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adp-validate_1.0.0_1780369355191_0.25545862039372413"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T20:53:17.193Z","modified":"2026-06-02T03:02:35.508Z","0.3.0":"2026-04-26T20:53:17.416Z","1.0.0":"2026-06-02T03:02:35.393Z"},"bugs":{"url":"https://github.com/ai-manifests/adp-validate/issues"},"author":{"name":"David H. Friedel Jr. — MarketAlly Pte Ltd"},"license":"Apache-2.0","homepage":"https://adp-manifest.dev","keywords":["adp","agent-deliberation-protocol","validate","consensus","multi-agent"],"repository":{"type":"git","url":"git+https://github.com/ai-manifests/adp-validate.git"},"description":"Validate ADP proposal objects and audit deliberation traces","maintainers":[{"name":"logikonline","email":"dave@marketally.com"}],"readme":"# adp-validate\n\n[![npm](https://img.shields.io/npm/v/@ai-manifests/adp-validate.svg?label=npm)](https://www.npmjs.com/package/@ai-manifests/adp-validate)\n[![Downloads](https://img.shields.io/npm/dm/@ai-manifests/adp-validate.svg)](https://www.npmjs.com/package/@ai-manifests/adp-validate)\n[![Node](https://img.shields.io/badge/node-20%2B-blue.svg)](https://nodejs.org/)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Spec](https://img.shields.io/badge/spec-adp--manifest.dev-informational)](https://adp-manifest.dev)\n\nValidate [ADP](https://adp-manifest.dev) proposal objects and audit deliberation traces.\n\n## Install\n\n```bash\nnpm install -g @ai-manifests/adp-validate\n```\n\n## Usage\n\n### Validate a proposal\n\n```bash\nadp-validate ./proposal.json\n```\n\n```\nADP Proposal Validator\nFile: ./proposal.json\n\nSchema Validation\n  ✓ Valid against ADP proposal schema v0\n\nProposal Info\n  ℹ Agent: did:adp:test-runner-v2\n  ℹ Vote: approve\n  ℹ Confidence: 0.86\n  ℹ Tier: partially_reversible\n  ℹ Action: merge_pull_request → github.com/acme/api#4471\n  ℹ Domain: code.correctness\n\nDissent Conditions\n  ℹ dc_tr_01 [active]: if any test marked critical regresses\n  ℹ dc_tr_02 [active]: if coverage delta is negative\n\n✓ All checks passed\n```\n\n### Validate multiple proposals\n\n```bash\nadp-validate ./approve.json ./reject.json ./advisory.json\n```\n\n### Validate a deliberation\n\nPass a directory of proposal files to check cross-proposal consistency:\n\n```bash\nadp-validate --deliberation ./deliberation/\n```\n\nChecks:\n- Each proposal is individually valid (schema + semantic)\n- All proposals share the same `deliberation_id` and `action`\n- No duplicate `agent_id`s\n- Reversibility tier agreement across proposals\n\n### Audit a deliberation tally\n\nVerify that weighted voting and convergence were computed correctly:\n\n```bash\nadp-validate --audit ./deliberation/ --weights weights.json\n```\n\nThe weights file maps agent IDs to computed weights:\n\n```json\n{\n  \"did:adp:test-runner-v2\": 0.71,\n  \"did:adp:security-scanner-v3\": 0.64,\n  \"did:adp:style-linter-v1\": 0.18\n}\n```\n\nOutput includes the full tally computation and convergence determination:\n\n```\nTally Computation\n  ℹ did:adp:test-runner-v2: vote=approve, weight=0.710\n  ℹ did:adp:security-scanner-v3: vote=reject, weight=0.640\n  ℹ did:adp:style-linter-v1: vote=approve, weight=0.180\n\n  ℹ approve:       0.890\n  ℹ reject:        0.640\n  ℹ total:         1.530\n\n  ✗ approval:      58.2% (threshold: 60.0%) ✗\n  ✓ participation: 100.0% (floor: 50.0%) ✓\n\nResult\n  ✗ NOT CONVERGED — threshold not met\n```\n\n## Semantic Checks\n\nBeyond JSON Schema validation, adp-validate checks:\n\n| Check | Type |\n|-------|------|\n| Dissent condition status consistency (`falsified` requires `tested_in_round` and `tested_by`) | Error |\n| Dissent condition amendment consistency (`amended` requires non-empty `amendments`) | Error |\n| Duplicate dissent condition IDs | Error |\n| Vote revision chain integrity (each `prior_vote` must match previous `new_vote`) | Error |\n| Revision round ordering (must be strictly increasing) | Error |\n| Blast radius vs. reversibility tier mismatch (low rollback cost + `irreversible`) | Warning |\n| Confidence of exactly 1.0 or 0.0 | Warning |\n| Reject vote with no dissent conditions | Warning |\n| High stake without calibration accountability | Warning |\n\n## Options\n\n```\n--deliberation <dir>  Validate all .json files in dir as a deliberation\n--audit <dir>         Audit tally computation for a deliberation\n--weights <file>      JSON file mapping agent_id to weight (for --audit)\n--tier <tier>         Override reversibility tier for audit\n--json                Output results as JSON\n--help                Show help\n```\n\n## Programmatic Use\n\n```javascript\nimport { validateProposal, validateDeliberation, auditTally } from '@ai-manifests/adp-validate';\n\nconst result = validateProposal(proposal);\n// { valid: boolean, errors: string[], warnings: string[] }\n\nconst dlbResult = validateDeliberation([proposal1, proposal2]);\n// { valid: boolean, errors: string[], warnings: string[], proposals: object[] }\n\nconst audit = auditTally(proposals, weights, 'partially_reversible');\n// { tally: object, converged: boolean, thresholdMet: boolean, participationFloorMet: boolean }\n```\n\n## Status\n\n**v0.1** — Validates against ADP spec v0.\n\n## License\n\nApache-2.0 — see [`LICENSE`](LICENSE) for the full license text and [`NOTICE`](NOTICE) for attribution.\n","readmeFilename":"README.md"}