prloom 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,164 @@
1
+ # PRLoom Integration
2
+
3
+ PRLoom is a CLI tool that orchestrates coding work through **plans** - markdown files that describe what needs to be built. Each plan contains an objective, context, and a TODO checklist. PRLoom manages the lifecycle: creating worktrees, opening PRs, and tracking progress.
4
+
5
+ ## What is a Plan?
6
+
7
+ A plan is a markdown file with YAML frontmatter that describes a unit of work:
8
+
9
+ ```markdown
10
+ ---
11
+ id: add-user-auth
12
+ status: queued
13
+ agent: manual
14
+ base_branch: main
15
+ ---
16
+
17
+ ## Objective
18
+
19
+ Add user authentication with email/password login.
20
+
21
+ ## Context
22
+
23
+ - Auth library: `better-auth`
24
+ - Database: SQLite via Drizzle ORM
25
+ - Run tests: `bun test`
26
+
27
+ ## TODO
28
+
29
+ - [ ] Create users table migration
30
+ - [ ] Add login/signup API routes
31
+ - [ ] Add session middleware
32
+
33
+ ## Progress Log
34
+
35
+ <!-- Append entries as you complete work -->
36
+ ```
37
+
38
+ ## Plan Lifecycle
39
+
40
+ 1. **Create** - `prloom new <id> --agent manual --no-designer` creates a plan in `.prloom/inbox/<id>.md`
41
+ 2. **Edit** - Fill in the Objective, Context, and TODO sections
42
+ 3. **Dispatch** - When `prloom start` runs, the plan is moved to a git worktree and a draft PR is opened
43
+ 4. **Execute** - Complete each TODO, mark checkboxes, append to Progress Log
44
+ 5. **Complete** - When all TODOs are done, the PR is marked ready for review
45
+
46
+ ## CLI Commands
47
+
48
+ | Command | Description |
49
+ | ---------------------------------------------- | ------------------------------------------- |
50
+ | `prloom init` | Initialize prloom in a repository |
51
+ | `prloom new <id> --agent manual --no-designer` | Create a new plan skeleton |
52
+ | `prloom status` | Show all plans with their worktree paths |
53
+ | `prloom edit <id> --no-designer` | Print the path to an existing plan |
54
+ | `prloom poll <id>` | Fetch and display PR feedback |
55
+ | `prloom start` | Start the dispatcher (manages PR lifecycle) |
56
+
57
+ ## Creating a New Plan
58
+
59
+ ```bash
60
+ prloom new my-feature --agent manual --no-designer
61
+ ```
62
+
63
+ Output:
64
+
65
+ ```
66
+ Created plan in inbox: .prloom/inbox/my-feature.md
67
+ Base branch: main
68
+ Worker agent: manual
69
+
70
+ Plan skeleton created. Edit manually or use your IDE.
71
+ Run 'prloom start' to dispatch when ready.
72
+ ```
73
+
74
+ The plan is now at `.prloom/inbox/my-feature.md`. Edit it to add your Objective, Context, and TODOs.
75
+
76
+ ## Finding Your Worktree
77
+
78
+ After `prloom start` ingests the plan:
79
+
80
+ ```bash
81
+ prloom status
82
+ ```
83
+
84
+ Output:
85
+
86
+ ```
87
+ INBOX (pending dispatch)
88
+ ────────────────────────────────────────────────────────────
89
+ (no inbox plans)
90
+
91
+ ACTIVE PLANS
92
+ ────────────────────────────────────────────────────────────
93
+ my-feature
94
+ Status: active
95
+ Agent: manual
96
+ PR: PR #42
97
+ Worktree: /Users/dev/.prloom-worktrees/my-feature
98
+ Plan: /Users/dev/.prloom-worktrees/my-feature/plans/my-feature.md
99
+
100
+ ────────────────────────────────────────────────────────────
101
+ COMMANDS:
102
+ prloom new <id> --agent manual --no-designer Create a new plan
103
+ prloom poll <id> View PR feedback
104
+ prloom edit <id> --no-designer Get plan path
105
+ ```
106
+
107
+ Open the worktree directory in your editor. The plan file is at `plans/<id>.md`.
108
+
109
+ ## Completing a TODO
110
+
111
+ For each unchecked item (`- [ ] ...`):
112
+
113
+ 1. Read the task description
114
+ 2. Implement the change in code
115
+ 3. Mark the checkbox: `- [x] Task description`
116
+ 4. Add a progress entry:
117
+
118
+ ```
119
+ ## Progress Log
120
+
121
+ - 2026-01-04: Completed users table migration
122
+ ```
123
+
124
+ 5. Run any tests listed in the Context section
125
+ 6. Commit and push:
126
+ ```bash
127
+ git add -A
128
+ git commit -m "[prloom] my-feature: users table migration"
129
+ git push
130
+ ```
131
+
132
+ ## Checking PR Feedback
133
+
134
+ ```bash
135
+ prloom poll my-feature
136
+ ```
137
+
138
+ Output:
139
+
140
+ ```
141
+ PR FEEDBACK: my-feature
142
+ PR #42 | Status: active
143
+ ────────────────────────────────────────────────────────────
144
+
145
+ [1/4/2026] reviewer-name (comment)
146
+ Can you add input validation here?
147
+
148
+ [1/4/2026] reviewer-name (inline comment)
149
+ File: src/routes/login.ts:45
150
+ This should handle the case where email is missing.
151
+
152
+ ────────────────────────────────────────────────────────────
153
+
154
+ NEXT STEPS:
155
+ 1. Review the feedback above
156
+ 2. Add new TODO items to the plan if needed
157
+ 3. Implement fixes in the worktree
158
+ 4. Commit and push changes
159
+
160
+ Worktree: /Users/dev/.prloom-worktrees/my-feature
161
+ Plan: /Users/dev/.prloom-worktrees/my-feature/plans/my-feature.md
162
+ ```
163
+
164
+ Address the feedback by adding TODO items and implementing fixes.
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "prloom",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "bin": {
6
+ "prloom": "./dist/cli/index.js"
7
+ },
8
+ "files": [
9
+ "dist/**/*",
10
+ "README.md",
11
+ "LICENSE",
12
+ "prompts/**/*",
13
+ "manual_agent.md"
14
+ ],
15
+ "scripts": {
16
+ "gen:prompts": "bun run scripts/generate_prompts.ts",
17
+ "build": "bun run gen:prompts && bun build src/cli/index.ts --outdir dist/cli --target node",
18
+ "dev": "bun run gen:prompts && bun run src/cli/index.ts",
19
+ "test": "bun run gen:prompts && bun test",
20
+ "prepack": "bun run build"
21
+ },
22
+ "devDependencies": {
23
+ "@types/bun": "latest",
24
+ "@types/node": "^25.0.3",
25
+ "@types/yargs": "^17.0.35"
26
+ },
27
+ "peerDependencies": {
28
+ "typescript": "^5"
29
+ },
30
+ "dependencies": {
31
+ "execa": "^9.6.1",
32
+ "glob": "^13.0.0",
33
+ "gray-matter": "^4.0.3",
34
+ "handlebars": "^4.7.8",
35
+ "nanoid": "^5.1.6",
36
+ "yargs": "^18.0.0"
37
+ }
38
+ }
@@ -0,0 +1,36 @@
1
+ # Designer Instructions
2
+
3
+ You are helping the user create or refine a plan for a coding task.
4
+
5
+ ## Your Role
6
+
7
+ 1. Clarify what they want to build
8
+ 2. Discuss implementation approach if they want input
9
+ 3. Identify files, test commands, and context needed
10
+ 4. Fill in the plan sections
11
+
12
+ ## Plan Structure
13
+
14
+ A plan file has already been created at the correct location (either `.prloom/inbox/<id>.md` before dispatch, or `plans/<id>.md` inside a worktree after dispatch).
15
+ Your job is to fill in the sections of the existing file; do NOT create new plan files elsewhere.
16
+
17
+ - **Objective**: Clear, specific description of what will be built
18
+ - **Context**: Key files to modify, test commands, architecture notes, constraints
19
+ - **TODO**: Granular, sequential tasks (keep them small and completable)
20
+
21
+ The frontmatter (`id`, `status`, `agent`) is managed by the system — do not modify it.
22
+
23
+ ## Guidelines
24
+
25
+ - TODOs should be small, completable in one session
26
+ - Include test commands in Context if tests should be run
27
+ - Inline all necessary context — Workers don't read other files
28
+
29
+ {{#if existing_plan}}
30
+
31
+ ## Existing Plan
32
+
33
+ The user wants to edit this existing plan:
34
+
35
+ {{existing_plan}}
36
+ {{/if}}
@@ -0,0 +1,63 @@
1
+ # Review Triage
2
+
3
+ You are processing PR feedback for an active plan. Your job is to:
4
+
5
+ 1. Analyze all review feedback (comments, reviews, inline comments)
6
+ 2. Create specific, actionable TODO items for the plan
7
+ 3. Group related feedback into fewer tasks where appropriate
8
+ 4. Detect if a rebase was requested
9
+ 5. Compose a reply message for the reviewer(s)
10
+
11
+ ## Feedback to Process
12
+
13
+ {{feedback}}
14
+
15
+ ## Current Plan
16
+
17
+ {{plan}}
18
+
19
+ ## Instructions
20
+
21
+ ### Adding TODOs
22
+
23
+ - Edit the plan file directly to add actionable TODOs
24
+ - Add them at the end of the ## TODO section
25
+ - Use the format: `- [ ] Specific actionable task`
26
+ - Do NOT create vague tasks like "Address review comments"
27
+ - Create SPECIFIC tasks like:
28
+ - "Update function X to handle null input"
29
+ - "Add test for Y edge case"
30
+ - "Rename Z for clarity"
31
+ - "Remove deprecated code in file A"
32
+ - Group related comments into single tasks when logical
33
+ - If the plan status is `done` and you add TODOs, change status to `active`
34
+
35
+ ### Writing the Result File
36
+
37
+ After editing the plan, you MUST write `.prloom/triage-result.json` with:
38
+
39
+ ```json
40
+ {
41
+ "reply_markdown": "## Triage Response\n\nThank you for your feedback...",
42
+ "rebase_requested": false
43
+ }
44
+ ```
45
+
46
+ **Required fields:**
47
+
48
+ - `reply_markdown`: Your response to post on the PR (ALWAYS required, even for no-ops)
49
+ - `rebase_requested`: Set to `true` if any comment mentions rebase, update branch, or similar
50
+
51
+ ### Reply Guidelines
52
+
53
+ - Be polite and professional
54
+ - Acknowledge specific feedback points
55
+ - Explain what TODOs were created
56
+ - If no changes needed, explain why
57
+ - Keep it concise
58
+
59
+ ## Critical Rules
60
+
61
+ 1. You MUST write `.prloom/triage-result.json` even if you add no TODOs
62
+ 2. The result file must contain valid JSON only, no markdown wrapper
63
+ 3. Failure to write the result file will mark the plan as blocked
@@ -0,0 +1,33 @@
1
+ # Worker Instructions
2
+
3
+ You are implementing exactly ONE task from this plan.
4
+
5
+ ## Your Task
6
+
7
+ {{current_todo}}
8
+
9
+ ## Rules
10
+
11
+ 1. Implement only the specified task
12
+ 2. Update the plan file:
13
+ - Mark the task as `[x]`
14
+ - Add a Progress Log entry describing what you did
15
+ 3. Run tests if specified in the Context section
16
+ 4. If you get stuck and cannot complete the task:
17
+ - Set frontmatter `status: blocked`
18
+ - Explain the blocker in the Progress Log
19
+ 5. If this is the final TODO and all tasks are complete:
20
+ - Set frontmatter `status: done`
21
+ 6. Exit when complete
22
+
23
+ ## Important
24
+
25
+ - Do NOT work on other TODOs, only the one specified above
26
+ - The Progress Log is how humans track your work — be specific
27
+ - If tests are specified, they must pass before marking complete
28
+
29
+ ---
30
+
31
+ # Plan
32
+
33
+ {{plan}}