@lucapimenta/copy-chief-black 1.0.0

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.
Files changed (1197) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +185 -0
  3. package/README.md +211 -0
  4. package/bin/cli.js +98 -0
  5. package/framework/.aios-core/.dispatch-iterations.json +8 -0
  6. package/framework/.aios-core/constitution.md +171 -0
  7. package/framework/.aios-core/copy-chief/activation/agent-activation-pipeline.js +426 -0
  8. package/framework/.aios-core/copy-chief/activation/frontmatter-validator.js +81 -0
  9. package/framework/.aios-core/copy-chief/activation/knowledge-loader.js +608 -0
  10. package/framework/.aios-core/copy-chief/config/config-cache.js +145 -0
  11. package/framework/.aios-core/copy-chief/config/config-cache.ts +168 -0
  12. package/framework/.aios-core/copy-chief/config/config-loader.js +188 -0
  13. package/framework/.aios-core/copy-chief/config/config-loader.ts +250 -0
  14. package/framework/.aios-core/copy-chief/config/config-resolver.js +196 -0
  15. package/framework/.aios-core/copy-chief/config/config-resolver.ts +329 -0
  16. package/framework/.aios-core/copy-chief/config/env-interpolator.js +88 -0
  17. package/framework/.aios-core/copy-chief/config/env-interpolator.ts +125 -0
  18. package/framework/.aios-core/copy-chief/config/merge-utils.js +68 -0
  19. package/framework/.aios-core/copy-chief/config/merge-utils.ts +94 -0
  20. package/framework/.aios-core/copy-chief/config/mutability-guard.js +112 -0
  21. package/framework/.aios-core/copy-chief/context/aios-session-state.js +318 -0
  22. package/framework/.aios-core/copy-chief/context/aios-session-state.ts +381 -0
  23. package/framework/.aios-core/copy-chief/context/context-manager.js +316 -0
  24. package/framework/.aios-core/copy-chief/context/context-manager.ts +374 -0
  25. package/framework/.aios-core/copy-chief/context/context-tiering.js +196 -0
  26. package/framework/.aios-core/copy-chief/context/context-tiering.ts +268 -0
  27. package/framework/.aios-core/copy-chief/copy/copy-versioning.js +131 -0
  28. package/framework/.aios-core/copy-chief/copy/copy-versioning.ts +162 -0
  29. package/framework/.aios-core/copy-chief/copy/ids.js +231 -0
  30. package/framework/.aios-core/copy-chief/copy/ids.ts +345 -0
  31. package/framework/.aios-core/copy-chief/dispatch/dispatch-queue-manager.js +562 -0
  32. package/framework/.aios-core/copy-chief/etl/etl-helpers.js +539 -0
  33. package/framework/.aios-core/copy-chief/etl/etl-helpers.ts +855 -0
  34. package/framework/.aios-core/copy-chief/etl/platform-actors.js +215 -0
  35. package/framework/.aios-core/copy-chief/etl/platform-actors.ts +254 -0
  36. package/framework/.aios-core/copy-chief/execution/condition-evaluator.js +154 -0
  37. package/framework/.aios-core/copy-chief/execution/copy-prompt-builder.js +253 -0
  38. package/framework/.aios-core/copy-chief/execution/copy-workflow-executor.js +399 -0
  39. package/framework/.aios-core/copy-chief/execution/rate-limit-manager.js +277 -0
  40. package/framework/.aios-core/copy-chief/execution/wave-analyzer.js +285 -0
  41. package/framework/.aios-core/copy-chief/execution/workflow-validator.js +154 -0
  42. package/framework/.aios-core/copy-chief/feedback/validation-feedback.js +331 -0
  43. package/framework/.aios-core/copy-chief/feedback/validation-feedback.ts +392 -0
  44. package/framework/.aios-core/copy-chief/gates/checklist-generator.js +420 -0
  45. package/framework/.aios-core/copy-chief/gates/commit-validator.js +203 -0
  46. package/framework/.aios-core/copy-chief/gates/commit-validator.ts +239 -0
  47. package/framework/.aios-core/copy-chief/gates/copy-output-validator.js +204 -0
  48. package/framework/.aios-core/copy-chief/gates/copy-output-validator.ts +244 -0
  49. package/framework/.aios-core/copy-chief/gates/delivery-gate.js +147 -0
  50. package/framework/.aios-core/copy-chief/gates/focus-area-recommender.js +285 -0
  51. package/framework/.aios-core/copy-chief/gates/gate-audit.js +121 -0
  52. package/framework/.aios-core/copy-chief/gates/gate-evaluator.js +470 -0
  53. package/framework/.aios-core/copy-chief/gates/gate-evaluator.ts +575 -0
  54. package/framework/.aios-core/copy-chief/gates/gate-prereq.js +235 -0
  55. package/framework/.aios-core/copy-chief/gates/gate-prereq.ts +274 -0
  56. package/framework/.aios-core/copy-chief/gates/gate-resolver.js +252 -0
  57. package/framework/.aios-core/copy-chief/gates/gate-resolver.ts +321 -0
  58. package/framework/.aios-core/copy-chief/gates/gate-result-parser.js +81 -0
  59. package/framework/.aios-core/copy-chief/gates/gate-result-parser.ts +106 -0
  60. package/framework/.aios-core/copy-chief/gates/gate-trend-analyzer.js +122 -0
  61. package/framework/.aios-core/copy-chief/gates/mecanismo-gate.js +184 -0
  62. package/framework/.aios-core/copy-chief/gates/mecanismo-gate.ts +259 -0
  63. package/framework/.aios-core/copy-chief/gates/production-gates.js +488 -0
  64. package/framework/.aios-core/copy-chief/gates/production-gates.ts +655 -0
  65. package/framework/.aios-core/copy-chief/gates/quality-gate-manager.js +462 -0
  66. package/framework/.aios-core/copy-chief/gates/quality-gate-manager.ts +615 -0
  67. package/framework/.aios-core/copy-chief/gates/weighted-gates.js +792 -0
  68. package/framework/.aios-core/copy-chief/gates/weighted-gates.ts +1103 -0
  69. package/framework/.aios-core/copy-chief/handoff/handoff-engine.js +363 -0
  70. package/framework/.aios-core/copy-chief/handoff/handoff-engine.ts +562 -0
  71. package/framework/.aios-core/copy-chief/handoff/handoff-protocol.js +377 -0
  72. package/framework/.aios-core/copy-chief/health/checks/data-tier-integrity.js +106 -0
  73. package/framework/.aios-core/copy-chief/health/checks/hooks-heartbeat.js +120 -0
  74. package/framework/.aios-core/copy-chief/health/checks/synapse-performance.js +83 -0
  75. package/framework/.aios-core/copy-chief/health/doc-rot-scanner.js +687 -0
  76. package/framework/.aios-core/copy-chief/health/doc-rot-scanner.ts +853 -0
  77. package/framework/.aios-core/copy-chief/health/manifest-validator.js +156 -0
  78. package/framework/.aios-core/copy-chief/ids/mcp-circuit-breaker.js +246 -0
  79. package/framework/.aios-core/copy-chief/index.js +142 -0
  80. package/framework/.aios-core/copy-chief/integrations/clickup-client.js +168 -0
  81. package/framework/.aios-core/copy-chief/integrations/clickup-client.ts +226 -0
  82. package/framework/.aios-core/copy-chief/learning/gotcha-registry.js +398 -0
  83. package/framework/.aios-core/copy-chief/learning/gotchas-memory.js +430 -0
  84. package/framework/.aios-core/copy-chief/learning/gotchas-memory.ts +517 -0
  85. package/framework/.aios-core/copy-chief/learning/journey-tracker.js +287 -0
  86. package/framework/.aios-core/copy-chief/learning/journey-tracker.ts +373 -0
  87. package/framework/.aios-core/copy-chief/learning/self-learning.js +460 -0
  88. package/framework/.aios-core/copy-chief/learning/self-learning.ts +646 -0
  89. package/framework/.aios-core/copy-chief/lifecycle/copy-data-lifecycle.js +305 -0
  90. package/framework/.aios-core/copy-chief/lifecycle/session-digest.js +294 -0
  91. package/framework/.aios-core/copy-chief/lifecycle/session-digest.ts +327 -0
  92. package/framework/.aios-core/copy-chief/lifecycle/session-handoff.js +289 -0
  93. package/framework/.aios-core/copy-chief/lifecycle/session-handoff.ts +330 -0
  94. package/framework/.aios-core/copy-chief/memory/agent-memory-manager.js +313 -0
  95. package/framework/.aios-core/copy-chief/memory/agent-memory-writeback.js +178 -0
  96. package/framework/.aios-core/copy-chief/memory/index-updater.js +104 -0
  97. package/framework/.aios-core/copy-chief/memory/memory-compactor.js +152 -0
  98. package/framework/.aios-core/copy-chief/memory/memory-populator.js +215 -0
  99. package/framework/.aios-core/copy-chief/memory/session-digest-extractor.js +462 -0
  100. package/framework/.aios-core/copy-chief/observability/copy-status-writer.js +219 -0
  101. package/framework/.aios-core/copy-chief/observability/dashboard-client.js +302 -0
  102. package/framework/.aios-core/copy-chief/observability/dashboard-client.ts +366 -0
  103. package/framework/.aios-core/copy-chief/observability/dashboard-emitter.js +178 -0
  104. package/framework/.aios-core/copy-chief/observability/semantic-translator.js +264 -0
  105. package/framework/.aios-core/copy-chief/observability/semantic-translator.ts +354 -0
  106. package/framework/.aios-core/copy-chief/orchestration/deliverable-assignment.js +84 -0
  107. package/framework/.aios-core/copy-chief/orchestration/helix-orchestrator.js +403 -0
  108. package/framework/.aios-core/copy-chief/orchestration/lock-manager.js +301 -0
  109. package/framework/.aios-core/copy-chief/orchestration/offer-scanner.js +118 -0
  110. package/framework/.aios-core/copy-chief/orchestration/recovery-handler.js +377 -0
  111. package/framework/.aios-core/copy-chief/orchestration/task-complexity-classifier.js +253 -0
  112. package/framework/.aios-core/copy-chief/plan/execution-plan-generator.js +355 -0
  113. package/framework/.aios-core/copy-chief/plan/plan-metrics.js +129 -0
  114. package/framework/.aios-core/copy-chief/plan/plan-state-machine.js +403 -0
  115. package/framework/.aios-core/copy-chief/plan/plan-verification.js +163 -0
  116. package/framework/.aios-core/copy-chief/quality/persuasion-flow.js +211 -0
  117. package/framework/.aios-core/copy-chief/quality/persuasion-flow.ts +264 -0
  118. package/framework/.aios-core/copy-chief/quality/self-critique.js +277 -0
  119. package/framework/.aios-core/copy-chief/quality/self-critique.ts +284 -0
  120. package/framework/.aios-core/copy-chief/quality/template-validator.js +276 -0
  121. package/framework/.aios-core/copy-chief/quality/template-validator.ts +307 -0
  122. package/framework/.aios-core/copy-chief/recovery/recovery-handler.js +437 -0
  123. package/framework/.aios-core/copy-chief/recovery/recovery-handler.ts +569 -0
  124. package/framework/.aios-core/copy-chief/state/mecanismo-updater.js +189 -0
  125. package/framework/.aios-core/copy-chief/state/mecanismo-updater.ts +233 -0
  126. package/framework/.aios-core/copy-chief/state/offer-detector.js +117 -0
  127. package/framework/.aios-core/copy-chief/state/offer-detector.ts +166 -0
  128. package/framework/.aios-core/copy-chief/state/offer-state.js +338 -0
  129. package/framework/.aios-core/copy-chief/state/offer-state.ts +477 -0
  130. package/framework/.aios-core/copy-chief/state/session-state.js +543 -0
  131. package/framework/.aios-core/copy-chief/state/session-state.ts +729 -0
  132. package/framework/.aios-core/copy-chief/state/state-machine.js +345 -0
  133. package/framework/.aios-core/copy-chief/state/state-machine.ts +432 -0
  134. package/framework/.aios-core/copy-chief/surface/decision-queue.js +172 -0
  135. package/framework/.aios-core/copy-chief/surface/decision-queue.ts +285 -0
  136. package/framework/.aios-core/copy-chief/surface/surface-checker.js +155 -0
  137. package/framework/.aios-core/copy-chief/surface/surface-checker.ts +252 -0
  138. package/framework/.aios-core/copy-chief/utils/decision-detector.js +138 -0
  139. package/framework/.aios-core/copy-chief/utils/decision-detector.ts +193 -0
  140. package/framework/.aios-core/copy-chief/utils/file-discovery.js +180 -0
  141. package/framework/.aios-core/copy-chief/utils/file-discovery.ts +241 -0
  142. package/framework/.aios-core/copy-chief/utils/parallel-executor.js +125 -0
  143. package/framework/.aios-core/copy-chief/utils/parallel-executor.ts +140 -0
  144. package/framework/.aios-core/copy-chief/utils/processing-registry.js +218 -0
  145. package/framework/.aios-core/copy-chief/utils/processing-registry.ts +273 -0
  146. package/framework/.aios-core/copy-chief/utils/repetition-detector.js +157 -0
  147. package/framework/.aios-core/copy-chief/utils/repetition-detector.ts +173 -0
  148. package/framework/.aios-core/copy-chief/utils/suggestion-engine.js +328 -0
  149. package/framework/.aios-core/copy-chief/utils/suggestion-engine.ts +410 -0
  150. package/framework/.aios-core/copy-chief/utils/task-manager.js +320 -0
  151. package/framework/.aios-core/copy-chief/utils/task-manager.ts +355 -0
  152. package/framework/.aios-core/copy-chief/utils/yaml-validator.js +434 -0
  153. package/framework/.aios-core/copy-chief/utils/yaml-validator.ts +524 -0
  154. package/framework/.aios-core/copy-chief/workflow/confidence-scorer.js +253 -0
  155. package/framework/.aios-core/copy-chief/workflow/elicitation-engine.js +154 -0
  156. package/framework/.aios-core/copy-chief/workflow/gate-auto-advance.js +208 -0
  157. package/framework/.aios-core/copy-chief/workflow/gate-auto-advance.ts +261 -0
  158. package/framework/.aios-core/copy-chief/workflow/helix-phases.js +334 -0
  159. package/framework/.aios-core/copy-chief/workflow/helix-phases.ts +391 -0
  160. package/framework/.aios-core/copy-chief/workflow/helix-requirements.js +148 -0
  161. package/framework/.aios-core/copy-chief/workflow/helix-requirements.ts +161 -0
  162. package/framework/.aios-core/copy-chief/workflow/pattern-capture.js +238 -0
  163. package/framework/.aios-core/copy-chief/workflow/phase-checklist.js +246 -0
  164. package/framework/.aios-core/copy-chief/workflow/phase-checklist.ts +269 -0
  165. package/framework/.aios-core/copy-chief/workflow/skill-triggers.js +180 -0
  166. package/framework/.aios-core/copy-chief/workflow/skill-triggers.ts +179 -0
  167. package/framework/.aios-core/copy-chief/workflow/squad-creator.js +113 -0
  168. package/framework/.aios-core/copy-chief/workflow/story-manager.js +217 -0
  169. package/framework/.aios-core/copy-chief/workflow/suggestion-engine.js +307 -0
  170. package/framework/.aios-core/copy-chief/workflow/workflow-intelligence.js +290 -0
  171. package/framework/.aios-core/copy-chief/workflow/workflow-intelligence.ts +413 -0
  172. package/framework/.aios-core/copy-chief/workflow/workflow-state-manager.js +418 -0
  173. package/framework/.aios-core/copy-chief/workflow/workflow-state-manager.ts +516 -0
  174. package/framework/.aios-core/core/graph-dashboard/mermaid-formatter.js +275 -0
  175. package/framework/.aios-core/core/synapse/context/context-builder.js +34 -0
  176. package/framework/.aios-core/core/synapse/context/context-tracker.js +191 -0
  177. package/framework/.aios-core/core/synapse/diagnostics/collectors/consistency-collector.js +357 -0
  178. package/framework/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +254 -0
  179. package/framework/.aios-core/core/synapse/diagnostics/collectors/manifest-collector.js +82 -0
  180. package/framework/.aios-core/core/synapse/diagnostics/collectors/output-analyzer.js +134 -0
  181. package/framework/.aios-core/core/synapse/diagnostics/collectors/pipeline-collector.js +75 -0
  182. package/framework/.aios-core/core/synapse/diagnostics/collectors/quality-collector.js +363 -0
  183. package/framework/.aios-core/core/synapse/diagnostics/collectors/relevance-matrix.js +174 -0
  184. package/framework/.aios-core/core/synapse/diagnostics/collectors/safe-read-json.js +31 -0
  185. package/framework/.aios-core/core/synapse/diagnostics/collectors/session-collector.js +102 -0
  186. package/framework/.aios-core/core/synapse/diagnostics/collectors/timing-collector.js +157 -0
  187. package/framework/.aios-core/core/synapse/diagnostics/collectors/uap-collector.js +83 -0
  188. package/framework/.aios-core/core/synapse/diagnostics/report-formatter.js +460 -0
  189. package/framework/.aios-core/core/synapse/diagnostics/synapse-diagnostics.js +168 -0
  190. package/framework/.aios-core/core/synapse/domain/domain-loader.js +322 -0
  191. package/framework/.aios-core/core/synapse/engine.js +380 -0
  192. package/framework/.aios-core/core/synapse/layers/l0-constitution.js +80 -0
  193. package/framework/.aios-core/core/synapse/layers/l1-global.js +102 -0
  194. package/framework/.aios-core/core/synapse/layers/l2-agent.js +94 -0
  195. package/framework/.aios-core/core/synapse/layers/l3-workflow.js +94 -0
  196. package/framework/.aios-core/core/synapse/layers/l4-task.js +83 -0
  197. package/framework/.aios-core/core/synapse/layers/l5-squad.js +244 -0
  198. package/framework/.aios-core/core/synapse/layers/l6-keyword.js +155 -0
  199. package/framework/.aios-core/core/synapse/layers/l7-star-command.js +220 -0
  200. package/framework/.aios-core/core/synapse/layers/layer-processor.js +82 -0
  201. package/framework/.aios-core/core/synapse/memory/memory-bridge.js +214 -0
  202. package/framework/.aios-core/core/synapse/output/formatter.js +568 -0
  203. package/framework/.aios-core/core/synapse/runtime/hook-runtime.js +74 -0
  204. package/framework/.aios-core/core/synapse/scripts/generate-constitution.js +204 -0
  205. package/framework/.aios-core/core/synapse/session/session-manager.js +403 -0
  206. package/framework/.aios-core/core/synapse/utils/paths.js +57 -0
  207. package/framework/.aios-core/core/synapse/utils/tokens.js +25 -0
  208. package/framework/.aios-core/core-config.yaml +139 -0
  209. package/framework/.aios-core/framework-config.yaml +150 -0
  210. package/framework/.aios-core/package-lock.json +33 -0
  211. package/framework/.aios-core/package.json +9 -0
  212. package/framework/CHANGELOG.md +697 -0
  213. package/framework/CLAUDE.md +93 -0
  214. package/framework/COPY-CHIEF-INDEX.md +330 -0
  215. package/framework/COPY-DOCS-INDEX.md +120 -0
  216. package/framework/GUIA-ECOSSISTEMA.md +940 -0
  217. package/framework/GUIA-INSTALACAO.md +382 -0
  218. package/framework/GUIA-USO-ECOSSISTEMA.md +238 -0
  219. package/framework/QUICK-REFERENCE.md +123 -0
  220. package/framework/RUNBOOK.md +401 -0
  221. package/framework/WORKFLOW-CANONICO.md +422 -0
  222. package/framework/agents/CLAUDE.md +54 -0
  223. package/framework/agents/atlas/AGENT.md +167 -0
  224. package/framework/agents/atlas/MEMORY.md +49 -0
  225. package/framework/agents/atlas/SOUL.md +84 -0
  226. package/framework/agents/atlas.md +234 -0
  227. package/framework/agents/blade/AGENT.md +203 -0
  228. package/framework/agents/blade/MEMORY.md +34 -0
  229. package/framework/agents/blade/SOUL.md +87 -0
  230. package/framework/agents/blade.md +245 -0
  231. package/framework/agents/cipher/AGENT.md +210 -0
  232. package/framework/agents/cipher/MEMORY.md +38 -0
  233. package/framework/agents/cipher/SOUL.md +57 -0
  234. package/framework/agents/cipher.md +184 -0
  235. package/framework/agents/competitor-analyzer.md +224 -0
  236. package/framework/agents/copy-validator.md +55 -0
  237. package/framework/agents/copywriter.md +169 -0
  238. package/framework/agents/echo/AGENT.md +189 -0
  239. package/framework/agents/echo/MEMORY.md +41 -0
  240. package/framework/agents/echo/SOUL.md +58 -0
  241. package/framework/agents/echo.md +219 -0
  242. package/framework/agents/forge/AGENT.md +213 -0
  243. package/framework/agents/forge/MEMORY.md +40 -0
  244. package/framework/agents/forge/SOUL.md +84 -0
  245. package/framework/agents/forge.md +220 -0
  246. package/framework/agents/hawk/AGENT.md +204 -0
  247. package/framework/agents/hawk/MEMORY.md +47 -0
  248. package/framework/agents/hawk/SOUL.md +84 -0
  249. package/framework/agents/hawk.md +251 -0
  250. package/framework/agents/helix/AGENT.md +250 -0
  251. package/framework/agents/helix/MEMORY.md +54 -0
  252. package/framework/agents/helix/SOUL.md +77 -0
  253. package/framework/agents/helix.md +131 -0
  254. package/framework/agents/ops.md +134 -0
  255. package/framework/agents/reflection/AGENT.md +52 -0
  256. package/framework/agents/reflection/MEMORY.md +33 -0
  257. package/framework/agents/reflection/SOUL.md +55 -0
  258. package/framework/agents/researcher.md +209 -0
  259. package/framework/agents/reviewer.md +209 -0
  260. package/framework/agents/scad/production-agent.scad.md +221 -0
  261. package/framework/agents/scout/AGENT.md +190 -0
  262. package/framework/agents/scout/MEMORY.md +64 -0
  263. package/framework/agents/scout/SOUL.md +84 -0
  264. package/framework/agents/scout.md +126 -0
  265. package/framework/agents/sentinel/AGENT.md +171 -0
  266. package/framework/agents/sentinel/MEMORY.md +37 -0
  267. package/framework/agents/sentinel/SOUL.md +71 -0
  268. package/framework/agents/sentinel.md +77 -0
  269. package/framework/agents/strategist.md +130 -0
  270. package/framework/agents/synthesizer.md +167 -0
  271. package/framework/agents/voc-processor.md +197 -0
  272. package/framework/agents/vox/AGENT.md +242 -0
  273. package/framework/agents/vox/MEMORY.md +81 -0
  274. package/framework/agents/vox/SOUL.md +90 -0
  275. package/framework/agents/vox.md +140 -0
  276. package/framework/checklists/aios-verification.yaml +226 -0
  277. package/framework/commands/CLAUDE.md +1 -0
  278. package/framework/commands/analyze.md +39 -0
  279. package/framework/commands/architecture.md +37 -0
  280. package/framework/commands/assemble.md +39 -0
  281. package/framework/commands/cc.md +317 -0
  282. package/framework/commands/checklist.md +35 -0
  283. package/framework/commands/classify.md +108 -0
  284. package/framework/commands/clickup-setup.md +107 -0
  285. package/framework/commands/clone-expert.md +283 -0
  286. package/framework/commands/conclave.md +55 -0
  287. package/framework/commands/create-offer.md +245 -0
  288. package/framework/commands/dag.md +196 -0
  289. package/framework/commands/debate.md +232 -0
  290. package/framework/commands/diagnose-offer.md +184 -0
  291. package/framework/commands/dossier.md +112 -0
  292. package/framework/commands/expert.md +49 -0
  293. package/framework/commands/extract-dna.md +193 -0
  294. package/framework/commands/health.md +242 -0
  295. package/framework/commands/helix-parallel.md +334 -0
  296. package/framework/commands/help.md +85 -0
  297. package/framework/commands/ideate.md +37 -0
  298. package/framework/commands/inbox.md +164 -0
  299. package/framework/commands/ingest.md +127 -0
  300. package/framework/commands/investigate.md +236 -0
  301. package/framework/commands/merge.md +35 -0
  302. package/framework/commands/next-action.md +73 -0
  303. package/framework/commands/overnight.md +177 -0
  304. package/framework/commands/pipeline.md +67 -0
  305. package/framework/commands/plan-execution.md +127 -0
  306. package/framework/commands/pre-delivery.md +55 -0
  307. package/framework/commands/produce-offer.md +322 -0
  308. package/framework/commands/production-brief.md +165 -0
  309. package/framework/commands/registry.md +22 -0
  310. package/framework/commands/resume.md +422 -0
  311. package/framework/commands/review-all.md +315 -0
  312. package/framework/commands/squad-research.md +121 -0
  313. package/framework/commands/status.md +71 -0
  314. package/framework/commands/story.md +34 -0
  315. package/framework/commands/sync-ecosystem.md +359 -0
  316. package/framework/commands/sync-project.md +69 -0
  317. package/framework/commands/update-ecosystem.md +382 -0
  318. package/framework/commands/validate-batch.md +231 -0
  319. package/framework/commands/validate.md +29 -0
  320. package/framework/config/batch-validation.yaml +59 -0
  321. package/framework/config/overnight.yaml +111 -0
  322. package/framework/config/surface-criteria.yaml +147 -0
  323. package/framework/config/workflow-loops.yaml +174 -0
  324. package/framework/constitution.md +199 -0
  325. package/framework/copy-squad/abraham.md +690 -0
  326. package/framework/copy-squad/agora.md +624 -0
  327. package/framework/copy-squad/bencivenga.md +953 -0
  328. package/framework/copy-squad/brown.md +1336 -0
  329. package/framework/copy-squad/brunson.md +743 -0
  330. package/framework/copy-squad/caples.md +1039 -0
  331. package/framework/copy-squad/carlton.md +872 -0
  332. package/framework/copy-squad/chaperon.md +520 -0
  333. package/framework/copy-squad/checklists/abraham-strategy-multiplier.md +416 -0
  334. package/framework/copy-squad/checklists/agora-promo-audit.md +607 -0
  335. package/framework/copy-squad/checklists/bencivenga-persuasion-audit.md +448 -0
  336. package/framework/copy-squad/checklists/brown-e5-method.md +415 -0
  337. package/framework/copy-squad/checklists/brown-mechanism-audit.md +385 -0
  338. package/framework/copy-squad/checklists/brunson-funnel-secrets.md +577 -0
  339. package/framework/copy-squad/checklists/caples-tested-methods.md +358 -0
  340. package/framework/copy-squad/checklists/carlton-street-smart.md +337 -0
  341. package/framework/copy-squad/checklists/chaperon-email-arc.md +334 -0
  342. package/framework/copy-squad/checklists/cialdini-persuasion-principles.md +401 -0
  343. package/framework/copy-squad/checklists/collier-entry-diagnostic.md +185 -0
  344. package/framework/copy-squad/checklists/halbert-bullet-proof.md +364 -0
  345. package/framework/copy-squad/checklists/hopkins-scientific-checklist.md +527 -0
  346. package/framework/copy-squad/checklists/hormozi-offer-creation.md +612 -0
  347. package/framework/copy-squad/checklists/kennedy-close-stack.md +239 -0
  348. package/framework/copy-squad/checklists/kennedy-no-bs-checklist.md +306 -0
  349. package/framework/copy-squad/checklists/kern-intent-based-branding.md +458 -0
  350. package/framework/copy-squad/checklists/makepeace-control-killer.md +633 -0
  351. package/framework/copy-squad/checklists/marcondes-primary.md +50 -0
  352. package/framework/copy-squad/checklists/ogilvy-brand-response.md +438 -0
  353. package/framework/copy-squad/checklists/powers-emotional-dr.md +280 -0
  354. package/framework/copy-squad/checklists/reeves-usp-audit.md +498 -0
  355. package/framework/copy-squad/checklists/ry-schwartz-conversion-copy.md +479 -0
  356. package/framework/copy-squad/checklists/sabri-selling-like-crazy.md +329 -0
  357. package/framework/copy-squad/checklists/schwartz-awareness-calibration.md +380 -0
  358. package/framework/copy-squad/checklists/schwartz-awareness-levels.md +593 -0
  359. package/framework/copy-squad/checklists/sugarman-30-triggers.md +437 -0
  360. package/framework/copy-squad/checklists/vaynerchuk-content-strategy.md +402 -0
  361. package/framework/copy-squad/cialdini.md +861 -0
  362. package/framework/copy-squad/collier.md +637 -0
  363. package/framework/copy-squad/copy-chief.md +204 -0
  364. package/framework/copy-squad/expert-index.json +2436 -0
  365. package/framework/copy-squad/halbert.md +1003 -0
  366. package/framework/copy-squad/hopkins.md +901 -0
  367. package/framework/copy-squad/hormozi.md +733 -0
  368. package/framework/copy-squad/kennedy.md +1159 -0
  369. package/framework/copy-squad/kern.md +626 -0
  370. package/framework/copy-squad/makepeace.md +895 -0
  371. package/framework/copy-squad/manifest.yaml +403 -0
  372. package/framework/copy-squad/manifest.yaml.bak +383 -0
  373. package/framework/copy-squad/marcondes.md +307 -0
  374. package/framework/copy-squad/ogilvy.md +1056 -0
  375. package/framework/copy-squad/powers.md +576 -0
  376. package/framework/copy-squad/reeves.md +681 -0
  377. package/framework/copy-squad/ry-schwartz.md +964 -0
  378. package/framework/copy-squad/sabri.md +936 -0
  379. package/framework/copy-squad/schwartz.md +1245 -0
  380. package/framework/copy-squad/sugarman.md +1331 -0
  381. package/framework/copy-squad/tasks/bullet-writing.md +42 -0
  382. package/framework/copy-squad/tasks/cta-framework.md +68 -0
  383. package/framework/copy-squad/tasks/dre-escalation.md +41 -0
  384. package/framework/copy-squad/tasks/email-sequence.md +39 -0
  385. package/framework/copy-squad/tasks/future-pacing.md +37 -0
  386. package/framework/copy-squad/tasks/guarantee-framework.md +59 -0
  387. package/framework/copy-squad/tasks/headline-testing.md +59 -0
  388. package/framework/copy-squad/tasks/lead-generation.md +48 -0
  389. package/framework/copy-squad/tasks/logo-test-verification.md +45 -0
  390. package/framework/copy-squad/tasks/manifest.yaml +144 -0
  391. package/framework/copy-squad/tasks/mechanism-naming.md +58 -0
  392. package/framework/copy-squad/tasks/objection-demolition.md +41 -0
  393. package/framework/copy-squad/tasks/offer-stack.md +51 -0
  394. package/framework/copy-squad/tasks/proof-stacking.md +45 -0
  395. package/framework/copy-squad/tasks/sensory-scene-builder.md +48 -0
  396. package/framework/copy-squad/tasks/story-framework.md +66 -0
  397. package/framework/copy-squad/tasks/tribal-exclusivity.md +37 -0
  398. package/framework/copy-squad/tasks/urgency-framework.md +50 -0
  399. package/framework/copy-squad/tasks/urgency-injection.md +46 -0
  400. package/framework/copy-squad/tasks/voc-language-check.md +38 -0
  401. package/framework/copy-squad/tasks/vsl-hook.md +36 -0
  402. package/framework/copy-squad/vaynerchuk.md +579 -0
  403. package/framework/copy-surface-criteria.yaml +101 -0
  404. package/framework/core-config.yaml +243 -0
  405. package/framework/data/workflow-patterns.yaml +252 -0
  406. package/framework/docs/backup-strategy.md +312 -0
  407. package/framework/docs/commands-index.md +382 -0
  408. package/framework/docs/copy-fundamentals/01-psicologia-humana.md +282 -0
  409. package/framework/docs/copy-fundamentals/02-consciencia-mercado.md +262 -0
  410. package/framework/docs/copy-fundamentals/03-metodologia-3ms.md +289 -0
  411. package/framework/docs/copy-fundamentals/04-nuuppecc-hooks.md +258 -0
  412. package/framework/docs/copy-fundamentals/05-curiosity-gap.md +262 -0
  413. package/framework/docs/copy-fundamentals/06-storytelling.md +301 -0
  414. package/framework/docs/copy-fundamentals/07-processo-escrita.md +296 -0
  415. package/framework/docs/copy-fundamentals/08-formato-vs-angulo.md +272 -0
  416. package/framework/docs/copy-fundamentals/09-estrutura-blocos.md +301 -0
  417. package/framework/docs/copy-fundamentals/10-tecnicas-execucao.md +625 -0
  418. package/framework/docs/copy-fundamentals/11-principios-2026.md +338 -0
  419. package/framework/docs/copy-fundamentals/12-big-ideas.md +345 -0
  420. package/framework/docs/copy-fundamentals/CLAUDE.md +137 -0
  421. package/framework/docs/hooks-guide.md +515 -0
  422. package/framework/docs/mcp-usage-guide.md +423 -0
  423. package/framework/docs/quality-gates-decision-tree.md +406 -0
  424. package/framework/docs/swipe-files-index.md +345 -0
  425. package/framework/dossiers/.archive/person-dr-richter-archived-2026-03-01.yaml +24 -0
  426. package/framework/dossiers/mechanism/morte-das-celulas-de-lubrificacao.yaml +24 -0
  427. package/framework/dossiers/person/dr-klaus-richter.yaml +58 -0
  428. package/framework/ecosystem-status.md +214 -0
  429. package/framework/experts/fidelity/apex-prompts.yaml +380 -0
  430. package/framework/framework-config.yaml +282 -0
  431. package/framework/gotchas/gotchas.yaml +66 -0
  432. package/framework/hooks/CLAUDE.md +1 -0
  433. package/framework/hooks/agent-activation-hook.cjs +345 -0
  434. package/framework/hooks/agent-authority-gate.cjs +100 -0
  435. package/framework/hooks/agent-memory-writeback.js +23 -0
  436. package/framework/hooks/agent-memory-writeback.ts +42 -0
  437. package/framework/hooks/agent-state-recorder.cjs +310 -0
  438. package/framework/hooks/analyze-production-task.cjs +85 -0
  439. package/framework/hooks/analyze-production-task.sh +42 -0
  440. package/framework/hooks/auto-approve-reads.cjs +41 -0
  441. package/framework/hooks/auto-approve-reads.sh +21 -0
  442. package/framework/hooks/bun.lock +19 -0
  443. package/framework/hooks/clickup-deliverable-sync.js +38 -0
  444. package/framework/hooks/clickup-deliverable-sync.ts +53 -0
  445. package/framework/hooks/clickup-gate-sync.js +33 -0
  446. package/framework/hooks/clickup-gate-sync.ts +49 -0
  447. package/framework/hooks/command-auto-discovery.js +58 -0
  448. package/framework/hooks/command-auto-discovery.ts +84 -0
  449. package/framework/hooks/completion-verifier.js +46 -0
  450. package/framework/hooks/completion-verifier.ts +84 -0
  451. package/framework/hooks/context-tracker.js +52 -0
  452. package/framework/hooks/context-tracker.ts +88 -0
  453. package/framework/hooks/copy-attribution.js +56 -0
  454. package/framework/hooks/copy-attribution.ts +60 -0
  455. package/framework/hooks/copy-version-backup.js +26 -0
  456. package/framework/hooks/copy-version-backup.ts +38 -0
  457. package/framework/hooks/dashboard-autostart.cjs +68 -0
  458. package/framework/hooks/dashboard-autostart.sh +47 -0
  459. package/framework/hooks/dashboard-emit.js +39 -0
  460. package/framework/hooks/dashboard-emit.ts +29 -0
  461. package/framework/hooks/data-lifecycle-hook.cjs +64 -0
  462. package/framework/hooks/decision-detector.js +28 -0
  463. package/framework/hooks/decision-detector.ts +40 -0
  464. package/framework/hooks/detect-clear-protect.cjs +79 -0
  465. package/framework/hooks/detect-clear-protect.sh +90 -0
  466. package/framework/hooks/discover-offer-context.cjs +327 -0
  467. package/framework/hooks/discover-offer-context.sh +464 -0
  468. package/framework/hooks/discovery-before-create.js +21 -0
  469. package/framework/hooks/discovery-before-create.ts +36 -0
  470. package/framework/hooks/doc-rot-detector.js +59 -0
  471. package/framework/hooks/doc-rot-detector.ts +87 -0
  472. package/framework/hooks/error-handler.js +50 -0
  473. package/framework/hooks/error-handler.ts +77 -0
  474. package/framework/hooks/etl-voc-post.js +51 -0
  475. package/framework/hooks/etl-voc-post.ts +81 -0
  476. package/framework/hooks/fidelity-check.js +54 -0
  477. package/framework/hooks/fidelity-check.ts +58 -0
  478. package/framework/hooks/filter-bash-output.cjs +66 -0
  479. package/framework/hooks/filter-bash-output.sh +61 -0
  480. package/framework/hooks/gate-tracker.js +115 -0
  481. package/framework/hooks/gate-tracker.ts +174 -0
  482. package/framework/hooks/gotcha-error-capture.js +38 -0
  483. package/framework/hooks/gotcha-error-capture.ts +65 -0
  484. package/framework/hooks/handoff-validator-hook.cjs +631 -0
  485. package/framework/hooks/helix-orchestrator-boot.cjs +227 -0
  486. package/framework/hooks/helix-phase-mecanismo.cjs +119 -0
  487. package/framework/hooks/helix-phase-mecanismo.sh +238 -0
  488. package/framework/hooks/ids-register.js +71 -0
  489. package/framework/hooks/ids-register.ts +100 -0
  490. package/framework/hooks/journey-log.js +18 -0
  491. package/framework/hooks/journey-log.ts +32 -0
  492. package/framework/hooks/lib/CLAUDE.md +1 -0
  493. package/framework/hooks/lib/hook-helpers.sh +61 -0
  494. package/framework/hooks/log-tool-failure.cjs +36 -0
  495. package/framework/hooks/log-tool-failure.sh +13 -0
  496. package/framework/hooks/mcp-circuit-breaker-hook.cjs +95 -0
  497. package/framework/hooks/mcp-query-validator.cjs +58 -0
  498. package/framework/hooks/mcp-query-validator.sh +69 -0
  499. package/framework/hooks/mecanismo-validation.js +18 -0
  500. package/framework/hooks/mecanismo-validation.ts +35 -0
  501. package/framework/hooks/memory-auto-populate.js +22 -0
  502. package/framework/hooks/memory-auto-populate.ts +38 -0
  503. package/framework/hooks/memory-bracket-injector.js +131 -0
  504. package/framework/hooks/memory-bracket-injector.ts +146 -0
  505. package/framework/hooks/memory-context.cjs +72 -0
  506. package/framework/hooks/memory-context.sh +60 -0
  507. package/framework/hooks/mermaid-auto-update.js +57 -0
  508. package/framework/hooks/mermaid-auto-update.ts +106 -0
  509. package/framework/hooks/meta-prompt-reminder.js +103 -0
  510. package/framework/hooks/meta-prompt-reminder.ts +172 -0
  511. package/framework/hooks/ops-commit-scanner.cjs +214 -0
  512. package/framework/hooks/package-lock.json +560 -0
  513. package/framework/hooks/package.json +11 -0
  514. package/framework/hooks/persona-detector.cjs +142 -0
  515. package/framework/hooks/persuasion-flow-check.js +20 -0
  516. package/framework/hooks/persuasion-flow-check.ts +35 -0
  517. package/framework/hooks/phase-advance-gate.js +119 -0
  518. package/framework/hooks/phase-advance-gate.ts +162 -0
  519. package/framework/hooks/phase-gate.js +124 -0
  520. package/framework/hooks/phase-gate.ts +184 -0
  521. package/framework/hooks/pipeline-enforcer.cjs +517 -0
  522. package/framework/hooks/pipeline-intent-detector.cjs +720 -0
  523. package/framework/hooks/pipeline-state-projector.cjs +288 -0
  524. package/framework/hooks/plan-session-guard.cjs +153 -0
  525. package/framework/hooks/post-gate-auto-advance.js +27 -0
  526. package/framework/hooks/post-gate-auto-advance.ts +43 -0
  527. package/framework/hooks/post-mcp-mecanismo-update.js +39 -0
  528. package/framework/hooks/post-mcp-mecanismo-update.ts +30 -0
  529. package/framework/hooks/post-production-validate.js +140 -0
  530. package/framework/hooks/post-production-validate.ts +198 -0
  531. package/framework/hooks/post-tool-use.js +87 -0
  532. package/framework/hooks/post-tool-use.ts +141 -0
  533. package/framework/hooks/post-validation-feedback.js +28 -0
  534. package/framework/hooks/post-validation-feedback.ts +42 -0
  535. package/framework/hooks/pre-compact-save.cjs +23 -0
  536. package/framework/hooks/pre-compact-save.sh +21 -0
  537. package/framework/hooks/pre-tool-use-gate.js +238 -0
  538. package/framework/hooks/pre-tool-use-gate.ts +321 -0
  539. package/framework/hooks/precompact-session-digest.cjs +72 -0
  540. package/framework/hooks/processing-check.js +22 -0
  541. package/framework/hooks/processing-check.ts +41 -0
  542. package/framework/hooks/production-delegation-gate.js +141 -0
  543. package/framework/hooks/production-delegation-gate.ts +225 -0
  544. package/framework/hooks/production-preflight.cjs +58 -0
  545. package/framework/hooks/production-preflight.sh +59 -0
  546. package/framework/hooks/record-tool-in-offer.js +45 -0
  547. package/framework/hooks/record-tool-in-offer.ts +81 -0
  548. package/framework/hooks/registry-check.js +110 -0
  549. package/framework/hooks/registry-check.ts +130 -0
  550. package/framework/hooks/regra-2x-detector.js +32 -0
  551. package/framework/hooks/regra-2x-detector.ts +53 -0
  552. package/framework/hooks/self-critique-preflight.js +33 -0
  553. package/framework/hooks/self-critique-preflight.ts +45 -0
  554. package/framework/hooks/session-digest-save.js +20 -0
  555. package/framework/hooks/session-digest-save.ts +31 -0
  556. package/framework/hooks/session-handoff.js +40 -0
  557. package/framework/hooks/session-handoff.ts +49 -0
  558. package/framework/hooks/setup-environment.cjs +65 -0
  559. package/framework/hooks/setup-environment.sh +43 -0
  560. package/framework/hooks/stop-copy-validation.js +71 -0
  561. package/framework/hooks/stop-copy-validation.ts +82 -0
  562. package/framework/hooks/story-required-gate.js +174 -0
  563. package/framework/hooks/story-required-gate.ts +259 -0
  564. package/framework/hooks/subagent-start-log.cjs +38 -0
  565. package/framework/hooks/subagent-start-log.sh +22 -0
  566. package/framework/hooks/subagent-stop-validate.cjs +42 -0
  567. package/framework/hooks/subagent-stop-validate.sh +26 -0
  568. package/framework/hooks/suggestion-on-gate.js +35 -0
  569. package/framework/hooks/suggestion-on-gate.ts +61 -0
  570. package/framework/hooks/synapse-engine.cjs +77 -0
  571. package/framework/hooks/sync-repos-on-stop.cjs +200 -0
  572. package/framework/hooks/sync-repos-on-stop.sh +75 -0
  573. package/framework/hooks/sync-site.cjs +54 -0
  574. package/framework/hooks/sync-site.sh +33 -0
  575. package/framework/hooks/template-header-validation.js +23 -0
  576. package/framework/hooks/template-header-validation.ts +41 -0
  577. package/framework/hooks/tool-enforcement-gate.js +110 -0
  578. package/framework/hooks/tool-enforcement-gate.ts +147 -0
  579. package/framework/hooks/tool-matrix-enforcer.js +134 -0
  580. package/framework/hooks/tool-matrix-enforcer.ts +222 -0
  581. package/framework/hooks/tsconfig.json +25 -0
  582. package/framework/hooks/validate-before-commit.js +61 -0
  583. package/framework/hooks/validate-before-commit.ts +87 -0
  584. package/framework/hooks/validate-gate-prereq.js +132 -0
  585. package/framework/hooks/validate-gate-prereq.ts +180 -0
  586. package/framework/hooks/voc-naming-validator.js +46 -0
  587. package/framework/hooks/voc-naming-validator.ts +80 -0
  588. package/framework/ids/decisions.json +657 -0
  589. package/framework/knowledge/README.md +88 -0
  590. package/framework/knowledge/classification-maap.md +406 -0
  591. package/framework/knowledge/cloned/leonardo-marcondes-madureira.md +344 -0
  592. package/framework/knowledge/experts/leonardo-marcondes-madureira.md +93 -0
  593. package/framework/knowledge/frameworks/maap-marketing-juridico.md +96 -0
  594. package/framework/knowledge/ingestion-tracking.yaml +19 -0
  595. package/framework/knowledge/patterns-by-niche.yaml +914 -0
  596. package/framework/knowledge/universal/aios-architecture-patterns.md +341 -0
  597. package/framework/knowledge/universal/aios-deep/README.md +21 -0
  598. package/framework/knowledge/universal/aios-framework.md +73785 -0
  599. package/framework/knowledge/universal/copy-frameworks.md +6 -0
  600. package/framework/knowledge/universal/esteira-escalonada.md +122 -0
  601. package/framework/knowledge/universal/expert-insights.md +6 -0
  602. package/framework/knowledge/universal/funil-lancamento-3-fases.md +219 -0
  603. package/framework/knowledge/universal/general.md +6 -0
  604. package/framework/knowledge/universal/persuasion-principles.md +12 -0
  605. package/framework/knowledge/voc/maap-advogados-2026.md +143 -0
  606. package/framework/learned-patterns/.last-tools.json +6 -0
  607. package/framework/learned-patterns/.suggest-cooldown.json +3 -0
  608. package/framework/learned-patterns/patterns.yaml +38 -0
  609. package/framework/learned-patterns/wie-data.json +298 -0
  610. package/framework/manifest.yaml +751 -0
  611. package/framework/orchestrator.md +178 -0
  612. package/framework/reference/anti-homogeneization.md +228 -0
  613. package/framework/reference/anti-sycophancy.md +171 -0
  614. package/framework/reference/briefings-helix.md +162 -0
  615. package/framework/reference/bssf-decision.md +175 -0
  616. package/framework/reference/ceremony-detection.md +136 -0
  617. package/framework/reference/constraint-progressivo.md +344 -0
  618. package/framework/reference/context-management.md +176 -0
  619. package/framework/reference/copy-chief.md +253 -0
  620. package/framework/reference/copy-fidelity.md +234 -0
  621. package/framework/reference/copy-production.md +185 -0
  622. package/framework/reference/debugging-hypothesis.md +418 -0
  623. package/framework/reference/dual-doc-taxonomy.md +62 -0
  624. package/framework/reference/ecosystem.md +219 -0
  625. package/framework/reference/epistemic-protocol.md +214 -0
  626. package/framework/reference/mecanismo-unico.md +212 -0
  627. package/framework/reference/micro-unidades.md +144 -0
  628. package/framework/reference/offers/concursa-ai.md +66 -0
  629. package/framework/reference/offers/gabaritando-portugues.md +53 -0
  630. package/framework/reference/signal-translation.md +256 -0
  631. package/framework/reference/structured-exploration.md +361 -0
  632. package/framework/reference/synthesis-flow.md +202 -0
  633. package/framework/reference/tool-usage-matrix.md +366 -0
  634. package/framework/reference/voc-research.md +291 -0
  635. package/framework/references/copy-fundamentals/CLAUDE.md +1 -0
  636. package/framework/references/copy-fundamentals/SKILL.md +78 -0
  637. package/framework/references/copy-fundamentals/references/CLAUDE.md +1 -0
  638. package/framework/references/copy-fundamentals/references/antes-depois-tecnica.md +279 -0
  639. package/framework/references/copy-fundamentals/references/big-ideas.md +167 -0
  640. package/framework/references/copy-fundamentals/references/disparos-dopamina.md +172 -0
  641. package/framework/references/copy-fundamentals/references/erros-fatais.md +275 -0
  642. package/framework/references/copy-fundamentals/references/escrita-viva-principios.md +273 -0
  643. package/framework/references/copy-fundamentals/references/estrutura-mecanismo.md +127 -0
  644. package/framework/references/copy-fundamentals/references/glossario-copy.md +185 -0
  645. package/framework/references/copy-fundamentals/references/pesquisa-estrategica.md +186 -0
  646. package/framework/references/copy-fundamentals/references/principios-escrita.md +218 -0
  647. package/framework/references/copy-fundamentals/references/psicologia-persuasao.md +150 -0
  648. package/framework/references/copy-fundamentals/references/revisao-universal.md +171 -0
  649. package/framework/registry.yaml +699 -0
  650. package/framework/rules/CLAUDE.md +5 -0
  651. package/framework/rules/offers/cognixor.md +53 -0
  652. package/framework/rules/offers/florayla.md +50 -0
  653. package/framework/rules/offers/neuvelys.md +60 -0
  654. package/framework/rules/offers/quimica-amarracao.md +49 -0
  655. package/framework/schemas/checklist-definition.schema.yaml +172 -0
  656. package/framework/schemas/clickup-sync.schema.yaml +89 -0
  657. package/framework/schemas/copy-attribution.schema.yaml +134 -0
  658. package/framework/schemas/dispatch-request.schema.yaml +43 -0
  659. package/framework/schemas/dossier.schema.yaml +70 -0
  660. package/framework/schemas/helix-phases.yaml +350 -0
  661. package/framework/schemas/helix-phases.yaml.bak +350 -0
  662. package/framework/schemas/helix-state.schema.yaml +136 -0
  663. package/framework/schemas/mecanismo-unico.schema.yaml +249 -0
  664. package/framework/schemas/mecanismo-unico.schema.yaml.bak +249 -0
  665. package/framework/schemas/memory-tiers.schema.yaml +360 -0
  666. package/framework/schemas/persuasion-chunk.schema.yaml +150 -0
  667. package/framework/schemas/pipeline-dag.schema.yaml +193 -0
  668. package/framework/schemas/processing-registry.schema.yaml +143 -0
  669. package/framework/schemas/task-definition.schema.yaml +137 -0
  670. package/framework/schemas/template-header.schema.yaml +151 -0
  671. package/framework/schemas/workflow-loop.schema.yaml +231 -0
  672. package/framework/scripts/CLAUDE.md +1 -0
  673. package/framework/scripts/export-web.js +120 -0
  674. package/framework/scripts/health-check.js +413 -0
  675. package/framework/scripts/health-check.ts +596 -0
  676. package/framework/scripts/statusline.sh +221 -0
  677. package/framework/scripts/sync-ide.js +142 -0
  678. package/framework/skills/.serena/memories/aios-exploration-plan.md +64 -0
  679. package/framework/skills/.serena/project.yml +121 -0
  680. package/framework/skills/CLAUDE.md +1 -0
  681. package/framework/skills/audience-research-agent/CLAUDE.md +1 -0
  682. package/framework/skills/audience-research-agent/SKILL.md +486 -0
  683. package/framework/skills/audience-research-agent/references/aula_01_principios_fundamentais.md +559 -0
  684. package/framework/skills/audience-research-agent/references/aula_02_psicologia_engenheiro.md +191 -0
  685. package/framework/skills/audience-research-agent/references/aula_04_puzzle_pieces.md +311 -0
  686. package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_01_intro_conversa.md +62 -0
  687. package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_02_ritmo_sensorial.md +61 -0
  688. package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_03_metodo_abc.md +79 -0
  689. package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_04_edicao_camadas.md +79 -0
  690. package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_05_problemas_recursos.md +84 -0
  691. package/framework/skills/audience-research-agent/references/ref_frameworks_georgi_evaldo_makepeace_ramalho_schwartz.md +278 -0
  692. package/framework/skills/audience-research-agent/references/ref_frameworks_jtbd_robbins_kahneman_empathy.md +277 -0
  693. package/framework/skills/audience-research-agent/references/ref_gatilhos_reptilianos_10.md +29 -0
  694. package/framework/skills/audience-research-agent/references/ref_platform_amazon.md +85 -0
  695. package/framework/skills/audience-research-agent/references/ref_platform_instagram.md +212 -0
  696. package/framework/skills/audience-research-agent/references/ref_platform_mercadolivre.md +236 -0
  697. package/framework/skills/audience-research-agent/references/ref_platform_reclameaqui.md +262 -0
  698. package/framework/skills/audience-research-agent/references/ref_platform_reddit.md +127 -0
  699. package/framework/skills/audience-research-agent/references/ref_platform_tiktok.md +227 -0
  700. package/framework/skills/audience-research-agent/references/ref_platform_youtube.md +187 -0
  701. package/framework/skills/audience-research-agent/references/ref_readiness_score_5_dimensions.md +247 -0
  702. package/framework/skills/audience-research-agent/references/ref_voc_database_schema.md +362 -0
  703. package/framework/skills/audience-research-agent/references/ref_voc_sources_rules_templates.md +352 -0
  704. package/framework/skills/audience-research-agent/references/ref_workflow_modular_4_modules.md +361 -0
  705. package/framework/skills/audience-research-agent/templates/fase-01-inputs-template.md +278 -0
  706. package/framework/skills/copy-critic/CLAUDE.md +1 -0
  707. package/framework/skills/copy-critic/SKILL.md +684 -0
  708. package/framework/skills/copy-critic/references/anti-patterns.md +270 -0
  709. package/framework/skills/copy-critic/references/checklist-validacao.md +238 -0
  710. package/framework/skills/copy-critic/references/escrita.md +569 -0
  711. package/framework/skills/copy-critic/references/exemplos-aprovados.md +216 -0
  712. package/framework/skills/copy-critic/references/exemplos-reprovados.md +312 -0
  713. package/framework/skills/copy-critic/references/metodologia-stand.md +192 -0
  714. package/framework/skills/copy-critic/references/psicologia.md +333 -0
  715. package/framework/skills/criativos-agent/CLAUDE.md +238 -0
  716. package/framework/skills/criativos-agent/SKILL.md +229 -0
  717. package/framework/skills/criativos-agent/references/angulos.md +68 -0
  718. package/framework/skills/criativos-agent/references/breakdown.md +328 -0
  719. package/framework/skills/criativos-agent/references/checklist.md +95 -0
  720. package/framework/skills/criativos-agent/references/erros-comuns.md +113 -0
  721. package/framework/skills/criativos-agent/references/escrita.md +667 -0
  722. package/framework/skills/criativos-agent/references/psicologia.md +207 -0
  723. package/framework/skills/criativos-agent/references/swipe-files/alzheimer/rejuvenescendo-o-cerebro.md +16 -0
  724. package/framework/skills/criativos-agent/references/swipe-files/alzheimer/ritual-do-chile.md +16 -0
  725. package/framework/skills/criativos-agent/references/swipe-files/alzheimer/truque-da-gema-do-ovo.md +16 -0
  726. package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/metodo-cabra-macho.md +16 -0
  727. package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/power-performance-02.md +16 -0
  728. package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/power-performance.md +16 -0
  729. package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/protocolo-aumento-supremo-03.md +16 -0
  730. package/framework/skills/criativos-agent/references/swipe-files/concursos/AD 91 - GPT DOS APROVADOS.md +41 -0
  731. package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS 77 GPT LANE 01.md +9 -0
  732. package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS 79 GPT LANE.md +14 -0
  733. package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS HACKER 37.md +11 -0
  734. package/framework/skills/criativos-agent/references/swipe-files/diabetes/bacteria-diabetica---gluco-zen.md +16 -0
  735. package/framework/skills/criativos-agent/references/swipe-files/diabetes/bamboo-trick-02.md +20 -0
  736. package/framework/skills/criativos-agent/references/swipe-files/diabetes/casca-de-uva-03.md +30 -0
  737. package/framework/skills/criativos-agent/references/swipe-files/diabetes/erva-vulcanica-ancestral---glyco-balance.md +16 -0
  738. package/framework/skills/criativos-agent/references/swipe-files/diabetes/hidden-mineral.md +17 -0
  739. package/framework/skills/criativos-agent/references/swipe-files/diabetes/planta-antidiabetes.md +16 -0
  740. package/framework/skills/criativos-agent/references/swipe-files/diabetes/ritual-de-6-segundos-07.md +16 -0
  741. package/framework/skills/criativos-agent/references/swipe-files/diabetes/sugar-pro-02.md +16 -0
  742. package/framework/skills/criativos-agent/references/swipe-files/diabetes/supernervo-12.md +16 -0
  743. package/framework/skills/criativos-agent/references/swipe-files/diabetes/truque-matinal-de-30-segundos-02.md +16 -0
  744. package/framework/skills/criativos-agent/references/swipe-files/diabetes/verme-diabetico-01.md +16 -0
  745. package/framework/skills/criativos-agent/references/swipe-files/diabetes/verme-diabetico-02.md +16 -0
  746. package/framework/skills/criativos-agent/references/swipe-files/ed/bacteria-inflamatoria-06.md +16 -0
  747. package/framework/skills/criativos-agent/references/swipe-files/ed/blue-salt-trick---nordic-power-01.md +16 -0
  748. package/framework/skills/criativos-agent/references/swipe-files/ed/mix-caseiro-que-aumenta-desempenho-e-vigor.md +16 -0
  749. package/framework/skills/criativos-agent/references/swipe-files/ed/trick-blue-01.md +16 -0
  750. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-da-agua.md +16 -0
  751. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-da-banana---iron-boost-03.md +16 -0
  752. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-cavalo.md +16 -0
  753. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-mel-02.md +16 -0
  754. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-mel-amazonico-02.md +16 -0
  755. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-pepino-01.md +16 -0
  756. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-pepino-esp.md +16 -0
  757. package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-rei-salomao-02.md +16 -0
  758. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/cafe-bariatrico-01.md +16 -0
  759. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/cardapio-infalivel-para-maes-lactantes-10.md +16 -0
  760. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/desafio-30-dias-pilates-na-parede.md +16 -0
  761. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/desafio-jejum-10x-03.md +16 -0
  762. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/gordura-marrom.md +16 -0
  763. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/mounjaro-bariatrico-natural-01.md +16 -0
  764. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/natural-ozempic---ozemburn-02.md +16 -0
  765. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/pink-salt-04.md +16 -0
  766. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/protocolo-natural-desparasite-se.md +16 -0
  767. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/training-booster-01.md +65 -0
  768. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/truque-do-caldo-de-ossos-07.md +16 -0
  769. package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/truque-do-caldo-de-ossos-16.md +48 -0
  770. package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-02.md +16 -0
  771. package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-07.md +16 -0
  772. package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-10.md +16 -0
  773. package/framework/skills/criativos-agent/references/swipe-files/escrita/desmistificando-matematica-01.md +16 -0
  774. package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-09.md +16 -0
  775. package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-12.md +16 -0
  776. package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-14.md +16 -0
  777. package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros.md +16 -0
  778. package/framework/skills/criativos-agent/references/swipe-files/exercicios/bumbum-escultural.md +16 -0
  779. package/framework/skills/criativos-agent/references/swipe-files/exercicios/desafio-bye-diastase-07.md +16 -0
  780. package/framework/skills/criativos-agent/references/swipe-files/exercicios/desafio-bye-diastase-08.md +16 -0
  781. package/framework/skills/criativos-agent/references/swipe-files/exercicios/guia-flexivel-20.md +16 -0
  782. package/framework/skills/criativos-agent/references/swipe-files/exercicios/seca-abdomen-02.md +16 -0
  783. package/framework/skills/criativos-agent/references/swipe-files/exercicios/seca-abdomen-03.md +16 -0
  784. package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/kit-30-livros-os-sons-das-letras.md +16 -0
  785. package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/kit-de-atividades-para-volta-as-aulas-04.md +16 -0
  786. package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/lancheira-feliz-02.md +16 -0
  787. package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/quadro-da-paz-materna-02.md +16 -0
  788. package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/rotina-de-disciplina-positiva.md +16 -0
  789. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/atraindo-a-riqueza.md +16 -0
  790. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/destino-divino-05.md +16 -0
  791. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-05.md +16 -0
  792. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-14.md +16 -0
  793. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-19.md +16 -0
  794. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/novena-de-sao-jose.md +16 -0
  795. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-canto-sagrado-02.md +16 -0
  796. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-canto-sagrado.md +16 -0
  797. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-poder-oculto-02.md +16 -0
  798. package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/truque-cerebral-das-forcas-americanas-08.md +16 -0
  799. package/framework/skills/criativos-agent/references/swipe-files/menopausa/capsula-de-fitoestrogeno-02.md +16 -0
  800. package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-01.md +16 -0
  801. package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-02.md +18 -0
  802. package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-03.md +16 -0
  803. package/framework/skills/criativos-agent/references/swipe-files/moda/modelos-virtuais-de-alta-conversao-01.md +16 -0
  804. package/framework/skills/criativos-agent/references/swipe-files/moda/modelos-virtuais-de-alta-conversao.md +16 -0
  805. package/framework/skills/criativos-agent/references/swipe-files/moda/se-vestindo-com-destaque-04.md +16 -0
  806. package/framework/skills/criativos-agent/references/swipe-files/moda/se-vestindo-com-destaque-06.md +16 -0
  807. package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia-03.md +16 -0
  808. package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia-05.md +16 -0
  809. package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia.md +16 -0
  810. package/framework/skills/criativos-agent/references/swipe-files/pack/receitas-da-vovo-02.md +16 -0
  811. package/framework/skills/criativos-agent/references/swipe-files/pack/receitas-saudaveis-de-bolo-03.md +16 -0
  812. package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-01.md +16 -0
  813. package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-02.md +16 -0
  814. package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-03.md +16 -0
  815. package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao-01.md +16 -0
  816. package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao-02.md +16 -0
  817. package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao.md +16 -0
  818. package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-02.md +19 -0
  819. package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-04.md +16 -0
  820. package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-05.md +52 -0
  821. package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos.md +16 -0
  822. package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-01.md +16 -0
  823. package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-03.md +16 -0
  824. package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-04.md +16 -0
  825. package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-09.md +16 -0
  826. package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-10.md +68 -0
  827. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/acido-japones-01.md +16 -0
  828. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/bacteria-toxica-04.md +16 -0
  829. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/segredo-que-desafia-o-envelhecimento-01.md +16 -0
  830. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/segredo-que-desafia-o-envelhecimento.md +16 -0
  831. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/truque-das-japonesas.md +16 -0
  832. package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/truque-do-vinagre-de-maca.md +16 -0
  833. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/3-gatilhos-biologicos-da-atracao.md +16 -0
  834. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/desenrolado.md +16 -0
  835. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/efeito-nostalgia-02.md +16 -0
  836. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/formula-do-amor-verdadeiro.md +16 -0
  837. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/guia-da-obsessao-inabalavel-01.md +16 -0
  838. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/guia-da-obsessao-inabalavel-02.md +16 -0
  839. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/hormonios-do-amor-02.md +16 -0
  840. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/hormonios-do-amor-04.md +16 -0
  841. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/manipulacao-silenciosa-01.md +16 -0
  842. package/framework/skills/criativos-agent/references/swipe-files/relacionamento/perfume-de-eros.md +16 -0
  843. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/gustafilm-lab.md +16 -0
  844. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/ia-influencer.md +16 -0
  845. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar-01.md +16 -0
  846. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar-02.md +16 -0
  847. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar.md +16 -0
  848. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/lista-de-fornecedores-04.md +20 -0
  849. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/previsibilidade-de-faturamento-05.md +16 -0
  850. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/previsibilidade-de-faturamento.md +16 -0
  851. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/programa-de-recompensa-do-youtube-01.md +16 -0
  852. package/framework/skills/criativos-agent/references/swipe-files/renda-extra/truque-da-modelagem.md +40 -0
  853. package/framework/skills/criativos-agent/references/swipe-files/saude-mental/neurociencias-na-pratica-01.md +16 -0
  854. package/framework/skills/criativos-agent/references/swipe-files/saude-mental/neurociencias-na-pratica.md +16 -0
  855. package/framework/skills/criativos-agent/references/swipe-files/saude-mental/recursos-terapeuticos-01.md +16 -0
  856. package/framework/skills/criativos-agent/references/swipe-files/saude-mental/recursos-terapeuticos.md +16 -0
  857. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/mulher-poderosa-na-cama.md +16 -0
  858. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/os-segredos-da-cleopatra-fr.md +21 -0
  859. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/os-segredos-da-cleopatra-ingles.md +16 -0
  860. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/segredo-das-amantes-br-01.md +16 -0
  861. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/the-f-formula-04.md +16 -0
  862. package/framework/skills/criativos-agent/references/swipe-files/sexualidade/the-f-formula.md +16 -0
  863. package/framework/skills/criativos-agent/references/swipe-files/varizes/lipedema-zero-02.md +16 -0
  864. package/framework/skills/criativos-agent/references/swipe-files/varizes/lipedema-zero.md +16 -0
  865. package/framework/skills/criativos-agent/references/swipe-files/visao/hack-do-fluxo-sanguineo-ocular-matinal-de-7s.md +16 -0
  866. package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino-2-02.md +16 -0
  867. package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino-2.md +16 -0
  868. package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino.md +16 -0
  869. package/framework/skills/criativos-agent.zip +0 -0
  870. package/framework/skills/ecosystem-guide/CLAUDE.md +1 -0
  871. package/framework/skills/ecosystem-guide/SKILL.md +275 -0
  872. package/framework/skills/helix-system-agent/CLAUDE.md +1 -0
  873. package/framework/skills/helix-system-agent/SKILL.md +881 -0
  874. package/framework/skills/helix-system-agent/references/CLAUDE.md +1 -0
  875. package/framework/skills/helix-system-agent/references/constraints.md +98 -0
  876. package/framework/skills/helix-system-agent/references/core/CLAUDE.md +1 -0
  877. package/framework/skills/helix-system-agent/references/core/DRE.md +195 -0
  878. package/framework/skills/helix-system-agent/references/core/RMBC.md +144 -0
  879. package/framework/skills/helix-system-agent/references/core/formulas_e_criterios.md +124 -0
  880. package/framework/skills/helix-system-agent/references/core/metodologias.md +201 -0
  881. package/framework/skills/helix-system-agent/references/core/output_format.md +339 -0
  882. package/framework/skills/helix-system-agent/references/core/session_management.md +146 -0
  883. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/00-index.md +85 -0
  884. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/01-identificacao.md +138 -0
  885. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/02-pesquisa.md +175 -0
  886. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/03-avatar.md +225 -0
  887. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/04-consciencia.md +199 -0
  888. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/05-mup.md +172 -0
  889. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/06-mus.md +216 -0
  890. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/07-big-offer.md +198 -0
  891. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/08-fechamento.md +176 -0
  892. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/09-leads.md +201 -0
  893. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/10-progressao.md +220 -0
  894. package/framework/skills/helix-system-agent/references/examples/concursos/hacker/CLAUDE.md +56 -0
  895. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/00-index.md +86 -0
  896. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/01-identificacao.md +117 -0
  897. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/02-pesquisa.md +162 -0
  898. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/03-avatar.md +161 -0
  899. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/04-consciencia.md +128 -0
  900. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/05-mup.md +112 -0
  901. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/06-mus.md +213 -0
  902. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/07-big-offer.md +171 -0
  903. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/08-fechamento.md +207 -0
  904. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/09-leads.md +153 -0
  905. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/10-progressao.md +196 -0
  906. package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/CLAUDE.md +1 -0
  907. package/framework/skills/helix-system-agent/references/fundamentos/CLAUDE.md +1 -0
  908. package/framework/skills/helix-system-agent/references/fundamentos/comunicacao_pedreiro_resumo.md +129 -0
  909. package/framework/skills/helix-system-agent/references/fundamentos/escrita.md +575 -0
  910. package/framework/skills/helix-system-agent/references/fundamentos/gatilhos_reptilianos.md +29 -0
  911. package/framework/skills/helix-system-agent/references/fundamentos/primeiros-principios-copy-chief.md +939 -0
  912. package/framework/skills/helix-system-agent/references/fundamentos/principios_fundamentais.md +559 -0
  913. package/framework/skills/helix-system-agent/references/fundamentos/psicologia.md +338 -0
  914. package/framework/skills/helix-system-agent/references/fundamentos/psicologia_engenheiro.md +191 -0
  915. package/framework/skills/helix-system-agent/references/fundamentos/puzzle_pieces.md +311 -0
  916. package/framework/skills/helix-system-agent/references/playbooks/CLAUDE.md +1 -0
  917. package/framework/skills/helix-system-agent/references/playbooks/fase02_deep_dive_copy.md +390 -0
  918. package/framework/skills/helix-system-agent/references/playbooks/fase02_mineracao_playbook.md +422 -0
  919. package/framework/skills/helix-system-agent/references/swipes/ed/masculinity_fruits.md +594 -0
  920. package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_01_leads.md +272 -0
  921. package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_02_background_emotional.md +140 -0
  922. package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_03_marketing_thesis.md +242 -0
  923. package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_04_product_offer.md +271 -0
  924. package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_05_close_resumo.md +126 -0
  925. package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_01_lead_historia.md +360 -0
  926. package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_02_problema_mecanismo.md +360 -0
  927. package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_03_solucao_produto.md +410 -0
  928. package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_04_oferta_fechamento.md +380 -0
  929. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_01_leads.md +959 -0
  930. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_02_background_emotional.md +305 -0
  931. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_03_marketing_thesis.md +420 -0
  932. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_04_product_buildup.md +251 -0
  933. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_05_oferta.md +334 -0
  934. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_06_fechamento.md +418 -0
  935. package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_07_faq_resumo.md +129 -0
  936. package/framework/skills/helix-system-agent/references/swipes/swipes_index.md +130 -0
  937. package/framework/skills/helix-system-agent/references/templates/CLAUDE.md +1 -0
  938. package/framework/skills/helix-system-agent/references/templates/briefing_fase01_identificacao.md +78 -0
  939. package/framework/skills/helix-system-agent/references/templates/briefing_fase02_pesquisa_mercado.md +386 -0
  940. package/framework/skills/helix-system-agent/references/templates/briefing_fase03_avatar_psicologia.md +456 -0
  941. package/framework/skills/helix-system-agent/references/templates/briefing_fase04_niveis_consciencia.md +144 -0
  942. package/framework/skills/helix-system-agent/references/templates/briefing_fase05_problema_vilao_mup.md +162 -0
  943. package/framework/skills/helix-system-agent/references/templates/briefing_fase06_solucao_mus.md +624 -0
  944. package/framework/skills/helix-system-agent/references/templates/briefing_fase07_big_offer.md +256 -0
  945. package/framework/skills/helix-system-agent/references/templates/briefing_fase08_fechamento_pitch.md +288 -0
  946. package/framework/skills/helix-system-agent/references/templates/briefing_fase09_leads_ganchos.md +154 -0
  947. package/framework/skills/helix-system-agent/references/templates/briefing_fase10_progressao_emocional.md +618 -0
  948. package/framework/skills/helix-system-agent/references/workflow-phases.md +151 -0
  949. package/framework/skills/helix-system-agent/scripts/cloaking_detector.py +319 -0
  950. package/framework/skills/helix-system-agent/scripts/scale_score_calculator.py +186 -0
  951. package/framework/skills/landing-page-agent/CLAUDE.md +1 -0
  952. package/framework/skills/landing-page-agent/SKILL.md +602 -0
  953. package/framework/skills/landing-page-agent/references/escrita.md +569 -0
  954. package/framework/skills/landing-page-agent/references/exemplos-aprovados.md +159 -0
  955. package/framework/skills/landing-page-agent/references/psicologia.md +333 -0
  956. package/framework/skills/landing-page-agent/references/ref_blocos_estrutura_14.md +417 -0
  957. package/framework/skills/landing-page-agent/references/ref_canva_implementacao.md +184 -0
  958. package/framework/skills/landing-page-agent/references/ref_copy_patterns_formulas.md +299 -0
  959. package/framework/skills/landing-page-agent/references/ref_templates_variacoes_nicho.md +263 -0
  960. package/framework/skills/landing-page-agent/references/swipes/concurso/swipe_lp_gabaritando_portugues.md +633 -0
  961. package/framework/skills/landing-page-agent/references/swipes/swipes_index.md +101 -0
  962. package/framework/skills/leads-agent/CLAUDE.md +54 -0
  963. package/framework/skills/leads-agent/SKILL.md +272 -0
  964. package/framework/skills/leads-agent/references/anatomia.md +472 -0
  965. package/framework/skills/leads-agent/references/checklist.md +555 -0
  966. package/framework/skills/leads-agent/references/escrita.md +430 -0
  967. package/framework/skills/leads-agent/references/microleads.md +463 -0
  968. package/framework/skills/leads-agent/references/psicologia.md +341 -0
  969. package/framework/skills/leads-agent/references/tipos-de-lead.md +346 -0
  970. package/framework/skills/production-agent/CLAUDE.md +85 -0
  971. package/framework/skills/production-agent/SKILL.md +648 -0
  972. package/framework/skills/production-agent/references/escrita.md +569 -0
  973. package/framework/skills/production-agent/references/production-quick-reference.md +84 -0
  974. package/framework/skills/production-agent/references/psicologia.md +333 -0
  975. package/framework/skills/rlm-analyze/skill.md +59 -0
  976. package/framework/skills/rlm-parallel/skill.md +136 -0
  977. package/framework/skills/voc-research-agent/CLAUDE.md +1 -0
  978. package/framework/skills/voc-research-agent/SKILL.md +333 -0
  979. package/framework/skills/voc-research-agent/references/CLAUDE.md +1 -0
  980. package/framework/skills/voc-research-agent/references/ref_apify_actors_by_platform.md +45 -0
  981. package/framework/skills/voc-research-agent/references/ref_limits_and_safety.md +41 -0
  982. package/framework/skills/voc-research-agent/references/ref_platform_amazon.md +23 -0
  983. package/framework/skills/voc-research-agent/references/ref_platform_br_mercadolivre.md +41 -0
  984. package/framework/skills/voc-research-agent/references/ref_platform_br_reclameaqui.md +37 -0
  985. package/framework/skills/voc-research-agent/references/ref_platform_instagram.md +87 -0
  986. package/framework/skills/voc-research-agent/references/ref_platform_reddit.md +27 -0
  987. package/framework/skills/voc-research-agent/references/ref_platform_tiktok.md +94 -0
  988. package/framework/skills/voc-research-agent/references/ref_platform_youtube.md +82 -0
  989. package/framework/skills/voc-research-agent/references/ref_protocol_process_save_forget.md +29 -0
  990. package/framework/stories/florayla-production.md +38 -0
  991. package/framework/stories/wire-phase-1.md +127 -0
  992. package/framework/stories/wire-phase-2.md +34 -0
  993. package/framework/stories/wire-phase-3.md +31 -0
  994. package/framework/stories/wire-phase-4.md +32 -0
  995. package/framework/stories/wire-phase-5.md +31 -0
  996. package/framework/synapse-manifest.yaml +167 -0
  997. package/framework/templates/CLAUDE.md +1 -0
  998. package/framework/templates/ads-library-spy-template.md +374 -0
  999. package/framework/templates/agent-output-template.md +67 -0
  1000. package/framework/templates/agent-prompts/copywriter-prompt.md +71 -0
  1001. package/framework/templates/agent-prompts/linguistic-pattern-extractor.md +128 -0
  1002. package/framework/templates/agent-prompts/researcher-prompt.md +80 -0
  1003. package/framework/templates/agent-prompts/reviewer-prompt.md +59 -0
  1004. package/framework/templates/agent-prompts/synthesizer-prompt.md +43 -0
  1005. package/framework/templates/agent-prompts/voc-instagram-analyst.md +164 -0
  1006. package/framework/templates/agent-prompts/voc-reddit-analyst.md +204 -0
  1007. package/framework/templates/agent-prompts/voc-review-analyst.md +216 -0
  1008. package/framework/templates/agent-prompts/voc-tiktok-analyst.md +185 -0
  1009. package/framework/templates/agent-prompts/voc-youtube-analyst.md +142 -0
  1010. package/framework/templates/agents/agent-template.md +35 -0
  1011. package/framework/templates/agents/memory-template.md +24 -0
  1012. package/framework/templates/agents/soul-template.md +33 -0
  1013. package/framework/templates/aios/agent-template.yaml +82 -0
  1014. package/framework/templates/aios/architecture-tmpl.yaml +651 -0
  1015. package/framework/templates/aios/brainstorming-output-tmpl.yaml +156 -0
  1016. package/framework/templates/aios/brownfield-architecture-tmpl.yaml +476 -0
  1017. package/framework/templates/aios/brownfield-prd-tmpl.yaml +280 -0
  1018. package/framework/templates/aios/competitor-analysis-tmpl.yaml +293 -0
  1019. package/framework/templates/aios/database-schema-request-full.md +522 -0
  1020. package/framework/templates/aios/database-schema-request-lite.md +240 -0
  1021. package/framework/templates/aios/front-end-architecture-tmpl.yaml +206 -0
  1022. package/framework/templates/aios/front-end-spec-tmpl.yaml +349 -0
  1023. package/framework/templates/aios/fullstack-architecture-tmpl.yaml +805 -0
  1024. package/framework/templates/aios/market-research-tmpl.yaml +252 -0
  1025. package/framework/templates/aios/prd-tmpl.yaml +202 -0
  1026. package/framework/templates/aios/project-brief-tmpl.yaml +221 -0
  1027. package/framework/templates/aios/qa-gate-tmpl.yaml +104 -0
  1028. package/framework/templates/aios/story-tmpl.yaml +137 -0
  1029. package/framework/templates/aios/task-template.md +86 -0
  1030. package/framework/templates/aios/workflow-template.yaml +134 -0
  1031. package/framework/templates/briefing-complete-template.md +363 -0
  1032. package/framework/templates/checklists/creative-acceptance.yaml +61 -0
  1033. package/framework/templates/checklists/email-acceptance.yaml +61 -0
  1034. package/framework/templates/checklists/landing-page-acceptance.yaml +68 -0
  1035. package/framework/templates/checklists/mup-mus-acceptance.yaml +111 -0
  1036. package/framework/templates/checklists/vsl-acceptance.yaml +91 -0
  1037. package/framework/templates/context-hierarchy-template.md +314 -0
  1038. package/framework/templates/copy-validation-checklist.md +296 -0
  1039. package/framework/templates/criativos-template.md +251 -0
  1040. package/framework/templates/email-sequence-template.md +263 -0
  1041. package/framework/templates/etl-checklist.md +64 -0
  1042. package/framework/templates/extended-thinking-protocol.md +178 -0
  1043. package/framework/templates/funnel-reverse-template.md +246 -0
  1044. package/framework/templates/helix-state-template.yaml +107 -0
  1045. package/framework/templates/landing-page-template.md +406 -0
  1046. package/framework/templates/mecanismo-unico-template.md +239 -0
  1047. package/framework/templates/mup-consensus-validation.md +154 -0
  1048. package/framework/templates/mup-human-test.md +176 -0
  1049. package/framework/templates/mup-mus-discovery.md +192 -0
  1050. package/framework/templates/niche-pack/biblioteca-template.md +105 -0
  1051. package/framework/templates/niche-pack/cliches-template.md +64 -0
  1052. package/framework/templates/niche-pack/context-template.md +120 -0
  1053. package/framework/templates/niche-pack/helix-state-template.yaml +107 -0
  1054. package/framework/templates/niche-pack/task-plan-template.md +89 -0
  1055. package/framework/templates/partials/attribution-header.md +30 -0
  1056. package/framework/templates/partials/epistemic-header.md +18 -0
  1057. package/framework/templates/phase-review-checklist.md +51 -0
  1058. package/framework/templates/processing-registry-template.yaml +24 -0
  1059. package/framework/templates/research-deliverables-checklist.md +127 -0
  1060. package/framework/templates/rmbc-ii-workflow.md +248 -0
  1061. package/framework/templates/story-criativo.md +392 -0
  1062. package/framework/templates/story-deliverable-generic.md +248 -0
  1063. package/framework/templates/story-email.md +444 -0
  1064. package/framework/templates/story-lp-bloco.md +340 -0
  1065. package/framework/templates/story-vsl-capitulo.md +396 -0
  1066. package/framework/templates/swipe-analysis-specs.md +270 -0
  1067. package/framework/templates/swipe-decomposition.md +171 -0
  1068. package/framework/templates/tools-tracking-template.md +207 -0
  1069. package/framework/templates/trends-analysis-template.md +288 -0
  1070. package/framework/templates/voc-linguistic-patterns.md +148 -0
  1071. package/framework/templates/voc-squad-consolidation.md +268 -0
  1072. package/framework/templates/voc-viral-extraction-template.md +174 -0
  1073. package/framework/templates/vsl-template.md +237 -0
  1074. package/framework/workflows/CLAUDE.md +1 -0
  1075. package/framework/workflows/helix-dag.state.json +16 -0
  1076. package/framework/workflows/helix-dag.yaml +248 -0
  1077. package/framework/workflows/helix-pipeline.yaml +175 -0
  1078. package/framework/workflows/production-dag.yaml +532 -0
  1079. package/framework/workflows/production-workflow.md +97 -0
  1080. package/framework/workflows/production-workflow.yaml +221 -0
  1081. package/framework/workflows/research-dag.yaml +288 -0
  1082. package/framework/workflows/research-workflow.md +89 -0
  1083. package/framework/workflows/research-workflow.yaml +92 -0
  1084. package/framework/workflows/validation-workflow.md +111 -0
  1085. package/installer/doctor.js +142 -0
  1086. package/installer/install.js +272 -0
  1087. package/installer/new-offer.js +108 -0
  1088. package/installer/transpile.js +200 -0
  1089. package/installer/update.js +57 -0
  1090. package/installer/verify.js +124 -0
  1091. package/lib/platform.js +155 -0
  1092. package/lib/settings-builder.js +190 -0
  1093. package/package.json +79 -0
  1094. package/templates/ecosystem/.claude/CLAUDE.md +4 -0
  1095. package/templates/ecosystem/.claude/rules/offers/CLAUDE.md +5 -0
  1096. package/templates/ecosystem/.synapse/agent-atlas +9 -0
  1097. package/templates/ecosystem/.synapse/agent-blade +8 -0
  1098. package/templates/ecosystem/.synapse/agent-cipher +8 -0
  1099. package/templates/ecosystem/.synapse/agent-echo +10 -0
  1100. package/templates/ecosystem/.synapse/agent-forge +9 -0
  1101. package/templates/ecosystem/.synapse/agent-hawk +9 -0
  1102. package/templates/ecosystem/.synapse/agent-ops +7 -0
  1103. package/templates/ecosystem/.synapse/agent-scout +9 -0
  1104. package/templates/ecosystem/.synapse/agent-strategist +7 -0
  1105. package/templates/ecosystem/.synapse/agent-vox +10 -0
  1106. package/templates/ecosystem/.synapse/anti-homog +41 -0
  1107. package/templates/ecosystem/.synapse/bracket-config.yaml +43 -0
  1108. package/templates/ecosystem/.synapse/commands +36 -0
  1109. package/templates/ecosystem/.synapse/constitution +40 -0
  1110. package/templates/ecosystem/.synapse/craft +43 -0
  1111. package/templates/ecosystem/.synapse/dre +27 -0
  1112. package/templates/ecosystem/.synapse/helix +29 -0
  1113. package/templates/ecosystem/.synapse/learning/gotcha-registry.yaml +16 -0
  1114. package/templates/ecosystem/.synapse/manifest +71 -0
  1115. package/templates/ecosystem/.synapse/mecanismo +27 -0
  1116. package/templates/ecosystem/.synapse/metrics/hook-metrics.json +52 -0
  1117. package/templates/ecosystem/.synapse/quality-gates +49 -0
  1118. package/templates/ecosystem/.synapse/sessions/.gitkeep +0 -0
  1119. package/templates/ecosystem/.synapse/star-commands/create-squad +17 -0
  1120. package/templates/ecosystem/.synapse/star-commands/diagnose +15 -0
  1121. package/templates/ecosystem/.synapse/star-commands/elicit-context +11 -0
  1122. package/templates/ecosystem/.synapse/star-commands/elicit-mecanismo +11 -0
  1123. package/templates/ecosystem/.synapse/star-commands/queue +6 -0
  1124. package/templates/ecosystem/.synapse/tool-matrix +50 -0
  1125. package/templates/ecosystem/.synapse/workflow-briefing-pipeline +7 -0
  1126. package/templates/ecosystem/.synapse/workflow-production-pipeline +8 -0
  1127. package/templates/ecosystem/.synapse/workflow-research-pipeline +7 -0
  1128. package/templates/ecosystem/.synapse/workflow-review-pipeline +7 -0
  1129. package/templates/ecosystem/squads/copy-chief/.synapse/manifest +9 -0
  1130. package/templates/ecosystem/squads/copy-chief/.synapse/production-rules +8 -0
  1131. package/templates/ecosystem/squads/copy-chief/.synapse/routing +14 -0
  1132. package/templates/ecosystem/squads/copy-chief/capabilities.yaml +211 -0
  1133. package/templates/ecosystem/squads/copy-chief/checklists/creative-acceptance.md +61 -0
  1134. package/templates/ecosystem/squads/copy-chief/checklists/email-acceptance.md +61 -0
  1135. package/templates/ecosystem/squads/copy-chief/checklists/landing-page-acceptance.md +68 -0
  1136. package/templates/ecosystem/squads/copy-chief/checklists/mup-mus-acceptance.md +111 -0
  1137. package/templates/ecosystem/squads/copy-chief/checklists/vsl-acceptance.md +91 -0
  1138. package/templates/ecosystem/squads/copy-chief/config/copy-standards.md +32 -0
  1139. package/templates/ecosystem/squads/copy-chief/config/mcp-stack.md +48 -0
  1140. package/templates/ecosystem/squads/copy-chief/config/tool-usage-matrix.md +366 -0
  1141. package/templates/ecosystem/squads/copy-chief/data/anti-homogeneization.md +228 -0
  1142. package/templates/ecosystem/squads/copy-chief/data/copy-chief-data-requirements.yaml +171 -0
  1143. package/templates/ecosystem/squads/copy-chief/data/craft/checklist.md +95 -0
  1144. package/templates/ecosystem/squads/copy-chief/data/craft/chief-principles.md +84 -0
  1145. package/templates/ecosystem/squads/copy-chief/data/craft/erros-comuns.md +113 -0
  1146. package/templates/ecosystem/squads/copy-chief/data/craft/escrita.md +667 -0
  1147. package/templates/ecosystem/squads/copy-chief/data/craft/psicologia.md +207 -0
  1148. package/templates/ecosystem/squads/copy-chief/data/creative/angulos.md +68 -0
  1149. package/templates/ecosystem/squads/copy-chief/data/creative/breakdown.md +328 -0
  1150. package/templates/ecosystem/squads/copy-chief/data/critic/anti-patterns.md +270 -0
  1151. package/templates/ecosystem/squads/copy-chief/data/critic/checklist-validacao.md +238 -0
  1152. package/templates/ecosystem/squads/copy-chief/data/critic/exemplos-aprovados.md +216 -0
  1153. package/templates/ecosystem/squads/copy-chief/data/critic/exemplos-reprovados.md +312 -0
  1154. package/templates/ecosystem/squads/copy-chief/data/critic/metodologia-stand.md +192 -0
  1155. package/templates/ecosystem/squads/copy-chief/data/dre-framework.md +62 -0
  1156. package/templates/ecosystem/squads/copy-chief/data/helix-phases-reference.md +162 -0
  1157. package/templates/ecosystem/squads/copy-chief/data/helix-ref/DRE.md +195 -0
  1158. package/templates/ecosystem/squads/copy-chief/data/helix-ref/RMBC.md +144 -0
  1159. package/templates/ecosystem/squads/copy-chief/data/helix-ref/constraints.md +98 -0
  1160. package/templates/ecosystem/squads/copy-chief/data/helix-ref/formulas_e_criterios.md +124 -0
  1161. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/comunicacao_pedreiro_resumo.md +129 -0
  1162. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/escrita.md +575 -0
  1163. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/gatilhos_reptilianos.md +29 -0
  1164. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/primeiros-principios-copy-chief.md +939 -0
  1165. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/principios_fundamentais.md +559 -0
  1166. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/psicologia_engenheiro.md +191 -0
  1167. package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/puzzle_pieces.md +311 -0
  1168. package/templates/ecosystem/squads/copy-chief/data/helix-ref/metodologias.md +201 -0
  1169. package/templates/ecosystem/squads/copy-chief/data/helix-ref/playbooks/fase02_deep_dive_copy.md +390 -0
  1170. package/templates/ecosystem/squads/copy-chief/data/helix-ref/playbooks/fase02_mineracao_playbook.md +422 -0
  1171. package/templates/ecosystem/squads/copy-chief/data/leads/anatomia.md +472 -0
  1172. package/templates/ecosystem/squads/copy-chief/data/leads/microleads.md +463 -0
  1173. package/templates/ecosystem/squads/copy-chief/data/leads/tipos-de-lead.md +346 -0
  1174. package/templates/ecosystem/squads/copy-chief/data/lp/ref_blocos_estrutura_14.md +417 -0
  1175. package/templates/ecosystem/squads/copy-chief/data/lp/ref_canva_implementacao.md +184 -0
  1176. package/templates/ecosystem/squads/copy-chief/data/lp/ref_copy_patterns_formulas.md +299 -0
  1177. package/templates/ecosystem/squads/copy-chief/data/lp/ref_templates_variacoes_nicho.md +263 -0
  1178. package/templates/ecosystem/squads/copy-chief/data/mecanismo-unico-framework.md +212 -0
  1179. package/templates/ecosystem/squads/copy-chief/data/voc-research.md +291 -0
  1180. package/templates/ecosystem/squads/copy-chief/squad.yaml +89 -0
  1181. package/templates/ecosystem/squads/copy-chief/tasks/competitor-analysis.md +24 -0
  1182. package/templates/ecosystem/squads/copy-chief/tasks/helix-briefing.md +29 -0
  1183. package/templates/ecosystem/squads/copy-chief/tasks/produce-creatives.md +27 -0
  1184. package/templates/ecosystem/squads/copy-chief/tasks/produce-emails.md +23 -0
  1185. package/templates/ecosystem/squads/copy-chief/tasks/produce-landing-page.md +25 -0
  1186. package/templates/ecosystem/squads/copy-chief/tasks/produce-vsl.md +26 -0
  1187. package/templates/ecosystem/squads/copy-chief/tasks/validate-deliverable.md +23 -0
  1188. package/templates/ecosystem/squads/copy-chief/tasks/validate-mecanismo.md +22 -0
  1189. package/templates/ecosystem/squads/copy-chief/tasks/voc-extraction.md +26 -0
  1190. package/templates/ecosystem/squads/copy-chief/templates/delivery-checklist.yaml +61 -0
  1191. package/templates/ecosystem/squads/copy-chief/templates/story-template.yaml +29 -0
  1192. package/templates/ecosystem/squads/copy-chief/workflows/briefing-pipeline.yaml +49 -0
  1193. package/templates/ecosystem/squads/copy-chief/workflows/production-pipeline.yaml +49 -0
  1194. package/templates/ecosystem/squads/copy-chief/workflows/research-pipeline.yaml +38 -0
  1195. package/templates/ecosystem/squads/copy-chief/workflows/review-pipeline.yaml +35 -0
  1196. package/templates/mcp.json.tpl +53 -0
  1197. package/templates/settings.json.tpl +313 -0
