Skip to content

Folder: ui-craft, a second Folder skill that sets the craft bar for every interface an agent builds (F14 addendum, manifest schema 4) - #585

Open
annavesela wants to merge 1 commit into
mainfrom
agent/ui-craft-skill
Open

annavesela wants to merge 1 commit into
mainfrom
agent/ui-craft-skill

Conversation

@annavesela

@annavesela annavesela commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Plan: DEV-6655. Implements Anna's billing decisions of 2026-10-21 on top of the billing slice from #306. Billing stays off by default; nothing is created in Stripe and nothing is deployed.

Decision 1: an Organization always has at least one Environment

  • TIERS now starts at 1 (Start = 1–3 Environments). tierFor(0), quote("organization", 0) and planQuantityChange(…, 0) throw OrganizationEnvironmentRequired. Every Organization quote has an environment line, so the base-only quote no longer exists.
  • When an Organization has no billable Environment, the billing API answers both GET (quote) and POST (Checkout) with 409 { "error": "conflict", "problem": "organization-environment-required" }. Checkout refuses it before any Stripe customer or session is created.
  • STRIPE_ORGANIZATION_ENVIRONMENTS_JSON with an empty array for an Organization is refused at startup.
  • Tests: boundary tests at 1, 3/4 and 10/11, a new test for 0 (catalog, count change, API GET/POST, config). UI copy (EN/CS) and the browser test now say 1–3.

Decision 3: IČO on invoices

  • An Organization Checkout billed in CZ gets one Checkout custom_fields entry: key ico, type: "numeric", optional: true, label IČO (identifikační číslo osoby), minimum_length = maximum_length = 8. This was checked against the SDK types (stripe-node 23, 2026-09-30.endive). Stripe supports dropdown, numeric and text, and numeric accepts digits only. A personal Buddy never gets the field.
  • How the value reaches invoices. Checkout copies custom fields nowhere. invoice_creation only works in payment mode, and Checkout's subscription_data.invoice_settings only accepts issuer. So when reconcileEvent adopts the exact recorded Checkout of an Organization, it sets invoice_settings.custom_fields = [{ name: "IČO", value }] on the subscription (supported since 2026-06-24.dahlia). If the provider call fails, the adoption is rolled back, the webhook returns 503 and Stripe retries the event. Dashboard never stores or logs the value. The Customer's invoice_settings.custom_fields would also work. I chose the subscription because the IČO belongs to the Checkout of that subscription, and a later purchase states it again. The full reasoning is in docs/stripe-billing.md, section "IČO on invoices".
  • Tests: SDK serialization of the field (only CZ + Organization), reading the value from the session, the subscription update, adoption writing it exactly once, a failed write retried by Stripe, a malformed value skipped without logging the value, and a personal payer never writing it.

Decision 2: follow-up for #307

The billing code has no cancellation and no Environment removal of its own: the portal keeps cancellation disabled, and the Stripe quantity update is still open in #307. So "the last Environment cannot be canceled alone, canceling the Organization ends all its Environments at the end of the paid period" is only documented here. The one piece that is already enforced is that planQuantityChange refuses 0. Implementation belongs to the lifecycle work in #307.

Open points

  • The first invoice has no IČO. Checkout finalizes and charges it before the webhook arrives. Whether invoices.update can still add custom_fields to the finalized invoice has to be verified in the sandbox (M6).
  • Offering the field only for CZ is my choice: the label is Czech and the format is the Czech IČO. Extending it to SK or all countries is a one-line change.
  • The IČO checksum is not validated, only the 8-digit length and format.
  • The Mission Control plan DEV-6655 still says Start "(0-3)" in its context and needs updating in mission-control-data.
  • docs/stripe-billing.md is also touched by Launchpad: the Marketplace's sentence follows the page's language and catalog when they arrive #389. A conflict may occur, in different sections.

Verification

See the PR comment with the bun run check result.

🤖 Generated with Claude Code

@annavesela

Copy link
Copy Markdown
Contributor Author

