forge-cc 1.0.0 → 1.0.1

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 (142) hide show
  1. package/package.json +3 -2
  2. package/dist/gates/codex-gate.d.ts +0 -51
  3. package/dist/gates/codex-gate.js +0 -121
  4. package/dist/gates/codex-gate.js.map +0 -1
  5. package/dist/gates/prd-gate.d.ts +0 -7
  6. package/dist/gates/prd-gate.js +0 -193
  7. package/dist/gates/prd-gate.js.map +0 -1
  8. package/dist/gates/remediation.d.ts +0 -46
  9. package/dist/gates/remediation.js +0 -423
  10. package/dist/gates/remediation.js.map +0 -1
  11. package/dist/gates/review-gate.d.ts +0 -16
  12. package/dist/gates/review-gate.js +0 -479
  13. package/dist/gates/review-gate.js.map +0 -1
  14. package/dist/gates/runtime-gate.d.ts +0 -5
  15. package/dist/gates/runtime-gate.js +0 -99
  16. package/dist/gates/runtime-gate.js.map +0 -1
  17. package/dist/gates/test-analysis.d.ts +0 -21
  18. package/dist/gates/test-analysis.js +0 -394
  19. package/dist/gates/test-analysis.js.map +0 -1
  20. package/dist/gates/visual-capture.d.ts +0 -24
  21. package/dist/gates/visual-capture.js +0 -144
  22. package/dist/gates/visual-capture.js.map +0 -1
  23. package/dist/gates/visual-gate.d.ts +0 -18
  24. package/dist/gates/visual-gate.js +0 -234
  25. package/dist/gates/visual-gate.js.map +0 -1
  26. package/dist/gates/visual-reviewer.d.ts +0 -11
  27. package/dist/gates/visual-reviewer.js +0 -211
  28. package/dist/gates/visual-reviewer.js.map +0 -1
  29. package/dist/go/auto-chain.d.ts +0 -136
  30. package/dist/go/auto-chain.js +0 -389
  31. package/dist/go/auto-chain.js.map +0 -1
  32. package/dist/go/executor.d.ts +0 -137
  33. package/dist/go/executor.js +0 -447
  34. package/dist/go/executor.js.map +0 -1
  35. package/dist/go/finalize.d.ts +0 -108
  36. package/dist/go/finalize.js +0 -331
  37. package/dist/go/finalize.js.map +0 -1
  38. package/dist/go/linear-sync-cli.d.ts +0 -55
  39. package/dist/go/linear-sync-cli.js +0 -192
  40. package/dist/go/linear-sync-cli.js.map +0 -1
  41. package/dist/go/linear-sync.d.ts +0 -112
  42. package/dist/go/linear-sync.js +0 -375
  43. package/dist/go/linear-sync.js.map +0 -1
  44. package/dist/go/prd-queue.d.ts +0 -43
  45. package/dist/go/prd-queue.js +0 -67
  46. package/dist/go/prd-queue.js.map +0 -1
  47. package/dist/go/prd-selector.d.ts +0 -57
  48. package/dist/go/prd-selector.js +0 -101
  49. package/dist/go/prd-selector.js.map +0 -1
  50. package/dist/go/verify-loop.d.ts +0 -64
  51. package/dist/go/verify-loop.js +0 -327
  52. package/dist/go/verify-loop.js.map +0 -1
  53. package/dist/hooks/pre-commit.d.ts +0 -5
  54. package/dist/hooks/pre-commit.js +0 -75
  55. package/dist/hooks/pre-commit.js.map +0 -1
  56. package/dist/linear/issues.d.ts +0 -22
  57. package/dist/linear/issues.js +0 -51
  58. package/dist/linear/issues.js.map +0 -1
  59. package/dist/linear/milestones.d.ts +0 -11
  60. package/dist/linear/milestones.js +0 -32
  61. package/dist/linear/milestones.js.map +0 -1
  62. package/dist/linear/projects.d.ts +0 -16
  63. package/dist/linear/projects.js +0 -51
  64. package/dist/linear/projects.js.map +0 -1
  65. package/dist/reporter/human.d.ts +0 -7
  66. package/dist/reporter/human.js +0 -93
  67. package/dist/reporter/human.js.map +0 -1
  68. package/dist/reporter/json.d.ts +0 -2
  69. package/dist/reporter/json.js +0 -4
  70. package/dist/reporter/json.js.map +0 -1
  71. package/dist/setup/structural-templates.d.ts +0 -12
  72. package/dist/setup/structural-templates.js +0 -288
  73. package/dist/setup/structural-templates.js.map +0 -1
  74. package/dist/setup/templates.d.ts +0 -17
  75. package/dist/setup/templates.js +0 -109
  76. package/dist/setup/templates.js.map +0 -1
  77. package/dist/setup/test-planner.d.ts +0 -38
  78. package/dist/setup/test-planner.js +0 -91
  79. package/dist/setup/test-planner.js.map +0 -1
  80. package/dist/setup/test-scaffold.d.ts +0 -31
  81. package/dist/setup/test-scaffold.js +0 -209
  82. package/dist/setup/test-scaffold.js.map +0 -1
  83. package/dist/setup/test-templates.d.ts +0 -37
  84. package/dist/setup/test-templates.js +0 -313
  85. package/dist/setup/test-templates.js.map +0 -1
  86. package/dist/spec/generator.d.ts +0 -34
  87. package/dist/spec/generator.js +0 -227
  88. package/dist/spec/generator.js.map +0 -1
  89. package/dist/spec/interview.d.ts +0 -142
  90. package/dist/spec/interview.js +0 -287
  91. package/dist/spec/interview.js.map +0 -1
  92. package/dist/spec/linear-sync.d.ts +0 -48
  93. package/dist/spec/linear-sync.js +0 -125
  94. package/dist/spec/linear-sync.js.map +0 -1
  95. package/dist/spec/scanner.d.ts +0 -79
  96. package/dist/spec/scanner.js +0 -566
  97. package/dist/spec/scanner.js.map +0 -1
  98. package/dist/spec/templates.d.ts +0 -375
  99. package/dist/spec/templates.js +0 -95
  100. package/dist/spec/templates.js.map +0 -1
  101. package/dist/state/prd-status.d.ts +0 -62
  102. package/dist/state/prd-status.js +0 -122
  103. package/dist/state/prd-status.js.map +0 -1
  104. package/dist/state/reader.d.ts +0 -7
  105. package/dist/state/reader.js +0 -43
  106. package/dist/state/reader.js.map +0 -1
  107. package/dist/state/writer.d.ts +0 -21
  108. package/dist/state/writer.js +0 -106
  109. package/dist/state/writer.js.map +0 -1
  110. package/dist/team/consensus.d.ts +0 -28
  111. package/dist/team/consensus.js +0 -130
  112. package/dist/team/consensus.js.map +0 -1
  113. package/dist/team/index.d.ts +0 -4
  114. package/dist/team/index.js +0 -5
  115. package/dist/team/index.js.map +0 -1
  116. package/dist/team/lifecycle.d.ts +0 -37
  117. package/dist/team/lifecycle.js +0 -92
  118. package/dist/team/lifecycle.js.map +0 -1
  119. package/dist/team/reviewer.d.ts +0 -10
  120. package/dist/team/reviewer.js +0 -345
  121. package/dist/team/reviewer.js.map +0 -1
  122. package/dist/team/types.d.ts +0 -269
  123. package/dist/team/types.js +0 -70
  124. package/dist/team/types.js.map +0 -1
  125. package/dist/utils/browser.d.ts +0 -10
  126. package/dist/utils/browser.js +0 -96
  127. package/dist/utils/browser.js.map +0 -1
  128. package/dist/utils/platform.d.ts +0 -29
  129. package/dist/utils/platform.js +0 -90
  130. package/dist/utils/platform.js.map +0 -1
  131. package/dist/worktree/identity.d.ts +0 -9
  132. package/dist/worktree/identity.js +0 -32
  133. package/dist/worktree/identity.js.map +0 -1
  134. package/dist/worktree/parallel.d.ts +0 -87
  135. package/dist/worktree/parallel.js +0 -328
  136. package/dist/worktree/parallel.js.map +0 -1
  137. package/dist/worktree/session.d.ts +0 -67
  138. package/dist/worktree/session.js +0 -194
  139. package/dist/worktree/session.js.map +0 -1
  140. package/dist/worktree/state-merge.d.ts +0 -43
  141. package/dist/worktree/state-merge.js +0 -162
  142. package/dist/worktree/state-merge.js.map +0 -1
