Skip to main content

Overview

Briefing Pack transforms regime assessments into shareable formats for stakeholder communication. It generates copy-ready leadership briefs, integration payloads for Slack and Notion, and structured metadata for downstream automation. Key outputs:

Slack Blocks

Formatted message blocks for #planning channels

Notion Payloads

Database entries with rich text and metadata

Linear Issues

Auto-tagged issues with regime context

Email Summaries

Plain-text and HTML weekly digests

PDF Reports

Slide-ready constraint summaries

Copy-Ready Briefs

Markdown for leadership updates

Export Formats

Slack

lib/integrationBriefs.ts
export const buildWeeklyMandatePayload = (
  target: IntegrationTarget,
  assessment: RegimeAssessment,
  treasury: TreasuryData,
) => {
  const envelope = buildWeeklyMandateEnvelope(assessment, treasury);

  if (target === "slack") {
    return {
      channel: "#planning",
      text: `${envelope.title}\n${envelope.summary}`,
      blocks: [
        { type: "header", text: { type: "plain_text", text: envelope.title } },
        { type: "section", text: { type: "mrkdwn", text: envelope.summary } },
        {
          type: "section",
          text: { type: "mrkdwn", text: envelope.constraints.map((item) => `• ${item}`).join("\n") },
        },
      ],
      metadata: envelope,
    };
  }
  // ...
};
{
  "channel": "#planning",
  "text": "Whether weekly mandate — 2024-03-15\nDEFENSIVE: Tightness 72/100, Risk appetite 52/100.",
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "Whether weekly mandate — 2024-03-15"
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "DEFENSIVE: Tightness 72/100, Risk appetite 52/100."
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "• Focus on margin expansion and retention.\n• Cut low-leverage experiments.\n• Convert demand with tighter sales cycles."
      }
    }
  ]
}
Slack blocks use mrkdwn format—supports bold, italic, and bullet lists natively.

Notion

lib/integrationBriefs.ts
if (target === "notion") {
  return {
    parent: { type: "database_id", database_id: "weekly-mandates" },
    properties: {
      Name: { title: [{ text: { content: envelope.title } }] },
      Regime: { select: { name: assessment.regime } },
      Summary: { rich_text: [{ text: { content: envelope.summary } }] },
      RecordDate: { rich_text: [{ text: { content: envelope.recordDate } }] },
    },
    children: envelope.constraints.map((item) => ({
      object: "block",
      type: "bulleted_list_item",
      bulleted_list_item: { rich_text: [{ type: "text", text: { content: item } }] },
    })),
    metadata: envelope,
  };
}
FieldValue
NameWhether weekly mandate — 2024-03-15
RegimeDEFENSIVE
SummaryDEFENSIVE: Tightness 72/100, Risk appetite 52/100.
RecordDate2024-03-15
Children• Focus on margin expansion and retention. • Cut low-leverage experiments. • Convert demand with tighter sales cycles.
Notion payloads use the Notion API schema. The metadata field preserves full regime context for downstream queries.

Linear

lib/integrationBriefs.ts
return {
  title: envelope.title,
  description: envelope.markdown,
  labels: ["whether", assessment.regime.toLowerCase()],
  metadata: envelope,
};
## Whether weekly mandate — 2024-03-15
DEFENSIVE: Tightness 72/100, Risk appetite 52/100.

### Constraints
- Focus on margin expansion and retention.
- Cut low-leverage experiments.
- Convert demand with tighter sales cycles.

Source: https://fiscaldata.treasury.gov/datasets/...
Linear labels enable filtering roadmap issues by regime—useful for retrospective analysis of decision timing.

Weekly Mandate Envelope

All export formats derive from a shared envelope:
lib/integrationBriefs.ts
export type WeeklyMandateEnvelope = {
  title: string;                          // "Whether weekly mandate — YYYY-MM-DD"
  summary: string;                        // "REGIME: Tightness X/100, Risk appetite Y/100."
  recordDate: string;                     // ISO date (YYYY-MM-DD)
  regime: RegimeAssessment["regime"];     // SCARCITY | DEFENSIVE | VOLATILE | EXPANSION
  markdown: string;                       // Full markdown representation
  constraints: string[];                  // Top 3 operational constraints
};

