byterover-cli 0.1.1 → 0.2.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/README.md +37 -27
- 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.js +1 -1
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.js +73 -27
- package/dist/commands/logout.d.ts +16 -0
- package/dist/commands/logout.js +61 -0
- package/dist/commands/push.d.ts +5 -5
- package/dist/commands/push.js +11 -11
- 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 -5
- package/dist/config/environment.d.ts +3 -2
- package/dist/config/environment.js +5 -3
- 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/event.d.ts +1 -1
- package/dist/core/domain/entities/event.js +1 -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/core/interfaces/i-rule-template-service.d.ts +0 -4
- package/dist/core/interfaces/i-rule-template-service.js +1 -4
- 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/infra/rule/constants.d.ts +4 -0
- package/dist/infra/rule/constants.js +4 -0
- package/dist/infra/rule/rule-template-service.js +1 -1
- package/dist/infra/rule/rule-writer-service.js +1 -5
- package/dist/templates/README.md +5 -5
- package/dist/templates/sections/command-reference.md +41 -23
- package/dist/templates/sections/workflow.md +11 -12
- package/oclif.manifest.json +44 -4
- package/package.json +9 -8
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import type { IProjectConfigStore } from '../../core/interfaces/i-project-config-store.js';
|
|
2
|
-
import {
|
|
2
|
+
import { BrvConfig } from '../../core/domain/entities/brv-config.js';
|
|
3
3
|
/**
|
|
4
4
|
* File-based implementation of IProjectConfigStore.
|
|
5
|
-
* Stores configuration in .
|
|
5
|
+
* Stores configuration in .brv/config.json in the project directory.
|
|
6
6
|
*/
|
|
7
7
|
export declare class ProjectConfigStore implements IProjectConfigStore {
|
|
8
|
-
private static readonly BR_DIR;
|
|
9
|
-
private static readonly CONFIG_FILE;
|
|
10
8
|
exists(directory?: string): Promise<boolean>;
|
|
11
|
-
read(directory?: string): Promise<
|
|
12
|
-
write(config:
|
|
9
|
+
read(directory?: string): Promise<BrvConfig | undefined>;
|
|
10
|
+
write(config: BrvConfig, directory?: string): Promise<void>;
|
|
13
11
|
/**
|
|
14
|
-
* Gets the full path to the .
|
|
12
|
+
* Gets the full path to the .brv directory.
|
|
15
13
|
*/
|
|
16
|
-
private
|
|
14
|
+
private getBrvDirPath;
|
|
17
15
|
/**
|
|
18
16
|
* Gets the full path to the config.json file.
|
|
19
17
|
*/
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { BRV_DIR, PROJECT_CONFIG_FILE } from '../../constants.js';
|
|
5
|
+
import { BrvConfig } from '../../core/domain/entities/brv-config.js';
|
|
5
6
|
/**
|
|
6
7
|
* File-based implementation of IProjectConfigStore.
|
|
7
|
-
* Stores configuration in .
|
|
8
|
+
* Stores configuration in .brv/config.json in the project directory.
|
|
8
9
|
*/
|
|
9
10
|
export class ProjectConfigStore {
|
|
10
|
-
static BR_DIR = '.br';
|
|
11
|
-
static CONFIG_FILE = 'config.json';
|
|
12
11
|
async exists(directory) {
|
|
13
12
|
const configPath = this.getConfigPath(directory);
|
|
14
13
|
return existsSync(configPath);
|
|
@@ -21,17 +20,17 @@ export class ProjectConfigStore {
|
|
|
21
20
|
try {
|
|
22
21
|
const content = await readFile(configPath, 'utf8');
|
|
23
22
|
const json = JSON.parse(content);
|
|
24
|
-
return
|
|
23
|
+
return BrvConfig.fromJson(json);
|
|
25
24
|
}
|
|
26
25
|
catch (error) {
|
|
27
26
|
throw new Error(`Failed to read config from ${configPath}: ${error.message}`);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
async write(config, directory) {
|
|
31
|
-
const brDirPath = this.
|
|
30
|
+
const brDirPath = this.getBrvDirPath(directory);
|
|
32
31
|
const configPath = this.getConfigPath(directory);
|
|
33
32
|
try {
|
|
34
|
-
// Create .
|
|
33
|
+
// Create .brv directory if it doesn't exist
|
|
35
34
|
await mkdir(brDirPath, { recursive: true });
|
|
36
35
|
// Write config.json
|
|
37
36
|
const content = JSON.stringify(config.toJson(), undefined, 2);
|
|
@@ -42,16 +41,16 @@ export class ProjectConfigStore {
|
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
|
-
* Gets the full path to the .
|
|
44
|
+
* Gets the full path to the .brv directory.
|
|
46
45
|
*/
|
|
47
|
-
|
|
46
|
+
getBrvDirPath(directory) {
|
|
48
47
|
const baseDir = directory ?? process.cwd();
|
|
49
|
-
return join(baseDir,
|
|
48
|
+
return join(baseDir, BRV_DIR);
|
|
50
49
|
}
|
|
51
50
|
/**
|
|
52
51
|
* Gets the full path to the config.json file.
|
|
53
52
|
*/
|
|
54
53
|
getConfigPath(directory) {
|
|
55
|
-
return join(this.
|
|
54
|
+
return join(this.getBrvDirPath(directory), PROJECT_CONFIG_FILE);
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -13,7 +13,6 @@ export type PlaybookServiceConfig = {
|
|
|
13
13
|
* bullet management, delta application, and reflection tag processing.
|
|
14
14
|
*/
|
|
15
15
|
export declare class FilePlaybookService implements IPlaybookService {
|
|
16
|
-
private static readonly BULLETS_DIR;
|
|
17
16
|
private static readonly SUBDIRS;
|
|
18
17
|
private readonly config;
|
|
19
18
|
private readonly playbookStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdir } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { ACE_DIR,
|
|
3
|
+
import { ACE_DIR, BRV_DIR, BULLETS_DIR, DELTAS_DIR, EXECUTOR_OUTPUTS_DIR, REFLECTIONS_DIR } from '../../constants.js';
|
|
4
4
|
import { Playbook } from '../../core/domain/entities/playbook.js';
|
|
5
5
|
import { FilePlaybookStore } from '../ace/file-playbook-store.js';
|
|
6
6
|
/**
|
|
@@ -9,8 +9,7 @@ import { FilePlaybookStore } from '../ace/file-playbook-store.js';
|
|
|
9
9
|
* bullet management, delta application, and reflection tag processing.
|
|
10
10
|
*/
|
|
11
11
|
export class FilePlaybookService {
|
|
12
|
-
static
|
|
13
|
-
static SUBDIRS = [REFLECTIONS_DIR, EXECUTOR_OUTPUTS_DIR, DELTAS_DIR, FilePlaybookService.BULLETS_DIR];
|
|
12
|
+
static SUBDIRS = [REFLECTIONS_DIR, EXECUTOR_OUTPUTS_DIR, DELTAS_DIR, BULLETS_DIR];
|
|
14
13
|
config;
|
|
15
14
|
playbookStore;
|
|
16
15
|
constructor(config = {}, playbookStore = new FilePlaybookStore()) {
|
|
@@ -87,7 +86,7 @@ export class FilePlaybookService {
|
|
|
87
86
|
// Load playbook
|
|
88
87
|
const playbook = await this.playbookStore.load(directory);
|
|
89
88
|
if (!playbook) {
|
|
90
|
-
throw new Error('Playbook not found. Run `
|
|
89
|
+
throw new Error('Playbook not found. Run `brv init` to initialize.');
|
|
91
90
|
}
|
|
92
91
|
// Apply tags from reflection
|
|
93
92
|
let tagsApplied = 0;
|
|
@@ -114,16 +113,16 @@ export class FilePlaybookService {
|
|
|
114
113
|
}
|
|
115
114
|
async initialize(directory) {
|
|
116
115
|
const baseDir = directory ?? this.config.baseDirectory ?? process.cwd();
|
|
117
|
-
const
|
|
118
|
-
const aceDir = join(
|
|
119
|
-
// Create .
|
|
116
|
+
const brvDir = join(baseDir, BRV_DIR);
|
|
117
|
+
const aceDir = join(brvDir, ACE_DIR);
|
|
118
|
+
// Create .brv/ace/ directory
|
|
120
119
|
await mkdir(aceDir, { recursive: true });
|
|
121
120
|
// Create subdirectories
|
|
122
121
|
await Promise.all(FilePlaybookService.SUBDIRS.map((subdir) => mkdir(join(aceDir, subdir), { recursive: true })));
|
|
123
122
|
// Check if playbook already exists
|
|
124
123
|
const exists = await this.playbookStore.exists(directory ?? this.config.baseDirectory);
|
|
125
124
|
if (exists) {
|
|
126
|
-
throw new Error('Playbook already exists. Use `
|
|
125
|
+
throw new Error('Playbook already exists. Use `brv clear` to remove it first.');
|
|
127
126
|
}
|
|
128
127
|
// Create empty playbook
|
|
129
128
|
const playbook = new Playbook();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RuleExistsError } from '../../core/domain/errors/rule-error.js';
|
|
2
|
-
import { BR_RULE_TAG } from '../../core/interfaces/i-rule-template-service.js';
|
|
3
2
|
import { AGENT_RULE_CONFIGS } from './agent-rule-config.js';
|
|
3
|
+
import { BR_RULE_TAG } from './constants.js';
|
|
4
4
|
/**
|
|
5
5
|
* Service for writing agent-specific rule files.
|
|
6
6
|
* Uses IFileService to write files and RuleTemplateService to generate content.
|
|
@@ -24,20 +24,16 @@ export class RuleWriterService {
|
|
|
24
24
|
}
|
|
25
25
|
const { filePath, writeMode } = config;
|
|
26
26
|
const fileExists = await this.fileService.exists(filePath);
|
|
27
|
-
// Throw an error if the file exists and force is not set
|
|
28
27
|
if (writeMode === 'overwrite' && fileExists && !force) {
|
|
29
28
|
throw new RuleExistsError();
|
|
30
29
|
}
|
|
31
30
|
if (writeMode === 'append' && fileExists && !force) {
|
|
32
31
|
const content = await this.fileService.read(filePath);
|
|
33
|
-
// Throw an error if the rule already exists
|
|
34
32
|
if (content.includes(BR_RULE_TAG)) {
|
|
35
33
|
throw new RuleExistsError();
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
|
-
// Generate rule content
|
|
39
36
|
const ruleContent = await this.templateService.generateRuleContent(agent);
|
|
40
|
-
// Write the rule file
|
|
41
37
|
await this.fileService.write(ruleContent, filePath, writeMode);
|
|
42
38
|
}
|
|
43
39
|
}
|
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,24 +65,25 @@ 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
|
|
|
72
72
|
**Flags:**
|
|
73
73
|
|
|
74
74
|
- `-b, --branch <string>`: ByteRover branch name (default: "main", NOT git branch)
|
|
75
|
+
- `-y, --yes`: Skip confirmation prompt
|
|
75
76
|
|
|
76
77
|
**Examples:**
|
|
77
78
|
|
|
78
79
|
```bash
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
brv push
|
|
81
|
+
brv push --branch develop
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
---
|
|
84
85
|
|
|
85
|
-
### `
|
|
86
|
+
### `brv complete`
|
|
86
87
|
|
|
87
88
|
**Description:** Complete ACE workflow: save executor output, generate reflection, and update playbook in one command
|
|
88
89
|
|
|
@@ -102,9 +103,9 @@ br push --branch develop
|
|
|
102
103
|
**Examples:**
|
|
103
104
|
|
|
104
105
|
```bash
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
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"
|
|
107
|
+
brv complete "validation-fix" "Analyzed validator" "Fixed bug" --tool-usage "Grep:pattern:\"validate\",Read:src/validator.ts" --bullet-ids "bullet-123" --feedback "Tests passed"
|
|
108
|
+
brv complete "auth-update" "Improved error handling" "Better errors" --tool-usage "Edit:src/auth.ts" --feedback "Tests passed" --update-bullet "bullet-5"
|
|
108
109
|
```
|
|
109
110
|
|
|
110
111
|
**Behavior:**
|
|
@@ -120,22 +121,39 @@ br complete "auth-update" "Improved error handling" "Better errors" --tool-usage
|
|
|
120
121
|
|
|
121
122
|
---
|
|
122
123
|
|
|
123
|
-
### `
|
|
124
|
+
### `brv status`
|
|
125
|
+
|
|
126
|
+
**Description**: Show CLI status and project information. Display local ACE context (ACE playbook) managed by ByteRover CLI.
|
|
127
|
+
|
|
128
|
+
**Arguments:**
|
|
129
|
+
|
|
130
|
+
- `DIRECTORY`:Project directory (defaults to current directory).
|
|
131
|
+
|
|
132
|
+
**Flags:**
|
|
133
|
+
|
|
134
|
+
- `-f, --format=<option>`: [default: table] Output format. <options: table|json>
|
|
135
|
+
|
|
136
|
+
**Examples:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
brv status
|
|
140
|
+
brv status --format json
|
|
141
|
+
```
|
|
124
142
|
|
|
125
143
|
## Best Practices
|
|
126
144
|
|
|
127
145
|
### Efficient Workflow
|
|
128
146
|
|
|
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 `
|
|
147
|
+
1. **Retrieve wisely:** Use `brv retrieve` with specific queries and `--node-keys` to filter
|
|
148
|
+
2. **Read only what's needed:** Check playbook with `brv status` to see statistics before reading full content
|
|
149
|
+
3. **Update precisely:** Use `brv add` to add/update specific bullets or `brv complete` for complete workflow
|
|
150
|
+
4. **Push when appropriate:** Prompt user to run `brv push` after completing significant work
|
|
133
151
|
|
|
134
152
|
### Memory Management
|
|
135
153
|
|
|
136
154
|
**Retrieve pattern:**
|
|
137
155
|
|
|
138
|
-
- Use `
|
|
139
|
-
- `
|
|
156
|
+
- Use `brv add` to directly add/update bullets
|
|
157
|
+
- `brv retrieve` **clears existing playbook** - use carefully
|
|
140
158
|
- Retrieved memories use actual Memora tags (not "auto-generated")
|
|
141
159
|
- 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,31 +8,30 @@ 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
|
|
|
23
|
-
1.
|
|
22
|
+
1. Always attempt to retrieve relevant context from ByteRover first by running `brv retrieve`.
|
|
24
23
|
|
|
25
|
-
2.Do the work with minimal code reads
|
|
24
|
+
2. Do the work with minimal code reads
|
|
26
25
|
|
|
27
|
-
3.Record new or refined knowledge in the playbook
|
|
26
|
+
3. Record new or refined knowledge in the playbook
|
|
28
27
|
|
|
29
|
-
- Add only specific, actionable, contextual items; avoid secrets. Redact when in doubt.
|
|
28
|
+
- Add only specific, actionable, contextual items; avoid secrets. Redact when in doubt.
|
|
30
29
|
|
|
31
|
-
4.Sync policy (manual by default)
|
|
30
|
+
4. Sync policy (manual by default)
|
|
32
31
|
|
|
33
|
-
- Do not auto-push.
|
|
34
|
-
- When the playbook has meaningful updates, prompt the user to run the command
|
|
35
|
-
- If the user has explicitly allowed auto-push, proceed non-interactively
|
|
32
|
+
- Do not auto-push.
|
|
33
|
+
- When the playbook has meaningful updates, prompt the user to run the command
|
|
34
|
+
- If the user has explicitly allowed auto-push, proceed non-interactively by running `brv push -y`.
|
|
36
35
|
|
|
37
36
|
## Playbook Guideline
|
|
38
37
|
|
package/oclif.manifest.json
CHANGED
|
@@ -204,13 +204,21 @@
|
|
|
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 %>",
|
|
211
211
|
"# Full workflow: login then initialize:\n<%= config.bin %> login\n<%= config.bin %> <%= command.id %>"
|
|
212
212
|
],
|
|
213
|
-
"flags": {
|
|
213
|
+
"flags": {
|
|
214
|
+
"force": {
|
|
215
|
+
"char": "f",
|
|
216
|
+
"description": "Force re-initialization without confirmation prompt",
|
|
217
|
+
"name": "force",
|
|
218
|
+
"allowNo": false,
|
|
219
|
+
"type": "boolean"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
214
222
|
"hasDynamicHelp": false,
|
|
215
223
|
"hiddenAliases": [],
|
|
216
224
|
"id": "init",
|
|
@@ -251,6 +259,38 @@
|
|
|
251
259
|
"login.js"
|
|
252
260
|
]
|
|
253
261
|
},
|
|
262
|
+
"logout": {
|
|
263
|
+
"aliases": [],
|
|
264
|
+
"args": {},
|
|
265
|
+
"description": "Log out of ByteRover CLI and clear authentication (does not affect local project files)",
|
|
266
|
+
"examples": [
|
|
267
|
+
"<%= config.bin %> <%= command.id %>",
|
|
268
|
+
"<%= config.bin %> <%= command.id %> --yes"
|
|
269
|
+
],
|
|
270
|
+
"flags": {
|
|
271
|
+
"yes": {
|
|
272
|
+
"char": "y",
|
|
273
|
+
"description": "Skip confirmation prompt",
|
|
274
|
+
"name": "yes",
|
|
275
|
+
"allowNo": false,
|
|
276
|
+
"type": "boolean"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"hasDynamicHelp": false,
|
|
280
|
+
"hiddenAliases": [],
|
|
281
|
+
"id": "logout",
|
|
282
|
+
"pluginAlias": "byterover-cli",
|
|
283
|
+
"pluginName": "byterover-cli",
|
|
284
|
+
"pluginType": "core",
|
|
285
|
+
"strict": true,
|
|
286
|
+
"enableJsonFlag": false,
|
|
287
|
+
"isESM": true,
|
|
288
|
+
"relativePath": [
|
|
289
|
+
"dist",
|
|
290
|
+
"commands",
|
|
291
|
+
"logout.js"
|
|
292
|
+
]
|
|
293
|
+
},
|
|
254
294
|
"push": {
|
|
255
295
|
"aliases": [],
|
|
256
296
|
"args": {},
|
|
@@ -456,7 +496,7 @@
|
|
|
456
496
|
"space:switch": {
|
|
457
497
|
"aliases": [],
|
|
458
498
|
"args": {},
|
|
459
|
-
"description": "Switch to a different team or space (updates .
|
|
499
|
+
"description": "Switch to a different team or space (updates .brv/config.json)",
|
|
460
500
|
"examples": [
|
|
461
501
|
"<%= config.bin %> <%= command.id %>",
|
|
462
502
|
"# Shows current configuration, then prompts for new team/space selection"
|
|
@@ -479,5 +519,5 @@
|
|
|
479
519
|
]
|
|
480
520
|
}
|
|
481
521
|
},
|
|
482
|
-
"version": "0.
|
|
522
|
+
"version": "0.2.1"
|
|
483
523
|
}
|
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.1",
|
|
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": {
|
|
@@ -47,17 +47,18 @@
|
|
|
47
47
|
"./dist",
|
|
48
48
|
"./oclif.manifest.json"
|
|
49
49
|
],
|
|
50
|
-
"homepage": "https://
|
|
51
|
-
"keywords": [
|
|
52
|
-
"oclif"
|
|
53
|
-
],
|
|
50
|
+
"homepage": "https://www.byterover.dev/",
|
|
51
|
+
"keywords": [],
|
|
54
52
|
"license": "UNLICENSED",
|
|
55
53
|
"main": "dist/index.js",
|
|
56
54
|
"type": "module",
|
|
57
55
|
"oclif": {
|
|
58
|
-
"bin": "
|
|
59
|
-
"dirname": "
|
|
56
|
+
"bin": "brv",
|
|
57
|
+
"dirname": "brv",
|
|
60
58
|
"commands": "./dist/commands",
|
|
59
|
+
"hooks": {
|
|
60
|
+
"init": "./dist/hooks/init/welcome"
|
|
61
|
+
},
|
|
61
62
|
"plugins": [
|
|
62
63
|
"@oclif/plugin-help"
|
|
63
64
|
],
|