Skip to content

@pii: carry the reason/lawful-basis documentation, not just the marker #38

Description

@woksin

Summary

@pii (and @sensitive) are bare markers. Real applications annotate PII with why it is personal data — purpose, lawful basis, whose subject it lives under, erasability — and that documentation is exactly what a compliance reader wants from a Screenplay. Today it has nowhere to go, so generators must throw it away.

Evidence (real application)

Ada carries 36 [PII("…")] attributes on concepts, each a small GDPR record:

[PII("Partner payout bank account — financial data. Remits self-billing payments; lawful basis: contract performance / legal obligation. Fraud-sensitive; personal only for sole-proprietor (ENK) partners.")]
public record BankAccountNumber(string Value) : ConceptAs<string>(Value);

[PII("Reason a user account was deactivated — personal data about that user. Audit of the decision; lawful basis: legitimate interest / legal obligation; under the user's own subject, erasable with their key.")]
public record DeactivationReason(string Value) : ConceptAs<string>(Value);

The generated document (Cratis.Arc.Screenplay 20.65.0) reduces every one of these to:

concept BankAccountNumber : String @pii

Screenplay's stated design goal is that "concepts carry compliance" — with a bare marker, they carry the flag but not the compliance.

Solution

Use an indented form with reason:

concept BankAccountNumber : String @pii
  pii reason "Partner payout bank account — financial data. …"

The concept-attribute regex currently accepts any @word with no arguments; whichever form is chosen should keep unknown attributes tolerated as today.

Context

Found while validating a generated 5,348-line document from a production Arc application against its source — all 36 PII rationales were lost in generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions