refactor: remover extensões .md de todos os artefatos — v3.0.0
- 55 arquivos .md renomeados para sem extensão - Convenção: artefatos de conhecimento sem extensão, scripts (.sh) e dados (.json) mantêm extensão - Scripts atualizados: gerar-manifesto.sh, atualizar-agente.sh, atualizar-agente.global.sh, gerar-agent-json.sh, verificar-linhas.sh - Documentação reescrita: AGENTS, README, EXTEND para refletir uso como submodule .agent direto - manifesto.json regenerado v3.0.0 - Todas as referências internas entre artefatos atualizadas BREAKING CHANGE: arquivos não possuem mais extensão .md
This commit is contained in:
parent
22023df81e
commit
bf9be375e2
58 changed files with 506 additions and 514 deletions
|
|
@ -6,7 +6,7 @@
|
|||
# Uso:
|
||||
# ./gerar-manifesto.sh
|
||||
#
|
||||
# Saída: .agent/manifesto.json
|
||||
# Saída: manifesto.json
|
||||
# =============================================================================
|
||||
|
||||
AGENT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
|
@ -19,7 +19,7 @@ echo "🔍 Gerando manifesto.json..."
|
|||
# Iniciar JSON
|
||||
cat > "$OUTPUT" << 'HEADER'
|
||||
{
|
||||
"versao": "2.0.0",
|
||||
"versao": "3.0.0",
|
||||
HEADER
|
||||
|
||||
echo " \"base_url\": \"$BASE_URL\"," >> "$OUTPUT"
|
||||
|
|
@ -29,11 +29,12 @@ echo " \"artefatos\": {" >> "$OUTPUT"
|
|||
# --- GLOBAL ---
|
||||
echo " \"global\": {" >> "$OUTPUT"
|
||||
|
||||
# global/rules
|
||||
# global/rules (arquivos sem extensão, excluir .sh e .json)
|
||||
echo " \"rules\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for f in "$AGENT_DIR/global/rules/"*.md; do
|
||||
for f in "$AGENT_DIR/global/rules/"*; do
|
||||
[ -f "$f" ] || continue
|
||||
case "$f" in *.sh|*.json) continue ;; esac
|
||||
REL="global/rules/$(basename "$f")"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
|
|
@ -44,8 +45,9 @@ echo " ]," >> "$OUTPUT"
|
|||
# global/workflows
|
||||
echo " \"workflows\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for f in "$AGENT_DIR/global/workflows/"*.md; do
|
||||
for f in "$AGENT_DIR/global/workflows/"*; do
|
||||
[ -f "$f" ] || continue
|
||||
case "$f" in *.sh|*.json) continue ;; esac
|
||||
REL="global/workflows/$(basename "$f")"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
|
|
@ -56,10 +58,10 @@ echo " ]," >> "$OUTPUT"
|
|||
# global/skills
|
||||
echo " \"skills\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for d in "$AGENT_DIR/global/skills/"/*/; do
|
||||
[ -f "$d/SKILL.md" ] || continue
|
||||
for d in "$AGENT_DIR/global/skills/"*/; do
|
||||
[ -f "$d/SKILL" ] || continue
|
||||
NOME=$(basename "$d")
|
||||
REL="global/skills/$NOME/SKILL.md"
|
||||
REL="global/skills/$NOME/SKILL"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
done
|
||||
|
|
@ -71,7 +73,7 @@ echo " }," >> "$OUTPUT"
|
|||
# --- AGENTS ---
|
||||
echo " \"agents\": {" >> "$OUTPUT"
|
||||
AGENT_FIRST=1
|
||||
for agente_dir in "$AGENT_DIR/agents/"/*/; do
|
||||
for agente_dir in "$AGENT_DIR/agents/"*/; do
|
||||
AGENTE=$(basename "$agente_dir")
|
||||
[ -d "$agente_dir" ] || continue
|
||||
|
||||
|
|
@ -80,8 +82,8 @@ for agente_dir in "$AGENT_DIR/agents/"/*/; do
|
|||
echo " \"$AGENTE\": {" >> "$OUTPUT"
|
||||
|
||||
# persona
|
||||
if [ -f "$agente_dir/persona.md" ]; then
|
||||
echo " \"persona\": \"agents/$AGENTE/persona.md\"," >> "$OUTPUT"
|
||||
if [ -f "$agente_dir/persona" ]; then
|
||||
echo " \"persona\": \"agents/$AGENTE/persona\"," >> "$OUTPUT"
|
||||
fi
|
||||
|
||||
# agent.json (se existir)
|
||||
|
|
@ -92,8 +94,9 @@ for agente_dir in "$AGENT_DIR/agents/"/*/; do
|
|||
# rules
|
||||
echo " \"rules\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for f in "$agente_dir/rules/"*.md; do
|
||||
for f in "$agente_dir/rules/"*; do
|
||||
[ -f "$f" ] || continue
|
||||
case "$f" in *.sh|*.json) continue ;; esac
|
||||
REL="agents/$AGENTE/rules/$(basename "$f")"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
|
|
@ -104,8 +107,9 @@ for agente_dir in "$AGENT_DIR/agents/"/*/; do
|
|||
# workflows
|
||||
echo " \"workflows\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for f in "$agente_dir/workflows/"*.md; do
|
||||
for f in "$agente_dir/workflows/"*; do
|
||||
[ -f "$f" ] || continue
|
||||
case "$f" in *.sh|*.json) continue ;; esac
|
||||
REL="agents/$AGENTE/workflows/$(basename "$f")"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
|
|
@ -116,10 +120,10 @@ for agente_dir in "$AGENT_DIR/agents/"/*/; do
|
|||
# skills
|
||||
echo " \"skills\": [" >> "$OUTPUT"
|
||||
FIRST=1
|
||||
for d in "$agente_dir/skills/"/*/; do
|
||||
[ -f "$d/SKILL.md" ] || continue
|
||||
for d in "$agente_dir/skills/"*/; do
|
||||
[ -f "$d/SKILL" ] || continue
|
||||
NOME=$(basename "$d")
|
||||
REL="agents/$AGENTE/skills/$NOME/SKILL.md"
|
||||
REL="agents/$AGENTE/skills/$NOME/SKILL"
|
||||
[ "$FIRST" = "1" ] && FIRST=0 || echo "," >> "$OUTPUT"
|
||||
printf ' "%s"' "$REL" >> "$OUTPUT"
|
||||
done
|
||||
|
|
@ -137,7 +141,7 @@ echo "}" >> "$OUTPUT"
|
|||
echo "✅ Manifesto gerado: $OUTPUT"
|
||||
echo ""
|
||||
echo "📊 Resumo:"
|
||||
echo " Global rules: $(ls "$AGENT_DIR/global/rules/" 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Global workflows: $(ls "$AGENT_DIR/global/workflows/" 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Global skills: $(ls "$AGENT_DIR/global/skills/" 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Agentes: $(ls -d "$AGENT_DIR/agents/"*/ 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Global rules: $(find "$AGENT_DIR/global/rules/" -maxdepth 1 -type f ! -name '*.sh' ! -name '*.json' 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Global workflows: $(find "$AGENT_DIR/global/workflows/" -maxdepth 1 -type f ! -name '*.sh' ! -name '*.json' 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Global skills: $(find "$AGENT_DIR/global/skills/" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')"
|
||||
echo " Agentes: $(find "$AGENT_DIR/agents/" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue