Skip to content

Commit 1c78b51

Browse files
committed
feat: phase 3
1 parent 6c86855 commit 1c78b51

16 files changed

Lines changed: 200 additions & 125 deletions

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When code and docs disagree, **PRD and contract win** (WordPress.org Theme Revie
2727
How-it-works maps describe current machinery only. They must not invent product law.
2828

2929
Load [`docs/prd/start-stackable.agents.md`](./docs/prd/start-stackable.agents.md) before changing templates, `theme.json`, header behavior, onboarding, patterns, or theme e2e.
30-
Use [`docs/prd/start-stackable.plan.md`](./docs/prd/start-stackable.plan.md) when implementing a phase (Phases 0 and 1 are done; Phase 2 is in progress).
30+
Use [`docs/prd/start-stackable.plan.md`](./docs/prd/start-stackable.plan.md) when implementing a phase (Phases 0-2 are done; Phase 3 is in progress).
3131
Use [`docs/prd/start-stackable.check.md`](./docs/prd/start-stackable.check.md) to verify a finished (or phase-complete) theme without relying on e2e.
3232

3333
Changing a shell-contract **primitive** requires updating the matching PRD/contract surfaces and tests in the same change.

‎docs/prd/start-stackable.agents.md‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ ADR: [`../adr/0002-theme-is-the-default.md`](../adr/0002-theme-is-the-default.md
1313

1414
Law below is the **finished** theme.
1515
The tree is a **scaffold**.
16-
Phases 0 and 1 are done (bootstrap and the `theme.json` design system).
17-
Phase 2 is in progress (style variations).
18-
Phases 3-11 are not started.
19-
**Current: Phase 2** in the plan.
16+
Phases 0-2 are done (bootstrap, the `theme.json` design system, and style variations).
17+
Phase 3 is in progress (header and footer parts plus patterns).
18+
Phases 4-11 are not started.
19+
**Current: Phase 3** in the plan.
2020
Do not skip phases.
2121
Do not treat the file map or template-as-pattern-include as the current tree.
2222
Fix [gaps](#current-repo-gaps) on the matching phase only.
@@ -100,7 +100,7 @@ Kit Home uses the page's `full-width` template.
100100

101101
When finished, templates are thin `wp:pattern` includes of template patterns.
102102
Parts are thin includes of header/footer patterns.
103-
Today they are still inline HTML (Phase 3+).
103+
Parts now use pattern includes; templates remain inline until Phase 4+.
104104

105105
## Patterns
106106

@@ -115,23 +115,22 @@ Not allowed: a section catalog of heroes, pricing, testimonials, team, FAQ, logo
115115
Do not take a later gap first.
116116
Each item is gone or explicitly deferred in an ADR.
117117

118-
- Phase 2: typography variations; at least one dark. Color hue files exist.
119-
- Phase 3: header/footer as pattern includes; footer copyright = site name, not a year-only stub.
118+
- Phase 3: header/footer patterns and thin part includes are implemented; acceptance verification is in progress.
120119
- Phase 4: first-activation grid must look designed (not an unstyled Query Loop). Templates must not reference missing slugs (`spacing|50`, color `secondary`).
121120
- Phase 5: `full-width` must drop extra main padding that blocks `alignfull`.
122121
- Phase 6: sticky / transparent / scroll state in `src/` (height token host already exists).
123-
- Phase 7-11: patterns empty; no Woo templates; no recommend-plugin notice; no `screenshot.png`; snap-in contract on paper only.
122+
- Phase 7-11: pattern catalog incomplete; no Woo templates; no recommend-plugin notice; no `screenshot.png`; snap-in contract on paper only.
124123

125124
## Implementation sequence
126125

127-
Phases 0 and 1 are done; skip them.
126+
Phases 0-2 are done; skip them.
128127
Follow [`start-stackable.plan.md`](./start-stackable.plan.md) (numbered What/How).
129128
Do not skip a phase's **This phase is done when**.
130129
Then run that phase in [`start-stackable.check.md`](./start-stackable.check.md).
131130

132131
1. Design system (`theme.json`, Plus Jakarta Sans headings, system body, shadows, radius, fluid type/spacing, element/block styles).
133-
2. Style variations. **Start here.**
134-
3. Header and footer parts + patterns (no `ref`, user copyright).
132+
2. Style variations.
133+
3. Header and footer parts + patterns (no `ref`, user copyright). **Current.**
135134
4. Blog templates (index/home/archive/search/404/single).
136135
5. Canvases (`page`, `full-width`, `blank`).
137136
6. Header flags.

‎docs/prd/start-stackable.md‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ What you have now is a working **scaffold**: it activates, the Site Editor opens
1818
Default (the designed blog you should see on first activation) is not a product yet.
1919

2020
Work is organized as **phases 0 through 11** in the [implementation plan](./start-stackable.plan.md).
21-
Phases 0 and 1 are done.
22-
**The current work is Phase 2** (style variations).
23-
Do not skip ahead to headers, patterns, or Site Kit snap-in until that phase's **Done when** is true.
21+
Phases 0-2 are done.
22+
**The current work is Phase 3** (header and footer parts plus patterns).
23+
Do not skip ahead to blog templates, canvases, or Site Kit snap-in until that phase's **Done when** is true.
2424

2525
If a word feels loaded (Default, shell, token, canvas, header flag), see [`CONTEXT.md`](../../CONTEXT.md).
2626

@@ -36,7 +36,7 @@ If a word feels loaded (Default, shell, token, canvas, header flag), see [`CONTE
3636
| See the two big decisions (theme is shell, theme is Default) | [`../adr/`](../adr/) |
3737
| Work on Site Kits (plugin, not this theme) | Sibling `../Stackable/docs/prd/site-kits.md` |
3838

39-
You do not need the plugin docs, the import contract, or the agent PRD to start Phase 2.
39+
You do not need the plugin docs or the import contract to start Phase 3.
4040

4141
## Block theme in 60 seconds
4242

@@ -48,7 +48,7 @@ These are the files you will touch, and what each one is for:
4848
| `styles/colors/` and `styles/typography/` | Optional skins (style variations) that restyle the **same** named colors or fonts. Switching a variation in Site Editor → Styles should restyle the whole site. |
4949
| `templates/` | One HTML file per kind of page (blog home, single post, page, search, 404, and so on). WordPress picks the file automatically. |
5050
| `parts/` | Reusable header and footer pieces that templates include. |
51-
| `patterns/` | Reusable block layouts (post card, header markup, one optional Homepage starter). Empty until Phase 7. |
51+
| `patterns/` | Reusable block layouts. Phase 3 adds header/footer patterns; later phases add blog atoms, template patterns, and one optional Homepage starter. |
5252
| `functions.php` | The only PHP bootstrap WordPress loads from the theme. Must be this filename (not `function.php`). |
5353
| `src/` | Extra CSS and JS for behavior `theme.json` cannot express (sticky/transparent header). Compiles into `assets/build/`. |
5454
| `style.css` | Theme identity for WordPress (name, version, tags). It is not where the design system lives. |
@@ -63,50 +63,50 @@ CSS in `src/` is only for things `theme.json` cannot do, such as measuring heade
6363

6464
## Current state (you are here)
6565

66-
Snapshot of the tree as of 26 August 2026.
66+
Snapshot of the tree as of 1 September 2026.
6767
If the files and this section disagree, trust the files and the [phase checklists](./start-stackable.check.md).
6868

69-
**Phases 0 and 1 are complete.**
69+
**Phases 0-2 are complete.**
7070
The theme is a valid block theme that activates without a PHP fatal.
7171
`functions.php` enqueues `assets/build/frontend.*` and adds the body class `stk--is-stackable-theme`.
7272
`npm run start` compiles `src/` into `assets/build/`.
7373
Template and part **files** exist.
7474
Color palette **slugs** and content/wide widths already match the token contract below.
7575

76-
**Phase 2 is in progress.**
77-
Phases 3-11 are not started.
76+
**Phase 3 is in progress.**
77+
Phases 4-11 are not started.
7878
What you see on `/` is a skeleton blog (site title, a basic post grid, a footer), not the designed Default the product requires.
7979

8080
| Phase | Status | What is true now | What "done" looks like |
8181
| --- | --- | --- | --- |
8282
| 0 Bootstrap | Done | Theme activates; compile/zip works | (already met) |
8383
| 1 Design system | Done | Token contract, Jakarta headings, system body, fluid type and spacing, shadows, radius, and core-block styles are implemented | (already met) |
84-
| 2 Style variations | In progress | Eight color hue files; empty `styles/typography/`; no dark variation | Color + typography skins, including at least one dark, using the same slugs |
85-
| 3 Header and footer | Scaffold | Parts exist (title + nav; footer columns); not designed pattern includes | Designed, fresh-install-safe header/footer with no hardcoded Navigation `ref` |
84+
| 2 Style variations | Done | Nine color skins, including Dark, plus Compact and Editorial typography presets use the shared token contract | (already met) |
85+
| 3 Header and footer | In progress | Five core-only patterns own the shell markup; parts are thin pattern includes | Designed, fresh-install-safe header/footer with no hardcoded Navigation `ref` |
8686
| 4 First-activation blog | Scaffold | `index.html` is a basic two-column Query Loop | Crafted post cards, designed single/search/404, `/` looks like a product with Hello World |
8787
| 5 Canvases | Scaffold | `page`, `full-width`, and `blank` files exist; `full-width` still wraps content in padding | Ordinary pages have a title; kit pages are full-bleed with no theme title |
8888
| 6 Header flags | Stub | JS only sets `--stk-header-height`; no sticky/transparent CSS yet | Sticky, transparent overlay, scroll-to-solid, mobile nav above a hero, plugin off |
89-
| 7 Patterns | Not started | `patterns/` is empty | Header/footer/post-card/comments + exactly one Homepage starter; no hero/pricing catalog |
89+
| 7 Patterns | Not started | Header/footer patterns exist; blog atoms and `page-home` do not | Header/footer/post-card/comments + exactly one Homepage starter; no hero/pricing catalog |
9090
| 8 Woo templates | Not started | No Woo HTML templates | Shop/product/cart/checkout look designed if Woo is active; theme still works if it is not |
9191
| 9 PHP host | Partial | Setup, enqueue, body class | Dismissible "install Stackable" notice + optional breakpoint handshake |
9292
| 10 Directory packaging | Not started | No `screenshot.png`; tags incomplete | WP.org zip: screenshot of Default, licenses, honest tags |
9393
| 11 Snap-in | Not started | Contract is documented only | Plugin can assign `full-width` + header flags without a theme PHP change |
9494

9595
Honest one-liner: this is a **legal scaffold**.
9696
Default is not designed yet.
97-
Continue Phase 2.
97+
Continue Phase 3.
9898

9999
## How we develop
100100

101101
This is sequential craft, not "pick a random file."
102102

103103
1. **Read this guide** so you know what the theme is allowed to own.
104104
2. **Open the next unfinished phase** in the [plan](./start-stackable.plan.md).
105-
Right now that is Phase 2.
105+
Right now that is Phase 3.
106106
Do not skip a phase.
107107
3. **Implement in the existing seam**, not a parallel system:
108108
- look → `theme.json` and `styles/`
109-
- layout → `templates/` and `parts/` (later `patterns/`)
109+
- layout → `templates/`, `parts/`, and `patterns/`
110110
- behavior `theme.json` cannot express → `src/css/` and `src/js/`
111111
- PHP → `functions.php` only, functions prefixed `start_stackable_`
112112
4. **Stay inside product law** (the rest of this file).
@@ -356,8 +356,8 @@ The zip must stand alone: `screenshot.png` that matches Default, designed templa
356356
## Implementation
357357

358358
Numbered what/how steps per phase: [`start-stackable.plan.md`](./start-stackable.plan.md).
359-
Skip Phases 0 and 1 (done).
360-
Continue Phase 2 and do the numbered items in order.
359+
Skip Phases 0-2 (done).
360+
Continue Phase 3 and do the numbered items in order.
361361
Do not skip a phase's **This phase is done when**.
362362

363363
E2E specs to create once a surface exists: table in [`start-stackable.agents.md`](./start-stackable.agents.md#e2e-create-these).

‎docs/prd/start-stackable.plan.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Do not start the next phase until the current one is checked off.
1111

1212
## How to use this file
1313

14-
1. Confirm you are on the phase marked **in progress** (right now: Phase 2).
14+
1. Confirm you are on the phase marked **in progress** (right now: Phase 3).
1515
2. Read that phase's "is for" sentence so you know the job.
1616
3. Do the numbered items in order.
1717
Each item has **What** (the outcome) and **How** (the files and edits).
@@ -41,8 +41,9 @@ Constants for every file you add:
4141
| --- | --- |
4242
| 0 Bootstrap | **Done.** Skip it. |
4343
| 1 Design system | **Done.** Skip it. |
44-
| 2 Style variations | **In progress.** |
45-
| 3-11 | Later. Do not start these yet. |
44+
| 2 Style variations | **Done.** Skip it. |
45+
| 3 Header and footer | **In progress.** |
46+
| 4-11 | Later. Do not start these yet. |
4647

4748
The file tree in the [appendix](#appendix-a-finished-zip) is the **destination**.
4849
It is not what the repo looks like today.
@@ -334,7 +335,7 @@ Then work the **Phase 1** list in [`start-stackable.check.md`](./start-stackable
334335

335336
## Phase 2 is for making "Browse styles" a real product
336337

337-
**Status:** **in progress.**
338+
**Status:** done.
338339

339340
**What you are making:** skins the user can switch in Site Editor → Styles.
340341
Not a second palette with different slug names.
@@ -399,7 +400,7 @@ Then work the **Phase 2** list in the acceptance check.
399400

400401
## Phase 3 is for designing the header and footer
401402

402-
**Status:** later (after Phase 2).
403+
**Status:** **in progress.**
403404

404405
**What you are making:** header and footer that look designed on a blank install, and that are safe (no broken menu IDs).
405406
The intended structure is: markup lives in a **pattern** file, and `parts/*.html` only includes that pattern.

‎e2e/readme.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ opens the editor. Do not listen for console `Block validation` messages.
6464

6565
| Spec | Assertions (shipped now) |
6666
| --- | --- |
67-
| `e2e/tests/standalone-activate.spec.ts` | Theme activates from a default theme; admin Themes screen has no PHP error; front page shows header (site title) + footer; no `stackable/` markup; 404 template renders. |
67+
| `e2e/tests/standalone-activate.spec.ts` | Theme activates from a default theme; the front shows the pattern-backed header, navigation, footer, and user-site copyright; WordPress registers all five shell patterns; Site Editor shows no recovery UI; no `stackable/` markup; 404 template renders. |
68+
| `e2e/tests/tokens-and-variations.spec.ts` | WordPress discovers the Default token contract, all color variations keep the same palette slugs, Dark recolors the shell and content, and both typography presets change visible front-end type. |
6869

6970
Deferred until those surfaces ship (see [`docs/prd/start-stackable.agents.md`](../docs/prd/start-stackable.agents.md#e2e-create-these)):
7071

71-
- Navigation without stale `ref`
72-
- `tokens-and-variations.spec.ts`
7372
- `blog.spec.ts` (`home.html`, `search.html`, post card completeness)
7473
- `canvases.spec.ts` (`full-width` / `blank` contract)
7574
- `header-flags.spec.ts`

‎parts/footer-landing.html‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
<!-- wp:group {"metadata":{"name":"Footer landing"},"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|x-large","bottom":"var:preset|spacing|x-large","left":"var:preset|spacing|xx-large","right":"var:preset|spacing|xx-large"}}},"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
2-
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--x-large);padding-right:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--x-large);padding-left:var(--wp--preset--spacing--xx-large)"><!-- wp:site-title {"level":0} /-->
3-
4-
<!-- wp:paragraph {"fontSize":"small"} -->
5-
<p class="has-small-font-size">Designed with <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
6-
<!-- /wp:paragraph --></div>
7-
<!-- /wp:group -->
1+
<!-- wp:pattern {"slug":"start-stackable/footer-landing"} /-->

‎parts/footer.html‎

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1 @@
1-
<!-- wp:group {"metadata":{"name":"Footer"},"style":{"spacing":{"margin":{"top":"var:preset|spacing|x-large","bottom":"var:preset|spacing|x-large"},"padding":{"top":"var:preset|spacing|xx-large","bottom":"var:preset|spacing|xx-large","left":"var:preset|spacing|xx-large","right":"var:preset|spacing|xx-large"}}},"layout":{"type":"constrained"}} -->
2-
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--x-large);margin-bottom:var(--wp--preset--spacing--x-large);padding-top:var(--wp--preset--spacing--xx-large);padding-right:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--xx-large);padding-left:var(--wp--preset--spacing--xx-large)"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
3-
<div class="wp-block-group alignwide"><!-- wp:columns -->
4-
<div class="wp-block-columns"><!-- wp:column {"width":"50%","style":{"spacing":{"blockGap":"var:preset|spacing|large"}},"layout":{"type":"default"}} -->
5-
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:site-title {"level":3} /-->
6-
7-
<!-- wp:site-tagline /-->
8-
9-
<!-- wp:social-links {"iconColor":"base","iconBackgroundColor":"contrast","className":"is-style-default","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|small","left":"var:preset|spacing|small"}}},"layout":{"type":"flex","justifyContent":"left"}} -->
10-
<ul class="wp-block-social-links has-icon-color has-icon-background-color is-style-default"><!-- wp:social-link {"url":"#","service":"twitter"} /-->
11-
12-
<!-- wp:social-link {"url":"#","service":"instagram"} /-->
13-
14-
<!-- wp:social-link {"url":"#","service":"linkedin"} /-->
15-
16-
<!-- wp:social-link {"url":"#","service":"facebook"} /--></ul>
17-
<!-- /wp:social-links --></div>
18-
<!-- /wp:column -->
19-
20-
<!-- wp:column {"width":"50%"} -->
21-
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:columns -->
22-
<div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
23-
<div class="wp-block-column" style="flex-basis:100%"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|large"}},"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"right"}} -->
24-
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"right":"0","left":"0"}}},"layout":{"type":"constrained"}} -->
25-
<div class="wp-block-group" style="padding-right:0;padding-left:0"><!-- wp:heading {"level":3,"style":{"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"medium"} -->
26-
<h3 class="wp-block-heading has-medium-font-size" style="font-style:normal;font-weight:700">Resources</h3>
27-
<!-- /wp:heading -->
28-
29-
<!-- wp:navigation {"overlayMenu":"never","style":{"spacing":{"blockGap":"var:preset|spacing|medium"}},"fontSize":"medium","layout":{"type":"flex","orientation":"vertical"},"ariaLabel":"Stories"} /--></div>
30-
<!-- /wp:group -->
31-
32-
<!-- wp:group {"style":{"spacing":{"padding":{"right":"0","left":"0"}}},"layout":{"type":"constrained"}} -->
33-
<div class="wp-block-group" style="padding-right:0;padding-left:0"><!-- wp:heading {"level":3,"style":{"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"medium"} -->
34-
<h3 class="wp-block-heading has-medium-font-size" style="font-style:normal;font-weight:700">About</h3>
35-
<!-- /wp:heading -->
36-
37-
<!-- wp:navigation {"overlayMenu":"never","style":{"spacing":{"blockGap":"var:preset|spacing|medium"}},"fontSize":"medium","layout":{"type":"flex","orientation":"vertical"},"ariaLabel":"Featured"} /--></div>
38-
<!-- /wp:group --></div>
39-
<!-- /wp:group --></div>
40-
<!-- /wp:column --></div>
41-
<!-- /wp:columns --></div>
42-
<!-- /wp:column --></div>
43-
<!-- /wp:columns -->
44-
45-
<!-- wp:spacer {"height":"var:preset|spacing|x-large"} -->
46-
<div style="height:var(--wp--preset--spacing--x-large)" aria-hidden="true" class="wp-block-spacer"></div>
47-
<!-- /wp:spacer -->
48-
49-
<!-- wp:group {"align":"full","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
50-
<div class="wp-block-group alignfull"><!-- wp:paragraph {"fontSize":"small"} -->
51-
<p class="has-small-font-size">©</p>
52-
<!-- /wp:paragraph -->
53-
54-
<!-- wp:paragraph {"fontSize":"small"} -->
55-
<p class="has-small-font-size">
56-
Designed with <a href="https://wordpress.org" rel="nofollow">WordPress</a> </p>
57-
<!-- /wp:paragraph --></div>
58-
<!-- /wp:group --></div>
59-
<!-- /wp:group --></div>
60-
<!-- /wp:group -->
1+
<!-- wp:pattern {"slug":"start-stackable/footer"} /-->

‎parts/header-minimal.html‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
<!-- wp:group {"metadata":{"name":"Header minimal"},"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|small","bottom":"var:preset|spacing|small","left":"var:preset|spacing|xx-large","right":"var:preset|spacing|xx-large"}}},"layout":{"type":"default"}} -->
2-
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--small);padding-right:var(--wp--preset--spacing--xx-large);padding-bottom:var(--wp--preset--spacing--small);padding-left:var(--wp--preset--spacing--xx-large)"><!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
3-
<div class="wp-block-group"><!-- wp:site-title {"level":0} /-->
4-
5-
<!-- wp:navigation {"overlayMenu":"mobile","layout":{"type":"flex","justifyContent":"right"}} /--></div>
6-
<!-- /wp:group --></div>
7-
<!-- /wp:group -->
1+
<!-- wp:pattern {"slug":"start-stackable/header-minimal"} /-->

0 commit comments

Comments
 (0)