ai-flow-dev 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -140,7 +140,7 @@ Or using uv (Python tool manager):
140
140
  uv tool install ai-flow-dev
141
141
  ```
142
142
 
143
- ## **Current version:** 2.7.0
143
+ ## **Current version:** 2.8.2
144
144
 
145
145
  ## 🚀 Quick Start
146
146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-flow-dev",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance throughout your project lifecycle.",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -591,9 +591,15 @@ function generate_commit_links() {
591
591
  fi
592
592
 
593
593
  if [ -n "$COMMIT_URL_PATTERN" ]; then
594
- COMMIT_HASHES_SUMMARY+="[${hash}](${COMMIT_URL_PATTERN}${hash})"
594
+ # Build markdown link in parts to avoid VSCode link detection
595
+ COMMIT_HASHES_SUMMARY+="["
596
+ COMMIT_HASHES_SUMMARY+="$hash"
597
+ COMMIT_HASHES_SUMMARY+="]("
598
+ COMMIT_HASHES_SUMMARY+="$COMMIT_URL_PATTERN"
599
+ COMMIT_HASHES_SUMMARY+="$hash"
600
+ COMMIT_HASHES_SUMMARY+=")"
595
601
  else
596
- COMMIT_HASHES_SUMMARY+="\`${hash}\`"
602
+ COMMIT_HASHES_SUMMARY+='`'"${hash}"'`'
597
603
  fi
598
604
  fi
599
605
  count=$((count + 1))
@@ -702,7 +708,7 @@ Read the structured summary from `/tmp/ai-context-summary.md` (400-600 words) an
702
708
 
703
709
  **AI Prompt:**
704
710
 
705
- ```markdown
711
+ ```````markdown
706
712
  Genera dos descripciones profesionales (PR y Jira) basándote en este resumen estructurado:
707
713
 
708
714
  <context-summary>
@@ -756,55 +762,50 @@ Commit Hashes Summary: $COMMIT_HASHES_SUMMARY
756
762
  - Si breaking changes, resáltalos con ⚠️ en sección Métricas
757
763
  - Si deployment notes, sé específico con cada requirement
758
764
 
759
- **Output en formato (CRÍTICO - respetar delimitadores):**
765
+ **Output Format:**
760
766
 
761
- \`\`\`markdown
767
+ IMPORTANTE: Responde directamente con este formato EXACTO usando 5 BACKTICKS (máxima robustez):
762
768
 
763
- <!-- PR_DESCRIPTION_START -->
769
+ ---
764
770
 
765
- [contenido completo de PR description aquí]
771
+ ## 📋 PULL REQUEST DESCRIPTION
766
772
 
767
- <!-- PR_DESCRIPTION_END -->
773
+ \`\`\`\`\`markdown
774
+ [Aquí va el contenido completo de la PR description, empezando con ## Refactor: ...]
775
+ \`\`\`\`\`
768
776
 
769
- <!-- JIRA_DESCRIPTION_START -->
777
+ ---
770
778
 
771
- [contenido completo de Jira description aquí]
779
+ ## 🎫 JIRA DESCRIPTION
772
780
 
773
- <!-- JIRA_DESCRIPTION_END -->
781
+ \`\`\`\`\`markdown
782
+ [Aquí va el contenido completo de la Jira description, empezando con ## Refactor: ...]
783
+ \`\`\`\`\`
774
784
 
775
- \`\`\`
785
+ ---
776
786
 
777
- Analiza el contexto y genera las descripciones óptimas ahora.
778
- ```
787
+ **Listo para copiar y pegar** 📋 Solo copia el contenido dentro de los bloques de código markdown.
779
788
 
780
- **After AI generates the descriptions, extract and save them:**
789
+ **CRÍTICO PARA EVITAR CONFLICTOS:**
781
790
 
782
- ```bash
783
- # Extract PR description
784
- sed -n '/<!-- PR_DESCRIPTION_START -->/,/<!-- PR_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
785
- sed '1d;$d' > /tmp/pr-description.md
791
+ 1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA DESCRIPTION" deben estar FUERA de los bloques de código
792
+ 2. USA EXACTAMENTE 5 BACKTICKS (\`\`\`\`\`) para abrir/cerrar cada bloque
793
+ 3. ¿Por qué 5? Cubre hasta 4 backticks internos (bloques anidados) sin conflictos
794
+ 4. Código normal usa 3 (```), nested usa 4 (````), entonces 5 (``````) es prácticamente imposible de conflictuar
795
+ 5. Más de 5 es innecesario (over-engineering)
786
796
 