@@ -1,313 +0,0 @@
1
- // ── Test Templates ──────────────────────────────────────────────────
2
- // Framework-aware unit test template generators.
3
- // Each function takes a source file path and returns a complete test file string.
4
- import { basename, dirname, extname, relative, sep } from "node:path";
5
- // ---------------------------------------------------------------------------
6
- // Helpers
7
- // ---------------------------------------------------------------------------
8
- /**
9
- * Extract a PascalCase or camelCase module name from a file path.
10
- * e.g. "src/utils/parse-config.ts" -> "parseConfig"
11
- */
12
- function extractModuleName(sourcePath) {
13
- const base = basename(sourcePath);
14
- const name = base.replace(/\.(ts|tsx|js|jsx)$/, "");
15
- // Convert kebab-case to camelCase
16
- return name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
17
- }
18
- /**
19
- * Compute the relative import path from a test file to its source file.
20
- * Assumes test files live in __tests__/ adjacent to source, or co-located.
21
- * Returns a path with no extension (for TS imports).
22
- */
23
- export function computeRelativeImport(testFilePath, sourceFilePath) {
24
- const testDir = dirname(testFilePath);
25
- let rel = relative(testDir, sourceFilePath).replace(/\\/g, "/");
26
- // Strip the file extension for TypeScript imports
27
- rel = rel.replace(/\.(ts|tsx|js|jsx)$/, "");
28
- // Ensure it starts with ./
29
- if (!rel.startsWith(".")) {
30
- rel = "./" + rel;
31
- }
32
- return rel;
33
- }
34
- /**
35
- * Derive a default test file path from a source path (co-located pattern).
36
- * e.g. "src/utils/helpers.ts" -> "src/utils/helpers.test.ts"
37
- */
38
- function deriveTestPath(sourcePath) {
39
- const dir = dirname(sourcePath);
40
- const base = basename(sourcePath);
41
- const ext = extname(base);
42
- const nameWithoutExt = base.replace(/\.(ts|tsx|js|jsx)$/, "");
43
- const testExt = ext === ".tsx" || ext === ".jsx" ? ext : ".ts";
44
- return `${dir}${sep}${nameWithoutExt}.test${testExt}`.replace(/\\/g, "/");
45
- }
46
- // ---------------------------------------------------------------------------
47
- // Templates
48
- // ---------------------------------------------------------------------------
49
- /**
50
- * Test stub for Next.js App Router API route handlers.
51
- * Tests GET/POST/PUT/DELETE handler functions with mocked NextRequest/NextResponse.
52
- */
53
- export function nextjsApiRouteTemplate(sourcePath) {
54
- const moduleName = extractModuleName(sourcePath);
55
- const testPath = deriveTestPath(sourcePath);
56
- const importPath = computeRelativeImport(testPath, sourcePath);
57
- return `import { describe, it, expect } from "vitest";
58
- import { NextRequest } from "next/server";
59
-
60
- // TODO: Update imports to match the actual exports from the source module
61
- import { GET, POST } from "${importPath}.js";
62
-
63
- describe("${moduleName} API route", () => {
64
- describe("GET handler", () => {
65
- it("should return a successful response", async () => {
66
- const request = new NextRequest("http://localhost:3000/api/${moduleName}");
67
-
68
- const response = await GET(request);
69
-
70
- expect(response.status).toBe(200);
71
- const body = await response.json();
72
- expect(body).toBeDefined();
73
- });
74
-
75
- it("should handle errors gracefully", async () => {
76
- const request = new NextRequest("http://localhost:3000/api/${moduleName}");
77
-
78
- // TODO: Mock a dependency to trigger an error
79
- const response = await GET(request);
80
-
81
- expect(response.status).toBeDefined();
82
- });
83
- });
84
-
85
- describe("POST handler", () => {
86
- it("should accept valid input and return success", async () => {
87
- const request = new NextRequest("http://localhost:3000/api/${moduleName}", {
88
- method: "POST",
89
- body: JSON.stringify({ /* TODO: add valid request body */ }),
90
- headers: { "Content-Type": "application/json" },
91
- });
92
-
93
- const response = await POST(request);
94
-
95
- expect(response.status).toBe(200);
96
- });
97
-
98
- it("should reject invalid input", async () => {
99
- const request = new NextRequest("http://localhost:3000/api/${moduleName}", {
100
- method: "POST",
101
- body: JSON.stringify({}),
102
- headers: { "Content-Type": "application/json" },
103
- });
104
-
105
- const response = await POST(request);
106
-
107
- // TODO: Assert the expected error status code
108
- expect(response.status).toBeDefined();
109
- });
110
- });
111
- });
112
- `;
113
- }
114
- /**
115
- * Test stub for React components using React Testing Library patterns.
116
- * Includes render test and basic interaction test.
117
- */
118
- export function reactComponentTemplate(sourcePath) {
119
- const moduleName = extractModuleName(sourcePath);
120
- // Capitalize first letter for component name convention
121
- const componentName = moduleName.charAt(0).toUpperCase() + moduleName.slice(1);
122
- const testPath = deriveTestPath(sourcePath);
123
- const importPath = computeRelativeImport(testPath, sourcePath);
124
- return `import { describe, it, expect } from "vitest";
125
- import { render, screen } from "@testing-library/react";
126
- import userEvent from "@testing-library/user-event";
127
-
128
- // TODO: Update import to match the actual default/named export
129
- import { ${componentName} } from "${importPath}.js";
130
-
131
- describe("${componentName} component", () => {
132
- it("should render without crashing", () => {
133
- render(<${componentName} />);
134
-
135
- // TODO: Replace with an actual text or role query from the component
136
- expect(screen.getByRole("heading")).toBeDefined();
137
- });
138
-
139
- it("should display expected content", () => {
140
- render(<${componentName} />);
141
-
142
- // TODO: Assert on the expected text or elements
143
- expect(document.body.textContent).toBeTruthy();
144
- });
145
-
146
- it("should handle user interaction", async () => {
147
- const user = userEvent.setup();
148
- render(<${componentName} />);
149
-
150
- // TODO: Replace with an actual interactive element and expected outcome
151
- const button = screen.queryByRole("button");
152
- if (button) {
153
- await user.click(button);
154
- // TODO: Assert the expected state change after interaction
155
- }
156
- });
157
- });
158
- `;
159
- }
160
- /**
161
- * Test stub for pure utility/helper functions.
162
- * Input/output pattern with describe blocks.
163
- */
164
- export function utilityTemplate(sourcePath) {
165
- const moduleName = extractModuleName(sourcePath);
166
- const testPath = deriveTestPath(sourcePath);
167
- const importPath = computeRelativeImport(testPath, sourcePath);
168
- return `import { describe, it, expect } from "vitest";
169
-
170
- // TODO: Update imports to match the actual exports from the source module
171
- import { ${moduleName} } from "${importPath}.js";
172
-
173
- describe("${moduleName}", () => {
174
- describe("when given valid input", () => {
175
- it("should return the expected output", () => {
176
- // TODO: Replace with actual input and expected output
177
- const input = undefined;
178
- const result = ${moduleName}(input);
179
-
180
- expect(result).toBeDefined();
181
- });
182
- });
183
-
184
- describe("when given edge-case input", () => {
185
- it("should handle empty input", () => {
186
- // TODO: Replace with actual edge-case input
187
- const result = ${moduleName}(undefined);
188
-
189
- expect(result).toBeDefined();
190
- });
191
-
192
- it("should handle null or undefined", () => {
193
- // TODO: Test null/undefined handling if applicable
194
- expect(() => ${moduleName}(null as never)).not.toThrow();
195
- });
196
- });
197
-
198
- describe("when given invalid input", () => {
199
- it("should throw or return an error indicator", () => {
200
- // TODO: Replace with actual invalid input
201
- const invalidInput = undefined;
202
-
203
- // TODO: Assert either a throw or an error return value
204
- expect(() => ${moduleName}(invalidInput)).toBeDefined();
205
- });
206
- });
207
- });
208
- `;
209
- }
210
- /**
211
- * Test stub for Express routes using supertest patterns.
212
- * Tests GET and POST endpoints.
213
- */
214
- export function expressRouteTemplate(sourcePath) {
215
- const moduleName = extractModuleName(sourcePath);
216
- const testPath = deriveTestPath(sourcePath);
217
- const importPath = computeRelativeImport(testPath, sourcePath);
218
- return `import { describe, it, expect, beforeAll, afterAll } from "vitest";
219
- import request from "supertest";
220
- import express from "express";
221
-
222
- // TODO: Update import to match the actual export (router or route handler)
223
- import { router } from "${importPath}.js";
224
-
225
- describe("${moduleName} routes", () => {
226
- const app = express();
227
- app.use(express.json());
228
- // TODO: Update the mount path to match the actual route prefix
229
- app.use("/${moduleName}", router);
230
-
231
- describe("GET /${moduleName}", () => {
232
- it("should return 200 and a valid response", async () => {
233
- const res = await request(app).get("/${moduleName}");
234
-
235
- expect(res.status).toBe(200);
236
- expect(res.body).toBeDefined();
237
- });
238
-
239
- it("should return the expected data structure", async () => {
240
- const res = await request(app).get("/${moduleName}");
241
-
242
- // TODO: Assert the shape of the response body
243
- expect(res.body).toBeDefined();
244
- });
245
- });
246
-
247
- describe("POST /${moduleName}", () => {
248
- it("should accept valid input and return 201", async () => {
249
- const res = await request(app)
250
- .post("/${moduleName}")
251
- .send({ /* TODO: add valid request body */ });
252
-
253
- expect(res.status).toBe(201);
254
- });
255
-
256
- it("should reject invalid input with 400", async () => {
257
- const res = await request(app)
258
- .post("/${moduleName}")
259
- .send({});
260
-
261
- // TODO: Assert the expected error response
262
- expect(res.status).toBe(400);
263
- });
264
- });
265
- });
266
- `;
267
- }
268
- // ---------------------------------------------------------------------------
269
- // Dispatcher
270
- // ---------------------------------------------------------------------------
271
- /**
272
- * Select the right template based on the file category and detected app framework.
273
- *
274
- * @param sourcePath - Path to the source file being tested
275
- * @param category - From TestCategory.name: "api-routes", "components", "utils",
276
- * "middleware", "models", "other"
277
- * @param appFramework - From TestAnalysisReport.framework.appFramework:
278
- * "nextjs-app", "nextjs-pages", "react-vite", "express",
279
- * "plain-ts", "unknown"
280
- */
281
- export function generateTestTemplate(sourcePath, category, appFramework) {
282
- // API routes: pick template based on the app framework
283
- if (category === "api-routes") {
284
- if (appFramework === "nextjs-app" || appFramework === "nextjs-pages") {
285
- return nextjsApiRouteTemplate(sourcePath);
286
- }
287
- if (appFramework === "express") {
288
- return expressRouteTemplate(sourcePath);
289
- }
290
- // Fallback: use utility template for unknown API route frameworks
291
- return utilityTemplate(sourcePath);
292
- }
293
- // Components: React component template for React-based frameworks
294
- if (category === "components") {
295
- if (appFramework === "nextjs-app" ||
296
- appFramework === "nextjs-pages" ||
297
- appFramework === "react-vite") {
298
- return reactComponentTemplate(sourcePath);
299
- }
300
- // Non-React components fall back to utility template
301
- return utilityTemplate(sourcePath);
302
- }
303
- // Middleware: Express middleware uses express template, others use utility
304
- if (category === "middleware") {
305
- if (appFramework === "express") {
306
- return expressRouteTemplate(sourcePath);
307
- }
308
- return utilityTemplate(sourcePath);
309
- }
310
- // Utils, models, other: all use the utility template
311
- return utilityTemplate(sourcePath);
312
- }
313
- //# sourceMappingURL=test-templates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-templates.js","sourceRoot":"","sources":["../../src/setup/test-templates.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,iDAAiD;AACjD,kFAAkF;AAElF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEtE,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,iBAAiB,CAAC,UAAkB;IAC3C,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACpD,kCAAkC;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAAoB,EACpB,cAAsB;IAEtB,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACtC,IAAI,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChE,kDAAkD;IAClD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAC5C,2BAA2B;IAC3B,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IACD,OAA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B,CAClC,UAAkB,EAClB,QAAgB,EAChB,YAAoB;IAEpB,uDAAuD;IACvD,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC9B,IAAI,YAAY,KAAK,YAAY,IAAI,YAAY,KAAK,cAAc,EAAE,CAAC;YACrE,OAAO,sBAAsB,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;QACD,kEAAkE;QAClE,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAED,kEAAkE;IAClE,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC9B,IACE,YAAY,KAAK,YAAY;YAC7B,YAAY,KAAK,cAAc;YAC/B,YAAY,KAAK,YAAY,EAC7B,CAAC;YACD,OAAO,sBAAsB,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC;QACD,qDAAqD;QACrD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAED,2EAA2E;IAC3E,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC9B,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAED,qDAAqD;IACrD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;AACrC,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { PRDData } from "./templates.js";
2
- /**
3
- * Generates a complete PRD markdown document from validated PRD data.
4
- */
5
- export declare function generatePRD(data: PRDData): string;
6
- /**
7
- * Generates a partial PRD from incomplete data (for incremental updates during interview).
8
- * Fills missing fields with placeholders.
9
- */
10
- export declare function generateDraftPRD(data: Partial<PRDData>): string;
11
- /**
12
- * Validates PRD data, generates markdown, and writes to disk.
13
- */
14
- export declare function writePRDToFile(data: PRDData, outputPath: string): void;
15
- export interface WorktreePRDResult {
16
- /** Absolute path where the PRD was written in the worktree. */
17
- prdPath: string;
18
- /** Relative path from the worktree root (used for merging back). */
19
- relativePath: string;
20
- }
21
- /**
22
- * Write a PRD to a worktree directory.
23
- *
24
- * Validates and generates the PRD markdown, then writes it to
25
- * `<worktreePath>/<relativePrdPath>`. Returns both the absolute path
26
- * and the relative path so callers can locate the file or merge it
27
- * back to the main working tree.
28
- *
29
- * @param data - The PRD data to generate and write.
30
- * @param worktreePath - Absolute path to the worktree root.
31
- * @param relativePrdPath - Path relative to the worktree root where
32
- * the PRD should be written (e.g. "tasks/prd.md").
33
- */
34
- export declare function writePRDToWorktree(data: PRDData, worktreePath: string, relativePrdPath: string): WorktreePRDResult;
@@ -1,227 +0,0 @@
1
- import { writeFileSync, mkdirSync } from "node:fs";
2
- import { dirname, join } from "node:path";
3
- import { validatePRD } from "./templates.js";
4
- // ── Section Generators ───────────────────────────────────────────────
5
- function renderHeader(data) {
6
- const lines = [
7
- `# ${data.project} — Specification`,
8
- "",
9
- `**Project:** ${data.project}`,
10
- `**Status:** ${data.status}`,
11
- `**Branch:** ${data.branch}`,
12
- `**Created:** ${data.created}`,
13
- `**Assigned To:** ${data.assignedTo}`,
14
- ];
15
- if (data.linearProject) {
16
- lines.push(`**Linear Project:** ${data.linearProject}`);
17
- }
18
- return lines.join("\n");
19
- }
20
- function renderOverview(overview) {
21
- return `## Overview\n\n${overview}`;
22
- }
23
- function renderProblemStatement(problemStatement) {
24
- return `## Problem Statement\n\n${problemStatement}`;
25
- }
26
- function renderScope(scope) {
27
- const sections = ["## Scope"];
28
- sections.push("\n### In Scope");
29
- for (const item of scope.inScope) {
30
- sections.push(`- ${item}`);
31
- }
32
- sections.push("\n### Out of Scope");
33
- for (const item of scope.outOfScope) {
34
- sections.push(`- ${item}`);
35
- }
36
- sections.push("\n### Sacred / Do NOT Touch");
37
- for (const item of scope.sacred) {
38
- sections.push(`- ${item}`);
39
- }
40
- return sections.join("\n");
41
- }
42
- function renderUserStory(story) {
43
- const lines = [
44
- `### US-${story.id}: ${story.title}`,
45
- `**Description:** ${story.description}`,
46
- "**Acceptance Criteria:**",
47
- ];
48
- for (const criterion of story.acceptanceCriteria) {
49
- lines.push(`- [ ] ${criterion}`);
50
- }
51
- return lines.join("\n");
52
- }
53
- function renderUserStories(stories) {
54
- const sections = ["## User Stories", ""];
55
- for (const story of stories) {
56
- sections.push(renderUserStory(story));
57
- sections.push("");
58
- }
59
- return sections.join("\n").trimEnd();
60
- }
61
- function renderTechnicalDesign(design) {
62
- const sections = ["## Technical Design"];
63
- if (design.projectStructure) {
64
- sections.push(`\n### Project Structure\n${design.projectStructure}`);
65
- }
66
- if (design.keyTypes) {
67
- sections.push(`\n### Key Types\n${design.keyTypes}`);
68
- }
69
- if (design.dependencies && design.dependencies.length > 0) {
70
- sections.push("\n### Dependencies");
71
- for (const dep of design.dependencies) {
72
- sections.push(`- ${dep}`);
73
- }
74
- }
75
- if (design.existingCode) {
76
- sections.push(`\n### Existing Code\n${design.existingCode}`);
77
- }
78
- return sections.join("\n");
79
- }
80
- function renderMilestone(milestone) {
81
- const lines = [
82
- `### Milestone ${milestone.number}: ${milestone.name}`,
83
- `**Assigned To:** ${milestone.assignedTo}`,
84
- `**Goal:** ${milestone.goal}`,
85
- ];
86
- if (milestone.dependsOn && milestone.dependsOn.length > 0) {
87
- lines.push(`**dependsOn:** ${milestone.dependsOn.join(", ")}`);
88
- }
89
- lines.push("");
90
- for (const wave of milestone.waves) {
91
- const agentCount = wave.agents.length;
92
- lines.push(`**Wave ${wave.waveNumber} (${agentCount} agent${agentCount !== 1 ? "s" : ""} parallel):**`);
93
- for (let i = 0; i < wave.agents.length; i++) {
94
- const agent = wave.agents[i];
95
- lines.push(`${i + 1}. **${agent.name}**: ${agent.task}`);
96
- if (agent.files.length > 0) {
97
- lines.push(` - Files: ${agent.files.join(", ")}`);
98
- }
99
- }
100
- lines.push("");
101
- }
102
- if (milestone.verificationCommands.length > 0) {
103
- lines.push("**Verification:**");
104
- lines.push("```bash");
105
- for (const cmd of milestone.verificationCommands) {
106
- lines.push(cmd);
107
- }
108
- lines.push("```");
109
- }
110
- return lines.join("\n");
111
- }
112
- function renderMilestones(milestones) {
113
- const sections = ["## Implementation Milestones", ""];
114
- for (const milestone of milestones) {
115
- sections.push(renderMilestone(milestone));
116
- sections.push("");
117
- sections.push("---");
118
- sections.push("");
119
- }
120
- // Remove trailing separator
121
- if (sections.length > 2) {
122
- sections.pop(); // empty line
123
- sections.pop(); // ---
124
- }
125
- return sections.join("\n").trimEnd();
126
- }
127
- function renderVerification(verification) {
128
- const sections = ["## Verification"];
129
- sections.push("\n### Per-Milestone");
130
- for (const item of verification.perMilestone) {
131
- sections.push(`- ${item}`);
132
- }
133
- sections.push("\n### Overall");
134
- for (const item of verification.overall) {
135
- sections.push(`- ${item}`);
136
- }
137
- return sections.join("\n");
138
- }
139
- // ── Public API ───────────────────────────────────────────────────────
140
- /**
141
- * Generates a complete PRD markdown document from validated PRD data.
142
- */
143
- export function generatePRD(data) {
144
- const sections = [
145
- renderHeader(data),
146
- renderOverview(data.overview),
147
- renderProblemStatement(data.problemStatement),
148
- renderScope(data.scope),
149
- renderUserStories(data.userStories),
150
- renderTechnicalDesign(data.technicalDesign),
151
- renderMilestones(data.milestones),
152
- renderVerification(data.verification),
153
- ];
154
- return sections.join("\n\n") + "\n";
155
- }
156
- /**
157
- * Generates a partial PRD from incomplete data (for incremental updates during interview).
158
- * Fills missing fields with placeholders.
159
- */
160
- export function generateDraftPRD(data) {
161
- const sections = [];
162
- // Header — always present
163
- const project = data.project ?? "Untitled Project";
164
- const headerLines = [
165
- `# ${project} — Specification`,
166
- "",
167
- `**Project:** ${project}`,
168
- `**Status:** ${data.status ?? "Draft"}`,
169
- `**Branch:** ${data.branch ?? "TBD"}`,
170
- `**Created:** ${data.created ?? new Date().toISOString().split("T")[0]}`,
171
- `**Assigned To:** ${data.assignedTo ?? "TBD"}`,
172
- ];
173
- if (data.linearProject) {
174
- headerLines.push(`**Linear Project:** ${data.linearProject}`);
175
- }
176
- sections.push(headerLines.join("\n"));
177
- if (data.overview) {
178
- sections.push(renderOverview(data.overview));
179
- }
180
- if (data.problemStatement) {
181
- sections.push(renderProblemStatement(data.problemStatement));
182
- }
183
- if (data.scope) {
184
- sections.push(renderScope(data.scope));
185
- }
186
- if (data.userStories && data.userStories.length > 0) {
187
- sections.push(renderUserStories(data.userStories));
188
- }
189
- if (data.technicalDesign) {
190
- sections.push(renderTechnicalDesign(data.technicalDesign));
191
- }
192
- if (data.milestones && data.milestones.length > 0) {
193
- sections.push(renderMilestones(data.milestones));
194
- }
195
- if (data.verification) {
196
- sections.push(renderVerification(data.verification));
197
- }
198
- return sections.join("\n\n") + "\n";
199
- }
200
- /**
201
- * Validates PRD data, generates markdown, and writes to disk.
202
- */
203
- export function writePRDToFile(data, outputPath) {
204
- const validated = validatePRD(data);
205
- const markdown = generatePRD(validated);
206
- mkdirSync(dirname(outputPath), { recursive: true });
207
- writeFileSync(outputPath, markdown, "utf-8");
208
- }
209
- /**
210
- * Write a PRD to a worktree directory.
211
- *
212
- * Validates and generates the PRD markdown, then writes it to
213
- * `<worktreePath>/<relativePrdPath>`. Returns both the absolute path
214
- * and the relative path so callers can locate the file or merge it
215
- * back to the main working tree.
216
- *
217
- * @param data - The PRD data to generate and write.
218
- * @param worktreePath - Absolute path to the worktree root.
219
- * @param relativePrdPath - Path relative to the worktree root where
220
- * the PRD should be written (e.g. "tasks/prd.md").
221
- */
222
- export function writePRDToWorktree(data, worktreePath, relativePrdPath) {
223
- const prdPath = join(worktreePath, relativePrdPath);
224
- writePRDToFile(data, prdPath);
225
- return { prdPath, relativePath: relativePrdPath };
226
- }
227
- //# sourceMappingURL=generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/spec/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAA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