# Privacy and data-flow notice

**Manuscript Guard — implementation notice dated 26 November 2026**

This notice describes the code in the competition repository. It separates the manuscript payload from infrastructure traffic and explains the controls available to an author. It is not a claim that every browser, provider, deployment or user environment has been audited.

The intended hosted application is [manuscript-guard-hybrid.vercel.app](https://manuscript-guard-hybrid.vercel.app), with public source in [GitLab](https://gitlab.com/lareliquia.angulo/manuscript-guard-hybrid). The initial documentation does not establish that deployment or live AI validation has finished.

## Before using real material

Use the supplied fictional sample to evaluate the application. All sample characters and events are fictional, and its `example.test` email address is synthetic.

Automatic redaction is a limited pattern scan. It can miss personal information, confidential facts and identifying combinations of details. It is not anonymization. Do not submit confidential or personal material to a cloud service unless you have determined that its processing terms and your permissions are appropriate.

The configured project uses Spark without linked billing, and **Hybrid and Cloud reviews are disabled by `cloudEnabled: false`**. No billing upgrade has been performed. [Firebase's data-governance guidance](https://firebase.google.com/docs/ai-logic/data-governance) and [Gemini API terms](https://ai.google.dev/gemini-api/terms) describe provider requirements that the owner must resolve before enabling these routes. The current demonstration uses Local review; implemented cloud code is not a claim of live cloud availability.

## What happens at each stage

| Action | Manuscript processing | Other data or traffic |
| --- | --- | --- |
| Open the page | The app loads its fictional sample or an explicitly saved local draft into the browser. It does not submit the text for AI review. | The hosting service receives ordinary web requests, including network and browser metadata. |
| Type, paste or import `.txt` | Text remains in the application's browser state. Import reads the selected file locally; it is not an upload to an application server. | Browser or operating-system features outside this app can have their own data handling. |
| View statistics or privacy patterns | Deterministic code processes the text in the browser. | No AI model is invoked by these functions. |
| Enable AI | No manuscript review is requested by this action alone. | The browser loads Google's Firebase SDK and initializes App Check/reCAPTCHA. Attestation and token refresh can contact Google. |
| Initialize local AI | No manuscript is supplied to model initialization. | Chrome may download its on-device model and related resources. |
| Request Local review | The current manuscript prompt is supplied to the initialized on-device model through Firebase AI Logic. The application does not request a cloud fallback. | SDK, verification or browser infrastructure may still have network activity; local manuscript inference is not a claim of zero network traffic. |
| Request Hybrid review | Blocked in the current deployment. If enabled by the owner later, the approved masked request may run on-device or be sent to the configured Gemini cloud model. | Deployment authorization and explicit request permission are both required before possible cloud fallback. |
| Request Cloud review | Blocked in the current deployment. If enabled by the owner later, the approved masked request is sent through Firebase AI Logic to the Gemini Developer API. | App Check, provider processing and service metadata accompany an enabled, approved request. |
| Export review | The browser creates a Markdown download containing retained quotations, model suggestions and provenance. | The app does not upload the export. Your downloads folder, backup or sync software can retain it. |

No Firebase Authentication, Firestore, Cloud Storage or application analytics feature is used to store manuscript text in this implementation. The application does not have an account-backed draft store. This statement concerns the application's own data flow; it does not promise that an infrastructure provider keeps no logs.

## Consent and exact preview

Local is the default and currently enabled inference mode. Hybrid and Cloud also require a deployment flag set to the Boolean `true`; the supplied deployment sets it to `false`, and a user's consent checkbox cannot override it. If the owner enables these routes later, they additionally require explicit approval of the current masked manuscript plus the editorial instructions. The privacy panel shows the manuscript preview and a complete request view, so the possible payload is inspectable.

The deployment flag is an application control, not a substitute for server-side App Check enforcement, API restrictions or provider account settings.

The client receives that constructed prompt without adding another hidden manuscript or separate system instruction. The review focus forms part of the editorial instructions. Application state changes that affect the approved request invalidate approval; a subsequent review requires approval of its current payload.

Approval is permission for that review's possible cloud processing. It does not turn future edits into an automatic upload, authorize an application account sync, or remove the provider's own processing conditions.

## What pattern masking does

The local detector looks for likely email addresses, telephone numbers, known IBAN layouts, selected API-token formats, labelled secrets and private-key blocks. It does not query a directory or service to identify people, validate accounts or test credentials.

Detected ranges are replaced with block characters while preserving the original UTF-16 length and whitespace positions. This allows quote offsets in the reviewed text to remain aligned with the draft. Overlapping ranges are combined. A stale privacy scan is rejected instead of being applied to changed text.

Only the masked text belongs in a cloud-capable review payload. Local span records contain the original matched values so the interface can explain the detection; they are not an alternative sanitized payload.

The detector can miss names, addresses, medical information, uncommon credentials, quoted confidential dialogue, nonstandard formats and indirect identifying context. It may also mask a harmless number or fictional contact. Review the entire visible preview and edit the draft to remove any additional information you do not want transmitted. A count of zero detected patterns does not mean that the text is safe to share.

## On-device mode and provenance

The application checks for the actual browser language-model provider and requires explicit device-model initialization. It requests `ONLY_ON_DEVICE` for Local mode and rejects unsupported capability states. It does not deliberately recover a Local failure by submitting the draft to the cloud.

The actual route shown for a completed review comes from the SDK's `inferenceSource`, using `ON_DEVICE` or `IN_CLOUD`. A requested mode is not accepted as proof of the execution location. Missing provenance or a route inconsistent with an exclusive mode produces an error instead of a labelled result.

These checks constrain the application's use of the provider SDK. They are not an independent network attestation or audit of browser internals. The application depends on the pinned SDK, Chrome's model implementation and the serving origin.

## Google, reCAPTCHA and hosting

Enabling AI loads Firebase JavaScript SDK 13.0.0 from Google's CDN. The app initializes a registered reCAPTCHA Enterprise provider through Firebase App Check. App Check helps control backend access; it is not an authentication system for the author and does not make a manuscript anonymous.

reCAPTCHA can process browser/device signals and use a necessary risk-analysis cookie. Google verification and SDK requests can expose ordinary request metadata such as IP address and browser information. Consult the [reCAPTCHA FAQ](https://cloud.google.com/recaptcha/docs/faq), [Google Privacy Policy](https://policies.google.com/privacy) and [Google Terms of Service](https://policies.google.com/terms). The app does not intentionally include manuscript text in reCAPTCHA attestation calls.

The Firebase app enables the SDK's automatic data-collection setting for App Check token refresh. It does not import or initialize Firebase Analytics. This distinction does not mean that Firebase, reCAPTCHA or the underlying browser makes no infrastructure requests.

For a cloud review, the configured provider is the Gemini Developer API. Provider policies control input/output handling, retention and any review or model-improvement use. [Firebase's privacy documentation](https://firebase.google.com/support/privacy) distinguishes the AI Logic layer from the chosen model provider. This project does not promise zero retention, universal exclusion from training, a particular processing country or the ability to delete a provider's records from the editor.

The intended host is Vercel. Serving the site can produce access/security records independently of an AI review. See [Vercel's Privacy Notice](https://vercel.com/legal/privacy-notice). The repository source is public; do not place real manuscript data, service-account keys or private credentials in commits, issues or demonstration recordings.

## Local persistence, deletion and downloads

By default, the draft is held for the browser session. **Keep this draft on this device** is an opt-in to the application's local browser storage. The entry `manuscript-guard.draft.v1` stores the enabled preference, title, manuscript text, review focus and save timestamp. It does not store model output, consent, sensitive-span records or the session trace. This is not a cloud backup or an encryption feature. Other people using the same browser profile, browser extensions or scripts running on the same origin may be able to access stored data.

Turning off draft persistence removes the application's saved draft. **Clear this workspace** clears the current document, review and the app's saved workspace data after the confirmation presented by the interface. It does not delete a file you imported, exported Markdown downloads, browser backups, Chrome's downloaded AI model or records already processed by a provider.

The in-app session trace records operational events such as mode, route, elapsed time and result state. It contains no manuscript text and is not persisted across sessions by this app. A downloaded review does contain quoted passages and should be handled with the same care as those excerpts.

The service worker caches only the application's own static shell. It does not cache `config.json`, third-party SDK requests, credentials, manuscripts or AI responses. The runtime configuration is fetched with caching disabled and is excluded from the public repository. Browser-delivered Firebase identifiers are still visible to the browser; repository exclusion is not a secret-storage mechanism.

If a browser is configured to synchronize or back up local data, its own settings and policies determine what happens beyond the application's local storage operation. Use a suitable browser profile and device for unpublished material.

## Cancellation and errors

**Stop waiting** and timeouts do not retract a cloud request already sent. They stop the UI from accepting a late response. The AI client retains an operation lock until the underlying request settles, preventing an immediate overlapping retry from silently creating another request.

Error messages are normalized so that ordinary UI errors do not display the manuscript, raw token values or API request URLs. Raw SDK messages are not used as editorial evidence. A provider may still process a request that the UI no longer waits for.

## Evidence is not correctness

Model output is untrusted data. The application parses JSON and accepts only supported issue categories and priorities with an exact quotation found in the reviewed source. Malformed records, invented quotations and duplicates are discarded. HTML-like model text is rendered as text, and the report exporter escapes active HTML and Markdown syntax.

This validation cannot establish the correctness of a model's explanation, prevent every prompt-injection influence, or prove that the model has found all contradictions. The model-written summary is also advisory. A quote can be present while the associated claim is wrong. The author remains responsible for deciding what to change.

## Browser and deployment boundaries

Browser extensions, enhanced spellchecking, translation tools, operating-system dictation, clipboard managers, device backups and screen recording can process text independently of this application. The app cannot make privacy promises on their behalf.

The page and Firebase modules are executable code delivered by the deployment and CDN. A compromised origin, malicious extension or altered dependency could defeat application-level safeguards. The public source makes the intended implementation inspectable; it does not certify every copy of the site.

Local editing continues after a loaded page loses connectivity, and a previously cached application shell can support offline reopening. Configuration retrieval, model downloads and service availability still depend on their own resources and are not guaranteed offline. This implementation is not a clinical, legal, financial or regulated-data review service and should not be used as an anonymization boundary for sensitive datasets.

## Questions and source review

Implementation questions can be raised in the public repository's issue tracker. Do not include private manuscript passages, personal data or credentials in a public issue. Report only the minimum non-sensitive reproduction needed to explain the behaviour.

Review the source and the current official provider terms when deploying a copy. Changes to routing, storage, analytics, authentication, hosting or model providers require this notice to be updated so it continues to describe the actual application.
