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,328 @@
|
|
|
1
|
+
# Security Patterns Reference
|
|
2
|
+
|
|
3
|
+
**Load this when:** reviewing code with security implications — auth changes, user input handling, database queries, file operations, cryptography, or external integrations.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## OWASP Top 10 (2021) — Review Checklist
|
|
8
|
+
|
|
9
|
+
### A01: Broken Access Control
|
|
10
|
+
|
|
11
|
+
The #1 most common vulnerability. Users can access resources or perform actions they shouldn't.
|
|
12
|
+
|
|
13
|
+
**Patterns to look for:**
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
// BAD — IDOR: user can access any account by changing the ID
|
|
17
|
+
app.get("/api/orders/:orderId", async (req, res) => {
|
|
18
|
+
const order = await Order.findById(req.params.orderId);
|
|
19
|
+
res.json(order); // No check that order belongs to req.user!
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// GOOD — ownership check before returning data
|
|
23
|
+
app.get("/api/orders/:orderId", requireAuth, async (req, res) => {
|
|
24
|
+
const order = await Order.findById(req.params.orderId);
|
|
25
|
+
if (!order || order.userId !== req.user.id) {
|
|
26
|
+
return res.status(404).json({ error: "Not found" });
|
|
27
|
+
}
|
|
28
|
+
res.json(order);
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**What to check:**
|
|
33
|
+
|
|
34
|
+
- Every endpoint that returns or modifies user data checks ownership
|
|
35
|
+
- Admin endpoints have role-based access checks
|
|
36
|
+
- Resource IDs are not predictable/guessable (UUIDs, not auto-increment)
|
|
37
|
+
- Access checks are server-side, not just UI-hidden
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### A02: Cryptographic Failures
|
|
42
|
+
|
|
43
|
+
Sensitive data exposed due to weak encryption, missing encryption, or improper key management.
|
|
44
|
+
|
|
45
|
+
**Patterns to look for:**
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
# BAD — MD5 for password hashing (trivially crackable)
|
|
49
|
+
import hashlib
|
|
50
|
+
password_hash = hashlib.md5(password.encode()).hexdigest()
|
|
51
|
+
|
|
52
|
+
# GOOD — bcrypt with appropriate cost factor
|
|
53
|
+
import bcrypt
|
|
54
|
+
password_hash = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
|
|
55
|
+
|
|
56
|
+
# BAD — SHA256 without salt (rainbow table vulnerable)
|
|
57
|
+
password_hash = hashlib.sha256(password.encode()).hexdigest()
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
// BAD — token generated with Math.random() (predictable)
|
|
62
|
+
const token = Math.random().toString(36).slice(2);
|
|
63
|
+
|
|
64
|
+
// GOOD — cryptographically secure token
|
|
65
|
+
const token = crypto.randomBytes(32).toString("hex");
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**What to check:**
|
|
69
|
+
|
|
70
|
+
- Passwords use bcrypt, argon2, or scrypt (never MD5, SHA1, SHA256 alone)
|
|
71
|
+
- Session tokens use `crypto.randomBytes` or equivalent
|
|
72
|
+
- Sensitive data (PII, payment info) encrypted at rest in database
|
|
73
|
+
- TLS enforced — no HTTP fallback for sensitive operations
|
|
74
|
+
- API keys / secrets not hardcoded in source code (use env vars)
|
|
75
|
+
- JWT `alg: none` not accepted
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### A03: Injection
|
|
80
|
+
|
|
81
|
+
User input flows into interpreters (SQL, shell, HTML, LDAP) without sanitisation.
|
|
82
|
+
|
|
83
|
+
**SQL Injection:**
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
// BAD — raw string interpolation
|
|
87
|
+
const user = await db.query(`SELECT * FROM users WHERE email = '${email}'`);
|
|
88
|
+
// Payload: ' OR '1'='1 — dumps all users
|
|
89
|
+
|
|
90
|
+
// GOOD — parameterised query
|
|
91
|
+
const user = await db.query("SELECT * FROM users WHERE email = $1", [email]);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
# BAD
|
|
96
|
+
cursor.execute(f"SELECT * FROM users WHERE email = '{email}'")
|
|
97
|
+
|
|
98
|
+
# GOOD
|
|
99
|
+
cursor.execute("SELECT * FROM users WHERE email = %s", (email,))
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Command Injection:**
|
|
103
|
+
|
|
104
|
+
```js
|
|
105
|
+
// BAD — user input in shell command
|
|
106
|
+
const { execSync } = require("child_process");
|
|
107
|
+
execSync(`convert ${req.body.filename} output.jpg`);
|
|
108
|
+
// Payload: "file.jpg && rm -rf /"
|
|
109
|
+
|
|
110
|
+
// GOOD — use a library instead of shell, or validate input strictly
|
|
111
|
+
const sharp = require("sharp");
|
|
112
|
+
await sharp(sanitisedFilePath).toFile("output.jpg");
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Path Traversal:**
|
|
116
|
+
|
|
117
|
+
```js
|
|
118
|
+
// BAD — allows ../../../etc/passwd
|
|
119
|
+
const filePath = path.join("/uploads", req.params.filename);
|
|
120
|
+
|
|
121
|
+
// GOOD — resolve and check it stays inside the intended directory
|
|
122
|
+
const filePath = path.resolve("/uploads", req.params.filename);
|
|
123
|
+
if (!filePath.startsWith(path.resolve("/uploads"))) {
|
|
124
|
+
return res.status(400).json({ error: "Invalid path" });
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### A04: Insecure Design
|
|
131
|
+
|
|
132
|
+
Architectural flaws in security model. These can't be fixed by patching code — they require design changes.
|
|
133
|
+
|
|
134
|
+
**Red flags to raise:**
|
|
135
|
+
|
|
136
|
+
- Passwords or tokens sent as URL query parameters (appear in server logs)
|
|
137
|
+
- Email-based "magic link" login with no expiry
|
|
138
|
+
- Password reset that reveals whether an email is registered (email enumeration)
|
|
139
|
+
- Rate limiting absent on authentication endpoints (brute-force vulnerable)
|
|
140
|
+
- File uploads with no type validation or virus scanning
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### A05: Security Misconfiguration
|
|
145
|
+
|
|
146
|
+
**Patterns to check:**
|
|
147
|
+
|
|
148
|
+
- `DEBUG=true` or equivalent in production code
|
|
149
|
+
- Error responses include stack traces or internal paths
|
|
150
|
+
- Default credentials in database or admin panel setup
|
|
151
|
+
- CORS configured as `Access-Control-Allow-Origin: *` on authenticated endpoints
|
|
152
|
+
- HTTP security headers missing (CSP, X-Frame-Options, X-Content-Type-Options)
|
|
153
|
+
- Directory listing enabled on static file server
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### A06: Vulnerable and Outdated Components
|
|
158
|
+
|
|
159
|
+
Not a code review finding, but flag if you see:
|
|
160
|
+
|
|
161
|
+
- `require('crypto-js')` for password hashing (use Node's built-in `crypto` or `bcrypt`)
|
|
162
|
+
- Old `jsonwebtoken` patterns without algorithm validation
|
|
163
|
+
- Direct eval of JSON from external sources
|
|
164
|
+
- Known-vulnerable package versions (check with `npm audit` / `pip-audit`)
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### A07: Identification and Authentication Failures
|
|
169
|
+
|
|
170
|
+
```js
|
|
171
|
+
// BAD — brute-force vulnerable login with no rate limiting
|
|
172
|
+
app.post("/login", async (req, res) => {
|
|
173
|
+
const user = await User.findByEmail(req.body.email);
|
|
174
|
+
if (user && user.password === req.body.password) {
|
|
175
|
+
// also: plaintext comparison!
|
|
176
|
+
req.session.userId = user.id;
|
|
177
|
+
res.json({ success: true });
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// GOOD — rate limited, constant-time comparison, bcrypt
|
|
182
|
+
import rateLimit from "express-rate-limit";
|
|
183
|
+
import bcrypt from "bcrypt";
|
|
184
|
+
|
|
185
|
+
const loginLimiter = rateLimit({ windowMs: 15 * 60 * 1000, max: 10 });
|
|
186
|
+
|
|
187
|
+
app.post("/login", loginLimiter, async (req, res) => {
|
|
188
|
+
const user = await User.findByEmail(req.body.email);
|
|
189
|
+
const match =
|
|
190
|
+
user && (await bcrypt.compare(req.body.password, user.passwordHash));
|
|
191
|
+
if (!match) return res.status(401).json({ error: "Invalid credentials" });
|
|
192
|
+
req.session.userId = user.id;
|
|
193
|
+
res.json({ success: true });
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**What to check:**
|
|
198
|
+
|
|
199
|
+
- Rate limiting on login, password reset, and email verification endpoints
|
|
200
|
+
- Account lockout after N failed attempts (or CAPTCHA)
|
|
201
|
+
- Session tokens regenerated after privilege escalation (login, role change)
|
|
202
|
+
- Sessions invalidated on logout (server-side session store, not just clearing the cookie)
|
|
203
|
+
- JWT expiry enforced — `exp` claim checked
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### A08: Software and Data Integrity Failures
|
|
208
|
+
|
|
209
|
+
- Deserialisation of untrusted data (pickle in Python, Java ObjectInputStream)
|
|
210
|
+
- CI/CD pipelines that pull dependencies without checksum verification
|
|
211
|
+
- Auto-update mechanisms that don't verify signatures
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### A09: Security Logging and Monitoring Failures
|
|
216
|
+
|
|
217
|
+
**What to check:**
|
|
218
|
+
|
|
219
|
+
- Failed login attempts logged (email, IP, timestamp — NOT the attempted password)
|
|
220
|
+
- Admin actions logged (who did what, when)
|
|
221
|
+
- Logs don't contain sensitive data (passwords, full credit card numbers, session tokens)
|
|
222
|
+
- Errors logged with enough context to investigate (request ID, user ID if available)
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### A10: Server-Side Request Forgery (SSRF)
|
|
227
|
+
|
|
228
|
+
Relevant when the application fetches URLs provided by the user.
|
|
229
|
+
|
|
230
|
+
```js
|
|
231
|
+
// BAD — user can point the server to internal services
|
|
232
|
+
app.post("/fetch-preview", async (req, res) => {
|
|
233
|
+
const html = await fetch(req.body.url).then((r) => r.text());
|
|
234
|
+
res.json({ html });
|
|
235
|
+
// Payload: http://169.254.169.254/latest/meta-data/ (AWS metadata endpoint)
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// GOOD — validate URL is on an allowlist of external domains
|
|
239
|
+
const ALLOWED_HOSTS = ["example.com", "another-trusted.com"];
|
|
240
|
+
const url = new URL(req.body.url);
|
|
241
|
+
if (!ALLOWED_HOSTS.includes(url.hostname)) {
|
|
242
|
+
return res.status(400).json({ error: "URL not allowed" });
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Mass Assignment
|
|
249
|
+
|
|
250
|
+
**Web frameworks that auto-bind request body to model fields:**
|
|
251
|
+
|
|
252
|
+
```js
|
|
253
|
+
// BAD — user can set any field, including isAdmin
|
|
254
|
+
const user = new User(req.body);
|
|
255
|
+
await user.save();
|
|
256
|
+
|
|
257
|
+
// GOOD — whitelist only the fields you intend to update
|
|
258
|
+
const { name, email } = req.body;
|
|
259
|
+
const user = new User({ name, email });
|
|
260
|
+
await user.save();
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
```python
|
|
264
|
+
# BAD — Flask-SQLAlchemy mass assignment
|
|
265
|
+
user = User(**request.json)
|
|
266
|
+
|
|
267
|
+
# GOOD
|
|
268
|
+
user = User(
|
|
269
|
+
name=request.json['name'],
|
|
270
|
+
email=request.json['email'],
|
|
271
|
+
)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## JWT-specific issues
|
|
277
|
+
|
|
278
|
+
```js
|
|
279
|
+
// BAD — algorithm confusion attack: accept 'none' or HS256 when expecting RS256
|
|
280
|
+
jwt.verify(token, publicKey); // default options accept alg: none
|
|
281
|
+
|
|
282
|
+
// GOOD — explicitly specify allowed algorithms
|
|
283
|
+
jwt.verify(token, publicKey, { algorithms: ["RS256"] });
|
|
284
|
+
|
|
285
|
+
// BAD — not checking expiry
|
|
286
|
+
const decoded = jwt.decode(token); // decode does NOT verify signature or expiry
|
|
287
|
+
|
|
288
|
+
// GOOD — always verify, never just decode in auth paths
|
|
289
|
+
const decoded = jwt.verify(token, secret);
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## File upload security
|
|
295
|
+
|
|
296
|
+
```js
|
|
297
|
+
// BAD — no type checking, stores user filename directly
|
|
298
|
+
app.post("/upload", upload.single("file"), (req, res) => {
|
|
299
|
+
fs.renameSync(req.file.path, `/uploads/${req.file.originalname}`);
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
// GOOD — validate MIME type, generate safe filename
|
|
303
|
+
const ALLOWED_TYPES = ["image/jpeg", "image/png", "image/webp"];
|
|
304
|
+
if (!ALLOWED_TYPES.includes(req.file.mimetype)) {
|
|
305
|
+
return res.status(400).json({ error: "File type not allowed" });
|
|
306
|
+
}
|
|
307
|
+
const safeFilename = `${crypto.randomUUID()}${path.extname(req.file.originalname)}`;
|
|
308
|
+
fs.renameSync(req.file.path, `/uploads/${safeFilename}`);
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Severity mapping for review findings
|
|
314
|
+
|
|
315
|
+
| Finding | OWASP category | Severity |
|
|
316
|
+
| ------------------------------ | -------------- | -------------------------- |
|
|
317
|
+
| SQL injection | A03 | P0 — block merge |
|
|
318
|
+
| Auth bypass | A07 | P0 — block merge |
|
|
319
|
+
| IDOR (missing ownership check) | A01 | P0 — block merge |
|
|
320
|
+
| Hardcoded secret | A02 | P0 — block merge |
|
|
321
|
+
| Plaintext password storage | A02 | P0 — block merge |
|
|
322
|
+
| Missing rate limiting on login | A07 | P1 |
|
|
323
|
+
| XSS (unescaped output) | A03 | P0–P1 depending on context |
|
|
324
|
+
| Missing CSRF | A01 | P1 |
|
|
325
|
+
| Sensitive data in logs | A09 | P1 |
|
|
326
|
+
| No JWT algorithm restriction | A02 | P1 |
|
|
327
|
+
| Missing security headers | A05 | P2 |
|
|
328
|
+
| Mass assignment | A08 | P0–P1 depending on fields |
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Workflow: Review PR
|
|
2
|
+
|
|
3
|
+
**Triggers:** "review this PR", "review my changes", "check my code", user shares a diff or file changes
|
|
4
|
+
|
|
5
|
+
**Goal:** Produce a structured, prioritised review with findings across all dimensions and a clear merge recommendation.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Inputs needed
|
|
10
|
+
|
|
11
|
+
| Input | Required | How to get it |
|
|
12
|
+
| ------------------------- | --------- | ----------------------------------------------------- |
|
|
13
|
+
| The diff or changed files | Yes | Paste, file paths, or `git diff` output |
|
|
14
|
+
| PR description / context | Preferred | Paste; or ask "What does this change do?" |
|
|
15
|
+
| Target branch | No | Usually `main` — ask if branching strategy is unusual |
|
|
16
|
+
| Change type | Preferred | Feature, bugfix, refactor, chore |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
### Step 1: Read the change
|
|
23
|
+
|
|
24
|
+
Read every changed file fully. Don't skim. Build a complete picture of:
|
|
25
|
+
|
|
26
|
+
- What the change is doing
|
|
27
|
+
- What it's removing
|
|
28
|
+
- What assumptions the author is making
|
|
29
|
+
|
|
30
|
+
### Step 2: Read the surrounding context
|
|
31
|
+
|
|
32
|
+
For each changed file:
|
|
33
|
+
|
|
34
|
+
- Read 20–30 lines above and below each change for context
|
|
35
|
+
- Check if there is an existing test file for this module
|
|
36
|
+
- Check if there are related files that should also have changed but didn't
|
|
37
|
+
|
|
38
|
+
### Step 3: Check the PR description
|
|
39
|
+
|
|
40
|
+
If no PR description was provided, ask:
|
|
41
|
+
|
|
42
|
+
- "What does this change do and why?"
|
|
43
|
+
- "Is there a ticket or issue this corresponds to?"
|
|
44
|
+
|
|
45
|
+
A PR without a description is harder to review — flag this as a P3 finding.
|
|
46
|
+
|
|
47
|
+
### Step 4: Run dimension checks
|
|
48
|
+
|
|
49
|
+
Work through each dimension from `references/review-checklist.md` that applies to this change:
|
|
50
|
+
|
|
51
|
+
| Change type | Dimensions to run |
|
|
52
|
+
| -------------------------- | ------------------------------------ |
|
|
53
|
+
| New feature with endpoints | Security, Logic, Tests, API Contract |
|
|
54
|
+
| Bug fix | Logic, Tests |
|
|
55
|
+
| Refactor | Logic, Tests, Breaking Changes |
|
|
56
|
+
| Auth-related change | Security (full), Logic, Tests |
|
|
57
|
+
| Database migration | API Contract, Breaking Changes |
|
|
58
|
+
| Dependency update | Security (A06), Tests |
|
|
59
|
+
| UI / frontend only | Logic, Tests, style |
|
|
60
|
+
|
|
61
|
+
### Step 5: Collect all findings
|
|
62
|
+
|
|
63
|
+
List every finding as you go. Don't filter yet — capture everything.
|
|
64
|
+
|
|
65
|
+
### Step 6: Assign severities
|
|
66
|
+
|
|
67
|
+
Review the collected findings and assign P0–P3 using the severity table in the SKILL.md.
|
|
68
|
+
|
|
69
|
+
When in doubt between severities:
|
|
70
|
+
|
|
71
|
+
- If it can cause data loss, a security breach, or a crash in production → P0
|
|
72
|
+
- If it will cause incorrect behaviour → P1
|
|
73
|
+
- If it should be tested but isn't → P2
|
|
74
|
+
- If it's a style or readability concern → P3
|
|
75
|
+
|
|
76
|
+
### Step 7: Sort and present findings
|
|
77
|
+
|
|
78
|
+
Present findings in P0 → P3 order. For each:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
[P{level}] {DIMENSION} — {One-line summary}
|
|
82
|
+
File: {filename}, line {N}
|
|
83
|
+
Issue: {What is wrong and why it matters}
|
|
84
|
+
Fix: {Concrete suggestion}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 8: Write the summary block
|
|
88
|
+
|
|
89
|
+
Always end with a structured summary:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
─────────────────────────────────────
|
|
93
|
+
REVIEW SUMMARY
|
|
94
|
+
─────────────────────────────────────
|
|
95
|
+
Files reviewed: {N}
|
|
96
|
+
Lines changed: +{added} / -{removed}
|
|
97
|
+
Findings: {P0 count} P0, {P1 count} P1, {P2 count} P2, {P3 count} P3
|
|
98
|
+
|
|
99
|
+
VERDICT: {APPROVE | REQUEST CHANGES | NEEDS DISCUSSION}
|
|
100
|
+
|
|
101
|
+
{If REQUEST CHANGES: list the must-fix items}
|
|
102
|
+
{If APPROVE: one sentence on what looks good}
|
|
103
|
+
{If NEEDS DISCUSSION: what the design question is}
|
|
104
|
+
─────────────────────────────────────
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Step 9: Offer next step
|
|
108
|
+
|
|
109
|
+
```xml
|
|
110
|
+
<invoke name="AskUserQuestion">
|
|
111
|
+
<parameter name="questions">[{
|
|
112
|
+
"question": "Review complete — {verdict}. {N} findings.",
|
|
113
|
+
"header": "What next",
|
|
114
|
+
"multiSelect": false,
|
|
115
|
+
"options": [
|
|
116
|
+
{"label": "Fix the P0 and P1 issues now (Recommended)", "description": "I'll work through each finding and write the corrected code"},
|
|
117
|
+
{"label": "Explain a specific finding in more detail", "description": "Tell me which finding number you want me to expand on"},
|
|
118
|
+
{"label": "Write the missing tests", "description": "I'll add tests for the uncovered paths flagged in P2 findings"},
|
|
119
|
+
{"label": "Re-review after fixes", "description": "Once you've addressed the findings, share the updated diff for a re-review"}
|
|
120
|
+
]
|
|
121
|
+
}]</parameter>
|
|
122
|
+
</invoke>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Special handling for large PRs (> 400 LOC)
|
|
128
|
+
|
|
129
|
+
If the diff is very large:
|
|
130
|
+
|
|
131
|
+
1. Flag this as a P3 finding: "PRs over ~400 LOC are harder to review thoroughly and increase merge risk — consider splitting."
|
|
132
|
+
2. Ask if there are sections to prioritise: "This is a large change. Shall I focus on the security-sensitive parts first?"
|
|
133
|
+
3. Review in passes: security first, then logic, then tests, then style
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Fallbacks
|
|
138
|
+
|
|
139
|
+
**If AskUserQuestion is unavailable:**
|
|
140
|
+
|
|
141
|
+
Present the next step as a numbered list:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Review complete — REQUEST CHANGES. 3 findings.
|
|
145
|
+
|
|
146
|
+
To continue:
|
|
147
|
+
1. Fix the 3 findings now — I'll write the corrected code for each
|
|
148
|
+
2. Explain finding #1 (SQL injection) in more detail
|
|
149
|
+
3. Write the missing tests flagged in finding #3
|
|
150
|
+
4. Mark as done and re-review the updated diff
|
|
151
|
+
|
|
152
|
+
Reply with a number or describe what you want to do next.
|
|
153
|
+
```
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Workflow: Security Review
|
|
2
|
+
|
|
3
|
+
**Triggers:** user asks for a security review, change touches auth/login/permissions/file-upload/payments/database queries, or a P0 security finding was flagged in a standard review
|
|
4
|
+
|
|
5
|
+
**Goal:** Systematic, OWASP-anchored security review of the changed code, producing a prioritised list of vulnerabilities with concrete fixes.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to run a full security review
|
|
10
|
+
|
|
11
|
+
Run this workflow (instead of the standard review) when:
|
|
12
|
+
|
|
13
|
+
- Change touches authentication or session management
|
|
14
|
+
- Change adds or modifies API endpoints that handle user data
|
|
15
|
+
- Change adds file upload, import, or download functionality
|
|
16
|
+
- Change modifies database queries or ORM calls
|
|
17
|
+
- Change handles payments, billing, or financial data
|
|
18
|
+
- Change adds cryptographic operations (hashing, signing, encryption)
|
|
19
|
+
- Change modifies CORS, security headers, or cookie settings
|
|
20
|
+
- Change introduces a third-party integration with data exchange
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Inputs needed
|
|
25
|
+
|
|
26
|
+
| Input | Required | How to get it |
|
|
27
|
+
| --------------------- | --------- | ----------------------------------------------------------- |
|
|
28
|
+
| Changed files | Yes | Paste or file paths |
|
|
29
|
+
| What the change does | Yes | PR description or ask |
|
|
30
|
+
| Framework / language | Yes | Detect from code |
|
|
31
|
+
| Auth mechanism in use | Preferred | Ask: "How does this app handle auth? JWT, sessions, OAuth?" |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
### Step 1: Identify the attack surface
|
|
38
|
+
|
|
39
|
+
Map what user-controlled input enters the system in this change:
|
|
40
|
+
|
|
41
|
+
- HTTP request body, query params, headers
|
|
42
|
+
- File uploads
|
|
43
|
+
- URLs fetched by the server
|
|
44
|
+
- Database record fields updated by the user
|
|
45
|
+
- External webhook payloads
|
|
46
|
+
|
|
47
|
+
For each input, trace where it goes:
|
|
48
|
+
|
|
49
|
+
- Into a SQL query?
|
|
50
|
+
- Into a shell command?
|
|
51
|
+
- Into an HTML response?
|
|
52
|
+
- Into a file path?
|
|
53
|
+
- Into a redirect URL?
|
|
54
|
+
|
|
55
|
+
### Step 2: Run the OWASP Top 10 checklist
|
|
56
|
+
|
|
57
|
+
Work through each category from `references/security-patterns.md` that is relevant to this change:
|
|
58
|
+
|
|
59
|
+
| Category | Check if change touches... |
|
|
60
|
+
| ----------------------------- | ---------------------------------------------------------- |
|
|
61
|
+
| A01 Broken Access Control | Endpoints returning or modifying user-specific resources |
|
|
62
|
+
| A02 Cryptographic Failures | Password storage, tokens, encryption |
|
|
63
|
+
| A03 Injection | Database queries, shell commands, HTML output, URL parsing |
|
|
64
|
+
| A04 Insecure Design | Auth flows, rate limiting, account recovery |
|
|
65
|
+
| A05 Security Misconfiguration | CORS, headers, debug settings |
|
|
66
|
+
| A07 Auth Failures | Login, logout, session management, JWTs |
|
|
67
|
+
| A08 Integrity Failures | Deserialisation, file processing |
|
|
68
|
+
| A09 Logging Failures | What gets logged — is sensitive data included? |
|
|
69
|
+
| A10 SSRF | Server fetching user-provided URLs |
|
|
70
|
+
|
|
71
|
+
### Step 3: Check for mass assignment
|
|
72
|
+
|
|
73
|
+
For any endpoint that takes a request body and uses it to create or update a database record:
|
|
74
|
+
|
|
75
|
+
1. What fields does the model have?
|
|
76
|
+
2. What fields are in the request body?
|
|
77
|
+
3. Are there fields in the model that should NEVER be user-settable (isAdmin, role, balance, ownerId)?
|
|
78
|
+
4. Is the code whitelisting only the intended fields?
|
|
79
|
+
|
|
80
|
+
### Step 4: Check for information disclosure
|
|
81
|
+
|
|
82
|
+
- Do error messages reveal internal paths, table names, or stack traces?
|
|
83
|
+
- Do 404 and 401 responses behave identically for "not found" vs "not authorised" (to prevent enumeration)?
|
|
84
|
+
- Is debug mode or verbose error mode enabled in any code path?
|
|
85
|
+
|
|
86
|
+
### Step 5: Verify dependency security
|
|
87
|
+
|
|
88
|
+
If the change adds or updates packages:
|
|
89
|
+
|
|
90
|
+
- Note the packages added
|
|
91
|
+
- Flag any known-vulnerable packages (CVE lookup if possible)
|
|
92
|
+
- Check that crypto-related packages are well-maintained
|
|
93
|
+
|
|
94
|
+
### Step 6: Check the test coverage for security paths
|
|
95
|
+
|
|
96
|
+
Security paths that MUST have explicit tests:
|
|
97
|
+
|
|
98
|
+
- Authenticated endpoint with no token → 401
|
|
99
|
+
- Authenticated endpoint with another user's resource ID → 403 or 404
|
|
100
|
+
- Input with SQL injection payload → not executed as SQL
|
|
101
|
+
- File upload with wrong MIME type → rejected
|
|
102
|
+
|
|
103
|
+
If any of these are missing, add them as P2 findings.
|
|
104
|
+
|
|
105
|
+
### Step 7: Produce findings
|
|
106
|
+
|
|
107
|
+
Use the same format as the standard review, but add the OWASP category reference:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
[P0] SECURITY (A03 - Injection) — SQL Injection in user search endpoint
|
|
111
|
+
File: src/api/users.js, line 34
|
|
112
|
+
Issue: User-provided 'search' query param concatenated into SQL:
|
|
113
|
+
`SELECT * FROM users WHERE name LIKE '%${search}%'`
|
|
114
|
+
An attacker can inject: "'; DROP TABLE users; --"
|
|
115
|
+
Fix: Use parameterised query: db.query("SELECT * FROM users WHERE name LIKE $1", [`%${search}%`])
|
|
116
|
+
Test: Add test: POST /api/users/search with payload "'; SELECT 1 --" should return 400 or safe empty result
|
|
117
|
+
|
|
118
|
+
[P0] SECURITY (A01 - Broken Access Control) — Missing ownership check on GET /api/documents/:id
|
|
119
|
+
File: src/api/documents.js, line 18
|
|
120
|
+
Issue: Any authenticated user can fetch any document by guessing its ID
|
|
121
|
+
Fix: Add check: if (doc.ownerId !== req.user.id) return res.status(403).json({ error: 'Forbidden' })
|
|
122
|
+
Test: Add test: authenticated request for another user's document should return 403
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Step 8: Summary and recommendation
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
─────────────────────────────────────
|
|
129
|
+
SECURITY REVIEW SUMMARY
|
|
130
|
+
─────────────────────────────────────
|
|
131
|
+
Attack surface reviewed:
|
|
132
|
+
- {N} API endpoints
|
|
133
|
+
- {M} database operations
|
|
134
|
+
- {K} user-input paths
|
|
135
|
+
|
|
136
|
+
OWASP categories checked: A01, A02, A03, A07 (others N/A for this change)
|
|
137
|
+
|
|
138
|
+
Vulnerabilities found:
|
|
139
|
+
P0: {N} — must fix before merge
|
|
140
|
+
P1: {N} — strong recommendation to fix
|
|
141
|
+
P2: {N} — missing security tests
|
|
142
|
+
|
|
143
|
+
VERDICT: {APPROVE | REQUEST CHANGES}
|
|
144
|
+
─────────────────────────────────────
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Threat modelling quick questions
|
|
150
|
+
|
|
151
|
+
If the security review is for a new feature (not a bugfix), run through these:
|
|
152
|
+
|
|
153
|
+
1. **Who is the adversary?** Unauthenticated users? Authenticated users acting maliciously? Internal bad actors?
|
|
154
|
+
2. **What is the most valuable asset?** User PII? Financial data? Admin capabilities?
|
|
155
|
+
3. **What is the worst-case scenario if this code has a vulnerability?**
|
|
156
|
+
4. **What would a malicious user try first?**
|
|
157
|
+
|
|
158
|
+
Use these to prioritise which attack vectors to investigate most thoroughly.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Fallbacks
|
|
163
|
+
|
|
164
|
+
**If AskUserQuestion is unavailable:**
|
|
165
|
+
|
|
166
|
+
Present findings as a numbered list and ask:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Security review complete. {N} findings.
|
|
170
|
+
|
|
171
|
+
1. Fix all P0 vulnerabilities now — I'll write the corrected code
|
|
172
|
+
2. Explain how to exploit finding #1 (for understanding, not exploitation)
|
|
173
|
+
3. Write the missing security tests
|
|
174
|
+
4. Proceed to standard review after security fixes
|
|
175
|
+
|
|
176
|
+
Reply with a number.
|
|
177
|
+
```
|