@mrpatronz/nexusflow 1.9.0 → 2.0.0

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 (182) hide show
  1. package/dist/agent/ProviderRegistry.d.ts +12 -1
  2. package/dist/agent/ProviderRegistry.d.ts.map +1 -1
  3. package/dist/agent/ProviderRegistry.js.map +1 -1
  4. package/dist/agent/ProviderRegistry.test.js +1 -0
  5. package/dist/agent/ProviderRegistry.test.js.map +1 -1
  6. package/dist/agent/adapters.d.ts +14 -0
  7. package/dist/agent/adapters.d.ts.map +1 -1
  8. package/dist/agent/adapters.js +39 -4
  9. package/dist/agent/adapters.js.map +1 -1
  10. package/dist/agent/adapters.test.d.ts +2 -0
  11. package/dist/agent/adapters.test.d.ts.map +1 -0
  12. package/dist/agent/adapters.test.js +49 -0
  13. package/dist/agent/adapters.test.js.map +1 -0
  14. package/dist/agent/cliAvailability.d.ts +48 -0
  15. package/dist/agent/cliAvailability.d.ts.map +1 -0
  16. package/dist/agent/cliAvailability.js +112 -0
  17. package/dist/agent/cliAvailability.js.map +1 -0
  18. package/dist/agent/cliAvailability.test.d.ts +2 -0
  19. package/dist/agent/cliAvailability.test.d.ts.map +1 -0
  20. package/dist/agent/cliAvailability.test.js +105 -0
  21. package/dist/agent/cliAvailability.test.js.map +1 -0
  22. package/dist/analyzers/detect-deps.d.ts.map +1 -1
  23. package/dist/analyzers/detect-deps.js +16 -19
  24. package/dist/analyzers/detect-deps.js.map +1 -1
  25. package/dist/analyzers/index.d.ts +0 -2
  26. package/dist/analyzers/index.d.ts.map +1 -1
  27. package/dist/analyzers/index.js +6 -9
  28. package/dist/analyzers/index.js.map +1 -1
  29. package/dist/commands/commands.test.js +4 -3
  30. package/dist/commands/commands.test.js.map +1 -1
  31. package/dist/commands/create.d.ts.map +1 -1
  32. package/dist/commands/create.js.map +1 -1
  33. package/dist/commands/knowledge.d.ts +10 -0
  34. package/dist/commands/knowledge.d.ts.map +1 -1
  35. package/dist/commands/knowledge.js +27 -1
  36. package/dist/commands/knowledge.js.map +1 -1
  37. package/dist/commands/knowledge.test.d.ts +2 -0
  38. package/dist/commands/knowledge.test.d.ts.map +1 -0
  39. package/dist/commands/knowledge.test.js +77 -0
  40. package/dist/commands/knowledge.test.js.map +1 -0
  41. package/dist/commands/refresh.d.ts +2 -4
  42. package/dist/commands/refresh.d.ts.map +1 -1
  43. package/dist/commands/refresh.js +4 -20
  44. package/dist/commands/refresh.js.map +1 -1
  45. package/dist/core/adapters/registry.d.ts.map +1 -1
  46. package/dist/core/adapters/registry.js +8 -3
  47. package/dist/core/adapters/registry.js.map +1 -1
  48. package/dist/core/adapters/storage.test.js +5 -24
  49. package/dist/core/adapters/storage.test.js.map +1 -1
  50. package/dist/core/analysis-cache.d.ts +15 -8
  51. package/dist/core/analysis-cache.d.ts.map +1 -1
  52. package/dist/core/analysis-cache.js +61 -10
  53. package/dist/core/analysis-cache.js.map +1 -1
  54. package/dist/core/analysis-cache.test.js +17 -4
  55. package/dist/core/analysis-cache.test.js.map +1 -1
  56. package/dist/core/config.d.ts.map +1 -1
  57. package/dist/core/config.js +5 -4
  58. package/dist/core/config.js.map +1 -1
  59. package/dist/core/doctor.d.ts.map +1 -1
  60. package/dist/core/doctor.js +9 -5
  61. package/dist/core/doctor.js.map +1 -1
  62. package/dist/core/knowledge.d.ts +14 -4
  63. package/dist/core/knowledge.d.ts.map +1 -1
  64. package/dist/core/knowledge.js +64 -14
  65. package/dist/core/knowledge.js.map +1 -1
  66. package/dist/core/knowledge.test.js +54 -2
  67. package/dist/core/knowledge.test.js.map +1 -1
  68. package/dist/core/locks.d.ts +43 -0
  69. package/dist/core/locks.d.ts.map +1 -0
  70. package/dist/core/locks.js +102 -0
  71. package/dist/core/locks.js.map +1 -0
  72. package/dist/core/locks.test.d.ts +2 -0
  73. package/dist/core/locks.test.d.ts.map +1 -0
  74. package/dist/core/locks.test.js +95 -0
  75. package/dist/core/locks.test.js.map +1 -0
  76. package/dist/core/ports/storage.d.ts +3 -3
  77. package/dist/core/ports/storage.d.ts.map +1 -1
  78. package/dist/core/refresh.d.ts +12 -13
  79. package/dist/core/refresh.d.ts.map +1 -1
  80. package/dist/core/refresh.js +14 -11
  81. package/dist/core/refresh.js.map +1 -1
  82. package/dist/core/refresh.test.js +17 -11
  83. package/dist/core/refresh.test.js.map +1 -1
  84. package/dist/core/scheduler.d.ts.map +1 -1
  85. package/dist/core/scheduler.js +2 -65
  86. package/dist/core/scheduler.js.map +1 -1
  87. package/dist/core/sync.js +3 -3
  88. package/dist/core/sync.js.map +1 -1
  89. package/dist/core/worktree.js +2 -2
  90. package/dist/core/worktree.js.map +1 -1
  91. package/dist/core/worktree.test.js +2 -2
  92. package/dist/core/worktree.test.js.map +1 -1
  93. package/dist/generators/base.d.ts +31 -2
  94. package/dist/generators/base.d.ts.map +1 -1
  95. package/dist/generators/base.js +174 -238
  96. package/dist/generators/base.js.map +1 -1
  97. package/dist/generators/base.test.js +231 -24
  98. package/dist/generators/base.test.js.map +1 -1
  99. package/dist/generators/claude.d.ts +19 -5
  100. package/dist/generators/claude.d.ts.map +1 -1
  101. package/dist/generators/claude.js +33 -11
  102. package/dist/generators/claude.js.map +1 -1
  103. package/dist/generators/index.d.ts +10 -9
  104. package/dist/generators/index.d.ts.map +1 -1
  105. package/dist/generators/index.js +103 -118
  106. package/dist/generators/index.js.map +1 -1
  107. package/dist/generators/plan-generator.d.ts.map +1 -1
  108. package/dist/generators/plan-generator.js +217 -193
  109. package/dist/generators/plan-generator.js.map +1 -1
  110. package/dist/generators/plan-generator.test.d.ts +2 -0
  111. package/dist/generators/plan-generator.test.d.ts.map +1 -0
  112. package/dist/generators/plan-generator.test.js +217 -0
  113. package/dist/generators/plan-generator.test.js.map +1 -0
  114. package/dist/gui/assets/{DashboardPage-C3NH97y2.js → DashboardPage-HNC3-OP0.js} +1 -1
  115. package/dist/gui/assets/{GettingStartedPage-og-Kv7Sm.js → GettingStartedPage-Dguoya_Z.js} +1 -1
  116. package/dist/gui/assets/{ProjectsPage-COqqadEr.js → ProjectsPage-DVR4j4sw.js} +1 -1
  117. package/dist/gui/assets/{ScaffoldRepoInline-DRipQsos.js → ScaffoldRepoInline-D-2ZeuDK.js} +1 -1
  118. package/dist/gui/assets/{SettingsPage-CpU3V9oU.js → SettingsPage-Bauo77q3.js} +1 -1
  119. package/dist/gui/assets/{StartWorkPage-DIND0hJy.js → StartWorkPage-DvuFEa5Y.js} +1 -1
  120. package/dist/gui/assets/{StrategiesPage-6LWOnKdk.js → StrategiesPage-Cizm0GWk.js} +1 -1
  121. package/dist/gui/assets/{WorkspacesPage-BUqgOhuy.js → WorkspacesPage-DYOVfZqy.js} +1 -1
  122. package/dist/gui/assets/{index-CyYbQwRf.js → index-BqeoAIB1.js} +6 -6
  123. package/dist/gui/index.html +1 -1
  124. package/dist/index.js +2 -4
  125. package/dist/index.js.map +1 -1
  126. package/dist/mcp/tools.d.ts.map +1 -1
  127. package/dist/mcp/tools.js +11 -15
  128. package/dist/mcp/tools.js.map +1 -1
  129. package/dist/resources/workflows/plan-implement-review.md +8 -0
  130. package/dist/resources/workflows/research-verify.md +6 -0
  131. package/dist/resources/workflows/solo-developer.md +3 -0
  132. package/dist/server.d.ts.map +1 -1
  133. package/dist/server.js +1 -2
  134. package/dist/server.js.map +1 -1
  135. package/dist/server.test.js +4 -2
  136. package/dist/server.test.js.map +1 -1
  137. package/dist/types.d.ts +0 -24
  138. package/dist/types.d.ts.map +1 -1
  139. package/dist/utils/prompts.js +2 -2
  140. package/dist/utils/prompts.js.map +1 -1
  141. package/dist/utils/resources.d.ts +28 -0
  142. package/dist/utils/resources.d.ts.map +1 -0
  143. package/dist/utils/resources.js +54 -0
  144. package/dist/utils/resources.js.map +1 -0
  145. package/dist/utils/workflow-advisor.d.ts.map +1 -1
  146. package/dist/utils/workflow-advisor.js +17 -27
  147. package/dist/utils/workflow-advisor.js.map +1 -1
  148. package/dist/utils/workflows.d.ts.map +1 -1
  149. package/dist/utils/workflows.js +6 -2
  150. package/dist/utils/workflows.js.map +1 -1
  151. package/package.json +5 -3
  152. package/resources/workflows/plan-implement-review.md +8 -0
  153. package/resources/workflows/research-verify.md +6 -0
  154. package/resources/workflows/solo-developer.md +3 -0
  155. package/dist/analyzers/detect-apis.d.ts +0 -19
  156. package/dist/analyzers/detect-apis.d.ts.map +0 -1
  157. package/dist/analyzers/detect-apis.js +0 -250
  158. package/dist/analyzers/detect-apis.js.map +0 -1
  159. package/dist/analyzers/messaging-analyzer.d.ts +0 -17
  160. package/dist/analyzers/messaging-analyzer.d.ts.map +0 -1
  161. package/dist/analyzers/messaging-analyzer.js +0 -229
  162. package/dist/analyzers/messaging-analyzer.js.map +0 -1
  163. package/dist/core/adapters/vault-storage.d.ts +0 -16
  164. package/dist/core/adapters/vault-storage.d.ts.map +0 -1
  165. package/dist/core/adapters/vault-storage.js +0 -77
  166. package/dist/core/adapters/vault-storage.js.map +0 -1
  167. package/dist/core/graph.d.ts +0 -35
  168. package/dist/core/graph.d.ts.map +0 -1
  169. package/dist/core/graph.js +0 -281
  170. package/dist/core/graph.js.map +0 -1
  171. package/dist/generators/diff-context.d.ts +0 -6
  172. package/dist/generators/diff-context.d.ts.map +0 -1
  173. package/dist/generators/diff-context.js +0 -70
  174. package/dist/generators/diff-context.js.map +0 -1
  175. package/dist/generators/map-generator.d.ts +0 -15
  176. package/dist/generators/map-generator.d.ts.map +0 -1
  177. package/dist/generators/map-generator.js +0 -514
  178. package/dist/generators/map-generator.js.map +0 -1
  179. package/dist/generators/map-generator.test.d.ts +0 -2
  180. package/dist/generators/map-generator.test.d.ts.map +0 -1
  181. package/dist/generators/map-generator.test.js +0 -147
  182. package/dist/generators/map-generator.test.js.map +0 -1
