open-index/open-npm huggingface dataset:
npm package: @hstm-labs/forge-api-generator
Description: API layer generation stage for Forge — produces endpoint definitions, request/response handlers, type definitions, and API contracts from architecture output.
Latest version: 0.1.9

# @hstm-labs/forge-api-generator

API layer generation stage for Forge — produces endpoint definitions, request/response handlers, type definitions, and API contracts from architecture output.

## Installation

```bash
npm install @hstm-labs/forge-api-generator
```

## Public API

### Types

- `ApiArtifact` — complete API layer output
- `ApiEndpoint` — route definition with method, path, parameters
- `ApiHandler` — request handler implementation
- `ApiTypeDefinition` — shared type/interface definitions
- `ApiContract` — API contract (OpenAPI-style) metadata

### Classes

- `ApiGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `ApiOutputValidator` — validates LLM-produced API output

## Usage

```typescript
import { ApiGenerateStage } from '@hstm-labs/forge-api-generator';

const stage = new ApiGenerateStage();
const result = await stage.execute(input);
// result.data contains ApiArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-apps-generator
Description: Apps (UI) layer generation stage for Forge — produces pages, components, layouts, forms, and navigation for web/ and mobile-web/ from specification workflows, architecture, and services (API) output.
Latest version: 0.4.0

# @hstm-labs/forge-apps-generator

Apps (UI) layer generation stage for Forge — produces pages, components, layouts, forms, and navigation for web/ and mobile-web/ from specification workflows, architecture, and services (API) output.

## Installation

```bash
npm install @hstm-labs/forge-apps-generator
```

## Public API

### Types

- `UiArtifact` — complete UI layer output
- `UiPage`, `UiComponent`, `UiLayout`, `UiForm`, `UiNavigation`, `UiRoute`

### Classes

- `AppsGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `UiOutputValidator` — validates LLM-produced UI output

## Usage

```typescript
import { AppsGenerateStage } from '@hstm-labs/forge-apps-generator';

const stage = new AppsGenerateStage();
const result = await stage.execute(input);
// result.data contains UiArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-architect
Description: Architecture generation stage for Forge — produces component design, module breakdown, data model entities, and technology decisions from a validated specification.
Latest version: 0.4.0

# @hstm-labs/forge-architect

Architecture generation stage for Forge — produces component design, module breakdown, data model entities, and technology decisions from a validated specification.

## Installation

```bash
npm install @hstm-labs/forge-architect
```

## Public API

### Types

- `ArchitectureArtifact` — complete architecture output
- `ArchitectureComponent`, `ArchitectureModule` — component/module definitions
- `DataModelEntity`, `DataModelField`, `DataModelRelationship` — data modeling
- `TechnologyDecision` — technology choice with rationale
- `ApiStyle` — resolved API style (REST, GraphQL, etc.)

### Classes

- `ArchitectStage` — pipeline stage implementing `PipelineStage` interface
- `ArchitectureOutputValidator` — validates LLM-produced architecture output

### Functions

- `resolveApiStyle(spec, profile)` — determine API style from spec and profile

## Usage

