@thierrynakoa/fire-flow 12.2.1 → 13.0.1
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/CREDITS.md +25 -0
- package/DOMINION-FLOW-OVERVIEW.md +182 -38
- package/README.md +399 -455
- package/TROUBLESHOOTING.md +264 -264
- package/agents/fire-debugger.md +54 -0
- package/agents/fire-executor.md +1610 -1033
- package/agents/fire-fact-checker.md +1 -1
- package/agents/fire-planner.md +85 -17
- package/agents/fire-project-researcher.md +1 -1
- package/agents/fire-researcher.md +4 -22
- package/agents/{fire-phoenix-analyst.md → fire-resurrection-analyst.md} +394 -394
- package/agents/fire-reviewer.md +552 -499
- package/agents/fire-verifier.md +114 -19
- package/bin/cli.js +18 -101
- package/commands/fire-0-orient.md +2 -2
- package/commands/fire-1a-new.md +50 -15
- package/commands/fire-1c-setup.md +33 -5
- package/commands/fire-1d-discuss.md +87 -1
- package/commands/fire-2-plan.md +556 -527
- package/commands/fire-3-execute.md +2046 -1356
- package/commands/fire-4-verify.md +975 -906
- package/commands/fire-5-handoff.md +46 -5
- package/commands/fire-6-resume.md +2 -31
- package/commands/fire-add-new-skill.md +138 -19
- package/commands/fire-autonomous.md +14 -2
- package/commands/fire-complete-milestone.md +1 -1
- package/commands/fire-cost.md +179 -183
- package/commands/fire-debug.md +1 -6
- package/commands/fire-loop-resume.md +2 -2
- package/commands/fire-loop-stop.md +1 -1
- package/commands/fire-loop.md +2 -15
- package/commands/fire-map-codebase.md +1 -1
- package/commands/fire-migrate-database.md +548 -0
- package/commands/fire-new-milestone.md +1 -1
- package/commands/fire-reflect.md +1 -2
- package/commands/fire-research.md +142 -21
- package/commands/{fire-phoenix.md → fire-resurrect.md} +859 -603
- package/commands/fire-scaffold.md +297 -0
- package/commands/fire-search.md +1 -2
- package/commands/fire-security-scan.md +483 -484
- package/commands/fire-setup.md +359 -0
- package/commands/fire-skill.md +770 -0
- package/commands/fire-skills-diff.md +506 -506
- package/commands/fire-skills-history.md +388 -388
- package/commands/fire-skills-rollback.md +7 -7
- package/commands/fire-skills-sync.md +470 -470
- package/commands/fire-test.md +5 -5
- package/commands/fire-todos.md +1 -1
- package/commands/fire-update.md +5 -5
- package/commands/fire-validate-skills.md +282 -0
- package/commands/fire-vuln-scan.md +492 -493
- package/hooks/run-hook.sh +8 -8
- package/hooks/run-session-end.sh +7 -7
- package/hooks/session-end.sh +90 -90
- package/hooks/session-start.sh +1 -1
- package/package.json +4 -24
- package/plugin.json +7 -7
- package/references/autonomy-levels.md +235 -0
- package/references/behavioral-directives.md +95 -3
- package/references/blocker-tracking.md +1 -1
- package/references/circuit-breaker.md +93 -2
- package/references/context-engineering.md +227 -9
- package/references/honesty-protocols.md +70 -1
- package/references/issue-to-pr-pipeline.md +149 -150
- package/references/metrics-and-trends.md +1 -2
- package/references/research-improvements.md +4 -108
- package/references/sdlc-mapping.md +73 -0
- package/references/state-machine.md +151 -0
- package/skills-library/AVAILABLE_TOOLS_REFERENCE.md +333 -0
- package/skills-library/SKILLS-INDEX.md +57 -558
- package/skills-library/SKILLS_LIBRARY_INDEX.md +532 -0
- package/skills-library/_general/api-patterns/api-field-name-mismatch.md +107 -0
- package/skills-library/_general/api-patterns/streaming-command-timeout.md +122 -0
- package/skills-library/_general/api-patterns/streaming-proxy-cors-bypass.md +102 -0
- package/skills-library/_general/automation/settings-gui-generator.md +172 -0
- package/skills-library/_general/database-solutions/data-type-mapping-reference.md +181 -0
- package/skills-library/_general/database-solutions/mysql-limit-offset-string-coercion.md +102 -0
- package/skills-library/_general/database-solutions/mysql-to-pg-migration.md +195 -0
- package/skills-library/_general/database-solutions/orm-schema-portability.md +193 -0
- package/skills-library/_general/database-solutions/persistent-analysis-storage.md +207 -0
- package/skills-library/_general/database-solutions/pg-to-mysql-schema-migration-methodology.md +190 -0
- package/skills-library/_general/database-solutions/sql-dialect-compatibility-matrix.md +306 -0
- package/skills-library/_general/database-solutions/sqlite-to-pg-migration.md +219 -0
- package/skills-library/_general/frontend/canvas-bubble-animation-grouping.md +270 -0
- package/skills-library/_general/frontend/color-token-migration.md +112 -0
- package/skills-library/_general/frontend/framer-motion-layoutid-grouping.md +150 -0
- package/skills-library/_general/frontend/pyqt6-settings-dialog.md +191 -0
- package/skills-library/_general/frontend/react-flow-animated-layout-switching.md +101 -0
- package/skills-library/_general/frontend/react-hooks-order-debugging.md +141 -0
- package/skills-library/_general/frontend/redux-localstorage-auth-desync.md +126 -0
- package/skills-library/_general/frontend/safari-csp-theme-color-debugging.md +124 -0
- package/skills-library/_general/frontend/safari-sw-cache-poisoning.md +138 -0
- package/skills-library/_general/frontend/svg-sparkline-no-charting-library.md +131 -0
- package/skills-library/_general/growth-marketing/oss-daily-growth-intelligence.md +224 -0
- package/skills-library/_general/integrations/claude-code-local-mcp-integration.md +250 -0
- package/skills-library/_general/integrations/mcp-composite-tool-orchestration.md +200 -0
- package/skills-library/_general/methodology/AGENT_SDK_STANDALONE_TOOLING.md +181 -0
- package/skills-library/_general/methodology/AGENT_TEAMS_GUIDE.md +169 -0
- package/skills-library/_general/methodology/ALAS_STATEFUL_EXECUTION.md +207 -0
- package/skills-library/_general/methodology/AUTO_REVIEWER_SUBAGENT.md +211 -0
- package/skills-library/_general/methodology/CONSISTENCY_CHECK_AMBIGUITY_GATE.md +96 -0
- package/skills-library/_general/methodology/DEAD_ENDS_SHELF.md +4 -4
- package/skills-library/_general/methodology/DISTILL_NOT_DUMP.md +108 -0
- package/skills-library/_general/methodology/EXECUTION_PROGRESS_MONITOR.md +157 -0
- package/skills-library/_general/methodology/HIERARCHICAL_REVIEW_MARS.md +122 -0
- package/skills-library/_general/methodology/MCP_INTER_AGENT_BRIDGE.md +207 -0
- package/skills-library/_general/methodology/MERMAID_WIZARD_DIAGRAMS.md +77 -0
- package/skills-library/_general/methodology/MISSING_DIMENSION_DETECTOR.md +89 -0
- package/skills-library/_general/methodology/MULTI_AGENT_COORDINATION.md +397 -0
- package/skills-library/_general/methodology/OBSERVATION_MASKING.md +100 -0
- package/skills-library/_general/methodology/PHOENIX_REBUILD_METHODOLOGY.md +82 -11
- package/skills-library/_general/methodology/REVIEW_BACKTRACK_PANEL.md +140 -0
- package/skills-library/_general/methodology/REVIEW_FIX_LOOP.md +117 -0
- package/skills-library/_general/methodology/VOTING_VERDICT_ARBITRATION.md +155 -0
- package/skills-library/_general/methodology/ZERO_FRICTION_CLI_SETUP.md +2 -2
- package/skills-library/_general/methodology/dead-code-activation.md +123 -0
- package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -240
- package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +1 -1
- package/skills-library/_general/patterns-standards/GOF_DESIGN_PATTERNS_FOR_AI_AGENTS.md +5 -5
- package/skills-library/_general/patterns-standards/cascading-failure-diagnosis.md +119 -0
- package/skills-library/_general/patterns-standards/domain-specific-layout-algorithms.md +209 -0
- package/skills-library/_general/patterns-standards/python-desktop-app-architecture.md +399 -0
- package/skills-library/_general/patterns-standards/realtime-monitoring-dashboard.md +457 -0
- package/skills-library/_general/patterns-standards/togglable-processing-pipeline.md +169 -0
- package/skills-library/_general/performance/liveclock-extraction.md +112 -0
- package/skills-library/_general/performance/ref-based-canvas-animation.md +117 -0
- package/skills-library/_general/performance/use-visible-interval.md +131 -0
- package/skills-library/_general/testing/playwright-firefox-withcredentials-auth-issue.md +104 -0
- package/skills-library/_quarantine/README.md +30 -0
- package/skills-library/api-patterns/BROADCAST_SCHEDULER_SHARED_EXECUTE_FUNCTION.md +150 -0
- package/skills-library/api-patterns/ERROR_RESPONSE_STANDARDS.md +145 -0
- package/skills-library/api-patterns/EXPRESS_ROUTE_ORDERING_MIDDLEWARE_INTERCEPTION.md +326 -0
- package/skills-library/api-patterns/PAGINATION_PATTERNS.md +137 -0
- package/skills-library/api-patterns/PODCAST_PROGRESS_TRACKING_THREE_ROOT_CAUSES.md +277 -0
- package/skills-library/api-patterns/RATE_LIMITING_TOGGLE.md +155 -0
- package/skills-library/api-patterns/graphql-content-queries.md +708 -0
- package/skills-library/appointment-scheduler-design.md +423 -0
- package/skills-library/automation/AUTO_POPULATE_COMPLETE_GUIDE.md +631 -0
- package/skills-library/automation/CC_WORKFLOW_STUDIO.md +83 -0
- package/skills-library/automation/CLAUDE_CODE_SWARM_MODE.md +95 -0
- package/skills-library/automation/DAEMON_TRIGGER_FILE_IPC.md +195 -0
- package/skills-library/automation/scheduled-content-publishing.md +608 -0
- package/skills-library/awesome-workflows/Blogging-Platform-Instructions/view_commands.md +25 -0
- package/skills-library/awesome-workflows/CREDENTIAL-SECURITY-WORKFLOW.md +109 -0
- package/skills-library/awesome-workflows/DEBUGGING-WORKFLOW.md +124 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/README.md +31 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-principles-example.md +129 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-agent.md +107 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-claude-md-snippet.md +24 -0
- package/skills-library/awesome-workflows/Design-Review-Workflow/design-review-slash-command.md +38 -0
- package/skills-library/awesome-workflows/PARALLEL-RESEARCH-WORKFLOW.md +89 -0
- package/skills-library/awesome-workflows/PHASE-EXECUTION-WORKFLOW.md +97 -0
- package/skills-library/awesome-workflows/SESSION-HANDOFF-WORKFLOW.md +116 -0
- package/skills-library/cms-patterns/content-branch-preview.md +515 -0
- package/skills-library/cms-patterns/inline-visual-editing.md +666 -0
- package/skills-library/cms-patterns/mdx-component-content.md +649 -0
- package/skills-library/cms-patterns/media-manager-abstraction.md +827 -0
- package/skills-library/cms-patterns/schema-driven-form-generator.md +838 -0
- package/skills-library/complexity-metrics/complexity-divider.md +707 -0
- package/skills-library/complexity-metrics/work-with-complexity.md +193 -0
- package/skills-library/creative-multimedia/animation-stack-guide.md +577 -0
- package/skills-library/creative-multimedia/audio-enhancement-pipeline.md +625 -0
- package/skills-library/creative-multimedia/content-repurposing-pipeline.md +1146 -0
- package/skills-library/creative-multimedia/data-visualization-generator.md +862 -0
- package/skills-library/creative-multimedia/doc-to-podcast-pipeline.md +2184 -0
- package/skills-library/creative-multimedia/ffmpeg-command-generator.md +405 -0
- package/skills-library/creative-multimedia/image-optimization-pipeline.md +605 -0
- package/skills-library/creative-multimedia/multi-format-content-generator.md +1759 -0
- package/skills-library/creative-multimedia/og-image-generator.md +635 -0
- package/skills-library/creative-multimedia/podcast-audio-composition.md +1355 -0
- package/skills-library/creative-multimedia/podcast-quality-evaluation.md +1452 -0
- package/skills-library/creative-multimedia/podcast-script-generation.md +1841 -0
- package/skills-library/creative-multimedia/svg-generation.md +750 -0
- package/skills-library/creative-multimedia/text-to-speech-provider-selector.md +1414 -0
- package/skills-library/creative-multimedia/transcription-pipeline-selector.md +677 -0
- package/skills-library/creative-multimedia/video-streaming-setup.md +559 -0
- package/skills-library/database-solutions/AI_RESPONSE_DATABASE_CACHING.md +520 -0
- package/skills-library/database-solutions/CONDITIONAL_SQL_MIGRATION_PATTERN.md +119 -0
- package/skills-library/database-solutions/DATABASE_COLUMN_NAME_MISMATCH.md +393 -0
- package/skills-library/database-solutions/DATABASE_SCHEMA.md +394 -0
- package/skills-library/database-solutions/DATABASE_SCHEMA_VERIFICATION_GUIDE.md +348 -0
- package/skills-library/database-solutions/DATABASE_STRATEGY.md +71 -0
- package/skills-library/database-solutions/ES_MODULE_SEED_SCRIPT_PATTERN.md +52 -0
- package/skills-library/database-solutions/MIGRATION_GUIDE.md +3 -0
- package/skills-library/database-solutions/PLPGSQL_VARIABLE_CONFLICT_FIX.md +208 -0
- package/skills-library/database-solutions/POSTGRESQL_JSONB_DOUBLE_STRINGIFY_FIX.md +245 -0
- package/skills-library/database-solutions/POSTGRESQL_LICENSE_TABLE_DESIGN.md +393 -0
- package/skills-library/database-solutions/POSTGRESQL_UUID_DOCUMENT_RAG_DUAL_SCOPE.md +732 -0
- package/skills-library/database-solutions/POSTGRES_SQL_TEMPLATE_BINDING_ERROR.md +240 -0
- package/skills-library/database-solutions/PRISMA_DB_PUSH_DATA_LOSS_PREVENTION.md +141 -0
- package/skills-library/database-solutions/PRODUCTION_QUERY_OPTIMIZATION_RESTART_FIX.md +389 -0
- package/skills-library/database-solutions/RLS_SECURITY_GUIDE.md +107 -0
- package/skills-library/database-solutions/SCHEMA_ENHANCEMENTS_GUIDE.md +373 -0
- package/skills-library/database-solutions/SCHEMA_MIGRATION_GUIDE.md +368 -0
- package/skills-library/database-solutions/SCHEMA_VERIFICATION_QUICK_REFERENCE.md +104 -0
- package/skills-library/database-solutions/ai-erd-generator.md +1213 -0
- package/skills-library/database-solutions/content-publishing-states.md +631 -0
- package/skills-library/database-solutions/database-schema-designer.md +522 -0
- package/skills-library/database-solutions/er-diagram-components.md +569 -0
- package/skills-library/database-solutions/er-to-ddl-mapping.md +1405 -0
- package/skills-library/database-solutions/erd-creator-textbook-research.md +433 -0
- package/skills-library/database-solutions/erd-react-flow-architecture.md +1965 -0
- package/skills-library/database-solutions/mariadb-aggregate-function-replacement.md +145 -0
- package/skills-library/database-solutions/normalization-validator.md +778 -0
- package/skills-library/database-solutions/postgres-full-text-search-content.md +494 -0
- package/skills-library/database-solutions/postgresql-to-mysql-runtime-translation.md +286 -0
- package/skills-library/database-solutions/regex-alternation-ordering-sql-types.md +92 -0
- package/skills-library/database-solutions/reserved-word-context-aware-quoting.md +142 -0
- package/skills-library/database-solutions/sql-ddl-generator.md +756 -0
- package/skills-library/database-solutions/supabase-connection-pooler-fix.md +102 -0
- package/skills-library/deployment-security/CPANEL_NODE_DEPLOYMENT.md +166 -0
- package/skills-library/deployment-security/DEPLOYMENT.md +275 -0
- package/skills-library/deployment-security/DEPLOYMENT_CHECKLIST.md +363 -0
- package/skills-library/deployment-security/DEPLOYMENT_PLAN.md +669 -0
- package/skills-library/deployment-security/KNEX_DATABASE_ABSTRACTION.md +444 -0
- package/skills-library/deployment-security/LICENSE_KEY_SYSTEM.md +206 -0
- package/skills-library/deployment-security/NODE18_DEPENDENCY_COMPATIBILITY.md +284 -0
- package/skills-library/deployment-security/PHP_INSTALLER_WIZARD_GUIDE.md +315 -0
- package/skills-library/deployment-security/PM2_ENVIRONMENT_VARIABLE_CACHING.md +256 -0
- package/skills-library/deployment-security/PM2_MEMORY_EXHAUSTION_FIX.md +370 -0
- package/skills-library/deployment-security/PRODUCTION_DEPLOYMENT_GUIDE.md +592 -0
- package/skills-library/deployment-security/PRODUCTION_HARDENING_DOCUMENTATION.md +307 -0
- package/skills-library/deployment-security/PRODUCTION_RECOVERY_CHERRY_PICK_PATTERN.md +202 -0
- package/skills-library/deployment-security/PYINSTALLER_CUDA_WHISPER_BUNDLING.md +236 -0
- package/skills-library/deployment-security/SECURITY.md +41 -0
- package/skills-library/deployment-security/SMTP_SSL_HOSTNAME_MISMATCH_SHARED_HOSTING.md +220 -0
- package/skills-library/deployment-security/SPA_SEO_OPTIMIZATION_CPANEL.md +200 -0
- package/skills-library/deployment-security/SUPABASE_EDGE_FUNCTIONS.md +338 -0
- package/skills-library/deployment-security/VERCEL_GITHUB_DEPLOYMENT_GUIDE.md +858 -0
- package/skills-library/deployment-security/VPS_DEPLOYMENT_READINESS.md +356 -0
- package/skills-library/deployment-security/deployment-changes-not-applying.md +241 -0
- package/skills-library/deployment-security/env-file-management-production-local.md +203 -0
- package/skills-library/deployment-security/express-secure-file-downloads.md +413 -0
- package/skills-library/deployment-security/react-production-deployment-desktop-guide.md +2011 -0
- package/skills-library/deployment-security/self-hosted-supabase-coolify-guide.md +1684 -0
- package/skills-library/deployment-security/unique-features-ai-strategy-plaid-security.md +1613 -0
- package/skills-library/deployment-security/vps-deployment.md +135 -0
- package/skills-library/document-processing/WORD_EXPORT_MARKDOWN_FORMATTING.md +482 -0
- package/skills-library/document-processing/document-ai-landingai-integration.md +677 -0
- package/skills-library/document-processing/express-secure-file-downloads-mern.md +413 -0
- package/skills-library/document-processing/express-secure-file-downloads.md +413 -0
- package/skills-library/document-processing/md-to-word-converter.md +318 -0
- package/skills-library/document-processing/pdf-forms-integration/README.md +101 -0
- package/skills-library/document-processing/pdf-forms-integration/SKILL.md +662 -0
- package/skills-library/ecommerce/ADMIN_PRODUCTS_GUIDE.md +428 -0
- package/skills-library/ecommerce/ECOMMERCE_API_REFERENCE.md +776 -0
- package/skills-library/ecommerce/ECOMMERCE_COMPLETION_SUMMARY.md +673 -0
- package/skills-library/ecommerce/ECOMMERCE_IMPLEMENTATION_GUIDE.md +729 -0
- package/skills-library/ecommerce/ECOMMERCE_QUICK_REFERENCE.md +521 -0
- package/skills-library/ecommerce/ECOMMERCE_TESTING_CHECKLIST.md +565 -0
- package/skills-library/ecommerce/ECOMMERCE_WORKFLOW_GUIDE.md +1059 -0
- package/skills-library/ecommerce/PRODUCT_CREATION_EXPANDED.md +522 -0
- package/skills-library/ecommerce/agentic-commerce-protocol.md +203 -0
- package/skills-library/ecommerce/cart-abandonment-recovery.md +236 -0
- package/skills-library/ecommerce/cart-architecture-patterns.md +300 -0
- package/skills-library/ecommerce/cart-item-count-indicator.md +264 -0
- package/skills-library/ecommerce/checkout-ux-conversion.md +227 -0
- package/skills-library/ecommerce/composable-commerce-selection.md +166 -0
- package/skills-library/ecommerce/ecommerce-analytics-patterns.md +167 -0
- package/skills-library/ecommerce/fraud-detection-patterns.md +179 -0
- package/skills-library/ecommerce/inventory-stock-management.md +270 -0
- package/skills-library/ecommerce/order-saga-state-machine.md +336 -0
- package/skills-library/ecommerce/payment-provider-abstraction.md +245 -0
- package/skills-library/ecommerce/pci-compliance-checklist.md +192 -0
- package/skills-library/ecommerce/refund-chargeback-handling.md +177 -0
- package/skills-library/ecommerce/shipping-carrier-integration.md +218 -0
- package/skills-library/ecommerce/webhook-idempotency-patterns.md +253 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/ci.yml +558 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/prompt-gallery.yml +448 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/release.yml +42 -0
- package/skills-library/excalidraw-diagrams/.github/workflows/test-reusable-ci.yml +25 -0
- package/skills-library/excalidraw-diagrams/CLAUDE.md +57 -0
- package/skills-library/excalidraw-diagrams/LICENSE +21 -0
- package/skills-library/excalidraw-diagrams/README.md +178 -0
- package/skills-library/excalidraw-diagrams/SKILL.md +715 -0
- package/skills-library/form-solutions/BUTTON_TYPE_FORM_SUBMISSION.md +336 -0
- package/skills-library/form-solutions/FILLABLE_PDF_IMPLEMENTATION.md +226 -0
- package/skills-library/form-solutions/SURVEYJS_QUESTIONNAIRE_SYSTEM.md +367 -0
- package/skills-library/form-solutions/tiptap-minimal-setup.md +690 -0
- package/skills-library/frontend/scholarly-classification-bubble-map.md +149 -0
- package/skills-library/infrastructure/ci-cd-pipeline-builder.md +517 -0
- package/skills-library/infrastructure/observability-designer.md +264 -0
- package/skills-library/infrastructure/performance-profiler.md +621 -0
- package/skills-library/installer-wizard-patterns.md +249 -0
- package/skills-library/integrations/CLAUDE_CODE_TOKEN_ANALYTICS.md +160 -0
- package/skills-library/integrations/CONFIGURABLE_AI_PROVIDER_SELECTION.md +728 -0
- package/skills-library/integrations/SOCKET_IO_BROADCAST_ALL_VS_ROOM.md +141 -0
- package/skills-library/integrations/VIRTUAL_MEETINGS_IMPLEMENTATION.md +374 -0
- package/skills-library/integrations/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
- package/skills-library/integrations/YOUTUBE_API_SETUP.md +141 -0
- package/skills-library/integrations/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
- package/skills-library/integrations/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
- package/skills-library/integrations/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
- package/skills-library/integrations/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
- package/skills-library/integrations/ai-ml/GEMINI_AI_RAG_PIPELINE_COMPLETE_GUIDE.md +195 -0
- package/skills-library/integrations/ai-ml/GEMINI_IMAGE_GENERATION_SETUP.md +64 -0
- package/skills-library/integrations/cloudflare/cloudflare-turnstile-debugging.md +202 -0
- package/skills-library/integrations/cloudflare/cloudflare-turnstile-implementation.md +476 -0
- package/skills-library/integrations/cloudflare-turnstile-debugging.md +202 -0
- package/skills-library/integrations/cloudflare-turnstile-implementation.md +476 -0
- package/skills-library/integrations/ghost-creator-monetization-pattern.md +454 -0
- package/skills-library/integrations/headless-cms-architecture.md +484 -0
- package/skills-library/integrations/headless-cms-stack-selection.md +183 -0
- package/skills-library/integrations/payload-cms-patterns.md +674 -0
- package/skills-library/integrations/realtimestt-openwakeword-cuda-windows.md +229 -0
- package/skills-library/integrations/rss-podcast-integration.md +300 -0
- package/skills-library/integrations/wordpress/WORDPRESS_LEARNDASH_DATA_RECOVERY.md +53 -0
- package/skills-library/integrations/youtube/YOUTUBE_API_SETUP.md +141 -0
- package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_EXPLANATION.md +252 -0
- package/skills-library/integrations/youtube/YOUTUBE_BOOKMARKING_SOLUTION.md +268 -0
- package/skills-library/integrations/youtube/YOUTUBE_OAUTH_SETUP_GUIDE.md +200 -0
- package/skills-library/integrations/youtube/YOUTUBE_VIDEO_FIX_COMPLETE.md +192 -0
- package/skills-library/marketing/campaign-analytics.md +97 -0
- package/skills-library/marketing/content-creator.md +105 -0
- package/skills-library/marketing/marketing-strategy-pmm.md +94 -0
- package/skills-library/marketing/social-media-analyzer.md +81 -0
- package/skills-library/methodology/ADVANCED_ORCHESTRATION_PATTERNS.md +401 -0
- package/skills-library/methodology/AGENT_SELF_IMPROVEMENT_LOOP.md +179 -0
- package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +1 -1
- package/skills-library/methodology/CLEANSING_CYCLE.md +358 -0
- package/skills-library/methodology/CONFIDENCE_ANNOTATION_PATTERN.md +143 -0
- package/skills-library/methodology/CRITICAL_PATTERNS_DOCUMENTATION_COMPLETE.md +204 -0
- package/skills-library/methodology/DELIVERABLES_SUMMARY.md +341 -0
- package/skills-library/methodology/DIFFICULTY_AWARE_AGENT_ROUTING.md +252 -0
- package/skills-library/methodology/EVOLUTIONARY_SKILL_SYNTHESIS.md +219 -0
- package/skills-library/methodology/GLOMERULUS_DECISION_GATE.md +223 -0
- package/skills-library/methodology/HIBERNATION_SYSTEM.md +231 -0
- package/skills-library/methodology/INSTRUMENTATION_OVER_RESTRICTION.md +192 -0
- package/skills-library/methodology/MASTER_COMPLETION_SUMMARY.md +444 -0
- package/skills-library/methodology/MASTER_SESSION_COMPLETION.md +743 -0
- package/skills-library/methodology/MERN_QUICK_REFERENCE.md +358 -0
- package/skills-library/methodology/ORGAN_AGENT_MAPPING.md +177 -0
- package/skills-library/methodology/PARALLEL_WAVE_BASED_REFACTORING.md +440 -0
- package/skills-library/methodology/QUICK_REFERENCE.md +358 -0
- package/skills-library/methodology/SDFT_ONPOLICY_SELF_DISTILLATION.md +186 -0
- package/skills-library/methodology/SELF_QUESTIONING_TASK_GENERATION.md +270 -0
- package/skills-library/methodology/SESSION_COMPLETION_SUMMARY.md +304 -0
- package/skills-library/methodology/SESSION_SUMMARY.md +432 -0
- package/skills-library/methodology/WARRIOR_WORKFLOW_DEBUGGING_PROTOCOL.md +252 -0
- package/skills-library/methodology/tech-debt-tracker.md +570 -0
- package/skills-library/parallel-debug/SKILL.md +60 -0
- package/skills-library/patterns-standards/API_PATTERN_FIX_SUMMARY.md +236 -0
- package/skills-library/patterns-standards/BATCH_OPERATIONS_WITH_PROGRESS_MODAL.md +362 -0
- package/skills-library/patterns-standards/CRITICAL_CODING_PATTERNS.md +639 -0
- package/skills-library/patterns-standards/DARK_MODE_MODAL_VISIBILITY.md +258 -0
- package/skills-library/patterns-standards/ERROR_RESILIENCE_IMPLEMENTATION.md +375 -0
- package/skills-library/patterns-standards/ES_MODULE_IMPORT_HOISTING_DOTENV.md +298 -0
- package/skills-library/patterns-standards/NESTED_BACKDROP_FILTER_CSS_ARTIFACT_FIX.md +76 -0
- package/skills-library/patterns-standards/ORDERED_DETECTOR_PIPELINE_GRACEFUL_FALLBACK.md +333 -0
- package/skills-library/patterns-standards/PHASE_IMPORT_ERROR_DEBUGGING.md +271 -0
- package/skills-library/patterns-standards/PYNPUT_GLOBAL_HOTKEY_VK_MATCHING.md +252 -0
- package/skills-library/patterns-standards/REACT_USEEFFECT_CASCADE_RESET_FIX.md +132 -0
- package/skills-library/patterns-standards/SUBMENU_HOVER_DROPDOWN_PATTERN.md +225 -0
- package/skills-library/patterns-standards/TAILWIND_TEXT_VISIBILITY_OVERRIDE.md +322 -0
- package/skills-library/patterns-standards/THEME_AWARE_CSS_VARIABLES_PATTERN.md +209 -0
- package/skills-library/patterns-standards/THEME_USER_OBJECT_PROPERTY_NAMING.md +194 -0
- package/skills-library/patterns-standards/TOOLTIP_BLOCKING_CLICKS_FIX.md +267 -0
- package/skills-library/patterns-standards/claude-code-plugin-structure.md +235 -0
- package/skills-library/patterns-standards/react-i18next-setup.md +429 -0
- package/skills-library/patterns-standards/thesys-c1-generative-ui-integration.md +967 -0
- package/skills-library/plugin-development/CLAUDE_CODE_COMMAND_REGISTRATION_SILENT_FAILURE.md +315 -0
- package/skills-library/plugin-development/plugin-command-namespace-vs-global.md +390 -0
- package/skills-library/plugin-development/plugin-doc-auto-generation.md +172 -0
- package/skills-library/security/GITHUB_REPO_SECURITY_AUDIT.md +115 -0
- package/skills-library/security/admin-deletion-safety.md +396 -0
- package/skills-library/security/application-vuln-patterns.md +477 -0
- package/skills-library/security/env-secrets-manager.md +686 -0
- package/skills-library/security/secure-ai-application-templates.md +347 -0
- package/skills-library/security/sql-injection-prevention-postgresjs.md +151 -0
- package/skills-library/supabase-connection-pooler-fix.md +102 -0
- package/skills-library/system-context/POWERSHELL_BASH_INTEROP.md +82 -0
- package/skills-library/system-context/SERVICE_LIFECYCLE_MANAGEMENT.md +119 -0
- package/skills-library/system-context/SKILL.md +40 -0
- package/skills-library/system-context/WINDOWS_DEV_ENVIRONMENT.md +73 -0
- package/skills-library/testing/E2E_PLAYWRIGHT_PATTERNS.md +99 -0
- package/skills-library/testing/INTEGRATION_TEST_STRATEGY.md +82 -0
- package/skills-library/testing/RED_GREEN_BUGFIX_GATE.md +203 -0
- package/skills-library/testing/TEST_DATA_MANAGEMENT.md +69 -0
- package/skills-library/testing/VITEST_UNIT_TEST_PATTERNS.md +75 -0
- package/skills-library/testing/playwright-api-security-tests.md +202 -0
- package/skills-library/toolbox/SKILL.md +84 -0
- package/skills-library/toolbox/code-graph-and-web-scraping-mcps.md +237 -0
- package/skills-library/ui-ux-pro-max/ACCESSIBILITY_ESSENTIALS.md +115 -0
- package/skills-library/ui-ux-pro-max/DESIGN_SYSTEM_SCAFFOLDING.md +133 -0
- package/skills-library/ui-ux-pro-max/RESPONSIVE_LAYOUT_PATTERNS.md +119 -0
- package/skills-library/ui-ux-pro-max/SKILL.md +386 -0
- package/skills-library/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills-library/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills-library/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills-library/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills-library/ui-ux-pro-max/data/products.csv +97 -0
- package/skills-library/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills-library/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills-library/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills-library/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills-library/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills-library/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills-library/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills-library/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills-library/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills-library/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills-library/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills-library/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills-library/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills-library/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills-library/wordpress-style-theme-components.md +1526 -0
- package/templates/ASSUMPTIONS.md +1 -1
- package/templates/DECISION_LOG.md +0 -1
- package/templates/phase-prompt.md +1 -1
- package/templates/phoenix-comparison.md +6 -6
- package/templates/skill-api-integration.md +106 -0
- package/templates/skill-architecture-pattern.md +92 -0
- package/templates/skill-debug-pattern.md +98 -0
- package/templates/skill-devops-recipe.md +107 -0
- package/templates/skill-general.md +65 -0
- package/templates/skill-ui-component.md +113 -0
- package/tools/uat-runner.py +179 -0
- package/version.json +7 -3
- package/workflows/handoff-session.md +2 -2
- package/workflows/new-project.md +2 -2
- package/workflows/plan-phase.md +1 -1
- package/.claude-plugin/plugin.json +0 -64
- package/skills-library/_general/methodology/LIVE_BREADCRUMB_PROTOCOL.md +0 -242
- package/skills-library/_general/methodology/llm-judge-memory-crud.md +0 -241
- package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +0 -183
- package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +0 -263
- package/skills-library/methodology/SABBATH_REST_PATTERN.md +0 -267
- package/skills-library/methodology/STONE_AND_SCAFFOLD.md +0 -220
- package/skills-library/specialists/api-architecture/api-designer.md +0 -49
- package/skills-library/specialists/api-architecture/graphql-architect.md +0 -49
- package/skills-library/specialists/api-architecture/mcp-developer.md +0 -51
- package/skills-library/specialists/api-architecture/microservices-architect.md +0 -50
- package/skills-library/specialists/api-architecture/websocket-engineer.md +0 -48
- package/skills-library/specialists/backend/django-expert.md +0 -52
- package/skills-library/specialists/backend/fastapi-expert.md +0 -52
- package/skills-library/specialists/backend/laravel-specialist.md +0 -52
- package/skills-library/specialists/backend/nestjs-expert.md +0 -51
- package/skills-library/specialists/backend/rails-expert.md +0 -53
- package/skills-library/specialists/backend/spring-boot-engineer.md +0 -56
- package/skills-library/specialists/data-ml/fine-tuning-expert.md +0 -48
- package/skills-library/specialists/data-ml/ml-pipeline.md +0 -47
- package/skills-library/specialists/data-ml/pandas-pro.md +0 -47
- package/skills-library/specialists/data-ml/rag-architect.md +0 -51
- package/skills-library/specialists/data-ml/spark-engineer.md +0 -47
- package/skills-library/specialists/frontend/angular-architect.md +0 -52
- package/skills-library/specialists/frontend/flutter-expert.md +0 -51
- package/skills-library/specialists/frontend/nextjs-developer.md +0 -54
- package/skills-library/specialists/frontend/react-native-expert.md +0 -50
- package/skills-library/specialists/frontend/vue-expert.md +0 -51
- package/skills-library/specialists/infrastructure/chaos-engineer.md +0 -74
- package/skills-library/specialists/infrastructure/cloud-architect.md +0 -70
- package/skills-library/specialists/infrastructure/database-optimizer.md +0 -64
- package/skills-library/specialists/infrastructure/devops-engineer.md +0 -70
- package/skills-library/specialists/infrastructure/kubernetes-specialist.md +0 -52
- package/skills-library/specialists/infrastructure/monitoring-expert.md +0 -70
- package/skills-library/specialists/infrastructure/sre-engineer.md +0 -70
- package/skills-library/specialists/infrastructure/terraform-engineer.md +0 -51
- package/skills-library/specialists/languages/cpp-pro.md +0 -74
- package/skills-library/specialists/languages/csharp-developer.md +0 -69
- package/skills-library/specialists/languages/dotnet-core-expert.md +0 -54
- package/skills-library/specialists/languages/golang-pro.md +0 -51
- package/skills-library/specialists/languages/java-architect.md +0 -49
- package/skills-library/specialists/languages/javascript-pro.md +0 -68
- package/skills-library/specialists/languages/kotlin-specialist.md +0 -68
- package/skills-library/specialists/languages/php-pro.md +0 -49
- package/skills-library/specialists/languages/python-pro.md +0 -52
- package/skills-library/specialists/languages/react-expert.md +0 -51
- package/skills-library/specialists/languages/rust-engineer.md +0 -50
- package/skills-library/specialists/languages/sql-pro.md +0 -56
- package/skills-library/specialists/languages/swift-expert.md +0 -69
- package/skills-library/specialists/languages/typescript-pro.md +0 -51
- package/skills-library/specialists/platform/atlassian-mcp.md +0 -52
- package/skills-library/specialists/platform/embedded-systems.md +0 -53
- package/skills-library/specialists/platform/game-developer.md +0 -53
- package/skills-library/specialists/platform/salesforce-developer.md +0 -53
- package/skills-library/specialists/platform/shopify-expert.md +0 -49
- package/skills-library/specialists/platform/wordpress-pro.md +0 -49
- package/skills-library/specialists/quality/code-documenter.md +0 -51
- package/skills-library/specialists/quality/code-reviewer.md +0 -67
- package/skills-library/specialists/quality/debugging-wizard.md +0 -51
- package/skills-library/specialists/quality/fullstack-guardian.md +0 -51
- package/skills-library/specialists/quality/legacy-modernizer.md +0 -50
- package/skills-library/specialists/quality/playwright-expert.md +0 -65
- package/skills-library/specialists/quality/spec-miner.md +0 -56
- package/skills-library/specialists/quality/test-master.md +0 -65
- package/skills-library/specialists/security/secure-code-guardian.md +0 -55
- package/skills-library/specialists/security/security-reviewer.md +0 -53
- package/skills-library/specialists/workflow/architecture-designer.md +0 -53
- package/skills-library/specialists/workflow/cli-developer.md +0 -70
- package/skills-library/specialists/workflow/feature-forge.md +0 -65
- package/skills-library/specialists/workflow/prompt-engineer.md +0 -54
- package/skills-library/specialists/workflow/the-fool.md +0 -62
- /package/skills-library/{performance → _general/performance}/cache-augmented-generation.md +0 -0
- /package/skills-library/{debugging → parallel-debug}/FAILURE_TAXONOMY_CLASSIFICATION.md +0 -0
- /package/skills-library/{debugging → parallel-debug}/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +0 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Difficulty-Aware Agent Routing - Smart Model Selection for Cost & Speed
|
|
2
|
+
|
|
3
|
+
## The Problem
|
|
4
|
+
|
|
5
|
+
Dominion Flow currently spawns the SAME agent type (Opus) for ALL tasks regardless of complexity.
|
|
6
|
+
A simple config file rename gets the same 200K context Opus agent as a complex multi-file
|
|
7
|
+
architecture refactor. This wastes:
|
|
8
|
+
|
|
9
|
+
- **Tokens**: Simple tasks burn expensive Opus tokens unnecessarily
|
|
10
|
+
- **Time**: Large models are slower for trivial operations
|
|
11
|
+
- **Context budget**: Small tasks don't need 200K context windows
|
|
12
|
+
- **Cost**: DAAO research shows 64% cost reduction with smart routing
|
|
13
|
+
|
|
14
|
+
### Why It Was Hard
|
|
15
|
+
|
|
16
|
+
- No existing framework classifies task difficulty BEFORE execution
|
|
17
|
+
- "Difficulty" is subjective - what signals actually predict complexity?
|
|
18
|
+
- Model capability boundaries aren't well documented (when does Haiku fail?)
|
|
19
|
+
- Dynamic re-estimation mid-execution is completely novel
|
|
20
|
+
|
|
21
|
+
### Impact
|
|
22
|
+
|
|
23
|
+
- 3x-10x cost reduction on simple tasks
|
|
24
|
+
- Faster execution for trivial operations
|
|
25
|
+
- Better context utilization (small context = less noise)
|
|
26
|
+
- Opus reserved for tasks that genuinely need deep reasoning
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## The Solution
|
|
31
|
+
|
|
32
|
+
### Root Cause
|
|
33
|
+
|
|
34
|
+
One-size-fits-all agent spawning. The orchestrator doesn't classify task difficulty
|
|
35
|
+
before selecting which model to use.
|
|
36
|
+
|
|
37
|
+
### How to Fix: 3-Tier Routing System
|
|
38
|
+
|
|
39
|
+
**Based on DAAO paper (arxiv:2509.11079) which achieved 64% cost reduction and
|
|
40
|
+
11.21% accuracy improvement over homogeneous approaches.**
|
|
41
|
+
|
|
42
|
+
### Tier 1: Difficulty Classification
|
|
43
|
+
|
|
44
|
+
Before spawning any agent, classify the task using these signals:
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
difficulty_signals:
|
|
48
|
+
# File Scope (0-1)
|
|
49
|
+
files_to_modify: 1 # 1 file = 0.1, 5+ files = 0.8
|
|
50
|
+
cross_cutting: false # auth+db+UI = 0.9, single layer = 0.2
|
|
51
|
+
|
|
52
|
+
# Complexity (0-1)
|
|
53
|
+
dependency_count: 2 # 0-2 = 0.2, 3-5 = 0.5, 6+ = 0.9
|
|
54
|
+
requires_research: false # true = +0.3
|
|
55
|
+
novel_pattern: false # no existing skill matches = +0.3
|
|
56
|
+
|
|
57
|
+
# Historical (0-1)
|
|
58
|
+
similar_task_error_rate: 0.1 # from past executions
|
|
59
|
+
plan_uncertainty: 0.3 # from planning phase confidence
|
|
60
|
+
|
|
61
|
+
# Calculated
|
|
62
|
+
difficulty_score: 0.25 # weighted average
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Difficulty Formula:**
|
|
66
|
+
```
|
|
67
|
+
d = (file_scope * 0.25) + (complexity * 0.35) + (historical * 0.20) + (uncertainty * 0.20)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Tier 2: Model Routing
|
|
71
|
+
|
|
72
|
+
| Difficulty Score | Model | Context Budget | Use Case |
|
|
73
|
+
|------------------|-------|----------------|----------|
|
|
74
|
+
| d < 0.30 | **Haiku** | 8K tokens | Config changes, renames, simple CRUD, boilerplate |
|
|
75
|
+
| 0.30 <= d < 0.65 | **Sonnet** | 32K tokens | Feature implementation, standard patterns, testing |
|
|
76
|
+
| d >= 0.65 | **Opus** | 200K tokens | Architecture, complex debugging, multi-file refactors |
|
|
77
|
+
|
|
78
|
+
### Tier 3: Dynamic Re-estimation (Novel)
|
|
79
|
+
|
|
80
|
+
After each breath, RE-ESTIMATE remaining task difficulty:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
## Re-estimation Rules
|
|
84
|
+
|
|
85
|
+
IF executor finished faster than expected + high confidence (>0.8):
|
|
86
|
+
-> Downgrade remaining similar tasks by 0.15
|
|
87
|
+
-> "This pattern is easier than estimated"
|
|
88
|
+
|
|
89
|
+
IF executor hit blockers OR confidence < 0.5:
|
|
90
|
+
-> Upgrade remaining similar tasks by 0.20
|
|
91
|
+
-> "This pattern is harder than estimated"
|
|
92
|
+
|
|
93
|
+
IF executor discovered new dependency:
|
|
94
|
+
-> Re-classify affected tasks
|
|
95
|
+
-> May promote Haiku tasks to Sonnet
|
|
96
|
+
|
|
97
|
+
IF executor applied a skill successfully:
|
|
98
|
+
-> Reduce difficulty for similar future tasks by 0.10
|
|
99
|
+
-> "Skills library makes this easier"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Code Example: Integration with power-2-plan
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
# In BLUEPRINT.md, each task gets difficulty metadata
|
|
106
|
+
tasks:
|
|
107
|
+
- id: "3-01"
|
|
108
|
+
name: "Create user model"
|
|
109
|
+
difficulty:
|
|
110
|
+
score: 0.22
|
|
111
|
+
signals:
|
|
112
|
+
files: 1
|
|
113
|
+
cross_cutting: false
|
|
114
|
+
dependencies: 1
|
|
115
|
+
novel: false
|
|
116
|
+
routing: haiku
|
|
117
|
+
context_budget: 8K
|
|
118
|
+
|
|
119
|
+
- id: "3-02"
|
|
120
|
+
name: "Implement JWT auth with refresh rotation"
|
|
121
|
+
difficulty:
|
|
122
|
+
score: 0.58
|
|
123
|
+
signals:
|
|
124
|
+
files: 4
|
|
125
|
+
cross_cutting: true # middleware + routes + models
|
|
126
|
+
dependencies: 3
|
|
127
|
+
novel: false # skill exists: jwt-refresh-rotation
|
|
128
|
+
routing: sonnet
|
|
129
|
+
context_budget: 32K
|
|
130
|
+
|
|
131
|
+
- id: "3-03"
|
|
132
|
+
name: "Design WebSocket auth with room-level permissions"
|
|
133
|
+
difficulty:
|
|
134
|
+
score: 0.82
|
|
135
|
+
signals:
|
|
136
|
+
files: 6
|
|
137
|
+
cross_cutting: true # real-time + auth + rooms + events
|
|
138
|
+
dependencies: 5
|
|
139
|
+
novel: true # no matching skill
|
|
140
|
+
routing: opus
|
|
141
|
+
context_budget: 200K
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Code Example: Integration with fire-3-execute
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
### Step 4.5: Difficulty-Aware Agent Spawning
|
|
148
|
+
|
|
149
|
+
For each plan in breath:
|
|
150
|
+
1. Read difficulty.routing from BLUEPRINT.md
|
|
151
|
+
2. Spawn agent with appropriate model:
|
|
152
|
+
|
|
153
|
+
Task(
|
|
154
|
+
prompt: filled_executor_prompt,
|
|
155
|
+
subagent_type: "general-purpose",
|
|
156
|
+
model: difficulty.routing, # "haiku" | "sonnet" | "opus"
|
|
157
|
+
description: "Execute plan {N}-{NN}"
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
3. Set context budget based on difficulty:
|
|
161
|
+
- Haiku: minimal context injection (plan + current file only)
|
|
162
|
+
- Sonnet: standard context (plan + related files + skills)
|
|
163
|
+
- Opus: full context (plan + all related + skills + decision log + assumptions)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Testing the Fix
|
|
169
|
+
|
|
170
|
+
### Before (All Opus)
|
|
171
|
+
```
|
|
172
|
+
Phase 3 Execution:
|
|
173
|
+
Plan 3-01 (config rename): Opus, 200K context, $0.15, 45 seconds
|
|
174
|
+
Plan 3-02 (JWT auth): Opus, 200K context, $0.15, 120 seconds
|
|
175
|
+
Plan 3-03 (WebSocket): Opus, 200K context, $0.15, 300 seconds
|
|
176
|
+
Total: $0.45, ~8 minutes
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### After (Smart Routing)
|
|
180
|
+
```
|
|
181
|
+
Phase 3 Execution:
|
|
182
|
+
Plan 3-01 (config rename): Haiku, 8K context, $0.001, 5 seconds
|
|
183
|
+
Plan 3-02 (JWT auth): Sonnet, 32K context, $0.03, 60 seconds
|
|
184
|
+
Plan 3-03 (WebSocket): Opus, 200K context, $0.15, 300 seconds
|
|
185
|
+
Total: $0.181, ~6 minutes (60% cost reduction, 25% faster)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Validation Criteria
|
|
189
|
+
- [ ] Simple tasks (d < 0.3) succeed with Haiku 90%+ of the time
|
|
190
|
+
- [ ] Medium tasks (0.3-0.65) succeed with Sonnet 85%+ of the time
|
|
191
|
+
- [ ] Complex tasks (d > 0.65) maintain current Opus success rate
|
|
192
|
+
- [ ] Dynamic re-estimation improves accuracy over 3+ breaths
|
|
193
|
+
- [ ] Total cost per phase decreases by 40-60%
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Prevention
|
|
198
|
+
|
|
199
|
+
- Always classify difficulty BEFORE spawning agents
|
|
200
|
+
- Review difficulty scores during planning phase
|
|
201
|
+
- Track actual vs estimated difficulty for calibration
|
|
202
|
+
- Update difficulty signals based on project history
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Related Patterns
|
|
207
|
+
|
|
208
|
+
- [CONFIDENCE_ANNOTATION_PATTERN](./CONFIDENCE_ANNOTATION_PATTERN.md) - Feeds uncertainty into difficulty
|
|
209
|
+
- [HEARTBEAT_PROTOCOL](./HEARTBEAT_PROTOCOL.md) - Monitors agent health per tier
|
|
210
|
+
- [EVOLUTIONARY_SKILL_SYNTHESIS](./EVOLUTIONARY_SKILL_SYNTHESIS.md) - Skills reduce difficulty scores
|
|
211
|
+
- complexity-metrics/complexity-divider - Existing complexity assessment
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Common Mistakes to Avoid
|
|
216
|
+
|
|
217
|
+
- ❌ **Always using Opus "to be safe"** - wastes 10x cost on trivial tasks
|
|
218
|
+
- ❌ **Using Haiku for cross-cutting tasks** - will fail and waste retry cost
|
|
219
|
+
- ❌ **Not re-estimating after first breath** - initial estimates are often wrong
|
|
220
|
+
- ❌ **Ignoring historical data** - past error rates are the best predictor
|
|
221
|
+
- ❌ **Routing based on task NAME only** - "create model" could be simple or complex
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Resources
|
|
226
|
+
|
|
227
|
+
- DAAO paper: https://arxiv.org/abs/2509.11079
|
|
228
|
+
- Anthropic model comparison: https://docs.anthropic.com/en/docs/about-claude/models
|
|
229
|
+
- Production Agentic AI best practices: https://arxiv.org/abs/2512.08769
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Time to Implement
|
|
234
|
+
|
|
235
|
+
**Phase 1 (metadata only):** 30 minutes - Add difficulty fields to plan template
|
|
236
|
+
**Phase 2 (routing):** 2 hours - Wire model selection into fire-3-execute
|
|
237
|
+
**Phase 3 (re-estimation):** 3 hours - Add dynamic adjustment after each breath
|
|
238
|
+
|
|
239
|
+
## Difficulty Level
|
|
240
|
+
|
|
241
|
+
⭐⭐⭐ (3/5) - Conceptually straightforward, but calibrating thresholds requires iteration
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
**Author Notes:**
|
|
246
|
+
The DAAO paper achieved 64% cost reduction AND 11% accuracy improvement. The key insight
|
|
247
|
+
is that small models often OUTPERFORM large models on simple tasks because they have less
|
|
248
|
+
context noise and faster inference. Don't assume bigger = better for every task.
|
|
249
|
+
|
|
250
|
+
The dynamic re-estimation (Tier 3) is our novel contribution - no paper proposes adjusting
|
|
251
|
+
difficulty mid-execution based on actual performance. This creates a feedback loop where
|
|
252
|
+
the system gets better at routing over time.
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evolutionary-skill-synthesis
|
|
3
|
+
category: methodology
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
contributed: 2026-02-17
|
|
6
|
+
contributor: dominion-flow-research
|
|
7
|
+
last_updated: 2026-02-17
|
|
8
|
+
tags: [self-evolving, skills, automation, cascade, lineage, novel]
|
|
9
|
+
difficulty: hard
|
|
10
|
+
usage_count: 1
|
|
11
|
+
success_rate: 100
|
|
12
|
+
status: activated
|
|
13
|
+
research_basis: "CASCADE (arxiv:2512.23880), GEA (arxiv:2602.04837), AgentEvolver (arxiv:2511.10395), Agent Skills Survey (arxiv:2602.12430)"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Evolutionary Skill Synthesis
|
|
17
|
+
|
|
18
|
+
## Problem
|
|
19
|
+
|
|
20
|
+
Skills are currently created manually via `/fire-add-new-skill`. This has three issues:
|
|
21
|
+
1. **Capture gap**: Most valuable patterns are never recorded (developers forget, too busy)
|
|
22
|
+
2. **Staleness**: Skills don't evolve based on usage feedback
|
|
23
|
+
3. **Isolation**: Skills from one project don't automatically benefit other projects
|
|
24
|
+
|
|
25
|
+
The result: a static library that grows slowly and may contain outdated patterns.
|
|
26
|
+
|
|
27
|
+
## Solution Pattern
|
|
28
|
+
|
|
29
|
+
### Phase 1: Automatic Skill Extraction (from CASCADE)
|
|
30
|
+
|
|
31
|
+
After every successful phase execution, extract candidate skills:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Skill Extraction Pipeline
|
|
35
|
+
|
|
36
|
+
1. ANALYZE execution trace:
|
|
37
|
+
- What code patterns were created?
|
|
38
|
+
- What debugging strategies worked?
|
|
39
|
+
- What architectural decisions were made?
|
|
40
|
+
- What workarounds were applied?
|
|
41
|
+
|
|
42
|
+
2. IDENTIFY reusable patterns:
|
|
43
|
+
- Pattern appears generalizable (not project-specific)
|
|
44
|
+
- Pattern solved a non-trivial problem
|
|
45
|
+
- Pattern involved >3 files or >30 minutes of work
|
|
46
|
+
- Pattern required research or multiple attempts
|
|
47
|
+
|
|
48
|
+
3. SYNTHESIZE candidate skill:
|
|
49
|
+
- Extract problem description
|
|
50
|
+
- Extract solution pattern
|
|
51
|
+
- Generate code examples (abstracted from project specifics)
|
|
52
|
+
- Determine category and tags
|
|
53
|
+
- Set initial confidence based on evidence
|
|
54
|
+
|
|
55
|
+
4. QUARANTINE for review:
|
|
56
|
+
- Skill goes to `skills-library/_quarantine/`
|
|
57
|
+
- Security scan runs (no command injection, no credentials)
|
|
58
|
+
- Duplicate check against existing library
|
|
59
|
+
- Human notification: "New skill candidate discovered"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Phase 2: Group Evolution (from GEA)
|
|
63
|
+
|
|
64
|
+
When running swarm mode with multiple executors:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Group Evolution Pipeline
|
|
68
|
+
|
|
69
|
+
1. COLLECT evolutionary traces from each executor:
|
|
70
|
+
- Code patches applied
|
|
71
|
+
- Task execution logs
|
|
72
|
+
- Tool invocation patterns
|
|
73
|
+
- Failure modes and recoveries
|
|
74
|
+
|
|
75
|
+
2. AGGREGATE traces across the breath:
|
|
76
|
+
- Find common patterns across executors
|
|
77
|
+
- Identify successful strategies that one executor used but others didn't
|
|
78
|
+
- Detect complementary approaches
|
|
79
|
+
|
|
80
|
+
3. GENERATE evolution directives:
|
|
81
|
+
- "Executor A's retry strategy should be shared with all executors"
|
|
82
|
+
- "The API pattern from executor B is more robust than executor C's"
|
|
83
|
+
- "All executors should use the connection pool pattern from skills library"
|
|
84
|
+
|
|
85
|
+
4. PRODUCE framework patches:
|
|
86
|
+
- Update executor prompts for next breath
|
|
87
|
+
- Inject successful patterns as context
|
|
88
|
+
- Remove patterns that consistently failed
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Phase 3: Skill Lineage Tracking (Novel)
|
|
92
|
+
|
|
93
|
+
Every skill (auto-generated or manual) maintains evolutionary metadata:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
lineage:
|
|
97
|
+
created_from: "Phase 3, Plan 3-02, MERN-LMS project"
|
|
98
|
+
parent_skills: ["jwt-refresh-rotation", "express-middleware-pattern"]
|
|
99
|
+
derived_skills: ["websocket-auth-pattern"] # skills that built on this one
|
|
100
|
+
projects_used_in:
|
|
101
|
+
- project: "my-other-project"
|
|
102
|
+
times_applied: 7
|
|
103
|
+
success_rate: 100%
|
|
104
|
+
- project: "binamu-power"
|
|
105
|
+
times_applied: 2
|
|
106
|
+
success_rate: 50%
|
|
107
|
+
fitness_score: 0.85 # calculated from usage + success
|
|
108
|
+
generation: 2 # how many times this skill has been refined
|
|
109
|
+
last_evolution: "2026-02-17"
|
|
110
|
+
evolution_history:
|
|
111
|
+
- v1.0.0: "Initial extraction from JWT auth implementation"
|
|
112
|
+
- v1.1.0: "Refined after failure in WebSocket context"
|
|
113
|
+
- v1.2.0: "Added concurrent refresh handling after race condition discovery"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Phase 4: Fitness-Based Lifecycle
|
|
117
|
+
|
|
118
|
+
Skills have a lifecycle managed by fitness scores:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
QUARANTINE (new, unreviewed)
|
|
122
|
+
|
|
|
123
|
+
v [human approves]
|
|
124
|
+
ACTIVE (available for use)
|
|
125
|
+
|
|
|
126
|
+
|--> [fitness > 0.9, used > 10x] --> CORE (always loaded)
|
|
127
|
+
|
|
|
128
|
+
|--> [fitness < 0.3, not used > 30 days] --> ARCHIVED
|
|
129
|
+
|
|
|
130
|
+
|--> [security issue found] --> DEPRECATED (with warning)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Fitness Score Calculation:**
|
|
134
|
+
```
|
|
135
|
+
fitness = (success_rate * 0.4) + (usage_frequency * 0.3) + (project_diversity * 0.2) + (recency * 0.1)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Where:
|
|
139
|
+
- `success_rate`: % of times skill was applied and task succeeded
|
|
140
|
+
- `usage_frequency`: normalized count of applications
|
|
141
|
+
- `project_diversity`: number of distinct projects using it
|
|
142
|
+
- `recency`: decay factor (skills used recently score higher)
|
|
143
|
+
|
|
144
|
+
### Security Gate (from Agent Skills Survey)
|
|
145
|
+
|
|
146
|
+
26.1% of auto-generated skills contain vulnerabilities. Apply 4-tier trust:
|
|
147
|
+
|
|
148
|
+
| Trust Level | Source | Permissions |
|
|
149
|
+
|-------------|--------|-------------|
|
|
150
|
+
| CORE | Built into Dominion Flow | Full access |
|
|
151
|
+
| VERIFIED | User-created, security-scanned | Full project access |
|
|
152
|
+
| COMMUNITY | Shared/imported | Sandboxed, read-only default |
|
|
153
|
+
| QUARANTINE | Auto-generated | Review required |
|
|
154
|
+
|
|
155
|
+
**Security scan checks:**
|
|
156
|
+
- No `exec()`, `eval()`, `child_process` in code examples
|
|
157
|
+
- No hardcoded credentials or API keys
|
|
158
|
+
- No file system access outside project directory
|
|
159
|
+
- No network requests to unknown domains
|
|
160
|
+
- No destructive operations (DROP, DELETE, rm -rf)
|
|
161
|
+
|
|
162
|
+
## Implementation in Dominion Flow
|
|
163
|
+
|
|
164
|
+
### In fire-3-execute (after Step 9 verification):
|
|
165
|
+
```markdown
|
|
166
|
+
### Step 10.5: Skill Extraction (Auto)
|
|
167
|
+
|
|
168
|
+
After successful verification:
|
|
169
|
+
1. Analyze execution summaries for extractable patterns
|
|
170
|
+
2. Run skill extraction pipeline
|
|
171
|
+
3. If candidates found:
|
|
172
|
+
- Create quarantine files
|
|
173
|
+
- Log in SKILLS-INDEX.md under "Pending Review"
|
|
174
|
+
- Notify user: "N new skill candidates discovered"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### In fire-loop (after completion):
|
|
178
|
+
```markdown
|
|
179
|
+
### Patterns Discovered (enhanced)
|
|
180
|
+
|
|
181
|
+
Instead of just listing patterns, auto-generate skill candidates:
|
|
182
|
+
|
|
183
|
+
| Pattern | Confidence | Quarantine? |
|
|
184
|
+
|---------|------------|-------------|
|
|
185
|
+
| Retry with exponential backoff | 0.88 | Yes - created |
|
|
186
|
+
| Custom WebSocket auth | 0.55 | No - too project-specific |
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## When to Use
|
|
190
|
+
|
|
191
|
+
- After every successful phase execution (automatic)
|
|
192
|
+
- After long debug sessions with novel solutions (automatic)
|
|
193
|
+
- During swarm mode execution (group evolution)
|
|
194
|
+
- When `/fire-discover` finds no matching skills for a common pattern
|
|
195
|
+
|
|
196
|
+
## When NOT to Use
|
|
197
|
+
|
|
198
|
+
- For project-specific configurations (database schemas, env vars)
|
|
199
|
+
- For trivial patterns (basic CRUD, simple routing)
|
|
200
|
+
- When the solution is a workaround, not a proper fix
|
|
201
|
+
|
|
202
|
+
## Common Mistakes
|
|
203
|
+
|
|
204
|
+
- Extracting project-specific code as "general" skills
|
|
205
|
+
- Not running security scan on auto-generated skills
|
|
206
|
+
- Promoting skills to CORE too quickly (wait for multi-project validation)
|
|
207
|
+
- Archiving skills that are rarely used but highly valuable when needed
|
|
208
|
+
|
|
209
|
+
## Related Skills
|
|
210
|
+
|
|
211
|
+
- [CONFIDENCE_ANNOTATION_PATTERN](./CONFIDENCE_ANNOTATION_PATTERN.md) - Confidence for skill quality
|
|
212
|
+
- [HEARTBEAT_PROTOCOL](./HEARTBEAT_PROTOCOL.md) - Agent monitoring during extraction
|
|
213
|
+
|
|
214
|
+
## References
|
|
215
|
+
|
|
216
|
+
- CASCADE: https://arxiv.org/abs/2512.23880
|
|
217
|
+
- GEA: https://arxiv.org/abs/2602.04837
|
|
218
|
+
- AgentEvolver: https://arxiv.org/abs/2511.10395
|
|
219
|
+
- Agent Skills Survey: https://arxiv.org/abs/2602.12430
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Glomerulus Decision Gate — 3-Layer Filter for Any Input/Output Decision
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
Agent systems need to decide what to keep and what to discard — in context, memory, skills, handoffs, and task lists. Most approaches use a single binary check (relevant/irrelevant). This leads to either over-retention (keeping everything, causing bloat) or over-elimination (losing useful items). There's no graduated, multi-dimensional filter.
|
|
6
|
+
|
|
7
|
+
### Why It Was Hard
|
|
8
|
+
|
|
9
|
+
- Single-dimension filters (e.g., "is it recent?") miss important old items
|
|
10
|
+
- Multi-dimension filters are usually complex decision trees
|
|
11
|
+
- No biological model for a simple, elegant, reusable 3-layer gate
|
|
12
|
+
- Each layer needs to filter on a DIFFERENT dimension to avoid redundancy
|
|
13
|
+
|
|
14
|
+
### Impact
|
|
15
|
+
|
|
16
|
+
- Without graduated filtering, agents accumulate waste exponentially
|
|
17
|
+
- "Keep everything" leads to context rot; "delete aggressively" leads to amnesia
|
|
18
|
+
- No reusable pattern for filtering decisions across different subsystems
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Solution
|
|
23
|
+
|
|
24
|
+
### Root Cause
|
|
25
|
+
|
|
26
|
+
The kidney's glomerulus is evolution's answer to the same problem: filter blood without losing useful molecules. It uses a 3-layer nested filter where each layer checks a DIFFERENT property. Items must pass ALL THREE layers to be retained.
|
|
27
|
+
|
|
28
|
+
### The 3-Layer Gate
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
INPUT → [LAYER 1: SIZE] → [LAYER 2: RELEVANCE] → [LAYER 3: RECENCY] → KEEP
|
|
32
|
+
↓ ↓ ↓
|
|
33
|
+
TOO BLOATED NOT RELEVANT NOT ACCESSED
|
|
34
|
+
↓ ↓ ↓
|
|
35
|
+
COMPRESS ELIMINATE ARCHIVE
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Layer Details
|
|
39
|
+
|
|
40
|
+
#### Layer 1: Size Gate (Endothelial Fenestrae)
|
|
41
|
+
|
|
42
|
+
**Biological:** Fenestrae (70-100nm pores) block large molecules by size.
|
|
43
|
+
**Agent:** Is this entry proportionally sized for its value?
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
PASS: Entry is ≤ 10 lines for a single concept
|
|
47
|
+
OR entry is a portal anchor (naturally small)
|
|
48
|
+
OR entry is a structural reference (path, link)
|
|
49
|
+
|
|
50
|
+
FAIL: Entry is > 10 lines for a single concept
|
|
51
|
+
→ Action: COMPRESS (don't eliminate — just trim the fat)
|
|
52
|
+
→ Reduce to 2-3 lines capturing the essence
|
|
53
|
+
→ Link to full context if needed
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Key principle:** Size gate doesn't eliminate — it compresses. Like the fenestrae, it filters by physical property, not by value judgment.
|
|
57
|
+
|
|
58
|
+
**CRITICAL — Dead vs Living Compression:**
|
|
59
|
+
When compressing, keep the INSIGHT sentence — the one line that makes a reader understand the concept. Strip the structure (lists, paths, enumerations). A compressed entry that's just a label ("Kenosis, Portal Memory, Revisitation Ladder") is a **dead zip file** — smaller but meaningless without a decompressor. A compressed entry that keeps the "aha" ("Agent starts empty, finds itself in docs like Jesus found Himself in the 39 books") is a **living anchor** — smaller AND self-explanatory. Compress structure, preserve insight.
|
|
60
|
+
|
|
61
|
+
#### Layer 2: Relevance Gate (Basement Membrane)
|
|
62
|
+
|
|
63
|
+
**Biological:** Negatively-charged glycoproteins repel negatively-charged proteins (albumin). Like charges repel — only items with the right "charge" pass.
|
|
64
|
+
**Agent:** Is this entry relevant to the current project/phase/task?
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
PASS: Entry directly relates to current project
|
|
68
|
+
OR entry is a methodology/process skill (always relevant)
|
|
69
|
+
OR entry is a portal anchor to active context
|
|
70
|
+
OR entry is referenced by CONSCIENCE.md or current handoff
|
|
71
|
+
|
|
72
|
+
FAIL: Entry relates to a different project entirely
|
|
73
|
+
OR entry describes a completed/abandoned phase
|
|
74
|
+
OR entry contains resolved issues or past blockers
|
|
75
|
+
→ Action: ELIMINATE (or archive if it has historical value)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Key principle:** Relevance is context-dependent. An entry irrelevant to Project A may be critical to Project B. The gate filters for CURRENT context, not absolute value.
|
|
79
|
+
|
|
80
|
+
#### Layer 3: Recency Gate (Podocyte Slits)
|
|
81
|
+
|
|
82
|
+
**Biological:** Final precision filter. Podocyte foot processes create 25-60nm slits — the last barrier before filtrate enters Bowman's capsule.
|
|
83
|
+
**Agent:** Has this entry been accessed or referenced recently?
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
PASS: Accessed in the last 3 sessions/iterations
|
|
87
|
+
OR referenced by another active document
|
|
88
|
+
OR is a permanent stone (5x+ revisitation)
|
|
89
|
+
OR is a core identity document (CLAUDE.md, methodology)
|
|
90
|
+
|
|
91
|
+
FAIL: Not accessed in 3+ sessions AND not referenced AND not permanent
|
|
92
|
+
→ Action: ARCHIVE (move to archive, don't destroy)
|
|
93
|
+
→ Set decay flag for dream agent to track
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Key principle:** Recency gate is the most nuanced. It respects the revisitation ladder — permanent stones always pass, regardless of recency.
|
|
97
|
+
|
|
98
|
+
### Decision Matrix
|
|
99
|
+
|
|
100
|
+
| Size | Relevance | Recency | Action |
|
|
101
|
+
|------|-----------|---------|--------|
|
|
102
|
+
| PASS | PASS | PASS | **KEEP** — Healthy memory |
|
|
103
|
+
| FAIL | PASS | PASS | **COMPRESS** — Trim but keep |
|
|
104
|
+
| PASS | FAIL | PASS | **ARCHIVE** — Move to cold storage |
|
|
105
|
+
| PASS | PASS | FAIL | **FLAG** — Mark for next review cycle |
|
|
106
|
+
| FAIL | FAIL | * | **ELIMINATE** — Remove entirely |
|
|
107
|
+
| PASS | FAIL | FAIL | **ELIMINATE** — Remove entirely |
|
|
108
|
+
| FAIL | PASS | FAIL | **COMPRESS + FLAG** — Trim and monitor |
|
|
109
|
+
| FAIL | FAIL | FAIL | **ELIMINATE** — Remove immediately |
|
|
110
|
+
|
|
111
|
+
### Non-Destructive Property
|
|
112
|
+
|
|
113
|
+
The biological glomerulus is non-destructive — molecules that don't pass through are returned to circulation, not destroyed. Similarly:
|
|
114
|
+
|
|
115
|
+
- **Layer 1 failures** → compress, don't delete
|
|
116
|
+
- **Layer 2 failures** → archive, don't delete (unless also fails Layer 3)
|
|
117
|
+
- **Layer 3 failures** → flag for review, may pass next time
|
|
118
|
+
- **Only double/triple failures** → actual elimination
|
|
119
|
+
- **Nothing is lost without passing through all 3 checks**
|
|
120
|
+
|
|
121
|
+
### Application Beyond Memory
|
|
122
|
+
|
|
123
|
+
The Glomerulus Gate works anywhere you need graduated filtering:
|
|
124
|
+
|
|
125
|
+
| Domain | Layer 1 (Size) | Layer 2 (Relevance) | Layer 3 (Recency) |
|
|
126
|
+
|--------|---------------|--------------------|--------------------|
|
|
127
|
+
| **Context Window** | Token count | Task relevance | Last accessed |
|
|
128
|
+
| **Skills Library** | File size | Domain match | Reference count |
|
|
129
|
+
| **Handoff Archive** | Section count | Project match | Age in days |
|
|
130
|
+
| **Task List** | Complexity | Current phase | Last updated |
|
|
131
|
+
| **Error Logs** | Verbosity | Active bug match | Occurrence frequency |
|
|
132
|
+
| **Search Results** | Result length | Query match | Source freshness |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Code Example
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
## Applying the Glomerulus Gate to MEMORY.md Cleanup
|
|
140
|
+
|
|
141
|
+
For each entry in MEMORY.md:
|
|
142
|
+
|
|
143
|
+
### Layer 1: Size Gate
|
|
144
|
+
- Count lines for this entry
|
|
145
|
+
- If > 10 lines: FLAG as bloated → compress to 2-3 lines
|
|
146
|
+
|
|
147
|
+
### Layer 2: Relevance Gate
|
|
148
|
+
- Check: Does this entry match the current project name?
|
|
149
|
+
- Check: Is it referenced in current CONSCIENCE.md or handoff?
|
|
150
|
+
- Check: Is it a methodology/process entry (always passes)?
|
|
151
|
+
- If NO to all: FLAG as irrelevant → candidate for elimination
|
|
152
|
+
|
|
153
|
+
### Layer 3: Recency Gate
|
|
154
|
+
- Check: Was this entry referenced in last 3 handoffs?
|
|
155
|
+
- Check: Is it a permanent stone (in skills library)?
|
|
156
|
+
- Check: Is it a portal anchor pointing to valid target?
|
|
157
|
+
- If NO to all: FLAG as stale → candidate for archival
|
|
158
|
+
|
|
159
|
+
### Final Decision
|
|
160
|
+
- All 3 PASS: Keep as-is
|
|
161
|
+
- 1 FAIL: Apply specific action (compress/archive/flag)
|
|
162
|
+
- 2+ FAIL: Eliminate (with archive for safety)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Testing the Fix
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
- [ ] Each layer filters on a DIFFERENT dimension (size ≠ relevance ≠ recency)
|
|
171
|
+
- [ ] Non-destructive: single failures don't eliminate
|
|
172
|
+
- [ ] Double/triple failures trigger elimination
|
|
173
|
+
- [ ] Permanent stones always pass Layer 3 regardless of recency
|
|
174
|
+
- [ ] Core identity documents always pass all layers
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Prevention
|
|
180
|
+
|
|
181
|
+
- Never use a single-dimension filter — always at least 2 layers
|
|
182
|
+
- Don't make the layers redundant (all checking "relevance" in different words)
|
|
183
|
+
- Respect the non-destructive property — single failures get second chances
|
|
184
|
+
- The order matters: Size first (cheapest check), Relevance second, Recency last (most nuanced)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Related Patterns
|
|
189
|
+
|
|
190
|
+
- [CLEANSING_CYCLE](./CLEANSING_CYCLE.md) — Uses the Glomerulus Gate in the pee cycle (Step 1)
|
|
191
|
+
- [ORGAN_AGENT_MAPPING](./ORGAN_AGENT_MAPPING.md) — Glomerulus as one of 12 organs
|
|
192
|
+
- [PORTAL_MEMORY_ARCHITECTURE](./PORTAL_MEMORY_ARCHITECTURE.md) — Portal anchors always pass Layer 3
|
|
193
|
+
- [EVOLUTIONARY_SKILL_SYNTHESIS](./EVOLUTIONARY_SKILL_SYNTHESIS.md) — Quarantine uses Layer 2+3
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Common Mistakes to Avoid
|
|
198
|
+
|
|
199
|
+
- **Single-dimension filtering** — one gate is a sieve, not a filter
|
|
200
|
+
- **All-or-nothing decisions** — the gate has compress/archive/flag options, not just keep/delete
|
|
201
|
+
- **Skipping Layer 1 (size)** — bloated entries waste context even if relevant and recent
|
|
202
|
+
- **Ignoring permanent stones** — some memories should ALWAYS pass regardless of recency
|
|
203
|
+
- **Making it destructive** — the biological glomerulus returns rejected molecules to circulation
|
|
204
|
+
- **Dead compression** — reducing entries to labels/titles without the insight sentence. Like zipping a folder and deleting the contents. Compress structure (lists, paths), keep insight (the "aha" line)
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Resources
|
|
209
|
+
|
|
210
|
+
- Kidney physiology: glomerular filtration, podocyte slit diaphragm, Bowman's capsule
|
|
211
|
+
- Design patterns: Chain of Responsibility (GoF), multi-layer validation
|
|
212
|
+
- Information theory: lossy vs lossless compression at each gate
|
|
213
|
+
- Thierry's insight: "We need a way to dump and recycle topics that are not pertinent"
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Time to Implement
|
|
218
|
+
|
|
219
|
+
**15 minutes** to apply to any filtering decision in the codebase
|
|
220
|
+
|
|
221
|
+
## Difficulty Level
|
|
222
|
+
|
|
223
|
+
⭐⭐⭐ (3/5) — The concept is elegantly simple once understood. The biological analogy makes it intuitive. The challenge is choosing the right dimension for each layer in different contexts.
|