@@ -3,29 +3,26 @@ import * as fs from 'node:fs/promises';
3
3
  import * as os from 'node:os';
4
4
  import * as path from 'node:path';
5
5
  import { buildContextContent } from './base.js';
6
- /** Minimal ProjectAnalysis with the fields the section builder reads. */
6
+ /** Minimal ProjectAnalysis with the fields the context builder reads. */
7
7
  function analysisFor(name, repoPath, languages) {
8
8
  return {
9
9
  name,
10
10
  path: repoPath,
11
11
  techStack: { languages, frameworks: [], buildTools: [], projectType: 'backend' },
12
- endpoints: [],
13
12
  ports: [],
14
13
  existingAIConfigs: [],
15
14
  readmeSummary: '',
16
15
  };
17
16
  }
18
- describe('buildContextContent — Verification & Services section', () => {
17
+ describe('buildContextContent', () => {
19
18
  let dir;
20
19
  let nodeRepo;
21
20
  let pyRepo;
22
21
  beforeAll(async () => {
23
22
  dir = await fs.mkdtemp(path.join(os.tmpdir(), 'nexusflow-base-test-'));
24
- // A Node repo with a detectable dev script.
25
23
  nodeRepo = path.join(dir, 'my-web');
26
24
  await fs.mkdir(nodeRepo, { recursive: true });
27
25
  await fs.writeFile(path.join(nodeRepo, 'package.json'), JSON.stringify({ name: 'my-web', scripts: { dev: 'vite --port 5173' } }), 'utf-8');
28
- // A Python repo with no runnable service config.
29
26
  pyRepo = path.join(dir, 'my-tool');
30
27
  await fs.mkdir(pyRepo, { recursive: true });
31
28
  });
@@ -36,7 +33,7 @@ describe('buildContextContent — Verification & Services section', () => {
36
33
  const base = {
37
34
  id: 'feat',
38
35
  branchName: 'feat',
39
- description: 'test',
36
+ description: 'add a discount code to checkout',
40
37
  repos: [nodeRepo, pyRepo],
41
38
  assistants: ['claude'],
42
39
  workspacePath: path.join(dir, 'ws'),
@@ -55,26 +52,236 @@ describe('buildContextContent — Verification & Services section', () => {
55
52
  ]),
56
53
  };
57
54
  }
58
- it('derives per-repo test and run commands from analysis + service detection', async () => {
59
- const content = await buildContextContent(ctxFor({}));
60
- expect(content).toContain('## Verification & Services');
61
- // Conventional test commands per detected language.
62
- expect(content).toContain('| my-web | `npm test` | `npm run dev` |');
63
- // No runnable service detected em dash.
64
- expect(content).toContain('| my-tool | `pytest` | — |');
65
- // The old hand-entered section heading is gone.
66
- expect(content).not.toContain('Workspace Resumption');
55
+ /** `my-tool` publishes a package `my-web` consumes. */
56
+ function relatedCtx() {
57
+ const ctx = ctxFor({});
58
+ const tool = ctx.analysis.get(pyRepo);
59
+ const web = ctx.analysis.get(nodeRepo);
60
+ tool.produces = [{ name: 'shared-lib', type: 'npm' }];
61
+ web.dependencies = [
62
+ { name: 'shared-lib', type: 'npm' },
63
+ { name: 'react', type: 'npm' },
64
+ ];
65
+ return ctx;
66
+ }
67
+ describe('what it must say', () => {
68
+ it('leads with the task, because that is what the work is', async () => {
69
+ const content = await buildContextContent(ctxFor({}));
70
+ expect(content.startsWith('# feat')).toBe(true);
71
+ expect(content).toContain('add a discount code to checkout');
72
+ });
73
+ it('gives every repo a location and a verify command in one row', async () => {
74
+ const content = await buildContextContent(ctxFor({}));
75
+ expect(content).toContain('| `my-web` | `my-web` | `npm test` |');
76
+ expect(content).toContain('| `my-tool` | `my-tool` | `pytest` |');
77
+ });
78
+ it('states the cross-repo tie in both directions', async () => {
79
+ // The one thing a single-repo view cannot show, and the reason a
80
+ // multi-repo workspace is worth generating at all.
81
+ const content = await buildContextContent(relatedCtx());
82
+ expect(content).toContain('used by `my-web`');
83
+ expect(content).toContain('needs `my-tool`');
84
+ });
85
+ it('does not invent a dependency from a coincidental name fragment', async () => {
86
+ // `findInterRepoDependencies` had a substring fallback. Its only consumer
87
+ // was a graph nobody read; now it feeds the auto-loaded context file, where
88
+ // a repo called `my-tool` beside one declaring `@babel/my-tool-kit` would
89
+ // manufacture `needs`, `used by` and a start order out of nothing.
90
+ const ctx = ctxFor({});
91
+ ctx.analysis.get(pyRepo).produces = [
92
+ { name: 'my-tool', type: 'npm' },
93
+ ];
94
+ ctx.analysis.get(nodeRepo).dependencies = [
95
+ { name: '@babel/my-tool-kit', type: 'npm' },
96
+ { name: 'my-tooling', type: 'npm' },
97
+ ];
98
+ const content = await buildContextContent(ctx);
99
+ expect(content).not.toContain('needs `');
100
+ expect(content).not.toContain('used by `');
101
+ expect(content).not.toContain('Start with');
102
+ });
103
+ it('names where to start, and orders the rows to match', async () => {
104
+ const content = await buildContextContent(relatedCtx());
105
+ expect(content).toContain('Start with `my-tool`');
106
+ expect(content.indexOf('| `my-tool` |')).toBeLessThan(content.indexOf('| `my-web` |'));
107
+ });
108
+ it('does not name a starting repo that nothing builds on', async () => {
109
+ // The old test was "does any repo anywhere have a dependency", so a
110
+ // workspace whose first repo is independent still got "Start with `x` —
111
+ // the others build on it" directly under x's own all-dashes row.
112
+ const ctx = relatedCtx();
113
+ const alpha = path.join(dir, 'alpha');
114
+ ctx.repos = [{ name: 'alpha', path: alpha, defaultBranch: 'main' }, ...ctx.repos];
115
+ ctx.analysis.set(alpha, analysisFor('alpha', alpha, ['typescript']));
116
+ const content = await buildContextContent(ctx);
117
+ expect(content).not.toContain('Start with `alpha`');
118
+ expect(content).toContain('Start with `my-tool`');
119
+ });
120
+ it('surfaces hand-entered commands, which no manifest states', async () => {
121
+ // The only reader of feature.resumption was deleted as dead code, while
122
+ // the create API still accepted and persisted these.
123
+ const ctx = ctxFor({});
124
+ ctx.feature.resumption = {
125
+ testCommand: 'npm run verify:all',
126
+ mockCommand: 'docker compose up -d',
127
+ startCommand: 'npm run dev:all',
128
+ };
129
+ const content = await buildContextContent(ctx);
130
+ expect(content).toContain('npm run verify:all');
131
+ expect(content).toContain('docker compose up -d');
132
+ expect(content).toContain('npm run dev:all');
133
+ });
134
+ it('says nothing about custom commands when none were entered', async () => {
135
+ const content = await buildContextContent(ctxFor({}));
136
+ expect(content).not.toContain('Commands recorded for this workspace');
137
+ });
138
+ it('keeps the worktree rule, which is not inferable', async () => {
139
+ const content = await buildContextContent(ctxFor({}));
140
+ expect(content).toContain('Do not edit the original repositories elsewhere on disk');
141
+ expect(content).toContain('`feat`');
142
+ });
143
+ it('points at the other files rather than inlining them', async () => {
144
+ const content = await buildContextContent(ctxFor({}));
145
+ expect(content).toContain('nexusflow-knowledge.md');
146
+ expect(content).toContain('nexusflow-plan.md');
147
+ });
148
+ it('does not send the agent to read derived facts it could grep', async () => {
149
+ // The architecture map restated the repo's package.json, and the branch
150
+ // diff was `git diff --name-only` with absolute file:/// URLs. Both were
151
+ // pointed at ahead of any real work.
152
+ const content = await buildContextContent(ctxFor({}));
153
+ expect(content).not.toContain('nexusflow-map');
154
+ expect(content).not.toContain('.nexusflow/base');
155
+ expect(content).not.toContain('nexusflow-diff-context');
156
+ });
157
+ it('tells the agent to search the knowledge file, not read it whole', async () => {
158
+ // It reached 38 KB on a real workspace — about 9,500 tokens — while the
159
+ // pointer said "skim the headings", which costs the entire file to do.
160
+ const content = await buildContextContent(ctxFor({}));
161
+ expect(content).toContain('`###` heading');
162
+ expect(content).toContain('not the whole file');
163
+ });
164
+ it('names repos that carry their own instructions, which override these', async () => {
165
+ const ctx = ctxFor({});
166
+ ctx.analysis.get(nodeRepo).existingAIConfigs = [
167
+ { relativePath: 'CLAUDE.md', assistant: 'claude' },
168
+ ];
169
+ const content = await buildContextContent(ctx);
170
+ expect(content).toContain('take precedence');
171
+ expect(content).toContain('`my-web` (CLAUDE.md)');
172
+ });
173
+ });
174
+ describe('what it must NOT say', () => {
175
+ // Two independent agents evaluating a generated workspace used none of this,
176
+ // and it is where a wrong claim appeared: "Build tools: none detected" for a
177
+ // repo whose package.json has "build": "tsc". Anything a manifest already
178
+ // states is better read from the manifest, where it cannot go stale.
179
+ it('omits per-repo tech-stack metadata, which is derivable and went stale', async () => {
180
+ const content = await buildContextContent(ctxFor({}));
181
+ for (const label of ['**Type**', '**Languages**', '**Frameworks**', '**Build tools**', '**Ports**']) {
182
+ expect(content, label).not.toContain(label);
183
+ }
184
+ });
185
+ it('omits First Steps, which told the agent to stop and ask for approval', async () => {
186
+ const content = await buildContextContent(ctxFor({}));
187
+ expect(content).not.toContain('First Steps');
188
+ expect(content).not.toContain('Obtain Approval');
189
+ expect(content).not.toContain('before writing any code');
190
+ });
191
+ it('omits absolute file:/// links, which were 24% of the old file', async () => {
192
+ const content = await buildContextContent(ctxFor({}));
193
+ expect(content).not.toContain('file:///');
194
+ });
195
+ it('omits the git and npm advice any assistant already follows', async () => {
196
+ const content = await buildContextContent(ctxFor({}));
197
+ expect(content).not.toContain('git status');
198
+ expect(content).not.toContain('npm install');
199
+ expect(content).not.toContain('**Instruction**');
200
+ });
201
+ it('says nothing about relationships or ordering when there are none', async () => {
202
+ // An empty "needs: none" column and a start hint that asserts a
203
+ // non-existent dependency would both be worse than silence.
204
+ const content = await buildContextContent(ctxFor({}));
205
+ expect(content).not.toContain('needs `');
206
+ expect(content).not.toContain('used by `');
207
+ expect(content).not.toContain('Start with');
208
+ });
67
209
  });
68
- it('renders legacy custom resumption commands from old manifests', async () => {
69
- const content = await buildContextContent(ctxFor({ resumption: { testCommand: 'make integration-test', mockCommand: 'docker compose up mocks' } }));
70
- expect(content).toContain('Custom workspace commands:');
71
- expect(content).toContain('`docker compose up mocks`');
72
- expect(content).toContain('`make integration-test`');
210
+ describe('size', () => {
211
+ it('stays small enough not to crowd the context window', async () => {
212
+ // The docs advise under 200 lines because longer files reduce adherence,
213
+ // not merely cost tokens. Two repos should be nowhere near that.
214
+ const content = await buildContextContent(relatedCtx());
215
+ expect(content.split('\n').length).toBeLessThan(40);
216
+ expect(content.length).toBeLessThan(1600);
217
+ });
73
218
  });
74
- it('filters standard test commands out of the legacy path', async () => {
75
- const content = await buildContextContent(ctxFor({ resumption: { testCommand: 'npm run test' } }));
76
- // The stored standard command adds nothing beyond the derived table.
77
- expect(content).not.toContain('Custom workspace commands:');
219
+ describe('in-place mode', () => {
220
+ it('gives absolute paths and each repo branch, which vary per repo', async () => {
221
+ const ctx = ctxFor({ mode: 'in-place' });
222
+ ctx.feature.repoBranches = { 'my-web': 'existing-feature' };
223
+ const content = await buildContextContent(ctx);
224
+ expect(content).toContain(nodeRepo);
225
+ expect(content).toContain('(on existing-feature)');
226
+ expect(content).toContain('NexusFlow does not manage branches here');
227
+ expect(content).not.toContain('Do not edit the original repositories');
228
+ });
229
+ });
230
+ describe('robustness', () => {
231
+ it('keeps both repos when two share a basename', async () => {
232
+ // In-place workspaces can hold /org1/api and /org2/api. Ordering keyed by
233
+ // name collapsed them and one row vanished from the table with no error.
234
+ const ctx = ctxFor({ mode: 'in-place' });
235
+ const other = path.join(dir, 'org2', 'my-web');
236
+ ctx.repos = [
237
+ { name: 'my-web', path: nodeRepo, defaultBranch: 'main' },
238
+ { name: 'my-web', path: other, defaultBranch: 'main' },
239
+ ];
240
+ ctx.feature.repos = [nodeRepo, other];
241
+ const content = await buildContextContent(ctx);
242
+ expect(content).toContain(nodeRepo);
243
+ expect(content).toContain(other);
244
+ expect(content.split('\n').filter((l) => l.startsWith('| `my-web`')).length).toBe(2);
245
+ });
246
+ it('survives an analysis with no dependency list rather than throwing', async () => {
247
+ await expect(buildContextContent(ctxFor({}))).resolves.toContain('## Repos');
248
+ });
249
+ it('still lists repos when there is no analysis at all', async () => {
250
+ const ctx = ctxFor({});
251
+ ctx.analysis = undefined;
252
+ const content = await buildContextContent(ctx);
253
+ expect(content).toContain('`my-web`');
254
+ expect(content).toContain('`my-tool`');
255
+ });
256
+ it('says the workspace is empty rather than heading an empty table', async () => {
257
+ // A table header over no rows followed by "Each repo above is a separate
258
+ // git worktree" describes nothing at all.
259
+ const ctx = ctxFor({});
260
+ ctx.repos = [];
261
+ ctx.feature.repos = [];
262
+ const content = await buildContextContent(ctx);
263
+ expect(content).toContain('no repositories yet');
264
+ expect(content).not.toContain('| Repo |');
265
+ expect(content).not.toContain('Each repo above');
266
+ });
267
+ it('names own-instruction repos only from this workspace', async () => {
268
+ // The list walked the analysis map, so an entry for a repo outside this
269
+ // workspace could put its name in the generated file.
270
+ const ctx = ctxFor({});
271
+ const stranger = path.join(dir, 'not-in-this-workspace');
272
+ const strayAnalysis = analysisFor('stranger', stranger, ['typescript']);
273
+ strayAnalysis.existingAIConfigs = [
274
+ { relativePath: 'CLAUDE.md', assistant: 'claude' },
275
+ ];
276
+ ctx.analysis.set(stranger, strayAnalysis);
277
+ const content = await buildContextContent(ctx);
278
+ expect(content).not.toContain('stranger');
279
+ });
280
+ it('carries the teamwork strategy when one was chosen', async () => {
281
+ const content = await buildContextContent(ctxFor({ teamworkInstructions: '# Plan then implement' }));
282
+ expect(content).toContain('How to work together');
283
+ expect(content).toContain('Plan then implement');
284
+ });
78
285
  });
79
286
  });
80
287
  //# sourceMappingURL=base.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.test.js","sourceRoot":"","sources":["../../src/generators/base.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhD,yEAAyE;AACzE,SAAS,WAAW,CAAC,IAAY,EAAE,QAAgB,EAAE,SAAmB;IACtE,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;QAChF,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,EAAE;QACT,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,EAAE;KACY,CAAC;AAClC,CAAC;AAED,QAAQ,CAAC,uDAAuD,EAAE,GAAG,EAAE;IACrE,IAAI,GAAW,CAAC;IAChB,IAAI,QAAgB,CAAC;IACrB,IAAI,MAAc,CAAC;IAEnB,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,GAAG,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC;QACvE,4CAA4C;QAC5C,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,E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AC,CAAC;YAE/C,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;YACjE,MAAM,OAAO,GAAG,MAAM,mBAAmB,CACvC,MAAM,CAAC,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC,CAC1D,CAAC;YAEF,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;YAClD,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,14 +1,28 @@
1
1
  /**
2
2
  * @module generators/claude
3
- * Generates a CLAUDE.md file for Claude Code / Antigravity.
4
- * Now uses the shared base content builder which includes analysis data.
3
+ * Generates `CLAUDE.md` as a thin import of the canonical `AGENTS.md`.
4
+ *
5
+ * Claude Code reads `CLAUDE.md`, not `AGENTS.md` — but its documented pattern for
6
+ * a repo that already has `AGENTS.md` is a `CLAUDE.md` that imports it, "so both
7
+ * tools read the same instructions without duplicating them".
8
+ *
9
+ * The import costs nothing: `@path` files are expanded into context at launch,
10
+ * so this is an include rather than a link — Claude gets the full body without a
11
+ * tool call. That is what makes `AGENTS.md` the single source of truth while
12
+ * still being read by the one tool that will not look at it.
13
+ *
14
+ * A symlink would also work, but creating one on Windows needs Administrator
15
+ * rights or Developer Mode, so the import is the portable choice.
5
16
  */
6
17
  import type { WorkspaceContext } from '../types.js';
7
18
  /**
8
- * Generates a `CLAUDE.md` file at the workspace root.
19
+ * Writes a `CLAUDE.md` that imports `AGENTS.md`, plus anything Claude-specific.
9
20
  *
10
- * Claude Code reads this file automatically when opened in a directory,
11
- * so it is the primary way to give Claude long-lived project context.
21
+ * Written through the storage layer, like `AGENTS.md` not with a raw path join.
22
+ * The two must land in the same directory or the import resolves to nothing, and
23
+ * an unresolved `@`-import is silent: Claude Code would start with no workspace
24
+ * context and no error. Routing both through one writer is what keeps them
25
+ * together no matter which backend is active.
12
26
  *
13
27
  * @param ctx - The workspace context (feature + repos + analysis).
14
28
  * @param workspacePath - Absolute path to the workspace root directory.
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/generators/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,gBAAgB,EACrB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAUf"}
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/generators/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,gBAAgB,EACrB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAoBf"}
@@ -1,25 +1,47 @@
1
1
  /**
2
2
  * @module generators/claude
3
- * Generates a CLAUDE.md file for Claude Code / Antigravity.
4
- * Now uses the shared base content builder which includes analysis data.
3
+ * Generates `CLAUDE.md` as a thin import of the canonical `AGENTS.md`.
4
+ *
5
+ * Claude Code reads `CLAUDE.md`, not `AGENTS.md` — but its documented pattern for
6
+ * a repo that already has `AGENTS.md` is a `CLAUDE.md` that imports it, "so both
7
+ * tools read the same instructions without duplicating them".
8
+ *
9
+ * The import costs nothing: `@path` files are expanded into context at launch,
10
+ * so this is an include rather than a link — Claude gets the full body without a
11
+ * tool call. That is what makes `AGENTS.md` the single source of truth while
12
+ * still being read by the one tool that will not look at it.
13
+ *
14
+ * A symlink would also work, but creating one on Windows needs Administrator
15
+ * rights or Developer Mode, so the import is the portable choice.
5
16
  */
6
- import path from 'node:path';
7
- import fse from 'fs-extra';
8
- import { buildContextContent } from './base.js';
17
+ import { writeWorkspaceFile } from '../core/storage.js';
9
18
  /**
10
- * Generates a `CLAUDE.md` file at the workspace root.
19
+ * Writes a `CLAUDE.md` that imports `AGENTS.md`, plus anything Claude-specific.
11
20
  *
12
- * Claude Code reads this file automatically when opened in a directory,
13
- * so it is the primary way to give Claude long-lived project context.
21
+ * Written through the storage layer, like `AGENTS.md` not with a raw path join.
22
+ * The two must land in the same directory or the import resolves to nothing, and
23
+ * an unresolved `@`-import is silent: Claude Code would start with no workspace
24
+ * context and no error. Routing both through one writer is what keeps them
25
+ * together no matter which backend is active.
14
26
  *
15
27
  * @param ctx - The workspace context (feature + repos + analysis).
16
28
  * @param workspacePath - Absolute path to the workspace root directory.
17
29
  */
18
30
  export async function generateClaudeConfig(ctx, workspacePath) {
19
- const content = await buildContextContent(ctx);
20
- const filePath = path.join(workspacePath, 'CLAUDE.md');
31
+ const content = `@AGENTS.md
32
+
33
+ <!-- AGENTS.md holds the workspace context and is read by every other agent
34
+ tool. Claude Code does not read it, so this file imports it: @-imports are
35
+ expanded into context at launch, so nothing is duplicated and nothing costs
36
+ an extra read. Put Claude-only instructions below, not above. -->
37
+
38
+ ## Claude Code
39
+
40
+ - Prefer \`/plan\` before a change that spans more than one repository in this workspace.
41
+ - Record durable findings with \`nexusflow knowledge add\` rather than in chat, so the next session inherits them.
42
+ `;
21
43
  try {
22
- await fse.writeFile(filePath, content, 'utf-8');
44
+ await writeWorkspaceFile(workspacePath, ctx.feature.id, 'CLAUDE.md', content);
23
45
  }
24
46
  catch (error) {
25
47
  const message = error instanceof Error ? error.message : String(error);
@@ -1 +1 @@
1
- {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/generators/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B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AC,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
@@ -10,21 +10,22 @@ export declare function buildBaseKnowledgeContent(repoName: string): string;
10
10
  * Generates AI context files for each of the selected assistants.
11
11
  *
12
12
  * Also generates:
13
- * - WORKSPACE.md — universal context file
14
- * - nexusflow-knowledge.md — persistent AI memory across sessions
13
+ * - WORKSPACE.md — a short index for people, not an assistant-facing file
14
+ * - nexusflow-knowledge.md — accumulated decisions and gotchas, if absent
15
15
  * - nexusflow-plan.md — implementation order based on dependency analysis
16
16
  *
17
+ * Every file it writes describes the whole workspace, so there is no per-repo or
18
+ * base-only subset to generate. The `onlyRepo` and `onlyBase` parameters are
19
+ * gone with the per-repo architecture maps that were the only thing they scoped:
20
+ * once the maps went, `onlyBase` made this function write nothing while its
21
+ * caller still reported success, and `onlyRepo` narrowed a logging loop while
22
+ * every generated file was rewritten in full.
23
+ *
17
24
  * @param ctx - The workspace context (feature + repos).
18
25
  * @param assistants - Which AI assistants to generate context files for.
19
26
  * @param workspacePath - Absolute path to the workspace root directory.
20
- * @param onlyRepo - Restrict per-repo output to a single repo by name.
21
- * @param onlyBase - Only generate base-layer maps/knowledge.
22
- * @param changedRepos - When provided, per-repo architecture maps are only
23
- * rewritten for these repos (unchanged repos keep their
24
- * existing map byte-identical, preserving AI prompt
25
- * caches). A missing map file is generated regardless.
26
27
  */
27
- export declare function generateContextFiles(ctx: WorkspaceContext, assistants: AIAssistant[], workspacePath: string, onlyRepo?: string, onlyBase?: boolean, changedRepos?: string[]): Promise<void>;
28
+ export declare function generateContextFiles(ctx: WorkspaceContext, assistants: AIAssistant[], workspacePath: string): Promise<void>;
28
29
  export { generateClaudeConfig } from './claude.js';
29
30
  export { generateAntigravityConfig } from './antigravity.js';
30
31
  export { generateCodexConfig } from './codex.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"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