```typescript
import { ArchitectStage } from '@hstm-labs/forge-architect';

const stage = new ArchitectStage();
const result = await stage.execute(input);
// result.data contains ArchitectureArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-cli
Description: Command-line interface for Forge — built with Commander.js, providing interactive workspace initialization, pipeline execution, compliance verification, output delivery, and run status reporting.
Latest version: 0.3.8

# @hstm-labs/forge-cli

Command-line interface for Forge — built with Commander.js, providing interactive workspace initialization, pipeline execution, compliance verification, output delivery, and run status reporting.

## Installation

```bash
npm install -g @hstm-labs/forge-cli
```

## Commands

```bash
forge init [name]        # Initialize a new Forge workspace
forge generate           # Run the generation pipeline
forge verify             # Verify compliance against specification
forge deliver            # Package and deliver output
forge status [runId]     # Show run status and benchmarks
```

### Global Options

- `--json` — machine-readable JSON output
- `--quiet` — suppress non-essential output
- `--verbose` — enable debug logging
- `--no-color` — disable terminal colors
- `--no-input` — disable interactive prompts (CI mode)

### Init Options

- `--mode=api|agent` — set the default execution mode (stored in `forge.config.json` as `defaultMode`)

### Generate Options

- `--mode=api|agent` — execution mode; when provided, updates the stored default for future runs
- `--stage=<name>` — run a specific stage only
- `--continue` — resume an AWAITING_AGENT run
- `--resume` — resume a failed run
- `--benchmark` — enable performance benchmarking

## Public API

- `createProgram()` — create the Commander.js program instance
- `formatSuccess()`, `formatError()`, `formatWarning()`, `formatInfo()` — styled output helpers
- `printJson()` — JSON output for `--json` mode
- `handleError()` — structured error handler
- `GlobalOptions` — global option types

## Usage

```typescript
import { createProgram } from '@hstm-labs/forge-cli';

const program = createProgram();
await program.parseAsync(process.argv);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-common
Description: Shared foundation for the Forge monorepo — core type definitions, structured error model, JSON logger, configuration validation, SQLite persistence, and LLM adapter abstractions.
Latest version: 0.4.0

# @hstm-labs/forge-common

Shared foundation for the Forge monorepo — core type definitions, structured error model, JSON logger, configuration validation, SQLite persistence, and LLM adapter abstractions.

## Installation

```bash
npm install @hstm-labs/forge-common
```

## Public API

### Types

- `RunStatus`, `StageStatus`, `StageName` — run lifecycle enums
- `ForgeConfig` — workspace configuration shape
- `GenerationRun`, `PipelineStageRecord`, `Artifact` — run tracking
- `LLMUsageRecord`, `RunSummary`, `Workspace`, `InitOptions` — operational types
- `BenchmarkStageEntry`, `BenchmarkReport`, `BenchmarkRunSummary`, `BenchmarkComparison` — benchmarking
- `CodeReviewFinding`, `CodeReviewReport`, `ReviewDimension` — code review

### Error Model

- `ForgeError` — structured error class with codes (`FORGE-{CATEGORY}-{NUMBER}`)
- `ErrorCodes` — predefined error code constants across 9 categories

### Logger

- `StructuredLogger` — JSON-formatted structured logger with child context support

### Configuration

- `validateConfig()` — Ajv-based config validation
- `loadConfig()` — load and validate `forge.config.json`
- `resolveEnvVars()` — environment variable interpolation
- `discoverWorkspace()` — walk up from cwd to find `.forge/` directory

### LLM Adapters

- `LLMRegistry` — provider registry for adapter lookup
- `MockAdapter` — deterministic mock for testing
- `OpenAIAdapter` — OpenAI API (supports `baseURL` for Ollama/local models)
- `AnthropicAdapter` — Anthropic Claude API
- `GeminiAdapter` — Google Gemini API

### Persistence

- `SqliteRunStore` — SQLite-backed run metadata, stage tracking, artifact manifest, benchmarks

## Usage

