byterover-cli 0.1.0 → 0.2.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.
- package/README.md +108 -653
- package/bin/dev.cmd +1 -1
- package/bin/dev.js +1 -1
- package/bin/run.cmd +1 -1
- package/bin/run.js +1 -1
- package/dist/commands/add.d.ts +4 -15
- package/dist/commands/add.js +31 -69
- package/dist/commands/init.js +13 -8
- package/dist/commands/push.d.ts +6 -4
- package/dist/commands/push.js +39 -9
- package/dist/commands/retrieve.d.ts +2 -2
- package/dist/commands/retrieve.js +3 -3
- package/dist/commands/space/list.js +10 -5
- package/dist/commands/space/switch.js +8 -7
- package/dist/commands/status.js +5 -6
- package/dist/config/environment.d.ts +3 -2
- package/dist/config/environment.js +13 -11
- package/dist/constants.d.ts +8 -1
- package/dist/constants.js +8 -1
- package/dist/core/domain/entities/{br-config.d.ts → brv-config.d.ts} +5 -5
- package/dist/core/domain/entities/{br-config.js → brv-config.js} +5 -5
- package/dist/core/domain/entities/playbook.d.ts +4 -0
- package/dist/core/domain/entities/playbook.js +7 -0
- package/dist/core/interfaces/i-playbook-service.d.ts +1 -1
- package/dist/core/interfaces/i-project-config-store.d.ts +10 -10
- package/dist/hooks/init/welcome.d.ts +3 -0
- package/dist/hooks/init/welcome.js +31 -0
- package/dist/infra/ace/ace-file-utils.js +2 -2
- package/dist/infra/ace/file-bullet-content-store.d.ts +4 -4
- package/dist/infra/ace/file-bullet-content-store.js +7 -7
- package/dist/infra/ace/file-delta-store.d.ts +1 -1
- package/dist/infra/ace/file-delta-store.js +1 -1
- package/dist/infra/ace/file-executor-output-store.d.ts +1 -1
- package/dist/infra/ace/file-executor-output-store.js +1 -1
- package/dist/infra/ace/file-playbook-store.d.ts +3 -3
- package/dist/infra/ace/file-playbook-store.js +6 -6
- package/dist/infra/ace/file-reflection-store.d.ts +1 -1
- package/dist/infra/ace/file-reflection-store.js +1 -1
- package/dist/infra/config/file-config-store.d.ts +6 -8
- package/dist/infra/config/file-config-store.js +10 -11
- package/dist/infra/playbook/file-playbook-service.d.ts +0 -1
- package/dist/infra/playbook/file-playbook-service.js +7 -8
- package/dist/templates/README.md +5 -5
- package/dist/templates/sections/command-reference.md +23 -23
- package/dist/templates/sections/workflow.md +3 -4
- package/oclif.manifest.json +10 -3
- package/package.json +8 -5
package/dist/templates/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ByteRover CLI Template System
|
|
2
2
|
|
|
3
|
-
This directory contains template files used to generate agent instructions via the `
|
|
3
|
+
This directory contains template files used to generate agent instructions via the `brv gen-rules` command.
|
|
4
4
|
|
|
5
5
|
## Directory Structure
|
|
6
6
|
|
|
@@ -44,7 +44,7 @@ Each command includes:
|
|
|
44
44
|
|
|
45
45
|
## How It Works
|
|
46
46
|
|
|
47
|
-
1. User runs `
|
|
47
|
+
1. User runs `brv gen-rules`
|
|
48
48
|
2. User selects an agent (e.g., "Claude Code")
|
|
49
49
|
3. `RuleTemplateService` loads templates via `FsTemplateLoader`
|
|
50
50
|
4. Templates are assembled:
|
|
@@ -62,10 +62,10 @@ The template system supports simple variable substitution using `{{variable_name
|
|
|
62
62
|
## Updating Templates
|
|
63
63
|
|
|
64
64
|
### To Update Command Documentation:
|
|
65
|
-
Edit `sections/command-reference.md` - changes will be reflected next time `
|
|
65
|
+
Edit `sections/command-reference.md` - changes will be reflected next time `brv gen-rules` runs.
|
|
66
66
|
|
|
67
67
|
### To Update ACE Workflow Guide:
|
|
68
|
-
Edit `sections/workflow.md` - changes will be reflected next time `
|
|
68
|
+
Edit `sections/workflow.md` - changes will be reflected next time `brv gen-rules` runs.
|
|
69
69
|
|
|
70
70
|
### To Change Output Structure:
|
|
71
71
|
Edit `base.md` - modify how sections are combined.
|
|
@@ -75,7 +75,7 @@ Edit `base.md` - modify how sections are combined.
|
|
|
75
75
|
1. **Keep templates in sync with code**: When adding/modifying commands, update `command-reference.md`
|
|
76
76
|
2. **Use clear examples**: Show realistic use cases in examples
|
|
77
77
|
3. **Maintain markdown formatting**: Ensure proper headers, code blocks, and lists
|
|
78
|
-
4. **Test after changes**: Run `
|
|
78
|
+
4. **Test after changes**: Run `brv gen-rules` and verify output in `.clinerules/byterover-rules.md`
|
|
79
79
|
|
|
80
80
|
## Future Enhancements
|
|
81
81
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Memory Commands
|
|
4
4
|
|
|
5
|
-
### `
|
|
5
|
+
### `brv add`
|
|
6
6
|
|
|
7
7
|
**Description:** Add or update a bullet in the playbook (bypasses ACE workflow for direct agent usage)
|
|
8
8
|
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
**Examples:**
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
brv add --section "Common Errors" --content "Authentication fails when token expires"
|
|
19
|
+
brv add --section "Common Errors" --bullet-id "common-00001" --content "Updated: Auth fails when token expires"
|
|
20
|
+
brv add -s "Best Practices" -c "Always validate user input before processing"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
**Suggested Sections:** Common Errors, Best Practices, Strategies, Lessons Learned, Project Structure and Dependencies, Testing, Code Style and Quality, Styling and Design
|
|
@@ -29,11 +29,11 @@ br add -s "Best Practices" -c "Always validate user input before processing"
|
|
|
29
29
|
- Updates existing bullet if `--bullet-id` matches existing bullet
|
|
30
30
|
- Displays bullet ID, section, content, and tags after operation
|
|
31
31
|
|
|
32
|
-
**Requirements:** Playbook must exist (run `
|
|
32
|
+
**Requirements:** Playbook must exist (run `brv init` first)
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
### `
|
|
36
|
+
### `brv retrieve`
|
|
37
37
|
|
|
38
38
|
**Description:** Retrieve memories from ByteRover Memora service and save to local ACE playbook
|
|
39
39
|
|
|
@@ -45,9 +45,9 @@ br add -s "Best Practices" -c "Always validate user input before processing"
|
|
|
45
45
|
**Examples:**
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
brv retrieve --query "authentication best practices"
|
|
49
|
+
brv retrieve -q "error handling" -n "src/auth/login.ts,src/auth/oauth.ts"
|
|
50
|
+
brv retrieve -q "database connection issues"
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
**Behavior:**
|
|
@@ -65,7 +65,7 @@ br retrieve -q "database connection issues"
|
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
-
### `
|
|
68
|
+
### `brv push`
|
|
69
69
|
|
|
70
70
|
**Description:** Push playbook to ByteRover memory storage and clean up local ACE files
|
|
71
71
|
|
|
@@ -76,13 +76,13 @@ br retrieve -q "database connection issues"
|
|
|
76
76
|
**Examples:**
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
brv push
|
|
80
|
+
brv push --branch develop
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
### `
|
|
85
|
+
### `brv complete`
|
|
86
86
|
|
|
87
87
|
**Description:** Complete ACE workflow: save executor output, generate reflection, and update playbook in one command
|
|
88
88
|
|
|
@@ -102,9 +102,9 @@ br push --branch develop
|
|
|
102
102
|
**Examples:**
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
brv complete "user-auth" "Implemented OAuth2 flow" "Auth works" --tool-usage "Read:src/auth.ts,Edit:src/auth.ts,Bash:npm test" --feedback "All tests passed"
|
|
106
|
+
brv complete "validation-fix" "Analyzed validator" "Fixed bug" --tool-usage "Grep:pattern:\"validate\",Read:src/validator.ts" --bullet-ids "bullet-123" --feedback "Tests passed"
|
|
107
|
+
brv complete "auth-update" "Improved error handling" "Better errors" --tool-usage "Edit:src/auth.ts" --feedback "Tests passed" --update-bullet "bullet-5"
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
**Behavior:**
|
|
@@ -120,22 +120,22 @@ br complete "auth-update" "Improved error handling" "Better errors" --tool-usage
|
|
|
120
120
|
|
|
121
121
|
---
|
|
122
122
|
|
|
123
|
-
### `
|
|
123
|
+
### `brv show`
|
|
124
124
|
|
|
125
125
|
## Best Practices
|
|
126
126
|
|
|
127
127
|
### Efficient Workflow
|
|
128
128
|
|
|
129
|
-
1. **Retrieve wisely:** Use `
|
|
130
|
-
2. **Read only what's needed:** Check playbook with `
|
|
131
|
-
3. **Update precisely:** Use `
|
|
132
|
-
4. **Push when appropriate:** Prompt user to run `
|
|
129
|
+
1. **Retrieve wisely:** Use `brv retrieve` with specific queries and `--node-keys` to filter
|
|
130
|
+
2. **Read only what's needed:** Check playbook with `brv status` to see statistics before reading full content
|
|
131
|
+
3. **Update precisely:** Use `brv add` to add/update specific bullets or `brv complete` for complete workflow
|
|
132
|
+
4. **Push when appropriate:** Prompt user to run `brv push` after completing significant work
|
|
133
133
|
|
|
134
134
|
### Memory Management
|
|
135
135
|
|
|
136
136
|
**Retrieve pattern:**
|
|
137
137
|
|
|
138
|
-
- Use `
|
|
139
|
-
- `
|
|
138
|
+
- Use `brv add` to directly add/update bullets
|
|
139
|
+
- `brv retrieve` **clears existing playbook** - use carefully
|
|
140
140
|
- Retrieved memories use actual Memora tags (not "auto-generated")
|
|
141
141
|
- Both memories and related memories are saved to playbook
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Workflow Instruction
|
|
2
2
|
|
|
3
|
-
You are a coding agent focused on one codebase. Use the
|
|
3
|
+
You are a coding agent focused on one codebase. Use the brv CLI to manage working context.
|
|
4
4
|
Core Rules:
|
|
5
5
|
|
|
6
6
|
- Start from memory. First retrieve relevant context, then read only the code that’s still necessary.
|
|
@@ -8,15 +8,14 @@ Core Rules:
|
|
|
8
8
|
|
|
9
9
|
## user-centric
|
|
10
10
|
|
|
11
|
-
Before running any `
|
|
11
|
+
Before running any `brv` command, ask the user to choose:
|
|
12
12
|
|
|
13
13
|
1. **Accept** - Review the command, then run if approved
|
|
14
14
|
2. **Auto-run** - Execute immediately (remember this preference for the session)
|
|
15
15
|
3. **No** - Cancel the command and continue without alternative
|
|
16
16
|
4. **Custom** - Skip the command and provide different instruction
|
|
17
17
|
|
|
18
|
-
Once the user chooses "Auto-run", apply that preference to all subsequent `
|
|
19
|
-
|
|
18
|
+
Once the user chooses "Auto-run", apply that preference to all subsequent `brv` commands in this conversation without asking again.
|
|
20
19
|
|
|
21
20
|
## Daily Flow
|
|
22
21
|
|
package/oclif.manifest.json
CHANGED
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"init": {
|
|
205
205
|
"aliases": [],
|
|
206
206
|
"args": {},
|
|
207
|
-
"description": "Initialize a project with ByteRover (creates .
|
|
207
|
+
"description": "Initialize a project with ByteRover (creates .brv/config.json with team/space selection and initializes ACE playbook)",
|
|
208
208
|
"examples": [
|
|
209
209
|
"<%= config.bin %> <%= command.id %>",
|
|
210
210
|
"# Re-initialize if config exists (will show current config and exit):\n<%= config.bin %> <%= command.id %>",
|
|
@@ -269,6 +269,13 @@
|
|
|
269
269
|
"hasDynamicHelp": false,
|
|
270
270
|
"multiple": false,
|
|
271
271
|
"type": "option"
|
|
272
|
+
},
|
|
273
|
+
"yes": {
|
|
274
|
+
"char": "y",
|
|
275
|
+
"description": "Skip confirmation prompt",
|
|
276
|
+
"name": "yes",
|
|
277
|
+
"allowNo": false,
|
|
278
|
+
"type": "boolean"
|
|
272
279
|
}
|
|
273
280
|
},
|
|
274
281
|
"hasDynamicHelp": false,
|
|
@@ -449,7 +456,7 @@
|
|
|
449
456
|
"space:switch": {
|
|
450
457
|
"aliases": [],
|
|
451
458
|
"args": {},
|
|
452
|
-
"description": "Switch to a different team or space (updates .
|
|
459
|
+
"description": "Switch to a different team or space (updates .brv/config.json)",
|
|
453
460
|
"examples": [
|
|
454
461
|
"<%= config.bin %> <%= command.id %>",
|
|
455
462
|
"# Shows current configuration, then prompts for new team/space selection"
|
|
@@ -472,5 +479,5 @@
|
|
|
472
479
|
]
|
|
473
480
|
}
|
|
474
481
|
},
|
|
475
|
-
"version": "0.
|
|
482
|
+
"version": "0.2.0"
|
|
476
483
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "byterover-cli",
|
|
3
3
|
"description": "ByteRover's CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"author": "ByteRover",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"brv": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/campfirein/byterover-cli/issues",
|
|
10
10
|
"dependencies": {
|
|
@@ -51,13 +51,16 @@
|
|
|
51
51
|
"keywords": [
|
|
52
52
|
"oclif"
|
|
53
53
|
],
|
|
54
|
-
"license": "
|
|
54
|
+
"license": "UNLICENSED",
|
|
55
55
|
"main": "dist/index.js",
|
|
56
56
|
"type": "module",
|
|
57
57
|
"oclif": {
|
|
58
|
-
"bin": "
|
|
59
|
-
"dirname": "
|
|
58
|
+
"bin": "brv",
|
|
59
|
+
"dirname": "brv",
|
|
60
60
|
"commands": "./dist/commands",
|
|
61
|
+
"hooks": {
|
|
62
|
+
"init": "./dist/hooks/init/welcome"
|
|
63
|
+
},
|
|
61
64
|
"plugins": [
|
|
62
65
|
"@oclif/plugin-help"
|
|
63
66
|
],
|