fix(rules): reconcile Units Planning ghost stage with canonical Units Generation#156
fix(rules): reconcile Units Planning ghost stage with canonical Units Generation#156scottschreckengaust wants to merge 7 commits intomainfrom
Conversation
… Generation Units Planning was referenced as a separate workflow stage in 5 files (workflow-planning.md, units-generation.md, terminology.md, workflow-changes.md, error-handling.md) but was never defined as a top-level stage in core-workflow.md. It is actually Part 1 (an internal sub-step) of the Units Generation stage. This inconsistency caused: - State tracking confusion (aidlc-state.md would have two entries for one stage) - Session continuity breakage (stage names in state file wouldn't match what the rules expect) - Mermaid diagram showing 2 nodes for a single stage Changes: - Merge UP/UG Mermaid nodes into single Units Generation node - Remove duplicate Units Planning checklist items from execution plans - Clarify that planning/generation are internal sub-steps, not stages - Update all impact assessments and error recovery references
Prompt Engineering Review — aidlc-rules/ (2026-03-30)Comprehensive review of all 30 files in Critical (3)C1. "Units Planning" Ghost Stage ✅ Fixed in this PRFiles: "Units Planning" was referenced as a separate top-level workflow stage in 5 files, but Fix: Reconcile all references to use the canonical "Units Generation" stage name, clarifying that planning is an internal sub-step. C2. "Never Ask Questions in Chat" Conflicts with Inline Approval PromptsFiles:
Fix: Scope the "never ask in chat" rule to requirements-gathering questions only. Restate as: "Requirements-gathering and clarification questions MUST be placed in dedicated .md files with [Answer]: tags. Stage completion prompts and approval requests MAY be presented inline in chat." C3. Terminology Glossary Uses Nonexistent Stage NamesFiles: Usage examples reference "Context Assessment stage" and "Requirements Assessment stage." Neither exists in the workflow. Actual names are "Workspace Detection" and "Requirements Analysis." These appear to be leftover names from a previous version. Fix: Replace "Context Assessment" with "Workspace Detection" and "Requirements Assessment" with "Requirements Analysis." Audit the entire terminology file for other stale references. High (8)H1. Reverse Engineering Artifact List Inconsistent Across 3 FilesFiles: Three files list different artifact sets. Fix: Establish a single canonical artifact list in H2. 3-Option Completion Messages Violate NO EMERGENT BEHAVIOR RuleFiles:
Fix: Either extend 2-option standardization to all phases (handle "add skipped stage" through H3. overconfidence-prevention.md Is a Changelog, Not an Actionable RuleFiles: This file is a human-readable rationale document ("The overconfidence issue was caused by..."). It describes what was wrong and changed, not what an agent should do. The actual behavior is already baked into stage files. Loading it wastes context. It is referenced once in Fix: Move outside H4. Most Common Rule Files Have No Defined Loading TriggerFiles:
Fix: For each common file, define when it should be loaded — either add to the mandatory list, specify conditional triggers, or create a lightweight index. H5. "Assume the Role of a Product Owner" Promotes OverconfidenceFiles: Two files tell the agent to "assume the role of a product owner." This conflicts with overconfidence prevention — a product owner makes business decisions, but the agent is instructed elsewhere to defer to the user. Role assumption causes the agent to prioritize features and define acceptance criteria instead of asking. Fix: Replace role-assumption directives with behavioral instructions: "Apply product ownership analysis techniques to evaluate completeness of requirements and quality of user stories. Defer all business decisions to the user." H6. "No Fixed Sequences" Claim Is Factually WrongFiles:
Fix: Replace with: "Stages execute in a defined sequence, but conditional stages can be skipped when they do not add value." H7. Extension Enforcement Default Contradicts Opt-In ModelFiles: Line 49 states: "Default to enforced if no configuration exists." But extensions are opt-in: Fix: Change to: "If an extension has an opt-in file and the user has not yet been asked, defer enforcement until the opt-in question is presented and answered. Extensions without opt-in files are always enforced." H8. OWASP Reference Mapping Uses Fabricated "2025" EditionFiles: The appendix references "OWASP Top 10 (2025)" which does not exist. The file contains a TODO comment acknowledging this. Category IDs (A01:2025, etc.) are fabricated. Only 8 of 15 SECURITY rules are mapped. Fix: Update to OWASP Top 10 (2021) with correct category IDs, or remove the mapping table until verified. Map all 15 rules. Medium (9)M1. depth-levels.md Is Redundant with Stage-Level GuidanceFiles: Provides no concrete thresholds or decision criteria. Says "Model decides." Depth guidance is already embedded in stage files. Not in the mandatory loading list. Fix: Integrate into M2. No Open-Ended Question Format AllowedFiles: Mandates ALL questions use multiple-choice A/B/C/D format. Many requirements questions are inherently open-ended ("Describe the primary business process"). Forcing these into multiple-choice produces artificial options. Fix: Add an open-response format option with M3. Heavy Emoji Usage with No Configuration OptionFiles: Extensive emoji usage throughout interactive messages. No way to disable for enterprise environments. Inconsistent application. Fix: Consider a tone/formatting config, or ensure consistent application. Alternatively, limit emoji to chat messages only, not generated artifacts. M4. Build-and-Test Generates Documentation But Template Implies ExecutionFiles: Generates instruction documents but never runs build/test commands. Summary template has fields for "Build Status: [Success/Failed]" and "Total Tests: [X], Passed: [X]" that imply actual execution. Fix: Rename to "Build and Test Planning," add execution instructions, or clarify template values are "expected" not "actual." M5. "Interaction Diagrams" Requirement Has No Template or GuidanceFiles:
Fix: Add a step in M6. Session Continuity Misses Application Design ArtifactsFiles:
Fix: Add all Application Design artifacts, or reference the consolidated M7. Error Handling References Nonexistent Operations StageFiles: Has an "Operations Errors" section covering build tool detection and deployment errors. Operations is a placeholder stage with no defined steps. These errors belong in Build and Test. Fix: Rename to "Build and Test Errors." M8. Functional Design Prerequisite Chain UnclearFiles: States Application Design is "recommended" but Units Generation is "required." However, Step 1 reads artifacts from Application Design. Can Functional Design run without Application Design? Fix: Make Application Design a hard prerequisite if its artifacts are needed, or document what to do when they're absent. M9. Content Validation Has Broken Markdown in Its Own Mermaid ExampleFiles: Nested triple-backtick code blocks are not properly escaped, causing the outer code block to close prematurely. This is exactly the kind of error the file is supposed to prevent. Fix: Use four backticks for the outer block or HTML entities for inner backticks. Low (5)L1. Answer-Analysis Guidance Duplicated in 7+ FilesFiles: Same examples ("You mentioned 'mix of A and B'") repeated word-for-word across 7+ files. Fix: Consolidate into a single common file and reference it. L2. ASCII Diagram Examples May Not Comply with Their Own Width RuleFiles: "Every line in a box MUST have EXACTLY the same character count." Examples may have inconsistent widths. Fix: Verify and correct examples. L3. Mermaid Template Splits Units into Two Nodes ✅ Fixed as part of C1Files: L4. "Other" Option Letter Inconsistent (X vs Sequential)Files: Template says use "X)" but examples use "E)", "D)", "C)". Fix: Standardize on "X)" for the "Other" option everywhere. L5. Acknowledged Duplication Between process-overview.md and welcome-message.md Has DivergedFiles:
Fix: Ensure factual consistency even if format differs. |
A. Executive SummaryLatest release: PR #156 High-level snapshot comparing the latest release against the golden baseline (the reference evaluation used as the quality target).
Full trend report available in the workflow artifacts. |
Summary
Fixes the highest-priority finding from a comprehensive prompt engineering review of the
aidlc-rules/directory.Problem: "Units Planning" was referenced as a separate top-level workflow stage in 5 files, but
core-workflow.mdonly defines a single "Units Generation" stage (with planning as an internal Part 1 sub-step). This inconsistency causes state tracking confusion, session continuity breakage, and incorrect Mermaid diagrams.Fix: Reconcile all references to use the canonical "Units Generation" stage name, clarifying that planning is an internal sub-step.
Files changed
workflow-planning.mdunits-generation.mdterminology.mdworkflow-changes.mderror-handling.mdFull Prompt Engineering Review
This PR addresses finding C1 (the highest priority) from a comprehensive review of all 30 files in
aidlc-rules/. The complete list of 25 findings (3 Critical, 8 High, 9 Medium, 5 Low) with detailed descriptions, affected files, and recommended fixes is attached as a PR comment.Test plan
aidlc-rules/(only the annotated terminology example should remain)core-workflow.mdstage names match all checklist templates inworkflow-planning.mdBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.