```typescript
import {
  ForgeError,
  ErrorCodes,
  StructuredLogger,
  loadConfig,
  discoverWorkspace,
  LLMRegistry,
  OpenAIAdapter,
  SqliteRunStore,
} from '@hstm-labs/forge-common';

const logger = new StructuredLogger({ level: 'info' });
const workspace = discoverWorkspace(process.cwd());
const config = loadConfig(workspace.configPath);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-core
Description: Pipeline orchestration engine for Forge — manages stage execution, dual execution modes (API/Agent), run lifecycle, resume logic, artifact integrity verification, and progress reporting.
Latest version: 0.4.0

# @hstm-labs/forge-core

Pipeline orchestration engine for Forge — manages stage execution, dual execution modes (API/Agent), run lifecycle, resume logic, artifact integrity verification, and progress reporting.

## Installation

```bash
npm install @hstm-labs/forge-core
```

## Public API

### Pipeline Runner

- `PipelineRunner` — central orchestrator for sequential stage execution
- `PipelineRunnerConstructorOptions`, `ContinueResult` — runner configuration and results

### Stage Executors

- `ApiStageExecutor` — direct LLM calls with retry logic and output validation
- `AgentStageExecutor` — prompt export for IDE agents with filesystem validation

### Types

- `PipelineStage` — stage interface contract (`name`, `dependsOn`, `requiresLLM`, `execute()`)
- `PipelineContext`, `PipelineStageInput`, `PipelineStageOutput` — pipeline data flow

### Stage author contract (layout)

After the validate stage runs, the runner sets `context.layout` (from `@hstm-labs/forge-common`’s `ResolvedLayout`). Generator stages (Scaffold, ServicesGenerate, AppsGenerate) must:

- Read target paths from `context.layout` (`serverPath`, `clientPath`, or `context.layout.stagePaths[stageName]`).
- Write only to those layout-resolved paths under the project root (in-place). Do not assume output goes to run-artifact directories for a later merge.
- `StageContext`, `StageResult`, `StageArtifact` — executor-level types
- `ExecutionMode`, `OutputValidator`, `RetryPolicy` — executor configuration
- `ProgressEvent`, `ProgressListener` — real-time progress reporting

### Utilities

- `initWorkspace()` — scaffold `.forge/` directory and `forge.config.json`
- `ValidateStage` — built-in specification validation stage
- `isValidTransition()`, `assertValidTransition()` — run state machine
- `checkArtifactIntegrity()` — verify on-disk artifacts before resume

## Usage

```typescript
import { PipelineRunner, ApiStageExecutor } from '@hstm-labs/forge-core';

const runner = new PipelineRunner({
  config,
  runStore,
  logger,
  llmAdapter,
  executionMode: 'api',
});

runner.registerStage(validateStage);
const result = await runner.run(specPath);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-deliverer
Description: Output packaging and delivery for Forge — merges artifacts from all generation stages, validates self-containment, creates compressed archives, and writes deliverables to configurable targets.
Latest version: 0.4.0

# @hstm-labs/forge-deliverer

Output packaging and delivery for Forge — merges artifacts from all generation stages, validates self-containment, creates compressed archives, and writes deliverables to configurable targets.

## Installation

```bash
npm install @hstm-labs/forge-deliverer
```

## Public API

### Types

- `DeliveryResult` — complete delivery output with manifest and archive path
- `DeliveryManifest`, `DeliveryStageEntry` — manifest tracking all delivered files
- `SelfContainmentResult`, `SelfContainmentCheck` — self-containment validation
- `DeliveryOptions` — delivery configuration

### Classes

- `DeliverStage` — pipeline stage implementing `PipelineStage` interface

### Functions

- `mergeArtifacts(stageOutputs)` — merge artifacts from all pipeline stages
- `validateSelfContainment(outputDir)` — verify no dangling imports/references
- `createArchive(outputDir, archivePath)` — create .tgz archive
- `deliverToTarget(archive, target)` — write to configured delivery target
- `formatDeliveryResult()`, `deliveryResultToJson()` — output formatters

## Usage

```typescript
import { DeliverStage } from '@hstm-labs/forge-deliverer';

const stage = new DeliverStage();
const result = await stage.execute(input);
console.log(`Delivered to: ${result.data.archivePath}`);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-infra-generator
Description: Infrastructure configuration generation stage for Forge — produces Dockerfiles, compose configs, CI pipelines, database scripts, environment files, and configuration from architecture output.
Latest version: 0.4.0

# @hstm-labs/forge-infra-generator

Infrastructure configuration generation stage for Forge — produces Dockerfiles, compose configs, CI pipelines, database scripts, environment files, and configuration from architecture output.

## Installation

```bash
npm install @hstm-labs/forge-infra-generator
```

## Public API

### Types

- `InfraArtifact` — complete infrastructure output
- `InfraContainer` — Dockerfile definition
- `InfraComposeConfig` — Docker Compose configuration
- `InfraCiPipeline` — CI/CD pipeline definition
- `InfraDatabaseScript` — database migration/init scripts
- `InfraEnvFile` — environment variable file
- `InfraConfigFile` — application config file

### Classes

- `InfraGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `InfraOutputValidator` — validates LLM-produced infrastructure output

