# project-status.yaml — Update Convention

File `project-status.yaml` at project root is aggregate index of project status.
Commands update this file after each artifact or status change.

> **Schema v3 (Feature-only):** Epic and Story are removed. Features are stored in a flat map at the root.

## Always update

```yaml
last_updated: YYYY-MM-DD   # current date, each time there's a change
```

## Artifacts (individual docs)

Update when creating new or changing version:

```yaml
artifacts:
  brd:
    file: docs/brd.md
    artifact-status: draft | approved
    last_updated: YYYY-MM-DD
    version: "1.0"

  prd:
    file: docs/prd.md
    artifact-status: draft | approved
    last_updated: YYYY-MM-DD
    version: "1.0"           # increment minor when updating content, major for large changes
    requirements_count: N    # only for PRD — count of FR-xxx

  sad:
    file: docs/sad.md
    artifact-status: draft | approved
    last_updated: YYYY-MM-DD
    version: "1.0"

  ui_design:                 # Stage 02, optional — omit for projects with no UI
    file: docs/design-uiux.md
    artifact-status: draft | approved
    last_updated: YYYY-MM-DD
    version: "1.0"

  design_spec:               # Stage 02, optional — extracted from docs/ui/*.html
    file: docs/design-spec.md
    artifact-status: draft | approved
    last_updated: YYYY-MM-DD
    version: "1.0"

  security_report:
    file: docs/security-report.md
    status: "Critical findings present" | "Clean"
    last_updated: YYYY-MM-DD
```

## Features (flat map — no Epic / Story nesting)

Update when creating a Feature or changing its status / plan_status.

```yaml
features:
  Feature-001:
    path: docs/features/{CODE}-Feature-001-{slug}/
    file: docs/features/{CODE}-Feature-001-{slug}/{CODE}-Feature-001-{slug}.md
    technical_file: docs/features/{CODE}-Feature-001-{slug}/{CODE}-Feature-001-{slug}-Technical.md
    title: "..."
    stack: app | web | service | integration
    artifact-status: draft | approved    # approval of the Feature .md (gate reads this)
    status: New | In Design | In Development | Done | Removed   # ticket lifecycle (mirrors Feature file frontmatter status)
    plan_status: pending | completed
    plan_date: YYYY-MM-DD                 # set by /tas-plan
    done_date: YYYY-MM-DD                 # set when status flips to Done
    builds: [MOD-002, MOD-003]            # SAD §7 modules this Feature constructs (set by /tas-plan) — drives done-time coverage
```

> Module/component/container inventory + as-built data live in `docs/architecture-map.yaml` (no approval gate) — see `.tas/rules/common/architecture-map.md`. `features.{ID}.builds` here is the feature → component claim (`MOD-NN.C#`); the map holds the component → reality record.

## Bugs

```yaml
bugs:
  Bug-001:
    file: docs/bugs/Bug-001-{slug}.md
    artifact-status: draft | approved    # approval of the Bug .md
    status: Open | In Progress | Fixed | Verified | Closed   # ticket lifecycle (mirrors Bug file frontmatter status)
    severity: Critical | High | Medium | Low
    title: "..."
    feature_id: Feature-NNN              # if linked
```

## ADRs

```yaml
adrs:
  ADR-001:
    file: docs/adr/ADR-001-{slug}.md
    status: Proposed | Accepted | Deprecated | Superseded   # decision lifecycle
    artifact-status: draft | approved
    title: "..."
```

## Rules

- **This file is a MIRROR, not the source of truth.** Each artifact's own file (frontmatter / header status line) is authoritative for trace. This file aggregates for tracking. If they drift, the artifact file wins — re-sync this file to match. Command gate checks read the artifact file directly.
- Only update key related to change just occurred — don't rewrite entire file
- If key doesn't exist yet: add new
- If key exists: update value
- Version: minor (+0.1) when updating content; major (+1.0) when large structure change
- **Never add `epics:` or `stories:` keys** — schema v3 dropped them
