UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

291 lines 6.91 kB
/** * TestDataFactory - Generate realistic test data for all SDLC artifact types * Provides consistent but varied fixtures for testing AIWG components * * Features: * - Seeded random generation for reproducible tests * - Customizable data generation with options * - Follows AIWG template structure * - Supports edge cases (empty, minimum, maximum values) */ /** * Use Case artifact */ export interface UseCase { id: string; title: string; actors: string[]; preconditions: string[]; mainScenario: string[]; alternateFlows: string[][]; acceptanceCriteria: string[]; } export interface UseCaseOptions { id?: string; title?: string; actors?: string[]; scenarioStepCount?: number; alternateFlowCount?: number; } /** * Non-Functional Requirement (NFR) categories */ export type NFRCategory = 'Performance' | 'Security' | 'Reliability' | 'Usability' | 'Scalability'; /** * Non-Functional Requirement artifact */ export interface NFR { id: string; category: NFRCategory; description: string; target: string; measurement: string; priority: 'P0' | 'P1' | 'P2'; } export interface NFROptions { id?: string; description?: string; priority?: 'P0' | 'P1' | 'P2'; } /** * Supplemental Specification (collection of NFRs) */ export interface SupplementalSpec { id: string; title: string; nfrs: NFR[]; createdAt: string; } /** * Architecture Decision Record (ADR) */ export interface ADR { number: number; title: string; status: 'Proposed' | 'Accepted' | 'Deprecated' | 'Superseded'; context: string; decision: string; consequences: string[]; alternatives: string[]; date: string; } export interface ADROptions { number?: number; title?: string; status?: 'Proposed' | 'Accepted' | 'Deprecated' | 'Superseded'; } /** * Software Architecture Document sections */ export type SADSection = 'overview' | 'goals' | 'constraints' | 'principles' | 'components' | 'deployment' | 'security' | 'performance'; /** * Component Design artifact */ export interface ComponentDesign { name: string; purpose: string; responsibilities: string[]; interfaces: string[]; dependencies: string[]; } /** * Test Case artifact */ export interface TestCase { id: string; title: string; preconditions: string[]; steps: string[]; expectedResults: string[]; priority: 'P0' | 'P1' | 'P2'; } export interface TestCaseOptions { id?: string; title?: string; priority?: 'P0' | 'P1' | 'P2'; stepCount?: number; } /** * Test Plan artifact */ export interface TestPlan { id: string; title: string; objectives: string[]; scope: string; testCases: TestCase[]; schedule: string; } /** * Test Result artifact */ export interface TestResult { testCaseId: string; status: 'passed' | 'failed' | 'skipped'; executionTime: number; message?: string; timestamp: string; } /** * Git Commit artifact */ export interface GitCommit { hash: string; author: string; email: string; date: string; message: string; files: string[]; } export interface CommitOptions { author?: string; message?: string; fileCount?: number; } /** * Pull Request artifact */ export interface PullRequest { number: number; title: string; description: string; author: string; status: 'open' | 'merged' | 'closed'; commits: GitCommit[]; createdAt: string; } export interface PROptions { number?: number; title?: string; commitCount?: number; } /** * Project Intake artifact */ export interface ProjectIntake { projectName: string; description: string; stakeholders: string[]; objectives: string[]; constraints: string[]; risks: string[]; } export interface IntakeOptions { projectName?: string; stakeholderCount?: number; } /** * Risk Register artifact */ export interface RiskRegister { id: string; risks: Risk[]; createdAt: string; } export interface Risk { id: string; description: string; impact: 'High' | 'Medium' | 'Low'; probability: 'High' | 'Medium' | 'Low'; mitigation: string; } /** * Iteration Plan artifact */ export interface IterationPlan { id: string; iteration: number; startDate: string; endDate: string; objectives: string[]; stories: string[]; } /** * TestDataFactory - Main factory class for generating test data */ export declare class TestDataFactory { private rng; private readonly actors; private readonly verbs; private readonly nouns; private readonly authors; private readonly techTerms; constructor(seed?: number); /** * Set seed for reproducible random generation */ seed(value: number): void; /** * Generate random text with specified word count */ generateRandomText(wordCount: number): string; /** * Generate date string (ISO 8601 format) */ generateDate(daysAgo?: number): string; /** * Generate unique ID with prefix */ generateId(prefix: string): string; /** * Generate Use Case artifact */ generateUseCase(options?: UseCaseOptions): UseCase; /** * Generate Non-Functional Requirement (NFR) */ generateNFR(category: NFRCategory, options?: NFROptions): NFR; /** * Generate Supplemental Specification (collection of NFRs) */ generateSupplementalSpec(nfrCount?: number): SupplementalSpec; /** * Generate Architecture Decision Record (ADR) */ generateADR(options?: ADROptions): ADR; /** * Generate Software Architecture Document section */ generateSADSection(section: SADSection, _options?: any): string; /** * Generate Component Design */ generateComponentDesign(name: string): ComponentDesign; /** * Generate Test Case */ generateTestCase(options?: TestCaseOptions): TestCase; /** * Generate Test Plan */ generateTestPlan(testCaseCount?: number): TestPlan; /** * Generate Test Result */ generateTestResult(testCase: TestCase, passed: boolean): TestResult; /** * Generate Git Commit */ generateGitCommit(options?: CommitOptions): GitCommit; /** * Generate Pull Request */ generatePullRequest(options?: PROptions): PullRequest; /** * Generate Git History (multiple commits) */ generateGitHistory(commitCount: number): GitCommit[]; /** * Generate Project Intake */ generateProjectIntake(options?: IntakeOptions): ProjectIntake; /** * Generate Risk Register */ generateRiskRegister(riskCount?: number): RiskRegister; /** * Generate Iteration Plan */ generateIterationPlan(weekCount: number): IterationPlan; } //# sourceMappingURL=test-data-factory.d.ts.map