export const buildWeeklyMandateEnvelope = (
  assessment: RegimeAssessment,
  treasury: TreasuryData,
): WeeklyMandateEnvelope => {
  const title = `Whether weekly mandate — ${treasury.record_date}`;
  const summary = `${assessment.regime}: Tightness ${assessment.scores.tightness}/100, Risk appetite ${assessment.scores.riskAppetite}/100.`;
  const constraints = assessment.constraints.slice(0, 3);

  return {
    title,
    summary,
    recordDate: treasury.record_date,
    regime: assessment.regime,
    constraints,
    markdown: [
      `## ${title}`,
      summary,
      "",
      "### Constraints",
      ...constraints.map((item) => `- ${item}`),
      "",
      `Source: ${treasury.source}`,
    ].join("\n"),
  };
};
{
  title: "Whether weekly mandate — 2024-03-15",
  summary: "DEFENSIVE: Tightness 72/100, Risk appetite 52/100.",
  recordDate: "2024-03-15",
  regime: "DEFENSIVE",
  constraints: [
    "Focus on margin expansion and retention.",
    "Cut low-leverage experiments.",
    "Convert demand with tighter sales cycles."
  ],
  markdown: "## Whether weekly mandate — 2024-03-15\nDEFENSIVE: Tightness 72/100, Risk appetite 52/100.\n\n### Constraints\n- Focus on margin expansion and retention.\n- Cut low-leverage experiments.\n- Convert demand with tighter sales cycles.\n\nSource: https://fiscaldata.treasury.gov/datasets/..."
}
The envelope’s markdown field is copy-ready: paste directly into PRDs, Monday planning docs, or all-hands slide decks.

Integration Targets

lib/integrationBriefs.ts
export type IntegrationTarget = "slack" | "notion" | "linear";

export const integrationTargets: IntegrationTarget[] = ["slack", "notion", "linear"];

export const parseIntegrationTarget = (value: string | null): IntegrationTarget | null => {
  if (!value) {
    return null;
  }
  return integrationTargets.find((target) => target === value) ?? null;
};
Best for: Async team updates in #planning or #leadership channels
  • Rendered as message blocks with header + constraints
  • Supports threading for discussion
  • Metadata preserved for bot commands

Slide-Ready Summaries

Briefing Pack outputs are optimized for executive presentations:
1

Generate envelope

Call buildWeeklyMandateEnvelope(assessment, treasury)
2

Copy markdown

Extract envelope.markdown field
3

Paste into slides

Use Google Slides, Keynote, or PowerPoint markdown import
4

Add visuals (optional)

Supplement with regime trend charts from Time Machine
┌────────────────────────────────────────────┐
│ WHETHER WEEKLY MANDATE — 2024-03-15        │
├────────────────────────────────────────────┤
│ DEFENSIVE: Tightness 72/100,               │
│ Risk appetite 52/100.                      │
│                                            │
│ CONSTRAINTS                                │
│ • Focus on margin expansion and retention. │
│ • Cut low-leverage experiments.            │
│ • Convert demand with tighter sales cycles.│
│                                            │
│ Source: US Treasury Fiscal Data API        │
└────────────────────────────────────────────┘
Leadership decks demand concise, jargon-free summaries. Briefing Pack constraints are pre-filtered to the top 3 most actionable items.

Citations and Timestamps

Every export includes:
  1. Record date: The Treasury data snapshot date (e.g., 2024-03-15)
  2. Source URL: Direct link to US Treasury Fiscal Data API
  3. Fetched timestamp: When Whether last pulled data
lib/regimeEngine.ts
export interface RegimeInput {
  id: "base-rate" | "two-year" | "ten-year" | "curve-slope";
  label: string;
  value: number | null;
  unit: string;
  sourceLabel: string;                    // "US Treasury Fiscal Data API"
  sourceUrl: string;                      // Full API URL
  recordDate: string;                     // ISO date of Treasury snapshot
  fetchedAt: string;                      // ISO timestamp of Whether fetch
  derivedFrom?: string;                   // For calculated metrics
  notes?: string;                         // Data quality warnings
}
{
  sourceLabel: "US Treasury Fiscal Data API",
  sourceUrl: "https://fiscaldata.treasury.gov/datasets/average-interest-rates-treasury-securities/average-interest-rates-treasury-securities",
  recordDate: "2024-03-15",
  fetchedAt: "2024-03-16T08:12:34Z"
}
Always include citations in exported briefs. This ensures stakeholders can verify source data and understand staleness.

Copy-Ready Leadership Briefs

Briefing Pack markdown is designed for zero-edit copy-paste:
import { buildWeeklyMandateEnvelope } from "@/lib/integrationBriefs";