## Usage

```typescript
import { InfraGenerateStage } from '@hstm-labs/forge-infra-generator';

const stage = new InfraGenerateStage();
const result = await stage.execute(input);
// result.data contains InfraArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-profiles
Description: Technology profile management for Forge — defines, validates, and loads technology stack profiles that configure code generation behavior across the pipeline.
Latest version: 0.4.0

# @hstm-labs/forge-profiles

Technology profile management for Forge — defines, validates, and loads technology stack profiles that configure code generation behavior across the pipeline.

## Installation

```bash
npm install @hstm-labs/forge-profiles
```

## Built-in Profiles

- `node-react` — Node.js backend + React frontend
- `node-vue` — Node.js backend + Vue.js frontend
- `python-django` — Python/Django full stack
- `java-spring` — Java/Spring Boot backend
- `dotnet-blazor` — .NET/Blazor full stack

## Public API

### Types

- `TechnologyProfile` — complete profile definition
- `RuntimeConfig`, `BackendConfig`, `FrontendConfig` — stack configuration
- `DatabaseConfig`, `InfraConfig`, `TestingConfig` — infrastructure and testing

### Functions

- `validateProfile(profile)` — Ajv-based JSON Schema validation
- `loadProfile(name)` — load a built-in or workspace profile by name
- `listProfiles()` — list all available profile names

## Usage

```typescript
import { loadProfile, listProfiles } from '@hstm-labs/forge-profiles';

const profiles = await listProfiles();
const profile = await loadProfile('node-react');
console.log(profile.backend.framework); // 'express'
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-reviewer
Description: Multi-pass AI code review stage for Forge — performs file-level, cross-file, spec-alignment, and synthesis review passes across all generated artifacts, producing structured findings with severity and remediation guidance.
Latest version: 0.4.0

# @hstm-labs/forge-reviewer

Multi-pass AI code review stage for Forge — performs file-level, cross-file, spec-alignment, and synthesis review passes across all generated artifacts, producing structured findings with severity and remediation guidance.

## Installation

```bash
npm install @hstm-labs/forge-reviewer
```

## Public API

### Types

- `CodeReviewReport` — complete review output with findings and summary
- `CodeReviewFinding` — individual finding with file, line, severity, remediation
- `ReviewDimension` — review category (correctness, security, performance, etc.)
- `ReviewPassResult` — output from a single review pass
- `ReviewFile` — file metadata for review input

### Classes

- `ReviewStage` — pipeline stage implementing `PipelineStage` interface (4 LLM calls)
- `ReviewPassValidator` — validates individual review pass output
- `ReviewSynthesisValidator` — validates final synthesis output

### Functions

- `collectReviewFiles(artifactsDir)` — gather generated files for review input

## Usage

