/reset Command
Reset workflow configuration by re-asking startup questions and regenerating flowspec_workflow.yml
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Execution Instructions
This command re-runs the workflow configuration questions that were asked during flowspec init, allowing users to reconfigure their workflow settings without reinitializing the entire project.
Overview
The /flow:reset command:
- Re-prompts for validation mode on each workflow transition
- Regenerates
flowspec_workflow.ymlwith new settings - Optionally reconfigures constitution tier (with
--constitutionflag) - Preserves all existing project files and structure
Argument Parsing
Parse $ARGUMENTS for optional flags:
| Flag | Description |
|------|-------------|
| --constitution | Also prompt to change constitution tier |
| --all | Reset all configurations (validation modes + constitution) |
| --validation-mode {none\|keyword\|pull-request} | Set all transitions to this mode (non-interactive) |
| --no-prompts | Use defaults for all options (all NONE) |
Step 1: Verify Project Context
Before proceeding, verify this is a valid flowspec project:
# Check for project markers
if [ ! -f "flowspec_workflow.yml" ] && [ ! -d ".claude" ]; then
echo "Error: This doesn't appear to be a flowspec project"
echo "Run 'flowspec init --here' first to initialize the project"
exit 1
fi
If no flowspec_workflow.yml exists but .claude/ directory does, this is a valid project that just needs workflow configuration.
Step 2: Backup Current Configuration
Before making changes, note the current configuration:
# Read current workflow config if exists
if [ -f "flowspec_workflow.yml" ]; then
echo "Current workflow configuration will be replaced"
echo "Previous config available in git history"
fi
Step 3: Prompt for Validation Modes
If --no-prompts is NOT specified and --validation-mode is NOT specified:
Display the interactive validation mode configuration:
== Workflow Transition Validation Configuration ==
For each workflow transition, choose a validation mode:
- NONE: No gate, proceed immediately (default)
- KEYWORD: Require user to type approval keyword
- PULL_REQUEST: Require PR to be merged
1. To Do -> Assessed (after /flow:assess)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
2. Assessed -> Specified (after /flow:specify, produces PRD)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
3. Specified -> Researched (after /flow:research)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
4. Researched -> Planned (after /flow:plan, produces ADRs)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
5. Planned -> In Implementation (after /flow:implement)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
6. In Implementation -> Validated (after /flow:validate)
[1] NONE (default)
[2] KEYWORD
[3] PULL_REQUEST
> _
If user selects KEYWORD (option 2), prompt for the approval keyword:
Enter approval keyword [APPROVED]: _
Step 4: Generate flowspec_workflow.yml
Generate the workflow configuration file with the selected modes:
# Flowspec Workflow Configuration
# Generated by: /flow:reset
# Date: {YYYY-MM-DD}
#
# Validation modes:
# NONE - No gate, immediate pass-through
# KEYWORD["<string>"] - Require user to type exact keyword
# PULL_REQUEST - Require PR to be merged
version: "1.0"
transitions:
- name: assess
from: To Do
to: Assessed
validation: {MODE}
- name: specify
from: Assessed
to: Specified
validation: {MODE}
- name: research
from: Specified
to: Researched
validation: {MODE}
- name: plan
from: Researched
to: Planned
validation: {MODE}
- name: implement
from: Planned
to: In Implementation
validation: {MODE}
- name: validate
from: In Implementation
to: Validated
validation: {MODE}
Write this file to ./flowspec_workflow.yml.
Step 5: Constitution Reset (Optional)
If --constitution or --all flag is provided:
-
Prompt for constitution tier:
Select a constitution tier for your project: 1. light - Minimal controls for startups/hobby projects 2. medium - Standard controls for typical business projects 3. heavy - Enterprise controls for regulated environments Enter tier number (1-3) [2]: _ -
If constitution already exists, warn user:
Warning: Existing constitution at memory/constitution.md will be replaced. This will NOT preserve any custom modifications. Continue? [y/N]: _ -
Copy the selected tier template to
memory/constitution.md -
Inform user constitution is installed:
Constitution template installed. For full customization, edit memory/constitution.md directly.
Step 6: Display Summary
Output a summary of the changes:
╔══════════════════════════════════════════════════════════════╗
║ Workflow Configuration Reset Complete ║
╚══════════════════════════════════════════════════════════════╝
📋 VALIDATION MODES CONFIGURED
Transition Mode
─────────────────────────────────────
assess NONE
specify KEYWORD["PRD_APPROVED"]
research NONE
plan KEYWORD["ADR_APPROVED"]
implement PULL_REQUEST
validate NONE
📁 FILES UPDATED
[Y] flowspec_workflow.yml (regenerated)
{[Y] memory/constitution.md (if --constitution)}
🎯 NEXT STEPS
1. Review the generated flowspec_workflow.yml
2. Commit the configuration:
git add flowspec_workflow.yml
git commit -s -m "chore: reconfigure workflow validation modes"
💡 TIP: Run '/flow:assess <feature>' to start a new workflow
Non-Interactive Mode
If --validation-mode is specified:
- Skip all prompts
- Set all transitions to the specified mode
- Generate the workflow file directly
If --no-prompts is specified:
- Use NONE for all validation modes
- Skip constitution prompts if
--constitutionalso specified (use medium)
Error Handling
- Not in project directory: Show error and suggest
flowspec init --here - Invalid validation mode: Show valid options (none, keyword, pull-request)
- Invalid constitution tier: Show valid options (light, medium, heavy)
- User cancels: Exit gracefully with message
CLI Integration
This command mirrors the behavior of the CLI's internal prompt_validation_modes() and generate_flowspec_workflow_yml() functions. Users can also reconfigure via CLI:
# Equivalent CLI command
flowspec init --here --force # Re-runs full init with prompts
Quality Checks
Before completing:
- [ ] flowspec_workflow.yml exists and is valid YAML
- [ ] All 6 transitions are configured
- [ ] Validation modes are one of: NONE, KEYWORD["..."], PULL_REQUEST
- [ ] Summary clearly shows configured modes
- [ ] Next steps are provided
Important Notes
- Non-destructive: Only modifies workflow configuration, not project files
- Git-safe: Previous config preserved in git history
- Idempotent: Can be run multiple times safely
- Quick: No network requests or downloads required