787
- # Extract Jira description
788
- sed -n '/<!-- JIRA_DESCRIPTION_START -->/,/<!-- JIRA_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
789
- sed '1d;$d' > /tmp/jira-description.md
797
+ Analiza el contexto y genera las descripciones óptimas ahora.
798
+ ```````
790
799
 
791
- # Display descriptions
792
- echo ""
793
- echo "---"
794
- echo "📋 DESCRIPCIÓN PARA PULL REQUEST (GitHub/GitLab/Bitbucket)"
795
- echo "---"
796
- echo ""
797
- cat /tmp/pr-description.md
798
- echo ""
799
- echo ""
800
- echo "---"
801
- echo "🎫 DESCRIPCIÓN PARA JIRA/CLICKUP/LINEAR (Markdown)"
802
- echo "---"
803
- echo ""
804
- cat /tmp/jira-description.md
805
- echo ""
800
+ **After AI generates the descriptions:**
801
+
802
+ ```bash
803
+ # La IA responde directamente en el chat con las descripciones
804
+ # en formato markdown listo para copiar y pegar.
805
+ # No requiere post-procesamiento ni archivos temporales.
806
806
  echo ""
807
- echo "💡 Copia las descripciones de arriba para tus tickets"
807
+ echo "💡 Las descripciones han sido generadas arriba en el chat."
808
+ echo "📋 Copia directamente el contenido de los bloques markdown."
808
809
  echo ""
809
810
  ```
810
811
 
@@ -591,9 +591,15 @@ function generate_commit_links() {
591
591
  fi
592
592
 
593
593
  if [ -n "$COMMIT_URL_PATTERN" ]; then
594
- COMMIT_HASHES_SUMMARY+="[${hash}](${COMMIT_URL_PATTERN}${hash})"
594
+ # Build markdown link in parts to avoid VSCode link detection
595
+ COMMIT_HASHES_SUMMARY+="["
596
+ COMMIT_HASHES_SUMMARY+="$hash"
597
+ COMMIT_HASHES_SUMMARY+="]("
598
+ COMMIT_HASHES_SUMMARY+="$COMMIT_URL_PATTERN"
599
+ COMMIT_HASHES_SUMMARY+="$hash"
600
+ COMMIT_HASHES_SUMMARY+=")"
595
601
  else
596
- COMMIT_HASHES_SUMMARY+="\`${hash}\`"
602
+ COMMIT_HASHES_SUMMARY+='`'"${hash}"'`'
597
603
  fi
598
604
  fi
599
605
  count=$((count + 1))
@@ -702,7 +708,7 @@ Read the structured summary from `/tmp/ai-context-summary.md` (400-600 words) an
702
708
 
703
709
  **AI Prompt:**
704
710
 
705
- ```markdown
711
+ ```````markdown
706
712
  Genera dos descripciones profesionales (PR y Jira) basándote en este resumen estructurado:
707
713
 
708
714
  <context-summary>
@@ -756,55 +762,50 @@ Commit Hashes Summary: $COMMIT_HASHES_SUMMARY
756
762
  - Si breaking changes, resáltalos con ⚠️ en sección Métricas
757
763
  - Si deployment notes, sé específico con cada requirement
758
764
 
759
- **Output en formato (CRÍTICO - respetar delimitadores):**
765
+ **Output Format:**
760
766
 
761
- \`\`\`markdown
767
+ IMPORTANTE: Responde directamente con este formato EXACTO usando 5 BACKTICKS (máxima robustez):
762
768
 
763
- <!-- PR_DESCRIPTION_START -->
769
+ ---
764
770
 
765
- [contenido completo de PR description aquí]
771
+ ## 📋 PULL REQUEST DESCRIPTION
766
772
 
767
- <!-- PR_DESCRIPTION_END -->
773
+ \`\`\`\`\`markdown
774
+ [Aquí va el contenido completo de la PR description, empezando con ## Refactor: ...]
775
+ \`\`\`\`\`
768
776
 
769
- <!-- JIRA_DESCRIPTION_START -->
777
+ ---
770
778
 
771
- [contenido completo de Jira description aquí]
779
+ ## 🎫 JIRA DESCRIPTION
772
780
 
773
- <!-- JIRA_DESCRIPTION_END -->
781
+ \`\`\`\`\`markdown
782
+ [Aquí va el contenido completo de la Jira description, empezando con ## Refactor: ...]
783
+ \`\`\`\`\`
774
784
 
775
- \`\`\`
785
+ ---
776
786
 
777
- Analiza el contexto y genera las descripciones óptimas ahora.
778
- ```
787
+ **Listo para copiar y pegar** 📋 Solo copia el contenido dentro de los bloques de código markdown.
779
788
 
