claude-flow-novice 2.5.2 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/adaptive-context/cfn-v3-reflection.json +21 -0
- package/.claude/agents/AGENT_LIFECYCLE.md +495 -0
- package/.claude/agents/CLAUDE.md +1002 -1233
- package/.claude/agents/accessibility-advocate.md +457 -0
- package/.claude/agents/agent-principles/README.md +226 -226
- package/.claude/agents/agent-principles/agent-type-guidelines.md +10 -0
- package/.claude/agents/agent-principles/format-selection.md +10 -0
- package/.claude/agents/agent-principles/phase4-template-optimization.md +502 -494
- package/.claude/agents/agent-principles/prompt-engineering.md +8 -0
- package/.claude/agents/agent-principles/quality-metrics.md +8 -0
- package/.claude/agents/analysis/code-analyzer.md +7 -17
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +2 -104
- package/.claude/agents/analysis/perf-analyzer.md +2 -196
- package/.claude/agents/context/context-curator.md +78 -84
- package/.claude/agents/context/context-reflector.md +27 -81
- package/.claude/agents/coordinators/README.md +42 -0
- package/.claude/agents/coordinators/cfn-v3-coordinator.md +440 -0
- package/.claude/agents/{product-owner-team → coordinators}/cto-agent.md +154 -187
- package/.claude/agents/coordinators/multi-sprint-coordinator.md +50 -0
- package/.claude/agents/{product-owner-team → coordinators}/product-owner-agent.md +6 -39
- package/.claude/agents/{cfn-loop → coordinators}/product-owner.md +72 -17
- package/.claude/agents/core-agents/reviewer.md +114 -135
- package/.claude/agents/custom/agent-builder.md +637 -0
- package/.claude/agents/developers/README.md +69 -0
- package/.claude/agents/developers/backend-dev.md +77 -0
- package/.claude/agents/{core-agents → developers}/coder.md +131 -26
- package/.claude/agents/developers/react-frontend-engineer.md +121 -0
- package/.claude/agents/{frontend → developers}/state-architect.md +1 -0
- package/.claude/agents/{frontend → developers}/ui-designer.md +1 -0
- package/.claude/agents/development/backend/dev-backend-api.md +0 -29
- package/.claude/agents/development/npm-package-specialist.md +355 -347
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +8 -0
- package/.claude/agents/documentation/api-docs.md +8 -0
- package/.claude/agents/github/github-commit-agent.md +125 -117
- package/.claude/agents/goal/goal-planner.md +8 -0
- package/.claude/agents/infrastructure/README.md +100 -0
- package/.claude/agents/{specialized → infrastructure}/devops-engineer.md +131 -150
- package/.claude/agents/planners/README.md +94 -0
- package/.claude/agents/{core-agents → planners}/analyst.md +1 -22
- package/.claude/agents/{planning-team → planners}/api-designer-persona.md +8 -0
- package/.claude/agents/{core-agents → planners}/architect.md +7 -20
- package/.claude/agents/{core-agents → planners}/planner.md +0 -21
- package/.claude/agents/{planning-team → planners}/security-architect-persona.md +8 -28
- package/.claude/agents/{planning-team → planners}/system-architect-persona.md +6 -38
- package/.claude/agents/{architecture → planners}/system-architect.md +12 -17
- package/.claude/agents/product-owner-team/accessibility-advocate-persona.md +132 -161
- package/.claude/agents/product-owner-team/power-user-persona.md +149 -182
- package/.claude/agents/retrospective-analyst.md +84 -0
- package/.claude/agents/reviewers/README.md +58 -0
- package/.claude/agents/{analysis → reviewers}/code-quality-validator.md +8 -17
- package/.claude/agents/reviewers/reviewer.md +181 -0
- package/.claude/agents/sparc/architecture.md +6 -25
- package/.claude/agents/sparc/pseudocode.md +6 -0
- package/.claude/agents/sparc/refinement.md +6 -0
- package/.claude/agents/sparc/specification.md +1 -0
- package/.claude/agents/specialists/README.md +60 -0
- package/.claude/agents/{core-agents → specialists}/base-template-generator.md +8 -21
- package/.claude/agents/{specialized → specialists}/cli-agent-optimizer.md +1 -1
- package/.claude/agents/{specialized → specialists}/code-booster.md +1 -0
- package/.claude/agents/{consensus → specialists}/consensus-builder.md +1 -17
- package/.claude/agents/{specialized/mobile → specialists}/mobile-dev.md +0 -20
- package/.claude/agents/{core-agents → specialists}/performance-benchmarker.md +134 -148
- package/.claude/agents/{specialized → specialists}/rust-developer.md +1 -20
- package/.claude/agents/{specialized → specialists}/rust-enterprise-developer.md +1 -20
- package/.claude/agents/{specialized → specialists}/rust-mvp-developer.md +1 -20
- package/.claude/agents/{core-agents → specialists}/security-manager.md +68 -88
- package/.claude/agents/{security → specialists}/security-specialist-existing.md +6 -57
- package/.claude/agents/{security → specialists}/security-specialist.md +6 -30
- package/.claude/agents/{specialized/mobile → specialists}/spec-mobile-react-native.md +2 -21
- package/.claude/agents/testers/README.md +94 -0
- package/.claude/agents/{testing → testers}/e2e/playwright-agent.md +1 -20
- package/.claude/agents/{testing → testers}/interaction-tester.md +1 -20
- package/.claude/agents/{testing → testers}/playwright-tester.md +1 -1
- package/.claude/agents/testers/tester.md +139 -0
- package/.claude/agents/testers/unit/tdd-london-swarm.md +49 -0
- package/.claude/agents/testers/validation/production-validator.md +33 -0
- package/.claude/agents-ignore/cfn-loop-coordinator.md +157 -0
- package/.claude/agents-ignore/cfn-loop-coordinator.md.backup +156 -0
- package/.claude/agents-ignore/coordinator.md.backup +182 -0
- package/.claude/agents-ignore/cost-savings-cfn-loop-coordinator.md +760 -0
- package/.claude/agents-ignore/cost-savings-coordinator.md +173 -0
- package/.claude/artifacts/ace-reflections/REFLECT-001-summary.json +39 -0
- package/.claude/artifacts/ace-reflections/sprint-7_$(date -u +/"%Y%m%d_%H%M%S/").json" +47 -0
- package/.claude/artifacts/reflection-merge-logs/cli-agent-spawning-v2.5.2-merge-report.md +61 -0
- package/.claude/commands/CFN_COORDINATOR_PARAMETERS.md +10 -10
- package/.claude/commands/cfn-loop-epic.md +43 -19
- package/.claude/commands/cfn-loop-single.md +3 -3
- package/.claude/commands/cfn-loop-sprints.md +1 -1
- package/.claude/commands/cfn-loop.md +45 -32
- package/.claude/commands/cfn-mode.md +20 -0
- package/.claude/commands/custom-routing-activate.md +37 -123
- package/.claude/commands/custom-routing-deactivate.md +27 -124
- package/.claude/commands/switch-api.md +41 -16
- package/.claude/commands/write-plan.md +104 -0
- package/.claude/data/cfn-loop.db +0 -0
- package/.claude/data/cfn_loop_logs.db +0 -0
- package/.claude/hooks/BACKUP_USAGE.md +243 -0
- package/.claude/hooks/post-edit-cfn-retrospective.sh +79 -0
- package/.claude/hooks/post-edit.sh +21 -0
- package/.claude/hooks/pre-edit-backup.sh +71 -0
- package/.claude/hooks/restore-from-backup.sh +37 -0
- package/.claude/prompts/cfn-loop-context.md +115 -0
- package/.claude/prompts/loop-specific/loop2.md +50 -0
- package/.claude/prompts/loop-specific/loop3.md +43 -0
- package/.claude/prompts/loop-specific/loop4.md +54 -0
- package/.claude/root-claude-distribute/CLAUDE.md +76 -2
- package/.claude/skills/ace-system/sprint-7-lessons.json +46 -0
- package/.claude/skills/ace-system/store-reflection.sh +33 -136
- package/.claude/skills/agent-discovery/SKILL.md +40 -0
- package/.claude/skills/agent-discovery/agents-registry-clean.json +0 -0
- package/.claude/skills/agent-discovery/agents-registry-fixed.json +19 -0
- package/.claude/skills/agent-discovery/agents-registry.json +718 -0
- package/.claude/skills/agent-discovery/discover-agents.py +175 -0
- package/.claude/skills/agent-discovery/discover-agents.sh +87 -0
- package/.claude/skills/agent-discovery/invoke-registry.sh +11 -0
- package/.claude/skills/agent-discovery/temp_script.py +0 -0
- package/.claude/skills/agent-execution/execute-agent.sh +126 -0
- package/.claude/skills/agent-output-processing/SKILL.md +359 -0
- package/.claude/skills/agent-selector/SKILL.md +90 -0
- package/.claude/skills/agent-selector/select-agents.sh +96 -0
- package/.claude/skills/agent-spawning/agent-selection-guide.md +1 -1
- package/.claude/skills/agent-swap/SKILL.md +36 -0
- package/.claude/skills/agent-swap/recommend-swap.sh +60 -0
- package/.claude/skills/api-validation/test-endpoints.sh +54 -0
- package/.claude/skills/automatic-memory-persistence/SKILL.md +73 -0
- package/.claude/skills/automatic-memory-persistence/persist-agent-output.sh +49 -0
- package/.claude/skills/automatic-memory-persistence/query-agent-history.sh +35 -0
- package/.claude/skills/automatic-memory-persistence/test-memory-persistence.sh +235 -0
- package/.claude/skills/cfn-loop-orchestration/README.md +41 -0
- package/.claude/skills/cfn-loop-orchestration/SKILL.md +299 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +228 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +84 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +71 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +90 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +87 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +51 -0
- package/.claude/skills/cfn-loop-orchestration/inject-loop-context.sh +41 -0
- package/.claude/skills/cfn-loop-orchestration/monitor-execution.sh +156 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +840 -0
- package/.claude/skills/cfn-loop-orchestration/security_utils.sh +99 -0
- package/.claude/skills/cfn-loop-orchestration/test-cfn-orchestration.sh +281 -0
- package/.claude/skills/cfn-loop-orchestration/test-edge-cases.sh +188 -0
- package/.claude/skills/cfn-loop-validation/SKILL.md +307 -217
- package/.claude/skills/complexity-estimator/SKILL.md +96 -0
- package/.claude/skills/complexity-estimator/estimate-complexity.sh +144 -0
- package/.claude/skills/context-pruner/SKILL.md +75 -0
- package/.claude/skills/context-pruner/prune-context.sh +73 -0
- package/.claude/skills/defense-in-depth/SKILL.md +133 -0
- package/.claude/skills/dependency-extractor/SKILL.md +35 -0
- package/.claude/skills/dependency-extractor/extract-dependencies.sh +66 -0
- package/.claude/skills/epic-decomposer/SKILL.md +44 -0
- package/.claude/skills/epic-decomposer/decompose-epic.sh +104 -0
- package/.claude/skills/improvement-recommender/SKILL.md +33 -0
- package/.claude/skills/improvement-recommender/recommend-improvements.sh +92 -0
- package/.claude/skills/intervention-detector/SKILL.md +39 -0
- package/.claude/skills/intervention-detector/detect-intervention.sh +111 -0
- package/.claude/skills/intervention-orchestrator/SKILL.md +43 -0
- package/.claude/skills/intervention-orchestrator/execute-intervention.sh +59 -0
- package/.claude/skills/loop2-output-processing/SKILL.md +163 -0
- package/.claude/skills/loop2-output-processing/execute-and-extract.sh +77 -0
- package/.claude/skills/loop2-output-processing/execute-and-extract.sh.backup +36 -0
- package/.claude/skills/loop2-output-processing/parse-feedback.sh +147 -0
- package/.claude/skills/loop2-output-processing/process-validator-output.sh +275 -0
- package/.claude/skills/loop2-output-processing/test-bug27-fix.sh +200 -0
- package/.claude/skills/loop2-output-processing/test-loop2-processing.sh +113 -0
- package/.claude/skills/loop3-output-processing/AGENT_COMPLETION_PROTOCOL.md +206 -0
- package/.claude/skills/loop3-output-processing/SKILL.md +421 -0
- package/.claude/skills/loop3-output-processing/calculate-confidence.sh +28 -0
- package/.claude/skills/loop3-output-processing/execute-and-extract.sh +85 -0
- package/.claude/skills/loop3-output-processing/parse-confidence.sh +31 -0
- package/.claude/skills/loop3-output-processing/test-agent-timeout.sh +327 -0
- package/.claude/skills/loop3-output-processing/test-loop3-processing.sh +155 -0
- package/.claude/skills/loop3-output-processing/verify-deliverables.sh +42 -0
- package/.claude/skills/pattern-extraction/SKILL.md +30 -0
- package/.claude/skills/pattern-extraction/extract-patterns.sh +80 -0
- package/.claude/skills/playbook/SKILL.md +113 -0
- package/.claude/skills/playbook/init-playbook.sh +54 -0
- package/.claude/skills/playbook/playbook.db +0 -0
- package/.claude/skills/playbook/query-playbook.sh +79 -0
- package/.claude/skills/playbook/update-playbook.sh +69 -0
- package/.claude/skills/playbook-auto-update/SKILL.md +29 -0
- package/.claude/skills/playbook-auto-update/auto-update-playbook.sh +86 -0
- package/.claude/skills/product-owner-decision/SKILL.md +332 -0
- package/.claude/skills/product-owner-decision/execute-decision.sh +176 -0
- package/.claude/skills/product-owner-decision/parse-decision.sh +66 -0
- package/.claude/skills/product-owner-decision/validate-deliverables.sh +82 -0
- package/.claude/skills/redis-coordination/AGENT_LOGGING.md +280 -0
- package/.claude/skills/redis-coordination/LOGGING.md +260 -0
- package/.claude/skills/redis-coordination/README.md +30 -29
- package/.claude/skills/redis-coordination/SKILL.md +685 -83
- package/.claude/skills/redis-coordination/agent-log.sh +124 -0
- package/.claude/skills/redis-coordination/analyze-task-complexity.sh +277 -0
- package/.claude/skills/redis-coordination/cfn-loop-exec.sh +468 -0
- package/.claude/skills/redis-coordination/collect-confidence-scores.sh +179 -0
- package/.claude/skills/redis-coordination/collect-results.sh +75 -0
- package/.claude/skills/redis-coordination/data/cfn-loop.db +0 -0
- package/.claude/skills/redis-coordination/demos/test-iteration-feedback.sh +320 -0
- package/.claude/skills/redis-coordination/{test-orchestrator.sh → demos/test-orchestrator.sh} +25 -0
- package/.claude/skills/redis-coordination/execute-product-owner-decision.sh +258 -0
- package/.claude/skills/redis-coordination/get-agent-timeout.sh +176 -176
- package/.claude/skills/redis-coordination/init-swarm.sh +6 -1
- package/.claude/skills/redis-coordination/invoke-waiting-mode.sh +106 -183
- package/.claude/skills/redis-coordination/invoke-waiting-mode.sh.backup-p7 +423 -0
- package/.claude/skills/redis-coordination/log-event.sh +109 -0
- package/.claude/skills/redis-coordination/monitor-cfn-violations.sh +391 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop-v3.sh +141 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh +31 -933
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup +38 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +1672 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +1604 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +1550 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +1621 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +1621 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.broken +1627 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.corrupted +80 -0
- package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.deprecated +1864 -0
- package/.claude/skills/redis-coordination/query-logs.sh +103 -0
- package/.claude/skills/redis-coordination/retrieve-context.sh +58 -0
- package/.claude/skills/redis-coordination/select-specialist-agent.sh +371 -0
- package/.claude/skills/redis-coordination/semantic-match-tfidf.py +252 -0
- package/.claude/skills/redis-coordination/send-heartbeat.sh +164 -72
- package/.claude/skills/redis-coordination/signal.sh +38 -0
- package/.claude/skills/redis-coordination/store-context.sh +86 -0
- package/.claude/skills/redis-coordination/store-epic-context.sh +123 -0
- package/.claude/skills/redis-coordination/test-context-injection.sh +354 -0
- package/.claude/skills/redis-coordination/test-timeout-enforcement.sh +513 -0
- package/.claude/skills/redis-coordination/tests/convert-line-endings.sh +15 -0
- package/.claude/skills/redis-coordination/tests/dlq-functionality-test.sh +101 -101
- package/.claude/skills/redis-coordination/tests/edge-cases-test.sh +98 -98
- package/.claude/skills/redis-coordination/tests/integration-test.sh +169 -169
- package/.claude/skills/redis-coordination/tests/retry-mechanism-test.sh +81 -81
- package/.claude/skills/redis-coordination/tests/run-test-suite.sh +91 -91
- package/.claude/skills/redis-coordination/tests/run-tests.sh +4 -0
- package/.claude/skills/redis-coordination/tests/test-primitives.sh +166 -0
- package/.claude/skills/redis-coordination/tests/test-utils.sh +53 -121
- package/.claude/skills/redis-coordination/tests/test_coordination_primitives.sh.deprecated +20 -0
- package/.claude/skills/redis-coordination/tests/test_utils.sh +49 -0
- package/.claude/skills/redis-coordination/v2_modularization/core_orchestration.sh +76 -0
- package/.claude/skills/redis-coordination/validate-parameters.sh +492 -0
- package/.claude/skills/retrospective-report/SKILL.md +31 -0
- package/.claude/skills/retrospective-report/generate-report.sh +101 -0
- package/.claude/skills/run-all-skill-tests.sh +124 -0
- package/.claude/skills/scope-simplifier/SKILL.md +37 -0
- package/.claude/skills/scope-simplifier/simplify-scope.sh +68 -0
- package/.claude/skills/simplified-agent-lifecycle/COST_ANALYSIS.md +49 -0
- package/.claude/skills/simplified-agent-lifecycle/DESIGN.md +98 -0
- package/.claude/skills/simplified-agent-lifecycle/MIGRATION_PLAN.md +74 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/specialist-injection/SKILL.md +41 -0
- package/.claude/skills/specialist-injection/recommend-specialist.sh +57 -0
- package/.claude/skills/sprint-execution/SKILL.md +27 -0
- package/.claude/skills/sprint-execution/execute-sprint-task.sh +59 -0
- package/.claude/skills/sprint-execution/execute-sprint.sh +65 -0
- package/.claude/skills/sprint-planner/SKILL.md +37 -0
- package/.claude/skills/sprint-planner/plan-sprint.sh +85 -0
- package/.claude/skills/standardized-error-handling/SKILL.md +56 -0
- package/.claude/skills/standardized-error-handling/capture-agent-error.sh +87 -0
- package/.claude/skills/standardized-error-handling/test-error-handling.sh +166 -0
- package/.claude/skills/task-classifier/SKILL.md +94 -0
- package/.claude/skills/task-classifier/classify-task.sh +115 -0
- package/.claude/skills/validation-templates/SKILL.md +47 -0
- package/.claude/skills/validation-templates/content.json +38 -0
- package/.claude/skills/validation-templates/data.json +38 -0
- package/.claude/skills/validation-templates/design.json +38 -0
- package/.claude/skills/validation-templates/infrastructure.json +38 -0
- package/.claude/skills/validation-templates/research.json +38 -0
- package/.claude/skills/validation-templates/software.json +38 -0
- package/.claude/skills/webapp-testing/README.md +142 -0
- package/.claude/skills/webapp-testing/SCREENSHOT_NAMING_CONVENTION.md +547 -0
- package/.claude/skills/webapp-testing/SKILL.md +877 -0
- package/.claude/skills/webapp-testing/capture-screenshot.sh +238 -0
- package/.claude/skills/webapp-testing/cfn-loop-integration.sh +265 -0
- package/.claude/skills/webapp-testing/compare-screenshots.sh +199 -0
- package/.claude/skills/webapp-testing/init-storage.sh +150 -0
- package/.claude/skills/webapp-testing/set-baseline.sh +196 -0
- package/.claude/skills/webapp-testing/test-webapp-testing.sh +233 -0
- package/.claude/spawn-pattern-examples.md +3 -3
- package/CLAUDE.md +364 -16
- package/README.md +598 -251
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-command.js +153 -0
- package/dist/cli/agent-command.js.map +1 -0
- package/dist/cli/agent-definition-parser.js +183 -0
- package/dist/cli/agent-definition-parser.js.map +1 -0
- package/dist/cli/agent-executor.js +310 -0
- package/dist/cli/agent-executor.js.map +1 -0
- package/dist/cli/agent-prompt-builder.js +268 -0
- package/dist/cli/agent-prompt-builder.js.map +1 -0
- package/dist/cli/agent-spawn.js +56 -2
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/anthropic-client.js +421 -0
- package/dist/cli/anthropic-client.js.map +1 -0
- package/dist/cli/cfn-context.js +150 -0
- package/dist/cli/cfn-context.js.map +1 -1
- package/dist/cli/cfn-fork.js +159 -0
- package/dist/cli/cfn-fork.js.map +1 -0
- package/dist/cli/cli-agent-context.js +358 -0
- package/dist/cli/cli-agent-context.js.map +1 -0
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/conversation-fork.js +201 -0
- package/dist/cli/conversation-fork.js.map +1 -0
- package/dist/cli/index.js +119 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/iteration-history.js +188 -0
- package/dist/cli/iteration-history.js.map +1 -0
- package/dist/cli/tool-definitions.js +263 -0
- package/dist/cli/tool-definitions.js.map +1 -0
- package/dist/cli/tool-executor.js +247 -0
- package/dist/cli/tool-executor.js.map +1 -0
- package/dist/hello.js +8 -0
- package/dist/hello.js.map +1 -0
- package/package.json +16 -6
- package/scripts/README.md +68 -0
- package/scripts/cfn-intervention-example.sh +21 -0
- package/scripts/migrate-test-infrastructure.sh +40 -0
- package/scripts/switch-api.sh +233 -0
- package/scripts/validate-test-migration.sh +49 -0
- package/scripts/verify-no-secrets.sh +55 -0
- package/.claude/agents/architecture/system-architect.md.backup +0 -603
- package/.claude/agents/code-booster.md +0 -131
- package/.claude/agents/consensus/performance-benchmarker.md +0 -101
- package/.claude/agents/consensus/security-manager.md +0 -107
- package/.claude/agents/context-curator.md +0 -167
- package/.claude/agents/context-reflector.md +0 -65
- package/.claude/agents/core-agents/cfn-loop-coordinator.md +0 -134
- package/.claude/agents/core-agents/code-quality-validator.md +0 -149
- package/.claude/agents/core-agents/context-curator.md +0 -452
- package/.claude/agents/core-agents/context-reflector.md +0 -273
- package/.claude/agents/core-agents/cost-savings-cfn-loop-coordinator.md +0 -190
- package/.claude/agents/core-agents/tester.md +0 -170
- package/.claude/agents/development/backend-dev.md +0 -165
- package/.claude/agents/devops/devops-engineer.md +0 -148
- package/.claude/agents/frontend/interaction-tester.md +0 -139
- package/.claude/agents/frontend/react-frontend-engineer.md +0 -9
- package/.claude/agents/personas/accessibility-advocate-persona.md +0 -107
- package/.claude/agents/testing/production-validator.md +0 -179
- package/.claude/agents/testing/tdd-london-swarm.md +0 -209
- package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -43
- package/.claude/agents/testing/validation/production-validator.md +0 -43
- package/dist/coordination/fleet-manager.test.js +0 -141
- package/dist/coordination/fleet-manager.test.js.map +0 -1
- package/dist/middleware/transparency-middleware.test.js +0 -184
- package/dist/middleware/transparency-middleware.test.js.map +0 -1
- /package/.claude/agents/{core-agents → developers}/researcher.md +0 -0
- /package/.claude/agents/{consensus → specialists}/crdt-synchronizer.md +0 -0
- /package/.claude/agents/{consensus → specialists}/quorum-manager.md +0 -0
- /package/.claude/agents/{consensus → specialists}/raft-manager.md +0 -0
- /package/.claude/{agents/core-agents → agents-ignore}/coordinator.md +0 -0
- /package/.claude/{agents/core-agents/cost-savings-coordinator.md → agents-ignore/cost-savings-coordinator.md.backup} +0 -0
- /package/.claude/skills/redis-coordination/{phase4-wake-queue-test-report.md → demos/phase4-wake-queue-test-report.md} +0 -0
- /package/.claude/skills/redis-coordination/{test-bzpopmin-fix.sh → demos/test-bzpopmin-fix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-cancel-swarm.sh → demos/test-cancel-swarm.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-dlq.sh → demos/test-dlq.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake-phase4-unix.sh → demos/test-priority-wake-phase4-unix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake-phase4.sh → demos/test-priority-wake-phase4.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-priority-wake.sh → demos/test-priority-wake.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quick-fix.sh → demos/test-quick-fix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-absolute.sh → demos/test-quorum-absolute.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-fallback.sh → demos/test-quorum-fallback.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-percentage.sh → demos/test-quorum-percentage.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum-with-retry.sh → demos/test-quorum-with-retry.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-quorum.sh → demos/test-quorum.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-shutdown-handling.sh → demos/test-shutdown-handling.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-shutdown.sh → demos/test-shutdown.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-utils-unix.sh → demos/test-utils-unix.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-utils.sh → demos/test-utils.sh} +0 -0
- /package/.claude/skills/redis-coordination/{test-waiting-mode.sh → demos/test-waiting-mode.sh} +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Webapp Testing Skill - Initialize Storage
|
|
3
|
+
# Purpose: Create SQLite schema and directory structure for screenshot management
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
9
|
+
cd "$PROJECT_ROOT"
|
|
10
|
+
|
|
11
|
+
FORCE=false
|
|
12
|
+
|
|
13
|
+
# Parse arguments
|
|
14
|
+
while [[ $# -gt 0 ]]; do
|
|
15
|
+
case $1 in
|
|
16
|
+
--force) FORCE=true; shift ;;
|
|
17
|
+
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
18
|
+
esac
|
|
19
|
+
done
|
|
20
|
+
|
|
21
|
+
DB_PATH="${HOME}/.claude/memory/adaptive-context.db"
|
|
22
|
+
|
|
23
|
+
echo "Initializing webapp-testing storage..." >&2
|
|
24
|
+
|
|
25
|
+
# Create directory structure
|
|
26
|
+
echo "Creating directory structure..." >&2
|
|
27
|
+
mkdir -p .screenshots/baselines
|
|
28
|
+
mkdir -p .screenshots/current
|
|
29
|
+
mkdir -p .screenshots/diffs
|
|
30
|
+
mkdir -p .screenshots/archive
|
|
31
|
+
echo "✅ Directories created" >&2
|
|
32
|
+
|
|
33
|
+
# Check if tables already exist
|
|
34
|
+
TABLES_EXIST=$(sqlite3 "$DB_PATH" \
|
|
35
|
+
"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('webapp_screenshots', 'screenshot_audit_log');" 2>/dev/null || echo "0")
|
|
36
|
+
|
|
37
|
+
if [ "$TABLES_EXIST" -eq 2 ] && [ "$FORCE" = false ]; then
|
|
38
|
+
echo "⚠️ SQLite tables already exist. Use --force to recreate (will drop existing data)" >&2
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
if [ "$FORCE" = true ] && [ "$TABLES_EXIST" -gt 0 ]; then
|
|
43
|
+
echo "⚠️ --force flag set. Dropping existing tables..." >&2
|
|
44
|
+
sqlite3 "$DB_PATH" <<EOF
|
|
45
|
+
DROP TABLE IF EXISTS webapp_screenshots;
|
|
46
|
+
DROP TABLE IF EXISTS screenshot_audit_log;
|
|
47
|
+
EOF
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Create SQLite schema
|
|
51
|
+
echo "Creating SQLite schema..." >&2
|
|
52
|
+
sqlite3 "$DB_PATH" <<'EOF'
|
|
53
|
+
-- Main screenshots table
|
|
54
|
+
CREATE TABLE IF NOT EXISTS webapp_screenshots (
|
|
55
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
56
|
+
screenshot_key TEXT UNIQUE NOT NULL,
|
|
57
|
+
project TEXT NOT NULL,
|
|
58
|
+
component TEXT NOT NULL,
|
|
59
|
+
viewport TEXT NOT NULL,
|
|
60
|
+
state TEXT NOT NULL,
|
|
61
|
+
variant TEXT NOT NULL DEFAULT 'default',
|
|
62
|
+
file_path TEXT NOT NULL,
|
|
63
|
+
file_hash TEXT NOT NULL,
|
|
64
|
+
baseline BOOLEAN DEFAULT 0,
|
|
65
|
+
captured_at INTEGER NOT NULL,
|
|
66
|
+
task_id TEXT,
|
|
67
|
+
agent_id TEXT,
|
|
68
|
+
metadata TEXT,
|
|
69
|
+
UNIQUE(project, component, viewport, state, variant, baseline)
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
-- Indexes for efficient querying
|
|
73
|
+
CREATE INDEX IF NOT EXISTS idx_baseline ON webapp_screenshots(project, component, viewport, state, variant, baseline);
|
|
74
|
+
CREATE INDEX IF NOT EXISTS idx_task ON webapp_screenshots(task_id);
|
|
75
|
+
CREATE INDEX IF NOT EXISTS idx_component ON webapp_screenshots(project, component);
|
|
76
|
+
CREATE INDEX IF NOT EXISTS idx_captured ON webapp_screenshots(captured_at DESC);
|
|
77
|
+
CREATE INDEX IF NOT EXISTS idx_screenshot_key ON webapp_screenshots(screenshot_key);
|
|
78
|
+
|
|
79
|
+
-- Audit log table
|
|
80
|
+
CREATE TABLE IF NOT EXISTS screenshot_audit_log (
|
|
81
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
82
|
+
screenshot_key TEXT NOT NULL,
|
|
83
|
+
action TEXT NOT NULL,
|
|
84
|
+
reason TEXT,
|
|
85
|
+
old_file_hash TEXT,
|
|
86
|
+
new_file_hash TEXT,
|
|
87
|
+
approved_by TEXT,
|
|
88
|
+
created_at INTEGER NOT NULL,
|
|
89
|
+
task_id TEXT,
|
|
90
|
+
metadata TEXT
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
-- Indexes for audit log
|
|
94
|
+
CREATE INDEX IF NOT EXISTS idx_audit_screenshot ON screenshot_audit_log(screenshot_key);
|
|
95
|
+
CREATE INDEX IF NOT EXISTS idx_audit_created ON screenshot_audit_log(created_at DESC);
|
|
96
|
+
CREATE INDEX IF NOT EXISTS idx_audit_task ON screenshot_audit_log(task_id);
|
|
97
|
+
CREATE INDEX IF NOT EXISTS idx_audit_action ON screenshot_audit_log(action);
|
|
98
|
+
EOF
|
|
99
|
+
|
|
100
|
+
echo "✅ SQLite schema created" >&2
|
|
101
|
+
|
|
102
|
+
# Verify tables created
|
|
103
|
+
VERIFY=$(sqlite3 "$DB_PATH" \
|
|
104
|
+
"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('webapp_screenshots', 'screenshot_audit_log');" 2>/dev/null)
|
|
105
|
+
|
|
106
|
+
if [ "$VERIFY" -eq 2 ]; then
|
|
107
|
+
echo "✅ Verification passed: 2 tables created" >&2
|
|
108
|
+
else
|
|
109
|
+
echo "❌ Verification failed: Expected 2 tables, found $VERIFY" >&2
|
|
110
|
+
exit 1
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
# Create .gitignore for ephemeral directories
|
|
114
|
+
cat > .screenshots/.gitignore <<'EOF'
|
|
115
|
+
# Ephemeral screenshot directories (not version controlled)
|
|
116
|
+
current/
|
|
117
|
+
diffs/
|
|
118
|
+
archive/
|
|
119
|
+
|
|
120
|
+
# Version control baselines only
|
|
121
|
+
!baselines/
|
|
122
|
+
EOF
|
|
123
|
+
|
|
124
|
+
echo "✅ .gitignore created for .screenshots/" >&2
|
|
125
|
+
|
|
126
|
+
# Output summary
|
|
127
|
+
cat <<EOF
|
|
128
|
+
|
|
129
|
+
✅ Webapp-testing storage initialized successfully
|
|
130
|
+
|
|
131
|
+
Directory Structure:
|
|
132
|
+
.screenshots/
|
|
133
|
+
├── baselines/ (version controlled - reference images)
|
|
134
|
+
├── current/ (ephemeral - test captures)
|
|
135
|
+
├── diffs/ (ephemeral - comparison outputs)
|
|
136
|
+
└── archive/ (ephemeral - historical captures)
|
|
137
|
+
|
|
138
|
+
SQLite Tables:
|
|
139
|
+
- webapp_screenshots (screenshot metadata and file references)
|
|
140
|
+
- screenshot_audit_log (baseline change audit trail)
|
|
141
|
+
|
|
142
|
+
Database Location:
|
|
143
|
+
${DB_PATH}
|
|
144
|
+
|
|
145
|
+
Next Steps:
|
|
146
|
+
1. Capture screenshot: ./.claude/skills/webapp-testing/capture-screenshot.sh --help
|
|
147
|
+
2. Set baseline: ./.claude/skills/webapp-testing/set-baseline.sh --help
|
|
148
|
+
3. Compare screenshots: ./.claude/skills/webapp-testing/compare-screenshots.sh --help
|
|
149
|
+
|
|
150
|
+
EOF
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Webapp Testing Skill - Set Baseline
|
|
3
|
+
# Purpose: Set a captured screenshot as the baseline reference for future comparisons
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
9
|
+
cd "$PROJECT_ROOT"
|
|
10
|
+
|
|
11
|
+
REASON=""
|
|
12
|
+
|
|
13
|
+
# Parse arguments
|
|
14
|
+
while [[ $# -gt 0 ]]; do
|
|
15
|
+
case $1 in
|
|
16
|
+
--screenshot-key) SCREENSHOT_KEY="$2"; shift 2 ;;
|
|
17
|
+
--reason) REASON="$2"; shift 2 ;;
|
|
18
|
+
--current-file) CURRENT_FILE="$2"; shift 2 ;; # Optional: explicit file path
|
|
19
|
+
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
20
|
+
esac
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
# Validate required parameters
|
|
24
|
+
if [ -z "$SCREENSHOT_KEY" ]; then
|
|
25
|
+
echo "Error: Missing required parameter --screenshot-key" >&2
|
|
26
|
+
echo "Usage: $0 --screenshot-key <key> [--reason <reason>] [--current-file <path>]" >&2
|
|
27
|
+
echo "" >&2
|
|
28
|
+
echo "Required:" >&2
|
|
29
|
+
echo " --screenshot-key Screenshot identifier (e.g., 'auth-system/login-form/1920x1080/default/light-mode')" >&2
|
|
30
|
+
echo "" >&2
|
|
31
|
+
echo "Optional:" >&2
|
|
32
|
+
echo " --reason Reason for setting baseline (for audit trail)" >&2
|
|
33
|
+
echo " --current-file Explicit path to screenshot file (default: auto-detect latest)" >&2
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
DB_PATH="${HOME}/.claude/memory/adaptive-context.db"
|
|
38
|
+
|
|
39
|
+
# Parse screenshot key components
|
|
40
|
+
IFS='/' read -r PROJECT COMPONENT VIEWPORT STATE VARIANT <<< "$SCREENSHOT_KEY"
|
|
41
|
+
|
|
42
|
+
if [ -z "$PROJECT" ] || [ -z "$COMPONENT" ] || [ -z "$VIEWPORT" ] || [ -z "$STATE" ] || [ -z "$VARIANT" ]; then
|
|
43
|
+
echo "Error: Invalid screenshot key format. Expected: project/component/viewport/state/variant" >&2
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Get current screenshot from SQLite (if not explicitly provided)
|
|
48
|
+
if [ -z "$CURRENT_FILE" ]; then
|
|
49
|
+
CURRENT_PATH=$(sqlite3 "$DB_PATH" \
|
|
50
|
+
"SELECT file_path FROM webapp_screenshots WHERE screenshot_key = '${SCREENSHOT_KEY}' AND baseline = 0 ORDER BY captured_at DESC LIMIT 1" 2>/dev/null)
|
|
51
|
+
|
|
52
|
+
if [ -z "$CURRENT_PATH" ]; then
|
|
53
|
+
echo "Error: No current screenshot found for key: $SCREENSHOT_KEY" >&2
|
|
54
|
+
echo "Hint: Run capture-screenshot.sh first to create a capture" >&2
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
else
|
|
58
|
+
CURRENT_PATH="$CURRENT_FILE"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
# Verify current screenshot exists
|
|
62
|
+
if [ ! -f "$CURRENT_PATH" ]; then
|
|
63
|
+
echo "Error: Current screenshot file not found: $CURRENT_PATH" >&2
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Create baseline directory structure
|
|
68
|
+
BASELINE_DIR=".screenshots/baselines/${PROJECT}/${COMPONENT}/${VIEWPORT}/${STATE}"
|
|
69
|
+
mkdir -p "$BASELINE_DIR"
|
|
70
|
+
BASELINE_PATH="${BASELINE_DIR}/${VARIANT}.png"
|
|
71
|
+
|
|
72
|
+
echo "Setting baseline:" >&2
|
|
73
|
+
echo " Source: $CURRENT_PATH" >&2
|
|
74
|
+
echo " Baseline: $BASELINE_PATH" >&2
|
|
75
|
+
|
|
76
|
+
# Check if baseline already exists
|
|
77
|
+
if [ -f "$BASELINE_PATH" ]; then
|
|
78
|
+
echo "Warning: Baseline already exists at $BASELINE_PATH" >&2
|
|
79
|
+
echo "This will overwrite the existing baseline. Continue? (y/n)" >&2
|
|
80
|
+
read -r CONFIRM
|
|
81
|
+
if [ "$CONFIRM" != "y" ] && [ "$CONFIRM" != "Y" ]; then
|
|
82
|
+
echo "Aborted" >&2
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Archive old baseline
|
|
87
|
+
ARCHIVE_DIR=".screenshots/archive/$(date +%Y-%m)"
|
|
88
|
+
ARCHIVE_PATH="${ARCHIVE_DIR}/${PROJECT}/${COMPONENT}/${VIEWPORT}/${STATE}/${VARIANT}_$(date +%Y%m%d%H%M%S).png"
|
|
89
|
+
mkdir -p "$(dirname "$ARCHIVE_PATH")"
|
|
90
|
+
cp "$BASELINE_PATH" "$ARCHIVE_PATH"
|
|
91
|
+
echo " Archived: $ARCHIVE_PATH" >&2
|
|
92
|
+
|
|
93
|
+
# Get old hash for audit log
|
|
94
|
+
OLD_FILE_HASH=$(sha256sum "$BASELINE_PATH" | awk '{print $1}')
|
|
95
|
+
else
|
|
96
|
+
OLD_FILE_HASH=""
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Copy to baselines directory (remove timestamp from filename)
|
|
100
|
+
cp "$CURRENT_PATH" "$BASELINE_PATH"
|
|
101
|
+
|
|
102
|
+
# Calculate file hash
|
|
103
|
+
FILE_HASH=$(sha256sum "$BASELINE_PATH" | awk '{print $1}')
|
|
104
|
+
|
|
105
|
+
# Get metadata from current screenshot
|
|
106
|
+
METADATA=$(sqlite3 "$DB_PATH" \
|
|
107
|
+
"SELECT metadata FROM webapp_screenshots WHERE file_path = '${CURRENT_PATH}' LIMIT 1" 2>/dev/null || echo '{}')
|
|
108
|
+
|
|
109
|
+
TASK_ID=$(sqlite3 "$DB_PATH" \
|
|
110
|
+
"SELECT task_id FROM webapp_screenshots WHERE file_path = '${CURRENT_PATH}' LIMIT 1" 2>/dev/null || echo '')
|
|
111
|
+
|
|
112
|
+
AGENT_ID=$(sqlite3 "$DB_PATH" \
|
|
113
|
+
"SELECT agent_id FROM webapp_screenshots WHERE file_path = '${CURRENT_PATH}' LIMIT 1" 2>/dev/null || echo '')
|
|
114
|
+
|
|
115
|
+
# Update SQLite (set as baseline)
|
|
116
|
+
# First check if baseline entry already exists
|
|
117
|
+
BASELINE_EXISTS=$(sqlite3 "$DB_PATH" \
|
|
118
|
+
"SELECT COUNT(*) FROM webapp_screenshots WHERE screenshot_key = '${SCREENSHOT_KEY}' AND baseline = 1" 2>/dev/null || echo "0")
|
|
119
|
+
|
|
120
|
+
if [ "$BASELINE_EXISTS" -gt 0 ]; then
|
|
121
|
+
# Update existing baseline
|
|
122
|
+
sqlite3 "$DB_PATH" <<EOF
|
|
123
|
+
UPDATE webapp_screenshots
|
|
124
|
+
SET file_path = '${BASELINE_PATH}',
|
|
125
|
+
file_hash = 'sha256:${FILE_HASH}',
|
|
126
|
+
captured_at = $(date +%s),
|
|
127
|
+
task_id = '${TASK_ID}',
|
|
128
|
+
agent_id = '${AGENT_ID}',
|
|
129
|
+
metadata = '${METADATA}'
|
|
130
|
+
WHERE screenshot_key = '${SCREENSHOT_KEY}' AND baseline = 1;
|
|
131
|
+
EOF
|
|
132
|
+
ACTION="updated"
|
|
133
|
+
else
|
|
134
|
+
# Insert new baseline entry
|
|
135
|
+
sqlite3 "$DB_PATH" <<EOF
|
|
136
|
+
INSERT INTO webapp_screenshots (
|
|
137
|
+
screenshot_key, project, component, viewport, state, variant,
|
|
138
|
+
file_path, file_hash, baseline, captured_at, task_id, agent_id, metadata
|
|
139
|
+
) VALUES (
|
|
140
|
+
'${SCREENSHOT_KEY}',
|
|
141
|
+
'${PROJECT}',
|
|
142
|
+
'${COMPONENT}',
|
|
143
|
+
'${VIEWPORT}',
|
|
144
|
+
'${STATE}',
|
|
145
|
+
'${VARIANT}',
|
|
146
|
+
'${BASELINE_PATH}',
|
|
147
|
+
'sha256:${FILE_HASH}',
|
|
148
|
+
1,
|
|
149
|
+
$(date +%s),
|
|
150
|
+
'${TASK_ID}',
|
|
151
|
+
'${AGENT_ID}',
|
|
152
|
+
'${METADATA}'
|
|
153
|
+
);
|
|
154
|
+
EOF
|
|
155
|
+
ACTION="created"
|
|
156
|
+
fi
|
|
157
|
+
|
|
158
|
+
# Insert audit log entry
|
|
159
|
+
REASON_ESCAPED=$(echo "$REASON" | sed "s/'/''/g") # Escape single quotes for SQL
|
|
160
|
+
sqlite3 "$DB_PATH" <<EOF
|
|
161
|
+
INSERT INTO screenshot_audit_log (
|
|
162
|
+
screenshot_key, action, reason, old_file_hash, new_file_hash, approved_by, created_at, task_id
|
|
163
|
+
) VALUES (
|
|
164
|
+
'${SCREENSHOT_KEY}',
|
|
165
|
+
'${ACTION}',
|
|
166
|
+
'${REASON_ESCAPED}',
|
|
167
|
+
${OLD_FILE_HASH:+'sha256:$OLD_FILE_HASH'}${OLD_FILE_HASH:-NULL},
|
|
168
|
+
'sha256:${FILE_HASH}',
|
|
169
|
+
'${AGENT_ID:-system}',
|
|
170
|
+
$(date +%s),
|
|
171
|
+
'${TASK_ID}'
|
|
172
|
+
);
|
|
173
|
+
EOF
|
|
174
|
+
|
|
175
|
+
# Clear Redis baseline cache
|
|
176
|
+
redis-cli del "screenshot:baseline:${SCREENSHOT_KEY}" > /dev/null 2>&1 || \
|
|
177
|
+
echo "Warning: Failed to clear Redis cache" >&2
|
|
178
|
+
|
|
179
|
+
# Cache new baseline hash (TTL: 24 hours)
|
|
180
|
+
redis-cli setex "screenshot:baseline:${SCREENSHOT_KEY}" 86400 "sha256:${FILE_HASH}" > /dev/null 2>&1
|
|
181
|
+
|
|
182
|
+
# Output result
|
|
183
|
+
cat <<EOF | jq '.'
|
|
184
|
+
{
|
|
185
|
+
"status": "baseline-set",
|
|
186
|
+
"action": "${ACTION}",
|
|
187
|
+
"screenshot_key": "${SCREENSHOT_KEY}",
|
|
188
|
+
"baseline_path": "${BASELINE_PATH}",
|
|
189
|
+
"file_hash": "sha256:${FILE_HASH}",
|
|
190
|
+
"reason": "${REASON}",
|
|
191
|
+
"archived_previous": ${OLD_FILE_HASH:+true}${OLD_FILE_HASH:-false},
|
|
192
|
+
"created_at": $(date +%s)
|
|
193
|
+
}
|
|
194
|
+
EOF
|
|
195
|
+
|
|
196
|
+
echo "✅ Baseline ${ACTION}: $SCREENSHOT_KEY" >&2
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Webapp Testing Skill - Test Suite
|
|
3
|
+
# Purpose: Validate webapp-testing skill functionality
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
9
|
+
cd "$PROJECT_ROOT"
|
|
10
|
+
|
|
11
|
+
# Colors for output
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
NC='\033[0m' # No Color
|
|
16
|
+
|
|
17
|
+
TESTS_PASSED=0
|
|
18
|
+
TESTS_FAILED=0
|
|
19
|
+
TESTS_SKIPPED=0
|
|
20
|
+
|
|
21
|
+
# Test result tracking
|
|
22
|
+
test_result() {
|
|
23
|
+
local TEST_NAME="$1"
|
|
24
|
+
local STATUS="$2"
|
|
25
|
+
local MESSAGE="$3"
|
|
26
|
+
|
|
27
|
+
case "$STATUS" in
|
|
28
|
+
PASS)
|
|
29
|
+
echo -e "${GREEN}✓${NC} $TEST_NAME"
|
|
30
|
+
TESTS_PASSED=$((TESTS_PASSED + 1))
|
|
31
|
+
;;
|
|
32
|
+
FAIL)
|
|
33
|
+
echo -e "${RED}✗${NC} $TEST_NAME: $MESSAGE"
|
|
34
|
+
TESTS_FAILED=$((TESTS_FAILED + 1))
|
|
35
|
+
;;
|
|
36
|
+
SKIP)
|
|
37
|
+
echo -e "${YELLOW}⊘${NC} $TEST_NAME: $MESSAGE"
|
|
38
|
+
TESTS_SKIPPED=$((TESTS_SKIPPED + 1))
|
|
39
|
+
;;
|
|
40
|
+
esac
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
echo "=========================================="
|
|
44
|
+
echo "Webapp Testing Skill - Test Suite"
|
|
45
|
+
echo "=========================================="
|
|
46
|
+
echo ""
|
|
47
|
+
|
|
48
|
+
# Test 1: Storage Initialization
|
|
49
|
+
echo "Test 1: Storage Initialization"
|
|
50
|
+
if "$SCRIPT_DIR/init-storage.sh" --force >/dev/null 2>&1; then
|
|
51
|
+
if [ -d ".screenshots/baselines" ] && [ -d ".screenshots/current" ]; then
|
|
52
|
+
test_result "Storage initialization" "PASS"
|
|
53
|
+
else
|
|
54
|
+
test_result "Storage initialization" "FAIL" "Directories not created"
|
|
55
|
+
fi
|
|
56
|
+
else
|
|
57
|
+
test_result "Storage initialization" "FAIL" "init-storage.sh failed"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Test 2: SQLite Schema Validation
|
|
61
|
+
echo "Test 2: SQLite Schema Validation"
|
|
62
|
+
DB_PATH="${HOME}/.claude/memory/adaptive-context.db"
|
|
63
|
+
TABLE_COUNT=$(sqlite3 "$DB_PATH" \
|
|
64
|
+
"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('webapp_screenshots', 'screenshot_audit_log');" 2>/dev/null)
|
|
65
|
+
|
|
66
|
+
if [ "$TABLE_COUNT" -eq 2 ]; then
|
|
67
|
+
test_result "SQLite schema creation" "PASS"
|
|
68
|
+
else
|
|
69
|
+
test_result "SQLite schema creation" "FAIL" "Expected 2 tables, found $TABLE_COUNT"
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Test 3: Playwright Availability
|
|
73
|
+
echo "Test 3: Playwright Availability"
|
|
74
|
+
if command -v npx >/dev/null 2>&1 && npx playwright --version >/dev/null 2>&1; then
|
|
75
|
+
test_result "Playwright installation" "PASS"
|
|
76
|
+
else
|
|
77
|
+
test_result "Playwright installation" "SKIP" "Playwright not installed (run: npx playwright install chromium)"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Test 4: Node Dependencies Check
|
|
81
|
+
echo "Test 4: Node Dependencies Check"
|
|
82
|
+
NODE_DEPS_MISSING=0
|
|
83
|
+
for PKG in playwright pngjs pixelmatch; do
|
|
84
|
+
if ! node -e "require('$PKG')" 2>/dev/null; then
|
|
85
|
+
test_result "$PKG dependency" "SKIP" "Not installed (run: npm install $PKG)"
|
|
86
|
+
NODE_DEPS_MISSING=1
|
|
87
|
+
else
|
|
88
|
+
test_result "$PKG dependency" "PASS"
|
|
89
|
+
fi
|
|
90
|
+
done
|
|
91
|
+
|
|
92
|
+
# Test 5: Redis Connectivity
|
|
93
|
+
echo "Test 5: Redis Connectivity"
|
|
94
|
+
if redis-cli ping >/dev/null 2>&1; then
|
|
95
|
+
test_result "Redis connectivity" "PASS"
|
|
96
|
+
else
|
|
97
|
+
test_result "Redis connectivity" "SKIP" "Redis not running"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Test 6: Screenshot Capture (requires test server)
|
|
101
|
+
echo "Test 6: Screenshot Capture (Integration Test)"
|
|
102
|
+
TEST_URL="https://example.com" # Use public URL for testing
|
|
103
|
+
TASK_ID="test-$(date +%s)"
|
|
104
|
+
AGENT_ID="test-agent"
|
|
105
|
+
|
|
106
|
+
if [ "$NODE_DEPS_MISSING" -eq 0 ]; then
|
|
107
|
+
CAPTURE_RESULT=$("$SCRIPT_DIR/capture-screenshot.sh" \
|
|
108
|
+
--project "test-project" \
|
|
109
|
+
--component "test-component" \
|
|
110
|
+
--viewport "800x600" \
|
|
111
|
+
--state "default" \
|
|
112
|
+
--variant "light-mode" \
|
|
113
|
+
--url "$TEST_URL" \
|
|
114
|
+
--task-id "$TASK_ID" \
|
|
115
|
+
--agent-id "$AGENT_ID" 2>&1)
|
|
116
|
+
|
|
117
|
+
if [ $? -eq 0 ] && echo "$CAPTURE_RESULT" | jq -e '.screenshot_key' >/dev/null 2>&1; then
|
|
118
|
+
SCREENSHOT_KEY=$(echo "$CAPTURE_RESULT" | jq -r '.screenshot_key')
|
|
119
|
+
test_result "Screenshot capture" "PASS"
|
|
120
|
+
else
|
|
121
|
+
test_result "Screenshot capture" "FAIL" "Capture failed or invalid output"
|
|
122
|
+
fi
|
|
123
|
+
else
|
|
124
|
+
test_result "Screenshot capture" "SKIP" "Node dependencies missing"
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
# Test 7: Baseline Setting
|
|
128
|
+
echo "Test 7: Baseline Setting"
|
|
129
|
+
if [ -n "$SCREENSHOT_KEY" ]; then
|
|
130
|
+
BASELINE_RESULT=$("$SCRIPT_DIR/set-baseline.sh" \
|
|
131
|
+
--screenshot-key "$SCREENSHOT_KEY" \
|
|
132
|
+
--reason "Test baseline" 2>&1)
|
|
133
|
+
|
|
134
|
+
if [ $? -eq 0 ] && echo "$BASELINE_RESULT" | jq -e '.status' >/dev/null 2>&1; then
|
|
135
|
+
test_result "Baseline setting" "PASS"
|
|
136
|
+
else
|
|
137
|
+
test_result "Baseline setting" "FAIL" "set-baseline.sh failed"
|
|
138
|
+
fi
|
|
139
|
+
else
|
|
140
|
+
test_result "Baseline setting" "SKIP" "No screenshot to baseline"
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
# Test 8: Screenshot Comparison
|
|
144
|
+
echo "Test 8: Screenshot Comparison"
|
|
145
|
+
if [ -n "$SCREENSHOT_KEY" ]; then
|
|
146
|
+
# Capture second screenshot for comparison
|
|
147
|
+
CAPTURE2_RESULT=$("$SCRIPT_DIR/capture-screenshot.sh" \
|
|
148
|
+
--project "test-project" \
|
|
149
|
+
--component "test-component" \
|
|
150
|
+
--viewport "800x600" \
|
|
151
|
+
--state "default" \
|
|
152
|
+
--variant "light-mode" \
|
|
153
|
+
--url "$TEST_URL" \
|
|
154
|
+
--task-id "$TASK_ID" \
|
|
155
|
+
--agent-id "$AGENT_ID" 2>&1)
|
|
156
|
+
|
|
157
|
+
if [ $? -eq 0 ]; then
|
|
158
|
+
COMPARE_RESULT=$("$SCRIPT_DIR/compare-screenshots.sh" \
|
|
159
|
+
--screenshot-key "$SCREENSHOT_KEY" \
|
|
160
|
+
--task-id "$TASK_ID" \
|
|
161
|
+
--threshold 0.95 2>&1)
|
|
162
|
+
|
|
163
|
+
if [ $? -eq 0 ] && echo "$COMPARE_RESULT" | jq -e '.similarity_score' >/dev/null 2>&1; then
|
|
164
|
+
SIMILARITY=$(echo "$COMPARE_RESULT" | jq -r '.similarity_score')
|
|
165
|
+
if (( $(echo "$SIMILARITY >= 0.95" | bc -l) )); then
|
|
166
|
+
test_result "Screenshot comparison" "PASS"
|
|
167
|
+
else
|
|
168
|
+
test_result "Screenshot comparison" "FAIL" "Low similarity: $SIMILARITY"
|
|
169
|
+
fi
|
|
170
|
+
else
|
|
171
|
+
test_result "Screenshot comparison" "FAIL" "compare-screenshots.sh failed"
|
|
172
|
+
fi
|
|
173
|
+
else
|
|
174
|
+
test_result "Screenshot comparison" "SKIP" "Second capture failed"
|
|
175
|
+
fi
|
|
176
|
+
else
|
|
177
|
+
test_result "Screenshot comparison" "SKIP" "No screenshot to compare"
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
# Test 9: SQLite Data Persistence
|
|
181
|
+
echo "Test 9: SQLite Data Persistence"
|
|
182
|
+
SCREENSHOT_COUNT=$(sqlite3 "$DB_PATH" \
|
|
183
|
+
"SELECT COUNT(*) FROM webapp_screenshots WHERE project = 'test-project';" 2>/dev/null)
|
|
184
|
+
|
|
185
|
+
if [ "$SCREENSHOT_COUNT" -gt 0 ]; then
|
|
186
|
+
test_result "SQLite data persistence" "PASS"
|
|
187
|
+
else
|
|
188
|
+
test_result "SQLite data persistence" "FAIL" "No test screenshots in database"
|
|
189
|
+
fi
|
|
190
|
+
|
|
191
|
+
# Test 10: Redis Queue Integration
|
|
192
|
+
echo "Test 10: Redis Queue Integration"
|
|
193
|
+
if [ -n "$TASK_ID" ]; then
|
|
194
|
+
QUEUE_LENGTH=$(redis-cli llen "screenshot:queue:${TASK_ID}" 2>/dev/null || echo "0")
|
|
195
|
+
if [ "$QUEUE_LENGTH" -gt 0 ]; then
|
|
196
|
+
test_result "Redis queue integration" "PASS"
|
|
197
|
+
else
|
|
198
|
+
test_result "Redis queue integration" "SKIP" "Redis queue empty (may have been processed)"
|
|
199
|
+
fi
|
|
200
|
+
else
|
|
201
|
+
test_result "Redis queue integration" "SKIP" "No task ID available"
|
|
202
|
+
fi
|
|
203
|
+
|
|
204
|
+
# Cleanup test data
|
|
205
|
+
echo ""
|
|
206
|
+
echo "Cleaning up test data..."
|
|
207
|
+
if [ -n "$SCREENSHOT_KEY" ]; then
|
|
208
|
+
sqlite3 "$DB_PATH" "DELETE FROM webapp_screenshots WHERE project = 'test-project';" 2>/dev/null
|
|
209
|
+
sqlite3 "$DB_PATH" "DELETE FROM screenshot_audit_log WHERE screenshot_key LIKE 'test-project/%';" 2>/dev/null
|
|
210
|
+
rm -rf .screenshots/baselines/test-project 2>/dev/null
|
|
211
|
+
rm -rf .screenshots/current/test-project 2>/dev/null
|
|
212
|
+
rm -rf .screenshots/diffs/"$TASK_ID" 2>/dev/null
|
|
213
|
+
redis-cli del "screenshot:queue:${TASK_ID}" >/dev/null 2>&1
|
|
214
|
+
echo "✓ Test data cleaned"
|
|
215
|
+
fi
|
|
216
|
+
|
|
217
|
+
# Summary
|
|
218
|
+
echo ""
|
|
219
|
+
echo "=========================================="
|
|
220
|
+
echo "Test Summary"
|
|
221
|
+
echo "=========================================="
|
|
222
|
+
echo -e "${GREEN}Passed:${NC} $TESTS_PASSED"
|
|
223
|
+
echo -e "${RED}Failed:${NC} $TESTS_FAILED"
|
|
224
|
+
echo -e "${YELLOW}Skipped:${NC} $TESTS_SKIPPED"
|
|
225
|
+
echo ""
|
|
226
|
+
|
|
227
|
+
if [ "$TESTS_FAILED" -eq 0 ]; then
|
|
228
|
+
echo -e "${GREEN}✓ All tests passed${NC}"
|
|
229
|
+
exit 0
|
|
230
|
+
else
|
|
231
|
+
echo -e "${RED}✗ Some tests failed${NC}"
|
|
232
|
+
exit 1
|
|
233
|
+
fi
|
|
@@ -242,7 +242,7 @@ Task("validator", `
|
|
|
242
242
|
**Main Chat Thinks:**
|
|
243
243
|
- Task type: Feature implementation
|
|
244
244
|
- Topology: Mesh (coordinator + 5 agents, some parallel)
|
|
245
|
-
- Agents needed: analyst, architect, backend-dev, frontend-
|
|
245
|
+
- Agents needed: analyst, architect, backend-dev, react-frontend-engineer, tester
|
|
246
246
|
- Dependencies: analyst → architect → (backend + frontend parallel) → tester
|
|
247
247
|
|
|
248
248
|
**Single Message Spawn:**
|
|
@@ -261,10 +261,10 @@ Task("coordinator-hybrid", `
|
|
|
261
261
|
|
|
262
262
|
**Redis Channel:** swarm:profile-edit:coordinator
|
|
263
263
|
|
|
264
|
-
**Agents:** analyst → architect → (backend-dev || frontend-
|
|
264
|
+
**Agents:** analyst → architect → (backend-dev || react-frontend-engineer) → tester
|
|
265
265
|
|
|
266
266
|
**Parallel Phase:**
|
|
267
|
-
- backend-dev and frontend-
|
|
267
|
+
- backend-dev and react-frontend-engineer work in parallel after architect
|
|
268
268
|
- tester waits for BOTH to complete
|
|
269
269
|
|
|
270
270
|
Monitor and aggregate results.
|