specweave 0.28.15 → 0.28.19

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.
Files changed (146) hide show
  1. package/bin/specweave.js +1 -1
  2. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
  3. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
  4. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
  5. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
  6. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +6 -11
  7. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-feature-sync.js +6 -11
  9. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  10. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +19 -0
  11. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +1 -0
  12. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +380 -0
  13. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -0
  14. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +92 -0
  15. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -0
  16. package/dist/plugins/specweave-github/lib/increment-issue-builder.js +349 -0
  17. package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -0
  18. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
  19. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
  20. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
  21. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
  22. package/dist/src/cli/commands/import-external.d.ts.map +1 -1
  23. package/dist/src/cli/commands/import-external.js +12 -7
  24. package/dist/src/cli/commands/import-external.js.map +1 -1
  25. package/dist/src/cli/helpers/init/external-import.d.ts.map +1 -1
  26. package/dist/src/cli/helpers/init/external-import.js +138 -23
  27. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  28. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts +65 -0
  29. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts.map +1 -0
  30. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js +278 -0
  31. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js.map +1 -0
  32. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts +64 -0
  33. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.d.ts.map +1 -0
  34. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js +251 -0
  35. package/dist/src/cli/helpers/issue-tracker/jira-board-selection.js.map +1 -0
  36. package/dist/src/core/ac-test-validator-cli.js +4 -1
  37. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  38. package/dist/src/core/ac-test-validator.d.ts.map +1 -1
  39. package/dist/src/core/ac-test-validator.js +4 -1
  40. package/dist/src/core/ac-test-validator.js.map +1 -1
  41. package/dist/src/core/qa/qa-runner.js +7 -10
  42. package/dist/src/core/qa/qa-runner.js.map +1 -1
  43. package/dist/src/core/types/increment-metadata.d.ts +75 -0
  44. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  45. package/dist/src/core/types/sync-profile.d.ts +137 -5
  46. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  47. package/dist/src/core/types/sync-profile.js +63 -0
  48. package/dist/src/core/types/sync-profile.js.map +1 -1
  49. package/dist/src/importers/external-importer.d.ts +25 -0
  50. package/dist/src/importers/external-importer.d.ts.map +1 -1
  51. package/dist/src/importers/github-importer.d.ts.map +1 -1
  52. package/dist/src/importers/github-importer.js +5 -3
  53. package/dist/src/importers/github-importer.js.map +1 -1
  54. package/dist/src/importers/item-converter.d.ts +51 -0
  55. package/dist/src/importers/item-converter.d.ts.map +1 -1
  56. package/dist/src/importers/item-converter.js +39 -12
  57. package/dist/src/importers/item-converter.js.map +1 -1
  58. package/dist/src/init/repo/types.d.ts +1 -1
  59. package/dist/src/living-docs/fs-id-allocator.d.ts +72 -3
  60. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  61. package/dist/src/living-docs/fs-id-allocator.js +142 -16
  62. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  63. package/dist/src/locales/de/cli.json +14 -0
  64. package/dist/src/locales/es/cli.json +14 -0
  65. package/dist/src/locales/fr/cli.json +14 -0
  66. package/dist/src/locales/ja/cli.json +14 -0
  67. package/dist/src/locales/ko/cli.json +14 -0
  68. package/dist/src/locales/pt/cli.json +14 -0
  69. package/dist/src/locales/ru/cli.json +14 -0
  70. package/dist/src/locales/zh/cli.json +14 -0
  71. package/dist/src/utils/chalk-fallback.d.ts +38 -0
  72. package/dist/src/utils/chalk-fallback.d.ts.map +1 -0
  73. package/dist/src/utils/chalk-fallback.js +118 -0
  74. package/dist/src/utils/chalk-fallback.js.map +1 -0
  75. package/dist/src/utils/project-id-generator.d.ts +127 -0
  76. package/dist/src/utils/project-id-generator.d.ts.map +1 -0
  77. package/dist/src/utils/project-id-generator.js +228 -0
  78. package/dist/src/utils/project-id-generator.js.map +1 -0
  79. package/package.json +1 -1
  80. package/plugins/specweave/agents/AGENTS-INDEX.md +9 -7
  81. package/plugins/specweave/agents/pm/AGENT.md +202 -0
  82. package/plugins/specweave/commands/specweave-import-external.md +5 -3
  83. package/plugins/specweave/commands/specweave-qa.md +9 -9
  84. package/plugins/specweave/commands/specweave-save.md +531 -193
  85. package/plugins/specweave/commands/specweave-sync-docs.md +6 -2
  86. package/plugins/specweave/commands/specweave-validate.md +8 -7
  87. package/plugins/specweave/hooks/pre-task-completion.sh +35 -17
  88. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.d.ts +16 -0
  89. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js +121 -0
  90. package/plugins/specweave/lib/vendor/core/ac-test-validator-cli.js.map +1 -0
  91. package/plugins/specweave/lib/vendor/core/ac-test-validator.d.ts +111 -0
  92. package/plugins/specweave/lib/vendor/core/ac-test-validator.js +295 -0
  93. package/plugins/specweave/lib/vendor/core/ac-test-validator.js.map +1 -0
  94. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +75 -0
  95. package/plugins/specweave/lib/vendor/utils/chalk-fallback.d.ts +38 -0
  96. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js +118 -0
  97. package/plugins/specweave/lib/vendor/utils/chalk-fallback.js.map +1 -0
  98. package/plugins/specweave/lib/vendor/utils/fs-native.d.ts +179 -0
  99. package/plugins/specweave/lib/vendor/utils/fs-native.js +319 -0
  100. package/plugins/specweave/lib/vendor/utils/fs-native.js.map +1 -0
  101. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  102. package/plugins/specweave/skills/docs-updater/SKILL.md +61 -0
  103. package/plugins/specweave/skills/increment-planner/SKILL.md +10 -335
  104. package/plugins/specweave/skills/increment-planner/templates/metadata.json +13 -0
  105. package/plugins/specweave/skills/increment-planner/templates/plan.md +50 -0
  106. package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +86 -0
  107. package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +50 -0
  108. package/plugins/specweave/skills/increment-planner/templates/tasks-multi-project.md +86 -0
  109. package/plugins/specweave/skills/increment-planner/templates/tasks-single-project.md +48 -0
  110. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +18 -0
  111. package/plugins/specweave-ado/commands/specweave-ado-import-areas.md +358 -0
  112. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +1 -0
  113. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +1 -0
  114. package/plugins/specweave-core/skills/code-quality/SKILL.md +1 -0
  115. package/plugins/specweave-core/skills/design-patterns/SKILL.md +1 -0
  116. package/plugins/specweave-core/skills/software-architecture/SKILL.md +1 -0
  117. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +14 -10
  118. package/plugins/specweave-github/commands/specweave-github-sync.md +57 -0
  119. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +86 -0
  120. package/plugins/specweave-github/lib/github-feature-sync.ts +6 -11
  121. package/plugins/specweave-github/lib/github-increment-sync-cli.js +343 -0
  122. package/plugins/specweave-github/lib/github-increment-sync-cli.ts +484 -0
  123. package/plugins/specweave-github/lib/increment-issue-builder.js +368 -0
  124. package/plugins/specweave-github/lib/increment-issue-builder.ts +471 -0
  125. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +19 -24
  126. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +15 -23
  127. package/plugins/specweave-jira/commands/specweave-jira-import-boards.md +331 -0
  128. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +16 -20
  129. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +18 -19
  130. package/plugins/specweave-ml/skills/{ml-pipeline-workflow → mlops-dag-builder}/SKILL.md +18 -14
  131. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +129 -0
  132. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +1 -1
  133. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +10 -122
  134. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +0 -70
  135. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +0 -1
  136. package/dist/plugins/specweave-github/lib/epic-content-builder.js +0 -258
  137. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +0 -1
  138. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +0 -83
  139. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +0 -1
  140. package/dist/plugins/specweave-github/lib/github-epic-sync.js +0 -466
  141. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +0 -1
  142. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +0 -705
  143. package/plugins/specweave-github/lib/epic-content-builder.js +0 -265
  144. package/plugins/specweave-github/lib/epic-content-builder.ts +0 -376
  145. package/plugins/specweave-github/lib/github-epic-sync.js +0 -488
  146. package/plugins/specweave-github/lib/github-epic-sync.ts +0 -715
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Native Node.js fs API Helpers
3
+ *
4
+ * Drop-in replacements for fs-extra methods using only Node.js stdlib.
5
+ * All methods use native Node.js 20+ APIs with no external dependencies.
6
+ *
7
+ * Migration from fs-extra: // legacy fs-extra (documentation only)
8
+ * - import fs from 'fs-extra' → import * as fs from './utils/fs-native.js' // legacy fs-extra
9
+ * - All fs-extra methods work as drop-in replacements
10
+ *
11
+ * Benefits:
12
+ * - Zero bundle overhead (no npm packages)
13
+ * - Works in marketplace (no node_modules needed)
14
+ * - Faster startup (native APIs)
15
+ * - Better debugging (native stack traces)
16
+ */
17
+ import { promises as fsPromises, existsSync, mkdirSync, readFileSync, writeFileSync, statSync, readdirSync, rmSync, unlinkSync, copyFileSync, renameSync as fsRenameSync } from 'fs';
18
+ /**
19
+ * Ensures that a directory exists. If the directory does not exist, it is created.
20
+ * @param dirPath - The directory path to ensure
21
+ */
22
+ export declare function ensureDir(dirPath: string): Promise<void>;
23
+ /**
24
+ * Synchronous version of ensureDir
25
+ */
26
+ export declare function ensureDirSync(dirPath: string): void;
27
+ /**
28
+ * Alias for ensureDirSync (fs-extra compatibility)
29
+ */
30
+ export declare function mkdirpSync(dirPath: string): void;
31
+ /**
32
+ * Check if a path exists
33
+ * @param filePath - The path to check
34
+ */
35
+ export declare function pathExists(filePath: string): Promise<boolean>;
36
+ /**
37
+ * Synchronous version of pathExists
38
+ */
39
+ export { existsSync };
40
+ /**
41
+ * Read a JSON file and parse it
42
+ * @param filePath - The JSON file path
43
+ */
44
+ export declare function readJson(filePath: string): Promise<any>;
45
+ /**
46
+ * Synchronous version of readJson
47
+ */
48
+ export declare function readJsonSync(filePath: string): any;
49
+ /**
50
+ * Write a JSON file with formatting
51
+ * @param filePath - The JSON file path
52
+ * @param data - The data to write
53
+ * @param options - Options (spaces for indentation)
54
+ */
55
+ export declare function writeJson(filePath: string, data: any, options?: {
56
+ spaces?: number;
57
+ }): Promise<void>;
58
+ /**
59
+ * Synchronous version of writeJson
60
+ */
61
+ export declare function writeJsonSync(filePath: string, data: any, options?: {
62
+ spaces?: number;
63
+ }): void;
64
+ /**
65
+ * fs-extra compatibility: readJSON (uppercase J)
66
+ * Alias for readJson
67
+ */
68
+ export declare const readJSON: typeof readJson;
69
+ /**
70
+ * fs-extra compatibility: readJSONSync (uppercase J)
71
+ * Alias for readJsonSync
72
+ */
73
+ export declare const readJSONSync: typeof readJsonSync;
74
+ /**
75
+ * fs-extra compatibility: writeJSON (uppercase J)
76
+ * Alias for writeJson
77
+ */
78
+ export declare const writeJSON: typeof writeJson;
79
+ /**
80
+ * fs-extra compatibility: writeJSONSync (uppercase J)
81
+ * Alias for writeJsonSync
82
+ */
83
+ export declare const writeJSONSync: typeof writeJsonSync;
84
+ /**
85
+ * Remove a file or directory (recursively)
86
+ * @param targetPath - The path to remove
87
+ */
88
+ export declare function remove(targetPath: string): Promise<void>;
89
+ /**
90
+ * Synchronous version of remove
91
+ */
92
+ export declare function removeSync(targetPath: string): void;
93
+ /**
94
+ * Copy a file or directory
95
+ * @param src - Source path
96
+ * @param dest - Destination path
97
+ * @param options - Copy options
98
+ */
99
+ export declare function copy(src: string, dest: string, options?: {
100
+ overwrite?: boolean;
101
+ filter?: (src: string) => boolean;
102
+ }): Promise<void>;
103
+ /**
104
+ * Synchronous version of copy
105
+ */
106
+ export declare function copySync(src: string, dest: string, options?: {
107
+ overwrite?: boolean;
108
+ filter?: (src: string) => boolean;
109
+ }): void;
110
+ /**
111
+ * Ensure a file exists (create if it doesn't)
112
+ * @param filePath - The file path
113
+ */
114
+ export declare function ensureFile(filePath: string): Promise<void>;
115
+ /**
116
+ * Synchronous version of ensureFile
117
+ */
118
+ export declare function ensureFileSync(filePath: string): void;
119
+ /**
120
+ * Move a file or directory
121
+ * @param src - Source path
122
+ * @param dest - Destination path
123
+ * @param options - Move options
124
+ */
125
+ export declare function move(src: string, dest: string, options?: {
126
+ overwrite?: boolean;
127
+ }): Promise<void>;
128
+ /**
129
+ * Synchronous version of move
130
+ */
131
+ export declare function moveSync(src: string, dest: string, options?: {
132
+ overwrite?: boolean;
133
+ }): void;
134
+ export declare const readFile: typeof fsPromises.readFile, writeFile: typeof fsPromises.writeFile, appendFile: typeof fsPromises.appendFile, stat: typeof fsPromises.stat, readdir: typeof fsPromises.readdir, access: typeof fsPromises.access, unlink: typeof fsPromises.unlink, rmdir: typeof fsPromises.rmdir, rename: typeof fsPromises.rename, chmod: typeof fsPromises.chmod, copyFile: typeof fsPromises.copyFile;
135
+ export declare const renameSync: typeof fsRenameSync;
136
+ export { readFileSync, writeFileSync, statSync, readdirSync, unlinkSync, mkdirSync, rmSync, copyFileSync, };
137
+ declare const _default: {
138
+ ensureDir: typeof ensureDir;
139
+ pathExists: typeof pathExists;
140
+ readJson: typeof readJson;
141
+ writeJson: typeof writeJson;
142
+ readJSON: typeof readJson;
143
+ writeJSON: typeof writeJson;
144
+ remove: typeof remove;
145
+ copy: typeof copy;
146
+ move: typeof move;
147
+ ensureFile: typeof ensureFile;
148
+ readFile: typeof fsPromises.readFile;
149
+ writeFile: typeof fsPromises.writeFile;
150
+ appendFile: typeof fsPromises.appendFile;
151
+ stat: typeof fsPromises.stat;
152
+ readdir: typeof fsPromises.readdir;
153
+ access: typeof fsPromises.access;
154
+ unlink: typeof fsPromises.unlink;
155
+ rename: typeof fsPromises.rename;
156
+ copyFile: typeof fsPromises.copyFile;
157
+ ensureDirSync: typeof ensureDirSync;
158
+ mkdirpSync: typeof mkdirpSync;
159
+ existsSync: typeof existsSync;
160
+ readJsonSync: typeof readJsonSync;
161
+ writeJsonSync: typeof writeJsonSync;
162
+ readJSONSync: typeof readJsonSync;
163
+ writeJSONSync: typeof writeJsonSync;
164
+ removeSync: typeof removeSync;
165
+ copySync: typeof copySync;
166
+ moveSync: typeof moveSync;
167
+ ensureFileSync: typeof ensureFileSync;
168
+ readFileSync: typeof readFileSync;
169
+ writeFileSync: typeof writeFileSync;
170
+ statSync: import("fs").StatSyncFn;
171
+ readdirSync: typeof readdirSync;
172
+ unlinkSync: typeof unlinkSync;
173
+ mkdirSync: typeof mkdirSync;
174
+ rmSync: typeof rmSync;
175
+ copyFileSync: typeof copyFileSync;
176
+ renameSync: typeof fsRenameSync;
177
+ };
178
+ export default _default;
179
+ //# sourceMappingURL=fs-native.d.ts.map
@@ -0,0 +1,319 @@
1
+ /**
2
+ * Native Node.js fs API Helpers
3
+ *
4
+ * Drop-in replacements for fs-extra methods using only Node.js stdlib.
5
+ * All methods use native Node.js 20+ APIs with no external dependencies.
6
+ *
7
+ * Migration from fs-extra: // legacy fs-extra (documentation only)
8
+ * - import fs from 'fs-extra' → import * as fs from './utils/fs-native.js' // legacy fs-extra
9
+ * - All fs-extra methods work as drop-in replacements
10
+ *
11
+ * Benefits:
12
+ * - Zero bundle overhead (no npm packages)
13
+ * - Works in marketplace (no node_modules needed)
14
+ * - Faster startup (native APIs)
15
+ * - Better debugging (native stack traces)
16
+ */
17
+ import { promises as fsPromises, existsSync, mkdirSync, readFileSync, writeFileSync, statSync, readdirSync, rmSync, unlinkSync, copyFileSync, renameSync as fsRenameSync } from 'fs';
18
+ import path from 'path';
19
+ /**
20
+ * Ensures that a directory exists. If the directory does not exist, it is created.
21
+ * @param dirPath - The directory path to ensure
22
+ */
23
+ export async function ensureDir(dirPath) {
24
+ if (!existsSync(dirPath)) {
25
+ await fsPromises.mkdir(dirPath, { recursive: true });
26
+ }
27
+ }
28
+ /**
29
+ * Synchronous version of ensureDir
30
+ */
31
+ export function ensureDirSync(dirPath) {
32
+ if (!existsSync(dirPath)) {
33
+ mkdirSync(dirPath, { recursive: true });
34
+ }
35
+ }
36
+ /**
37
+ * Alias for ensureDirSync (fs-extra compatibility)
38
+ */
39
+ export function mkdirpSync(dirPath) {
40
+ ensureDirSync(dirPath);
41
+ }
42
+ /**
43
+ * Check if a path exists
44
+ * @param filePath - The path to check
45
+ */
46
+ export async function pathExists(filePath) {
47
+ return existsSync(filePath);
48
+ }
49
+ /**
50
+ * Synchronous version of pathExists
51
+ */
52
+ export { existsSync };
53
+ /**
54
+ * Read a JSON file and parse it
55
+ * @param filePath - The JSON file path
56
+ */
57
+ export async function readJson(filePath) {
58
+ const content = await fsPromises.readFile(filePath, 'utf-8');
59
+ return JSON.parse(content);
60
+ }
61
+ /**
62
+ * Synchronous version of readJson
63
+ */
64
+ export function readJsonSync(filePath) {
65
+ const content = readFileSync(filePath, 'utf-8');
66
+ return JSON.parse(content);
67
+ }
68
+ /**
69
+ * Write a JSON file with formatting
70
+ * @param filePath - The JSON file path
71
+ * @param data - The data to write
72
+ * @param options - Options (spaces for indentation)
73
+ */
74
+ export async function writeJson(filePath, data, options) {
75
+ const spaces = options?.spaces ?? 2;
76
+ const content = JSON.stringify(data, null, spaces);
77
+ await fsPromises.writeFile(filePath, content, 'utf-8');
78
+ }
79
+ /**
80
+ * Synchronous version of writeJson
81
+ */
82
+ export function writeJsonSync(filePath, data, options) {
83
+ const spaces = options?.spaces ?? 2;
84
+ const content = JSON.stringify(data, null, spaces);
85
+ writeFileSync(filePath, content, 'utf-8');
86
+ }
87
+ /**
88
+ * fs-extra compatibility: readJSON (uppercase J)
89
+ * Alias for readJson
90
+ */
91
+ export const readJSON = readJson;
92
+ /**
93
+ * fs-extra compatibility: readJSONSync (uppercase J)
94
+ * Alias for readJsonSync
95
+ */
96
+ export const readJSONSync = readJsonSync;
97
+ /**
98
+ * fs-extra compatibility: writeJSON (uppercase J)
99
+ * Alias for writeJson
100
+ */
101
+ export const writeJSON = writeJson;
102
+ /**
103
+ * fs-extra compatibility: writeJSONSync (uppercase J)
104
+ * Alias for writeJsonSync
105
+ */
106
+ export const writeJSONSync = writeJsonSync;
107
+ /**
108
+ * Remove a file or directory (recursively)
109
+ * @param targetPath - The path to remove
110
+ */
111
+ export async function remove(targetPath) {
112
+ if (existsSync(targetPath)) {
113
+ await fsPromises.rm(targetPath, { recursive: true, force: true });
114
+ }
115
+ }
116
+ /**
117
+ * Synchronous version of remove
118
+ */
119
+ export function removeSync(targetPath) {
120
+ if (existsSync(targetPath)) {
121
+ rmSync(targetPath, { recursive: true, force: true });
122
+ }
123
+ }
124
+ /**
125
+ * Copy a file or directory
126
+ * @param src - Source path
127
+ * @param dest - Destination path
128
+ * @param options - Copy options
129
+ */
130
+ export async function copy(src, dest, options) {
131
+ const srcStat = await fsPromises.stat(src);
132
+ if (srcStat.isFile()) {
133
+ // Copy single file
134
+ await fsPromises.mkdir(path.dirname(dest), { recursive: true });
135
+ await fsPromises.copyFile(src, dest);
136
+ }
137
+ else if (srcStat.isDirectory()) {
138
+ // Copy directory recursively
139
+ await fsPromises.mkdir(dest, { recursive: true });
140
+ const entries = await fsPromises.readdir(src, { withFileTypes: true });
141
+ for (const entry of entries) {
142
+ const srcPath = path.join(src, entry.name);
143
+ const destPath = path.join(dest, entry.name);
144
+ // Apply filter if provided
145
+ if (options?.filter && !options.filter(srcPath)) {
146
+ continue;
147
+ }
148
+ if (entry.isDirectory()) {
149
+ await copy(srcPath, destPath, options);
150
+ }
151
+ else {
152
+ await fsPromises.copyFile(srcPath, destPath);
153
+ }
154
+ }
155
+ }
156
+ }
157
+ /**
158
+ * Synchronous version of copy
159
+ */
160
+ export function copySync(src, dest, options) {
161
+ const srcStat = statSync(src);
162
+ if (srcStat.isFile()) {
163
+ // Copy single file
164
+ mkdirSync(path.dirname(dest), { recursive: true });
165
+ copyFileSync(src, dest);
166
+ }
167
+ else if (srcStat.isDirectory()) {
168
+ // Copy directory recursively
169
+ mkdirSync(dest, { recursive: true });
170
+ const entries = readdirSync(src, { withFileTypes: true });
171
+ for (const entry of entries) {
172
+ const srcPath = path.join(src, entry.name);
173
+ const destPath = path.join(dest, entry.name);
174
+ // Apply filter if provided
175
+ if (options?.filter && !options.filter(srcPath)) {
176
+ continue;
177
+ }
178
+ if (entry.isDirectory()) {
179
+ copySync(srcPath, destPath, options);
180
+ }
181
+ else {
182
+ copyFileSync(srcPath, destPath);
183
+ }
184
+ }
185
+ }
186
+ }
187
+ /**
188
+ * Ensure a file exists (create if it doesn't)
189
+ * @param filePath - The file path
190
+ */
191
+ export async function ensureFile(filePath) {
192
+ if (!existsSync(filePath)) {
193
+ await fsPromises.mkdir(path.dirname(filePath), { recursive: true });
194
+ await fsPromises.writeFile(filePath, '', 'utf-8');
195
+ }
196
+ }
197
+ /**
198
+ * Synchronous version of ensureFile
199
+ */
200
+ export function ensureFileSync(filePath) {
201
+ if (!existsSync(filePath)) {
202
+ mkdirSync(path.dirname(filePath), { recursive: true });
203
+ writeFileSync(filePath, '', 'utf-8');
204
+ }
205
+ }
206
+ /**
207
+ * Move a file or directory
208
+ * @param src - Source path
209
+ * @param dest - Destination path
210
+ * @param options - Move options
211
+ */
212
+ export async function move(src, dest, options) {
213
+ // Ensure destination directory exists
214
+ await fsPromises.mkdir(path.dirname(dest), { recursive: true });
215
+ // Check if destination exists
216
+ if (existsSync(dest)) {
217
+ if (options?.overwrite) {
218
+ await remove(dest);
219
+ }
220
+ else {
221
+ throw new Error(`Destination already exists: ${dest}`);
222
+ }
223
+ }
224
+ // Try rename first (faster if same filesystem)
225
+ try {
226
+ await fsPromises.rename(src, dest);
227
+ }
228
+ catch (err) {
229
+ // If rename fails (different filesystems), copy then delete
230
+ if (err.code === 'EXDEV') {
231
+ await copy(src, dest);
232
+ await remove(src);
233
+ }
234
+ else {
235
+ throw err;
236
+ }
237
+ }
238
+ }
239
+ /**
240
+ * Synchronous version of move
241
+ */
242
+ export function moveSync(src, dest, options) {
243
+ // Ensure destination directory exists
244
+ mkdirSync(path.dirname(dest), { recursive: true });
245
+ // Check if destination exists
246
+ if (existsSync(dest)) {
247
+ if (options?.overwrite) {
248
+ removeSync(dest);
249
+ }
250
+ else {
251
+ throw new Error(`Destination already exists: ${dest}`);
252
+ }
253
+ }
254
+ // Try rename first (faster if same filesystem)
255
+ try {
256
+ fsRenameSync(src, dest);
257
+ }
258
+ catch (err) {
259
+ // If rename fails (different filesystems), copy then delete
260
+ if (err.code === 'EXDEV') {
261
+ copySync(src, dest);
262
+ removeSync(src);
263
+ }
264
+ else {
265
+ throw err;
266
+ }
267
+ }
268
+ }
269
+ // Re-export common fs/promises methods for convenience
270
+ export const { readFile, writeFile, appendFile, stat, readdir, access, unlink, rmdir, rename, chmod, copyFile, } = fsPromises;
271
+ // Create renameSync alias for fs-extra compatibility
272
+ export const renameSync = fsRenameSync;
273
+ // Re-export common synchronous methods
274
+ export { readFileSync, writeFileSync, statSync, readdirSync, unlinkSync, mkdirSync, rmSync, copyFileSync, };
275
+ // Default export for convenience
276
+ export default {
277
+ // Async methods
278
+ ensureDir,
279
+ pathExists,
280
+ readJson,
281
+ writeJson,
282
+ readJSON, // fs-extra compat
283
+ writeJSON, // fs-extra compat
284
+ remove,
285
+ copy,
286
+ move,
287
+ ensureFile,
288
+ readFile,
289
+ writeFile,
290
+ appendFile,
291
+ stat,
292
+ readdir,
293
+ access,
294
+ unlink,
295
+ rename,
296
+ copyFile,
297
+ // Sync methods
298
+ ensureDirSync,
299
+ mkdirpSync,
300
+ existsSync,
301
+ readJsonSync,
302
+ writeJsonSync,
303
+ readJSONSync, // fs-extra compat
304
+ writeJSONSync, // fs-extra compat
305
+ removeSync,
306
+ copySync,
307
+ moveSync,
308
+ ensureFileSync,
309
+ readFileSync,
310
+ writeFileSync,
311
+ statSync,
312
+ readdirSync,
313
+ unlinkSync,
314
+ mkdirSync,
315
+ rmSync,
316
+ copyFileSync,
317
+ renameSync,
318
+ };
319
+ //# sourceMappingURL=fs-native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-native.js","sourceRoot":"","sources":["../../../src/utils/fs-native.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,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ACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,GACT,GAAG,UAAU,CAAC;AAEf,qDAAqD;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,uCAAuC;AACvC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,WAAW,EACX,UAAU,EACV,SAAS,EACT,MAAM,EACN,YAAY,GACb,CAAC;AAEF,iCAAiC;AACjC,eAAe;IACb,gBAAgB;IAChB,SAAS;IACT,UAAU;IACV,QAAQ;IACR,SAAS;IACT,QAAQ,EAAG,kBAAkB;IAC7B,SAAS,EAAG,kBAAkB;IAC9B,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,QAAQ;IACR,SAAS;IACT,UAAU;IACV,IAAI;IACJ,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IAER,eAAe;IACf,aAAa;IACb,UAAU;IACV,UAAU;IACV,YAAY;IACZ,aAAa;IACb,YAAY,EAAG,kBAAkB;IACjC,aAAa,EAAG,kBAAkB;IAClC,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,UAAU;CACX,CAAC"}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: code-reviewer
3
- description: Elite code review expert specializing in modern AI-powered code analysis, security vulnerabilities, performance optimization, and production reliability. Masters static analysis tools, security scanning, and configuration review with 2024/2025 best practices. Use PROACTIVELY for code quality assurance.
3
+ description: Code review expert for security vulnerabilities, performance, and best practices. Activates for review code, code review, security review, PR review, pull request review, check my code, code quality, vulnerability scan, OWASP, code analysis, static analysis.
4
4
  model: claude-sonnet-4-5-20250929
