Skip to content

fix: add [next-stage-name] substitution guidance for construction app…#440

Open
dferguson992 wants to merge 2 commits into
awslabs:mainfrom
dferguson992:main
Open

fix: add [next-stage-name] substitution guidance for construction app…#440
dferguson992 wants to merge 2 commits into
awslabs:mainfrom
dferguson992:main

Conversation

@dferguson992

Copy link
Copy Markdown

…roval messages (#406)

Summary

During the Construction phase, the approval messages after Functional Design, NFR Requirements, and NFR Design always display "Continue to Code Generation" regardless of which stage just completed. The [next-stage-name] placeholder in the completion message template has no guidance telling the AI model what to substitute, so it defaults to the most prominent terminal stage.

Three construction stage files use [next-stage-name] as a placeholder in their Step 7 completion message, but provide no instruction on how to resolve it. Meanwhile, infrastructure-design.md already hardcodes "Code Generation" (correctly, since it's always the next stage after infrastructure design). The other files lack equivalent guidance, causing the AI to guess incorrectly.

Changes

Added a [next-stage-name] substitution instruction block to each affected file, specifying the Construction phase stage ordering and directing the AI to check aidlc-docs/aidlc-state.md for which stages are enabled:

File Substitution priority
functional-design.md NFR Requirements → NFR Design → Infrastructure Design → Code Generation
nfr-requirements.md NFR Design → Infrastructure Design → Code Generation
nfr-design.md Infrastructure Design → Code Generation

This preserves the adaptive/conditional nature of the workflow (stages can be skipped) while eliminating ambiguity.

User experience

Screenshot 2026-06-26 at 12 11 06 PM

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Test Plan

Tested in Kiro IDE 1.0.0 (macOS) with a complex multi-unit project request. Verified all four approval gates now display the correct next stage:

After completing Displayed next stage
Functional Design NFR Requirements Correct
NFR Requirements NFR Design Correct
NFR Design Infrastructure Design Correct
Infrastructure Design Code Generation Correct (unchanged)

Previously, all three intermediate stages incorrectly displayed "Code Generation" as reported in #406.

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.

@dferguson992

Copy link
Copy Markdown
Author

@awslabs/aidlc-admins

PR is ready to go, idk what is causing the gitleaks failure. I can't reproduce locally with Kiro.

@dferguson992

Copy link
Copy Markdown
Author

@awslabs/aidlc-admins

Just flagging this up.

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.

2 participants