# Canonical manifest template for /greenfield command.
# Source of truth for manifest schema — do not duplicate elsewhere.
# Placeholders: {name}, {description}, {date}
# Written to: .forge/work/greenfield/{name}/manifest.yaml
#
# v6 adds phase_plan: the planned status of each workflow step. The preflight
# step MUST replace `active` defaults below with the actual plan agreed with
# the user (greenfield commonly skips no phases — the whole pipeline runs).
# See templates/manifests/v6/SCHEMA.md §3.

schema_version: "6"
name: {name}
type: greenfield
description: "{description}"
status: in-progress  # in-progress | paused | completed | escalated
created: "{date}"
command: greenfield
complexity: standard  # trivial | standard | major
escalated_from: null
successor_path: null

# Greenfield runs the full prototype-driven pipeline by default. Skipping
# phases here is rare — a greenfield project without a concept or wireframe
# usually means it should have been scoped as /feature against an existing
# codebase instead.
phase_plan:
  discover-requirements: active
  concept: active
  wireframe: active
  plan-design-system: active  # greenfield is frontend-led by default; preflight may downgrade for CLI-only / backend-only projects
  prototype: active
  iterate: active
  codify: active
  scaffold: active  # greenfield-only key — initial project scaffold (repo, tooling, base structure). Feature uses `worktree:` instead (isolated branch on an existing repo). See templates/manifests/v6/SCHEMA.md §3.2 for the per-work-type allow-list.
  production-build: active
  test-plan: active
  uiux-review: active
  code-review-final: active
  deliver: active
  onboarding: active
  gotchas: as-discovered

# Gate state per phase. slice_graph is added at codify.
phases:
  discover:
    requirements: { status: pending, gate-passed: false }
  plan:
    brainstorm: { status: pending, gate-passed: false }
    design-system: { status: pending, gate-passed: false }
    architecture: { status: pending, gate-passed: false }
    task-decompose: { status: pending, gate-passed: false }
  quality:
    code-review-final: { status: pending, gate-passed: false }
    test-plan: { status: pending, gate-passed: false }
    test-execution: { status: pending, gate-passed: false }
    uiux-review: { status: pending, gate-passed: false }
  deliver:
    deployed: false
    onboarding: false
  support:
    gotchas-recorded: false
