prloom 0.1.0 → 0.1.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.
- package/dist/cli/index.js +137 -26
- package/package.json +1 -1
- package/prompts/designer_edit.md +26 -0
- package/prompts/designer_new.md +55 -0
- package/prompts/designer.md +0 -36
package/dist/cli/index.js
CHANGED
|
@@ -16688,42 +16688,88 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
16688
16688
|
var BUILTIN_PROMPTS;
|
|
16689
16689
|
var init_prompt_sources = __esm(() => {
|
|
16690
16690
|
BUILTIN_PROMPTS = {
|
|
16691
|
-
|
|
16691
|
+
designer_new: `# Designer: Create a New Plan
|
|
16692
16692
|
|
|
16693
|
-
You are helping
|
|
16693
|
+
You are helping a software engineer **plan** a coding task for prloom.
|
|
16694
16694
|
|
|
16695
|
-
|
|
16695
|
+
> [!CAUTION] > **You are PLANNING, not building.**
|
|
16696
|
+
>
|
|
16697
|
+
> - Do NOT modify any code files
|
|
16698
|
+
> - The ONLY file you may edit is: \`{{plan_path}}\`
|
|
16699
|
+
|
|
16700
|
+
## Your Philosophy
|
|
16701
|
+
|
|
16702
|
+
You are working with a technical user who knows what they want. Your job is to **extract requirements**, not to make decisions for them.
|
|
16703
|
+
|
|
16704
|
+
- **Ask clarifying questions** — do not assume
|
|
16705
|
+
- **Do NOT fill in gaps** — wait for the user to provide details
|
|
16706
|
+
- **Defer to the user's judgment** on design and implementation
|
|
16707
|
+
- Only fill in details if the user explicitly says "fill in the details" or similar
|
|
16708
|
+
|
|
16709
|
+
The user will give you information bit by bit. Your responsibility is to synthesize their requirements into a structured plan.
|
|
16710
|
+
|
|
16711
|
+
{{#if user_description}}
|
|
16712
|
+
|
|
16713
|
+
## User's Initial Request
|
|
16714
|
+
|
|
16715
|
+
> {{user_description}}
|
|
16716
|
+
|
|
16717
|
+
Ask clarifying questions before filling in the plan. What files? What approach? Any constraints?
|
|
16718
|
+
{{else}}
|
|
16719
|
+
|
|
16720
|
+
## Your First Step
|
|
16721
|
+
|
|
16722
|
+
Ask the user: **What would you like to build?**
|
|
16723
|
+
|
|
16724
|
+
Then ask follow-up questions:
|
|
16696
16725
|
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16700
|
-
|
|
16726
|
+
- How should it work?
|
|
16727
|
+
- What files are involved?
|
|
16728
|
+
- Any constraints or preferences?
|
|
16729
|
+
- What are the acceptance criteria?
|
|
16730
|
+
{{/if}}
|
|
16701
16731
|
|
|
16702
16732
|
## Plan Structure
|
|
16703
16733
|
|
|
16704
|
-
|
|
16705
|
-
Your job is to fill in the sections of the existing file; do NOT create new plan files elsewhere.
|
|
16734
|
+
Once you have the requirements, fill in:
|
|
16706
16735
|
|
|
16707
|
-
- **Objective**:
|
|
16708
|
-
- **Context**:
|
|
16709
|
-
- **TODO**:
|
|
16736
|
+
- **Objective**: What will be built (1-2 sentences)
|
|
16737
|
+
- **Context**: Files to modify, test commands, constraints
|
|
16738
|
+
- **TODO**: Small, sequential tasks
|
|
16710
16739
|
|
|
16711
|
-
|
|
16740
|
+
Leave the frontmatter alone.
|
|
16712
16741
|
|
|
16713
|
-
##
|
|
16742
|
+
## Runtime Context
|
|
16714
16743
|
|
|
16715
|
-
-
|
|
16716
|
-
-
|
|
16717
|
-
|
|
16744
|
+
- Base branch: \`{{base_branch}}\`
|
|
16745
|
+
- Worker agent: \`{{worker_agent}}\`
|
|
16746
|
+
`,
|
|
16747
|
+
designer_edit: `# Designer: Edit an Existing Plan
|
|
16718
16748
|
|
|
16719
|
-
|
|
16749
|
+
You are helping a software engineer **refine** an existing plan.
|
|
16720
16750
|
|
|
16721
|
-
|
|
16751
|
+
> [!CAUTION] > **You are PLANNING, not building.**
|
|
16752
|
+
>
|
|
16753
|
+
> - Do NOT modify any code files
|
|
16754
|
+
> - The ONLY file you may edit is: \`{{plan_path}}\`
|
|
16722
16755
|
|
|
16723
|
-
|
|
16756
|
+
## Current Contents
|
|
16724
16757
|
|
|
16725
16758
|
{{existing_plan}}
|
|
16726
|
-
|
|
16759
|
+
|
|
16760
|
+
## Your Philosophy
|
|
16761
|
+
|
|
16762
|
+
- **Ask what changes the user wants** — do not assume
|
|
16763
|
+
- **Do NOT fill in gaps** — defer to the user
|
|
16764
|
+
- Only make changes the user explicitly requests
|
|
16765
|
+
|
|
16766
|
+
## Your Role
|
|
16767
|
+
|
|
16768
|
+
1. Ask what needs to change
|
|
16769
|
+
2. Update Objective, Context, or TODOs per user's direction
|
|
16770
|
+
3. Keep TODOs small and sequential
|
|
16771
|
+
|
|
16772
|
+
Leave the frontmatter alone.
|
|
16727
16773
|
`,
|
|
16728
16774
|
worker: `# Worker Instructions
|
|
16729
16775
|
|
|
@@ -16840,11 +16886,22 @@ function renderWorkerPrompt(repoRoot, plan, todo) {
|
|
|
16840
16886
|
plan: plan.raw
|
|
16841
16887
|
});
|
|
16842
16888
|
}
|
|
16843
|
-
function
|
|
16844
|
-
const template =
|
|
16889
|
+
function renderDesignerNewPrompt(planPath, baseBranch, workerAgent, userDescription) {
|
|
16890
|
+
const template = BUILTIN_PROMPTS["designer_new"];
|
|
16891
|
+
const compiled = import_handlebars.default.compile(template);
|
|
16892
|
+
return compiled({
|
|
16893
|
+
plan_path: planPath,
|
|
16894
|
+
base_branch: baseBranch,
|
|
16895
|
+
worker_agent: workerAgent,
|
|
16896
|
+
user_description: userDescription ?? ""
|
|
16897
|
+
});
|
|
16898
|
+
}
|
|
16899
|
+
function renderDesignerEditPrompt(planPath, existingPlan) {
|
|
16900
|
+
const template = BUILTIN_PROMPTS["designer_edit"];
|
|
16845
16901
|
const compiled = import_handlebars.default.compile(template);
|
|
16846
16902
|
return compiled({
|
|
16847
|
-
|
|
16903
|
+
plan_path: planPath,
|
|
16904
|
+
existing_plan: existingPlan
|
|
16848
16905
|
});
|
|
16849
16906
|
}
|
|
16850
16907
|
function renderTriagePrompt(repoRoot, plan, feedback) {
|
|
@@ -17209,7 +17266,7 @@ async function runNew(repoRoot, planId, agentOverride, noDesigner) {
|
|
|
17209
17266
|
console.log(`Designer agent: ${designerAgent}`);
|
|
17210
17267
|
console.log("");
|
|
17211
17268
|
console.log("Starting Designer session to fill in the plan...");
|
|
17212
|
-
const prompt =
|
|
17269
|
+
const prompt = renderDesignerNewPrompt(planPath, baseBranch, workerAgent);
|
|
17213
17270
|
await adapter.interactive({ cwd: repoRoot, prompt });
|
|
17214
17271
|
console.log("Designer session ended.");
|
|
17215
17272
|
console.log("Plan is now in inbox. Run 'prloom start' to dispatch.");
|
|
@@ -17266,7 +17323,7 @@ async function runEdit(repoRoot, planId, agentOverride, noDesigner) {
|
|
|
17266
17323
|
const agentName = agentOverride ?? config.agents.designer ?? config.agents.default;
|
|
17267
17324
|
const adapter = getAdapter(agentName);
|
|
17268
17325
|
console.log(`Agent: ${agentName}`);
|
|
17269
|
-
const prompt =
|
|
17326
|
+
const prompt = renderDesignerEditPrompt(planPath, existingPlan);
|
|
17270
17327
|
await adapter.interactive({ cwd, prompt });
|
|
17271
17328
|
console.log("Designer session ended.");
|
|
17272
17329
|
}
|
|
@@ -18029,6 +18086,57 @@ var init_poll = __esm(() => {
|
|
|
18029
18086
|
init_github();
|
|
18030
18087
|
});
|
|
18031
18088
|
|
|
18089
|
+
// src/cli/clean.ts
|
|
18090
|
+
var exports_clean = {};
|
|
18091
|
+
__export(exports_clean, {
|
|
18092
|
+
runClean: () => runClean
|
|
18093
|
+
});
|
|
18094
|
+
import { statSync as statSync6 } from "fs";
|
|
18095
|
+
async function runClean(repoRoot) {
|
|
18096
|
+
const planIds = listInboxPlanIds(repoRoot);
|
|
18097
|
+
if (planIds.length === 0) {
|
|
18098
|
+
console.log("Inbox is empty. Nothing to clean.");
|
|
18099
|
+
return;
|
|
18100
|
+
}
|
|
18101
|
+
console.log("Inbox plans:");
|
|
18102
|
+
console.log("");
|
|
18103
|
+
for (const id of planIds) {
|
|
18104
|
+
const filePath = getInboxPath(repoRoot, id);
|
|
18105
|
+
try {
|
|
18106
|
+
const stat = statSync6(filePath);
|
|
18107
|
+
const created = stat.birthtime.toLocaleString();
|
|
18108
|
+
console.log(` ${id}.md (created: ${created})`);
|
|
18109
|
+
} catch {
|
|
18110
|
+
console.log(` ${id}.md`);
|
|
18111
|
+
}
|
|
18112
|
+
}
|
|
18113
|
+
console.log("");
|
|
18114
|
+
console.log(`Found ${planIds.length} plan(s) in inbox.`);
|
|
18115
|
+
console.log("");
|
|
18116
|
+
const readline = await import("readline");
|
|
18117
|
+
const rl = readline.createInterface({
|
|
18118
|
+
input: process.stdin,
|
|
18119
|
+
output: process.stdout
|
|
18120
|
+
});
|
|
18121
|
+
const answer = await new Promise((resolve6) => {
|
|
18122
|
+
rl.question("Delete all inbox plans? [y/N] ", resolve6);
|
|
18123
|
+
});
|
|
18124
|
+
rl.close();
|
|
18125
|
+
if (answer.toLowerCase() !== "y") {
|
|
18126
|
+
console.log("Aborted.");
|
|
18127
|
+
return;
|
|
18128
|
+
}
|
|
18129
|
+
for (const id of planIds) {
|
|
18130
|
+
deleteInboxPlan(repoRoot, id);
|
|
18131
|
+
console.log(`Deleted: ${id}.md`);
|
|
18132
|
+
}
|
|
18133
|
+
console.log("");
|
|
18134
|
+
console.log("Inbox cleaned.");
|
|
18135
|
+
}
|
|
18136
|
+
var init_clean = __esm(() => {
|
|
18137
|
+
init_state();
|
|
18138
|
+
});
|
|
18139
|
+
|
|
18032
18140
|
// node_modules/yargs/lib/platform-shims/esm.mjs
|
|
18033
18141
|
import { notStrictEqual, strictEqual } from "assert";
|
|
18034
18142
|
|
|
@@ -23423,4 +23531,7 @@ yargs_default(hideBin(process.argv)).scriptName("prloom").usage("$0 <command> [o
|
|
|
23423
23531
|
const { runPoll: runPoll2 } = await Promise.resolve().then(() => (init_poll(), exports_poll));
|
|
23424
23532
|
await runPoll2(repoRoot, planId);
|
|
23425
23533
|
}
|
|
23534
|
+
}).command("clean", "Remove stale inbox plans", () => {}, async () => {
|
|
23535
|
+
const { runClean: runClean2 } = await Promise.resolve().then(() => (init_clean(), exports_clean));
|
|
23536
|
+
await runClean2(await getRepoRoot());
|
|
23426
23537
|
}).demandCommand(1, "You need to specify a command").strict().help().parse();
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Designer: Edit an Existing Plan
|
|
2
|
+
|
|
3
|
+
You are helping a software engineer **refine** an existing plan.
|
|
4
|
+
|
|
5
|
+
> [!CAUTION] > **You are PLANNING, not building.**
|
|
6
|
+
>
|
|
7
|
+
> - Do NOT modify any code files
|
|
8
|
+
> - The ONLY file you may edit is: `{{plan_path}}`
|
|
9
|
+
|
|
10
|
+
## Current Contents
|
|
11
|
+
|
|
12
|
+
{{existing_plan}}
|
|
13
|
+
|
|
14
|
+
## Your Philosophy
|
|
15
|
+
|
|
16
|
+
- **Ask what changes the user wants** — do not assume
|
|
17
|
+
- **Do NOT fill in gaps** — defer to the user
|
|
18
|
+
- Only make changes the user explicitly requests
|
|
19
|
+
|
|
20
|
+
## Your Role
|
|
21
|
+
|
|
22
|
+
1. Ask what needs to change
|
|
23
|
+
2. Update Objective, Context, or TODOs per user's direction
|
|
24
|
+
3. Keep TODOs small and sequential
|
|
25
|
+
|
|
26
|
+
Leave the frontmatter alone.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Designer: Create a New Plan
|
|
2
|
+
|
|
3
|
+
You are helping a software engineer **plan** a coding task for prloom.
|
|
4
|
+
|
|
5
|
+
> [!CAUTION] > **You are PLANNING, not building.**
|
|
6
|
+
>
|
|
7
|
+
> - Do NOT modify any code files
|
|
8
|
+
> - The ONLY file you may edit is: `{{plan_path}}`
|
|
9
|
+
|
|
10
|
+
## Your Philosophy
|
|
11
|
+
|
|
12
|
+
You are working with a technical user who knows what they want. Your job is to **extract requirements**, not to make decisions for them.
|
|
13
|
+
|
|
14
|
+
- **Ask clarifying questions** — do not assume
|
|
15
|
+
- **Do NOT fill in gaps** — wait for the user to provide details
|
|
16
|
+
- **Defer to the user's judgment** on design and implementation
|
|
17
|
+
- Only fill in details if the user explicitly says "fill in the details" or similar
|
|
18
|
+
|
|
19
|
+
The user will give you information bit by bit. Your responsibility is to synthesize their requirements into a structured plan.
|
|
20
|
+
|
|
21
|
+
{{#if user_description}}
|
|
22
|
+
|
|
23
|
+
## User's Initial Request
|
|
24
|
+
|
|
25
|
+
> {{user_description}}
|
|
26
|
+
|
|
27
|
+
Ask clarifying questions before filling in the plan. What files? What approach? Any constraints?
|
|
28
|
+
{{else}}
|
|
29
|
+
|
|
30
|
+
## Your First Step
|
|
31
|
+
|
|
32
|
+
Ask the user: **What would you like to build?**
|
|
33
|
+
|
|
34
|
+
Then ask follow-up questions:
|
|
35
|
+
|
|
36
|
+
- How should it work?
|
|
37
|
+
- What files are involved?
|
|
38
|
+
- Any constraints or preferences?
|
|
39
|
+
- What are the acceptance criteria?
|
|
40
|
+
{{/if}}
|
|
41
|
+
|
|
42
|
+
## Plan Structure
|
|
43
|
+
|
|
44
|
+
Once you have the requirements, fill in:
|
|
45
|
+
|
|
46
|
+
- **Objective**: What will be built (1-2 sentences)
|
|
47
|
+
- **Context**: Files to modify, test commands, constraints
|
|
48
|
+
- **TODO**: Small, sequential tasks
|
|
49
|
+
|
|
50
|
+
Leave the frontmatter alone.
|
|
51
|
+
|
|
52
|
+
## Runtime Context
|
|
53
|
+
|
|
54
|
+
- Base branch: `{{base_branch}}`
|
|
55
|
+
- Worker agent: `{{worker_agent}}`
|
package/prompts/designer.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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}}
|