feat(marketing): HoM feature-spotlight X drafts + brand-voice charter (v0.18.0 B)

The Head of Marketing now markets features, not just releases: a default-off
x_feature_spotlight loop periodically spawns the HoM to investigate what shipped
(CHANGELOG, feature flags, docs/map, KB) and draft ONE held marketing post via
propose_feature_spotlight, reviewed in the X post queue.

- New x_feature source (distinct from x_post, fixing panel mislabeling) + a
  panel Feature-spotlight branch.
- brand_voice column on company_goals (migration 061, single head) as the
  CEO-editable voice source, surfaced in Settings and injected into the HoM
  briefing; a VOICE GUIDE baseline in head-marketing.md.
- propose_feature_spotlight verb (HoM-only), mirroring propose_roadmap.

Gated by x_feature_spotlight_enabled (default off; flag-off dormancy proven).
Also fixed two real bugs found mid-build: company_goals API schemas dropped
brand_voice on GET/PUT; the live charter UI is goals-tab.tsx, not the unmounted
company-goals-card.tsx. Full suite green (2935); migration single-head verified.
This commit is contained in:
Renn F
2026-07-04 07:34:40 +02:00
parent 1b992df3ad
commit da17c49f2d
44 changed files with 1502 additions and 57 deletions
+39 -1
View File
@@ -55,7 +55,11 @@ async def test_company_goals_none_when_no_row() -> None:
@pytest.mark.asyncio
async def test_company_goals_none_when_empty_charter() -> None:
row = SimpleNamespace(
north_star="", objectives=[], constraints=[], operating_policy={}
north_star="",
objectives=[],
constraints=[],
operating_policy={},
brand_voice="",
)
assert await _repo_with_goals_row(row).company_goals() is None
@@ -67,6 +71,7 @@ async def test_company_goals_compact_dict_when_set() -> None:
objectives=[{"metric": "NPS", "target": 50}],
constraints=["AGPL"],
operating_policy={"autonomy_level": "assisted"},
brand_voice="Confident, dry wit.",
)
goals = await _repo_with_goals_row(row).company_goals()
assert goals == {
@@ -74,9 +79,42 @@ async def test_company_goals_compact_dict_when_set() -> None:
"objectives": [{"metric": "NPS", "target": 50}],
"constraints": ["AGPL"],
"operating_policy": {"autonomy_level": "assisted"},
"brand_voice": "Confident, dry wit.",
}
@pytest.mark.asyncio
async def test_company_goals_none_when_only_brand_voice_unset() -> None:
"""A charter with substantive content but no brand_voice must still
surface — brand_voice is additive, not required."""
row = SimpleNamespace(
north_star="Win the market",
objectives=[],
constraints=[],
operating_policy={},
brand_voice="",
)
goals = await _repo_with_goals_row(row).company_goals()
assert goals is not None
assert goals["brand_voice"] == ""
@pytest.mark.asyncio
async def test_company_goals_surfaces_when_only_brand_voice_set() -> None:
"""The inverse: brand_voice alone (everything else empty) must still
surface — it counts toward the "charter has content" check."""
row = SimpleNamespace(
north_star="",
objectives=[],
constraints=[],
operating_policy={},
brand_voice="Speak as 'we'.",
)
goals = await _repo_with_goals_row(row).company_goals()
assert goals is not None
assert goals["brand_voice"] == "Speak as 'we'."
@pytest.mark.asyncio
async def test_constructor_stores_db_session() -> None:
fake_db = MagicMock()