Compare commits

..

1 Commits

Author SHA1 Message Date
Sergey Novikov 44b84d9a13
Merge eb6568c8c1 into 3dd37bc94d 2026-02-20 11:21:14 +00:00
2 changed files with 5 additions and 22 deletions

View File

@ -15,14 +15,12 @@ main_config: '{project-root}/_bmad/bmm/config.yaml'
### 1. Identify Environments ### 1. Identify Environments
- Use your file listing/system capabilities to examine the `{project-root}/_bmad-output/` directory. - Use your file listing/system capabilities to examine the `{project-root}/_bmad-output/` directory.
- Identify all subdirectories within this path. Each subdirectory represents an available environment, EXCEPT: - Identify all subdirectories within this path. Each subdirectory represents an available environment (ignore hidden directories starting with `.`).
- Ignore hidden directories starting with `.`
- Ignore standard BMAD artifact directories: `planning-artifacts`, `implementation-artifacts`, `test-artifacts`, `knowledge`, `docs`, `assets`
- The root `_bmad-output/` directory itself represents the `default (root)` unset environment. - The root `_bmad-output/` directory itself represents the `default (root)` unset environment.
### 2. Output Results ### 2. Output Results
1. Display a formatted numbered list of the existing environments you found. 1. Display a formatted bulleted list of the existing environments you found.
2. Clearly indicate the `default (root)` environment (usually [0]). 2. Clearly indicate the `default (root)` environment.
3. Check if there is an active environment currently set. Read `{project-root}/{{bmadFolderName}}/.current_project`. If it exists, indicate which environment from the list is currently active (e.g. by adding `(ACTIVE)` next to the bullet point). 3. Check if there is an active environment currently set. Read `{project-root}/{{bmadFolderName}}/.current_project`. If it exists, indicate which environment from the list is currently active (e.g. by adding `(ACTIVE)` next to the bullet point).
4. Inform the user that they can switch to another environment or create a new one using the `/set-project <env_name>` command. 4. Inform the user that they can switch to another environment or create a new one using the `/set-project <env_name>` command.

View File

@ -24,29 +24,14 @@ Load and read full config from {main_config} and resolve variables and artifact
2. **Wait for Input (If Missing)**: If the user did NOT provide a project name: 2. **Wait for Input (If Missing)**: If the user did NOT provide a project name:
- Use your file listing capabilities to examine the `{project-root}/_bmad-output/` directory. - Use your file listing capabilities to examine the `{project-root}/_bmad-output/` directory.
- Output: A formatted list of the existing environments (subdirectories) you found, explicitly noting the `default (root)` environment. - Output: A formatted list of the existing environments (subdirectories) you found, explicitly noting the `default (root)` environment.
*(Exclude hidden directories and standard BMAD artifact folders like `planning-artifacts`, `implementation-artifacts`, `test-artifacts`, `knowledge`, `docs`, `assets`)* - Ask the user: "Please select an existing environment from the list above, or type a new name to create one. Enter `CLEAR` to reset to root."
- Present options in a numbered list format and ask the user to select by number or type a new project name:
```
Select a project environment:
[0] default (root) - Current location for standard artifacts
[1] project-name-1
[2] project-name-2
...
Enter a number to select, type a new project name, or enter 'CLEAR' to reset to root:
```
- **Wait for Input.** - **Wait for Input.**
3. **Process Input**: Once a project name is established: 3. **Process Input**: Once a project name is established:
- **Case: CLEAR**: - **Case: CLEAR**:
- Delete file: `{project-root}/{{bmadFolderName}}/.current_project` - Delete file: `{project-root}/{{bmadFolderName}}/.current_project`
- Output: "✅ Project context cleared. Artifacts will go to root `_bmad-output/`." - Output: "✅ Project context cleared. Artifacts will go to root `_bmad-output/`."
- **HALT** - **HALT**
- **Case: Numeric Selection**: If input is a number (0, 1, 2, etc.): - **Case: Path Provided**:
- Map the number to the corresponding environment from your earlier listing
- If number 0, treat as "CLEAR" case above
- If valid number but out of range, show error and ask again
- If valid selection, use that environment name as the path
- **Case: Path Provided** (text input):
- **1. Cleanup**: Remove leading/trailing slashes and any occurrences of `_bmad-output/`. - **1. Cleanup**: Remove leading/trailing slashes and any occurrences of `_bmad-output/`.
- **2. Validate Existence**: Check if `{project-root}/_bmad-output/<sanitized_path>` exists on the file system. - **2. Validate Existence**: Check if `{project-root}/_bmad-output/<sanitized_path>` exists on the file system.
- **If it DOES NOT exist**: - **If it DOES NOT exist**: