Skip to content

[Bug]: session-continuity.md Per-Unit Design loading is not unit-scoped — resumed sessions cannot locate per-unit artifacts in multi-unit projects #275

@Mameta29

Description

@Mameta29

Which rule or stage is affected

  • common/session-continuity.md (the "MANDATORY: Load Previous Stage Artifacts" list, "Per-Unit Design" line)

Summary

In session-continuity.md, the Per-Unit Design artifact-loading instruction does not reflect the actual per-unit directory structure used by the Construction phase. When a project has multiple units of work, a resumed session has no way to know which unit's artifacts to load, or where they live.

Expected vs actual behavior

Expected: The Per-Unit Design loading instruction should point at the real, unit-scoped paths and make clear which unit(s) to load on resume.

Actual: session-continuity.md line 33 reads:

- **Per-Unit Design**: Read functional-design.md, nfr-requirements.md, nfr-design.md, infrastructure-design.md

This is inaccurate in three ways, confirmed against the current rule files:

  1. Missing the {unit-name} directory level. Every Construction stage writes to aidlc-docs/construction/{unit-name}/{stage}/ — e.g. functional-design.md lines 68-71 create aidlc-docs/construction/{unit-name}/functional-design/.... The session-continuity line lists bare filenames with no path and no {unit-name} segment, so a zero-context resumed session cannot locate them.

  2. No unit selection for multi-unit projects. Construction runs a per-unit loop. A project with N units has N copies of these directories. Line 33 gives no guidance on whether the resumed session should load all units, only the current unit, or the current unit plus its dependencies.

  3. Filenames do not match the actual artifacts. There is no single functional-design.mdfunctional-design.md (the rule) produces functional-design/business-logic-model.md, business-rules.md, and domain-entities.md. Likewise nfr-design produces nfr-design-patterns.md + logical-components.md, and nfr-requirements produces nfr-requirements.md + tech-stack-decisions.md.

The other lines in the same list (Requirements Analysis, User Stories, etc.) are fine because those stages are not unit-scoped. Only the Per-Unit Design line is affected, because it is the only one whose artifacts live under a {unit-name} directory.

Reproduction

  1. Run a greenfield project with multiple units (e.g. 6 units) through several Construction per-unit loops.
  2. Clear the session mid-Construction and resume.
  3. The resumed session reads session-continuity.md and is told to "Read functional-design.md, nfr-requirements.md, ..." — filenames that do not exist at those names and are not unit-qualified.
  4. The session must guess the directory layout and which unit is in progress.

Why this matters

session-continuity.md is the single source of truth for zero-context resumption. The "Code Stages" line already says "Read all code files, plans, AND all previous artifacts", but the Per-Unit Design line — which a mid-Construction resume depends on — is not actionable for a multi-unit project. This is the same class of accuracy drift that PR #156 corrected for the Units Planning/Generation naming.

Proposed direction (open to discussion)

Rewrite the Per-Unit Design line to:

  • Use the real path shape aidlc-docs/construction/{unit-name}/{functional-design,nfr-requirements,nfr-design,infrastructure-design}/.
  • State unit selection explicitly: on resume, determine the in-progress unit from aidlc-state.md, and load that unit's design artifacts plus the artifacts of units it depends on (per unit-of-work-dependency.md).
  • Drop the bare, non-existent filenames in favor of the directory references (the stage rules already enumerate the exact files).

Happy to open a PR if the approach sounds right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions