forge-cc 1.0.0 → 1.0.2

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 (144) hide show
  1. package/dist/cli.js +7 -1
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +3 -2
  4. package/dist/gates/codex-gate.d.ts +0 -51
  5. package/dist/gates/codex-gate.js +0 -121
  6. package/dist/gates/codex-gate.js.map +0 -1
  7. package/dist/gates/prd-gate.d.ts +0 -7
  8. package/dist/gates/prd-gate.js +0 -193
  9. package/dist/gates/prd-gate.js.map +0 -1
  10. package/dist/gates/remediation.d.ts +0 -46
  11. package/dist/gates/remediation.js +0 -423
  12. package/dist/gates/remediation.js.map +0 -1
  13. package/dist/gates/review-gate.d.ts +0 -16
  14. package/dist/gates/review-gate.js +0 -479
  15. package/dist/gates/review-gate.js.map +0 -1
  16. package/dist/gates/runtime-gate.d.ts +0 -5
  17. package/dist/gates/runtime-gate.js +0 -99
  18. package/dist/gates/runtime-gate.js.map +0 -1
  19. package/dist/gates/test-analysis.d.ts +0 -21
  20. package/dist/gates/test-analysis.js +0 -394
  21. package/dist/gates/test-analysis.js.map +0 -1
  22. package/dist/gates/visual-capture.d.ts +0 -24
  23. package/dist/gates/visual-capture.js +0 -144
  24. package/dist/gates/visual-capture.js.map +0 -1
  25. package/dist/gates/visual-gate.d.ts +0 -18
  26. package/dist/gates/visual-gate.js +0 -234
  27. package/dist/gates/visual-gate.js.map +0 -1
  28. package/dist/gates/visual-reviewer.d.ts +0 -11
  29. package/dist/gates/visual-reviewer.js +0 -211
  30. package/dist/gates/visual-reviewer.js.map +0 -1
  31. package/dist/go/auto-chain.d.ts +0 -136
  32. package/dist/go/auto-chain.js +0 -389
  33. package/dist/go/auto-chain.js.map +0 -1
  34. package/dist/go/executor.d.ts +0 -137
  35. package/dist/go/executor.js +0 -447
  36. package/dist/go/executor.js.map +0 -1
  37. package/dist/go/finalize.d.ts +0 -108
  38. package/dist/go/finalize.js +0 -331
  39. package/dist/go/finalize.js.map +0 -1
  40. package/dist/go/linear-sync-cli.d.ts +0 -55
  41. package/dist/go/linear-sync-cli.js +0 -192
  42. package/dist/go/linear-sync-cli.js.map +0 -1
  43. package/dist/go/linear-sync.d.ts +0 -112
  44. package/dist/go/linear-sync.js +0 -375
  45. package/dist/go/linear-sync.js.map +0 -1
  46. package/dist/go/prd-queue.d.ts +0 -43
  47. package/dist/go/prd-queue.js +0 -67
  48. package/dist/go/prd-queue.js.map +0 -1
  49. package/dist/go/prd-selector.d.ts +0 -57
  50. package/dist/go/prd-selector.js +0 -101
  51. package/dist/go/prd-selector.js.map +0 -1
  52. package/dist/go/verify-loop.d.ts +0 -64
  53. package/dist/go/verify-loop.js +0 -327
  54. package/dist/go/verify-loop.js.map +0 -1
  55. package/dist/hooks/pre-commit.d.ts +0 -5
  56. package/dist/hooks/pre-commit.js +0 -75
  57. package/dist/hooks/pre-commit.js.map +0 -1
  58. package/dist/linear/issues.d.ts +0 -22
  59. package/dist/linear/issues.js +0 -51
  60. package/dist/linear/issues.js.map +0 -1
  61. package/dist/linear/milestones.d.ts +0 -11
  62. package/dist/linear/milestones.js +0 -32
  63. package/dist/linear/milestones.js.map +0 -1
  64. package/dist/linear/projects.d.ts +0 -16
  65. package/dist/linear/projects.js +0 -51
  66. package/dist/linear/projects.js.map +0 -1
  67. package/dist/reporter/human.d.ts +0 -7
  68. package/dist/reporter/human.js +0 -93
  69. package/dist/reporter/human.js.map +0 -1
  70. package/dist/reporter/json.d.ts +0 -2
  71. package/dist/reporter/json.js +0 -4
  72. package/dist/reporter/json.js.map +0 -1
  73. package/dist/setup/structural-templates.d.ts +0 -12
  74. package/dist/setup/structural-templates.js +0 -288
  75. package/dist/setup/structural-templates.js.map +0 -1
  76. package/dist/setup/templates.d.ts +0 -17
  77. package/dist/setup/templates.js +0 -109
  78. package/dist/setup/templates.js.map +0 -1
  79. package/dist/setup/test-planner.d.ts +0 -38
  80. package/dist/setup/test-planner.js +0 -91
  81. package/dist/setup/test-planner.js.map +0 -1
  82. package/dist/setup/test-scaffold.d.ts +0 -31
  83. package/dist/setup/test-scaffold.js +0 -209
  84. package/dist/setup/test-scaffold.js.map +0 -1
  85. package/dist/setup/test-templates.d.ts +0 -37
  86. package/dist/setup/test-templates.js +0 -313
  87. package/dist/setup/test-templates.js.map +0 -1
  88. package/dist/spec/generator.d.ts +0 -34
  89. package/dist/spec/generator.js +0 -227
  90. package/dist/spec/generator.js.map +0 -1
  91. package/dist/spec/interview.d.ts +0 -142
  92. package/dist/spec/interview.js +0 -287
  93. package/dist/spec/interview.js.map +0 -1
  94. package/dist/spec/linear-sync.d.ts +0 -48
  95. package/dist/spec/linear-sync.js +0 -125
  96. package/dist/spec/linear-sync.js.map +0 -1
  97. package/dist/spec/scanner.d.ts +0 -79
  98. package/dist/spec/scanner.js +0 -566
  99. package/dist/spec/scanner.js.map +0 -1
  100. package/dist/spec/templates.d.ts +0 -375
  101. package/dist/spec/templates.js +0 -95
  102. package/dist/spec/templates.js.map +0 -1
  103. package/dist/state/prd-status.d.ts +0 -62
  104. package/dist/state/prd-status.js +0 -122
  105. package/dist/state/prd-status.js.map +0 -1
  106. package/dist/state/reader.d.ts +0 -7
  107. package/dist/state/reader.js +0 -43
  108. package/dist/state/reader.js.map +0 -1
  109. package/dist/state/writer.d.ts +0 -21
  110. package/dist/state/writer.js +0 -106
  111. package/dist/state/writer.js.map +0 -1
  112. package/dist/team/consensus.d.ts +0 -28
  113. package/dist/team/consensus.js +0 -130
  114. package/dist/team/consensus.js.map +0 -1
  115. package/dist/team/index.d.ts +0 -4
  116. package/dist/team/index.js +0 -5
  117. package/dist/team/index.js.map +0 -1
  118. package/dist/team/lifecycle.d.ts +0 -37
  119. package/dist/team/lifecycle.js +0 -92
  120. package/dist/team/lifecycle.js.map +0 -1
  121. package/dist/team/reviewer.d.ts +0 -10
  122. package/dist/team/reviewer.js +0 -345
  123. package/dist/team/reviewer.js.map +0 -1
  124. package/dist/team/types.d.ts +0 -269
  125. package/dist/team/types.js +0 -70
  126. package/dist/team/types.js.map +0 -1
  127. package/dist/utils/browser.d.ts +0 -10
  128. package/dist/utils/browser.js +0 -96
  129. package/dist/utils/browser.js.map +0 -1
  130. package/dist/utils/platform.d.ts +0 -29
  131. package/dist/utils/platform.js +0 -90
  132. package/dist/utils/platform.js.map +0 -1
  133. package/dist/worktree/identity.d.ts +0 -9
  134. package/dist/worktree/identity.js +0 -32
  135. package/dist/worktree/identity.js.map +0 -1
  136. package/dist/worktree/parallel.d.ts +0 -87
  137. package/dist/worktree/parallel.js +0 -328
  138. package/dist/worktree/parallel.js.map +0 -1
  139. package/dist/worktree/session.d.ts +0 -67
  140. package/dist/worktree/session.js +0 -194
  141. package/dist/worktree/session.js.map +0 -1
  142. package/dist/worktree/state-merge.d.ts +0 -43
  143. package/dist/worktree/state-merge.js +0 -162
  144. package/dist/worktree/state-merge.js.map +0 -1
@@ -1,142 +0,0 @@
1
- /**
2
- * Interview state tracker and coverage analyzer for spec generation.
3
- *
4
- * Pure logic — no side effects, no I/O. All state is passed in and returned.
5
- * The LLM (via the /forge:spec skill) drives question generation using scan
6
- * results, prior answers, and coverage analysis. This module tracks state,
7
- * analyzes coverage gaps, and provides structured summaries for PRD generation.
8
- *
9
- * **Rendering contract:** {@link InterviewQuestion} objects are designed to be
10
- * rendered via Claude Code's **AskUserQuestion** tool with structured
11
- * multiple-choice options — they must NEVER be printed as numbered text in
12
- * chat. The caller (the /forge:spec skill) is responsible for converting each
13
- * question's `text` and `context` fields into an AskUserQuestion call with
14
- * 2-4 predefined options derived from scan context, plus an "Other" escape
15
- * hatch for free-text input.
16
- */
17
- import type { ScanAllResult } from "./scanner.js";
18
- /** PRD sections in priority order */
19
- export declare const PRD_SECTIONS: readonly ["problem_and_goals", "user_stories", "technical_approach", "scope", "milestones"];
20
- export type PRDSection = (typeof PRD_SECTIONS)[number];
21
- /** Human-readable labels for each section */
22
- export declare const SECTION_LABELS: Record<PRDSection, string>;
23
- /**
24
- * A single interview question.
25
- *
26
- * **Rendering:** Must be presented to the user via Claude Code's
27
- * AskUserQuestion tool with 2-4 multiple-choice options — NEVER as numbered
28
- * text in chat output. The `text` field becomes the AskUserQuestion question
29
- * string, and the `context` field provides scan-derived framing that informs
30
- * option generation.
31
- */
32
- export interface InterviewQuestion {
33
- id: string;
34
- section: PRDSection;
35
- /** The question to present via AskUserQuestion */
36
- text: string;
37
- /** Recommendation or observation from the codebase scan that motivates
38
- * this question and informs the multiple-choice options */
39
- context: string;
40
- /** Follow-up depth — 0 = top-level, 1+ = follow-up */
41
- depth: number;
42
- }
43
- /** A recorded answer to a question */
44
- export interface InterviewAnswer {
45
- questionId: string;
46
- section: PRDSection;
47
- answer: string;
48
- timestamp: number;
49
- }
50
- /** Coverage level for a section */
51
- export type CoverageLevel = "none" | "thin" | "moderate" | "thorough";
52
- /** Completeness status for a single section */
53
- export interface SectionStatus {
54
- section: PRDSection;
55
- answeredCount: number;
56
- totalWords: number;
57
- coverageLevel: CoverageLevel;
58
- hasGaps: boolean;
59
- }
60
- /** Full interview state — serializable, passed in/out of every function */
61
- export interface InterviewState {
62
- projectName: string;
63
- scanResults: ScanAllResult;
64
- questions: InterviewQuestion[];
65
- answers: InterviewAnswer[];
66
- /** Counter used to generate unique question IDs */
67
- nextQuestionId: number;
68
- /** Tracks which sections the engine has asked top-level questions for */
69
- askedSections: PRDSection[];
70
- /** Number of answers recorded since the last PRD draft update */
71
- answersSinceLastDraft: number;
72
- }
73
- /** Structured summary of gathered info for PRD generation */
74
- export interface InterviewSummary {
75
- projectName: string;
76
- sections: Record<PRDSection, {
77
- label: string;
78
- answers: Array<{
79
- question: string;
80
- answer: string;
81
- }>;
82
- coverageLevel: CoverageLevel;
83
- }>;
84
- scanResults: ScanAllResult;
85
- }
86
- /** Per-section coverage detail */
87
- export interface SectionCoverage {
88
- section: PRDSection;
89
- label: string;
90
- answeredCount: number;
91
- totalWords: number;
92
- coverageLevel: CoverageLevel;
93
- /** All subtopics for this section */
94
- topics: string[];
95
- /** Topics that appear in answers (simple substring match) */
96
- mentionedTopics: string[];
97
- /** topics − mentionedTopics */
98
- uncoveredTopics: string[];
99
- }
100
- /** Full coverage analysis across all sections */
101
- export interface CoverageAnalysis {
102
- sections: SectionCoverage[];
103
- overallLevel: CoverageLevel;
104
- hasGaps: boolean;
105
- }
106
- export declare const SECTION_TOPICS: Record<PRDSection, string[]>;
107
- /**
108
- * Initialize a new interview with codebase context.
109
- * The scan results inform the recommendations attached to questions.
110
- */
111
- export declare function createInterview(projectName: string, scanResults: ScanAllResult): InterviewState;
112
- /**
113
- * Register a question the LLM asked, for summary/tracking purposes.
114
- * The LLM drives question generation — this just records what was asked.
115
- */
116
- export declare function addQuestion(state: InterviewState, section: PRDSection, text: string, context: string, depth?: number): InterviewState;
117
- /**
118
- * Record the user's answer and return updated state.
119
- */
120
- export declare function recordAnswer(state: InterviewState, questionId: string, answer: string): InterviewState;
121
- /**
122
- * Returns true every 2-3 answers (triggers at 2, then every 3).
123
- * The caller is responsible for resetting the counter after updating the draft.
124
- */
125
- export declare function shouldUpdateDraft(state: InterviewState): boolean;
126
- /**
127
- * Reset the draft update counter (call after updating the PRD draft).
128
- */
129
- export declare function markDraftUpdated(state: InterviewState): InterviewState;
130
- /**
131
- * Get the completeness status for all sections.
132
- */
133
- export declare function getSectionStatuses(state: InterviewState): SectionStatus[];
134
- /**
135
- * Get detailed coverage analysis for all sections, including topic-level detail.
136
- * This is the primary tool for the LLM to decide what to ask next.
137
- */
138
- export declare function getCoverageAnalysis(state: InterviewState): CoverageAnalysis;
139
- /**
140
- * Build a structured summary of everything gathered, for PRD generation.
141
- */
142
- export declare function getInterviewSummary(state: InterviewState): InterviewSummary;
@@ -1,287 +0,0 @@
1
- /**
2
- * Interview state tracker and coverage analyzer for spec generation.
3
- *
4
- * Pure logic — no side effects, no I/O. All state is passed in and returned.
5
- * The LLM (via the /forge:spec skill) drives question generation using scan
6
- * results, prior answers, and coverage analysis. This module tracks state,
7
- * analyzes coverage gaps, and provides structured summaries for PRD generation.
8
- *
9
- * **Rendering contract:** {@link InterviewQuestion} objects are designed to be
10
- * rendered via Claude Code's **AskUserQuestion** tool with structured
11
- * multiple-choice options — they must NEVER be printed as numbered text in
12
- * chat. The caller (the /forge:spec skill) is responsible for converting each
13
- * question's `text` and `context` fields into an AskUserQuestion call with
14
- * 2-4 predefined options derived from scan context, plus an "Other" escape
15
- * hatch for free-text input.
16
- */
17
- // ---------------------------------------------------------------------------
18
- // Types
19
- // ---------------------------------------------------------------------------
20
- /** PRD sections in priority order */
21
- export const PRD_SECTIONS = [
22
- "problem_and_goals",
23
- "user_stories",
24
- "technical_approach",
25
- "scope",
26
- "milestones",
27
- ];
28
- /** Human-readable labels for each section */
29
- export const SECTION_LABELS = {
30
- problem_and_goals: "Problem & Goals",
31
- user_stories: "User Stories",
32
- technical_approach: "Technical Approach",
33
- scope: "Scope",
34
- milestones: "Milestones",
35
- };
36
- // ---------------------------------------------------------------------------
37
- // Section Topics — subtopic checklists the LLM uses for coverage analysis
38
- // ---------------------------------------------------------------------------
39
- export const SECTION_TOPICS = {
40
- problem_and_goals: [
41
- "core problem",
42
- "desired outcome",
43
- "success criteria",
44
- "impact/urgency",
45
- "current workarounds",
46
- "who feels the pain",
47
- ],
48
- user_stories: [
49
- "primary users",
50
- "user workflows step-by-step",
51
- "secondary users",
52
- "edge cases",
53
- "permissions/roles",
54
- "error states",
55
- ],
56
- technical_approach: [
57
- "architecture pattern",
58
- "data model/schema",
59
- "APIs/integrations",
60
- "auth/security",
61
- "performance requirements",
62
- "error handling",
63
- "existing code to leverage",
64
- ],
65
- scope: [
66
- "in scope boundaries",
67
- "out of scope",
68
- "sacred files/areas",
69
- "constraints",
70
- "future phases explicitly deferred",
71
- ],
72
- milestones: [
73
- "breakdown into chunks",
74
- "dependencies between milestones",
75
- "sizing (fits in one agent context?)",
76
- "verification criteria",
77
- "delivery order",
78
- "risk areas",
79
- ],
80
- };
81
- // ---------------------------------------------------------------------------
82
- // Interview Creation
83
- // ---------------------------------------------------------------------------
84
- /**
85
- * Initialize a new interview with codebase context.
86
- * The scan results inform the recommendations attached to questions.
87
- */
88
- export function createInterview(projectName, scanResults) {
89
- return {
90
- projectName,
91
- scanResults,
92
- questions: [],
93
- answers: [],
94
- nextQuestionId: 1,
95
- askedSections: [],
96
- answersSinceLastDraft: 0,
97
- };
98
- }
99
- // ---------------------------------------------------------------------------
100
- // Question Registration (LLM registers questions it asks for tracking)
101
- // ---------------------------------------------------------------------------
102
- /**
103
- * Register a question the LLM asked, for summary/tracking purposes.
104
- * The LLM drives question generation — this just records what was asked.
105
- */
106
- export function addQuestion(state, section, text, context, depth = 0) {
107
- const question = {
108
- id: `q${state.nextQuestionId}`,
109
- section,
110
- text,
111
- context,
112
- depth,
113
- };
114
- return {
115
- ...state,
116
- questions: [...state.questions, question],
117
- nextQuestionId: state.nextQuestionId + 1,
118
- askedSections: [
119
- ...new Set([...state.askedSections, section]),
120
- ],
121
- };
122
- }
123
- // ---------------------------------------------------------------------------
124
- // Answer Recording
125
- // ---------------------------------------------------------------------------
126
- /**
127
- * Record the user's answer and return updated state.
128
- */
129
- export function recordAnswer(state, questionId, answer) {
130
- const question = state.questions.find((q) => q.id === questionId);
131
- if (!question) {
132
- throw new Error(`Question not found: ${questionId}`);
133
- }
134
- const newAnswer = {
135
- questionId,
136
- section: question.section,
137
- answer,
138
- timestamp: Date.now(),
139
- };
140
- return {
141
- ...state,
142
- answers: [...state.answers, newAnswer],
143
- answersSinceLastDraft: state.answersSinceLastDraft + 1,
144
- };
145
- }
146
- // ---------------------------------------------------------------------------
147
- // Draft Update Check
148
- // ---------------------------------------------------------------------------
149
- /**
150
- * Returns true every 2-3 answers (triggers at 2, then every 3).
151
- * The caller is responsible for resetting the counter after updating the draft.
152
- */
153
- export function shouldUpdateDraft(state) {
154
- return state.answersSinceLastDraft >= 2;
155
- }
156
- /**
157
- * Reset the draft update counter (call after updating the PRD draft).
158
- */
159
- export function markDraftUpdated(state) {
160
- return {
161
- ...state,
162
- answersSinceLastDraft: 0,
163
- };
164
- }
165
- // ---------------------------------------------------------------------------
166
- // Section Statuses
167
- // ---------------------------------------------------------------------------
168
- /**
169
- * Compute the coverage level for a section based on answer count, word count,
170
- * and topic coverage.
171
- */
172
- function computeCoverageLevel(answeredCount, totalWords, topics, mentionedTopics) {
173
- if (answeredCount === 0)
174
- return "none";
175
- if (answeredCount === 1 || totalWords < 50)
176
- return "thin";
177
- const mostTopicsMentioned = topics.length === 0 || mentionedTopics.length >= topics.length * 0.6;
178
- if (answeredCount >= 4 || (totalWords >= 200 && mostTopicsMentioned)) {
179
- return "thorough";
180
- }
181
- if (answeredCount >= 2 && totalWords >= 50)
182
- return "moderate";
183
- return "thin";
184
- }
185
- /**
186
- * Find which SECTION_TOPICS appear in the section's answers (simple substring match).
187
- */
188
- function findMentionedTopics(answers, topics) {
189
- const combined = answers.join(" ").toLowerCase();
190
- return topics.filter((topic) => combined.includes(topic.toLowerCase()));
191
- }
192
- /**
193
- * Get the completeness status for all sections.
194
- */
195
- export function getSectionStatuses(state) {
196
- return PRD_SECTIONS.map((section) => {
197
- const sectionAnswers = state.answers.filter((a) => a.section === section);
198
- const answeredCount = sectionAnswers.length;
199
- const totalWords = sectionAnswers.reduce((sum, a) => sum + a.answer.split(/\s+/).filter(Boolean).length, 0);
200
- const topics = SECTION_TOPICS[section];
201
- const mentionedTopics = findMentionedTopics(sectionAnswers.map((a) => a.answer), topics);
202
- const uncoveredTopics = topics.filter((t) => !mentionedTopics.includes(t));
203
- const coverageLevel = computeCoverageLevel(answeredCount, totalWords, topics, mentionedTopics);
204
- return {
205
- section,
206
- answeredCount,
207
- totalWords,
208
- coverageLevel,
209
- hasGaps: uncoveredTopics.length > 0,
210
- };
211
- });
212
- }
213
- // ---------------------------------------------------------------------------
214
- // Coverage Analysis
215
- // ---------------------------------------------------------------------------
216
- /**
217
- * Get detailed coverage analysis for all sections, including topic-level detail.
218
- * This is the primary tool for the LLM to decide what to ask next.
219
- */
220
- export function getCoverageAnalysis(state) {
221
- const sections = PRD_SECTIONS.map((section) => {
222
- const sectionAnswers = state.answers.filter((a) => a.section === section);
223
- const answeredCount = sectionAnswers.length;
224
- const totalWords = sectionAnswers.reduce((sum, a) => sum + a.answer.split(/\s+/).filter(Boolean).length, 0);
225
- const topics = SECTION_TOPICS[section];
226
- const mentionedTopics = findMentionedTopics(sectionAnswers.map((a) => a.answer), topics);
227
- const uncoveredTopics = topics.filter((t) => !mentionedTopics.includes(t));
228
- const coverageLevel = computeCoverageLevel(answeredCount, totalWords, topics, mentionedTopics);
229
- return {
230
- section,
231
- label: SECTION_LABELS[section],
232
- answeredCount,
233
- totalWords,
234
- coverageLevel,
235
- topics,
236
- mentionedTopics,
237
- uncoveredTopics,
238
- };
239
- });
240
- const levels = sections.map((s) => s.coverageLevel);
241
- const hasGaps = sections.some((s) => s.uncoveredTopics.length > 0);
242
- let overallLevel;
243
- if (levels.every((l) => l === "thorough")) {
244
- overallLevel = "thorough";
245
- }
246
- else if (levels.every((l) => l === "thorough" || l === "moderate")) {
247
- overallLevel = "moderate";
248
- }
249
- else if (levels.some((l) => l !== "none")) {
250
- overallLevel = "thin";
251
- }
252
- else {
253
- overallLevel = "none";
254
- }
255
- return { sections, overallLevel, hasGaps };
256
- }
257
- // ---------------------------------------------------------------------------
258
- // Interview Summary
259
- // ---------------------------------------------------------------------------
260
- /**
261
- * Build a structured summary of everything gathered, for PRD generation.
262
- */
263
- export function getInterviewSummary(state) {
264
- const statuses = getSectionStatuses(state);
265
- const sections = {};
266
- for (const section of PRD_SECTIONS) {
267
- const sectionAnswers = state.answers.filter((a) => a.section === section);
268
- const status = statuses.find((s) => s.section === section);
269
- sections[section] = {
270
- label: SECTION_LABELS[section],
271
- answers: sectionAnswers.map((a) => {
272
- const question = state.questions.find((q) => q.id === a.questionId);
273
- return {
274
- question: question?.text ?? "(unknown question)",
275
- answer: a.answer,
276
- };
277
- }),
278
- coverageLevel: status.coverageLevel,
279
- };
280
- }
281
- return {
282
- projectName: state.projectName,
283
- sections,
284
- scanResults: state.scanResults,
285
- };
286
- }
287
- //# sourceMappingURL=interview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interview.js","sourceRoot":"","sources":["../../src/spec/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,mBAAmB;IACnB,cAAc;IACd,oBAAoB;IACpB,OAAO;IACP,YAAY;CACJ,CAAC;AAGX,6CAA6C;AAC7C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACxD,iBAAiB,EAAE,iBAAiB;IACpC,YAAY,EAAE,cAAc;IAC5B,kBAAkB,EAAE,oBAAoB;IACxC,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;CACzB,CAAC;AA6FF,8EAA8E;AAC9E,0EAA0E;AAC1E,8EAA8E;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAiC;IAC1D,iBAAiB,EAAE;QACjB,cAAc;QACd,iBAAiB;QACjB,kBAAkB;QAClB,gBAAgB;QAChB,qBAAqB;QACrB,oBAAoB;KACrB;IACD,YAAY,EAAE;QACZ,eAAe;QACf,6BAA6B;QAC7B,iBAAiB;QACjB,YAAY;QACZ,mBAAmB;QACnB,cAAc;KACf;IACD,kBAAkB,EAAE;QAClB,sBAAsB;QACtB,mBAAmB;QACnB,mBAAmB;QACnB,eAAe;QACf,0BAA0B;QAC1B,gBAAgB;QAChB,2BAA2B;KAC5B;IACD,KAAK,EAAE;QACL,qBAAqB;QACrB,cAAc;QACd,oBAAoB;QACpB,aAAa;QACb,mCAAmC;KACpC;IACD,UAAU,EAAE;QACV,uBAAuB;QACvB,iCAAiC;QACjC,qCAAqC;QACrC,uBAAuB;QACvB,gBAAgB;QAChB,YAAY;KACb;CACF,CAAC;AAEF,8EAA8E;AAC9E,qBAAqB;AACrB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AAC;QAC1E,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAE,CAAC;QAE5D,QAAQ,CAAC,OAAO,CAAC,GAAG;YAClB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC;YAC9B,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;gBACpE,OAAO;oBACL,QAAQ,EAAE,QAAQ,EAAE,IAAI,IAAI,oBAAoB;oBAChD,MAAM,EAAE,CAAC,CAAC,MAAM;iBACjB,CAAC;YACJ,CAAC,CAAC;YACF,aAAa,EAAE,MAAM,CAAC,aAAa;SACpC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,QAAQ;QACR,WAAW,EAAE,KAAK,CAAC,WAAW;KAC/B,CAAC;AACJ,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Syncs a PRD to Linear: creates milestones, issues (one per user story),
3
- * and transitions the project to "Planned".
4
- */
5
- import { LinearClient } from "../linear/client.js";
6
- import type { LinearMilestone, LinearIssue } from "../linear/client.js";
7
- import type { PRDData } from "./templates.js";
8
- export interface SyncedMilestone {
9
- prdNumber: number;
10
- name: string;
11
- linearMilestone: LinearMilestone;
12
- issues: SyncedIssue[];
13
- }
14
- export interface SyncedIssue {
15
- userStoryId: string;
16
- title: string;
17
- linearIssue: LinearIssue;
18
- }
19
- export interface IssueError {
20
- userStoryId: string;
21
- title: string;
22
- error: string;
23
- }
24
- export interface MilestoneError {
25
- prdNumber: number;
26
- name: string;
27
- error: string;
28
- }
29
- export interface SyncResult {
30
- projectId: string;
31
- milestonesCreated: number;
32
- issuesCreated: number;
33
- milestones: SyncedMilestone[];
34
- errors: {
35
- milestones: MilestoneError[];
36
- issues: IssueError[];
37
- };
38
- }
39
- /**
40
- * Sync a PRD to Linear:
41
- * 1. Create milestones (one per PRD milestone)
42
- * 2. Create issues under each milestone (one per user story)
43
- * 3. Transition project to "Planned"
44
- *
45
- * Handles partial failures — if a milestone or issue fails to create,
46
- * the error is captured and the sync continues with the rest.
47
- */
48
- export declare function syncPRDToLinear(prdData: PRDData, projectId: string, teamId: string, client: LinearClient): Promise<SyncResult>;
@@ -1,125 +0,0 @@
1
- /**
2
- * Syncs a PRD to Linear: creates milestones, issues (one per user story),
3
- * and transitions the project to "Planned".
4
- */
5
- import { createProjectMilestone } from "../linear/milestones.js";
6
- import { createMilestoneIssue } from "../linear/issues.js";
7
- import { transitionProject } from "../linear/projects.js";
8
- // ---------------------------------------------------------------------------
9
- // Helpers
10
- // ---------------------------------------------------------------------------
11
- /**
12
- * Build issue descriptions from user stories, including acceptance criteria.
13
- */
14
- function buildIssueDescription(story) {
15
- const lines = [story.description];
16
- if (story.acceptanceCriteria.length > 0) {
17
- lines.push("", "## Acceptance Criteria");
18
- for (const criterion of story.acceptanceCriteria) {
19
- lines.push(`- [ ] ${criterion}`);
20
- }
21
- }
22
- return lines.join("\n");
23
- }
24
- /**
25
- * Resolve which user stories belong to a milestone.
26
- * Each milestone's `waves` contain agents with tasks — we map all
27
- * user stories to the milestone based on the PRD structure.
28
- * Since milestones don't have explicit userStory references in the schema,
29
- * we distribute stories evenly across milestones, or assign all to the
30
- * first milestone if there's only one.
31
- */
32
- function assignStoriesToMilestones(milestones, stories) {
33
- const map = new Map();
34
- if (milestones.length === 0)
35
- return map;
36
- // Initialize all milestones with empty arrays
37
- for (const m of milestones) {
38
- map.set(m.number, []);
39
- }
40
- // Distribute stories across milestones round-robin
41
- for (let i = 0; i < stories.length; i++) {
42
- const milestoneIdx = i % milestones.length;
43
- const milestoneNumber = milestones[milestoneIdx].number;
44
- map.get(milestoneNumber).push(stories[i]);
45
- }
46
- return map;
47
- }
48
- // ---------------------------------------------------------------------------
49
- // Main
50
- // ---------------------------------------------------------------------------
51
- /**
52
- * Sync a PRD to Linear:
53
- * 1. Create milestones (one per PRD milestone)
54
- * 2. Create issues under each milestone (one per user story)
55
- * 3. Transition project to "Planned"
56
- *
57
- * Handles partial failures — if a milestone or issue fails to create,
58
- * the error is captured and the sync continues with the rest.
59
- */
60
- export async function syncPRDToLinear(prdData, projectId, teamId, client) {
61
- const result = {
62
- projectId,
63
- milestonesCreated: 0,
64
- issuesCreated: 0,
65
- milestones: [],
66
- errors: {
67
- milestones: [],
68
- issues: [],
69
- },
70
- };
71
- const storyMap = assignStoriesToMilestones(prdData.milestones, prdData.userStories);
72
- // 1. Create milestones and their issues
73
- for (const milestone of prdData.milestones) {
74
- let linearMilestone;
75
- try {
76
- linearMilestone = await createProjectMilestone(client, projectId, `M${milestone.number}: ${milestone.name}`, milestone.goal);
77
- }
78
- catch (err) {
79
- result.errors.milestones.push({
80
- prdNumber: milestone.number,
81
- name: milestone.name,
82
- error: err instanceof Error ? err.message : String(err),
83
- });
84
- continue; // Skip issues for this milestone
85
- }
86
- result.milestonesCreated++;
87
- const syncedMilestone = {
88
- prdNumber: milestone.number,
89
- name: milestone.name,
90
- linearMilestone,
91
- issues: [],
92
- };
93
- // Create issues for user stories assigned to this milestone
94
- const stories = storyMap.get(milestone.number) ?? [];
95
- for (const story of stories) {
96
- try {
97
- const linearIssue = await createMilestoneIssue(client, {
98
- title: `${story.id}: ${story.title}`,
99
- description: buildIssueDescription(story),
100
- teamId,
101
- projectId,
102
- milestoneId: linearMilestone.id,
103
- });
104
- syncedMilestone.issues.push({
105
- userStoryId: story.id,
106
- title: story.title,
107
- linearIssue,
108
- });
109
- result.issuesCreated++;
110
- }
111
- catch (err) {
112
- result.errors.issues.push({
113
- userStoryId: story.id,
114
- title: story.title,
115
- error: err instanceof Error ? err.message : String(err),
116
- });
117
- }
118
- }
119
- result.milestones.push(syncedMilestone);
120
- }
121
- // 2. Transition project to "Planned"
122
- await transitionProject(client, projectId, "Planned");
123
- return result;
124
- }
125
- //# sourceMappingURL=linear-sync.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linear-sync.js","sourceRoot":"","sources":["../../src/spec/linear-sync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA2C1D,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;GAEG;AACH,SAAS,qBAAqB,CAAC,KAAgB;IAC7C,MAAM,KAAK,GAAa,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5C,IAAI,KAAK,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC;QACzC,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;YACjD,KAAK,CAAC,IAAI,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAChC,UAAuB,EACvB,OAAoB;IAEpB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAuB,CAAC;IAE3C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAExC,8CAA8C;IAC9C,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,mDAAmD;IACnD,KAAK,IAA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