```typescript
import { ReviewStage } from '@hstm-labs/forge-reviewer';

const stage = new ReviewStage();
const result = await stage.execute(input);
// result.data contains CodeReviewReport with findings from all 4 passes
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-run
Description: Post-deliver stage that updates root `package.json` scripts and optionally runs the dev stack for verification.
Latest version: 0.3.8

# @hstm-labs/forge-run

Post-deliver stage that updates root `package.json` scripts and optionally runs the dev stack for verification.

## Purpose

- **Script updates**: Add or fill in `infra:up`, `db:create`, `db:seed`, `build`, `start`, and `run:all` so the delivered project has a consistent dev workflow.
- **Optional execute**: When `config.runVerify.execute` is true, run the script sequence and HTTP health checks (for CI or local smoke tests).

## Auth mode (Keycloak vs local users)

Run-verify supports two auth modes so dev deployment matches how the application authenticates users:

- **`authMode: 'oidc'`** — Application uses an IdP (OIDC/OAuth) and has a local user table that caches IdP data plus app-specific values. For dev, we include **Keycloak** (or another IdP) in the deployment and seed it with users that **match the users seeded in the database**. Use this when the app relies on IdP for authentication and you want to test the full flow (Keycloak + DB users aligned).
- **`authMode: 'local'`** (or unset) — Application only supports authentication with application-owned users (local users table, no IdP). Keycloak is **not** included in the dev deployment. Use this when there is no IdP and users exist only in the app DB.

Set in `forge.config.json`:

```json
{
  "runVerify": {
    "execute": true,
    "authMode": "oidc"
  }
}
```

When `authMode` is `'oidc'`, the stage adds scripts `keycloak:up` and `keycloak:seed` and uses a `run:all` order: infra up → keycloak seed → db create → db seed → build → start. The Keycloak seed step should align users with those from `db:seed` (same identities/attributes). When `authMode` is `'local'` or omitted, no Keycloak scripts are added.

## Config

| Option | Type | Description |
|--------|------|-------------|
| `runVerify.execute` | boolean | If true, run script sequence and health checks after updating scripts. |
| `runVerify.healthUrls` | string[] | URLs to GET for health checks (default: localhost:3000/health). |
| `runVerify.authMode` | `'oidc'` \| `'local'` | IdP + Keycloak in dev vs local users only; see above. |

## Public API

- `RunVerifyStage` — Pipeline stage (depends on `deliver`).
- `updatePackageJsonScripts(rootDir, layoutName, authMode?)` — Add default scripts to root `package.json`.
- `getDefaultScriptsForLayout(layoutName, authMode?)` — Get script map for a layout and optional auth mode.
- `runScript`, `runScriptSequence`, `healthCheck`, `healthCheckWithRetry` — Execution helpers.
- Types: `RunVerifyReport`, `ScriptRunResult`, `HealthCheckResult`, `RunVerifyAuthMode`.
npm package: @hstm-labs/forge-security-generator
Description: Security layer generation stage for Forge — produces authentication models, RBAC configurations, security middleware, input validation rules, and security headers from architecture output.
Latest version: 0.4.0

# @hstm-labs/forge-security-generator

Security layer generation stage for Forge — produces authentication models, RBAC configurations, security middleware, input validation rules, and security headers from architecture output.

## Installation

```bash
npm install @hstm-labs/forge-security-generator
```

## Public API

### Types

- `SecurityArtifact` — complete security layer output
- `AuthModel` — authentication strategy and configuration
- `RbacConfig`, `RoleDefinition`, `PermissionMapping` — role-based access control
- `SecurityMiddleware` — middleware implementation
- `InputValidationRule` — input validation definitions
- `SecurityHeadersConfig`, `SecurityHeader` — HTTP security headers

### Classes

- `SecurityGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `SecurityOutputValidator` — validates LLM-produced security output (includes hardcoded secret scanning)

## Usage

```typescript
import { SecurityGenerateStage } from '@hstm-labs/forge-security-generator';

const stage = new SecurityGenerateStage();
const result = await stage.execute(input);
// result.data contains SecurityArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-seed-data
Description: Seed data generation stage for Forge — produces deterministic seed data files and ORM seed scripts from architecture output, ensuring reproducible data seeding via `randomSeed=42`.
Latest version: 0.4.0

# @hstm-labs/forge-seed-data

Seed data generation stage for Forge — produces deterministic seed data files and ORM seed scripts from architecture output, ensuring reproducible data seeding via `randomSeed=42`.

## Installation

```bash
npm install @hstm-labs/forge-seed-data
```

## Public API

### Types

- `SeedDataArtifact` — complete seed data output
- `SeedFile` — raw seed data file (JSON, SQL, CSV)
- `OrmSeedScript` — ORM-specific seed script
- `SeedMetadata` — seed generation metadata (entity counts, relationships)

### Classes

- `SeedDataStage` — pipeline stage implementing `PipelineStage` interface
- `SeedDataOutputValidator` — validates LLM-produced seed data (enforces determinism via BR-014)

## Usage

```typescript
import { SeedDataStage } from '@hstm-labs/forge-seed-data';

