@jakkrichm/create-nexus-devflow 2.0.12 → 2.0.14

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 (171) hide show
  1. package/dist/bin/create-nexus-devflow.d.ts +2 -0
  2. package/dist/bin/create-nexus-devflow.js +233 -0
  3. package/dist/bin/create-nexus-devflow.js.map +1 -0
  4. package/dist/lib/starter-templates.d.ts +6 -0
  5. package/dist/lib/starter-templates.js +8 -0
  6. package/dist/lib/starter-templates.js.map +1 -0
  7. package/dist/lib/update.d.ts +68 -0
  8. package/dist/lib/update.js +325 -0
  9. package/dist/lib/update.js.map +1 -0
  10. package/dist/scripts/clean-template.d.ts +1 -0
  11. package/dist/scripts/clean-template.js +14 -0
  12. package/dist/scripts/clean-template.js.map +1 -0
  13. package/dist/scripts/prepare-template.d.ts +1 -0
  14. package/dist/scripts/prepare-template.js +89 -0
  15. package/dist/scripts/prepare-template.js.map +1 -0
  16. package/package.json +11 -9
  17. package/template/.agents/skills/00-discover/SKILL.md +2 -0
  18. package/template/.agents/skills/60-report/SKILL.md +21 -75
  19. package/template/.agents/skills/70-release/SKILL.md +7 -4
  20. package/template/.agents/skills/check/SKILL.md +68 -0
  21. package/template/.agents/skills/ci/SKILL.md +25 -78
  22. package/template/.agents/skills/commit/SKILL.md +39 -43
  23. package/template/.agents/skills/complete/SKILL.md +73 -0
  24. package/template/.agents/skills/debug/SKILL.md +43 -104
  25. package/template/.agents/skills/deploy/SKILL.md +37 -65
  26. package/template/.agents/skills/devflow/SKILL.md +89 -80
  27. package/template/.agents/skills/idea/SKILL.md +57 -0
  28. package/template/.agents/skills/implement/SKILL.md +64 -0
  29. package/template/.agents/skills/insight/SKILL.md +27 -116
  30. package/template/.agents/skills/overview/SKILL.md +114 -0
  31. package/template/.agents/skills/preview/SKILL.md +24 -103
  32. package/template/.agents/skills/report-html/SKILL.md +45 -0
  33. package/template/.agents/skills/review/SKILL.md +53 -37
  34. package/template/.agents/skills/rollback/SKILL.md +1 -0
  35. package/template/.agents/skills/security-review/SKILL.md +44 -147
  36. package/template/.agents/skills/simplify/SKILL.md +48 -57
  37. package/template/.agents/skills/spec/SKILL.md +105 -0
  38. package/template/.agents/skills/test/SKILL.md +63 -51
  39. package/template/.claude/skills/00-discover/SKILL.md +2 -0
  40. package/template/.claude/skills/60-report/SKILL.md +21 -75
  41. package/template/.claude/skills/70-release/SKILL.md +7 -4
  42. package/template/.claude/skills/check/SKILL.md +68 -0
  43. package/template/.claude/skills/ci/SKILL.md +25 -78
  44. package/template/.claude/skills/commit/SKILL.md +39 -43
  45. package/template/.claude/skills/complete/SKILL.md +73 -0
  46. package/template/.claude/skills/debug/SKILL.md +43 -104
  47. package/template/.claude/skills/deploy/SKILL.md +37 -65
  48. package/template/.claude/skills/devflow/SKILL.md +89 -80
  49. package/template/.claude/skills/idea/SKILL.md +57 -0
  50. package/template/.claude/skills/implement/SKILL.md +64 -0
  51. package/template/.claude/skills/insight/SKILL.md +27 -116
  52. package/template/.claude/skills/overview/SKILL.md +114 -0
  53. package/template/.claude/skills/preview/SKILL.md +24 -103
  54. package/template/.claude/skills/report-html/SKILL.md +45 -0
  55. package/template/.claude/skills/review/SKILL.md +53 -37
  56. package/template/.claude/skills/rollback/SKILL.md +1 -0
  57. package/template/.claude/skills/security-review/SKILL.md +44 -147
  58. package/template/.claude/skills/simplify/SKILL.md +48 -57
  59. package/template/.claude/skills/spec/SKILL.md +105 -0
  60. package/template/.claude/skills/test/SKILL.md +63 -51
  61. package/template/AGENTS.md +71 -74
  62. package/template/devflow/context/ai-interaction.md +1 -0
  63. package/template/devflow/context/coding-standards.md +31 -18
  64. package/template/devflow/context/current-stage.md +3 -3
  65. package/template/devflow/context/findings.md +10 -6
  66. package/template/devflow/context/project-overview.md +29 -11
  67. package/template/devflow/discoveries/.gitkeep +0 -0
  68. package/template/devflow/history/HISTORY.md +31 -0
  69. package/template/devflow/ideas.md +15 -0
  70. package/template/devflow/reference/running-id-contract.md +1 -1
  71. package/template/devflow/runs/.gitkeep +0 -0
  72. package/bin/create-nexus-devflow.js +0 -287
  73. package/lib/starter-templates.js +0 -111
  74. package/lib/update.js +0 -379
  75. package/template/.agents/skills/9arm-skills/README.md +0 -51
  76. package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  77. package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
  78. package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  79. package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  80. package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
  81. package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
  82. package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
  83. package/template/.agents/skills/code-simplification/SKILL.md +0 -331
  84. package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
  85. package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
  86. package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
  87. package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
  88. package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
  89. package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
  90. package/template/.agents/skills/idea-refine/SKILL.md +0 -178
  91. package/template/.agents/skills/idea-refine/examples.md +0 -238
  92. package/template/.agents/skills/idea-refine/frameworks.md +0 -99
  93. package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
  94. package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
  95. package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
  96. package/template/.agents/skills/insight-capture/SKILL.md +0 -84
  97. package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
  98. package/template/.agents/skills/md2html/SKILL.md +0 -154
  99. package/template/.agents/skills/md2html/components.md +0 -505
  100. package/template/.agents/skills/md2html/template.html +0 -1152
  101. package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
  102. package/template/.agents/skills/pr-review/SKILL.md +0 -143
  103. package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
  104. package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
  105. package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
  106. package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
  107. package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
  108. package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
  109. package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
  110. package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
  111. package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
  112. package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
  113. package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
  114. package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
  115. package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
  116. package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
  117. package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
  118. package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
  119. package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
  120. package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  121. package/template/.agents/skills/wiki/SKILL.md +0 -149
  122. package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
  123. package/template/.claude/skills/9arm-skills/README.md +0 -51
  124. package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  125. package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
  126. package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  127. package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  128. package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
  129. package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
  130. package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
  131. package/template/.claude/skills/code-simplification/SKILL.md +0 -331
  132. package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
  133. package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
  134. package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
  135. package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
  136. package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
  137. package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
  138. package/template/.claude/skills/idea-refine/SKILL.md +0 -178
  139. package/template/.claude/skills/idea-refine/examples.md +0 -238
  140. package/template/.claude/skills/idea-refine/frameworks.md +0 -99
  141. package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
  142. package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
  143. package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
  144. package/template/.claude/skills/insight-capture/SKILL.md +0 -84
  145. package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
  146. package/template/.claude/skills/md2html/SKILL.md +0 -154
  147. package/template/.claude/skills/md2html/components.md +0 -505
  148. package/template/.claude/skills/md2html/template.html +0 -1152
  149. package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
  150. package/template/.claude/skills/pr-review/SKILL.md +0 -143
  151. package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
  152. package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
  153. package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
  154. package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
  155. package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
  156. package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
  157. package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
  158. package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
  159. package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
  160. package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
  161. package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
  162. package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
  163. package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
  164. package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
  165. package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
  166. package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
  167. package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
  168. package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  169. package/template/.claude/skills/wiki/SKILL.md +0 -149
  170. package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
  171. package/template/.nexus/nexus-devflow.json +0 -44
