agentic-qe 3.7.15 → 3.7.17
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/agents/v3/qe-devils-advocate.md +20 -0
- package/.claude/agents/v3/qe-gap-detector.md +25 -0
- package/.claude/agents/v3/qe-quality-gate.md +8 -0
- package/.claude/agents/v3/qe-requirements-validator.md +25 -0
- package/.claude/agents/v3/subagents/qe-code-reviewer.md +11 -0
- package/.claude/agents/v3/subagents/qe-integration-reviewer.md +11 -0
- package/.claude/agents/v3/subagents/qe-performance-reviewer.md +11 -0
- package/.claude/agents/v3/subagents/qe-security-reviewer.md +11 -0
- package/.claude/helpers/adr-compliance.sh +10 -10
- package/.claude/helpers/auto-memory-hook.mjs +24 -9
- package/.claude/helpers/brain-checkpoint.cjs +55 -134
- package/.claude/helpers/ddd-tracker.sh +2 -2
- package/.claude/helpers/guidance-hooks.sh +2 -2
- package/.claude/helpers/hook-handler.cjs +57 -18
- package/.claude/helpers/statusline.cjs +414 -595
- package/.claude/helpers/v3/quality-criteria/evidence-classification.md +116 -116
- package/.claude/helpers/v3/quality-criteria/htsm-categories.md +139 -139
- package/.claude/skills/README.md +8 -11
- package/.claude/skills/brutal-honesty-review/SKILL.md +3 -0
- package/.claude/skills/code-review-quality/SKILL.md +3 -0
- package/.claude/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
- package/.claude/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
- package/.claude/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
- package/.claude/skills/qcsd-development-swarm/SKILL.md +79 -2027
- package/.claude/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
- package/.claude/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
- package/.claude/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
- package/.claude/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
- package/.claude/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
- package/.claude/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
- package/.claude/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
- package/.claude/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
- package/.claude/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
- package/.claude/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
- package/.claude/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
- package/.claude/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
- package/.claude/skills/qcsd-production-swarm/SKILL.md +88 -2663
- package/.claude/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
- package/.claude/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
- package/.claude/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
- package/.claude/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
- package/.claude/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
- package/.claude/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
- package/.claude/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
- package/.claude/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
- package/.claude/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
- package/.claude/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
- package/.claude/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
- package/.claude/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
- package/.claude/skills/sherlock-review/SKILL.md +3 -0
- package/.claude/skills/skill-builder/SKILL.md +103 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +44 -0
- package/assets/agents/v3/qe-devils-advocate.md +20 -0
- package/assets/agents/v3/qe-gap-detector.md +25 -0
- package/assets/agents/v3/qe-quality-gate.md +8 -0
- package/assets/agents/v3/qe-requirements-validator.md +25 -0
- package/assets/agents/v3/subagents/qe-code-reviewer.md +11 -0
- package/assets/agents/v3/subagents/qe-integration-reviewer.md +11 -0
- package/assets/agents/v3/subagents/qe-performance-reviewer.md +11 -0
- package/assets/agents/v3/subagents/qe-security-reviewer.md +11 -0
- package/assets/helpers/statusline-v3.cjs +693 -0
- package/assets/skills/brutal-honesty-review/SKILL.md +3 -0
- package/assets/skills/code-review-quality/SKILL.md +3 -0
- package/assets/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
- package/assets/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
- package/assets/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
- package/assets/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
- package/assets/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
- package/assets/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
- package/assets/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
- package/assets/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
- package/assets/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
- package/assets/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
- package/assets/skills/qcsd-development-swarm/SKILL.md +79 -2027
- package/assets/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
- package/assets/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
- package/assets/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
- package/assets/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
- package/assets/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
- package/assets/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
- package/assets/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
- package/assets/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
- package/assets/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
- package/assets/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
- package/assets/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
- package/assets/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
- package/assets/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
- package/assets/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
- package/assets/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
- package/assets/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
- package/assets/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
- package/assets/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
- package/assets/skills/qcsd-production-swarm/SKILL.md +88 -2663
- package/assets/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
- package/assets/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
- package/assets/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
- package/assets/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
- package/assets/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
- package/assets/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
- package/assets/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
- package/assets/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
- package/assets/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
- package/assets/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
- package/assets/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
- package/assets/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
- package/assets/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
- package/assets/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
- package/assets/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
- package/assets/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
- package/assets/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
- package/assets/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
- package/assets/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
- package/assets/skills/sherlock-review/SKILL.md +3 -0
- package/assets/templates/agent-override-example.yaml +39 -0
- package/dist/agents/devils-advocate/agent.d.ts +25 -1
- package/dist/agents/devils-advocate/agent.js +108 -4
- package/dist/agents/devils-advocate/types.d.ts +54 -0
- package/dist/agents/devils-advocate/types.js +14 -0
- package/dist/agents/overlay-loader.d.ts +28 -0
- package/dist/agents/overlay-loader.js +232 -0
- package/dist/agents/overlay-schema.d.ts +56 -0
- package/dist/agents/overlay-schema.js +77 -0
- package/dist/analysis/branch-enumerator.d.ts +68 -0
- package/dist/analysis/branch-enumerator.js +393 -0
- package/dist/analysis/index.d.ts +2 -0
- package/dist/analysis/index.js +2 -0
- package/dist/cli/bundle.js +2469 -634
- package/dist/cli/commands/coverage.js +50 -0
- package/dist/cli/handlers/brain-handler.js +2 -1
- package/dist/context/compiler.d.ts +62 -0
- package/dist/context/compiler.js +143 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +6 -0
- package/dist/context/sources/coverage-source.d.ts +15 -0
- package/dist/context/sources/coverage-source.js +77 -0
- package/dist/context/sources/git-source.d.ts +12 -0
- package/dist/context/sources/git-source.js +33 -0
- package/dist/context/sources/index.d.ts +6 -0
- package/dist/context/sources/index.js +5 -0
- package/dist/context/sources/memory-source.d.ts +17 -0
- package/dist/context/sources/memory-source.js +94 -0
- package/dist/context/sources/test-source.d.ts +13 -0
- package/dist/context/sources/test-source.js +53 -0
- package/dist/context/sources/types.d.ts +42 -0
- package/dist/context/sources/types.js +5 -0
- package/dist/domains/test-generation/coordinator.js +6 -4
- package/dist/feedback/feedback-loop.d.ts +5 -0
- package/dist/feedback/feedback-loop.js +12 -0
- package/dist/feedback/index.d.ts +1 -1
- package/dist/feedback/index.js +1 -1
- package/dist/init/agents-installer.d.ts +9 -0
- package/dist/init/agents-installer.js +72 -0
- package/dist/init/phases/07-hooks.d.ts +11 -0
- package/dist/init/phases/07-hooks.js +67 -0
- package/dist/init/phases/09-assets.js +3 -0
- package/dist/init/settings-merge.js +1 -1
- package/dist/kernel/hnsw-adapter.d.ts +3 -0
- package/dist/kernel/hnsw-adapter.js +11 -1
- package/dist/kernel/unified-memory-schemas.d.ts +1 -1
- package/dist/kernel/unified-memory-schemas.js +2 -0
- package/dist/kernel/unified-memory.js +25 -0
- package/dist/learning/experience-capture-middleware.js +24 -0
- package/dist/learning/sqlite-persistence.d.ts +3 -0
- package/dist/learning/sqlite-persistence.js +9 -0
- package/dist/learning/token-tracker.js +4 -0
- package/dist/mcp/bundle.js +3694 -3101
- package/dist/mcp/handlers/handler-factory.js +92 -11
- package/dist/mcp/services/task-router.d.ts +11 -0
- package/dist/mcp/services/task-router.js +26 -0
- package/dist/routing/qe-agent-registry.d.ts +11 -0
- package/dist/routing/qe-agent-registry.js +34 -0
- package/dist/routing/qe-task-router.d.ts +1 -0
- package/dist/routing/qe-task-router.js +34 -2
- package/dist/routing/routing-feedback.d.ts +5 -0
- package/dist/routing/routing-feedback.js +29 -3
- package/dist/routing/types.d.ts +2 -0
- package/dist/sync/pull-agent.js +2 -1
- package/dist/test-scheduling/pipeline.d.ts +7 -0
- package/dist/test-scheduling/pipeline.js +9 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.js +10 -0
- package/dist/validation/pipeline.d.ts +80 -0
- package/dist/validation/pipeline.js +173 -0
- package/dist/validation/steps/requirements.d.ts +32 -0
- package/dist/validation/steps/requirements.js +596 -0
- package/package.json +6 -6
- package/.claude/agents/consensus/README.md +0 -253
- package/.claude/agents/deprecated/qe-api-contract-validator.md.v2 +0 -162
- package/.claude/agents/deprecated/qe-coverage-analyzer.md.v2 +0 -208
- package/.claude/agents/deprecated/qe-test-generator.md.v2 +0 -212
- package/.claude/agents/deprecated/qe-visual-tester.md.v2 +0 -216
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -130
- package/.claude/agents/hive-mind/queen-coordinator.md +0 -203
- package/.claude/agents/hive-mind/scout-explorer.md +0 -242
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -193
- package/.claude/agents/hive-mind/worker-specialist.md +0 -217
- package/.claude/agents/neural/safla-neural.md +0 -74
- package/.claude/agents/optimization/README.md +0 -250
- package/.claude/agents/reasoning/agent.md +0 -816
- package/.claude/agents/reasoning/goal-planner.md +0 -73
- package/.claude/agents/subagents/qe-code-reviewer.md +0 -76
- package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +0 -76
- package/.claude/agents/subagents/qe-data-generator.md +0 -77
- package/.claude/agents/subagents/qe-flaky-investigator.md +0 -91
- package/.claude/agents/subagents/qe-integration-tester.md +0 -90
- package/.claude/agents/subagents/qe-performance-validator.md +0 -92
- package/.claude/agents/subagents/qe-security-auditor.md +0 -94
- package/.claude/agents/subagents/qe-test-data-architect-sub.md +0 -93
- package/.claude/agents/subagents/qe-test-implementer.md +0 -106
- package/.claude/agents/subagents/qe-test-refactorer.md +0 -117
- package/.claude/agents/subagents/qe-test-writer.md +0 -112
- package/.claude/agents/swarm/README.md +0 -190
- package/.claude/agents/templates/migration-plan.md +0 -746
- package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -244
- package/.claude/agents/testing/validation/production-validator.md +0 -395
- package/.claude/agents/v3/README.md +0 -39
- package/.claude/agents/v3/typescript-specialist.yaml +0 -21
- package/.claude/agents/v3/v3-memory-specialist.md +0 -318
- package/.claude/agents/v3/v3-performance-engineer.md +0 -397
- package/.claude/agents/v3/v3-queen-coordinator.md +0 -98
- package/.claude/agents/v3/v3-security-architect.md +0 -174
- package/.claude/commands/README.md +0 -106
- package/.claude/commands/agents/README.md +0 -10
- package/.claude/commands/agents/agent-capabilities.md +0 -21
- package/.claude/commands/agents/agent-coordination.md +0 -28
- package/.claude/commands/agents/agent-spawning.md +0 -28
- package/.claude/commands/agents/agent-types.md +0 -26
- package/.claude/commands/coordination/README.md +0 -9
- package/.claude/commands/coordination/agent-spawn.md +0 -25
- package/.claude/commands/coordination/init.md +0 -44
- package/.claude/commands/coordination/orchestrate.md +0 -43
- package/.claude/commands/coordination/spawn.md +0 -45
- package/.claude/commands/coordination/swarm-init.md +0 -85
- package/.claude/commands/coordination/task-orchestrate.md +0 -25
- package/.claude/commands/hive-mind/README.md +0 -17
- package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-init.md +0 -18
- package/.claude/commands/hive-mind/hive-mind-memory.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -21
- package/.claude/commands/hive-mind/hive-mind-status.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-stop.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
- package/.claude/commands/hive-mind/hive-mind.md +0 -27
- package/.claude/commands/memory/README.md +0 -9
- package/.claude/commands/memory/memory-persist.md +0 -25
- package/.claude/commands/memory/memory-search.md +0 -25
- package/.claude/commands/memory/memory-usage.md +0 -25
- package/.claude/commands/memory/neural.md +0 -47
- package/.claude/commands/swarm/README.md +0 -15
- package/.claude/commands/swarm/swarm-analysis.md +0 -8
- package/.claude/commands/swarm/swarm-background.md +0 -8
- package/.claude/commands/swarm/swarm-init.md +0 -19
- package/.claude/commands/swarm/swarm-modes.md +0 -8
- package/.claude/commands/swarm/swarm-monitor.md +0 -8
- package/.claude/commands/swarm/swarm-spawn.md +0 -19
- package/.claude/commands/swarm/swarm-status.md +0 -8
- package/.claude/commands/swarm/swarm-strategies.md +0 -8
- package/.claude/commands/swarm/swarm.md +0 -27
- package/.claude/commands/training/README.md +0 -9
- package/.claude/commands/training/model-update.md +0 -25
- package/.claude/commands/training/neural-patterns.md +0 -74
- package/.claude/commands/training/neural-train.md +0 -25
- package/.claude/commands/training/pattern-learn.md +0 -25
- package/.claude/commands/training/specialization.md +0 -63
- package/.claude/commands/workflows/README.md +0 -9
- package/.claude/commands/workflows/development.md +0 -78
- package/.claude/commands/workflows/research.md +0 -63
- package/.claude/commands/workflows/workflow-create.md +0 -25
- package/.claude/commands/workflows/workflow-execute.md +0 -25
- package/.claude/commands/workflows/workflow-export.md +0 -25
- package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
- package/.claude/skills/iterative-loop/SKILL.md +0 -371
- package/.claude/skills/performance-analysis/SKILL.md +0 -569
- package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +0 -144
- package/.claude/skills/performance-analysis/schemas/output.json +0 -588
- package/.claude/skills/performance-analysis/scripts/validate-config.json +0 -36
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured Validation Pipeline Framework (BMAD-003)
|
|
3
|
+
*
|
|
4
|
+
* Generic pipeline runner that executes validation steps sequentially,
|
|
5
|
+
* enforcing gates and producing structured reports.
|
|
6
|
+
*/
|
|
7
|
+
const DEFAULT_CATEGORY_WEIGHTS = {
|
|
8
|
+
format: 0.10,
|
|
9
|
+
content: 0.30,
|
|
10
|
+
quality: 0.25,
|
|
11
|
+
traceability: 0.20,
|
|
12
|
+
compliance: 0.15,
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Execute a validation pipeline.
|
|
16
|
+
*/
|
|
17
|
+
export async function runPipeline(config, content, filePath, metadata) {
|
|
18
|
+
const startTime = Date.now();
|
|
19
|
+
const weights = config.categoryWeights || DEFAULT_CATEGORY_WEIGHTS;
|
|
20
|
+
const context = {
|
|
21
|
+
content,
|
|
22
|
+
filePath,
|
|
23
|
+
metadata,
|
|
24
|
+
previousResults: [],
|
|
25
|
+
};
|
|
26
|
+
const stepResults = [];
|
|
27
|
+
const blockers = [];
|
|
28
|
+
let halted = false;
|
|
29
|
+
let haltedAt;
|
|
30
|
+
// Filter steps if specified
|
|
31
|
+
const stepsToRun = config.stepFilter
|
|
32
|
+
? config.steps.filter(s => config.stepFilter.includes(s.id))
|
|
33
|
+
: config.steps;
|
|
34
|
+
for (const step of stepsToRun) {
|
|
35
|
+
const stepStart = Date.now();
|
|
36
|
+
let result;
|
|
37
|
+
try {
|
|
38
|
+
result = await step.execute(context);
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
result = {
|
|
42
|
+
stepId: step.id,
|
|
43
|
+
stepName: step.name,
|
|
44
|
+
status: 'fail',
|
|
45
|
+
score: 0,
|
|
46
|
+
findings: [{
|
|
47
|
+
id: `${step.id}-error`,
|
|
48
|
+
stepId: step.id,
|
|
49
|
+
severity: 'critical',
|
|
50
|
+
title: `Step execution failed: ${step.name}`,
|
|
51
|
+
description: err.message,
|
|
52
|
+
}],
|
|
53
|
+
evidence: ['Step threw an exception during execution'],
|
|
54
|
+
duration: Date.now() - stepStart,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// Ensure duration is set
|
|
58
|
+
if (!result.duration) {
|
|
59
|
+
result.duration = Date.now() - stepStart;
|
|
60
|
+
}
|
|
61
|
+
stepResults.push(result);
|
|
62
|
+
context.previousResults.push(result);
|
|
63
|
+
// Check for blocking failure
|
|
64
|
+
if (step.severity === 'blocking' && result.status === 'fail') {
|
|
65
|
+
blockers.push(...result.findings);
|
|
66
|
+
if (!config.continueOnFailure) {
|
|
67
|
+
halted = true;
|
|
68
|
+
haltedAt = step.id;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Calculate overall score (weighted average by category)
|
|
74
|
+
const categoryScores = {};
|
|
75
|
+
for (const result of stepResults) {
|
|
76
|
+
const step = config.steps.find(s => s.id === result.stepId);
|
|
77
|
+
if (!step)
|
|
78
|
+
continue;
|
|
79
|
+
if (!categoryScores[step.category]) {
|
|
80
|
+
categoryScores[step.category] = { total: 0, count: 0 };
|
|
81
|
+
}
|
|
82
|
+
categoryScores[step.category].total += result.score;
|
|
83
|
+
categoryScores[step.category].count += 1;
|
|
84
|
+
}
|
|
85
|
+
let weightedScore = 0;
|
|
86
|
+
let totalWeight = 0;
|
|
87
|
+
for (const [category, { total, count }] of Object.entries(categoryScores)) {
|
|
88
|
+
const avgScore = count > 0 ? total / count : 0;
|
|
89
|
+
const weight = weights[category] || 0.1;
|
|
90
|
+
weightedScore += avgScore * weight;
|
|
91
|
+
totalWeight += weight;
|
|
92
|
+
}
|
|
93
|
+
const finalScore = totalWeight > 0 ? Math.round(weightedScore / totalWeight) : 0;
|
|
94
|
+
// Determine overall status
|
|
95
|
+
let overall;
|
|
96
|
+
if (blockers.length > 0) {
|
|
97
|
+
overall = 'fail';
|
|
98
|
+
}
|
|
99
|
+
else if (stepResults.some(r => r.status === 'warn')) {
|
|
100
|
+
overall = 'warn';
|
|
101
|
+
}
|
|
102
|
+
else if (finalScore >= 70) {
|
|
103
|
+
overall = 'pass';
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
overall = 'warn';
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
pipelineId: config.id,
|
|
110
|
+
pipelineName: config.name,
|
|
111
|
+
overall,
|
|
112
|
+
score: finalScore,
|
|
113
|
+
steps: stepResults,
|
|
114
|
+
blockers,
|
|
115
|
+
halted,
|
|
116
|
+
haltedAt,
|
|
117
|
+
totalDuration: Date.now() - startTime,
|
|
118
|
+
timestamp: new Date().toISOString(),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Format pipeline result as markdown report.
|
|
123
|
+
*/
|
|
124
|
+
export function formatPipelineReport(result) {
|
|
125
|
+
const lines = [];
|
|
126
|
+
const statusLabel = result.overall === 'pass' ? 'PASS' : result.overall === 'fail' ? 'FAIL' : 'WARN';
|
|
127
|
+
lines.push(`# Validation Report: ${result.pipelineName}`);
|
|
128
|
+
lines.push('');
|
|
129
|
+
lines.push(`**Overall**: ${statusLabel} | **Score**: ${result.score}/100 | **Duration**: ${result.totalDuration}ms`);
|
|
130
|
+
if (result.halted) {
|
|
131
|
+
lines.push(`**Halted at**: ${result.haltedAt} (blocking failure)`);
|
|
132
|
+
}
|
|
133
|
+
lines.push('');
|
|
134
|
+
// Step results table
|
|
135
|
+
lines.push('## Step Results');
|
|
136
|
+
lines.push('');
|
|
137
|
+
lines.push('| # | Step | Status | Score | Findings | Duration |');
|
|
138
|
+
lines.push('|---|------|--------|-------|----------|----------|');
|
|
139
|
+
for (let i = 0; i < result.steps.length; i++) {
|
|
140
|
+
const step = result.steps[i];
|
|
141
|
+
lines.push(`| ${i + 1} | ${step.stepName} | ${step.status.toUpperCase()} | ${step.score} | ${step.findings.length} | ${step.duration}ms |`);
|
|
142
|
+
}
|
|
143
|
+
lines.push('');
|
|
144
|
+
// Blockers
|
|
145
|
+
if (result.blockers.length > 0) {
|
|
146
|
+
lines.push('## Blockers');
|
|
147
|
+
lines.push('');
|
|
148
|
+
for (const blocker of result.blockers) {
|
|
149
|
+
lines.push(`- **${blocker.title}** (${blocker.severity}): ${blocker.description}`);
|
|
150
|
+
if (blocker.suggestion) {
|
|
151
|
+
lines.push(` - Suggestion: ${blocker.suggestion}`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
lines.push('');
|
|
155
|
+
}
|
|
156
|
+
// Detailed findings
|
|
157
|
+
const allFindings = result.steps.flatMap(s => s.findings);
|
|
158
|
+
if (allFindings.length > 0) {
|
|
159
|
+
lines.push('## All Findings');
|
|
160
|
+
lines.push('');
|
|
161
|
+
for (const finding of allFindings) {
|
|
162
|
+
lines.push(`- [${finding.severity.toUpperCase()}] **${finding.title}**: ${finding.description}`);
|
|
163
|
+
if (finding.location)
|
|
164
|
+
lines.push(` - Location: ${finding.location}`);
|
|
165
|
+
if (finding.suggestion)
|
|
166
|
+
lines.push(` - Fix: ${finding.suggestion}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
lines.push('');
|
|
170
|
+
lines.push(`_Generated: ${result.timestamp}_`);
|
|
171
|
+
return lines.join('\n');
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requirements Validation Steps (BMAD-003)
|
|
3
|
+
*
|
|
4
|
+
* 13 structured validation steps for requirements documents,
|
|
5
|
+
* inspired by BMAD-METHOD's PRD validation.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidationStep } from '../pipeline.js';
|
|
8
|
+
export declare const formatCheckStep: ValidationStep;
|
|
9
|
+
export declare const completenessCheckStep: ValidationStep;
|
|
10
|
+
export declare const investCriteriaStep: ValidationStep;
|
|
11
|
+
export declare const smartAcceptanceStep: ValidationStep;
|
|
12
|
+
export declare const testabilityScoreStep: ValidationStep;
|
|
13
|
+
export declare const vagueTermStep: ValidationStep;
|
|
14
|
+
export declare const informationDensityStep: ValidationStep;
|
|
15
|
+
export declare const traceabilityCheckStep: ValidationStep;
|
|
16
|
+
export declare const implementationLeakageStep: ValidationStep;
|
|
17
|
+
export declare const domainComplianceStep: ValidationStep;
|
|
18
|
+
export declare const dependencyAnalysisStep: ValidationStep;
|
|
19
|
+
export declare const bddScenarioStep: ValidationStep;
|
|
20
|
+
export declare const holisticQualityStep: ValidationStep;
|
|
21
|
+
/**
|
|
22
|
+
* All 13 requirements validation steps in order.
|
|
23
|
+
*/
|
|
24
|
+
export declare const REQUIREMENTS_VALIDATION_STEPS: ValidationStep[];
|
|
25
|
+
/**
|
|
26
|
+
* Create a requirements validation pipeline config.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createRequirementsPipeline(options?: {
|
|
29
|
+
continueOnFailure?: boolean;
|
|
30
|
+
stepFilter?: string[];
|
|
31
|
+
}): import('../pipeline.js').PipelineConfig;
|
|
32
|
+
//# sourceMappingURL=requirements.d.ts.map
|