@@ -0,0 +1,1103 @@
1
+ // ~/.claude/hooks/lib/weighted-gates.ts
2
+ // Weighted Quality Gate Scoring System — replaces binary pass/fail with nuanced scoring
3
+ // v1.0 - 2026-02-24
4
+
5
+ import { existsSync, readFileSync, readdirSync, statSync } from 'fs';
6
+ import { join } from 'path';
7
+ import { homedir } from 'os';
8
+
9
+ // ==========================================
10
+ // Constants
11
+ // ==========================================
12
+
13
+ const HOME = homedir();
14
+ const ECOSYSTEM_ROOT = join(HOME, 'copywriting-ecosystem');
15
+
16
+ // ==========================================
17
+ // Types
18
+ // ==========================================
19
+
20
+ export interface CriterionScore {
21
+ name: string;
22
+ weight: number;
23
+ raw_score: number; // 0-10
24
+ weighted_score: number; // raw * weight / 10
25
+ details: string;
26
+ }
27
+
28
+ export interface GateScore {
29
+ gate: 'research' | 'production';
30
+ total_weighted: number; // 0-100
31
+ verdict: 'PASSED' | 'NEEDS_REVIEW' | 'FAILED';
32
+ criteria: CriterionScore[];
33
+ }
34
+
35
+ // ==========================================
36
+ // Helpers
37
+ // ==========================================
38
+
39
+ function safeReadFile(filePath: string): string {
40
+ try {
41
+ if (!existsSync(filePath)) return '';
42
+ return readFileSync(filePath, 'utf-8');
43
+ } catch {
44
+ return '';
45
+ }
46
+ }
47
+
48
+ function safeReadDir(dirPath: string): string[] {
49
+ try {
50
+ if (!existsSync(dirPath)) return [];
51
+ return readdirSync(dirPath);
52
+ } catch {
53
+ return [];
54
+ }
55
+ }
56
+
57
+ function resolveOfferPath(offerPath: string): string {
58
+ // Accept both absolute and relative (to ecosystem root) paths
59
+ if (offerPath.startsWith('/')) return offerPath;
60
+ return join(ECOSYSTEM_ROOT, offerPath);
61
+ }
62
+
63
+ function computeVerdict(total: number): 'PASSED' | 'NEEDS_REVIEW' | 'FAILED' {
64
+ if (total >= 85) return 'PASSED';
65
+ if (total >= 70) return 'NEEDS_REVIEW';
66
+ return 'FAILED';
67
+ }
68
+
69
+ /**
70
+ * Minimal YAML field extractor — reads a key: value line from YAML content.
71
+ * No npm deps. Handles simple scalar values only.
72
+ */
73
+ function yamlFieldValue(content: string, field: string): string {
74
+ const regex = new RegExp(`^\\s*${field}\\s*:\\s*(.+)$`, 'm');
75
+ const match = content.match(regex);
76
+ if (!match) return '';
77
+ return match[1].trim().replace(/^["']|["']$/g, '');
78
+ }
79
+
80
+ /**
81
+ * Count occurrences of a pattern in text.
82
+ */
83
+ function countPattern(text: string, pattern: RegExp): number {
84
+ const matches = text.match(pattern);
85
+ return matches ? matches.length : 0;
86
+ }
87
+
88
+ /**
89
+ * Count words in text.
90
+ */
91
+ function countWords(text: string): number {
92
+ const trimmed = text.trim();
93
+ if (!trimmed) return 0;
94
+ return trimmed.split(/\s+/).length;
95
+ }
96
+
97
+ /**
98
+ * Collect all .md file contents from a directory (non-recursive).
99
+ */
100
+ function readAllMdFiles(dirPath: string): string {
101
+ const files = safeReadDir(dirPath).filter(f => f.endsWith('.md'));
102
+ return files.map(f => safeReadFile(join(dirPath, f))).join('\n');
103
+ }
104
+
105
+ /**
106
+ * Collect all production file contents from standard production subdirectories.
107
+ */
108
+ function readProductionFiles(offerPath: string): string {
109
+ const productionDir = join(offerPath, 'production');
110
+ if (!existsSync(productionDir)) return '';
111
+
112
+ const subdirs = ['vsl', 'landing-page', 'creatives', 'emails'];
113
+ let combined = '';
114
+ for (const sub of subdirs) {
115
+ const subPath = join(productionDir, sub);
116
+ combined += readAllMdFiles(subPath) + '\n';
117
+ }
118
+
119
+ // Also check top-level production .md files
120
+ combined += readAllMdFiles(productionDir);
121
+
122
+ return combined;
123
+ }
124
+
125
+ // ==========================================
126
+ // RESEARCH GATE — 5 Criteria
127
+ // ==========================================
128
+
129
+ /**
130
+ * Criterion 1: VOC Depth (30%)
131
+ * Count quotes in research/voc/summary.md and research/voc/processed/*.md
132
+ * Count platforms. Calculate average intensity.
133
+ * 50+ quotes per platform = 10, 25-49 = 7, 10-24 = 5, <10 = 2
134
+ */
135
+ function evaluateVocDepth(offerPath: string): CriterionScore {
136
+ const vocDir = join(offerPath, 'research', 'voc');
137
+ const summaryPath = join(vocDir, 'summary.md');
138
+ const processedDir = join(vocDir, 'processed');
139
+
140
+ let allContent = safeReadFile(summaryPath);
141
+ allContent += '\n' + readAllMdFiles(processedDir);
142
+
143
+ if (!allContent.trim()) {
144
+ return {
145
+ name: 'VOC Depth',
146
+ weight: 30,
147
+ raw_score: 0,
148
+ weighted_score: 0,
149
+ details: 'No VOC files found in research/voc/',
150
+ };
151
+ }
152
+
153
+ // Count quotes — look for blockquote markers, numbered quote entries, or ">" lines with content
154
+ const quotePatterns = [
155
+ /^>\s*.+/gm, // Blockquote lines
156
+ /[""].+?[""]/g, // Curly quoted text
157
+ /(?:^|\n)\s*-\s*[""].+/gm, // List items with quotes
158
+ /Quote\s*[:]\s*.+/gi, // "Quote:" labeled entries
159
+ /(?:^|\n)\s*\d+\.\s+[""].+/gm, // Numbered quote entries
160
+ ];
161
+
162
+ // Deduplicate by using a set of matched lines
163
+ const quoteLines = new Set<string>();
164
+ for (const pattern of quotePatterns) {
165
+ const matches = allContent.match(pattern);
166
+ if (matches) {
167
+ for (const m of matches) {
168
+ quoteLines.add(m.trim().substring(0, 100)); // Normalize
169
+ }
170
+ }
171
+ }
172
+ const totalQuotes = quoteLines.size;
173
+
174
+ // Count platforms mentioned
175
+ const platformNames = ['youtube', 'instagram', 'tiktok', 'reddit', 'facebook', 'twitter', 'x.com', 'quora', 'amazon'];
176
+ const platformsFound: string[] = [];
177
+ const lowerContent = allContent.toLowerCase();
178
+ for (const p of platformNames) {
179
+ if (lowerContent.includes(p)) {
180
+ platformsFound.push(p);
181
+ }
182
+ }
183
+ const platformCount = Math.max(platformsFound.length, 1); // Avoid division by zero
184
+
185
+ const quotesPerPlatform = Math.round(totalQuotes / platformCount);
186
+
187
+ let rawScore: number;
188
+ if (quotesPerPlatform >= 50) rawScore = 10;
189
+ else if (quotesPerPlatform >= 25) rawScore = 7;
190
+ else if (quotesPerPlatform >= 10) rawScore = 5;
191
+ else rawScore = 2;
192
+
193
+ // If no quotes at all, score is 0
194
+ if (totalQuotes === 0) rawScore = 0;
195
+
196
+ return {
197
+ name: 'VOC Depth',
198
+ weight: 30,
199
+ raw_score: rawScore,
200
+ weighted_score: rawScore * 30 / 10,
201
+ details: `${totalQuotes} quotes across ${platformCount} platform(s) (${quotesPerPlatform}/platform). Platforms: ${platformsFound.join(', ') || 'none detected'}`,
202
+ };
203
+ }
204
+
205
+ /**
206
+ * Criterion 2: Competitor Analysis (25%)
207
+ * Check ads-library-spy.md exists and has Scale Score data.
208
+ * 5+ competitors with scores = 10, 3-4 = 7, 1-2 = 5, 0 = 0
209
+ */
210
+ function evaluateCompetitorAnalysis(offerPath: string): CriterionScore {
211
+ const adsSpyPath = join(offerPath, 'research', 'competitors', 'processed', 'ads-library-spy.md');
212
+ const content = safeReadFile(adsSpyPath);
213
+
214
+ if (!content) {
215
+ return {
216
+ name: 'Competitor Analysis',
217
+ weight: 25,
218
+ raw_score: 0,
219
+ weighted_score: 0,
220
+ details: 'No ads-library-spy.md found in research/competitors/processed/',
221
+ };
222
+ }
223
+
224
+ // Count "Scale Score:" lines
225
+ const scaleScoreMatches = content.match(/Scale\s*Score\s*[:]\s*\d+/gi);
226
+ const competitorCount = scaleScoreMatches ? scaleScoreMatches.length : 0;
227
+
228
+ let rawScore: number;
229
+ if (competitorCount >= 5) rawScore = 10;
230
+ else if (competitorCount >= 3) rawScore = 7;
231
+ else if (competitorCount >= 1) rawScore = 5;
232
+ else rawScore = 0;
233
+
234
+ return {
235
+ name: 'Competitor Analysis',
236
+ weight: 25,
237
+ raw_score: rawScore,
238
+ weighted_score: rawScore * 25 / 10,
239
+ details: `${competitorCount} competitor(s) with Scale Score in ads-library-spy.md`,
240
+ };
241
+ }
242
+
243
+ /**
244
+ * Criterion 3: Mechanism Discovery (20%)
245
+ * Check mecanismo-unico.yaml exists and has MUP candidates.
246
+ * Check new_cause, sexy_cause fields populated.
247
+ * All populated = 10, partial = 5, empty = 0
248
+ */
249
+ function evaluateMechanismDiscovery(offerPath: string): CriterionScore {
250
+ const mecPath = join(offerPath, 'mecanismo-unico.yaml');
251
+ const content = safeReadFile(mecPath);
252
+
253
+ if (!content) {
254
+ return {
255
+ name: 'Mechanism Discovery',
256
+ weight: 20,
257
+ raw_score: 0,
258
+ weighted_score: 0,
259
+ details: 'No mecanismo-unico.yaml found',
260
+ };
261
+ }
262
+
263
+ const novaCausa = yamlFieldValue(content, 'new_cause');
264
+ const sexyCause = yamlFieldValue(content, 'sexy_cause');
265
+
266
+ const fieldsPopulated = [novaCausa, sexyCause].filter(v => v.length > 0).length;
267
+
268
+ let rawScore: number;
269
+ if (fieldsPopulated === 2) rawScore = 10;
270
+ else if (fieldsPopulated === 1) rawScore = 5;
271
+ else rawScore = 0;
272
+
273
+ return {
274
+ name: 'Mechanism Discovery',
275
+ weight: 20,
276
+ raw_score: rawScore,
277
+ weighted_score: rawScore * 20 / 10,
278
+ details: `mecanismo-unico.yaml: new_cause=${novaCausa ? 'YES' : 'EMPTY'}, sexy_cause=${sexyCause ? 'YES' : 'EMPTY'}`,
279
+ };
280
+ }
281
+
282
+ /**
283
+ * Criterion 4: Avatar Definition (20%)
284
+ * Check research/avatar/summary.md exists and has DRE, escalada, segments.
285
+ * All 3 = 10, 2 = 7, 1 = 4, 0 = 0
286
+ */
287
+ function evaluateAvatarDefinition(offerPath: string): CriterionScore {
288
+ const avatarPath = join(offerPath, 'research', 'avatar', 'summary.md');
289
+ const content = safeReadFile(avatarPath);
290
+
291
+ if (!content) {
292
+ return {
293
+ name: 'Avatar Definition',
294
+ weight: 20,
295
+ raw_score: 0,
296
+ weighted_score: 0,
297
+ details: 'No research/avatar/summary.md found',
298
+ };
299
+ }
300
+
301
+ const lowerContent = content.toLowerCase();
302
+ const headingsFound: string[] = [];
303
+
304
+ // Look for headings or sections about DRE, Escalada, Segments
305
+ if (/##\s*dre|dre\s*[:]/i.test(content) || lowerContent.includes('emocao dominante') || lowerContent.includes('emoção dominante')) {
306
+ headingsFound.push('DRE');
307
+ }
308
+ if (/##\s*escalada|escalada\s*emocional/i.test(content) || lowerContent.includes('escalada')) {
309
+ headingsFound.push('Escalada');
310
+ }
311
+ if (/##\s*segment|segmentos|segments/i.test(content) || lowerContent.includes('segment')) {
312
+ headingsFound.push('Segments');
313
+ }
314
+
315
+ const count = headingsFound.length;
316
+ let rawScore: number;
317
+ if (count >= 3) rawScore = 10;
318
+ else if (count === 2) rawScore = 7;
319
+ else if (count === 1) rawScore = 4;
320
+ else rawScore = 0;
321
+
322
+ return {
323
+ name: 'Avatar Definition',
324
+ weight: 20,
325
+ raw_score: rawScore,
326
+ weighted_score: rawScore * 20 / 10,
327
+ details: `Sections found: ${headingsFound.join(', ') || 'none'} (${count}/3)`,
328
+ };
329
+ }
330
+
331
+ /**
332
+ * Criterion 5: Structure Compliance (5%)
333
+ * Check all required directories exist.
334
+ * All 4 = 10, 3 = 7, 2 = 5, <2 = 2
335
+ */
336
+ function evaluateStructureCompliance(offerPath: string): CriterionScore {
337
+ const requiredDirs = [
338
+ join(offerPath, 'research', 'voc'),
339
+ join(offerPath, 'research', 'competitors'),
340
+ join(offerPath, 'research', 'mechanism'),
341
+ join(offerPath, 'research', 'avatar'),
342
+ ];
343
+
344
+ const existingDirs: string[] = [];
345
+ for (const dir of requiredDirs) {
346
+ if (existsSync(dir)) {
347
+ try {
348
+ const stat = statSync(dir);
349
+ if (stat.isDirectory()) {
350
+ existingDirs.push(dir.split('/').pop()!);
351
+ }
352
+ } catch {
353
+ // Skip
354
+ }
355
+ }
356
+ }
357
+
358
+ const count = existingDirs.length;
359
+ let rawScore: number;
360
+ if (count >= 4) rawScore = 10;
361
+ else if (count === 3) rawScore = 7;
362
+ else if (count === 2) rawScore = 5;
363
+ else rawScore = 2;
364
+
365
+ return {
366
+ name: 'Structure Compliance',
367
+ weight: 5,
368
+ raw_score: rawScore,
369
+ weighted_score: rawScore * 5 / 10,
370
+ details: `${count}/4 required dirs exist: ${existingDirs.join(', ') || 'none'}`,
371
+ };
372
+ }
373
+
374
+ // ==========================================
375
+ // PRODUCTION GATE — 5 Criteria
376
+ // ==========================================
377
+
378
+ /**
379
+ * Criterion 1: Emotional Impact (30%)
380
+ * Read latest blind_critic results from {offer}/reviews/ directory.
381
+ * Parse score from files. Average score * 1 = raw score (0-10).
382
+ */
383
+ function evaluateEmotionalImpact(offerPath: string): CriterionScore {
384
+ const reviewsDir = join(offerPath, 'reviews');
385
+ const files = safeReadDir(reviewsDir).filter(f => f.endsWith('.md'));
386
+
387
+ if (files.length === 0) {
388
+ return {
389
+ name: 'Emotional Impact',
390
+ weight: 30,
391
+ raw_score: 0,
392
+ weighted_score: 0,
393
+ details: 'No review files found in reviews/',
394
+ };
395
+ }
396
+
397
+ // Parse scores from review files — look for patterns like "Score: 8/10", "score: 7", "Rating: 9"
398
+ const scores: number[] = [];
399
+ for (const file of files) {
400
+ const content = safeReadFile(join(reviewsDir, file));
401
+ // Match various score formats
402
+ const scorePatterns = [
403
+ /(?:score|rating|nota|pontuacao)\s*[:=]\s*(\d+(?:\.\d+)?)\s*(?:\/\s*10)?/gi,
404
+ /(\d+(?:\.\d+)?)\s*\/\s*10/g,
405
+ /\*\*(\d+(?:\.\d+)?)\*\*\s*\/\s*10/g,
406
+ ];
407
+ for (const pattern of scorePatterns) {
408
+ let match: RegExpExecArray | null;
409
+ // Reset lastIndex for global regex
410
+ pattern.lastIndex = 0;
411
+ while ((match = pattern.exec(content)) !== null) {
412
+ const val = parseFloat(match[1]);
413
+ if (val >= 0 && val <= 10) {
414
+ scores.push(val);
415
+ }
416
+ }
417
+ }
418
+ }
419
+
420
+ if (scores.length === 0) {
421
+ return {
422
+ name: 'Emotional Impact',
423
+ weight: 30,
424
+ raw_score: 0,
425
+ weighted_score: 0,
426
+ details: `Found ${files.length} review file(s) but no parseable scores`,
427
+ };
428
+ }
429
+
430
+ const avgScore = scores.reduce((sum, s) => sum + s, 0) / scores.length;
431
+ const rawScore = Math.min(10, Math.round(avgScore * 10) / 10);
432
+
433
+ return {
434
+ name: 'Emotional Impact',
435
+ weight: 30,
436
+ raw_score: rawScore,
437
+ weighted_score: rawScore * 30 / 10,
438
+ details: `Average score ${rawScore.toFixed(1)}/10 from ${scores.length} score(s) in ${files.length} review file(s)`,
439
+ };
440
+ }
441
+
442
+ /**
443
+ * Criterion 2: Specificity (25%)
444
+ * Count data specificity markers in production files:
445
+ * numbers (non-round), names, dates, locations, sensorial details.
446
+ * 8+ per 1000 words = 10, 5-7 = 7, 2-4 = 4, <2 = 1
447
+ */
448
+ function evaluateSpecificity(offerPath: string): CriterionScore {
449
+ const productionContent = readProductionFiles(offerPath);
450
+
451
+ if (!productionContent.trim()) {
452
+ return {
453
+ name: 'Specificity',
454
+ weight: 25,
455
+ raw_score: 0,
456
+ weighted_score: 0,
457
+ details: 'No production files found',
458
+ };
459
+ }
460
+
461
+ const words = countWords(productionContent);
462
+ if (words === 0) {
463
+ return {
464
+ name: 'Specificity',
465
+ weight: 25,
466
+ raw_score: 0,
467
+ weighted_score: 0,
468
+ details: 'Production files are empty',
469
+ };
470
+ }
471
+
472
+ // Count specificity markers
473
+ let markers = 0;
474
+
475
+ // Non-round numbers (e.g., 87.3%, 2.847, 14, 23kg — NOT 10, 100, 1000, 50%)
476
+ const nonRoundNumbers = productionContent.match(/\b\d+[.,]\d+\b/g); // Decimal numbers
477
+ markers += nonRoundNumbers ? nonRoundNumbers.length : 0;
478
+
479
+ // Numbers that are NOT round (not ending in 0, not powers of 10)
480
+ const allNumbers = productionContent.match(/\b\d{2,}\b/g) || [];
481
+ const nonRoundIntegers = allNumbers.filter(n => {
482
+ const num = parseInt(n, 10);
483
+ return num % 10 !== 0 && num !== 100 && num !== 1000;
484
+ });
485
+ markers += nonRoundIntegers.length;
486
+
487
+ // Dates — various formats
488
+ const dates = productionContent.match(/\b\d{1,2}\s+(?:de\s+)?(?:janeiro|fevereiro|março|marco|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro|jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)\b/gi);
489
+ markers += dates ? dates.length : 0;
490
+
491
+ // Proper names (capitalized words in middle of sentences — heuristic)
492
+ const properNames = productionContent.match(/(?<=[a-z]\s)[A-Z][a-zà-ú]{2,}/g);
493
+ markers += properNames ? Math.min(properNames.length, 20) : 0; // Cap to avoid inflated counts
494
+
495
+ // Location markers (cidade, bairro, rua patterns)
496
+ const locations = productionContent.match(/(?:de|em|no|na)\s+[A-Z][a-zà-ú]+(?:\s+[A-Z][a-zà-ú]+)*/g);
497
+ markers += locations ? Math.min(locations.length, 15) : 0;
498
+
499
+ // Sensorial details — time-of-day, body parts, sensations
500
+ const sensorialPatterns = [
501
+ /\b(?:3h|2h|4h|5h|meia-noite|madrugada|amanhecer)\b/gi,
502
+ /\b(?:suando|tremendo|acordou|olhou|sentiu|ouviu|viu|tocou)\b/gi,
503
+ /\b(?:peito|barriga|cabeça|cabeca|costas|joelho|mão|mao|olho|boca)\b/gi,
504
+ ];
505
+ for (const pattern of sensorialPatterns) {
506
+ const matches = productionContent.match(pattern);
507
+ markers += matches ? matches.length : 0;
508
+ }
509
+
510
+ const densityPer1000 = (markers / words) * 1000;
511
+
512
+ let rawScore: number;
513
+ if (densityPer1000 >= 8) rawScore = 10;
514
+ else if (densityPer1000 >= 5) rawScore = 7;
515
+ else if (densityPer1000 >= 2) rawScore = 4;
516
+ else rawScore = 1;
517
+
518
+ return {
519
+ name: 'Specificity',
520
+ weight: 25,
521
+ raw_score: rawScore,
522
+ weighted_score: rawScore * 25 / 10,
523
+ details: `${markers} markers in ${words} words (${densityPer1000.toFixed(1)}/1000 words)`,
524
+ };
525
+ }
526
+
527
+ /**
528
+ * Criterion 3: MUP/MUS Alignment (20%)
529
+ * Check if production files reference the mecanismo terms from mecanismo-unico.yaml.
530
+ * Count references to gimmick_name, sexy_cause, authority_hook.
531
+ * All 3 referenced = 10, 2 = 7, 1 = 4, 0 = 0
532
+ */
533
+ function evaluateMupMusAlignment(offerPath: string): CriterionScore {
534
+ const mecPath = join(offerPath, 'mecanismo-unico.yaml');
535
+ const mecContent = safeReadFile(mecPath);
536
+
537
+ if (!mecContent) {
538
+ return {
539
+ name: 'MUP/MUS Alignment',
540
+ weight: 20,
541
+ raw_score: 0,
542
+ weighted_score: 0,
543
+ details: 'No mecanismo-unico.yaml found — cannot check alignment',
544
+ };
545
+ }
546
+
547
+ const productionContent = readProductionFiles(offerPath);
548
+
549
+ if (!productionContent.trim()) {
550
+ return {
551
+ name: 'MUP/MUS Alignment',
552
+ weight: 20,
553
+ raw_score: 0,
554
+ weighted_score: 0,
555
+ details: 'No production files found to check alignment',
556
+ };
557
+ }
558
+
559
+ // Extract key terms from mecanismo YAML
560
+ const gimmickName = yamlFieldValue(mecContent, 'gimmick_name');
561
+ const sexyCause = yamlFieldValue(mecContent, 'sexy_cause');
562
+ const authorityHook = yamlFieldValue(mecContent, 'authority_hook');
563
+
564
+ const lowerProd = productionContent.toLowerCase();
565
+ const found: string[] = [];
566
+
567
+ if (gimmickName && lowerProd.includes(gimmickName.toLowerCase())) {
568
+ found.push(`gimmick_name ("${gimmickName}")`);
569
+ }
570
+ if (sexyCause && lowerProd.includes(sexyCause.toLowerCase())) {
571
+ found.push(`sexy_cause ("${sexyCause}")`);
572
+ }
573
+ if (authorityHook && lowerProd.includes(authorityHook.toLowerCase())) {
574
+ found.push(`authority_hook ("${authorityHook}")`);
575
+ }
576
+
577
+ const count = found.length;
578
+ let rawScore: number;
579
+ if (count >= 3) rawScore = 10;
580
+ else if (count === 2) rawScore = 7;
581
+ else if (count === 1) rawScore = 4;
582
+ else rawScore = 0;
583
+
584
+ const missing: string[] = [];
585
+ if (gimmickName && !found.some(f => f.startsWith('gimmick'))) missing.push('gimmick_name');
586
+ if (sexyCause && !found.some(f => f.startsWith('sexy'))) missing.push('sexy_cause');
587
+ if (authorityHook && !found.some(f => f.startsWith('authority'))) missing.push('authority_hook');
588
+
589
+ return {
590
+ name: 'MUP/MUS Alignment',
591
+ weight: 20,
592
+ raw_score: rawScore,
593
+ weighted_score: rawScore * 20 / 10,
594
+ details: `Found: ${found.join(', ') || 'none'}. Missing: ${missing.join(', ') || 'none'}`,
595
+ };
596
+ }
597
+
598
+ /**
599
+ * Criterion 4: Anti-Homogeneization (20%)
600
+ * Check production files against cliche list.
601
+ * 0 cliches = 10, 1-2 = 7, 3-5 = 4, 6+ = 1
602
+ */
603
+ function evaluateAntiHomogeneization(offerPath: string): CriterionScore {
604
+ const productionContent = readProductionFiles(offerPath);
605
+
606
+ if (!productionContent.trim()) {
607
+ return {
608
+ name: 'Anti-Homogeneization',
609
+ weight: 20,
610
+ raw_score: 0,
611
+ weighted_score: 0,
612
+ details: 'No production files found',
613
+ };
614
+ }
615
+
616
+ // Top 20 DR (direct response) cliches — cross-niche
617
+ const cliches: RegExp[] = [
618
+ /\bmétodo\s+infalível\b/gi,
619
+ /\bmetodo\s+infalivel\b/gi,
620
+ /\bsegredo\s+d[oae]s?\b/gi,
621
+ /\btransformação\b/gi,
622
+ /\btransformacao\b/gi,
623
+ /\bfinalmente[\s,]/gi,
624
+ /\bimagine\s/gi,
625
+ /\brevolucion[aá]ri[oa]\b/gi,
626
+ /\bincrível\b/gi,
627
+ /\bincrivel\b/gi,
628
+ /\bliberdade\s+financeira\b/gi,
629
+ /\bcorpo\s+dos\s+sonhos\b/gi,
630
+ /\bsem\s+(?:dieta|esforço|esforco)\b/gi,
631
+ /\bmetabolismo\s+acelerado\b/gi,
632
+ /\bconexão\s+profunda\b/gi,
633
+ /\bconexao\s+profunda\b/gi,
634
+ /\batracao\s+irresist[ií]vel\b/gi,
635
+ /\brenda\s+extra\b/gi,
636
+ /\bdesbloqu(?:ear|eie)\b/gi,
637
+ /\bempoder[ae]/gi,
638
+ ];
639
+
640
+ const found: string[] = [];
641
+ for (const cliche of cliches) {
642
+ const matches = productionContent.match(cliche);
643
+ if (matches && matches.length > 0) {
644
+ found.push(`"${matches[0]}" (x${matches.length})`);
645
+ }
646
+ }
647
+
648
+ const totalCliches = found.length;
649
+ let rawScore: number;
650
+ if (totalCliches === 0) rawScore = 10;
651
+ else if (totalCliches <= 2) rawScore = 7;
652
+ else if (totalCliches <= 5) rawScore = 4;
653
+ else rawScore = 1;
654
+
655
+ return {
656
+ name: 'Anti-Homogeneization',
657
+ weight: 20,
658
+ raw_score: rawScore,
659
+ weighted_score: rawScore * 20 / 10,
660
+ details: totalCliches === 0
661
+ ? '0 cliches detected — clean'
662
+ : `${totalCliches} cliche(s) detected: ${found.join(', ')}`,
663
+ };
664
+ }
665
+
666
+ /**
667
+ * Criterion 5: Formatting (5%)
668
+ * Check template header exists in production files ("> **Template usado:**").
669
+ * Present = 10, absent = 0
670
+ */
671
+ function evaluateFormatting(offerPath: string): CriterionScore {
672
+ const productionContent = readProductionFiles(offerPath);
673
+
674
+ if (!productionContent.trim()) {
675
+ return {
676
+ name: 'Formatting',
677
+ weight: 5,
678
+ raw_score: 0,
679
+ weighted_score: 0,
680
+ details: 'No production files found',
681
+ };
682
+ }
683
+
684
+ const hasTemplateHeader = />\s*\*\*Template\s+usado\s*:\*\*/i.test(productionContent);
685
+
686
+ const rawScore = hasTemplateHeader ? 10 : 0;
687
+
688
+ return {
689
+ name: 'Formatting',
690
+ weight: 5,
691
+ raw_score: rawScore,
692
+ weighted_score: rawScore * 5 / 10,
693
+ details: hasTemplateHeader
694
+ ? 'Template header present in production files'
695
+ : 'Missing "> **Template usado:**" header in production files',
696
+ };
697
+ }
698
+
699
+ // ==========================================
700
+ // BRIEFING GATE — 5 Criteria
701
+ // ==========================================
702
+
703
+ /**
704
+ * Criterion 1: HELIX Completeness (30%)
705
+ * Check helix-state.yaml for phases_completed count (10 phases = 100%)
706
+ */
707
+ async function evaluateHelixCompleteness(offerPath: string): Promise<CriterionScore> {
708
+ const helixPath = join(offerPath, 'helix-state.yaml');
709
+ const content = safeReadFile(helixPath);
710
+
711
+ if (!content) {
712
+ return {
713
+ name: 'HELIX Completeness',
714
+ weight: 30,
715
+ raw_score: 0,
716
+ weighted_score: 0,
717
+ details: 'helix-state.yaml not found',
718
+ };
719
+ }
720
+
721
+ // Count completed phases from helix_phases section
722
+ let phasesCompleted = 0;
723
+
724
+ // Try to read phases_completed from gates.briefing.phases_completed
725
+ const briefingPhasesMatch = content.match(/phases_completed\s*:\s*(\d+)/);
726
+ if (briefingPhasesMatch) {
727
+ phasesCompleted = parseInt(briefingPhasesMatch[1], 10);
728
+ } else {
729
+ // Count helix_phases with status: completed
730
+ const completedMatches = content.match(/status:\s*completed/g);
731
+ phasesCompleted = completedMatches ? completedMatches.length : 0;
732
+ }
733
+
734
+ const totalPhases = 10;
735
+ const completionPct = Math.min(100, (phasesCompleted / totalPhases) * 100);
736
+
737
+ let rawScore: number;
738
+ if (phasesCompleted >= 10) rawScore = 10;
739
+ else if (phasesCompleted >= 8) rawScore = 8;
740
+ else if (phasesCompleted >= 6) rawScore = 6;
741
+ else if (phasesCompleted >= 4) rawScore = 4;
742
+ else if (phasesCompleted >= 2) rawScore = 2;
743
+ else rawScore = 0;
744
+
745
+ return {
746
+ name: 'HELIX Completeness',
747
+ weight: 30,
748
+ raw_score: rawScore,
749
+ weighted_score: rawScore * 30 / 10,
750
+ details: `${phasesCompleted}/${totalPhases} phases completed (${completionPct.toFixed(0)}%)`,
751
+ };
752
+ }
753
+
754
+ /**
755
+ * Criterion 2: MUP Quality (25%)
756
+ * Check mecanismo-unico.yaml: state, blind_critic_mup score
757
+ */
758
+ async function evaluateMupQuality(offerPath: string): Promise<CriterionScore> {
759
+ const mecPath = join(offerPath, 'mecanismo-unico.yaml');
760
+ const content = safeReadFile(mecPath);
761
+
762
+ if (!content) {
763
+ return {
764
+ name: 'MUP Quality',
765
+ weight: 25,
766
+ raw_score: 0,
767
+ weighted_score: 0,
768
+ details: 'mecanismo-unico.yaml not found',
769
+ };
770
+ }
771
+
772
+ // Read blind_critic_mup score from mecanismo-unico.yaml or helix-state.yaml
773
+ let blindCriticScore = 0;
774
+ const mecScoreMatch = content.match(/blind_critic_mup\s*:\s*([\d.]+)/);
775
+ if (mecScoreMatch) {
776
+ blindCriticScore = parseFloat(mecScoreMatch[1]);
777
+ } else {
778
+ // Try helix-state.yaml
779
+ const helixContent = safeReadFile(join(offerPath, 'helix-state.yaml'));
780
+ const helixScoreMatch = helixContent.match(/blind_critic_mup[_\s]*score\s*:\s*([\d.]+)/);
781
+ if (helixScoreMatch) {
782
+ blindCriticScore = parseFloat(helixScoreMatch[1]);
783
+ }
784
+ }
785
+
786
+ // Check state field (top-level)
787
+ const stateMatch = content.match(/^state\s*:\s*["']?(\w+)["']?/m);
788
+ const mecState = stateMatch ? stateMatch[1].toUpperCase() : 'UNKNOWN';
789
+
790
+ // Check MUP fields are populated
791
+ const hasMupNewCause = /new_cause\s*:/.test(content) && content.match(/new_cause\s*:\s*["']?.{10,}/)?.[0] !== undefined;
792
+ const hasMupParadigmShift = /paradigm_shift\s*:/.test(content) && content.match(/paradigm_shift\s*:\s*["']?.{10,}/)?.[0] !== undefined;
793
+
794
+ // Score: base from blind_critic (60%) + state bonus (20%) + fields (20%)
795
+ let rawScore = 0;
796
+
797
+ // blind_critic score contribution (0-6 raw)
798
+ if (blindCriticScore >= 9) rawScore += 6;
799
+ else if (blindCriticScore >= 8) rawScore += 5;
800
+ else if (blindCriticScore >= 7) rawScore += 4;
801
+ else if (blindCriticScore >= 6) rawScore += 3;
802
+ else if (blindCriticScore > 0) rawScore += 1;
803
+
804
+ // State bonus (0-2 raw)
805
+ if (mecState === 'APPROVED') rawScore += 2;
806
+ else if (mecState === 'VALIDATED') rawScore += 1.5;
807
+ else if (mecState === 'DRAFT') rawScore += 0.5;
808
+
809
+ // Fields present (0-2 raw)
810
+ if (hasMupNewCause) rawScore += 1;
811
+ if (hasMupParadigmShift) rawScore += 1;
812
+
813
+ rawScore = Math.min(10, Math.round(rawScore * 10) / 10);
814
+
815
+ return {
816
+ name: 'MUP Quality',
817
+ weight: 25,
818
+ raw_score: rawScore,
819
+ weighted_score: rawScore * 25 / 10,
820
+ details: `State: ${mecState}, blind_critic_mup: ${blindCriticScore || 'N/A'}, new_cause: ${hasMupNewCause ? 'YES' : 'NO'}, paradigm_shift: ${hasMupParadigmShift ? 'YES' : 'NO'}`,
821
+ };
822
+ }
823
+
824
+ /**
825
+ * Criterion 3: MUS Quality (20%)
826
+ * Check mecanismo-unico.yaml: mus fields present, blind_critic_mus score
827
+ */
828
+ async function evaluateMusQuality(offerPath: string): Promise<CriterionScore> {
829
+ const mecPath = join(offerPath, 'mecanismo-unico.yaml');
830
+ const content = safeReadFile(mecPath);
831
+
832
+ if (!content) {
833
+ return {
834
+ name: 'MUS Quality',
835
+ weight: 20,
836
+ raw_score: 0,
837
+ weighted_score: 0,
838
+ details: 'mecanismo-unico.yaml not found',
839
+ };
840
+ }
841
+
842
+ // Read blind_critic_mus score
843
+ let blindCriticScore = 0;
844
+ const mecScoreMatch = content.match(/blind_critic_mus\s*:\s*([\d.]+)/);
845
+ if (mecScoreMatch) {
846
+ blindCriticScore = parseFloat(mecScoreMatch[1]);
847
+ } else {
848
+ const helixContent = safeReadFile(join(offerPath, 'helix-state.yaml'));
849
+ const helixScoreMatch = helixContent.match(/blind_critic_mus[_\s]*score\s*:\s*([\d.]+)/);
850
+ if (helixScoreMatch) {
851
+ blindCriticScore = parseFloat(helixScoreMatch[1]);
852
+ }
853
+ }
854
+
855
+ // Check MUS section fields
856
+ const musSection = content.match(/mus:([\s\S]*?)(?=\n\w|\n \w{2,}:(?!\s+-)|\n---|\Z)/)?.[1] || '';
857
+ const hasHeroIngredient = /hero_ingredient\s*:/.test(content) && content.match(/hero_ingredient[\s\S]{5,}/)?.[0] !== undefined;
858
+ const hasGimmickName = /gimmick_name\s*:/.test(content);
859
+ const hasNewOpportunity = /new_opportunity\s*:/.test(content) && content.match(/new_opportunity\s*:\s*.{5,}/)?.[0] !== undefined;
860
+
861
+ let rawScore = 0;
862
+
863
+ // blind_critic score contribution (0-6 raw)
864
+ if (blindCriticScore >= 9) rawScore += 6;
865
+ else if (blindCriticScore >= 8) rawScore += 5;
866
+ else if (blindCriticScore >= 7) rawScore += 4;
867
+ else if (blindCriticScore >= 6) rawScore += 3;
868
+ else if (blindCriticScore > 0) rawScore += 1;
869
+
870
+ // Fields present (0-4 raw)
871
+ if (hasHeroIngredient) rawScore += 1.5;
872
+ if (hasGimmickName) rawScore += 1.5;
873
+ if (hasNewOpportunity) rawScore += 1;
874
+
875
+ rawScore = Math.min(10, Math.round(rawScore * 10) / 10);
876
+
877
+ return {
878
+ name: 'MUS Quality',
879
+ weight: 20,
880
+ raw_score: rawScore,
881
+ weighted_score: rawScore * 20 / 10,
882
+ details: `blind_critic_mus: ${blindCriticScore || 'N/A'}, hero_ingredient: ${hasHeroIngredient ? 'YES' : 'NO'}, gimmick_name: ${hasGimmickName ? 'YES' : 'NO'}, new_opportunity: ${hasNewOpportunity ? 'YES' : 'NO'}`,
883
+ };
884
+ }
885
+
886
+ /**
887
+ * Criterion 4: VOC Alignment (15%)
888
+ * Check research/synthesis.md exists and has meaningful content
889
+ */
890
+ async function evaluateVocAlignment(offerPath: string): Promise<CriterionScore> {
891
+ const synthesisPath = join(offerPath, 'research', 'synthesis.md');
892
+ const content = safeReadFile(synthesisPath);
893
+
894
+ if (!content || !content.trim()) {
895
+ return {
896
+ name: 'VOC Alignment',
897
+ weight: 15,
898
+ raw_score: 0,
899
+ weighted_score: 0,
900
+ details: 'research/synthesis.md not found or empty',
901
+ };
902
+ }
903
+
904
+ const wordCount = countWords(content);
905
+ const lowerContent = content.toLowerCase();
906
+
907
+ // Check for key sections indicating quality VOC synthesis
908
+ const hasDRE = /dre|emocao dominante|emoção dominante|dominant emotion/i.test(content);
909
+ const hasAvatar = /avatar|persona|perfil do/i.test(content);
910
+ const hasQuotes = (/[""].{10,}[""]/.test(content)) || (/^>\s*.{10,}/m.test(content));
911
+ const hasInsights = /insight|descoberta|finding/i.test(content);
912
+ const hasConfidence = /confidence|confianca|confiança/i.test(content);
913
+
914
+ const sectionsFound = [hasDRE, hasAvatar, hasQuotes, hasInsights, hasConfidence].filter(Boolean).length;
915
+
916
+ let rawScore = 0;
917
+
918
+ // Word count contribution (0-4)
919
+ if (wordCount >= 2000) rawScore += 4;
920
+ else if (wordCount >= 1000) rawScore += 3;
921
+ else if (wordCount >= 500) rawScore += 2;
922
+ else if (wordCount >= 100) rawScore += 1;
923
+
924
+ // Sections found contribution (0-6, 1.2 per section)
925
+ rawScore += sectionsFound * 1.2;
926
+
927
+ rawScore = Math.min(10, Math.round(rawScore * 10) / 10);
928
+
929
+ return {
930
+ name: 'VOC Alignment',
931
+ weight: 15,
932
+ raw_score: rawScore,
933
+ weighted_score: rawScore * 15 / 10,
934
+ details: `synthesis.md: ${wordCount} words, ${sectionsFound}/5 key sections present. Sections: DRE=${hasDRE}, Avatar=${hasAvatar}, Quotes=${hasQuotes}, Insights=${hasInsights}, Confidence=${hasConfidence}`,
935
+ };
936
+ }
937
+
938
+ /**
939
+ * Criterion 5: Mecanismo State (10%)
940
+ * Check mecanismo-unico.yaml state field
941
+ * APPROVED=100, VALIDATED=80, DRAFT=40
942
+ */
943
+ async function evaluateMecanismoState(offerPath: string): Promise<CriterionScore> {
944
+ const mecPath = join(offerPath, 'mecanismo-unico.yaml');
945
+ const content = safeReadFile(mecPath);
946
+
947
+ if (!content) {
948
+ return {
949
+ name: 'Mecanismo State',
950
+ weight: 10,
951
+ raw_score: 0,
952
+ weighted_score: 0,
953
+ details: 'mecanismo-unico.yaml not found',
954
+ };
955
+ }
956
+
957
+ const stateMatch = content.match(/^state\s*:\s*["']?(\w+)["']?/m);
958
+ const mecState = stateMatch ? stateMatch[1].toUpperCase() : 'UNKNOWN';
959
+
960
+ let rawScore: number;
961
+ let pct: number;
962
+
963
+ if (mecState === 'APPROVED') { rawScore = 10; pct = 100; }
964
+ else if (mecState === 'VALIDATED') { rawScore = 8; pct = 80; }
965
+ else if (mecState === 'DRAFT') { rawScore = 4; pct = 40; }
966
+ else { rawScore = 0; pct = 0; }
967
+
968
+ return {
969
+ name: 'Mecanismo State',
970
+ weight: 10,
971
+ raw_score: rawScore,
972
+ weighted_score: rawScore * 10 / 10,
973
+ details: `State: ${mecState} (${pct}%)`,
974
+ };
975
+ }
976
+
977
+ // ==========================================
978
+ // Public API
979
+ // ==========================================
980
+
981
+ /**
982
+ * Evaluate Briefing Gate with weighted scoring.
983
+ * @param offerRelativePath - Relative path to offer (e.g. "saude/florayla") or absolute path
984
+ * Criteria:
985
+ * 1. HELIX Completeness 30%
986
+ * 2. MUP Quality 25%
987
+ * 3. MUS Quality 20%
988
+ * 4. VOC Alignment 15%
989
+ * 5. Mecanismo State 10%
990
+ * Verdict: >=75 PASSED, 50-74 NEEDS_REVIEW, <50 FAILED
991
+ */
992
+ export async function evaluateBriefingGate(offerRelativePath: string): Promise<{
993
+ total_weighted: number;
994
+ verdict: 'PASSED' | 'NEEDS_REVIEW' | 'FAILED';
995
+ criteria: CriterionScore[];
996
+ }> {
997
+ const resolved = resolveOfferPath(offerRelativePath);
998
+
999
+ const criteria: CriterionScore[] = await Promise.all([
1000
+ evaluateHelixCompleteness(resolved),
1001
+ evaluateMupQuality(resolved),
1002
+ evaluateMusQuality(resolved),
1003
+ evaluateVocAlignment(resolved),
1004
+ evaluateMecanismoState(resolved),
1005
+ ]);
1006
+
1007
+ const totalWeighted = criteria.reduce((sum, c) => sum + c.weighted_score, 0);
1008
+ const total = Math.round(totalWeighted * 10) / 10;
1009
+
1010
+ let verdict: 'PASSED' | 'NEEDS_REVIEW' | 'FAILED';
1011
+ if (total >= 75) verdict = 'PASSED';
1012
+ else if (total >= 50) verdict = 'NEEDS_REVIEW';
1013
+ else verdict = 'FAILED';
1014
+
1015
+ return { total_weighted: total, verdict, criteria };
1016
+ }
1017
+
1018
+ /**
1019
+ * Evaluate Research Gate with weighted scoring.
1020
+ * @param offerPath - Path to offer directory (absolute or relative to ecosystem root)
1021
+ */
1022
+ export function evaluateResearchGate(offerPath: string): GateScore {
1023
+ const resolved = resolveOfferPath(offerPath);
1024
+
1025
+ const criteria: CriterionScore[] = [
1026
+ evaluateVocDepth(resolved),
1027
+ evaluateCompetitorAnalysis(resolved),
1028
+ evaluateMechanismDiscovery(resolved),
1029
+ evaluateAvatarDefinition(resolved),
1030
+ evaluateStructureCompliance(resolved),
1031
+ ];
1032
+
1033
+ const totalWeighted = criteria.reduce((sum, c) => sum + c.weighted_score, 0);
1034
+
1035
+ return {
1036
+ gate: 'research',
1037
+ total_weighted: Math.round(totalWeighted * 10) / 10,
1038
+ verdict: computeVerdict(totalWeighted),
1039
+ criteria,
1040
+ };
1041
+ }
1042
+
1043
+ /**
1044
+ * Evaluate Production Gate with weighted scoring.
1045
+ * @param offerPath - Path to offer directory (absolute or relative to ecosystem root)
1046
+ */
1047
+ export function evaluateProductionGate(offerPath: string): GateScore {
1048
+ const resolved = resolveOfferPath(offerPath);
1049
+
1050
+ const criteria: CriterionScore[] = [
1051
+ evaluateEmotionalImpact(resolved),
1052
+ evaluateSpecificity(resolved),
1053
+ evaluateMupMusAlignment(resolved),
1054
+ evaluateAntiHomogeneization(resolved),
1055
+ evaluateFormatting(resolved),
1056
+ ];
1057
+
1058
+ const totalWeighted = criteria.reduce((sum, c) => sum + c.weighted_score, 0);
1059
+
1060
+ return {
1061
+ gate: 'production',
1062
+ total_weighted: Math.round(totalWeighted * 10) / 10,
1063
+ verdict: computeVerdict(totalWeighted),
1064
+ criteria,
1065
+ };
1066
+ }
1067
+
1068
+ /**
1069
+ * Format a GateScore into a readable report string.
1070
+ */
1071
+ export function formatGateReport(score: GateScore): string {
1072
+ const divider = '═'.repeat(60);
1073
+ const thinDivider = '─'.repeat(60);
1074
+
1075
+ const verdictEmoji = score.verdict === 'PASSED'
1076
+ ? 'PASSED'
1077
+ : score.verdict === 'NEEDS_REVIEW'
1078
+ ? 'NEEDS REVIEW'
1079
+ : 'FAILED';
1080
+
1081
+ const lines: string[] = [
1082
+ divider,
1083
+ ` WEIGHTED ${score.gate.toUpperCase()} GATE — ${verdictEmoji}`,
1084
+ ` Total Score: ${score.total_weighted.toFixed(1)} / 100`,
1085
+ divider,
1086
+ '',
1087
+ ];
1088
+
1089
+ for (const c of score.criteria) {
1090
+ const bar = '█'.repeat(Math.round(c.raw_score)) + '░'.repeat(10 - Math.round(c.raw_score));
1091
+ lines.push(` ${c.name} (${c.weight}%)`);
1092
+ lines.push(` Raw: ${c.raw_score}/10 | Weighted: ${c.weighted_score.toFixed(1)}/${c.weight}`);
1093
+ lines.push(` ${bar}`);
1094
+ lines.push(` ${c.details}`);
1095
+ lines.push('');
1096
+ }
1097
+
1098
+ lines.push(thinDivider);
1099
+ lines.push(` Verdict: ${score.verdict} (>=85 PASSED | 70-84 NEEDS_REVIEW | <70 FAILED)`);
1100
+ lines.push(thinDivider);
1101
+
1102
+ return lines.join('\n');
1103
+ }