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.mdsource 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).
| Field | Type | Rules |
|---|---|---|
| string | Non-empty, path-safe (no , , ). |
| string | Non-empty trimmed narrative: enforced SoCal $5M+ custom-home line plus research + context. |
| string[] | At least one non-empty string; fixed roles for this segment: Owner, Principal Builder, Project Director. |
| string[] | At least one non-empty string; high-end custom-builder focus—lead quality, long cycles, brand mismatch. |
| string[] | At least one non-empty string; permit/jurisdiction activity, pipeline gaps, growth-phase pressure. |
| string[] | At least one non-empty string; tract/production builders and low-budget remodelers outside the $5M custom profile. |
Execution flow
- Runner — Validate
, loadclient_id
(fail closed if missing or invalid JSON), build ICP payload, eval → if fail, refine once (refine may use internalresearch.json
) → re-eval → strip internal keys → write only_research_snapshot
.icp.json - Eval — Structural validation; pass/fail only (orchestration envelope passthrough same as research).
- Refine — On fail, fill missing fields from research snapshot or deterministic defaults; must pass eval after refine.
Rules
- No external APIs.
- No randomness; no
; stable ordering and string building only.Math.random() - Fail closed on bad input, missing research, failed validation after refine, path escape, or I/O errors.