

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345# Code Generation - Detailed Steps67## Overview8This stage generates code for each unit of work through two integrated parts:9- **Part 1 - Planning**: Create detailed code generation plan with explicit steps10- **Part 2 - Generation**: Execute approved plan to generate code, tests, and artifacts1112**Note**: For brownfield projects, "generate" means modify existing files when appropriate, not create duplicates.1314## Prerequisites15- Unit Design Generation must be complete for the unit16- NFR Implementation (if executed) must be complete for the unit17- All unit design artifacts must be available18- Unit is ready for code generation1920---2122# PART 1: PLANNING2324## Step 1: Analyze Unit Context25- [ ] Read unit design artifacts from Unit Design Generation26- [ ] Read unit story map to understand assigned stories27- [ ] Identify unit dependencies and interfaces28- [ ] Validate unit is ready for code generation2930## Step 2: Create Detailed Unit Code Generation Plan31- [ ] Read workspace root and project type from `aidlc-docs/aidlc-state.md`32- [ ] Determine code location (see Critical Rules for structure patterns)33- [ ] **Brownfield only**: Review reverse engineering code-structure.md for existing files to modify34- [ ] Document exact paths (never aidlc-docs/)35- [ ] Create explicit steps for unit generation:36 - Project Structure Setup (greenfield only)37 - Business Logic Generation38 - Business Logic Unit Testing39 - Business Logic Summary40 - API Layer Generation41 - API Layer Unit Testing42 - API Layer Summary43 - Repository Layer Generation44 - Repository Layer Unit Testing45 - Repository Layer Summary46 - Frontend Components Generation (if applicable)47 - Frontend Components Unit Testing (if applicable)48 - Frontend Components Summary (if applicable)49 - Database Migration Scripts (if data models exist)50 - Documentation Generation (API docs, README updates)51 - Deployment Artifacts Generation52- [ ] Number each step sequentially53- [ ] Include story mapping references54- [ ] Add checkboxes [ ] for each step5556## Step 3: Include Unit Generation Context57- [ ] For this unit, include:58 - Stories implemented by this unit59 - Dependencies on other units/services60 - Expected interfaces and contracts61 - Database entities owned by this unit62 - Service boundaries and responsibilities6364## Step 4: Create Unit Plan Document65- [ ] Save complete plan as `aidlc-docs/construction/plans/{unit-name}-code-generation-plan.md`66- [ ] Include step numbering (Step 1, Step 2, etc.)67- [ ] Include unit context and dependencies68- [ ] Include story traceability69- [ ] Ensure plan is executable step-by-step70- [ ] Emphasize that this plan is the single source of truth for Code Generation7172## Step 5: Summarize Unit Plan73- [ ] Provide summary of the unit code generation plan to the user74- [ ] Highlight unit generation approach75- [ ] Explain step sequence and story coverage76- [ ] Note total number of steps and estimated scope7778## Step 6: Log Approval Prompt79- [ ] Before asking for approval, log the prompt with timestamp in `aidlc-docs/audit.md`80- [ ] Include reference to the complete unit code generation plan81- [ ] Use ISO 8601 timestamp format8283## Step 7: Wait for Explicit Approval84- [ ] Do not proceed until the user explicitly approves the unit code generation plan85- [ ] Approval must cover the entire plan and generation sequence86- [ ] If user requests changes, update the plan and repeat approval process8788## Step 8: Record Approval Response89- [ ] Log the user's approval response with timestamp in `aidlc-docs/audit.md`90- [ ] Include the exact user response text91- [ ] Mark the approval status clearly9293## Step 9: Update Progress94- [ ] Mark Code Generation Part 1 (Planning) complete in `aidlc-state.md`95- [ ] Update the "Current Status" section96- [ ] Prepare for transition to Code Generation9798---99100# PART 2: GENERATION101102## Step 10: Load Unit Code Generation Plan103- [ ] Read the complete plan from `aidlc-docs/construction/plans/{unit-name}-code-generation-plan.md`104- [ ] Identify the next uncompleted step (first [ ] checkbox)105- [ ] Load the context for that step (unit, dependencies, stories)106107## Step 11: Execute Current Step108- [ ] Verify target directory from plan (never aidlc-docs/)109- [ ] **Brownfield only**: Check if target file exists110- [ ] Generate exactly what the current step describes:111 - **If file exists**: Modify it in-place (never create `ClassName_modified.java`, `ClassName_new.java`, etc.)112 - **If file doesn't exist**: Create new file113- [ ] Write to correct locations:114 - **Application Code**: Workspace root per project structure115 - **Documentation**: `aidlc-docs/construction/{unit-name}/code/` (markdown only)116 - **Build/Config Files**: Workspace root117- [ ] Follow unit story requirements118- [ ] Respect dependencies and interfaces119120## Step 12: Update Progress121- [ ] Mark the completed step as [x] in the unit code generation plan122- [ ] Mark associated unit stories as [x] when their generation is finished123- [ ] Update `aidlc-docs/aidlc-state.md` current status124- [ ] **Brownfield only**: Verify no duplicate files created (e.g., no `ClassName_modified.java` alongside `ClassName.java`)125- [ ] Save all generated artifacts126127## Step 13: Continue or Complete Generation128- [ ] If more steps remain, return to Step 10129- [ ] If all steps complete, proceed to present completion message130131## Step 14: Present Completion Message132- Present completion message in this structure:133 1. **Completion Announcement** (mandatory): Always start with this:134135```markdown136# 💻 Code Generation Complete - [unit-name]137```138139 2. **AI Summary** (optional): Provide structured bullet-point summary140 - **Brownfield**: Distinguish modified vs created files (e.g., "• Modified: `src/services/user-service.ts`", "• Created: `src/services/auth-service.ts`")141 - **Greenfield**: List created files with paths (e.g., "• Created: `src/services/user-service.ts`")142 - List tests, documentation, deployment artifacts with paths143 - Keep factual, no workflow instructions144 3. **Formatted Workflow Message** (mandatory): Always end with this exact format:145146```markdown147> **📋 <u>**REVIEW REQUIRED:**</u>**148> Please examine the generated code at:149> - **Application Code**: `[actual-workspace-path]`150> - **Documentation**: `aidlc-docs/construction/[unit-name]/code/`151152153154> **🚀 <u>**WHAT'S NEXT?**</u>**155>156> **You may:**157>158> 🔧 **Request Changes** - Ask for modifications to the generated code based on your review159> ✅ **Continue to Next Stage** - Approve code generation and proceed to **[next-unit/Build & Test]**160161---162```163164## Step 15: Wait for Explicit Approval165- Do not proceed until the user explicitly approves the generated code166- Approval must be clear and unambiguous167- If user requests changes, update the code and repeat the approval process168169## Step 16: Record Approval and Update Progress170- Log approval in audit.md with timestamp171- Record the user's approval response with timestamp172- Mark Code Generation stage as complete for this unit in aidlc-state.md173174---175176## Critical Rules177178### Code Location Rules179- **Application code**: Workspace root only (NEVER aidlc-docs/)180- **Documentation**: aidlc-docs/ only (markdown summaries)181- **Read workspace root** from aidlc-state.md before generating code182183**Structure patterns by project type**:184- **Brownfield**: Use existing structure (e.g., `src/main/java/`, `lib/`, `pkg/`)185- **Greenfield single unit**: `src/`, `tests/`, `config/` in workspace root186- **Greenfield multi-unit (microservices)**: `{unit-name}/src/`, `{unit-name}/tests/`187- **Greenfield multi-unit (monolith)**: `src/{unit-name}/`, `tests/{unit-name}/`188189### Brownfield File Modification Rules190- Check if file exists before generating191- If exists: Modify in-place (never create copies like `ClassName_modified.java`)192- If doesn't exist: Create new file193- Verify no duplicate files after generation (Step 12)194195### Planning Phase Rules196- Create explicit, numbered steps for all generation activities197- Include story traceability in the plan198- Document unit context and dependencies199- Get explicit user approval before generation200201### Generation Phase Rules202- **NO HARDCODED LOGIC**: Only execute what's written in the unit plan203- **FOLLOW PLAN EXACTLY**: Do not deviate from the step sequence204- **UPDATE CHECKBOXES**: Mark [x] immediately after completing each step205- **STORY TRACEABILITY**: Mark unit stories [x] when functionality is implemented206- **RESPECT DEPENDENCIES**: Only implement when unit dependencies are satisfied207208### Automation Friendly Code Rules209When generating UI code (web, mobile, desktop), ensure elements are automation-friendly:210- Add `data-testid` attributes to interactive elements (buttons, inputs, links, forms)211- Use consistent naming: `{component}-{element-role}` (e.g., `login-form-submit-button`, `user-list-search-input`)212- Avoid dynamic or auto-generated IDs that change between renders213- Keep `data-testid` values stable across code changes (only change when element purpose changes)214215## Completion Criteria216- Complete unit code generation plan created and approved217- All steps in unit code generation plan marked [x]218- All unit stories implemented according to plan219- All code and tests generated (tests will be executed in Build & Test phase)220- Deployment artifacts generated221- Complete unit ready for build and verification222
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-build.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-code-simplify.mdc · 51 | Cursor rules | testing-strategy | 30/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-plan.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-review.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-ship.mdc · 51 | Cursor rules | testing-strategygitdeploymentdo-not | 61/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-spec.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-cursor/.cursor/rules/cmd-test.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-forgecat/AGENTS.md · 51 | AGENTS.md | lint-formatstylearchdo-not | 73/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/addyosmani/agent-skills/for-forgecat/CLAUDE.md · 51 | CLAUDE.md | teststylearchagent-behaviour | 70/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-cancel-ralph.mdc · 51 | Cursor rules | no sections | 16/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-help.mdc · 51 | Cursor rules | no sections | 54/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-code/anthropics_claude-code_ralph-wiggum/for-cursor/.cursor/rules/cmd-ralph-loop.mdc · 51 | Cursor rules | no sections | 22/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_agent-sdk-dev/for-cursor/.cursor/rules/cmd-new-sdk-app.mdc · 51 | Cursor rules | setupstylearchdocs | 76/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_claude-md-management/for-cursor/.cursor/rules/cmd-revise-claude-md.mdc · 51 | Cursor rules | agent-behaviour | 50/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_code-review/for-cursor/.cursor/rules/cmd-code-review.mdc · 51 | Cursor rules | testing-strategygit | 35/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-clean_gone.mdc · 51 | Cursor rules | no sections | 60/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-commit-push-pr.mdc · 51 | Cursor rules | stylegit | 44/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_commit-commands/for-cursor/.cursor/rules/cmd-commit.mdc · 51 | Cursor rules | style | 44/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_example-plugin/for-cursor/.cursor/rules/cmd-example-command.mdc · 51 | Cursor rules | lint-formatstyleagent-behaviour | 58/100 | today | |
| nota-america/forgecat-agent-profilesprofiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_feature-dev/for-cursor/.cursor/rules/cmd-feature-dev.mdc · 51 | Cursor rules | stylearchgit | 56/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/nota-america-forgecat-agent-profiles-profiles-awslabs-aidlc-workflows-for-cursor-cursor-rules-rule-code-generation)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.