agentic-qe 3.7.16 → 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 -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 +22 -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 +2396 -614
- 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 +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/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
|
@@ -17,6 +17,10 @@ export interface AgentsInstallResult {
|
|
|
17
17
|
errors: string[];
|
|
18
18
|
totalCount: number;
|
|
19
19
|
agentsDir: string;
|
|
20
|
+
/** Agents that had customization overlays applied */
|
|
21
|
+
overlaysApplied?: string[];
|
|
22
|
+
/** Warnings from overlay loading */
|
|
23
|
+
overlayWarnings?: string[];
|
|
20
24
|
}
|
|
21
25
|
export interface AgentsInstallerOptions {
|
|
22
26
|
/** Project root directory */
|
|
@@ -43,6 +47,11 @@ export declare class AgentsInstaller {
|
|
|
43
47
|
* PRIORITY: assets directory (has helpers) > root .claude (no helpers)
|
|
44
48
|
*/
|
|
45
49
|
private findSourceAgentsDir;
|
|
50
|
+
/**
|
|
51
|
+
* Ensure the agent-overrides directory exists and is preserved during install.
|
|
52
|
+
* This directory holds user customization overlays that survive `aqe init`.
|
|
53
|
+
*/
|
|
54
|
+
private preserveOverridesDir;
|
|
46
55
|
/**
|
|
47
56
|
* Install agents to the project
|
|
48
57
|
*/
|
|
@@ -9,6 +9,7 @@ import { existsSync, mkdirSync, readdirSync, statSync, readFileSync, writeFileSy
|
|
|
9
9
|
import { join, dirname } from 'path';
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
11
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
12
|
+
import { loadOverlays, applyOverlayToContent } from '../agents/overlay-loader.js';
|
|
12
13
|
// ============================================================================
|
|
13
14
|
// Agent Categories
|
|
14
15
|
// ============================================================================
|
|
@@ -169,6 +170,30 @@ export class AgentsInstaller {
|
|
|
169
170
|
// If no agents found, return the first path (will fail gracefully)
|
|
170
171
|
return possiblePaths[0];
|
|
171
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Ensure the agent-overrides directory exists and is preserved during install.
|
|
175
|
+
* This directory holds user customization overlays that survive `aqe init`.
|
|
176
|
+
*/
|
|
177
|
+
preserveOverridesDir() {
|
|
178
|
+
const overridesDir = join(this.projectRoot, '.claude', 'agent-overrides');
|
|
179
|
+
if (!existsSync(overridesDir)) {
|
|
180
|
+
mkdirSync(overridesDir, { recursive: true });
|
|
181
|
+
}
|
|
182
|
+
// Copy the example overlay template if not already present
|
|
183
|
+
const exampleDest = join(overridesDir, '_example.yaml');
|
|
184
|
+
if (!existsSync(exampleDest)) {
|
|
185
|
+
const templateSources = [
|
|
186
|
+
join(__dirname, '..', '..', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
187
|
+
join(__dirname, '..', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
188
|
+
];
|
|
189
|
+
for (const src of templateSources) {
|
|
190
|
+
if (existsSync(src)) {
|
|
191
|
+
copyFileSync(src, exampleDest);
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
172
197
|
/**
|
|
173
198
|
* Install agents to the project
|
|
174
199
|
*/
|
|
@@ -179,7 +204,11 @@ export class AgentsInstaller {
|
|
|
179
204
|
errors: [],
|
|
180
205
|
totalCount: 0,
|
|
181
206
|
agentsDir: join(this.projectRoot, '.claude', 'agents', 'v3'),
|
|
207
|
+
overlaysApplied: [],
|
|
208
|
+
overlayWarnings: [],
|
|
182
209
|
};
|
|
210
|
+
// Preserve the agent-overrides directory (survives reinstall)
|
|
211
|
+
this.preserveOverridesDir();
|
|
183
212
|
// Check if source agents exist
|
|
184
213
|
if (!existsSync(this.sourceAgentsDir)) {
|
|
185
214
|
result.errors.push(`Source agents directory not found: ${this.sourceAgentsDir}`);
|
|
@@ -219,6 +248,49 @@ export class AgentsInstaller {
|
|
|
219
248
|
result.errors.push(`Failed to install ${agentName}: ${toErrorMessage(error)}`);
|
|
220
249
|
}
|
|
221
250
|
}
|
|
251
|
+
// Load and apply agent customization overlays (BMAD-002)
|
|
252
|
+
const overlayResult = loadOverlays(this.projectRoot);
|
|
253
|
+
if (overlayResult.warnings.length > 0) {
|
|
254
|
+
result.overlayWarnings = overlayResult.warnings;
|
|
255
|
+
for (const warning of overlayResult.warnings) {
|
|
256
|
+
console.error(`[AgentsInstaller] Overlay warning: ${warning}`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (overlayResult.errors.length > 0) {
|
|
260
|
+
for (const error of overlayResult.errors) {
|
|
261
|
+
result.errors.push(`Overlay error: ${error}`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Apply overlays to installed agent files
|
|
265
|
+
for (const overlay of overlayResult.overlays) {
|
|
266
|
+
const agentName = overlay.agent;
|
|
267
|
+
const isSubagent = V3_SUBAGENTS.includes(agentName);
|
|
268
|
+
const agentFile = isSubagent
|
|
269
|
+
? join(targetSubagentsDir, `${agentName}.md`)
|
|
270
|
+
: join(targetAgentsDir, `${agentName}.md`);
|
|
271
|
+
if (!existsSync(agentFile)) {
|
|
272
|
+
result.overlayWarnings.push(`Overlay for "${agentName}" found but agent file does not exist. Skipping.`);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
try {
|
|
276
|
+
const agentContent = readFileSync(agentFile, 'utf-8');
|
|
277
|
+
const { content: modifiedContent, applied } = applyOverlayToContent(agentContent, overlay);
|
|
278
|
+
writeFileSync(agentFile, modifiedContent, 'utf-8');
|
|
279
|
+
result.overlaysApplied.push(agentName);
|
|
280
|
+
const changes = [
|
|
281
|
+
...applied.replacedFields.map(f => `replaced:${f}`),
|
|
282
|
+
...applied.appendedFields.map(f => `appended:${f}`),
|
|
283
|
+
...applied.configOverrides.map(f => `config:${f}`),
|
|
284
|
+
];
|
|
285
|
+
console.error(`[AgentsInstaller] Applied overlay for ${agentName}: ${changes.join(', ')}`);
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
result.overlayWarnings.push(`Failed to apply overlay for "${agentName}": ${toErrorMessage(error)}`);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (result.overlaysApplied.length > 0) {
|
|
292
|
+
console.error(`[AgentsInstaller] Applied ${result.overlaysApplied.length} agent overlay(s): ${result.overlaysApplied.join(', ')}`);
|
|
293
|
+
}
|
|
222
294
|
// Create agents index file
|
|
223
295
|
await this.createAgentsIndex(targetAgentsDir, result.installed);
|
|
224
296
|
return result;
|
|
@@ -46,6 +46,17 @@ export declare class HooksPhase extends BasePhase<HooksResult> {
|
|
|
46
46
|
* verifies the checkpoint exists on session start.
|
|
47
47
|
*/
|
|
48
48
|
private installBrainCheckpoint;
|
|
49
|
+
/**
|
|
50
|
+
* Install the statusline-v3.cjs helper into .claude/helpers/.
|
|
51
|
+
* This script generates a dynamic status line for Claude Code showing
|
|
52
|
+
* fleet status, learning metrics, domain progress, and architecture info.
|
|
53
|
+
*/
|
|
54
|
+
private installStatusline;
|
|
55
|
+
/**
|
|
56
|
+
* Generate a minimal statusline-v3.cjs script as a fallback.
|
|
57
|
+
* Used when the full asset isn't available for copying.
|
|
58
|
+
*/
|
|
59
|
+
private generateMinimalStatuslineScript;
|
|
49
60
|
/**
|
|
50
61
|
* Generate the brain-checkpoint.cjs script inline.
|
|
51
62
|
* Used when the source file isn't available for copying.
|
|
@@ -153,6 +153,8 @@ export class HooksPhase extends BasePhase {
|
|
|
153
153
|
const { projectRoot } = context;
|
|
154
154
|
// Install brain-checkpoint helper into .claude/helpers/
|
|
155
155
|
this.installBrainCheckpoint(projectRoot, context);
|
|
156
|
+
// Install statusline-v3 helper into .claude/helpers/
|
|
157
|
+
this.installStatusline(projectRoot, context);
|
|
156
158
|
// Install cross-phase memory config
|
|
157
159
|
const crossPhasePath = join(hooksDir, 'cross-phase-memory.yaml');
|
|
158
160
|
if (!existsSync(crossPhasePath)) {
|
|
@@ -241,6 +243,71 @@ export class HooksPhase extends BasePhase {
|
|
|
241
243
|
context.services.log(' Installed brain-checkpoint.cjs (generated)');
|
|
242
244
|
}
|
|
243
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Install the statusline-v3.cjs helper into .claude/helpers/.
|
|
248
|
+
* This script generates a dynamic status line for Claude Code showing
|
|
249
|
+
* fleet status, learning metrics, domain progress, and architecture info.
|
|
250
|
+
*/
|
|
251
|
+
installStatusline(projectRoot, context) {
|
|
252
|
+
const helpersDir = join(projectRoot, '.claude', 'helpers');
|
|
253
|
+
if (!existsSync(helpersDir)) {
|
|
254
|
+
mkdirSync(helpersDir, { recursive: true });
|
|
255
|
+
}
|
|
256
|
+
const destPath = join(helpersDir, 'statusline-v3.cjs');
|
|
257
|
+
// Try to copy from distributed assets or our own installation
|
|
258
|
+
const sourcePaths = [
|
|
259
|
+
join(projectRoot, 'node_modules', 'agentic-qe', 'assets', 'helpers', 'statusline-v3.cjs'),
|
|
260
|
+
join(projectRoot, 'assets', 'helpers', 'statusline-v3.cjs'),
|
|
261
|
+
];
|
|
262
|
+
for (const src of sourcePaths) {
|
|
263
|
+
if (existsSync(src) && src !== destPath) {
|
|
264
|
+
const { copyFileSync } = require('fs');
|
|
265
|
+
copyFileSync(src, destPath);
|
|
266
|
+
context.services.log(' Installed statusline-v3.cjs (copied)');
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
// If not available from source, generate a minimal fallback
|
|
271
|
+
if (!existsSync(destPath)) {
|
|
272
|
+
writeFileSync(destPath, this.generateMinimalStatuslineScript(), 'utf-8');
|
|
273
|
+
context.services.log(' Installed statusline-v3.cjs (generated)');
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Generate a minimal statusline-v3.cjs script as a fallback.
|
|
278
|
+
* Used when the full asset isn't available for copying.
|
|
279
|
+
*/
|
|
280
|
+
generateMinimalStatuslineScript() {
|
|
281
|
+
return `#!/usr/bin/env node
|
|
282
|
+
/**
|
|
283
|
+
* Agentic QE v3 Statusline (minimal fallback, generated by aqe init)
|
|
284
|
+
* For the full statusline, reinstall: npx agentic-qe init --auto
|
|
285
|
+
*/
|
|
286
|
+
const fs = require('fs');
|
|
287
|
+
const path = require('path');
|
|
288
|
+
const { execSync } = require('child_process');
|
|
289
|
+
|
|
290
|
+
function q(cmd, d) { try { return execSync(cmd, { encoding: 'utf-8', timeout: 3000 }).trim(); } catch { return d || ''; } }
|
|
291
|
+
|
|
292
|
+
const dir = process.cwd();
|
|
293
|
+
const dbPath = path.join(dir, '.agentic-qe', 'memory.db');
|
|
294
|
+
let patterns = 0;
|
|
295
|
+
try {
|
|
296
|
+
if (fs.existsSync(dbPath)) {
|
|
297
|
+
const Database = require('better-sqlite3');
|
|
298
|
+
const db = new Database(dbPath, { readonly: true, fileMustExist: true });
|
|
299
|
+
patterns = db.prepare('SELECT COUNT(*) AS c FROM qe_patterns').get()?.c || 0;
|
|
300
|
+
db.close();
|
|
301
|
+
}
|
|
302
|
+
} catch { /* ignore */ }
|
|
303
|
+
|
|
304
|
+
const branch = q('git branch --show-current 2>/dev/null');
|
|
305
|
+
const branchStr = branch ? \` \\x1b[34m⎇ \${branch}\\x1b[0m\` : '';
|
|
306
|
+
const patStr = patterns > 0 ? \` \\x1b[35m🎓 \${patterns} patterns\\x1b[0m\` : '';
|
|
307
|
+
|
|
308
|
+
console.log(\`\\x1b[1m\\x1b[35mâ–Š Agentic QE v3\\x1b[0m\${branchStr}\${patStr}\`);
|
|
309
|
+
`;
|
|
310
|
+
}
|
|
244
311
|
/**
|
|
245
312
|
* Generate the brain-checkpoint.cjs script inline.
|
|
246
313
|
* Used when the source file isn't available for copying.
|
|
@@ -8,6 +8,7 @@ import { BasePhase, } from './phase-interface.js';
|
|
|
8
8
|
import { createSkillsInstaller } from '../skills-installer.js';
|
|
9
9
|
import { createAgentsInstaller } from '../agents-installer.js';
|
|
10
10
|
import { createN8nInstaller } from '../n8n-installer.js';
|
|
11
|
+
import { initializeOverlays } from '../../routing/qe-agent-registry.js';
|
|
11
12
|
/**
|
|
12
13
|
* Assets phase - installs skills and agents
|
|
13
14
|
*/
|
|
@@ -66,6 +67,8 @@ export class AssetsPhase extends BasePhase {
|
|
|
66
67
|
if (agentsResult.errors.length > 0) {
|
|
67
68
|
context.services.warn(`Agents warnings: ${agentsResult.errors.join(', ')}`);
|
|
68
69
|
}
|
|
70
|
+
// Initialize overlay configs in agent registry for runtime use
|
|
71
|
+
initializeOverlays(projectRoot);
|
|
69
72
|
// Install n8n platform (optional)
|
|
70
73
|
if (options.withN8n) {
|
|
71
74
|
const n8nInstaller = createN8nInstaller({
|
|
@@ -95,7 +95,7 @@ export function generateV3SettingsSections(config) {
|
|
|
95
95
|
},
|
|
96
96
|
statusLine: {
|
|
97
97
|
type: 'command',
|
|
98
|
-
command: 'node .claude/helpers/statusline-v3.cjs 2>/dev/null ||
|
|
98
|
+
command: 'node .claude/helpers/statusline-v3.cjs 2>/dev/null || echo "â–Š Agentic QE v3"',
|
|
99
99
|
refreshMs: 5000,
|
|
100
100
|
enabled: true,
|
|
101
101
|
},
|