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,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Babysit mode picker with plain labels and short hints.
|
|
3
|
+
*/
|
|
4
|
+
const prompts = require("@clack/prompts");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
const { optionLabel, questionMessage } = require("../../lib/brand.js");
|
|
7
|
+
|
|
8
|
+
const MODES = [
|
|
9
|
+
{
|
|
10
|
+
value: "full",
|
|
11
|
+
label: optionLabel(
|
|
12
|
+
"Full guidance",
|
|
13
|
+
"Uses the most interactive flow available for the selected IDEs.",
|
|
14
|
+
),
|
|
15
|
+
hint: chalk.dim(
|
|
16
|
+
"Uses the most interactive flow available for the selected IDEs.",
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: "light",
|
|
21
|
+
label: optionLabel(
|
|
22
|
+
"Guided mode",
|
|
23
|
+
"Keeps prompts short and only interrupts when needed.",
|
|
24
|
+
),
|
|
25
|
+
hint: "Keeps the mentor flow on, but asks less often.",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "minimal",
|
|
29
|
+
label: optionLabel("Minimal mode", "Stays terse and avoids extra prompts."),
|
|
30
|
+
hint: "Stays terse and avoids extra prompts.",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "custom",
|
|
34
|
+
label: optionLabel(
|
|
35
|
+
"Customize",
|
|
36
|
+
"Choose exactly which mentor behaviors are enabled.",
|
|
37
|
+
),
|
|
38
|
+
hint: "Pick the behaviors you want.",
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const CUSTOM_FEATURES = [
|
|
43
|
+
{
|
|
44
|
+
value: "askQuestions",
|
|
45
|
+
label: "Ask questions",
|
|
46
|
+
hint: "Ask at decision points with specific options.",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
value: "planMode",
|
|
50
|
+
label: "Plan mode",
|
|
51
|
+
hint: "Plan before non-trivial implementation.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: "delegation",
|
|
55
|
+
label: "Delegation",
|
|
56
|
+
hint: "Use subagents when work splits cleanly.",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: "taskTracking",
|
|
60
|
+
label: "Task tracking",
|
|
61
|
+
hint: "Use visible task lists for multi-step work.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: "progressUpdates",
|
|
65
|
+
label: "Progress updates",
|
|
66
|
+
hint: "Send short status updates while working.",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: "auditAll",
|
|
70
|
+
label: "Audit everything",
|
|
71
|
+
hint: "Run all enabled audits after every implementation, not just when relevant.",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: "logicAudit",
|
|
75
|
+
label: "Logic audit",
|
|
76
|
+
hint: "Suggest after implementation.",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: "flowAudit",
|
|
80
|
+
label: "Flow audit",
|
|
81
|
+
hint: "Suggest after implementation when user-facing flows changed.",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
value: "securityAudit",
|
|
85
|
+
label: "Security audit",
|
|
86
|
+
hint: "Suggest after implementation when auth, APIs, or sensitive data involved.",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: "performanceAudit",
|
|
90
|
+
label: "Performance audit",
|
|
91
|
+
hint: "Suggest after implementation when queries, rendering, or data size involved.",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
value: "accessibilityAudit",
|
|
95
|
+
label: "Accessibility audit",
|
|
96
|
+
hint: "Suggest after implementation when UI components changed.",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: "legalAudit",
|
|
100
|
+
label: "Legal audit",
|
|
101
|
+
hint: "Suggest after implementation when data handling, privacy, or compliance involved.",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
value: "strictMode",
|
|
105
|
+
label: "Strict gates",
|
|
106
|
+
hint: "Require tests and review to pass before commit.",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
value: "tddMode",
|
|
110
|
+
label: "TDD mode",
|
|
111
|
+
hint: "Enforce RED → GREEN → REFACTOR phases.",
|
|
112
|
+
},
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
const DEFAULT_CUSTOM_FEATURES = {
|
|
116
|
+
askQuestions: true,
|
|
117
|
+
planMode: true,
|
|
118
|
+
delegation: true,
|
|
119
|
+
taskTracking: true,
|
|
120
|
+
progressUpdates: true,
|
|
121
|
+
auditAll: false,
|
|
122
|
+
logicAudit: true,
|
|
123
|
+
flowAudit: true,
|
|
124
|
+
securityAudit: true,
|
|
125
|
+
performanceAudit: false,
|
|
126
|
+
accessibilityAudit: false,
|
|
127
|
+
legalAudit: false,
|
|
128
|
+
strictMode: false,
|
|
129
|
+
tddMode: false,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @param {string | { mode?: string, features?: Record<string, boolean> } | undefined} current
|
|
134
|
+
* @returns {Promise<{ mode: 'full' | 'light' | 'minimal' | 'custom', features?: Record<string, boolean> }>}
|
|
135
|
+
*/
|
|
136
|
+
async function pickBabysitMode(current = "light") {
|
|
137
|
+
const currentMode =
|
|
138
|
+
typeof current === "string" ? current : current && current.mode;
|
|
139
|
+
const option = await prompts.select({
|
|
140
|
+
message: questionMessage("How should AgileFlow guide babysit work?"),
|
|
141
|
+
options: MODES,
|
|
142
|
+
initialValue: MODES.some((m) => m.value === currentMode)
|
|
143
|
+
? currentMode
|
|
144
|
+
: "light",
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
if (prompts.isCancel(option)) {
|
|
148
|
+
prompts.cancel("Setup cancelled. No changes made.");
|
|
149
|
+
process.exit(1);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (option !== "custom") {
|
|
153
|
+
return { mode: /** @type {'full' | 'light' | 'minimal'} */ (option) };
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const currentFeatures =
|
|
157
|
+
current && typeof current === "object" && current.features
|
|
158
|
+
? current.features
|
|
159
|
+
: {};
|
|
160
|
+
const initialFeatures = { ...DEFAULT_CUSTOM_FEATURES, ...currentFeatures };
|
|
161
|
+
const picked = await prompts.multiselect({
|
|
162
|
+
message: questionMessage("Customize guidance behaviors"),
|
|
163
|
+
options: CUSTOM_FEATURES,
|
|
164
|
+
initialValues: CUSTOM_FEATURES.filter((f) => initialFeatures[f.value]).map(
|
|
165
|
+
(f) => f.value,
|
|
166
|
+
),
|
|
167
|
+
required: false,
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (prompts.isCancel(picked)) {
|
|
171
|
+
prompts.cancel("Setup cancelled. No changes made.");
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const selected = new Set(/** @type {string[]} */ (picked));
|
|
176
|
+
return {
|
|
177
|
+
mode: "custom",
|
|
178
|
+
features: Object.fromEntries(
|
|
179
|
+
CUSTOM_FEATURES.map((feature) => [
|
|
180
|
+
feature.value,
|
|
181
|
+
selected.has(feature.value),
|
|
182
|
+
]),
|
|
183
|
+
),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = {
|
|
188
|
+
MODES,
|
|
189
|
+
CUSTOM_FEATURES,
|
|
190
|
+
DEFAULT_CUSTOM_FEATURES,
|
|
191
|
+
pickBabysitMode,
|
|
192
|
+
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Behaviors picker —
|
|
2
|
+
* Behaviors picker — one prompt per behavior so each gets its own
|
|
3
|
+
* decision point, plus a sub-multiselect for damage-control tools so
|
|
4
|
+
* users can keep Bash blocking while loosening Edit/Write (or vice
|
|
5
|
+
* versa).
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
* `behavior: <key
|
|
6
|
-
*
|
|
7
|
+
* Each behavior maps 1:N to hooks declared in plugin manifests via
|
|
8
|
+
* `behavior: <key>`. Disabling a behavior excludes its hooks from the
|
|
9
|
+
* generated `.agileflow/hook-manifest.yaml` at install time.
|
|
7
10
|
*
|
|
8
11
|
* Pure logic lives in `buildBehaviorsMap()` so it can be unit-tested
|
|
9
12
|
* without spawning a TTY.
|
|
10
13
|
*/
|
|
11
14
|
const prompts = require("@clack/prompts");
|
|
15
|
+
const chalk = require("chalk");
|
|
16
|
+
const { questionMessage } = require("../../lib/brand.js");
|
|
12
17
|
|
|
13
18
|
/**
|
|
14
19
|
* @typedef {import('../../runtime/config/defaults.js').Behaviors} Behaviors
|
|
@@ -18,91 +23,240 @@ const prompts = require("@clack/prompts");
|
|
|
18
23
|
const BEHAVIOR_OPTIONS = [
|
|
19
24
|
{
|
|
20
25
|
key: "loadContext",
|
|
21
|
-
label: "Load project context
|
|
22
|
-
hint: "
|
|
26
|
+
label: "Load project context",
|
|
27
|
+
hint: "Show stories, dirty files, and recent commits at session start.",
|
|
23
28
|
},
|
|
24
29
|
{
|
|
25
30
|
key: "babysitDefault",
|
|
26
|
-
label: "
|
|
27
|
-
hint: "
|
|
31
|
+
label: "Enable guidance on start",
|
|
32
|
+
hint: "Inject your configured guidance preferences at the start of every session.",
|
|
28
33
|
},
|
|
29
34
|
{
|
|
30
|
-
key: "
|
|
31
|
-
label: "
|
|
32
|
-
hint: "
|
|
35
|
+
key: "preCompactState",
|
|
36
|
+
label: "Preserve context on start",
|
|
37
|
+
hint: "Re-inject story, command, and git state after compaction so nothing is lost.",
|
|
33
38
|
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const DAMAGE_CONTROL_TOOLS = [
|
|
34
42
|
{
|
|
35
|
-
key: "
|
|
36
|
-
label: "
|
|
37
|
-
hint: "
|
|
43
|
+
key: "damageControlBash",
|
|
44
|
+
label: "Bash",
|
|
45
|
+
hint: "Block risky shell commands.",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "damageControlEdit",
|
|
49
|
+
label: "Edit",
|
|
50
|
+
hint: "Block edits to sensitive paths.",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "damageControlWrite",
|
|
54
|
+
label: "Write",
|
|
55
|
+
hint: "Block writes to sensitive paths.",
|
|
38
56
|
},
|
|
39
57
|
];
|
|
40
58
|
|
|
41
59
|
/**
|
|
42
|
-
* Build a complete Behaviors map from a set of
|
|
43
|
-
* back to
|
|
44
|
-
*
|
|
45
|
-
* option and chose not to enable it).
|
|
60
|
+
* Build a complete Behaviors map from a partial set of toggles. Missing
|
|
61
|
+
* keys fall back to `false` (the user actively saw the option and chose
|
|
62
|
+
* not to enable it).
|
|
46
63
|
*
|
|
47
|
-
* @param {
|
|
64
|
+
* @param {Partial<Behaviors>} input
|
|
48
65
|
* @returns {Behaviors}
|
|
49
66
|
*/
|
|
50
|
-
function buildBehaviorsMap(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
preCompactState:
|
|
67
|
+
function buildBehaviorsMap(input) {
|
|
68
|
+
return {
|
|
69
|
+
loadContext: Boolean(input.loadContext),
|
|
70
|
+
babysitDefault: Boolean(input.babysitDefault),
|
|
71
|
+
damageControlBash: Boolean(input.damageControlBash),
|
|
72
|
+
damageControlEdit: Boolean(input.damageControlEdit),
|
|
73
|
+
damageControlWrite: Boolean(input.damageControlWrite),
|
|
74
|
+
preCompactState: Boolean(input.preCompactState),
|
|
58
75
|
};
|
|
59
|
-
return result;
|
|
60
76
|
}
|
|
61
77
|
|
|
62
78
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* default-on shape lives in `defaults.js`; this just reads it.
|
|
79
|
+
* Initial value lookup: respect existing config, else fall back to
|
|
80
|
+
* "default-on" — every behavior is enabled out of the box.
|
|
66
81
|
*
|
|
67
|
-
* @param {Partial<Behaviors
|
|
68
|
-
* @
|
|
82
|
+
* @param {Partial<Behaviors>|undefined} current
|
|
83
|
+
* @param {string} key
|
|
84
|
+
* @returns {boolean}
|
|
69
85
|
*/
|
|
70
|
-
function
|
|
71
|
-
if (!current) return
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
function initialFor(current, key) {
|
|
87
|
+
if (!current) return true;
|
|
88
|
+
return current[key] !== false;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {Set<string>|string[]|undefined} supportedHookEvents
|
|
93
|
+
* @param {string} event
|
|
94
|
+
* @returns {boolean}
|
|
95
|
+
*/
|
|
96
|
+
function supportsEvent(supportedHookEvents, event) {
|
|
97
|
+
if (!supportedHookEvents) return true;
|
|
98
|
+
if (Array.isArray(supportedHookEvents))
|
|
99
|
+
return supportedHookEvents.includes(event);
|
|
100
|
+
return supportedHookEvents.has(event);
|
|
75
101
|
}
|
|
76
102
|
|
|
77
103
|
/**
|
|
78
|
-
*
|
|
104
|
+
* Normalize a behaviors object against the supported hook events for the
|
|
105
|
+
* active IDE targets.
|
|
79
106
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
107
|
+
* Unsupported behaviors are forced to false so the resulting config does
|
|
108
|
+
* not advertise hooks the selected IDEs cannot run.
|
|
109
|
+
*
|
|
110
|
+
* @param {Partial<Behaviors>} input
|
|
111
|
+
* @param {Set<string>|string[]|undefined} supportedHookEvents
|
|
112
|
+
* @returns {Behaviors}
|
|
82
113
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
function normalizeBehaviorsForEvents(input, supportedHookEvents) {
|
|
115
|
+
return buildBehaviorsMap({
|
|
116
|
+
loadContext: supportsEvent(supportedHookEvents, "SessionStart")
|
|
117
|
+
? input.loadContext
|
|
118
|
+
: false,
|
|
119
|
+
babysitDefault: supportsEvent(supportedHookEvents, "SessionStart")
|
|
120
|
+
? input.babysitDefault
|
|
121
|
+
: false,
|
|
122
|
+
damageControlBash: supportsEvent(supportedHookEvents, "PreToolUse")
|
|
123
|
+
? input.damageControlBash
|
|
124
|
+
: false,
|
|
125
|
+
damageControlEdit: supportsEvent(supportedHookEvents, "PreToolUse")
|
|
126
|
+
? input.damageControlEdit
|
|
127
|
+
: false,
|
|
128
|
+
damageControlWrite: supportsEvent(supportedHookEvents, "PreToolUse")
|
|
129
|
+
? input.damageControlWrite
|
|
130
|
+
: false,
|
|
131
|
+
preCompactState: supportsEvent(supportedHookEvents, "PostCompact")
|
|
132
|
+
? input.preCompactState
|
|
133
|
+
: false,
|
|
93
134
|
});
|
|
135
|
+
}
|
|
94
136
|
|
|
95
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Wrap each Clack prompt to handle Ctrl+C / Esc consistently.
|
|
139
|
+
*
|
|
140
|
+
* @template T
|
|
141
|
+
* @param {T | symbol} value
|
|
142
|
+
* @returns {T}
|
|
143
|
+
*/
|
|
144
|
+
function ensureNotCancelled(value) {
|
|
145
|
+
if (prompts.isCancel(value)) {
|
|
96
146
|
prompts.cancel("Setup cancelled. No changes made.");
|
|
97
147
|
process.exit(1);
|
|
98
148
|
}
|
|
149
|
+
return /** @type {T} */ (value);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Interactive picker. Asks one question per behavior, with a follow-up
|
|
154
|
+
* multiselect for damage control when enabled.
|
|
155
|
+
*
|
|
156
|
+
* @param {Partial<Behaviors>} [currentBehaviors]
|
|
157
|
+
* @param {Set<string>|string[]} [supportedHookEvents]
|
|
158
|
+
* @returns {Promise<Behaviors>}
|
|
159
|
+
*/
|
|
160
|
+
async function pickBehaviors(currentBehaviors, supportedHookEvents) {
|
|
161
|
+
/** @type {Partial<Behaviors>} */
|
|
162
|
+
const result = {};
|
|
163
|
+
|
|
164
|
+
const supportsSessionStart = supportsEvent(
|
|
165
|
+
supportedHookEvents,
|
|
166
|
+
"SessionStart",
|
|
167
|
+
);
|
|
168
|
+
const supportsPreCompact = supportsEvent(supportedHookEvents, "PostCompact");
|
|
169
|
+
const supportsPreToolUse = supportsEvent(supportedHookEvents, "PreToolUse");
|
|
170
|
+
|
|
171
|
+
if (supportsSessionStart) {
|
|
172
|
+
for (const opt of BEHAVIOR_OPTIONS.filter(
|
|
173
|
+
(o) => o.key !== "preCompactState",
|
|
174
|
+
)) {
|
|
175
|
+
const choice = ensureNotCancelled(
|
|
176
|
+
await prompts.confirm({
|
|
177
|
+
message: questionMessage(opt.label, opt.hint),
|
|
178
|
+
initialValue: initialFor(currentBehaviors, opt.key),
|
|
179
|
+
}),
|
|
180
|
+
);
|
|
181
|
+
result[opt.key] = Boolean(choice);
|
|
182
|
+
}
|
|
183
|
+
} else {
|
|
184
|
+
result.loadContext = false;
|
|
185
|
+
result.babysitDefault = false;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (supportsPreCompact) {
|
|
189
|
+
const opt = BEHAVIOR_OPTIONS.find((o) => o.key === "preCompactState");
|
|
190
|
+
const choice = ensureNotCancelled(
|
|
191
|
+
await prompts.confirm({
|
|
192
|
+
message: questionMessage(opt.label, opt.hint),
|
|
193
|
+
initialValue: initialFor(currentBehaviors, opt.key),
|
|
194
|
+
}),
|
|
195
|
+
);
|
|
196
|
+
result[opt.key] = Boolean(choice);
|
|
197
|
+
} else {
|
|
198
|
+
result.preCompactState = false;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (supportsPreToolUse) {
|
|
202
|
+
// Damage control: master toggle, then per-tool sub-toggles when on.
|
|
203
|
+
const anyDamageOn =
|
|
204
|
+
initialFor(currentBehaviors, "damageControlBash") ||
|
|
205
|
+
initialFor(currentBehaviors, "damageControlEdit") ||
|
|
206
|
+
initialFor(currentBehaviors, "damageControlWrite");
|
|
207
|
+
|
|
208
|
+
const damageOn = ensureNotCancelled(
|
|
209
|
+
await prompts.confirm({
|
|
210
|
+
message: questionMessage(
|
|
211
|
+
"Enable damage control hooks",
|
|
212
|
+
"Block risky Bash, Edit, and Write actions before they run.",
|
|
213
|
+
),
|
|
214
|
+
initialValue: anyDamageOn,
|
|
215
|
+
}),
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
if (!damageOn) {
|
|
219
|
+
result.damageControlBash = false;
|
|
220
|
+
result.damageControlEdit = false;
|
|
221
|
+
result.damageControlWrite = false;
|
|
222
|
+
} else {
|
|
223
|
+
const initialTools = DAMAGE_CONTROL_TOOLS.filter((t) =>
|
|
224
|
+
initialFor(currentBehaviors, t.key),
|
|
225
|
+
).map((t) => t.key);
|
|
226
|
+
|
|
227
|
+
const picked = ensureNotCancelled(
|
|
228
|
+
await prompts.multiselect({
|
|
229
|
+
message: questionMessage("Which tools should be guarded?"),
|
|
230
|
+
options: DAMAGE_CONTROL_TOOLS.map((t) => ({
|
|
231
|
+
value: t.key,
|
|
232
|
+
label: chalk.bold(t.label),
|
|
233
|
+
hint: t.hint,
|
|
234
|
+
})),
|
|
235
|
+
initialValues: initialTools.length
|
|
236
|
+
? initialTools
|
|
237
|
+
: DAMAGE_CONTROL_TOOLS.map((t) => t.key),
|
|
238
|
+
required: false,
|
|
239
|
+
}),
|
|
240
|
+
);
|
|
241
|
+
const set = new Set(/** @type {string[]} */ (picked));
|
|
242
|
+
for (const t of DAMAGE_CONTROL_TOOLS) {
|
|
243
|
+
result[t.key] = set.has(t.key);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
} else {
|
|
247
|
+
result.damageControlBash = false;
|
|
248
|
+
result.damageControlEdit = false;
|
|
249
|
+
result.damageControlWrite = false;
|
|
250
|
+
}
|
|
99
251
|
|
|
100
|
-
return
|
|
252
|
+
return normalizeBehaviorsForEvents(result, supportedHookEvents);
|
|
101
253
|
}
|
|
102
254
|
|
|
103
255
|
module.exports = {
|
|
104
256
|
pickBehaviors,
|
|
105
257
|
buildBehaviorsMap,
|
|
106
|
-
initialSelectedKeys,
|
|
107
258
|
BEHAVIOR_OPTIONS,
|
|
259
|
+
DAMAGE_CONTROL_TOOLS,
|
|
260
|
+
supportsEvent,
|
|
261
|
+
normalizeBehaviorsForEvents,
|
|
108
262
|
};
|
|
@@ -1,57 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* IDE / CLI picker — Clack
|
|
2
|
+
* IDE / CLI picker — Clack multiselect prompt.
|
|
3
3
|
*
|
|
4
|
-
* Asks the user which agentic
|
|
5
|
-
*
|
|
6
|
-
* `agileflow.config.json` at `ide.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Asks the user which agentic IDEs / CLIs to install AgileFlow into.
|
|
5
|
+
* Multiple selections are supported (space toggles); the result is
|
|
6
|
+
* persisted to `agileflow.config.json` at `ide.targets`. The installer
|
|
7
|
+
* mirrors skills into each selected IDE's dotdir and writes hooks /
|
|
8
|
+
* settings only into IDEs whose capability map declares them.
|
|
9
9
|
*/
|
|
10
|
-
const prompts = require(
|
|
10
|
+
const prompts = require("@clack/prompts");
|
|
11
11
|
const {
|
|
12
12
|
IDE_CAPABILITIES,
|
|
13
13
|
SUPPORTED_IDES,
|
|
14
14
|
capabilitiesFor,
|
|
15
|
-
} = require(
|
|
15
|
+
} = require("../../runtime/ide/capabilities.js");
|
|
16
|
+
const { questionMessage } = require("../../lib/brand.js");
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
|
-
* @param {string}
|
|
19
|
-
* @returns {Promise<string>} selected ide
|
|
19
|
+
* @param {string[]} currentTargets - existing config's ide.targets
|
|
20
|
+
* @returns {Promise<string[]>} selected ide ids (>=1)
|
|
20
21
|
*/
|
|
21
|
-
async function
|
|
22
|
-
const
|
|
22
|
+
async function pickIdes(currentTargets) {
|
|
23
|
+
const valid = (currentTargets || []).filter((id) =>
|
|
24
|
+
SUPPORTED_IDES.includes(id),
|
|
25
|
+
);
|
|
26
|
+
const initialValues = valid.length ? valid : ["claude-code"];
|
|
23
27
|
|
|
24
|
-
const choice = await prompts.
|
|
25
|
-
message:
|
|
28
|
+
const choice = await prompts.multiselect({
|
|
29
|
+
message: questionMessage(
|
|
30
|
+
"Which IDEs / CLIs should AgileFlow install into?",
|
|
31
|
+
),
|
|
26
32
|
options: SUPPORTED_IDES.map((id) => {
|
|
27
33
|
const caps = IDE_CAPABILITIES[id];
|
|
28
|
-
const
|
|
34
|
+
const features = ["hooks", "skills", "agents"]
|
|
29
35
|
.filter((f) => caps[f])
|
|
30
|
-
.join(
|
|
36
|
+
.join(", ");
|
|
31
37
|
return {
|
|
32
38
|
value: id,
|
|
33
39
|
label: caps.description,
|
|
34
|
-
hint:
|
|
40
|
+
hint: features || "(limited)",
|
|
35
41
|
};
|
|
36
42
|
}),
|
|
37
|
-
|
|
43
|
+
initialValues,
|
|
44
|
+
required: true,
|
|
38
45
|
});
|
|
39
46
|
|
|
40
47
|
if (prompts.isCancel(choice)) {
|
|
41
|
-
prompts.cancel(
|
|
48
|
+
prompts.cancel("Setup cancelled. No changes made.");
|
|
42
49
|
process.exit(1);
|
|
43
50
|
}
|
|
44
51
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
);
|
|
52
|
+
const targets = /** @type {string[]} */ (choice);
|
|
53
|
+
|
|
54
|
+
// Surface what each target won't get — so a user picking only Cursor
|
|
55
|
+
// isn't surprised that hooks/agents weren't installed.
|
|
56
|
+
for (const id of targets) {
|
|
57
|
+
const caps = capabilitiesFor(id);
|
|
58
|
+
const disabled = ["hooks", "skills", "agents"].filter((f) => !caps[f]);
|
|
59
|
+
if (disabled.length) {
|
|
60
|
+
prompts.log.warn(
|
|
61
|
+
`${caps.description}: ${disabled.join(", ")} are not available here.`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
52
64
|
}
|
|
53
65
|
|
|
54
|
-
return
|
|
66
|
+
return targets;
|
|
55
67
|
}
|
|
56
68
|
|
|
57
|
-
module.exports = {
|
|
69
|
+
module.exports = { pickIdes };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install scope picker — choose project-local or user-global install roots.
|
|
3
|
+
*/
|
|
4
|
+
const prompts = require("@clack/prompts");
|
|
5
|
+
const { optionLabel, questionMessage } = require("../../lib/brand.js");
|
|
6
|
+
|
|
7
|
+
const INSTALL_SCOPE_OPTIONS = [
|
|
8
|
+
{
|
|
9
|
+
value: "project",
|
|
10
|
+
label: optionLabel(
|
|
11
|
+
"Project install",
|
|
12
|
+
"Writes AgileFlow into this repository only.",
|
|
13
|
+
),
|
|
14
|
+
hint: "Best when each repo has its own plugins, hooks, and state.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: "global",
|
|
18
|
+
label: optionLabel(
|
|
19
|
+
"Global install",
|
|
20
|
+
"Writes AgileFlow once under your home directory.",
|
|
21
|
+
),
|
|
22
|
+
hint: "Best when you want the same commands and agents available everywhere.",
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {string | undefined} currentScope
|
|
28
|
+
* @returns {'project' | 'global'}
|
|
29
|
+
*/
|
|
30
|
+
function initialInstallScope(currentScope) {
|
|
31
|
+
return currentScope === "global" ? "global" : "project";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @param {string | undefined} currentScope
|
|
36
|
+
* @returns {Promise<'project' | 'global'>}
|
|
37
|
+
*/
|
|
38
|
+
async function pickInstallScope(currentScope = "project") {
|
|
39
|
+
const choice = await prompts.select({
|
|
40
|
+
message: questionMessage("Where should AgileFlow install?"),
|
|
41
|
+
options: INSTALL_SCOPE_OPTIONS,
|
|
42
|
+
initialValue: initialInstallScope(currentScope),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (prompts.isCancel(choice)) {
|
|
46
|
+
prompts.cancel("Setup cancelled. No changes made.");
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return /** @type {'project' | 'global'} */ (choice);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
module.exports = {
|
|
54
|
+
INSTALL_SCOPE_OPTIONS,
|
|
55
|
+
initialInstallScope,
|
|
56
|
+
pickInstallScope,
|
|
57
|
+
};
|