agentleFS
anandartinanandartin/celestial-skills/skills/privacy-by-design-engineering/AGENTS.md

celestial-skills / privacy-by-design-engineering

AGENTS.md1 starsChanged 19 days agoApache-2.0View on GitHub

Collect only the personal data a feature needs, keep it only as long as needed and make it easy to find and delete, so privacy holds up in code and not just in policy. Generated from the Celestial engineering practice “Privacy by design”.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every new personal-data field needs a stated purpose and retention period in the pull request.

    line 25
  2. Distinctive:

    Never place personal data in URLs, query strings or cache keys.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — Privacy by design

Collect only the personal data a feature needs, keep it only as long as needed and make it easy to find and delete, so privacy holds up in code and not just in policy.

How to do it

  1. Inventory the personal data — For the feature, list every personal field collected or derived (name, email, address, IP, device id, location, free text), its purpose, where it is stored, who can access it and which third parties receive it. Record it in the data inventory beside the code.
  2. Minimise — Remove any field without a clear purpose. Prefer coarser data (birth year instead of date, region instead of precise location), derived flags instead of raw values, and pseudonymous ids instead of direct identifiers in analytics.
  3. Set retention for each store — Give every table, bucket, log stream and backup a retention period tied to its purpose, and implement automatic expiry with a scheduled job or storage lifecycle rule. Document what happens at expiry: delete or anonymise.
  4. Gate collection on consent where required — Load non-essential analytics, advertising and tracking scripts only after the user has opted in, and record the consent choice with timestamp and version. Make withdrawing consent as easy as giving it and honour it immediately.
  5. Keep personal data out of logs and telemetry — Use structured logging with an allow-list of fields, redact emails, tokens, card numbers and free text by default, and never put personal data in URLs or query strings. Scrub error-tracker payloads and analytics events.
  6. Protect it at rest and in transit — Encrypt stores holding personal data, restrict access by role, log administrative access and use field-level encryption for especially sensitive fields.
  7. Implement export and deletion — Build a tested path that finds every record linked to a user across databases, files, caches, search indexes and third-party processors, and either exports or deletes it. Deletion propagates to backups by expiry and is confirmed to the user.
  8. Review with the privacy owner — Walk the inventory, retention and deletion path with whoever owns privacy before release, and update the privacy notice if purposes or recipients changed.

Checklist (before a pull request)

  • Every personal field is in the data inventory with a purpose and location
  • No field is collected without a documented purpose
  • Each store has an automated retention rule
  • Non-essential tracking loads only after opt-in
  • Logs, error reports and analytics contain no direct personal data
  • Export and deletion cover every store and third party, with a test
  • The privacy notice reflects any new purpose or recipient

Rules

  • Every new personal-data field needs a stated purpose and retention period in the pull request. (Data without a purpose is pure liability.)
  • Log with an allow-list of fields and redact personal data by default. (Logs are copied widely, kept long and rarely access-controlled.)
  • Analytics events use pseudonymous ids and never carry names, emails or free text. (Analytics tools are third parties with their own retention.)
  • Never place personal data in URLs, query strings or cache keys. (URLs end up in browser history, server logs and referrer headers.)
  • Deletion must reach caches, search indexes, files and processors, not only the primary table. (A partial delete is a broken promise to the user.)

Checks

GateToolThresholdWhen
PII in logs checkLog redaction tests + secret and PII scanner on log output in CI0 unredacted emails, tokens or card numbers in captured test logsEvery pull request
Deletion testIntegration test of the user deletion pathNo records remain for the deleted test user in any storeEvery pull request touching personal-data storage

Generated from the Celestial engineering practice “Privacy by design”.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.