package/lib/update.js DELETED
@@ -1,379 +0,0 @@
1
- const crypto = require("node:crypto");
2
- const fs = require("node:fs/promises");
3
- const path = require("node:path");
4
-
5
- const CONTROL_DIR = ".nexus";
6
- const MANIFEST_PATH = `${CONTROL_DIR}/nexus-devflow.json`;
7
- const MANIFEST_SCHEMA_VERSION = 1;
8
- const MANAGED_ROOTS = {
9
- common: ["AGENTS.md", "CLAUDE.md", "devflow", "LICENSE"],
10
- codex: [".agents/skills"],
11
- antigravity: [".agents/skills", ".agent/workflows"],
12
- claude: [".claude/skills"]
13
- };
14
-
15
- function adapterListFromMode(adapter) {
16
- if (adapter === "both" || adapter === "all") {
17
- return ["codex", "claude"];
18
- }
19
-
20
- if (adapter === "antigravity") {
21
- return ["codex"];
22
- }
23
-
24
- if (adapter === "codex" || adapter === "claude") {
25
- return [adapter];
26
- }
27
-
28
- throw new Error(`Unknown adapter mode: ${adapter}`);
29
- }
30
-
31
- function createManifest(version, adapters, templateFiles) {
32
- const managedFiles = {};
33
-
34
- for (const [relativePath, file] of [...templateFiles.entries()].sort(([a], [b]) =>
35
- a.localeCompare(b)
36
- )) {
37
- managedFiles[relativePath] = file.hash;
38
- }
39
-
40
- return {
41
- schemaVersion: MANIFEST_SCHEMA_VERSION,
42
- name: "nexus-devflow",
43
- package: "@jakkrichm/create-nexus-devflow",
44
- version,
45
- repository: "https://github.com/Jakkrich/nexus-devflow",
46
- artifactLanguage: "th",
47
- adapters: [...adapters].sort(),
48
- workspace: {
49
- contextDir: "devflow/context",
50
- historyDir: "devflow/history",
51
- referenceDir: "devflow/reference",
52
- runsDir: "devflow/runs",
53
- discoveriesDir: "devflow/discoveries"
54
- },
55
- lifecycle: {
56
- mainlineStages: [
57
- "00-discover",
58
- "10-define",
59
- "20-spec",
60
- "30-plan",
61
- "40-implement",
62
- "50-verify",
63
- "60-report",
64
- "70-release"
65
- ],
66
- companionCommands: [
67
- "goal",
68
- "brainstorm",
69
- "research",
70
- "debug",
71
- "prd",
72
- "issue-triage",
73
- "security-review",
74
- "wiki",
75
- "check-for-updates",
76
- "help"
77
- ]
78
- },
79
- managedFiles
80
- };
81
- }
82
-
83
- async function collectManagedTemplateFiles(templateRoot, adapters) {
84
- const files = new Map();
85
- const roots = [
86
- ...MANAGED_ROOTS.common,
87
- ...adapters.flatMap((adapter) => MANAGED_ROOTS[adapter] || [])
88
- ];
89
-
90
- for (const relativeRoot of roots) {
91
- const sourceRoot = path.join(templateRoot, ...relativeRoot.split("/"));
92
- await collectSourceFiles(sourceRoot, relativeRoot, files);
93
- }
94
-
95
- return files;
96
- }
97
-
98
- async function collectSourceFiles(sourcePath, relativePath, files) {
99
- try {
100
- const stats = await fs.lstat(sourcePath);
101
-
102
- if (stats.isSymbolicLink()) {
103
- throw new Error(`Managed template path cannot be a symbolic link: ${relativePath}`);
104
- }
105
-
106
- if (stats.isDirectory()) {
107
- const children = (await fs.readdir(sourcePath)).sort();
108
-
109
- for (const child of children) {
110
- await collectSourceFiles(
111
- path.join(sourcePath, child),
112
- `${relativePath}/${child}`,
113
- files
114
- );
115
- }
116
-
117
- return;
118
- }
119
-
120
- if (!stats.isFile()) {
121
- throw new Error(`Managed template path is not a regular file: ${relativePath}`);
122
- }
123
-
124
- files.set(relativePath, {
125
- source: sourcePath,
126
- hash: await hashFile(sourcePath)
127
- });
128
- } catch (err) {
129
- if (err.code === "ENOENT") {
130
- return;
131
- }
132
- throw err;
133
- }
134
- }
135
-
136
- async function readManifest(targetDir) {
137
- const manifestFile = targetPath(targetDir, MANIFEST_PATH);
138
- await assertNoSymlinkParents(targetDir, MANIFEST_PATH);
139
-
140
- try {
141
- const content = await fs.readFile(manifestFile, "utf8");
142
- const data = JSON.parse(content);
143
-
144
- if (!data || data.schemaVersion !== MANIFEST_SCHEMA_VERSION) {
145
- throw new Error("Unsupported manifest schema version.");
146
- }
147
-
148
- return data;
149
- } catch (error) {
150
- if (error.code === "ENOENT") {
151
- return null;
152
- }
153
- throw error;
154
- }
155
- }
156
-
157
- async function prepareUpdate({ targetDir, templateRoot, version, adapter }) {
158
- const requestedAdapters = new Set(adapterListFromMode(adapter));
159
- const previousManifest = await readManifest(targetDir);
160
-
161
- const activeAdapters = new Set([
162
- ...requestedAdapters,
163
- ...(previousManifest?.adapters || [])
164
- ]);
165
-
166
- const templateFiles = await collectManagedTemplateFiles(
167
- templateRoot,
168
- [...activeAdapters]
169
- );
170
- const nextManifest = createManifest(version, activeAdapters, templateFiles);
171
-
172
- const createList = [];
173
- const updateList = [];
174
- const conflictList = [];
175
-
176
- for (const [relativePath, templateFile] of templateFiles) {
177
- await assertNoSymlinkParents(targetDir, relativePath);
178
- const targetFile = targetPath(targetDir, relativePath);
179
-
180
- let targetStats = null;
181
- try {
182
- targetStats = await fs.lstat(targetFile);
183
- } catch (error) {
184
- if (error.code !== "ENOENT") {
185
- throw error;
186
- }
187
- }
188
-
189
- if (!targetStats) {
190
- createList.push(relativePath);
191
- continue;
192
- }
193
-
194
- if (targetStats.isSymbolicLink()) {
195
- conflictList.push({
196
- relativePath,
197
- reason: "symlink",
198
- detail: "Target path is a symbolic link."
199
- });
200
- continue;
201
- }
202
-
203
- if (!targetStats.isFile()) {
204
- conflictList.push({
205
- relativePath,
206
- reason: "not_file",
207
- detail: "Target path exists but is not a regular file."
208
- });
209
- continue;
210
- }
211
-
212
- const currentHash = await hashFile(targetFile);
213
- if (currentHash === templateFile.hash) {
214
- continue;
215
- }
216
-
217
- const recordedHash = previousManifest?.managedFiles?.[relativePath];
218
- if (recordedHash && recordedHash === currentHash) {
219
- updateList.push(relativePath);
220
- continue;
221
- }
222
-
223
- conflictList.push({
224
- relativePath,
225
- reason: "customized",
226
- detail: recordedHash
227
- ? "File was modified locally since last install."
228
- : "File exists in project and differs from template."
229
- });
230
- }
231
-
232
- const orphanedFiles = [];
233
- if (previousManifest) {
234
- for (const [relativePath, recordedHash] of Object.entries(
235
- previousManifest.managedFiles
236
- )) {
237
- if (templateFiles.has(relativePath)) {
238
- continue;
239
- }
240
-
241
- await assertNoSymlinkParents(targetDir, relativePath);
242
- const targetFile = targetPath(targetDir, relativePath);
243
-
244
- let targetStats = null;
245
- try {
246
- targetStats = await fs.lstat(targetFile);
247
- } catch (error) {
248
- if (error.code !== "ENOENT") {
249
- throw error;
250
- }
251
- }
252
-
253
- if (!targetStats || !targetStats.isFile()) {
254
- continue;
255
- }
256
-
257
- const currentHash = await hashFile(targetFile);
258
- if (currentHash === recordedHash) {
259
- orphanedFiles.push(relativePath);
260
- }
261
- }
262
- }
263
-
264
- return {
265
- targetDir,
266
- templateRoot,
267
- previousManifest,
268
- nextManifest,
269
- activeAdapters: [...activeAdapters].sort(),
270
- templateFiles,
271
- createList,
272
- updateList,
273
- conflictList,
274
- orphanedFiles
275
- };
276
- }
277
-
278
- async function applyPreparedUpdate(prepared, { replaceConflicts = false } = {}) {
279
- if (prepared.conflictList.length > 0 && !replaceConflicts) {
280
- throw new Error(
281
- `Cannot apply update with ${prepared.conflictList.length} conflict(s). Pass force/replace option or resolve conflicts.`
282
- );
283
- }
284
-
285
- const writeTargets = [
286
- ...prepared.createList,
287
- ...prepared.updateList,
288
- ...(replaceConflicts ? prepared.conflictList.map((item) => item.relativePath) : [])
289
- ];
290
-
291
- let appliedCount = 0;
292
- for (const relativePath of writeTargets) {
293
- const templateFile = prepared.templateFiles.get(relativePath);
294
- if (!templateFile) {
295
- continue;
296
- }
297
-
298
- await copyFileAtomic(prepared.targetDir, relativePath, templateFile.source);
299
- appliedCount++;
300
- }
301
-
302
- let removedCount = 0;
303
- for (const relativePath of prepared.orphanedFiles) {
304
- const fileToRemove = targetPath(prepared.targetDir, relativePath);
305
- try {
306
- await fs.unlink(fileToRemove);
307
- removedCount++;
308
- } catch (error) {
309
- if (error.code !== "ENOENT") {
310
- throw error;
311
- }
312
- }
313
- }
314
-
315
- await writeInstallManifest(prepared.targetDir, prepared.nextManifest);
316
-
317
- return {
318
- appliedCount,
319
- removedCount
320
- };
321
- }
322
-
323
- async function writeInstallManifest(targetDir, manifest) {
324
- const manifestFile = targetPath(targetDir, MANIFEST_PATH);
325
- await fs.mkdir(path.dirname(manifestFile), { recursive: true });
326
- await fs.writeFile(manifestFile, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
327
- }
328
-
329
- async function copyFileAtomic(targetDir, relativePath, sourcePath) {
330
- await assertNoSymlinkParents(targetDir, relativePath);
331
- const destinationPath = targetPath(targetDir, relativePath);
332
- await fs.mkdir(path.dirname(destinationPath), { recursive: true });
333
-
334
- const tempPath = `${destinationPath}.tmp-${process.pid}-${Date.now()}`;
335
- await fs.copyFile(sourcePath, tempPath);
336
- await fs.rename(tempPath, destinationPath);
337
- }
338
-
339
- function targetPath(targetDir, relativePath) {
340
- return path.resolve(targetDir, ...relativePath.split("/"));
341
- }
342
-
343
- async function assertNoSymlinkParents(targetDir, relativePath) {
344
- const parts = relativePath.split("/");
345
- let current = path.resolve(targetDir);
346
-
347
- for (let i = 0; i < parts.length - 1; i++) {
348
- current = path.join(current, parts[i]);
349
- try {
350
- const stats = await fs.lstat(current);
351
- if (stats.isSymbolicLink()) {
352
- throw new Error(
353
- `Target sub-path "${parts.slice(0, i + 1).join("/")}" is a symbolic link.`
354
- );
355
- }
356
- } catch (error) {
357
- if (error.code === "ENOENT") {
358
- break;
359
- }
360
- throw error;
361
- }
362
- }
363
- }
364
-
365
- async function hashFile(filePath) {
366
- const content = await fs.readFile(filePath);
367
- return crypto.createHash("sha256").update(content).digest("hex");
368
- }
369
-
370
- module.exports = {
371
- CONTROL_DIR,
372
- MANIFEST_PATH,
373
- adapterListFromMode,
374
- applyPreparedUpdate,
375
- createManifest,
376
- prepareUpdate,
377
- readManifest,
378
- writeInstallManifest
379
- };
@@ -1,51 +0,0 @@
1
- ---
2
- name: 9arm-skills
3
- description: Credited engineering discipline pack adapted from thananon/9arm-skills for Antigravity IDE and Nexus-DevFlow workflows.
4
- source_pack: 9arm-skills
5
- credit: thananon/9arm-skills
6
- upstream: https://github.com/thananon/9arm-skills
7
- adapted_for: Antigravity IDE / Nexus-DevFlow
8
- ---
9
-
10
- # 9arm-Skills Discipline Pack
11
-
12
- This pack adapts the engineering discipline ideas from `9arm-skills` into the Nexus-DevFlow `.agent` bundle.
13
-
14
- `9arm-skills` is used as a credited thinking layer, not as a replacement for Nexus-DevFlow. Users should keep invoking the normal workflows (`Debug`, `PR-Review`, `Insight`, `Agent`, `Help`). The workflow applies the relevant 9arm discipline internally and still writes the usual Nexus reports and artifacts.
15
-
16
- ## Credit
17
-
18
- - Source pack: `9arm-skills`
19
- - Credit: `thananon/9arm-skills`
20
- - Upstream: https://github.com/thananon/9arm-skills
21
- - Adapted for: Antigravity IDE / Nexus-DevFlow
22
-
23
- ## Workflow Mapping
24
-
25
- | Nexus-DevFlow Workflow | Applied 9arm Skill | Purpose |
26
- |---|---|---|
27
- | `Debug` | `debug-mantra` | Reproduce before fixing, trace the real fail path, falsify hypotheses, and preserve breadcrumbs. |
28
- | `Insight` | `post-mortem` | Turn validated bug fixes and incidents into durable team knowledge. |
29
- | `PR-Review` | `scrutinize` | Review intent, smaller alternatives, actual paths, and findings before approving changes. |
30
- | `Agent code-reviewer` | `scrutinize` | Apply outsider review discipline to specialist code reviews. |
31
- | `PR`, `/60-Report`, `/70-Release`, `Help` | `management-talk` | Translate engineering details into stakeholder-readable status, impact, owner, and next step. |
32
-
33
- ## Output Rule
34
-
35
- Keep Nexus-DevFlow output formats intact:
36
-
37
- - Debug output still goes to `devflow/debug/rca-{slug}.md`.
38
- - PR review output still uses the PR review report contract.
39
- - Specialist reports still go to `devflow/reports/`.
40
- - Lessons still go to `devflow/lessons.md` or task logs.
41
-
42
- When a report uses this pack, include a short source discipline note:
43
-
44
- ```md
45
- ## Source Discipline
46
- - Source pack: 9arm-skills
47
- - Applied skill: {skill-name}
48
- - Credit: thananon/9arm-skills
49
- - Adapted for: Antigravity IDE / Nexus-DevFlow
50
- ```
51
-
@@ -1,86 +0,0 @@
1
- ---
2
- name: 9arm-skills/debug-mantra
3
- description: Use during debugging and RCA. Requires reproduction, real fail-path tracing, hypothesis falsification, and breadcrumb cross-reference before proposing a fix.
4
- source_pack: 9arm-skills
5
- credit: thananon/9arm-skills
6
- upstream: https://github.com/thananon/9arm-skills
7
- adapted_for: Antigravity IDE / Nexus-DevFlow
8
- ---
9
-
10
- # Debug Mantra
11
-
12
- ## Purpose
13
-
14
- Stop the Antigravity IDE agent from guessing during debug work. The agent must prove the bug path before recommending or applying a fix.
15
-
16
- This skill is a credited adaptation of `9arm-skills/debug-mantra` for Nexus-DevFlow.
17
-
18
- ## Mantra
19
-
20
- ```text
21
- Reproduce -> Trace fail path -> Falsify hypothesis -> Cross-reference breadcrumbs
22
- ```
23
-
24
- ## Required Discipline
25
-
26
- ### 1. Reproduce First
27
-
28
- Do not propose a fix until there is a credible reproduction story.
29
-
30
- Capture:
31
-
32
- - exact symptom
33
- - expected behavior
34
- - observed behavior
35
- - reproduction steps
36
- - reproduction rate
37
- - environment or data conditions
38
-
39
- If the issue is intermittent, document the conditions and instrumentation needed to catch it instead of pretending it is solved.
40
-
41
- ### 2. Trace The Real Fail Path
42
-
43
- Follow the actual runtime path end-to-end:
44
-
45
- - user action or incoming request
46
- - entrypoint
47
- - service/module boundaries
48
- - data reads and writes
49
- - external calls
50
- - final failure point
51
-
52
- Evidence should cite file paths, line numbers when available, commands, logs, or observed runtime output.
53
-
54
- ### 3. Falsify Hypotheses
55
-
56
- List 2-4 plausible hypotheses and try to disprove them. A hypothesis that was ruled out is useful evidence and should be recorded.
57
-
58
- Use this table in RCA notes when helpful:
59
-
60
- | Hypothesis | Test / Evidence | Result | Ruled In/Out |
61
- |---|---|---|---|
62
- | {Hypothesis} | {Evidence} | {Result} | {Status} |
63
-
64
- ### 4. Cross-Reference Breadcrumbs
65
-
66
- Keep a breadcrumb ledger so the investigation can be audited later:
67
-
68
- | Breadcrumb | Source | What It Proves | Follow-up |
69
- |---|---|---|---|
70
- | {Observation} | {File / command / log} | {Claim supported} | {Next step} |
71
-
72
- ## Nexus-DevFlow Output
73
-
74
- When used by `Debug`, preserve the existing RCA output contract:
75
-
76
- - inspect `.agent/resources/schemas/rca.template.md`
77
- - write `devflow/debug/rca-{slug}.md`
78
- - include the normal RCA sections
79
- - add a short `Source Discipline` note crediting `9arm-skills/debug-mantra`
80
-
81
- Do not replace the RCA template with a custom 9arm-only format.
82
-
83
- ## Hard Stop
84
-
85
- If there is no reproduction, no trace, and no falsified hypothesis, the correct output is an investigation plan, not a fix.
86
-
@@ -1,79 +0,0 @@
1
- ---
2
- name: 9arm-skills/management-talk
3
- description: Use to translate engineering detail into stakeholder-readable updates, PR summaries, changelog notes, standups, Slack/JIRA comments, or leadership talking points.
4
- source_pack: 9arm-skills
5
- credit: thananon/9arm-skills
6
- upstream: https://github.com/thananon/9arm-skills
7
- adapted_for: Antigravity IDE / Nexus-DevFlow
8
- ---
9
-
10
- # Management Talk
11
-
12
- ## Purpose
13
-
14
- Translate engineering-to-engineering detail into decision-ready communication for PMs, leads, release managers, support, and executives.
15
-
16
- This skill is a credited adaptation of `9arm-skills/management-talk` for Nexus-DevFlow.
17
-
18
- ## What To Preserve
19
-
20
- Keep:
21
-
22
- - current status
23
- - user or business impact
24
- - risk
25
- - owner
26
- - next step
27
- - timeline or blocking condition
28
- - validation status
29
-
30
- Remove or compress unless needed:
31
-
32
- - internal function names
33
- - long file paths
34
- - commit SHAs
35
- - implementation details that do not affect decisions
36
- - speculative blame
37
-
38
- ## Output Shapes
39
-
40
- ### Status Update
41
-
42
- ```md
43
- ## Source Discipline
44
- - Source pack: 9arm-skills
45
- - Applied skill: management-talk
46
- - Credit: thananon/9arm-skills
47
- - Adapted for: Antigravity IDE / Nexus-DevFlow
48
-
49
- ## Current Status
50
- ## Impact
51
- ## Owner
52
- ## Next Step
53
- ## Risk / Blocker
54
- ```
55
-
56
- ### PR / Release Summary
57
-
58
- ```md
59
- ## What Changed
60
- ## Why It Matters
61
- ## Validation
62
- ## Risk
63
- ## Rollback / Follow-up
64
- ```
65
-
66
- ### Incident / Bug Summary
67
-
68
- ```md
69
- ## What Happened
70
- ## Who Was Affected
71
- ## Current State
72
- ## Fix / Mitigation
73
- ## Prevention
74
- ```
75
-
76
- ## Nexus-DevFlow Output
77
-
78
- Use this skill inside `PR`, `/60-Report`, `/70-Release`, and `Help` when the user needs a human-readable summary. Keep existing Nexus output formats and destinations intact.
79
-
@@ -1,71 +0,0 @@
1
- ---
2
- name: 9arm-skills/post-mortem
3
- description: Use after a bug, outage, or regression has been fixed and validated. Converts the fix into durable engineering knowledge.
4
- source_pack: 9arm-skills
5
- credit: thananon/9arm-skills
6
- upstream: https://github.com/thananon/9arm-skills
7
- adapted_for: Antigravity IDE / Nexus-DevFlow
8
- ---
9
-
10
- # Post-Mortem
11
-
12
- ## Purpose
13
-
14
- Convert a resolved issue into team memory. A fix is not complete until the team can explain what broke, why it broke, how it was fixed, how it was validated, and why it slipped through.
15
-
16
- This skill is a credited adaptation of `9arm-skills/post-mortem` for Nexus-DevFlow.
17
-
18
- ## When To Use
19
-
20
- Use after:
21
-
22
- - `Debug` found a root cause
23
- - `/40-Implement` applied a fix
24
- - `/50-Verify` or manual validation proved the fix
25
- - a production incident, regression, or high-risk bug deserves durable learning
26
-
27
- Do not write a confident post-mortem before the fix and validation evidence exist.
28
-
29
- ## Required Inputs
30
-
31
- - reliable reproduction or incident timeline
32
- - root cause
33
- - fix summary
34
- - validation evidence
35
- - affected user or system impact
36
- - prevention measure or follow-up
37
-
38
- If inputs are missing, list the gaps and request the missing evidence.
39
-
40
- ## Report Sections
41
-
42
- Use these sections inside `devflow/lessons.md`, task logs, or a task-linked report when appropriate:
43
-
44
- ```md
45
- ## Source Discipline
46
- - Source pack: 9arm-skills
47
- - Applied skill: post-mortem
48
- - Credit: thananon/9arm-skills
49
- - Adapted for: Antigravity IDE / Nexus-DevFlow
50
-
51
- ## What Broke
52
- ## Impact
53
- ## Reliable Repro / Timeline
54
- ## Root Cause
55
- ## Fix
56
- ## Validation Evidence
57
- ## Why It Slipped Through
58
- ## Prevention / Follow-up
59
- ```
60
-
61
- ## Nexus-DevFlow Output
62
-
63
- Prefer existing destinations:
64
-
65
- - task-specific insight: record the final lesson in the active markdown artifacts for that running ID, or in `devflow/lessons.md`
66
- - project-wide lesson: `devflow/lessons.md` using `.agent/resources/schemas/lessons.template.md`
67
- - release-facing summary: `/70-Release`
68
- - stakeholder summary: `management-talk`
69
-
70
- Keep the output concise and actionable. Avoid blame.
71
-