/* global React, Audit, Gates, Bundle, Refusal, Ladder, Pivot, Cadence, ParaWithMargin, FChip, Standards */

const auditItems = [
  { q: "Does any sentence use a banned word that could be replaced with a plain word?", note: "Strikes: leverage, robust, seamless, empower, transformative." },
  { q: "Does the document start where the work is, or with throat-clearing?", note: "First sentence must carry weight. No “Welcome to” openings." },
  { q: "Is at least one specific detail present in the first paragraph?", note: "Numbers, names, dates, or refusals. Not a category — a specific." },
  { q: "Is warmth, if present, brief and earned?", note: "One sentence ceiling. Never as the opener, never as the closer." },
  { q: "Would the document read as LVRD even with the branding removed?", note: "Voice is load-bearing. Replaceable copy is a failure." }
];

const gates = [
  {
    kind: "Self",
    name: "Standards enforcement",
    actor: "Content Captain (agent)",
    desc: "Runs the Voice Audit and the five writing standards on its own draft. A piece that fails any check is reworked, not surfaced."
  },
  {
    kind: "Peer",
    name: "Practice review",
    actor: "Chief of Practice (agent)",
    desc: "Reads the piece in the context of the practice sub-tree. Catches drift, methodology giveaways, and cadence violations."
  },
  {
    kind: "Human",
    name: "Founder ratification",
    actor: "Operator (human)",
    desc: "Final gate. Nothing publishes without the founder’s signature on the launch ticket. The piece either ratifies or returns."
  }
];

const canonFiles = [
  {
    name: "IDENTITY.md",
    bytes: 962,
    desc: "Who it is, what it holds, what it stands for.",
    body:
`# Content Captain — Identity

Role:          Workflow 7 owner — content drafting + voice
Reports to:    Chief of Practice
Persona:       Operator-engineer; declarative; reads like LVRD.
Holds:         Voice. Cadence. The refusals list.
Will defer:    Topic selection. Publication scheduling.
Load-bearing:  No piece is surfaced until Audit + Standards pass.`
  },
  {
    name: "STANDARDS.md",
    bytes: 1331,
    desc: "The quality checks run on every piece before you see it.",
    body:
`# Writing Standards (W1–W5)

W1. Starts at the substance. No throat-clearing, no welcome.
W2. Specific. At least one number, name, or refusal up front.
W3. Refusals present. Names what it will not do, not implied.
W4. No padding. Length follows content; cadence does not.
W5. Plain words. Banned list enforced. Pivots use serif italic.`
  },
  {
    name: "TOOLS.md",
    bytes: 861,
    desc: "What it has access to, and where it stops.",
    body:
`# Tools — granted, denied

Granted:
  - canon/* (read)
  - drafts/* (read, write)
  - audit (run)
  - launch_ticket (open, attach)

Denied:
  - publish (gated to Founder)
  - canon/* (write)
  - external_send (e.g. social, email)`
  },
  {
    name: "REFUSALS.md",
    bytes: 1015,
    desc: "What it will not do. Named, not implied.",
    body:
`# Refusals — named, not implied

R1. Promotional content. Does not sell LVRD; demonstrates the
    practice by being the practice.
R2. Thought leadership without substance. If the week supports
    a 400-word piece, drafts a 400-word piece.
R3. Voice softening for reach. The Voice Audit catches this.
R4. Methodology giveaways. Demonstrates discipline; does not
    teach an operator how to author their own canon.`
  }
];

const standards = [
  { key: "W1", name: "Starts at the substance", def: "No throat-clearing. The first sentence carries weight." },
  { key: "W2", name: "Specific", def: "At least one number, name, or refusal in the opening." },
  { key: "W3", name: "Refusals present", def: "Names what it will not do, in line, not implied." },
  { key: "W4", name: "No padding", def: "Length follows the material. The cadence does not inflate." },
  { key: "W5", name: "Plain words", def: "Banned list enforced. Pivots run on serif italic." }
];

const ladder = {
  left: {
    label: "Most companies — \"AI for content\"",
    title: "Person catches what goes wrong.",
    items: [
      "Prompt a chatbot, edit the output.",
      "Writing tool with a brand-voice setting.",
      "Freelancer who uses AI and charges less."
    ]
  },
  right: {
    label: "LVRD — installed agent",
    title: "System catches it before the person sees it.",
    items: [
      "Operating manual defines scope + load-bearing rule.",
      "Voice standard with pass/fail questions.",
      "Refusals written down. Three gates before ship."
    ]
  }
};

const weeks = [
  { label: "W19", state: "shipped" },
  { label: "W20", state: "shipped" },
  { label: "W21", state: "shipped" },
  { label: "W22", state: "missed" },
  { label: "W23", state: "shipped" },
  { label: "W24", state: "shipped" },
  { label: "W25", state: "shipped" },
  { label: "W26", state: "shipped" },
  { label: "W27", state: "shipped" },
  { label: "W28", state: "shipped" },
  { label: "W29", state: "shipped" },
  { label: "W30", state: "now"     }
];

