@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.
- package/LICENSE +21 -0
- package/README.en.md +185 -0
- package/README.md +211 -0
- package/bin/cli.js +98 -0
- package/framework/.aios-core/.dispatch-iterations.json +8 -0
- package/framework/.aios-core/constitution.md +171 -0
- package/framework/.aios-core/copy-chief/activation/agent-activation-pipeline.js +426 -0
- package/framework/.aios-core/copy-chief/activation/frontmatter-validator.js +81 -0
- package/framework/.aios-core/copy-chief/activation/knowledge-loader.js +608 -0
- package/framework/.aios-core/copy-chief/config/config-cache.js +145 -0
- package/framework/.aios-core/copy-chief/config/config-cache.ts +168 -0
- package/framework/.aios-core/copy-chief/config/config-loader.js +188 -0
- package/framework/.aios-core/copy-chief/config/config-loader.ts +250 -0
- package/framework/.aios-core/copy-chief/config/config-resolver.js +196 -0
- package/framework/.aios-core/copy-chief/config/config-resolver.ts +329 -0
- package/framework/.aios-core/copy-chief/config/env-interpolator.js +88 -0
- package/framework/.aios-core/copy-chief/config/env-interpolator.ts +125 -0
- package/framework/.aios-core/copy-chief/config/merge-utils.js +68 -0
- package/framework/.aios-core/copy-chief/config/merge-utils.ts +94 -0
- package/framework/.aios-core/copy-chief/config/mutability-guard.js +112 -0
- package/framework/.aios-core/copy-chief/context/aios-session-state.js +318 -0
- package/framework/.aios-core/copy-chief/context/aios-session-state.ts +381 -0
- package/framework/.aios-core/copy-chief/context/context-manager.js +316 -0
- package/framework/.aios-core/copy-chief/context/context-manager.ts +374 -0
- package/framework/.aios-core/copy-chief/context/context-tiering.js +196 -0
- package/framework/.aios-core/copy-chief/context/context-tiering.ts +268 -0
- package/framework/.aios-core/copy-chief/copy/copy-versioning.js +131 -0
- package/framework/.aios-core/copy-chief/copy/copy-versioning.ts +162 -0
- package/framework/.aios-core/copy-chief/copy/ids.js +231 -0
- package/framework/.aios-core/copy-chief/copy/ids.ts +345 -0
- package/framework/.aios-core/copy-chief/dispatch/dispatch-queue-manager.js +562 -0
- package/framework/.aios-core/copy-chief/etl/etl-helpers.js +539 -0
- package/framework/.aios-core/copy-chief/etl/etl-helpers.ts +855 -0
- package/framework/.aios-core/copy-chief/etl/platform-actors.js +215 -0
- package/framework/.aios-core/copy-chief/etl/platform-actors.ts +254 -0
- package/framework/.aios-core/copy-chief/execution/condition-evaluator.js +154 -0
- package/framework/.aios-core/copy-chief/execution/copy-prompt-builder.js +253 -0
- package/framework/.aios-core/copy-chief/execution/copy-workflow-executor.js +399 -0
- package/framework/.aios-core/copy-chief/execution/rate-limit-manager.js +277 -0
- package/framework/.aios-core/copy-chief/execution/wave-analyzer.js +285 -0
- package/framework/.aios-core/copy-chief/execution/workflow-validator.js +154 -0
- package/framework/.aios-core/copy-chief/feedback/validation-feedback.js +331 -0
- package/framework/.aios-core/copy-chief/feedback/validation-feedback.ts +392 -0
- package/framework/.aios-core/copy-chief/gates/checklist-generator.js +420 -0
- package/framework/.aios-core/copy-chief/gates/commit-validator.js +203 -0
- package/framework/.aios-core/copy-chief/gates/commit-validator.ts +239 -0
- package/framework/.aios-core/copy-chief/gates/copy-output-validator.js +204 -0
- package/framework/.aios-core/copy-chief/gates/copy-output-validator.ts +244 -0
- package/framework/.aios-core/copy-chief/gates/delivery-gate.js +147 -0
- package/framework/.aios-core/copy-chief/gates/focus-area-recommender.js +285 -0
- package/framework/.aios-core/copy-chief/gates/gate-audit.js +121 -0
- package/framework/.aios-core/copy-chief/gates/gate-evaluator.js +470 -0
- package/framework/.aios-core/copy-chief/gates/gate-evaluator.ts +575 -0
- package/framework/.aios-core/copy-chief/gates/gate-prereq.js +235 -0
- package/framework/.aios-core/copy-chief/gates/gate-prereq.ts +274 -0
- package/framework/.aios-core/copy-chief/gates/gate-resolver.js +252 -0
- package/framework/.aios-core/copy-chief/gates/gate-resolver.ts +321 -0
- package/framework/.aios-core/copy-chief/gates/gate-result-parser.js +81 -0
- package/framework/.aios-core/copy-chief/gates/gate-result-parser.ts +106 -0
- package/framework/.aios-core/copy-chief/gates/gate-trend-analyzer.js +122 -0
- package/framework/.aios-core/copy-chief/gates/mecanismo-gate.js +184 -0
- package/framework/.aios-core/copy-chief/gates/mecanismo-gate.ts +259 -0
- package/framework/.aios-core/copy-chief/gates/production-gates.js +488 -0
- package/framework/.aios-core/copy-chief/gates/production-gates.ts +655 -0
- package/framework/.aios-core/copy-chief/gates/quality-gate-manager.js +462 -0
- package/framework/.aios-core/copy-chief/gates/quality-gate-manager.ts +615 -0
- package/framework/.aios-core/copy-chief/gates/weighted-gates.js +792 -0
- package/framework/.aios-core/copy-chief/gates/weighted-gates.ts +1103 -0
- package/framework/.aios-core/copy-chief/handoff/handoff-engine.js +363 -0
- package/framework/.aios-core/copy-chief/handoff/handoff-engine.ts +562 -0
- package/framework/.aios-core/copy-chief/handoff/handoff-protocol.js +377 -0
- package/framework/.aios-core/copy-chief/health/checks/data-tier-integrity.js +106 -0
- package/framework/.aios-core/copy-chief/health/checks/hooks-heartbeat.js +120 -0
- package/framework/.aios-core/copy-chief/health/checks/synapse-performance.js +83 -0
- package/framework/.aios-core/copy-chief/health/doc-rot-scanner.js +687 -0
- package/framework/.aios-core/copy-chief/health/doc-rot-scanner.ts +853 -0
- package/framework/.aios-core/copy-chief/health/manifest-validator.js +156 -0
- package/framework/.aios-core/copy-chief/ids/mcp-circuit-breaker.js +246 -0
- package/framework/.aios-core/copy-chief/index.js +142 -0
- package/framework/.aios-core/copy-chief/integrations/clickup-client.js +168 -0
- package/framework/.aios-core/copy-chief/integrations/clickup-client.ts +226 -0
- package/framework/.aios-core/copy-chief/learning/gotcha-registry.js +398 -0
- package/framework/.aios-core/copy-chief/learning/gotchas-memory.js +430 -0
- package/framework/.aios-core/copy-chief/learning/gotchas-memory.ts +517 -0
- package/framework/.aios-core/copy-chief/learning/journey-tracker.js +287 -0
- package/framework/.aios-core/copy-chief/learning/journey-tracker.ts +373 -0
- package/framework/.aios-core/copy-chief/learning/self-learning.js +460 -0
- package/framework/.aios-core/copy-chief/learning/self-learning.ts +646 -0
- package/framework/.aios-core/copy-chief/lifecycle/copy-data-lifecycle.js +305 -0
- package/framework/.aios-core/copy-chief/lifecycle/session-digest.js +294 -0
- package/framework/.aios-core/copy-chief/lifecycle/session-digest.ts +327 -0
- package/framework/.aios-core/copy-chief/lifecycle/session-handoff.js +289 -0
- package/framework/.aios-core/copy-chief/lifecycle/session-handoff.ts +330 -0
- package/framework/.aios-core/copy-chief/memory/agent-memory-manager.js +313 -0
- package/framework/.aios-core/copy-chief/memory/agent-memory-writeback.js +178 -0
- package/framework/.aios-core/copy-chief/memory/index-updater.js +104 -0
- package/framework/.aios-core/copy-chief/memory/memory-compactor.js +152 -0
- package/framework/.aios-core/copy-chief/memory/memory-populator.js +215 -0
- package/framework/.aios-core/copy-chief/memory/session-digest-extractor.js +462 -0
- package/framework/.aios-core/copy-chief/observability/copy-status-writer.js +219 -0
- package/framework/.aios-core/copy-chief/observability/dashboard-client.js +302 -0
- package/framework/.aios-core/copy-chief/observability/dashboard-client.ts +366 -0
- package/framework/.aios-core/copy-chief/observability/dashboard-emitter.js +178 -0
- package/framework/.aios-core/copy-chief/observability/semantic-translator.js +264 -0
- package/framework/.aios-core/copy-chief/observability/semantic-translator.ts +354 -0
- package/framework/.aios-core/copy-chief/orchestration/deliverable-assignment.js +84 -0
- package/framework/.aios-core/copy-chief/orchestration/helix-orchestrator.js +403 -0
- package/framework/.aios-core/copy-chief/orchestration/lock-manager.js +301 -0
- package/framework/.aios-core/copy-chief/orchestration/offer-scanner.js +118 -0
- package/framework/.aios-core/copy-chief/orchestration/recovery-handler.js +377 -0
- package/framework/.aios-core/copy-chief/orchestration/task-complexity-classifier.js +253 -0
- package/framework/.aios-core/copy-chief/plan/execution-plan-generator.js +355 -0
- package/framework/.aios-core/copy-chief/plan/plan-metrics.js +129 -0
- package/framework/.aios-core/copy-chief/plan/plan-state-machine.js +403 -0
- package/framework/.aios-core/copy-chief/plan/plan-verification.js +163 -0
- package/framework/.aios-core/copy-chief/quality/persuasion-flow.js +211 -0
- package/framework/.aios-core/copy-chief/quality/persuasion-flow.ts +264 -0
- package/framework/.aios-core/copy-chief/quality/self-critique.js +277 -0
- package/framework/.aios-core/copy-chief/quality/self-critique.ts +284 -0
- package/framework/.aios-core/copy-chief/quality/template-validator.js +276 -0
- package/framework/.aios-core/copy-chief/quality/template-validator.ts +307 -0
- package/framework/.aios-core/copy-chief/recovery/recovery-handler.js +437 -0
- package/framework/.aios-core/copy-chief/recovery/recovery-handler.ts +569 -0
- package/framework/.aios-core/copy-chief/state/mecanismo-updater.js +189 -0
- package/framework/.aios-core/copy-chief/state/mecanismo-updater.ts +233 -0
- package/framework/.aios-core/copy-chief/state/offer-detector.js +117 -0
- package/framework/.aios-core/copy-chief/state/offer-detector.ts +166 -0
- package/framework/.aios-core/copy-chief/state/offer-state.js +338 -0
- package/framework/.aios-core/copy-chief/state/offer-state.ts +477 -0
- package/framework/.aios-core/copy-chief/state/session-state.js +543 -0
- package/framework/.aios-core/copy-chief/state/session-state.ts +729 -0
- package/framework/.aios-core/copy-chief/state/state-machine.js +345 -0
- package/framework/.aios-core/copy-chief/state/state-machine.ts +432 -0
- package/framework/.aios-core/copy-chief/surface/decision-queue.js +172 -0
- package/framework/.aios-core/copy-chief/surface/decision-queue.ts +285 -0
- package/framework/.aios-core/copy-chief/surface/surface-checker.js +155 -0
- package/framework/.aios-core/copy-chief/surface/surface-checker.ts +252 -0
- package/framework/.aios-core/copy-chief/utils/decision-detector.js +138 -0
- package/framework/.aios-core/copy-chief/utils/decision-detector.ts +193 -0
- package/framework/.aios-core/copy-chief/utils/file-discovery.js +180 -0
- package/framework/.aios-core/copy-chief/utils/file-discovery.ts +241 -0
- package/framework/.aios-core/copy-chief/utils/parallel-executor.js +125 -0
- package/framework/.aios-core/copy-chief/utils/parallel-executor.ts +140 -0
- package/framework/.aios-core/copy-chief/utils/processing-registry.js +218 -0
- package/framework/.aios-core/copy-chief/utils/processing-registry.ts +273 -0
- package/framework/.aios-core/copy-chief/utils/repetition-detector.js +157 -0
- package/framework/.aios-core/copy-chief/utils/repetition-detector.ts +173 -0
- package/framework/.aios-core/copy-chief/utils/suggestion-engine.js +328 -0
- package/framework/.aios-core/copy-chief/utils/suggestion-engine.ts +410 -0
- package/framework/.aios-core/copy-chief/utils/task-manager.js +320 -0
- package/framework/.aios-core/copy-chief/utils/task-manager.ts +355 -0
- package/framework/.aios-core/copy-chief/utils/yaml-validator.js +434 -0
- package/framework/.aios-core/copy-chief/utils/yaml-validator.ts +524 -0
- package/framework/.aios-core/copy-chief/workflow/confidence-scorer.js +253 -0
- package/framework/.aios-core/copy-chief/workflow/elicitation-engine.js +154 -0
- package/framework/.aios-core/copy-chief/workflow/gate-auto-advance.js +208 -0
- package/framework/.aios-core/copy-chief/workflow/gate-auto-advance.ts +261 -0
- package/framework/.aios-core/copy-chief/workflow/helix-phases.js +334 -0
- package/framework/.aios-core/copy-chief/workflow/helix-phases.ts +391 -0
- package/framework/.aios-core/copy-chief/workflow/helix-requirements.js +148 -0
- package/framework/.aios-core/copy-chief/workflow/helix-requirements.ts +161 -0
- package/framework/.aios-core/copy-chief/workflow/pattern-capture.js +238 -0
- package/framework/.aios-core/copy-chief/workflow/phase-checklist.js +246 -0
- package/framework/.aios-core/copy-chief/workflow/phase-checklist.ts +269 -0
- package/framework/.aios-core/copy-chief/workflow/skill-triggers.js +180 -0
- package/framework/.aios-core/copy-chief/workflow/skill-triggers.ts +179 -0
- package/framework/.aios-core/copy-chief/workflow/squad-creator.js +113 -0
- package/framework/.aios-core/copy-chief/workflow/story-manager.js +217 -0
- package/framework/.aios-core/copy-chief/workflow/suggestion-engine.js +307 -0
- package/framework/.aios-core/copy-chief/workflow/workflow-intelligence.js +290 -0
- package/framework/.aios-core/copy-chief/workflow/workflow-intelligence.ts +413 -0
- package/framework/.aios-core/copy-chief/workflow/workflow-state-manager.js +418 -0
- package/framework/.aios-core/copy-chief/workflow/workflow-state-manager.ts +516 -0
- package/framework/.aios-core/core/graph-dashboard/mermaid-formatter.js +275 -0
- package/framework/.aios-core/core/synapse/context/context-builder.js +34 -0
- package/framework/.aios-core/core/synapse/context/context-tracker.js +191 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/consistency-collector.js +357 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/hook-collector.js +254 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/manifest-collector.js +82 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/output-analyzer.js +134 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/pipeline-collector.js +75 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/quality-collector.js +363 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/relevance-matrix.js +174 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/safe-read-json.js +31 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/session-collector.js +102 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/timing-collector.js +157 -0
- package/framework/.aios-core/core/synapse/diagnostics/collectors/uap-collector.js +83 -0
- package/framework/.aios-core/core/synapse/diagnostics/report-formatter.js +460 -0
- package/framework/.aios-core/core/synapse/diagnostics/synapse-diagnostics.js +168 -0
- package/framework/.aios-core/core/synapse/domain/domain-loader.js +322 -0
- package/framework/.aios-core/core/synapse/engine.js +380 -0
- package/framework/.aios-core/core/synapse/layers/l0-constitution.js +80 -0
- package/framework/.aios-core/core/synapse/layers/l1-global.js +102 -0
- package/framework/.aios-core/core/synapse/layers/l2-agent.js +94 -0
- package/framework/.aios-core/core/synapse/layers/l3-workflow.js +94 -0
- package/framework/.aios-core/core/synapse/layers/l4-task.js +83 -0
- package/framework/.aios-core/core/synapse/layers/l5-squad.js +244 -0
- package/framework/.aios-core/core/synapse/layers/l6-keyword.js +155 -0
- package/framework/.aios-core/core/synapse/layers/l7-star-command.js +220 -0
- package/framework/.aios-core/core/synapse/layers/layer-processor.js +82 -0
- package/framework/.aios-core/core/synapse/memory/memory-bridge.js +214 -0
- package/framework/.aios-core/core/synapse/output/formatter.js +568 -0
- package/framework/.aios-core/core/synapse/runtime/hook-runtime.js +74 -0
- package/framework/.aios-core/core/synapse/scripts/generate-constitution.js +204 -0
- package/framework/.aios-core/core/synapse/session/session-manager.js +403 -0
- package/framework/.aios-core/core/synapse/utils/paths.js +57 -0
- package/framework/.aios-core/core/synapse/utils/tokens.js +25 -0
- package/framework/.aios-core/core-config.yaml +139 -0
- package/framework/.aios-core/framework-config.yaml +150 -0
- package/framework/.aios-core/package-lock.json +33 -0
- package/framework/.aios-core/package.json +9 -0
- package/framework/CHANGELOG.md +697 -0
- package/framework/CLAUDE.md +93 -0
- package/framework/COPY-CHIEF-INDEX.md +330 -0
- package/framework/COPY-DOCS-INDEX.md +120 -0
- package/framework/GUIA-ECOSSISTEMA.md +940 -0
- package/framework/GUIA-INSTALACAO.md +382 -0
- package/framework/GUIA-USO-ECOSSISTEMA.md +238 -0
- package/framework/QUICK-REFERENCE.md +123 -0
- package/framework/RUNBOOK.md +401 -0
- package/framework/WORKFLOW-CANONICO.md +422 -0
- package/framework/agents/CLAUDE.md +54 -0
- package/framework/agents/atlas/AGENT.md +167 -0
- package/framework/agents/atlas/MEMORY.md +49 -0
- package/framework/agents/atlas/SOUL.md +84 -0
- package/framework/agents/atlas.md +234 -0
- package/framework/agents/blade/AGENT.md +203 -0
- package/framework/agents/blade/MEMORY.md +34 -0
- package/framework/agents/blade/SOUL.md +87 -0
- package/framework/agents/blade.md +245 -0
- package/framework/agents/cipher/AGENT.md +210 -0
- package/framework/agents/cipher/MEMORY.md +38 -0
- package/framework/agents/cipher/SOUL.md +57 -0
- package/framework/agents/cipher.md +184 -0
- package/framework/agents/competitor-analyzer.md +224 -0
- package/framework/agents/copy-validator.md +55 -0
- package/framework/agents/copywriter.md +169 -0
- package/framework/agents/echo/AGENT.md +189 -0
- package/framework/agents/echo/MEMORY.md +41 -0
- package/framework/agents/echo/SOUL.md +58 -0
- package/framework/agents/echo.md +219 -0
- package/framework/agents/forge/AGENT.md +213 -0
- package/framework/agents/forge/MEMORY.md +40 -0
- package/framework/agents/forge/SOUL.md +84 -0
- package/framework/agents/forge.md +220 -0
- package/framework/agents/hawk/AGENT.md +204 -0
- package/framework/agents/hawk/MEMORY.md +47 -0
- package/framework/agents/hawk/SOUL.md +84 -0
- package/framework/agents/hawk.md +251 -0
- package/framework/agents/helix/AGENT.md +250 -0
- package/framework/agents/helix/MEMORY.md +54 -0
- package/framework/agents/helix/SOUL.md +77 -0
- package/framework/agents/helix.md +131 -0
- package/framework/agents/ops.md +134 -0
- package/framework/agents/reflection/AGENT.md +52 -0
- package/framework/agents/reflection/MEMORY.md +33 -0
- package/framework/agents/reflection/SOUL.md +55 -0
- package/framework/agents/researcher.md +209 -0
- package/framework/agents/reviewer.md +209 -0
- package/framework/agents/scad/production-agent.scad.md +221 -0
- package/framework/agents/scout/AGENT.md +190 -0
- package/framework/agents/scout/MEMORY.md +64 -0
- package/framework/agents/scout/SOUL.md +84 -0
- package/framework/agents/scout.md +126 -0
- package/framework/agents/sentinel/AGENT.md +171 -0
- package/framework/agents/sentinel/MEMORY.md +37 -0
- package/framework/agents/sentinel/SOUL.md +71 -0
- package/framework/agents/sentinel.md +77 -0
- package/framework/agents/strategist.md +130 -0
- package/framework/agents/synthesizer.md +167 -0
- package/framework/agents/voc-processor.md +197 -0
- package/framework/agents/vox/AGENT.md +242 -0
- package/framework/agents/vox/MEMORY.md +81 -0
- package/framework/agents/vox/SOUL.md +90 -0
- package/framework/agents/vox.md +140 -0
- package/framework/checklists/aios-verification.yaml +226 -0
- package/framework/commands/CLAUDE.md +1 -0
- package/framework/commands/analyze.md +39 -0
- package/framework/commands/architecture.md +37 -0
- package/framework/commands/assemble.md +39 -0
- package/framework/commands/cc.md +317 -0
- package/framework/commands/checklist.md +35 -0
- package/framework/commands/classify.md +108 -0
- package/framework/commands/clickup-setup.md +107 -0
- package/framework/commands/clone-expert.md +283 -0
- package/framework/commands/conclave.md +55 -0
- package/framework/commands/create-offer.md +245 -0
- package/framework/commands/dag.md +196 -0
- package/framework/commands/debate.md +232 -0
- package/framework/commands/diagnose-offer.md +184 -0
- package/framework/commands/dossier.md +112 -0
- package/framework/commands/expert.md +49 -0
- package/framework/commands/extract-dna.md +193 -0
- package/framework/commands/health.md +242 -0
- package/framework/commands/helix-parallel.md +334 -0
- package/framework/commands/help.md +85 -0
- package/framework/commands/ideate.md +37 -0
- package/framework/commands/inbox.md +164 -0
- package/framework/commands/ingest.md +127 -0
- package/framework/commands/investigate.md +236 -0
- package/framework/commands/merge.md +35 -0
- package/framework/commands/next-action.md +73 -0
- package/framework/commands/overnight.md +177 -0
- package/framework/commands/pipeline.md +67 -0
- package/framework/commands/plan-execution.md +127 -0
- package/framework/commands/pre-delivery.md +55 -0
- package/framework/commands/produce-offer.md +322 -0
- package/framework/commands/production-brief.md +165 -0
- package/framework/commands/registry.md +22 -0
- package/framework/commands/resume.md +422 -0
- package/framework/commands/review-all.md +315 -0
- package/framework/commands/squad-research.md +121 -0
- package/framework/commands/status.md +71 -0
- package/framework/commands/story.md +34 -0
- package/framework/commands/sync-ecosystem.md +359 -0
- package/framework/commands/sync-project.md +69 -0
- package/framework/commands/update-ecosystem.md +382 -0
- package/framework/commands/validate-batch.md +231 -0
- package/framework/commands/validate.md +29 -0
- package/framework/config/batch-validation.yaml +59 -0
- package/framework/config/overnight.yaml +111 -0
- package/framework/config/surface-criteria.yaml +147 -0
- package/framework/config/workflow-loops.yaml +174 -0
- package/framework/constitution.md +199 -0
- package/framework/copy-squad/abraham.md +690 -0
- package/framework/copy-squad/agora.md +624 -0
- package/framework/copy-squad/bencivenga.md +953 -0
- package/framework/copy-squad/brown.md +1336 -0
- package/framework/copy-squad/brunson.md +743 -0
- package/framework/copy-squad/caples.md +1039 -0
- package/framework/copy-squad/carlton.md +872 -0
- package/framework/copy-squad/chaperon.md +520 -0
- package/framework/copy-squad/checklists/abraham-strategy-multiplier.md +416 -0
- package/framework/copy-squad/checklists/agora-promo-audit.md +607 -0
- package/framework/copy-squad/checklists/bencivenga-persuasion-audit.md +448 -0
- package/framework/copy-squad/checklists/brown-e5-method.md +415 -0
- package/framework/copy-squad/checklists/brown-mechanism-audit.md +385 -0
- package/framework/copy-squad/checklists/brunson-funnel-secrets.md +577 -0
- package/framework/copy-squad/checklists/caples-tested-methods.md +358 -0
- package/framework/copy-squad/checklists/carlton-street-smart.md +337 -0
- package/framework/copy-squad/checklists/chaperon-email-arc.md +334 -0
- package/framework/copy-squad/checklists/cialdini-persuasion-principles.md +401 -0
- package/framework/copy-squad/checklists/collier-entry-diagnostic.md +185 -0
- package/framework/copy-squad/checklists/halbert-bullet-proof.md +364 -0
- package/framework/copy-squad/checklists/hopkins-scientific-checklist.md +527 -0
- package/framework/copy-squad/checklists/hormozi-offer-creation.md +612 -0
- package/framework/copy-squad/checklists/kennedy-close-stack.md +239 -0
- package/framework/copy-squad/checklists/kennedy-no-bs-checklist.md +306 -0
- package/framework/copy-squad/checklists/kern-intent-based-branding.md +458 -0
- package/framework/copy-squad/checklists/makepeace-control-killer.md +633 -0
- package/framework/copy-squad/checklists/marcondes-primary.md +50 -0
- package/framework/copy-squad/checklists/ogilvy-brand-response.md +438 -0
- package/framework/copy-squad/checklists/powers-emotional-dr.md +280 -0
- package/framework/copy-squad/checklists/reeves-usp-audit.md +498 -0
- package/framework/copy-squad/checklists/ry-schwartz-conversion-copy.md +479 -0
- package/framework/copy-squad/checklists/sabri-selling-like-crazy.md +329 -0
- package/framework/copy-squad/checklists/schwartz-awareness-calibration.md +380 -0
- package/framework/copy-squad/checklists/schwartz-awareness-levels.md +593 -0
- package/framework/copy-squad/checklists/sugarman-30-triggers.md +437 -0
- package/framework/copy-squad/checklists/vaynerchuk-content-strategy.md +402 -0
- package/framework/copy-squad/cialdini.md +861 -0
- package/framework/copy-squad/collier.md +637 -0
- package/framework/copy-squad/copy-chief.md +204 -0
- package/framework/copy-squad/expert-index.json +2436 -0
- package/framework/copy-squad/halbert.md +1003 -0
- package/framework/copy-squad/hopkins.md +901 -0
- package/framework/copy-squad/hormozi.md +733 -0
- package/framework/copy-squad/kennedy.md +1159 -0
- package/framework/copy-squad/kern.md +626 -0
- package/framework/copy-squad/makepeace.md +895 -0
- package/framework/copy-squad/manifest.yaml +403 -0
- package/framework/copy-squad/manifest.yaml.bak +383 -0
- package/framework/copy-squad/marcondes.md +307 -0
- package/framework/copy-squad/ogilvy.md +1056 -0
- package/framework/copy-squad/powers.md +576 -0
- package/framework/copy-squad/reeves.md +681 -0
- package/framework/copy-squad/ry-schwartz.md +964 -0
- package/framework/copy-squad/sabri.md +936 -0
- package/framework/copy-squad/schwartz.md +1245 -0
- package/framework/copy-squad/sugarman.md +1331 -0
- package/framework/copy-squad/tasks/bullet-writing.md +42 -0
- package/framework/copy-squad/tasks/cta-framework.md +68 -0
- package/framework/copy-squad/tasks/dre-escalation.md +41 -0
- package/framework/copy-squad/tasks/email-sequence.md +39 -0
- package/framework/copy-squad/tasks/future-pacing.md +37 -0
- package/framework/copy-squad/tasks/guarantee-framework.md +59 -0
- package/framework/copy-squad/tasks/headline-testing.md +59 -0
- package/framework/copy-squad/tasks/lead-generation.md +48 -0
- package/framework/copy-squad/tasks/logo-test-verification.md +45 -0
- package/framework/copy-squad/tasks/manifest.yaml +144 -0
- package/framework/copy-squad/tasks/mechanism-naming.md +58 -0
- package/framework/copy-squad/tasks/objection-demolition.md +41 -0
- package/framework/copy-squad/tasks/offer-stack.md +51 -0
- package/framework/copy-squad/tasks/proof-stacking.md +45 -0
- package/framework/copy-squad/tasks/sensory-scene-builder.md +48 -0
- package/framework/copy-squad/tasks/story-framework.md +66 -0
- package/framework/copy-squad/tasks/tribal-exclusivity.md +37 -0
- package/framework/copy-squad/tasks/urgency-framework.md +50 -0
- package/framework/copy-squad/tasks/urgency-injection.md +46 -0
- package/framework/copy-squad/tasks/voc-language-check.md +38 -0
- package/framework/copy-squad/tasks/vsl-hook.md +36 -0
- package/framework/copy-squad/vaynerchuk.md +579 -0
- package/framework/copy-surface-criteria.yaml +101 -0
- package/framework/core-config.yaml +243 -0
- package/framework/data/workflow-patterns.yaml +252 -0
- package/framework/docs/backup-strategy.md +312 -0
- package/framework/docs/commands-index.md +382 -0
- package/framework/docs/copy-fundamentals/01-psicologia-humana.md +282 -0
- package/framework/docs/copy-fundamentals/02-consciencia-mercado.md +262 -0
- package/framework/docs/copy-fundamentals/03-metodologia-3ms.md +289 -0
- package/framework/docs/copy-fundamentals/04-nuuppecc-hooks.md +258 -0
- package/framework/docs/copy-fundamentals/05-curiosity-gap.md +262 -0
- package/framework/docs/copy-fundamentals/06-storytelling.md +301 -0
- package/framework/docs/copy-fundamentals/07-processo-escrita.md +296 -0
- package/framework/docs/copy-fundamentals/08-formato-vs-angulo.md +272 -0
- package/framework/docs/copy-fundamentals/09-estrutura-blocos.md +301 -0
- package/framework/docs/copy-fundamentals/10-tecnicas-execucao.md +625 -0
- package/framework/docs/copy-fundamentals/11-principios-2026.md +338 -0
- package/framework/docs/copy-fundamentals/12-big-ideas.md +345 -0
- package/framework/docs/copy-fundamentals/CLAUDE.md +137 -0
- package/framework/docs/hooks-guide.md +515 -0
- package/framework/docs/mcp-usage-guide.md +423 -0
- package/framework/docs/quality-gates-decision-tree.md +406 -0
- package/framework/docs/swipe-files-index.md +345 -0
- package/framework/dossiers/.archive/person-dr-richter-archived-2026-03-01.yaml +24 -0
- package/framework/dossiers/mechanism/morte-das-celulas-de-lubrificacao.yaml +24 -0
- package/framework/dossiers/person/dr-klaus-richter.yaml +58 -0
- package/framework/ecosystem-status.md +214 -0
- package/framework/experts/fidelity/apex-prompts.yaml +380 -0
- package/framework/framework-config.yaml +282 -0
- package/framework/gotchas/gotchas.yaml +66 -0
- package/framework/hooks/CLAUDE.md +1 -0
- package/framework/hooks/agent-activation-hook.cjs +345 -0
- package/framework/hooks/agent-authority-gate.cjs +100 -0
- package/framework/hooks/agent-memory-writeback.js +23 -0
- package/framework/hooks/agent-memory-writeback.ts +42 -0
- package/framework/hooks/agent-state-recorder.cjs +310 -0
- package/framework/hooks/analyze-production-task.cjs +85 -0
- package/framework/hooks/analyze-production-task.sh +42 -0
- package/framework/hooks/auto-approve-reads.cjs +41 -0
- package/framework/hooks/auto-approve-reads.sh +21 -0
- package/framework/hooks/bun.lock +19 -0
- package/framework/hooks/clickup-deliverable-sync.js +38 -0
- package/framework/hooks/clickup-deliverable-sync.ts +53 -0
- package/framework/hooks/clickup-gate-sync.js +33 -0
- package/framework/hooks/clickup-gate-sync.ts +49 -0
- package/framework/hooks/command-auto-discovery.js +58 -0
- package/framework/hooks/command-auto-discovery.ts +84 -0
- package/framework/hooks/completion-verifier.js +46 -0
- package/framework/hooks/completion-verifier.ts +84 -0
- package/framework/hooks/context-tracker.js +52 -0
- package/framework/hooks/context-tracker.ts +88 -0
- package/framework/hooks/copy-attribution.js +56 -0
- package/framework/hooks/copy-attribution.ts +60 -0
- package/framework/hooks/copy-version-backup.js +26 -0
- package/framework/hooks/copy-version-backup.ts +38 -0
- package/framework/hooks/dashboard-autostart.cjs +68 -0
- package/framework/hooks/dashboard-autostart.sh +47 -0
- package/framework/hooks/dashboard-emit.js +39 -0
- package/framework/hooks/dashboard-emit.ts +29 -0
- package/framework/hooks/data-lifecycle-hook.cjs +64 -0
- package/framework/hooks/decision-detector.js +28 -0
- package/framework/hooks/decision-detector.ts +40 -0
- package/framework/hooks/detect-clear-protect.cjs +79 -0
- package/framework/hooks/detect-clear-protect.sh +90 -0
- package/framework/hooks/discover-offer-context.cjs +327 -0
- package/framework/hooks/discover-offer-context.sh +464 -0
- package/framework/hooks/discovery-before-create.js +21 -0
- package/framework/hooks/discovery-before-create.ts +36 -0
- package/framework/hooks/doc-rot-detector.js +59 -0
- package/framework/hooks/doc-rot-detector.ts +87 -0
- package/framework/hooks/error-handler.js +50 -0
- package/framework/hooks/error-handler.ts +77 -0
- package/framework/hooks/etl-voc-post.js +51 -0
- package/framework/hooks/etl-voc-post.ts +81 -0
- package/framework/hooks/fidelity-check.js +54 -0
- package/framework/hooks/fidelity-check.ts +58 -0
- package/framework/hooks/filter-bash-output.cjs +66 -0
- package/framework/hooks/filter-bash-output.sh +61 -0
- package/framework/hooks/gate-tracker.js +115 -0
- package/framework/hooks/gate-tracker.ts +174 -0
- package/framework/hooks/gotcha-error-capture.js +38 -0
- package/framework/hooks/gotcha-error-capture.ts +65 -0
- package/framework/hooks/handoff-validator-hook.cjs +631 -0
- package/framework/hooks/helix-orchestrator-boot.cjs +227 -0
- package/framework/hooks/helix-phase-mecanismo.cjs +119 -0
- package/framework/hooks/helix-phase-mecanismo.sh +238 -0
- package/framework/hooks/ids-register.js +71 -0
- package/framework/hooks/ids-register.ts +100 -0
- package/framework/hooks/journey-log.js +18 -0
- package/framework/hooks/journey-log.ts +32 -0
- package/framework/hooks/lib/CLAUDE.md +1 -0
- package/framework/hooks/lib/hook-helpers.sh +61 -0
- package/framework/hooks/log-tool-failure.cjs +36 -0
- package/framework/hooks/log-tool-failure.sh +13 -0
- package/framework/hooks/mcp-circuit-breaker-hook.cjs +95 -0
- package/framework/hooks/mcp-query-validator.cjs +58 -0
- package/framework/hooks/mcp-query-validator.sh +69 -0
- package/framework/hooks/mecanismo-validation.js +18 -0
- package/framework/hooks/mecanismo-validation.ts +35 -0
- package/framework/hooks/memory-auto-populate.js +22 -0
- package/framework/hooks/memory-auto-populate.ts +38 -0
- package/framework/hooks/memory-bracket-injector.js +131 -0
- package/framework/hooks/memory-bracket-injector.ts +146 -0
- package/framework/hooks/memory-context.cjs +72 -0
- package/framework/hooks/memory-context.sh +60 -0
- package/framework/hooks/mermaid-auto-update.js +57 -0
- package/framework/hooks/mermaid-auto-update.ts +106 -0
- package/framework/hooks/meta-prompt-reminder.js +103 -0
- package/framework/hooks/meta-prompt-reminder.ts +172 -0
- package/framework/hooks/ops-commit-scanner.cjs +214 -0
- package/framework/hooks/package-lock.json +560 -0
- package/framework/hooks/package.json +11 -0
- package/framework/hooks/persona-detector.cjs +142 -0
- package/framework/hooks/persuasion-flow-check.js +20 -0
- package/framework/hooks/persuasion-flow-check.ts +35 -0
- package/framework/hooks/phase-advance-gate.js +119 -0
- package/framework/hooks/phase-advance-gate.ts +162 -0
- package/framework/hooks/phase-gate.js +124 -0
- package/framework/hooks/phase-gate.ts +184 -0
- package/framework/hooks/pipeline-enforcer.cjs +517 -0
- package/framework/hooks/pipeline-intent-detector.cjs +720 -0
- package/framework/hooks/pipeline-state-projector.cjs +288 -0
- package/framework/hooks/plan-session-guard.cjs +153 -0
- package/framework/hooks/post-gate-auto-advance.js +27 -0
- package/framework/hooks/post-gate-auto-advance.ts +43 -0
- package/framework/hooks/post-mcp-mecanismo-update.js +39 -0
- package/framework/hooks/post-mcp-mecanismo-update.ts +30 -0
- package/framework/hooks/post-production-validate.js +140 -0
- package/framework/hooks/post-production-validate.ts +198 -0
- package/framework/hooks/post-tool-use.js +87 -0
- package/framework/hooks/post-tool-use.ts +141 -0
- package/framework/hooks/post-validation-feedback.js +28 -0
- package/framework/hooks/post-validation-feedback.ts +42 -0
- package/framework/hooks/pre-compact-save.cjs +23 -0
- package/framework/hooks/pre-compact-save.sh +21 -0
- package/framework/hooks/pre-tool-use-gate.js +238 -0
- package/framework/hooks/pre-tool-use-gate.ts +321 -0
- package/framework/hooks/precompact-session-digest.cjs +72 -0
- package/framework/hooks/processing-check.js +22 -0
- package/framework/hooks/processing-check.ts +41 -0
- package/framework/hooks/production-delegation-gate.js +141 -0
- package/framework/hooks/production-delegation-gate.ts +225 -0
- package/framework/hooks/production-preflight.cjs +58 -0
- package/framework/hooks/production-preflight.sh +59 -0
- package/framework/hooks/record-tool-in-offer.js +45 -0
- package/framework/hooks/record-tool-in-offer.ts +81 -0
- package/framework/hooks/registry-check.js +110 -0
- package/framework/hooks/registry-check.ts +130 -0
- package/framework/hooks/regra-2x-detector.js +32 -0
- package/framework/hooks/regra-2x-detector.ts +53 -0
- package/framework/hooks/self-critique-preflight.js +33 -0
- package/framework/hooks/self-critique-preflight.ts +45 -0
- package/framework/hooks/session-digest-save.js +20 -0
- package/framework/hooks/session-digest-save.ts +31 -0
- package/framework/hooks/session-handoff.js +40 -0
- package/framework/hooks/session-handoff.ts +49 -0
- package/framework/hooks/setup-environment.cjs +65 -0
- package/framework/hooks/setup-environment.sh +43 -0
- package/framework/hooks/stop-copy-validation.js +71 -0
- package/framework/hooks/stop-copy-validation.ts +82 -0
- package/framework/hooks/story-required-gate.js +174 -0
- package/framework/hooks/story-required-gate.ts +259 -0
- package/framework/hooks/subagent-start-log.cjs +38 -0
- package/framework/hooks/subagent-start-log.sh +22 -0
- package/framework/hooks/subagent-stop-validate.cjs +42 -0
- package/framework/hooks/subagent-stop-validate.sh +26 -0
- package/framework/hooks/suggestion-on-gate.js +35 -0
- package/framework/hooks/suggestion-on-gate.ts +61 -0
- package/framework/hooks/synapse-engine.cjs +77 -0
- package/framework/hooks/sync-repos-on-stop.cjs +200 -0
- package/framework/hooks/sync-repos-on-stop.sh +75 -0
- package/framework/hooks/sync-site.cjs +54 -0
- package/framework/hooks/sync-site.sh +33 -0
- package/framework/hooks/template-header-validation.js +23 -0
- package/framework/hooks/template-header-validation.ts +41 -0
- package/framework/hooks/tool-enforcement-gate.js +110 -0
- package/framework/hooks/tool-enforcement-gate.ts +147 -0
- package/framework/hooks/tool-matrix-enforcer.js +134 -0
- package/framework/hooks/tool-matrix-enforcer.ts +222 -0
- package/framework/hooks/tsconfig.json +25 -0
- package/framework/hooks/validate-before-commit.js +61 -0
- package/framework/hooks/validate-before-commit.ts +87 -0
- package/framework/hooks/validate-gate-prereq.js +132 -0
- package/framework/hooks/validate-gate-prereq.ts +180 -0
- package/framework/hooks/voc-naming-validator.js +46 -0
- package/framework/hooks/voc-naming-validator.ts +80 -0
- package/framework/ids/decisions.json +657 -0
- package/framework/knowledge/README.md +88 -0
- package/framework/knowledge/classification-maap.md +406 -0
- package/framework/knowledge/cloned/leonardo-marcondes-madureira.md +344 -0
- package/framework/knowledge/experts/leonardo-marcondes-madureira.md +93 -0
- package/framework/knowledge/frameworks/maap-marketing-juridico.md +96 -0
- package/framework/knowledge/ingestion-tracking.yaml +19 -0
- package/framework/knowledge/patterns-by-niche.yaml +914 -0
- package/framework/knowledge/universal/aios-architecture-patterns.md +341 -0
- package/framework/knowledge/universal/aios-deep/README.md +21 -0
- package/framework/knowledge/universal/aios-framework.md +73785 -0
- package/framework/knowledge/universal/copy-frameworks.md +6 -0
- package/framework/knowledge/universal/esteira-escalonada.md +122 -0
- package/framework/knowledge/universal/expert-insights.md +6 -0
- package/framework/knowledge/universal/funil-lancamento-3-fases.md +219 -0
- package/framework/knowledge/universal/general.md +6 -0
- package/framework/knowledge/universal/persuasion-principles.md +12 -0
- package/framework/knowledge/voc/maap-advogados-2026.md +143 -0
- package/framework/learned-patterns/.last-tools.json +6 -0
- package/framework/learned-patterns/.suggest-cooldown.json +3 -0
- package/framework/learned-patterns/patterns.yaml +38 -0
- package/framework/learned-patterns/wie-data.json +298 -0
- package/framework/manifest.yaml +751 -0
- package/framework/orchestrator.md +178 -0
- package/framework/reference/anti-homogeneization.md +228 -0
- package/framework/reference/anti-sycophancy.md +171 -0
- package/framework/reference/briefings-helix.md +162 -0
- package/framework/reference/bssf-decision.md +175 -0
- package/framework/reference/ceremony-detection.md +136 -0
- package/framework/reference/constraint-progressivo.md +344 -0
- package/framework/reference/context-management.md +176 -0
- package/framework/reference/copy-chief.md +253 -0
- package/framework/reference/copy-fidelity.md +234 -0
- package/framework/reference/copy-production.md +185 -0
- package/framework/reference/debugging-hypothesis.md +418 -0
- package/framework/reference/dual-doc-taxonomy.md +62 -0
- package/framework/reference/ecosystem.md +219 -0
- package/framework/reference/epistemic-protocol.md +214 -0
- package/framework/reference/mecanismo-unico.md +212 -0
- package/framework/reference/micro-unidades.md +144 -0
- package/framework/reference/offers/concursa-ai.md +66 -0
- package/framework/reference/offers/gabaritando-portugues.md +53 -0
- package/framework/reference/signal-translation.md +256 -0
- package/framework/reference/structured-exploration.md +361 -0
- package/framework/reference/synthesis-flow.md +202 -0
- package/framework/reference/tool-usage-matrix.md +366 -0
- package/framework/reference/voc-research.md +291 -0
- package/framework/references/copy-fundamentals/CLAUDE.md +1 -0
- package/framework/references/copy-fundamentals/SKILL.md +78 -0
- package/framework/references/copy-fundamentals/references/CLAUDE.md +1 -0
- package/framework/references/copy-fundamentals/references/antes-depois-tecnica.md +279 -0
- package/framework/references/copy-fundamentals/references/big-ideas.md +167 -0
- package/framework/references/copy-fundamentals/references/disparos-dopamina.md +172 -0
- package/framework/references/copy-fundamentals/references/erros-fatais.md +275 -0
- package/framework/references/copy-fundamentals/references/escrita-viva-principios.md +273 -0
- package/framework/references/copy-fundamentals/references/estrutura-mecanismo.md +127 -0
- package/framework/references/copy-fundamentals/references/glossario-copy.md +185 -0
- package/framework/references/copy-fundamentals/references/pesquisa-estrategica.md +186 -0
- package/framework/references/copy-fundamentals/references/principios-escrita.md +218 -0
- package/framework/references/copy-fundamentals/references/psicologia-persuasao.md +150 -0
- package/framework/references/copy-fundamentals/references/revisao-universal.md +171 -0
- package/framework/registry.yaml +699 -0
- package/framework/rules/CLAUDE.md +5 -0
- package/framework/rules/offers/cognixor.md +53 -0
- package/framework/rules/offers/florayla.md +50 -0
- package/framework/rules/offers/neuvelys.md +60 -0
- package/framework/rules/offers/quimica-amarracao.md +49 -0
- package/framework/schemas/checklist-definition.schema.yaml +172 -0
- package/framework/schemas/clickup-sync.schema.yaml +89 -0
- package/framework/schemas/copy-attribution.schema.yaml +134 -0
- package/framework/schemas/dispatch-request.schema.yaml +43 -0
- package/framework/schemas/dossier.schema.yaml +70 -0
- package/framework/schemas/helix-phases.yaml +350 -0
- package/framework/schemas/helix-phases.yaml.bak +350 -0
- package/framework/schemas/helix-state.schema.yaml +136 -0
- package/framework/schemas/mecanismo-unico.schema.yaml +249 -0
- package/framework/schemas/mecanismo-unico.schema.yaml.bak +249 -0
- package/framework/schemas/memory-tiers.schema.yaml +360 -0
- package/framework/schemas/persuasion-chunk.schema.yaml +150 -0
- package/framework/schemas/pipeline-dag.schema.yaml +193 -0
- package/framework/schemas/processing-registry.schema.yaml +143 -0
- package/framework/schemas/task-definition.schema.yaml +137 -0
- package/framework/schemas/template-header.schema.yaml +151 -0
- package/framework/schemas/workflow-loop.schema.yaml +231 -0
- package/framework/scripts/CLAUDE.md +1 -0
- package/framework/scripts/export-web.js +120 -0
- package/framework/scripts/health-check.js +413 -0
- package/framework/scripts/health-check.ts +596 -0
- package/framework/scripts/statusline.sh +221 -0
- package/framework/scripts/sync-ide.js +142 -0
- package/framework/skills/.serena/memories/aios-exploration-plan.md +64 -0
- package/framework/skills/.serena/project.yml +121 -0
- package/framework/skills/CLAUDE.md +1 -0
- package/framework/skills/audience-research-agent/CLAUDE.md +1 -0
- package/framework/skills/audience-research-agent/SKILL.md +486 -0
- package/framework/skills/audience-research-agent/references/aula_01_principios_fundamentais.md +559 -0
- package/framework/skills/audience-research-agent/references/aula_02_psicologia_engenheiro.md +191 -0
- package/framework/skills/audience-research-agent/references/aula_04_puzzle_pieces.md +311 -0
- package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_01_intro_conversa.md +62 -0
- package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_02_ritmo_sensorial.md +61 -0
- package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_03_metodo_abc.md +79 -0
- package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_04_edicao_camadas.md +79 -0
- package/framework/skills/audience-research-agent/references/aula_geral_comunicacao_pedreiro_05_problemas_recursos.md +84 -0
- package/framework/skills/audience-research-agent/references/ref_frameworks_georgi_evaldo_makepeace_ramalho_schwartz.md +278 -0
- package/framework/skills/audience-research-agent/references/ref_frameworks_jtbd_robbins_kahneman_empathy.md +277 -0
- package/framework/skills/audience-research-agent/references/ref_gatilhos_reptilianos_10.md +29 -0
- package/framework/skills/audience-research-agent/references/ref_platform_amazon.md +85 -0
- package/framework/skills/audience-research-agent/references/ref_platform_instagram.md +212 -0
- package/framework/skills/audience-research-agent/references/ref_platform_mercadolivre.md +236 -0
- package/framework/skills/audience-research-agent/references/ref_platform_reclameaqui.md +262 -0
- package/framework/skills/audience-research-agent/references/ref_platform_reddit.md +127 -0
- package/framework/skills/audience-research-agent/references/ref_platform_tiktok.md +227 -0
- package/framework/skills/audience-research-agent/references/ref_platform_youtube.md +187 -0
- package/framework/skills/audience-research-agent/references/ref_readiness_score_5_dimensions.md +247 -0
- package/framework/skills/audience-research-agent/references/ref_voc_database_schema.md +362 -0
- package/framework/skills/audience-research-agent/references/ref_voc_sources_rules_templates.md +352 -0
- package/framework/skills/audience-research-agent/references/ref_workflow_modular_4_modules.md +361 -0
- package/framework/skills/audience-research-agent/templates/fase-01-inputs-template.md +278 -0
- package/framework/skills/copy-critic/CLAUDE.md +1 -0
- package/framework/skills/copy-critic/SKILL.md +684 -0
- package/framework/skills/copy-critic/references/anti-patterns.md +270 -0
- package/framework/skills/copy-critic/references/checklist-validacao.md +238 -0
- package/framework/skills/copy-critic/references/escrita.md +569 -0
- package/framework/skills/copy-critic/references/exemplos-aprovados.md +216 -0
- package/framework/skills/copy-critic/references/exemplos-reprovados.md +312 -0
- package/framework/skills/copy-critic/references/metodologia-stand.md +192 -0
- package/framework/skills/copy-critic/references/psicologia.md +333 -0
- package/framework/skills/criativos-agent/CLAUDE.md +238 -0
- package/framework/skills/criativos-agent/SKILL.md +229 -0
- package/framework/skills/criativos-agent/references/angulos.md +68 -0
- package/framework/skills/criativos-agent/references/breakdown.md +328 -0
- package/framework/skills/criativos-agent/references/checklist.md +95 -0
- package/framework/skills/criativos-agent/references/erros-comuns.md +113 -0
- package/framework/skills/criativos-agent/references/escrita.md +667 -0
- package/framework/skills/criativos-agent/references/psicologia.md +207 -0
- package/framework/skills/criativos-agent/references/swipe-files/alzheimer/rejuvenescendo-o-cerebro.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/alzheimer/ritual-do-chile.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/alzheimer/truque-da-gema-do-ovo.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/metodo-cabra-macho.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/power-performance-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/power-performance.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/aumento-peniano/protocolo-aumento-supremo-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/concursos/AD 91 - GPT DOS APROVADOS.md +41 -0
- package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS 77 GPT LANE 01.md +9 -0
- package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS 79 GPT LANE.md +14 -0
- package/framework/skills/criativos-agent/references/swipe-files/concursos/ADS HACKER 37.md +11 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/bacteria-diabetica---gluco-zen.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/bamboo-trick-02.md +20 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/casca-de-uva-03.md +30 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/erva-vulcanica-ancestral---glyco-balance.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/hidden-mineral.md +17 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/planta-antidiabetes.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/ritual-de-6-segundos-07.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/sugar-pro-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/supernervo-12.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/truque-matinal-de-30-segundos-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/verme-diabetico-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/diabetes/verme-diabetico-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/bacteria-inflamatoria-06.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/blue-salt-trick---nordic-power-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/mix-caseiro-que-aumenta-desempenho-e-vigor.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/trick-blue-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-da-agua.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-da-banana---iron-boost-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-cavalo.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-mel-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-mel-amazonico-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-pepino-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-pepino-esp.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/ed/truque-do-rei-salomao-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/cafe-bariatrico-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/cardapio-infalivel-para-maes-lactantes-10.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/desafio-30-dias-pilates-na-parede.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/desafio-jejum-10x-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/gordura-marrom.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/mounjaro-bariatrico-natural-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/natural-ozempic---ozemburn-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/pink-salt-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/protocolo-natural-desparasite-se.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/training-booster-01.md +65 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/truque-do-caldo-de-ossos-07.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/emagrecimento/truque-do-caldo-de-ossos-16.md +48 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-07.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/atividades-de-caligrafia-10.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/desmistificando-matematica-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-09.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-12.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros-14.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/escrita/gerador-de-livros.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/bumbum-escultural.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/desafio-bye-diastase-07.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/desafio-bye-diastase-08.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/guia-flexivel-20.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/seca-abdomen-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/exercicios/seca-abdomen-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/kit-30-livros-os-sons-das-letras.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/kit-de-atividades-para-volta-as-aulas-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/lancheira-feliz-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/quadro-da-paz-materna-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/infantil-maternidade/rotina-de-disciplina-positiva.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/atraindo-a-riqueza.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/destino-divino-05.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-05.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-14.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/escrita-divina-19.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/novena-de-sao-jose.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-canto-sagrado-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-canto-sagrado.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/o-poder-oculto-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/lei-da-atracao/truque-cerebral-das-forcas-americanas-08.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/menopausa/capsula-de-fitoestrogeno-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-02.md +18 -0
- package/framework/skills/criativos-agent/references/swipe-files/menopausa/tecnica-de-compressao-abdominal-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/moda/modelos-virtuais-de-alta-conversao-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/moda/modelos-virtuais-de-alta-conversao.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/moda/se-vestindo-com-destaque-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/moda/se-vestindo-com-destaque-06.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia-05.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pack/conteudos-virais-com-ia.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pack/receitas-da-vovo-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pack/receitas-saudaveis-de-bolo-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pet/adestrando-o-filhote-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/pressao-alta/iniciativa-governamental-para-a-hipertensao.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-02.md +19 -0
- package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos-05.md +52 -0
- package/framework/skills/criativos-agent/references/swipe-files/prisao-de-ventre/metodo-de-coco-de-sete-segundos.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-03.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-09.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/prostata/truque-do-tomate-10.md +68 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/acido-japones-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/bacteria-toxica-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/segredo-que-desafia-o-envelhecimento-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/segredo-que-desafia-o-envelhecimento.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/truque-das-japonesas.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/rejuvenescimento/truque-do-vinagre-de-maca.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/3-gatilhos-biologicos-da-atracao.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/desenrolado.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/efeito-nostalgia-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/formula-do-amor-verdadeiro.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/guia-da-obsessao-inabalavel-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/guia-da-obsessao-inabalavel-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/hormonios-do-amor-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/hormonios-do-amor-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/manipulacao-silenciosa-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/relacionamento/perfume-de-eros.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/gustafilm-lab.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/ia-influencer.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/job-em-dolar.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/lista-de-fornecedores-04.md +20 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/previsibilidade-de-faturamento-05.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/previsibilidade-de-faturamento.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/programa-de-recompensa-do-youtube-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/renda-extra/truque-da-modelagem.md +40 -0
- package/framework/skills/criativos-agent/references/swipe-files/saude-mental/neurociencias-na-pratica-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/saude-mental/neurociencias-na-pratica.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/saude-mental/recursos-terapeuticos-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/saude-mental/recursos-terapeuticos.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/mulher-poderosa-na-cama.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/os-segredos-da-cleopatra-fr.md +21 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/os-segredos-da-cleopatra-ingles.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/segredo-das-amantes-br-01.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/the-f-formula-04.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/sexualidade/the-f-formula.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/varizes/lipedema-zero-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/varizes/lipedema-zero.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/visao/hack-do-fluxo-sanguineo-ocular-matinal-de-7s.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino-2-02.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino-2.md +16 -0
- package/framework/skills/criativos-agent/references/swipe-files/visao/truque-do-pepino.md +16 -0
- package/framework/skills/criativos-agent.zip +0 -0
- package/framework/skills/ecosystem-guide/CLAUDE.md +1 -0
- package/framework/skills/ecosystem-guide/SKILL.md +275 -0
- package/framework/skills/helix-system-agent/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/SKILL.md +881 -0
- package/framework/skills/helix-system-agent/references/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/constraints.md +98 -0
- package/framework/skills/helix-system-agent/references/core/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/core/DRE.md +195 -0
- package/framework/skills/helix-system-agent/references/core/RMBC.md +144 -0
- package/framework/skills/helix-system-agent/references/core/formulas_e_criterios.md +124 -0
- package/framework/skills/helix-system-agent/references/core/metodologias.md +201 -0
- package/framework/skills/helix-system-agent/references/core/output_format.md +339 -0
- package/framework/skills/helix-system-agent/references/core/session_management.md +146 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/00-index.md +85 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/01-identificacao.md +138 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/02-pesquisa.md +175 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/03-avatar.md +225 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/04-consciencia.md +199 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/05-mup.md +172 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/06-mus.md +216 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/07-big-offer.md +198 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/08-fechamento.md +176 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/09-leads.md +201 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/10-progressao.md +220 -0
- package/framework/skills/helix-system-agent/references/examples/concursos/hacker/CLAUDE.md +56 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/00-index.md +86 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/01-identificacao.md +117 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/02-pesquisa.md +162 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/03-avatar.md +161 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/04-consciencia.md +128 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/05-mup.md +112 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/06-mus.md +213 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/07-big-offer.md +171 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/08-fechamento.md +207 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/09-leads.md +153 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/10-progressao.md +196 -0
- package/framework/skills/helix-system-agent/references/examples/relacionamento/quimica-amarracao-infiel/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/fundamentos/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/fundamentos/comunicacao_pedreiro_resumo.md +129 -0
- package/framework/skills/helix-system-agent/references/fundamentos/escrita.md +575 -0
- package/framework/skills/helix-system-agent/references/fundamentos/gatilhos_reptilianos.md +29 -0
- package/framework/skills/helix-system-agent/references/fundamentos/primeiros-principios-copy-chief.md +939 -0
- package/framework/skills/helix-system-agent/references/fundamentos/principios_fundamentais.md +559 -0
- package/framework/skills/helix-system-agent/references/fundamentos/psicologia.md +338 -0
- package/framework/skills/helix-system-agent/references/fundamentos/psicologia_engenheiro.md +191 -0
- package/framework/skills/helix-system-agent/references/fundamentos/puzzle_pieces.md +311 -0
- package/framework/skills/helix-system-agent/references/playbooks/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/playbooks/fase02_deep_dive_copy.md +390 -0
- package/framework/skills/helix-system-agent/references/playbooks/fase02_mineracao_playbook.md +422 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/masculinity_fruits.md +594 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_01_leads.md +272 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_02_background_emotional.md +140 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_03_marketing_thesis.md +242 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_04_product_offer.md +271 -0
- package/framework/skills/helix-system-agent/references/swipes/ed/sea_salt_05_close_resumo.md +126 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_01_lead_historia.md +360 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_02_problema_mecanismo.md +360 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_03_solucao_produto.md +410 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/gut_drops_04_oferta_fechamento.md +380 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_01_leads.md +959 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_02_background_emotional.md +305 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_03_marketing_thesis.md +420 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_04_product_buildup.md +251 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_05_oferta.md +334 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_06_fechamento.md +418 -0
- package/framework/skills/helix-system-agent/references/swipes/emag/ozempure_07_faq_resumo.md +129 -0
- package/framework/skills/helix-system-agent/references/swipes/swipes_index.md +130 -0
- package/framework/skills/helix-system-agent/references/templates/CLAUDE.md +1 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase01_identificacao.md +78 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase02_pesquisa_mercado.md +386 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase03_avatar_psicologia.md +456 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase04_niveis_consciencia.md +144 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase05_problema_vilao_mup.md +162 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase06_solucao_mus.md +624 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase07_big_offer.md +256 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase08_fechamento_pitch.md +288 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase09_leads_ganchos.md +154 -0
- package/framework/skills/helix-system-agent/references/templates/briefing_fase10_progressao_emocional.md +618 -0
- package/framework/skills/helix-system-agent/references/workflow-phases.md +151 -0
- package/framework/skills/helix-system-agent/scripts/cloaking_detector.py +319 -0
- package/framework/skills/helix-system-agent/scripts/scale_score_calculator.py +186 -0
- package/framework/skills/landing-page-agent/CLAUDE.md +1 -0
- package/framework/skills/landing-page-agent/SKILL.md +602 -0
- package/framework/skills/landing-page-agent/references/escrita.md +569 -0
- package/framework/skills/landing-page-agent/references/exemplos-aprovados.md +159 -0
- package/framework/skills/landing-page-agent/references/psicologia.md +333 -0
- package/framework/skills/landing-page-agent/references/ref_blocos_estrutura_14.md +417 -0
- package/framework/skills/landing-page-agent/references/ref_canva_implementacao.md +184 -0
- package/framework/skills/landing-page-agent/references/ref_copy_patterns_formulas.md +299 -0
- package/framework/skills/landing-page-agent/references/ref_templates_variacoes_nicho.md +263 -0
- package/framework/skills/landing-page-agent/references/swipes/concurso/swipe_lp_gabaritando_portugues.md +633 -0
- package/framework/skills/landing-page-agent/references/swipes/swipes_index.md +101 -0
- package/framework/skills/leads-agent/CLAUDE.md +54 -0
- package/framework/skills/leads-agent/SKILL.md +272 -0
- package/framework/skills/leads-agent/references/anatomia.md +472 -0
- package/framework/skills/leads-agent/references/checklist.md +555 -0
- package/framework/skills/leads-agent/references/escrita.md +430 -0
- package/framework/skills/leads-agent/references/microleads.md +463 -0
- package/framework/skills/leads-agent/references/psicologia.md +341 -0
- package/framework/skills/leads-agent/references/tipos-de-lead.md +346 -0
- package/framework/skills/production-agent/CLAUDE.md +85 -0
- package/framework/skills/production-agent/SKILL.md +648 -0
- package/framework/skills/production-agent/references/escrita.md +569 -0
- package/framework/skills/production-agent/references/production-quick-reference.md +84 -0
- package/framework/skills/production-agent/references/psicologia.md +333 -0
- package/framework/skills/rlm-analyze/skill.md +59 -0
- package/framework/skills/rlm-parallel/skill.md +136 -0
- package/framework/skills/voc-research-agent/CLAUDE.md +1 -0
- package/framework/skills/voc-research-agent/SKILL.md +333 -0
- package/framework/skills/voc-research-agent/references/CLAUDE.md +1 -0
- package/framework/skills/voc-research-agent/references/ref_apify_actors_by_platform.md +45 -0
- package/framework/skills/voc-research-agent/references/ref_limits_and_safety.md +41 -0
- package/framework/skills/voc-research-agent/references/ref_platform_amazon.md +23 -0
- package/framework/skills/voc-research-agent/references/ref_platform_br_mercadolivre.md +41 -0
- package/framework/skills/voc-research-agent/references/ref_platform_br_reclameaqui.md +37 -0
- package/framework/skills/voc-research-agent/references/ref_platform_instagram.md +87 -0
- package/framework/skills/voc-research-agent/references/ref_platform_reddit.md +27 -0
- package/framework/skills/voc-research-agent/references/ref_platform_tiktok.md +94 -0
- package/framework/skills/voc-research-agent/references/ref_platform_youtube.md +82 -0
- package/framework/skills/voc-research-agent/references/ref_protocol_process_save_forget.md +29 -0
- package/framework/stories/florayla-production.md +38 -0
- package/framework/stories/wire-phase-1.md +127 -0
- package/framework/stories/wire-phase-2.md +34 -0
- package/framework/stories/wire-phase-3.md +31 -0
- package/framework/stories/wire-phase-4.md +32 -0
- package/framework/stories/wire-phase-5.md +31 -0
- package/framework/synapse-manifest.yaml +167 -0
- package/framework/templates/CLAUDE.md +1 -0
- package/framework/templates/ads-library-spy-template.md +374 -0
- package/framework/templates/agent-output-template.md +67 -0
- package/framework/templates/agent-prompts/copywriter-prompt.md +71 -0
- package/framework/templates/agent-prompts/linguistic-pattern-extractor.md +128 -0
- package/framework/templates/agent-prompts/researcher-prompt.md +80 -0
- package/framework/templates/agent-prompts/reviewer-prompt.md +59 -0
- package/framework/templates/agent-prompts/synthesizer-prompt.md +43 -0
- package/framework/templates/agent-prompts/voc-instagram-analyst.md +164 -0
- package/framework/templates/agent-prompts/voc-reddit-analyst.md +204 -0
- package/framework/templates/agent-prompts/voc-review-analyst.md +216 -0
- package/framework/templates/agent-prompts/voc-tiktok-analyst.md +185 -0
- package/framework/templates/agent-prompts/voc-youtube-analyst.md +142 -0
- package/framework/templates/agents/agent-template.md +35 -0
- package/framework/templates/agents/memory-template.md +24 -0
- package/framework/templates/agents/soul-template.md +33 -0
- package/framework/templates/aios/agent-template.yaml +82 -0
- package/framework/templates/aios/architecture-tmpl.yaml +651 -0
- package/framework/templates/aios/brainstorming-output-tmpl.yaml +156 -0
- package/framework/templates/aios/brownfield-architecture-tmpl.yaml +476 -0
- package/framework/templates/aios/brownfield-prd-tmpl.yaml +280 -0
- package/framework/templates/aios/competitor-analysis-tmpl.yaml +293 -0
- package/framework/templates/aios/database-schema-request-full.md +522 -0
- package/framework/templates/aios/database-schema-request-lite.md +240 -0
- package/framework/templates/aios/front-end-architecture-tmpl.yaml +206 -0
- package/framework/templates/aios/front-end-spec-tmpl.yaml +349 -0
- package/framework/templates/aios/fullstack-architecture-tmpl.yaml +805 -0
- package/framework/templates/aios/market-research-tmpl.yaml +252 -0
- package/framework/templates/aios/prd-tmpl.yaml +202 -0
- package/framework/templates/aios/project-brief-tmpl.yaml +221 -0
- package/framework/templates/aios/qa-gate-tmpl.yaml +104 -0
- package/framework/templates/aios/story-tmpl.yaml +137 -0
- package/framework/templates/aios/task-template.md +86 -0
- package/framework/templates/aios/workflow-template.yaml +134 -0
- package/framework/templates/briefing-complete-template.md +363 -0
- package/framework/templates/checklists/creative-acceptance.yaml +61 -0
- package/framework/templates/checklists/email-acceptance.yaml +61 -0
- package/framework/templates/checklists/landing-page-acceptance.yaml +68 -0
- package/framework/templates/checklists/mup-mus-acceptance.yaml +111 -0
- package/framework/templates/checklists/vsl-acceptance.yaml +91 -0
- package/framework/templates/context-hierarchy-template.md +314 -0
- package/framework/templates/copy-validation-checklist.md +296 -0
- package/framework/templates/criativos-template.md +251 -0
- package/framework/templates/email-sequence-template.md +263 -0
- package/framework/templates/etl-checklist.md +64 -0
- package/framework/templates/extended-thinking-protocol.md +178 -0
- package/framework/templates/funnel-reverse-template.md +246 -0
- package/framework/templates/helix-state-template.yaml +107 -0
- package/framework/templates/landing-page-template.md +406 -0
- package/framework/templates/mecanismo-unico-template.md +239 -0
- package/framework/templates/mup-consensus-validation.md +154 -0
- package/framework/templates/mup-human-test.md +176 -0
- package/framework/templates/mup-mus-discovery.md +192 -0
- package/framework/templates/niche-pack/biblioteca-template.md +105 -0
- package/framework/templates/niche-pack/cliches-template.md +64 -0
- package/framework/templates/niche-pack/context-template.md +120 -0
- package/framework/templates/niche-pack/helix-state-template.yaml +107 -0
- package/framework/templates/niche-pack/task-plan-template.md +89 -0
- package/framework/templates/partials/attribution-header.md +30 -0
- package/framework/templates/partials/epistemic-header.md +18 -0
- package/framework/templates/phase-review-checklist.md +51 -0
- package/framework/templates/processing-registry-template.yaml +24 -0
- package/framework/templates/research-deliverables-checklist.md +127 -0
- package/framework/templates/rmbc-ii-workflow.md +248 -0
- package/framework/templates/story-criativo.md +392 -0
- package/framework/templates/story-deliverable-generic.md +248 -0
- package/framework/templates/story-email.md +444 -0
- package/framework/templates/story-lp-bloco.md +340 -0
- package/framework/templates/story-vsl-capitulo.md +396 -0
- package/framework/templates/swipe-analysis-specs.md +270 -0
- package/framework/templates/swipe-decomposition.md +171 -0
- package/framework/templates/tools-tracking-template.md +207 -0
- package/framework/templates/trends-analysis-template.md +288 -0
- package/framework/templates/voc-linguistic-patterns.md +148 -0
- package/framework/templates/voc-squad-consolidation.md +268 -0
- package/framework/templates/voc-viral-extraction-template.md +174 -0
- package/framework/templates/vsl-template.md +237 -0
- package/framework/workflows/CLAUDE.md +1 -0
- package/framework/workflows/helix-dag.state.json +16 -0
- package/framework/workflows/helix-dag.yaml +248 -0
- package/framework/workflows/helix-pipeline.yaml +175 -0
- package/framework/workflows/production-dag.yaml +532 -0
- package/framework/workflows/production-workflow.md +97 -0
- package/framework/workflows/production-workflow.yaml +221 -0
- package/framework/workflows/research-dag.yaml +288 -0
- package/framework/workflows/research-workflow.md +89 -0
- package/framework/workflows/research-workflow.yaml +92 -0
- package/framework/workflows/validation-workflow.md +111 -0
- package/installer/doctor.js +142 -0
- package/installer/install.js +272 -0
- package/installer/new-offer.js +108 -0
- package/installer/transpile.js +200 -0
- package/installer/update.js +57 -0
- package/installer/verify.js +124 -0
- package/lib/platform.js +155 -0
- package/lib/settings-builder.js +190 -0
- package/package.json +79 -0
- package/templates/ecosystem/.claude/CLAUDE.md +4 -0
- package/templates/ecosystem/.claude/rules/offers/CLAUDE.md +5 -0
- package/templates/ecosystem/.synapse/agent-atlas +9 -0
- package/templates/ecosystem/.synapse/agent-blade +8 -0
- package/templates/ecosystem/.synapse/agent-cipher +8 -0
- package/templates/ecosystem/.synapse/agent-echo +10 -0
- package/templates/ecosystem/.synapse/agent-forge +9 -0
- package/templates/ecosystem/.synapse/agent-hawk +9 -0
- package/templates/ecosystem/.synapse/agent-ops +7 -0
- package/templates/ecosystem/.synapse/agent-scout +9 -0
- package/templates/ecosystem/.synapse/agent-strategist +7 -0
- package/templates/ecosystem/.synapse/agent-vox +10 -0
- package/templates/ecosystem/.synapse/anti-homog +41 -0
- package/templates/ecosystem/.synapse/bracket-config.yaml +43 -0
- package/templates/ecosystem/.synapse/commands +36 -0
- package/templates/ecosystem/.synapse/constitution +40 -0
- package/templates/ecosystem/.synapse/craft +43 -0
- package/templates/ecosystem/.synapse/dre +27 -0
- package/templates/ecosystem/.synapse/helix +29 -0
- package/templates/ecosystem/.synapse/learning/gotcha-registry.yaml +16 -0
- package/templates/ecosystem/.synapse/manifest +71 -0
- package/templates/ecosystem/.synapse/mecanismo +27 -0
- package/templates/ecosystem/.synapse/metrics/hook-metrics.json +52 -0
- package/templates/ecosystem/.synapse/quality-gates +49 -0
- package/templates/ecosystem/.synapse/sessions/.gitkeep +0 -0
- package/templates/ecosystem/.synapse/star-commands/create-squad +17 -0
- package/templates/ecosystem/.synapse/star-commands/diagnose +15 -0
- package/templates/ecosystem/.synapse/star-commands/elicit-context +11 -0
- package/templates/ecosystem/.synapse/star-commands/elicit-mecanismo +11 -0
- package/templates/ecosystem/.synapse/star-commands/queue +6 -0
- package/templates/ecosystem/.synapse/tool-matrix +50 -0
- package/templates/ecosystem/.synapse/workflow-briefing-pipeline +7 -0
- package/templates/ecosystem/.synapse/workflow-production-pipeline +8 -0
- package/templates/ecosystem/.synapse/workflow-research-pipeline +7 -0
- package/templates/ecosystem/.synapse/workflow-review-pipeline +7 -0
- package/templates/ecosystem/squads/copy-chief/.synapse/manifest +9 -0
- package/templates/ecosystem/squads/copy-chief/.synapse/production-rules +8 -0
- package/templates/ecosystem/squads/copy-chief/.synapse/routing +14 -0
- package/templates/ecosystem/squads/copy-chief/capabilities.yaml +211 -0
- package/templates/ecosystem/squads/copy-chief/checklists/creative-acceptance.md +61 -0
- package/templates/ecosystem/squads/copy-chief/checklists/email-acceptance.md +61 -0
- package/templates/ecosystem/squads/copy-chief/checklists/landing-page-acceptance.md +68 -0
- package/templates/ecosystem/squads/copy-chief/checklists/mup-mus-acceptance.md +111 -0
- package/templates/ecosystem/squads/copy-chief/checklists/vsl-acceptance.md +91 -0
- package/templates/ecosystem/squads/copy-chief/config/copy-standards.md +32 -0
- package/templates/ecosystem/squads/copy-chief/config/mcp-stack.md +48 -0
- package/templates/ecosystem/squads/copy-chief/config/tool-usage-matrix.md +366 -0
- package/templates/ecosystem/squads/copy-chief/data/anti-homogeneization.md +228 -0
- package/templates/ecosystem/squads/copy-chief/data/copy-chief-data-requirements.yaml +171 -0
- package/templates/ecosystem/squads/copy-chief/data/craft/checklist.md +95 -0
- package/templates/ecosystem/squads/copy-chief/data/craft/chief-principles.md +84 -0
- package/templates/ecosystem/squads/copy-chief/data/craft/erros-comuns.md +113 -0
- package/templates/ecosystem/squads/copy-chief/data/craft/escrita.md +667 -0
- package/templates/ecosystem/squads/copy-chief/data/craft/psicologia.md +207 -0
- package/templates/ecosystem/squads/copy-chief/data/creative/angulos.md +68 -0
- package/templates/ecosystem/squads/copy-chief/data/creative/breakdown.md +328 -0
- package/templates/ecosystem/squads/copy-chief/data/critic/anti-patterns.md +270 -0
- package/templates/ecosystem/squads/copy-chief/data/critic/checklist-validacao.md +238 -0
- package/templates/ecosystem/squads/copy-chief/data/critic/exemplos-aprovados.md +216 -0
- package/templates/ecosystem/squads/copy-chief/data/critic/exemplos-reprovados.md +312 -0
- package/templates/ecosystem/squads/copy-chief/data/critic/metodologia-stand.md +192 -0
- package/templates/ecosystem/squads/copy-chief/data/dre-framework.md +62 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-phases-reference.md +162 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/DRE.md +195 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/RMBC.md +144 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/constraints.md +98 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/formulas_e_criterios.md +124 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/comunicacao_pedreiro_resumo.md +129 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/escrita.md +575 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/gatilhos_reptilianos.md +29 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/primeiros-principios-copy-chief.md +939 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/principios_fundamentais.md +559 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/psicologia_engenheiro.md +191 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/fundamentos/puzzle_pieces.md +311 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/metodologias.md +201 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/playbooks/fase02_deep_dive_copy.md +390 -0
- package/templates/ecosystem/squads/copy-chief/data/helix-ref/playbooks/fase02_mineracao_playbook.md +422 -0
- package/templates/ecosystem/squads/copy-chief/data/leads/anatomia.md +472 -0
- package/templates/ecosystem/squads/copy-chief/data/leads/microleads.md +463 -0
- package/templates/ecosystem/squads/copy-chief/data/leads/tipos-de-lead.md +346 -0
- package/templates/ecosystem/squads/copy-chief/data/lp/ref_blocos_estrutura_14.md +417 -0
- package/templates/ecosystem/squads/copy-chief/data/lp/ref_canva_implementacao.md +184 -0
- package/templates/ecosystem/squads/copy-chief/data/lp/ref_copy_patterns_formulas.md +299 -0
- package/templates/ecosystem/squads/copy-chief/data/lp/ref_templates_variacoes_nicho.md +263 -0
- package/templates/ecosystem/squads/copy-chief/data/mecanismo-unico-framework.md +212 -0
- package/templates/ecosystem/squads/copy-chief/data/voc-research.md +291 -0
- package/templates/ecosystem/squads/copy-chief/squad.yaml +89 -0
- package/templates/ecosystem/squads/copy-chief/tasks/competitor-analysis.md +24 -0
- package/templates/ecosystem/squads/copy-chief/tasks/helix-briefing.md +29 -0
- package/templates/ecosystem/squads/copy-chief/tasks/produce-creatives.md +27 -0
- package/templates/ecosystem/squads/copy-chief/tasks/produce-emails.md +23 -0
- package/templates/ecosystem/squads/copy-chief/tasks/produce-landing-page.md +25 -0
- package/templates/ecosystem/squads/copy-chief/tasks/produce-vsl.md +26 -0
- package/templates/ecosystem/squads/copy-chief/tasks/validate-deliverable.md +23 -0
- package/templates/ecosystem/squads/copy-chief/tasks/validate-mecanismo.md +22 -0
- package/templates/ecosystem/squads/copy-chief/tasks/voc-extraction.md +26 -0
- package/templates/ecosystem/squads/copy-chief/templates/delivery-checklist.yaml +61 -0
- package/templates/ecosystem/squads/copy-chief/templates/story-template.yaml +29 -0
- package/templates/ecosystem/squads/copy-chief/workflows/briefing-pipeline.yaml +49 -0
- package/templates/ecosystem/squads/copy-chief/workflows/production-pipeline.yaml +49 -0
- package/templates/ecosystem/squads/copy-chief/workflows/research-pipeline.yaml +38 -0
- package/templates/ecosystem/squads/copy-chief/workflows/review-pipeline.yaml +35 -0
- package/templates/mcp.json.tpl +53 -0
- package/templates/settings.json.tpl +313 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ETL Collection Helpers
|
|
3
|
+
* Utility functions for VOC data collection pipelines.
|
|
4
|
+
* Inspired by aios-squads/etl-squad patterns.
|
|
5
|
+
*
|
|
6
|
+
* ~/.claude/hooks/lib/etl-helpers.ts
|
|
7
|
+
* v1.0 — Created: 2026-02-24
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, statSync } from 'fs';
|
|
11
|
+
import { join, dirname } from 'path';
|
|
12
|
+
|
|
13
|
+
const ECOSYSTEM_ROOT = join(process.env.HOME!, 'copywriting-ecosystem');
|
|
14
|
+
|
|
15
|
+
// ==========================================
|
|
16
|
+
// Types
|
|
17
|
+
// ==========================================
|
|
18
|
+
|
|
19
|
+
export interface Quote {
|
|
20
|
+
text: string;
|
|
21
|
+
platform: string;
|
|
22
|
+
username?: string;
|
|
23
|
+
engagement?: number;
|
|
24
|
+
intensity?: number;
|
|
25
|
+
emotion?: 'MEDO' | 'VERGONHA' | 'CULPA' | 'RAIVA' | 'FRUSTRACAO' | 'OTHER';
|
|
26
|
+
url?: string;
|
|
27
|
+
timestamp?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ResumeState {
|
|
32
|
+
offer_path: string;
|
|
33
|
+
started_at: string;
|
|
34
|
+
updated_at: string;
|
|
35
|
+
platforms_completed: string[];
|
|
36
|
+
platforms_in_progress: string[];
|
|
37
|
+
quotes_per_platform: Record<string, number>;
|
|
38
|
+
last_error?: string;
|
|
39
|
+
last_error_at?: string;
|
|
40
|
+
total_quotes: number;
|
|
41
|
+
status: 'in_progress' | 'completed' | 'error';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ValidationResult {
|
|
45
|
+
passed: boolean;
|
|
46
|
+
tier: 'completeness' | 'security' | 'quality';
|
|
47
|
+
issues: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CollectionProgress {
|
|
51
|
+
platform: string;
|
|
52
|
+
total: number;
|
|
53
|
+
valid: number;
|
|
54
|
+
rejected: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface SpeakerSegment {
|
|
58
|
+
speaker: 'host' | 'commenter' | 'unknown';
|
|
59
|
+
text: string;
|
|
60
|
+
timestamp_hint?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ==========================================
|
|
64
|
+
// 1. Resume System
|
|
65
|
+
// ==========================================
|
|
66
|
+
|
|
67
|
+
const RESUME_FILENAME = '.etl-resume.json';
|
|
68
|
+
|
|
69
|
+
function getResumePath(offerPath: string): string {
|
|
70
|
+
return join(ECOSYSTEM_ROOT, offerPath, 'research', RESUME_FILENAME);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Loads the ETL resume state for an offer.
|
|
75
|
+
* Returns null if no resume state exists (fresh start).
|
|
76
|
+
*/
|
|
77
|
+
export function getResumeState(offerPath: string): ResumeState | null {
|
|
78
|
+
const resumePath = getResumePath(offerPath);
|
|
79
|
+
|
|
80
|
+
if (!existsSync(resumePath)) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
const content = readFileSync(resumePath, 'utf-8');
|
|
86
|
+
return JSON.parse(content) as ResumeState;
|
|
87
|
+
} catch (error) {
|
|
88
|
+
console.error(`[ETL-HELPERS] Error reading resume state: ${error}`);
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Saves the ETL resume state for an offer.
|
|
95
|
+
* Creates the research directory if it does not exist.
|
|
96
|
+
*/
|
|
97
|
+
export function saveResumeState(offerPath: string, state: ResumeState): void {
|
|
98
|
+
const resumePath = getResumePath(offerPath);
|
|
99
|
+
const dir = dirname(resumePath);
|
|
100
|
+
|
|
101
|
+
if (!existsSync(dir)) {
|
|
102
|
+
mkdirSync(dir, { recursive: true });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
state.updated_at = new Date().toISOString();
|
|
106
|
+
state.total_quotes = Object.values(state.quotes_per_platform)
|
|
107
|
+
.reduce((sum, count) => sum + count, 0);
|
|
108
|
+
|
|
109
|
+
writeFileSync(resumePath, JSON.stringify(state, null, 2));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Creates a fresh resume state for a new collection run.
|
|
114
|
+
*/
|
|
115
|
+
export function createResumeState(offerPath: string): ResumeState {
|
|
116
|
+
const state: ResumeState = {
|
|
117
|
+
offer_path: offerPath,
|
|
118
|
+
started_at: new Date().toISOString(),
|
|
119
|
+
updated_at: new Date().toISOString(),
|
|
120
|
+
platforms_completed: [],
|
|
121
|
+
platforms_in_progress: [],
|
|
122
|
+
quotes_per_platform: {},
|
|
123
|
+
total_quotes: 0,
|
|
124
|
+
status: 'in_progress',
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
saveResumeState(offerPath, state);
|
|
128
|
+
return state;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Marks a platform as completed in the resume state.
|
|
133
|
+
*/
|
|
134
|
+
export function markPlatformCompleted(
|
|
135
|
+
offerPath: string,
|
|
136
|
+
platform: string,
|
|
137
|
+
quoteCount: number
|
|
138
|
+
): void {
|
|
139
|
+
let state = getResumeState(offerPath);
|
|
140
|
+
if (!state) {
|
|
141
|
+
state = createResumeState(offerPath);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Move from in_progress to completed
|
|
145
|
+
state.platforms_in_progress = state.platforms_in_progress.filter(p => p !== platform);
|
|
146
|
+
if (!state.platforms_completed.includes(platform)) {
|
|
147
|
+
state.platforms_completed.push(platform);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
state.quotes_per_platform[platform] = quoteCount;
|
|
151
|
+
|
|
152
|
+
// Check if all required platforms are done
|
|
153
|
+
const required = ['youtube', 'instagram', 'tiktok', 'reddit'];
|
|
154
|
+
const allDone = required.every(p => state!.platforms_completed.includes(p));
|
|
155
|
+
if (allDone) {
|
|
156
|
+
state.status = 'completed';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
saveResumeState(offerPath, state);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Records an error in the resume state so the next run knows what failed.
|
|
164
|
+
*/
|
|
165
|
+
export function recordResumeError(offerPath: string, error: string): void {
|
|
166
|
+
let state = getResumeState(offerPath);
|
|
167
|
+
if (!state) {
|
|
168
|
+
state = createResumeState(offerPath);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
state.last_error = error;
|
|
172
|
+
state.last_error_at = new Date().toISOString();
|
|
173
|
+
state.status = 'error';
|
|
174
|
+
|
|
175
|
+
saveResumeState(offerPath, state);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ==========================================
|
|
179
|
+
// 2. Quality Checklist (3-tier)
|
|
180
|
+
// ==========================================
|
|
181
|
+
|
|
182
|
+
const REQUIRED_PLATFORMS = ['youtube', 'instagram', 'tiktok', 'reddit'];
|
|
183
|
+
const MIN_QUOTES_PER_PLATFORM = 50;
|
|
184
|
+
|
|
185
|
+
const REQUIRED_RESEARCH_DIRS = [
|
|
186
|
+
'research/voc',
|
|
187
|
+
'research/voc/raw',
|
|
188
|
+
'research/voc/processed',
|
|
189
|
+
'research/competitors',
|
|
190
|
+
'research/mechanism',
|
|
191
|
+
'research/avatar',
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Tier 1: Completeness — checks all required research directories exist
|
|
196
|
+
* and minimum quote counts are met (50 per platform).
|
|
197
|
+
*/
|
|
198
|
+
export function validateCompleteness(offerPath: string): ValidationResult {
|
|
199
|
+
const issues: string[] = [];
|
|
200
|
+
const basePath = join(ECOSYSTEM_ROOT, offerPath);
|
|
201
|
+
|
|
202
|
+
// Check required directories
|
|
203
|
+
for (const dir of REQUIRED_RESEARCH_DIRS) {
|
|
204
|
+
const fullPath = join(basePath, dir);
|
|
205
|
+
if (!existsSync(fullPath)) {
|
|
206
|
+
issues.push(`Missing directory: ${dir}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Check raw data stored in raw/ (not in context)
|
|
211
|
+
const rawDir = join(basePath, 'research', 'voc', 'raw');
|
|
212
|
+
if (existsSync(rawDir)) {
|
|
213
|
+
try {
|
|
214
|
+
const rawFiles = readdirSync(rawDir).filter(f => f.endsWith('.md') || f.endsWith('.json'));
|
|
215
|
+
if (rawFiles.length === 0) {
|
|
216
|
+
issues.push('raw/ directory exists but contains no data files');
|
|
217
|
+
}
|
|
218
|
+
} catch {
|
|
219
|
+
issues.push('Cannot read raw/ directory');
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Check processed summaries exist
|
|
224
|
+
const processedDir = join(basePath, 'research', 'voc', 'processed');
|
|
225
|
+
if (existsSync(processedDir)) {
|
|
226
|
+
try {
|
|
227
|
+
const processedFiles = readdirSync(processedDir).filter(f => f.endsWith('.md'));
|
|
228
|
+
if (processedFiles.length === 0) {
|
|
229
|
+
issues.push('processed/ directory exists but contains no summary files');
|
|
230
|
+
}
|
|
231
|
+
} catch {
|
|
232
|
+
issues.push('Cannot read processed/ directory');
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Check resume state for quote counts per platform
|
|
237
|
+
const resumeState = getResumeState(offerPath);
|
|
238
|
+
if (resumeState) {
|
|
239
|
+
for (const platform of REQUIRED_PLATFORMS) {
|
|
240
|
+
const count = resumeState.quotes_per_platform[platform] || 0;
|
|
241
|
+
if (count < MIN_QUOTES_PER_PLATFORM) {
|
|
242
|
+
issues.push(
|
|
243
|
+
`${platform}: ${count}/${MIN_QUOTES_PER_PLATFORM} quotes (below minimum)`
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Check all required platforms covered
|
|
249
|
+
const coveredPlatforms = Object.keys(resumeState.quotes_per_platform)
|
|
250
|
+
.filter(p => (resumeState.quotes_per_platform[p] || 0) > 0);
|
|
251
|
+
const missingPlatforms = REQUIRED_PLATFORMS.filter(p => !coveredPlatforms.includes(p));
|
|
252
|
+
if (missingPlatforms.length > 0) {
|
|
253
|
+
issues.push(`Missing platforms: ${missingPlatforms.join(', ')}`);
|
|
254
|
+
}
|
|
255
|
+
} else {
|
|
256
|
+
issues.push('No ETL resume state found — collection may not have started');
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
passed: issues.length === 0,
|
|
261
|
+
tier: 'completeness',
|
|
262
|
+
issues,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Tier 2: Security — strips PII, validates URLs, removes spam.
|
|
268
|
+
* Operates on an array of quote data objects.
|
|
269
|
+
*/
|
|
270
|
+
export function validateSecurity(data: Quote[]): ValidationResult {
|
|
271
|
+
const issues: string[] = [];
|
|
272
|
+
|
|
273
|
+
for (let i = 0; i < data.length; i++) {
|
|
274
|
+
const quote = data[i];
|
|
275
|
+
const label = `Quote[${i}]`;
|
|
276
|
+
|
|
277
|
+
// Check for PII: email patterns
|
|
278
|
+
if (/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(quote.text)) {
|
|
279
|
+
issues.push(`${label}: Contains email address`);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Check for PII: phone patterns (international and BR)
|
|
283
|
+
if (/(\+?\d{1,3}[-.\s]?)?\(?\d{2,3}\)?[-.\s]?\d{4,5}[-.\s]?\d{4}/.test(quote.text)) {
|
|
284
|
+
issues.push(`${label}: Contains phone number`);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Check for PII: CPF pattern (Brazilian)
|
|
288
|
+
if (/\d{3}\.\d{3}\.\d{3}-\d{2}/.test(quote.text)) {
|
|
289
|
+
issues.push(`${label}: Contains CPF number`);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Validate URLs if present
|
|
293
|
+
if (quote.url) {
|
|
294
|
+
try {
|
|
295
|
+
const url = new URL(quote.url);
|
|
296
|
+
if (!['http:', 'https:'].includes(url.protocol)) {
|
|
297
|
+
issues.push(`${label}: Invalid URL protocol: ${url.protocol}`);
|
|
298
|
+
}
|
|
299
|
+
} catch {
|
|
300
|
+
issues.push(`${label}: Malformed URL: ${quote.url}`);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Check for spam indicators
|
|
305
|
+
if (isSpamContent(quote.text)) {
|
|
306
|
+
issues.push(`${label}: Suspected spam/bot content`);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Check for brand/influencer content (not authentic VOC)
|
|
310
|
+
if (isBrandContent(quote.text)) {
|
|
311
|
+
issues.push(`${label}: Suspected brand/influencer content (not authentic VOC)`);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return {
|
|
316
|
+
passed: issues.length === 0,
|
|
317
|
+
tier: 'security',
|
|
318
|
+
issues,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Tier 3: Quality — checks intensity scores, removes duplicates,
|
|
324
|
+
* verifies minimum engagement thresholds.
|
|
325
|
+
*/
|
|
326
|
+
export function validateQuality(quotes: Quote[]): ValidationResult {
|
|
327
|
+
const issues: string[] = [];
|
|
328
|
+
|
|
329
|
+
// Check intensity scores assigned
|
|
330
|
+
const withoutIntensity = quotes.filter(q => q.intensity === undefined || q.intensity === null);
|
|
331
|
+
if (withoutIntensity.length > 0) {
|
|
332
|
+
issues.push(
|
|
333
|
+
`${withoutIntensity.length} quotes missing intensity score (1-5 scale required)`
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Check intensity range
|
|
338
|
+
const invalidIntensity = quotes.filter(
|
|
339
|
+
q => q.intensity !== undefined && (q.intensity < 1 || q.intensity > 5)
|
|
340
|
+
);
|
|
341
|
+
if (invalidIntensity.length > 0) {
|
|
342
|
+
issues.push(`${invalidIntensity.length} quotes with intensity outside 1-5 range`);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Check for duplicates
|
|
346
|
+
const duplicateCount = findDuplicateCount(quotes);
|
|
347
|
+
if (duplicateCount > 0) {
|
|
348
|
+
issues.push(`${duplicateCount} duplicate quotes detected (exact or near-match)`);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Check minimum engagement thresholds per platform
|
|
352
|
+
const engagementThresholds: Record<string, number> = {
|
|
353
|
+
youtube: 500, // 500+ comments on video
|
|
354
|
+
instagram: 200, // 200+ comments
|
|
355
|
+
tiktok: 1000, // 1K+ comments
|
|
356
|
+
reddit: 10, // 10+ upvotes
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
for (const [platform, threshold] of Object.entries(engagementThresholds)) {
|
|
360
|
+
const platformQuotes = quotes.filter(q => q.platform === platform && q.engagement !== undefined);
|
|
361
|
+
const belowThreshold = platformQuotes.filter(q => (q.engagement || 0) < threshold);
|
|
362
|
+
if (belowThreshold.length > platformQuotes.length * 0.5 && platformQuotes.length > 0) {
|
|
363
|
+
issues.push(
|
|
364
|
+
`${platform}: ${belowThreshold.length}/${platformQuotes.length} quotes below engagement threshold (${threshold})`
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Check emotions categorized
|
|
370
|
+
const withoutEmotion = quotes.filter(q => !q.emotion);
|
|
371
|
+
if (withoutEmotion.length > quotes.length * 0.3) {
|
|
372
|
+
issues.push(
|
|
373
|
+
`${withoutEmotion.length}/${quotes.length} quotes missing emotion category ` +
|
|
374
|
+
`(MEDO, VERGONHA, CULPA, RAIVA, FRUSTRACAO required)`
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Check for triangulation (quotes appearing in 2+ platforms)
|
|
379
|
+
const textsByPlatform = new Map<string, Set<string>>();
|
|
380
|
+
for (const q of quotes) {
|
|
381
|
+
const normalized = q.text.toLowerCase().trim().substring(0, 80);
|
|
382
|
+
if (!textsByPlatform.has(normalized)) {
|
|
383
|
+
textsByPlatform.set(normalized, new Set());
|
|
384
|
+
}
|
|
385
|
+
textsByPlatform.get(normalized)!.add(q.platform);
|
|
386
|
+
}
|
|
387
|
+
const triangulated = [...textsByPlatform.values()].filter(s => s.size >= 2).length;
|
|
388
|
+
if (triangulated === 0 && quotes.length > 20) {
|
|
389
|
+
issues.push('No triangulated quotes found (quotes appearing in 2+ platforms)');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return {
|
|
393
|
+
passed: issues.length === 0,
|
|
394
|
+
tier: 'quality',
|
|
395
|
+
issues,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// ==========================================
|
|
400
|
+
// 3. Data Transformation
|
|
401
|
+
// ==========================================
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Splits large quote collections into processable chunks.
|
|
405
|
+
* Useful for staying within context limits (~5000 tokens per chunk).
|
|
406
|
+
*/
|
|
407
|
+
export function chunkQuotes(quotes: Quote[], maxPerChunk: number): Quote[][] {
|
|
408
|
+
if (maxPerChunk <= 0) {
|
|
409
|
+
throw new Error('maxPerChunk must be a positive integer');
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const chunks: Quote[][] = [];
|
|
413
|
+
for (let i = 0; i < quotes.length; i += maxPerChunk) {
|
|
414
|
+
chunks.push(quotes.slice(i, i + maxPerChunk));
|
|
415
|
+
}
|
|
416
|
+
return chunks;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Normalizes a raw quote string: cleans unicode, strips HTML, trims whitespace.
|
|
421
|
+
*/
|
|
422
|
+
export function cleanQuote(raw: string): string {
|
|
423
|
+
let cleaned = raw;
|
|
424
|
+
|
|
425
|
+
// Strip HTML tags
|
|
426
|
+
cleaned = cleaned.replace(/<[^>]*>/g, '');
|
|
427
|
+
|
|
428
|
+
// Decode common HTML entities
|
|
429
|
+
cleaned = cleaned
|
|
430
|
+
.replace(/&/g, '&')
|
|
431
|
+
.replace(/</g, '<')
|
|
432
|
+
.replace(/>/g, '>')
|
|
433
|
+
.replace(/"/g, '"')
|
|
434
|
+
.replace(/'/g, "'")
|
|
435
|
+
.replace(/ /g, ' ')
|
|
436
|
+
.replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16)))
|
|
437
|
+
.replace(/&#(\d+);/g, (_, dec) => String.fromCharCode(parseInt(dec, 10)));
|
|
438
|
+
|
|
439
|
+
// Normalize unicode whitespace characters to standard space
|
|
440
|
+
cleaned = cleaned.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ');
|
|
441
|
+
|
|
442
|
+
// Remove zero-width characters
|
|
443
|
+
cleaned = cleaned.replace(/[\u200B\u200C\u200D\uFEFF]/g, '');
|
|
444
|
+
|
|
445
|
+
// Normalize line endings
|
|
446
|
+
cleaned = cleaned.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
447
|
+
|
|
448
|
+
// Collapse multiple spaces/newlines
|
|
449
|
+
cleaned = cleaned.replace(/[ \t]+/g, ' ');
|
|
450
|
+
cleaned = cleaned.replace(/\n{3,}/g, '\n\n');
|
|
451
|
+
|
|
452
|
+
// Trim leading/trailing whitespace
|
|
453
|
+
cleaned = cleaned.trim();
|
|
454
|
+
|
|
455
|
+
return cleaned;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Removes exact and near-duplicate quotes using Jaccard similarity.
|
|
460
|
+
* Threshold: similarity > 0.8 means duplicate.
|
|
461
|
+
*/
|
|
462
|
+
export function deduplicateQuotes(quotes: Quote[]): Quote[] {
|
|
463
|
+
if (quotes.length <= 1) return quotes;
|
|
464
|
+
|
|
465
|
+
const unique: Quote[] = [];
|
|
466
|
+
const seenTokenSets: Set<string>[] = [];
|
|
467
|
+
|
|
468
|
+
for (const quote of quotes) {
|
|
469
|
+
const tokens = tokenize(quote.text);
|
|
470
|
+
const tokenSet = new Set(tokens);
|
|
471
|
+
|
|
472
|
+
let isDuplicate = false;
|
|
473
|
+
for (const existingSet of seenTokenSets) {
|
|
474
|
+
const similarity = jaccardSimilarity(tokenSet, existingSet);
|
|
475
|
+
if (similarity > 0.8) {
|
|
476
|
+
isDuplicate = true;
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if (!isDuplicate) {
|
|
482
|
+
unique.push(quote);
|
|
483
|
+
seenTokenSets.push(tokenSet);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return unique;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Basic speaker diarization for YouTube transcripts.
|
|
492
|
+
* Separates host speech from commenter speech based on structural cues.
|
|
493
|
+
*
|
|
494
|
+
* Heuristics:
|
|
495
|
+
* - Lines starting with timestamps or speaker labels are parsed
|
|
496
|
+
* - Questions and short statements after a labeled section are commenter
|
|
497
|
+
* - Longer blocks without labels default to host
|
|
498
|
+
*/
|
|
499
|
+
export function extractSpeakers(transcript: string): SpeakerSegment[] {
|
|
500
|
+
const segments: SpeakerSegment[] = [];
|
|
501
|
+
const lines = transcript.split('\n').map(l => l.trim()).filter(l => l.length > 0);
|
|
502
|
+
|
|
503
|
+
let currentSpeaker: 'host' | 'commenter' | 'unknown' = 'host';
|
|
504
|
+
let currentText: string[] = [];
|
|
505
|
+
let currentTimestamp: string | undefined;
|
|
506
|
+
|
|
507
|
+
function flushSegment(): void {
|
|
508
|
+
if (currentText.length > 0) {
|
|
509
|
+
segments.push({
|
|
510
|
+
speaker: currentSpeaker,
|
|
511
|
+
text: currentText.join(' ').trim(),
|
|
512
|
+
timestamp_hint: currentTimestamp,
|
|
513
|
+
});
|
|
514
|
+
currentText = [];
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function classifySpeaker(label: string): 'host' | 'commenter' | 'unknown' {
|
|
519
|
+
const lower = label.toLowerCase().trim();
|
|
520
|
+
if (
|
|
521
|
+
lower.includes('host') ||
|
|
522
|
+
lower.includes('presenter') ||
|
|
523
|
+
lower.includes('narrator') ||
|
|
524
|
+
lower.includes('speaker 1') ||
|
|
525
|
+
lower.startsWith('dr') ||
|
|
526
|
+
lower.includes('expert')
|
|
527
|
+
) {
|
|
528
|
+
return 'host';
|
|
529
|
+
}
|
|
530
|
+
if (
|
|
531
|
+
lower.includes('comment') ||
|
|
532
|
+
lower.includes('viewer') ||
|
|
533
|
+
lower.includes('audience') ||
|
|
534
|
+
lower.includes('caller') ||
|
|
535
|
+
lower.includes('user') ||
|
|
536
|
+
lower.includes('speaker 2')
|
|
537
|
+
) {
|
|
538
|
+
return 'commenter';
|
|
539
|
+
}
|
|
540
|
+
return 'unknown';
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
for (const line of lines) {
|
|
544
|
+
let workingLine = line;
|
|
545
|
+
|
|
546
|
+
// Step 1: Strip timestamp prefix if present
|
|
547
|
+
const timestampMatch = workingLine.match(
|
|
548
|
+
/^[\[(]?(\d{1,2}:\d{2}(?::\d{2})?)[\])]?\s*[-:]?\s*/
|
|
549
|
+
);
|
|
550
|
+
if (timestampMatch) {
|
|
551
|
+
flushSegment();
|
|
552
|
+
currentTimestamp = timestampMatch[1];
|
|
553
|
+
workingLine = workingLine.substring(timestampMatch[0].length).trim();
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// Step 2: Check for speaker label on the (potentially timestamp-stripped) line
|
|
557
|
+
// Matches: "Host:", "[Name]:", "Speaker 1:", "Dr. Klaus:"
|
|
558
|
+
const speakerMatch = workingLine.match(
|
|
559
|
+
/^(?:\[([^\]]+)\]|([A-Za-z][A-Za-z0-9.\s]*?))\s*:\s+/
|
|
560
|
+
);
|
|
561
|
+
if (speakerMatch) {
|
|
562
|
+
if (!timestampMatch) {
|
|
563
|
+
// Only flush if we did not already flush for the timestamp
|
|
564
|
+
flushSegment();
|
|
565
|
+
}
|
|
566
|
+
const label = speakerMatch[1] || speakerMatch[2];
|
|
567
|
+
currentSpeaker = classifySpeaker(label);
|
|
568
|
+
const remainder = workingLine.substring(speakerMatch[0].length).trim();
|
|
569
|
+
if (remainder) {
|
|
570
|
+
currentText.push(remainder);
|
|
571
|
+
}
|
|
572
|
+
} else if (timestampMatch) {
|
|
573
|
+
// Had a timestamp but no speaker label — keep the remainder
|
|
574
|
+
if (workingLine) {
|
|
575
|
+
currentText.push(workingLine);
|
|
576
|
+
}
|
|
577
|
+
} else {
|
|
578
|
+
// No timestamp, no speaker label — use heuristics
|
|
579
|
+
if (
|
|
580
|
+
line.length < 100 &&
|
|
581
|
+
(line.endsWith('?') || line.startsWith('@') || line.startsWith('>'))
|
|
582
|
+
) {
|
|
583
|
+
flushSegment();
|
|
584
|
+
segments.push({
|
|
585
|
+
speaker: 'commenter',
|
|
586
|
+
text: line.replace(/^[@>]\s*/, '').trim(),
|
|
587
|
+
timestamp_hint: currentTimestamp,
|
|
588
|
+
});
|
|
589
|
+
} else {
|
|
590
|
+
currentText.push(line);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// Flush last segment
|
|
596
|
+
flushSegment();
|
|
597
|
+
|
|
598
|
+
return segments;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
// ==========================================
|
|
602
|
+
// 4. Progress Tracking
|
|
603
|
+
// ==========================================
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Returns collection progress per platform: total, valid, rejected counts.
|
|
607
|
+
* Reads from the resume state and checks processed files for validation info.
|
|
608
|
+
*/
|
|
609
|
+
export function getCollectionProgress(offerPath: string): CollectionProgress[] {
|
|
610
|
+
const progress: CollectionProgress[] = [];
|
|
611
|
+
const resumeState = getResumeState(offerPath);
|
|
612
|
+
|
|
613
|
+
const allPlatforms = new Set([
|
|
614
|
+
...REQUIRED_PLATFORMS,
|
|
615
|
+
...(resumeState ? Object.keys(resumeState.quotes_per_platform) : []),
|
|
616
|
+
]);
|
|
617
|
+
|
|
618
|
+
for (const platform of allPlatforms) {
|
|
619
|
+
const total = resumeState?.quotes_per_platform[platform] || 0;
|
|
620
|
+
|
|
621
|
+
// Try to read rejection count from processed files
|
|
622
|
+
let rejected = 0;
|
|
623
|
+
const rejectionFile = join(
|
|
624
|
+
ECOSYSTEM_ROOT,
|
|
625
|
+
offerPath,
|
|
626
|
+
'research',
|
|
627
|
+
'voc',
|
|
628
|
+
'processed',
|
|
629
|
+
`${platform}-rejections.json`
|
|
630
|
+
);
|
|
631
|
+
|
|
632
|
+
if (existsSync(rejectionFile)) {
|
|
633
|
+
try {
|
|
634
|
+
const rejections = JSON.parse(readFileSync(rejectionFile, 'utf-8'));
|
|
635
|
+
rejected = Array.isArray(rejections) ? rejections.length : (rejections.count || 0);
|
|
636
|
+
} catch {
|
|
637
|
+
// Ignore parse errors
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
progress.push({
|
|
642
|
+
platform,
|
|
643
|
+
total,
|
|
644
|
+
valid: Math.max(0, total - rejected),
|
|
645
|
+
rejected,
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return progress;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
// ==========================================
|
|
653
|
+
// Internal Helpers
|
|
654
|
+
// ==========================================
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Tokenizes text into lowercase word tokens for Jaccard similarity.
|
|
658
|
+
*/
|
|
659
|
+
function tokenize(text: string): string[] {
|
|
660
|
+
return text
|
|
661
|
+
.toLowerCase()
|
|
662
|
+
.replace(/[^\p{L}\p{N}\s]/gu, ' ')
|
|
663
|
+
.split(/\s+/)
|
|
664
|
+
.filter(t => t.length > 2);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Calculates Jaccard similarity between two token sets.
|
|
669
|
+
* Returns a value between 0 (no overlap) and 1 (identical).
|
|
670
|
+
*/
|
|
671
|
+
function jaccardSimilarity(setA: Set<string>, setB: Set<string>): number {
|
|
672
|
+
if (setA.size === 0 && setB.size === 0) return 1;
|
|
673
|
+
if (setA.size === 0 || setB.size === 0) return 0;
|
|
674
|
+
|
|
675
|
+
let intersectionSize = 0;
|
|
676
|
+
for (const token of setA) {
|
|
677
|
+
if (setB.has(token)) {
|
|
678
|
+
intersectionSize++;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
const unionSize = setA.size + setB.size - intersectionSize;
|
|
683
|
+
return unionSize === 0 ? 0 : intersectionSize / unionSize;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Detects spam/bot content using heuristic patterns.
|
|
688
|
+
*/
|
|
689
|
+
function isSpamContent(text: string): boolean {
|
|
690
|
+
const lower = text.toLowerCase();
|
|
691
|
+
|
|
692
|
+
// Common spam patterns
|
|
693
|
+
const spamPatterns = [
|
|
694
|
+
/https?:\/\/\S+\s+https?:\/\/\S+/i, // Multiple URLs
|
|
695
|
+
/click\s+here|visit\s+my|check\s+out\s+my\s+profile/i,
|
|
696
|
+
/earn\s+\$?\d+.*per\s+(day|hour|week)/i,
|
|
697
|
+
/free\s+gift|you\s+won|congratulations.*winner/i,
|
|
698
|
+
/dm\s+me|inbox\s+me|whatsapp\s+me/i,
|
|
699
|
+
/subscribe\s+to\s+my|follow\s+my/i,
|
|
700
|
+
];
|
|
701
|
+
|
|
702
|
+
if (spamPatterns.some(p => p.test(lower))) return true;
|
|
703
|
+
|
|
704
|
+
// Excessive emoji (more than 5 in a row)
|
|
705
|
+
const emojiSequence = text.match(
|
|
706
|
+
/(?:[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]\s*){5,}/u
|
|
707
|
+
);
|
|
708
|
+
if (emojiSequence) return true;
|
|
709
|
+
|
|
710
|
+
// Extremely short and meaningless
|
|
711
|
+
if (text.length < 5) return true;
|
|
712
|
+
|
|
713
|
+
return false;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Detects brand/influencer content (not authentic VOC).
|
|
718
|
+
*/
|
|
719
|
+
function isBrandContent(text: string): boolean {
|
|
720
|
+
const lower = text.toLowerCase();
|
|
721
|
+
|
|
722
|
+
const brandPatterns = [
|
|
723
|
+
/use\s+code\s+\w+\s+for/i,
|
|
724
|
+
/sponsored|parceria|publi|#ad\b/i,
|
|
725
|
+
/link\s+na\s+bio|link\s+in\s+bio/i,
|
|
726
|
+
/\baffiliate\b.*\blink\b/i,
|
|
727
|
+
/coupon\s+code|codigo\s+de\s+desconto/i,
|
|
728
|
+
];
|
|
729
|
+
|
|
730
|
+
return brandPatterns.some(p => p.test(lower));
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Counts how many quotes in the list are duplicates (exact or near-match).
|
|
735
|
+
*/
|
|
736
|
+
function findDuplicateCount(quotes: Quote[]): number {
|
|
737
|
+
const tokenSets = quotes.map(q => new Set(tokenize(q.text)));
|
|
738
|
+
let duplicates = 0;
|
|
739
|
+
|
|
740
|
+
for (let i = 1; i < tokenSets.length; i++) {
|
|
741
|
+
for (let j = 0; j < i; j++) {
|
|
742
|
+
if (jaccardSimilarity(tokenSets[i], tokenSets[j]) > 0.8) {
|
|
743
|
+
duplicates++;
|
|
744
|
+
break; // Count each duplicate only once
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
return duplicates;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// ==========================================
|
|
753
|
+
// VOC Squad Merge (AIOS S6.10)
|
|
754
|
+
// ==========================================
|
|
755
|
+
|
|
756
|
+
export interface VocSquadResult {
|
|
757
|
+
platform: 'youtube' | 'instagram' | 'tiktok' | 'reddit' | 'amazon';
|
|
758
|
+
quotes: Quote[];
|
|
759
|
+
patterns: Array<{
|
|
760
|
+
pattern: string;
|
|
761
|
+
frequency: 'alta' | 'média' | 'baixa';
|
|
762
|
+
examples: string[];
|
|
763
|
+
}>;
|
|
764
|
+
dreAverage: number;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export interface MergedVocResult {
|
|
768
|
+
totalQuotes: number;
|
|
769
|
+
uniqueQuotes: Quote[];
|
|
770
|
+
triangulatedInsights: Array<{
|
|
771
|
+
insight: string;
|
|
772
|
+
platforms: string[];
|
|
773
|
+
dreAverage: number;
|
|
774
|
+
}>;
|
|
775
|
+
patternsByPlatform: Record<string, VocSquadResult['patterns']>;
|
|
776
|
+
consolidationMeta: {
|
|
777
|
+
mergedAt: string;
|
|
778
|
+
platformsCovered: string[];
|
|
779
|
+
triangulationRate: number;
|
|
780
|
+
duplicatesRemoved: number;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Merge results from 5 VOC Squad analysts.
|
|
786
|
+
* - Dedup quotes by Jaccard > 0.8
|
|
787
|
+
* - Triangulate insights across platforms
|
|
788
|
+
* - Calculate average DRE
|
|
789
|
+
* - Generate consolidated metadata
|
|
790
|
+
*
|
|
791
|
+
* Part of AIOS Upgrade Plan v4.0 § S6.10
|
|
792
|
+
*/
|
|
793
|
+
export function mergeVocSquadResults(results: VocSquadResult[]): MergedVocResult {
|
|
794
|
+
// Collect all quotes
|
|
795
|
+
const allQuotes: Quote[] = [];
|
|
796
|
+
const patternsByPlatform: Record<string, VocSquadResult['patterns']> = {};
|
|
797
|
+
|
|
798
|
+
for (const result of results) {
|
|
799
|
+
allQuotes.push(...result.quotes);
|
|
800
|
+
patternsByPlatform[result.platform] = result.patterns;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
// Dedup quotes using existing dedupQuotes function
|
|
804
|
+
const uniqueQuotes = dedupQuotes(allQuotes, 0.8);
|
|
805
|
+
const duplicatesRemoved = allQuotes.length - uniqueQuotes.length;
|
|
806
|
+
|
|
807
|
+
// Group quotes by emotion/theme for triangulation
|
|
808
|
+
const insightGroups: Map<string, { quotes: Quote[]; platforms: Set<string> }> = new Map();
|
|
809
|
+
|
|
810
|
+
for (const quote of uniqueQuotes) {
|
|
811
|
+
const key = quote.emotion || 'OTHER';
|
|
812
|
+
if (!insightGroups.has(key)) {
|
|
813
|
+
insightGroups.set(key, { quotes: [], platforms: new Set() });
|
|
814
|
+
}
|
|
815
|
+
const group = insightGroups.get(key)!;
|
|
816
|
+
group.quotes.push(quote);
|
|
817
|
+
group.platforms.add(quote.platform);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Identify triangulated insights (3+ platforms)
|
|
821
|
+
const triangulatedInsights: MergedVocResult['triangulatedInsights'] = [];
|
|
822
|
+
|
|
823
|
+
for (const [insight, group] of insightGroups) {
|
|
824
|
+
if (group.platforms.size >= 3) {
|
|
825
|
+
const avgDre = group.quotes.reduce((sum, q) => sum + (q.intensity || 3), 0) / group.quotes.length;
|
|
826
|
+
triangulatedInsights.push({
|
|
827
|
+
insight,
|
|
828
|
+
platforms: Array.from(group.platforms),
|
|
829
|
+
dreAverage: Math.round(avgDre * 10) / 10,
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
// Calculate triangulation rate
|
|
835
|
+
const triangulatedQuotesCount = triangulatedInsights.reduce(
|
|
836
|
+
(sum, ins) => sum + insightGroups.get(ins.insight)!.quotes.length,
|
|
837
|
+
0
|
|
838
|
+
);
|
|
839
|
+
const triangulationRate = uniqueQuotes.length > 0
|
|
840
|
+
? Math.round((triangulatedQuotesCount / uniqueQuotes.length) * 100)
|
|
841
|
+
: 0;
|
|
842
|
+
|
|
843
|
+
return {
|
|
844
|
+
totalQuotes: allQuotes.length,
|
|
845
|
+
uniqueQuotes,
|
|
846
|
+
triangulatedInsights,
|
|
847
|
+
patternsByPlatform,
|
|
848
|
+
consolidationMeta: {
|
|
849
|
+
mergedAt: new Date().toISOString(),
|
|
850
|
+
platformsCovered: results.map(r => r.platform),
|
|
851
|
+
triangulationRate,
|
|
852
|
+
duplicatesRemoved,
|
|
853
|
+
},
|
|
854
|
+
};
|
|
855
|
+
}
|