Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/draft-loom-recording-script.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const script = `# ${metadata.name} Loom Recording Script

## Goal

Record a 2-3 minute cold audit that shows one clear leak and makes the ${config.offerName} feel like the obvious next step.
Record a 2-3 minute cold audit that shows one clear leak and positions the ${config.offerName} as the obvious next step.

## Before Recording

Expand Down
7 changes: 7 additions & 0 deletions scripts/lib/service-artifacts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ const NEITHER_GUARANTEE_CLAUSE_PATTERN = /\bneither [^,:.!?;\n]{1,80}\bnor\b[^,:
const GUARANTEE_NOUN = "(?:guarantees?|promises?|assurances?)"
const GUARANTEE_SCOPE = `(?:${FORBIDDEN_OUTCOME_TERM}|outcomes?)`
const NO_GUARANTEE_CLAUSE_PATTERN = new RegExp(`\\b(?:no\\s+(?:${GUARANTEE_SCOPE}\\s+)?${GUARANTEE_NOUN}|without\\s+(?:any\\s+)?(?:${GUARANTEE_SCOPE}\\s+)?${GUARANTEE_NOUN})\\b(?:\\s+(?:of|for)\\s+${GUARANTEE_SCOPE})?(?:\\s+(?:is|are|was|were)\\s+made)?`, "gi")
// "No revenue, ranking, ROAS, conversion, booked-call, or sales-volume guarantees are made." — comma-separated denial lists with hyphenated scope terms.
const LISTED_GUARANTEE_SCOPE_ITEM = "(?:revenue|rankings?|roas|conversions?|conversion[- ](?:rate|lift)|booked[- ]calls?|sales[- ]volume)"
const LISTED_NO_GUARANTEE_CLAUSE_PATTERN = new RegExp(
`\\b(?:there\\s+are\\s+)?no\\s+${LISTED_GUARANTEE_SCOPE_ITEM}(?:\\s*,\\s*(?:(?:and|or)\\s+)?${LISTED_GUARANTEE_SCOPE_ITEM})*(?:\\s+(?:and|or)\\s+${LISTED_GUARANTEE_SCOPE_ITEM})?\\s+${GUARANTEE_NOUN}\\b(?:\\s+(?:is|are|was|were)\\s+made)?`,
"gi"
)
const NEGATED_OUTCOME_IMPLICATION_PATTERN = new RegExp(
`\\b(?:do(?:es)?|did|will|can|could|would|should|is|are|was|were)\\s+(?:not|never)\\s+(?:imply|mean|represent|constitute|signal|cause|create|deliver|generate|produce|drive|bring|give|yield|increase|improve|raise|grow|boost|lift|affect|alter|change|hurt|reduce|promise|guarantee|assure|ensure|result(?:\\s+${CHANGE_LINK_ADVERB})?\\s+in|lead(?:\\s+${CHANGE_LINK_ADVERB})?\\s+to)\\b(?:(?!\\b${CONTRAST_BOUNDARY}\\b)[^.!?;\\n]){0,80}?\\b${FORBIDDEN_OUTCOME_TERM}\\b(?:\\s+(?:results?|outcomes?|performance))?`,
"gi"
Expand Down Expand Up @@ -281,6 +287,7 @@ function collectGuaranteeRiskFlags(value, name = "agent work output", flags = []
.replace(NEGATED_GUARANTEE_CLAUSE_PATTERN, "")
.replace(NEITHER_GUARANTEE_CLAUSE_PATTERN, "")
.replace(NO_GUARANTEE_CLAUSE_PATTERN, "")
.replace(LISTED_NO_GUARANTEE_CLAUSE_PATTERN, "")
.replace(NEGATED_OUTCOME_IMPLICATION_PATTERN, "")
.replace(NEGATED_CATEGORICAL_OUTCOME_PATTERNS[0], "")
.replace(NEGATED_CATEGORICAL_OUTCOME_PATTERNS[1], "")
Expand Down
12 changes: 8 additions & 4 deletions scripts/test-active-operator-surfaces.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ const privateRuntimeArtifacts = ["daily-money-mission.md", "daily-money-mission.
const retiredTrackedPrivateArtifacts = privateRuntimeArtifacts.map(path => `growth-brain/ops/${path.slice("runs/".length)}`)
const retiredBroadServiceArtifacts = ["full-stack-growth-map.md", "full-stack-growth-map.html", "metrics-dashboard.md", "owned-handoff-loom-cockpit.md", "owned-handoff-loom-cockpit.html", "owned-product-case-studies.md", "owned-product-case-studies.html", "owned-product-live-signals.md", "owned-product-live-signals.html", "owned-product-metrics-update.md", "owned-product-workflow-proofs.md", "owned-product-workflow-proofs.html", "owned-proof-review.md", "owned-proof-review.html", "retention-checkups.md", "retention-dashboard.html", "value-retention-stress-test.md", "weekly-client-value-loop.md"].map(name => `growth-brain/ops/${name}`)

function fixedEnv() {
return {...process.env, NODE_OPTIONS: [process.env.NODE_OPTIONS, `--import=${fixedClockImport}`].filter(Boolean).join(" "), SERVICE_REPO_ROOT: T, SERVICE_TEST_NOW: `${trackedArtifactDate}T12:00:00.000+05:30`, TZ: "Asia/Kolkata"}
}

function run(args) {
return spawnSync(process.execPath, args, {cwd: T, encoding: "utf8", env: {...process.env, NODE_OPTIONS: [process.env.NODE_OPTIONS, `--import=${fixedClockImport}`].filter(Boolean).join(" "), SERVICE_REPO_ROOT: T, SERVICE_TEST_NOW: `${trackedArtifactDate}T12:00:00.000+05:30`, TZ: "Asia/Kolkata"}})
return spawnSync(process.execPath, args, {cwd: T, encoding: "utf8", env: fixedEnv()})
}

function writeJson(path, value) {
Expand Down Expand Up @@ -196,7 +200,7 @@ try {

const DC = join(T, "dashboard-cwd")
mkdirSync(join(DC, "prospects"), {recursive: true})
const rootedProspect = spawnSync(process.execPath, [sp("create-prospect-audit.mjs"), "Rooted Prospect"], {cwd: DC, encoding: "utf8", env: {...process.env, SERVICE_REPO_ROOT: T}})
const rootedProspect = spawnSync(process.execPath, [sp("create-prospect-audit.mjs"), "Rooted Prospect"], {cwd: DC, encoding: "utf8", env: fixedEnv()})
eq(rootedProspect.status, 0, rootedProspect.stderr)
eq(existsSync(join(T, "prospects/rooted-prospect/metadata.json")), true)
eq(existsSync(join(DC, "prospects/rooted-prospect")), false)
Expand All @@ -208,13 +212,13 @@ try {
writeFileSync(join(T, "prospects/loom-links.txt"), "# Service-root proof rows are intentionally empty\n")
const tasksPath = join(T, "TASKS.md")
writeFileSync(tasksPath, readFileSync(tasksPath, "utf8").replace("## Active\n", "## Active\n\n- [ ] Service-root dashboard sentinel\n"))
const DD = spawnSync(process.execPath, [sp("export-internal-dashboard.mjs"), "--output=runs/divergent-dashboard.md", "--html=runs/divergent-dashboard.html"], {cwd: DC, encoding: "utf8", env: {...process.env, SERVICE_REPO_ROOT: T}})
const DD = spawnSync(process.execPath, [sp("export-internal-dashboard.mjs"), "--output=runs/divergent-dashboard.md", "--html=runs/divergent-dashboard.html"], {cwd: DC, encoding: "utf8", env: fixedEnv()})
eq(DD.status, 0, DD.stderr)
eq(JSON.parse(DD.stdout).marketProof.rows, 0)
const DM = readFileSync(join(T, "runs/divergent-dashboard.md"), "utf8")
mat(DM, /Service-root dashboard sentinel/)
dnm(DM, /CWD-only dashboard poison/)
const DCC = spawnSync(process.execPath, [sp("show-growth-command-center.mjs")], {cwd: DC, encoding: "utf8", env: {...process.env, SERVICE_REPO_ROOT: T}})
const DCC = spawnSync(process.execPath, [sp("show-growth-command-center.mjs")], {cwd: DC, encoding: "utf8", env: fixedEnv()})
eq(DCC.status, 0, DCC.stderr)
const DCD = JSON.parse(DCC.stdout)
eq(DCD.counts.prospectsTotal, 1)
Expand Down
1 change: 1 addition & 0 deletions scripts/test-service-engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ try {
"We promise to preserve conversion tracking through deployment.",
"We do not guarantee revenue or promise rankings.",
"Neither revenue nor rankings are guaranteed.",
"No revenue, ranking, ROAS, conversion, booked-call, or sales-volume guarantees are made.",
"We promise to report conversions accurately.",
"This work does not boost conversions.",
"Conversions do not increase because of this work."
Expand Down