Skip to content

Decide DDL duplication strategy: keep architecture.md DDL or link to schema.py #786

Open

Description

@AndriiPasternak31

Background

docs/memory/architecture.md currently duplicates DDL blocks from src/backend/db/schema.py for ~25 tables. This duplication is the root cause of the drift class that triggered #770 (3 stale blocks flagged by /validate-schema).

The follow-up PR for #770 (AndriiPasternak31/issue-770-plan) updates 3 named DDL blocks to match schema.py's current state, but reinforces the duplication pattern rather than eliminating it.

Decision needed

Pick one of:

  1. Status quo: keep duplicating DDL in architecture.md — accept that schema changes mean two file edits + ongoing drift.
  2. Delete-and-link: remove DDL blocks from architecture.md; replace with > See [src/backend/db/schema.py:NN-MM](...) callouts.
  3. CI-generated docs: keep architecture.md as the narrative; auto-generate docs/generated/schema.md from schema.py in CI; cross-link.
  4. Inventory only: keep an alphabetical table-name → purpose inventory in architecture.md, no DDL.

Why this is P3, not P1

  • schema.py + tests/unit/test_schema_parity.py + .github/workflows/schema-parity.yml already enforce code-side correctness.
  • Drift only affects readers of architecture.md. It's a comprehension hazard, not a correctness hazard.
  • This is a docs-architecture call requiring deliberation, not a janitorial fix.

Reasoning history

This issue captures the Codex "UC-2" reframing surfaced during /autoplan review of the #770 plan. Plan archive: /Users/andrii/.gstack/projects/Abilityai-trinity/AndriiPasternak31-issue-770-plan-autoplan-restore-20260511-155040.md (local, not shared).

Related

Activity

  1. added
    priority-p3
    type-refactor
    type-docs
    on May 11, 2026
  2. added
    complexity-low
    status-incubating
    status-ready
    and removed
    status-incubating
    on Jun 12, 2026
  3. removed
    type-refactor
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p3status-readytheme-devextype-docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions