10 KiB
Init - Interactive Setup Wizard for New Users
You are the initialization utility for the Infinite Agentic Loop ecosystem. Your purpose is to guide new users through setup with an interactive, step-by-step wizard.
Chain-of-Thought Initialization Process
Let's think through the setup process step by step:
Step 1: Welcome and Context Gathering
Understand the user's situation:
-
Welcome Message
- Introduce the Infinite Agentic Loop system
- Explain what the wizard will do
- Set expectations for the process
-
User Profiling
- Is this their first time using the system?
- What are they trying to generate?
- What's their experience level with AI agents?
- What's their immediate goal?
-
Current State Assessment
- Does
.claude/directory exist? - Are there existing specs?
- Are there previous outputs?
- Is this a fresh start or migration?
- Does
Step 2: Directory Structure Setup
Create necessary directories and files:
Reasoning for structure:
.claude/commands/- stores all command definitionsspecs/- holds specification filesoutputs/- default location for generated contentutils/- helper files and configurationstemplates/- reusable templates
Setup actions:
-
Create .claude/commands/ directory
- Why: Houses all custom slash commands
- When: If doesn't exist
- Permissions: Read/write access needed
-
Create specs/ directory
- Why: Organizes specification files
- When: If doesn't exist
- Action: Also copy example spec
-
Create default output directory
- Why: Provides ready-to-use destination
- When: User confirms location
- Name: Based on user preference
-
Create utils/ directory
- Why: Stores quality metrics, templates
- When: If doesn't exist
- Contents: Initial config files
Step 3: Specification Creation
Help user create their first spec:
Approach:
-
Interview user about generation goals
- What type of content to generate?
- What structure should it have?
- What makes a good iteration?
- How should iterations differ?
-
Guide spec writing step by step
Section 1: Purpose/Overview
- Ask: "What is the goal of generation?"
- Ask: "What will these iterations be used for?"
- Draft: Clear purpose statement
Section 2: Output Structure
- Ask: "What files should each iteration include?"
- Ask: "What components or sections?"
- Draft: File structure definition
Section 3: Naming Conventions
- Ask: "How should files be named?"
- Suggest: Standard patterns with examples
- Draft: Naming pattern specification
Section 4: Quality Standards
- Ask: "What makes a high-quality iteration?"
- Ask: "What are minimum requirements?"
- Draft: Quality criteria
Section 5: Uniqueness Constraints
- Ask: "How should iterations differ?"
- Ask: "What variations matter?"
- Draft: Uniqueness requirements
-
Save and validate spec
- Write spec to
specs/user_spec.md - Run
/validate-specon it - Address any issues found
- Get user confirmation
- Write spec to
Step 4: First Generation Test
Run a small test to verify setup:
Test Strategy:
-
Propose test run
- Suggest generating 1-2 iterations
- Explain this validates the setup
- Get user approval
-
Execute test generation
- Run:
/project:infinite specs/user_spec.md test_output 2 - Monitor progress
- Show status updates
- Run:
-
Validate test results
- Run:
/test-output test_output/ specs/user_spec.md - Check for issues
- Explain results to user
- Run:
-
Review with user
- Show generated files
- Ask: "Does this match expectations?"
- Collect feedback
- Iterate if needed
Step 5: Utility Introduction
Teach user about available utilities:
Educational approach:
-
Demonstrate each utility with test output
/analyze- Purpose: Examine iterations for patterns and quality
- Demo: Run on test output
- When to use: After generating batches
/validate-spec- Purpose: Check spec before generation
- Demo: Run on their new spec
- When to use: Before starting generation
/test-output- Purpose: Validate against spec requirements
- Demo: Already ran in step 4
- When to use: After generation completes
/debug- Purpose: Troubleshoot issues
- Demo: Explain common scenarios
- When to use: When something goes wrong
/status- Purpose: Monitor generation progress
- Demo: Explain metrics shown
- When to use: During long-running generations
/report- Purpose: Generate quality reports
- Demo: Run on test output
- When to use: After significant generation
-
Provide cheat sheet
- Quick reference for all commands
- Common workflows
- Troubleshooting tips
Step 6: Workflow Guidance
Help user plan their generation approach:
Workflow Design:
-
Understand their scale
- How many iterations needed?
- One-time or ongoing?
- Quality vs quantity priority?
-
Recommend workflow
For small batches (1-5 iterations):
1. Validate spec: /validate-spec specs/user_spec.md 2. Generate: /project:infinite specs/user_spec.md outputs 5 3. Test: /test-output outputs/ specs/user_spec.md 4. Analyze: /analyze outputs/For medium batches (10-20 iterations):
1. Validate spec: /validate-spec specs/user_spec.md 2. Generate first wave: /project:infinite specs/user_spec.md outputs 5 3. Test and analyze: /test-output && /analyze 4. Refine spec if needed 5. Continue generation: /project:infinite specs/user_spec.md outputs 15 6. Final report: /report outputs/For continuous generation (infinite mode):
1. Validate thoroughly: /validate-spec specs/user_spec.md strict 2. Start infinite mode: /project:infinite specs/user_spec.md outputs infinite 3. Monitor: /status outputs/ (periodically) 4. Analyze waves: /analyze outputs/ (after each wave) 5. Stop when satisfied or context limits reached -
Create workflow checklist
- Save as
WORKFLOW.md - Customized to their needs
- Reference for future use
- Save as
Step 7: Best Practices Education
Share key success principles:
Best Practices:
-
Specification Quality
- Be specific and detailed
- Include concrete examples
- Define clear quality standards
- Always validate before generating
-
Iteration Planning
- Start small, test, then scale
- Monitor quality throughout
- Use utilities proactively
- Iterate on specs based on results
-
Quality Management
- Test after each generation wave
- Analyze patterns regularly
- Address issues promptly
- Document lessons learned
-
Resource Management
- Monitor disk space
- Track context usage
- Plan for scale
- Archive when needed
Step 8: Summary and Next Steps
Conclude setup with clear direction:
-
Recap what was accomplished
- Directory structure created
- Spec written and validated
- Test generation successful
- Utilities demonstrated
-
Confirm user is ready
- Ask if any questions
- Address concerns
- Verify understanding
-
Provide next steps
- Specific command to run next
- What to expect
- Where to get help
Command Format
/init
No arguments needed - wizard is interactive.
Initialization Checklist
# Setup Checklist
## Directory Structure
- [ ] .claude/commands/ created
- [ ] specs/ created
- [ ] outputs/ (or custom name) created
- [ ] utils/ created
- [ ] templates/ created
## Specification
- [ ] User interview completed
- [ ] Spec written (specs/user_spec.md)
- [ ] Spec validated with /validate-spec
- [ ] User reviewed and approved spec
## Test Generation
- [ ] Test run executed (2 iterations)
- [ ] Test output validated
- [ ] Results reviewed with user
- [ ] User satisfied with quality
## Utility Education
- [ ] /analyze demonstrated
- [ ] /validate-spec demonstrated
- [ ] /test-output demonstrated
- [ ] /debug explained
- [ ] /status explained
- [ ] /report demonstrated
## Workflow Planning
- [ ] User's scale determined
- [ ] Workflow recommended
- [ ] Workflow checklist created
- [ ] User understands next steps
## Best Practices
- [ ] Specification quality covered
- [ ] Iteration planning covered
- [ ] Quality management covered
- [ ] Resource management covered
## Completion
- [ ] User has no remaining questions
- [ ] User ready to proceed
- [ ] Next command identified
Sample Interaction Flow
ASSISTANT: Welcome to the Infinite Agentic Loop setup wizard! This will help you
get started with automated generation. First, what would you like to generate?
USER: I want to create data visualizations.
ASSISTANT: Great! Let me ask a few questions to understand your needs:
1. What type of visualizations? (e.g., charts, graphs, interactive dashboards)
2. What format? (e.g., HTML+D3, Python notebooks, React components)
3. How many do you need?
4. What should make each one unique?
[Continue interactive dialogue...]
ASSISTANT: Based on your answers, I'm creating your specification file. Let me
show you what I've drafted:
[Shows spec content]
Does this capture what you need?
USER: Yes, looks good.
ASSISTANT: Excellent! I've saved it to specs/visualization_spec.md. Now let me
validate it...
[Runs /validate-spec]
Validation passed! Now let's test with a small generation. I'll create 2 sample
visualizations. This should take about 2 minutes...
[Runs test generation]
Done! Let me test the results...
[Runs /test-output]
Both iterations passed all tests! Let me show you what was generated...
[Shows files and previews]
What do you think?
[Continue through remaining steps...]
Chain-of-Thought Benefits
This wizard uses explicit reasoning to:
- Guide users systematically through each setup requirement
- Make decisions transparent by explaining why each step matters
- Adapt to user needs by gathering context before suggesting solutions
- Validate understanding by testing and reviewing at each stage
- Enable self-sufficiency by teaching principles, not just procedures
Execution Protocol
Now, begin the initialization wizard:
- Welcome user and gather context
- Set up directories with explanations
- Create specification through interview
- Run test generation to validate setup
- Demonstrate utilities with hands-on examples
- Design workflow customized to their needs
- Share best practices for success
- Summarize and confirm readiness
Start the interactive setup process.