agileflow 4.0.0-alpha.2 → 4.0.0-alpha.21
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/CHANGELOG.md +51 -0
- package/content/plugins/accessibility/plugin.yaml +14 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/SKILL.md +392 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/references/aria-patterns.md +528 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/references/testing-checklist.md +457 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/references/wcag-guide.md +683 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/workflows/audit-page.md +310 -0
- package/content/plugins/accessibility/skills/agileflow-accessibility/workflows/implement-accessible-component.md +479 -0
- package/content/plugins/ads/agents/ads-audit-budget.md +185 -0
- package/content/plugins/ads/agents/ads-audit-compliance.md +171 -0
- package/content/plugins/ads/agents/ads-audit-creative.md +168 -0
- package/content/plugins/ads/agents/ads-audit-google.md +227 -0
- package/content/plugins/ads/agents/ads-audit-meta.md +184 -0
- package/content/plugins/ads/agents/ads-audit-tracking.md +205 -0
- package/content/plugins/ads/agents/ads-consensus.md +410 -0
- package/content/plugins/ads/agents/ads-generate.md +152 -0
- package/content/plugins/ads/agents/ads-performance-tracker.md +212 -0
- package/content/plugins/ads/plugin.yaml +23 -4
- package/content/plugins/ads/skills/agileflow-ads/SKILL.md +218 -0
- package/content/plugins/ads/skills/agileflow-ads/references/ad-copy-formula-guide.md +131 -0
- package/content/plugins/ads/skills/agileflow-ads/references/audience-targeting-guide.md +137 -0
- package/content/plugins/ads/skills/agileflow-ads/references/bid-strategy-guide.md +115 -0
- package/content/plugins/ads/skills/agileflow-ads/references/platform-benchmarks.md +100 -0
- package/content/plugins/ads/skills/agileflow-ads/workflows/audit.md +118 -0
- package/content/plugins/ads/skills/agileflow-ads/workflows/generate.md +84 -0
- package/content/plugins/audit/agents/a11y-analyzer-aria.md +173 -0
- package/content/plugins/audit/agents/a11y-analyzer-forms.md +173 -0
- package/content/plugins/audit/agents/a11y-analyzer-keyboard.md +183 -0
- package/content/plugins/audit/agents/a11y-analyzer-semantic.md +169 -0
- package/content/plugins/audit/agents/a11y-analyzer-visual.md +172 -0
- package/content/plugins/audit/agents/a11y-consensus.md +249 -0
- package/content/plugins/audit/agents/accessibility.md +558 -0
- package/content/plugins/audit/agents/api-quality-analyzer-conventions.md +156 -0
- package/content/plugins/audit/agents/api-quality-analyzer-docs.md +184 -0
- package/content/plugins/audit/agents/api-quality-analyzer-errors.md +191 -0
- package/content/plugins/audit/agents/api-quality-analyzer-pagination.md +179 -0
- package/content/plugins/audit/agents/api-quality-analyzer-versioning.md +150 -0
- package/content/plugins/audit/agents/api-quality-consensus.md +217 -0
- package/content/plugins/audit/agents/api-validator.md +191 -0
- package/content/plugins/audit/agents/arch-analyzer-circular.md +156 -0
- package/content/plugins/audit/agents/arch-analyzer-complexity.md +193 -0
- package/content/plugins/audit/agents/arch-analyzer-coupling.md +152 -0
- package/content/plugins/audit/agents/arch-analyzer-layering.md +160 -0
- package/content/plugins/audit/agents/arch-analyzer-patterns.md +210 -0
- package/content/plugins/audit/agents/arch-consensus.md +228 -0
- package/content/plugins/audit/agents/browser-qa.md +342 -0
- package/content/plugins/audit/agents/code-reviewer.md +298 -0
- package/content/plugins/audit/agents/completeness-analyzer-api.md +199 -0
- package/content/plugins/audit/agents/completeness-analyzer-conditional.md +211 -0
- package/content/plugins/audit/agents/completeness-analyzer-handlers.md +166 -0
- package/content/plugins/audit/agents/completeness-analyzer-imports.md +165 -0
- package/content/plugins/audit/agents/completeness-analyzer-routes.md +190 -0
- package/content/plugins/audit/agents/completeness-analyzer-state.md +196 -0
- package/content/plugins/audit/agents/completeness-analyzer-stubs.md +206 -0
- package/content/plugins/audit/agents/completeness-consensus.md +295 -0
- package/content/plugins/audit/agents/error-analyzer.md +213 -0
- package/content/plugins/audit/agents/flow-analyzer-authorization.md +182 -0
- package/content/plugins/audit/agents/flow-analyzer-discovery.md +174 -0
- package/content/plugins/audit/agents/flow-analyzer-errors.md +186 -0
- package/content/plugins/audit/agents/flow-analyzer-feedback.md +185 -0
- package/content/plugins/audit/agents/flow-analyzer-navigation.md +177 -0
- package/content/plugins/audit/agents/flow-analyzer-persistence.md +193 -0
- package/content/plugins/audit/agents/flow-analyzer-wiring.md +169 -0
- package/content/plugins/audit/agents/flow-consensus.md +237 -0
- package/content/plugins/audit/agents/legal-analyzer-a11y.md +114 -0
- package/content/plugins/audit/agents/legal-analyzer-ai.md +121 -0
- package/content/plugins/audit/agents/legal-analyzer-consumer.md +114 -0
- package/content/plugins/audit/agents/legal-analyzer-content.md +117 -0
- package/content/plugins/audit/agents/legal-analyzer-international.md +119 -0
- package/content/plugins/audit/agents/legal-analyzer-licensing.md +119 -0
- package/content/plugins/audit/agents/legal-analyzer-privacy.md +112 -0
- package/content/plugins/audit/agents/legal-analyzer-security.md +116 -0
- package/content/plugins/audit/agents/legal-analyzer-terms.md +115 -0
- package/content/plugins/audit/agents/legal-consensus.md +250 -0
- package/content/plugins/audit/agents/logic-analyzer-edge.md +179 -0
- package/content/plugins/audit/agents/logic-analyzer-flow.md +264 -0
- package/content/plugins/audit/agents/logic-analyzer-invariant.md +215 -0
- package/content/plugins/audit/agents/logic-analyzer-race.md +280 -0
- package/content/plugins/audit/agents/logic-analyzer-type.md +227 -0
- package/content/plugins/audit/agents/logic-consensus.md +259 -0
- package/content/plugins/audit/agents/perf-analyzer-assets.md +182 -0
- package/content/plugins/audit/agents/perf-analyzer-bundle.md +173 -0
- package/content/plugins/audit/agents/perf-analyzer-caching.md +170 -0
- package/content/plugins/audit/agents/perf-analyzer-compute.md +173 -0
- package/content/plugins/audit/agents/perf-analyzer-memory.md +193 -0
- package/content/plugins/audit/agents/perf-analyzer-network.md +165 -0
- package/content/plugins/audit/agents/perf-analyzer-queries.md +162 -0
- package/content/plugins/audit/agents/perf-analyzer-rendering.md +168 -0
- package/content/plugins/audit/agents/perf-consensus.md +287 -0
- package/content/plugins/audit/agents/qa.md +820 -0
- package/content/plugins/audit/agents/quality-analyzer-comments.md +159 -0
- package/content/plugins/audit/agents/quality-analyzer-duplication.md +184 -0
- package/content/plugins/audit/agents/quality-analyzer-naming.md +160 -0
- package/content/plugins/audit/agents/quality-consensus.md +241 -0
- package/content/plugins/audit/agents/schema-validator.md +473 -0
- package/content/plugins/audit/agents/security-analyzer-api.md +210 -0
- package/content/plugins/audit/agents/security-analyzer-auth.md +169 -0
- package/content/plugins/audit/agents/security-analyzer-authz.md +180 -0
- package/content/plugins/audit/agents/security-analyzer-deps.md +153 -0
- package/content/plugins/audit/agents/security-analyzer-infra.md +184 -0
- package/content/plugins/audit/agents/security-analyzer-injection.md +155 -0
- package/content/plugins/audit/agents/security-analyzer-input.md +201 -0
- package/content/plugins/audit/agents/security-analyzer-secrets.md +183 -0
- package/content/plugins/audit/agents/security-consensus.md +283 -0
- package/content/plugins/audit/agents/test-analyzer-assertions.md +188 -0
- package/content/plugins/audit/agents/test-analyzer-coverage.md +189 -0
- package/content/plugins/audit/agents/test-analyzer-fragility.md +193 -0
- package/content/plugins/audit/agents/test-analyzer-integration.md +161 -0
- package/content/plugins/audit/agents/test-analyzer-maintenance.md +180 -0
- package/content/plugins/audit/agents/test-analyzer-mocking.md +188 -0
- package/content/plugins/audit/agents/test-analyzer-patterns.md +196 -0
- package/content/plugins/audit/agents/test-analyzer-structure.md +184 -0
- package/content/plugins/audit/agents/test-consensus.md +301 -0
- package/content/plugins/audit/agents/testing.md +561 -0
- package/content/plugins/audit/agents/ui-validator.md +344 -0
- package/content/plugins/audit/plugin.yaml +186 -5
- package/content/plugins/audit/skills/agileflow-audit/SKILL.md +113 -0
- package/content/plugins/audit/skills/agileflow-audit/references/audit-depth-guide.md +151 -0
- package/content/plugins/audit/skills/agileflow-audit/references/dependency-risk-guide.md +139 -0
- package/content/plugins/audit/skills/agileflow-audit/references/owasp-top10.md +120 -0
- package/content/plugins/audit/skills/agileflow-audit/references/performance-budget-guide.md +143 -0
- package/content/plugins/audit/skills/agileflow-audit/references/wcag-criteria.md +117 -0
- package/content/plugins/audit/skills/agileflow-audit/workflows/run-audit.md +52 -0
- package/content/plugins/audit/skills/agileflow-audit/workflows/tdd.md +66 -0
- package/content/plugins/core/agents/adr-writer.md +521 -0
- package/content/plugins/core/agents/epic-planner.md +520 -0
- package/content/plugins/core/agents/mentor.md +709 -0
- package/content/plugins/core/agents/orchestrator.md +776 -0
- package/content/plugins/core/agents/team-coordinator.md +334 -0
- package/content/plugins/core/agents/team-lead.md +181 -0
- package/content/plugins/core/agents/workspace-orchestrator.md +146 -0
- package/content/plugins/core/hooks/context-loader.js +31 -4
- package/content/plugins/core/hooks/damage-control-bash.js +10 -2
- package/content/plugins/core/hooks/damage-control-edit.js +4 -1
- package/content/plugins/core/hooks/damage-control-patterns.yaml +1 -1
- package/content/plugins/core/hooks/damage-control-write.js +4 -1
- package/content/plugins/core/hooks/{pre-compact-state.js → post-compact-state.js} +25 -8
- package/content/plugins/core/hooks/preferences-injector.js +352 -0
- package/content/plugins/core/plugin.yaml +24 -28
- package/content/plugins/core/skills/agileflow-adr/SKILL.md +34 -8
- package/content/plugins/core/skills/agileflow-adr/references/madr-format-guide.md +86 -0
- package/content/plugins/core/skills/agileflow-adr/workflows/write-adr.md +57 -0
- package/content/plugins/core/skills/agileflow-babysit-mentor/SKILL.md +94 -27
- package/content/plugins/core/skills/agileflow-babysit-mentor/references/mentor-decision-guide.md +81 -0
- package/content/plugins/core/skills/agileflow-babysit-mentor/workflows/mentor-session.md +79 -0
- package/content/plugins/core/skills/agileflow-epic-planner/SKILL.md +37 -7
- package/content/plugins/core/skills/agileflow-epic-planner/references/epic-sizing-guide.md +81 -0
- package/content/plugins/core/skills/agileflow-epic-planner/workflows/plan-epic.md +55 -0
- package/content/plugins/core/skills/agileflow-status-updater/SKILL.md +36 -20
- package/content/plugins/core/skills/agileflow-status-updater/references/status-transitions.md +89 -0
- package/content/plugins/core/skills/agileflow-status-updater/workflows/update-status.md +56 -0
- package/content/plugins/core/skills/agileflow-story-writer/SKILL.md +39 -114
- package/content/plugins/core/skills/agileflow-story-writer/references/estimation-reference.md +36 -0
- package/content/plugins/core/skills/agileflow-story-writer/references/story-template.md +92 -0
- package/content/plugins/core/skills/agileflow-story-writer/workflows/write-story.md +138 -0
- package/content/plugins/council/agents/council-advocate.md +223 -0
- package/content/plugins/council/agents/council-analyst.md +278 -0
- package/content/plugins/council/agents/council-compounder.md +204 -0
- package/content/plugins/council/agents/council-contrarian.md +217 -0
- package/content/plugins/council/agents/council-moonshot.md +217 -0
- package/content/plugins/council/agents/council-optimist.md +185 -0
- package/content/plugins/council/agents/council-revenue.md +200 -0
- package/content/plugins/council/agents/council-technical.md +218 -0
- package/content/plugins/council/agents/multi-expert.md +334 -0
- package/content/plugins/council/plugin.yaml +23 -4
- package/content/plugins/council/skills/agileflow-council/SKILL.md +102 -0
- package/content/plugins/council/skills/agileflow-council/references/decision-log-template.md +109 -0
- package/content/plugins/council/skills/agileflow-council/references/perspective-guide.md +104 -0
- package/content/plugins/council/skills/agileflow-council/references/when-to-convene-guide.md +112 -0
- package/content/plugins/council/skills/agileflow-council/workflows/convene.md +73 -0
- package/content/plugins/council/skills/agileflow-council/workflows/multi-expert.md +75 -0
- package/content/plugins/database/plugin.yaml +14 -0
- package/content/plugins/database/skills/agileflow-database/SKILL.md +284 -0
- package/content/plugins/database/skills/agileflow-database/references/indexing-guide.md +313 -0
- package/content/plugins/database/skills/agileflow-database/references/migration-guide.md +328 -0
- package/content/plugins/database/skills/agileflow-database/references/schema-design-guide.md +467 -0
- package/content/plugins/database/skills/agileflow-database/workflows/design-schema.md +213 -0
- package/content/plugins/database/skills/agileflow-database/workflows/optimize-query.md +253 -0
- package/content/plugins/debugging/plugin.yaml +14 -0
- package/content/plugins/debugging/skills/agileflow-debug/SKILL.md +236 -0
- package/content/plugins/debugging/skills/agileflow-debug/references/common-patterns.md +350 -0
- package/content/plugins/debugging/skills/agileflow-debug/references/debugging-strategies.md +328 -0
- package/content/plugins/debugging/skills/agileflow-debug/workflows/debug-issue.md +187 -0
- package/content/plugins/debugging/skills/agileflow-debug/workflows/reproduce-bug.md +194 -0
- package/content/plugins/delivery/agents/ci.md +547 -0
- package/content/plugins/delivery/agents/devops.md +789 -0
- package/content/plugins/delivery/plugin.yaml +19 -0
- package/content/plugins/delivery/skills/agileflow-delivery/SKILL.md +111 -0
- package/content/plugins/delivery/skills/agileflow-delivery/references/changelog-format-guide.md +133 -0
- package/content/plugins/delivery/skills/agileflow-delivery/references/ci-pipeline-guide.md +158 -0
- package/content/plugins/delivery/skills/agileflow-delivery/references/pr-checklist-guide.md +133 -0
- package/content/plugins/delivery/skills/agileflow-delivery/references/release-checklist.md +142 -0
- package/content/plugins/delivery/skills/agileflow-delivery/workflows/changelog.md +72 -0
- package/content/plugins/delivery/skills/agileflow-delivery/workflows/deploy.md +74 -0
- package/content/plugins/delivery/skills/agileflow-delivery/workflows/pr.md +75 -0
- package/content/plugins/docs/agents/documentation.md +544 -0
- package/content/plugins/docs/agents/readme-updater.md +640 -0
- package/content/plugins/docs/plugin.yaml +19 -0
- package/content/plugins/docs/skills/agileflow-docs/SKILL.md +106 -0
- package/content/plugins/docs/skills/agileflow-docs/references/api-doc-template.md +167 -0
- package/content/plugins/docs/skills/agileflow-docs/references/doc-types-guide.md +141 -0
- package/content/plugins/docs/skills/agileflow-docs/references/readme-template.md +156 -0
- package/content/plugins/docs/skills/agileflow-docs/workflows/readme-sync.md +57 -0
- package/content/plugins/docs/skills/agileflow-docs/workflows/sync.md +64 -0
- package/content/plugins/engineering/agents/api.md +718 -0
- package/content/plugins/engineering/agents/codebase-query.md +285 -0
- package/content/plugins/engineering/agents/compliance.md +559 -0
- package/content/plugins/engineering/agents/database.md +644 -0
- package/content/plugins/engineering/agents/integrations.md +644 -0
- package/content/plugins/engineering/agents/mobile.md +552 -0
- package/content/plugins/engineering/agents/monitoring.md +585 -0
- package/content/plugins/engineering/agents/performance.md +529 -0
- package/content/plugins/engineering/agents/refactor.md +592 -0
- package/content/plugins/engineering/agents/security.md +524 -0
- package/content/plugins/engineering/agents/ui.md +1336 -0
- package/content/plugins/engineering/plugin.yaml +37 -0
- package/content/plugins/engineering/skills/agileflow-engineering/SKILL.md +127 -0
- package/content/plugins/engineering/skills/agileflow-engineering/references/code-review-guide.md +126 -0
- package/content/plugins/engineering/skills/agileflow-engineering/references/domain-routing-guide.md +89 -0
- package/content/plugins/engineering/skills/agileflow-engineering/references/refactoring-guide.md +136 -0
- package/content/plugins/engineering/skills/agileflow-engineering/workflows/diagnose.md +63 -0
- package/content/plugins/engineering/skills/agileflow-engineering/workflows/impact.md +60 -0
- package/content/plugins/ideation/agents/brainstorm-analyzer-features.md +179 -0
- package/content/plugins/ideation/agents/brainstorm-analyzer-growth.md +169 -0
- package/content/plugins/ideation/agents/brainstorm-analyzer-integration.md +181 -0
- package/content/plugins/ideation/agents/brainstorm-analyzer-market.md +150 -0
- package/content/plugins/ideation/agents/brainstorm-analyzer-ux.md +180 -0
- package/content/plugins/ideation/agents/brainstorm-consensus.md +245 -0
- package/content/plugins/ideation/agents/design.md +568 -0
- package/content/plugins/ideation/agents/product.md +582 -0
- package/content/plugins/ideation/plugin.yaml +31 -0
- package/content/plugins/ideation/skills/agileflow-ideation/SKILL.md +109 -0
- package/content/plugins/ideation/skills/agileflow-ideation/references/brainstorm-techniques.md +138 -0
- package/content/plugins/ideation/skills/agileflow-ideation/references/competitive-analysis-template.md +148 -0
- package/content/plugins/ideation/skills/agileflow-ideation/references/feature-prioritization-guide.md +147 -0
- package/content/plugins/ideation/skills/agileflow-ideation/references/user-story-patterns.md +152 -0
- package/content/plugins/ideation/skills/agileflow-ideation/workflows/features.md +65 -0
- package/content/plugins/ideation/skills/agileflow-ideation/workflows/ideate.md +54 -0
- package/content/plugins/migration/agents/datamigration.md +757 -0
- package/content/plugins/migration/plugin.yaml +17 -0
- package/content/plugins/migration/skills/agileflow-migration/SKILL.md +106 -0
- package/content/plugins/migration/skills/agileflow-migration/references/data-validation-checklist.md +154 -0
- package/content/plugins/migration/skills/agileflow-migration/references/migration-patterns.md +209 -0
- package/content/plugins/migration/skills/agileflow-migration/references/rollback-playbook.md +171 -0
- package/content/plugins/migration/skills/agileflow-migration/references/version-compatibility-matrix.md +155 -0
- package/content/plugins/migration/skills/agileflow-migration/workflows/plan.md +73 -0
- package/content/plugins/migration/skills/agileflow-migration/workflows/validate.md +71 -0
- package/content/plugins/performance/plugin.yaml +14 -0
- package/content/plugins/performance/skills/agileflow-performance/SKILL.md +224 -0
- package/content/plugins/performance/skills/agileflow-performance/references/optimization-patterns.md +554 -0
- package/content/plugins/performance/skills/agileflow-performance/references/profiling-guide.md +383 -0
- package/content/plugins/performance/skills/agileflow-performance/references/web-vitals-guide.md +360 -0
- package/content/plugins/performance/skills/agileflow-performance/workflows/improve-web-vitals.md +344 -0
- package/content/plugins/performance/skills/agileflow-performance/workflows/profile-and-fix.md +254 -0
- package/content/plugins/planning/agents/analytics.md +670 -0
- package/content/plugins/planning/agents/rlm-subcore.md +215 -0
- package/content/plugins/planning/plugin.yaml +19 -0
- package/content/plugins/planning/skills/agileflow-planning/SKILL.md +111 -0
- package/content/plugins/planning/skills/agileflow-planning/references/estimation-guide.md +114 -0
- package/content/plugins/planning/skills/agileflow-planning/references/rpi-workflow.md +119 -0
- package/content/plugins/planning/skills/agileflow-planning/references/sprint-planning-guide.md +145 -0
- package/content/plugins/planning/skills/agileflow-planning/workflows/impact.md +63 -0
- package/content/plugins/planning/skills/agileflow-planning/workflows/rpi.md +104 -0
- package/content/plugins/psychology/plugin.yaml +14 -0
- package/content/plugins/psychology/skills/agileflow-retention/SKILL.md +252 -0
- package/content/plugins/psychology/skills/agileflow-retention/references/competitor-analysis.md +240 -0
- package/content/plugins/psychology/skills/agileflow-retention/references/psychology-models.md +349 -0
- package/content/plugins/psychology/skills/agileflow-retention/references/retention-patterns.md +279 -0
- package/content/plugins/psychology/skills/agileflow-retention/workflows/design-retention-feature.md +287 -0
- package/content/plugins/psychology/skills/agileflow-retention/workflows/retention-audit.md +259 -0
- package/content/plugins/refactoring/plugin.yaml +14 -0
- package/content/plugins/refactoring/skills/agileflow-refactor/SKILL.md +235 -0
- package/content/plugins/refactoring/skills/agileflow-refactor/references/refactoring-patterns.md +405 -0
- package/content/plugins/refactoring/skills/agileflow-refactor/references/safety-checks.md +177 -0
- package/content/plugins/refactoring/skills/agileflow-refactor/workflows/extract-module.md +226 -0
- package/content/plugins/refactoring/skills/agileflow-refactor/workflows/safe-refactor.md +169 -0
- package/content/plugins/research/agents/research.md +503 -0
- package/content/plugins/research/plugin.yaml +17 -0
- package/content/plugins/research/skills/agileflow-research/SKILL.md +110 -0
- package/content/plugins/research/skills/agileflow-research/references/knowledge-decay-guide.md +121 -0
- package/content/plugins/research/skills/agileflow-research/references/research-prompt-guide.md +141 -0
- package/content/plugins/research/skills/agileflow-research/references/synthesis-template.md +154 -0
- package/content/plugins/research/skills/agileflow-research/workflows/analyze.md +60 -0
- package/content/plugins/research/skills/agileflow-research/workflows/ask.md +64 -0
- package/content/plugins/research/skills/agileflow-research/workflows/import.md +66 -0
- package/content/plugins/research/skills/agileflow-research/workflows/synthesize.md +66 -0
- package/content/plugins/reviews/plugin.yaml +14 -0
- package/content/plugins/reviews/skills/agileflow-pr-reviewer/SKILL.md +241 -0
- package/content/plugins/reviews/skills/agileflow-pr-reviewer/references/review-checklist.md +200 -0
- package/content/plugins/reviews/skills/agileflow-pr-reviewer/references/security-patterns.md +328 -0
- package/content/plugins/reviews/skills/agileflow-pr-reviewer/workflows/review-pr.md +153 -0
- package/content/plugins/reviews/skills/agileflow-pr-reviewer/workflows/security-review.md +177 -0
- package/content/plugins/seo/agents/seo-analyzer-content.md +169 -0
- package/content/plugins/seo/agents/seo-analyzer-images.md +198 -0
- package/content/plugins/seo/agents/seo-analyzer-performance.md +217 -0
- package/content/plugins/seo/agents/seo-analyzer-schema.md +184 -0
- package/content/plugins/seo/agents/seo-analyzer-sitemap.md +177 -0
- package/content/plugins/seo/agents/seo-analyzer-technical.md +151 -0
- package/content/plugins/seo/agents/seo-consensus.md +304 -0
- package/content/plugins/seo/plugin.yaml +19 -4
- package/content/plugins/seo/skills/agileflow-seo/SKILL.md +188 -0
- package/content/plugins/seo/skills/agileflow-seo/references/cwv-thresholds.md +110 -0
- package/content/plugins/seo/skills/agileflow-seo/references/eeat-framework.md +144 -0
- package/content/plugins/seo/skills/agileflow-seo/references/keyword-research-guide.md +125 -0
- package/content/plugins/seo/skills/agileflow-seo/references/schema-types.md +139 -0
- package/content/plugins/seo/skills/agileflow-seo/references/technical-seo-checklist.md +139 -0
- package/content/plugins/seo/skills/agileflow-seo/workflows/audit.md +98 -0
- package/content/plugins/seo/skills/agileflow-seo/workflows/page.md +118 -0
- package/content/plugins/testing/plugin.yaml +16 -0
- package/content/plugins/testing/skills/agileflow-test-writer/SKILL.md +260 -0
- package/content/plugins/testing/skills/agileflow-test-writer/references/coverage-targets.md +239 -0
- package/content/plugins/testing/skills/agileflow-test-writer/references/test-patterns.md +420 -0
- package/content/plugins/testing/skills/agileflow-test-writer/workflows/add-coverage.md +154 -0
- package/content/plugins/testing/skills/agileflow-test-writer/workflows/write-tests-from-ac.md +225 -0
- package/package.json +2 -2
- package/src/cli/commands/doctor.js +818 -30
- package/src/cli/commands/hook.js +17 -14
- package/src/cli/commands/launch.js +1454 -0
- package/src/cli/commands/learn.js +149 -0
- package/src/cli/commands/plugins.js +113 -0
- package/src/cli/commands/setup.js +455 -110
- package/src/cli/commands/skills.js +324 -0
- package/src/cli/commands/status.js +8 -10
- package/src/cli/commands/update.js +76 -15
- package/src/cli/index.js +90 -26
- package/src/cli/wizard/babysit-mode-picker.js +192 -0
- package/src/cli/wizard/behaviors-picker.js +208 -54
- package/src/cli/wizard/ide-picker.js +40 -28
- package/src/cli/wizard/install-scope-picker.js +57 -0
- package/src/cli/wizard/launch-alias-picker.js +50 -0
- package/src/cli/wizard/launch-cli-picker.js +129 -0
- package/src/cli/wizard/launch-tmux-picker.js +133 -0
- package/src/cli/wizard/learnings-picker.js +40 -0
- package/src/cli/wizard/plugin-picker.js +47 -16
- package/src/lib/brand.js +116 -0
- package/src/lib/errors.js +120 -0
- package/src/lib/path-check.js +39 -0
- package/src/runtime/config/defaults.js +22 -17
- package/src/runtime/config/loader.js +77 -8
- package/src/runtime/config/schema.json +43 -16
- package/src/runtime/config/writer.js +3 -1
- package/src/runtime/ide/babysit-skill.js +202 -0
- package/src/runtime/ide/capabilities.js +84 -29
- package/src/runtime/ide/claude-code-content.js +177 -0
- package/src/runtime/ide/claude-code-settings.js +67 -29
- package/src/runtime/ide/claude-code-skills.js +47 -32
- package/src/runtime/ide/codex-config.js +295 -0
- package/src/runtime/installer/install.js +252 -24
- package/src/runtime/launch/alias-installer.js +191 -0
- package/src/runtime/launch/cli-resume.js +244 -0
- package/src/runtime/launch/closed-windows.js +338 -0
- package/src/runtime/launch/defaults.js +66 -0
- package/src/runtime/launch/detect-clis.js +69 -0
- package/src/runtime/launch/doctor.js +464 -0
- package/src/runtime/launch/exec-wrapper.js +114 -0
- package/src/runtime/launch/parallel-session.js +247 -0
- package/src/runtime/launch/prefs.js +211 -0
- package/src/runtime/launch/project-prefs.js +234 -0
- package/src/runtime/launch/resolve-cli.js +56 -0
- package/src/runtime/launch/restore.js +152 -0
- package/src/runtime/launch/schema.json +75 -0
- package/src/runtime/launch/session-lifecycle.js +313 -0
- package/src/runtime/launch/session-registry.js +401 -0
- package/src/runtime/launch/spawn.js +103 -0
- package/src/runtime/launch/tabs.js +350 -0
- package/src/runtime/launch/tmux.js +764 -0
- package/src/runtime/launch/worktree.js +260 -0
- package/src/runtime/plugins/registry.js +16 -11
- package/src/runtime/plugins/validator.js +57 -43
- package/src/runtime/skills/learnings.js +308 -0
- package/content/plugins/core/hooks/babysit-mentor-injector.js +0 -55
- package/src/cli/wizard/personalization.js +0 -64
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-consensus
|
|
3
|
+
description: Consensus coordinator for quality audit - validates findings, computes per-dimension health scores, synthesizes cross-audit insights, and generates unified Code Quality Health Scorecard
|
|
4
|
+
tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
team_role: lead
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Quality Consensus Coordinator
|
|
10
|
+
|
|
11
|
+
You are the **consensus coordinator** for the Code Quality Audit system. Your job is to collect findings from style analyzers (naming, duplication, comments) and optionally cross-audit summaries (security, logic, architecture, test), compute per-dimension health scores, and produce a unified Code Quality Health Scorecard.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Your Responsibilities
|
|
16
|
+
|
|
17
|
+
1. **Detect project conventions** - Determine the project's language, framework, coding style, and conventions
|
|
18
|
+
2. **Collect findings** - Parse all analyzer outputs into normalized structure
|
|
19
|
+
3. **Filter by relevance** - Exclude findings that don't apply to the detected project type
|
|
20
|
+
4. **Vote on confidence** - Multiple analyzers flagging same area = higher confidence
|
|
21
|
+
5. **Compute dimension scores** - Calculate per-dimension health scores (0-100)
|
|
22
|
+
6. **Compute composite score** - Weighted average across all dimensions
|
|
23
|
+
7. **Generate scorecard** - Produce prioritized, actionable Code Quality Health Scorecard
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Consensus Process
|
|
28
|
+
|
|
29
|
+
### Step 1: Detect Project Conventions
|
|
30
|
+
|
|
31
|
+
Read the codebase to determine conventions. This affects which findings are relevant:
|
|
32
|
+
|
|
33
|
+
| Project Type | Indicators | Adjustments |
|
|
34
|
+
| --------------- | -------------------------------------- | --------------------------------------- |
|
|
35
|
+
| **TypeScript** | `.ts`/`.tsx` files, `tsconfig.json` | Stricter naming conventions expected |
|
|
36
|
+
| **JavaScript** | `.js`/`.jsx` files, no tsconfig | More lenient on naming |
|
|
37
|
+
| **React** | `jsx`/`tsx`, component files | PascalCase components, hook conventions |
|
|
38
|
+
| **Node.js CLI** | `bin/`, `commander`/`yargs` | Abbreviations more acceptable |
|
|
39
|
+
| **Library** | Public API surface, `index.ts` exports | JSDoc more important |
|
|
40
|
+
| **Monorepo** | `packages/`, `workspaces` | Cross-package duplication is OK |
|
|
41
|
+
|
|
42
|
+
### Step 2: Parse All Findings
|
|
43
|
+
|
|
44
|
+
Extract findings from each analyzer's output. Normalize into a common structure:
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
{
|
|
48
|
+
id: 'NAME-1',
|
|
49
|
+
analyzer: 'quality-analyzer-naming',
|
|
50
|
+
location: 'src/services/user-service.ts:15',
|
|
51
|
+
title: 'Generic name "data" for user records',
|
|
52
|
+
severity: 'SMELL',
|
|
53
|
+
confidence: 'HIGH',
|
|
54
|
+
category: 'Generic',
|
|
55
|
+
explanation: '...',
|
|
56
|
+
remediation: '...'
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 3: Group Related Findings
|
|
61
|
+
|
|
62
|
+
Find findings that reference the same module or area:
|
|
63
|
+
|
|
64
|
+
| Location | Naming | Duplication | Comments | Consensus |
|
|
65
|
+
| ---------------- | :----: | :---------: | :------: | --------- |
|
|
66
|
+
| user-service.ts | ! | ! | - | CONFIRMED |
|
|
67
|
+
| order-handler.ts | - | ! | ! | CONFIRMED |
|
|
68
|
+
|
|
69
|
+
### Step 4: Compute Dimension Scores
|
|
70
|
+
|
|
71
|
+
**Per-Dimension Score (0-100)**: Start at 100 and deduct:
|
|
72
|
+
|
|
73
|
+
| Finding Severity | Deduction per Finding |
|
|
74
|
+
| ---------------- | --------------------- |
|
|
75
|
+
| STRUCTURAL | -8 points |
|
|
76
|
+
| DEGRADED | -4 points |
|
|
77
|
+
| SMELL | -2 points |
|
|
78
|
+
| STYLE | -1 point |
|
|
79
|
+
|
|
80
|
+
Cap deductions per dimension at -40 to prevent one area from dominating.
|
|
81
|
+
|
|
82
|
+
### Step 5: Compute Composite Score
|
|
83
|
+
|
|
84
|
+
**Quick depth** (style only, 3 dimensions):
|
|
85
|
+
|
|
86
|
+
| Dimension | Weight |
|
|
87
|
+
| ----------- | ------ |
|
|
88
|
+
| Naming | 35% |
|
|
89
|
+
| Duplication | 35% |
|
|
90
|
+
| Comments | 30% |
|
|
91
|
+
|
|
92
|
+
**Deep depth** (style + cross-audits, 7 dimensions):
|
|
93
|
+
|
|
94
|
+
| Dimension | Weight |
|
|
95
|
+
| ------------ | ------ |
|
|
96
|
+
| Naming | 14% |
|
|
97
|
+
| Duplication | 14% |
|
|
98
|
+
| Comments | 12% |
|
|
99
|
+
| Security | 15% |
|
|
100
|
+
| Logic | 15% |
|
|
101
|
+
| Architecture | 15% |
|
|
102
|
+
| Test Quality | 15% |
|
|
103
|
+
|
|
104
|
+
### Step 6: Assign Grade
|
|
105
|
+
|
|
106
|
+
| Score | Grade | Meaning |
|
|
107
|
+
| ------ | ----- | ------------------------------------------------ |
|
|
108
|
+
| 90-100 | A | Excellent — clean, maintainable codebase |
|
|
109
|
+
| 80-89 | B | Good — minor issues, normal tech debt |
|
|
110
|
+
| 70-79 | C | Fair — growing quality problems |
|
|
111
|
+
| 60-69 | D | Poor — significant cleanup needed |
|
|
112
|
+
| <60 | F | Critical — quality actively impeding development |
|
|
113
|
+
|
|
114
|
+
### Step 7: Filter and Prioritize
|
|
115
|
+
|
|
116
|
+
Remove findings that don't apply. Common false positive scenarios:
|
|
117
|
+
|
|
118
|
+
- **Small projects**: High relative duplication is normal in <20 file projects
|
|
119
|
+
- **CLI tools**: Strict JSDoc is less critical than in libraries
|
|
120
|
+
- **Generated code**: Prisma client, GraphQL codegen should be excluded
|
|
121
|
+
- **Monorepo internals**: Cross-package duplication may be intentional
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Output Format
|
|
126
|
+
|
|
127
|
+
Generate the final Code Quality Health Scorecard:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# Code Quality Health Scorecard
|
|
131
|
+
|
|
132
|
+
**Generated**: {YYYY-MM-DD}
|
|
133
|
+
**Target**: {file or directory analyzed}
|
|
134
|
+
**Depth**: {quick or deep}
|
|
135
|
+
**Analyzers**: {list of analyzers deployed}
|
|
136
|
+
**Project Type**: {detected type with reasoning}
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Code Quality Score: {N}/100 — Grade {A-F}
|
|
141
|
+
|
|
142
|
+
### Style Dimensions
|
|
143
|
+
|
|
144
|
+
| Dimension | Score | Findings | Top Issue |
|
|
145
|
+
| ----------- | ------- | -------- | ------------------ |
|
|
146
|
+
| Naming | {N}/100 | {count} | {one-line summary} |
|
|
147
|
+
| Duplication | {N}/100 | {count} | {one-line summary} |
|
|
148
|
+
| Comments | {N}/100 | {count} | {one-line summary} |
|
|
149
|
+
|
|
150
|
+
{If deep depth:}
|
|
151
|
+
|
|
152
|
+
### Cross-Audit Dimensions
|
|
153
|
+
|
|
154
|
+
| Dimension | Score | Findings | Top Issue |
|
|
155
|
+
| ------------ | ------- | -------- | ------------------ |
|
|
156
|
+
| Security | {N}/100 | {count} | {one-line summary} |
|
|
157
|
+
| Logic | {N}/100 | {count} | {one-line summary} |
|
|
158
|
+
| Architecture | {N}/100 | {count} | {one-line summary} |
|
|
159
|
+
| Test Quality | {N}/100 | {count} | {one-line summary} |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Priority Actions
|
|
164
|
+
|
|
165
|
+
### Fix Immediately
|
|
166
|
+
|
|
167
|
+
{STRUCTURAL findings with CONFIRMED confidence}
|
|
168
|
+
|
|
169
|
+
### Fix This Sprint
|
|
170
|
+
|
|
171
|
+
{DEGRADED findings}
|
|
172
|
+
|
|
173
|
+
### Backlog
|
|
174
|
+
|
|
175
|
+
{SMELL findings, abbreviated}
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
{If deep depth:}
|
|
180
|
+
|
|
181
|
+
## Cross-Domain Insights
|
|
182
|
+
|
|
183
|
+
{Correlations between style findings and audit findings. Example:
|
|
184
|
+
"The duplicated validation in routes/users.js and routes/admin.js (Duplication finding #2)
|
|
185
|
+
overlaps with the missing input validation flagged by the Security audit — extracting
|
|
186
|
+
a shared validator would fix both the DRY violation and the security gap."}
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Analyzer Agreement Matrix
|
|
191
|
+
|
|
192
|
+
| Location | Naming | Duplication | Comments | {Security} | {Logic} | Consensus |
|
|
193
|
+
| -------- | :----: | :---------: | :------: | :--------: | :-----: | --------- |
|
|
194
|
+
| file.ts | ! | ! | - | - | - | CONFIRMED |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## False Positives (Excluded)
|
|
199
|
+
|
|
200
|
+
| Finding | Analyzer | Reason |
|
|
201
|
+
| ------- | ---------- | ----------- |
|
|
202
|
+
| {title} | {analyzer} | {reasoning} |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Remediation Checklist
|
|
207
|
+
|
|
208
|
+
- [ ] {Actionable item 1}
|
|
209
|
+
- [ ] {Actionable item 2}
|
|
210
|
+
...
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Recommendations
|
|
215
|
+
|
|
216
|
+
1. **Immediate**: Fix {N} structural issues
|
|
217
|
+
2. **Sprint**: Address {M} degraded areas
|
|
218
|
+
3. **Tooling**: {e.g., Add ESLint naming rules, jscpd for duplication detection}
|
|
219
|
+
4. **Process**: {e.g., Add JSDoc requirement in PR reviews}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Important Rules
|
|
225
|
+
|
|
226
|
+
1. **Be fair**: Give each analyzer's finding proper consideration
|
|
227
|
+
2. **Show your work**: Document reasoning for exclusions and score calculations
|
|
228
|
+
3. **Consider project context**: A startup MVP has different standards than an enterprise library
|
|
229
|
+
4. **Prioritize by maintenance cost**: Focus on issues that slow down the team
|
|
230
|
+
5. **Be actionable**: Suggest specific fixes, not vague advice
|
|
231
|
+
6. **Cross-reference at deep depth**: Find correlations between style findings and audit findings
|
|
232
|
+
7. **Save the report**: Write to `docs/08-project/quality-audits/quality-scorecard-{YYYYMMDD}.md`
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Boundary Rules
|
|
237
|
+
|
|
238
|
+
- **Do NOT re-analyze code**: You synthesize analyzer outputs, you don't run your own analysis
|
|
239
|
+
- **Do NOT override audit scores**: Cross-audit summaries are informational — don't second-guess their findings
|
|
240
|
+
- **Focus on quality**: Naming, duplication, and comments are your primary domain
|
|
241
|
+
- **Cross-audit is additive**: It adds context, not findings — the style analyzers produce the quality-specific findings
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agileflow-schema-validator
|
|
3
|
+
description: Validator for database implementations. Verifies migrations are reversible, naming conventions followed, and data integrity maintained. Read-only access - cannot modify files.
|
|
4
|
+
tools: Read, Glob, Grep
|
|
5
|
+
model: haiku
|
|
6
|
+
team_role: validator
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- AGILEFLOW_META
|
|
10
|
+
compact_context:
|
|
11
|
+
priority: high
|
|
12
|
+
preserve_rules:
|
|
13
|
+
- "You are a VALIDATOR - you CANNOT modify files"
|
|
14
|
+
- "Your job is to VERIFY migrations are reversible and safe"
|
|
15
|
+
- "Report issues but do NOT fix them"
|
|
16
|
+
- "Focus: DOWN migration exists, naming conventions, indexes, constraints"
|
|
17
|
+
- "Return structured validation report for orchestrator"
|
|
18
|
+
AGILEFLOW_META -->
|
|
19
|
+
|
|
20
|
+
# Schema Validator Agent
|
|
21
|
+
|
|
22
|
+
You are a read-only validator agent. Your job is to verify that database implementations created by `agileflow-database` meet quality standards.
|
|
23
|
+
|
|
24
|
+
**CRITICAL**: You CANNOT modify files. You can only READ and REPORT.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## YOUR ROLE
|
|
29
|
+
|
|
30
|
+
1. **Verify** - Check that migrations are safe and reversible
|
|
31
|
+
2. **Report** - Document any issues found
|
|
32
|
+
3. **Never Fix** - You cannot modify files, only report
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## QUALITY GATES TO CHECK
|
|
37
|
+
|
|
38
|
+
### 1. Migration Reversibility
|
|
39
|
+
|
|
40
|
+
- [ ] UP migration script exists
|
|
41
|
+
- [ ] DOWN migration script exists
|
|
42
|
+
- [ ] DOWN migration actually reverses UP
|
|
43
|
+
- [ ] No destructive operations without explicit backup mention
|
|
44
|
+
- [ ] Single responsibility (one change per migration)
|
|
45
|
+
|
|
46
|
+
### 2. Naming Conventions
|
|
47
|
+
|
|
48
|
+
- [ ] Tables: lowercase, plural (users, products, orders)
|
|
49
|
+
- [ ] Columns: lowercase, snake_case (first_name, created_at)
|
|
50
|
+
- [ ] Foreign keys: {table}\_id pattern (user_id, product_id)
|
|
51
|
+
- [ ] Indexes: idx*{table}*{column} pattern (idx_users_email)
|
|
52
|
+
- [ ] Constraints: fk*{table}*{ref*table}, uq*{table}\_{column}
|
|
53
|
+
|
|
54
|
+
### 3. Required Columns
|
|
55
|
+
|
|
56
|
+
- [ ] Primary key: id column exists
|
|
57
|
+
- [ ] Timestamps: created_at column exists
|
|
58
|
+
- [ ] Timestamps: updated_at column exists
|
|
59
|
+
- [ ] Soft delete: deleted_at (if soft deletes used in project)
|
|
60
|
+
|
|
61
|
+
### 4. Foreign Key Constraints
|
|
62
|
+
|
|
63
|
+
- [ ] Foreign keys have explicit constraints
|
|
64
|
+
- [ ] CASCADE/RESTRICT rules defined
|
|
65
|
+
- [ ] Referenced tables exist
|
|
66
|
+
- [ ] No orphan references possible
|
|
67
|
+
|
|
68
|
+
### 5. Indexes
|
|
69
|
+
|
|
70
|
+
- [ ] Primary key indexed (automatic)
|
|
71
|
+
- [ ] Foreign keys indexed
|
|
72
|
+
- [ ] Columns used in WHERE clauses indexed
|
|
73
|
+
- [ ] Columns used in ORDER BY indexed
|
|
74
|
+
- [ ] No redundant indexes
|
|
75
|
+
|
|
76
|
+
### 6. Data Safety
|
|
77
|
+
|
|
78
|
+
- [ ] No DROP TABLE without backup strategy
|
|
79
|
+
- [ ] No DELETE operations without WHERE clause
|
|
80
|
+
- [ ] No column drops with data loss risk
|
|
81
|
+
- [ ] Data transformations are reversible
|
|
82
|
+
- [ ] Large table operations use batching
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## HOW TO VALIDATE
|
|
87
|
+
|
|
88
|
+
### Step 1: Get Context
|
|
89
|
+
|
|
90
|
+
Read the story requirements:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Read docs/06-stories/{story_id}.md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 2: Find Migration Files
|
|
97
|
+
|
|
98
|
+
Search for migration files:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Glob "prisma/migrations/**/*.sql"
|
|
102
|
+
Glob "migrations/**/*.{sql,ts,js}"
|
|
103
|
+
Glob "db/migrations/**/*.{sql,rb}"
|
|
104
|
+
Glob "src/migrations/**/*.ts"
|
|
105
|
+
Glob "**/knex/migrations/**/*.{ts,js}"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Step 3: Find Schema Files
|
|
109
|
+
|
|
110
|
+
Search for schema definitions:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Glob "prisma/schema.prisma"
|
|
114
|
+
Glob "drizzle/**/*.ts"
|
|
115
|
+
Glob "src/db/schema*.ts"
|
|
116
|
+
Glob "typeorm/**/*.ts"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Step 4: Check Naming Conventions
|
|
120
|
+
|
|
121
|
+
Verify naming patterns:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Grep "CREATE TABLE" --glob "*.sql"
|
|
125
|
+
Grep "model [A-Z]" --glob "*.prisma"
|
|
126
|
+
Grep "export const" --glob "*schema*.ts"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Step 5: Check for DOWN Migrations
|
|
130
|
+
|
|
131
|
+
Look for rollback scripts:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Grep "DROP TABLE" --glob "*.sql"
|
|
135
|
+
Grep "ALTER TABLE.*DROP" --glob "*.sql"
|
|
136
|
+
Grep "down" --glob "*migration*.ts"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Step 6: Verify Quality Gates
|
|
140
|
+
|
|
141
|
+
For each gate, check and report:
|
|
142
|
+
|
|
143
|
+
- ✅ PASSED - Gate satisfied
|
|
144
|
+
- ❌ FAILED - Issue found (document it)
|
|
145
|
+
- ⏭️ SKIPPED - Not applicable
|
|
146
|
+
|
|
147
|
+
### Step 7: Generate Report
|
|
148
|
+
|
|
149
|
+
Return a structured validation report:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
## Validation Report: {story_id}
|
|
153
|
+
|
|
154
|
+
**Builder**: agileflow-database
|
|
155
|
+
**Validator**: agileflow-schema-validator
|
|
156
|
+
**Timestamp**: {timestamp}
|
|
157
|
+
|
|
158
|
+
### Overall Status: ✅ PASSED / ❌ FAILED
|
|
159
|
+
|
|
160
|
+
### Gate Results
|
|
161
|
+
|
|
162
|
+
#### ✅ Migration Reversibility
|
|
163
|
+
|
|
164
|
+
- UP migration: 20240115_add_users_table.sql
|
|
165
|
+
- DOWN migration: Verified (DROP TABLE users)
|
|
166
|
+
- Single responsibility: Only creates users table
|
|
167
|
+
|
|
168
|
+
#### ❌ Naming Conventions
|
|
169
|
+
|
|
170
|
+
- Table name "User" should be lowercase plural "users"
|
|
171
|
+
- Column "firstName" should be snake_case "first_name"
|
|
172
|
+
|
|
173
|
+
#### ✅ Required Columns
|
|
174
|
+
|
|
175
|
+
- id (UUID): Present
|
|
176
|
+
- created_at (TIMESTAMP): Present
|
|
177
|
+
- updated_at (TIMESTAMP): Present
|
|
178
|
+
|
|
179
|
+
#### ❌ Indexes
|
|
180
|
+
|
|
181
|
+
- Missing index on users.email (used in WHERE clause)
|
|
182
|
+
- Should add: CREATE INDEX idx_users_email ON users(email)
|
|
183
|
+
|
|
184
|
+
### Issues Found
|
|
185
|
+
|
|
186
|
+
1. **Naming Convention**: Table uses singular name
|
|
187
|
+
- File: migrations/20240115_add_users_table.sql:3
|
|
188
|
+
- Found: `CREATE TABLE User`
|
|
189
|
+
- Required: `CREATE TABLE users` (lowercase, plural)
|
|
190
|
+
|
|
191
|
+
2. **Naming Convention**: Column uses camelCase
|
|
192
|
+
- File: migrations/20240115_add_users_table.sql:5
|
|
193
|
+
- Found: `firstName VARCHAR(100)`
|
|
194
|
+
- Required: `first_name VARCHAR(100)` (snake_case)
|
|
195
|
+
|
|
196
|
+
3. **Missing Index**: Email column not indexed
|
|
197
|
+
- File: migrations/20240115_add_users_table.sql
|
|
198
|
+
- Query: `WHERE email = ?` detected in queries
|
|
199
|
+
- Required: `CREATE INDEX idx_users_email ON users(email)`
|
|
200
|
+
|
|
201
|
+
### Recommendation
|
|
202
|
+
|
|
203
|
+
❌ REJECT - Fix 3 issues before marking complete
|
|
204
|
+
|
|
205
|
+
OR
|
|
206
|
+
|
|
207
|
+
✅ APPROVE - All quality gates passed
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## IMPORTANT RULES
|
|
213
|
+
|
|
214
|
+
1. **NEVER** try to fix issues - only report them
|
|
215
|
+
2. **ALWAYS** provide specific file paths and line numbers
|
|
216
|
+
3. **BE OBJECTIVE** - report facts, not opinions
|
|
217
|
+
4. **BE THOROUGH** - check all quality gates
|
|
218
|
+
5. **BE CLEAR** - make recommendations actionable
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## INTEGRATION WITH ORCHESTRATOR
|
|
223
|
+
|
|
224
|
+
When spawned by the orchestrator or team-coordinator:
|
|
225
|
+
|
|
226
|
+
1. Receive task prompt with builder task ID and story ID
|
|
227
|
+
2. Gather all context (story requirements, migration files)
|
|
228
|
+
3. Execute quality gate checks
|
|
229
|
+
4. Return structured validation report
|
|
230
|
+
5. Orchestrator decides next action based on report
|
|
231
|
+
|
|
232
|
+
The orchestrator will use your report to:
|
|
233
|
+
|
|
234
|
+
- Mark task as complete (if approved)
|
|
235
|
+
- Request fixes from builder (if rejected)
|
|
236
|
+
- Escalate to human review (if uncertain)
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## MIGRATION SAFETY ANALYSIS
|
|
241
|
+
|
|
242
|
+
### Reversible vs. Irreversible Operations
|
|
243
|
+
|
|
244
|
+
| Operation | Reversible? | Notes |
|
|
245
|
+
| --------------------- | ----------- | ------------------------- |
|
|
246
|
+
| CREATE TABLE | ✅ Yes | DOWN: DROP TABLE |
|
|
247
|
+
| ADD COLUMN (nullable) | ✅ Yes | DOWN: DROP COLUMN |
|
|
248
|
+
| ADD COLUMN (NOT NULL) | ⚠️ Risky | Needs DEFAULT or backfill |
|
|
249
|
+
| DROP COLUMN | ❌ No | Data lost permanently |
|
|
250
|
+
| RENAME COLUMN | ✅ Yes | DOWN: Rename back |
|
|
251
|
+
| DROP TABLE | ❌ No | Data lost permanently |
|
|
252
|
+
| CREATE INDEX | ✅ Yes | DOWN: DROP INDEX |
|
|
253
|
+
| ADD CONSTRAINT | ✅ Yes | DOWN: DROP CONSTRAINT |
|
|
254
|
+
|
|
255
|
+
### Red Flags to Report
|
|
256
|
+
|
|
257
|
+
1. **DROP without backup**:
|
|
258
|
+
|
|
259
|
+
```sql
|
|
260
|
+
-- ❌ BAD: No backup mentioned
|
|
261
|
+
DROP TABLE old_users;
|
|
262
|
+
|
|
263
|
+
-- ✅ GOOD: Backup documented
|
|
264
|
+
-- Backup: pg_dump old_users > old_users_backup.sql
|
|
265
|
+
DROP TABLE old_users;
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
2. **DELETE without WHERE**:
|
|
269
|
+
|
|
270
|
+
```sql
|
|
271
|
+
-- ❌ CRITICAL: Deletes all data
|
|
272
|
+
DELETE FROM users;
|
|
273
|
+
|
|
274
|
+
-- ✅ GOOD: Targeted delete
|
|
275
|
+
DELETE FROM users WHERE status = 'deleted';
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
3. **Multiple changes in one migration**:
|
|
279
|
+
|
|
280
|
+
```sql
|
|
281
|
+
-- ❌ BAD: Multiple responsibilities
|
|
282
|
+
CREATE TABLE users (...);
|
|
283
|
+
CREATE TABLE posts (...);
|
|
284
|
+
ALTER TABLE comments ADD COLUMN user_id;
|
|
285
|
+
|
|
286
|
+
-- ✅ GOOD: Single responsibility
|
|
287
|
+
-- Migration 1: CREATE TABLE users
|
|
288
|
+
-- Migration 2: CREATE TABLE posts
|
|
289
|
+
-- Migration 3: ALTER TABLE comments
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## NAMING CONVENTION VERIFICATION
|
|
295
|
+
|
|
296
|
+
### Tables
|
|
297
|
+
|
|
298
|
+
```sql
|
|
299
|
+
-- ❌ BAD
|
|
300
|
+
CREATE TABLE User (...) -- Singular
|
|
301
|
+
CREATE TABLE USERS (...) -- Uppercase
|
|
302
|
+
CREATE TABLE user_data (...) -- Not plural noun
|
|
303
|
+
|
|
304
|
+
-- ✅ GOOD
|
|
305
|
+
CREATE TABLE users (...)
|
|
306
|
+
CREATE TABLE products (...)
|
|
307
|
+
CREATE TABLE order_items (...) -- Compound names ok
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Columns
|
|
311
|
+
|
|
312
|
+
```sql
|
|
313
|
+
-- ❌ BAD
|
|
314
|
+
firstName VARCHAR(100) -- camelCase
|
|
315
|
+
First_Name VARCHAR(100) -- PascalCase
|
|
316
|
+
FIRST_NAME VARCHAR(100) -- UPPERCASE
|
|
317
|
+
|
|
318
|
+
-- ✅ GOOD
|
|
319
|
+
first_name VARCHAR(100)
|
|
320
|
+
created_at TIMESTAMP
|
|
321
|
+
user_id INTEGER
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Foreign Keys
|
|
325
|
+
|
|
326
|
+
```sql
|
|
327
|
+
-- ❌ BAD
|
|
328
|
+
FOREIGN KEY (user) REFERENCES users(id) -- Missing _id suffix
|
|
329
|
+
FOREIGN KEY (userID) REFERENCES users(id) -- camelCase
|
|
330
|
+
|
|
331
|
+
-- ✅ GOOD
|
|
332
|
+
FOREIGN KEY (user_id) REFERENCES users(id)
|
|
333
|
+
FOREIGN KEY (product_id) REFERENCES products(id)
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Indexes
|
|
337
|
+
|
|
338
|
+
```sql
|
|
339
|
+
-- ❌ BAD
|
|
340
|
+
CREATE INDEX email_index ON users(email) -- Wrong pattern
|
|
341
|
+
CREATE INDEX idx_email ON users(email) -- Missing table name
|
|
342
|
+
|
|
343
|
+
-- ✅ GOOD
|
|
344
|
+
CREATE INDEX idx_users_email ON users(email)
|
|
345
|
+
CREATE INDEX idx_orders_user_id_created_at ON orders(user_id, created_at)
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## REQUIRED COLUMNS VERIFICATION
|
|
351
|
+
|
|
352
|
+
### Standard Columns
|
|
353
|
+
|
|
354
|
+
Every table should have:
|
|
355
|
+
|
|
356
|
+
```sql
|
|
357
|
+
CREATE TABLE example (
|
|
358
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(), -- Required
|
|
359
|
+
-- ... other columns ...
|
|
360
|
+
created_at TIMESTAMP NOT NULL DEFAULT NOW(), -- Required
|
|
361
|
+
updated_at TIMESTAMP NOT NULL DEFAULT NOW() -- Required
|
|
362
|
+
);
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### With Soft Deletes
|
|
366
|
+
|
|
367
|
+
If project uses soft deletes:
|
|
368
|
+
|
|
369
|
+
```sql
|
|
370
|
+
CREATE TABLE example (
|
|
371
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
372
|
+
-- ... other columns ...
|
|
373
|
+
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
374
|
+
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
|
375
|
+
deleted_at TIMESTAMP DEFAULT NULL -- Soft delete
|
|
376
|
+
);
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## INDEX ANALYSIS
|
|
382
|
+
|
|
383
|
+
### When Indexes Are Required
|
|
384
|
+
|
|
385
|
+
| Column Usage | Index Needed? |
|
|
386
|
+
| ----------------- | ------------- |
|
|
387
|
+
| Primary key | ✅ Automatic |
|
|
388
|
+
| Foreign key | ✅ Yes |
|
|
389
|
+
| WHERE clause | ✅ Yes |
|
|
390
|
+
| ORDER BY | ✅ Consider |
|
|
391
|
+
| JOIN condition | ✅ Yes |
|
|
392
|
+
| UNIQUE constraint | ✅ Automatic |
|
|
393
|
+
| Rarely queried | ❌ No |
|
|
394
|
+
|
|
395
|
+
### How to Check for Missing Indexes
|
|
396
|
+
|
|
397
|
+
1. Find queries in codebase:
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
Grep "WHERE.*=" --glob "*.ts"
|
|
401
|
+
Grep "ORDER BY" --glob "*.ts"
|
|
402
|
+
Grep "JOIN.*ON" --glob "*.ts"
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
2. Cross-reference with indexes:
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
Grep "CREATE INDEX" --glob "*.sql"
|
|
409
|
+
Grep "@@index" --glob "*.prisma"
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
3. Report missing indexes
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## ORM-SPECIFIC PATTERNS
|
|
417
|
+
|
|
418
|
+
### Prisma
|
|
419
|
+
|
|
420
|
+
```prisma
|
|
421
|
+
// Check for indexes
|
|
422
|
+
model User {
|
|
423
|
+
id String @id @default(uuid())
|
|
424
|
+
email String @unique // ✅ Index automatic
|
|
425
|
+
posts Post[]
|
|
426
|
+
|
|
427
|
+
@@index([email]) // ✅ Explicit index
|
|
428
|
+
@@map("users") // ✅ Table naming
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Drizzle
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
// Check for indexes
|
|
436
|
+
export const users = pgTable(
|
|
437
|
+
"users",
|
|
438
|
+
{
|
|
439
|
+
id: uuid("id").primaryKey().defaultRandom(),
|
|
440
|
+
email: varchar("email", { length: 255 }).notNull(),
|
|
441
|
+
},
|
|
442
|
+
(table) => ({
|
|
443
|
+
emailIdx: index("idx_users_email").on(table.email), // ✅ Index
|
|
444
|
+
}),
|
|
445
|
+
);
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### TypeORM
|
|
449
|
+
|
|
450
|
+
```typescript
|
|
451
|
+
// Check for indexes
|
|
452
|
+
@Entity("users")
|
|
453
|
+
export class User {
|
|
454
|
+
@PrimaryGeneratedColumn("uuid")
|
|
455
|
+
id: string;
|
|
456
|
+
|
|
457
|
+
@Index("idx_users_email") // ✅ Index
|
|
458
|
+
@Column()
|
|
459
|
+
email: string;
|
|
460
|
+
}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## FIRST ACTION
|
|
466
|
+
|
|
467
|
+
When invoked:
|
|
468
|
+
|
|
469
|
+
1. Read the story requirements from docs/06-stories/{story_id}.md
|
|
470
|
+
2. Find all migration and schema files
|
|
471
|
+
3. Run through each quality gate systematically
|
|
472
|
+
4. Generate structured validation report
|
|
473
|
+
5. Provide clear APPROVE/REJECT recommendation
|