mega-brain-ai 1.3.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/.antigravity/README.md +46 -0
- package/.antigravity/rules/.gitkeep +0 -0
- package/.antigravity/rules/mega-brain.md +39 -0
- package/.claude/CLAUDE.md +172 -0
- package/.claude/agents.yaml +44 -0
- package/.claude/commands/agents.md +161 -0
- package/.claude/commands/ask.md +117 -0
- package/.claude/commands/benchmark.md +224 -0
- package/.claude/commands/chat.md +343 -0
- package/.claude/commands/compare.md +116 -0
- package/.claude/commands/conclave.md +196 -0
- package/.claude/commands/config.md +133 -0
- package/.claude/commands/create-agent.md +467 -0
- package/.claude/commands/debate.md +159 -0
- package/.claude/commands/documentation/create-architecture-documentation.md +175 -0
- package/.claude/commands/dossiers.md +180 -0
- package/.claude/commands/evolve.md +223 -0
- package/.claude/commands/extract-dna.md +172 -0
- package/.claude/commands/extract-knowledge.md +507 -0
- package/.claude/commands/gsd/add-phase.md +43 -0
- package/.claude/commands/gsd/add-tests.md +41 -0
- package/.claude/commands/gsd/add-todo.md +47 -0
- package/.claude/commands/gsd/audit-milestone.md +36 -0
- package/.claude/commands/gsd/check-todos.md +45 -0
- package/.claude/commands/gsd/cleanup.md +18 -0
- package/.claude/commands/gsd/complete-milestone.md +136 -0
- package/.claude/commands/gsd/debug.md +167 -0
- package/.claude/commands/gsd/discuss-phase.md +83 -0
- package/.claude/commands/gsd/execute-phase.md +41 -0
- package/.claude/commands/gsd/health.md +22 -0
- package/.claude/commands/gsd/help.md +22 -0
- package/.claude/commands/gsd/insert-phase.md +32 -0
- package/.claude/commands/gsd/join-discord.md +18 -0
- package/.claude/commands/gsd/list-phase-assumptions.md +46 -0
- package/.claude/commands/gsd/map-codebase.md +71 -0
- package/.claude/commands/gsd/new-milestone.md +44 -0
- package/.claude/commands/gsd/new-project.md +42 -0
- package/.claude/commands/gsd/pause-work.md +38 -0
- package/.claude/commands/gsd/plan-milestone-gaps.md +34 -0
- package/.claude/commands/gsd/plan-phase.md +45 -0
- package/.claude/commands/gsd/progress.md +24 -0
- package/.claude/commands/gsd/quick.md +41 -0
- package/.claude/commands/gsd/reapply-patches.md +110 -0
- package/.claude/commands/gsd/remove-phase.md +31 -0
- package/.claude/commands/gsd/research-phase.md +189 -0
- package/.claude/commands/gsd/resume-work.md +40 -0
- package/.claude/commands/gsd/set-profile.md +34 -0
- package/.claude/commands/gsd/settings.md +36 -0
- package/.claude/commands/gsd/update.md +37 -0
- package/.claude/commands/gsd/verify-work.md +38 -0
- package/.claude/commands/inbox.md +296 -0
- package/.claude/commands/ingest-empresa.md +191 -0
- package/.claude/commands/ingest.md +183 -0
- package/.claude/commands/jarvis-briefing.md +67 -0
- package/.claude/commands/jarvis-control.md +169 -0
- package/.claude/commands/jarvis-full.md +182 -0
- package/.claude/commands/jarvis.md +212 -0
- package/.claude/commands/ler-drive.md +212 -0
- package/.claude/commands/log.md +158 -0
- package/.claude/commands/loop.md +133 -0
- package/.claude/commands/loops.md +73 -0
- package/.claude/commands/mission-autopilot.md +538 -0
- package/.claude/commands/mission.md +353 -0
- package/.claude/commands/process-inbox.md +148 -0
- package/.claude/commands/process-jarvis.md +3036 -0
- package/.claude/commands/process-video.md +131 -0
- package/.claude/commands/rag-search.md +78 -0
- package/.claude/commands/resume.md +33 -0
- package/.claude/commands/save.md +38 -0
- package/.claude/commands/scan-inbox.md +125 -0
- package/.claude/commands/setup.md +99 -0
- package/.claude/commands/system-digest.md +243 -0
- package/.claude/commands/verify.md +182 -0
- package/.claude/commands/view-dna.md +169 -0
- package/.claude/get-shit-done/VERSION +1 -0
- package/.claude/get-shit-done/bin/gsd-tools.cjs +588 -0
- package/.claude/get-shit-done/bin/lib/commands.cjs +553 -0
- package/.claude/get-shit-done/bin/lib/config.cjs +162 -0
- package/.claude/get-shit-done/bin/lib/core.cjs +411 -0
- package/.claude/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/.claude/get-shit-done/bin/lib/init.cjs +710 -0
- package/.claude/get-shit-done/bin/lib/milestone.cjs +216 -0
- package/.claude/get-shit-done/bin/lib/phase.cjs +871 -0
- package/.claude/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/.claude/get-shit-done/bin/lib/state.cjs +679 -0
- package/.claude/get-shit-done/bin/lib/template.cjs +222 -0
- package/.claude/get-shit-done/bin/lib/verify.cjs +773 -0
- package/.claude/get-shit-done/references/checkpoints.md +776 -0
- package/.claude/get-shit-done/references/continuation-format.md +249 -0
- package/.claude/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/.claude/get-shit-done/references/git-integration.md +248 -0
- package/.claude/get-shit-done/references/git-planning-commit.md +38 -0
- package/.claude/get-shit-done/references/model-profile-resolution.md +34 -0
- package/.claude/get-shit-done/references/model-profiles.md +92 -0
- package/.claude/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/.claude/get-shit-done/references/planning-config.md +196 -0
- package/.claude/get-shit-done/references/questioning.md +145 -0
- package/.claude/get-shit-done/references/tdd.md +263 -0
- package/.claude/get-shit-done/references/ui-brand.md +160 -0
- package/.claude/get-shit-done/references/verification-patterns.md +612 -0
- package/.claude/get-shit-done/templates/DEBUG.md +164 -0
- package/.claude/get-shit-done/templates/UAT.md +247 -0
- package/.claude/get-shit-done/templates/VALIDATION.md +76 -0
- package/.claude/get-shit-done/templates/codebase/architecture.md +255 -0
- package/.claude/get-shit-done/templates/codebase/concerns.md +310 -0
- package/.claude/get-shit-done/templates/codebase/conventions.md +307 -0
- package/.claude/get-shit-done/templates/codebase/integrations.md +280 -0
- package/.claude/get-shit-done/templates/codebase/stack.md +186 -0
- package/.claude/get-shit-done/templates/codebase/structure.md +285 -0
- package/.claude/get-shit-done/templates/codebase/testing.md +480 -0
- package/.claude/get-shit-done/templates/config.json +37 -0
- package/.claude/get-shit-done/templates/context.md +283 -0
- package/.claude/get-shit-done/templates/continue-here.md +78 -0
- package/.claude/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/.claude/get-shit-done/templates/discovery.md +146 -0
- package/.claude/get-shit-done/templates/milestone-archive.md +123 -0
- package/.claude/get-shit-done/templates/milestone.md +115 -0
- package/.claude/get-shit-done/templates/phase-prompt.md +569 -0
- package/.claude/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/.claude/get-shit-done/templates/project.md +184 -0
- package/.claude/get-shit-done/templates/requirements.md +231 -0
- package/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/.claude/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/.claude/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/.claude/get-shit-done/templates/research-project/STACK.md +120 -0
- package/.claude/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/.claude/get-shit-done/templates/research.md +552 -0
- package/.claude/get-shit-done/templates/retrospective.md +54 -0
- package/.claude/get-shit-done/templates/roadmap.md +202 -0
- package/.claude/get-shit-done/templates/state.md +176 -0
- package/.claude/get-shit-done/templates/summary-complex.md +59 -0
- package/.claude/get-shit-done/templates/summary-minimal.md +41 -0
- package/.claude/get-shit-done/templates/summary-standard.md +48 -0
- package/.claude/get-shit-done/templates/summary.md +248 -0
- package/.claude/get-shit-done/templates/user-setup.md +311 -0
- package/.claude/get-shit-done/templates/verification-report.md +322 -0
- package/.claude/get-shit-done/workflows/add-phase.md +111 -0
- package/.claude/get-shit-done/workflows/add-tests.md +350 -0
- package/.claude/get-shit-done/workflows/add-todo.md +157 -0
- package/.claude/get-shit-done/workflows/audit-milestone.md +297 -0
- package/.claude/get-shit-done/workflows/check-todos.md +176 -0
- package/.claude/get-shit-done/workflows/cleanup.md +152 -0
- package/.claude/get-shit-done/workflows/complete-milestone.md +763 -0
- package/.claude/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/.claude/get-shit-done/workflows/discovery-phase.md +289 -0
- package/.claude/get-shit-done/workflows/discuss-phase.md +542 -0
- package/.claude/get-shit-done/workflows/execute-phase.md +449 -0
- package/.claude/get-shit-done/workflows/execute-plan.md +448 -0
- package/.claude/get-shit-done/workflows/health.md +156 -0
- package/.claude/get-shit-done/workflows/help.md +489 -0
- package/.claude/get-shit-done/workflows/insert-phase.md +129 -0
- package/.claude/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/.claude/get-shit-done/workflows/map-codebase.md +315 -0
- package/.claude/get-shit-done/workflows/new-milestone.md +382 -0
- package/.claude/get-shit-done/workflows/new-project.md +1116 -0
- package/.claude/get-shit-done/workflows/pause-work.md +122 -0
- package/.claude/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
- package/.claude/get-shit-done/workflows/plan-phase.md +569 -0
- package/.claude/get-shit-done/workflows/progress.md +381 -0
- package/.claude/get-shit-done/workflows/quick.md +453 -0
- package/.claude/get-shit-done/workflows/remove-phase.md +154 -0
- package/.claude/get-shit-done/workflows/research-phase.md +73 -0
- package/.claude/get-shit-done/workflows/resume-project.md +306 -0
- package/.claude/get-shit-done/workflows/set-profile.md +80 -0
- package/.claude/get-shit-done/workflows/settings.md +213 -0
- package/.claude/get-shit-done/workflows/transition.md +544 -0
- package/.claude/get-shit-done/workflows/update.md +219 -0
- package/.claude/get-shit-done/workflows/verify-phase.md +242 -0
- package/.claude/get-shit-done/workflows/verify-work.md +569 -0
- package/.claude/gsd-file-manifest.json +144 -0
- package/.claude/hooks/agent_creation_trigger.py +168 -0
- package/.claude/hooks/agent_index_updater.py +255 -0
- package/.claude/hooks/agent_memory_persister.py +203 -0
- package/.claude/hooks/claude_md_agent_sync.py +162 -0
- package/.claude/hooks/claude_md_guard.py +154 -0
- package/.claude/hooks/continuous_save.py +414 -0
- package/.claude/hooks/creation_validator.py +360 -0
- package/.claude/hooks/enforce_dual_location.py +501 -0
- package/.claude/hooks/enforce_plan_mode.py +220 -0
- package/.claude/hooks/gsd-check-update.js +62 -0
- package/.claude/hooks/gsd-context-monitor.js +122 -0
- package/.claude/hooks/gsd-statusline.js +108 -0
- package/.claude/hooks/inbox_age_alert.py +367 -0
- package/.claude/hooks/ledger_updater.py +303 -0
- package/.claude/hooks/memory_hints_injector.py +251 -0
- package/.claude/hooks/memory_updater.py +202 -0
- package/.claude/hooks/notification_system.py +115 -0
- package/.claude/hooks/pending_tracker.py +188 -0
- package/.claude/hooks/pipeline_checkpoint.py +583 -0
- package/.claude/hooks/post_batch_cascading.py +1740 -0
- package/.claude/hooks/post_tool_use.py +120 -0
- package/.claude/hooks/quality_watchdog.py +394 -0
- package/.claude/hooks/ralph_wiggum.py +286 -0
- package/.claude/hooks/session-source-sync.py +223 -0
- package/.claude/hooks/session_autosave_v2.py +1135 -0
- package/.claude/hooks/session_end.py +203 -0
- package/.claude/hooks/session_start.py +939 -0
- package/.claude/hooks/skill_indexer.py +48 -0
- package/.claude/hooks/skill_router.py +358 -0
- package/.claude/hooks/stop_hook_completeness.py +187 -0
- package/.claude/hooks/user_prompt_submit.py +125 -0
- package/.claude/package.json +1 -0
- package/.claude/rules/ANTHROPIC-STANDARDS.md +384 -0
- package/.claude/rules/CLAUDE-LITE.md +201 -0
- package/.claude/rules/RULE-GROUP-1.md +320 -0
- package/.claude/rules/RULE-GROUP-2.md +307 -0
- package/.claude/rules/RULE-GROUP-3.md +248 -0
- package/.claude/rules/RULE-GROUP-4.md +427 -0
- package/.claude/rules/RULE-GROUP-5.md +388 -0
- package/.claude/rules/RULE-GROUP-6.md +387 -0
- package/.claude/rules/RULE-GSD-MANDATORY.md +106 -0
- package/.claude/rules/agent-cognition.md +779 -0
- package/.claude/rules/agent-integrity.md +692 -0
- package/.claude/rules/epistemic-standards.md +333 -0
- package/.claude/rules/logging.md +53 -0
- package/.claude/rules/mcp-governance.md +128 -0
- package/.claude/rules/pipeline.md +60 -0
- package/.claude/rules/state-management.md +93 -0
- package/.claude/scripts/apply-tags.py +77 -0
- package/.claude/scripts/batch-extract-transcriptions.py +132 -0
- package/.claude/scripts/build-complete-index.py +250 -0
- package/.claude/scripts/build-planilha-index.py +170 -0
- package/.claude/scripts/complete-tag-matching.py +250 -0
- package/.claude/scripts/deduplicate-inbox.py +139 -0
- package/.claude/scripts/docx-xml-extractor.py +141 -0
- package/.claude/scripts/extract-docx-text.py +58 -0
- package/.claude/scripts/extract-single-transcription.py +74 -0
- package/.claude/scripts/extract_docx_from_gdrive.py +77 -0
- package/.claude/scripts/jarvis_orchestrator.py +5 -0
- package/.claude/scripts/organized-downloader.py +246 -0
- package/.claude/scripts/planilha-tagger.py +187 -0
- package/.claude/scripts/revert-tags.py +70 -0
- package/.claude/scripts/source-sync.py +265 -0
- package/.claude/scripts/tag-inbox-files.py +276 -0
- package/.claude/scripts/tag-inbox-v2.py +253 -0
- package/.claude/scripts/test-extraction.py +35 -0
- package/.claude/scripts/test-full-extraction.py +74 -0
- package/.claude/scripts/validate_cascading_integrity.py +409 -0
- package/.claude/settings.json +215 -0
- package/.claude/skills/DETECTION-PROTOCOL.md +217 -0
- package/.claude/skills/README.md +240 -0
- package/.claude/skills/SKILL-REGISTRY.md +283 -0
- package/.claude/skills/SKILL-SUGGESTIONS.md +114 -0
- package/.claude/skills/_TEMPLATES/SKILL-WRITER-GUIDE.md +385 -0
- package/.claude/skills/agent-creation/SKILL.md +374 -0
- package/.claude/skills/ask-company/SKILL.md +198 -0
- package/.claude/skills/brainstorming/SKILL.md +72 -0
- package/.claude/skills/chronicler/SKILL.md +146 -0
- package/.claude/skills/chronicler/chronicler_core.py +468 -0
- package/.claude/skills/code-review/SKILL.md +160 -0
- package/.claude/skills/convert-to-company-docs/SKILL.md +68 -0
- package/.claude/skills/convert-to-company-docs/convert.py +532 -0
- package/.claude/skills/dispatching-parallel-agents/SKILL.md +193 -0
- package/.claude/skills/docs-megabrain/SKILL.md +251 -0
- package/.claude/skills/executing-plans/SKILL.md +114 -0
- package/.claude/skills/executor/SKILL.md +161 -0
- package/.claude/skills/fase-2-5-tagging/SKILL.md +182 -0
- package/.claude/skills/feature-dev/SKILL.md +154 -0
- package/.claude/skills/frontend-design/SKILL.md +165 -0
- package/.claude/skills/gdrive-transcription-downloader/SKILL.md +249 -0
- package/.claude/skills/gemini-fallback/SKILL.md +67 -0
- package/.claude/skills/gemini-fallback/gemini_fetch.py +0 -0
- package/.claude/skills/gha/SKILL.md +96 -0
- package/.claude/skills/gha/gha_diagnostic.py +227 -0
- package/.claude/skills/github-workflow/SKILL.md +190 -0
- package/.claude/skills/hookify/SKILL.md +134 -0
- package/.claude/skills/hybrid-source-reading/SKILL.md +265 -0
- package/.claude/skills/jarvis/SKILL.md +546 -0
- package/.claude/skills/jarvis-briefing/SKILL.md +340 -0
- package/.claude/skills/knowledge-extraction/SKILL.md +318 -0
- package/.claude/skills/ler-planilha/SKILL.md +281 -0
- package/.claude/skills/pipeline-jarvis/SKILL.md +430 -0
- package/.claude/skills/plugin-dev/SKILL.md +176 -0
- package/.claude/skills/pr-review-toolkit/SKILL.md +178 -0
- package/.claude/skills/process-company-inbox/SKILL.md +183 -0
- package/.claude/skills/python-megabrain/SKILL.md +323 -0
- package/.claude/skills/resume/SKILL.md +61 -0
- package/.claude/skills/save/SKILL.md +87 -0
- package/.claude/skills/skill-creator-internal/SKILL.md +186 -0
- package/.claude/skills/skill-writer/SKILL.md +153 -0
- package/.claude/skills/skill-writer/examples.md +191 -0
- package/.claude/skills/skill-writer/troubleshooting.md +205 -0
- package/.claude/skills/smart-download-tagger/SKILL.md +148 -0
- package/.claude/skills/source-sync/SKILL.md +240 -0
- package/.claude/skills/sync-docs/SKILL.md +193 -0
- package/.claude/skills/sync-docs/config.json +37 -0
- package/.claude/skills/sync-docs/gdrive_sync.py +358 -0
- package/.claude/skills/sync-docs/reauth.py +71 -0
- package/.claude/skills/using-superpowers/SKILL.md +105 -0
- package/.claude/skills/verification-before-completion/SKILL.md +130 -0
- package/.claude/skills/verify/SKILL.md +154 -0
- package/.claude/skills/verify/verify_runner.py +0 -0
- package/.claude/skills/verify-6-levels/SKILL.md +234 -0
- package/.claude/skills/writing-plans/SKILL.md +184 -0
- package/.claude/templates/BATCH-LOG-TEMPLATE.md +221 -0
- package/.claudeignore +9 -0
- package/.cursor/agents.yaml +44 -0
- package/.cursor/rules/mega-brain.md +39 -0
- package/.gitattributes +19 -0
- package/.github/CODEOWNERS +8 -0
- package/.github/ISSUE_TEMPLATE/agent.md +96 -0
- package/.github/ISSUE_TEMPLATE/bug.md +67 -0
- package/.github/ISSUE_TEMPLATE/feature.md +56 -0
- package/.github/ISSUE_TEMPLATE/pipeline.md +70 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +30 -0
- package/.github/assets/banner.svg +152 -0
- package/.github/assets/logo-dark.svg +79 -0
- package/.github/assets/social-preview.png +0 -0
- package/.github/layer1-allowlist.txt +196 -0
- package/.github/layer2-manifest.txt +42 -0
- package/.github/layer3-manifest.txt +94 -0
- package/.github/workflows/claude-code-pr.yml +198 -0
- package/.github/workflows/claude-code-review.yml +57 -0
- package/.github/workflows/claude.yml +76 -0
- package/.github/workflows/publish-pro.yml +72 -0
- package/.github/workflows/publish.yml +86 -0
- package/.github/workflows/verification.yml +251 -0
- package/.gitignore +244 -0
- package/.gitleaks.toml +118 -0
- package/.windsurf/agents.yaml +44 -0
- package/.windsurf/rules/mega-brain.md +39 -0
- package/CONTRIBUTING.md +62 -0
- package/QUICK-START.md +231 -0
- package/README.md +168 -0
- package/agents/AGENT-INDEX.yaml +107 -0
- package/agents/MASTER-AGENT.md +612 -0
- package/agents/README.md +48 -0
- package/agents/_templates/INDEX.md +741 -0
- package/agents/_templates/TEMPLATE-AGENT-MD-ULTRA-ROBUSTO-V3.md +2399 -0
- package/agents/boardroom/CHECKLIST-MASTER.md +281 -0
- package/agents/boardroom/INTEGRATION-GUIDE.md +406 -0
- package/agents/boardroom/README.md +238 -0
- package/agents/boardroom/config/BOARDROOM-CONFIG.md +186 -0
- package/agents/boardroom/config/TTS-INTEGRATION.md +258 -0
- package/agents/boardroom/config/VOICE-PROFILES.md +624 -0
- package/agents/boardroom/scripts/audio_generator.py +375 -0
- package/agents/boardroom/scripts/audio_generator_edge.py +353 -0
- package/agents/boardroom/scripts/jarvis_boardroom_hook.py +415 -0
- package/agents/boardroom/scripts/notebooklm_generator.py +578 -0
- package/agents/boardroom/templates/EPISODE-TEMPLATE.md +367 -0
- package/agents/boardroom/templates/scene-templates/SCENE-AGENT-DEBATE.md +252 -0
- package/agents/boardroom/templates/scene-templates/SCENE-COUNCIL.md +270 -0
- package/agents/boardroom/templates/scene-templates/SCENE-DNA-CONSULTATION.md +126 -0
- package/agents/boardroom/templates/scene-templates/SCENE-QUESTION.md +174 -0
- package/agents/boardroom/workflows/WORKFLOW-AUDIO-GENERATION.md +421 -0
- package/agents/conclave/CRITIC.md +197 -0
- package/agents/conclave/DEVILS-ADVOCATE.md +274 -0
- package/agents/conclave/README.md +35 -0
- package/agents/conclave/SYNTHESIZER.md +293 -0
- package/agents/conclave/advogado-do-diabo/AGENT.md +502 -0
- package/agents/conclave/advogado-do-diabo/SOUL.md +100 -0
- package/agents/conclave/critico-metodologico/AGENT.md +683 -0
- package/agents/conclave/critico-metodologico/SOUL.md +107 -0
- package/agents/conclave/sintetizador/AGENT.md +571 -0
- package/agents/conclave/sintetizador/SOUL.md +94 -0
- package/agents/constitution/BASE-CONSTITUTION.md +254 -0
- package/agents/persona-registry.yaml +300 -0
- package/agents/sua-empresa/.gitkeep +0 -0
- package/agents/sua-empresa/README.md +44 -0
- package/agents/sua-empresa/_example/jds/EXAMPLE-JD.md +42 -0
- package/agents/sua-empresa/_example/org/EXAMPLE-ORG.md +32 -0
- package/agents/sua-empresa/_example/roles/EXAMPLE-ROLE.md +38 -0
- package/artifacts/README.md +11 -0
- package/artifacts/canonical/.gitkeep +0 -0
- package/artifacts/chunks/.gitkeep +0 -0
- package/artifacts/insights/.gitkeep +0 -0
- package/artifacts/narratives/.gitkeep +0 -0
- package/bin/cli.js +2 -0
- package/bin/lib/ascii-art.js +202 -0
- package/bin/lib/feature-gate.js +46 -0
- package/bin/lib/installer.js +593 -0
- package/bin/lib/license.js +59 -0
- package/bin/lib/pro-commands.js +75 -0
- package/bin/lib/setup-wizard.js +547 -0
- package/bin/lib/validate-email.js +113 -0
- package/bin/mega-brain.js +136 -0
- package/bin/pre-publish-gate.js +229 -0
- package/bin/push.js +1056 -0
- package/bin/templates/env.example +27 -0
- package/bin/utils/pro-detector.js +50 -0
- package/bin/validate-package.js +190 -0
- package/core/__init__.py +2 -0
- package/core/glossary/INDEX.md +63 -0
- package/core/glossary/digital.md +243 -0
- package/core/glossary/finance.md +49 -0
- package/core/glossary/marketing.md +69 -0
- package/core/glossary/operations.md +50 -0
- package/core/glossary/sales.md +690 -0
- package/core/intelligence/__init__.py +41 -0
- package/core/intelligence/agent_trigger.py +468 -0
- package/core/intelligence/audit_layers.py +491 -0
- package/core/intelligence/autonomous_processor.py +796 -0
- package/core/intelligence/bootstrap_registry.py +550 -0
- package/core/intelligence/business_model_detector.py +476 -0
- package/core/intelligence/dossier_trigger.py +336 -0
- package/core/intelligence/entity_normalizer.py +565 -0
- package/core/intelligence/org_chain_detector.py +411 -0
- package/core/intelligence/review_dashboard.py +338 -0
- package/core/intelligence/role_detector.py +855 -0
- package/core/intelligence/session_autosave.py +46 -0
- package/core/intelligence/skill_generator.py +601 -0
- package/core/intelligence/sow_generator.py +711 -0
- package/core/intelligence/sync_package_files.py +504 -0
- package/core/intelligence/task_orchestrator.py +780 -0
- package/core/intelligence/theme_analyzer.py +562 -0
- package/core/intelligence/tool_discovery.py +432 -0
- package/core/intelligence/validate_json_integrity.py +106 -0
- package/core/intelligence/validate_layers.py +310 -0
- package/core/intelligence/verify_classifications.py +94 -0
- package/core/intelligence/viability_scorer.py +592 -0
- package/core/jarvis/02-JARVIS-SOUL.md +390 -0
- package/core/jarvis/03-JARVIS-DNA.yaml +312 -0
- package/core/jarvis/AGENT.md +191 -0
- package/core/jarvis/agent-creator/AGENT.md +199 -0
- package/core/jarvis/agent-creator/SOUL.md +82 -0
- package/core/jarvis/agent-creator/tasks/create-agent.md +133 -0
- package/core/jarvis/agent-creator/tasks/sync-agents.md +100 -0
- package/core/jarvis/agent-creator/workflows/wf-create-agent.yaml +110 -0
- package/core/jarvis/agent-creator/workflows/wf-pipeline-trigger.yaml +111 -0
- package/core/jarvis/autonomous/benchmark/AGENT.md +347 -0
- package/core/jarvis/autonomous/benchmark/SOUL.md +78 -0
- package/core/jarvis/autonomous/critic/AGENT.md +324 -0
- package/core/jarvis/autonomous/critic/SOUL.md +78 -0
- package/core/jarvis/autonomous/evolver/AGENT.md +294 -0
- package/core/jarvis/autonomous/evolver/SOUL.md +85 -0
- package/core/jarvis/autonomous/playbook-generator/AGENT.md +399 -0
- package/core/jarvis/autonomous/playbook-generator/SOUL.md +80 -0
- package/core/patterns/_ROLE_PATTERNS.yaml +547 -0
- package/core/patterns/quality_gates.yaml +259 -0
- package/core/patterns/trigger_config.yaml +193 -0
- package/core/schemas/SCHEMA-INDEX.md +94 -0
- package/core/schemas/canonical-map.schema.json +98 -0
- package/core/schemas/chunks-state.schema.json +131 -0
- package/core/schemas/decisions-registry.schema.json +120 -0
- package/core/schemas/file-registry.schema.json +69 -0
- package/core/schemas/insights-state.schema.json +111 -0
- package/core/schemas/narratives-state.schema.json +150 -0
- package/core/tasks/CHANGELOG.md +55 -0
- package/core/tasks/TASK-REGISTRY.md +113 -0
- package/core/tasks/_templates/task-tmpl.md +105 -0
- package/core/tasks/analyze-themes.md +84 -0
- package/core/tasks/detect-role.md +82 -0
- package/core/tasks/extract-dna.md +114 -0
- package/core/tasks/normalize-entities.md +82 -0
- package/core/tasks/process-batch.md +111 -0
- package/core/tasks/validate-cascade.md +105 -0
- package/core/templates/README.md +27 -0
- package/core/templates/agents/dna-config-template.yaml +181 -0
- package/core/templates/agents/enrichment-protocol.md +408 -0
- package/core/templates/agents/memory-template.md +567 -0
- package/core/templates/agents/reasoning-model.md +331 -0
- package/core/templates/agents/soul-template.md +416 -0
- package/core/templates/agents/template-evolution.md +544 -0
- package/core/templates/debates/CONCLAVE-LOG-TEMPLATE-v2.md +309 -0
- package/core/templates/debates/conclave-log-template.md +309 -0
- package/core/templates/debates/conclave-protocol.md +518 -0
- package/core/templates/debates/debate-dynamics-config.yaml +322 -0
- package/core/templates/debates/debate-dynamics.md +613 -0
- package/core/templates/debates/debate-protocol.md +323 -0
- package/core/templates/logs/LOG-TEMPLATES.md +1068 -0
- package/core/templates/logs/batch-visual-template.md +841 -0
- package/core/templates/logs/log-structure.md +65 -0
- package/core/templates/logs/visual-diff.md +159 -0
- package/core/templates/phases/dossier-compilation.md +790 -0
- package/core/templates/phases/narrative-metabolism.md +292 -0
- package/core/templates/phases/narrative-synthesis.md +278 -0
- package/core/templates/phases/phase4-checkpoint.md +146 -0
- package/core/templates/phases/prompt-1.1-chunking.md +154 -0
- package/core/templates/phases/prompt-1.2-entity-resolution.md +186 -0
- package/core/templates/phases/prompt-2.1-dna-tags.md +208 -0
- package/core/templates/phases/prompt-2.1-insight-extraction.md +191 -0
- package/core/templates/phases/prompt-3.1-narrative.md +331 -0
- package/core/templates/phases/sources-compilation.md +340 -0
- package/core/workflows/PIPELINE-JARVIS-DOCS.md +606 -0
- package/core/workflows/wf-conclave.yaml +139 -0
- package/core/workflows/wf-extract-dna.yaml +158 -0
- package/core/workflows/wf-ingest.yaml +88 -0
- package/core/workflows/wf-pipeline-full.yaml +138 -0
- package/docs/API-KEYS-GUIDE.md +372 -0
- package/docs/INTEGRATION-POINTS.md +501 -0
- package/docs/LAYERS.md +403 -0
- package/docs/PLAN-MODE-PROTOCOL.md +388 -0
- package/docs/RESTORE-AND-INDEX.md +203 -0
- package/docs/TAG-RESOLVER-IMPLEMENTATION.md +597 -0
- package/docs/conselho.md +337 -0
- package/docs/context7-readme.md +28 -0
- package/docs/jarvis-logging-protocol.md +380 -0
- package/docs/pipeline-completa-v4.md +1315 -0
- package/docs/prompts/meta_agente_mapeamento_processos.md +297 -0
- package/docs/quick-start.md +197 -0
- package/docs/readme-ralph-cascateamento.md +207 -0
- package/docs/template-master.md +727 -0
- package/docs/templates/phase5/IMPLEMENTATION-GUIDE.md +355 -0
- package/docs/templates/phase5/MOGA-BRAIN-PHASE5-TEMPLATES.md +1284 -0
- package/docs/templates/phase5/README.md +165 -0
- package/docs/workflow-continuous-claude.md +2232 -0
- package/inbox/.gitkeep +0 -0
- package/inbox/README.md +15 -0
- package/knowledge/NAVIGATION-MAP.json +292 -0
- package/knowledge/README.md +11 -0
- package/knowledge/dna/.gitkeep +0 -0
- package/knowledge/dossiers/persons/.gitkeep +0 -0
- package/knowledge/dossiers/system/.gitkeep +0 -0
- package/knowledge/dossiers/themes/.gitkeep +0 -0
- package/knowledge/playbooks/.gitkeep +0 -0
- package/knowledge/sources/.gitkeep +0 -0
- package/logs/.gitkeep +0 -0
- package/logs/README.md +11 -0
- package/package.json +180 -0
- package/requirements.txt +4 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# QUALITY GATES - Intelligence Layer v1.0
|
|
2
|
+
# =========================================
|
|
3
|
+
# Gates de qualidade para impedir criacao de artefatos ruins.
|
|
4
|
+
# Inspirado em: Squad Creator quality-gates.yaml (10 gates),
|
|
5
|
+
# veto-conditions.yaml (18 vetos), MMOS APEX scoring (6 dim)
|
|
6
|
+
#
|
|
7
|
+
# Tipos de gate:
|
|
8
|
+
# auto - Verificacao automatica, bloqueia sem intervencao humana
|
|
9
|
+
# hybrid - Verificacao automatica + aprovacao humana obrigatoria
|
|
10
|
+
# manual - Aprovacao humana obrigatoria (sem pre-check automatico)
|
|
11
|
+
#
|
|
12
|
+
# Versao: 1.0.0
|
|
13
|
+
# Data: 2026-02-26
|
|
14
|
+
|
|
15
|
+
version: "1.0.0"
|
|
16
|
+
|
|
17
|
+
# ===========================================================================
|
|
18
|
+
# QUALITY GATES
|
|
19
|
+
# ===========================================================================
|
|
20
|
+
|
|
21
|
+
gates:
|
|
22
|
+
# --- Gate 1: Viabilidade de Entidade ---
|
|
23
|
+
QG-MB-1.1:
|
|
24
|
+
name: "Entity Viability"
|
|
25
|
+
phase: "entity_detection"
|
|
26
|
+
type: "auto"
|
|
27
|
+
description: "Verifica se entidade detectada tem evidencia suficiente"
|
|
28
|
+
criteria:
|
|
29
|
+
- "weighted_score >= 10 (established tier)"
|
|
30
|
+
- "sources >= 2 (pelo menos 2 fontes distintas)"
|
|
31
|
+
- "domain_match confirmado em DOMAINS-TAXONOMY"
|
|
32
|
+
action_on_pass: "Marcar como 'active', disponivel para criacao de agente"
|
|
33
|
+
action_on_fail: "Marcar como 'tracking', nao criar agente"
|
|
34
|
+
severity: "blocking"
|
|
35
|
+
|
|
36
|
+
QG-MB-1.2:
|
|
37
|
+
name: "Entity Deduplication"
|
|
38
|
+
phase: "entity_detection"
|
|
39
|
+
type: "auto"
|
|
40
|
+
description: "Verifica se entidade nao e duplicata de existente"
|
|
41
|
+
criteria:
|
|
42
|
+
- "Fuzzy score < 0.85 contra todas as entidades existentes"
|
|
43
|
+
- "NAO e alias de entidade ja canonicalizada"
|
|
44
|
+
action_on_pass: "Criar como entidade nova"
|
|
45
|
+
action_on_fail: "Adicionar a review_queue para merge manual"
|
|
46
|
+
severity: "blocking"
|
|
47
|
+
|
|
48
|
+
# --- Gate 2: Qualidade de Dossier ---
|
|
49
|
+
QG-MB-2.1:
|
|
50
|
+
name: "Dossier Quality"
|
|
51
|
+
phase: "dossier_creation"
|
|
52
|
+
type: "auto"
|
|
53
|
+
description: "Verifica criterios minimos para criar dossier tematico"
|
|
54
|
+
criteria:
|
|
55
|
+
- "relevance_score >= 25.0"
|
|
56
|
+
- "occurrences >= 15 em 2+ fontes"
|
|
57
|
+
- "frameworks >= 2 OU metodologias >= 1"
|
|
58
|
+
- "NAO e alias de dossier existente"
|
|
59
|
+
- "Tema pertence a pelo menos 1 dominio do DOMAINS-TAXONOMY"
|
|
60
|
+
action_on_pass: "Criar dossier"
|
|
61
|
+
action_on_fail: "Marcar como 'candidate', monitorar"
|
|
62
|
+
severity: "blocking"
|
|
63
|
+
|
|
64
|
+
# --- Gate 3: Qualidade de Agente ---
|
|
65
|
+
QG-MB-3.1:
|
|
66
|
+
name: "Agent Creation Quality"
|
|
67
|
+
phase: "agent_creation"
|
|
68
|
+
type: "hybrid"
|
|
69
|
+
description: "Verifica criterios para criar agente de cargo"
|
|
70
|
+
criteria:
|
|
71
|
+
- "SOW gerado com executor_type definido"
|
|
72
|
+
- "Pelo menos 3 responsibilities no registry"
|
|
73
|
+
- "Domain match com DOMAINS-TAXONOMY"
|
|
74
|
+
- "weighted_score >= established threshold (10)"
|
|
75
|
+
- "Se Hybrid/Human: humano deve aprovar"
|
|
76
|
+
action_on_pass: "Criar agente"
|
|
77
|
+
action_on_fail: "Bloquear criacao, gerar candidatura para revisao"
|
|
78
|
+
severity: "blocking"
|
|
79
|
+
|
|
80
|
+
QG-MB-3.2:
|
|
81
|
+
name: "Agent Knowledge Base"
|
|
82
|
+
phase: "agent_creation"
|
|
83
|
+
type: "auto"
|
|
84
|
+
description: "Verifica se agente tem base de conhecimento suficiente"
|
|
85
|
+
criteria:
|
|
86
|
+
- "Pelo menos 1 framework DNA associado ao dominio"
|
|
87
|
+
- "Pelo menos 2 fontes de conhecimento"
|
|
88
|
+
- "Nao duplica agente de cargo existente"
|
|
89
|
+
action_on_pass: "Agente criado com skills linkadas"
|
|
90
|
+
action_on_fail: "Agente criado como 'draft' sem skills"
|
|
91
|
+
severity: "warning"
|
|
92
|
+
|
|
93
|
+
# --- Gate 4: Qualidade de Skill ---
|
|
94
|
+
QG-MB-4.1:
|
|
95
|
+
name: "Skill Quality"
|
|
96
|
+
phase: "skill_generation"
|
|
97
|
+
type: "auto"
|
|
98
|
+
description: "Verifica qualidade de skill gerada automaticamente"
|
|
99
|
+
criteria:
|
|
100
|
+
- "Framework source verificavel (source_id existe)"
|
|
101
|
+
- "Workflow com >= 3 steps"
|
|
102
|
+
- "Evidence com conteudo (>50 chars)"
|
|
103
|
+
- "Skill nao duplica skill existente (nome + persona)"
|
|
104
|
+
action_on_pass: "Publicar skill"
|
|
105
|
+
action_on_fail: "Marcar skill como 'draft', nao publicar"
|
|
106
|
+
severity: "warning"
|
|
107
|
+
|
|
108
|
+
# --- Gate 5: Business Model Consistency ---
|
|
109
|
+
QG-MB-5.1:
|
|
110
|
+
name: "Business Model Consistency"
|
|
111
|
+
phase: "business_model_detection"
|
|
112
|
+
type: "hybrid"
|
|
113
|
+
description: "Verifica consistencia de modelo de negocio detectado"
|
|
114
|
+
criteria:
|
|
115
|
+
- "Role chain sem ciclos (A->B->C->A proibido)"
|
|
116
|
+
- "Departamentos com pelo menos 1 role detectado"
|
|
117
|
+
- "Revenue signals consistentes com team_size"
|
|
118
|
+
- "Role consolidation tem evidencia verificavel"
|
|
119
|
+
action_on_pass: "Modelo de negocio validado"
|
|
120
|
+
action_on_fail: "Flaggar para revisao manual"
|
|
121
|
+
severity: "warning"
|
|
122
|
+
|
|
123
|
+
# --- Gate 6: SOW Completeness ---
|
|
124
|
+
QG-MB-6.1:
|
|
125
|
+
name: "SOW Completeness"
|
|
126
|
+
phase: "sow_generation"
|
|
127
|
+
type: "auto"
|
|
128
|
+
description: "Verifica se SOW dual-purpose esta completo"
|
|
129
|
+
criteria:
|
|
130
|
+
- "executor_type definido (Worker/Agent/Hybrid/Human)"
|
|
131
|
+
- "Pelo menos 2 tools sugeridas"
|
|
132
|
+
- "Pelo menos 2 tasks atribuidas"
|
|
133
|
+
- "Pelo menos 2 KPIs definidos"
|
|
134
|
+
- "Department definido"
|
|
135
|
+
action_on_pass: "SOW publicado"
|
|
136
|
+
action_on_fail: "SOW salvo como 'incomplete', flaggado"
|
|
137
|
+
severity: "warning"
|
|
138
|
+
|
|
139
|
+
# ===========================================================================
|
|
140
|
+
# VETO CONDITIONS
|
|
141
|
+
# ===========================================================================
|
|
142
|
+
# Condicoes que IMPEDEM fisicamente a criacao de artefatos.
|
|
143
|
+
# Vetos sao bloqueantes (nao warnings). Nao podem ser overridden.
|
|
144
|
+
|
|
145
|
+
veto_conditions:
|
|
146
|
+
MB_VC_001:
|
|
147
|
+
name: "Source Quality"
|
|
148
|
+
condition: "< 2 fontes distintas para entidade"
|
|
149
|
+
applies_to: ["agent_creation"]
|
|
150
|
+
action: "VETO - nao criar agente ate ter 2+ fontes"
|
|
151
|
+
|
|
152
|
+
MB_VC_002:
|
|
153
|
+
name: "Domain Orphan"
|
|
154
|
+
condition: "Role sem domain_match em DOMAINS-TAXONOMY"
|
|
155
|
+
applies_to: ["agent_creation"]
|
|
156
|
+
action: "VETO - adicionar ao taxonomy primeiro"
|
|
157
|
+
|
|
158
|
+
MB_VC_003:
|
|
159
|
+
name: "Circular Hierarchy"
|
|
160
|
+
condition: "Role chain com ciclo detectado (A->B->...->A)"
|
|
161
|
+
applies_to: ["business_model_detection"]
|
|
162
|
+
action: "VETO - corrigir hierarquia antes de aceitar"
|
|
163
|
+
|
|
164
|
+
MB_VC_004:
|
|
165
|
+
name: "Generic Agent"
|
|
166
|
+
condition: "Agente criado sem frameworks ou DNAs especificos"
|
|
167
|
+
applies_to: ["agent_creation"]
|
|
168
|
+
action: "VETO - minds first, never generic"
|
|
169
|
+
|
|
170
|
+
MB_VC_005:
|
|
171
|
+
name: "Skill Without Evidence"
|
|
172
|
+
condition: "Skill gerada sem source_id verificavel"
|
|
173
|
+
applies_to: ["skill_generation"]
|
|
174
|
+
action: "VETO - marcar como draft, nao publicar"
|
|
175
|
+
|
|
176
|
+
MB_VC_006:
|
|
177
|
+
name: "Duplicate Entity"
|
|
178
|
+
condition: "Entidade com fuzzy score >= 0.95 contra existente"
|
|
179
|
+
applies_to: ["entity_detection"]
|
|
180
|
+
action: "VETO - auto-merge com existente"
|
|
181
|
+
|
|
182
|
+
MB_VC_007:
|
|
183
|
+
name: "Empty SOW"
|
|
184
|
+
condition: "SOW sem responsibilities E sem tasks"
|
|
185
|
+
applies_to: ["sow_generation"]
|
|
186
|
+
action: "VETO - nao publicar SOW vazio"
|
|
187
|
+
|
|
188
|
+
MB_VC_008:
|
|
189
|
+
name: "Orphan Dossier"
|
|
190
|
+
condition: "Dossier sem nenhuma fonte ou chunk associado"
|
|
191
|
+
applies_to: ["dossier_creation"]
|
|
192
|
+
action: "VETO - nao criar dossier sem evidencia"
|
|
193
|
+
|
|
194
|
+
# ===========================================================================
|
|
195
|
+
# VIABILITY SCORING (APEX Adaptado)
|
|
196
|
+
# ===========================================================================
|
|
197
|
+
# Scoring multidimensional para avaliar viabilidade de criar agente de persona.
|
|
198
|
+
# Adaptado do APEX do MMOS (6 dimensoes).
|
|
199
|
+
|
|
200
|
+
viability_scoring:
|
|
201
|
+
dimensions:
|
|
202
|
+
A_availability:
|
|
203
|
+
description: "Volume e variedade de conteudo disponivel"
|
|
204
|
+
weight: 1.0
|
|
205
|
+
min_threshold: 5
|
|
206
|
+
scoring:
|
|
207
|
+
"10h+ content, 3+ source_types": 10
|
|
208
|
+
"5-10h, 2 source_types": 7
|
|
209
|
+
"1-5h, 1 source_type": 5
|
|
210
|
+
"< 1h": 3
|
|
211
|
+
|
|
212
|
+
P_persona_clarity:
|
|
213
|
+
description: "Consistencia de personalidade nas fontes"
|
|
214
|
+
weight: 0.9
|
|
215
|
+
min_threshold: 5
|
|
216
|
+
scoring:
|
|
217
|
+
"Voice consistente, frameworks unicos, filosofia clara": 10
|
|
218
|
+
"Voice identificavel, alguns frameworks": 7
|
|
219
|
+
"Voice variavel, poucos frameworks": 5
|
|
220
|
+
"Sem voice distinta": 3
|
|
221
|
+
|
|
222
|
+
E_evolution:
|
|
223
|
+
description: "Cobertura temporal e evolucao"
|
|
224
|
+
weight: 0.8
|
|
225
|
+
min_threshold: 5
|
|
226
|
+
scoring:
|
|
227
|
+
"5+ anos de conteudo, evolucao visivel": 10
|
|
228
|
+
"2-5 anos, alguma evolucao": 7
|
|
229
|
+
"1-2 anos": 5
|
|
230
|
+
"< 1 ano ou snapshot unico": 3
|
|
231
|
+
|
|
232
|
+
X_expertise:
|
|
233
|
+
description: "Frameworks originais e singularidade"
|
|
234
|
+
weight: 0.9
|
|
235
|
+
min_threshold: 5
|
|
236
|
+
scoring:
|
|
237
|
+
"10+ frameworks originais, metodologia unica": 10
|
|
238
|
+
"5-10 frameworks, alguma originalidade": 7
|
|
239
|
+
"2-5 frameworks, maioria generica": 5
|
|
240
|
+
"< 2 frameworks": 3
|
|
241
|
+
|
|
242
|
+
S_strategic_fit:
|
|
243
|
+
description: "Alinhamento com objetivos do Mega Brain"
|
|
244
|
+
weight: 0.8
|
|
245
|
+
min_threshold: 5
|
|
246
|
+
scoring:
|
|
247
|
+
"Alinhamento direto com dominios core": 10
|
|
248
|
+
"Alinhamento parcial": 7
|
|
249
|
+
"Alinhamento tangencial": 5
|
|
250
|
+
"Sem alinhamento claro": 3
|
|
251
|
+
|
|
252
|
+
decision_rules:
|
|
253
|
+
go: 7.0 # APEX >= 7.0 -> GO (criar agente completo)
|
|
254
|
+
conditional: 5.0 # APEX 5.0-6.9 -> CONDICIONAL (criar com ressalvas)
|
|
255
|
+
no_go: 0.0 # APEX < 5.0 -> NO-GO (apenas tracking)
|
|
256
|
+
|
|
257
|
+
auto_rejection:
|
|
258
|
+
threshold: 5.0
|
|
259
|
+
message: "APEX score abaixo do minimo. Entidade mantida em tracking."
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# TRIGGER CONFIG - Intelligence Layer v2.0
|
|
2
|
+
# Configuracao de thresholds para criacao automatica de artefatos
|
|
3
|
+
# Mega Brain REGRA #22 + Detection Intelligence v2.0
|
|
4
|
+
#
|
|
5
|
+
# Versao: 2.0.0
|
|
6
|
+
# Data: 2026-02-25
|
|
7
|
+
#
|
|
8
|
+
# Changelog v2.0:
|
|
9
|
+
# - agent_creation_cargo agora usa weighted_score (tiered: established/emerging/emergent)
|
|
10
|
+
# - Novos pesos de deteccao: direct=1.0, inferred=0.7, emergent=0.5
|
|
11
|
+
# - Status lifecycle: emergent_candidate -> tracking -> active
|
|
12
|
+
# - Backward compat: se weighted_score ausente, usa mention_count como fallback
|
|
13
|
+
|
|
14
|
+
version: "2.0.0"
|
|
15
|
+
|
|
16
|
+
# ===========================================================================
|
|
17
|
+
# THRESHOLDS DE CRIACAO
|
|
18
|
+
# ===========================================================================
|
|
19
|
+
|
|
20
|
+
thresholds:
|
|
21
|
+
# Quando criar novo DOSSIER TEMATICO
|
|
22
|
+
dossier_creation:
|
|
23
|
+
min_occurrences: 15 # tema aparece 15+ vezes nos chunks/insights
|
|
24
|
+
min_sources: 2 # de pelo menos 2 fontes diferentes
|
|
25
|
+
min_frameworks: 2 # pelo menos 2 frameworks associados ao tema
|
|
26
|
+
min_relevance_score: 25.0 # score ponderado minimo
|
|
27
|
+
|
|
28
|
+
# Quando ATUALIZAR dossier existente
|
|
29
|
+
dossier_update:
|
|
30
|
+
stale_days: 30 # dossier desatualizado apos 30 dias
|
|
31
|
+
min_new_elements: 5 # pelo menos 5 novos elementos justificam update
|
|
32
|
+
|
|
33
|
+
# Quando criar AGENTE DE PESSOA
|
|
34
|
+
agent_creation_person:
|
|
35
|
+
min_sources: 2 # pelo menos 2 fontes processadas
|
|
36
|
+
min_dna_elements: 30 # pelo menos 30 elementos DNA extraidos
|
|
37
|
+
min_frameworks: 5 # pelo menos 5 frameworks unicos
|
|
38
|
+
|
|
39
|
+
# ---------------------------------------------------------------------------
|
|
40
|
+
# AGENTE DE CARGO - Tiered Thresholds (v2.0)
|
|
41
|
+
# ---------------------------------------------------------------------------
|
|
42
|
+
# Usa weighted_score em vez de mention_count bruto.
|
|
43
|
+
# weighted_score = direct*1.0 + inferred*0.7 + emergent*0.5
|
|
44
|
+
# Fallback: se weighted_score ausente, usa mention_count.
|
|
45
|
+
#
|
|
46
|
+
# Tier hierarchy:
|
|
47
|
+
# established -> cria agente (status: "active")
|
|
48
|
+
# emerging -> monitora, promove quando atinge established (status: "tracking")
|
|
49
|
+
# emergent -> apenas monitora, NAO cria agente (status: "emergent_candidate")
|
|
50
|
+
# ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
agent_creation_cargo:
|
|
53
|
+
# Tier 1: Roles com evidencia forte - CRIAR AGENTE
|
|
54
|
+
established:
|
|
55
|
+
min_weighted_score: 10 # weighted_score >= 10
|
|
56
|
+
min_sources: 2 # de pelo menos 2 fontes
|
|
57
|
+
domain_match_required: true
|
|
58
|
+
status_output: "active"
|
|
59
|
+
|
|
60
|
+
# Tier 2: Roles emergentes com evidencia moderada - MONITORAR
|
|
61
|
+
emerging:
|
|
62
|
+
min_weighted_score: 5 # weighted_score >= 5
|
|
63
|
+
min_sources: 1 # pelo menos 1 fonte
|
|
64
|
+
domain_match_required: false
|
|
65
|
+
status_output: "tracking"
|
|
66
|
+
# Regras de promocao para established
|
|
67
|
+
promotion_rules:
|
|
68
|
+
min_weighted_score: 15 # se chegar a 15 com 2+ fontes, sobe
|
|
69
|
+
min_sources: 2
|
|
70
|
+
|
|
71
|
+
# Tier 3: Roles detectados por emergencia/inferencia - OBSERVAR
|
|
72
|
+
emergent:
|
|
73
|
+
min_weighted_score: 3 # weighted_score >= 3
|
|
74
|
+
min_sources: 1 # pelo menos 1 fonte
|
|
75
|
+
status_output: "emergent_candidate"
|
|
76
|
+
# NAO cria agente. Apenas rastreia.
|
|
77
|
+
# Sobe para emerging quando weighted_score >= 5
|
|
78
|
+
|
|
79
|
+
# Backward compat: flat thresholds usados se tiered nao encontrado
|
|
80
|
+
min_mentions: 10
|
|
81
|
+
min_sources: 2
|
|
82
|
+
min_responsibilities: 3
|
|
83
|
+
domain_match_required: true
|
|
84
|
+
|
|
85
|
+
# Canonicalizacao de entidades
|
|
86
|
+
entity_canonicalization:
|
|
87
|
+
fuzzy_threshold: 0.85 # similaridade minima para candidato a merge
|
|
88
|
+
auto_merge_threshold: 0.95 # acima disso, merge automatico
|
|
89
|
+
min_occurrences_to_confirm: 3 # mencoes para confirmar entidade nova
|
|
90
|
+
|
|
91
|
+
# ===========================================================================
|
|
92
|
+
# PESOS DE SCORING
|
|
93
|
+
# ===========================================================================
|
|
94
|
+
|
|
95
|
+
scoring:
|
|
96
|
+
# Pesos para calcular relevancia de tema (dossier_trigger)
|
|
97
|
+
dossier_relevance:
|
|
98
|
+
cross_source_weight: 3.0 # bonus por cada fonte adicional
|
|
99
|
+
framework_weight: 2.0 # bonus por framework nomeado
|
|
100
|
+
heuristic_weight: 1.5 # bonus por heuristica com numeros
|
|
101
|
+
methodology_weight: 2.0 # bonus por metodologia step-by-step
|
|
102
|
+
philosophy_weight: 1.0 # bonus por crenca/filosofia
|
|
103
|
+
|
|
104
|
+
# Pesos para detectar role (role_detector)
|
|
105
|
+
role_relevance:
|
|
106
|
+
job_description_weight: 3.0 # mencao com descricao de funcao
|
|
107
|
+
metric_weight: 2.0 # mencao com KPIs/metricas
|
|
108
|
+
responsibility_weight: 2.5 # mencao com responsabilidades
|
|
109
|
+
hierarchy_weight: 1.5 # mencao com relacao hierarquica
|
|
110
|
+
|
|
111
|
+
# Pesos de tipo de deteccao (role_detector v2.0)
|
|
112
|
+
detection_type:
|
|
113
|
+
direct: 1.0 # nome do cargo aparece no texto
|
|
114
|
+
inferred: 0.7 # atividade implica cargo
|
|
115
|
+
emergent: 0.5 # role desconhecido detectado por pattern generico
|
|
116
|
+
|
|
117
|
+
# ===========================================================================
|
|
118
|
+
# STATUS LABELS
|
|
119
|
+
# ===========================================================================
|
|
120
|
+
|
|
121
|
+
status_labels:
|
|
122
|
+
# Role lifecycle (v2.0 - baseado em weighted_score)
|
|
123
|
+
role_tracking:
|
|
124
|
+
active: 10 # weighted_score >= 10 + 2 fontes = CRIAR agente
|
|
125
|
+
tracking: 5 # weighted_score 5-9 = monitorar
|
|
126
|
+
emergent_candidate: 3 # weighted_score 3-4 = apenas rastrear
|
|
127
|
+
observed: 0 # weighted_score < 3 = detectado mas insignificante
|
|
128
|
+
|
|
129
|
+
dossier_readiness:
|
|
130
|
+
ready: 25.0 # score >= 25 = criar dossier
|
|
131
|
+
candidate: 15.0 # score 15-25 = candidato, monitorar
|
|
132
|
+
tracking: 0.0 # score < 15 = apenas rastrear
|
|
133
|
+
|
|
134
|
+
# ===========================================================================
|
|
135
|
+
# CRITERIOS FORMAIS DE CRIACAO DE DOSSIERS (Sprint 4.7)
|
|
136
|
+
# ===========================================================================
|
|
137
|
+
# Documenta explicitamente QUANDO e POR QUE criar/atualizar dossiers.
|
|
138
|
+
# Estes criterios sao enforced por dossier_trigger.py.
|
|
139
|
+
|
|
140
|
+
dossier_creation:
|
|
141
|
+
criterios_formais:
|
|
142
|
+
- "Tema aparece em 15+ chunks de 2+ fontes distintas"
|
|
143
|
+
- "Relevance score >= 25.0 (cross_source*3 + framework*2 + methodology*2)"
|
|
144
|
+
- "Tema NAO e alias de dossier existente (canonicalizacao via entity_normalizer)"
|
|
145
|
+
- "Tema tem frameworks OU metodologias associados (nao apenas mencoes genericas)"
|
|
146
|
+
- "Tema pertence a pelo menos 1 dominio do DOMAINS-TAXONOMY.yaml"
|
|
147
|
+
incrementacao:
|
|
148
|
+
- "Novo batch com 5+ novos insights sobre tema existente"
|
|
149
|
+
- "Dossier nao atualizado em 30+ dias com novos dados disponiveis"
|
|
150
|
+
- "Novo framework ou metodologia descoberto para tema existente"
|
|
151
|
+
exclusao:
|
|
152
|
+
- "Temas genericos demais (ex: 'business', 'success', 'money')"
|
|
153
|
+
- "Temas que sao aliases de entidades ja canonicalizadas"
|
|
154
|
+
- "Temas sem frameworks NEM metodologias (apenas mencoes narrativas)"
|
|
155
|
+
|
|
156
|
+
# ===========================================================================
|
|
157
|
+
# KPIs DE SUCESSO - INTELLIGENCE LAYER (Sprint 4.8)
|
|
158
|
+
# ===========================================================================
|
|
159
|
+
# Metricas para avaliar saude e eficacia do pipeline.
|
|
160
|
+
# Medidos apos cada batch e em relatorios semanais.
|
|
161
|
+
|
|
162
|
+
kpis_intelligence_layer:
|
|
163
|
+
detection:
|
|
164
|
+
roles_detected_target: 33 # minimo de roles unicos detectados
|
|
165
|
+
roles_detected_stretch: 50 # meta agressiva
|
|
166
|
+
domains_covered_target: 7 # dominios com pelo menos 1 role (vs 1 antes)
|
|
167
|
+
inference_accuracy_target: 80 # % de roles inferidos confirmados manualmente
|
|
168
|
+
emergent_capture_rate: 5 # roles emergentes por 100 batches
|
|
169
|
+
|
|
170
|
+
triggers:
|
|
171
|
+
new_dossiers_per_100_batches: "3-5"
|
|
172
|
+
new_agents_per_100_batches: "1-2"
|
|
173
|
+
false_positive_rate_max: 10 # % maximo de falsos positivos
|
|
174
|
+
trigger_latency_max_seconds: 30 # tempo maximo para avaliar triggers
|
|
175
|
+
|
|
176
|
+
registry:
|
|
177
|
+
entity_dedup_rate_target: 95 # % de duplicatas canonicalizadas
|
|
178
|
+
orphan_rate_max: 5 # % maximo de entidades sem source
|
|
179
|
+
weighted_score_coverage: 100 # % de roles com weighted_score calculado
|
|
180
|
+
|
|
181
|
+
quality:
|
|
182
|
+
dossier_min_frameworks: 2 # frameworks minimos por dossier
|
|
183
|
+
agent_min_responsibilities: 3 # responsabilidades minimas por agente
|
|
184
|
+
role_chain_max_depth: 6 # profundidade maxima de hierarquia
|
|
185
|
+
|
|
186
|
+
baselines:
|
|
187
|
+
pre_v2_roles: 18 # roles detectados antes do Sprint 4
|
|
188
|
+
post_v2_roles_target: 33 # roles apos Sprint 4
|
|
189
|
+
pre_v2_domains: 1 # apenas "vendas"
|
|
190
|
+
post_v2_domains_target: 7 # vendas + marketing + content + growth + design + tech + legal
|
|
191
|
+
cmo_weighted_score_before: 2.0 # CMO antes
|
|
192
|
+
cmo_weighted_score_target: 10.0 # CMO depois
|
|
193
|
+
copywriter_target: 10.0 # COPYWRITER weighted_score alvo
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Schema Index
|
|
2
|
+
|
|
3
|
+
> **Versão:** 1.0.0
|
|
4
|
+
> **Última Atualização:** 2025-12-17
|
|
5
|
+
|
|
6
|
+
## Schemas Disponíveis
|
|
7
|
+
|
|
8
|
+
| Schema | Arquivo de Estado | Propósito |
|
|
9
|
+
|--------|-------------------|-----------|
|
|
10
|
+
| `chunks-state.schema.json` | `/artifacts/chunks/CHUNKS-STATE.json` | Chunks extraídos das fontes |
|
|
11
|
+
| `canonical-map.schema.json` | `/artifacts/canonical/CANONICAL-MAP.json` | Mapa de entidades canônicas |
|
|
12
|
+
| `insights-state.schema.json` | `/artifacts/insights/INSIGHTS-STATE.json` | Insights extraídos |
|
|
13
|
+
| `narratives-state.schema.json` | `/artifacts/narratives/NARRATIVES-STATE.json` | Narrativas sintetizadas |
|
|
14
|
+
| `file-registry.schema.json` | `/system/REGISTRY/file-registry.json` | Registry de arquivos processados |
|
|
15
|
+
| `decisions-registry.schema.json` | `/logs/SYSTEM/decisions-registry.json` | Decisões e precedentes |
|
|
16
|
+
|
|
17
|
+
## Sistema de IDs Unificado
|
|
18
|
+
|
|
19
|
+
### Padrões de ID
|
|
20
|
+
|
|
21
|
+
| Tipo | Formato | Exemplo |
|
|
22
|
+
|------|---------|---------|
|
|
23
|
+
| Source ID | `PREFIX` + `NNN` | `JL001`, `CG003`, `HR001` |
|
|
24
|
+
| Chunk ID | `SOURCE_ID` + `-` + `NNN` | `JL001-001`, `CG003-015` |
|
|
25
|
+
| Decision ID | `YYYYMMDDHHMMSS-ORIGIN-DEST` | `20251215130249-CRO-CFO` |
|
|
26
|
+
| Precedent ID | `PREC-YYYY-NNN` | `PREC-2025-001` |
|
|
27
|
+
|
|
28
|
+
### Prefixos de Fonte Registrados
|
|
29
|
+
|
|
30
|
+
| Prefixo | Pessoa/Canal | Empresa |
|
|
31
|
+
|---------|--------------|---------|
|
|
32
|
+
| `JL` | Jordan Lee | AI Business |
|
|
33
|
+
| `CJ` | Charlie Johnson Show | - |
|
|
34
|
+
| `MT` | Max Tornow | Max Tornow Podcast |
|
|
35
|
+
| `HR` | Alex Hormozi | - |
|
|
36
|
+
| `CG` | Cole Gordon | - |
|
|
37
|
+
| `SS` | Sam Oven | Setterlun University |
|
|
38
|
+
|
|
39
|
+
## Foreign Keys (Rastreabilidade)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
file-registry.json
|
|
43
|
+
├─ source_id ──────────────────┐
|
|
44
|
+
└─ chunk_count │
|
|
45
|
+
▼
|
|
46
|
+
CHUNKS-STATE.json ◄────────────────┘
|
|
47
|
+
├─ source_id
|
|
48
|
+
└─ chunks[]
|
|
49
|
+
└─ chunk_id ───────────────┐
|
|
50
|
+
│
|
|
51
|
+
INSIGHTS-STATE.json ◄──────────────┤
|
|
52
|
+
└─ chunk_id │
|
|
53
|
+
└─ insight_id ─────────────┤
|
|
54
|
+
│
|
|
55
|
+
NARRATIVES-STATE.json ◄────────────┤
|
|
56
|
+
└─ evidence_chain[] (chunk_ids)│
|
|
57
|
+
│
|
|
58
|
+
decisions-registry.json ◄──────────┘
|
|
59
|
+
└─ chunk_ids[]
|
|
60
|
+
└─ sources[] (knowledge files)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Validação
|
|
64
|
+
|
|
65
|
+
### Usando Python
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
import json
|
|
69
|
+
import jsonschema
|
|
70
|
+
|
|
71
|
+
# Load schema
|
|
72
|
+
with open('system/SCHEMAS/chunks-state.schema.json') as f:
|
|
73
|
+
schema = json.load(f)
|
|
74
|
+
|
|
75
|
+
# Load data
|
|
76
|
+
with open('artifacts/chunks/CHUNKS-STATE.json') as f:
|
|
77
|
+
data = json.load(f)
|
|
78
|
+
|
|
79
|
+
# Validate
|
|
80
|
+
jsonschema.validate(data, schema)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### CLI (se jsonschema instalado)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
python -m jsonschema -i CHUNKS-STATE.json chunks-state.schema.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Regras de Incremento
|
|
90
|
+
|
|
91
|
+
1. **Nunca deletar** - apenas adicionar ou marcar como deprecated
|
|
92
|
+
2. **Sempre validar** antes de salvar
|
|
93
|
+
3. **Incrementar version** em cada mudança
|
|
94
|
+
4. **Manter change_log** para auditoria
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "canonical-map.schema.json",
|
|
4
|
+
"title": "Canonical Map",
|
|
5
|
+
"description": "Schema for CANONICAL-MAP.json - entity resolution and alias mapping",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["canonical_state"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"canonical_state": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["canonical_map", "rules", "version"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"canonical_map": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"$ref": "#/definitions/alias"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"rules": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"threshold_merge": {
|
|
26
|
+
"type": "number",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 1
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"version": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"review_queue": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/definitions/review_item"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"collisions": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"$ref": "#/definitions/collision"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"definitions": {
|
|
51
|
+
"alias": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["alias", "confidence"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"alias": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"confidence": {
|
|
59
|
+
"type": "number",
|
|
60
|
+
"minimum": 0,
|
|
61
|
+
"maximum": 1
|
|
62
|
+
},
|
|
63
|
+
"source_id": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Where this alias was first found"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"review_item": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["candidate_a", "candidate_b", "confidence"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"candidate_a": {"type": "string"},
|
|
74
|
+
"candidate_b": {"type": "string"},
|
|
75
|
+
"confidence": {"type": "number"},
|
|
76
|
+
"reason": {"type": "string"},
|
|
77
|
+
"scope": {"type": "string"},
|
|
78
|
+
"corpus": {"type": "string"}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"collision": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": ["label", "term", "seen_in"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"label": {"type": "string"},
|
|
86
|
+
"term": {"type": "string"},
|
|
87
|
+
"seen_in": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {"type": "string"}
|
|
90
|
+
},
|
|
91
|
+
"recommendation": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": ["keep_separate", "merge_manual"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|