5
5
  ---
6
6
 
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: docs-updater
3
+ description: Updates living documentation during implementation. Syncs task completion to docs, changes [DRAFT] to [COMPLETE], maintains bidirectional links. Activates for update docs, sync documentation, mark complete, documentation updates, living docs sync.
4
+ ---
5
+
6
+ # Documentation Updater
7
+
8
+ Updates product documentation (.specweave/docs/) based on implementation progress.
9
+
10
+ ## When to Use
11
+
12
+ - Task specifies documentation updates in tasks.md
13
+ - Feature implementation is complete
14
+ - User says "update documentation" or "sync docs"
15
+ - After closing increment to ensure docs reflect reality
16
+
17
+ ## What It Does
18
+
19
+ 1. **Reads task requirements** - Understands what was implemented from tasks.md
20
+ 2. **Updates living docs** - Modifies `.specweave/docs/` files with actual implementation
21
+ 3. **Status tracking** - Changes `[DRAFT]` � `[COMPLETE]` on doc sections
22
+ 4. **Bidirectional links** - Maintains links between docs and increments
23
+ 5. **Format adaptation** - Matches existing doc structure (features/ or modules/)
24
+
25
+ ## Workflow
26
+
27
+ ```
28
+ 1. Read tasks.md � Find documentation tasks
29
+ 2. Read implementation � Understand what changed
30
+ 3. Update docs � Add real code examples, endpoints, configs
31
+ 4. Mark complete � Change [DRAFT] to [COMPLETE]
32
+ 5. Verify links � Ensure increment � doc references work
33
+ ```
34
+
35
+ ## Example
36
+
37
+ **tasks.md says:**
38
+ ```markdown
39
+ **Documentation Updates**:
40
+ - [ ] .specweave/docs/features/payment.md [DRAFT]
41
+ - [ ] .specweave/docs/api/payments.md [DRAFT]
42
+ ```
43
+
44
+ **docs-updater does:**
45
+ 1. Reads payment implementation code
46
+ 2. Updates `payment.md` with actual code examples
47
+ 3. Updates API docs with real endpoints discovered in code
48
+ 4. Changes status to `[COMPLETE]`
49
+
50
+ ## Integration Points
51
+
52
+ - **Called by**: spec-generator, task completion hooks
53
+ - **Updates**: `.specweave/docs/**/*.md`
54
+ - **Reads**: `tasks.md`, implementation code
55
+
56
+ ## Best Practices
57
+
58
+ - Run after completing feature tasks, not during
59
+ - Verify doc links are valid (use relative paths)
60
+ - Keep examples in sync with actual code
61
+ - Don't over-document - focus on what users need