780
- **After AI generates the descriptions, extract and save them:**
789
+ **CRÍTICO PARA EVITAR CONFLICTOS:**
781
790
 
782
- ```bash
783
- # Extract PR description
784
- sed -n '/<!-- PR_DESCRIPTION_START -->/,/<!-- PR_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
785
- sed '1d;$d' > /tmp/pr-description.md
791
+ 1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA DESCRIPTION" deben estar FUERA de los bloques de código
792
+ 2. USA EXACTAMENTE 5 BACKTICKS (\`\`\`\`\`) para abrir/cerrar cada bloque
793
+ 3. ¿Por qué 5? Cubre hasta 4 backticks internos (bloques anidados) sin conflictos
794
+ 4. Código normal usa 3 (```), nested usa 4 (````), entonces 5 (``````) es prácticamente imposible de conflictuar
795
+ 5. Más de 5 es innecesario (over-engineering)
786
796
 
787
- # Extract Jira description
788
- sed -n '/<!-- JIRA_DESCRIPTION_START -->/,/<!-- JIRA_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
789
- sed '1d;$d' > /tmp/jira-description.md
797
+ Analiza el contexto y genera las descripciones óptimas ahora.
798
+ ```````
790
799
 
791
- # Display descriptions
792
- echo ""
793
- echo "---"
794
- echo "📋 DESCRIPCIÓN PARA PULL REQUEST (GitHub/GitLab/Bitbucket)"
795
- echo "---"
796
- echo ""
797
- cat /tmp/pr-description.md
798
- echo ""
799
- echo ""
800
- echo "---"
801
- echo "🎫 DESCRIPCIÓN PARA JIRA/CLICKUP/LINEAR (Markdown)"
802
- echo "---"
803
- echo ""
804
- cat /tmp/jira-description.md
805
- echo ""
800
+ **After AI generates the descriptions:**
801
+
802
+ ```bash
803
+ # La IA responde directamente en el chat con las descripciones
804
+ # en formato markdown listo para copiar y pegar.
805
+ # No requiere post-procesamiento ni archivos temporales.
806
806
  echo ""
807
- echo "💡 Copia las descripciones de arriba para tus tickets"
807
+ echo "💡 Las descripciones han sido generadas arriba en el chat."
808
+ echo "📋 Copia directamente el contenido de los bloques markdown."
808
809
  echo ""
