@vfarcic/dot-ai 0.115.0 → 0.117.0
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/README.md +21 -18
- package/dist/core/ai-provider-factory.d.ts +4 -2
- package/dist/core/ai-provider-factory.d.ts.map +1 -1
- package/dist/core/ai-provider-factory.js +17 -6
- package/dist/core/capability-operations.js +1 -1
- package/dist/core/generic-session-manager.d.ts +67 -0
- package/dist/core/generic-session-manager.d.ts.map +1 -0
- package/dist/core/generic-session-manager.js +192 -0
- package/dist/core/pattern-operations.js +1 -1
- package/dist/core/providers/noop-provider.d.ts +47 -0
- package/dist/core/providers/noop-provider.d.ts.map +1 -0
- package/dist/core/providers/noop-provider.js +63 -0
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +13 -13
- package/dist/core/session-utils.d.ts +3 -6
- package/dist/core/session-utils.d.ts.map +1 -1
- package/dist/core/session-utils.js +5 -13
- package/dist/core/shared-prompt-loader.d.ts +15 -3
- package/dist/core/shared-prompt-loader.d.ts.map +1 -1
- package/dist/core/shared-prompt-loader.js +67 -14
- package/dist/core/unified-creation-session.d.ts +3 -10
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +34 -75
- package/dist/core/unified-creation-types.d.ts +31 -22
- package/dist/core/unified-creation-types.d.ts.map +1 -1
- package/dist/evaluation/eval-runner.js +12 -3
- package/dist/evaluation/evaluators/base-comparative.d.ts +2 -0
- package/dist/evaluation/evaluators/base-comparative.d.ts.map +1 -1
- package/dist/evaluation/evaluators/base-comparative.js +13 -1
- package/dist/evaluation/graph-generator.d.ts +56 -0
- package/dist/evaluation/graph-generator.d.ts.map +1 -0
- package/dist/evaluation/graph-generator.js +694 -0
- package/dist/evaluation/metadata-loader.d.ts +39 -0
- package/dist/evaluation/metadata-loader.d.ts.map +1 -0
- package/dist/evaluation/metadata-loader.js +74 -0
- package/dist/evaluation/platform-synthesizer.d.ts +5 -1
- package/dist/evaluation/platform-synthesizer.d.ts.map +1 -1
- package/dist/evaluation/platform-synthesizer.js +65 -23
- package/dist/evaluation/run-platform-synthesis.js +22 -5
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +9 -34
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +12 -12
- package/dist/tools/choose-solution.js +1 -1
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +9 -10
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -6
- package/dist/tools/organizational-data.js +12 -12
- package/dist/tools/project-setup/discovery.d.ts +15 -0
- package/dist/tools/project-setup/discovery.d.ts.map +1 -0
- package/dist/tools/project-setup/discovery.js +104 -0
- package/dist/tools/project-setup/generate-scope.d.ts +15 -0
- package/dist/tools/project-setup/generate-scope.d.ts.map +1 -0
- package/dist/tools/project-setup/generate-scope.js +237 -0
- package/dist/tools/project-setup/report-scan.d.ts +15 -0
- package/dist/tools/project-setup/report-scan.d.ts.map +1 -0
- package/dist/tools/project-setup/report-scan.js +156 -0
- package/dist/tools/project-setup/types.d.ts +111 -0
- package/dist/tools/project-setup/types.d.ts.map +1 -0
- package/dist/tools/project-setup/types.js +8 -0
- package/dist/tools/project-setup.d.ts +28 -0
- package/dist/tools/project-setup.d.ts.map +1 -0
- package/dist/tools/project-setup.js +134 -0
- package/dist/tools/recommend.js +1 -1
- package/dist/tools/remediate.js +1 -1
- package/dist/tools/version.d.ts +0 -7
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +5 -34
- package/package.json +4 -2
- package/prompts/capability-inference.md +2 -2
- package/prompts/infrastructure-trigger-expansion.md +2 -2
- package/prompts/intent-analysis.md +2 -2
- package/prompts/kyverno-generation.md +14 -14
- package/prompts/manifest-generation.md +5 -5
- package/prompts/map-intent-to-operation.md +2 -2
- package/prompts/pattern-complete-error.md +1 -1
- package/prompts/pattern-complete-success.md +4 -4
- package/prompts/pattern-rationale.md +1 -1
- package/prompts/pattern-resources.md +1 -1
- package/prompts/pattern-review.md +5 -5
- package/prompts/policy-complete-apply.md +4 -4
- package/prompts/policy-complete-discard.md +1 -1
- package/prompts/policy-complete-error.md +1 -1
- package/prompts/policy-complete-save.md +4 -4
- package/prompts/policy-complete-success.md +4 -4
- package/prompts/policy-namespace-scope.md +1 -1
- package/prompts/question-generation.md +5 -5
- package/prompts/resource-analysis.md +3 -3
- package/prompts/resource-selection.md +3 -3
- package/prompts/solution-enhancement.md +4 -4
- package/scripts/anthropic.nu +9 -13
- package/scripts/common.nu +31 -33
- package/scripts/ingress.nu +5 -4
- package/scripts/kubernetes.nu +38 -53
- package/dist/core/doc-discovery.d.ts +0 -38
- package/dist/core/doc-discovery.d.ts.map +0 -1
- package/dist/core/doc-discovery.js +0 -231
- package/dist/core/doc-testing-session.d.ts +0 -109
- package/dist/core/doc-testing-session.d.ts.map +0 -1
- package/dist/core/doc-testing-session.js +0 -696
- package/dist/core/doc-testing-types.d.ts +0 -127
- package/dist/core/doc-testing-types.d.ts.map +0 -1
- package/dist/core/doc-testing-types.js +0 -53
- package/dist/core/nushell-runtime.d.ts +0 -39
- package/dist/core/nushell-runtime.d.ts.map +0 -1
- package/dist/core/nushell-runtime.js +0 -103
- package/dist/core/platform-operations.d.ts +0 -70
- package/dist/core/platform-operations.d.ts.map +0 -1
- package/dist/core/platform-operations.js +0 -294
- package/dist/tools/build-platform.d.ts +0 -25
- package/dist/tools/build-platform.d.ts.map +0 -1
- package/dist/tools/build-platform.js +0 -277
- package/dist/tools/test-docs.d.ts +0 -22
- package/dist/tools/test-docs.d.ts.map +0 -1
- package/dist/tools/test-docs.js +0 -351
- package/prompts/doc-testing-done.md +0 -51
- package/prompts/doc-testing-fix.md +0 -120
- package/prompts/doc-testing-scan.md +0 -140
- package/prompts/doc-testing-test-section.md +0 -169
- package/prompts/platform-operations-parse-script-help.md +0 -68
- package/scripts/ack.nu +0 -195
- package/scripts/argo-workflows.nu +0 -47
- package/scripts/argocd.nu +0 -85
- package/scripts/aso.nu +0 -74
- package/scripts/backstage.nu +0 -349
- package/scripts/cert-manager.nu +0 -13
- package/scripts/cnpg.nu +0 -14
- package/scripts/dot.nu +0 -32
- package/scripts/external-secrets.nu +0 -110
- package/scripts/gatekeeper.nu +0 -19
- package/scripts/github.nu +0 -42
- package/scripts/image.nu +0 -67
- package/scripts/kro.nu +0 -11
- package/scripts/kubevela.nu +0 -22
- package/scripts/port.nu +0 -71
- package/scripts/prometheus.nu +0 -21
- package/scripts/registry.nu +0 -55
- package/scripts/storage.nu +0 -210
- package/scripts/tests.nu +0 -12
- package/scripts/velero.nu +0 -45
- package/shared-prompts/validate-docs.md +0 -22
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types and interfaces for Project Setup Tool
|
|
3
|
+
* PRD #177 - Milestone 1: Core Tool Infrastructure
|
|
4
|
+
*
|
|
5
|
+
* Starting simple: Building iteratively based on actual workflow needs
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Workflow steps for project setup
|
|
9
|
+
*/
|
|
10
|
+
export type ProjectSetupStep = 'discover' | 'reportScan' | 'generateScope' | 'complete';
|
|
11
|
+
/**
|
|
12
|
+
* Scope configuration structure
|
|
13
|
+
*/
|
|
14
|
+
export interface ScopeConfig {
|
|
15
|
+
files: string[];
|
|
16
|
+
questions: Question[];
|
|
17
|
+
conditionalFiles?: Record<string, {
|
|
18
|
+
condition: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
}>;
|
|
21
|
+
additionalInstructions?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Session data structure for maintaining workflow state
|
|
25
|
+
*/
|
|
26
|
+
export interface ProjectSetupSessionData {
|
|
27
|
+
currentStep: ProjectSetupStep;
|
|
28
|
+
allScopes?: Record<string, ScopeConfig>;
|
|
29
|
+
selectedScopes?: string[];
|
|
30
|
+
filesToCheck?: string[];
|
|
31
|
+
existingFiles?: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Discovery stage response - Step 1 of workflow
|
|
35
|
+
*/
|
|
36
|
+
export interface DiscoveryResponse {
|
|
37
|
+
success: true;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
filesToCheck: string[];
|
|
40
|
+
availableScopes: string[];
|
|
41
|
+
nextStep: 'reportScan';
|
|
42
|
+
instructions: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Report scan response - Step 2 of workflow
|
|
46
|
+
* Returns all questions for selected scope(s)
|
|
47
|
+
*/
|
|
48
|
+
export interface ReportScanResponse {
|
|
49
|
+
success: true;
|
|
50
|
+
sessionId: string;
|
|
51
|
+
nextStep: 'generateScope';
|
|
52
|
+
instructions: string;
|
|
53
|
+
scope: string;
|
|
54
|
+
questions: Question[];
|
|
55
|
+
filesToGenerate: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Generated file content
|
|
59
|
+
*/
|
|
60
|
+
export interface GeneratedFile {
|
|
61
|
+
path: string;
|
|
62
|
+
content: string;
|
|
63
|
+
reason?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Generate scope response - Step 3 of workflow
|
|
67
|
+
* Returns contents of ALL files in the scope at once
|
|
68
|
+
*/
|
|
69
|
+
export interface GenerateScopeResponse {
|
|
70
|
+
success: true;
|
|
71
|
+
sessionId: string;
|
|
72
|
+
scope: string;
|
|
73
|
+
files: GeneratedFile[];
|
|
74
|
+
excludedFiles?: string[];
|
|
75
|
+
instructions: string;
|
|
76
|
+
additionalInstructions?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Error response structure
|
|
80
|
+
*/
|
|
81
|
+
export interface ErrorResponse {
|
|
82
|
+
success: false;
|
|
83
|
+
error: {
|
|
84
|
+
message: string;
|
|
85
|
+
details?: string;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Question definition for gathering project information
|
|
90
|
+
*/
|
|
91
|
+
export interface Question {
|
|
92
|
+
id: string;
|
|
93
|
+
question: string;
|
|
94
|
+
required: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Tool input parameters
|
|
98
|
+
*/
|
|
99
|
+
export interface ProjectSetupParams {
|
|
100
|
+
step?: ProjectSetupStep;
|
|
101
|
+
sessionId?: string;
|
|
102
|
+
existingFiles?: string[];
|
|
103
|
+
selectedScopes?: string[];
|
|
104
|
+
scope?: string;
|
|
105
|
+
answers?: Record<string, string>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Tool response type
|
|
109
|
+
*/
|
|
110
|
+
export type ProjectSetupResponse = DiscoveryResponse | ReportScanResponse | GenerateScopeResponse | ErrorResponse;
|
|
111
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/project-setup/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,UAAU,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAG1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TypeScript types and interfaces for Project Setup Tool
|
|
4
|
+
* PRD #177 - Milestone 1: Core Tool Infrastructure
|
|
5
|
+
*
|
|
6
|
+
* Starting simple: Building iteratively based on actual workflow needs
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Setup Tool - AI-powered project governance and infrastructure setup
|
|
3
|
+
* PRD #177 - GitHub Issue #178
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { Logger } from '../core/error-handling';
|
|
7
|
+
import { ProjectSetupParams } from './project-setup/types';
|
|
8
|
+
export declare const PROJECT_SETUP_TOOL_NAME = "projectSetup";
|
|
9
|
+
export declare const PROJECT_SETUP_TOOL_DESCRIPTION = "Setup project, audit repository, or generate repository files. Use this when user wants to: setup project, audit repo, check missing files, create README, add LICENSE, generate CONTRIBUTING.md, add CI/CD workflows, initialize documentation, setup governance files. Analyzes local repositories and generates missing configuration, documentation, and governance files. Does NOT handle Kubernetes deployments - use recommend for those.";
|
|
10
|
+
export declare const PROJECT_SETUP_TOOL_INPUT_SCHEMA: {
|
|
11
|
+
step: z.ZodOptional<z.ZodEnum<["discover", "reportScan", "generateScope"]>>;
|
|
12
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
existingFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
selectedScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
16
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Main handler for Project Setup Tool
|
|
20
|
+
* Routes to appropriate handler based on step parameter
|
|
21
|
+
*/
|
|
22
|
+
export declare function handleProjectSetupTool(args: ProjectSetupParams, logger: Logger): Promise<{
|
|
23
|
+
content: Array<{
|
|
24
|
+
type: string;
|
|
25
|
+
text: string;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=project-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-setup.d.ts","sourceRoot":"","sources":["../../src/tools/project-setup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAiB,MAAM,uBAAuB,CAAC;AAO1E,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AACtD,eAAO,MAAM,8BAA8B,qbAAqb,CAAC;AAGje,eAAO,MAAM,+BAA+B;;;;;;;CAO3C,CAAC;AAEF;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA2C7D"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Project Setup Tool - AI-powered project governance and infrastructure setup
|
|
4
|
+
* PRD #177 - GitHub Issue #178
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.PROJECT_SETUP_TOOL_INPUT_SCHEMA = exports.PROJECT_SETUP_TOOL_DESCRIPTION = exports.PROJECT_SETUP_TOOL_NAME = void 0;
|
|
8
|
+
exports.handleProjectSetupTool = handleProjectSetupTool;
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const discovery_1 = require("./project-setup/discovery");
|
|
11
|
+
const report_scan_1 = require("./project-setup/report-scan");
|
|
12
|
+
const generate_scope_1 = require("./project-setup/generate-scope");
|
|
13
|
+
const crypto_1 = require("crypto");
|
|
14
|
+
// Tool metadata for MCP registration
|
|
15
|
+
exports.PROJECT_SETUP_TOOL_NAME = 'projectSetup';
|
|
16
|
+
exports.PROJECT_SETUP_TOOL_DESCRIPTION = 'Setup project, audit repository, or generate repository files. Use this when user wants to: setup project, audit repo, check missing files, create README, add LICENSE, generate CONTRIBUTING.md, add CI/CD workflows, initialize documentation, setup governance files. Analyzes local repositories and generates missing configuration, documentation, and governance files. Does NOT handle Kubernetes deployments - use recommend for those.';
|
|
17
|
+
// Zod schema for MCP registration
|
|
18
|
+
exports.PROJECT_SETUP_TOOL_INPUT_SCHEMA = {
|
|
19
|
+
step: zod_1.z.enum(['discover', 'reportScan', 'generateScope']).optional().describe('Workflow step: "discover" (default) starts new session and returns file list, "reportScan" analyzes scan results, "generateScope" generates all files in a scope. Defaults to "discover" if omitted.'),
|
|
20
|
+
sessionId: zod_1.z.string().optional().describe('Session ID from previous step (required for reportScan and generateScope steps)'),
|
|
21
|
+
existingFiles: zod_1.z.array(zod_1.z.string()).optional().describe('List of files that exist in the repository (required for first reportScan call, optional for subsequent calls with selectedScopes)'),
|
|
22
|
+
selectedScopes: zod_1.z.array(zod_1.z.string()).optional().describe('Scopes user chose to setup (e.g., ["readme", "legal", "github-community"]) (required for reportScan step after initial scan)'),
|
|
23
|
+
scope: zod_1.z.string().optional().describe('Scope to generate (e.g., "github-community") (required for generateScope step)'),
|
|
24
|
+
answers: zod_1.z.record(zod_1.z.any()).optional().describe('Answers to ALL questions for the scope (required for generateScope step)')
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Main handler for Project Setup Tool
|
|
28
|
+
* Routes to appropriate handler based on step parameter
|
|
29
|
+
*/
|
|
30
|
+
async function handleProjectSetupTool(args, logger) {
|
|
31
|
+
const requestId = (0, crypto_1.randomUUID)();
|
|
32
|
+
try {
|
|
33
|
+
logger.info('Project setup tool invoked', {
|
|
34
|
+
requestId,
|
|
35
|
+
step: args.step || 'discover',
|
|
36
|
+
sessionId: args.sessionId
|
|
37
|
+
});
|
|
38
|
+
// Route based on step
|
|
39
|
+
const step = args.step || 'discover';
|
|
40
|
+
switch (step) {
|
|
41
|
+
case 'discover':
|
|
42
|
+
return await handleDiscoverStep(logger, requestId);
|
|
43
|
+
case 'reportScan':
|
|
44
|
+
return await handleReportScanStep(args, logger, requestId);
|
|
45
|
+
case 'generateScope':
|
|
46
|
+
return await handleGenerateScopeStep(args, logger, requestId);
|
|
47
|
+
default:
|
|
48
|
+
return createErrorResponse({
|
|
49
|
+
success: false,
|
|
50
|
+
error: {
|
|
51
|
+
message: `Unknown step: ${step}`,
|
|
52
|
+
details: 'Valid steps are: discover, reportScan, generateScope'
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
logger.error('Project setup tool request failed', error, { requestId });
|
|
59
|
+
return createErrorResponse({
|
|
60
|
+
success: false,
|
|
61
|
+
error: {
|
|
62
|
+
message: 'Tool execution failed',
|
|
63
|
+
details: error instanceof Error ? error.message : String(error)
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Handle discover step - Start new session and return file list
|
|
70
|
+
*/
|
|
71
|
+
async function handleDiscoverStep(logger, requestId) {
|
|
72
|
+
const response = await (0, discovery_1.handleDiscovery)(logger, requestId);
|
|
73
|
+
return {
|
|
74
|
+
content: [{
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: JSON.stringify(response, null, 2)
|
|
77
|
+
}]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Handle reportScan step - Analyze scan results and identify gaps
|
|
82
|
+
*/
|
|
83
|
+
async function handleReportScanStep(args, logger, requestId) {
|
|
84
|
+
// Validate required parameters
|
|
85
|
+
if (!args.sessionId) {
|
|
86
|
+
return createErrorResponse({
|
|
87
|
+
success: false,
|
|
88
|
+
error: {
|
|
89
|
+
message: 'sessionId is required for reportScan step',
|
|
90
|
+
details: 'Please provide the sessionId from the discover step'
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const response = await (0, report_scan_1.handleReportScan)(args.sessionId, args.existingFiles, args.selectedScopes, logger, requestId);
|
|
95
|
+
return {
|
|
96
|
+
content: [{
|
|
97
|
+
type: 'text',
|
|
98
|
+
text: JSON.stringify(response, null, 2)
|
|
99
|
+
}]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Handle generateScope step - Generate all files in a scope
|
|
104
|
+
*/
|
|
105
|
+
async function handleGenerateScopeStep(args, logger, requestId) {
|
|
106
|
+
// Validate required parameters
|
|
107
|
+
if (!args.sessionId) {
|
|
108
|
+
return createErrorResponse({
|
|
109
|
+
success: false,
|
|
110
|
+
error: {
|
|
111
|
+
message: 'sessionId is required for generateScope step',
|
|
112
|
+
details: 'Please provide the sessionId from previous steps'
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const response = await (0, generate_scope_1.handleGenerateScope)(args.sessionId, args.scope, args.answers, logger, requestId);
|
|
117
|
+
return {
|
|
118
|
+
content: [{
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: JSON.stringify(response, null, 2)
|
|
121
|
+
}]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Helper to create error response
|
|
126
|
+
*/
|
|
127
|
+
function createErrorResponse(error) {
|
|
128
|
+
return {
|
|
129
|
+
content: [{
|
|
130
|
+
type: 'text',
|
|
131
|
+
text: JSON.stringify(error, null, 2)
|
|
132
|
+
}]
|
|
133
|
+
};
|
|
134
|
+
}
|
package/dist/tools/recommend.js
CHANGED
|
@@ -187,7 +187,7 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
187
187
|
// Validate session directory configuration
|
|
188
188
|
let sessionDir;
|
|
189
189
|
try {
|
|
190
|
-
sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(
|
|
190
|
+
sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(true); // requireWrite=true
|
|
191
191
|
logger.debug('Session directory validated', { requestId, sessionDir });
|
|
192
192
|
}
|
|
193
193
|
catch (error) {
|
package/dist/tools/remediate.js
CHANGED
|
@@ -588,7 +588,7 @@ async function handleRemediateTool(args) {
|
|
|
588
588
|
const logger = new error_handling_1.ConsoleLogger('RemediateTool');
|
|
589
589
|
try {
|
|
590
590
|
// Validate and get session directory
|
|
591
|
-
const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(
|
|
591
|
+
const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(true);
|
|
592
592
|
logger.debug('Session directory validated', { requestId, sessionDir });
|
|
593
593
|
// Validate input
|
|
594
594
|
const validatedInput = validateRemediateInput(args);
|
package/dist/tools/version.d.ts
CHANGED
|
@@ -83,13 +83,6 @@ export interface SystemStatus {
|
|
|
83
83
|
error?: string;
|
|
84
84
|
reason?: string;
|
|
85
85
|
};
|
|
86
|
-
nushell: {
|
|
87
|
-
installed: boolean;
|
|
88
|
-
version?: string | null;
|
|
89
|
-
ready: boolean;
|
|
90
|
-
error?: string;
|
|
91
|
-
installationUrl?: string;
|
|
92
|
-
};
|
|
93
86
|
}
|
|
94
87
|
/**
|
|
95
88
|
* Test Kyverno installation and readiness for policy generation using shared client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"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"}
|
package/dist/tools/version.js
CHANGED
|
@@ -50,7 +50,6 @@ const k8s = __importStar(require("@kubernetes/client-node"));
|
|
|
50
50
|
const index_1 = require("../core/index");
|
|
51
51
|
const discovery_1 = require("../core/discovery");
|
|
52
52
|
const kubernetes_utils_1 = require("../core/kubernetes-utils");
|
|
53
|
-
const nushell_runtime_1 = require("../core/nushell-runtime");
|
|
54
53
|
exports.VERSION_TOOL_NAME = 'version';
|
|
55
54
|
exports.VERSION_TOOL_DESCRIPTION = 'Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities, AI provider connectivity, Kubernetes cluster connectivity, Kyverno policy engine status, and pattern management health check';
|
|
56
55
|
exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
@@ -401,30 +400,6 @@ async function getKubernetesStatus() {
|
|
|
401
400
|
};
|
|
402
401
|
}
|
|
403
402
|
}
|
|
404
|
-
/**
|
|
405
|
-
* Test Nushell runtime availability
|
|
406
|
-
*/
|
|
407
|
-
async function getNushellStatus() {
|
|
408
|
-
try {
|
|
409
|
-
const runtime = new nushell_runtime_1.NushellRuntime();
|
|
410
|
-
const validation = await runtime.validateRuntime();
|
|
411
|
-
return {
|
|
412
|
-
installed: validation.versionInfo?.installed || false,
|
|
413
|
-
version: validation.versionInfo?.version,
|
|
414
|
-
ready: validation.ready,
|
|
415
|
-
error: validation.ready ? undefined : validation.message,
|
|
416
|
-
installationUrl: validation.installationUrl
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
catch (error) {
|
|
420
|
-
return {
|
|
421
|
-
installed: false,
|
|
422
|
-
ready: false,
|
|
423
|
-
error: error instanceof Error ? error.message : String(error),
|
|
424
|
-
installationUrl: 'https://www.nushell.sh/book/installation.html'
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
403
|
/**
|
|
429
404
|
* Test AI provider connectivity
|
|
430
405
|
*/
|
|
@@ -512,14 +487,13 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
512
487
|
const version = getVersionInfo();
|
|
513
488
|
// Run all diagnostics in parallel for better performance
|
|
514
489
|
logger.info('Running system diagnostics...', { requestId });
|
|
515
|
-
const [vectorDBStatus, embeddingStatus, aiProviderStatus, kubernetesStatus, capabilityStatus, kyvernoStatus
|
|
490
|
+
const [vectorDBStatus, embeddingStatus, aiProviderStatus, kubernetesStatus, capabilityStatus, kyvernoStatus] = await Promise.all([
|
|
516
491
|
getVectorDBStatus(),
|
|
517
492
|
getEmbeddingStatus(),
|
|
518
493
|
getAIProviderStatus(interaction_id),
|
|
519
494
|
getKubernetesStatus(),
|
|
520
495
|
getCapabilityStatus(),
|
|
521
|
-
getKyvernoStatus()
|
|
522
|
-
getNushellStatus()
|
|
496
|
+
getKyvernoStatus()
|
|
523
497
|
]);
|
|
524
498
|
const systemStatus = {
|
|
525
499
|
version,
|
|
@@ -528,8 +502,7 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
528
502
|
aiProvider: aiProviderStatus,
|
|
529
503
|
kubernetes: kubernetesStatus,
|
|
530
504
|
capabilities: capabilityStatus,
|
|
531
|
-
kyverno: kyvernoStatus
|
|
532
|
-
nushell: nushellStatus
|
|
505
|
+
kyverno: kyvernoStatus
|
|
533
506
|
};
|
|
534
507
|
// Log summary of system health
|
|
535
508
|
logger.info('System diagnostics completed', {
|
|
@@ -540,8 +513,7 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
540
513
|
aiProviderConnected: aiProviderStatus.connected,
|
|
541
514
|
kubernetesConnected: kubernetesStatus.connected,
|
|
542
515
|
capabilitySystemReady: capabilityStatus.systemReady,
|
|
543
|
-
kyvernoReady: kyvernoStatus.policyGenerationReady
|
|
544
|
-
nushellReady: nushellStatus.ready
|
|
516
|
+
kyvernoReady: kyvernoStatus.policyGenerationReady
|
|
545
517
|
});
|
|
546
518
|
return {
|
|
547
519
|
content: [{
|
|
@@ -562,8 +534,7 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
562
534
|
embeddingStatus.available ? 'semantic-search' : null,
|
|
563
535
|
aiProviderStatus.connected ? 'ai-recommendations' : null,
|
|
564
536
|
kubernetesStatus.connected ? 'kubernetes-integration' : null,
|
|
565
|
-
kyvernoStatus.policyGenerationReady ? 'policy-generation' : null
|
|
566
|
-
nushellStatus.ready ? 'platform-scripting' : null
|
|
537
|
+
kyvernoStatus.policyGenerationReady ? 'policy-generation' : null
|
|
567
538
|
].filter(Boolean)
|
|
568
539
|
},
|
|
569
540
|
timestamp: new Date().toISOString()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.117.0",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
],
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/glob": "^9.0.0",
|
|
85
|
+
"@types/handlebars": "^4.0.40",
|
|
85
86
|
"@types/node": "^22.0.0",
|
|
86
87
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
87
88
|
"@typescript-eslint/parser": "^6.21.0",
|
|
@@ -105,11 +106,12 @@
|
|
|
105
106
|
"@qdrant/js-client-rest": "^1.15.0",
|
|
106
107
|
"ai": "^5.0.60",
|
|
107
108
|
"glob": "^11.0.3",
|
|
109
|
+
"handlebars": "^4.7.8",
|
|
108
110
|
"openai": "^5.11.0",
|
|
109
111
|
"yaml": "^2.8.0",
|
|
110
112
|
"zod-to-json-schema": "^3.24.6"
|
|
111
113
|
},
|
|
112
114
|
"optionalDependencies": {
|
|
113
|
-
"@rollup/rollup-linux-x64-gnu": "4.52.
|
|
115
|
+
"@rollup/rollup-linux-x64-gnu": "4.52.5"
|
|
114
116
|
}
|
|
115
117
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Analyze this Kubernetes resource and identify its capabilities for semantic matching and AI recommendations.
|
|
4
4
|
|
|
5
5
|
## Resource Information
|
|
6
|
-
- **Resource**: {resourceName}
|
|
6
|
+
- **Resource**: {{resourceName}}
|
|
7
7
|
|
|
8
8
|
## Resource Definition
|
|
9
9
|
```yaml
|
|
10
|
-
{resourceDefinition}
|
|
10
|
+
{{resourceDefinition}}
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Analysis Instructions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Expand these infrastructure type triggers: {initialTriggers}
|
|
1
|
+
Expand these infrastructure type triggers: {{initialTriggers}}
|
|
2
2
|
|
|
3
|
-
Context: {description}
|
|
3
|
+
Context: {{description}}
|
|
4
4
|
|
|
5
5
|
Generate additional infrastructure type keywords that are:
|
|
6
6
|
1. **Alternative names** for the same infrastructure types (e.g., "storage" → "volumes", "persistent storage")
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
You are an expert Kubernetes deployment consultant analyzing user intents to identify ALL opportunities for clarification that would lead to better deployment recommendations.
|
|
4
4
|
|
|
5
5
|
## User Intent
|
|
6
|
-
{intent}
|
|
6
|
+
{{intent}}
|
|
7
7
|
|
|
8
8
|
## Organizational Patterns Context
|
|
9
|
-
{organizational_patterns}
|
|
9
|
+
{{organizational_patterns}}
|
|
10
10
|
|
|
11
11
|
## Analysis Framework
|
|
12
12
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# Kyverno Policy Generation from Policy Intent
|
|
2
2
|
|
|
3
3
|
## Policy Intent Description
|
|
4
|
-
{policy_description}
|
|
4
|
+
{{policy_description}}
|
|
5
5
|
|
|
6
6
|
## Policy Intent Details
|
|
7
|
-
- **Rationale**: {policy_rationale}
|
|
8
|
-
- **Triggers**: {policy_triggers}
|
|
9
|
-
- **Intent ID**: {policy_id}
|
|
7
|
+
- **Rationale**: {{policy_rationale}}
|
|
8
|
+
- **Triggers**: {{policy_triggers}}
|
|
9
|
+
- **Intent ID**: {{policy_id}}
|
|
10
10
|
|
|
11
11
|
## Available Resource Schemas
|
|
12
|
-
{resource_schemas}
|
|
12
|
+
{{resource_schemas}}
|
|
13
13
|
|
|
14
14
|
## Namespace Scope Configuration
|
|
15
|
-
{namespace_scope}
|
|
15
|
+
{{namespace_scope}}
|
|
16
16
|
|
|
17
17
|
## Previous Attempt Analysis
|
|
18
|
-
{previous_attempt}
|
|
18
|
+
{{previous_attempt}}
|
|
19
19
|
|
|
20
20
|
## Error Details from Previous Attempt
|
|
21
|
-
{error_details}
|
|
21
|
+
{{error_details}}
|
|
22
22
|
|
|
23
23
|
## Instructions
|
|
24
24
|
|
|
@@ -41,9 +41,9 @@ You are a Kubernetes governance expert specializing in Kyverno policy generation
|
|
|
41
41
|
**❌ NEVER use these patterns in messages:**
|
|
42
42
|
```yaml
|
|
43
43
|
# These will cause validation failures:
|
|
44
|
-
message: "Current region: {{ object.spec.forProvider.region || 'not specified' }}"
|
|
45
|
-
message: "Field value: {{ object.spec.field || 'missing' }}"
|
|
46
|
-
message: "Invalid image: {{ object.spec.container.image }}"
|
|
44
|
+
message: "Current region: \{{ object.spec.forProvider.region || 'not specified' }}"
|
|
45
|
+
message: "Field value: \{{ object.spec.field || 'missing' }}"
|
|
46
|
+
message: "Invalid image: \{{ object.spec.container.image }}"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
**✅ ALWAYS use static descriptive messages:**
|
|
@@ -103,10 +103,10 @@ expression: object.spec.initProvider.region == 'us-east1'
|
|
|
103
103
|
|
|
104
104
|
1. **Metadata Requirements**:
|
|
105
105
|
- **Name**: Generate descriptive slug from policy description (max 63 chars, e.g., `require-container-resource-limits`)
|
|
106
|
-
- **Labels**: Include `policy-intent/id: {policy_id}` for machine lookup
|
|
106
|
+
- **Labels**: Include `policy-intent/id: {{policy_id}}` for machine lookup
|
|
107
107
|
- **Annotations**:
|
|
108
|
-
- `policy-intent/description: "{policy_description}"`
|
|
109
|
-
- `policy-intent/rationale: "{policy_rationale}"`
|
|
108
|
+
- `policy-intent/description: "{{policy_description}}"`
|
|
109
|
+
- `policy-intent/rationale: "{{policy_rationale}}"`
|
|
110
110
|
|
|
111
111
|
2. **Name Generation Rules**:
|
|
112
112
|
- Convert policy description to lowercase slug format
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Kubernetes Manifest Generation
|
|
2
2
|
|
|
3
3
|
## Solution Configuration
|
|
4
|
-
{solution}
|
|
4
|
+
{{solution}}
|
|
5
5
|
|
|
6
6
|
## Resource Schemas
|
|
7
7
|
The following schemas are available for the resources selected in the solution:
|
|
8
|
-
{schemas}
|
|
8
|
+
{{schemas}}
|
|
9
9
|
|
|
10
10
|
## Required Labels
|
|
11
11
|
Add these labels to the metadata.labels section of EVERY resource you generate:
|
|
12
|
-
{labels}
|
|
12
|
+
{{labels}}
|
|
13
13
|
|
|
14
14
|
## Previous Attempt (if retry)
|
|
15
|
-
{previous_attempt}
|
|
15
|
+
{{previous_attempt}}
|
|
16
16
|
|
|
17
17
|
## Validation Error Details (if retry)
|
|
18
|
-
{error_details}
|
|
18
|
+
{{error_details}}
|
|
19
19
|
|
|
20
20
|
## Instructions
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Error creating pattern: {error}
|
|
1
|
+
Error creating pattern: {{error}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Pattern created successfully!
|
|
2
2
|
|
|
3
|
-
**Pattern ID**: {patternId}
|
|
4
|
-
**Description**: {description}
|
|
5
|
-
**Triggers**: {triggers}
|
|
6
|
-
**Resources**: {resources}
|
|
3
|
+
**Pattern ID**: {{patternId}}
|
|
4
|
+
**Description**: {{description}}
|
|
5
|
+
**Triggers**: {{triggers}}
|
|
6
|
+
**Resources**: {{{resources}}}
|
|
7
7
|
|
|
8
8
|
The pattern is now ready to enhance AI recommendations. When users ask for deployments matching your triggers, this pattern will suggest the specified Kubernetes resources.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Ask the user: "Why does this combination of resources work well together for {description}? This helps others understand when and why to use this pattern."
|
|
1
|
+
Ask the user: "Why does this combination of resources work well together for {{description}}? This helps others understand when and why to use this pattern."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Ask the user: "Which Kubernetes resources should be suggested for {description}? Please list the resource types you want this pattern to suggest, separated by commas. For example: Deployment, Service, ConfigMap or StatefulSet, PersistentVolumeClaim, Secret."
|
|
1
|
+
Ask the user: "Which Kubernetes resources should be suggested for {{description}}? Please list the resource types you want this pattern to suggest, separated by commas. For example: Deployment, Service, ConfigMap or StatefulSet, PersistentVolumeClaim, Secret."
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Please review your pattern:
|
|
2
2
|
|
|
3
|
-
**Description**: {description}
|
|
4
|
-
**Triggers**: {triggers}
|
|
5
|
-
**Suggested Resources**: {resources}
|
|
6
|
-
**Rationale**: {rationale}
|
|
7
|
-
**Created By**: {createdBy}
|
|
3
|
+
**Description**: {{description}}
|
|
4
|
+
**Triggers**: {{triggers}}
|
|
5
|
+
**Suggested Resources**: {{{resources}}}
|
|
6
|
+
**Rationale**: {{rationale}}
|
|
7
|
+
**Created By**: {{createdBy}}
|
|
8
8
|
|
|
9
9
|
Does this look correct? Type 'confirm' to create the pattern, or 'modify' to make changes.
|