@sixsevenai/ai-dlc-installer 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +123 -9
- package/dist/cli.js.map +1 -1
- package/library/ai-dlc/workflows/schemas/template-schema.json +544 -0
- package/library/ai-dlc/workflows/template-registry.yaml +962 -0
- package/library/ai-dlc/workflows/templates/README.md +837 -0
- package/library/ai-dlc/workflows/templates/csharp/brownfield/api-integration.yaml +814 -0
- package/library/ai-dlc/workflows/templates/csharp/brownfield/azure-integration.yaml +821 -0
- package/library/ai-dlc/workflows/templates/csharp/brownfield/legacy-migration.yaml +714 -0
- package/library/ai-dlc/workflows/templates/csharp/brownfield/nuget-package.yaml +790 -0
- package/library/ai-dlc/workflows/templates/csharp/defect-fix/hotfix-deployment.yaml +747 -0
- package/library/ai-dlc/workflows/templates/csharp/defect-fix/performance-fix.yaml +956 -0
- package/library/ai-dlc/workflows/templates/csharp/defect-fix/security-patch.yaml +852 -0
- package/library/ai-dlc/workflows/templates/csharp/greenfield/aspnetcore-webapi.yaml +776 -0
- package/library/ai-dlc/workflows/templates/csharp/greenfield/blazor-app.yaml +648 -0
- package/library/ai-dlc/workflows/templates/csharp/greenfield/console-app.yaml +979 -0
- package/library/ai-dlc/workflows/templates/csharp/greenfield/microservice.yaml +780 -0
- package/library/ai-dlc/workflows/templates/csharp/infrastructure/azure-deployment.yaml +867 -0
- package/library/ai-dlc/workflows/templates/csharp/infrastructure/cicd-pipeline.yaml +1170 -0
- package/library/ai-dlc/workflows/templates/csharp/infrastructure/docker-containerization.yaml +872 -0
- package/library/ai-dlc/workflows/templates/csharp/testing/integration-test-suite.yaml +851 -0
- package/library/ai-dlc/workflows/templates/csharp/testing/performance-testing.yaml +922 -0
- package/library/ai-dlc/workflows/templates/csharp/testing/unit-test-suite.yaml +721 -0
- package/library/ai-dlc/workflows/templates/full-lifecycle-with-refinement.yaml +612 -0
- package/library/ai-dlc/workflows/templates/parallel-ui-test-generation.yaml +187 -0
- package/library/ai-dlc/workflows/templates/python/brownfield/api-integration.yaml +746 -0
- package/library/ai-dlc/workflows/templates/python/brownfield/aws-integration.yaml +846 -0
- package/library/ai-dlc/workflows/templates/python/brownfield/legacy-migration.yaml +807 -0
- package/library/ai-dlc/workflows/templates/python/brownfield/pypi-package.yaml +858 -0
- package/library/ai-dlc/workflows/templates/python/defect-fix/dependency-update.yaml +955 -0
- package/library/ai-dlc/workflows/templates/python/defect-fix/hotfix-deployment.yaml +875 -0
- package/library/ai-dlc/workflows/templates/python/defect-fix/security-patch.yaml +1073 -0
- package/library/ai-dlc/workflows/templates/python/greenfield/cli-tool.yaml +937 -0
- package/library/ai-dlc/workflows/templates/python/greenfield/data-pipeline.yaml +873 -0
- package/library/ai-dlc/workflows/templates/python/greenfield/django-app.yaml +1012 -0
- package/library/ai-dlc/workflows/templates/python/greenfield/fastapi-app.yaml +956 -0
- package/library/ai-dlc/workflows/templates/python/infrastructure/aws-deployment.yaml +1344 -0
- package/library/ai-dlc/workflows/templates/python/infrastructure/cicd-pipeline.yaml +1205 -0
- package/library/ai-dlc/workflows/templates/python/infrastructure/docker-containerization.yaml +1221 -0
- package/library/ai-dlc/workflows/templates/python/testing/integration-tests.yaml +843 -0
- package/library/ai-dlc/workflows/templates/python/testing/load-testing.yaml +975 -0
- package/library/ai-dlc/workflows/templates/python/testing/pytest-suite.yaml +820 -0
- package/library/ai-dlc/workflows/templates/test-simple-workflow.yaml +44 -0
- package/library/ai-dlc/workflows/templates/ui-design-to-tests.yaml +138 -0
- package/library/ai-dlc/workflows/templates/unit-to-production-example.yaml +251 -0
- package/library/duplicate-ignore.yaml +55 -0
- package/library/log-file-reads.ps1 +52 -0
- package/library/memory/agents/api-designer.md +21 -0
- package/library/memory/agents/blazor-component-designer.md +21 -0
- package/library/memory/agents/code-generator.md +21 -0
- package/library/memory/agents/code-reviewer.md +21 -0
- package/library/memory/agents/database-designer.md +21 -0
- package/library/memory/agents/documentation-generator.md +21 -0
- package/library/memory/agents/domain-modeler.md +21 -0
- package/library/memory/agents/logical-designer.md +21 -0
- package/library/memory/agents/ui-designer.md +21 -0
- package/library/memory/agents/unit-test-builder.md +21 -0
- package/library/memory/spec/constitution.md +50 -0
- package/library/scripts/intelligent-commit.ps1 +472 -0
- package/library/scripts/intelligent-commit.sh +346 -0
- package/library/statusline-command.ps1 +56 -0
- package/library/templates/spec/checklist-template.md +40 -0
- package/library/templates/spec/plan-template.md +104 -0
- package/library/templates/spec/spec-template.md +115 -0
- package/library/templates/spec/tasks-template.md +251 -0
- package/library-aidlc/governance.json +29 -0
- package/library-aidlc/hooks/HOOKS-SUMMARY.md +303 -0
- package/library-aidlc/hooks/INTEGRATION-GUIDE.md +456 -0
- package/library-aidlc/hooks/README.md +372 -0
- package/library-aidlc/hooks/hook-config-example.json +72 -0
- package/library-aidlc/hooks/settings.example.json +177 -0
- package/library-aidlc/hooks/workflow-advance.ps1 +141 -0
- package/library-aidlc/library-catalog.json +2228 -0
- package/library-aidlc/metadata/items/artifact-review.yaml +285 -0
- package/library-aidlc/metadata/memory/ai-dlc-framework-knowledge-base.md +230 -0
- package/library-aidlc/metadata/schema.yaml +250 -0
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/orchestrator/workflow.ts
|
|
4
4
|
import * as path6 from "path";
|
|
5
|
+
import { mkdir as mkdir3, writeFile } from "fs/promises";
|
|
5
6
|
|
|
6
7
|
// src/orchestrator/types.ts
|
|
7
8
|
var EXIT_SUCCESS = 0;
|
|
@@ -12,7 +13,7 @@ var EXIT_CANCELLED = 2;
|
|
|
12
13
|
import * as path from "path";
|
|
13
14
|
import * as fs from "fs/promises";
|
|
14
15
|
import { fileURLToPath } from "url";
|
|
15
|
-
var INSTALLER_VERSION = "
|
|
16
|
+
var INSTALLER_VERSION = "1.2.0";
|
|
16
17
|
var CLAUDE_DIRECTORY_NAME = ".claude";
|
|
17
18
|
var SOURCE_LIBRARY_RELATIVE = "../library";
|
|
18
19
|
async function resolveSourceDirectory() {
|
|
@@ -48,6 +49,31 @@ async function resolveSourceDirectory() {
|
|
|
48
49
|
"Cannot locate AI-DLC library source directory. Set the AIDLC_SOURCE_DIR environment variable to the library path, or ensure the library/ directory exists in the package root."
|
|
49
50
|
);
|
|
50
51
|
}
|
|
52
|
+
async function resolveAiDlcSourceDirectory() {
|
|
53
|
+
const envSource = process.env["AIDLC_FRAMEWORK_DIR"];
|
|
54
|
+
if (envSource) {
|
|
55
|
+
try {
|
|
56
|
+
const stat5 = await fs.stat(envSource);
|
|
57
|
+
if (stat5.isDirectory()) return path.resolve(envSource);
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
62
|
+
const thisDir = path.dirname(thisFile);
|
|
63
|
+
const resolved = path.resolve(thisDir, "../library-aidlc");
|
|
64
|
+
try {
|
|
65
|
+
const stat5 = await fs.stat(resolved);
|
|
66
|
+
if (stat5.isDirectory()) return resolved;
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
const cwdFallback = path.resolve(process.cwd(), "src", "installer", "library-aidlc");
|
|
70
|
+
try {
|
|
71
|
+
const stat5 = await fs.stat(cwdFallback);
|
|
72
|
+
if (stat5.isDirectory()) return cwdFallback;
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
51
77
|
var WORKFLOW_STEPS = [
|
|
52
78
|
{ id: "detect-platform", name: "Detect Platform", order: 1, isSkippable: false },
|
|
53
79
|
{ id: "check-prerequisites", name: "Check Prerequisites", order: 2, isSkippable: false },
|
|
@@ -3878,26 +3904,114 @@ async function executeInstallFiles(ctx, options, theme) {
|
|
|
3878
3904
|
);
|
|
3879
3905
|
}
|
|
3880
3906
|
});
|
|
3881
|
-
|
|
3907
|
+
let totalCopied = result.copiedCount;
|
|
3908
|
+
let totalSkipped = result.skippedCount;
|
|
3909
|
+
const allErrors = [...result.errors];
|
|
3910
|
+
let overallSuccess = result.success;
|
|
3911
|
+
const aiDlcSourceDir = await resolveAiDlcSourceDirectory();
|
|
3912
|
+
if (aiDlcSourceDir) {
|
|
3913
|
+
const targetRoot = path6.dirname(ctx.claudeDirectory);
|
|
3914
|
+
const aiDlcTargetDir = path6.join(targetRoot, ".ai-dlc");
|
|
3915
|
+
const aiDlcManifest = await scanSourceDirectory(aiDlcSourceDir);
|
|
3916
|
+
const aiDlcMappings = aiDlcManifest.entries.map((entry) => ({
|
|
3917
|
+
relativePath: entry.relativePath,
|
|
3918
|
+
sourcePath: path6.join(aiDlcSourceDir, entry.relativePath),
|
|
3919
|
+
destinationPath: path6.join(aiDlcTargetDir, entry.relativePath),
|
|
3920
|
+
componentType: entry.componentType,
|
|
3921
|
+
fileName: entry.fileName,
|
|
3922
|
+
sizeBytes: entry.sizeBytes
|
|
3923
|
+
}));
|
|
3924
|
+
const aiDlcResult = await copyFiles(aiDlcMappings, {
|
|
3925
|
+
concurrency: 16,
|
|
3926
|
+
onProgress: (event) => {
|
|
3927
|
+
verboseLog(options.verbose, ` [ai-dlc ${event.current}/${event.total}] ${event.fileName}`);
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
3930
|
+
totalCopied += aiDlcResult.copiedCount;
|
|
3931
|
+
totalSkipped += aiDlcResult.skippedCount;
|
|
3932
|
+
allErrors.push(...aiDlcResult.errors);
|
|
3933
|
+
if (!aiDlcResult.success) {
|
|
3934
|
+
overallSuccess = false;
|
|
3935
|
+
}
|
|
3936
|
+
ctx.fileMappings.push(...aiDlcMappings);
|
|
3937
|
+
}
|
|
3938
|
+
ctx.installationResult = {
|
|
3939
|
+
success: overallSuccess,
|
|
3940
|
+
copiedCount: totalCopied,
|
|
3941
|
+
skippedCount: totalSkipped,
|
|
3942
|
+
warnings: result.warnings,
|
|
3943
|
+
errors: allErrors,
|
|
3944
|
+
durationMs: result.durationMs,
|
|
3945
|
+
componentCounts: result.componentCounts
|
|
3946
|
+
};
|
|
3947
|
+
if (overallSuccess) {
|
|
3948
|
+
try {
|
|
3949
|
+
const targetRoot = path6.dirname(ctx.claudeDirectory);
|
|
3950
|
+
const aiDlcDir = path6.join(targetRoot, ".ai-dlc");
|
|
3951
|
+
await mkdir3(aiDlcDir, { recursive: true });
|
|
3952
|
+
const agentNames = ctx.fileMappings.filter((m) => m.relativePath.match(/^agents[/\\][^/\\]+\.md$/)).map((m) => path6.basename(m.fileName, ".md")).sort();
|
|
3953
|
+
const skillNames = [...new Set(
|
|
3954
|
+
ctx.fileMappings.filter((m) => m.relativePath.match(/^skills[/\\]/)).map((m) => m.relativePath.replace(/\\/g, "/").split("/")[1])
|
|
3955
|
+
)].sort();
|
|
3956
|
+
const commandNames = ctx.fileMappings.filter((m) => m.relativePath.match(/^commands[/\\].*\.md$/)).map((m) => {
|
|
3957
|
+
const parts = m.relativePath.replace(/\\/g, "/").split("/");
|
|
3958
|
+
if (parts.length === 3) {
|
|
3959
|
+
return `${parts[1]}:${path6.basename(parts[2], ".md")}`;
|
|
3960
|
+
}
|
|
3961
|
+
return path6.basename(m.fileName, ".md");
|
|
3962
|
+
}).sort();
|
|
3963
|
+
const totalSizeBytes = ctx.fileMappings.reduce((sum, m) => sum + m.sizeBytes, 0);
|
|
3964
|
+
const installationMetadata = {
|
|
3965
|
+
installation: {
|
|
3966
|
+
version: INSTALLER_VERSION,
|
|
3967
|
+
installedBy: "sixsevenai-installer",
|
|
3968
|
+
sourceRoot: "npm:@sixsevenai/ai-dlc-installer",
|
|
3969
|
+
profile: "npm-global",
|
|
3970
|
+
backupLocation: "",
|
|
3971
|
+
projectRoot: ctx.targetDirectory ?? targetRoot,
|
|
3972
|
+
installedDate: (/* @__PURE__ */ new Date()).toISOString()
|
|
3973
|
+
},
|
|
3974
|
+
components: {
|
|
3975
|
+
commands: { count: commandNames.length, installed: commandNames },
|
|
3976
|
+
agents: { count: agentNames.length, installed: agentNames },
|
|
3977
|
+
skills: { count: skillNames.length, installed: skillNames }
|
|
3978
|
+
},
|
|
3979
|
+
statistics: {
|
|
3980
|
+
filesSkipped: totalSkipped,
|
|
3981
|
+
totalSizeBytes,
|
|
3982
|
+
totalSizeMB: Math.round(totalSizeBytes / (1024 * 1024) * 100) / 100,
|
|
3983
|
+
filesProcessed: totalCopied
|
|
3984
|
+
}
|
|
3985
|
+
};
|
|
3986
|
+
const metadataPath = path6.join(aiDlcDir, "ai-dlc-installation.json");
|
|
3987
|
+
await writeFile(metadataPath, JSON.stringify(installationMetadata, null, 2), "utf-8");
|
|
3988
|
+
verboseLog(options.verbose, `Installation metadata written to ${metadataPath}`);
|
|
3989
|
+
} catch (metadataError) {
|
|
3990
|
+
verboseLog(
|
|
3991
|
+
options.verbose,
|
|
3992
|
+
`Warning: Could not write installation metadata: ${metadataError instanceof Error ? metadataError.message : String(metadataError)}`
|
|
3993
|
+
);
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3882
3996
|
if (progressTracker) {
|
|
3883
|
-
if (
|
|
3997
|
+
if (overallSuccess) {
|
|
3884
3998
|
progressTracker.completeStep("copy-files");
|
|
3885
3999
|
} else {
|
|
3886
4000
|
progressTracker.failStep("copy-files", { message: "File copy failed", cause: null });
|
|
3887
4001
|
}
|
|
3888
4002
|
progressTracker.finish();
|
|
3889
4003
|
}
|
|
3890
|
-
if (!
|
|
3891
|
-
const errorMessages =
|
|
4004
|
+
if (!overallSuccess) {
|
|
4005
|
+
const errorMessages = allErrors.map((e) => e.message).join("; ");
|
|
3892
4006
|
throw new Error(`File installation failed: ${errorMessages}`);
|
|
3893
4007
|
}
|
|
3894
4008
|
return {
|
|
3895
4009
|
data: {
|
|
3896
|
-
copiedCount:
|
|
3897
|
-
skippedCount:
|
|
3898
|
-
errorCount:
|
|
4010
|
+
copiedCount: totalCopied,
|
|
4011
|
+
skippedCount: totalSkipped,
|
|
4012
|
+
errorCount: allErrors.length
|
|
3899
4013
|
},
|
|
3900
|
-
summary: `${
|
|
4014
|
+
summary: `${totalCopied} files installed, ${totalSkipped} skipped`
|
|
3901
4015
|
};
|
|
3902
4016
|
}
|
|
3903
4017
|
async function executeValidateInstallation(ctx, options) {
|