const assessment = evaluateRegime(treasury);
const envelope = buildWeeklyMandateEnvelope(assessment, treasury);

// Copy to clipboard (browser)
navigator.clipboard.writeText(envelope.markdown);

// Or log for terminal copy
console.log(envelope.markdown);
## Whether weekly mandate — 2024-03-15
DEFENSIVE: Tightness 72/100, Risk appetite 52/100.

### Constraints
- Focus on margin expansion and retention.
- Cut low-leverage experiments.
- Convert demand with tighter sales cycles.

Source: https://fiscaldata.treasury.gov/datasets/average-interest-rates-treasury-securities/average-interest-rates-treasury-securities
Add a “Copy Brief” button to your UI that calls navigator.clipboard.writeText(envelope.markdown). Users love one-click workflows.

Usage Example

import { evaluateRegime } from "@/lib/regimeEngine";
import { buildWeeklyMandatePayload, buildWeeklyMandateEnvelope } from "@/lib/integrationBriefs";
import type { IntegrationTarget } from "@/lib/integrationBriefs";

// Fetch current regime
const treasury = await fetchTreasuryYields();
const assessment = evaluateRegime(treasury);

// Generate Slack payload
const slackPayload = buildWeeklyMandatePayload("slack", assessment, treasury);
await postToSlack(slackPayload);

// Generate Notion entry
const notionPayload = buildWeeklyMandatePayload("notion", assessment, treasury);
await createNotionPage(notionPayload);

// Generate Linear issue
const linearPayload = buildWeeklyMandatePayload("linear", assessment, treasury);
await createLinearIssue(linearPayload);

// Generate copy-ready markdown
const envelope = buildWeeklyMandateEnvelope(assessment, treasury);
console.log(envelope.markdown);

// Copy to clipboard for slide deck
navigator.clipboard.writeText(envelope.markdown);
1

Generate assessment

Run evaluateRegime(treasury) to get current regime state
2

Choose target(s)

Select one or more integration targets: Slack, Notion, Linear
3

Build payload(s)

Call buildWeeklyMandatePayload(target, assessment, treasury) for each
4

Deliver

Post payloads to respective APIs or copy markdown to clipboard

Export Automation

Briefing Pack is designed for cron-based automation:
// Weekly Monday morning digest
cron.schedule("0 8 * * 1", async () => {  // 8am every Monday
  const treasury = await fetchTreasuryYields();
  const assessment = evaluateRegime(treasury);
  
  // Post to Slack #planning
  const slackPayload = buildWeeklyMandatePayload("slack", assessment, treasury);
  await postToSlack(slackPayload);
  
  // Update Notion database
  const notionPayload = buildWeeklyMandatePayload("notion", assessment, treasury);
  await createNotionPage(notionPayload);
  
  console.log(`Weekly mandate delivered: ${assessment.regime}`);
});
Combine Briefing Pack with Signal Ops alerts for event-driven updates: send briefs only when regimes change.

PDF Report Generation

(Implementation example using jspdf or similar)
import { jsPDF } from "jspdf";
import { buildWeeklyMandateEnvelope } from "@/lib/integrationBriefs";

const generatePDF = (assessment: RegimeAssessment, treasury: TreasuryData) => {
  const envelope = buildWeeklyMandateEnvelope(assessment, treasury);
  const doc = new jsPDF();
  
  doc.setFontSize(18);
  doc.text(envelope.title, 10, 10);
  
  doc.setFontSize(12);
  doc.text(envelope.summary, 10, 20);
  
  doc.setFontSize(14);
  doc.text("Constraints", 10, 35);
  
  envelope.constraints.forEach((constraint, i) => {
    doc.text(`• ${constraint}`, 15, 45 + (i * 10));
  });
  
  doc.setFontSize(10);
  doc.text(`Source: ${treasury.source}`, 10, 85);
  
  return doc.output("blob");
};

// Download PDF
const pdfBlob = generatePDF(assessment, treasury);
const url = URL.createObjectURL(pdfBlob);
const a = document.createElement("a");
a.href = url;
a.download = "whether-weekly-mandate.pdf";
a.click();
PDF generation is optional but useful for offline stakeholder reviews or board packets.

Regime Engine

Understand regime data included in briefs

Decision Shield

Include decision verdicts in stakeholder updates

Signal Ops

Trigger briefs on regime change alerts

Time Machine

Export historical regime comparisons

Build docs developers (and LLMs) love