809
810
  ```
810
811
 
@@ -591,9 +591,15 @@ function generate_commit_links() {
591
591
  fi
592
592
 
593
593
  if [ -n "$COMMIT_URL_PATTERN" ]; then
594
- COMMIT_HASHES_SUMMARY+="[${hash}](${COMMIT_URL_PATTERN}${hash})"
594
+ # Build markdown link in parts to avoid VSCode link detection
595
+ COMMIT_HASHES_SUMMARY+="["
596
+ COMMIT_HASHES_SUMMARY+="$hash"
597
+ COMMIT_HASHES_SUMMARY+="]("
598
+ COMMIT_HASHES_SUMMARY+="$COMMIT_URL_PATTERN"
599
+ COMMIT_HASHES_SUMMARY+="$hash"
600
+ COMMIT_HASHES_SUMMARY+=")"
595
601
  else
596
- COMMIT_HASHES_SUMMARY+="\`${hash}\`"
602
+ COMMIT_HASHES_SUMMARY+='`'"${hash}"'`'
597
603
  fi
598
604
  fi
599
605
  count=$((count + 1))
@@ -702,7 +708,7 @@ Read the structured summary from `/tmp/ai-context-summary.md` (400-600 words) an
702
708
 
703
709
  **AI Prompt:**
704
710
 
705
- ```markdown
711
+ ```````markdown
706
712
  Genera dos descripciones profesionales (PR y Jira) basándote en este resumen estructurado:
707
713
 
708
714
  <context-summary>
@@ -756,55 +762,50 @@ Commit Hashes Summary: $COMMIT_HASHES_SUMMARY
756
762
  - Si breaking changes, resáltalos con ⚠️ en sección Métricas
757
763
  - Si deployment notes, sé específico con cada requirement
758
764
 
759
- **Output en formato (CRÍTICO - respetar delimitadores):**
765
+ **Output Format:**
760
766
 
761
- \`\`\`markdown
767
+ IMPORTANTE: Responde directamente con este formato EXACTO usando 5 BACKTICKS (máxima robustez):
762
768
 
763
- <!-- PR_DESCRIPTION_START -->
769
+ ---
764
770
 
765
- [contenido completo de PR description aquí]
771
+ ## 📋 PULL REQUEST DESCRIPTION
766
772
 
767
- <!-- PR_DESCRIPTION_END -->
773
+ \`\`\`\`\`markdown
774
+ [Aquí va el contenido completo de la PR description, empezando con ## Refactor: ...]
775
+ \`\`\`\`\`
768
776
 
769
- <!-- JIRA_DESCRIPTION_START -->
777
+ ---
770
778
 
771
- [contenido completo de Jira description aquí]
779
+ ## 🎫 JIRA DESCRIPTION
772
780
 
773
- <!-- JIRA_DESCRIPTION_END -->
781
+ \`\`\`\`\`markdown
782
+ [Aquí va el contenido completo de la Jira description, empezando con ## Refactor: ...]
783
+ \`\`\`\`\`
774
784
 
775
- \`\`\`
785
+ ---
776
786
 
777
- Analiza el contexto y genera las descripciones óptimas ahora.
778
- ```
787
+ **Listo para copiar y pegar** 📋 Solo copia el contenido dentro de los bloques de código markdown.
779
788
 
780
- **After AI generates the descriptions, extract and save them:**
789
+ **CRÍTICO PARA EVITAR CONFLICTOS:**
781
790
 
782
- ```bash
783
- # Extract PR description
784
- sed -n '/<!-- PR_DESCRIPTION_START -->/,/<!-- PR_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
785
- sed '1d;$d' > /tmp/pr-description.md
791
+ 1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA DESCRIPTION" deben estar FUERA de los bloques de código
792
+ 2. USA EXACTAMENTE 5 BACKTICKS (\`\`\`\`\`) para abrir/cerrar cada bloque
793
+ 3. ¿Por qué 5? Cubre hasta 4 backticks internos (bloques anidados) sin conflictos
794
+ 4. Código normal usa 3 (```), nested usa 4 (````), entonces 5 (``````) es prácticamente imposible de conflictuar
795
+ 5. Más de 5 es innecesario (over-engineering)
786
796
 
787
- # Extract Jira description
788
- sed -n '/<!-- JIRA_DESCRIPTION_START -->/,/<!-- JIRA_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
789
- sed '1d;$d' > /tmp/jira-description.md
797
+ Analiza el contexto y genera las descripciones óptimas ahora.
798
+ ```````
790
799
 
791
- # Display descriptions
792
- echo ""
793
- echo "---"
794
- echo "📋 DESCRIPCIÓN PARA PULL REQUEST (GitHub/GitLab/Bitbucket)"
795
- echo "---"
796
- echo ""
797
- cat /tmp/pr-description.md
798
- echo ""
799
- echo ""
800
- echo "---"
801
- echo "🎫 DESCRIPCIÓN PARA JIRA/CLICKUP/LINEAR (Markdown)"
802
- echo "---"
803
- echo ""
804
- cat /tmp/jira-description.md
805
- echo ""
800
+ **After AI generates the descriptions:**
801
+
802
+ ```bash
803
+ # La IA responde directamente en el chat con las descripciones
804
+ # en formato markdown listo para copiar y pegar.
805
+ # No requiere post-procesamiento ni archivos temporales.
806
806
  echo ""
807
- echo "💡 Copia las descripciones de arriba para tus tickets"
807
+ echo "💡 Las descripciones han sido generadas arriba en el chat."
808
+ echo "📋 Copia directamente el contenido de los bloques markdown."
808
809
  echo ""
