Skip to content

Folio Standards: the rules a change follows, and what outside AI agents may do - #73

Merged
McCal-Codes merged 1 commit into
mainfrom
standards
Sep 22, 2026
Merged

McCal-Codes merged 1 commit into
mainfrom
standards

Conversation

@McCal-Codes

Copy link
Copy Markdown
Owner

What this changes

Nothing in the app. This adds docs/standards/: the rules a change to Folio follows, so reviews can cite a rule instead of a preference.

  • Master (docs/standards/README.md): the governing principle, MUST / SHOULD / MAY, how to record an exception, what "Folio quality" means.
  • Eleven standards: design, dynamic UI (the D1 to D5 classes and motion rules), interaction, adaptive layout, Compose, state and data, performance, accessibility, privacy and permissions, testing, and AI contributions.
  • Each has numbered rules, where Folio is today (facts with file and line) and a Gaps table (S / M / L).
  • Rules marked "(new code)" apply as code is written or rewritten. Nothing has to be fixed across the whole tree first.

AI contributions: AI agents working for outside contributors may only test for and fix bugs, one bug per PR with a regression test, and the PR says which tool was used. Themes, tweaks and Market packages made with AI are welcome, labelled "AI-assisted (tool)." at the start of their description.

Also:

  • ADR 0006 adopts the standards (proposed).
  • CONTRIBUTING.md links them, adds a "Using AI tools" section, and its test command now matches CI (the :market tasks were missing).
  • The PR template gets a standards checkbox and an AI-disclosure checkbox.
  • The SDK README and the code map point to the standards.

Companion PR for package makers: McCal-Codes/folio-source-template (STANDARDS.md).

Open decisions

  • The performance targets (under 400 ms to first frame, at most 1% janky frames at 120 Hz) are marked as proposals.
  • An aiAssisted manifest field is listed as a gap, not added: the manifest is the signed format.

How I checked it

Docs only. All relative links resolve, except docs/sdk/README.mdexamples/cabinet/, which was already broken on main. No test reads these files.

…ts may do

Eleven standards under docs/standards (design, dynamic UI, interaction,
adaptive layout, Compose, state and data, performance, accessibility,
privacy and permissions, testing, AI contributions), each with numbered
MUST/SHOULD rules, where Folio is today and a ranked gap list. ADR 0006
adopts them. CONTRIBUTING, the PR template, the SDK rules and the code
map point to them, and CONTRIBUTING's command now matches CI.
@McCal-Codes
McCal-Codes merged commit 935db50 into main Sep 22, 2026
2 checks passed
@McCal-Codes
McCal-Codes deleted the standards branch September 22, 2026 14:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9277d2bd35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +33 to +36
- **AI-6 MUST** label anything an AI helped make that ships to users (a theme in `themes/`, a tweak, a Market package,
an icon pack, a wallpaper, a layout preset) as **AI-assisted**, naming the tool:
- in the package or theme description, in the first line, until the manifest has a field for it (see Gaps);
- in the credits or README that travels with it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide a valid disclosure field for AI-assisted themes

When an outside contributor submits an AI-created file in themes/, this requirement cannot be satisfied: FolioTheme has no description or credits field, toJson() drops unknown fields, and CommunityThemesTest.assertSame rejects any field that does not survive the round trip. Adding the required first-line label therefore fails CI, while omitting it violates this policy despite the document saying AI-assisted themes are welcome. Add supported metadata before making this requirement operative, or specify a label location accepted by the current theme format.

Useful? React with 👍 / 👎.

Comment thread docs/standards/design.md
Comment on lines +66 to +67
- **DES-16 MUST** keep text readable over any wallpaper: use `HomeInk` on Home, and a scrim or glass behind text that
can't rely on it ([A11Y-6](accessibility.md)).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Link wallpaper readability to the contrast rule

When an implementer follows this citation for wallpaper readability, A11Y-6 describes accessible alternatives for drag gestures and provides no contrast guidance. The applicable rule is A11Y-9, which defines text contrast and explicitly discusses bright wallpapers, so the current cross-reference sends standards-driven reviews and fixes to an unrelated requirement.

Useful? React with 👍 / 👎.

Comment thread docs/standards/testing.md
- No screenshot tests; no accessibility checks in UI tests.
- Instrumented tests don't run in CI.
- No lint baseline or config; 148 warnings, most `UseKtx`.
- CONTRIBUTING.md's command omits the `:market` tasks that CI runs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the already-completed market-test gap

This current-state claim is already false in the commit that introduces it: the updated CONTRIBUTING.md command includes both :market:testDebugUnitTest and :market:lintDebug. Leaving this line and Gap 4 in the newly published backlog makes completed work appear pending and contradicts the standards README's promise that the current-state and gap sections stay current.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant