@aicgen/aicgen 1.0.0-beta.1 → 1.0.0-beta.2
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/.vs/ProjectSettings.json +2 -2
- package/.vs/VSWorkspaceState.json +15 -15
- package/.vs/aicgen.slnx/v18/DocumentLayout.json +53 -53
- package/assets/icon.svg +33 -33
- package/bun.lock +0 -43
- package/data/architecture/microservices/api-gateway.md +56 -56
- package/data/devops/observability.md +73 -73
- package/dist/index.js +9299 -9299
- package/package.json +2 -2
- package/.claude/agents/architecture-reviewer.md +0 -88
- package/.claude/agents/guideline-checker.md +0 -73
- package/.claude/agents/security-auditor.md +0 -108
- package/.claude/guidelines/api-design.md +0 -645
- package/.claude/guidelines/architecture.md +0 -2503
- package/.claude/guidelines/best-practices.md +0 -618
- package/.claude/guidelines/code-style.md +0 -304
- package/.claude/guidelines/design-patterns.md +0 -573
- package/.claude/guidelines/devops.md +0 -226
- package/.claude/guidelines/error-handling.md +0 -413
- package/.claude/guidelines/language.md +0 -782
- package/.claude/guidelines/performance.md +0 -706
- package/.claude/guidelines/security.md +0 -583
- package/.claude/guidelines/testing.md +0 -568
- package/.claude/settings.json +0 -98
- package/.claude/settings.local.json +0 -8
- package/.eslintrc.json +0 -28
- package/.github/workflows/release.yml +0 -180
- package/.github/workflows/test.yml +0 -81
- package/CONTRIBUTING.md +0 -821
- package/dist/commands/init.d.ts +0 -8
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -46
- package/dist/commands/init.js.map +0 -1
- package/dist/config/profiles.d.ts +0 -4
- package/dist/config/profiles.d.ts.map +0 -1
- package/dist/config/profiles.js +0 -30
- package/dist/config/profiles.js.map +0 -1
- package/dist/config/settings.d.ts +0 -7
- package/dist/config/settings.d.ts.map +0 -1
- package/dist/config/settings.js +0 -7
- package/dist/config/settings.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/models/guideline.d.ts +0 -15
- package/dist/models/guideline.d.ts.map +0 -1
- package/dist/models/guideline.js +0 -2
- package/dist/models/guideline.js.map +0 -1
- package/dist/models/preference.d.ts +0 -9
- package/dist/models/preference.d.ts.map +0 -1
- package/dist/models/preference.js +0 -2
- package/dist/models/preference.js.map +0 -1
- package/dist/models/profile.d.ts +0 -9
- package/dist/models/profile.d.ts.map +0 -1
- package/dist/models/profile.js +0 -2
- package/dist/models/profile.js.map +0 -1
- package/dist/models/project.d.ts +0 -13
- package/dist/models/project.d.ts.map +0 -1
- package/dist/models/project.js +0 -2
- package/dist/models/project.js.map +0 -1
- package/dist/services/ai/anthropic.d.ts +0 -7
- package/dist/services/ai/anthropic.d.ts.map +0 -1
- package/dist/services/ai/anthropic.js +0 -39
- package/dist/services/ai/anthropic.js.map +0 -1
- package/dist/services/generator.d.ts +0 -2
- package/dist/services/generator.d.ts.map +0 -1
- package/dist/services/generator.js +0 -4
- package/dist/services/generator.js.map +0 -1
- package/dist/services/learner.d.ts +0 -2
- package/dist/services/learner.d.ts.map +0 -1
- package/dist/services/learner.js +0 -4
- package/dist/services/learner.js.map +0 -1
- package/dist/services/scanner.d.ts +0 -3
- package/dist/services/scanner.d.ts.map +0 -1
- package/dist/services/scanner.js +0 -54
- package/dist/services/scanner.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -15
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -27
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/file.d.ts +0 -7
- package/dist/utils/file.d.ts.map +0 -1
- package/dist/utils/file.js +0 -32
- package/dist/utils/file.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -6
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -17
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/path.d.ts +0 -6
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/path.js +0 -14
- package/dist/utils/path.js.map +0 -1
- package/docs/planning/memory-lane.md +0 -83
- package/packaging/linux/aicgen.spec +0 -23
- package/packaging/linux/control +0 -9
- package/packaging/macos/scripts/postinstall +0 -12
- package/packaging/windows/setup.nsi +0 -92
- package/scripts/add-categories.ts +0 -87
- package/scripts/build-binary.ts +0 -46
- package/scripts/embed-data.ts +0 -105
- package/scripts/generate-version.ts +0 -150
- package/scripts/test-decompress.ts +0 -27
- package/scripts/test-extract.ts +0 -31
- package/src/__tests__/services/assistant-file-writer.test.ts +0 -400
- package/src/__tests__/services/guideline-loader.test.ts +0 -281
- package/src/__tests__/services/tarball-extraction.test.ts +0 -125
- package/src/commands/add-guideline.ts +0 -296
- package/src/commands/clear.ts +0 -61
- package/src/commands/guideline-selector.ts +0 -123
- package/src/commands/init.ts +0 -645
- package/src/commands/quick-add.ts +0 -586
- package/src/commands/remove-guideline.ts +0 -152
- package/src/commands/stats.ts +0 -49
- package/src/commands/update.ts +0 -240
- package/src/config.ts +0 -82
- package/src/embedded-data.ts +0 -1492
- package/src/index.ts +0 -67
- package/src/models/profile.ts +0 -24
- package/src/models/project.ts +0 -43
- package/src/services/assistant-file-writer.ts +0 -612
- package/src/services/config-generator.ts +0 -150
- package/src/services/config-manager.ts +0 -70
- package/src/services/data-source.ts +0 -248
- package/src/services/first-run-init.ts +0 -148
- package/src/services/guideline-loader.ts +0 -311
- package/src/services/hook-generator.ts +0 -178
- package/src/services/subagent-generator.ts +0 -310
- package/src/utils/banner.ts +0 -66
- package/src/utils/errors.ts +0 -27
- package/src/utils/file.ts +0 -67
- package/src/utils/formatting.ts +0 -172
- package/src/utils/logger.ts +0 -89
- package/src/utils/path.ts +0 -17
- package/src/utils/wizard-state.ts +0 -132
- package/tsconfig.json +0 -25
- /package/{CLAUDE.md → claude.md} +0 -0
package/src/utils/logger.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import winston from 'winston';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
|
|
4
|
-
const { combine, timestamp, printf, errors } = winston.format;
|
|
5
|
-
|
|
6
|
-
const customLevels = {
|
|
7
|
-
levels: {
|
|
8
|
-
error: 0,
|
|
9
|
-
warn: 1,
|
|
10
|
-
success: 2,
|
|
11
|
-
info: 3,
|
|
12
|
-
debug: 4
|
|
13
|
-
},
|
|
14
|
-
colors: {
|
|
15
|
-
error: 'red',
|
|
16
|
-
warn: 'yellow',
|
|
17
|
-
success: 'green',
|
|
18
|
-
info: 'blue',
|
|
19
|
-
debug: 'gray'
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const consoleFormat = printf(({ level, message }) => {
|
|
24
|
-
const icon = {
|
|
25
|
-
error: '❌',
|
|
26
|
-
warn: '⚠️',
|
|
27
|
-
success: '✅',
|
|
28
|
-
info: '📋',
|
|
29
|
-
debug: '🔍'
|
|
30
|
-
}[level] || '';
|
|
31
|
-
|
|
32
|
-
const colorize = {
|
|
33
|
-
error: chalk.red,
|
|
34
|
-
warn: chalk.yellow,
|
|
35
|
-
success: chalk.green,
|
|
36
|
-
info: chalk.blue,
|
|
37
|
-
debug: chalk.gray
|
|
38
|
-
}[level] || chalk.white;
|
|
39
|
-
|
|
40
|
-
return `${icon} ${colorize(message)}`;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const winstonLogger = winston.createLogger({
|
|
44
|
-
levels: customLevels.levels,
|
|
45
|
-
level: process.env.LOG_LEVEL || 'info',
|
|
46
|
-
format: combine(
|
|
47
|
-
errors({ stack: true }),
|
|
48
|
-
timestamp()
|
|
49
|
-
),
|
|
50
|
-
transports: [
|
|
51
|
-
new winston.transports.Console({
|
|
52
|
-
format: consoleFormat
|
|
53
|
-
})
|
|
54
|
-
],
|
|
55
|
-
exitOnError: false,
|
|
56
|
-
silent: process.env.NODE_ENV === 'test'
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
winston.addColors(customLevels.colors);
|
|
60
|
-
|
|
61
|
-
export const logger = winstonLogger;
|
|
62
|
-
|
|
63
|
-
export const setLogLevel = (level: 'error' | 'warn' | 'success' | 'info' | 'debug') => {
|
|
64
|
-
winstonLogger.level = level;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export function logInfo(message: string): void {
|
|
68
|
-
winstonLogger.info(message);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function logSuccess(message: string): void {
|
|
72
|
-
winstonLogger.log('success', message);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function logWarning(message: string): void {
|
|
76
|
-
winstonLogger.warn(message);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function logError(message: string): void {
|
|
80
|
-
winstonLogger.error(message);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function logGray(message: string): void {
|
|
84
|
-
winstonLogger.debug(message);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export function logDebug(message: string): void {
|
|
88
|
-
winstonLogger.debug(message);
|
|
89
|
-
}
|
package/src/utils/path.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { join, normalize } from 'path';
|
|
2
|
-
import { homedir } from 'os';
|
|
3
|
-
|
|
4
|
-
export const AICGEN_HOME = join(homedir(), '.aicgen');
|
|
5
|
-
export const AICGEN_PROJECT_DIR = '.aicgen';
|
|
6
|
-
|
|
7
|
-
export function getAicgenHome(...parts: string[]): string {
|
|
8
|
-
return join(AICGEN_HOME, ...parts);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function getProjectConfigDir(projectPath: string): string {
|
|
12
|
-
return join(projectPath, AICGEN_PROJECT_DIR);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function toUnixPath(path: string): string {
|
|
16
|
-
return normalize(path).replace(/\\/g, '/');
|
|
17
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { Language, ProjectType, AIAssistant } from '../models/project.js';
|
|
2
|
-
import { InstructionLevel, ArchitectureType, DatasourceType } from '../models/profile.js';
|
|
3
|
-
|
|
4
|
-
export type WizardStep =
|
|
5
|
-
| 'language'
|
|
6
|
-
| 'projectType'
|
|
7
|
-
| 'assistant'
|
|
8
|
-
| 'setupType'
|
|
9
|
-
| 'architecture'
|
|
10
|
-
| 'datasource'
|
|
11
|
-
| 'level'
|
|
12
|
-
| 'guidelines'
|
|
13
|
-
| 'summary';
|
|
14
|
-
|
|
15
|
-
export interface WizardState {
|
|
16
|
-
currentStep: WizardStep;
|
|
17
|
-
history: WizardStep[];
|
|
18
|
-
|
|
19
|
-
// Detected values
|
|
20
|
-
detectedLanguage?: Language;
|
|
21
|
-
detectedProjectName?: string;
|
|
22
|
-
hasExistingConfig?: boolean;
|
|
23
|
-
|
|
24
|
-
// User selections
|
|
25
|
-
language?: Language;
|
|
26
|
-
projectType?: ProjectType;
|
|
27
|
-
assistant?: AIAssistant;
|
|
28
|
-
setupType?: 'quick' | 'custom';
|
|
29
|
-
architecture?: ArchitectureType;
|
|
30
|
-
datasource?: DatasourceType;
|
|
31
|
-
level?: InstructionLevel;
|
|
32
|
-
selectedGuidelineIds?: string[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export class WizardStateManager {
|
|
36
|
-
private state: WizardState;
|
|
37
|
-
private stepOrder: WizardStep[] = [
|
|
38
|
-
'language',
|
|
39
|
-
'projectType',
|
|
40
|
-
'assistant',
|
|
41
|
-
'setupType',
|
|
42
|
-
'architecture',
|
|
43
|
-
'datasource',
|
|
44
|
-
'level',
|
|
45
|
-
'guidelines',
|
|
46
|
-
'summary'
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
constructor(initialState: Partial<WizardState> = {}) {
|
|
50
|
-
this.state = {
|
|
51
|
-
currentStep: 'language',
|
|
52
|
-
history: [],
|
|
53
|
-
...initialState
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
getState(): Readonly<WizardState> {
|
|
58
|
-
return { ...this.state };
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
updateState(updates: Partial<WizardState>): void {
|
|
62
|
-
this.state = {
|
|
63
|
-
...this.state,
|
|
64
|
-
...updates
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
goToStep(step: WizardStep): void {
|
|
69
|
-
if (!this.state.history.includes(this.state.currentStep)) {
|
|
70
|
-
this.state.history.push(this.state.currentStep);
|
|
71
|
-
}
|
|
72
|
-
this.state.currentStep = step;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
goToNextStep(): void {
|
|
76
|
-
const currentIndex = this.stepOrder.indexOf(this.state.currentStep);
|
|
77
|
-
if (currentIndex < this.stepOrder.length - 1) {
|
|
78
|
-
const nextStep = this.stepOrder[currentIndex + 1];
|
|
79
|
-
this.goToStep(nextStep);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
goBack(): boolean {
|
|
84
|
-
if (this.state.history.length === 0) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const previousStep = this.state.history.pop()!;
|
|
89
|
-
this.state.currentStep = previousStep;
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
canGoBack(): boolean {
|
|
94
|
-
return this.state.history.length > 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
shouldShowStep(step: WizardStep): boolean {
|
|
98
|
-
// Skip guidelines step in quick setup
|
|
99
|
-
if (step === 'guidelines' && this.state.setupType === 'quick') {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
isComplete(): boolean {
|
|
107
|
-
return this.state.currentStep === 'summary' &&
|
|
108
|
-
!!this.state.language &&
|
|
109
|
-
!!this.state.projectType &&
|
|
110
|
-
!!this.state.assistant &&
|
|
111
|
-
!!this.state.setupType &&
|
|
112
|
-
!!this.state.architecture &&
|
|
113
|
-
!!this.state.datasource &&
|
|
114
|
-
!!this.state.level;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export const BACK_OPTION = '← Back';
|
|
119
|
-
export const BACK_VALUE = '__BACK__';
|
|
120
|
-
|
|
121
|
-
export function addBackOption<T>(choices: T[], canGoBack: boolean): T[] {
|
|
122
|
-
if (!canGoBack) return choices;
|
|
123
|
-
|
|
124
|
-
return [
|
|
125
|
-
{ value: BACK_VALUE, name: BACK_OPTION, description: 'Go back to previous step' } as T,
|
|
126
|
-
...choices
|
|
127
|
-
];
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export function isBackSelected(value: unknown): boolean {
|
|
131
|
-
return value === BACK_VALUE;
|
|
132
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"lib": ["ESNext"],
|
|
7
|
-
"types": ["bun-types"],
|
|
8
|
-
"outDir": "./dist",
|
|
9
|
-
"rootDir": "./src",
|
|
10
|
-
"strict": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"forceConsistentCasingInFileNames": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"allowImportingTsExtensions": true,
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"noUnusedLocals": true,
|
|
18
|
-
"noUnusedParameters": true,
|
|
19
|
-
"noImplicitReturns": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"isolatedModules": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["src/**/*"],
|
|
24
|
-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/__tests__/**"]
|
|
25
|
-
}
|
/package/{CLAUDE.md → claude.md}
RENAMED
|
File without changes
|