@arvorco/relentless 0.1.25 → 0.1.26
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.
|
@@ -90,7 +90,11 @@ Read and analyze project documentation:
|
|
|
90
90
|
|
|
91
91
|
## Step 4: Generate Personalized Prompt
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
Load the base template from `templates/prompt.md` and personalize it:
|
|
94
|
+
|
|
95
|
+
**Base Template Location:** `templates/prompt.md`
|
|
96
|
+
|
|
97
|
+
Create a personalized `prompt.md` with:
|
|
94
98
|
|
|
95
99
|
**Section 1: Quality Gates**
|
|
96
100
|
```markdown
|
package/package.json
CHANGED
package/src/init/scaffolder.ts
CHANGED
|
@@ -49,9 +49,17 @@ const relentlessRoot = getRelentlessRoot();
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Files to create in the relentless/ directory
|
|
52
|
+
* These can be force-updated with -f flag
|
|
52
53
|
*/
|
|
53
54
|
const RELENTLESS_FILES: Record<string, () => string> = {
|
|
54
55
|
"config.json": () => JSON.stringify(DEFAULT_CONFIG, null, 2),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Files that should NEVER be overwritten, even with -f flag
|
|
60
|
+
* These are personalized files that users customize for their project
|
|
61
|
+
*/
|
|
62
|
+
const PROTECTED_FILES: Record<string, () => string> = {
|
|
55
63
|
"prompt.md": () => PROMPT_TEMPLATE,
|
|
56
64
|
};
|
|
57
65
|
|
|
@@ -171,7 +179,7 @@ export async function initProject(projectDir: string = process.cwd(), force: boo
|
|
|
171
179
|
}
|
|
172
180
|
}
|
|
173
181
|
|
|
174
|
-
// Create relentless files
|
|
182
|
+
// Create relentless files (can be force-updated)
|
|
175
183
|
console.log(chalk.dim("\nCreating relentless files..."));
|
|
176
184
|
|
|
177
185
|
for (const [filename, contentFn] of Object.entries(RELENTLESS_FILES)) {
|
|
@@ -187,6 +195,19 @@ export async function initProject(projectDir: string = process.cwd(), force: boo
|
|
|
187
195
|
console.log(` ${chalk.green("✓")} relentless/${filename} ${force ? `(${action})` : ""}`);
|
|
188
196
|
}
|
|
189
197
|
|
|
198
|
+
// Create protected files (NEVER overwritten, even with -f)
|
|
199
|
+
for (const [filename, contentFn] of Object.entries(PROTECTED_FILES)) {
|
|
200
|
+
const path = join(relentlessDir, filename);
|
|
201
|
+
|
|
202
|
+
if (existsSync(path)) {
|
|
203
|
+
console.log(` ${chalk.yellow("⚠")} relentless/${filename} already exists (protected, not overwriting)`);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
await Bun.write(path, contentFn());
|
|
208
|
+
console.log(` ${chalk.green("✓")} relentless/${filename} (created)`);
|
|
209
|
+
}
|
|
210
|
+
|
|
190
211
|
// Note: constitution.md is NOT copied - it should be created by /relentless.constitution command
|
|
191
212
|
// This ensures each project gets a personalized constitution
|
|
192
213
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Relentless Agent Instructions
|
|
2
|
+
|
|
3
|
+
You are an autonomous coding agent. Follow these instructions exactly.
|
|
4
|
+
|
|
5
|
+
**This is a generic template. Personalize it for your project using:**
|
|
6
|
+
```bash
|
|
7
|
+
/relentless.constitution
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Your Task (Per Iteration)
|
|
13
|
+
|
|
14
|
+
1. Read `relentless/features/<feature>/prd.json`
|
|
15
|
+
2. Read `relentless/features/<feature>/progress.txt`
|
|
16
|
+
3. Check you're on the correct branch from PRD `branchName`
|
|
17
|
+
4. Pick the **highest priority** story where `passes: false`
|
|
18
|
+
5. Review existing code to understand patterns
|
|
19
|
+
6. Implement the story
|
|
20
|
+
7. Run quality checks (typecheck, lint, test)
|
|
21
|
+
8. If ALL checks pass, commit: `feat: [Story ID] - [Story Title]`
|
|
22
|
+
9. Update PRD: set `passes: true`
|
|
23
|
+
10. Append progress to `progress.txt`
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Quality Requirements
|
|
28
|
+
|
|
29
|
+
Before marking a story complete:
|
|
30
|
+
- [ ] All quality checks pass (typecheck, lint, test)
|
|
31
|
+
- [ ] Zero errors and zero warnings
|
|
32
|
+
- [ ] No debug code (console.log, debugger)
|
|
33
|
+
- [ ] No unused imports or variables
|
|
34
|
+
- [ ] Follows existing patterns
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Progress Report Format
|
|
39
|
+
|
|
40
|
+
APPEND to progress.txt:
|
|
41
|
+
```
|
|
42
|
+
## [Date/Time] - [Story ID]
|
|
43
|
+
- What was implemented
|
|
44
|
+
- Files changed
|
|
45
|
+
- Learnings for future iterations
|
|
46
|
+
---
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Stop Condition
|
|
52
|
+
|
|
53
|
+
After completing a story, check if ALL stories have `passes: true`.
|
|
54
|
+
|
|
55
|
+
If ALL complete:
|
|
56
|
+
```
|
|
57
|
+
<promise>COMPLETE</promise>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Otherwise, end normally (next iteration continues).
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Notes
|
|
65
|
+
|
|
66
|
+
This is the default template. You should personalize `relentless/prompt.md` with:
|
|
67
|
+
- Your project's specific quality commands
|
|
68
|
+
- Your testing framework and patterns
|
|
69
|
+
- Your coding conventions
|
|
70
|
+
- Project-specific gotchas
|
|
71
|
+
|
|
72
|
+
Run `/relentless.constitution` to generate a personalized prompt.
|