Skip to content

happy-path-styleguide-exists

Scenario for Technical Writer.

Styleguide present, home present, first review approves

Latest run: PASS — 2026-05-10 23:23:12Z

Spec: .abtree/trees/technical-writer/TEST__happy-path-styleguide-exists.yaml

Report: .abtree/trees/technical-writer/REPORT__happy-path-styleguide-exists__20260510T232312Z.md


Test spec

yaml
feature: Technical_Writer grounds a docs goal in a styleguide, places it, writes, and review-gates
tree: technical-writer
description: |
  Happy path — STYLEGUIDE.md already exists at the repo root, a home for
  the new content already exists in the docs tree, and the first
  write/review pass clears all three gates. No retries, no bootstrap.

background:
  initial:
    local:
      goal: "Document the abtree CLI's `execution list` subcommand: flags, output format, when to use it."

# VCR-style fixtures — see test-tree TREE.yaml for the contract.
# Absence of a fixture means the runner must perform the side effect
# live (with explicit authorisation) or submit failure; it must never
# invent a stand-in.
fixtures:
  side_effects:
    styleguide_load:
      exists: true
      contents: |
        # Styleguide
        - Voice: second person ("you"), active.
        - Tone: terse, no hedging.
        - Code fences: triple-backtick, language tag required.
        - Headings: sentence case.
        - Files: kebab-case.
    docs_home_lookup:
      home_exists: true
      placement: docs/guide/cli/execution-list.md
      adjacency:
        - docs/guide/cli/execution-create.md
        - docs/guide/cli/execution-get.md
      sidebar_entry: { section: CLI, after: execution-create }
    docs_write:
      file_written: docs/guide/cli/execution-list.md
      bytes: 1820
    review_outcomes:
      - attempt: 1
        verdict: approved
        notes: approved

scenario:
  name: Styleguide present, home present, first review approves
  given:
    - $LOCAL.goal is set
    - STYLEGUIDE.md exists at the repo root
    - the docs tree has a CLI section the new page slots into
  when:
    - Load_Styleguide evaluate → true (goal set, STYLEGUIDE.md exists)
    - Load_Styleguide writes $LOCAL.styleguide from fixtures.side_effects.styleguide_load.contents
    - Assess_Intent evaluate → true ($LOCAL.styleguide is set)
    - Assess_Intent writes intent (type=reference, scope=one page, audience=integrator) to $LOCAL.intent
    - Map_Placement evaluate → true (intent set; home exists per fixtures.side_effects.docs_home_lookup)
    - Map_Placement writes $LOCAL.docs_survey and $LOCAL.placement from the lookup fixture
    - Write_Documentation evaluate → true (intent, docs_survey, placement all set)
    - Write_Documentation writes the page (fixtures.side_effects.docs_write) and stores $LOCAL.draft
    - Review_Gate evaluate → true ($LOCAL.draft is set)
    - Review_Gate runs three checks; per fixtures.side_effects.review_outcomes[0] the verdict is "approved"
    - Review_Gate sets $LOCAL.review_notes = "approved"
    - Review_Gate evaluate → true ($LOCAL.review_notes is "approved")
    - Review_Gate confirms the file and stores $LOCAL.final_path
  then:
    local:
      goal: non-empty
      styleguide: non-empty
      styleguide_approved: null    # never reached the bootstrap gate
      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:
      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__happy-path-styleguide-exists.yaml Target execution: test-tree-run-document-abtree-cli-execut__technical-writer__1 Overall: PASS

Final $LOCAL

keyvalue
goal"Document the abtree CLI execution list subcommand…"
styleguide"# Styleguide\n- Voice: second person…" (fixture-served)
styleguide_approvednull (bootstrap never reached)
intent"type: reference; scope: one page; audience: integrator…"
docs_survey{placement, adjacency, sidebar_entry} (fixture-served)
placement"docs/guide/cli/execution-list.md"
draft"# execution list\n…" (fixture-served body)
review_notes"approved"
final_path"docs/guide/cli/execution-list.md"

Assertions

NameExpectedActualPass
statusdonedone
local.goalnon-emptynon-empty
local.styleguidenon-empty(fixture) styleguide_load.contents
local.styleguide_approvednullnull
local.intentnon-emptynon-empty
local.docs_surveynon-emptynon-empty
local.placementequals fixtures.side_effects.docs_home_lookup.placement(fixture) docs/guide/cli/execution-list.md
local.draftnon-emptynon-empty
local.review_notesapprovedapproved
local.final_pathequals fixtures.side_effects.docs_home_lookup.placementdocs/guide/cli/execution-list.md
files.placementexists at fixtures.side_effects.docs_write.file_written(fixture) file write served from docs_write fixture
runtime.retry_count.Write_And_Review00

Trace

mermaid
---
title: "test-tree run: document abtree CLI execution list subcommand (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:#4ade80,stroke:#16a34a,color:#052e16
    0_0_Bootstrap_Styleguide{{"Bootstrap Styleguide\n[sequence]"}}
    0_Resolve_Styleguide --> 0_0_Bootstrap_Styleguide
    0_0_1_Draft_Styleguide["Draft Styleguide\n[action]"]
    0_0_Bootstrap_Styleguide --> 0_0_1_Draft_Styleguide
    0_0_1_Human_Approval_Gate["Human Approval Gate\n[action]"]
    0_0_Bootstrap_Styleguide --> 0_0_1_Human_Approval_Gate
    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