ai-spec-dev 0.37.0 → 0.41.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 +381 -1796
- package/RELEASE_LOG.md +231 -0
- package/cli/commands/create.ts +9 -1176
- package/cli/commands/dashboard.ts +1 -1
- package/cli/pipeline/helpers.ts +34 -0
- package/cli/pipeline/multi-repo.ts +483 -0
- package/cli/pipeline/single-repo.ts +755 -0
- package/cli/utils.ts +2 -0
- package/core/code-generator.ts +52 -341
- package/core/codegen/helpers.ts +219 -0
- package/core/codegen/topo-sort.ts +98 -0
- package/core/constitution-consolidator.ts +2 -2
- package/core/dsl-coverage-checker.ts +298 -0
- package/core/dsl-extractor.ts +19 -46
- package/core/dsl-feedback.ts +1 -1
- package/core/dsl-validator.ts +74 -0
- package/core/error-feedback.ts +95 -11
- package/core/frontend-context-loader.ts +27 -5
- package/core/knowledge-memory.ts +52 -0
- package/core/mock/fixtures.ts +89 -0
- package/core/mock/proxy.ts +380 -0
- package/core/mock-server-generator.ts +12 -460
- package/core/requirement-decomposer.ts +4 -28
- package/core/reviewer.ts +1 -1
- package/core/safe-json.ts +76 -0
- package/core/spec-updater.ts +5 -21
- package/core/token-budget.ts +124 -0
- package/core/vcr.ts +20 -1
- package/dist/cli/index.js +4110 -3534
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +4237 -3661
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.d.mts +18 -16
- package/dist/index.d.ts +18 -16
- package/dist/index.js +310 -182
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +308 -180
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/purpose.md +173 -33
- package/tests/auto-consolidation.test.ts +109 -0
- package/tests/combined-generator.test.ts +81 -0
- package/tests/constitution-consolidator.test.ts +161 -0
- package/tests/constitution-generator.test.ts +94 -0
- package/tests/contract-bridge.test.ts +201 -0
- package/tests/design-dialogue.test.ts +108 -0
- package/tests/dsl-coverage-checker.test.ts +230 -0
- package/tests/dsl-feedback.test.ts +45 -0
- package/tests/dsl-validator-xref.test.ts +99 -0
- package/tests/error-feedback-repair.test.ts +319 -0
- package/tests/error-feedback-validation.test.ts +91 -0
- package/tests/frontend-context-loader.test.ts +609 -0
- package/tests/global-constitution.test.ts +110 -0
- package/tests/key-store.test.ts +73 -0
- package/tests/knowledge-memory.test.ts +327 -0
- package/tests/project-index.test.ts +206 -0
- package/tests/prompt-hasher.test.ts +19 -0
- package/tests/requirement-decomposer.test.ts +171 -0
- package/tests/reviewer.test.ts +4 -1
- package/tests/run-logger.test.ts +289 -0
- package/tests/run-snapshot.test.ts +113 -0
- package/tests/safe-json.test.ts +63 -0
- package/tests/spec-updater.test.ts +161 -0
- package/tests/test-generator.test.ts +146 -0
- package/tests/token-budget.test.ts +124 -0
- package/tests/vcr-hash.test.ts +101 -0
- package/tests/workspace-loader.test.ts +277 -0
package/dist/index.d.mts
CHANGED
|
@@ -146,6 +146,22 @@ declare class SpecRefiner {
|
|
|
146
146
|
refineLoop(initialSpec: string): Promise<string>;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Extract a behavioral contract summary from a generated file.
|
|
151
|
+
*
|
|
152
|
+
* Captures:
|
|
153
|
+
* - export interface / type / enum — full multi-line blocks (the actual TS contracts)
|
|
154
|
+
* - export function / const / class — opening signature line
|
|
155
|
+
* - Throw statements — error codes & validation constraints
|
|
156
|
+
*
|
|
157
|
+
* Multi-line blocks (interface, type alias with {}) are captured in full so
|
|
158
|
+
* downstream tasks see complete method signatures and field shapes, not just
|
|
159
|
+
* a single-line "export interface Foo {" that conveys nothing.
|
|
160
|
+
*
|
|
161
|
+
* Falls back to first 3000 chars for CommonJS files with no explicit exports.
|
|
162
|
+
*/
|
|
163
|
+
declare function extractBehavioralContract(content: string): string;
|
|
164
|
+
|
|
149
165
|
declare function buildTaskPrompt(spec: string, context?: ProjectContext): string;
|
|
150
166
|
type TaskLayer = "data" | "infra" | "service" | "api" | "view" | "route" | "test";
|
|
151
167
|
type TaskPriority = "high" | "medium" | "low";
|
|
@@ -183,21 +199,8 @@ declare function loadTasksForSpec(specFilePath: string): Promise<SpecTask[] | nu
|
|
|
183
199
|
/** Persist a single task's status to the tasks JSON file (checkpoint). */
|
|
184
200
|
declare function updateTaskStatus(specFilePath: string, taskId: string, status: TaskStatus): Promise<void>;
|
|
185
201
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*
|
|
189
|
-
* Captures:
|
|
190
|
-
* - export interface / type / enum — full multi-line blocks (the actual TS contracts)
|
|
191
|
-
* - export function / const / class — opening signature line
|
|
192
|
-
* - Throw statements — error codes & validation constraints
|
|
193
|
-
*
|
|
194
|
-
* Multi-line blocks (interface, type alias with {}) are captured in full so
|
|
195
|
-
* downstream tasks see complete method signatures and field shapes, not just
|
|
196
|
-
* a single-line "export interface Foo {" that conveys nothing.
|
|
197
|
-
*
|
|
198
|
-
* Falls back to first 3000 chars for CommonJS files with no explicit exports.
|
|
199
|
-
*/
|
|
200
|
-
declare function extractBehavioralContract(content: string): string;
|
|
202
|
+
declare function printTaskProgress(completed: number, total: number, task: SpecTask, mode: "run" | "skip"): void;
|
|
203
|
+
|
|
201
204
|
type CodeGenMode = "claude-code" | "api" | "plan";
|
|
202
205
|
interface CodeGenOptions {
|
|
203
206
|
/** Run claude non-interactively via -p flag (saves tokens, good for automation) */
|
|
@@ -228,7 +231,6 @@ declare class CodeGenerator {
|
|
|
228
231
|
private generateFiles;
|
|
229
232
|
private runPlanMode;
|
|
230
233
|
}
|
|
231
|
-
declare function printTaskProgress(completed: number, total: number, task: SpecTask, mode: "run" | "skip"): void;
|
|
232
234
|
|
|
233
235
|
/** Extract compliance score from Pass 0 output (looks for "ComplianceScore: X/10") */
|
|
234
236
|
declare function extractComplianceScore(complianceText: string): number;
|
package/dist/index.d.ts
CHANGED
|
@@ -146,6 +146,22 @@ declare class SpecRefiner {
|
|
|
146
146
|
refineLoop(initialSpec: string): Promise<string>;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Extract a behavioral contract summary from a generated file.
|
|
151
|
+
*
|
|
152
|
+
* Captures:
|
|
153
|
+
* - export interface / type / enum — full multi-line blocks (the actual TS contracts)
|
|
154
|
+
* - export function / const / class — opening signature line
|
|
155
|
+
* - Throw statements — error codes & validation constraints
|
|
156
|
+
*
|
|
157
|
+
* Multi-line blocks (interface, type alias with {}) are captured in full so
|
|
158
|
+
* downstream tasks see complete method signatures and field shapes, not just
|
|
159
|
+
* a single-line "export interface Foo {" that conveys nothing.
|
|
160
|
+
*
|
|
161
|
+
* Falls back to first 3000 chars for CommonJS files with no explicit exports.
|
|
162
|
+
*/
|
|
163
|
+
declare function extractBehavioralContract(content: string): string;
|
|
164
|
+
|
|
149
165
|
declare function buildTaskPrompt(spec: string, context?: ProjectContext): string;
|
|
150
166
|
type TaskLayer = "data" | "infra" | "service" | "api" | "view" | "route" | "test";
|
|
151
167
|
type TaskPriority = "high" | "medium" | "low";
|
|
@@ -183,21 +199,8 @@ declare function loadTasksForSpec(specFilePath: string): Promise<SpecTask[] | nu
|
|
|
183
199
|
/** Persist a single task's status to the tasks JSON file (checkpoint). */
|
|
184
200
|
declare function updateTaskStatus(specFilePath: string, taskId: string, status: TaskStatus): Promise<void>;
|
|
185
201
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*
|
|
189
|
-
* Captures:
|
|
190
|
-
* - export interface / type / enum — full multi-line blocks (the actual TS contracts)
|
|
191
|
-
* - export function / const / class — opening signature line
|
|
192
|
-
* - Throw statements — error codes & validation constraints
|
|
193
|
-
*
|
|
194
|
-
* Multi-line blocks (interface, type alias with {}) are captured in full so
|
|
195
|
-
* downstream tasks see complete method signatures and field shapes, not just
|
|
196
|
-
* a single-line "export interface Foo {" that conveys nothing.
|
|
197
|
-
*
|
|
198
|
-
* Falls back to first 3000 chars for CommonJS files with no explicit exports.
|
|
199
|
-
*/
|
|
200
|
-
declare function extractBehavioralContract(content: string): string;
|
|
202
|
+
declare function printTaskProgress(completed: number, total: number, task: SpecTask, mode: "run" | "skip"): void;
|
|
203
|
+
|
|
201
204
|
type CodeGenMode = "claude-code" | "api" | "plan";
|
|
202
205
|
interface CodeGenOptions {
|
|
203
206
|
/** Run claude non-interactively via -p flag (saves tokens, good for automation) */
|
|
@@ -228,7 +231,6 @@ declare class CodeGenerator {
|
|
|
228
231
|
private generateFiles;
|
|
229
232
|
private runPlanMode;
|
|
230
233
|
}
|
|
231
|
-
declare function printTaskProgress(completed: number, total: number, task: SpecTask, mode: "run" | "skip"): void;
|
|
232
234
|
|
|
233
235
|
/** Extract compliance score from Pass 0 output (looks for "ComplianceScore: X/10") */
|
|
234
236
|
declare function extractComplianceScore(complianceText: string): number;
|