Skip to content

bootstrap-styleguide

Scenario for Technical Writer.

No STYLEGUIDE.md; bootstrap drafts one, human approves, workflow continues

Latest run: PASS — 2026-05-10 23:24:59Z

Spec: .abtree/trees/technical-writer/TEST__bootstrap-styleguide.yaml

Report: .abtree/trees/technical-writer/REPORT__bootstrap-styleguide__20260510T232459Z.md


Test spec

yaml
feature: Technical_Writer grounds a docs goal in a styleguide, places it, writes, and review-gates
tree: technical-writer
description: |
  Bootstrap path — no STYLEGUIDE.md at the repo root. Load_Styleguide
  evaluate fails, the Resolve_Styleguide selector falls through to
  Bootstrap_Styleguide. The runner drafts a styleguide, the human
  approves it, it's written to disk, and the rest of the workflow runs
  through the happy path.

background:
  initial:
    local:
      goal: "Write a getting-started guide for a brand-new project that has no documentation yet."

fixtures:
  side_effects:
    styleguide_load:
      exists: false   # forces Load_Styleguide's evaluate to fail
    styleguide_write:
      file_written: STYLEGUIDE.md
      bytes: 612
    human_approval_styleguide:
      approved: true
      latency_ms: 0   # the runner simulates the human signing off immediately
    docs_home_lookup:
      home_exists: true
      placement: docs/getting-started.md
      adjacency: []
      sidebar_entry: { section: Top, position: first }
    docs_write:
      file_written: docs/getting-started.md
      bytes: 2104
    review_outcomes:
      - attempt: 1
        verdict: approved
        notes: approved

scenario:
  name: No STYLEGUIDE.md; bootstrap drafts one, human approves, workflow continues
  given:
    - $LOCAL.goal is set
    - no STYLEGUIDE.md exists at the repo root
    - the runner is authorised to simulate the human approval via fixture
  when:
    - Load_Styleguide evaluate → false (STYLEGUIDE.md does not exist)
    - Draft_Styleguide evaluate → true ($LOCAL.goal is set)
    - Draft_Styleguide writes a minimal styleguide draft to $LOCAL.styleguide
    - Human_Approval_Gate evaluate → true ($LOCAL.styleguide is set)
    - Human_Approval_Gate presents the draft; per fixtures.side_effects.human_approval_styleguide the human approves
    - $LOCAL.styleguide_approved is written to true (fixture-served)
    - Human_Approval_Gate evaluate → true ($LOCAL.styleguide_approved is true)
    - Human_Approval_Gate writes $LOCAL.styleguide to STYLEGUIDE.md (fixture-served write)
    - Assess_Intent / Map_Placement / Write_Documentation / Review_Gate run as in the happy path
  then:
    local:
      styleguide: non-empty
      styleguide_approved: true
      intent: non-empty
      docs_survey: non-empty
      placement: equals fixtures.side_effects.docs_home_lookup.placement
      draft: non-empty
      review_notes: approved
      final_path: equals fixtures.side_effects.docs_home_lookup.placement
    files:
      STYLEGUIDE.md:
        exists: true
        bytes: equals fixtures.side_effects.styleguide_write.bytes
      placement:
        exists: true
        path: equals fixtures.side_effects.docs_write.file_written
    runtime:
      retry_count:
        Write_And_Review: 0
    status: done

Latest report

Tree: technical-writer (v1.2.1) Runner: test-tree (v1.2.0, fixture-driven side effects) Spec: .abtree/trees/technical-writer/TEST__bootstrap-styleguide.yaml Target execution: test-tree-run-getting-started-bootstrap-__technical-writer__1 Overall: PASS

Final $LOCAL

keyvalue
goal"Write a getting-started guide for a brand-new project that has no documentation yet."
styleguide"# Styleguide (drafted by agent)\n…"
styleguide_approvedtrue
intent"type: tutorial; scope: one page; audience: new user."
docs_survey
placement"docs/getting-started.md"
draft"# Getting started\n…" (fixture-served body)
review_notes"approved"
final_path"docs/getting-started.md"

Assertions

