mirror of
https://github.com/MaksTinyWorkshop/_Assistant_Lead_Tech
synced 2026-04-06 13:31:43 +02:00
feat: capitalise Epic 2 app-alexandrie + enrichit post-bmad-install
- Intègre 9 propositions de 95_a_capitaliser.md (Stripe, webhooks, Redis, entitlements, guards, catch silencieux, conventions File List) - Ajoute core-bmad-master dans les agents patchés (orchestrateur) - Différencie les fichiers cibles par rôle d'agent (dev/architect/qa…) - Patch dev-story et code-review XML pour déclencher la capitalisation à chaque fin de story et après chaque code review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,7 @@ PRODUCER_AGENTS=(
|
||||
"bmm-tech-writer"
|
||||
"bmm-ux-designer"
|
||||
"tea-tea"
|
||||
"core-bmad-master"
|
||||
)
|
||||
|
||||
CAPITALIZE_MARKER="95_a_capitaliser.md"
|
||||
@@ -85,10 +86,10 @@ build_memory() {
|
||||
|
||||
case "$agent" in
|
||||
bmm-dev|bmm-quick-flow-solo-dev)
|
||||
echo "${base} during implementation, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <target file> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
echo "${base} during implementation, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <10_backend_patterns_valides.md | 10_frontend_patterns_valides.md | 10_backend_risques_et_vigilance.md | 10_frontend_risques_et_vigilance.md | 90_debug_et_postmortem.md> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
;;
|
||||
bmm-architect)
|
||||
echo "${base}, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <target file> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
echo "${base} during architecture or technical design, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <40_decisions_et_archi.md | 10_backend_patterns_valides.md | 10_backend_risques_et_vigilance.md> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
;;
|
||||
bmm-sm)
|
||||
echo "When a process improvement, recurring friction, or architecture decision emerges during sprint work, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <target file> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
@@ -108,9 +109,80 @@ build_memory() {
|
||||
bmm-tech-writer)
|
||||
echo "When a reusable documentation pattern, writing convention, or recurring documentation friction emerges, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <10_conventions_redaction.md | 40_decisions_et_archi.md> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
;;
|
||||
core-bmad-master)
|
||||
echo "As the orchestrating agent, when any cross-cutting pattern, process improvement, recurring friction, or architectural decision emerges across the project, write a proposal to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md (NUC: /srv/projects/_Assistant_Lead_Tech/95_a_capitaliser.md). Format: DATE — ${PROJECT_NAME} / FILE_UPDATE_PROPOSAL / Fichier cible: <10_backend_patterns_valides.md | 10_frontend_patterns_valides.md | 10_product_patterns_valides.md | 10_ux_patterns_valides.md | 10_backend_risques_et_vigilance.md | 10_frontend_risques_et_vigilance.md | 40_decisions_et_archi.md | 90_debug_et_postmortem.md> / Pourquoi: <reason> / Proposition: <content>. Never write directly to Lead_tech validated files."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
CAPITALIZE_MARKER_XML="Capitalisation Lead_tech"
|
||||
DEV_STORY_XML="$PROJECT_ROOT/_bmad/bmm/workflows/4-implementation/dev-story/instructions.xml"
|
||||
CODE_REVIEW_XML="$PROJECT_ROOT/_bmad/bmm/workflows/4-implementation/code-review/instructions.xml"
|
||||
|
||||
patch_dev_story() {
|
||||
local file="$DEV_STORY_XML"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
echo " [skip] dev-story/instructions.xml — fichier absent"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if grep -q "$CAPITALIZE_MARKER_XML" "$file"; then
|
||||
echo " [skip] dev-story/instructions.xml — capitalisation déjà présente"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Insérer le bloc capitalisation juste avant les Final validation gates
|
||||
awk '
|
||||
/<!-- Final validation gates -->/ {
|
||||
print " <!-- Capitalisation Lead_tech -->"
|
||||
print " <action>Review implementation for reusable patterns, difficult bug fixes, anti-patterns, or architecture decisions that emerged during this story</action>"
|
||||
print " <check if=\"capitalisation-worthy content identified\">"
|
||||
print " <critical>Write proposals to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md ONLY \xe2\x80\x94 NEVER inside the project repo</critical>"
|
||||
print " <action>For each proposal: FORMAT = \"DATE \xe2\x80\x94 '"$PROJECT_NAME"' / FILE_UPDATE_PROPOSAL / Fichier cible: <target> / Pourquoi: <reason> / Proposition: <content>\"</action>"
|
||||
print " </check>"
|
||||
print ""
|
||||
}
|
||||
{ print }
|
||||
' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
|
||||
|
||||
echo " [ok] dev-story/instructions.xml — capitalisation injectée"
|
||||
}
|
||||
|
||||
patch_code_review() {
|
||||
local file="$CODE_REVIEW_XML"
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
echo " [skip] code-review/instructions.xml — fichier absent"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if grep -q "$CAPITALIZE_MARKER_XML" "$file"; then
|
||||
echo " [skip] code-review/instructions.xml — capitalisation déjà présente"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Insérer le bloc capitalisation après le output "✅ Review Complete!"
|
||||
awk '
|
||||
/✅ Review Complete!/ { in_review_complete = 1 }
|
||||
in_review_complete && /<\/output>/ {
|
||||
print
|
||||
print ""
|
||||
print " <!-- Capitalisation Lead_tech -->"
|
||||
print " <action>Review findings for patterns worth capitalizing: anti-patterns found, recurring issues, architecture decisions confirmed or invalidated</action>"
|
||||
print " <check if=\"capitalisation-worthy findings identified\">"
|
||||
print " <critical>Write proposals to ~/AI_RULES/_Assistant_Lead_Tech/95_a_capitaliser.md ONLY \xe2\x80\x94 NEVER inside the project repo</critical>"
|
||||
print " <action>For each proposal: FORMAT = \"DATE \xe2\x80\x94 '"$PROJECT_NAME"' / FILE_UPDATE_PROPOSAL / Fichier cible: <target> / Pourquoi: <reason> / Proposition: <content>\"</action>"
|
||||
print " </check>"
|
||||
in_review_complete = 0
|
||||
next
|
||||
}
|
||||
{ print }
|
||||
' "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
|
||||
|
||||
echo " [ok] code-review/instructions.xml — capitalisation injectée"
|
||||
}
|
||||
|
||||
patch_claude_md() {
|
||||
if [ ! -f "$CLAUDE_MD" ]; then
|
||||
echo " [skip] CLAUDE.md — fichier absent"
|
||||
@@ -170,6 +242,11 @@ for agent in "${PRODUCER_AGENTS[@]}"; do
|
||||
patch_agent "$agent"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Patch workflows :"
|
||||
patch_dev_story
|
||||
patch_code_review
|
||||
|
||||
echo ""
|
||||
echo "Patch CLAUDE.md :"
|
||||
patch_claude_md
|
||||
|
||||
Reference in New Issue
Block a user