Skip to content

fix: scope per-unit artifact loading to unit directories in session-continuity#276

Open
Mameta29 wants to merge 1 commit into
awslabs:mainfrom
Mameta29:fix/session-continuity-per-unit
Open

fix: scope per-unit artifact loading to unit directories in session-continuity#276
Mameta29 wants to merge 1 commit into
awslabs:mainfrom
Mameta29:fix/session-continuity-per-unit

Conversation

@Mameta29
Copy link
Copy Markdown

@Mameta29 Mameta29 commented May 17, 2026

Summary

Closes #275.

The "Per-Unit Design" artifact-loading instruction in session-continuity.md did not reflect the actual per-unit directory structure of the Construction phase. A resumed, zero-context session had no way to know which unit's artifacts to load or where they live.

Problem

session-continuity.md line 33 read:

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

This is inaccurate in three ways (verified 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). The line listed bare filenames with no path.
  2. No unit selection for multi-unit projects. Construction runs a per-unit loop; an N-unit project has N copies of these directories. The line gave no guidance on which unit(s) to load.
  3. Filenames did not match the real artifacts. There is no single functional-design.md — the stage produces functional-design/business-logic-model.md, business-rules.md, domain-entities.md; similarly for nfr-design and nfr-requirements.

The other lines in the same list are fine because those stages are not unit-scoped — only Per-Unit Design has artifacts under a {unit-name} directory.

Change

Rewrites 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: determine the in-progress unit from aidlc-state.md, load that unit plus its dependencies (per unit-of-work-dependency.md).
  • Defer exact filenames to the construction stage rules (single source of truth) instead of repeating a stale, inaccurate list.

Test Plan

  • Observed during a multi-unit (6-unit) greenfield Construction run: on a mid-Construction resume, the instruction pointed at filenames that do not exist and are not unit-qualified.
  • The changed file passes markdownlint-cli2 (0 errors).

Checklist

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Copy link
Copy Markdown
Contributor

@harmjeff harmjeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Clean, well-scoped fix for a real bug that hits multi-unit Construction projects on session resume.

Good approach — referencing the construction stage rules as the source of truth for exact filenames rather than duplicating a stale list here. The unit selection logic (check aidlc-state.md + load dependencies per unit-of-work-dependency.md) is correct and actionable for an agent resuming with zero context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants