agentic-qe 3.7.16 → 3.7.18
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 -145
- 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 +29 -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 +2415 -624
- package/dist/cli/commands/coverage.js +50 -0
- 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/init/agents-installer.d.ts +9 -0
- package/dist/init/agents-installer.js +79 -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 +18 -10
- package/dist/init/settings-merge.js +1 -1
- package/dist/mcp/bundle.js +4411 -3979
- 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/types.d.ts +2 -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
|
@@ -51,6 +51,16 @@ export interface TaskRoutingResult {
|
|
|
51
51
|
readonly patternHints?: readonly PatternHint[];
|
|
52
52
|
/** Pattern context formatted for agent prompts (Phase 5.2) */
|
|
53
53
|
readonly patternContext?: string;
|
|
54
|
+
/** Overlay config overrides for the routed agent (BMAD-002) */
|
|
55
|
+
readonly overlayConfig?: {
|
|
56
|
+
minimumFindings?: number;
|
|
57
|
+
maxParallelAgents?: number;
|
|
58
|
+
preferredFrameworks?: string[];
|
|
59
|
+
severityThresholds?: Record<string, number>;
|
|
60
|
+
needsContext?: boolean;
|
|
61
|
+
};
|
|
62
|
+
/** Compiled context from ContextCompiler (BMAD-005) */
|
|
63
|
+
compiledContext?: string;
|
|
54
64
|
}
|
|
55
65
|
/**
|
|
56
66
|
* Routing log entry for metrics and debugging
|
|
@@ -113,6 +123,7 @@ export declare class TaskRouterService {
|
|
|
113
123
|
private readonly modelRouter;
|
|
114
124
|
private readonly minCutRouter;
|
|
115
125
|
private readonly routingLog;
|
|
126
|
+
private readonly contextCompiler;
|
|
116
127
|
private disposed;
|
|
117
128
|
private constructor();
|
|
118
129
|
/**
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { createModelRouter, createModelRouterWithAgentBooster, TIER_METADATA, } from '../../integrations/agentic-flow';
|
|
11
11
|
import { createMinCutRoutingService, } from './mincut-routing-service.js';
|
|
12
|
+
import { getAgentOverlayConfig } from '../../routing/qe-agent-registry.js';
|
|
13
|
+
import { ContextCompiler, formatContextForPrompt } from '../../context/compiler.js';
|
|
12
14
|
/**
|
|
13
15
|
* Default Task Router configuration
|
|
14
16
|
*/
|
|
@@ -47,10 +49,12 @@ export class TaskRouterService {
|
|
|
47
49
|
modelRouter;
|
|
48
50
|
minCutRouter;
|
|
49
51
|
routingLog = [];
|
|
52
|
+
contextCompiler;
|
|
50
53
|
disposed = false;
|
|
51
54
|
constructor(config, modelRouter) {
|
|
52
55
|
this.config = config;
|
|
53
56
|
this.modelRouter = modelRouter;
|
|
57
|
+
this.contextCompiler = new ContextCompiler();
|
|
54
58
|
this.minCutRouter = createMinCutRoutingService({
|
|
55
59
|
enableLogging: config.enableLogging,
|
|
56
60
|
});
|
|
@@ -188,6 +192,26 @@ export class TaskRouterService {
|
|
|
188
192
|
const patternContext = patternHints && patternHints.length > 0
|
|
189
193
|
? this.formatPatternContext(patternHints)
|
|
190
194
|
: undefined;
|
|
195
|
+
// Check for overlay config overrides for the routed agent
|
|
196
|
+
const agentType = input.agentType;
|
|
197
|
+
const overlayConfig = agentType
|
|
198
|
+
? (getAgentOverlayConfig(agentType) || getAgentOverlayConfig(agentType.replace('v3-qe-', 'qe-')))
|
|
199
|
+
: undefined;
|
|
200
|
+
// Compile context if file paths are provided (BMAD-005)
|
|
201
|
+
let compiledContext;
|
|
202
|
+
if (input.filePaths && input.filePaths.length > 0) {
|
|
203
|
+
try {
|
|
204
|
+
const compiled = await this.contextCompiler.compile({
|
|
205
|
+
targetFiles: input.filePaths,
|
|
206
|
+
agentType: input.agentType || 'unknown',
|
|
207
|
+
taskDescription: input.task,
|
|
208
|
+
});
|
|
209
|
+
compiledContext = formatContextForPrompt(compiled);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
// Non-blocking — context compilation failure should not affect routing
|
|
213
|
+
}
|
|
214
|
+
}
|
|
191
215
|
return {
|
|
192
216
|
decision: effectiveDecision,
|
|
193
217
|
executionStrategy,
|
|
@@ -202,6 +226,8 @@ export class TaskRouterService {
|
|
|
202
226
|
logEntry,
|
|
203
227
|
patternHints,
|
|
204
228
|
patternContext,
|
|
229
|
+
overlayConfig,
|
|
230
|
+
compiledContext,
|
|
205
231
|
};
|
|
206
232
|
}
|
|
207
233
|
/**
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import type { QEAgentProfile, AgentCapability, ProgrammingLanguage, TestFramework, ComplexityLevel } from './types.js';
|
|
25
25
|
import type { QEDomain } from '../learning/qe-patterns.js';
|
|
26
|
+
import type { AgentOverlay } from '../agents/overlay-schema.js';
|
|
26
27
|
/**
|
|
27
28
|
* All QE agents in the registry
|
|
28
29
|
*/
|
|
@@ -91,4 +92,14 @@ export declare function getAgentsByPerformance(domain?: QEDomain): QEAgentProfil
|
|
|
91
92
|
* Reset all agent performance metrics (for testing)
|
|
92
93
|
*/
|
|
93
94
|
export declare function resetAgentPerformanceMetrics(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Initialize overlay configurations from project root.
|
|
97
|
+
* Loads all .claude/agent-overrides/*.yaml files and caches their config sections.
|
|
98
|
+
*/
|
|
99
|
+
export declare function initializeOverlays(projectRoot: string): void;
|
|
100
|
+
/**
|
|
101
|
+
* Get overlay configuration for a specific agent.
|
|
102
|
+
* Returns undefined if no overlay exists for the agent.
|
|
103
|
+
*/
|
|
104
|
+
export declare function getAgentOverlayConfig(agentId: string): AgentOverlay['config'] | undefined;
|
|
94
105
|
//# sourceMappingURL=qe-agent-registry.d.ts.map
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* - V3 Specialized: {name} (cross-cutting, no v3-qe prefix, e.g., memory-specialist)
|
|
22
22
|
* - Legacy/V2 Compatibility: qe-* (deprecated, use v3-qe-* instead)
|
|
23
23
|
*/
|
|
24
|
+
import { loadOverlays } from '../agents/overlay-loader.js';
|
|
24
25
|
// ============================================================================
|
|
25
26
|
// Helper Functions
|
|
26
27
|
// ============================================================================
|
|
@@ -1174,4 +1175,37 @@ export function resetAgentPerformanceMetrics() {
|
|
|
1174
1175
|
}
|
|
1175
1176
|
console.error('[AgentRegistry] Reset all agent performance metrics');
|
|
1176
1177
|
}
|
|
1178
|
+
// ============================================================================
|
|
1179
|
+
// Agent Customization Overlays (BMAD-002)
|
|
1180
|
+
// ============================================================================
|
|
1181
|
+
/** Module-level cache of overlay configs keyed by agent ID */
|
|
1182
|
+
let overlayConfigs = new Map();
|
|
1183
|
+
/**
|
|
1184
|
+
* Initialize overlay configurations from project root.
|
|
1185
|
+
* Loads all .claude/agent-overrides/*.yaml files and caches their config sections.
|
|
1186
|
+
*/
|
|
1187
|
+
export function initializeOverlays(projectRoot) {
|
|
1188
|
+
overlayConfigs = new Map();
|
|
1189
|
+
const result = loadOverlays(projectRoot);
|
|
1190
|
+
for (const overlay of result.overlays) {
|
|
1191
|
+
if (overlay.config) {
|
|
1192
|
+
overlayConfigs.set(overlay.agent, overlay.config);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
if (overlayConfigs.size > 0) {
|
|
1196
|
+
console.error(`[AgentRegistry] Loaded overlay configs for ${overlayConfigs.size} agent(s): ${[...overlayConfigs.keys()].join(', ')}`);
|
|
1197
|
+
}
|
|
1198
|
+
if (result.warnings.length > 0) {
|
|
1199
|
+
for (const warning of result.warnings) {
|
|
1200
|
+
console.error(`[AgentRegistry] Overlay warning: ${warning}`);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Get overlay configuration for a specific agent.
|
|
1206
|
+
* Returns undefined if no overlay exists for the agent.
|
|
1207
|
+
*/
|
|
1208
|
+
export function getAgentOverlayConfig(agentId) {
|
|
1209
|
+
return overlayConfigs.get(agentId);
|
|
1210
|
+
}
|
|
1177
1211
|
//# sourceMappingURL=qe-agent-registry.js.map
|
|
@@ -17,6 +17,7 @@ export declare class QETaskRouter {
|
|
|
17
17
|
private agentEmbeddings;
|
|
18
18
|
private initialized;
|
|
19
19
|
private embeddingCache;
|
|
20
|
+
private contextCompiler;
|
|
20
21
|
/** Optional witness chain for audit trail of routing decisions (ADR-070) */
|
|
21
22
|
private _witnessChain;
|
|
22
23
|
set witnessChain(wc: WitnessChain | null);
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { performance } from 'perf_hooks';
|
|
11
11
|
import { DEFAULT_ROUTER_CONFIG } from './types.js';
|
|
12
|
-
import { QE_AGENT_REGISTRY, getAgentById } from './qe-agent-registry.js';
|
|
12
|
+
import { QE_AGENT_REGISTRY, getAgentById, getAgentOverlayConfig, initializeOverlays } from './qe-agent-registry.js';
|
|
13
13
|
import { computeRealEmbedding, cosineSimilarity, } from '../learning/real-embeddings.js';
|
|
14
|
+
import { ContextCompiler, formatContextForPrompt } from '../context/compiler.js';
|
|
14
15
|
// ============================================================================
|
|
15
16
|
// Task Keyword Detection
|
|
16
17
|
// ============================================================================
|
|
@@ -130,6 +131,7 @@ export class QETaskRouter {
|
|
|
130
131
|
agentEmbeddings = new Map();
|
|
131
132
|
initialized = false;
|
|
132
133
|
embeddingCache = new Map();
|
|
134
|
+
contextCompiler = null;
|
|
133
135
|
/** Optional witness chain for audit trail of routing decisions (ADR-070) */
|
|
134
136
|
_witnessChain = null;
|
|
135
137
|
set witnessChain(wc) { this._witnessChain = wc; }
|
|
@@ -142,12 +144,15 @@ export class QETaskRouter {
|
|
|
142
144
|
async initialize() {
|
|
143
145
|
if (this.initialized)
|
|
144
146
|
return;
|
|
147
|
+
// Load overlay configs so routing can apply user customizations
|
|
148
|
+
initializeOverlays(process.cwd());
|
|
145
149
|
// Compute embedding for each agent based on their description and capabilities
|
|
146
150
|
for (const agent of QE_AGENT_REGISTRY) {
|
|
147
151
|
const text = this.buildAgentEmbeddingText(agent);
|
|
148
152
|
const embedding = await computeRealEmbedding(text);
|
|
149
153
|
this.agentEmbeddings.set(agent.id, embedding);
|
|
150
154
|
}
|
|
155
|
+
this.contextCompiler = new ContextCompiler();
|
|
151
156
|
this.initialized = true;
|
|
152
157
|
}
|
|
153
158
|
/**
|
|
@@ -209,7 +214,23 @@ export class QETaskRouter {
|
|
|
209
214
|
}, 'qe-task-router');
|
|
210
215
|
}
|
|
211
216
|
catch { /* best-effort witness */ }
|
|
212
|
-
|
|
217
|
+
// Compile context for the recommended agent (if files provided)
|
|
218
|
+
let compiledContext;
|
|
219
|
+
const filePaths = task.context?.files;
|
|
220
|
+
if (filePaths && filePaths.length > 0 && this.contextCompiler) {
|
|
221
|
+
try {
|
|
222
|
+
const context = await this.contextCompiler.compile({
|
|
223
|
+
targetFiles: filePaths,
|
|
224
|
+
agentType: topScore.agent,
|
|
225
|
+
taskDescription: task.description,
|
|
226
|
+
});
|
|
227
|
+
compiledContext = formatContextForPrompt(context);
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
// Context compilation failure is non-blocking
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const decision = {
|
|
213
234
|
recommended: topScore.agent,
|
|
214
235
|
confidence: topScore.combinedScore,
|
|
215
236
|
alternatives,
|
|
@@ -223,6 +244,10 @@ export class QETaskRouter {
|
|
|
223
244
|
latencyMs,
|
|
224
245
|
timestamp: new Date(),
|
|
225
246
|
};
|
|
247
|
+
if (compiledContext) {
|
|
248
|
+
decision.compiledContext = compiledContext;
|
|
249
|
+
}
|
|
250
|
+
return decision;
|
|
226
251
|
}
|
|
227
252
|
/**
|
|
228
253
|
* Detect QE domain from task description
|
|
@@ -372,6 +397,13 @@ export class QETaskRouter {
|
|
|
372
397
|
if (task.context?.previousAgent === agent.id) {
|
|
373
398
|
bonus += 0.05;
|
|
374
399
|
}
|
|
400
|
+
// Bonus from overlay config (user customizations)
|
|
401
|
+
const overlayConfig = getAgentOverlayConfig(agent.id) || getAgentOverlayConfig(agent.id.replace('v3-qe-', 'qe-'));
|
|
402
|
+
if (overlayConfig?.preferredFrameworks && task.framework) {
|
|
403
|
+
if (overlayConfig.preferredFrameworks.includes(task.framework)) {
|
|
404
|
+
bonus += 0.1;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
375
407
|
// 5. Combined weighted score
|
|
376
408
|
const { weights } = this.config;
|
|
377
409
|
const combinedScore = Math.min(1.0, (weights.similarity * similarityScore) +
|
package/dist/routing/types.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ export interface QERoutingDecision {
|
|
|
112
112
|
readonly latencyMs: number;
|
|
113
113
|
/** Timestamp */
|
|
114
114
|
readonly timestamp: Date;
|
|
115
|
+
/** Compiled context for the recommended agent (if files provided) */
|
|
116
|
+
compiledContext?: string;
|
|
115
117
|
}
|
|
116
118
|
/**
|
|
117
119
|
* Routing weights for combining scores
|
|
@@ -20,4 +20,7 @@ export { TriggerOptimizer, createTriggerOptimizer, parseSkillFrontmatter, } from
|
|
|
20
20
|
export type { SkillMetadata, TriggerAnalysisConfig, TriggerAnalysisResult, TriggerSuggestion, TriggerOptimizationReport, } from './trigger-optimizer.js';
|
|
21
21
|
export { VersionComparator, createVersionComparator, } from './version-comparator.js';
|
|
22
22
|
export type { VersionComparisonConfig, SkillVersion, VersionComparisonResult, VersionResult, ComparisonStats, TestCaseComparison, } from './version-comparator.js';
|
|
23
|
+
export { runPipeline, formatPipelineReport, } from './pipeline.js';
|
|
24
|
+
export type { StepCategory, StepSeverity, StepStatus, Finding, ValidationContext, ValidationStep, StepResult, PipelineConfig, PipelineResult, } from './pipeline.js';
|
|
25
|
+
export { REQUIREMENTS_VALIDATION_STEPS, createRequirementsPipeline, formatCheckStep, completenessCheckStep, investCriteriaStep, smartAcceptanceStep, testabilityScoreStep, vagueTermStep, informationDensityStep, traceabilityCheckStep, implementationLeakageStep, domainComplianceStep, dependencyAnalysisStep, bddScenarioStep, holisticQualityStep, } from './steps/requirements.js';
|
|
23
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/validation/index.js
CHANGED
|
@@ -36,4 +36,14 @@ export { TriggerOptimizer, createTriggerOptimizer, parseSkillFrontmatter, } from
|
|
|
36
36
|
// Version Comparator (ADR-056: A/B testing between skill versions)
|
|
37
37
|
// ============================================================================
|
|
38
38
|
export { VersionComparator, createVersionComparator, } from './version-comparator.js';
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Structured Validation Pipeline (BMAD-003)
|
|
41
|
+
// ============================================================================
|
|
42
|
+
export { runPipeline, formatPipelineReport, } from './pipeline.js';
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Requirements Validation Steps (BMAD-003)
|
|
45
|
+
// ============================================================================
|
|
46
|
+
export { REQUIREMENTS_VALIDATION_STEPS, createRequirementsPipeline,
|
|
47
|
+
// Individual steps
|
|
48
|
+
formatCheckStep, completenessCheckStep, investCriteriaStep, smartAcceptanceStep, testabilityScoreStep, vagueTermStep, informationDensityStep, traceabilityCheckStep, implementationLeakageStep, domainComplianceStep, dependencyAnalysisStep, bddScenarioStep, holisticQualityStep, } from './steps/requirements.js';
|
|
39
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
export type StepCategory = 'format' | 'content' | 'quality' | 'traceability' | 'compliance';
|
|
8
|
+
export type StepSeverity = 'blocking' | 'warning' | 'info';
|
|
9
|
+
export type StepStatus = 'pass' | 'fail' | 'warn' | 'skip';
|
|
10
|
+
export interface Finding {
|
|
11
|
+
id: string;
|
|
12
|
+
stepId: string;
|
|
13
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
location?: string;
|
|
17
|
+
suggestion?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ValidationContext {
|
|
20
|
+
/** The content being validated (requirements doc, code, etc.) */
|
|
21
|
+
content: string;
|
|
22
|
+
/** File path if applicable */
|
|
23
|
+
filePath?: string;
|
|
24
|
+
/** Additional metadata */
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
/** Results from previous steps (accumulated) */
|
|
27
|
+
previousResults: StepResult[];
|
|
28
|
+
}
|
|
29
|
+
export interface ValidationStep {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
category: StepCategory;
|
|
33
|
+
severity: StepSeverity;
|
|
34
|
+
description?: string;
|
|
35
|
+
execute(context: ValidationContext): Promise<StepResult>;
|
|
36
|
+
}
|
|
37
|
+
export interface StepResult {
|
|
38
|
+
stepId: string;
|
|
39
|
+
stepName: string;
|
|
40
|
+
status: StepStatus;
|
|
41
|
+
score: number;
|
|
42
|
+
findings: Finding[];
|
|
43
|
+
evidence: string[];
|
|
44
|
+
duration: number;
|
|
45
|
+
}
|
|
46
|
+
export interface PipelineConfig {
|
|
47
|
+
/** Pipeline identifier */
|
|
48
|
+
id: string;
|
|
49
|
+
/** Human-readable name */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Steps to execute */
|
|
52
|
+
steps: ValidationStep[];
|
|
53
|
+
/** Continue past blocking failures */
|
|
54
|
+
continueOnFailure?: boolean;
|
|
55
|
+
/** Only run specific steps (by id) */
|
|
56
|
+
stepFilter?: string[];
|
|
57
|
+
/** Weights for score calculation (step category -> weight) */
|
|
58
|
+
categoryWeights?: Record<StepCategory, number>;
|
|
59
|
+
}
|
|
60
|
+
export interface PipelineResult {
|
|
61
|
+
pipelineId: string;
|
|
62
|
+
pipelineName: string;
|
|
63
|
+
overall: 'pass' | 'fail' | 'warn';
|
|
64
|
+
score: number;
|
|
65
|
+
steps: StepResult[];
|
|
66
|
+
blockers: Finding[];
|
|
67
|
+
halted: boolean;
|
|
68
|
+
haltedAt?: string;
|
|
69
|
+
totalDuration: number;
|
|
70
|
+
timestamp: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Execute a validation pipeline.
|
|
74
|
+
*/
|
|
75
|
+
export declare function runPipeline(config: PipelineConfig, content: string, filePath?: string, metadata?: Record<string, unknown>): Promise<PipelineResult>;
|
|
76
|
+
/**
|
|
77
|
+
* Format pipeline result as markdown report.
|
|
78
|
+
*/
|
|
79
|
+
export declare function formatPipelineReport(result: PipelineResult): string;
|
|
80
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -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
|