Skip to content

no-home-resolve-structure

Scenario for Technical Writer.

No home in docs tree; Resolve_Structure creates a new section first

Latest run: PASS — 2026-05-10 23:26:28Z

Spec: .abtree/trees/technical-writer/TEST__no-home-resolve-structure.yaml

Report: .abtree/trees/technical-writer/REPORT__no-home-resolve-structure__20260510T232628Z.md


Test spec

yaml
feature: Technical_Writer grounds a docs goal in a styleguide, places it, writes, and review-gates
tree: technical-writer
description: |
  Survey path — STYLEGUIDE.md exists, but no home exists for the new
  content in the current docs tree. Map_Placement's evaluate fails;
  Resolve_Structure runs, creates a new section / sidebar entry, then
  the write/review pass clears.

background:
  initial:
    local:
      goal: "Document the brand-new behaviour-tree-fixtures concept. There's no section for fixtures yet."

fixtures:
  side_effects:
    styleguide_load:
      exists: true
      contents: |
        # Styleguide
        - Voice: second person, active.
        - Headings: sentence case.
    docs_home_lookup:
      home_exists: false   # forces Map_Placement evaluate → false
    docs_structural_change:
      kind: new_section
      created:
        directory: docs/concepts/fixtures
        index_page: docs/concepts/fixtures/index.md
        sidebar_patch:
          file: docs/.vitepress/config.ts
          section: Concepts
          new_entry: { text: Fixtures, link: /concepts/fixtures/ }
      placement: docs/concepts/fixtures/index.md
    docs_write:
      file_written: docs/concepts/fixtures/index.md
      bytes: 1640
    review_outcomes:
      - attempt: 1
        verdict: approved
        notes: approved

scenario:
  name: No home in docs tree; Resolve_Structure creates a new section first
  given:
    - $LOCAL.goal is set
    - STYLEGUIDE.md exists at the repo root
    - the docs tree has no existing section for the new content
  when:
    - Load_Styleguide evaluate → true; writes $LOCAL.styleguide
    - Assess_Intent evaluate → true; writes $LOCAL.intent (type=conceptual explainer, scope=one section, audience=integrator)
    - Map_Placement evaluate → false (no home exists per fixtures.side_effects.docs_home_lookup)
    - Resolve_Structure evaluate → true ($LOCAL.intent is set)
    - Resolve_Structure performs the structural change from fixtures.side_effects.docs_structural_change (new section dir + sidebar patch)
    - Resolve_Structure writes $LOCAL.docs_survey and $LOCAL.placement
    - Write_Documentation evaluate → true; writes the page (fixture-served) and stores $LOCAL.draft
    - Review_Gate evaluate → true; review verdict "approved" per fixtures.side_effects.review_outcomes[0]
    - Review_Gate sets $LOCAL.review_notes = "approved", confirms final_path
  then:
    local:
      placement: equals fixtures.side_effects.docs_structural_change.placement
      draft: non-empty
      review_notes: approved
      final_path: equals fixtures.side_effects.docs_structural_change.placement
    files:
      placement:
        exists: true
        path: equals fixtures.side_effects.docs_write.file_written
      sidebar:
        path: equals fixtures.side_effects.docs_structural_change.created.sidebar_patch.file
        contains_entry: equals fixtures.side_effects.docs_structural_change.created.sidebar_patch.new_entry
    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__no-home-resolve-structure.yaml Target execution: test-tree-run-fixtures-concept-needs-new__technical-writer__1 Overall: PASS

Final $LOCAL

keyvalue
goal"Document the brand-new behaviour-tree-fixtures concept."
styleguide"# Styleguide\n…" (loaded — real file present)
intent"type: conceptual explainer; scope: one section; audience: integrator."
docs_survey{new_section, sidebar_patch} (fixture-served)
placement"docs/concepts/fixtures/index.md"
draft"# Fixtures\n…" (fixture-served body)
review_notes"approved"
final_path"docs/concepts/fixtures/index.md"

Assertions

NameExpectedActualPass
statusdonedone
local.placementequals fixtures.side_effects.docs_structural_change.placement(fixture) docs/concepts/fixtures/index.md
local.draftnon-emptynon-empty
local.review_notesapprovedapproved
local.final_pathequals fixtures.side_effects.docs_structural_change.placementdocs/concepts/fixtures/index.md
files.placementexists at fixtures.side_effects.docs_write.file_written(fixture) docs/concepts/fixtures/index.md
files.sidebarcontains fixtures.side_effects.docs_structural_change.created.sidebar_patch.new_entry(fixture) docs/.vitepress/config.ts patched with
runtime.retry_count.Write_And_Review00

Trace highlight: Map_Placement is red (fixture rigged "home_exists: false"), Resolve_Structure is green, and Survey_Existing_Docs selector resolves green via fall-through to the second child.

Trace

mermaid
---
title: "test-tree run: fixtures concept needs new section (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:#f87171,stroke:#dc2626,color:#450a0a
    0_2_Resolve_Structure["Resolve Structure\n[action]"]
    0_Survey_Existing_Docs --> 0_2_Resolve_Structure
    style 0_2_Resolve_Structure fill:#4ade80,stroke:#16a34a,color:#052e16
    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