fix: constrain *-design to design-level artifacts, no code#402
fix: constrain *-design to design-level artifacts, no code#402jeromevdl wants to merge 2 commits into
Conversation
…rtifacts Add a Constraints section to both stage files clarifying that implementation-ready code (CDK constructs, Terraform modules, Lambda handlers, IAM policies) belongs in code-generation, not design stages. Code snippets are limited to short illustrative pseudocode (≤15 lines). Fixes awslabs#396
Apply the same Constraints section to functional-design.md — business logic models, domain entities, and rules should stay at design level, not produce complete function bodies or framework-specific code.
50485a8 to
43200f2
Compare
apackeer
left a comment
There was a problem hiding this comment.
Thanks for the fix, this is a clean and well-placed prose change and it lines up with the intent of #396. Approving in principle, with a short punch list to land it on top of current v2.
Substantive
- The Constraints paragraph reads well and sits in the right place (right after the MANDATORY line, before
## Steps). The 15-line pseudocode carve-out is a sensible allowance and does not fight the existing stage text. - Scope symmetry worth considering (optional, can be a follow-up):
core/aidlc-common/stages/inception/application-design.mdproducescomponents.md,component-methods.md,services.md, andcomponent-dependency.md, which have the same "code sneaks in" failure mode. Not a blocker for #396 as filed.
Mechanical must-fix before merge
- Version trio.
core/tools/aidlc-version.tsis still"2.0.2"on the branch;v2is at2.2.0. Every user-visible PR bumpsaidlc-version.ts, adds a matching## [N.N.N] - YYYY-MM-DDheading + summary toCHANGELOG.md, and updates the README badge.tests/unit/t68-version-changelog-sync.test.tsenforces all three agree. Patches 2.2.1 through 2.2.13 are currently claimed by other open PRs, so at merge time this needs 2.2.14 or later depending on merge order (re-bump on rebase if collision). - Regenerate
dist/. You did regenerate dist at the branch base, which was correct, butv2has moved through 2.1.0, 2.1.6, 2.1.7, 2.1.8, and 2.2.0 since then. After the rebase, runbun scripts/package.tsand commit the resulting drift across all four harness trees.bun scripts/package.ts --checkis the CI gate and will fail without this. - Once rebased, please confirm
bun scripts/package.ts --checkand the repo typecheck are clean locally.
Small housekeeping
- The PR body spells the file
functionnal-design.md; the actual filename isfunctional-design.md. In-repo everything is correct, just the description.
Rebase notes
Merge-base with v2 is f3ce1b8. The intervening changes to the three files (2.1.7 fde1e1a, which added the "if exists" input-fallback prose, and 2.1.0 e713c4f, which rerouted the record paths) touch different sections than your Constraints paragraph, so git merge-tree reports a clean auto-merge on all 15 files. Straight git rebase origin/v2 should resolve without hand-editing; the only real work is the regenerated dist and the version trio.
Cross-PR heads-up: your PR #404 also modifies nfr-design.md and infrastructure-design.md. Whichever of #402 and #404 lands second will need a small rebase and another bun scripts/package.ts pass, but they do not conflict textually today.
Happy to re-review as soon as the rebased branch is up.
Summary
Adds a
## Constraintssection toinfrastructure-design.md,functionnal-design.mdandnfr-design.mdstage files, explicitly stating that implementation-ready code belongs incode-generation, not in design stages.Design artifacts should describe what infrastructure/patterns are needed and why — not ship complete CDK constructs, Lambda handlers, or IAM policy documents. Code snippets are limited to short illustrative pseudocode (≤15 lines) that clarify a design decision.
Fixes #396
Changes
core/aidlc-common/stages/construction/infrastructure-design.md— added Constraints sectioncore/aidlc-common/stages/construction/functional-design.md— added Constraints sectioncore/aidlc-common/stages/construction/nfr-design.md— added Constraints sectiondist/regenerated viabun scripts/package.tsBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.