ai-flow-dev 2.8.2 → 2.9.1
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 +17 -15
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-build-phase-0.md +0 -2
- package/prompts/backend/flow-build-phase-8.md +140 -18
- package/prompts/backend/flow-check.md +73 -39
- package/prompts/backend/flow-finish.md +402 -69
- package/prompts/desktop/flow-build-phase-8.md +72 -3
- package/prompts/desktop/flow-finish.md +405 -65
- package/prompts/frontend/flow-build-phase-0.md +39 -5
- package/prompts/frontend/flow-build-phase-8.md +100 -17
- package/prompts/frontend/flow-finish.md +401 -65
- package/prompts/mobile/flow-build-phase-0.md +39 -5
- package/prompts/mobile/flow-build-phase-8.md +114 -14
- package/prompts/mobile/flow-finish.md +405 -65
- package/prompts/shared/flow-report.md +636 -0
- package/templates/pr-description.template.md +294 -0
|
@@ -255,8 +255,73 @@ STORY_POINTS=${STORY_POINTS:-0}
|
|
|
255
255
|
DURATION_HOURS=$(( DURATION_MIN / 60 ))
|
|
256
256
|
DURATION_MINS=$(( DURATION_MIN % 60 ))
|
|
257
257
|
|
|
258
|
-
#
|
|
259
|
-
|
|
258
|
+
# Extract new analytics fields (Phase 1)
|
|
259
|
+
# 1. User name
|
|
260
|
+
USER_NAME=$(git config user.name 2>/dev/null || echo "Unknown")
|
|
261
|
+
|
|
262
|
+
# 2. Task summary (first line after ## Objective in work.md)
|
|
263
|
+
if [ -f "$TASK_PATH/work.md" ]; then
|
|
264
|
+
SUMMARY=$(grep -A 1 "^## Objective" "$TASK_PATH/work.md" | tail -1 | sed 's/^[[:space:]]*//' | cut -c 1-80)
|
|
265
|
+
SUMMARY=${SUMMARY:-"No description"}
|
|
266
|
+
else
|
|
267
|
+
SUMMARY="No description"
|
|
268
|
+
fi
|
|
269
|
+
|
|
270
|
+
# 3. Complexity (COMPLEX if status.json exists, otherwise MEDIUM)
|
|
271
|
+
if [ -f "$TASK_PATH/status.json" ]; then
|
|
272
|
+
COMPLEXITY="COMPLEX"
|
|
273
|
+
else
|
|
274
|
+
COMPLEXITY="MEDIUM"
|
|
275
|
+
fi
|
|
276
|
+
|
|
277
|
+
# 4. Branch name
|
|
278
|
+
BRANCH_NAME=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
279
|
+
|
|
280
|
+
# 5. Tags (infer from changed files)
|
|
281
|
+
CHANGED_PATHS=$(git diff --name-only main..HEAD 2>/dev/null | head -10)
|
|
282
|
+
TAGS=()
|
|
283
|
+
|
|
284
|
+
if echo "$CHANGED_PATHS" | grep -qiE 'controller|route|endpoint|api'; then
|
|
285
|
+
TAGS+=("API")
|
|
286
|
+
fi
|
|
287
|
+
if echo "$CHANGED_PATHS" | grep -qiE 'service|module|core|backend'; then
|
|
288
|
+
TAGS+=("Backend")
|
|
289
|
+
fi
|
|
290
|
+
if echo "$CHANGED_PATHS" | grep -qiE 'component|page|view|frontend'; then
|
|
291
|
+
TAGS+=("Frontend")
|
|
292
|
+
fi
|
|
293
|
+
if echo "$CHANGED_PATHS" | grep -qiE 'test|spec'; then
|
|
294
|
+
TAGS+=("Testing")
|
|
295
|
+
fi
|
|
296
|
+
if echo "$CHANGED_PATHS" | grep -qiE 'database|migration|schema|model'; then
|
|
297
|
+
TAGS+=("Database")
|
|
298
|
+
fi
|
|
299
|
+
|
|
300
|
+
# Convert tags array to JSON
|
|
301
|
+
if [ ${#TAGS[@]} -eq 0 ]; then
|
|
302
|
+
TAGS_JSON="[]"
|
|
303
|
+
else
|
|
304
|
+
TAGS_JSON=$(printf '%s\n' "${TAGS[@]}" | jq -R . | jq -s .)
|
|
305
|
+
fi
|
|
306
|
+
|
|
307
|
+
# 2. Build JSON analytics using jq for proper structure
|
|
308
|
+
ANALYTICS_JSON=$(jq -n \
|
|
309
|
+
--arg task "$TASK_FOLDER" \
|
|
310
|
+
--arg type "$TASK_TYPE" \
|
|
311
|
+
--arg src "$TASK_SOURCE" \
|
|
312
|
+
--arg start "$CREATED_AT" \
|
|
313
|
+
--arg end "$COMPLETED_AT" \
|
|
314
|
+
--argjson dur "$DURATION_MIN" \
|
|
315
|
+
--argjson sp "$STORY_POINTS" \
|
|
316
|
+
--argjson tasks "$TOTAL_TASKS" \
|
|
317
|
+
--argjson commits "$COMMIT_COUNT" \
|
|
318
|
+
--argjson valid "$VALIDATION_PASSED" \
|
|
319
|
+
--arg user "$USER_NAME" \
|
|
320
|
+
--arg summary "$SUMMARY" \
|
|
321
|
+
--arg complexity "$COMPLEXITY" \
|
|
322
|
+
--arg branch "$BRANCH_NAME" \
|
|
323
|
+
--argjson tags "$TAGS_JSON" \
|
|
324
|
+
'{task, type, src, start, end, dur, sp, tasks, commits, valid, user, summary, complexity, branch, tags}')
|
|
260
325
|
|
|
261
326
|
# 3. Append to analytics.jsonl
|
|
262
327
|
mkdir -p .ai-flow/archive
|
|
@@ -708,59 +773,168 @@ Read the structured summary from `/tmp/ai-context-summary.md` (400-600 words) an
|
|
|
708
773
|
|
|
709
774
|
**AI Prompt:**
|
|
710
775
|
|
|
711
|
-
|
|
712
|
-
|
|
776
|
+
```markdown
|
|
777
|
+
Generate two professional descriptions (PR in **ENGLISH**, Jira in **SPANISH**) using the OFFICIAL TEMPLATE in `.ai-flow/templates/pr-description.template.md`.
|
|
713
778
|
|
|
714
779
|
<context-summary>
|
|
715
780
|
$(cat /tmp/ai-context-summary.md)
|
|
716
781
|
</context-summary>
|
|
717
782
|
|
|
718
|
-
<
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
783
|
+
<template-variables>
|
|
784
|
+
## Core Variables
|
|
785
|
+
TASK_TYPE=$TASK_TYPE
|
|
786
|
+
TASK_TITLE=[Extrae de WORK_OBJECTIVE]
|
|
787
|
+
BRANCH_NAME=$CURRENT_BRANCH
|
|
788
|
+
STORY_POINTS=$STORY_POINTS
|
|
789
|
+
DURATION=${DURATION_HOURS}h ${DURATION_MINS}min
|
|
790
|
+
IMPACT_AREA=$IMPACT_AREA
|
|
791
|
+
PLATFORM=$PLATFORM
|
|
792
|
+
COMMIT_HASHES_SUMMARY=$COMMIT_HASHES_SUMMARY
|
|
723
793
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
794
|
+
## Change Type Detection (marca con 'x' el que aplique)
|
|
795
|
+
|
|
796
|
+
IS_FEATURE=$([ "$TASK_TYPE" = "feature" ] && echo "x" || echo " ")
|
|
797
|
+
IS_FIX=$([ "$TASK_TYPE" = "fix" ] && echo "x" || echo " ")
|
|
798
|
+
IS_REFACTOR=$([ "$TASK_TYPE" = "refactor" ] && echo "x" || echo " ")
|
|
799
|
+
IS_DOCS=$([ "$TASK_TYPE" = "docs" ] && echo "x" || echo " ")
|
|
800
|
+
IS_PERF=$([ "$TASK_TYPE" = "perf" ] && echo "x" || echo " ")
|
|
801
|
+
IS_TEST=$([ "$TASK_TYPE" = "test" ] && echo "x" || echo " ")
|
|
802
|
+
|
|
803
|
+
## Context & Solution (genera desde context-summary)
|
|
804
|
+
|
|
805
|
+
CONTEXT=[Resume el problema/necesidad en 2-3 líneas del WORK_OBJECTIVE]
|
|
806
|
+
SOLUTION=[Resume el enfoque técnico en 2-3 líneas analizando COMMIT_SUBJECTS]
|
|
807
|
+
MAIN_CHANGES=[Lista 5-7 cambios como bullets, infiere de COMMIT_SUBJECTS]
|
|
808
|
+
TEST_STEPS=[Genera 3-5 pasos específicos para probar, infiere de WORK_TASKS y TASK_TYPE]
|
|
809
|
+
|
|
810
|
+
## Validation Metrics
|
|
811
|
+
|
|
812
|
+
TESTS_PASSED=$TESTS_PASSED
|
|
813
|
+
TESTS_TOTAL=$TESTS_TOTAL
|
|
814
|
+
TESTS_NEW=$TESTS_NEW
|
|
815
|
+
COVERAGE=$COVERAGE
|
|
816
|
+
DOCS_STATUS=$([ -n "$(git diff --name-only main..HEAD | grep '\.md$')" ] && echo "✅ Updated" || echo "⚠️ Review needed")
|
|
817
|
+
|
|
818
|
+
## Code Metrics
|
|
819
|
+
|
|
820
|
+
TOTAL_COMMITS=$TOTAL_COMMITS
|
|
821
|
+
FILES_COUNT=$FILES_COUNT
|
|
822
|
+
LINES_ADDED=$LINES_ADDED
|
|
823
|
+
LINES_DELETED=$LINES_DELETED
|
|
824
|
+
|
|
825
|
+
## Breaking Changes
|
|
826
|
+
|
|
827
|
+
HAS_BREAKING_CHANGES=$HAS_BREAKING_CHANGES
|
|
828
|
+
BREAKING_CHANGES_STATUS=$([ "$HAS_BREAKING_CHANGES" = "true" ] && echo "⚠️ YES (see below)" || echo "✅ No")
|
|
829
|
+
BREAKING_CHANGES_LIST=$([ "$HAS_BREAKING_CHANGES" = "true" ] && echo "$COMMIT_BREAKING" || echo "")
|
|
830
|
+
MIGRATION_GUIDE=$([ "$HAS_BREAKING_CHANGES" = "true" ] && echo "[TODO: Usuario debe completar guía de migración]" || echo "")
|
|
831
|
+
|
|
832
|
+
## Deployment
|
|
833
|
+
|
|
834
|
+
SHOW_DEPLOYMENT_NOTES=$SHOW_DEPLOYMENT_NOTES
|
|
835
|
+
HAS_MIGRATIONS=$HAS_MIGRATIONS
|
|
836
|
+
MIGRATION_FILES=$MIGRATION_FILES
|
|
837
|
+
NEW_ENV_VARS=$NEW_ENV_VARS
|
|
838
|
+
HAS_NEW_DEPS=$HAS_NEW_DEPS
|
|
839
|
+
INSTALL_CMD=$INSTALL_CMD
|
|
840
|
+
NEW_DEPENDENCIES=[Lista las dependencias nuevas del diff de package.json/requirements.txt/etc]
|
|
841
|
+
|
|
842
|
+
## Issues & Screenshots
|
|
843
|
+
|
|
844
|
+
RELATED_ISSUES=[Busca en commits patrones como "Closes #123", "Fixes #456", extráelos]
|
|
845
|
+
HAS_ISSUES=$([ -n "$RELATED_ISSUES" ] && echo "true" || echo "false")
|
|
846
|
+
HAS_UI_CHANGES=$(echo "$FILES_BY_CATEGORY" | grep -qi 'frontend' && echo "true" || echo "false")
|
|
847
|
+
SCREENSHOTS_SECTION=$([ "$HAS_UI_CHANGES" = "true" ] && echo "## 📸 Screenshots\n\n💡 **Recomendación:** Agrega screenshots mostrando los cambios visuales (antes/después)" || echo "")
|
|
848
|
+
|
|
849
|
+
## Jira-Specific Variables (para comentario compacto)
|
|
850
|
+
|
|
851
|
+
BUSINESS_SUMMARY=[Genera 1-2 líneas describiendo el VALOR DE NEGOCIO entregado, no detalles técnicos. Perspectiva de usuario/stakeholder]
|
|
852
|
+
|
|
853
|
+
# PR Link construction (considera que el PR aún NO existe al ejecutar /flow-finish)
|
|
854
|
+
|
|
855
|
+
PR_LINK=[SIEMPRE usa este formato exacto: "🔗 PR: [PEGAR_LINK_AQUI]"]
|
|
856
|
+
PR_CREATION_COMMANDS=[Genera comandos específicos según $PLATFORM:
|
|
857
|
+
|
|
858
|
+
- GitHub: "gh pr create --title \"$TASK_TYPE: $TASK_FOLDER\" --body-file <(echo \"Ver PR description arriba\")"
|
|
859
|
+
- GitLab: "glab mr create --title \"$TASK_TYPE: $TASK_FOLDER\" --description \"Ver PR description arriba\""
|
|
860
|
+
- Bitbucket: "bb pr create --title \"$TASK_TYPE: $TASK_FOLDER\""
|
|
861
|
+
- Genérico: "Crear PR manualmente en: ${COMMIT_URL_PATTERN%/commit/\*}/pulls"]
|
|
862
|
+
|
|
863
|
+
DEPLOYMENT_STATUS=[Detecta: "✅ Disponible en dev" si es local, "⏳ Pendiente staging/prod" si no hay push, "🚀 En producción" si tag release]
|
|
864
|
+
DEPLOYMENT_NOTES_COMPACT=[Si SHOW_DEPLOYMENT_NOTES=true, versión ultra-compacta: "⚠️ Requiere: migraciones DB + nuevas env vars + npm install" en 1 línea]
|
|
865
|
+
QA_NOTES=[SOLO si hay algo crítico que QA debe saber: breaking changes, configuración especial, comportamiento no obvio. Si no hay nada especial, omitir completamente]
|
|
866
|
+
|
|
867
|
+
# Screenshots (para cambios visuales - formato simple con espacio para adjuntar)
|
|
868
|
+
|
|
869
|
+
SCREENSHOTS*REMINDER=$([ "$HAS_UI_CHANGES" = "true" ] && echo "\n## 📸 Screenshots\n\n### Before\n[Adjuntar imagen]\n\n### After\n[Adjuntar imagen]\n\n_Incluir: diferentes estados (hover, active, disabled), viewports si aplica*" || echo "")
|
|
870
|
+
|
|
871
|
+
## 2026 Standard Sections (Security, Performance, Observability)
|
|
872
|
+
|
|
873
|
+
SECURITY_IMPACT=[Analiza el código y evalúa:
|
|
874
|
+
|
|
875
|
+
- Si hay cambios en auth/permisos → "- ✅ Auth/permissions changes reviewed and validated"
|
|
876
|
+
- Si hay exposición de datos → "- ✅ Data exposure risk mitigated with validation"
|
|
877
|
+
- Si hay nuevas deps → "- ✅ Dependencies scanned (npm audit / snyk)"
|
|
878
|
+
- Si hay endpoints públicos → "- ✅ API rate limiting implemented"
|
|
879
|
+
- Si no hay riesgos → "- ✅ No security implications"
|
|
880
|
+
Formato: lista de checkboxes con lo que aplica]
|
|
881
|
+
|
|
882
|
+
PERFORMANCE_IMPACT=[Analiza si el cambio afecta performance:
|
|
883
|
+
|
|
884
|
+
- Si es feature/refactor con queries → "**Database:** Query optimized with indexes (+50% faster)\n**Load tested:** ✅ 1000 concurrent requests"
|
|
885
|
+
- Si es fix de performance → "**Before:** {{métrica}} ms\n**After:** {{métrica}} ms ({{%}} improvement)"
|
|
886
|
+
- Si es UI → "**Bundle size:** +5KB (minified+gzip)\n**Lighthouse:** Performance 95/100"
|
|
887
|
+
- Si no hay impacto significativo → "No significant performance impact expected."
|
|
888
|
+
Sé específico con métricas reales si están en work.md]
|
|
889
|
+
|
|
890
|
+
OBSERVABILITY=[Analiza qué logging/monitoring se agregó o debe considerarse:
|
|
891
|
+
|
|
892
|
+
- Si hay logs nuevos → "- ✅ Structured logging added for {{feature}}"
|
|
893
|
+
- Si hay métricas → "- ✅ Metrics: {{metric_names}}"
|
|
894
|
+
- Si debe agregar alerts → "- ⚠️ Consider adding alert for {{condition}}"
|
|
895
|
+
- Si no aplica → "- ℹ️ No observability changes ({{reason: refactor/docs/etc}})"
|
|
896
|
+
Enfócate en lo que REALMENTE se agregó o es necesario]
|
|
897
|
+
|
|
898
|
+
</template-variables>
|
|
899
|
+
|
|
900
|
+
<instructions>
|
|
901
|
+
**Read the template in `.ai-flow/templates/pr-description.template.md`** and generate TWO descriptions following EXACTLY that structure:
|
|
902
|
+
|
|
903
|
+
1. **PR Description (GitHub/GitLab/Bitbucket) - TECHNICAL, COMPLETE, IN ENGLISH:**
|
|
904
|
+
- Use ALL sections from the template
|
|
905
|
+
- Render variables with real values
|
|
906
|
+
- Audience: Developers and Reviewers
|
|
907
|
+
- Focus: "How it was implemented" (technical details)
|
|
908
|
+
- **LANGUAGE: English (all text, headers, descriptions)**
|
|
909
|
+
- Include conditional sections ONLY if applicable:
|
|
910
|
+
- Breaking Changes Details (if HAS_BREAKING_CHANGES=true)
|
|
911
|
+
- Deployment Notes (if SHOW_DEPLOYMENT_NOTES=true)
|
|
912
|
+
- Screenshots (if HAS_UI_CHANGES=true)
|
|
913
|
+
- Generate context-specific TEST_STEPS (not generic)
|
|
914
|
+
|
|
915
|
+
2. **Jira Comment (Task Update) - BUSINESS-ORIENTED, COMPACT, IN SPANISH:**
|
|
916
|
+
- Audience: QA, PM, Stakeholders + Devs
|
|
917
|
+
- Focus: "What was achieved and how to test it" (business outcome)
|
|
918
|
+
- Maximum 20-25 lines (scannable in 30 seconds)
|
|
919
|
+
- **LANGUAGE: Spanish (all text, headers, descriptions)**
|
|
920
|
+
- BUSINESS_SUMMARY is MOST IMPORTANT: must explain value without technical jargon
|
|
921
|
+
- TEST_STEPS must be actionable for QA (no code knowledge required)
|
|
922
|
+
- DEPLOYMENT_NOTES_COMPACT only if critical (1 line max)
|
|
923
|
+
- QA_NOTES only if there's something non-obvious QA should know
|
|
924
|
+
|
|
925
|
+
**Important Rules:**
|
|
926
|
+
|
|
927
|
+
- Use professional but clear language (senior engineer level)
|
|
928
|
+
- Be specific with technical changes (use real file/module names)
|
|
929
|
+
- Use commit links already formatted in $COMMIT_HASHES_SUMMARY
|
|
930
|
+
- Generate context-specific TEST_STEPS (not generic steps)
|
|
931
|
+
- If MIGRATION_GUIDE is empty and there are breaking changes, recommend user to complete it
|
|
932
|
+
- Escape special characters correctly for valid Markdown
|
|
933
|
+
- Use `---` separators (not `━━━━` or Unicode characters)
|
|
934
|
+
- If NEW_DEPENDENCIES is empty but HAS_NEW_DEPS=true, detect from diff
|
|
935
|
+
- **PR Description: 100% English**
|
|
936
|
+
- **Jira Comment: 100% Spanish**
|
|
937
|
+
- **NO SIGNATURES**: Do not include "Generated by AI Flow" or similar footers
|
|
764
938
|
|
|
765
939
|
**Output Format:**
|
|
766
940
|
|
|
@@ -771,31 +945,189 @@ IMPORTANTE: Responde directamente con este formato EXACTO usando 5 BACKTICKS (m
|
|
|
771
945
|
## 📋 PULL REQUEST DESCRIPTION
|
|
772
946
|
|
|
773
947
|
\`\`\`\`\`markdown
|
|
774
|
-
|
|
948
|
+
|
|
949
|
+
## {{TASK_TYPE}}: {{TASK_TITLE}}
|
|
950
|
+
|
|
951
|
+
> **Branch:** `{{BRANCH_NAME}}` • **Story Points:** {{STORY_POINTS}} SP • **Duration:** {{DURATION}}
|
|
952
|
+
|
|
953
|
+
---
|
|
954
|
+
|
|
955
|
+
## 🎯 Change Type
|
|
956
|
+
|
|
957
|
+
- [{{IS_FEATURE}}] ✨ Feature (new functionality)
|
|
958
|
+
- [{{IS_FIX}}] 🐛 Fix (bug fix)
|
|
959
|
+
- [{{IS_REFACTOR}}] ♻️ Refactor (no functional change)
|
|
960
|
+
- [{{IS_DOCS}}] 📝 Docs (documentation only)
|
|
961
|
+
- [{{IS_PERF}}] ⚡ Performance (improvement)
|
|
962
|
+
- [{{IS_TEST}}] 🧪 Test (add/improve tests)
|
|
963
|
+
|
|
964
|
+
## 🎯 Impact Area
|
|
965
|
+
|
|
966
|
+
**{{IMPACT_AREA}}**
|
|
967
|
+
|
|
968
|
+
## 💡 Context
|
|
969
|
+
|
|
970
|
+
{{CONTEXT}}
|
|
971
|
+
|
|
972
|
+
{{RELATED_ISSUES}}
|
|
973
|
+
|
|
974
|
+
## ✅ Implemented Solution
|
|
975
|
+
|
|
976
|
+
{{SOLUTION}}
|
|
977
|
+
|
|
978
|
+
## 🔧 Main Changes
|
|
979
|
+
|
|
980
|
+
{{MAIN_CHANGES}}
|
|
981
|
+
|
|
982
|
+
## 🧪 How to Test
|
|
983
|
+
|
|
984
|
+
{{TEST_STEPS}}
|
|
985
|
+
|
|
986
|
+
{{SCREENSHOTS_SECTION}}
|
|
987
|
+
|
|
988
|
+
## 🔒 Security Impact
|
|
989
|
+
|
|
990
|
+
{{SECURITY_IMPACT}}
|
|
991
|
+
|
|
992
|
+
## ⚡ Performance Impact
|
|
993
|
+
|
|
994
|
+
{{PERFORMANCE_IMPACT}}
|
|
995
|
+
|
|
996
|
+
## 🔍 Observability
|
|
997
|
+
|
|
998
|
+
{{OBSERVABILITY}}
|
|
999
|
+
|
|
1000
|
+
## 📊 Validation
|
|
1001
|
+
|
|
1002
|
+
| Aspect | Result |
|
|
1003
|
+
| ----------- | ------------------------------------------------------------- |
|
|
1004
|
+
| 🧪 Tests | {{TESTS_PASSED}}/{{TESTS_TOTAL}} passing (+{{TESTS_NEW}} new) |
|
|
1005
|
+
| 📈 Coverage | {{COVERAGE}}% |
|
|
1006
|
+
| 🔍 Lint | ✅ No errors |
|
|
1007
|
+
| 📝 Docs | {{DOCS_STATUS}} |
|
|
1008
|
+
|
|
1009
|
+
## 📈 Metrics
|
|
1010
|
+
|
|
1011
|
+
| Metric | Value |
|
|
1012
|
+
| ------------------- | -------------------------------------------------------------------- |
|
|
1013
|
+
| 💾 Commits | {{TOTAL_COMMITS}} ([view commits]({{COMMIT_HASHES_SUMMARY}})) |
|
|
1014
|
+
| 📁 Files | {{FILES_COUNT}} modified (+{{LINES_ADDED}}/-{{LINES_DELETED}} lines) |
|
|
1015
|
+
| ⚠️ Breaking Changes | {{BREAKING_CHANGES_STATUS}} |
|
|
1016
|
+
| ⏱️ Duration | {{DURATION}} ({{STORY_POINTS}} SP) |
|
|
1017
|
+
|
|
1018
|
+
{{BREAKING_CHANGES_DETAILS}}
|
|
1019
|
+
|
|
1020
|
+
{{DEPLOYMENT_NOTES}}
|
|
1021
|
+
|
|
1022
|
+
## 📦 Dependencies
|
|
1023
|
+
|
|
1024
|
+
{{DEPENDENCIES_SECTION}}
|
|
1025
|
+
|
|
1026
|
+
## 🔗 References
|
|
1027
|
+
|
|
1028
|
+
- **Commits:** {{COMMIT_HASHES_SUMMARY}}
|
|
1029
|
+
- **Platform:** {{PLATFORM}}
|
|
1030
|
+
{{ISSUE_LINKS}}
|
|
1031
|
+
|
|
1032
|
+
## ✅ Reviewer Checklist
|
|
1033
|
+
|
|
1034
|
+
- [ ] Code follows project standards
|
|
1035
|
+
- [ ] Logic is clear and well documented
|
|
1036
|
+
- [ ] Tests cover critical and edge cases
|
|
1037
|
+
- [ ] No security or performance risks
|
|
1038
|
+
- [ ] Documentation is up to date
|
|
1039
|
+
- [ ] No undocumented breaking changes
|
|
1040
|
+
- [ ] PR size is appropriate (not too large)
|
|
1041
|
+
|
|
775
1042
|
\`\`\`\`\`
|
|
776
1043
|
|
|
777
1044
|
---
|
|
778
1045
|
|
|
779
|
-
## 🎫 JIRA
|
|
1046
|
+
## 🎫 JIRA COMMENT (Task Update)
|
|
780
1047
|
|
|
781
1048
|
\`\`\`\`\`markdown
|
|
782
|
-
|
|
1049
|
+
🚀 {{TASK_TYPE^}}: {{TASK_TITLE}}
|
|
1050
|
+
|
|
1051
|
+
---
|
|
1052
|
+
|
|
1053
|
+
## 📝 Resumen Ejecutivo
|
|
1054
|
+
|
|
1055
|
+
{{BUSINESS_SUMMARY}}
|
|
1056
|
+
|
|
1057
|
+
---
|
|
1058
|
+
|
|
1059
|
+
## 🔧 Solución Técnica
|
|
1060
|
+
|
|
1061
|
+
{{SOLUTION}}
|
|
1062
|
+
|
|
1063
|
+
---
|
|
1064
|
+
|
|
1065
|
+
## 🧪 Cómo Probar (QA)
|
|
1066
|
+
|
|
1067
|
+
{{TEST_STEPS}}
|
|
1068
|
+
|
|
1069
|
+
{{SCREENSHOTS_REMINDER}}
|
|
1070
|
+
|
|
1071
|
+
---
|
|
1072
|
+
|
|
1073
|
+
## 📊 Evidencia Técnica
|
|
1074
|
+
|
|
1075
|
+
| Aspecto | Detalle |
|
|
1076
|
+
| --------------- | ------------------------------------------------------------------------ |
|
|
1077
|
+
| 🔗 Pull Request | {{PR_LINK}} |
|
|
1078
|
+
| 🌿 Branch | `{{BRANCH_NAME}}` |
|
|
1079
|
+
| ✅ Tests | {{TESTS_PASSED}}/{{TESTS_TOTAL}} passing (+{{TESTS_NEW}} nuevos) |
|
|
1080
|
+
| 📈 Coverage | {{COVERAGE}}% |
|
|
1081
|
+
| 💾 Commits | {{TOTAL_COMMITS}} commits |
|
|
1082
|
+
| 📁 Archivos | {{FILES_COUNT}} modificados (+{{LINES_ADDED}}/-{{LINES_DELETED}} líneas) |
|
|
1083
|
+
|
|
1084
|
+
---
|
|
1085
|
+
|
|
1086
|
+
## 📋 Métricas de Desarrollo
|
|
1087
|
+
|
|
1088
|
+
- **Story Points:** {{STORY_POINTS}} SP
|
|
1089
|
+
- **Tiempo real:** {{DURATION}}
|
|
1090
|
+
- **Estado:**{{DEPLOYMENT_STATUS}}
|
|
1091
|
+
|
|
1092
|
+
{{DEPLOYMENT_NOTES_COMPACT}}
|
|
1093
|
+
|
|
1094
|
+
{{QA_NOTES}}
|
|
1095
|
+
|
|
1096
|
+
---
|
|
1097
|
+
|
|
1098
|
+
## 🚀 Siguiente Paso (Crear PR)
|
|
1099
|
+
|
|
1100
|
+
{{PR_CREATION_COMMANDS}}
|
|
1101
|
+
|
|
1102
|
+
💡 _Después de crear el PR, reemplaza `[PEGAR_LINK_AQUI]` con el link real._
|
|
1103
|
+
|
|
783
1104
|
\`\`\`\`\`
|
|
784
1105
|
|
|
785
1106
|
---
|
|
786
1107
|
|
|
787
|
-
**Listo para copiar y pegar** 📋
|
|
1108
|
+
**Listo para copiar y pegar** 📋
|
|
1109
|
+
|
|
1110
|
+
**Diferencias clave entre los dos formatos:**
|
|
1111
|
+
|
|
1112
|
+
| Aspecto | PR Description | Jira Comment |
|
|
1113
|
+
| ------------- | ------------------------- | ------------------------------- |
|
|
1114
|
+
| **Audiencia** | Desarrolladores/Reviewers | QA, PM, Stakeholders |
|
|
1115
|
+
| **Propósito** | Code review técnico | Status update + QA handoff |
|
|
1116
|
+
| **Longitud** | 40-60 líneas (completo) | 20-25 líneas (compacto) |
|
|
1117
|
+
| **Enfoque** | "Cómo se implementó" | "Qué se logró" |
|
|
1118
|
+
| **Uso** | Pegar en GitHub/GitLab PR | Agregar como comentario en Jira |
|
|
788
1119
|
|
|
789
1120
|
**CRÍTICO PARA EVITAR CONFLICTOS:**
|
|
790
1121
|
|
|
791
|
-
1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA
|
|
1122
|
+
1. Los encabezados "## 📋 PULL REQUEST DESCRIPTION" y "## 🎫 JIRA COMMENT" deben estar FUERA de los bloques de código
|
|
792
1123
|
2. USA EXACTAMENTE 5 BACKTICKS (\`\`\`\`\`) para abrir/cerrar cada bloque
|
|
793
1124
|
3. ¿Por qué 5? Cubre hasta 4 backticks internos (bloques anidados) sin conflictos
|
|
794
|
-
4.
|
|
795
|
-
5.
|
|
1125
|
+
4. Renderiza TODAS las variables con valores reales del contexto
|
|
1126
|
+
5. Secciones condicionales ({{BREAKING_CHANGES_DETAILS}}, {{DEPLOYMENT_NOTES}}, etc.) SOLO si aplican
|
|
1127
|
+
6. BUSINESS_SUMMARY en Jira debe ser NO-TÉCNICO (lenguaje de negocio)
|
|
796
1128
|
|
|
797
1129
|
Analiza el contexto y genera las descripciones óptimas ahora.
|
|
798
|
-
|
|
1130
|
+
```
|
|
799
1131
|
|
|
800
1132
|
**After AI generates the descriptions:**
|
|
801
1133
|
|
|
@@ -804,7 +1136,12 @@ Analiza el contexto y genera las descripciones óptimas ahora.
|
|
|
804
1136
|
# en formato markdown listo para copiar y pegar.
|
|
805
1137
|
# No requiere post-procesamiento ni archivos temporales.
|
|
806
1138
|
echo ""
|
|
807
|
-
echo "
|
|
1139
|
+
echo "✅ Descripciones generadas correctamente"
|
|
1140
|
+
echo ""
|
|
1141
|
+
echo "📋 Dos formatos disponibles arriba:"
|
|
1142
|
+
echo " 1️⃣ PR Description → Para GitHub/GitLab (completo, técnico)"
|
|
1143
|
+
echo " 2️⃣ Jira Comment → Para agregar en tarea de Jira (compacto, business-oriented)"
|
|
1144
|
+
echo ""
|
|
808
1145
|
echo "📋 Copia directamente el contenido de los bloques markdown."
|
|
809
1146
|
echo ""
|
|
810
1147
|
```
|
|
@@ -839,20 +1176,16 @@ if [[ "$CONFIRM_PUSH" =~ ^[Yy]$ ]]; then
|
|
|
839
1176
|
echo "---"
|
|
840
1177
|
echo ""
|
|
841
1178
|
echo "📊 Trabajo completado y subido correctamente"
|
|
842
|
-
echo "🌿 Branch: $CURRENT_BRANCH (pushed)"
|
|
843
|
-
echo ""
|
|
844
|
-
echo "💡 Siguiente paso: Crear Pull Request"
|
|
845
|
-
echo ""
|
|
846
|
-
echo " GitHub CLI:"
|
|
847
|
-
echo " gh pr create --title \"$TASK_TYPE: $TASK_FOLDER\" --body-file /tmp/pr-description.md"
|
|
1179
|
+
echo "🌿 Branch: $CURRENT_BRANCH (pushed a origin)"
|
|
848
1180
|
echo ""
|
|
849
|
-
echo "
|
|
850
|
-
echo " glab mr create --title \"$TASK_TYPE: $TASK_FOLDER\" --description \"\$(cat /tmp/pr-description.md)\""
|
|
1181
|
+
echo "📋 Siguiente paso opcional: Crear Pull Request para revisión"
|
|
851
1182
|
echo ""
|
|
852
|
-
echo "
|
|
853
|
-
echo "
|
|
1183
|
+
echo " GitHub CLI: gh pr create --title \"$TASK_TYPE: $TASK_FOLDER\""
|
|
1184
|
+
echo " GitLab CLI: glab mr create --title \"$TASK_TYPE: $TASK_FOLDER\""
|
|
1185
|
+
echo " Bitbucket CLI: bb pr create --title \"$TASK_TYPE: $TASK_FOLDER\""
|
|
1186
|
+
echo " Web UI: Abre repositorio → 'New Pull Request'"
|
|
854
1187
|
echo ""
|
|
855
|
-
echo "
|
|
1188
|
+
echo "💡 Si creaste el PR, copia el link y actualiza el comentario de Jira"
|
|
856
1189
|
echo ""
|
|
857
1190
|
else
|
|
858
1191
|
echo ""
|
|
@@ -62,7 +62,23 @@ Check that all required documents exist:
|
|
|
62
62
|
|
|
63
63
|
### 8.1.2 Generate .gitignore
|
|
64
64
|
|
|
65
|
+
**Action: Intelligent Merge Strategy**
|
|
66
|
+
|
|
67
|
+
**Step 1: Detect existing .gitignore**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
if [ -f ".gitignore" ]; then
|
|
71
|
+
echo "📋 Existing .gitignore detected"
|
|
72
|
+
GITIGNORE_EXISTS=true
|
|
73
|
+
else
|
|
74
|
+
echo "📄 Creating new .gitignore"
|
|
75
|
+
GITIGNORE_EXISTS=false
|
|
76
|
+
fi
|
|
65
77
|
```
|
|
78
|
+
|
|
79
|
+
**Step 2: Select base patterns for Java Desktop**
|
|
80
|
+
|
|
81
|
+
```gitignore
|
|
66
82
|
# Generated .gitignore for Desktop Java Project
|
|
67
83
|
|
|
68
84
|
# Build outputs
|
|
@@ -117,10 +133,63 @@ Thumbs.db
|
|
|
117
133
|
*.sqlite
|
|
118
134
|
*.h2.db
|
|
119
135
|
|
|
120
|
-
#
|
|
121
|
-
|
|
122
|
-
|
|
136
|
+
# ============================================================
|
|
137
|
+
# AI Flow - Workspace Management
|
|
138
|
+
# ============================================================
|
|
139
|
+
# Ignore temporary cache (regenerable)
|
|
123
140
|
.ai-flow/cache/
|
|
141
|
+
|
|
142
|
+
# Ignore work-in-progress state (personal, deleted on completion)
|
|
143
|
+
.ai-flow/work/
|
|
144
|
+
|
|
145
|
+
# COMMIT .ai-flow/archive/ by default (contains team metrics)
|
|
146
|
+
# ============================================================
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Step 3: Merge or Create**
|
|
150
|
+
|
|
151
|
+
**If .gitignore exists (Existing Project):**
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Check if AI Flow rules already present
|
|
155
|
+
if grep -q ".ai-flow/cache/" .gitignore; then
|
|
156
|
+
echo "✅ AI Flow rules already configured"
|
|
157
|
+
else
|
|
158
|
+
echo "" >> .gitignore
|
|
159
|
+
echo "# ============================================================" >> .gitignore
|
|
160
|
+
echo "# AI Flow - Workspace Management" >> .gitignore
|
|
161
|
+
echo "# ============================================================" >> .gitignore
|
|
162
|
+
echo "# Ignore temporary cache (regenerable)" >> .gitignore
|
|
163
|
+
echo ".ai-flow/cache/" >> .gitignore
|
|
164
|
+
echo "" >> .gitignore
|
|
165
|
+
echo "# Ignore work-in-progress state (personal, deleted on completion)" >> .gitignore
|
|
166
|
+
echo ".ai-flow/work/" >> .gitignore
|
|
167
|
+
echo "" >> .gitignore
|
|
168
|
+
echo "# COMMIT .ai-flow/archive/ by default (contains team metrics)" >> .gitignore
|
|
169
|
+
echo "# ============================================================" >> .gitignore
|
|
170
|
+
|
|
171
|
+
echo "✅ Added AI Flow rules to existing .gitignore"
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**If .gitignore does NOT exist (New Project):**
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Create complete .gitignore with all patterns
|
|
179
|
+
cat > .gitignore << 'EOF'
|
|
180
|
+
[Insert complete template above]
|
|
181
|
+
EOF
|
|
182
|
+
|
|
183
|
+
echo "✅ Created new .gitignore"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Output Summary:**
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
✅ .gitignore configured successfully!
|
|
190
|
+
Base patterns: Java Desktop + [NetBeans/Eclipse] + [Maven/Gradle/Ant]
|
|
191
|
+
AI Flow rules: ✅ Added (.ai-flow/cache/, .ai-flow/work/)
|
|
192
|
+
Status: [Created new | Updated existing]
|
|
124
193
|
```
|
|
125
194
|
|
|
126
195
|
### 8.1.3 Generate README.md
|