Skip to content

Commit 9166112

Browse files
committed
Harden snapshot policy and private publication
1 parent b600b2b commit 9166112

29 files changed

Lines changed: 382 additions & 117 deletions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and semantic versioning.
44

5-
## [0.1.1] - 2026-08-24
5+
## [0.1.1] - Unreleased
66

77
### Added
88

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ You choose the LLM. You own the data. You control the deployment. Zaati OS has n
2424
  ·  
2525
<a href="docs/quickstart.md">Quickstart</a>
2626
&nbsp;&nbsp;·&nbsp;&nbsp;
27-
<a href="https://mohsinht.github.io/zaati-os/">Live synthetic demo</a>
28-
&nbsp;&nbsp;·&nbsp;&nbsp;
2927
<a href="docs/privacy.md">Privacy model</a>
3028
</p>
3129

3230
> [!IMPORTANT]
3331
> Zaati OS supplies contracts, prompts, validators, storage, rendering, and deployment infrastructure. It does not ship built-in Gmail, Jira, calendar, or financial connectors. Your chosen LLM or workflow must already have approved, read-only access to each source.
3432
33+
> [!NOTE]
34+
> The Zaati dashboard is read-only. It displays validated snapshots and safe external links. It does not reply to messages, change calendars or tasks, send notifications, trade, or write back to source systems. The maintained production recipe is for developers and technical AI power users.
35+
3536
## What makes it different
3637

3738
- **Any LLM workflow:** ChatGPT, Claude, Gemini, a local model, n8n, cron, or custom code can publish the same contract.
@@ -74,7 +75,7 @@ make tutorial
7475

7576
Everything else, including custom sources, encrypted storage, full theme tokens, and automatic deployment, is optional and documented separately.
7677

77-
The shortest useful loop is three sources, for example agenda, inbox attention, and work focus, followed by the daily overview prompt.
78+
The canonical daily bundle contains agenda, inbox attention, work focus, money, news, and the dependency-backed daily overview. Prompt Studio can also create smaller independent bundles, and now generates the matching private-repository setup command.
7879

7980
## Create a scheduled task prompt
8081

@@ -107,7 +108,7 @@ No upstream Zaati OS service participates in this flow.
107108

108109
## One run, many snapshots
109110

110-
`schemas/snapshot-bundle.schema.json` lets one LLM run produce up to 20 registered snapshots. Zaati OS compares the returned sources with the workflow's authoritative source set, sends concise contract errors back for up to three attempts, and writes nothing until every nested snapshot passes. Git publication uses one pull request whose independent validator must pass before a human or trusted merge policy accepts it.
111+
`schemas/snapshot-bundle.schema.json` lets one LLM run produce up to 20 registered snapshots. Zaati OS compares the returned sources with the workflow's authoritative source set, applies one shared privacy and temporal policy, sends concise contract errors back for up to three attempts, and writes nothing to its local snapshot store until every nested snapshot passes. Git publication creates candidate files on a private branch before CI; the independent validator prevents invalid candidates from merging into the protected data branch.
111112

112113
This is especially useful for scheduled AI products where active task capacity is limited. One daily task can refresh agenda, inbox, work, money, news, and the overview instead of consuming one task per source. Start with the [one-task tutorial](docs/tutorials/one-task-daily-bundle.md).
113114

@@ -154,7 +155,7 @@ See [LLM contract](docs/llm-contract.md) and [`schemas/`](schemas/) for the exec
154155
| `daily-overview.md` | Combine registered source snapshots | Adaptive dashboard |
155156
| `weekly-review.md` | Find patterns and produce an evidence-based review | Progress, timeline, decisions |
156157

157-
These are provider-neutral templates, not connectors. The ChatGPT scheduled-task recipe is the maintained first path. Other providers are contract-compatible but are not claimed as end-to-end certified until their documented release gate passes.
158+
These are provider-neutral templates, not connectors. ChatGPT scheduled tasks are the target first real path, but the release evidence is not complete yet. Other providers are contract-compatible and are not claimed as end-to-end certified until their documented release gate passes.
158159

159160
## Repository map
160161