809
810
  ```
810
811
 
@@ -43,12 +43,14 @@ Parse OpenAPI backend specification and return structured analysis data that `fl
43
43
  2. Execute CRUD implementation with project-specific patterns
44
44
  3. Ensure type-safety between frontend and backend
45
45
 
46
- **⚠️ CRITICAL: Do NOT create separate analysis files**
46
+ **⚠️ CRITICAL: Do NOT create ANY files in this sub-prompt**
47
47
 
48
48
  - This sub-prompt ONLY returns a JSON object (`OpenAPIAnalysisResult`)
49
- - NO files like `.ai-flow/analysis/*.md` or `.ai-flow/work/[task]/analysis.md` should be created
50
- - The parent prompt (`flow-work`) handles all file creation (only `work.md` and `status.json`)
51
- - All analysis data is stored in memory and used to populate `work.md`
49
+ - NO files like `.ai-flow/analysis/*.md` should be created
50
+ - NO files like `.ai-flow/work/[task]/analysis.md` should be created
51
+ - NO files like `.ai-flow/work/[task]/work.md` should be created here
52
+ - ✅ The parent prompt (`flow-work`) will create `.ai-flow/work/[task]/work.md` and `status.json` in Phase 2
53
+ - All analysis data is returned as JSON and will be embedded into `work.md` by the parent prompt
52
54
 
53
55
  ---
54
56
 
@@ -492,10 +492,14 @@ await saveToCache(cacheFile, {
492
492
  projectType: 'frontend',
493
493
  });
494
494
 
495
- // ⚠️ IMPORTANT: Do NOT create separate analysis files
495
+ // ⚠️ IMPORTANT: Do NOT create SEPARATE ANALYSIS FILES
496
496
  // The analysis result is stored in memory (workflow_context.analysis)
