forgecraft 1.3.3 → 2.0.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type StoryStatus = "planned" | "designing" | "design-approved" | "building" | "reviewing" | "done" | "blocked";
1
+ type StoryStatus = "planned" | "designing" | "design-approved" | "building" | "testing" | "reviewing" | "done" | "blocked";
2
2
  type StoryType = "ui" | "backend" | "fullstack";
3
3
  interface Story {
4
4
  id: string;
@@ -25,8 +25,8 @@ interface Plan {
25
25
  created: string;
26
26
  epics: Epic[];
27
27
  }
28
- type Phase = "init" | "plan" | "design" | "build" | "review" | "done";
29
- type WorkerMode = "design" | "build" | "review" | "fix";
28
+ type Phase = "init" | "plan" | "design" | "build" | "test" | "review" | "done";
29
+ type WorkerMode = "design" | "build" | "test" | "review" | "fix";
30
30
  interface QueuedChange {
31
31
  type: "visual-tweak" | "redesign" | "bug-fix" | "new-feature" | "content-change";
32
32
  message: string;
@@ -206,6 +206,7 @@ interface AutoPipelineOptions {
206
206
  mute?: boolean;
207
207
  deploy?: boolean;
208
208
  skipDesign?: boolean;
209
+ skipTests?: boolean;
209
210
  attachments?: Attachment[];
210
211
  }
211
212
  declare class AutoPipeline {
@@ -244,6 +245,8 @@ declare class AutoPipeline {
244
245
  private designSingleStory;
245
246
  private runBuildPhase;
246
247
  private buildSingleStory;
248
+ private runTestPhase;
249
+ private craftTestPrompt;
247
250
  private generateReadme;
248
251
  private reviewGate;
249
252
  private runReviewPhase;
@@ -334,6 +337,7 @@ declare class StateManager {
334
337
  snapshotId?: string;
335
338
  }): Promise<void>;
336
339
  getConfig(): Promise<ForgeConfig | null>;
340
+ saveConfig(config: ForgeConfig): Promise<void>;
337
341
  isInitialized(): Promise<boolean>;
338
342
  saveSnapshot(data: {
339
343
  action: string;
@@ -357,7 +361,7 @@ interface FrameworkAdapter {
357
361
  /** Human-readable name */
358
362
  name: string;
359
363
  /** Language used */
360
- language: "typescript" | "python";
364
+ language: "typescript" | "python" | "dart" | "javascript";
361
365
  /** Commands to scaffold a new project (run in order) */
362
366
  scaffoldCommands: string[];
363
367
  /** Command to build the project */
@@ -379,16 +383,134 @@ interface FrameworkAdapter {
379
383
  /** Description of the expected project file structure */
380
384
  fileStructure: string;
381
385
  /** Package manager to use */
382
- packageManager: "npm" | "pip" | "poetry";
386
+ packageManager: "npm" | "pip" | "poetry" | "pub" | "pnpm" | "yarn";
387
+ /** Test command */
388
+ testCommand?: string;
389
+ /** Test framework name */
390
+ testFramework?: string;
383
391
  /** Files that should always exist after scaffold */
384
392
  requiredFiles: string[];
385
393
  }
386
394
 
395
+ /** Load custom adapters from .forge/adapters/ and merge into registry */
396
+ declare function refreshAdapters(workingDir?: string): Promise<void>;
387
397
  /** Get the adapter for a framework. Throws if unknown. */
388
398
  declare function getAdapter(framework: string): FrameworkAdapter;
389
399
  /** List all supported frameworks */
390
400
  declare function listAdapters(): FrameworkAdapter[];
391
401
 
402
+ interface AppTemplate {
403
+ id: string;
404
+ name: string;
405
+ description: string;
406
+ category: "saas" | "ecommerce" | "dashboard" | "portfolio" | "social" | "utility";
407
+ suggestedFrameworks: string[];
408
+ planDescription: string;
409
+ }
410
+ declare function getTemplate(id: string): AppTemplate | undefined;
411
+ declare function listTemplates(): AppTemplate[];
412
+
413
+ interface CostEstimate {
414
+ totalInputTokens: number;
415
+ totalOutputTokens: number;
416
+ estimatedCostUsd: number;
417
+ perStory: {
418
+ storyId: string;
419
+ title: string;
420
+ inputTokens: number;
421
+ outputTokens: number;
422
+ costUsd: number;
423
+ }[];
424
+ model: string;
425
+ }
426
+ declare function estimateCost(plan: Plan, model?: string): CostEstimate;
427
+ declare function formatCostEstimate(est: CostEstimate): string;
428
+
429
+ declare function generateGitHubActions(adapter: FrameworkAdapter): string;
430
+ declare function generateGitLabCI(adapter: FrameworkAdapter): string;
431
+
432
+ interface ProjectFile {
433
+ /** Relative path from project root */
434
+ path: string;
435
+ /** File extension without dot */
436
+ ext: string;
437
+ /** File size in bytes */
438
+ size: number;
439
+ /** Auto-detected role */
440
+ role: FileRole;
441
+ /** Short description of what this file does */
442
+ description: string;
443
+ /** Imports this file makes (relative paths resolved) */
444
+ imports: string[];
445
+ /** Named exports from this file */
446
+ exports: string[];
447
+ /** API routes defined in this file */
448
+ routes: RouteInfo[];
449
+ /** Component names defined (React, Vue, Svelte) */
450
+ components: string[];
451
+ /** Category for grouping in the UI */
452
+ category: FileCategory;
453
+ /** Lines of code */
454
+ lines: number;
455
+ /** First 25 lines of file content */
456
+ preview: string;
457
+ /** Whether this file has a matching test file */
458
+ hasTests: boolean;
459
+ }
460
+ type FileRole = "page" | "component" | "layout" | "api-route" | "middleware" | "hook" | "utility" | "model" | "service" | "config" | "style" | "test" | "asset" | "entry" | "store" | "type" | "unknown";
461
+ type FileCategory = "pages" | "components" | "api" | "data" | "config" | "styles" | "tests" | "assets" | "utilities" | "types";
462
+ interface RouteInfo {
463
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "ALL";
464
+ path: string;
465
+ handler: string;
466
+ }
467
+ interface DependencyEdge {
468
+ from: string;
469
+ to: string;
470
+ type: "import" | "dynamic-import" | "route";
471
+ }
472
+ interface ProjectGraph {
473
+ files: ProjectFile[];
474
+ edges: DependencyEdge[];
475
+ framework: string;
476
+ totalFiles: number;
477
+ totalLines: number;
478
+ languages: Record<string, number>;
479
+ entryPoints: string[];
480
+ apiRoutes: RouteInfo[];
481
+ circularDeps: string[][];
482
+ orphanFiles: string[];
483
+ healthScore: {
484
+ grade: string;
485
+ score: number;
486
+ details: {
487
+ avgFileSize: number;
488
+ testRatio: number;
489
+ circularCount: number;
490
+ orphanCount: number;
491
+ maxComplexity: number;
492
+ };
493
+ };
494
+ apiDocs: {
495
+ method: string;
496
+ path: string;
497
+ handler: string;
498
+ params: string[];
499
+ description: string;
500
+ }[];
501
+ scanTimestamp: number;
502
+ }
503
+
504
+ interface VisualizerOptions {
505
+ workingDir?: string;
506
+ outputPath?: string;
507
+ open?: boolean;
508
+ }
509
+ declare function generateVisualization(options?: VisualizerOptions): Promise<{
510
+ outputPath: string;
511
+ graph: ProjectGraph;
512
+ }>;
513
+
392
514
  interface ConfigValidation {
393
515
  valid: boolean;
394
516
  errors: string[];
@@ -400,8 +522,8 @@ declare function loadAndValidateConfig(raw: any): ForgeConfig | null;
400
522
 
401
523
  /**
402
524
  * Play a system notification sound (fire-and-forget).
403
- * Skips silently if not a TTY.
525
+ * Skips silently if not a TTY or if the sound command fails.
404
526
  */
405
527
  declare function playSound(): void;
406
528
 
407
- export { AutoPipeline, type ConfigValidation, type DesignMeta, type Epic, type ForgeConfig, type FrameworkAdapter, GitManager, type HistoryEntry, Orchestrator, type OrchestratorDecision, type Phase, Pipeline, type Plan, type QueuedChange, type Snapshot, type SprintState, type Story, type StoryStatus, type StoryType, Worker, type WorkerMode, type WorkerProgressCallback, type WorkerResult, type WorkerUsage, getAdapter, listAdapters, loadAndValidateConfig, playSound, stateManager, validateConfig };
529
+ export { AutoPipeline, type ConfigValidation, type DesignMeta, type Epic, type ForgeConfig, type FrameworkAdapter, GitManager, type HistoryEntry, Orchestrator, type OrchestratorDecision, type Phase, Pipeline, type Plan, type QueuedChange, type Snapshot, type SprintState, type Story, type StoryStatus, type StoryType, Worker, type WorkerMode, type WorkerProgressCallback, type WorkerResult, type WorkerUsage, estimateCost, formatCostEstimate, generateGitHubActions, generateGitLabCI, generateVisualization, getAdapter, getTemplate, listAdapters, listTemplates, loadAndValidateConfig, playSound, refreshAdapters, stateManager, validateConfig };
package/dist/index.js CHANGED
@@ -4,23 +4,39 @@ import {
4
4
  Orchestrator,
5
5
  Pipeline,
6
6
  Worker,
7
+ estimateCost,
8
+ formatCostEstimate,
9
+ generateGitHubActions,
10
+ generateGitLabCI,
11
+ generateVisualization,
7
12
  getAdapter,
13
+ getTemplate,
8
14
  listAdapters,
15
+ listTemplates,
9
16
  loadAndValidateConfig,
10
17
  playSound,
18
+ refreshAdapters,
11
19
  stateManager,
12
20
  validateConfig
13
- } from "./chunk-CKB64IR3.js";
21
+ } from "./chunk-U6CZUA5R.js";
14
22
  export {
15
23
  AutoPipeline,
16
24
  GitManager,
17
25
  Orchestrator,
18
26
  Pipeline,
19
27
  Worker,
28
+ estimateCost,
29
+ formatCostEstimate,
30
+ generateGitHubActions,
31
+ generateGitLabCI,
32
+ generateVisualization,
20
33
  getAdapter,
34
+ getTemplate,
21
35
  listAdapters,
36
+ listTemplates,
22
37
  loadAndValidateConfig,
23
38
  playSound,
39
+ refreshAdapters,
24
40
  stateManager,
25
41
  validateConfig
26
42
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "forgecraft",
3
- "version": "1.3.3",
4
- "description": "AI Development Orchestration Framework structured multi-agent pipeline for building software with human oversight",
3
+ "version": "2.0.0",
4
+ "description": "One command. No prompts. Come back to a full app pushed to GitHub. Autonomous AI that plans, builds, reviews, and deploys — zero human intervention.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -54,7 +54,13 @@
54
54
  "nextjs",
55
55
  "react",
56
56
  "django",
57
- "pipeline"
57
+ "vue",
58
+ "nuxt",
59
+ "svelte",
60
+ "sveltekit",
61
+ "flutter",
62
+ "pipeline",
63
+ "testing"
58
64
  ],
59
65
  "license": "MIT",
60
66
  "repository": {