const stage = new SeedDataStage();
const result = await stage.execute(input);
// result.data contains SeedDataArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-services-generator
Description: Services layer generation stage for Forge — produces API (delivery), Application (use cases, DTOs), Domain (entities, value objects), and Infrastructure artifacts from architecture output. Emits artifacts under the four-layer pattern: Api/, Application/, 
Latest version: 0.4.0

# @hstm-labs/forge-services-generator

Services layer generation stage for Forge — produces API (delivery), Application (use cases, DTOs), Domain (entities, value objects), and Infrastructure artifacts from architecture output. Emits artifacts under the four-layer pattern: Api/, Application/, Domain/, Infrastructure/.

## Installation

```bash
npm install @hstm-labs/forge-services-generator
```

## Public API

### Types

- `ApiArtifact` — complete API layer output
- `ApiEndpoint` — route definition with method, path, parameters
- `ApiHandler` — request handler implementation
- `ApiTypeDefinition` — shared type/interface definitions
- `ApiContract` — API contract (OpenAPI-style) metadata

### Classes

- `ServicesGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `ApiOutputValidator` — validates LLM-produced API output

## Usage

```typescript
import { ServicesGenerateStage } from '@hstm-labs/forge-services-generator';

const stage = new ServicesGenerateStage();
const result = await stage.execute(input);
// result.data contains ApiArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-spec-parser
Description: Specification parsing and validation for Forge — reads product specifications in Markdown, YAML, or JSON format and produces a canonical `ParsedSpecification` model with completeness scoring and cross-reference validation.
Latest version: 0.4.0

# @hstm-labs/forge-spec-parser

Specification parsing and validation for Forge — reads product specifications in Markdown, YAML, or JSON format and produces a canonical `ParsedSpecification` model with completeness scoring and cross-reference validation.

## Installation

```bash
npm install @hstm-labs/forge-spec-parser
```

## Public API

### Parsing

- `parseSpec(content, format)` — parse specification content into canonical model
- `loadSpecFile(path)` — load and parse a specification file
- `detectFormat(path)` — auto-detect specification format
- `ParserRegistry` — plugin registry for format parsers
- `createDefaultRegistry()` — factory for registry with all built-in parsers

### Parser Plugins

- `MarkdownParserPlugin` — GFM Markdown with entity/requirement extraction
- `YamlParserPlugin` — structured YAML specifications
- `JsonParserPlugin` — structured JSON specifications
- `mapStructuredSpec()` — shared mapper for YAML/JSON formats

### Validation

- `validateSpec(spec)` — full validation (schema + completeness + cross-references)
- `validateSchema(spec)` — schema validation
- `checkCompleteness(spec)` — 6-dimension completeness scoring
- `validateCrossReferences(spec)` — entity/requirement reference integrity

### Types

- `ParsedSpecification` — canonical specification model
- `SpecRequirement`, `SpecEntity`, `SpecWorkflow` — specification components
- `ValidationReport`, `ValidationFinding` — validation output

## Usage

