spec-first-copilot 0.5.0-beta.17 → 0.5.0-beta.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-first-copilot",
3
- "version": "0.5.0-beta.17",
3
+ "version": "0.5.0-beta.18",
4
4
  "description": "Spec-first workflow kit for GitHub Copilot — AI-driven development with specs, not guesswork",
5
5
  "bin": {
6
6
  "spec-first-copilot": "bin/cli.js"
@@ -71,9 +71,29 @@ function loadScope(pageId, targetDir):
71
71
  collectAllPages(pageId, allPages)
72
72
 
73
73
  para cada page em allPages:
74
- content = mcp__atlassian__confluence_get_page(page_id=page.id, convert_to_markdown=true)
74
+ // IMPORTANTE: SEMPRE pedir markdown, NUNCA storage format (HTML)
75
+ result = mcp__atlassian__confluence_get_page(page_id=page.id, convert_to_markdown=true)
76
+ content = result.content (ou result.body — depende da resposta do MCP)
77
+
78
+ // LIMPEZA OBRIGATÓRIA — Confluence pode vazar HTML mesmo com convert_to_markdown
79
+ // Se o conteúdo contém tags HTML (<p>, <div>, <span>, <table>, etc.):
80
+ // 1. Remover tags de metadata: <p local-id="...">, <ri:...>, <ac:...>
81
+ // 2. Converter tags semânticas pra markdown:
82
+ // <h1> → #, <h2> → ##, <h3> → ###
83
+ // <strong>/<b> → **texto**
84
+ // <em>/<i> → *texto*
85
+ // <a href="url"> → [texto](url)
86
+ // <ul>/<li> → - item
87
+ // <ol>/<li> → 1. item
88
+ // <code> → `código`
89
+ // <pre> → ```bloco```
90
+ // <table>/<tr>/<td> → tabela markdown
91
+ // 3. Remover tags restantes sem equivalente markdown (strip tags, manter texto)
92
+ // 4. Limpar linhas vazias excessivas
93
+ // O arquivo salvo DEVE ser markdown limpo, sem nenhuma tag HTML.
94
+
75
95
  filename = sanitize(page.title) + ".md"
76
- salvar content em {targetDir}/{filename}
96
+ salvar content LIMPO em {targetDir}/{filename}
77
97
  registrar no load-log
78
98
 
79
99
  // Attachments de CADA page