Brandedflow icp

<!-- LOCKED — deterministic module v1 -->

install
source · Clone the upstream repo
git clone https://github.com/JenCW/brandedflow
manifest: business-os/sales/research/icp/skill.md
source content
<!-- LOCKED — deterministic module v1 -->

Skill: ICP

Purpose

Derive a deterministic ideal customer profile (ICP) JSON from existing client research for custom home builders targeting $5,000,000+ projects, custom homes, in Southern California. No live APIs; same

client_id
and same
research.json
always produce the same
icp.json
. Segment rules (
build_value_min
,
project_type
,
location
) are fixed constants in the runner/refine layer; eval continues to validate only the original required fields.

Task

Input (runner):

{ client_id }
— optional
projectRoot
(defaults to repo root).

Reads (only):

clients/{client_id}/research/research.json

Writes (only):

clients/{client_id}/icp/icp.json

Output schema (deterministic)

Eval still gates the original required fields only. The written JSON also always carries fixed segment metadata: numeric

build_value_min
=
5000000
, string
project_type
=
custom homes
, and string
location
=
Southern California
(enforced in runner/refine, not duplicated in eval rules).

FieldTypeRules
client_id
stringNon-empty, path-safe (no
/
,
\\
,
..
).
target_company_profile
stringNon-empty trimmed narrative: enforced SoCal $5M+ custom-home line plus research
company
+
services
context.
decision_makers
string[]At least one non-empty string; fixed roles for this segment: Owner, Principal Builder, Project Director.
pain_points
string[]At least one non-empty string; high-end custom-builder focus—lead quality, long cycles, brand mismatch.
buying_triggers
string[]At least one non-empty string; permit/jurisdiction activity, pipeline gaps, growth-phase pressure.
disqualifiers
string[]At least one non-empty string; tract/production builders and low-budget remodelers outside the $5M custom profile.

Execution flow

  1. Runner — Validate
    client_id
    , load
    research.json
    (fail closed if missing or invalid JSON), build ICP payload, eval → if fail, refine once (refine may use internal
    _research_snapshot
    ) → re-eval → strip internal keys → write only
    icp.json
    .
  2. Eval — Structural validation; pass/fail only (orchestration envelope passthrough same as research).
  3. Refine — On fail, fill missing fields from research snapshot or deterministic defaults; must pass eval after refine.

Rules

  • No external APIs.
  • No randomness; no
    Math.random()
    ; stable ordering and string building only.
  • Fail closed on bad input, missing research, failed validation after refine, path escape, or I/O errors.