founding: soft-phase-core — welcome entry, details, brand kit, review, draft resume #31

Closed
opened 2026-07-25 04:54:28 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #11 (founding).

What to build

The reversible opening minutes of founding, entered from shell's welcome surface and running entirely draft-saved, app-side, with nothing irreversible until Review. From the welcome surface the operator picks "Found a community" (offered only when this installation has no community — one community per installation, ADR 0050) and lands on the "what will happen" overview (P1-S1), which promises the soft phase is reversible up to Review. From there the wizard captures community details with a diacritic-folding slug (P1-S2, ADR 0029), then the brand kit — logo, palette, greeting — with a live portal preview (P1-S3) compiled locally by the bundled helper through the brandkit theming seam (helper-plus-endpoint preview, no fleet or network). Review (P1-S6) confirms every soft-phase choice, and "create the community" is the explicit action that ends the soft phase. Closing the app anywhere in the soft phase loses nothing: the draft is a singleton in the versioned founding-state file (ADR 0050) and resumes where it was left.

This slice builds the soft-phase spine that the Access and Address steps (access-and-address) plug into between S2 and S6; the brand kit captured here is what the gateway deploy later applies. It runs on the founding orchestrator in the bundled helper (ADR 0052), the single seam for all founding behaviour.

Acceptance criteria

  • (story 1) Given this installation has no community, when the operator opens the welcome surface, then "Found a community" is offered and opens P1-S1.
  • (story 1) Given a community already exists in this installation, when the operator opens the welcome surface, then "Found a community" is not offered (one community per installation).
  • (story 2) Given the operator is on S1, when they continue, then the soft phase begins at Community details and every choice from here to Review is draft-saved and reversible.
  • (story 3) Given a community name containing diacritics, when the slug is derived, then diacritics fold (ADR 0029) and the resulting slug is shown.
  • (story 4) Given the operator is capturing the brand kit, when they change the logo, palette, or greeting, then the portal preview re-renders live, compiled locally by the bundled helper (theming seam: helper-plus-endpoint preview) with no fleet or network involved.
  • (story 11) Given the operator is on S6, when it renders, then community details, brand kit, Access choice, and Address are all shown for confirmation, and creating the community is the explicit action that ends the soft phase.
  • (story 12) Given the operator closes the app anywhere in the soft phase, when they reopen it, then the draft resumes where they left it (the founding draft is a singleton in the versioned founding-state file, ADR 0050).

Blocked by

  • #27 — live preview needs the theming seam.
  • #28 — welcome surface hosts the entry.

Task manifest

task: founding:soft-phase-core
implements_flow: p1-founding
implements_edge: SHW→S1, S1→S2, S2→S3, S3→S4, S5→S6
wireframe:
  - docs/ux/wireframes/p1-founding/p1-s1-what-will-happen.html
  - docs/ux/wireframes/p1-founding/p1-s2-community-details.html
  - docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html
  - docs/ux/wireframes/p1-founding/p1-s6-review-and-create.html
interface: the `founding` orchestrator's soft-phase face (bundled helper) — begin/update the singleton founding draft, derive the diacritic-folded slug, capture brand kit and drive the real `brandkit` compile-and-preview, render Review; resume the draft from the versioned state file
seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 real brandkit, fake clan/enroll/broker/DNS adapters"
acceptance:
  - given: this installation has no community
    when: the operator opens the welcome surface
    then: "\"Found a community\" is offered and opens P1-S1; if a community exists it is not offered"
  - given: the operator continues from S1
    when: they proceed
    then: the soft phase begins at Community details and every choice to Review is draft-saved and reversible
  - given: a community name with diacritics
    when: the slug is derived
    then: diacritics fold (ADR 0029) and the slug is shown
  - given: the operator edits logo, palette, or greeting on S3
    when: a value changes
    then: the portal preview re-renders live via the helper-compiled brandkit preview, no fleet or network
  - given: the operator is on S6
    when: it renders
    then: details, brand kit, Access, and Address are shown, and "create the community" is the explicit soft-phase-ending action
  - given: the app closes mid-soft-phase
    when: it reopens
    then: the singleton draft resumes from the versioned founding-state file (ADR 0050)
depends_on: [bootstrap:brandkit-seam, shell:app-side-shell]
out_of_scope:
  - "Access options, rent-in-flow, CGNAT pre-check, Address — access-and-address's (stories 5–10)"
  - "stand-up checklist, resume of the checklist itself — resumability-and-logging's (stories 33–34)"
  - "Welcome / Operator home surfaces themselves — shell owns them"
  - "Service selection — never at founding (ADR 0020)"
