millhouse 0.3.5 → 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 (75) hide show
  1. package/README.md +88 -161
  2. package/dist/analysis/issue-analyzer.d.ts +6 -1
  3. package/dist/analysis/issue-analyzer.d.ts.map +1 -1
  4. package/dist/analysis/issue-analyzer.js +45 -13
  5. package/dist/analysis/issue-analyzer.js.map +1 -1
  6. package/dist/analysis/plan-parser.d.ts +7 -1
  7. package/dist/analysis/plan-parser.d.ts.map +1 -1
  8. package/dist/analysis/plan-parser.js +98 -21
  9. package/dist/analysis/plan-parser.js.map +1 -1
  10. package/dist/cli/cleanup.d.ts +1 -1
  11. package/dist/cli/cleanup.d.ts.map +1 -1
  12. package/dist/cli/cleanup.js +25 -29
  13. package/dist/cli/cleanup.js.map +1 -1
  14. package/dist/cli/commands/init.d.ts +6 -0
  15. package/dist/cli/commands/init.d.ts.map +1 -0
  16. package/dist/cli/commands/init.js +156 -0
  17. package/dist/cli/commands/init.js.map +1 -0
  18. package/dist/cli/commands/list.d.ts +6 -0
  19. package/dist/cli/commands/list.d.ts.map +1 -0
  20. package/dist/cli/commands/list.js +111 -0
  21. package/dist/cli/commands/list.js.map +1 -0
  22. package/dist/cli/commands/load.d.ts +2 -0
  23. package/dist/cli/commands/load.d.ts.map +1 -0
  24. package/dist/cli/commands/load.js +111 -0
  25. package/dist/cli/commands/load.js.map +1 -0
  26. package/dist/cli/commands/resume.d.ts.map +1 -1
  27. package/dist/cli/commands/resume.js +29 -24
  28. package/dist/cli/commands/resume.js.map +1 -1
  29. package/dist/cli/commands/run.d.ts +2 -3
  30. package/dist/cli/commands/run.d.ts.map +1 -1
  31. package/dist/cli/commands/run.js +44 -237
  32. package/dist/cli/commands/run.js.map +1 -1
  33. package/dist/cli/commands/save.d.ts +2 -0
  34. package/dist/cli/commands/save.d.ts.map +1 -0
  35. package/dist/cli/commands/save.js +220 -0
  36. package/dist/cli/commands/save.js.map +1 -0
  37. package/dist/cli/commands/setup.js +3 -3
  38. package/dist/cli/progress-display.d.ts +10 -1
  39. package/dist/cli/progress-display.d.ts.map +1 -1
  40. package/dist/cli/progress-display.js +107 -17
  41. package/dist/cli/progress-display.js.map +1 -1
  42. package/dist/core/orchestrator.d.ts +11 -12
  43. package/dist/core/orchestrator.d.ts.map +1 -1
  44. package/dist/core/orchestrator.js +159 -113
  45. package/dist/core/orchestrator.js.map +1 -1
  46. package/dist/core/scheduler.d.ts +6 -1
  47. package/dist/core/scheduler.d.ts.map +1 -1
  48. package/dist/core/scheduler.js +48 -9
  49. package/dist/core/scheduler.js.map +1 -1
  50. package/dist/execution/claude-runner.d.ts +2 -2
  51. package/dist/execution/claude-runner.d.ts.map +1 -1
  52. package/dist/execution/claude-runner.js +1 -1
  53. package/dist/execution/claude-runner.js.map +1 -1
  54. package/dist/execution/worktree-manager.d.ts.map +1 -1
  55. package/dist/execution/worktree-manager.js +5 -6
  56. package/dist/execution/worktree-manager.js.map +1 -1
  57. package/dist/index.js +30 -29
  58. package/dist/index.js.map +1 -1
  59. package/dist/storage/json-store.d.ts +1 -0
  60. package/dist/storage/json-store.d.ts.map +1 -1
  61. package/dist/storage/json-store.js +36 -0
  62. package/dist/storage/json-store.js.map +1 -1
  63. package/dist/storage/worklist-store.d.ts +19 -0
  64. package/dist/storage/worklist-store.d.ts.map +1 -0
  65. package/dist/storage/worklist-store.js +131 -0
  66. package/dist/storage/worklist-store.js.map +1 -0
  67. package/dist/types.d.ts +39 -70
  68. package/dist/types.d.ts.map +1 -1
  69. package/dist/types.js +3 -24
  70. package/dist/types.js.map +1 -1
  71. package/package.json +3 -4
  72. package/prompts/implementation.prompt.md +34 -35
  73. package/prompts/issue-analysis.prompt.md +56 -22
  74. package/prompts/plan-analysis.prompt.md +47 -36
  75. package/commands/millhouse.md +0 -223
