Proposals, Templates, and Pub/Sub Discovery
Abstract¶
Shows how Proposal documents relate to their Templates, how submission state is determined, and how all artifacts are discovered and validated in a decentralized pub/sub network.
Documents and Roles¶
- Proposal: the authored content.
- Proposal Form Template: defines schema and form hints.
- Proposal Submission Action: signals
final,draft, orhide. - Optional Proposal Comment and Proposal Comment Form Template artifacts exist;
- Optional Proposal Moderation Action artifacts exist;
Relationships¶
- A Proposal references a Proposal Form Template via
metadata.templateand a system parameters anchor viametadata.parameters.- The template’s own
parametersmust transitively align to the same Brand/Campaign/Category chain.
- The template’s own
- A Proposal Submission Action references the Proposal via
metadata.refand repeatsmetadata.parameters, linked toreffor consistency.- Multiple collaborators may exist; all listed collaborators must submit equivalent
finalactions to be considered final by the deadline.
- Multiple collaborators may exist; all listed collaborators must submit equivalent
The Deadline for a Proposal to be Final will be defined in the applicable parameters document(s), typically the Category Parameters document.
Versioning and Collaboration¶
- Proposal
idandverare UUIDv7. - The first Proposal version must be signed by the original author; later versions may be signed by the author or a collaborator from the immediately prior version. See: Proposal validation.
- Collaborators are listed in
metadata.collaborators; actions from collaborators confirm or rescind participation. See: Proposal Submission Action.
Pub/Sub Discovery Model¶
Overview¶
- Publication and topic routing are defined by the parameters anchor (brand/campaign/category). See: Parameters Hierarchy and Discovery for topic scope, naming, and subscription strategies.
- Producers publish each document to the topic derived from its
metadata.parameters. - Consumers subscribe to the relevant topics for their chosen anchor(s) and filter by document type.
Discovery Workflow¶
- Discover templates
- Subscribe to the anchor topic(s) and collect all Proposal Form Template documents.
- For each
template.id, select the latesttemplate.ver(respectingrevocations). - The resulting set enumerates which proposal templates are enabled at the given anchor.
- Discover proposals
- Collect or Publish new Proposal documents that reference one of the
discovered templates via
metadata.template. - Enforce that
metadata.parameterson the proposal matches the anchor and links to the same parameters chain as the template.
- Collect or Publish new Proposal documents that reference one of the
discovered templates via
- Ingest submission actions
- Collect Proposal Submission Action documents by
proposal
metadata.ref. - Track the latest action per signer (author or listed collaborator):
final,draft, orhide. - A proposal is eligible to be “final” only if all required signers have a latest
finalaction by the configured deadline.
- Collect Proposal Submission Action documents by
proposal
- Apply moderation and policy
- If present, process Proposal Moderation Action artifacts that may hide or disqualify proposals (policy‑dependent).
- Respect
hidesemantics from submission actions and moderation decisions in UI and candidate selection.
- Handle revocations
- Honor
revocationson proposals or related artifacts. Implementations should treat comments under a revoked proposal as revoked for visibility, unless the proposal is re‑instated.
- Honor
- Comments
- Proposal Comment documents attach to a proposal; replies attach to another comment.
- All comments and replies must link to the same proposal; cross‑proposal replies are invalid.
- Comments may be moderated via Proposal Moderation Action and hidden/redacted accordingly.
Finalization¶
- At the configured moderation/finalization deadline (from parameters), compute the final set of candidate proposals for the contest at the same anchor level.
- The candidate set consists of proposals that are “final” (per signer unanimity) and not disqualified by moderation.
- These candidates feed into the contest voting process (described in the voting flow documentation).
Flow (Mermaid)¶
flowchart TD
A["Subscribe to Topics per Anchor<br/>(Brand/Campaign/Category)"] --> B[Discover Templates]
B --> C[Discover/Publish Proposals<br/>referencing template + parameters]
C --> D[Ingest/Publish Submission Actions<br/>author + collaborators]
D --> E{By deadline:<br/>all-final?}
E -- No --> F[Status: Draft/Hidden]
E -- Yes --> G[Status: Final Candidate]
C --> H[Ingest Moderation Actions]
H --> I{Moderated?}
I -- No --> K[No change]
I -- Yes --> J[Hide/Disqualify<br/>per policy]
G --> L[Candidate Set]
K --> L
L --> M[Contest Voting Inputs]
Consumer Pipeline¶
- Template intake
- Verify signature, type, id/ver,
metadata.parameters, and payload schema validity. - Index by
(template-id, ver)and by anchor.
- Verify signature, type, id/ver,
- Proposal intake
- Verify signature,
metadata.template,metadata.parameters(linked to template), and payload against the template schema. - Track authorship and collaborators; index by
(proposal-id, ver)and by anchor.
- Verify signature,
- Submission Action intake
- Verify signature from author or collaborator; verify
metadata.refpoints to the intended proposal andmetadata.parametersmatches (linked_refs toref). - For each signer, record latest action:
final,draft, orhide. - A proposal is “final” iff all listed collaborators (and the author) have a latest
finalaction by the configured deadline.
- Verify signature from author or collaborator; verify
- Moderation Action intake (optional)
- Verify signature and policy scope; verify
metadata.refpoints to the intended proposal andmetadata.parametersmatches. - Apply moderation outcomes to proposal visibility and eligibility per policy.
- Verify signature and policy scope; verify
Status Computation¶
- Final Set: proposals with all required
finalactions, within configured windows defined by parameters, and not disqualified by moderation. - Draft Only: proposals with at least one
draftand no conflictingfinalfrom that signer. - Hidden: honor
hidesemantics (author hides the proposal; collaborator hide = collaborator does not wish to be shown), and apply moderation decisions.
Validation Summary¶
- Verify
type,id,ver,kid,content type, and (if present)content-encoding. - Verify
metadata.templateexists and aligns viametadata.parametersup the same chain. - Validate the proposal payload against the referenced template JSON Schema.
- For submission actions, enforce signer rules and collaborator unanimity for
final. - Apply
revocationsand prefer the highest validverperid.
Content Addressing and Retrieval¶
- All documents carry a
document_refthat includes a CBOR Tag 42 CID locator. See: Document Reference. - Pub/sub provides dissemination; the CID enables retrieval from content-addressed storage and ensures immutability.
Operational Notes¶
- Timelines and windows come from the applicable parameters (brand/campaign/category/contest); consumers should enforce submission cutoffs as configured.
- Indexes: maintain by proposal, by anchor, and by template to accelerate UI queries.