needs_human_decision: []
## Parent Feature spec: #11 (founding). ## What to build The reversible opening minutes of founding, entered from shell's welcome surface and running entirely draft-saved, app-side, with nothing irreversible until Review. From the welcome surface the operator picks "Found a community" (offered only when this installation has no community — one community per installation, ADR 0050) and lands on the "what will happen" overview (P1-S1), which promises the soft phase is reversible up to Review. From there the wizard captures community details with a diacritic-folding slug (P1-S2, ADR 0029), then the brand kit — logo, palette, greeting — with a live portal preview (P1-S3) compiled locally by the bundled helper through the `brandkit` theming seam (helper-plus-endpoint preview, no fleet or network). Review (P1-S6) confirms every soft-phase choice, and "create the community" is the explicit action that ends the soft phase. Closing the app anywhere in the soft phase loses nothing: the draft is a singleton in the versioned founding-state file (ADR 0050) and resumes where it was left. This slice builds the soft-phase spine that the Access and Address steps (access-and-address) plug into between S2 and S6; the brand kit captured here is what the gateway deploy later applies. It runs on the `founding` orchestrator in the bundled helper (ADR 0052), the single seam for all founding behaviour. ## Acceptance criteria - [ ] (story 1) Given this installation has no community, when the operator opens the welcome surface, then "Found a community" is offered and opens P1-S1. - [ ] (story 1) Given a community already exists in this installation, when the operator opens the welcome surface, then "Found a community" is not offered (one community per installation). - [ ] (story 2) Given the operator is on S1, when they continue, then the soft phase begins at Community details and every choice from here to Review is draft-saved and reversible. - [ ] (story 3) Given a community name containing diacritics, when the slug is derived, then diacritics fold (ADR 0029) and the resulting slug is shown. - [ ] (story 4) Given the operator is capturing the brand kit, when they change the logo, palette, or greeting, then the portal preview re-renders live, compiled locally by the bundled helper (theming seam: helper-plus-endpoint preview) with no fleet or network involved. - [ ] (story 11) Given the operator is on S6, when it renders, then community details, brand kit, Access choice, and Address are all shown for confirmation, and creating the community is the explicit action that ends the soft phase. - [ ] (story 12) Given the operator closes the app anywhere in the soft phase, when they reopen it, then the draft resumes where they left it (the founding draft is a singleton in the versioned founding-state file, ADR 0050). ## Blocked by - #27 — live preview needs the theming seam. - #28 — welcome surface hosts the entry. ## Task manifest ```yaml task: founding:soft-phase-core implements_flow: p1-founding implements_edge: SHW→S1, S1→S2, S2→S3, S3→S4, S5→S6 wireframe: - docs/ux/wireframes/p1-founding/p1-s1-what-will-happen.html - docs/ux/wireframes/p1-founding/p1-s2-community-details.html - docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html - docs/ux/wireframes/p1-founding/p1-s6-review-and-create.html interface: the `founding` orchestrator's soft-phase face (bundled helper) — begin/update the singleton founding draft, derive the diacritic-folded slug, capture brand kit and drive the real `brandkit` compile-and-preview, render Review; resume the draft from the versioned state file seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 real brandkit, fake clan/enroll/broker/DNS adapters" acceptance: - given: this installation has no community when: the operator opens the welcome surface then: "\"Found a community\" is offered and opens P1-S1; if a community exists it is not offered" - given: the operator continues from S1 when: they proceed then: the soft phase begins at Community details and every choice to Review is draft-saved and reversible - given: a community name with diacritics when: the slug is derived then: diacritics fold (ADR 0029) and the slug is shown - given: the operator edits logo, palette, or greeting on S3 when: a value changes then: the portal preview re-renders live via the helper-compiled brandkit preview, no fleet or network - given: the operator is on S6 when: it renders then: details, brand kit, Access, and Address are shown, and "create the community" is the explicit soft-phase-ending action - given: the app closes mid-soft-phase when: it reopens then: the singleton draft resumes from the versioned founding-state file (ADR 0050) depends_on: [bootstrap:brandkit-seam, shell:app-side-shell] out_of_scope: - "Access options, rent-in-flow, CGNAT pre-check, Address — access-and-address's (stories 5–10)" - "stand-up checklist, resume of the checklist itself — resumability-and-logging's (stories 33–34)" - "Welcome / Operator home surfaces themselves — shell owns them" - "Service selection — never at founding (ADR 0020)" needs_human_decision: [] ```
Author
Owner

Done — founding:soft-phase-core shipped in commit 0c3642c.

The founding orchestrator's soft-phase face (ADR 0052), founding's single test seam, lives in the app's bundled helper: internal/founding/.

