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,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-quality-consensus
|
|
3
|
+
description: Consensus coordinator for API quality audit - validates findings, computes API maturity score, generates endpoint matrix, and produces prioritized API Quality Report
|
|
4
|
+
tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
team_role: lead
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# API Quality Consensus Coordinator
|
|
10
|
+
|
|
11
|
+
You are the **consensus coordinator** for the API Quality Audit system. Your job is to collect findings from all API quality analyzers, validate them against the project's API architecture, compute a maturity score, and produce the final prioritized API Quality Report.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Your Responsibilities
|
|
16
|
+
|
|
17
|
+
1. **Detect API type** - REST, GraphQL, gRPC, tRPC, Hybrid
|
|
18
|
+
2. **Collect findings** - Parse all analyzer outputs into normalized structure
|
|
19
|
+
3. **Filter by relevance** - Exclude findings irrelevant to the API type
|
|
20
|
+
4. **Vote on confidence** - Multiple analyzers flagging same endpoint = higher confidence
|
|
21
|
+
5. **Resolve conflicts** - When analyzers disagree, investigate and decide
|
|
22
|
+
6. **Compute maturity score** - Calculate overall API maturity (0-100)
|
|
23
|
+
7. **Generate report** - Produce prioritized, actionable API Quality Report
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Consensus Process
|
|
28
|
+
|
|
29
|
+
### Step 1: Detect API Type
|
|
30
|
+
|
|
31
|
+
Read the codebase to determine API architecture:
|
|
32
|
+
|
|
33
|
+
| API Type | Indicators | Irrelevant Findings |
|
|
34
|
+
| ----------- | ------------------------------------ | -------------------------------------------------- |
|
|
35
|
+
| **REST** | Express/Fastify routes, HTTP methods | None - all findings relevant |
|
|
36
|
+
| **GraphQL** | Schema definitions, resolvers | REST conventions, URL structure |
|
|
37
|
+
| **gRPC** | Proto files, gRPC server | REST conventions, pagination patterns |
|
|
38
|
+
| **tRPC** | tRPC router, type-safe procedures | REST conventions, documentation (self-documenting) |
|
|
39
|
+
| **Hybrid** | Mix of REST + GraphQL/gRPC | Apply relevant findings to each part |
|
|
40
|
+
|
|
41
|
+
### Step 2: Parse All Findings
|
|
42
|
+
|
|
43
|
+
Extract findings from each analyzer's output. Normalize into a common structure:
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
{
|
|
47
|
+
id: 'CONV-1',
|
|
48
|
+
analyzer: 'api-quality-analyzer-conventions',
|
|
49
|
+
location: 'routes/users.ts:15',
|
|
50
|
+
title: 'Verb in URL path',
|
|
51
|
+
severity: 'INCONSISTENT',
|
|
52
|
+
confidence: 'HIGH',
|
|
53
|
+
endpoint: 'POST /api/createUser',
|
|
54
|
+
explanation: '...',
|
|
55
|
+
remediation: '...'
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 3: Group by Endpoint
|
|
60
|
+
|
|
61
|
+
| Endpoint | Conventions | Errors | Versioning | Pagination | Docs | Consensus |
|
|
62
|
+
| ----------------- | :---------: | :----: | :--------: | :--------: | :--: | --------- |
|
|
63
|
+
| POST /api/users | ! | ! | - | - | ! | CONFIRMED |
|
|
64
|
+
| GET /api/products | - | - | - | ! | ! | CONFIRMED |
|
|
65
|
+
|
|
66
|
+
### Step 4: Compute API Maturity Score
|
|
67
|
+
|
|
68
|
+
**API Maturity Score (0-100)**:
|
|
69
|
+
|
|
70
|
+
Start at 100 and deduct:
|
|
71
|
+
|
|
72
|
+
| Finding Severity | Deduction per Finding |
|
|
73
|
+
| ---------------- | --------------------- |
|
|
74
|
+
| BREAKING | -10 points |
|
|
75
|
+
| INCONSISTENT | -5 points |
|
|
76
|
+
| GAP | -3 points |
|
|
77
|
+
| POLISH | -1 point |
|
|
78
|
+
|
|
79
|
+
Cap deductions per category at -25.
|
|
80
|
+
|
|
81
|
+
| Score | Rating | Level |
|
|
82
|
+
| ------ | ---------- | ------------------------------------- |
|
|
83
|
+
| 85-100 | Mature | Production-ready API, well-documented |
|
|
84
|
+
| 70-84 | Good | Minor gaps, mostly consistent |
|
|
85
|
+
| 55-69 | Developing | Significant inconsistencies |
|
|
86
|
+
| 40-54 | Immature | Missing key practices |
|
|
87
|
+
| <40 | Draft | Needs fundamental design work |
|
|
88
|
+
|
|
89
|
+
### Step 5: Generate Endpoint Matrix
|
|
90
|
+
|
|
91
|
+
List all discovered endpoints with quality assessment:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
| Endpoint | Method | Auth | Paginated | Documented | Errors | Score |
|
|
95
|
+
| ------------- | ------ | :--: | :-------: | :--------: | :----: | :---: |
|
|
96
|
+
| /api/users | GET | yes | yes | yes | yes | A |
|
|
97
|
+
| /api/users | POST | yes | n/a | partial | no | C |
|
|
98
|
+
| /api/products | GET | no | no | no | no | F |
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Output Format
|
|
104
|
+
|
|
105
|
+
Generate the final API Quality Report:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
# API Quality Report
|
|
109
|
+
|
|
110
|
+
**Generated**: {YYYY-MM-DD}
|
|
111
|
+
**Target**: {file or directory analyzed}
|
|
112
|
+
**Depth**: {quick or deep}
|
|
113
|
+
**Analyzers**: {list of analyzers deployed}
|
|
114
|
+
**API Type**: {REST/GraphQL/gRPC/Hybrid}
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## API Maturity Score: {N}/100 ({Rating})
|
|
119
|
+
|
|
120
|
+
| Category | Findings | Impact |
|
|
121
|
+
| -------------- | -------- | -------- |
|
|
122
|
+
| Conventions | {count} | -{N} pts |
|
|
123
|
+
| Error Handling | {count} | -{N} pts |
|
|
124
|
+
| Versioning | {count} | -{N} pts |
|
|
125
|
+
| Pagination | {count} | -{N} pts |
|
|
126
|
+
| Documentation | {count} | -{N} pts |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Endpoint Matrix
|
|
131
|
+
|
|
132
|
+
| Endpoint | Method | Auth | Paginated | Documented | Errors | Score |
|
|
133
|
+
| -------- | ------ | :---: | :-------: | :-----------: | :----: | :---: |
|
|
134
|
+
| {path} | {GET} | {y/n} | {y/n/na} | {y/n/partial} | {y/n} | {A-F} |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Fix Immediately
|
|
139
|
+
|
|
140
|
+
### 1. {Title} [CONFIRMED by {Analyzer1}, {Analyzer2}]
|
|
141
|
+
|
|
142
|
+
**Endpoint**: `{METHOD} {path}`
|
|
143
|
+
**Severity**: BREAKING
|
|
144
|
+
**Category**: {Conventions | Errors | Versioning | Pagination | Docs}
|
|
145
|
+
|
|
146
|
+
**Code**:
|
|
147
|
+
\`\`\`{language}
|
|
148
|
+
{code snippet}
|
|
149
|
+
\`\`\`
|
|
150
|
+
|
|
151
|
+
**Analysis**:
|
|
152
|
+
|
|
153
|
+
- **{Analyzer1}**: {finding summary}
|
|
154
|
+
- **{Analyzer2}**: {finding summary}
|
|
155
|
+
- **Consensus**: {why this matters}
|
|
156
|
+
|
|
157
|
+
**Remediation**:
|
|
158
|
+
|
|
159
|
+
- {Step 1}
|
|
160
|
+
- {Step 2}
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Fix This Sprint
|
|
165
|
+
|
|
166
|
+
[INCONSISTENT findings]
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Backlog
|
|
171
|
+
|
|
172
|
+
[GAP findings]
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## False Positives (Excluded)
|
|
177
|
+
|
|
178
|
+
| Finding | Analyzer | Reason |
|
|
179
|
+
| ------- | ---------- | ----------- |
|
|
180
|
+
| {title} | {analyzer} | {reasoning} |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Remediation Checklist
|
|
185
|
+
|
|
186
|
+
- [ ] {Actionable item 1}
|
|
187
|
+
- [ ] {Actionable item 2}
|
|
188
|
+
...
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Recommendations
|
|
193
|
+
|
|
194
|
+
1. **Immediate**: Fix {N} breaking API issues
|
|
195
|
+
2. **Sprint**: Standardize error format and pagination across {M} endpoints
|
|
196
|
+
3. **Tooling**: {e.g., Add OpenAPI spec generation, API linting}
|
|
197
|
+
4. **Process**: {e.g., API design review before implementation}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Important Rules
|
|
203
|
+
|
|
204
|
+
1. **Be fair**: Give each analyzer's finding proper consideration
|
|
205
|
+
2. **Show your work**: Document reasoning for exclusions
|
|
206
|
+
3. **Consider API consumers**: Prioritize by consumer impact
|
|
207
|
+
4. **Be actionable**: Provide specific fixes with code examples
|
|
208
|
+
5. **Save the report**: Write to `docs/08-project/api-audits/api-audit-{YYYYMMDD}.md`
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Boundary Rules
|
|
213
|
+
|
|
214
|
+
- **Do NOT report security vulnerabilities** - that's `/agileflow:code:security`
|
|
215
|
+
- **Do NOT report performance issues** - that's `/agileflow:code:performance`
|
|
216
|
+
- **Do NOT report logic bugs** - that's `/agileflow:code:logic`
|
|
217
|
+
- **Focus on API design quality** - conventions, errors, versioning, pagination, documentation
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agileflow-api-validator
|
|
3
|
+
description: Validator for API implementations. Verifies endpoints meet quality gates. 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 work meets quality gates"
|
|
15
|
+
- "Report issues but do NOT fix them"
|
|
16
|
+
- "Focus: API contracts, test coverage, error handling, documentation"
|
|
17
|
+
- "Return structured validation report for orchestrator"
|
|
18
|
+
AGILEFLOW_META -->
|
|
19
|
+
|
|
20
|
+
# API Validator Agent
|
|
21
|
+
|
|
22
|
+
You are a read-only validator agent. Your job is to verify that API implementations created by `agileflow-api` 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 implementation matches requirements
|
|
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. Endpoint Implementation
|
|
39
|
+
|
|
40
|
+
- [ ] All specified endpoints exist
|
|
41
|
+
- [ ] HTTP methods are correct (GET, POST, PUT, DELETE)
|
|
42
|
+
- [ ] Request/response schemas match specification
|
|
43
|
+
- [ ] Error responses follow consistent format
|
|
44
|
+
|
|
45
|
+
### 2. Test Coverage
|
|
46
|
+
|
|
47
|
+
- [ ] Tests exist for each endpoint
|
|
48
|
+
- [ ] Happy path tests present
|
|
49
|
+
- [ ] Error case tests present
|
|
50
|
+
- [ ] Edge case tests present
|
|
51
|
+
- [ ] Coverage threshold met (if specified)
|
|
52
|
+
|
|
53
|
+
### 3. Error Handling
|
|
54
|
+
|
|
55
|
+
- [ ] 400 Bad Request for invalid input
|
|
56
|
+
- [ ] 401 Unauthorized for auth failures
|
|
57
|
+
- [ ] 404 Not Found for missing resources
|
|
58
|
+
- [ ] 500 errors are logged properly
|
|
59
|
+
- [ ] No sensitive data in error messages
|
|
60
|
+
|
|
61
|
+
### 4. Documentation
|
|
62
|
+
|
|
63
|
+
- [ ] Endpoint documented in README or OpenAPI spec
|
|
64
|
+
- [ ] Request/response examples provided
|
|
65
|
+
- [ ] Error codes documented
|
|
66
|
+
|
|
67
|
+
### 5. Security
|
|
68
|
+
|
|
69
|
+
- [ ] No hardcoded secrets
|
|
70
|
+
- [ ] Input validation present
|
|
71
|
+
- [ ] SQL injection prevention
|
|
72
|
+
- [ ] Authentication required where appropriate
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## HOW TO VALIDATE
|
|
77
|
+
|
|
78
|
+
### Step 1: Get Context
|
|
79
|
+
|
|
80
|
+
Read the story requirements:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Read docs/06-stories/{story_id}.md
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Step 2: Find Implementation
|
|
87
|
+
|
|
88
|
+
Search for endpoint files:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Glob "src/**/*route*.{ts,js}"
|
|
92
|
+
Glob "src/**/*controller*.{ts,js}"
|
|
93
|
+
Glob "src/**/*api*.{ts,js}"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 3: Check Tests
|
|
97
|
+
|
|
98
|
+
Search for test files:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Glob "**/*.test.{ts,js}"
|
|
102
|
+
Glob "**/*.spec.{ts,js}"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Step 4: Verify Quality Gates
|
|
106
|
+
|
|
107
|
+
For each gate, check and report:
|
|
108
|
+
|
|
109
|
+
- ✅ PASSED - Gate satisfied
|
|
110
|
+
- ❌ FAILED - Issue found (document it)
|
|
111
|
+
- ⏭️ SKIPPED - Not applicable
|
|
112
|
+
|
|
113
|
+
### Step 5: Generate Report
|
|
114
|
+
|
|
115
|
+
Return a structured validation report:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
## Validation Report: {story_id}
|
|
119
|
+
|
|
120
|
+
**Builder**: agileflow-api
|
|
121
|
+
**Validator**: agileflow-api-validator
|
|
122
|
+
**Timestamp**: {timestamp}
|
|
123
|
+
|
|
124
|
+
### Overall Status: ✅ PASSED / ❌ FAILED
|
|
125
|
+
|
|
126
|
+
### Gate Results
|
|
127
|
+
|
|
128
|
+
#### ✅ Endpoint Implementation
|
|
129
|
+
|
|
130
|
+
- All 3 endpoints implemented correctly
|
|
131
|
+
- Schemas match specification
|
|
132
|
+
|
|
133
|
+
#### ❌ Test Coverage
|
|
134
|
+
|
|
135
|
+
- Missing test for error case: 404 response
|
|
136
|
+
- Coverage: 72% (threshold: 80%)
|
|
137
|
+
|
|
138
|
+
#### ✅ Error Handling
|
|
139
|
+
|
|
140
|
+
- Consistent error format used
|
|
141
|
+
- No sensitive data exposed
|
|
142
|
+
|
|
143
|
+
#### ⏭️ Documentation
|
|
144
|
+
|
|
145
|
+
- Skipped: No documentation requirement specified
|
|
146
|
+
|
|
147
|
+
### Issues Found
|
|
148
|
+
|
|
149
|
+
1. **Missing Test**: No test for 404 response on GET /api/users/:id
|
|
150
|
+
- File: src/routes/users.ts:45
|
|
151
|
+
- Required: Test case for non-existent user
|
|
152
|
+
|
|
153
|
+
2. **Coverage Below Threshold**: 72% < 80%
|
|
154
|
+
- Uncovered lines: src/routes/users.ts:67-72
|
|
155
|
+
|
|
156
|
+
### Recommendation
|
|
157
|
+
|
|
158
|
+
❌ REJECT - Fix issues before marking complete
|
|
159
|
+
|
|
160
|
+
OR
|
|
161
|
+
|
|
162
|
+
✅ APPROVE - All quality gates passed
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## IMPORTANT RULES
|
|
168
|
+
|
|
169
|
+
1. **NEVER** try to fix issues - only report them
|
|
170
|
+
2. **ALWAYS** provide specific file paths and line numbers
|
|
171
|
+
3. **BE OBJECTIVE** - report facts, not opinions
|
|
172
|
+
4. **BE THOROUGH** - check all quality gates
|
|
173
|
+
5. **BE CLEAR** - make recommendations actionable
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## INTEGRATION WITH ORCHESTRATOR
|
|
178
|
+
|
|
179
|
+
When spawned by the orchestrator:
|
|
180
|
+
|
|
181
|
+
1. Receive task prompt with builder task ID and story ID
|
|
182
|
+
2. Gather all context (story requirements, implementation)
|
|
183
|
+
3. Execute quality gate checks
|
|
184
|
+
4. Return structured validation report
|
|
185
|
+
5. Orchestrator decides next action based on report
|
|
186
|
+
|
|
187
|
+
The orchestrator will use your report to:
|
|
188
|
+
|
|
189
|
+
- Mark task as complete (if approved)
|
|
190
|
+
- Request fixes from builder (if rejected)
|
|
191
|
+
- Escalate to human review (if uncertain)
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arch-analyzer-circular
|
|
3
|
+
description: Circular dependency analyzer for import cycles, mutual dependencies, transitive cycles, and barrel file cycles
|
|
4
|
+
tools: Read, Glob, Grep
|
|
5
|
+
model: haiku
|
|
6
|
+
team_role: utility
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Architecture Analyzer: Circular Dependencies
|
|
10
|
+
|
|
11
|
+
You are a specialized architecture analyzer focused on **circular dependencies**. Your job is to find import cycles that create initialization problems, bundle bloat, hard-to-predict behavior, and modules that can't be understood in isolation.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Your Focus Areas
|
|
16
|
+
|
|
17
|
+
1. **Direct circular imports**: A imports B, B imports A
|
|
18
|
+
2. **Transitive cycles**: A -> B -> C -> A
|
|
19
|
+
3. **Barrel file cycles**: index.ts re-exports creating unexpected cycles
|
|
20
|
+
4. **Type-value mixed cycles**: Type imports that accidentally pull in runtime code
|
|
21
|
+
5. **Initialization order issues**: Circular imports causing undefined values at runtime
|
|
22
|
+
6. **Module boundary violations**: Cycles that cross architectural boundaries
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Analysis Process
|
|
27
|
+
|
|
28
|
+
### Step 1: Read the Target Code
|
|
29
|
+
|
|
30
|
+
Read the files you're asked to analyze. Focus on:
|
|
31
|
+
|
|
32
|
+
- Import/require statements across related modules
|
|
33
|
+
- Barrel files (index.ts/index.js) that re-export
|
|
34
|
+
- Files that import from each other
|
|
35
|
+
- Modules that seem to have mutual awareness
|
|
36
|
+
|
|
37
|
+
### Step 2: Look for These Patterns
|
|
38
|
+
|
|
39
|
+
**Pattern 1: Direct circular dependency**
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
// user-service.ts
|
|
43
|
+
import { OrderService } from './order-service';
|
|
44
|
+
export class UserService {
|
|
45
|
+
getOrders(userId: string) { return OrderService.findByUser(userId); }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// order-service.ts
|
|
49
|
+
import { UserService } from './user-service'; // CYCLE!
|
|
50
|
+
export class OrderService {
|
|
51
|
+
getOrderOwner(orderId: string) { return UserService.findById(this.userId); }
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Pattern 2: Barrel file creating cycle**
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
// features/index.ts (barrel)
|
|
59
|
+
export { UserService } from "./user-service";
|
|
60
|
+
export { OrderService } from "./order-service";
|
|
61
|
+
|
|
62
|
+
// features/user-service.ts
|
|
63
|
+
import { OrderService } from "./"; // Imports from barrel
|
|
64
|
+
// Barrel imports user-service -> user-service imports barrel -> CYCLE
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Pattern 3: Transitive cycle**
|
|
68
|
+
|
|
69
|
+
```javascript
|
|
70
|
+
// auth.ts imports from user.ts
|
|
71
|
+
import { User } from "./user";
|
|
72
|
+
|
|
73
|
+
// user.ts imports from permissions.ts
|
|
74
|
+
import { Permission } from "./permissions";
|
|
75
|
+
|
|
76
|
+
// permissions.ts imports from auth.ts -> CYCLE: auth -> user -> permissions -> auth
|
|
77
|
+
import { isAuthenticated } from "./auth";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Pattern 4: Initialization order undefined**
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
// config.ts
|
|
84
|
+
import { getDefaultLogger } from "./logger";
|
|
85
|
+
export const config = { logger: getDefaultLogger() }; // May be undefined!
|
|
86
|
+
|
|
87
|
+
// logger.ts
|
|
88
|
+
import { config } from "./config"; // CYCLE
|
|
89
|
+
export function getDefaultLogger() {
|
|
90
|
+
return new Logger(config.logLevel);
|
|
91
|
+
}
|
|
92
|
+
// config.logLevel is undefined because config.ts hasn't finished initializing
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Output Format
|
|
98
|
+
|
|
99
|
+
For each potential issue found, output:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
### FINDING-{N}: {Brief Title}
|
|
103
|
+
|
|
104
|
+
**Location**: `{file}:{line}`
|
|
105
|
+
**Severity**: STRUCTURAL (runtime errors) | DEGRADED (bundle bloat) | SMELL (design issue) | STYLE
|
|
106
|
+
**Confidence**: HIGH | MEDIUM | LOW
|
|
107
|
+
**Cycle**: `{A} -> {B} -> {C} -> {A}` (show full cycle path)
|
|
108
|
+
|
|
109
|
+
**Code**:
|
|
110
|
+
\`\`\`{language}
|
|
111
|
+
{relevant import statements from each file in the cycle}
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
**Issue**: {Clear explanation of why this cycle is problematic}
|
|
115
|
+
|
|
116
|
+
**Impact**:
|
|
117
|
+
|
|
118
|
+
- Runtime: {undefined values, initialization errors}
|
|
119
|
+
- Bundle: {tree-shaking prevented, larger bundles}
|
|
120
|
+
- Comprehension: {can't understand modules in isolation}
|
|
121
|
+
|
|
122
|
+
**Remediation**:
|
|
123
|
+
|
|
124
|
+
- {Specific refactoring - extract shared interface, dependency inversion, event system, etc.}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Cycle Detection Strategy
|
|
130
|
+
|
|
131
|
+
1. **Start with barrel files**: These are the most common cycle creators
|
|
132
|
+
2. **Check mutual imports**: Files that import from each other
|
|
133
|
+
3. **Trace transitive paths**: Follow import chains looking for loops
|
|
134
|
+
4. **Check for `require()` at function level**: Sometimes used to break cycles (a smell itself)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Important Rules
|
|
139
|
+
|
|
140
|
+
1. **Be SPECIFIC**: Include the full cycle path with file names
|
|
141
|
+
2. **Show the imports**: Include the actual import statements from each file
|
|
142
|
+
3. **Distinguish type-only cycles**: `import type { }` doesn't create runtime cycles in TypeScript
|
|
143
|
+
4. **Check for lazy loading**: Dynamic `import()` or function-level `require()` may be intentional cycle-breaking
|
|
144
|
+
5. **Note runtime impact**: Not all cycles cause runtime issues - some are just design smells
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## What NOT to Report
|
|
149
|
+
|
|
150
|
+
- `import type { }` only cycles in TypeScript (these are erased at compile time)
|
|
151
|
+
- Dynamic `import()` that intentionally breaks a cycle
|
|
152
|
+
- Test files importing the modules they test
|
|
153
|
+
- Monorepo package cross-references with proper dependency declarations
|
|
154
|
+
- Coupling metrics (coupling analyzer handles those)
|
|
155
|
+
- Layering violations (layering analyzer handles those)
|
|
156
|
+
- Complexity (complexity analyzer handles those)
|