NameExpectedActualPass
statusdonedone
local.styleguidenon-emptynon-empty (drafted then approved)
local.styleguide_approvedtruetrue
local.intentnon-emptynon-empty
local.docs_surveynon-emptynon-empty
local.placementequals fixtures.side_effects.docs_home_lookup.placement(fixture) docs/getting-started.md
local.draftnon-emptynon-empty
local.review_notesapprovedapproved
local.final_pathequals fixtures.side_effects.docs_home_lookup.placementdocs/getting-started.md
files.STYLEGUIDE.mdexists, bytes=612(fixture) styleguide_write served — would-write 612 bytes
files.placementexists at fixtures.side_effects.docs_write.file_written(fixture) docs/getting-started.md
runtime.retry_count.Write_And_Review00

Trace highlight: Load_Styleguide is red (fixture rigged it to fail — no STYLEGUIDE.md), Bootstrap_Styleguide is green (drafted + approved + written via fixtures), and Resolve_Styleguide selector resolves green by selecting the second child. Exactly the fall-through behaviour the spec asserts.

Trace

mermaid
---
title: "test-tree run: getting-started bootstrap with no styleguide (complete)"
---
flowchart TD
    Technical_Writer_Workflow{{"Technical Writer Workflow\n[sequence]"}}
    0_Resolve_Styleguide{{"Resolve Styleguide\n[selector]"}}
    Technical_Writer_Workflow --> 0_Resolve_Styleguide
    style 0_Resolve_Styleguide fill:#4ade80,stroke:#16a34a,color:#052e16
    0_0_Load_Styleguide["Load Styleguide\n[action]"]
    0_Resolve_Styleguide --> 0_0_Load_Styleguide
    style 0_0_Load_Styleguide fill:#f87171,stroke:#dc2626,color:#450a0a
    0_0_Bootstrap_Styleguide{{"Bootstrap Styleguide\n[sequence]"}}
    0_Resolve_Styleguide --> 0_0_Bootstrap_Styleguide
    style 0_0_Bootstrap_Styleguide fill:#4ade80,stroke:#16a34a,color:#052e16
    0_0_1_Draft_Styleguide["Draft Styleguide\n[action]"]
    0_0_Bootstrap_Styleguide --> 0_0_1_Draft_Styleguide
    style 0_0_1_Draft_Styleguide fill:#4ade80,stroke:#16a34a,color:#052e16
    0_0_1_Human_Approval_Gate["Human Approval Gate\n[action]"]
    0_0_Bootstrap_Styleguide --> 0_0_1_Human_Approval_Gate
    style 0_0_1_Human_Approval_Gate fill:#4ade80,stroke:#16a34a,color:#052e16
    0_Assess_Intent["Assess Intent\n[action]"]
    Technical_Writer_Workflow --> 0_Assess_Intent
    style 0_Assess_Intent fill:#4ade80,stroke:#16a34a,color:#052e16
    0_Survey_Existing_Docs{{"Survey Existing Docs\n[selector]"}}
    Technical_Writer_Workflow --> 0_Survey_Existing_Docs
    style 0_Survey_Existing_Docs fill:#4ade80,stroke:#16a34a,color:#052e16
    0_2_Map_Placement["Map Placement\n[action]"]
    0_Survey_Existing_Docs --> 0_2_Map_Placement
    style 0_2_Map_Placement fill:#4ade80,stroke:#16a34a,color:#052e16
    0_2_Resolve_Structure["Resolve Structure\n[action]"]
    0_Survey_Existing_Docs --> 0_2_Resolve_Structure
    0_Write_And_Review{{"Write And Review\n[sequence]"}}
    Technical_Writer_Workflow --> 0_Write_And_Review
    style 0_Write_And_Review fill:#4ade80,stroke:#16a34a,color:#052e16
    0_3_Write_Documentation["Write Documentation\n[action]"]
    0_Write_And_Review --> 0_3_Write_Documentation
    style 0_3_Write_Documentation fill:#4ade80,stroke:#16a34a,color:#052e16
    0_3_Review_Gate["Review Gate\n[action]"]
    0_Write_And_Review --> 0_3_Review_Gate
    style 0_3_Review_Gate fill:#4ade80,stroke:#16a34a,color:#052e16

MIT licensed