{"ok":true,"data":{"schema_version":"packet-assembly-contract/v1","title":"Graunt Packet Assembly Contract","purpose":"Describes exactly how to assemble a packet (or packet set) the Graunt Refinery accepts: the input shapes, the metadata.csv columns it recognizes, the packet-set manifest, the rights and provenance it expects, and the deterministic artifacts it produces. Following this contract makes your upload ingest cleanly the first time.","supported_input_shapes":["folder — a directory of source files plus an optional metadata.csv","zip — a safe archive of the same (no traversal, no absolute paths, no symlinks)","metadata.csv — one row per source file, joined to the files by path / basename / sha256","source files — individual TXT, MD, CSV/TSV, JSON/JSONL, or born-digital PDF files"],"required_files_or_fields":[{"field":"filename / path","required":true,"note":"the source file each metadata row describes (the primary join key)"},{"field":"rights / license","required":true,"note":"the rights basis for the source (e.g. PUBLIC_DOMAIN, GOVERNMENT_WORK, CC0, or your own license)"},{"field":"display_name / title","required":true,"note":"the human-facing packet name"},{"field":"description","required":true,"note":"what the packet contains and who it is for"},{"field":"citation / source_url","required":false,"note":"where the source came from; recommended for provenance"},{"field":"packet_category","required":false,"note":"COMPLETE, FOUNDATION, or SUB_PACKET when assembling a packet set"},{"field":"buy_price / monthly_sub / annual_sub","required":false,"note":"integer cents you set; a paid FOUNDATION must clear the paid minimum ($0 FOUNDATION is rejected)"}],"metadata_csv":{"recognized_columns":{"filename":["filename","file","document","name","path"],"source_url":["source_url","url","link","source","uri"],"rights":["rights","license","copyright","rights_status"],"citation":["citation","cite","cite_as"],"title":["title","subject"],"publication_date":["publication_date","date","published","pub_date"],"sub_packet":["sub_packet","topic","category","folder","collection"],"sha256":["sha256","sha","hash","checksum"],"author":["author"],"publisher":["publisher"],"source_authority":["source_authority"],"foundation":["foundation"],"shared_scope":["shared_scope"],"display_name":["display_name"],"description":["description"],"use_when":["use_when"],"packet_category":["packet_category"],"buy_price":["buy_price"],"monthly_sub":["monthly_sub"],"annual_sub":["annual_sub"]},"unknown_columns":"Unknown columns are retained as extra_<column> and never cause a failure.","join_order":["exact path","basename","normalized basename","sha256"]},"prefill_manifest":{"manifest_schema":"graunt/packet-prefill/v1","filename":"graunt/packet.json","purpose":"One JSON file that carries the whole listing's declarations — name, summary, rights, license flags, and pricing. Include it in your upload next to the source files (an assistant working from the Graunt Packet Template can fill it for you). A complete prefill lets the Refinery propose the entire draft; your remaining work is one review-and-confirm click.","fields":[{"field":"schema","required":true,"note":"the literal \"graunt/packet-prefill/v1\""},{"field":"name","required":true,"note":"the packet's listing title (1–200 chars)"},{"field":"summary","required":true,"note":"what the packet contains and who it is for (1–2000 chars)"},{"field":"price.amount_cents","required":true,"note":"integer cents; 0 = free, paid must clear the paid order minimum"},{"field":"price.monthly_cents / price.annual_cents","required":false,"note":"subscription plan prices in integer cents; annual without monthly is the annual-only plan"},{"field":"rights.rights_basis","required":true,"note":"OWNED_ORIGINAL | GOVERNMENT_WORK | PUBLIC_DOMAIN | CC0 | LICENSED_REDISTRIBUTABLE | SYNTHETIC_SELF_GENERATED"},{"field":"rights.training_allowed","required":true,"note":"boolean — may buyers train models on this content"},{"field":"rights.redistribution_allowed","required":true,"note":"boolean — may buyers redistribute the content"},{"field":"rights.license_family / rights.citation_required","required":false,"note":"license family label and citation flag when applicable"},{"field":"provenance.source_url / provenance.publisher","required":false,"note":"where the material came from; strengthens the packet, never fabricated"},{"field":"tags / intended_uses","required":false,"note":"topic tags and declared use modes"}],"complete_when":"name, summary, price.amount_cents, rights.rights_basis, rights.training_allowed, and rights.redistribution_allowed are all present and valid. Partial prefills still ingest — the Refinery flags exactly what is missing.","confirm_semantics":"Prefilled values are PROPOSED, never final: the seller reviews the draft and clicks List it, and that confirm click is what records the rights attestation. Nothing is attested on the seller's behalf."},"packet_set_manifest":{"manifest_schema":"graunt/packet-set/v1","roles":["MASTER","FOUNDATION","MEMBER"],"packet_categories":["COMPLETE","FOUNDATION","SUB_PACKET"],"tier0_agent_ready_rule":"Tier 0 (deterministic, model-free retrieval files) is required ONLY when you claim a packet is agent-ready. Tier 1 (standard navigation) and Tier 2 (premium/semantic) are optional and never required to publish."},"rights_provenance":["Declare a rights basis for every source; public-domain source still produces a refined, machine-optimized packet you may price.","Provide citation / source_url where you have it; provenance strengthens the packet but is never fabricated for you.","Absent required packet metadata is proposed and flagged for your confirmation — never silently invented."],"artifact_outputs":["source originals (preserved byte-for-byte with content_sha256)","normalized content","content_units (stable ids + byte offsets)","retrieval_chunks","chunk_context","BM25 postings + meta","router.retrieval guidance","manifest + checksums"],"publish_review_posture":["Assembled listings enter PENDING_REVIEW.","Publication checks run automatically on submission; eligible listings publish through the canonical publication gate, and everything else publishes with a post-publication review or is held for review. Assembly itself never publishes a listing."],"notes":["The Refinery runs deterministic, model-free extraction; you bring your own retrieval or model stack to use the agent-ready files.","Unsupported or scan-only inputs are recorded with an explicit extraction status — they are never silently dropped or claimed as fully extracted."]}}