The Operator (@annavesela) asked to publish this. Merging needs the required code-owner review (@agentrozjedemeai, already requested) on head d4525ea. @immakermatty, the F14 addendum asks for your product decision on shipping ui-craft to every Folder. The website side (HumanAndMachine-ai/website-lazurio#93) is merged.

immakermatty added a commit that referenced this pull request Oct 21, 2026
…g addendum point 2, #565, DEV-6676)

Buddy's rules gain the section "Paměť: gbrain" ("Memory: gbrain") right
after his coordination work: gbrain first at the start of a conversation
and for any question about a person, an Organization, a project, a meeting
or a decision (search, query, get_page), only then the web or files; what
he learns about the user goes to gbrain, and after a batch of writes he
checks that he can find it again; Hermes's built-in memory tool holds only
operating preferences; without the gbrain tools he tells the user. These
habits lived in the pilot's SOUL.md until it became the persona only, and
without them a Buddy drifts to Hermes's built-in memory.

Root 0210 gives gbrain to Buddy implicitly and to the other agents only on
the user's explicit word, so AGENTS.md, the manual and the skills keep
their text; a new test proves that no line of the section, nor get_page,
reaches them on any preset in either locale.

Template revision base-instructions-66 (main took 64 in #574, and the open
#585 holds 65): .hermes.md changes by the section and its revision line,
every other generated file by its revision line only. The digest pin, the
tools test pins and the AGENTS.md and manual snapshots move with it, and
docs/decisions.md records F14's addendum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty added a commit that referenced this pull request Oct 21, 2026
…g addendum point 2, #565, DEV-6676) (#581)

Buddy's rules gain the section "Paměť: gbrain" ("Memory: gbrain") right
after his coordination work: gbrain first at the start of a conversation
and for any question about a person, an Organization, a project, a meeting
or a decision (search, query, get_page), only then the web or files; what
he learns about the user goes to gbrain, and after a batch of writes he
checks that he can find it again; Hermes's built-in memory tool holds only
operating preferences; without the gbrain tools he tells the user. These
habits lived in the pilot's SOUL.md until it became the persona only, and
without them a Buddy drifts to Hermes's built-in memory.

Root 0210 gives gbrain to Buddy implicitly and to the other agents only on
the user's explicit word, so AGENTS.md, the manual and the skills keep
their text; a new test proves that no line of the section, nor get_page,
reaches them on any preset in either locale.

Template revision base-instructions-66 (main took 64 in #574, and the open
#585 holds 65): .hermes.md changes by the section and its revision line,
every other generated file by its revision line only. The digest pin, the
tools test pins and the AGENTS.md and manual snapshots move with it, and
docs/decisions.md records F14's addendum.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from d4525ea to f0b94a1 Compare October 21, 2026 19:04
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai Please review this PR. The head is f0b94a1, rebased on main a711ef7, and both required checks pass. The Operator (@annavesela) asked to publish it, and the merge waits only on your code-owner review. The six full-suite failures listed in the description also fail on clean main.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from f0b94a1 to bbf8c5a Compare October 22, 2026 19:52
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai The branch conflicted with main after #592, so I rebased it. The new head is bbf8c5a on main 23e7b14. The skill itself did not change. The rebase changed only these:

Local verification on bbf8c5a: typecheck, lint and check:public pass, and so do 411 folder/try/buddy tests (410 pass, 1 skipped). Please review this head.

@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai The branch conflicted with main again, so I rebased it. The new head is ec1f4de1 on main 838537c. The conflict came from #604, which also used base-instructions-68. The skill did not change. The rebase changed only these:

  • the revision is now base-instructions-69;
  • the digest was re-pinned and the snapshots regenerated;
  • the ui-craft addendum names -69.

Local verification on ec1f4de1: typecheck, lint and check:public pass, and so do 418 folder/try/buddy tests (417 pass, 1 skipped). Please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from bbf8c5a to ec1f4de Compare October 23, 2026 14:57
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai The branch conflicted with main again (#608 took base-instructions-69), so I rebased it. The new head is 644dd50 on main 6a4bc7f. The skill did not change; only the revision changed (now base-instructions-70), with the re-pinned digest and regenerated snapshots. Local verification on 644dd50: typecheck, lint and check:public pass, and so do 419 folder/try/buddy tests (418 pass, 1 skipped). Please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from ec1f4de to 644dd50 Compare October 23, 2026 15:45
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai The branch conflicted with main again (#613 took base-instructions-70 and added a T3 Code 0.1.2 addendum), so I rebased it. The new head is 8e3fb83 on main 013adf6. The skill did not change. The revision is now base-instructions-71, with the re-pinned digest and regenerated snapshots, and the ui-craft addendum follows #613's addendum, which is kept as it was. Local verification on 8e3fb83: typecheck, lint and check:public pass, and so do 419 folder/try/buddy tests (418 pass, 1 skipped). Please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from 644dd50 to 8e3fb83 Compare October 24, 2026 11:59
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai Rebased again after #614 took base-instructions-71. The new head is 00736be on main eea70d0. The skill did not change. The revision is now base-instructions-72 (re-pinned digest, regenerated snapshots), and #614's addendum is kept as it was. Local verification on 00736be: typecheck, lint and check:public pass, and so do 419 folder/try/buddy tests (418 pass, 1 skipped). Please review this head.

@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai Rebased again after #621 took base-instructions-72. The new head is 5d3e5f9 on main baa6eda. The skill did not change; its text uses neither "Draft" nor "Ready for review", so #621's renaming needs nothing here. The revision is now base-instructions-73 (re-pinned digest, regenerated snapshots), and #621's addendum is kept as it was. Local verification on 5d3e5f9: typecheck, lint and check:public pass, and so do 421 folder/try/buddy tests (420 pass, 1 skipped). Please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from 00736be to 5d3e5f9 Compare October 24, 2026 18:13
@immakermatty

Copy link
Copy Markdown
Contributor

Please hold the merge of this PR until v0.1.11-rc.6 is cut. The rollout coordinator decided on 2026-10-24 (~18:35Z) that rc.6 is cut from main and that until the tag only #626 (M3) and, if it is ready, #619 may merge. #585 changes the Folder template revision and snapshots, so it goes into the next candidate. I'll comment here as soon as rc.6 is tagged. (DEV-6656, Platform v0.1.11 release mechanics)

@annavesela

Copy link
Copy Markdown
Contributor Author

@immakermatty Understood. I'll hold the merge until you comment that v0.1.11-rc.6 is tagged, even if the review approves it before then. After the tag I'll rebase onto main if needed and merge only with an approving review on that head.

@immakermatty

Copy link
Copy Markdown
Contributor

v0.1.11-rc.6 is cut (tag on main b5c6521), so the merge hold is lifted. This PR can merge after its review; it goes into the next candidate. (DEV-6656, Platform v0.1.11 release mechanics)

@annavesela

Copy link
Copy Markdown
Contributor Author

@immakermatty Thanks. @agentrozjedemeai The hold is lifted, and I rebased onto main b5c6521 (the rc.6 tag), because #626 had taken base-instructions-73. The new head is 3a1997f. The skill did not change; the revision is now base-instructions-74 with the re-pinned digest and regenerated snapshots. Local verification on 3a1997f: typecheck, lint and check:public pass, and so do 421 folder/try/buddy tests (420 pass, 1 skipped). This is the last step before the merge: please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from 5d3e5f9 to 3a1997f Compare October 24, 2026 20:00
@immakermatty

Copy link
Copy Markdown
Contributor

Correction: the merge hold stays until the final v0.1.11 is tagged, not only rc.6. The release workflow accepts a final tag only on a commit that differs from the candidate (rc.6, b5c6521) in qualification/ and docs/evidence/ alone, so nothing else may land on main before it. Please hold this PR until I comment that v0.1.11 is out. (DEV-6656, Platform v0.1.11 release mechanics)

@annavesela

Copy link
Copy Markdown
Contributor Author

@immakermatty Understood. I'll hold the merge until you comment that the final v0.1.11 is out, even if the review approves it before then. The head 3a1997f stays as it is for review in the meantime.

@immakermatty

Copy link
Copy Markdown
Contributor

LazurioPlatform v0.1.11 is out (2026-10-25 11:04:48Z), so the merge hold is lifted. This PR can merge after its review and goes into v0.1.12. (DEV-6656, Platform v0.1.11 release mechanics)

@annavesela

Copy link
Copy Markdown
Contributor Author

@immakermatty Thanks. @agentrozjedemeai The hold is lifted, and I rebased onto main 0a42de2 (after v0.1.11), because #619 and #623 had taken base-instructions-74 and -75. The new head is 97016ae. The skill did not change, and the commit's changes against main are the same as before the rebase. The revision is now base-instructions-76 with the re-pinned digest and regenerated snapshots; #619's question-tool rule and #623's addendum are kept as they were. Local verification on 97016ae: typecheck, lint and check:public pass, and so do 424 folder/try/buddy tests (423 pass, 1 skipped). Please review this head; it is the only thing the merge waits for.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from 3a1997f to 97016ae Compare October 25, 2026 11:10
Every Lazurio Folder now carries a second skill, `ui-craft`, next to
`new-module`, for Codex (.agents/skills) and Claude Code (.claude/skills)
in the Folder's locale. It gives agents a concrete craft bar for apps,
websites and dashboards: whether something should move at all, easing and
duration, smoothness, accessible motion and hover gating, the phone
baseline (inputs, safe areas, svh/dvh), worst-case real data, and browser
verification before handoff. The project's own rules and design system
always come first. The rules are newly written, retold from
emilkowalski/skills at 2d228630 (MIT) with credit; no passages are copied.

AGENTS.md and the new-module skill point to it, so agents whose harness
does not list Folder skills still find it. Because the instruction
manifest records exactly the outputs of its schema, the manifest moves to
schema 4; schema 3 stays frozen as new-module only, and a Folder of
schema 3 gains ui-craft on its next change only where nothing occupies
the path (otherwise the planner refuses with unowned-file). Template
revision base-instructions-62 with the new pinned digest.

Proposed as an addendum to decision F14 in docs/decisions.md for Matěj
to decide; the licensing table records the provenance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@annavesela

Copy link
Copy Markdown
Contributor Author

@agentrozjedemeai Rebased again after #645 took base-instructions-76. The new head is 368b2b1 on main ec33957. The skill did not change, and the commit's changes against main are the same as before (16 files, +606/−125). The revision is now base-instructions-77 (re-pinned digest, regenerated snapshots), and #645's addendum is kept as it was. Local verification on 368b2b1: typecheck, lint and check:public pass, and so do 547 folder/try/buddy tests (546 pass, 1 skipped). Please review this head.

@annavesela
annavesela force-pushed the agent/ui-craft-skill branch from 97016ae to 368b2b1 Compare October 25, 2026 15:06

This branch has not been deployed

No deployments
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.

2 participants