frontend-patterns/feedback/ConsumerIntegration.md
tegwick bd85fcd179 Add verified reference lookup and immutable consumer receipts
Assistant: codex
Assistant-Model: gpt-6.1-sol
Assistant-Session: 01a1045b-933d-7aa1-b2db-104557487a79
2026-10-04 09:02:35 +02:00

5.1 KiB

First consumer integration

FEP-WP-0008 T01/T02 owns this bounded handoff; no consumer is enrolled by this file. Use the common instruction owner for the selected repository. Do not install a fleet mandate, reopen a finished task, or invent product work to manufacture adoption.

Eligibility

A real, open frontend task must need a decision about shared edits, offline recovery, navigation/rendering, interaction or feature boundaries. The consumer keeps its own implementation authority. A deployment repair or documentation-only inspection of this pattern repository is not an external frontend use. Unsupported contexts should produce an explicit no-match decision, not a forced pattern selection.

Local lookup and closeout helper

The local helper is available before hosted federation enrollment. From the reference checkout, python3 scripts/reference_consume.py --version 0.1 lookup --candidate CAND-0007 returns a verified candidate with exact corpus/packaging citation pins. Force and responsibility filters narrow research leads; they do not make the consumer decision. Read the linked contracts and their alternatives. Preserve abstention and unsupported needs; do not turn a matching force into a complete architecture claim.

The decision-input example is explicitly synthetic, with dummy provenance. It is a format example, never an eligible real use. For an actual eligible task, the consumer creates its own JSON with stable use/event IDs, explicit kind, full consumer commit, task/producer/run references, constraints, considered/selected IDs, action/reason/artifact reference and an observable outcome expectation. Unknown is the default outcome; reported helpfulness requires observation and evidence locators and still awaits independent verification. No private code, credentials or transcript belongs in the input.

From that consumer's checkout, using the path to the reference tool:

python3 /path/to/frontend-patterns/scripts/reference_consume.py --version 0.1 receipt \
  --input decision.json --output research/pattern-use/use-01/event-01.json

The helper validates input and the frozen release, fills its version/packaging/digest pins, exclusively writes a new source-relative file, and prints the exact path/SHA-256 entry for the consumer's schema-v1 receipt index. JSON is valid YAML for activity-core's existing collector. Without --output, it prints the event for inspection. It never overwrites a receipt, enrolls a source or supplies collector-verified origin.

A later outcome uses the same use_id, a new event_id and the preceding file's previous_event_sha256. Retain the earlier event/index entry; chronology and predecessor integrity are checked by the existing collector. The helper preserves a supplied digest but does not independently verify the event chain or outcome artifact.

Consumer owners still integrate invocation into their normal closeout hook, commit the receipt/index and arrange authorized enrollment through WP-0008. This preparation does not establish hosted discovery, automatic hook installation, real value or the loop's delayed-artifact refresh. make consumption-test includes disclosed synthetic cases and an integration check against the sibling activity-core validator when its Python environment is present; release acceptance requires that check to run without a skip.

Short planning and closeout instruction

For eligible frontend architecture work, query capability.infotech.frontend-pattern-language through hosted reuse-surface. Read START.md and the full applicable contracts in the pinned reference release. Record its version, packaging revision and manifest digest with selected/rejected CAND IDs, task constraints, alternatives and unmet conditions in the task's decision note. At closeout, emit an immutable PatternUseReceipt event and index it with its SHA-256; unknown outcome is valid. At the first linked test/review/incident, append an outcome event with the preceding event digest. Never edit the earlier receipt, invent helpfulness, or treat model judgment as observed user benefit.

The receipt template and index/enrollment contract define exact fields. Pin the packaging revision in releases.json, not the latest research HEAD. Read unsupported contexts before selecting.

Acceptance

Before adding an actual consumer to sources.json, verify its published receipt index and immutable event hashes at a concrete revision. Check the source through activity-core's existing validator/collector. Keep a decision-only unknown outcome unknown until a linked outcome arrives. Fixture positive/negative paths test the collector; they do not satisfy real-use acceptance. Enrollment is limited to the existing allowlist and collection bounds in the runbook.

Hosted registration currently needs the routed OpenBao write credential. Public index publication is verified, but lookup/registration and a real consumer receipt must be evidenced separately. Do not infer discovery success from this instruction.