@@ -0,0 +1,131 @@
1
+ import { promises as fs } from 'node:fs';
2
+ import path from 'node:path';
3
+ const MILLHOUSE_DIR = '.millhouse';
4
+ const WORKLIST_FILE = 'worklist.json';
5
+ export class WorklistStore {
6
+ basePath;
7
+ constructor(basePath = process.cwd()) {
8
+ this.basePath = basePath;
9
+ }
10
+ get millhouseDir() {
11
+ return path.join(this.basePath, MILLHOUSE_DIR);
12
+ }
13
+ get worklistPath() {
14
+ return path.join(this.millhouseDir, WORKLIST_FILE);
15
+ }
16
+ async ensureDirectory() {
17
+ await fs.mkdir(this.millhouseDir, { recursive: true });
18
+ await this.ensureGitignore();
19
+ }
20
+ async ensureGitignore() {
21
+ const gitignorePath = path.join(this.basePath, '.gitignore');
22
+ const entry = '.millhouse';
23
+ let modified = false;
24
+ try {
25
+ const content = await fs.readFile(gitignorePath, 'utf-8');
26
+ // Check if .millhouse is already in gitignore (as whole line)
27
+ const lines = content.split('\n');
28
+ if (lines.some(line => line.trim() === entry)) {
29
+ return; // Already present
30
+ }
31
+ // Append to existing gitignore
32
+ const newContent = content.endsWith('\n') ? content + entry + '\n' : content + '\n' + entry + '\n';
33
+ await fs.writeFile(gitignorePath, newContent);
34
+ modified = true;
35
+ }
36
+ catch {
37
+ // No .gitignore exists, create one
38
+ await fs.writeFile(gitignorePath, entry + '\n');
39
+ modified = true;
40
+ }
41
+ // Commit the gitignore change
42
+ if (modified) {
43
+ const { execSync } = await import('node:child_process');
44
+ try {
45
+ execSync('git add .gitignore && git commit -m "chore: add .millhouse to .gitignore"', {
46
+ cwd: this.basePath,
47
+ stdio: 'pipe',
48
+ });
49
+ }
50
+ catch {
51
+ // Ignore commit failures (e.g., not a git repo)
52
+ }
53
+ }
54
+ }
55
+ async exists() {
56
+ try {
57
+ await fs.access(this.worklistPath);
58
+ return true;
59
+ }
60
+ catch {
61
+ return false;
62
+ }
63
+ }
64
+ async load() {
65
+ try {
66
+ const content = await fs.readFile(this.worklistPath, 'utf-8');
67
+ return JSON.parse(content);
68
+ }
69
+ catch {
70
+ return null;
71
+ }
72
+ }
73
+ async save(worklist) {
74
+ await this.ensureDirectory();
75
+ worklist.updatedAt = new Date().toISOString();
76
+ await fs.writeFile(this.worklistPath, JSON.stringify(worklist, null, 2));
77
+ }
78
+ async delete() {
79
+ try {
80
+ await fs.unlink(this.worklistPath);
81
+ }
82
+ catch {
83
+ // Ignore if file doesn't exist
84
+ }
85
+ }
86
+ async updateItem(itemId, updates) {
87
+ const worklist = await this.load();
88
+ if (!worklist) {
89
+ throw new Error('No worklist found');
90
+ }
91
+ const item = worklist.items.find(i => i.id === itemId);
92
+ if (!item) {
93
+ throw new Error(`Item ${itemId} not found in worklist`);
94
+ }
95
+ Object.assign(item, updates);
96
+ await this.save(worklist);
97
+ }
98
+ async markCompleted(itemId) {
99
+ await this.updateItem(itemId, {
100
+ status: 'completed',
101
+ completedAt: new Date().toISOString(),
102
+ });
103
+ }
104
+ async markFailed(itemId, error) {
105
+ await this.updateItem(itemId, {
106
+ status: 'failed',
107
+ error,
108
+ });
109
+ }
110
+ async getPendingItems() {
111
+ const worklist = await this.load();
112
+ if (!worklist) {
113
+ return [];
114
+ }
115
+ return worklist.items.filter(i => i.status === 'pending');
116
+ }
117
+ async getReadyItems() {
118
+ const worklist = await this.load();
119
+ if (!worklist) {
120
+ return [];
121
+ }
122
+ const completedIds = new Set(worklist.items.filter(i => i.status === 'completed').map(i => i.id));
123
+ return worklist.items.filter(item => {
124
+ if (item.status !== 'pending')
125
+ return false;
126
+ // Check if all dependencies are completed
127
+ return item.dependencies.every(dep => completedIds.has(dep));
128
+ });
129
+ }
130
+ }
131
+ //# sourceMappingURL=worklist-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worklist-store.js","sourceRoot":"","sources":["../../src/storage/worklist-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,aAAa,GAAG,eAAe,CAAC;AAEtC,MAAM,OAAO,aAAa;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;IACL,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,GAAG,CAC1B,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACpE,CAAC;QAEF,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YAClC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;gBAAE,OAAO,KAAK,CAAC;YAC5C,0CAA0C;YAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { z } from 'zod';
2
1
  export interface WorkItem {
3
2
  id: number;
4
3
  title: string;
@@ -22,6 +21,8 @@ export interface AnalyzedIssue extends GitHubIssue {
22
21
  affectedPaths: string[];
23
22
  dependencies: number[];
24
23
  analyzedAt: string;
24
+ githubIssueNumber?: number;
25
+ noWorkNeeded?: boolean;
25
26
  }
26
27
  export declare function issueToWorkItem(issue: AnalyzedIssue): AnalyzedWorkItem;
27
28
  export type TaskStatus = 'queued' | 'blocked' | 'ready' | 'in-progress' | 'completed' | 'failed';
@@ -40,6 +41,7 @@ export interface RunState {
40
41
  createdAt: string;
41
42
  updatedAt: string;
42
43
  status: 'running' | 'completed' | 'failed' | 'interrupted';
44
+ mode?: 'plan' | 'github';
43
45
  baseBranch: string;
44
46
  runBranch: string;
45
47
  issues: AnalyzedIssue[];
@@ -56,75 +58,29 @@ export interface WorktreeInfo {
56
58
  branch: string;
57
59
  createdAt: string;
58
60
  }
59
- export declare const ConfigSchema: z.ZodObject<{
60
- execution: z.ZodDefault<z.ZodObject<{
61
- concurrency: z.ZodDefault<z.ZodNumber>;
62
- baseBranch: z.ZodDefault<z.ZodString>;
63
- maxBudgetPerIssue: z.ZodDefault<z.ZodNumber>;
64
- maxTotalBudget: z.ZodDefault<z.ZodNumber>;
65
- continueOnError: z.ZodDefault<z.ZodBoolean>;
66
- }, "strip", z.ZodTypeAny, {
67
- concurrency: number;
68
- baseBranch: string;
69
- maxBudgetPerIssue: number;
70
- maxTotalBudget: number;
71
- continueOnError: boolean;
72
- }, {
73
- concurrency?: number | undefined;
74
- baseBranch?: string | undefined;
75
- maxBudgetPerIssue?: number | undefined;
76
- maxTotalBudget?: number | undefined;
77
- continueOnError?: boolean | undefined;
78
- }>>;
79
- pullRequests: z.ZodDefault<z.ZodObject<{
80
- createAsDraft: z.ZodDefault<z.ZodBoolean>;
81
- mergeStrategy: z.ZodDefault<z.ZodEnum<["merge", "squash", "rebase"]>>;
82
- branchPrefix: z.ZodDefault<z.ZodString>;
83
- }, "strip", z.ZodTypeAny, {
84
- createAsDraft: boolean;
85
- mergeStrategy: "merge" | "squash" | "rebase";
86
- branchPrefix: string;
87
- }, {
88
- createAsDraft?: boolean | undefined;
89
- mergeStrategy?: "merge" | "squash" | "rebase" | undefined;
90
- branchPrefix?: string | undefined;
91
- }>>;
92
- }, "strip", z.ZodTypeAny, {
93
- execution: {
94
- concurrency: number;
95
- baseBranch: string;
96
- maxBudgetPerIssue: number;
97
- maxTotalBudget: number;
98
- continueOnError: boolean;
99
- };
100
- pullRequests: {
101
- createAsDraft: boolean;
102
- mergeStrategy: "merge" | "squash" | "rebase";
103
- branchPrefix: string;
104
- };
105
- }, {
106
- execution?: {
107
- concurrency?: number | undefined;
108
- baseBranch?: string | undefined;
109
- maxBudgetPerIssue?: number | undefined;
110
- maxTotalBudget?: number | undefined;
111
- continueOnError?: boolean | undefined;
112
- } | undefined;
113
- pullRequests?: {
114
- createAsDraft?: boolean | undefined;
115
- mergeStrategy?: "merge" | "squash" | "rebase" | undefined;
116
- branchPrefix?: string | undefined;
117
- } | undefined;
118
- }>;
119
- export type Config = z.infer<typeof ConfigSchema>;
120
- export declare const MILLHOUSE_LABELS: {
121
- readonly QUEUED: "millhouse:queued";
122
- readonly IN_PROGRESS: "millhouse:in-progress";
123
- readonly BLOCKED: "millhouse:blocked";
124
- readonly FAILED: "millhouse:failed";
125
- readonly DONE: "millhouse:done";
126
- };
127
- export type MillhouseLabel = typeof MILLHOUSE_LABELS[keyof typeof MILLHOUSE_LABELS];
61
+ export type WorklistItemStatus = 'pending' | 'completed' | 'failed';
62
+ export interface WorklistItem {
63
+ id: number;
64
+ title: string;
65
+ body: string;
66
+ dependencies: number[];
67
+ status: WorklistItemStatus;
68
+ githubIssueNumber?: number;
69
+ noWorkNeeded?: boolean;
70
+ startedAt?: string;
71
+ completedAt?: string;
72
+ error?: string;
73
+ }
74
+ export interface Worklist {
75
+ version: 1;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ source: 'plan' | 'github';
79
+ title?: string;
80
+ description?: string;
81
+ indexIssueNumber?: number;
82
+ items: WorklistItem[];
83
+ }
128
84
  export type SchedulerEvent = {
129
85
  type: 'task-started';
130
86
  issueNumber: number;
@@ -140,4 +96,17 @@ export type SchedulerEvent = {
140
96
  type: 'tasks-unblocked';
141
97
  issueNumbers: number[];
142
98
  };
99
+ export interface JsonPlanItem {
100
+ id: number;
101
+ title: string;
102
+ body: string;
103
+ dependencies: number[];
104
+ }
105
+ export interface JsonPlan {
106
+ version: 1;
107
+ name?: string;
108
+ createdAt: string;
109
+ sourcePlan?: string;
110
+ items: JsonPlanItem[];
111
+ }
143
112
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAGD,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AAOD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,gBAAgB,CAStE;AAGD,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,CAAC;AAGb,MAAM,WAAW,IAAI;IACnB,W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MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
package/dist/types.js CHANGED
@@ -1,4 +1,6 @@
1
- import { z } from 'zod';
1
+ // =============================================================================
2
+ // Work Items (abstraction for both GitHub issues and local items)
3
+ // =============================================================================
2
4
  // Convert AnalyzedIssue to AnalyzedWorkItem
3
5
  export function issueToWorkItem(issue) {
4
6
  return {
@@ -10,27 +12,4 @@ export function issueToWorkItem(issue) {
10
12
  analyzedAt: issue.analyzedAt,
11
13
  };
12
14
  }
13
- // Configuration schema
14
- export const ConfigSchema = z.object({
15
- execution: z.object({
16
- concurrency: z.number().min(1).max(16).default(8),
17
- baseBranch: z.string().default('main'),
18
- maxBudgetPerIssue: z.number().positive().default(5.0),
19
- maxTotalBudget: z.number().positive().default(100.0),
20
- continueOnError: z.boolean().default(true),
21
- }).default({}),
22
- pullRequests: z.object({
23
- createAsDraft: z.boolean().default(true),
24
- mergeStrategy: z.enum(['merge', 'squash', 'rebase']).default('squash'),
25
- branchPrefix: z.string().default('millhouse/issue-'),
26
- }).default({}),
27
- });
28
- // Millhouse labels
29
- export const MILLHOUSE_LABELS = {
30
- QUEUED: 'millhouse:queued',
31
- IN_PROGRESS: 'millhouse:in-progress',
32
- BLOCKED: 'millhouse:blocked',
33
- FAILED: 'millhouse:failed',
34
- DONE: 'millhouse:done',
35
- };
36
15
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,4CAA4C;AAC5C,MAAM,UAAU,eAAe,CAAC,KAAoB;IA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CAAC,CAAC;AAIH,mBAAmB;AACnB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,kBAAkB;IAC1B,WAAW,EAAE,uBAAuB;IACpC,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,gBAAgB;CACd,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kEAAkE;AAClE,gFAAgF;AAwChF,4CAA4C;AAC5C,MAAM,UAAU,eAAe,CAAC,KAAoB;IAClD,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,MAAM;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "millhouse",
3
- "version": "0.3.5",
4
- "description": "Orchestrate parallel Claude Code instances to implement GitHub issues or plan files",
3
+ "version": "1.0.1",
4
+ "description": "Orchestrate parallel Claude Code instances to implement work items",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -9,7 +9,6 @@
9
9
  },
10
10
  "files": [
11
11
  "dist",
12
- "commands",
13
12
  "prompts"
14
13
  ],
15
14
  "scripts": {
@@ -36,7 +35,7 @@
36
35
  "commander": "^12.1.0",
37
36
  "graphlib": "^2.1.8",
38
37
  "ora": "^8.0.1",
39
- "zod": "^3.23.0"
38
+ "string-width": "^8.1.0"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@types/graphlib": "^2.1.12",
@@ -62,68 +62,67 @@ You are an expert software engineer implementing a specific task. Follow these s
62
62
 
63
63
  **DO NOT REPORT SUCCESS IF ANY TESTS FAIL OR ANY ACCEPTANCE CRITERIA ARE NOT MET.**
64
64
 
65
- ### 5. Commit and Update Run Branch
65
+ ### 5. Commit Your Changes
66
66
 
67
- First, commit your changes on your issue branch:
67
+ Stage and commit your changes on your issue branch:
68
68
 
69
69
  - Stage your changes with `git add <files>`
70
70
  - Create a single commit with a comprehensive message that includes:
71
71
  - A clear summary line describing the change
72
- - A detailed body explaining:
73
- - What was implemented
74
- - Key files added or modified
75
- - How acceptance criteria were satisfied
76
- - Any important implementation decisions
72
+ - A detailed body explaining what was implemented
77
73
  - End with "Fixes #{{issue.number}}"
78
74
 
79
- Then, merge your changes INTO the run branch:
75
+ ### 6. CRITICAL: Merge Into Run Branch
76
+
77
+ **⚠️ THIS STEP IS MANDATORY - YOUR WORK WILL BE LOST IF YOU SKIP IT ⚠️**
78
+
79
+ You MUST run this exact script to merge your changes into the run branch. Copy and paste it exactly:
80
80
 
81
81
  ```bash
82
- # Loop until we successfully update the run branch
83
82
  while true; do
84
- # Merge the latest run branch into your issue branch
85
- git merge millhouse/run-{{runId}} --no-edit
86
-
87
- # If there are merge conflicts, resolve them:
88
- # - Carefully examine each conflict
89
- # - Preserve both your changes and changes from other workers
90
- # - Test that everything still works after resolving
91
- # - Stage resolved files with: git add <resolved-files>
92
- # - Complete the merge with: git commit --no-edit
93
-
94
- # Update the run branch to point to your merged commit
95
- # This will fail if another worker updated it since we merged
83
+ git merge millhouse/run-{{runId}} --no-edit || {
84
+ echo "Merge conflict - resolve and commit, then re-run this script"
85
+ exit 1
86
+ }
96
87
  if git push . HEAD:millhouse/run-{{runId}}; then
97
- # Record the merge commit for verification
98
88
  git rev-parse HEAD > MILLHOUSE_MERGE_COMMIT
99
- echo "Successfully updated run branch"
89
+ echo "SUCCESS: Changes merged into run branch"
100
90
  break
101
91
  fi
102
-
103
- echo "Run branch was updated by another worker, merging again..."
92
+ echo "Retrying merge (another worker updated the branch)..."
104
93
  done
105
94
  ```
106
95
 
107
- **IMPORTANT**: You MUST successfully update the run branch before exiting. The orchestrator relies on this to collect all changes.
96
+ **After running the script, verify:**
97
+ 1. You see "SUCCESS: Changes merged into run branch"
98
+ 2. The file `MILLHOUSE_MERGE_COMMIT` exists in your working directory
99
+
100
+ If there are merge conflicts:
101
+ 1. Resolve each conflict carefully, preserving both your changes and others'
102
+ 2. Stage resolved files: `git add <resolved-files>`
103
+ 3. Complete the merge: `git commit --no-edit`
104
+ 4. Re-run the script above
105
+
106
+ **DO NOT EXIT WITHOUT COMPLETING THIS STEP. The orchestrator verifies the MILLHOUSE_MERGE_COMMIT file exists.**
108
107
 
109
108
  ## Important Rules
110
109
 
111
- 1. **You are working in a git worktree** on your own issue branch
110
+ 1. **⚠️ YOU MUST MERGE INTO THE RUN BRANCH BEFORE EXITING ⚠️**
111
+ - Run the merge script in Step 6 - this is NOT optional
112
+ - Verify MILLHOUSE_MERGE_COMMIT file exists before finishing
113
+ - If you skip this, ALL YOUR WORK WILL BE LOST
114
+
115
+ 2. **You are working in a git worktree** on your own issue branch
112
116
  - Your working directory is isolated from other parallel tasks
113
- - After committing, you MUST merge your changes into the run branch `millhouse/run-{{runId}}`
117
+ - Other workers are running in parallel - merge conflicts are possible
114
118
 
115
- 2. **Do NOT create a pull request**
119
+ 3. **Do NOT create a pull request**
116
120
  - The orchestrator handles PR creation after all tasks complete
117
121
  - Just commit your changes with proper messages
118
122
 
119
- 3. **Stay focused on this task**
123
+ 4. **Stay focused on this task**
120
124
  - Don't fix unrelated problems you notice
121
125
  - Don't refactor code beyond what's needed for this task
122
- - If you notice important problems, mention them in your summary
123
-
124
- 4. **Handle blockers appropriately**
125
- - If you encounter a blocker that requires human input, exit with an error
126
- - Don't try to work around fundamental problems
127
126
 
128
127
  5. **Keep changes minimal**
129
128
  - Your changes will be merged with other parallel tasks
@@ -1,4 +1,4 @@
1
- Analyze these GitHub issues and determine their dependencies and execution order.
1
+ Analyze these GitHub issues to determine their dependencies and optimal execution order.
2
2
 
3
3
  ## Issues to Analyze
4
4
 
@@ -8,27 +8,61 @@ Analyze these GitHub issues and determine their dependencies and execution order
8
8
 
9
9
  ## Your Task
10
10
 
11
- Analyze each issue and determine:
11
+ **DO NOT use TodoWrite, TaskCreate, or any task/todo tools. Only use Read, Glob, Grep, and Bash.**
12
+
13
+ 1. First, use Read, Glob, and Grep to explore the codebase structure
14
+ 2. Then analyze each issue semantically to determine dependencies
15
+
16
+ For each issue determine:
12
17
  1. **dependencies**: Which issues MUST be completed BEFORE this issue can start
13
18
  2. **affectedPaths**: File paths this issue will likely create or modify
19
+ 3. **noWorkNeeded**: True if this is a meta/index issue that requires no actual code changes (e.g., tracking issues, index issues that just link to other issues, documentation-only issues)
20
+
21
+ Also provide a summary title and description for this entire set of issues.
22
+
23
+ ## Dependency Analysis Guidelines
24
+
25
+ Analyze the **semantic meaning** of each issue, not just explicit keywords. Consider:
26
+
27
+ - **Explicit mentions**: "depends on #X", "after #X", "blocked by #X", "requires #X"
28
+ - **Logical ordering**: If issue A creates something that issue B uses, B depends on A
29
+ - **Feature flow**: Setup/infrastructure issues before features that use them
30
+ - **Data dependencies**: Schema/model changes before code that uses those models
31
+ - **API dependencies**: API endpoints before UI that calls them
32
+
33
+ Issues written by humans may not have explicit dependency markers - use your understanding of software development to infer the correct order.
34
+
35
+ ---
36
+
37
+ ## Required Output Format
38
+
39
+ After exploring the codebase, output ONLY a JSON object. No other text after the JSON.
40
+
41
+ ```json
42
+ {
43
+ "title": "Short summary title for all issues (e.g. 'Add user authentication')",
44
+ "description": "A 1-2 sentence summary of what these issues accomplish together.",
45
+ "issues": [
46
+ {
47
+ "issueNumber": 1,
48
+ "dependencies": [],
49
+ "affectedPaths": ["src/path/to/file.ts"],
50
+ "noWorkNeeded": false
51
+ },
52
+ {
53
+ "issueNumber": 2,
54
+ "dependencies": [1],
55
+ "affectedPaths": ["src/other/file.ts"],
56
+ "noWorkNeeded": false
57
+ },
58
+ {
59
+ "issueNumber": 3,
60
+ "dependencies": [1, 2],
61
+ "affectedPaths": [],
62
+ "noWorkNeeded": true
63
+ }
64
+ ]
65
+ }
66
+ ```
14
67
 
15
- Respond with ONLY a JSON array (no markdown, no explanation):
16
- [
17
- {
18
- "issueNumber": 1,
19
- "dependencies": [],
20
- "affectedPaths": ["src/path/to/file.ts"]
21
- },
22
- {
23
- "issueNumber": 2,
24
- "dependencies": [1],
25
- "affectedPaths": ["src/other/file.ts"]
26
- }
27
- ]
28
-
29
- Rules:
30
- - Look for explicit dependency mentions: "depends on #X", "after #X", "blocked by #X", "requires #X"
31
- - Also infer logical dependencies (e.g., if issue B imports from a file that issue A creates)
32
- - Only include dependencies between issues in this list
33
- - affectedPaths should be specific file paths mentioned or implied
34
- - Respond with ONLY valid JSON, nothing else
68
+ The JSON must be valid. Only include dependencies between issues in this list.
@@ -1,4 +1,4 @@
1
- Analyze this plan and break it into discrete, implementable work items.
1
+ Break this plan into discrete work items for parallel execution.
2
2
 
3
3
  ## Plan
4
4
 
@@ -8,38 +8,49 @@ Analyze this plan and break it into discrete, implementable work items.
8
8
 
9
9
  ## Your Task
10
10
 
11
- Break this plan into discrete work items that can be implemented independently (but may have dependencies on each other).
12
-
13
- For each work item, provide:
14
- 1. **id**: Sequential number starting from 1
15
- 2. **title**: Short descriptive title
16
- 3. **body**: Full implementation details including:
17
- - What to create/modify
18
- - Specific file paths
19
- - Function signatures or interfaces
20
- - Testing instructions
21
- - Acceptance criteria
22
- 4. **dependencies**: IDs of work items that MUST be completed before this one
23
-
24
- Respond with ONLY a JSON array (no markdown, no explanation):
25
- [
26
- {
27
- "id": 1,
28
- "title": "Initialize project",
29
- "body": "Create the project structure...\n\n## Implementation\n...",
30
- "dependencies": []
31
- },
32
- {
33
- "id": 2,
34
- "title": "Create utilities",
35
- "body": "Create utility functions...\n\n**Depends on #1**\n\n## Implementation\n...",
36
- "dependencies": [1]
37
- }
38
- ]
39
-
40
- Rules:
41
- - Each work item should be self-contained with all context needed to implement it
42
- - Include "**Depends on #N**" in the body text for any dependencies
43
- - Work items should be small enough to implement in one session
44
- - Include specific file paths, function signatures, and acceptance criteria
45
- - Respond with ONLY valid JSON, nothing else
11
+ 1. Use Read, Glob, and Grep tools to explore the codebase
12
+ 2. Output a JSON object with summary and work items
13
+
14
+ **DO NOT use TodoWrite, TaskCreate, or any task/todo tools. Only use Read, Glob, Grep, and Bash.**
15
+
16
+ ## Context
17
+
18
+ Work items will be executed by parallel Claude instances in isolated contexts. Each item must be completely self-contained with all information needed.
19
+
20
+ ## Work Item Guidelines
21
+
22
+ - Each item should be completable in one session
23
+ - Include exact file paths, function signatures, patterns to follow
24
+ - Use `"dependencies": [1, 2]` for prerequisite items
25
+ - Only add dependencies that are truly required
26
+
27
+ ---
28
+
29
+ ## Required Output Format
30
+
31
+ After exploring the codebase, output ONLY a JSON object. No other text after the JSON.
32
+
33
+ Use \n for newlines in body text. Keep body content concise.
34
+
35
+ ```json
36
+ {
37
+ "title": "Short summary title for the whole plan (e.g. 'Add user authentication')",
38
+ "description": "A 1-2 sentence summary of what this plan accomplishes overall.",
39
+ "items": [
40
+ {
41
+ "id": 1,
42
+ "title": "Short title",
43
+ "body": "Implementation details. File: src/foo.ts. Pattern: follow existing style.",
44
+ "dependencies": []
45
+ },
46
+ {
47
+ "id": 2,
48
+ "title": "Another task",
49
+ "body": "More details here.",
50
+ "dependencies": [1]
51
+ }
52
+ ]
53
+ }
54
+ ```
55
+
56
+ The JSON must be valid. Use \n for newlines, escape quotes with backslash.