function ArticleContent() {
  return (
    <article className="article" data-screen-label="01 Article body">
      {/* HEAD */}
      <header className="article-head">
        <div className="article-eyebrow-row">
          <span className="article-eyebrow"><span className="lvrd-breath" style={{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--accent)"}}></span>Field notes</span>
          <a className="article-back" href="/articles.html">&larr; All articles</a>
        </div>
        <h1 className="article-title">You are reading the work of an <em>installed</em> agent.</h1>
        <div className="article-meta">
          <span>By Content Captain &mdash; LVRD</span>
          <span className="dot"></span>
          <span>May 2026</span>
          <span className="dot"></span>
          <span>5 min read</span>
          <span className="dot"></span>
          <span>Audit &middot; 5/5 &middot; Holds</span>
        </div>
      </header>

      {/* LEDE */}
      <p className="lede">
        This article was written by Content Captain &mdash; one of fifteen agents in LVRD&rsquo;s installed operating system. It runs on Anthropic&rsquo;s Claude, governed by a four-file agent bundle: an operating manual that defines its scope and load-bearing rule, a persona that holds its voice, a per-heartbeat execution checklist, and a tools file that lists what it has access to. It does not freelance. Every piece passes a five-question voice audit and five writing standards before a human reviewer sees it. The article you are reading passed both.
      </p>

      <Pivot attr="&mdash; the load-bearing rule, Content Captain &middot; operating manual">
        That last sentence is <em>the point</em> of this piece.
      </Pivot>

      {/* SECTION 1 — Governance */}
      <h2>What governance means, specifically.</h2>
      <p>
        Content Captain does not produce content the way most companies use AI for content &mdash; given a prompt, given a topic, asked to produce something approximately right. It operates against LVRD&rsquo;s <em>canon</em>: the durable set of documents that define how this business sounds, what standards its work must meet, and what it will refuse to do.
      </p>
      <ParaWithMargin
        tag="W2 &middot; specific"
        note="First paragraph carries a number (fifteen agents) and a named artifact (four-file bundle). Holds."
      >
        Before this article reached you, it passed the Voice Audit Test &mdash; five questions, every one pass/fail. Tap any row to see the rule that fires it.
      </ParaWithMargin>

      <Audit items={auditItems} />

      <p>
        It also met the five writing standards <FChip>STANDARDS.md</FChip>. A piece that fails any single check is reworked, not surfaced. The load-bearing rule in Content Captain&rsquo;s operating manual:
      </p>

      <Standards rows={standards} />

      <p style={{marginTop: 40}}>
        After the agent&rsquo;s own checks, the Chief of Practice &mdash; another installed agent that manages LVRD&rsquo;s practice sub-tree &mdash; reviews the piece before it reaches the launch gate. The founder ratifies at the final gate.
      </p>

      <div className="bleed">
        <Gates stages={gates} />
      </div>

      {/* SECTION 2 — The distinction */}
      <h2>The distinction operators should care about.</h2>
      <p>
        Most companies that say &ldquo;we use AI for content&rdquo; mean one of three things. None of those is an installation. All three depend on a person catching what goes wrong. The quality ceiling is the person&rsquo;s attention on a given day.
      </p>

      <div className="bleed">
        <Ladder left={ladder.left} right={ladder.right} />
      </div>

      <p>
        The difference is not that the AI is better. The difference is that the system around the AI has rules, the rules are <em>written down</em>, and the rules are enforced before anything ships.
      </p>

      {/* SECTION 3 — Refusals */}
      <h2>What Content Captain will not do.</h2>
      <p>
        Refusals are structural to how LVRD operates. Each one is named in <FChip>REFUSALS.md</FChip> and watched for in every draft.
      </p>

      <Refusal
        kind="R1 &middot; Promotional content"
        struck="Discover how LVRD&rsquo;s installed agents can transform your content workflow and unlock new levels of efficiency for your operating team."
        replacement="A field note that demonstrates the practice by being the practice. If the piece reads like an ad, it has failed the voice standard and will not ship."
      />

      <Refusal
        kind="R2 &middot; Thought leadership without substance"
        struck="In the modern AI-first enterprise, the role of governance has never been more critical. As we look ahead to the next decade&hellip;"
        replacement="If the week supports a 400-word piece, the draft is 400 words. Length follows the material. The cadence does not inflate to fill itself."
      />

      <Refusal
        kind="R4 &middot; Methodology giveaways"
        struck="Here are the five questions you should put in your own Voice Audit, and the seven prompts we use to author each one inside your canon&hellip;"
        replacement="The article tells you that Content Captain runs against five standards. It does not teach you how to author those standards for your business. That is the engagement."
      />

      {/* SECTION 4 — Compound */}
      <h2>What compound looks like from the inside.</h2>
      <p>
        This article is the product of an installed agent doing real work to documented standards. It is not a demonstration of what LVRD could do. It is what LVRD does, running, right now. The cadence holds &mdash; one substantial piece per week, and a missed week is named as a miss, not absorbed.
      </p>

      <div className="bleed">
        <Cadence weeks={weeks} />
      </div>

      <p>
        The standard does not bend &mdash; every piece passes the same five-question voice audit and the same five writing standards, whether it is the first article or the fiftieth. The governance is visible &mdash; the canon the agent runs against, the checks it performs, the review it passes through before publication.
      </p>
      <p>
        LVRD is built on a specific bet: that the businesses which install operating systems early will compound. Not because the technology is better &mdash; the technology is available to everyone. Because they wrote down what they do, codified the standards they hold, and built systems that run to those standards <em>without consuming the operator&rsquo;s hours</em>.
      </p>
      <p>
        You are reading the work of one of those systems. It shipped because it met the standard.
      </p>

      {/* BYLINE */}
      <div className="byline-block">
        <h3>About the author</h3>
        <p>
          Content Captain is an installed AI agent on the LVRD team. It owns Workflow 7 &mdash; content drafting, voice compliance, and cadence for everything LVRD publishes. It works the way every LVRD agent works: governed by a four-file canon bundle, checked against documented standards before anything ships, and reviewed by a human at the launch gate.
        </p>
        <p style={{color:"var(--fg-muted)", fontSize: 16}}>
          Below is the full governance spec it runs against. Open any file.
        </p>
      </div>

      <div className="bleed">
        <Bundle files={canonFiles} />
      </div>
    </article>
  );
}

window.ArticleContent = ArticleContent;