What landed

  • Singleton draft in the versioned founding-state file (ADR 0050): State{SchemaVersion, Founded, Draft} behind a Store — a MemoryStore seam fake (JSON-round-trips every save) and a production FileStore (atomic temp+rename write, refuse-or-migrate on a schema newer than the app understands).
  • The orchestrator, thin over the store so every soft-phase choice is draft-saved and reversible: Offered (the one-community-per-installation gate, ADR 0050 — a second founding is refused with ErrCommunityExists), Begin/Start/SaveDetails/SaveBrandKit/Back/GoTo/SetAccess/SetAddress/Preview/Review/CreateCommunity. CreateCommunity is the single explicit soft-phase-ending act — flips Founded, returns the finalised details + the fully-compiled brand kit the gateway deploy later applies.
  • Slugify folds diacritics (ADR 0029): Te Rūnanga o Example → te-runanga-o-example; fold-equal collisions left to the ordinary matou.nz availability check.
  • P1-S3 live preview is real: Preview drives brandkit.Compile in process over the portal + IdP-sign-in surfaces, compiled locally by the helper with no fleet and no network (the ADR 0038 sign-in boundary rides for free). Letter-mark logo + default preset fallbacks keep the preview live from the first keystroke.
  • Thin stdio JSON bridge (ADR 0052): the helper's new found subcommand serves newline-delimited JSON over stdin/stdout against the versioned FileStore; day-one boot-log behaviour unchanged.

Acceptance — all six clauses pass at the seam: welcome gating (story 1), reversible draft-save from S1 (story 2), slug folding (story 3), live preview re-render (story 4), Review-shows-all + create-ends-soft-phase (story 11), resume-across-restart (story 12).

Out of scope, left to their slices: Access/rent-in-flow/CGNAT/Address capture (#39 — slots modelled and rendered at Review), the stand-up checklist, the Welcome/Operator-home surfaces (shell's), and the Vue wizard rendering (thin UI over the stdio events).

Evidence: internal/founding/*_test.go — 16 seam tests (24 with subtests). go build/vet/test, gofmt, and golangci-lint all clean; the found subcommand verified end-to-end against a real state file. docs/slices/founding.yaml marks soft-phase-core status: done; STATUS.md updated.

Done — `founding:soft-phase-core` shipped in commit `0c3642c`. The `founding` orchestrator's **soft-phase face** (ADR 0052), founding's single test seam, lives in the app's bundled helper: `internal/founding/`. **What landed** - **Singleton draft in the versioned founding-state file (ADR 0050):** `State{SchemaVersion, Founded, Draft}` behind a `Store` — a `MemoryStore` seam fake (JSON-round-trips every save) and a production `FileStore` (atomic temp+rename write, **refuse-or-migrate** on a schema newer than the app understands). - **The orchestrator, thin over the store** so every soft-phase choice is draft-saved and reversible: `Offered` (the one-community-per-installation gate, ADR 0050 — a second founding is refused with `ErrCommunityExists`), `Begin`/`Start`/`SaveDetails`/`SaveBrandKit`/`Back`/`GoTo`/`SetAccess`/`SetAddress`/`Preview`/`Review`/`CreateCommunity`. `CreateCommunity` is the single explicit soft-phase-ending act — flips `Founded`, returns the finalised details + the fully-compiled brand kit the gateway deploy later applies. - **`Slugify` folds diacritics (ADR 0029):** `Te Rūnanga o Example` → `te-runanga-o-example`; fold-equal collisions left to the ordinary matou.nz availability check. - **P1-S3 live preview is real:** `Preview` drives `brandkit.Compile` in process over the portal + IdP-sign-in surfaces, compiled locally by the helper with **no fleet and no network** (the ADR 0038 sign-in boundary rides for free). Letter-mark logo + default preset fallbacks keep the preview live from the first keystroke. - **Thin stdio JSON bridge (ADR 0052):** the helper's new `found` subcommand serves newline-delimited JSON over stdin/stdout against the versioned `FileStore`; day-one boot-log behaviour unchanged. **Acceptance** — all six clauses pass at the seam: welcome gating (story 1), reversible draft-save from S1 (story 2), slug folding (story 3), live preview re-render (story 4), Review-shows-all + create-ends-soft-phase (story 11), resume-across-restart (story 12). **Out of scope, left to their slices:** Access/rent-in-flow/CGNAT/Address capture (#39 — slots modelled and rendered at Review), the stand-up checklist, the Welcome/Operator-home surfaces (shell's), and the Vue wizard rendering (thin UI over the stdio events). **Evidence:** `internal/founding/*_test.go` — 16 seam tests (24 with subtests). `go build`/`vet`/`test`, `gofmt`, and golangci-lint all clean; the `found` subcommand verified end-to-end against a real state file. `docs/slices/founding.yaml` marks `soft-phase-core` `status: done`; `STATUS.md` updated.
ben closed this issue 2026-07-25 07:02:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#31
No description provided.