497
- // and will be used to generate the comprehensive work.md file.
498
- // NO files like .ai-flow/analysis/*.md or .ai-flow/work/[task]/analysis.md
497
+ // and will be merged into work.md during Phase 2.
498
+ //
499
+ // ❌ DO NOT CREATE: .ai-flow/analysis/*.md or .ai-flow/work/[task]/analysis.md
500
+ // ✅ MUST CREATE (in Phase 2): .ai-flow/work/[task]/work.md and status.json
501
+ //
502
+ // The analysis data is included INSIDE work.md, not as a separate file.
499
503
  ```
500
504
 
501
505
  **IF `analysisResult.success === false`:**
@@ -890,7 +894,15 @@ Find similar features/patterns in codebase:
890
894
  - The `work.md` file should be comprehensive and self-contained
891
895
  - For COMPLEX tasks with API analysis, include all OpenAPI metadata directly in `work.md`
892
896
 
893
- **IF complexity == "MEDIUM":**
897
+ **📦 For API_MODULE mode specifically:**
898
+
899
+ - The analysis from `flow-work-api.md` sub-prompt is stored in `workflow_context.analysis`
900
+ - ✅ YOU MUST CREATE `.ai-flow/work/api-[module-name]/work.md` with all analysis data embedded
901
+ - ✅ YOU MUST CREATE `.ai-flow/work/api-[module-name]/status.json` (API modules are COMPLEX)
902
+ - Include OpenAPI endpoints, schemas, field specs, validation rules, and relationships in `work.md`
903
+ - Do NOT skip file creation just because you received pre-analyzed data
904
+
905
+ **IF complexity == "MEDIUM":\*\***
894
906
 
895
907
  - Create simplified `.ai-flow/work/[task-name]/work.md` (~15-20 lines)
896
908
  - Skip status.json
@@ -591,9 +591,15 @@ function generate_commit_links() {
591
591
  fi
592
592
 
593
593
  if [ -n "$COMMIT_URL_PATTERN" ]; then
594
- COMMIT_HASHES_SUMMARY+="[${hash}](${COMMIT_URL_PATTERN}${hash})"
594
+ # Build markdown link in parts to avoid VSCode link detection
595
+ COMMIT_HASHES_SUMMARY+="["
596
+ COMMIT_HASHES_SUMMARY+="$hash"
597
+ COMMIT_HASHES_SUMMARY+="]("
598
+ COMMIT_HASHES_SUMMARY+="$COMMIT_URL_PATTERN"
599
+ COMMIT_HASHES_SUMMARY+="$hash"
600
+ COMMIT_HASHES_SUMMARY+=")"
595
601
  else
596
- COMMIT_HASHES_SUMMARY+="\`${hash}\`"
602
+ COMMIT_HASHES_SUMMARY+='`'"${hash}"'`'
597
603
  fi
598
604
  fi
599
605
  count=$((count + 1))
@@ -702,7 +708,7 @@ Read the structured summary from `/tmp/ai-context-summary.md` (400-600 words) an
702
708
 
703
709
  **AI Prompt:**
704
710
 
705
- ```markdown
711
+ ```````markdown
706
712
  Genera dos descripciones profesionales (PR y Jira) basándote en este resumen estructurado:
707
713
 
708
714
  <context-summary>
@@ -756,55 +762,50 @@ Commit Hashes Summary: $COMMIT_HASHES_SUMMARY
756
762
  - Si breaking changes, resáltalos con ⚠️ en sección Métricas
757
763
  - Si deployment notes, sé específico con cada requirement
758
764
 
759
- **Output en formato (CRÍTICO - respetar delimitadores):**
765
+ **Output Format:**
760
766
 
761
- \`\`\`markdown
767
+ IMPORTANTE: Responde directamente con este formato EXACTO usando 5 BACKTICKS (máxima robustez):
762
768
 
763
- <!-- PR_DESCRIPTION_START -->
769
+ ---
764
770
 
765
- [contenido completo de PR description aquí]
771
+ ## 📋 PULL REQUEST DESCRIPTION
766
772
 
767
- <!-- PR_DESCRIPTION_END -->
773
+ \`\`\`\`\`markdown
774
+ [Aquí va el contenido completo de la PR description, empezando con ## Refactor: ...]
775
+ \`\`\`\`\`
768
776
 
769
- <!-- JIRA_DESCRIPTION_START -->
777
+ ---
770
778
 
771
- [contenido completo de Jira description aquí]
779
+ ## 🎫 JIRA DESCRIPTION
772
780
 
773
- <!-- JIRA_DESCRIPTION_END -->
781
+ \`\`\`\`\`markdown
782
+ [Aquí va el contenido completo de la Jira description, empezando con ## Refactor: ...]
783
+ \`\`\`\`\`
774
784
 
775
- \`\`\`
785
+ ---
776
786
 
777
- Analiza el contexto y genera las descripciones óptimas ahora.
778
- ```
787
+ **Listo para copiar y pegar** 📋 Solo copia el contenido dentro de los bloques de código markdown.
779
788
 
780
- **After AI generates the descriptions, extract and save them:**
789
+ **CRÍTICO PARA EVITAR CONFLICTOS:**
781
790
 
782
- ```bash
783
- # Extract PR description
784
- sed -n '/<!-- PR_DESCRIPTION_START -->/,/<!-- PR_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
785
- sed '1d;$d' > /tmp/pr-description.md
791
+ 1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA DESCRIPTION" deben estar FUERA de los bloques de código
792
+ 2. USA EXACTAMENTE 5 BACKTICKS (\`\`\`\`\`) para abrir/cerrar cada bloque
793
+ 3. ¿Por qué 5? Cubre hasta 4 backticks internos (bloques anidados) sin conflictos
794
+ 4. Código normal usa 3 (```), nested usa 4 (````), entonces 5 (``````) es prácticamente imposible de conflictuar
795
+ 5. Más de 5 es innecesario (over-engineering)
786
796
 
787
- # Extract Jira description
788
- sed -n '/<!-- JIRA_DESCRIPTION_START -->/,/<!-- JIRA_DESCRIPTION_END -->/p' /tmp/ai-output.md | \
789
- sed '1d;$d' > /tmp/jira-description.md
797
+ Analiza el contexto y genera las descripciones óptimas ahora.
798
+ ```````
790
799
 
791
- # Display descriptions
792
- echo ""
793
- echo "---"
794
- echo "📋 DESCRIPCIÓN PARA PULL REQUEST (GitHub/GitLab/Bitbucket)"
795
- echo "---"
796
- echo ""
797
- cat /tmp/pr-description.md
798
- echo ""
799
- echo ""
800
- echo "---"
801
- echo "🎫 DESCRIPCIÓN PARA JIRA/CLICKUP/LINEAR (Markdown)"
802
- echo "---"
803
- echo ""
804
- cat /tmp/jira-description.md
805
- echo ""
800
+ **After AI generates the descriptions:**
801
+
802
+ ```bash
803
+ # La IA responde directamente en el chat con las descripciones
804
+ # en formato markdown listo para copiar y pegar.
805
+ # No requiere post-procesamiento ni archivos temporales.
806
806
  echo ""