```typescript
import { loadSpecFile, validateSpec } from '@hstm-labs/forge-spec-parser';

const spec = await loadSpecFile('specs/product-spec.md');
const report = validateSpec(spec);
console.log(`Completeness: ${report.completeness.overall}%`);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-templates
Description: Handlebars prompt template engine for Forge — loads, resolves, and renders prompt templates with workspace-level override support and parameter validation.
Latest version: 0.4.0

# @hstm-labs/forge-templates

Handlebars prompt template engine for Forge — loads, resolves, and renders prompt templates with workspace-level override support and parameter validation.

## Installation

```bash
npm install @hstm-labs/forge-templates
```

## Public API

### Types

- `PromptTemplate` — template metadata and content
- `TemplateContext` — rendering context with parameters
- `TemplateRenderResult` — rendered output with metadata

### Functions

- `loadTemplate(name)` — load a template by name with override resolution
- `listTemplates()` — list all available template names
- `renderTemplate(template, context)` — render a Handlebars template with context

## Usage

```typescript
import { loadTemplate, renderTemplate } from '@hstm-labs/forge-templates';

const template = await loadTemplate('architect-system');
const result = renderTemplate(template, {
  specification: parsedSpec,
  profile: technologyProfile,
});
console.log(result.content);
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-ui-generator
Description: UI component generation stage for Forge — produces page definitions, reusable components, layouts, forms, navigation, and routing from architecture output.
Latest version: 0.1.9

# @hstm-labs/forge-ui-generator

UI component generation stage for Forge — produces page definitions, reusable components, layouts, forms, navigation, and routing from architecture output.

## Installation

```bash
npm install @hstm-labs/forge-ui-generator
```

## Public API

### Types

- `UiArtifact` — complete UI layer output
- `UiPage` — page-level component definition
- `UiComponent` — reusable component definition
- `UiLayout` — layout structure definition
- `UiForm` — form component with field definitions
- `UiNavigation`, `UiRoute` — navigation and routing

### Classes

- `UiGenerateStage` — pipeline stage implementing `PipelineStage` interface
- `UiOutputValidator` — validates LLM-produced UI output

## Usage

```typescript
import { UiGenerateStage } from '@hstm-labs/forge-ui-generator';

const stage = new UiGenerateStage();
const result = await stage.execute(input);
// result.data contains UiArtifact
```

## License

[MIT](../../LICENSE)
npm package: @hstm-labs/forge-verifier
Description: Specification compliance verification and automated test generation for Forge — maps requirements to artifacts, calculates coverage scores, detects gaps, incorporates review findings, and generates test files from acceptance criteria.
Latest version: 0.4.0

# @hstm-labs/forge-verifier

Specification compliance verification and automated test generation for Forge — maps requirements to artifacts, calculates coverage scores, detects gaps, incorporates review findings, and generates test files from acceptance criteria.

## Installation

```bash
npm install @hstm-labs/forge-verifier
```

## Public API

### Compliance Verification

- `VerifyStage` — pipeline stage for compliance verification
- `mapRequirementsToArtifacts()` — map spec requirements to generated artifacts
- `calculateCoverage()` — compute coverage score from mappings
- `detectGaps()` — identify uncovered or partially covered requirements
- `incorporateReviewFindings()` — merge AI review findings into compliance report
- `buildComplianceReport()` — assemble final compliance report
- `formatComplianceReport()`, `complianceReportToJson()` — output formatters

### Test Generation

- `TestGenerateStage` — pipeline stage for LLM-driven test generation
- `TestOutputValidator` — validates generated test output
- `extractTestCriteria()` — extract testable criteria from acceptance criteria

### Types

- `ComplianceReport`, `RequirementCoverage`, `CoverageEvidence` — compliance types
- `ComplianceGap`, `ReviewFindingSummary` — gap analysis types
- `TestArtifact`, `TestFile`, `TestTraceability`, `TestMetadata` — test generation types
- `TestCriterion` — extracted test criterion

## Usage

```typescript
import { VerifyStage, formatComplianceReport } from '@hstm-labs/forge-verifier';

const stage = new VerifyStage();
const result = await stage.execute(input);
console.log(formatComplianceReport(result.data));
```

## License

[MIT](../../LICENSE)