|
| 1 | +# boosty-cover — implementation plan |
| 2 | + |
| 3 | +> **For agentic workers:** REQUIRED SUB-SKILL: Use |
| 4 | +> superpowers:subagent-driven-development (recommended) or |
| 5 | +> superpowers:executing-plans to implement this plan task-by-task. Steps |
| 6 | +> use checkbox (`- [ ]`) syntax for tracking. |
| 7 | +
|
| 8 | +**Goal:** Add a Boosty profile-cover target to the brand generator that emits an |
| 9 | +8:1 1920×240 green-colorway header banner — the MODERN/PYTHON lockup centered on |
| 10 | +a green field, no tagline — as SVG + PNG in `brand/org/`. |
| 11 | + |
| 12 | +**Spec:** [`design.md`](./design.md) |
| 13 | + |
| 14 | +**Branch:** `boosty-profile-cover` |
| 15 | + |
| 16 | +**Commit strategy:** Per-task commits. |
| 17 | + |
| 18 | +## Global Constraints |
| 19 | + |
| 20 | +- Green colorway only: `bg = #2f5e4a` (`tokens.GREEN_SURFACE`), `struct = #f4f1e8` |
| 21 | + (`tokens.CREAM`), `gold = #f0b528` (`tokens.GOLD_DARK`). No other colors. |
| 22 | +- Cover SVG viewBox is exactly `0 0 1920 240` (8:1, Boosty's header slot); the |
| 23 | + lockup is `scale(1.1)`, centered — its box center (270, 125) placed on the |
| 24 | + banner center (960, 120), i.e. `translate(663.0,-17.5)`. No tagline. |
| 25 | +- PNG size: `width=1920, height=240`. |
| 26 | +- All imports at module level; annotate all function arguments; `ty: ignore` |
| 27 | + never `type: ignore`. |
| 28 | +- Brand casing in prose: `modern-python`, `modern-di`. Tagline has no trailing |
| 29 | + period. |
| 30 | +- Generated SVG **and** PNG under `brand/org/` are committed. |
| 31 | +- No dependency changes, so `uv.lock` must not change (leave it alone). |
| 32 | +- Commit only on the `boosty-profile-cover` branch, never `main`. End commit |
| 33 | + messages with the `Co-Authored-By: Claude Opus 4.8 (1M context) |
| 34 | + <noreply@anthropic.com>` trailer. Do not mention Claude Code in the body. |
| 35 | +- Run `just check-planning` and `just test` before pushing. Finish via PR. |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +### Task 1: Cover geometry (`geometry.boosty_cover`) |
| 40 | + |
| 41 | +**Files:** |
| 42 | +- Modify: `brand/build/geometry.py` (add function after `social_square()`) |
| 43 | +- Test: `tests/test_geometry.py` (add one test) |
| 44 | + |
| 45 | +- [ ] **Step 1: Write the failing test** in `tests/test_geometry.py`: |
| 46 | + |
| 47 | +```python |
| 48 | +def test_boosty_cover(parse_svg): |
| 49 | + svg = g.boosty_cover(bg="#2f5e4a", struct="#f4f1e8", gold="#f0b528") |
| 50 | + el = parse_svg(svg) |
| 51 | + assert el.attrib["viewBox"] == "0 0 1920 240" # 8:1 Boosty header |
| 52 | + assert 'fill="#2f5e4a"' in svg # full-bleed green bg |
| 53 | + assert 'width="1920" height="240"' in svg # full-bleed rect |
| 54 | + assert "translate(663.0,-17.5) scale(1.1)" in svg # lockup centered on x=960 |
| 55 | + assert "M138 122 L138 50 L210 50" in svg # carries the lockup crops |
| 56 | + assert "<text" not in svg # no live text (and no tagline) |
| 57 | + assert "#f4f1e8" in svg and "#f0b528" in svg |
| 58 | + assert "var(" not in svg |
| 59 | + # minimal: just the lockup, so the same glyph-path count as a bare wordmark |
| 60 | + assert svg.count("<path") == g.wordmark(struct="#f4f1e8", gold="#f0b528").count("<path") |
| 61 | +``` |
| 62 | + |
| 63 | +- [ ] **Step 2: Run test, verify it fails** — |
| 64 | + `uv run pytest tests/test_geometry.py::test_boosty_cover -v` |
| 65 | + Expected: `AttributeError: ... has no attribute 'boosty_cover'`. |
| 66 | + |
| 67 | +- [ ] **Step 3: Implement** `boosty_cover` in `brand/build/geometry.py` per the |
| 68 | + spec's §1 code block. |
| 69 | + |
| 70 | +- [ ] **Step 4: Run test, verify it passes.** |
| 71 | + |
| 72 | +- [ ] **Step 5: Commit** |
| 73 | + |
| 74 | +```bash |
| 75 | +git add brand/build/geometry.py tests/test_geometry.py |
| 76 | +git commit -m "feat(brand): boosty_cover wide banner geometry" |
| 77 | +``` |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +### Task 2: Render target + regenerate assets |
| 82 | + |
| 83 | +**Files:** |
| 84 | +- Modify: `brand/build/render.py` (write SVG + export PNG after the green card) |
| 85 | +- Test: `tests/test_assets.py` (add a boosty-cover render test) |
| 86 | + |
| 87 | +- [ ] **Step 1: Write the failing test** in `tests/test_assets.py`: |
| 88 | + |
| 89 | +```python |
| 90 | +def test_render_writes_boosty_cover(): |
| 91 | + _render() |
| 92 | + cover = ORG / "boosty-cover.svg" |
| 93 | + assert cover.exists() |
| 94 | + ET.parse(cover) |
| 95 | + text = cover.read_text() |
| 96 | + assert 'viewBox="0 0 1920 240"' in text |
| 97 | + assert 'fill="#2f5e4a"' in text and "#f4f1e8" in text and "#f0b528" in text |
| 98 | + assert "<text" not in text and "var(" not in text |
| 99 | + if shutil.which("rsvg-convert"): |
| 100 | + assert (ORG / "boosty-cover.png").read_bytes()[:8] == b"\x89PNG\r\n\x1a\n" |
| 101 | +``` |
| 102 | + |
| 103 | +- [ ] **Step 2: Run test, verify it fails** — |
| 104 | + `uv run pytest tests/test_assets.py::test_render_writes_boosty_cover -v` |
| 105 | + Expected: `assert cover.exists()` is False. |
| 106 | + |
| 107 | +- [ ] **Step 3: Wire render.py.** After the `social-card-green` block in |
| 108 | + `render()`, add: |
| 109 | + |
| 110 | +```python |
| 111 | + # Boosty profile cover (green colorway) — brand/org/boosty-cover.* |
| 112 | + _write( |
| 113 | + ORG / "boosty-cover.svg", |
| 114 | + g.boosty_cover(bg=t.GREEN_SURFACE, struct=t.CREAM, gold=t.GOLD_DARK), |
| 115 | + ) |
| 116 | + export_png( |
| 117 | + ORG / "boosty-cover.svg", ORG / "boosty-cover.png", width=1920, height=240 |
| 118 | + ) |
| 119 | +``` |
| 120 | + |
| 121 | +- [ ] **Step 4: Run test, verify it passes.** |
| 122 | + |
| 123 | +- [ ] **Step 5: Regenerate and commit** |
| 124 | + |
| 125 | +```bash |
| 126 | +uv run python -m brand.build.render |
| 127 | +git add brand/build/render.py tests/test_assets.py brand/org/boosty-cover.svg brand/org/boosty-cover.png |
| 128 | +git commit -m "feat(brand): boosty profile cover render target" |
| 129 | +``` |
| 130 | + |
| 131 | + Expected: `git status` shows only the two new `brand/org/boosty-cover.*` files |
| 132 | + plus the edited sources — no other asset churn. |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +### Task 3: Architecture promotion |
| 137 | + |
| 138 | +**Files:** |
| 139 | +- Modify: `architecture/brand-marks.md` (note the Boosty cover under Org marks) |
| 140 | + |
| 141 | +- [ ] **Step 1: Promote the capability** — add to the Org marks description that |
| 142 | + `brand/org/boosty-cover.svg|png` is a 1920×240 (8:1) green-colorway |
| 143 | + profile-header banner for `boosty.to/lesnik512`, generated by |
| 144 | + `geometry.boosty_cover` (centered `lockup_body`, no tagline). |
| 145 | + |
| 146 | +- [ ] **Step 2: Verify** — `just test` (all pass) and `just check-planning` |
| 147 | + (`planning: OK`). |
| 148 | + |
| 149 | +- [ ] **Step 3: Commit** |
| 150 | + |
| 151 | +```bash |
| 152 | +git add architecture/brand-marks.md |
| 153 | +git commit -m "docs(brand): promote boosty cover to architecture" |
| 154 | +``` |
| 155 | + |
| 156 | +--- |
| 157 | + |
| 158 | +## Notes for the executor |
| 159 | + |
| 160 | +- Follow the existing one-function-per-asset pattern; do not restructure |
| 161 | + `geometry.py` or `render.py` beyond the additions above. |
| 162 | +- The cover is **not** added to `just sync-assets` — the site does not serve it. |
| 163 | +- If Boosty's uploader wants a different size, change only the `export_png` |
| 164 | + width/height in `render.py` and re-render. |
| 165 | +- Finish via PR (push `boosty-profile-cover`, open a PR); do not local-merge. |
| 166 | + Watch CI after pushing. |
0 commit comments