807
- echo "💡 Copia las descripciones de arriba para tus tickets"
807
+ echo "💡 Las descripciones han sido generadas arriba en el chat."
808
+ echo "📋 Copia directamente el contenido de los bloques markdown."
808
809
  echo ""
809
810
  ```
810
811
 
@@ -43,12 +43,14 @@ Parse OpenAPI backend specification and return structured analysis data that `fl
43
43
  2. Execute CRUD implementation with mobile-specific patterns (React Native)
44
44
  3. Ensure type-safety between mobile app and backend
45
45
 
46
- **⚠️ CRITICAL: Do NOT create separate analysis files**
46
+ **⚠️ CRITICAL: Do NOT create ANY files in this sub-prompt**
47
47
 
48
48
  - This sub-prompt ONLY returns a JSON object (`OpenAPIAnalysisResult`)
49
- - NO files like `.ai-flow/analysis/*.md` or `.ai-flow/work/[task]/analysis.md` should be created
50
- - The parent prompt (`flow-work`) handles all file creation (only `work.md` and `status.json`)
51
- - All analysis data is stored in memory and used to populate `work.md`
49
+ - NO files like `.ai-flow/analysis/*.md` should be created
50
+ - NO files like `.ai-flow/work/[task]/analysis.md` should be created
51
+ - NO files like `.ai-flow/work/[task]/work.md` should be created here
52
+ - ✅ The parent prompt (`flow-work`) will create `.ai-flow/work/[task]/work.md` and `status.json` in Phase 2
53
+ - All analysis data is returned as JSON and will be embedded into `work.md` by the parent prompt
52
54
 
53
55
  ---
54
56
 
@@ -492,10 +492,14 @@ await saveToCache(cacheFile, {
492
492
  projectType: 'mobile',
493
493
  });
494
494
 
495
- // ⚠️ IMPORTANT: Do NOT create separate analysis files
495
+ // ⚠️ IMPORTANT: Do NOT create SEPARATE ANALYSIS FILES
496
496
  // The analysis result is stored in memory (workflow_context.analysis)
497
- // and will be used to generate the comprehensive work.md file.
498
- // NO files like .ai-flow/analysis/*.md or .ai-flow/work/[task]/analysis.md
497
+ // and will be merged into work.md during Phase 2.
498
+ //
499
+ // ❌ DO NOT CREATE: .ai-flow/analysis/*.md or .ai-flow/work/[task]/analysis.md
500
+ // ✅ MUST CREATE (in Phase 2): .ai-flow/work/[task]/work.md and status.json
501
+ //
502
+ // The analysis data is included INSIDE work.md, not as a separate file.
499
503
  ```
500
504
 
501
505
  **IF `analysisResult.success === false`:**
@@ -887,7 +891,15 @@ Find similar features/patterns in codebase:
887
891
  - The `work.md` file should be comprehensive and self-contained
888
892
  - For COMPLEX tasks with API analysis, include all OpenAPI metadata directly in `work.md`
889
893
 
890
- **IF complexity == "MEDIUM":\*\***
894
+ **📦 For API_MODULE mode specifically:**
895
+
896
+ - The analysis from `flow-work-api.md` sub-prompt is stored in `workflow_context.analysis`
897
+ - ✅ YOU MUST CREATE `.ai-flow/work/api-[module-name]/work.md` with all analysis data embedded
898
+ - ✅ YOU MUST CREATE `.ai-flow/work/api-[module-name]/status.json` (API modules are COMPLEX)
899
+ - Include OpenAPI endpoints, schemas, field specs, validation rules, and relationships in `work.md`
900
+ - Do NOT skip file creation just because you received pre-analyzed data
901
+
902
+ **IF complexity == "MEDIUM":**\*\*\*\*
891
903
 
892
904
  - Create simplified `.ai-flow/work/[task-name]/work.md` (~15-20 lines)
893
905
  - Skip status.json