specweave 0.16.3 → 0.16.7

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.
@@ -0,0 +1,581 @@
1
+ /**
2
+ * Repository Structure Manager
3
+ *
4
+ * Handles various repository architectures for SpecWeave projects:
5
+ * - Single repository
6
+ * - Multi-repository (polyrepo/microservices)
7
+ * - Monorepo (single repo with multiple projects)
8
+ * - Parent repository approach (parent folder with .specweave + nested implementation repos)
9
+ *
10
+ * Provides capabilities to:
11
+ * - Create GitHub repositories via API
12
+ * - Initialize git repositories locally
13
+ * - Configure proper folder structure
14
+ * - Organize specs per project/team
15
+ * - Split tasks between repositories
16
+ */
17
+ import fs from 'fs-extra';
18
+ import path from 'path';
19
+ import chalk from 'chalk';
20
+ import inquirer from 'inquirer';
21
+ import ora from 'ora';
22
+ import { execSync } from 'child_process';
23
+ import { execFileNoThrowSync } from '../../utils/execFileNoThrow.js';
24
+ export class RepoStructureManager {
25
+ constructor(projectPath, githubToken) {
26
+ this.projectPath = projectPath;
27
+ this.githubToken = githubToken;
28
+ }
29
+ /**
30
+ * Prompt user for repository structure decisions
31
+ */
32
+ async promptStructure() {
33
+ console.log(chalk.cyan.bold('\nšŸ—ļø Repository Architecture Setup\n'));
34
+ console.log(chalk.gray('Let\'s configure your repository structure for optimal organization.\n'));
35
+ // Step 1: Ask about architecture type
36
+ const { architecture } = await inquirer.prompt([{
37
+ type: 'list',
38
+ name: 'architecture',
39
+ message: 'What repository architecture do you want to use?',
40
+ choices: [
41
+ {
42
+ name: 'šŸ“¦ Single repository (everything in one repo)',
43
+ value: 'single',
44
+ short: 'Single'
45
+ },
46
+ {
47
+ name: 'šŸŽÆ Multi-repository (separate repos for each service)',
48
+ value: 'multi-repo',
49
+ short: 'Multi-repo'
50
+ },
51
+ {
52
+ name: 'šŸ“š Monorepo (single repo with multiple projects)',
53
+ value: 'monorepo',
54
+ short: 'Monorepo'
55
+ }
56
+ ],
57
+ default: 'single'
58
+ }]);
59
+ switch (architecture) {
60
+ case 'single':
61
+ return this.configureSingleRepo();
62
+ case 'multi-repo':
63
+ return this.configureMultiRepo();
64
+ case 'monorepo':
65
+ return this.configureMonorepo();
66
+ default:
67
+ throw new Error(`Unknown architecture: ${architecture}`);
68
+ }
69
+ }
70
+ /**
71
+ * Configure single repository
72
+ */
73
+ async configureSingleRepo() {
74
+ console.log(chalk.cyan('\nšŸ“¦ Single Repository Configuration\n'));
75
+ // Check if repo already exists
76
+ const hasGit = fs.existsSync(path.join(this.projectPath, '.git'));
77
+ if (hasGit) {
78
+ // Try to detect existing remote
79
+ try {
80
+ const remote = execSync('git remote get-url origin', {
81
+ cwd: this.projectPath,
82
+ encoding: 'utf-8'
83
+ }).trim();
84
+ const match = remote.match(/github\.com[:/]([^/]+)\/(.+?)(\.git)?$/);
85
+ if (match) {
86
+ const owner = match[1];
87
+ const repo = match[2];
88
+ console.log(chalk.green(`āœ“ Existing repository detected: ${owner}/${repo}`));
89
+ const { useExisting } = await inquirer.prompt([{
90
+ type: 'confirm',
91
+ name: 'useExisting',
92
+ message: 'Use existing repository?',
93
+ default: true
94
+ }]);
95
+ if (useExisting) {
96
+ return {
97
+ architecture: 'single',
98
+ repositories: [{
99
+ id: 'main',
100
+ name: repo,
101
+ owner: owner,
102
+ description: `${repo} - SpecWeave project`,
103
+ path: '.',
104
+ createOnGitHub: false,
105
+ isNested: false
106
+ }]
107
+ };
108
+ }
109
+ }
110
+ }
111
+ catch {
112
+ // No remote or error, continue with manual config
113
+ }
114
+ }
115
+ // Manual configuration
116
+ const answers = await inquirer.prompt([
117
+ {
118
+ type: 'input',
119
+ name: 'owner',
120
+ message: 'GitHub owner/organization:',
121
+ validate: (input) => !!input.trim() || 'Owner is required'
122
+ },
123
+ {
124
+ type: 'input',
125
+ name: 'repo',
126
+ message: 'Repository name:',
127
+ default: path.basename(this.projectPath),
128
+ validate: (input) => !!input.trim() || 'Repository name is required'
129
+ },
130
+ {
131
+ type: 'input',
132
+ name: 'description',
133
+ message: 'Repository description:',
134
+ default: 'My SpecWeave project'
135
+ },
136
+ {
137
+ type: 'confirm',
138
+ name: 'createOnGitHub',
139
+ message: 'Create repository on GitHub?',
140
+ default: !hasGit
141
+ }
142
+ ]);
143
+ return {
144
+ architecture: 'single',
145
+ repositories: [{
146
+ id: 'main',
147
+ name: answers.repo,
148
+ owner: answers.owner,
149
+ description: answers.description,
150
+ path: '.',
151
+ createOnGitHub: answers.createOnGitHub,
152
+ isNested: false
153
+ }]
154
+ };
155
+ }
156
+ /**
157
+ * Configure multi-repository architecture
158
+ */
159
+ async configureMultiRepo() {
160
+ console.log(chalk.cyan('\nšŸŽÆ Multi-Repository Configuration\n'));
161
+ console.log(chalk.gray('This creates separate repositories for each service/component.\n'));
162
+ // Ask about parent repository approach
163
+ const { useParent } = await inquirer.prompt([{
164
+ type: 'confirm',
165
+ name: 'useParent',
166
+ message: 'Use parent repository approach? (Recommended)',
167
+ default: true
168
+ }]);
169
+ if (useParent) {
170
+ console.log(chalk.blue('\nšŸ“‹ Parent Repository Benefits:'));
171
+ console.log(chalk.gray(' • Central .specweave/ folder for all specs and documentation'));
172
+ console.log(chalk.gray(' • Living docs sync to parent repo (single source of truth)'));
173
+ console.log(chalk.gray(' • Implementation repos stay clean and focused'));
174
+ console.log(chalk.gray(' • Better for enterprise/multi-team projects\n'));
175
+ }
176
+ const config = {
177
+ architecture: useParent ? 'parent' : 'multi-repo',
178
+ repositories: []
179
+ };
180
+ // Configure parent repository if using that approach
181
+ if (useParent) {
182
+ const parentAnswers = await inquirer.prompt([
183
+ {
184
+ type: 'input',
185
+ name: 'owner',
186
+ message: 'GitHub owner/organization for ALL repos:',
187
+ validate: (input) => !!input.trim() || 'Owner is required'
188
+ },
189
+ {
190
+ type: 'input',
191
+ name: 'parentName',
192
+ message: 'Parent repository name:',
193
+ default: `${path.basename(this.projectPath)}-parent`,
194
+ validate: (input) => !!input.trim() || 'Repository name is required'
195
+ },
196
+ {
197
+ type: 'input',
198
+ name: 'description',
199
+ message: 'Parent repository description:',
200
+ default: 'SpecWeave parent repository - specs, docs, and architecture'
201
+ },
202
+ {
203
+ type: 'confirm',
204
+ name: 'createOnGitHub',
205
+ message: 'Create parent repository on GitHub?',
206
+ default: true
207
+ }
208
+ ]);
209
+ config.parentRepo = {
210
+ name: parentAnswers.parentName,
211
+ owner: parentAnswers.owner,
212
+ description: parentAnswers.description,
213
+ createOnGitHub: parentAnswers.createOnGitHub
214
+ };
215
+ }
216
+ // Ask how many implementation repositories
217
+ const { repoCount } = await inquirer.prompt([{
218
+ type: 'number',
219
+ name: 'repoCount',
220
+ message: 'How many implementation repositories?',
221
+ default: 3,
222
+ validate: (input) => {
223
+ if (input < 2)
224
+ return 'Multi-repo needs at least 2 repositories';
225
+ if (input > 10)
226
+ return 'Maximum 10 repositories supported';
227
+ return true;
228
+ }
229
+ }]);
230
+ // Configure each repository
231
+ console.log(chalk.cyan('\nšŸ“¦ Configure Each Repository:\n'));
232
+ for (let i = 0; i < repoCount; i++) {
233
+ console.log(chalk.white(`\nRepository ${i + 1} of ${repoCount}:`));
234
+ const repoAnswers = await inquirer.prompt([
235
+ {
236
+ type: 'input',
237
+ name: 'id',
238
+ message: 'Repository ID (e.g., frontend, backend, shared):',
239
+ validate: (input) => {
240
+ if (!input.trim())
241
+ return 'ID is required';
242
+ if (config.repositories.some(r => r.id === input)) {
243
+ return 'ID must be unique';
244
+ }
245
+ return true;
246
+ }
247
+ },
248
+ {
249
+ type: 'input',
250
+ name: 'name',
251
+ message: 'Repository name:',
252
+ default: (answers) => `${path.basename(this.projectPath)}-${answers.id}`,
253
+ validate: (input) => !!input.trim() || 'Repository name is required'
254
+ },
255
+ {
256
+ type: 'input',
257
+ name: 'description',
258
+ message: 'Repository description:',
259
+ default: (answers) => `${answers.id} service`
260
+ },
261
+ {
262
+ type: 'confirm',
263
+ name: 'createOnGitHub',
264
+ message: 'Create this repository on GitHub?',
265
+ default: true
266
+ }
267
+ ]);
268
+ config.repositories.push({
269
+ id: repoAnswers.id,
270
+ name: repoAnswers.name,
271
+ owner: config.parentRepo?.owner || '',
272
+ description: repoAnswers.description,
273
+ path: useParent ? `services/${repoAnswers.id}` : repoAnswers.id,
274
+ createOnGitHub: repoAnswers.createOnGitHub,
275
+ isNested: useParent
276
+ });
277
+ }
278
+ return config;
279
+ }
280
+ /**
281
+ * Configure monorepo
282
+ */
283
+ async configureMonorepo() {
284
+ console.log(chalk.cyan('\nšŸ“š Monorepo Configuration\n'));
285
+ console.log(chalk.gray('Single repository with multiple projects/packages.\n'));
286
+ const answers = await inquirer.prompt([
287
+ {
288
+ type: 'input',
289
+ name: 'owner',
290
+ message: 'GitHub owner/organization:',
291
+ validate: (input) => !!input.trim() || 'Owner is required'
292
+ },
293
+ {
294
+ type: 'input',
295
+ name: 'repo',
296
+ message: 'Repository name:',
297
+ default: path.basename(this.projectPath),
298
+ validate: (input) => !!input.trim() || 'Repository name is required'
299
+ },
300
+ {
301
+ type: 'input',
302
+ name: 'description',
303
+ message: 'Repository description:',
304
+ default: 'Monorepo project'
305
+ },
306
+ {
307
+ type: 'input',
308
+ name: 'projects',
309
+ message: 'Project names (comma-separated, e.g., frontend,backend,shared):',
310
+ validate: (input) => {
311
+ const projects = input.split(',').map(p => p.trim()).filter(Boolean);
312
+ if (projects.length < 2) {
313
+ return 'Monorepo should have at least 2 projects';
314
+ }
315
+ return true;
316
+ }
317
+ },
318
+ {
319
+ type: 'confirm',
320
+ name: 'createOnGitHub',
321
+ message: 'Create repository on GitHub?',
322
+ default: !fs.existsSync(path.join(this.projectPath, '.git'))
323
+ }
324
+ ]);
325
+ const projects = answers.projects.split(',').map((p) => p.trim());
326
+ return {
327
+ architecture: 'monorepo',
328
+ repositories: [{
329
+ id: 'main',
330
+ name: answers.repo,
331
+ owner: answers.owner,
332
+ description: answers.description,
333
+ path: '.',
334
+ createOnGitHub: answers.createOnGitHub,
335
+ isNested: false
336
+ }],
337
+ monorepoProjects: projects
338
+ };
339
+ }
340
+ /**
341
+ * Create repositories on GitHub via API
342
+ */
343
+ async createGitHubRepositories(config) {
344
+ if (!this.githubToken) {
345
+ console.log(chalk.yellow('\nāš ļø No GitHub token available'));
346
+ console.log(chalk.gray(' Skipping GitHub repository creation'));
347
+ console.log(chalk.gray(' You can create repositories manually later\n'));
348
+ return;
349
+ }
350
+ const spinner = ora('Creating GitHub repositories...').start();
351
+ const created = [];
352
+ const failed = [];
353
+ // Create parent repository if needed
354
+ if (config.parentRepo?.createOnGitHub) {
355
+ try {
356
+ await this.createGitHubRepo(config.parentRepo.owner, config.parentRepo.name, config.parentRepo.description);
357
+ created.push(`${config.parentRepo.owner}/${config.parentRepo.name}`);
358
+ }
359
+ catch (error) {
360
+ failed.push(`${config.parentRepo.owner}/${config.parentRepo.name}: ${error.message}`);
361
+ }
362
+ }
363
+ // Create implementation repositories
364
+ for (const repo of config.repositories) {
365
+ if (repo.createOnGitHub) {
366
+ try {
367
+ await this.createGitHubRepo(repo.owner, repo.name, repo.description);
368
+ created.push(`${repo.owner}/${repo.name}`);
369
+ }
370
+ catch (error) {
371
+ failed.push(`${repo.owner}/${repo.name}: ${error.message}`);
372
+ }
373
+ }
374
+ }
375
+ spinner.stop();
376
+ if (created.length > 0) {
377
+ console.log(chalk.green('\nāœ… Created repositories:'));
378
+ created.forEach(repo => {
379
+ console.log(chalk.gray(` • ${repo}`));
380
+ });
381
+ }
382
+ if (failed.length > 0) {
383
+ console.log(chalk.red('\nāŒ Failed to create:'));
384
+ failed.forEach(msg => {
385
+ console.log(chalk.gray(` • ${msg}`));
386
+ });
387
+ }
388
+ }
389
+ /**
390
+ * Create a single GitHub repository via API
391
+ */
392
+ async createGitHubRepo(owner, name, description) {
393
+ // Check if it's an organization or user
394
+ const isOrg = await this.isGitHubOrganization(owner);
395
+ const endpoint = isOrg
396
+ ? `https://api.github.com/orgs/${owner}/repos`
397
+ : `https://api.github.com/user/repos`;
398
+ const response = await fetch(endpoint, {
399
+ method: 'POST',
400
+ headers: {
401
+ 'Authorization': `Bearer ${this.githubToken}`,
402
+ 'Accept': 'application/vnd.github+json',
403
+ 'X-GitHub-Api-Version': '2022-11-28'
404
+ },
405
+ body: JSON.stringify({
406
+ name,
407
+ description,
408
+ private: false,
409
+ auto_init: false,
410
+ has_issues: true,
411
+ has_projects: true,
412
+ has_wiki: false
413
+ })
414
+ });
415
+ if (!response.ok) {
416
+ const error = await response.json();
417
+ if (error.errors?.[0]?.message?.includes('already exists')) {
418
+ // Repository already exists, not an error
419
+ return;
420
+ }
421
+ throw new Error(error.message || `Failed to create repository: ${response.status}`);
422
+ }
423
+ }
424
+ /**
425
+ * Check if a GitHub account is an organization
426
+ */
427
+ async isGitHubOrganization(account) {
428
+ try {
429
+ const response = await fetch(`https://api.github.com/users/${account}`, {
430
+ headers: {
431
+ 'Authorization': `Bearer ${this.githubToken}`,
432
+ 'Accept': 'application/vnd.github+json'
433
+ }
434
+ });
435
+ if (response.ok) {
436
+ const data = await response.json();
437
+ return data.type === 'Organization';
438
+ }
439
+ }
440
+ catch {
441
+ // Assume user if we can't determine
442
+ }
443
+ return false;
444
+ }
445
+ /**
446
+ * Initialize local git repositories
447
+ */
448
+ async initializeLocalRepos(config) {
449
+ const spinner = ora('Initializing local repositories...').start();
450
+ // Create directory structure based on architecture
451
+ if (config.architecture === 'parent') {
452
+ // Parent repo approach: create services/ directory for nested repos
453
+ const servicesDir = path.join(this.projectPath, 'services');
454
+ if (!fs.existsSync(servicesDir)) {
455
+ fs.mkdirSync(servicesDir, { recursive: true });
456
+ }
457
+ // Initialize parent repo at root
458
+ if (!fs.existsSync(path.join(this.projectPath, '.git'))) {
459
+ execFileNoThrowSync('git', ['init'], { cwd: this.projectPath });
460
+ if (config.parentRepo) {
461
+ const remoteUrl = `https://github.com/${config.parentRepo.owner}/${config.parentRepo.name}.git`;
462
+ execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: this.projectPath });
463
+ }
464
+ }
465
+ // Initialize nested repos
466
+ for (const repo of config.repositories) {
467
+ const repoPath = path.join(this.projectPath, repo.path);
468
+ // Create directory if needed
469
+ if (!fs.existsSync(repoPath)) {
470
+ fs.mkdirSync(repoPath, { recursive: true });
471
+ }
472
+ // Initialize git
473
+ if (!fs.existsSync(path.join(repoPath, '.git'))) {
474
+ execFileNoThrowSync('git', ['init'], { cwd: repoPath });
475
+ const remoteUrl = `https://github.com/${repo.owner}/${repo.name}.git`;
476
+ execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: repoPath });
477
+ }
478
+ // Create basic structure
479
+ this.createBasicRepoStructure(repoPath, repo.id);
480
+ }
481
+ }
482
+ else if (config.architecture === 'multi-repo') {
483
+ // Standard multi-repo: repos as subdirectories
484
+ for (const repo of config.repositories) {
485
+ const repoPath = path.join(this.projectPath, repo.path);
486
+ if (!fs.existsSync(repoPath)) {
487
+ fs.mkdirSync(repoPath, { recursive: true });
488
+ }
489
+ if (!fs.existsSync(path.join(repoPath, '.git'))) {
490
+ execFileNoThrowSync('git', ['init'], { cwd: repoPath });
491
+ const remoteUrl = `https://github.com/${repo.owner}/${repo.name}.git`;
492
+ execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: repoPath });
493
+ }
494
+ this.createBasicRepoStructure(repoPath, repo.id);
495
+ }
496
+ }
497
+ else {
498
+ // Single repo or monorepo
499
+ if (!fs.existsSync(path.join(this.projectPath, '.git'))) {
500
+ execFileNoThrowSync('git', ['init'], { cwd: this.projectPath });
501
+ const repo = config.repositories[0];
502
+ if (repo) {
503
+ const remoteUrl = `https://github.com/${repo.owner}/${repo.name}.git`;
504
+ execFileNoThrowSync('git', ['remote', 'add', 'origin', remoteUrl], { cwd: this.projectPath });
505
+ }
506
+ }
507
+ // For monorepo, create project directories
508
+ if (config.architecture === 'monorepo' && config.monorepoProjects) {
509
+ for (const project of config.monorepoProjects) {
510
+ const projectPath = path.join(this.projectPath, 'packages', project);
511
+ if (!fs.existsSync(projectPath)) {
512
+ fs.mkdirSync(projectPath, { recursive: true });
513
+ }
514
+ this.createBasicRepoStructure(projectPath, project);
515
+ }
516
+ }
517
+ }
518
+ spinner.succeed('Local repositories initialized');
519
+ }
520
+ /**
521
+ * Create basic structure for a repository/project
522
+ */
523
+ createBasicRepoStructure(repoPath, projectId) {
524
+ // Create basic directories
525
+ const dirs = ['src', 'tests', 'docs'];
526
+ for (const dir of dirs) {
527
+ const dirPath = path.join(repoPath, dir);
528
+ if (!fs.existsSync(dirPath)) {
529
+ fs.mkdirSync(dirPath, { recursive: true });
530
+ }
531
+ }
532
+ // Create README.md
533
+ const readmePath = path.join(repoPath, 'README.md');
534
+ if (!fs.existsSync(readmePath)) {
535
+ const readmeContent = `# ${projectId}\n\n${projectId} service/component.\n\nPart of SpecWeave multi-repository project.\n`;
536
+ fs.writeFileSync(readmePath, readmeContent);
537
+ }
538
+ // Create .gitignore
539
+ const gitignorePath = path.join(repoPath, '.gitignore');
540
+ if (!fs.existsSync(gitignorePath)) {
541
+ const gitignoreContent = `node_modules/\ndist/\n.env\n.DS_Store\n*.log\n`;
542
+ fs.writeFileSync(gitignorePath, gitignoreContent);
543
+ }
544
+ }
545
+ /**
546
+ * Create SpecWeave project structure
547
+ */
548
+ async createSpecWeaveStructure(config) {
549
+ const specweavePath = path.join(this.projectPath, '.specweave');
550
+ // Create project-specific spec folders
551
+ if (config.architecture === 'monorepo' && config.monorepoProjects) {
552
+ // Monorepo: create project folders
553
+ for (const project of config.monorepoProjects) {
554
+ const projectSpecPath = path.join(specweavePath, 'docs', 'internal', 'projects', project.toLowerCase());
555
+ const subfolders = ['specs', 'modules', 'team', 'architecture', 'legacy'];
556
+ for (const subfolder of subfolders) {
557
+ const folderPath = path.join(projectSpecPath, subfolder);
558
+ if (!fs.existsSync(folderPath)) {
559
+ fs.mkdirSync(folderPath, { recursive: true });
560
+ }
561
+ }
562
+ console.log(chalk.gray(` āœ“ Created project structure: ${project}`));
563
+ }
564
+ }
565
+ else if (config.architecture === 'multi-repo' || config.architecture === 'parent') {
566
+ // Multi-repo: create folders for each repository
567
+ for (const repo of config.repositories) {
568
+ const projectSpecPath = path.join(specweavePath, 'docs', 'internal', 'projects', repo.id);
569
+ const subfolders = ['specs', 'modules', 'team', 'architecture', 'legacy'];
570
+ for (const subfolder of subfolders) {
571
+ const folderPath = path.join(projectSpecPath, subfolder);
572
+ if (!fs.existsSync(folderPath)) {
573
+ fs.mkdirSync(folderPath, { recursive: true });
574
+ }
575
+ }
576
+ console.log(chalk.gray(` āœ“ Created project structure: ${repo.id}`));
577
+ }
578
+ }
579
+ }
580
+ }
581
+ //# sourceMappingURL=repo-structure-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-structure-manager.js","sourceRoot":"","sources":["../../../src/core/repo-structure/repo-structure-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAwBrE,MAAM,OAAO,oBAAoB;IAI/B,YAAY,WAAmB,EAAE,WAAoB;QACnD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe;QACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC,CAAC;QAElG,sCAAsC;QACtC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,Q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M,CAAC,YAAY,EAAE,CAAC;gBACvC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAC/B,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,IAAI,CAAC,EAAE,CACR,CAAC;gBAEF,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;gBAC1E,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;oBACnC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;oBACzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;wBAC/B,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBAChD,CAAC;gBACH,CAAC;gBAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mCAAmC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "0.16.3",
3
+ "version": "0.16.7",
4
4
  "description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",