@@ -174,7 +175,7 @@ deployments/ Optional infrastructure recipes
174175

175176
## Privacy model
176177

177-
A public fork is code, not a diary. Real snapshots, instance configuration, connector exports, secrets, and generated dashboard data are ignored. CI rejects committed private snapshot paths and common secret shapes. Synthetic examples are visibly marked and schema-validated.
178+
A public fork is code, not a diary. Real snapshots, instance configuration, connector exports, secrets, and generated dashboard data are ignored. CI rejects committed private snapshot paths and common credential shapes. This scanner is defense in depth, not a promise to recognize every secret or unnecessary personal detail. Synthetic examples are visibly marked and schema-validated.
178179

179180
Optional AES-256-GCM snapshot encryption protects files at rest with a key supplied only through an ignored local key file or protected CI secret. It is feature flagged and off by default. Use it only with a trusted ingestion process that can receive the key. Never paste the key into an LLM prompt. Encryption does not replace Access because authorized builds and browsers must eventually decrypt displayed facts.
180181

@@ -226,16 +227,16 @@ Pull requests expose each gate as a separate job and finish with one `Quality ga
226227
![Animated terminal showing Cloudflare Access verification](docs/assets/onboarding/deploy.gif)
227228

228229
- **Recommended:** Cloudflare Workers static assets on a custom domain protected by Cloudflare Access.
229-
- **Supported:** Any private static host that provides real authentication before serving assets.
230+
- **Portable, community-operated:** Any private static host that provides real authentication before serving assets. Cloudflare is the only maintained security-complete recipe in v0.1.1.
230231
- **Not recommended for real data:** Public GitHub Pages, unauthenticated preview URLs, or relying on an obscure URL.
231232

232233
Zaati OS charges no platform fee and can be deployed using free or already-owned tools, depending on provider, connector, model, storage, and hosting choices.
233234

234235
## Release
235236

236-
Current version: **v0.1.1**
237+
Code version: **v0.1.1**
237238

238-
This release establishes the portable data contract, atomic bundle ingestion, adaptive renderer, guided onboarding, provider-neutral prompts, optional encrypted storage, theme studio, privacy boundaries, Cloudflare recipe, and CI quality gates. See [CHANGELOG.md](CHANGELOG.md).
239+
No immutable GitHub Release is published yet. Until the recorded provider and hosted-demo release gates pass, pin private validators to a reviewed full commit SHA. This code version establishes the portable data contract, atomic bundle ingestion, adaptive renderer, guided onboarding, provider-neutral prompts, optional encrypted storage, theme studio, privacy boundaries, Cloudflare recipe, and CI quality gates. See [CHANGELOG.md](CHANGELOG.md).
239240

240241
Before storing real data, read [Data lifecycle and key recovery](docs/data-lifecycle.md). Fork maintainers can follow [Upgrade and fork sync](docs/upgrading.md).
241242

SUPPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Support
22

3-
Use GitHub Discussions for setup help and design ideas. Use GitHub Issues for reproducible bugs with synthetic examples only. Report vulnerabilities privately through the process in `SECURITY.md`.
3+
Use GitHub Issues for setup help, design ideas, and reproducible bugs with synthetic examples only. Report vulnerabilities privately through the process in `SECURITY.md`.
44

55
Never post snapshot files, provider exports, repository tokens, decryption keys, private deployment URLs, account identifiers, or screenshots containing real personal data. Maintainers should be able to reproduce every report with the synthetic tutorial.
66

data/examples/money/pulse/2026-08-24.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"source_id": "money:pulse",
66
"domain": "money",
77
"source": "pulse",
8-
"generated_at": "2026-08-23T18:00:00Z",
9-
"effective_period": { "start": "2026-08-23T00:00:00Z", "end": "2026-08-23T23:59:59Z", "timezone": "UTC" },
8+
"generated_at": "2026-08-24T07:00:00Z",
9+
"effective_period": { "start": "2026-08-23T07:00:00Z", "end": "2026-08-24T07:00:00Z", "timezone": "UTC" },
1010
"status": "partial",
1111
"producer": { "worker_id": "money-pulse-daily", "workflow": "example", "version": "0.1.1" },
1212
"sources": [
1313
{ "label": "Synthetic account summary", "status": "stale", "as_of": "2026-08-23T18:00:00Z", "reference": "synthetic://money" }
1414
],
15-
"freshness": { "expires_at": "2026-08-25T06:00:00Z" },
15+
"freshness": { "expires_at": "2026-08-25T19:00:00Z" },
1616
"quality": { "confidence": "medium", "warnings": ["One synthetic source has not refreshed today."] },
1717
"privacy": { "classification": "public", "contains_personal_data": false, "synthetic": true },
1818
"data": {

docs/compatibility.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
The JSON contract is provider-neutral. End-to-end support is a stronger claim.
44

5-
| Path | v0.1.1 status | Required release evidence |
6-
| -------------------------------------- | ------------------------------ | --------------------------------------------------------------------------- |
7-
| Local mock tutorial | Maintained | Retry, atomicity, accessibility, and build tests in CI |
8-
| ChatGPT scheduled task | Maintained first real workflow | Prompt generation, permission receipt, pull request, independent validation |
9-
| Command adapter | Maintained | Exact JSON on stdout and trusted local validation |
10-
| Claude, Gemini, other hosted workflows | Contract compatible | Community recipe until its complete path has a repeatable release test |
5+
| Path | v0.1.1 status | Required release evidence |
6+
| -------------------------------------- | -------------------------- | ---------------------------------------------------------------------- |
7+
| Local mock tutorial | Maintained | Retry, atomicity, accessibility, and build tests in CI |
8+
| ChatGPT scheduled task | Target first real workflow | A recorded synthetic provider run is still required before release |
9+
| Command adapter | Maintained | Exact JSON on stdout and trusted local validation |
10+
| Claude, Gemini, other hosted workflows | Contract compatible | Community recipe until its complete path has a repeatable release test |
1111

1212
Zaati OS does not bundle provider connectors. Availability, permissions, retention, pricing, and scheduled-task behavior belong to the chosen provider.

docs/deployment/data-repository.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The public source catalog and schemas remain in the code repository. Workers rea
2424

2525
Use separate, least-privilege identities:
2626

27-
- The LLM workflow needs permission to create a branch and pull request only in the private data repository. Prefer its existing GitHub connection instead of putting a token inside the prompt.
27+
- The LLM workflow needs only **Contents: read and write** plus **Pull requests: read and write** in the private data repository. Explicitly deny Actions, Workflows, Administration, repository settings, environments, secrets, and variables write access. Prefer a narrowly configured GitHub App or fine-grained credential instead of putting a token inside the prompt.
2828
- The deployment workflow needs a fine-grained token restricted to this one private repository with Contents read permission.
2929
- Cloudflare credentials never belong in the data repository.
3030

@@ -40,11 +40,19 @@ npm run data-repository:init -- --repository-root ../zaati-data --code-repositor
4040

4141
Commit the generated `zaati.data.json` and workflow, then require `Validate Zaati snapshots` in branch protection. Use an immutable 40-character commit SHA until a reviewed release tag exists.
4242

43+
The generated gate uses `pull_request_target` only to load the validator workflow from the protected base branch. It checks out the candidate commit as inert data, runs no candidate scripts, disables persisted credentials, and executes validator code from the immutable Zaati revision. Candidate branches therefore cannot replace the workflow while preserving its check name.
44+
45+
Add a ruleset or CODEOWNERS requirement for `.github/**` and `zaati.data.json` that requires a trusted human or GitHub team. The producing identity must not bypass that ruleset. Enable GitHub secret scanning and push protection where available.
46+
4347
## Bundle writes
4448

45-
A daily producer creates one branch and pull request containing every current-date path. It must never publish a subset, write directly to the default branch, edit the validation workflow, or merge its own pull request. The independent gate compares the candidate with the authoritative expected source set and rechecks paths, ownership, schemas, privacy rules, and encryption mode.
49+
A daily producer creates one branch and pull request containing every current-date path. Candidate JSON exists in private Git history before pull-request validation runs, so minimize and scan it before the first push. The gate prevents invalid data from merging, not from entering a candidate branch. The producer must never publish a subset, write directly to the default branch, edit protected files, or merge its own pull request.
50+
51+
Single-source and custom bundles use the same gate. Initialize the exact Prompt Studio selection with `--sources`:
4652

47-
Single-source workers remain supported for independent cadences, but they use the same pull-request gate.
53+
```bash
54+
npm run data-repository:init -- --repository-root ../zaati-data --code-repository YOUR_USER/zaati-os --code-ref FULL_COMMIT_SHA --sources money:pulse
55+
```
4856

4957
Same-day reruns replace the same file and preserve `snapshot_id`. Workers fetch the latest target branch before writing and never force-push.
5058

docs/maintainer-setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ After the first successful runs, protect `main`:
2626
- block force pushes and branch deletion
2727
- apply the rules to administrators unless an emergency procedure says otherwise
2828

29+
For every private data repository, add a second ruleset for `.github/**` and `zaati.data.json`. Require trusted-owner review and block the producer identity from bypassing it. The producer needs Contents and Pull requests write access only. It must have no Actions, Workflows, Administration, secrets, variables, environments, or repository-settings write access.
30+
2931
Do not require the deployment workflow for code pull requests. It intentionally runs only for manual dispatch or configured main-branch deployment.
3032

3133
## Production environment

docs/onboarding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You need:
2929
- an LLM or automation environment that can use your approved sources and write to GitHub
3030
- a Cloudflare account and custom domain only when you are ready to deploy
3131

32-
The contract is provider-neutral, but Zaati OS does not bundle source connectors. The maintained first real workflow is ChatGPT scheduled tasks. Other capable LLMs, local models, n8n, cron, and custom commands can use the same contract when they already have the required approved tools.
32+
The contract is provider-neutral, but Zaati OS does not bundle source connectors. ChatGPT scheduled tasks are the target first real workflow, with recorded release evidence still pending. Other capable LLMs, local models, n8n, cron, and custom commands can use the same contract when they already have the required approved tools.
3333

3434
## 1. Fork, clone, and personalize
3535

docs/privacy.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ Users separately trust their selected source providers, LLM provider or local mo
2525
| Static bundle served publicly | `workers_dev` and preview URLs disabled, custom domain behind Access |
2626
| CI exposes data | No private build artifacts, no snapshot logging, secrets only on protected deployment events |
2727
| A broad Access rule lets anyone in | Deny by default, exact emails or constrained identity groups, unauthenticated preflight |
28-
| Credential committed accidentally | Common secret-shape scan, GitHub secret storage, scoped tokens |
28+
| Credential committed accidentally | Common credential-shape scan, GitHub secret storage, scoped tokens, host push protection |
2929
| Private snapshot repository is copied or leaked | Optional AES-256-GCM authenticated encryption with a separate deployment key |
3030
| Producer returns only part of a batch | Authoritative expected-source comparison rejects missing, extra, or self-redefined bundles |
31-
| Producer self-certifies unsafe output | Independent private-repository pull-request validation before merge |
31+
| Producer self-certifies unsafe output | Base-branch-controlled private-repository validation before merge |
3232
| Sensitive text hides inside a valid field | Universal secret scanning plus source-specific content guards over every snapshot string |
3333

3434
## Data minimization
3535

3636
Keep a normalized action, measure, deadline, status, and evidence reference when they are enough. Avoid raw email bodies, full documents, attachments, statements, account identifiers, source code, customer data, authentication links, cookies, tokens, and unnecessary information about other people.
3737

38+
Zaati detects common credential formats and source-specific risky shapes. No regular-expression list can identify every secret, medical fact, name, message excerpt, or unnecessary personal detail. Enable secret scanning and push protection on the private repository, minimize before the first branch push, and treat model and operator judgment as part of this boundary.
39+
3840
## Public fork rule
3941

4042
A public fork may contain schemas, prompts, reusable source definitions, UI, and synthetic examples. It must not contain real snapshots, local instance configuration, a compiled private dashboard, screenshots of real data, or deployment secrets.

0 commit comments

Comments
 (0)