specweave 0.17.16 → 0.17.17
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/CLAUDE.md +405 -2495
- package/README.md +92 -2
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +287 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +188 -36
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +54 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +86 -0
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +139 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js +389 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.js.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +26 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +249 -0
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client.js +25 -13
- package/dist/plugins/specweave-github/lib/github-client.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +83 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +451 -0
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +43 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js +82 -0
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +5 -0
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +38 -2
- package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +26 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +195 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts +66 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +274 -0
- package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +56 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +93 -0
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -0
- package/dist/spec-parser.js +629 -0
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +48 -3
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts +142 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js +453 -0
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -0
- package/dist/src/core/living-docs/index.d.ts +10 -84
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +10 -164
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.d.ts +106 -0
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/spec-distributor.js +823 -0
- package/dist/src/core/living-docs/spec-distributor.js.map +1 -0
- package/dist/src/core/living-docs/types.d.ts +201 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -0
- package/dist/src/core/living-docs/types.js +15 -0
- package/dist/src/core/living-docs/types.js.map +1 -0
- package/dist/src/core/logging/prompt-logger.d.ts +70 -0
- package/dist/src/core/logging/prompt-logger.d.ts.map +1 -0
- package/dist/src/core/logging/prompt-logger.js +247 -0
- package/dist/src/core/logging/prompt-logger.js.map +1 -0
- package/dist/src/core/status-line/status-line-manager.d.ts +15 -24
- package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -1
- package/dist/src/core/status-line/status-line-manager.js +33 -70
- package/dist/src/core/status-line/status-line-manager.js.map +1 -1
- package/dist/src/core/status-line/types.d.ts +19 -31
- package/dist/src/core/status-line/types.d.ts.map +1 -1
- package/dist/src/core/status-line/types.js +5 -9
- package/dist/src/core/status-line/types.js.map +1 -1
- package/dist/src/core/sync/conflict-resolver.d.ts +66 -0
- package/dist/src/core/sync/conflict-resolver.d.ts.map +1 -0
- package/dist/src/core/sync/conflict-resolver.js +108 -0
- package/dist/src/core/sync/conflict-resolver.js.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts +77 -0
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -0
- package/dist/src/core/sync/enhanced-content-builder.js +199 -0
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -0
- package/dist/src/core/sync/label-detector.d.ts +66 -0
- package/dist/src/core/sync/label-detector.d.ts.map +1 -0
- package/dist/src/core/sync/label-detector.js +211 -0
- package/dist/src/core/sync/label-detector.js.map +1 -0
- package/dist/src/core/sync/retry-logic.d.ts +64 -0
- package/dist/src/core/sync/retry-logic.d.ts.map +1 -0
- package/dist/src/core/sync/retry-logic.js +165 -0
- package/dist/src/core/sync/retry-logic.js.map +1 -0
- package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
- package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
- package/dist/src/core/sync/spec-content-sync.js +5 -0
- package/dist/src/core/sync/spec-content-sync.js.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts +100 -0
- package/dist/src/core/sync/spec-increment-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/spec-increment-mapper.js +424 -0
- package/dist/src/core/sync/spec-increment-mapper.js.map +1 -0
- package/dist/src/core/sync/status-cache.d.ts +91 -0
- package/dist/src/core/sync/status-cache.d.ts.map +1 -0
- package/dist/src/core/sync/status-cache.js +140 -0
- package/dist/src/core/sync/status-cache.js.map +1 -0
- package/dist/src/core/sync/status-mapper.d.ts +69 -0
- package/dist/src/core/sync/status-mapper.d.ts.map +1 -0
- package/dist/src/core/sync/status-mapper.js +90 -0
- package/dist/src/core/sync/status-mapper.js.map +1 -0
- package/dist/src/core/sync/status-sync-engine.d.ts +162 -0
- package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -0
- package/dist/src/core/sync/status-sync-engine.js +347 -0
- package/dist/src/core/sync/status-sync-engine.js.map +1 -0
- package/dist/src/core/sync/sync-event-logger.d.ts +99 -0
- package/dist/src/core/sync/sync-event-logger.d.ts.map +1 -0
- package/dist/src/core/sync/sync-event-logger.js +103 -0
- package/dist/src/core/sync/sync-event-logger.js.map +1 -0
- package/dist/src/core/sync/workflow-detector.d.ts +95 -0
- package/dist/src/core/sync/workflow-detector.d.ts.map +1 -0
- package/dist/src/core/sync/workflow-detector.js +175 -0
- package/dist/src/core/sync/workflow-detector.js.map +1 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +31 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/utils/github-url.d.ts +53 -0
- package/dist/src/utils/github-url.d.ts.map +1 -0
- package/dist/src/utils/github-url.js +90 -0
- package/dist/src/utils/github-url.js.map +1 -0
- package/dist/src/utils/spec-parser.d.ts +145 -0
- package/dist/src/utils/spec-parser.d.ts.map +1 -0
- package/dist/src/utils/spec-parser.js +640 -0
- package/dist/src/utils/spec-parser.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/plugins/specweave/agents/pm/AGENT.md +1 -1
- package/plugins/specweave/agents/pm/templates/increment-spec.md +158 -0
- package/plugins/specweave/agents/pm/templates/living-docs-spec.md +113 -0
- package/plugins/specweave/commands/specweave-done.md +163 -0
- package/plugins/specweave/hooks/lib/update-status-line.sh +79 -111
- package/plugins/specweave/hooks/post-increment-planning.sh +107 -35
- package/plugins/specweave/lib/hooks/sync-living-docs.js +139 -34
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +234 -38
- package/plugins/specweave/skills/SKILLS-INDEX.md +4 -24
- package/plugins/specweave/skills/increment-planner/SKILL.md +94 -0
- package/plugins/specweave/skills/increment-work-router/SKILL.md +466 -0
- package/plugins/specweave-ado/lib/ado-status-sync.js +80 -0
- package/plugins/specweave-ado/lib/ado-status-sync.ts +121 -0
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +205 -0
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +248 -0
- package/plugins/specweave-github/lib/duplicate-detector.js +370 -0
- package/plugins/specweave-github/lib/duplicate-detector.ts +525 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.js +220 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +322 -0
- package/plugins/specweave-github/lib/github-client.js +21 -10
- package/plugins/specweave-github/lib/github-client.ts +27 -16
- package/plugins/specweave-github/lib/github-epic-sync.js +489 -0
- package/plugins/specweave-github/lib/github-epic-sync.ts +690 -0
- package/plugins/specweave-github/lib/github-status-sync.js +71 -0
- package/plugins/specweave-github/lib/github-status-sync.ts +107 -0
- package/plugins/specweave-github/lib/task-sync.js +33 -2
- package/plugins/specweave-github/lib/task-sync.ts +44 -2
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +267 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.ts.disabled +222 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.js +304 -0
- package/plugins/specweave-jira/lib/jira-epic-sync.ts +459 -0
- package/plugins/specweave-jira/lib/jira-status-sync.js +79 -0
- package/plugins/specweave-jira/lib/jira-status-sync.ts +139 -0
- package/src/templates/AGENTS.md.template +88 -1
- package/src/templates/CLAUDE.md.template +49 -0
- package/plugins/specweave/skills/increment-quality-judge/SKILL.md +0 -524
- package/plugins/specweave/skills/plugin-installer/SKILL.md +0 -353
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
{
|
|
2
|
+
"init": {
|
|
3
|
+
"welcome": "🚀 Инициализация SpecWeave",
|
|
4
|
+
"projectName": "Название проекта:",
|
|
5
|
+
"projectNamePrompt": "Название проекта (для шаблонов):",
|
|
6
|
+
"projectNameDefault": "my-saas",
|
|
7
|
+
"detectingTool": "Определение AI-инструмента...",
|
|
8
|
+
"foundClaude": "✅ Обнаружен Claude Code",
|
|
9
|
+
"foundCursor": "✅ Обнаружен Cursor",
|
|
10
|
+
"foundCopilot": "✅ Обнаружен GitHub Copilot",
|
|
11
|
+
"noToolDetected": "AI-инструмент не обнаружен, используется Generic адаптер",
|
|
12
|
+
"complete": "✨ Инициализация завершена!",
|
|
13
|
+
"claudeNativeComplete": "✨ Установка Claude Code завершена!",
|
|
14
|
+
"claudeNativeBenefits": "✅ Навыки, агенты и хуки работают из коробки",
|
|
15
|
+
"projectSuccess": "Проект SpecWeave успешно создан!",
|
|
16
|
+
"readyToBuild": "🚀 Готов к разработке с SpecWeave!",
|
|
17
|
+
"nestedCdCommand": "cd {{path}}",
|
|
18
|
+
"nestedIncCommand": "/specweave.inc \"ваша-фича\"",
|
|
19
|
+
"pluginEnableLater": "Вы можете включить плагины позже командой: specweave plugin enable <имя>",
|
|
20
|
+
"genericError": "Ошибка:",
|
|
21
|
+
"errors": {
|
|
22
|
+
"invalidName": "Название проекта должно содержать только строчные буквы, цифры и дефисы",
|
|
23
|
+
"alreadyExists": "Директория .specweave уже существует",
|
|
24
|
+
"cancelled": "❌ Инициализация отменена",
|
|
25
|
+
"invalidLanguage": "❌ Неверный язык: {{language}}",
|
|
26
|
+
"supportedLanguages": "Поддерживаемые языки: {{languages}}",
|
|
27
|
+
"nestedNotSupported": "❌ Вложенные .specweave/ папки НЕ поддерживаются!",
|
|
28
|
+
"parentFound": "Найдена родительская .specweave/ в:",
|
|
29
|
+
"projectCreationFailed": "Не удалось создать проект",
|
|
30
|
+
"commandsCopyFailed": "❌ Ошибка копирования команд: {{error}}",
|
|
31
|
+
"agentsCopyFailed": "❌ Ошибка копирования агентов: {{error}}",
|
|
32
|
+
"skillsCopyFailed": "❌ Ошибка копирования навыков: {{error}}",
|
|
33
|
+
"hooksCopyFailed": "❌ Ошибка копирования хуков: {{error}}",
|
|
34
|
+
"templatesNotFound": "❌ Ошибка: Директория шаблонов не найдена по пути: {{path}}",
|
|
35
|
+
"packageRoot": "Корень пакета: {{root}}",
|
|
36
|
+
"tryingAlternate": "Поиск альтернативных расположений...",
|
|
37
|
+
"foundTemplatesAt": "✓ Найдены шаблоны в: {{path}}",
|
|
38
|
+
"sourceNotFound": "❌ Ошибка: Исходная директория {{type}} не найдена",
|
|
39
|
+
"expectedAt": "Ожидалось в: {{path}}",
|
|
40
|
+
"dirname": "__dirname: {{path}}",
|
|
41
|
+
"couldNotFindRoot": "Не удалось найти корень пакета (поиск package.json с name=\"specweave\")",
|
|
42
|
+
"sourceEmpty": "❌ Ошибка: Исходная директория {{type}} пуста",
|
|
43
|
+
"directory": "Директория: {{path}}",
|
|
44
|
+
"installationIssue": "Это указывает на проблему установки пакета.",
|
|
45
|
+
"errorCopying": "❌ Ошибка копирования {{type}}: {{error}}",
|
|
46
|
+
"source": "Источник: {{path}}",
|
|
47
|
+
"target": "Назначение: {{path}}"
|
|
48
|
+
},
|
|
49
|
+
"warnings": {
|
|
50
|
+
"invalidDirName": "⚠️ Имя текущей директории '{{dirName}}' содержит недопустимые символы.",
|
|
51
|
+
"directoryNotEmpty": "⚠️ Текущая директория содержит {{count}} файл{{plural}}.",
|
|
52
|
+
"skillsIndexWarning": "⚠️ Предупреждение: Не удалось создать индекс навыков: {{error}}",
|
|
53
|
+
"skillsIndexNote": "Навыки всё равно будут работать, но может потребоваться ручная индексация.",
|
|
54
|
+
"marketplaceCopyFailed": "⚠️ Предупреждение: Не удалось скопировать маркетплейс плагинов",
|
|
55
|
+
"marketplaceNotFound": "⚠️ Предупреждение: Маркетплейс плагинов не найден",
|
|
56
|
+
"pluginAutoSetupFailed": "⚠️ Предупреждение: Не удалось настроить автоматическую регистрацию плагинов"
|
|
57
|
+
},
|
|
58
|
+
"prompts": {
|
|
59
|
+
"confirmInitInCurrent": "Инициализировать SpecWeave в текущей директории?",
|
|
60
|
+
"overwriteSpecweave": "Директория .specweave уже существует. Перезаписать?",
|
|
61
|
+
"overwriteDirectory": "Директория {{projectName}} уже существует. Перезаписать?",
|
|
62
|
+
"enablePlugins": "Включить предложенные плагины сейчас?"
|
|
63
|
+
},
|
|
64
|
+
"info": {
|
|
65
|
+
"nestedEnforcement": "SpecWeave требует единого источника истины:",
|
|
66
|
+
"nestedBullet1": "• Используйте родительскую папку для всех инкрементов",
|
|
67
|
+
"nestedBullet2": "• Инкременты могут охватывать несколько поддиректорий",
|
|
68
|
+
"nestedBullet3": "• См. раздел CLAUDE.md \"Root-Level .specweave/ Folder\"",
|
|
69
|
+
"nestedToFix": "Чтобы исправить:",
|
|
70
|
+
"suggestedPlugins": "💡 Предлагаемые плагины:",
|
|
71
|
+
"copiedFiles": "✓ Скопировано {{count}} файлов команд",
|
|
72
|
+
"copiedAgents": "✓ Скопировано {{count}} директорий агентов",
|
|
73
|
+
"copiedSkills": "✓ Скопировано {{count}} директорий навыков",
|
|
74
|
+
"copiedHooks": "✓ Скопировано {{count}} файлов хуков",
|
|
75
|
+
"pluginAutoSetupDetails": "Claude Code автоматически загрузит маркетплейс SpecWeave когда вы доверитесь этой папке"
|
|
76
|
+
},
|
|
77
|
+
"success": {
|
|
78
|
+
"pluginAutoSetup": "Маркетплейс плагинов настроен для автоматической загрузки"
|
|
79
|
+
},
|
|
80
|
+
"progress": {
|
|
81
|
+
"creatingProject": "Создание проекта SpecWeave...",
|
|
82
|
+
"detected": "Обнаружен {{tool}}...",
|
|
83
|
+
"usingTool": "Используется {{tool}}...",
|
|
84
|
+
"directoryCreated": "Структура директорий создана...",
|
|
85
|
+
"templatesCopied": "Базовые шаблоны скопированы...",
|
|
86
|
+
"installingComponents": "Установка компонентов Claude Code...",
|
|
87
|
+
"commandsInstalled": "Команды установлены...",
|
|
88
|
+
"agentsInstalled": "Агенты установлены...",
|
|
89
|
+
"skillsInstalled": "Навыки установлены...",
|
|
90
|
+
"hooksInstalled": "Хуки установлены...",
|
|
91
|
+
"generatingIndex": "Создание индекса навыков...",
|
|
92
|
+
"indexGenerated": "Индекс навыков создан...",
|
|
93
|
+
"installingAdapter": "Установка адаптера {{tool}}...",
|
|
94
|
+
"projectSuccess": "Проект SpecWeave успешно создан!",
|
|
95
|
+
"detectingPlugins": "Определение плагинов...",
|
|
96
|
+
"detectedPlugins": "Обнаружено {{count}} предлагаемых плагинов",
|
|
97
|
+
"enablingPlugins": "Включение плагинов...",
|
|
98
|
+
"enabledPlugin": "Включён {{plugin}}",
|
|
99
|
+
"pluginsEnabled": "Плагины включены"
|
|
100
|
+
},
|
|
101
|
+
"nextSteps": {
|
|
102
|
+
"header": "🎯 Следующие шаги:",
|
|
103
|
+
"cd": "cd {{projectName}}",
|
|
104
|
+
"footer": "🚀 Готов к разработке с SpecWeave!",
|
|
105
|
+
"docsLink": "Документация: https://spec-weave.com",
|
|
106
|
+
"githubLink": "GitHub: https://github.com/anton-abyzov/specweave",
|
|
107
|
+
"claude": {
|
|
108
|
+
"step1": "Откройте Claude Code в этой директории",
|
|
109
|
+
"step2": "Установите основной плагин SpecWeave (ОБЯЗАТЕЛЬНО):",
|
|
110
|
+
"installCore": "Выполните: /plugin install specweave",
|
|
111
|
+
"step3": "Опционально: Установите дополнительные плагины по необходимости:",
|
|
112
|
+
"installGitHub": "/plugin install specweave-github",
|
|
113
|
+
"installFrontend": "/plugin install specweave-frontend",
|
|
114
|
+
"step4": "Начните разработку:",
|
|
115
|
+
"example": "\"/specweave:inc 'аутентификация пользователя'\"",
|
|
116
|
+
"autoActivate": "Навыки и агенты активируются автоматически по контексту"
|
|
117
|
+
},
|
|
118
|
+
"cursor": {
|
|
119
|
+
"step1": "Откройте проект в Cursor",
|
|
120
|
+
"step2": "Скажите: \"Создать инкремент для [вашей функции]\"",
|
|
121
|
+
"guide": "Cursor прочитает .cursorrules и поможет вам",
|
|
122
|
+
"step3": "Используйте @ ярлыки:",
|
|
123
|
+
"shortcuts": "@increments, @docs, @strategy, @tests"
|
|
124
|
+
},
|
|
125
|
+
"copilot": {
|
|
126
|
+
"step1": "Откройте проект в VS Code с Copilot",
|
|
127
|
+
"step2": "Copilot автоматически прочитает инструкции workspace",
|
|
128
|
+
"action": "Начните создавать папки и файлы инкрементов",
|
|
129
|
+
"step3": "Используйте Copilot Chat для помощи:",
|
|
130
|
+
"example": "\"Как создать spec.md?\""
|
|
131
|
+
},
|
|
132
|
+
"generic": {
|
|
133
|
+
"step1": "Прочитайте SPECWEAVE-MANUAL.md",
|
|
134
|
+
"step2": "Следуйте пошаговым инструкциям",
|
|
135
|
+
"compatibility": "Работает с ЛЮБЫМ AI инструментом (ChatGPT, Claude web, Gemini)"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"plugin": {
|
|
140
|
+
"list": {
|
|
141
|
+
"header": "📦 Плагины SpecWeave",
|
|
142
|
+
"enabledHeader": "✅ Включенные плагины:",
|
|
143
|
+
"enabledNone": "(нет)",
|
|
144
|
+
"errorLoading": "(ошибка загрузки)",
|
|
145
|
+
"availableHeader": "📚 Доступные плагины:",
|
|
146
|
+
"availableNone": "(все включены)",
|
|
147
|
+
"suggestedHeader": "💡 Рекомендуемые плагины (автообнаружены):",
|
|
148
|
+
"enableHint": "Запустите `specweave plugin enable <имя>` для включения плагина",
|
|
149
|
+
"statsFormat": "Навыки: {{skills}}, Агенты: {{agents}}, Команды: {{commands}}",
|
|
150
|
+
"errorListing": "❌ Ошибка получения списка плагинов:"
|
|
151
|
+
},
|
|
152
|
+
"enable": {
|
|
153
|
+
"enablingPlugin": "🔌 Включение плагина: {{name}}",
|
|
154
|
+
"alreadyEnabled": "⚠️ Плагин {{name}} уже включён",
|
|
155
|
+
"useForce": "Используйте --force для переустановки",
|
|
156
|
+
"success": "✅ Плагин {{name}} успешно включён!",
|
|
157
|
+
"installed": "Установлено:",
|
|
158
|
+
"skills": "Навыки: {{names}}",
|
|
159
|
+
"agents": "Агенты: {{names}}",
|
|
160
|
+
"commands": "Команды: {{names}}",
|
|
161
|
+
"installedTo": "Плагин установлен в: {{location}}",
|
|
162
|
+
"restartClaude": "⚠️ Перезапустите Claude Code для активации нового плагина",
|
|
163
|
+
"errorEnabling": "❌ Ошибка включения плагина:"
|
|
164
|
+
},
|
|
165
|
+
"disable": {
|
|
166
|
+
"disablingPlugin": "🔌 Отключение плагина: {{name}}",
|
|
167
|
+
"notEnabled": "⚠️ Плагин {{name}} не включён",
|
|
168
|
+
"success": "✅ Плагин {{name}} успешно отключён!",
|
|
169
|
+
"restartClaude": "⚠️ Перезапустите Claude Code для деактивации плагина",
|
|
170
|
+
"errorDisabling": "❌ Ошибка отключения плагина:"
|
|
171
|
+
},
|
|
172
|
+
"info": {
|
|
173
|
+
"header": "📋 Информация о плагине: {{name}}",
|
|
174
|
+
"notFound": "❌ Плагин {{name}} не найден",
|
|
175
|
+
"listHint": "Запустите `specweave plugin list --available` для просмотра доступных плагинов",
|
|
176
|
+
"name": "Название:",
|
|
177
|
+
"version": "Версия:",
|
|
178
|
+
"description": "Описание:",
|
|
179
|
+
"author": "Автор:",
|
|
180
|
+
"license": "Лицензия:",
|
|
181
|
+
"coreVersion": "Версия SpecWeave Core:",
|
|
182
|
+
"status": "Статус:",
|
|
183
|
+
"statusEnabled": "✅ Включён",
|
|
184
|
+
"statusDisabled": "⚪ Отключён",
|
|
185
|
+
"provides": "Предоставляет:",
|
|
186
|
+
"skillsFormat": "Навыки: {{skills}}",
|
|
187
|
+
"agentsFormat": "Агенты: {{agents}}",
|
|
188
|
+
"commandsFormat": "Команды: {{commands}}",
|
|
189
|
+
"noneValue": "(нет)",
|
|
190
|
+
"dependencies": "Зависимости:",
|
|
191
|
+
"autoDetect": "Триггеры автообнаружения:",
|
|
192
|
+
"autoDetectFiles": "Файлы: {{files}}",
|
|
193
|
+
"autoDetectPackages": "Пакеты: {{packages}}",
|
|
194
|
+
"autoDetectEnv": "Переменные окружения: {{env}}",
|
|
195
|
+
"autoDetectGit": "Шаблон Git Remote: {{pattern}}",
|
|
196
|
+
"credits": "Благодарности:",
|
|
197
|
+
"basedOn": "Основано на: {{source}}",
|
|
198
|
+
"originalAuthor": "Оригинальный автор: {{author}}",
|
|
199
|
+
"contributors": "Контрибьюторы: {{contributors}}",
|
|
200
|
+
"errorGettingInfo": "❌ Ошибка получения информации о плагине:"
|
|
201
|
+
},
|
|
202
|
+
"errors": {
|
|
203
|
+
"nameRequired": "❌ Требуется имя плагина для команды {{command}}",
|
|
204
|
+
"usageEnable": "Использование: specweave plugin enable <имя-плагина>",
|
|
205
|
+
"usageDisable": "Использование: specweave plugin disable <имя-плагина>",
|
|
206
|
+
"usageInfo": "Использование: specweave plugin info <имя-плагина>",
|
|
207
|
+
"unknownAction": "❌ Неизвестное действие плагина: {{action}}",
|
|
208
|
+
"validActions": "Допустимые действия: list, enable, disable, info"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"list": {
|
|
212
|
+
"header": "📋 Компоненты SpecWeave",
|
|
213
|
+
"agentsHeader": "🤖 Агенты:",
|
|
214
|
+
"skillsHeader": "✨ Навыки:",
|
|
215
|
+
"availableFormat": "Доступно в SpecWeave: {{count}} {{type}}",
|
|
216
|
+
"agents": "агентов",
|
|
217
|
+
"skills": "навыков",
|
|
218
|
+
"noDescription": "Нет описания",
|
|
219
|
+
"noAgents": "⚠️ Агенты не найдены в src/agents/",
|
|
220
|
+
"noSkills": "⚠️ Навыки не найдены в src/skills/",
|
|
221
|
+
"hintInstalled": "Запустите `specweave list --installed` для просмотра установленных компонентов",
|
|
222
|
+
"hintInstall": "Запустите `specweave install <имя>` для установки конкретного компонента",
|
|
223
|
+
"localInstallation": "📁 Локальная установка (.claude/):",
|
|
224
|
+
"globalInstallation": "🌍 Глобальная установка (~/.claude/):",
|
|
225
|
+
"noComponentsInstalled": "⚠️ Компоненты не установлены",
|
|
226
|
+
"installPrompt": "Запустите `specweave install` для установки компонентов"
|
|
227
|
+
},
|
|
228
|
+
"install": {
|
|
229
|
+
"header": "📦 Установка компонентов SpecWeave",
|
|
230
|
+
"notFound": "❌ Компонент \"{{name}}\" не найден",
|
|
231
|
+
"listHint": "Запустите `specweave list` для просмотра доступных компонентов",
|
|
232
|
+
"complete": "✅ Установка завершена!",
|
|
233
|
+
"installedTo": "Установлено в: {{location}}",
|
|
234
|
+
"installingFormat": "Установка {{type}}: {{name}}...",
|
|
235
|
+
"installedFormat": "Установлен {{type}}: {{name}}",
|
|
236
|
+
"failedFormat": "Не удалось установить {{type}}: {{name}}",
|
|
237
|
+
"noAgentsWarning": "⚠️ Агенты не найдены в src/agents/",
|
|
238
|
+
"noSkillsWarning": "⚠️ Навыки не найдены в src/skills/",
|
|
239
|
+
"installingCount": "📦 Установка {{count}} {{type}}...",
|
|
240
|
+
"agent": "агент",
|
|
241
|
+
"agents": "агентов",
|
|
242
|
+
"skill": "навык",
|
|
243
|
+
"skills": "навыков"
|
|
244
|
+
},
|
|
245
|
+
"increment": {
|
|
246
|
+
"creating": "📝 Создание increment: {name}",
|
|
247
|
+
"created": "✅ Increment {id} успешно создан!",
|
|
248
|
+
"nextStepDo": "Далее: Запустите /specweave.do для начала реализации",
|
|
249
|
+
"errors": {
|
|
250
|
+
"incompleteFound": "Невозможно создать новый increment! Предыдущие increment не завершены"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"progress": {
|
|
254
|
+
"currentIncrement": "Текущий Increment: {id}",
|
|
255
|
+
"status": "Статус: {status}",
|
|
256
|
+
"completion": "Завершено: {percent}%"
|
|
257
|
+
},
|
|
258
|
+
"translate": {
|
|
259
|
+
"translating": "🌐 Перевод контента на {language}...",
|
|
260
|
+
"complete": "✅ Перевод завершён!"
|
|
261
|
+
},
|
|
262
|
+
"version": {
|
|
263
|
+
"current": "Версия SpecWeave: {version}"
|
|
264
|
+
},
|
|
265
|
+
"errors": {
|
|
266
|
+
"fileNotFound": "❌ Файл не найден: {path}",
|
|
267
|
+
"invalidConfig": "❌ Неверная конфигурация: {error}"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"init": {
|
|
3
|
+
"welcome": "🚀 SpecWeave Initialization",
|
|
4
|
+
"projectName": "Project name:",
|
|
5
|
+
"projectNamePrompt": "Project name (for templates):",
|
|
6
|
+
"projectNameDefault": "my-saas",
|
|
7
|
+
"detectingTool": "Detecting AI tool...",
|
|
8
|
+
"foundClaude": "✅ Found Claude Code",
|
|
9
|
+
"foundCursor": "✅ Found Cursor",
|
|
10
|
+
"foundCopilot": "✅ Found GitHub Copilot",
|
|
11
|
+
"noToolDetected": "No AI tool detected, using Generic adapter",
|
|
12
|
+
"complete": "✨ Initialization complete!",
|
|
13
|
+
"claudeNativeComplete": "✨ Claude Code native installation complete!",
|
|
14
|
+
"claudeNativeBenefits": "✅ Native skills, agents, hooks work out of the box",
|
|
15
|
+
"projectSuccess": "SpecWeave project created successfully!",
|
|
16
|
+
"readyToBuild": "🚀 Ready to build with SpecWeave!",
|
|
17
|
+
"errors": {
|
|
18
|
+
"invalidName": "Project name must contain only lowercase letters, numbers, and hyphens",
|
|
19
|
+
"alreadyExists": ".specweave directory already exists",
|
|
20
|
+
"cancelled": "❌ Initialization cancelled",
|
|
21
|
+
"invalidLanguage": "❌ Invalid language: {{language}}",
|
|
22
|
+
"supportedLanguages": "Supported languages: {{languages}}",
|
|
23
|
+
"nestedNotSupported": "❌ Nested .specweave/ folders are NOT supported!",
|
|
24
|
+
"parentFound": "Found parent .specweave/ at:",
|
|
25
|
+
"projectCreationFailed": "Failed to create project",
|
|
26
|
+
"commandsCopyFailed": "❌ Commands copy failed: {{error}}",
|
|
27
|
+
"agentsCopyFailed": "❌ Agents copy failed: {{error}}",
|
|
28
|
+
"skillsCopyFailed": "❌ Skills copy failed: {{error}}",
|
|
29
|
+
"hooksCopyFailed": "❌ Hooks copy failed: {{error}}"
|
|
30
|
+
},
|
|
31
|
+
"warnings": {
|
|
32
|
+
"invalidDirName": "⚠️ Current directory name '{{dirName}}' contains invalid characters.",
|
|
33
|
+
"directoryNotEmpty": "⚠️ Current directory contains {{count}} file{{plural}}.",
|
|
34
|
+
"skillsIndexWarning": "⚠️ Warning: Could not generate skills index: {{error}}",
|
|
35
|
+
"skillsIndexNote": "Skills will still work, but manual indexing may be needed."
|
|
36
|
+
},
|
|
37
|
+
"prompts": {
|
|
38
|
+
"confirmInitInCurrent": "Initialize SpecWeave in current directory?",
|
|
39
|
+
"overwriteSpecweave": ".specweave directory already exists. Overwrite?",
|
|
40
|
+
"overwriteDirectory": "Directory {{projectName}} already exists. Overwrite?",
|
|
41
|
+
"enablePlugins": "Enable suggested plugins now?"
|
|
42
|
+
},
|
|
43
|
+
"info": {
|
|
44
|
+
"nestedEnforcement": "SpecWeave enforces a single source of truth:",
|
|
45
|
+
"nestedBullet1": "• Use the parent folder for all increments",
|
|
46
|
+
"nestedBullet2": "• Increments can span multiple subdirectories",
|
|
47
|
+
"nestedBullet3": "• See CLAUDE.md section \"Root-Level .specweave/ Folder\"",
|
|
48
|
+
"nestedToFix": "To fix:",
|
|
49
|
+
"suggestedPlugins": "💡 Suggested Plugins:",
|
|
50
|
+
"copiedFiles": "✓ Copied {{count}} command files",
|
|
51
|
+
"copiedAgents": "✓ Copied {{count}} agent directories",
|
|
52
|
+
"copiedSkills": "✓ Copied {{count}} skill directories",
|
|
53
|
+
"copiedHooks": "✓ Copied {{count}} hook files"
|
|
54
|
+
},
|
|
55
|
+
"progress": {
|
|
56
|
+
"creatingProject": "Creating SpecWeave project...",
|
|
57
|
+
"detected": "Detected {{tool}}...",
|
|
58
|
+
"usingTool": "Using {{tool}}...",
|
|
59
|
+
"directoryCreated": "Directory structure created...",
|
|
60
|
+
"templatesCopied": "Base templates copied...",
|
|
61
|
+
"installingComponents": "Installing Claude Code components...",
|
|
62
|
+
"commandsInstalled": "Slash commands installed...",
|
|
63
|
+
"agentsInstalled": "Agents installed...",
|
|
64
|
+
"skillsInstalled": "Skills installed...",
|
|
65
|
+
"hooksInstalled": "Hooks installed...",
|
|
66
|
+
"generatingIndex": "Generating skills index...",
|
|
67
|
+
"indexGenerated": "Skills index generated...",
|
|
68
|
+
"installingAdapter": "Installing {{tool}} adapter...",
|
|
69
|
+
"projectSuccess": "SpecWeave project created successfully!",
|
|
70
|
+
"detectingPlugins": "Detecting plugins...",
|
|
71
|
+
"detectedPlugins": "Detected {{count}} suggested plugins",
|
|
72
|
+
"enablingPlugins": "Enabling plugins...",
|
|
73
|
+
"enabledPlugin": "Enabled {{plugin}}",
|
|
74
|
+
"pluginsEnabled": "Plugins enabled"
|
|
75
|
+
},
|
|
76
|
+
"nextSteps": {
|
|
77
|
+
"header": "🎯 Next steps:",
|
|
78
|
+
"cd": "cd {{projectName}}",
|
|
79
|
+
"footer": "🚀 Ready to build with SpecWeave!",
|
|
80
|
+
"docsLink": "Documentation: https://spec-weave.com",
|
|
81
|
+
"githubLink": "GitHub: https://github.com/anton-abyzov/specweave"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"increment": {
|
|
85
|
+
"creating": "📝 Creating increment: {name}",
|
|
86
|
+
"created": "✅ Increment {id} created successfully!",
|
|
87
|
+
"nextStepDo": "Next: Run /specweave.do to start implementation",
|
|
88
|
+
"errors": {
|
|
89
|
+
"incompleteFound": "Cannot create new increment! Previous increments incomplete"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"progress": {
|
|
93
|
+
"currentIncrement": "Current Increment: {id}",
|
|
94
|
+
"status": "Status: {status}",
|
|
95
|
+
"completion": "Completion: {percent}%"
|
|
96
|
+
},
|
|
97
|
+
"translate": {
|
|
98
|
+
"translating": "🌐 Translating content to {language}...",
|
|
99
|
+
"complete": "✅ Translation complete!"
|
|
100
|
+
},
|
|
101
|
+
"version": {
|
|
102
|
+
"current": "SpecWeave version: {version}"
|
|
103
|
+
},
|
|
104
|
+
"errors": {
|
|
105
|
+
"fileNotFound": "❌ File not found: {path}",
|
|
106
|
+
"invalidConfig": "❌ Invalid configuration: {error}"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-living-docs.d.ts","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/sync-living-docs.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAwBH;;GAEG;AACH,iBAAe,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"sync-living-docs.d.ts","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/sync-living-docs.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAwBH;;GAEG;AACH,iBAAe,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DhE;AAoZD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -59,10 +59,11 @@ async function syncLivingDocs(incrementId) {
|
|
|
59
59
|
changedDocs = result.changedFiles;
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
//
|
|
63
|
-
console.log('
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// Hierarchical distribution mode: Epic + User Stories (v2.1)
|
|
63
|
+
console.log('📊 Using hierarchical distribution mode (v2.1 - Epic + User Stories)');
|
|
64
|
+
const result = await hierarchicalDistribution(incrementId);
|
|
65
|
+
specCopied = result.success;
|
|
66
|
+
changedDocs = result.changedFiles;
|
|
66
67
|
}
|
|
67
68
|
if (changedDocs.length === 0 && !specCopied) {
|
|
68
69
|
console.log('ℹ️ No living docs changed');
|
|
@@ -80,50 +81,66 @@ async function syncLivingDocs(incrementId) {
|
|
|
80
81
|
}
|
|
81
82
|
/**
|
|
82
83
|
* Intelligent sync using the new architecture (v0.18.0+)
|
|
84
|
+
*
|
|
85
|
+
* NOTE: syncIncrement not yet implemented, fallback to hierarchical distribution
|
|
83
86
|
*/
|
|
84
87
|
async function intelligentSyncLivingDocs(incrementId, config) {
|
|
88
|
+
console.log(' ⚠️ Intelligent sync not yet fully implemented');
|
|
89
|
+
console.log(' Falling back to hierarchical distribution mode...');
|
|
90
|
+
// Fallback to hierarchical distribution
|
|
91
|
+
return await hierarchicalDistribution(incrementId);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Hierarchical distribution using new architecture (v2.1 - Epic + User Stories)
|
|
95
|
+
*
|
|
96
|
+
* Distributes increment spec into hierarchical structure:
|
|
97
|
+
* - Epic file (SPEC-###.md) - High-level summary (50-80 lines)
|
|
98
|
+
* - User story files (us-###.md) - Detailed requirements (80-120 lines each)
|
|
99
|
+
* - Links to tasks.md for implementation details
|
|
100
|
+
*/
|
|
101
|
+
async function hierarchicalDistribution(incrementId) {
|
|
85
102
|
try {
|
|
86
103
|
// Dynamic import to avoid circular dependencies
|
|
87
|
-
const {
|
|
88
|
-
console.log('
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
preserveCodeBlocks: true,
|
|
94
|
-
preserveLinks: true,
|
|
95
|
-
preserveImages: true,
|
|
96
|
-
},
|
|
97
|
-
distributor: {
|
|
98
|
-
generateFrontmatter: true,
|
|
99
|
-
preserveOriginal: config.livingDocs?.intelligent?.preserveOriginal ?? true,
|
|
100
|
-
},
|
|
101
|
-
linker: {
|
|
102
|
-
generateBacklinks: config.livingDocs?.intelligent?.generateCrossLinks ?? true,
|
|
103
|
-
updateExisting: true,
|
|
104
|
-
},
|
|
104
|
+
const { SpecDistributor } = await import('../../../../src/core/living-docs/index.js');
|
|
105
|
+
console.log(' 📊 Parsing and distributing spec into hierarchical structure...');
|
|
106
|
+
const projectRoot = process.cwd();
|
|
107
|
+
const distributor = new SpecDistributor(projectRoot, {
|
|
108
|
+
overwriteExisting: false,
|
|
109
|
+
createBackups: true,
|
|
105
110
|
});
|
|
111
|
+
const result = await distributor.distribute(incrementId);
|
|
112
|
+
if (!result.success) {
|
|
113
|
+
console.error(` ❌ Distribution failed with errors:`);
|
|
114
|
+
for (const error of result.errors) {
|
|
115
|
+
console.error(` - ${error}`);
|
|
116
|
+
}
|
|
117
|
+
return { success: false, changedFiles: [] };
|
|
118
|
+
}
|
|
106
119
|
// Log summary
|
|
107
|
-
console.log(` ✅
|
|
108
|
-
console.log(`
|
|
109
|
-
console.log(`
|
|
110
|
-
console.log(` Files
|
|
111
|
-
console.log(`
|
|
112
|
-
console.log(`
|
|
120
|
+
console.log(` ✅ Hierarchical distribution complete:`);
|
|
121
|
+
console.log(` Epic ID: ${result.specId}`);
|
|
122
|
+
console.log(` User Stories: ${result.totalStories}`);
|
|
123
|
+
console.log(` Files created: ${result.totalFiles}`);
|
|
124
|
+
console.log(` Epic: ${path.basename(result.epicPath)}`);
|
|
125
|
+
console.log(` User story files: ${result.userStoryPaths.length}`);
|
|
126
|
+
if (result.warnings.length > 0) {
|
|
127
|
+
console.log(` ⚠️ Warnings:`);
|
|
128
|
+
for (const warning of result.warnings) {
|
|
129
|
+
console.log(` - ${warning}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
113
132
|
// Collect changed file paths
|
|
114
|
-
const changedFiles = [
|
|
115
|
-
...result.distribution.created.map((f) => f.path),
|
|
116
|
-
...result.distribution.updated.map((f) => f.path),
|
|
117
|
-
];
|
|
133
|
+
const changedFiles = [result.epicPath, ...result.userStoryPaths];
|
|
118
134
|
return {
|
|
119
|
-
success:
|
|
135
|
+
success: true,
|
|
120
136
|
changedFiles,
|
|
121
137
|
};
|
|
122
138
|
}
|
|
123
139
|
catch (error) {
|
|
124
|
-
console.error(` ❌
|
|
125
|
-
console.error(
|
|
140
|
+
console.error(` ❌ Hierarchical distribution failed: ${error}`);
|
|
141
|
+
console.error(error.stack);
|
|
126
142
|
// Fallback to simple mode
|
|
143
|
+
console.error(' Falling back to simple sync mode...');
|
|
127
144
|
const copied = await copyIncrementSpecToLivingDocs(incrementId);
|
|
128
145
|
return {
|
|
129
146
|
success: copied,
|
|
@@ -132,10 +149,145 @@ async function intelligentSyncLivingDocs(incrementId, config) {
|
|
|
132
149
|
}
|
|
133
150
|
}
|
|
134
151
|
/**
|
|
135
|
-
*
|
|
152
|
+
* Extract and merge living docs (v2.0 - NO DUPLICATION!)
|
|
153
|
+
*
|
|
154
|
+
* NEW ARCHITECTURE:
|
|
155
|
+
* - Living docs = Permanent EPIC (GitHub Project, Jira Epic, ADO Feature)
|
|
156
|
+
* - Increment spec = Temporary ITERATION (GitHub Issue, Jira Story, ADO User Story)
|
|
157
|
+
*
|
|
158
|
+
* What this does:
|
|
159
|
+
* 1. Parse increment spec (extract user stories ONLY)
|
|
160
|
+
* 2. Check if living docs spec exists
|
|
161
|
+
* 3. If exists: Merge new user stories (avoid duplicates)
|
|
162
|
+
* 4. If not: Create new living docs spec
|
|
163
|
+
* 5. Generate links to architecture/ADRs (NO duplication!)
|
|
164
|
+
* 6. Update implementation history
|
|
165
|
+
*
|
|
166
|
+
* What this DOESN'T do:
|
|
167
|
+
* - ❌ Copy architecture details (those live in architecture/)
|
|
168
|
+
* - ❌ Copy ADR content (those live in architecture/adr/)
|
|
169
|
+
* - ❌ Copy success metrics (those live in increment reports)
|
|
170
|
+
* - ❌ Copy future enhancements (those live in roadmap)
|
|
171
|
+
*
|
|
172
|
+
* Returns true if living docs updated, false if skipped
|
|
173
|
+
*/
|
|
174
|
+
async function extractAndMergeLivingDocs(incrementId) {
|
|
175
|
+
try {
|
|
176
|
+
// Import parser utilities
|
|
177
|
+
const { parseIncrementSpec, parseLivingDocsSpec, extractSpecId, mergeUserStories, generateRelatedDocsLinks, writeLivingDocsSpec, } = await import('../../../../src/utils/spec-parser.js');
|
|
178
|
+
const projectRoot = process.cwd();
|
|
179
|
+
const incrementSpecPath = path.join(projectRoot, '.specweave', 'increments', incrementId, 'spec.md');
|
|
180
|
+
// Check if increment spec exists
|
|
181
|
+
if (!fs.existsSync(incrementSpecPath)) {
|
|
182
|
+
console.log(`⚠️ Increment spec not found: ${incrementSpecPath}`);
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
console.log(` 📖 Parsing increment spec: ${incrementId}`);
|
|
186
|
+
// 1. Parse increment spec (extract user stories)
|
|
187
|
+
const incrementSpec = await parseIncrementSpec(incrementSpecPath);
|
|
188
|
+
if (incrementSpec.userStories.length === 0) {
|
|
189
|
+
console.log(`ℹ️ No user stories found in increment spec, skipping sync`);
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
console.log(` ✅ Found ${incrementSpec.userStories.length} user stories in increment`);
|
|
193
|
+
// 2. Determine living docs spec ID
|
|
194
|
+
const specId = incrementSpec.implementsSpec || extractSpecId(incrementId);
|
|
195
|
+
const livingDocsDir = path.join(projectRoot, '.specweave', 'docs', 'internal', 'specs', 'default');
|
|
196
|
+
const livingDocsPath = path.join(livingDocsDir, `${specId}-${incrementId.replace(/^\d+-/, '')}.md`);
|
|
197
|
+
// 3. Check if living docs spec exists
|
|
198
|
+
const livingDocsExists = fs.existsSync(livingDocsPath);
|
|
199
|
+
if (livingDocsExists) {
|
|
200
|
+
console.log(` 📚 Living docs spec exists, merging user stories...`);
|
|
201
|
+
// MERGE MODE: Add new user stories to existing spec
|
|
202
|
+
const livingSpec = await parseLivingDocsSpec(livingDocsPath);
|
|
203
|
+
// Merge user stories (adds new, updates existing)
|
|
204
|
+
const mergedStories = mergeUserStories(livingSpec.userStories, incrementSpec.userStories, incrementId);
|
|
205
|
+
const newStoriesCount = mergedStories.length - livingSpec.userStories.length;
|
|
206
|
+
// Update implementation history
|
|
207
|
+
const existingEntry = livingSpec.implementationHistory.find(e => e.increment === incrementId);
|
|
208
|
+
if (!existingEntry) {
|
|
209
|
+
livingSpec.implementationHistory.push({
|
|
210
|
+
increment: incrementId,
|
|
211
|
+
stories: incrementSpec.userStories.map(s => s.id),
|
|
212
|
+
status: 'complete',
|
|
213
|
+
date: new Date().toISOString().split('T')[0],
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
// Update existing entry
|
|
218
|
+
existingEntry.status = 'complete';
|
|
219
|
+
existingEntry.date = new Date().toISOString().split('T')[0];
|
|
220
|
+
}
|
|
221
|
+
// Update user stories
|
|
222
|
+
livingSpec.userStories = mergedStories;
|
|
223
|
+
// Update last_updated
|
|
224
|
+
livingSpec.lastUpdated = new Date().toISOString().split('T')[0];
|
|
225
|
+
// Write updated spec
|
|
226
|
+
await writeLivingDocsSpec(livingDocsPath, livingSpec);
|
|
227
|
+
console.log(` ✅ Merged ${newStoriesCount} new user stories into living docs`);
|
|
228
|
+
console.log(` ✅ Updated implementation history for ${incrementId}`);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
console.log(` 📝 Creating new living docs spec: ${specId}`);
|
|
232
|
+
// CREATE MODE: First increment for this spec
|
|
233
|
+
const relatedDocs = generateRelatedDocsLinks(incrementSpec, projectRoot);
|
|
234
|
+
const livingSpec = {
|
|
235
|
+
id: specId,
|
|
236
|
+
title: incrementSpec.title,
|
|
237
|
+
featureArea: extractFeatureArea(incrementSpec.title),
|
|
238
|
+
overview: incrementSpec.overview,
|
|
239
|
+
userStories: incrementSpec.userStories.map(story => ({
|
|
240
|
+
...story,
|
|
241
|
+
implementedIn: incrementId,
|
|
242
|
+
status: 'complete',
|
|
243
|
+
})),
|
|
244
|
+
implementationHistory: [
|
|
245
|
+
{
|
|
246
|
+
increment: incrementId,
|
|
247
|
+
stories: incrementSpec.userStories.map(s => s.id),
|
|
248
|
+
status: 'complete',
|
|
249
|
+
date: new Date().toISOString().split('T')[0],
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
relatedDocs,
|
|
253
|
+
externalLinks: {},
|
|
254
|
+
priority: incrementSpec.priority,
|
|
255
|
+
status: 'active',
|
|
256
|
+
created: new Date().toISOString().split('T')[0],
|
|
257
|
+
lastUpdated: new Date().toISOString().split('T')[0],
|
|
258
|
+
};
|
|
259
|
+
// Ensure directory exists
|
|
260
|
+
await fs.ensureDir(livingDocsDir);
|
|
261
|
+
// Write new spec
|
|
262
|
+
await writeLivingDocsSpec(livingDocsPath, livingSpec);
|
|
263
|
+
console.log(` ✅ Created new living docs spec: ${specId}`);
|
|
264
|
+
console.log(` ✅ Added ${incrementSpec.userStories.length} user stories`);
|
|
265
|
+
console.log(` ✅ Generated links to ${relatedDocs.architecture.length} architecture docs`);
|
|
266
|
+
console.log(` ✅ Generated links to ${relatedDocs.adrs.length} ADRs`);
|
|
267
|
+
}
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
console.error(`❌ Error extracting/merging living docs: ${error}`);
|
|
272
|
+
console.error(error.stack);
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Extract feature area from title
|
|
278
|
+
*/
|
|
279
|
+
function extractFeatureArea(title) {
|
|
280
|
+
// Simple heuristic: Use title as feature area
|
|
281
|
+
// Can be customized later based on keywords
|
|
282
|
+
return title.replace(/^(Increment \d+:\s*)?/, '').trim();
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Copy increment spec to living docs (DEPRECATED - use extractAndMergeLivingDocs instead)
|
|
136
286
|
* Returns true if spec was copied, false if skipped
|
|
137
287
|
*/
|
|
138
288
|
async function copyIncrementSpecToLivingDocs(incrementId) {
|
|
289
|
+
console.warn('⚠️ Using deprecated copyIncrementSpecToLivingDocs (simple mode)');
|
|
290
|
+
console.warn(' Consider enabling intelligent mode to avoid duplication');
|
|
139
291
|
try {
|
|
140
292
|
const incrementSpecPath = path.join(process.cwd(), '.specweave', 'increments', incrementId, 'spec.md');
|
|
141
293
|
const livingDocsPath = path.join(process.cwd(), '.specweave', 'docs', 'internal', 'specs', `spec-${incrementId}.md`);
|