ai-spec-dev 0.42.0 → 0.55.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 +86 -40
- package/cli/commands/config.ts +129 -1
- package/cli/commands/create.ts +246 -11
- package/cli/commands/fix-history.ts +176 -0
- package/cli/commands/init.ts +344 -106
- package/cli/index.ts +3 -7
- package/cli/pipeline/helpers.ts +6 -0
- package/cli/pipeline/multi-repo.ts +291 -26
- package/cli/pipeline/single-repo.ts +103 -2
- package/cli/utils.ts +95 -4
- package/core/code-generator.ts +63 -14
- package/core/config-defaults.ts +44 -0
- package/core/constitution-generator.ts +2 -1
- package/core/cross-stack-verifier.ts +395 -0
- package/core/dsl-extractor.ts +2 -1
- package/core/error-feedback.ts +3 -2
- package/core/fix-history.ts +333 -0
- package/core/import-fixer.ts +827 -0
- package/core/import-verifier.ts +569 -0
- package/core/knowledge-memory.ts +55 -6
- package/core/openapi-exporter.ts +3 -2
- package/core/repo-store.ts +95 -0
- package/core/reviewer.ts +14 -13
- package/core/run-logger.ts +3 -4
- package/core/run-snapshot.ts +2 -3
- package/core/run-trend.ts +3 -4
- package/core/self-evaluator.ts +44 -7
- package/core/spec-generator.ts +30 -45
- package/core/token-budget.ts +3 -8
- package/core/types-generator.ts +2 -2
- package/core/vcr.ts +3 -1
- package/dist/cli/index.js +3889 -1937
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +3888 -1936
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +292 -181
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -181
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/tests/cross-stack-verifier.test.ts +301 -0
- package/tests/fix-history.test.ts +335 -0
- package/tests/import-fixer.test.ts +944 -0
- package/tests/import-verifier.test.ts +420 -0
- package/tests/knowledge-memory.test.ts +40 -0
- package/tests/self-evaluator.test.ts +97 -0
- package/cli/commands/model.ts +0 -156
- package/cli/commands/scan.ts +0 -99
- package/cli/commands/workspace.ts +0 -219
- package/demo-backend/.ai-spec-constitution.md +0 -65
- package/demo-backend/package.json +0 -21
- package/demo-backend/prisma/schema.prisma +0 -22
- package/demo-backend/specs/feature-1-bookmark-id-uuid-title-string-required-url-str-v1.dsl.json +0 -186
- package/demo-backend/specs/feature-1-bookmark-id-uuid-title-string-required-url-str-v1.md +0 -211
- package/demo-backend/src/controllers/bookmark.controller.test.ts +0 -255
- package/demo-backend/src/controllers/bookmark.controller.ts +0 -187
- package/demo-backend/src/index.ts +0 -17
- package/demo-backend/src/routes/bookmark.routes.test.ts +0 -264
- package/demo-backend/src/routes/bookmark.routes.ts +0 -11
- package/demo-backend/src/routes/index.ts +0 -8
- package/demo-backend/src/services/bookmark.service.test.ts +0 -433
- package/demo-backend/src/services/bookmark.service.ts +0 -261
- package/demo-backend/tsconfig.json +0 -12
- package/demo-frontend/.ai-spec-constitution.md +0 -95
- package/demo-frontend/package.json +0 -23
- package/demo-frontend/src/App.tsx +0 -12
- package/demo-frontend/src/main.tsx +0 -9
- package/demo-frontend/tsconfig.json +0 -13
package/dist/index.d.mts
CHANGED
|
@@ -81,6 +81,8 @@ interface ProviderMeta {
|
|
|
81
81
|
models: string[];
|
|
82
82
|
/** Environment variable name for the API key */
|
|
83
83
|
envKey: string;
|
|
84
|
+
/** Fallback env var names checked if envKey is not set */
|
|
85
|
+
fallbackEnvKeys?: string[];
|
|
84
86
|
/**
|
|
85
87
|
* Base URL for OpenAI-compatible providers.
|
|
86
88
|
* Undefined means the provider has its own SDK (Gemini / Claude).
|
|
@@ -126,10 +128,9 @@ declare class OpenAICompatibleProvider implements AIProvider {
|
|
|
126
128
|
generate(prompt: string, systemInstruction?: string): Promise<string>;
|
|
127
129
|
}
|
|
128
130
|
declare class MiMoProvider implements AIProvider {
|
|
131
|
+
private client;
|
|
129
132
|
readonly providerName = "mimo";
|
|
130
133
|
readonly modelName: string;
|
|
131
|
-
private apiKey;
|
|
132
|
-
private readonly baseUrl;
|
|
133
134
|
constructor(apiKey: string, modelName?: string);
|
|
134
135
|
generate(prompt: string, systemInstruction?: string): Promise<string>;
|
|
135
136
|
}
|
|
@@ -211,6 +212,20 @@ interface CodeGenOptions {
|
|
|
211
212
|
dslFilePath?: string;
|
|
212
213
|
/** Repo language type — selects the appropriate codegen system prompt */
|
|
213
214
|
repoType?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Maximum number of tasks that can run concurrently within a single batch
|
|
217
|
+
* (api mode only). A batch larger than this value is split into sequential
|
|
218
|
+
* sub-chunks, each running maxConcurrency tasks in parallel. Default: 3.
|
|
219
|
+
*/
|
|
220
|
+
maxConcurrency?: number;
|
|
221
|
+
/**
|
|
222
|
+
* When true, prior hallucination patterns from `.ai-spec-fix-history.json`
|
|
223
|
+
* are injected into the codegen prompt as a "DO NOT REPEAT" section.
|
|
224
|
+
* Default: true when the ledger exists.
|
|
225
|
+
*/
|
|
226
|
+
injectFixHistory?: boolean;
|
|
227
|
+
/** Max number of past hallucination patterns to inject. Default: 10 */
|
|
228
|
+
fixHistoryInjectMax?: number;
|
|
214
229
|
}
|
|
215
230
|
declare class CodeGenerator {
|
|
216
231
|
private provider;
|
package/dist/index.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ interface ProviderMeta {
|
|
|
81
81
|
models: string[];
|
|
82
82
|
/** Environment variable name for the API key */
|
|
83
83
|
envKey: string;
|
|
84
|
+
/** Fallback env var names checked if envKey is not set */
|
|
85
|
+
fallbackEnvKeys?: string[];
|
|
84
86
|
/**
|
|
85
87
|
* Base URL for OpenAI-compatible providers.
|
|
86
88
|
* Undefined means the provider has its own SDK (Gemini / Claude).
|
|
@@ -126,10 +128,9 @@ declare class OpenAICompatibleProvider implements AIProvider {
|
|
|
126
128
|
generate(prompt: string, systemInstruction?: string): Promise<string>;
|
|
127
129
|
}
|
|
128
130
|
declare class MiMoProvider implements AIProvider {
|
|
131
|
+
private client;
|
|
129
132
|
readonly providerName = "mimo";
|
|
130
133
|
readonly modelName: string;
|
|
131
|
-
private apiKey;
|
|
132
|
-
private readonly baseUrl;
|
|
133
134
|
constructor(apiKey: string, modelName?: string);
|
|
134
135
|
generate(prompt: string, systemInstruction?: string): Promise<string>;
|
|
135
136
|
}
|
|
@@ -211,6 +212,20 @@ interface CodeGenOptions {
|
|
|
211
212
|
dslFilePath?: string;
|
|
212
213
|
/** Repo language type — selects the appropriate codegen system prompt */
|
|
213
214
|
repoType?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Maximum number of tasks that can run concurrently within a single batch
|
|
217
|
+
* (api mode only). A batch larger than this value is split into sequential
|
|
218
|
+
* sub-chunks, each running maxConcurrency tasks in parallel. Default: 3.
|
|
219
|
+
*/
|
|
220
|
+
maxConcurrency?: number;
|
|
221
|
+
/**
|
|
222
|
+
* When true, prior hallucination patterns from `.ai-spec-fix-history.json`
|
|
223
|
+
* are injected into the codegen prompt as a "DO NOT REPEAT" section.
|
|
224
|
+
* Default: true when the ledger exists.
|
|
225
|
+
*/
|
|
226
|
+
injectFixHistory?: boolean;
|
|
227
|
+
/** Max number of past hallucination patterns to inject. Default: 10 */
|
|
228
|
+
fixHistoryInjectMax?: number;
|
|
214
229
|
}
|
|
215
230
|
declare class CodeGenerator {
|
|
216
231
|
private provider;
|